From 0c3a63ad8528feee1a312b9f4a042719be089727 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 14 May 2026 15:13:21 +0000 Subject: [PATCH] Configurations: 'specification/network/resource-manager/Microsoft.Network/Network/tspconfig.yaml', API Version: 2025-07-01, SDK Release Type: stable, and CommitSHA: 'c11f4a99a0d0a430e825fab35ec8e5748fa48756' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6298917 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .github/CODEOWNERS | 2 +- pnpm-lock.yaml | 28 +- sdk/network/arm-network/CHANGELOG.md | 1765 +- sdk/network/arm-network/README.md | 20 +- sdk/network/arm-network/_meta.json | 8 - sdk/network/arm-network/api-extractor.json | 4 +- .../arm-network/config/tsconfig.samples.json | 8 + .../arm-network/config/tsconfig.snippets.json | 3 + .../config/tsconfig.src.browser.json | 4 + .../arm-network/config/tsconfig.src.cjs.json | 4 + .../arm-network/config/tsconfig.src.esm.json | 4 + .../config/tsconfig.src.react-native.json | 4 + .../config/tsconfig.test.browser.json | 10 + .../config/tsconfig.test.node.json | 10 + sdk/network/arm-network/eslint.config.mjs | 14 + sdk/network/arm-network/metadata.json | 2138 + sdk/network/arm-network/package.json | 254 +- .../review/arm-network-node.api.md | 19354 ------- ...dminRuleCollectionsCreateOrUpdateSample.ts | 48 +- .../adminRuleCollectionsDeleteSample.ts | 36 +- .../adminRuleCollectionsGetSample.ts | 23 +- .../adminRuleCollectionsListSample.ts | 21 +- .../adminRulesCreateOrUpdateSample.ts | 120 +- .../samples-dev/adminRulesDeleteSample.ts | 39 +- .../samples-dev/adminRulesGetSample.ts | 51 +- .../samples-dev/adminRulesListSample.ts | 24 +- ...yPrivateEndpointConnectionsDeleteSample.ts | 20 +- ...ewayPrivateEndpointConnectionsGetSample.ts | 18 +- ...wayPrivateEndpointConnectionsListSample.ts | 16 +- ...yPrivateEndpointConnectionsUpdateSample.ts | 46 +- ...onGatewayPrivateLinkResourcesListSample.ts | 17 +- ...ewayWafDynamicManifestsDefaultGetSample.ts | 17 +- ...tionGatewayWafDynamicManifestsGetSample.ts | 32 - ...tionGatewaysBackendHealthOnDemandSample.ts | 35 +- .../applicationGatewaysBackendHealthSample.ts | 16 +- ...applicationGatewaysCreateOrUpdateSample.ts | 101 +- .../applicationGatewaysDeleteSample.ts | 17 +- .../applicationGatewaysGetSample.ts | 16 +- ...ionGatewaysGetSslPredefinedPolicySample.ts | 15 +- .../applicationGatewaysListAllSample.ts | 10 +- ...tewaysListAvailableRequestHeadersSample.ts | 11 +- ...ewaysListAvailableResponseHeadersSample.ts | 14 +- ...ewaysListAvailableServerVariablesSample.ts | 14 +- ...onGatewaysListAvailableSslOptionsSample.ts | 9 +- ...istAvailableSslPredefinedPoliciesSample.ts | 10 +- ...nGatewaysListAvailableWafRuleSetsSample.ts | 9 +- .../applicationGatewaysListSample.ts | 13 +- .../applicationGatewaysStartSample.ts | 17 +- .../applicationGatewaysStopSample.ts | 17 +- .../applicationGatewaysUpdateTagsSample.ts | 21 +- ...ationSecurityGroupsCreateOrUpdateSample.ts | 27 +- .../applicationSecurityGroupsDeleteSample.ts | 17 +- .../applicationSecurityGroupsGetSample.ts | 16 +- .../applicationSecurityGroupsListAllSample.ts | 10 +- .../applicationSecurityGroupsListSample.ts | 15 +- ...plicationSecurityGroupsUpdateTagsSample.ts | 21 +- .../availableDelegationsListSample.ts | 13 +- .../availableEndpointServicesListSample.ts | 13 +- ...eEndpointTypesListByResourceGroupSample.ts | 16 +- ...availablePrivateEndpointTypesListSample.ts | 15 +- ...lableResourceGroupDelegationsListSample.ts | 17 +- ...ServiceAliasesListByResourceGroupSample.ts | 16 +- .../availableServiceAliasesListSample.ts | 13 +- .../azureFirewallFqdnTagsListAllSample.ts | 10 +- .../azureFirewallsCreateOrUpdateSample.ts | 348 +- .../samples-dev/azureFirewallsDeleteSample.ts | 17 +- .../samples-dev/azureFirewallsGetSample.ts | 99 +- .../azureFirewallsListAllSample.ts | 10 +- ...azureFirewallsListLearnedPrefixesSample.ts | 16 +- .../samples-dev/azureFirewallsListSample.ts | 13 +- ...reFirewallsPacketCaptureOperationSample.ts | 36 +- .../azureFirewallsPacketCaptureSample.ts | 37 +- .../azureFirewallsUpdateTagsSample.ts | 21 +- .../bastionHostsCreateOrUpdateSample.ts | 130 +- .../samples-dev/bastionHostsDeleteSample.ts | 33 +- .../samples-dev/bastionHostsGetSample.ts | 71 +- .../bastionHostsListByResourceGroupSample.ts | 15 +- .../samples-dev/bastionHostsListSample.ts | 10 +- .../bastionHostsUpdateTagsSample.ts | 21 +- .../bgpServiceCommunitiesListSample.ts | 10 +- .../checkDnsNameAvailabilitySample.ts | 16 +- .../commitsCreateOrUpdateSample.ts | 40 + .../samples-dev/commitsDeleteSample.ts | 24 + .../samples-dev/commitsGetSample.ts | 25 + .../samples-dev/commitsListSample.ts | 29 + ...urationPolicyGroupsCreateOrUpdateSample.ts | 49 +- .../configurationPolicyGroupsDeleteSample.ts | 19 +- .../configurationPolicyGroupsGetSample.ts | 18 +- ...roupsListByVpnServerConfigurationSample.ts | 16 +- .../connectionMonitorsCreateOrUpdateSample.ts | 133 +- .../connectionMonitorsDeleteSample.ts | 19 +- .../connectionMonitorsGetSample.ts | 18 +- .../connectionMonitorsListSample.ts | 17 +- .../connectionMonitorsStopSample.ts | 19 +- .../connectionMonitorsUpdateTagsSample.ts | 23 +- .../connectionPoliciesCreateOrUpdateSample.ts | 41 + .../connectionPoliciesDeleteSample.ts | 24 + .../connectionPoliciesGetSample.ts | 25 + .../connectionPoliciesListSample.ts | 29 + ...ivityConfigurationsCreateOrUpdateSample.ts | 82 +- .../connectivityConfigurationsDeleteSample.ts | 34 +- .../connectivityConfigurationsGetSample.ts | 21 +- .../connectivityConfigurationsListSample.ts | 19 +- .../customIPPrefixesCreateOrUpdateSample.ts | 22 +- .../customIPPrefixesDeleteSample.ts | 17 +- .../samples-dev/customIPPrefixesGetSample.ts | 16 +- .../customIPPrefixesListAllSample.ts | 10 +- .../samples-dev/customIPPrefixesListSample.ts | 13 +- .../customIPPrefixesUpdateTagsSample.ts | 21 +- .../ddosCustomPoliciesCreateOrUpdateSample.ts | 27 +- .../ddosCustomPoliciesDeleteSample.ts | 17 +- .../ddosCustomPoliciesGetSample.ts | 16 +- .../ddosCustomPoliciesListAllSample.ts | 29 + .../ddosCustomPoliciesListSample.ts | 29 + .../ddosCustomPoliciesUpdateTagsSample.ts | 21 +- ...ddosProtectionPlansCreateOrUpdateSample.ts | 26 +- .../ddosProtectionPlansDeleteSample.ts | 17 +- .../ddosProtectionPlansGetSample.ts | 16 +- ...rotectionPlansListByResourceGroupSample.ts | 15 +- .../ddosProtectionPlansListSample.ts | 10 +- .../ddosProtectionPlansUpdateTagsSample.ts | 21 +- .../defaultSecurityRulesGetSample.ts | 18 +- .../defaultSecurityRulesListSample.ts | 17 +- ...deleteBastionShareableLinkByTokenSample.ts | 36 +- .../deleteBastionShareableLinkSample.ts | 39 +- .../disconnectActiveSessionsSample.ts | 22 +- .../dscpConfigurationCreateOrUpdateSample.ts | 26 +- .../dscpConfigurationDeleteSample.ts | 17 +- .../samples-dev/dscpConfigurationGetSample.ts | 16 +- .../dscpConfigurationListAllSample.ts | 12 +- .../dscpConfigurationListSample.ts | 15 +- ...rcuitAuthorizationsCreateOrUpdateSample.ts | 32 +- ...sRouteCircuitAuthorizationsDeleteSample.ts | 20 +- ...ressRouteCircuitAuthorizationsGetSample.ts | 18 +- ...essRouteCircuitAuthorizationsListSample.ts | 17 +- ...eCircuitConnectionsCreateOrUpdateSample.ts | 44 +- ...ressRouteCircuitConnectionsDeleteSample.ts | 24 +- ...expressRouteCircuitConnectionsGetSample.ts | 21 +- ...xpressRouteCircuitConnectionsListSample.ts | 19 +- ...outeCircuitPeeringsCreateOrUpdateSample.ts | 42 +- ...expressRouteCircuitPeeringsDeleteSample.ts | 19 +- .../expressRouteCircuitPeeringsGetSample.ts | 18 +- .../expressRouteCircuitPeeringsListSample.ts | 17 +- ...xpressRouteCircuitsCreateOrUpdateSample.ts | 71 +- .../expressRouteCircuitsDeleteSample.ts | 17 +- ...ircuitLinkFailoverAllTestsDetailsSample.ts | 29 + ...cuitLinkFailoverSingleTestDetailsSample.ts | 31 + ...pressRouteCircuitsGetPeeringStatsSample.ts | 18 +- .../expressRouteCircuitsGetSample.ts | 16 +- .../expressRouteCircuitsGetStatsSample.ts | 16 +- .../expressRouteCircuitsListAllSample.ts | 10 +- .../expressRouteCircuitsListArpTableSample.ts | 27 +- ...pressRouteCircuitsListRoutesTableSample.ts | 23 +- ...uteCircuitsListRoutesTableSummarySample.ts | 26 +- .../expressRouteCircuitsListSample.ts | 15 +- ...cuitsStartCircuitLinkFailoverTestSample.ts | 30 + ...rcuitsStopCircuitLinkFailoverTestSample.ts | 25 + .../expressRouteCircuitsUpdateTagsSample.ts | 21 +- ...essRouteConnectionsCreateOrUpdateSample.ts | 97 +- .../expressRouteConnectionsDeleteSample.ts | 22 +- .../expressRouteConnectionsGetSample.ts | 19 +- .../expressRouteConnectionsListSample.ts | 16 +- ...sConnectionPeeringsCreateOrUpdateSample.ts | 51 +- ...outeCrossConnectionPeeringsDeleteSample.ts | 25 +- ...ssRouteCrossConnectionPeeringsGetSample.ts | 19 +- ...sRouteCrossConnectionPeeringsListSample.ts | 17 +- ...uteCrossConnectionsCreateOrUpdateSample.ts | 32 +- .../expressRouteCrossConnectionsGetSample.ts | 16 +- ...RouteCrossConnectionsListArpTableSample.ts | 27 +- ...ossConnectionsListByResourceGroupSample.ts | 14 +- ...teCrossConnectionsListRoutesTableSample.ts | 27 +- ...ConnectionsListRoutesTableSummarySample.ts | 27 +- .../expressRouteCrossConnectionsListSample.ts | 10 +- ...ssRouteCrossConnectionsUpdateTagsSample.ts | 22 +- ...xpressRouteGatewaysCreateOrUpdateSample.ts | 41 +- .../expressRouteGatewaysDeleteSample.ts | 18 +- ...atewaysGetFailoverAllTestsDetailsSample.ts | 28 + ...ewaysGetFailoverSingleTestDetailsSample.ts | 30 + ...eGatewaysGetResiliencyInformationSample.ts | 27 + ...RouteGatewaysGetRoutesInformationSample.ts | 27 + .../expressRouteGatewaysGetSample.ts | 16 +- ...sRouteGatewaysListByResourceGroupSample.ts | 14 +- ...ssRouteGatewaysListBySubscriptionSample.ts | 9 +- ...outeGatewaysStartSiteFailoverTestSample.ts | 29 + ...RouteGatewaysStopSiteFailoverTestSample.ts | 25 + .../expressRouteGatewaysUpdateTagsSample.ts | 24 +- .../samples-dev/expressRouteLinksGetSample.ts | 18 +- .../expressRouteLinksListSample.ts | 17 +- ...ePortAuthorizationsCreateOrUpdateSample.ts | 32 +- ...ressRoutePortAuthorizationsDeleteSample.ts | 21 +- ...expressRoutePortAuthorizationsGetSample.ts | 18 +- ...xpressRoutePortAuthorizationsListSample.ts | 16 +- .../expressRoutePortsCreateOrUpdateSample.ts | 52 +- .../expressRoutePortsDeleteSample.ts | 17 +- .../expressRoutePortsGenerateLOASample.ts | 27 + .../expressRoutePortsGenerateLoaSample.ts | 39 - .../samples-dev/expressRoutePortsGetSample.ts | 16 +- ...ressRoutePortsListByResourceGroupSample.ts | 15 +- .../expressRoutePortsListSample.ts | 10 +- .../expressRoutePortsLocationsGetSample.ts | 12 +- .../expressRoutePortsLocationsListSample.ts | 10 +- .../expressRoutePortsUpdateTagsSample.ts | 21 +- .../expressRouteProviderPortSample.ts | 12 +- ...essRouteProviderPortsLocationListSample.ts | 9 +- .../expressRouteServiceProvidersListSample.ts | 10 +- .../firewallPoliciesCreateOrUpdateSample.ts | 53 +- .../firewallPoliciesDeleteSample.ts | 17 +- .../samples-dev/firewallPoliciesGetSample.ts | 16 +- .../firewallPoliciesListAllSample.ts | 10 +- .../samples-dev/firewallPoliciesListSample.ts | 13 +- .../firewallPoliciesUpdateTagsSample.ts | 22 +- .../firewallPolicyDeploymentsDeploySample.ts | 17 +- ...irewallPolicyDraftsCreateOrUpdateSample.ts | 47 +- .../firewallPolicyDraftsDeleteSample.ts | 17 +- .../firewallPolicyDraftsGetSample.ts | 16 +- ...icyIdpsSignaturesFilterValuesListSample.ts | 28 +- .../firewallPolicyIdpsSignaturesListSample.ts | 27 +- ...lPolicyIdpsSignaturesOverridesGetSample.ts | 18 +- ...PolicyIdpsSignaturesOverridesListSample.ts | 18 +- ...olicyIdpsSignaturesOverridesPatchSample.ts | 33 +- ...lPolicyIdpsSignaturesOverridesPutSample.ts | 33 +- ...llectionGroupDraftsCreateOrUpdateSample.ts | 72 +- ...cyRuleCollectionGroupDraftsDeleteSample.ts | 21 +- ...olicyRuleCollectionGroupDraftsGetSample.ts | 18 +- ...uleCollectionGroupsCreateOrUpdateSample.ts | 364 +- ...lPolicyRuleCollectionGroupsDeleteSample.ts | 24 +- ...wallPolicyRuleCollectionGroupsGetSample.ts | 75 +- ...allPolicyRuleCollectionGroupsListSample.ts | 58 +- .../flowLogsCreateOrUpdateSample.ts | 39 +- .../samples-dev/flowLogsDeleteSample.ts | 19 +- .../samples-dev/flowLogsGetSample.ts | 18 +- .../samples-dev/flowLogsListSample.ts | 17 +- .../samples-dev/flowLogsUpdateTagsSample.ts | 23 +- ...nvpnserverconfigurationvpnprofileSample.ts | 33 +- .../samples-dev/getActiveSessionsSample.ts | 21 +- .../getBastionShareableLinkSample.ts | 41 +- .../hubRouteTablesCreateOrUpdateSample.ts | 48 +- .../samples-dev/hubRouteTablesDeleteSample.ts | 19 +- .../samples-dev/hubRouteTablesGetSample.ts | 18 +- .../samples-dev/hubRouteTablesListSample.ts | 17 +- ...lNetworkConnectionsCreateOrUpdateSample.ts | 108 +- ...ubVirtualNetworkConnectionsDeleteSample.ts | 19 +- .../hubVirtualNetworkConnectionsGetSample.ts | 18 +- .../hubVirtualNetworkConnectionsListSample.ts | 17 +- .../inboundNatRulesCreateOrUpdateSample.ts | 29 +- .../inboundNatRulesDeleteSample.ts | 19 +- .../samples-dev/inboundNatRulesGetSample.ts | 18 +- .../samples-dev/inboundNatRulesListSample.ts | 17 +- ...inboundSecurityRuleCreateOrUpdateSample.ts | 33 +- .../inboundSecurityRuleGetSample.ts | 18 +- .../interconnectGroupsCreateOrUpdateSample.ts | 35 + .../interconnectGroupsDeleteSample.ts | 24 + ...rconnectGroupsGetNodeAvailabilitySample.ts | 25 + .../interconnectGroupsGetSample.ts | 25 + .../interconnectGroupsListAllSample.ts | 29 + .../interconnectGroupsListSample.ts | 29 + .../interconnectGroupsUpdateTagsSample.ts | 27 + .../ipAllocationsCreateOrUpdateSample.ts | 35 +- .../samples-dev/ipAllocationsDeleteSample.ts | 21 +- .../samples-dev/ipAllocationsGetSample.ts | 20 +- .../ipAllocationsListByResourceGroupSample.ts | 19 +- .../samples-dev/ipAllocationsListSample.ts | 14 +- .../ipAllocationsUpdateTagsSample.ts | 21 +- .../ipGroupsCreateOrUpdateSample.ts | 32 +- .../samples-dev/ipGroupsDeleteSample.ts | 22 +- .../samples-dev/ipGroupsGetSample.ts | 18 +- .../ipGroupsListByResourceGroupSample.ts | 20 +- .../samples-dev/ipGroupsListSample.ts | 14 +- .../samples-dev/ipGroupsUpdateGroupsSample.ts | 26 +- .../samples-dev/ipamPoolsCreateSample.ts | 29 +- .../samples-dev/ipamPoolsDeleteSample.ts | 21 +- .../ipamPoolsGetPoolUsageSample.ts | 20 +- .../samples-dev/ipamPoolsGetSample.ts | 20 +- .../ipamPoolsListAssociatedResourcesSample.ts | 21 +- .../samples-dev/ipamPoolsListSample.ts | 19 +- .../samples-dev/ipamPoolsUpdateSample.ts | 20 +- ...tActiveConnectivityConfigurationsSample.ts | 30 +- .../listActiveSecurityAdminRulesSample.ts | 30 +- ...fectiveConnectivityConfigurationsSample.ts | 32 +- ...anagerEffectiveSecurityAdminRulesSample.ts | 27 +- ...BackendAddressPoolsCreateOrUpdateSample.ts | 66 +- ...BalancerBackendAddressPoolsDeleteSample.ts | 20 +- ...oadBalancerBackendAddressPoolsGetSample.ts | 35 +- ...adBalancerBackendAddressPoolsListSample.ts | 33 +- ...lancerFrontendIPConfigurationsGetSample.ts | 18 +- ...ancerFrontendIPConfigurationsListSample.ts | 17 +- ...loadBalancerLoadBalancingRulesGetSample.ts | 18 +- ...dBalancerLoadBalancingRulesHealthSample.ts | 18 +- ...oadBalancerLoadBalancingRulesListSample.ts | 17 +- ...loadBalancerNetworkInterfacesListSample.ts | 33 +- .../loadBalancerOutboundRulesGetSample.ts | 18 +- .../loadBalancerOutboundRulesListSample.ts | 17 +- .../loadBalancerProbesGetSample.ts | 18 +- .../loadBalancerProbesListSample.ts | 17 +- .../loadBalancersCreateOrUpdateSample.ts | 588 +- .../samples-dev/loadBalancersDeleteSample.ts | 17 +- .../samples-dev/loadBalancersGetSample.ts | 50 +- .../samples-dev/loadBalancersListAllSample.ts | 10 +- ...ersListInboundNatRulePortMappingsSample.ts | 35 +- .../samples-dev/loadBalancersListSample.ts | 13 +- .../loadBalancersMigrateToIPBasedSample.ts | 41 - .../loadBalancersMigrateToIpBasedSample.ts | 27 + ...oadBalancersSwapPublicIPAddressesSample.ts | 50 - ...oadBalancersSwapPublicIpAddressesSample.ts | 39 + .../loadBalancersUpdateTagsSample.ts | 21 +- ...ocalNetworkGatewaysCreateOrUpdateSample.ts | 32 +- .../localNetworkGatewaysDeleteSample.ts | 17 +- .../localNetworkGatewaysGetSample.ts | 16 +- .../localNetworkGatewaysListSample.ts | 15 +- .../localNetworkGatewaysUpdateTagsSample.ts | 21 +- ...kManagerConnectionsCreateOrUpdateSample.ts | 33 +- ...upNetworkManagerConnectionsDeleteSample.ts | 16 +- ...GroupNetworkManagerConnectionsGetSample.ts | 13 +- ...roupNetworkManagerConnectionsListSample.ts | 11 +- .../natGatewaysCreateOrUpdateSample.ts | 110 +- .../samples-dev/natGatewaysDeleteSample.ts | 17 +- .../samples-dev/natGatewaysGetSample.ts | 61 +- .../samples-dev/natGatewaysListAllSample.ts | 10 +- .../samples-dev/natGatewaysListSample.ts | 13 +- .../natGatewaysUpdateTagsSample.ts | 40 +- .../natRulesCreateOrUpdateSample.ts | 29 +- .../samples-dev/natRulesDeleteSample.ts | 19 +- .../samples-dev/natRulesGetSample.ts | 18 +- .../natRulesListByVpnGatewaySample.ts | 17 +- .../networkGroupsCreateOrUpdateSample.ts | 27 +- .../samples-dev/networkGroupsDeleteSample.ts | 32 +- .../samples-dev/networkGroupsGetSample.ts | 20 +- .../samples-dev/networkGroupsListSample.ts | 19 +- ...tworkInterfaceIPConfigurationsGetSample.ts | 18 +- ...workInterfaceIPConfigurationsListSample.ts | 17 +- ...networkInterfaceLoadBalancersListSample.ts | 17 +- ...ceTapConfigurationsCreateOrUpdateSample.ts | 40 +- ...kInterfaceTapConfigurationsDeleteSample.ts | 20 +- ...workInterfaceTapConfigurationsGetSample.ts | 18 +- ...orkInterfaceTapConfigurationsListSample.ts | 17 +- .../networkInterfacesCreateOrUpdateSample.ts | 66 +- .../networkInterfacesDeleteSample.ts | 17 +- ...esGetCloudServiceNetworkInterfaceSample.ts | 21 +- ...kInterfacesGetEffectiveRouteTableSample.ts | 17 +- .../samples-dev/networkInterfacesGetSample.ts | 16 +- ...ualMachineScaleSetIPConfigurationSample.ts | 38 - ...alMachineScaleSetNetworkInterfaceSample.ts | 36 - .../networkInterfacesListAllSample.ts | 10 +- ...ListCloudServiceNetworkInterfacesSample.ts | 16 +- ...viceRoleInstanceNetworkInterfacesSample.ts | 19 +- ...istEffectiveNetworkSecurityGroupsSample.ts | 17 +- .../networkInterfacesListSample.ts | 13 +- ...alMachineScaleSetIPConfigurationsSample.ts | 38 - ...lMachineScaleSetNetworkInterfacesSample.ts | 34 - ...achineScaleSetVMNetworkInterfacesSample.ts | 36 - .../networkInterfacesUpdateTagsSample.ts | 21 +- .../networkManagerCommitsPostSample.ts | 41 +- ...etworkManagerDeploymentStatusListSample.ts | 37 +- ...utingConfigurationsCreateOrUpdateSample.ts | 37 +- ...anagerRoutingConfigurationsDeleteSample.ts | 26 +- ...rkManagerRoutingConfigurationsGetSample.ts | 20 +- ...kManagerRoutingConfigurationsListSample.ts | 18 +- .../networkManagersCreateOrUpdateSample.ts | 27 +- .../networkManagersDeleteSample.ts | 28 +- .../samples-dev/networkManagersGetSample.ts | 18 +- ...networkManagersListBySubscriptionSample.ts | 12 +- .../samples-dev/networkManagersListSample.ts | 15 +- .../samples-dev/networkManagersPatchSample.ts | 23 +- .../networkProfilesCreateOrUpdateSample.ts | 29 +- .../networkProfilesDeleteSample.ts | 17 +- .../samples-dev/networkProfilesGetSample.ts | 31 +- .../networkProfilesListAllSample.ts | 10 +- .../samples-dev/networkProfilesListSample.ts | 13 +- .../networkProfilesUpdateTagsSample.ts | 21 +- ...tworkSecurityGroupsCreateOrUpdateSample.ts | 50 +- .../networkSecurityGroupsDeleteSample.ts | 17 +- .../networkSecurityGroupsGetSample.ts | 16 +- .../networkSecurityGroupsListAllSample.ts | 10 +- .../networkSecurityGroupsListSample.ts | 15 +- .../networkSecurityGroupsUpdateTagsSample.ts | 21 +- ...erimeterAccessRulesCreateOrUpdateSample.ts | 33 +- ...ecurityPerimeterAccessRulesDeleteSample.ts | 21 +- ...rkSecurityPerimeterAccessRulesGetSample.ts | 21 +- ...kSecurityPerimeterAccessRulesListSample.ts | 19 +- ...rityPerimeterAccessRulesReconcileSample.ts | 24 +- ...imeterAssociableResourceTypesListSample.ts | 15 +- ...rimeterAssociationsCreateOrUpdateSample.ts | 43 +- ...curityPerimeterAssociationsDeleteSample.ts | 20 +- ...kSecurityPerimeterAssociationsGetSample.ts | 18 +- ...SecurityPerimeterAssociationsListSample.ts | 17 +- ...ityPerimeterAssociationsReconcileSample.ts | 21 +- ...rityPerimeterLinkReferencesDeleteSample.ts | 20 +- ...ecurityPerimeterLinkReferencesGetSample.ts | 18 +- ...curityPerimeterLinkReferencesListSample.ts | 17 +- ...urityPerimeterLinksCreateOrUpdateSample.ts | 29 +- ...tworkSecurityPerimeterLinksDeleteSample.ts | 19 +- .../networkSecurityPerimeterLinksGetSample.ts | 18 +- ...networkSecurityPerimeterLinksListSample.ts | 17 +- ...ggingConfigurationsCreateOrUpdateSample.ts | 42 +- ...imeterLoggingConfigurationsDeleteSample.ts | 20 +- ...PerimeterLoggingConfigurationsGetSample.ts | 18 +- ...erimeterLoggingConfigurationsListSample.ts | 16 +- ...rityPerimeterOperationStatusesGetSample.ts | 15 +- ...tyPerimeterProfilesCreateOrUpdateSample.ts | 22 +- ...rkSecurityPerimeterProfilesDeleteSample.ts | 19 +- ...tworkSecurityPerimeterProfilesGetSample.ts | 18 +- ...workSecurityPerimeterProfilesListSample.ts | 17 +- ...kSecurityPerimeterServiceTagsListSample.ts | 15 +- ...kSecurityPerimetersCreateOrUpdateSample.ts | 26 +- .../networkSecurityPerimetersDeleteSample.ts | 17 +- .../networkSecurityPerimetersGetSample.ts | 16 +- ...urityPerimetersListBySubscriptionSample.ts | 10 +- .../networkSecurityPerimetersListSample.ts | 15 +- .../networkSecurityPerimetersPatchSample.ts | 21 +- ...pplianceConnectionsCreateOrUpdateSample.ts | 45 +- ...VirtualApplianceConnectionsDeleteSample.ts | 20 +- ...orkVirtualApplianceConnectionsGetSample.ts | 18 +- ...rkVirtualApplianceConnectionsListSample.ts | 17 +- ...rkVirtualAppliancesCreateOrUpdateSample.ts | 509 +- .../networkVirtualAppliancesDeleteSample.ts | 17 +- ...alAppliancesGetBootDiagnosticLogsSample.ts | 35 +- .../networkVirtualAppliancesGetSample.ts | 16 +- ...tualAppliancesListByResourceGroupSample.ts | 15 +- .../networkVirtualAppliancesListSample.ts | 10 +- .../networkVirtualAppliancesReimageSample.ts | 20 +- .../networkVirtualAppliancesRestartSample.ts | 39 +- ...etworkVirtualAppliancesUpdateTagsSample.ts | 21 +- .../networkWatchersCheckConnectivitySample.ts | 32 +- .../networkWatchersCreateOrUpdateSample.ts | 19 +- .../networkWatchersDeleteSample.ts | 17 +- ...atchersGetAzureReachabilityReportSample.ts | 31 +- .../networkWatchersGetFlowLogStatusSample.ts | 30 +- ...GetNetworkConfigurationDiagnosticSample.ts | 33 +- .../networkWatchersGetNextHopSample.ts | 29 +- .../samples-dev/networkWatchersGetSample.ts | 16 +- .../networkWatchersGetTopologySample.ts | 26 +- ...kWatchersGetTroubleshootingResultSample.ts | 31 +- ...networkWatchersGetTroubleshootingSample.ts | 34 +- ...networkWatchersGetVMSecurityRulesSample.ts | 30 +- .../networkWatchersListAllSample.ts | 10 +- ...orkWatchersListAvailableProvidersSample.ts | 31 +- .../samples-dev/networkWatchersListSample.ts | 13 +- ...rkWatchersSetFlowLogConfigurationSample.ts | 39 +- .../networkWatchersUpdateTagsSample.ts | 21 +- .../networkWatchersVerifyIPFlowSample.ts | 32 +- .../samples-dev/operationsListSample.ts | 13 +- .../p2SVpnGatewaysCreateOrUpdateSample.ts | 43 +- .../samples-dev/p2SVpnGatewaysDeleteSample.ts | 17 +- ...tewaysDisconnectP2SVpnConnectionsSample.ts | 26 + ...tewaysDisconnectP2SvpnConnectionsSample.ts | 41 - .../p2SVpnGatewaysGenerateVpnProfileSample.ts | 32 +- ...GetP2SVpnConnectionHealthDetailedSample.ts | 33 + ...GatewaysGetP2SVpnConnectionHealthSample.ts | 25 + ...GetP2SvpnConnectionHealthDetailedSample.ts | 43 - ...GatewaysGetP2SvpnConnectionHealthSample.ts | 32 - .../samples-dev/p2SVpnGatewaysGetSample.ts | 16 +- ...p2SVpnGatewaysListByResourceGroupSample.ts | 15 +- .../samples-dev/p2SVpnGatewaysListSample.ts | 10 +- .../samples-dev/p2SVpnGatewaysResetSample.ts | 16 +- .../p2SVpnGatewaysUpdateTagsSample.ts | 23 +- .../samples-dev/packetCapturesCreateSample.ts | 34 +- .../samples-dev/packetCapturesDeleteSample.ts | 19 +- .../samples-dev/packetCapturesGetSample.ts | 18 +- .../packetCapturesGetStatusSample.ts | 18 +- .../samples-dev/packetCapturesListSample.ts | 17 +- .../samples-dev/packetCapturesStopSample.ts | 19 +- ...ExpressRouteCircuitConnectionsGetSample.ts | 21 +- ...xpressRouteCircuitConnectionsListSample.ts | 19 +- ...rivateDnsZoneGroupsCreateOrUpdateSample.ts | 43 +- .../privateDnsZoneGroupsDeleteSample.ts | 19 +- .../privateDnsZoneGroupsGetSample.ts | 18 +- .../privateDnsZoneGroupsListSample.ts | 17 +- .../privateEndpointsCreateOrUpdateSample.ts | 119 +- .../privateEndpointsDeleteSample.ts | 17 +- .../samples-dev/privateEndpointsGetSample.ts | 52 +- ...rivateEndpointsListBySubscriptionSample.ts | 10 +- .../samples-dev/privateEndpointsListSample.ts | 13 +- ...kServiceVisibilityByResourceGroupSample.ts | 35 +- ...CheckPrivateLinkServiceVisibilitySample.ts | 28 +- ...privateLinkServicesCreateOrUpdateSample.ts | 40 +- ...esDeletePrivateEndpointConnectionSample.ts | 24 +- .../privateLinkServicesDeleteSample.ts | 17 +- ...vicesGetPrivateEndpointConnectionSample.ts | 18 +- .../privateLinkServicesGetSample.ts | 16 +- ...rivateLinkServicesByResourceGroupSample.ts | 16 +- ...stAutoApprovedPrivateLinkServicesSample.ts | 13 +- ...ateLinkServicesListBySubscriptionSample.ts | 10 +- ...cesListPrivateEndpointConnectionsSample.ts | 16 +- .../privateLinkServicesListSample.ts | 13 +- ...esUpdatePrivateEndpointConnectionSample.ts | 46 +- .../publicIPAddressesCreateOrUpdateSample.ts | 132 +- ...icIPAddressesDdosProtectionStatusSample.ts | 17 +- .../publicIPAddressesDeleteSample.ts | 17 +- ...ciateCloudServiceReservedPublicIPSample.ts | 41 - ...ciateCloudServiceReservedPublicIpSample.ts | 32 + ...sesGetCloudServicePublicIPAddressSample.ts | 32 + ...sesGetCloudServicePublicIpaddressSample.ts | 40 - .../samples-dev/publicIPAddressesGetSample.ts | 31 +- ...ualMachineScaleSetPublicIpaddressSample.ts | 41 - .../publicIPAddressesListAllSample.ts | 10 +- ...ListCloudServicePublicIPAddressesSample.ts | 32 + ...ListCloudServicePublicIpaddressesSample.ts | 35 - ...viceRoleInstancePublicIPAddressesSample.ts | 35 + ...viceRoleInstancePublicIpaddressesSample.ts | 41 - .../publicIPAddressesListSample.ts | 13 +- ...lMachineScaleSetPublicIpaddressesSample.ts | 35 - ...achineScaleSetVmpublicIpaddressesSample.ts | 41 - ...eserveCloudServicePublicIPAddressSample.ts | 40 - ...eserveCloudServicePublicIpAddressSample.ts | 29 + .../publicIPAddressesUpdateTagsSample.ts | 21 +- .../publicIPPrefixesCreateOrUpdateSample.ts | 71 +- .../publicIPPrefixesDeleteSample.ts | 17 +- .../samples-dev/publicIPPrefixesGetSample.ts | 31 +- .../publicIPPrefixesListAllSample.ts | 10 +- .../samples-dev/publicIPPrefixesListSample.ts | 13 +- .../publicIPPrefixesUpdateTagsSample.ts | 21 +- .../putBastionShareableLinkSample.ts | 43 +- ...reachabilityAnalysisIntentsCreateSample.ts | 62 +- ...reachabilityAnalysisIntentsDeleteSample.ts | 26 +- .../reachabilityAnalysisIntentsGetSample.ts | 23 +- .../reachabilityAnalysisIntentsListSample.ts | 21 +- .../reachabilityAnalysisRunsCreateSample.ts | 44 +- .../reachabilityAnalysisRunsDeleteSample.ts | 26 +- .../reachabilityAnalysisRunsGetSample.ts | 23 +- .../reachabilityAnalysisRunsListSample.ts | 21 +- .../resourceNavigationLinksListSample.ts | 18 +- .../routeFilterRulesCreateOrUpdateSample.ts | 27 +- .../routeFilterRulesDeleteSample.ts | 19 +- .../samples-dev/routeFilterRulesGetSample.ts | 18 +- ...routeFilterRulesListByRouteFilterSample.ts | 17 +- .../routeFiltersCreateOrUpdateSample.ts | 25 +- .../samples-dev/routeFiltersDeleteSample.ts | 17 +- .../samples-dev/routeFiltersGetSample.ts | 16 +- .../routeFiltersListByResourceGroupSample.ts | 15 +- .../samples-dev/routeFiltersListSample.ts | 10 +- .../routeFiltersUpdateTagsSample.ts | 21 +- .../routeMapsCreateOrUpdateSample.ts | 41 +- .../samples-dev/routeMapsDeleteSample.ts | 19 +- .../samples-dev/routeMapsGetSample.ts | 18 +- .../samples-dev/routeMapsListSample.ts | 17 +- .../routeTablesCreateOrUpdateSample.ts | 84 +- .../samples-dev/routeTablesDeleteSample.ts | 17 +- .../samples-dev/routeTablesGetSample.ts | 16 +- .../samples-dev/routeTablesListAllSample.ts | 10 +- .../samples-dev/routeTablesListSample.ts | 13 +- .../routeTablesUpdateTagsSample.ts | 21 +- .../samples-dev/routesCreateOrUpdateSample.ts | 42 +- .../samples-dev/routesDeleteSample.ts | 19 +- .../samples-dev/routesGetSample.ts | 18 +- .../samples-dev/routesListSample.ts | 17 +- .../routingIntentCreateOrUpdateSample.ts | 32 +- .../samples-dev/routingIntentDeleteSample.ts | 19 +- .../samples-dev/routingIntentGetSample.ts | 18 +- .../samples-dev/routingIntentListSample.ts | 17 +- ...tingRuleCollectionsCreateOrUpdateSample.ts | 48 +- .../routingRuleCollectionsDeleteSample.ts | 26 +- .../routingRuleCollectionsGetSample.ts | 23 +- .../routingRuleCollectionsListSample.ts | 21 +- .../routingRulesCreateOrUpdateSample.ts | 80 +- .../samples-dev/routingRulesDeleteSample.ts | 39 +- .../samples-dev/routingRulesGetSample.ts | 26 +- .../samples-dev/routingRulesListSample.ts | 24 +- .../scopeConnectionsCreateOrUpdateSample.ts | 32 +- .../scopeConnectionsDeleteSample.ts | 21 +- .../samples-dev/scopeConnectionsGetSample.ts | 20 +- .../samples-dev/scopeConnectionsListSample.ts | 19 +- ...AdminConfigurationsCreateOrUpdateSample.ts | 68 +- ...securityAdminConfigurationsDeleteSample.ts | 33 +- .../securityAdminConfigurationsGetSample.ts | 20 +- .../securityAdminConfigurationsListSample.ts | 19 +- ...ityPartnerProvidersCreateOrUpdateSample.ts | 43 +- .../securityPartnerProvidersDeleteSample.ts | 17 +- .../securityPartnerProvidersGetSample.ts | 16 +- ...rtnerProvidersListByResourceGroupSample.ts | 15 +- .../securityPartnerProvidersListSample.ts | 10 +- ...ecurityPartnerProvidersUpdateTagsSample.ts | 19 +- .../securityRulesCreateOrUpdateSample.ts | 27 +- .../samples-dev/securityRulesDeleteSample.ts | 19 +- .../samples-dev/securityRulesGetSample.ts | 18 +- .../samples-dev/securityRulesListSample.ts | 17 +- ...yUserConfigurationsCreateOrUpdateSample.ts | 31 +- .../securityUserConfigurationsDeleteSample.ts | 33 +- .../securityUserConfigurationsGetSample.ts | 20 +- .../securityUserConfigurationsListSample.ts | 19 +- ...UserRuleCollectionsCreateOrUpdateSample.ts | 48 +- ...securityUserRuleCollectionsDeleteSample.ts | 36 +- .../securityUserRuleCollectionsGetSample.ts | 23 +- .../securityUserRuleCollectionsListSample.ts | 21 +- .../securityUserRulesCreateOrUpdateSample.ts | 46 +- .../securityUserRulesDeleteSample.ts | 39 +- .../samples-dev/securityUserRulesGetSample.ts | 26 +- .../securityUserRulesListSample.ts | 24 +- .../serviceAssociationLinksListSample.ts | 18 +- ...iceEndpointPoliciesCreateOrUpdateSample.ts | 58 +- .../serviceEndpointPoliciesDeleteSample.ts | 17 +- .../serviceEndpointPoliciesGetSample.ts | 16 +- ...dpointPoliciesListByResourceGroupSample.ts | 15 +- .../serviceEndpointPoliciesListSample.ts | 10 +- ...serviceEndpointPoliciesUpdateTagsSample.ts | 19 +- ...ntPolicyDefinitionsCreateOrUpdateSample.ts | 48 +- ...ceEndpointPolicyDefinitionsDeleteSample.ts | 20 +- ...rviceEndpointPolicyDefinitionsGetSample.ts | 18 +- ...icyDefinitionsListByResourceGroupSample.ts | 16 +- .../serviceGatewaysCreateOrUpdateSample.ts | 27 +- .../serviceGatewaysDeleteSample.ts | 19 +- ...erviceGatewaysGetAddressLocationsSample.ts | 36 - .../samples-dev/serviceGatewaysGetSample.ts | 18 +- .../serviceGatewaysGetServicesSample.ts | 36 - ...rviceGatewaysListAddressLocationsSample.ts | 29 + .../serviceGatewaysListAllSample.ts | 12 +- .../samples-dev/serviceGatewaysListSample.ts | 15 +- .../serviceGatewaysListServicesSample.ts | 29 + ...iceGatewaysUpdateAddressLocationsSample.ts | 151 +- .../serviceGatewaysUpdateServicesSample.ts | 62 +- .../serviceGatewaysUpdateTagsSample.ts | 23 +- .../serviceTagInformationListSample.ts | 61 +- .../samples-dev/serviceTagsListSample.ts | 12 +- .../samples-dev/staticCidrsCreateSample.ts | 23 +- .../samples-dev/staticCidrsDeleteSample.ts | 23 +- .../samples-dev/staticCidrsGetSample.ts | 23 +- .../samples-dev/staticCidrsListSample.ts | 21 +- .../staticMembersCreateOrUpdateSample.ts | 33 +- .../samples-dev/staticMembersDeleteSample.ts | 23 +- .../samples-dev/staticMembersGetSample.ts | 23 +- .../samples-dev/staticMembersListSample.ts | 21 +- .../samples-dev/subgroupsGetSample.ts | 25 + .../samples-dev/subgroupsListSample.ts | 29 + .../subnetsCreateOrUpdateSample.ts | 178 +- .../samples-dev/subnetsDeleteSample.ts | 20 +- .../samples-dev/subnetsGetSample.ts | 55 +- .../samples-dev/subnetsListSample.ts | 18 +- .../subnetsPrepareNetworkPoliciesSample.ts | 30 +- .../subnetsUnprepareNetworkPoliciesSample.ts | 30 +- ...kManagerConnectionsCreateOrUpdateSample.ts | 34 +- ...onNetworkManagerConnectionsDeleteSample.ts | 17 +- ...ptionNetworkManagerConnectionsGetSample.ts | 16 +- ...tionNetworkManagerConnectionsListSample.ts | 12 +- .../supportedSecurityProvidersSample.ts | 16 +- .../samples-dev/usagesListSample.ts | 25 +- .../verifierWorkspacesCreateSample.ts | 27 +- .../verifierWorkspacesDeleteSample.ts | 21 +- .../verifierWorkspacesGetSample.ts | 20 +- .../verifierWorkspacesListSample.ts | 19 +- .../verifierWorkspacesUpdateSample.ts | 20 +- .../samples-dev/vipSwapCreateSample.ts | 22 +- .../samples-dev/vipSwapGetSample.ts | 13 +- .../samples-dev/vipSwapListSample.ts | 13 +- ...rtualApplianceSitesCreateOrUpdateSample.ts | 34 +- .../virtualApplianceSitesDeleteSample.ts | 19 +- .../virtualApplianceSitesGetSample.ts | 18 +- .../virtualApplianceSitesListSample.ts | 17 +- .../virtualApplianceSkusGetSample.ts | 12 +- .../virtualApplianceSkusListSample.ts | 10 +- ...ualHubBgpConnectionCreateOrUpdateSample.ts | 38 +- .../virtualHubBgpConnectionDeleteSample.ts | 19 +- .../virtualHubBgpConnectionGetSample.ts | 18 +- ...gpConnectionsListAdvertisedRoutesSample.ts | 23 +- ...ubBgpConnectionsListLearnedRoutesSample.ts | 23 +- .../virtualHubBgpConnectionsListSample.ts | 17 +- ...lHubIPConfigurationCreateOrUpdateSample.ts | 44 - .../virtualHubIPConfigurationDeleteSample.ts | 33 - .../virtualHubIPConfigurationGetSample.ts | 33 - .../virtualHubIPConfigurationListSample.ts | 34 - ...lHubIpConfigurationCreateOrUpdateSample.ts | 29 + .../virtualHubIpConfigurationDeleteSample.ts | 24 + .../virtualHubIpConfigurationGetSample.ts | 25 + .../virtualHubIpConfigurationListSample.ts | 29 + ...ualHubRouteTableV2SCreateOrUpdateSample.ts | 64 +- .../virtualHubRouteTableV2SDeleteSample.ts | 19 +- .../virtualHubRouteTableV2SGetSample.ts | 18 +- .../virtualHubRouteTableV2SListSample.ts | 17 +- .../virtualHubsCreateOrUpdateSample.ts | 31 +- .../samples-dev/virtualHubsDeleteSample.ts | 17 +- ...lHubsGetEffectiveVirtualHubRoutesSample.ts | 91 +- .../virtualHubsGetInboundRoutesSample.ts | 32 +- .../virtualHubsGetOutboundRoutesSample.ts | 32 +- .../samples-dev/virtualHubsGetSample.ts | 16 +- .../virtualHubsListByResourceGroupSample.ts | 15 +- .../samples-dev/virtualHubsListSample.ts | 10 +- .../virtualHubsUpdateTagsSample.ts | 23 +- ...alNetworkAppliancesCreateOrUpdateSample.ts | 35 +- .../virtualNetworkAppliancesDeleteSample.ts | 17 +- .../virtualNetworkAppliancesGetSample.ts | 16 +- .../virtualNetworkAppliancesListAllSample.ts | 10 +- .../virtualNetworkAppliancesListSample.ts | 15 +- ...irtualNetworkAppliancesUpdateTagsSample.ts | 21 +- ...kGatewayConnectionsCreateOrUpdateSample.ts | 71 +- ...alNetworkGatewayConnectionsDeleteSample.ts | 18 +- ...etworkGatewayConnectionsGetIkeSasSample.ts | 17 +- ...rtualNetworkGatewayConnectionsGetSample.ts | 16 +- ...orkGatewayConnectionsGetSharedKeySample.ts | 16 +- ...tualNetworkGatewayConnectionsListSample.ts | 15 +- ...GatewayConnectionsResetConnectionSample.ts | 18 +- ...kGatewayConnectionsResetSharedKeySample.ts | 27 +- ...orkGatewayConnectionsSetSharedKeySample.ts | 27 +- ...ewayConnectionsStartPacketCaptureSample.ts | 65 +- ...tewayConnectionsStopPacketCaptureSample.ts | 35 +- ...tworkGatewayConnectionsUpdateTagsSample.ts | 22 +- ...workGatewayNatRulesCreateOrUpdateSample.ts | 48 +- ...rtualNetworkGatewayNatRulesDeleteSample.ts | 19 +- .../virtualNetworkGatewayNatRulesGetSample.ts | 18 +- ...tRulesListByVirtualNetworkGatewaySample.ts | 16 +- ...tualNetworkGatewaysCreateOrUpdateSample.ts | 87 +- .../virtualNetworkGatewaysDeleteSample.ts | 17 +- ...rtualNetworkGatewayVpnConnectionsSample.ts | 33 +- ...NetworkGatewaysGenerateVpnProfileSample.ts | 29 +- ...kGatewaysGeneratevpnclientpackageSample.ts | 29 +- ...etworkGatewaysGetAdvertisedRoutesSample.ts | 19 +- ...alNetworkGatewaysGetBgpPeerStatusSample.ts | 21 +- ...GatewaysGetFailoverAllTestDetailsSample.ts | 26 +- ...ewaysGetFailoverSingleTestDetailsSample.ts | 26 +- ...alNetworkGatewaysGetLearnedRoutesSample.ts | 17 +- ...kGatewaysGetResiliencyInformationSample.ts | 29 +- ...tworkGatewaysGetRoutesInformationSample.ts | 30 +- .../virtualNetworkGatewaysGetSample.ts | 31 +- ...rkGatewaysGetVpnProfilePackageUrlSample.ts | 21 +- ...ewaysGetVpnclientConnectionHealthSample.ts | 21 +- ...tewaysGetVpnclientIpsecParametersSample.ts | 17 +- ...tworkGatewaysInvokeAbortMigrationSample.ts | 18 +- ...workGatewaysInvokeCommitMigrationSample.ts | 18 +- ...orkGatewaysInvokeExecuteMigrationSample.ts | 18 +- ...orkGatewaysInvokePrepareMigrationSample.ts | 32 +- ...ualNetworkGatewaysListConnectionsSample.ts | 16 +- ...lNetworkGatewaysListRadiusSecretsSample.ts | 18 +- .../virtualNetworkGatewaysListSample.ts | 15 +- .../virtualNetworkGatewaysResetSample.ts | 16 +- ...rkGatewaysResetVpnClientSharedKeySample.ts | 18 +- ...tewaysSetVpnclientIpsecParametersSample.ts | 31 +- ...xpressRouteSiteFailoverSimulationSample.ts | 23 +- ...NetworkGatewaysStartPacketCaptureSample.ts | 59 +- ...xpressRouteSiteFailoverSimulationSample.ts | 51 +- ...lNetworkGatewaysStopPacketCaptureSample.ts | 31 +- ...etworkGatewaysSupportedVpnDevicesSample.ts | 20 +- .../virtualNetworkGatewaysUpdateTagsSample.ts | 21 +- ...ewaysVpnDeviceConfigurationScriptSample.ts | 35 +- ...tualNetworkPeeringsCreateOrUpdateSample.ts | 278 +- .../virtualNetworkPeeringsDeleteSample.ts | 19 +- .../virtualNetworkPeeringsGetSample.ts | 79 +- .../virtualNetworkPeeringsListSample.ts | 33 +- .../virtualNetworkTapsCreateOrUpdateSample.ts | 29 +- .../virtualNetworkTapsDeleteSample.ts | 17 +- .../virtualNetworkTapsGetSample.ts | 16 +- .../virtualNetworkTapsListAllSample.ts | 10 +- ...ualNetworkTapsListByResourceGroupSample.ts | 15 +- .../virtualNetworkTapsUpdateTagsSample.ts | 23 +- ...etworksCheckIPAddressAvailabilitySample.ts | 18 +- .../virtualNetworksCreateOrUpdateSample.ts | 325 +- .../virtualNetworksDeleteSample.ts | 17 +- .../samples-dev/virtualNetworksGetSample.ts | 52 +- .../virtualNetworksListAllSample.ts | 10 +- ...lNetworksListDdosProtectionStatusSample.ts | 34 +- .../samples-dev/virtualNetworksListSample.ts | 13 +- .../virtualNetworksListUsageSample.ts | 17 +- .../virtualNetworksUpdateTagsSample.ts | 21 +- ...rtualRouterPeeringsCreateOrUpdateSample.ts | 32 +- .../virtualRouterPeeringsDeleteSample.ts | 19 +- .../virtualRouterPeeringsGetSample.ts | 18 +- .../virtualRouterPeeringsListSample.ts | 17 +- .../virtualRoutersCreateOrUpdateSample.ts | 29 +- .../samples-dev/virtualRoutersDeleteSample.ts | 17 +- .../samples-dev/virtualRoutersGetSample.ts | 16 +- ...virtualRoutersListByResourceGroupSample.ts | 15 +- .../samples-dev/virtualRoutersListSample.ts | 10 +- .../virtualWansCreateOrUpdateSample.ts | 31 +- .../samples-dev/virtualWansDeleteSample.ts | 21 +- .../samples-dev/virtualWansGetSample.ts | 20 +- .../virtualWansListByResourceGroupSample.ts | 19 +- .../samples-dev/virtualWansListSample.ts | 14 +- .../virtualWansUpdateTagsSample.ts | 27 +- .../vpnConnectionsCreateOrUpdateSample.ts | 44 +- .../samples-dev/vpnConnectionsDeleteSample.ts | 19 +- .../samples-dev/vpnConnectionsGetSample.ts | 18 +- .../vpnConnectionsListByVpnGatewaySample.ts | 17 +- .../vpnConnectionsStartPacketCaptureSample.ts | 76 +- .../vpnConnectionsStopPacketCaptureSample.ts | 41 +- .../vpnGatewaysCreateOrUpdateSample.ts | 49 +- .../samples-dev/vpnGatewaysDeleteSample.ts | 17 +- .../samples-dev/vpnGatewaysGetSample.ts | 13 +- .../vpnGatewaysListByResourceGroupSample.ts | 15 +- .../samples-dev/vpnGatewaysListSample.ts | 10 +- .../samples-dev/vpnGatewaysResetSample.ts | 16 +- .../vpnGatewaysStartPacketCaptureSample.ts | 55 +- .../vpnGatewaysStopPacketCaptureSample.ts | 34 +- .../vpnGatewaysUpdateTagsSample.ts | 23 +- ...pnLinkConnectionsGetAllSharedKeysSample.ts | 38 - ...inkConnectionsGetDefaultSharedKeySample.ts | 21 +- .../vpnLinkConnectionsGetIkeSasSample.ts | 23 +- ...nLinkConnectionsListAllSharedKeysSample.ts | 34 + ...inkConnectionsListByVpnConnectionSample.ts | 19 +- ...nkConnectionsListDefaultSharedKeySample.ts | 21 +- ...vpnLinkConnectionsResetConnectionSample.ts | 24 +- ...nectionsSetOrInitDefaultSharedKeySample.ts | 37 +- ...tionsAssociatedWithVirtualWanListSample.ts | 17 +- ...erverConfigurationsCreateOrUpdateSample.ts | 173 +- .../vpnServerConfigurationsDeleteSample.ts | 17 +- .../vpnServerConfigurationsGetSample.ts | 16 +- ...ConfigurationsListByResourceGroupSample.ts | 15 +- ...erConfigurationsListRadiusSecretsSample.ts | 18 +- .../vpnServerConfigurationsListSample.ts | 10 +- ...vpnServerConfigurationsUpdateTagsSample.ts | 23 +- .../vpnSiteLinkConnectionsGetSample.ts | 21 +- .../samples-dev/vpnSiteLinksGetSample.ts | 18 +- .../vpnSiteLinksListByVpnSiteSample.ts | 17 +- .../vpnSitesConfigurationDownloadSample.ts | 33 +- .../vpnSitesCreateOrUpdateSample.ts | 36 +- .../samples-dev/vpnSitesDeleteSample.ts | 17 +- .../samples-dev/vpnSitesGetSample.ts | 13 +- .../vpnSitesListByResourceGroupSample.ts | 15 +- .../samples-dev/vpnSitesListSample.ts | 10 +- .../samples-dev/vpnSitesUpdateTagsSample.ts | 23 +- ...ionFirewallPoliciesCreateOrUpdateSample.ts | 128 +- ...ApplicationFirewallPoliciesDeleteSample.ts | 21 +- ...webApplicationFirewallPoliciesGetSample.ts | 20 +- ...pplicationFirewallPoliciesListAllSample.ts | 14 +- ...ebApplicationFirewallPoliciesListSample.ts | 19 +- .../samples-dev/webCategoriesGetSample.ts | 14 +- .../webCategoriesListBySubscriptionSample.ts | 12 +- .../samples/v35/javascript/README.md | 1510 - ...dminRuleCollectionsCreateOrUpdateSample.js | 46 - .../adminRuleCollectionsDeleteSample.js | 39 - .../adminRuleCollectionsGetSample.js | 36 - .../adminRuleCollectionsListSample.js | 37 - .../adminRulesCreateOrUpdateSample.js | 97 - .../v35/javascript/adminRulesDeleteSample.js | 41 - .../v35/javascript/adminRulesGetSample.js | 65 - .../v35/javascript/adminRulesListSample.js | 39 - ...yPrivateEndpointConnectionsDeleteSample.js | 33 - ...ewayPrivateEndpointConnectionsGetSample.js | 33 - ...wayPrivateEndpointConnectionsListSample.js | 34 - ...yPrivateEndpointConnectionsUpdateSample.js | 44 - ...onGatewayPrivateLinkResourcesListSample.js | 34 - ...ewayWafDynamicManifestsDefaultGetSample.js | 27 - ...tionGatewayWafDynamicManifestsGetSample.js | 30 - ...tionGatewaysBackendHealthOnDemandSample.js | 44 - .../applicationGatewaysBackendHealthSample.js | 31 - ...applicationGatewaysCreateOrUpdateSample.js | 205 - .../applicationGatewaysDeleteSample.js | 31 - .../applicationGatewaysGetSample.js | 28 - ...ionGatewaysGetSslPredefinedPolicySample.js | 27 - .../applicationGatewaysListAllSample.js | 29 - ...tewaysListAvailableRequestHeadersSample.js | 27 - ...ewaysListAvailableResponseHeadersSample.js | 27 - ...ewaysListAvailableServerVariablesSample.js | 27 - ...onGatewaysListAvailableSslOptionsSample.js | 26 - ...istAvailableSslPredefinedPoliciesSample.js | 29 - ...nGatewaysListAvailableWafRuleSetsSample.js | 26 - .../applicationGatewaysListSample.js | 30 - .../applicationGatewaysStartSample.js | 31 - .../applicationGatewaysStopSample.js | 31 - .../applicationGatewaysUpdateTagsSample.js | 33 - ...ationSecurityGroupsCreateOrUpdateSample.js | 33 - .../applicationSecurityGroupsDeleteSample.js | 31 - .../applicationSecurityGroupsGetSample.js | 31 - .../applicationSecurityGroupsListAllSample.js | 29 - .../applicationSecurityGroupsListSample.js | 30 - ...plicationSecurityGroupsUpdateTagsSample.js | 33 - .../availableDelegationsListSample.js | 30 - .../availableEndpointServicesListSample.js | 30 - ...eEndpointTypesListByResourceGroupSample.js | 34 - ...availablePrivateEndpointTypesListSample.js | 30 - ...lableResourceGroupDelegationsListSample.js | 34 - ...ServiceAliasesListByResourceGroupSample.js | 34 - .../availableServiceAliasesListSample.js | 30 - .../azureFirewallFqdnTagsListAllSample.js | 29 - .../azureFirewallsCreateOrUpdateSample.js | 617 - .../javascript/azureFirewallsDeleteSample.js | 31 - .../v35/javascript/azureFirewallsGetSample.js | 96 - .../javascript/azureFirewallsListAllSample.js | 29 - ...azureFirewallsListLearnedPrefixesSample.js | 31 - .../javascript/azureFirewallsListSample.js | 30 - ...reFirewallsPacketCaptureOperationSample.js | 53 - .../azureFirewallsPacketCaptureSample.js | 52 - .../azureFirewallsUpdateTagsSample.js | 33 - .../bastionHostsCreateOrUpdateSample.js | 139 - .../javascript/bastionHostsDeleteSample.js | 45 - .../v35/javascript/bastionHostsGetSample.js | 79 - .../bastionHostsListByResourceGroupSample.js | 30 - .../v35/javascript/bastionHostsListSample.js | 29 - .../bastionHostsUpdateTagsSample.js | 33 - .../bgpServiceCommunitiesListSample.js | 29 - .../checkDnsNameAvailabilitySample.js | 28 - ...urationPolicyGroupsCreateOrUpdateSample.js | 50 - .../configurationPolicyGroupsDeleteSample.js | 33 - .../configurationPolicyGroupsGetSample.js | 33 - ...roupsListByVpnServerConfigurationSample.js | 34 - .../connectionMonitorsCreateOrUpdateSample.js | 182 - .../connectionMonitorsDeleteSample.js | 33 - .../javascript/connectionMonitorsGetSample.js | 33 - .../connectionMonitorsListSample.js | 31 - .../connectionMonitorsStopSample.js | 33 - .../connectionMonitorsUpdateTagsSample.js | 35 - ...ivityConfigurationsCreateOrUpdateSample.js | 62 - .../connectivityConfigurationsDeleteSample.js | 37 - .../connectivityConfigurationsGetSample.js | 34 - .../connectivityConfigurationsListSample.js | 35 - .../customIPPrefixesCreateOrUpdateSample.js | 33 - .../customIPPrefixesDeleteSample.js | 31 - .../javascript/customIPPrefixesGetSample.js | 28 - .../customIPPrefixesListAllSample.js | 29 - .../javascript/customIPPrefixesListSample.js | 30 - .../customIPPrefixesUpdateTagsSample.js | 33 - .../ddosCustomPoliciesCreateOrUpdateSample.js | 42 - .../ddosCustomPoliciesDeleteSample.js | 31 - .../javascript/ddosCustomPoliciesGetSample.js | 28 - .../ddosCustomPoliciesUpdateTagsSample.js | 33 - ...ddosProtectionPlansCreateOrUpdateSample.js | 33 - .../ddosProtectionPlansDeleteSample.js | 31 - .../ddosProtectionPlansGetSample.js | 28 - ...rotectionPlansListByResourceGroupSample.js | 30 - .../ddosProtectionPlansListSample.js | 29 - .../ddosProtectionPlansUpdateTagsSample.js | 33 - .../defaultSecurityRulesGetSample.js | 33 - .../defaultSecurityRulesListSample.js | 34 - ...deleteBastionShareableLinkByTokenSample.js | 35 - .../deleteBastionShareableLinkSample.js | 46 - .../disconnectActiveSessionsSample.js | 36 - .../dscpConfigurationCreateOrUpdateSample.js | 56 - .../dscpConfigurationDeleteSample.js | 31 - .../javascript/dscpConfigurationGetSample.js | 31 - .../dscpConfigurationListAllSample.js | 29 - .../javascript/dscpConfigurationListSample.js | 30 - ...rcuitAuthorizationsCreateOrUpdateSample.js | 35 - ...sRouteCircuitAuthorizationsDeleteSample.js | 33 - ...ressRouteCircuitAuthorizationsGetSample.js | 33 - ...essRouteCircuitAuthorizationsListSample.js | 34 - ...eCircuitConnectionsCreateOrUpdateSample.js | 47 - ...ressRouteCircuitConnectionsDeleteSample.js | 35 - ...expressRouteCircuitConnectionsGetSample.js | 35 - ...xpressRouteCircuitConnectionsListSample.js | 36 - ...outeCircuitPeeringsCreateOrUpdateSample.js | 40 - ...expressRouteCircuitPeeringsDeleteSample.js | 33 - .../expressRouteCircuitPeeringsGetSample.js | 33 - .../expressRouteCircuitPeeringsListSample.js | 34 - ...xpressRouteCircuitsCreateOrUpdateSample.js | 83 - .../expressRouteCircuitsDeleteSample.js | 31 - ...pressRouteCircuitsGetPeeringStatsSample.js | 33 - .../expressRouteCircuitsGetSample.js | 28 - .../expressRouteCircuitsGetStatsSample.js | 28 - .../expressRouteCircuitsListAllSample.js | 29 - .../expressRouteCircuitsListArpTableSample.js | 35 - ...pressRouteCircuitsListRoutesTableSample.js | 35 - ...uteCircuitsListRoutesTableSummarySample.js | 35 - .../expressRouteCircuitsListSample.js | 30 - .../expressRouteCircuitsUpdateTagsSample.js | 33 - ...essRouteConnectionsCreateOrUpdateSample.js | 68 - .../expressRouteConnectionsDeleteSample.js | 33 - .../expressRouteConnectionsGetSample.js | 33 - .../expressRouteConnectionsListSample.js | 31 - ...sConnectionPeeringsCreateOrUpdateSample.js | 45 - ...outeCrossConnectionPeeringsDeleteSample.js | 34 - ...ssRouteCrossConnectionPeeringsGetSample.js | 34 - ...sRouteCrossConnectionPeeringsListSample.js | 35 - ...uteCrossConnectionsCreateOrUpdateSample.js | 36 - .../expressRouteCrossConnectionsGetSample.js | 32 - ...RouteCrossConnectionsListArpTableSample.js | 36 - ...ossConnectionsListByResourceGroupSample.js | 33 - ...teCrossConnectionsListRoutesTableSample.js | 36 - ...ConnectionsListRoutesTableSummarySample.js | 36 - .../expressRouteCrossConnectionsListSample.js | 29 - ...ssRouteCrossConnectionsUpdateTagsSample.js | 36 - ...xpressRouteGatewaysCreateOrUpdateSample.js | 40 - .../expressRouteGatewaysDeleteSample.js | 31 - .../expressRouteGatewaysGetSample.js | 28 - ...sRouteGatewaysListByResourceGroupSample.js | 27 - ...ssRouteGatewaysListBySubscriptionSample.js | 26 - .../expressRouteGatewaysUpdateTagsSample.js | 35 - .../javascript/expressRouteLinksGetSample.js | 33 - .../javascript/expressRouteLinksListSample.js | 31 - ...ePortAuthorizationsCreateOrUpdateSample.js | 35 - ...ressRoutePortAuthorizationsDeleteSample.js | 33 - ...expressRoutePortAuthorizationsGetSample.js | 33 - ...xpressRoutePortAuthorizationsListSample.js | 34 - .../expressRoutePortsCreateOrUpdateSample.js | 68 - .../expressRoutePortsDeleteSample.js | 31 - .../expressRoutePortsGenerateLoaSample.js | 35 - .../javascript/expressRoutePortsGetSample.js | 28 - ...ressRoutePortsListByResourceGroupSample.js | 30 - .../javascript/expressRoutePortsListSample.js | 29 - .../expressRoutePortsLocationsGetSample.js | 27 - .../expressRoutePortsLocationsListSample.js | 29 - .../expressRoutePortsUpdateTagsSample.js | 33 - .../expressRouteProviderPortSample.js | 27 - ...essRouteProviderPortsLocationListSample.js | 26 - .../expressRouteServiceProvidersListSample.js | 29 - .../firewallPoliciesCreateOrUpdateSample.js | 104 - .../firewallPoliciesDeleteSample.js | 31 - .../javascript/firewallPoliciesGetSample.js | 28 - .../firewallPoliciesListAllSample.js | 29 - .../javascript/firewallPoliciesListSample.js | 30 - .../firewallPoliciesUpdateTagsSample.js | 33 - .../firewallPolicyDeploymentsDeploySample.js | 31 - ...irewallPolicyDraftsCreateOrUpdateSample.js | 95 - .../firewallPolicyDraftsDeleteSample.js | 28 - .../firewallPolicyDraftsGetSample.js | 28 - ...icyIdpsSignaturesFilterValuesListSample.js | 36 - .../firewallPolicyIdpsSignaturesListSample.js | 40 - ...lPolicyIdpsSignaturesOverridesGetSample.js | 32 - ...PolicyIdpsSignaturesOverridesListSample.js | 32 - ...olicyIdpsSignaturesOverridesPatchSample.js | 39 - ...lPolicyIdpsSignaturesOverridesPutSample.js | 39 - ...llectionGroupDraftsCreateOrUpdateSample.js | 55 - ...cyRuleCollectionGroupDraftsDeleteSample.js | 33 - ...olicyRuleCollectionGroupDraftsGetSample.js | 33 - ...uleCollectionGroupsCreateOrUpdateSample.js | 243 - ...lPolicyRuleCollectionGroupsDeleteSample.js | 33 - ...wallPolicyRuleCollectionGroupsGetSample.js | 100 - ...allPolicyRuleCollectionGroupsListSample.js | 81 - .../flowLogsCreateOrUpdateSample.js | 52 - .../v35/javascript/flowLogsDeleteSample.js | 33 - .../v35/javascript/flowLogsGetSample.js | 29 - .../v35/javascript/flowLogsListSample.js | 31 - .../javascript/flowLogsUpdateTagsSample.js | 35 - ...nvpnserverconfigurationvpnprofileSample.js | 37 - .../v35/javascript/getActiveSessionsSample.js | 34 - .../getBastionShareableLinkSample.js | 49 - .../hubRouteTablesCreateOrUpdateSample.js | 47 - .../javascript/hubRouteTablesDeleteSample.js | 33 - .../v35/javascript/hubRouteTablesGetSample.js | 29 - .../javascript/hubRouteTablesListSample.js | 31 - ...lNetworkConnectionsCreateOrUpdateSample.js | 74 - ...ubVirtualNetworkConnectionsDeleteSample.js | 33 - .../hubVirtualNetworkConnectionsGetSample.js | 33 - .../hubVirtualNetworkConnectionsListSample.js | 34 - .../inboundNatRulesCreateOrUpdateSample.js | 45 - .../javascript/inboundNatRulesDeleteSample.js | 33 - .../javascript/inboundNatRulesGetSample.js | 33 - .../javascript/inboundNatRulesListSample.js | 31 - ...inboundSecurityRuleCreateOrUpdateSample.js | 47 - .../inboundSecurityRuleGetSample.js | 33 - .../ipAllocationsCreateOrUpdateSample.js | 41 - .../javascript/ipAllocationsDeleteSample.js | 28 - .../v35/javascript/ipAllocationsGetSample.js | 28 - .../ipAllocationsListByResourceGroupSample.js | 30 - .../v35/javascript/ipAllocationsListSample.js | 29 - .../ipAllocationsUpdateTagsSample.js | 33 - .../ipGroupsCreateOrUpdateSample.js | 37 - .../v35/javascript/ipGroupsDeleteSample.js | 28 - .../v35/javascript/ipGroupsGetSample.js | 28 - .../ipGroupsListByResourceGroupSample.js | 30 - .../v35/javascript/ipGroupsListSample.js | 29 - .../javascript/ipGroupsUpdateGroupsSample.js | 29 - .../v35/javascript/ipamPoolsCreateSample.js | 43 - .../v35/javascript/ipamPoolsDeleteSample.js | 34 - .../javascript/ipamPoolsGetPoolUsageSample.js | 34 - .../v35/javascript/ipamPoolsGetSample.js | 30 - .../ipamPoolsListAssociatedResourcesSample.js | 37 - .../v35/javascript/ipamPoolsListSample.js | 32 - .../v35/javascript/ipamPoolsUpdateSample.js | 30 - ...tActiveConnectivityConfigurationsSample.js | 37 - .../listActiveSecurityAdminRulesSample.js | 37 - ...fectiveConnectivityConfigurationsSample.js | 34 - ...anagerEffectiveSecurityAdminRulesSample.js | 34 - ...BackendAddressPoolsCreateOrUpdateSample.js | 52 - ...BalancerBackendAddressPoolsDeleteSample.js | 33 - ...oadBalancerBackendAddressPoolsGetSample.js | 55 - ...adBalancerBackendAddressPoolsListSample.js | 57 - ...lancerFrontendIPConfigurationsGetSample.js | 33 - ...ancerFrontendIPConfigurationsListSample.js | 34 - ...loadBalancerLoadBalancingRulesGetSample.js | 33 - ...dBalancerLoadBalancingRulesHealthSample.js | 33 - ...oadBalancerLoadBalancingRulesListSample.js | 34 - ...loadBalancerNetworkInterfacesListSample.js | 57 - .../loadBalancerOutboundRulesGetSample.js | 33 - .../loadBalancerOutboundRulesListSample.js | 34 - .../javascript/loadBalancerProbesGetSample.js | 33 - .../loadBalancerProbesListSample.js | 31 - .../loadBalancersCreateOrUpdateSample.js | 802 - .../javascript/loadBalancersDeleteSample.js | 28 - .../v35/javascript/loadBalancersGetSample.js | 45 - .../javascript/loadBalancersListAllSample.js | 29 - ...ersListInboundNatRulePortMappingsSample.js | 37 - .../v35/javascript/loadBalancersListSample.js | 30 - .../loadBalancersMigrateToIPBasedSample.js | 32 - ...oadBalancersSwapPublicIPAddressesSample.js | 43 - .../loadBalancersUpdateTagsSample.js | 33 - ...ocalNetworkGatewaysCreateOrUpdateSample.js | 38 - .../localNetworkGatewaysDeleteSample.js | 31 - .../localNetworkGatewaysGetSample.js | 28 - .../localNetworkGatewaysListSample.js | 30 - .../localNetworkGatewaysUpdateTagsSample.js | 33 - ...kManagerConnectionsCreateOrUpdateSample.js | 35 - ...upNetworkManagerConnectionsDeleteSample.js | 30 - ...GroupNetworkManagerConnectionsGetSample.js | 30 - ...roupNetworkManagerConnectionsListSample.js | 31 - .../natGatewaysCreateOrUpdateSample.js | 81 - .../v35/javascript/natGatewaysDeleteSample.js | 28 - .../v35/javascript/natGatewaysGetSample.js | 45 - .../javascript/natGatewaysListAllSample.js | 29 - .../v35/javascript/natGatewaysListSample.js | 30 - .../javascript/natGatewaysUpdateTagsSample.js | 47 - .../natRulesCreateOrUpdateSample.js | 42 - .../v35/javascript/natRulesDeleteSample.js | 33 - .../v35/javascript/natRulesGetSample.js | 29 - .../natRulesListByVpnGatewaySample.js | 31 - .../networkGroupsCreateOrUpdateSample.js | 39 - .../javascript/networkGroupsDeleteSample.js | 37 - .../v35/javascript/networkGroupsGetSample.js | 34 - .../v35/javascript/networkGroupsListSample.js | 32 - ...tworkInterfaceIPConfigurationsGetSample.js | 33 - ...workInterfaceIPConfigurationsListSample.js | 34 - ...networkInterfaceLoadBalancersListSample.js | 34 - ...ceTapConfigurationsCreateOrUpdateSample.js | 39 - ...kInterfaceTapConfigurationsDeleteSample.js | 33 - ...workInterfaceTapConfigurationsGetSample.js | 33 - ...orkInterfaceTapConfigurationsListSample.js | 34 - .../networkInterfacesCreateOrUpdateSample.js | 88 - .../networkInterfacesDeleteSample.js | 31 - ...esGetCloudServiceNetworkInterfaceSample.js | 35 - ...kInterfacesGetEffectiveRouteTableSample.js | 31 - .../javascript/networkInterfacesGetSample.js | 28 - ...ualMachineScaleSetIPConfigurationSample.js | 37 - ...alMachineScaleSetNetworkInterfaceSample.js | 35 - .../networkInterfacesListAllSample.js | 29 - ...ListCloudServiceNetworkInterfacesSample.js | 34 - ...viceRoleInstanceNetworkInterfacesSample.js | 36 - ...istEffectiveNetworkSecurityGroupsSample.js | 31 - .../javascript/networkInterfacesListSample.js | 30 - ...alMachineScaleSetIPConfigurationsSample.js | 38 - ...lMachineScaleSetNetworkInterfacesSample.js | 34 - ...achineScaleSetVMNetworkInterfacesSample.js | 36 - .../networkInterfacesUpdateTagsSample.js | 33 - .../networkManagerCommitsPostSample.js | 40 - ...etworkManagerDeploymentStatusListSample.js | 38 - ...utingConfigurationsCreateOrUpdateSample.js | 39 - ...anagerRoutingConfigurationsDeleteSample.js | 34 - ...rkManagerRoutingConfigurationsGetSample.js | 34 - ...kManagerRoutingConfigurationsListSample.js | 35 - .../networkManagersCreateOrUpdateSample.js | 41 - .../javascript/networkManagersDeleteSample.js | 35 - .../javascript/networkManagersGetSample.js | 29 - ...networkManagersListBySubscriptionSample.js | 30 - .../javascript/networkManagersListSample.js | 31 - .../javascript/networkManagersPatchSample.js | 34 - .../networkProfilesCreateOrUpdateSample.js | 48 - .../javascript/networkProfilesDeleteSample.js | 31 - .../javascript/networkProfilesGetSample.js | 45 - .../networkProfilesListAllSample.js | 29 - .../javascript/networkProfilesListSample.js | 30 - .../networkProfilesUpdateTagsSample.js | 33 - ...tworkSecurityGroupsCreateOrUpdateSample.js | 70 - .../networkSecurityGroupsDeleteSample.js | 31 - .../networkSecurityGroupsGetSample.js | 31 - .../networkSecurityGroupsListAllSample.js | 29 - .../networkSecurityGroupsListSample.js | 30 - .../networkSecurityGroupsUpdateTagsSample.js | 33 - ...erimeterAccessRulesCreateOrUpdateSample.js | 40 - ...ecurityPerimeterAccessRulesDeleteSample.js | 35 - ...rkSecurityPerimeterAccessRulesGetSample.js | 35 - ...kSecurityPerimeterAccessRulesListSample.js | 36 - ...rityPerimeterAccessRulesReconcileSample.js | 37 - ...imeterAssociableResourceTypesListSample.js | 30 - ...rimeterAssociationsCreateOrUpdateSample.js | 43 - ...curityPerimeterAssociationsDeleteSample.js | 33 - ...kSecurityPerimeterAssociationsGetSample.js | 33 - ...SecurityPerimeterAssociationsListSample.js | 34 - ...ityPerimeterAssociationsReconcileSample.js | 35 - ...rityPerimeterLinkReferencesDeleteSample.js | 33 - ...ecurityPerimeterLinkReferencesGetSample.js | 33 - ...curityPerimeterLinkReferencesListSample.js | 34 - ...urityPerimeterLinksCreateOrUpdateSample.js | 40 - ...tworkSecurityPerimeterLinksDeleteSample.js | 33 - .../networkSecurityPerimeterLinksGetSample.js | 33 - ...networkSecurityPerimeterLinksListSample.js | 34 - ...ggingConfigurationsCreateOrUpdateSample.js | 40 - ...imeterLoggingConfigurationsDeleteSample.js | 33 - ...PerimeterLoggingConfigurationsGetSample.js | 33 - ...erimeterLoggingConfigurationsListSample.js | 34 - ...rityPerimeterOperationStatusesGetSample.js | 28 - ...tyPerimeterProfilesCreateOrUpdateSample.js | 35 - ...rkSecurityPerimeterProfilesDeleteSample.js | 33 - ...tworkSecurityPerimeterProfilesGetSample.js | 33 - ...workSecurityPerimeterProfilesListSample.js | 34 - ...kSecurityPerimeterServiceTagsListSample.js | 30 - ...kSecurityPerimetersCreateOrUpdateSample.js | 33 - .../networkSecurityPerimetersDeleteSample.js | 31 - .../networkSecurityPerimetersGetSample.js | 31 - ...urityPerimetersListBySubscriptionSample.js | 29 - .../networkSecurityPerimetersListSample.js | 30 - .../networkSecurityPerimetersPatchSample.js | 33 - ...pplianceConnectionsCreateOrUpdateSample.js | 60 - ...VirtualApplianceConnectionsDeleteSample.js | 33 - ...orkVirtualApplianceConnectionsGetSample.js | 33 - ...rkVirtualApplianceConnectionsListSample.js | 34 - ...rkVirtualAppliancesCreateOrUpdateSample.js | 468 - .../networkVirtualAppliancesDeleteSample.js | 31 - ...alAppliancesGetBootDiagnosticLogsSample.js | 39 - .../networkVirtualAppliancesGetSample.js | 31 - ...tualAppliancesListByResourceGroupSample.js | 30 - .../networkVirtualAppliancesListSample.js | 29 - .../networkVirtualAppliancesReimageSample.js | 31 - .../networkVirtualAppliancesRestartSample.js | 51 - ...etworkVirtualAppliancesUpdateTagsSample.js | 33 - .../networkWatchersCheckConnectivitySample.js | 40 - .../networkWatchersCreateOrUpdateSample.js | 33 - .../javascript/networkWatchersDeleteSample.js | 31 - ...atchersGetAzureReachabilityReportSample.js | 39 - .../networkWatchersGetFlowLogStatusSample.js | 36 - ...GetNetworkConfigurationDiagnosticSample.js | 45 - .../networkWatchersGetNextHopSample.js | 40 - .../javascript/networkWatchersGetSample.js | 28 - .../networkWatchersGetTopologySample.js | 33 - ...kWatchersGetTroubleshootingResultSample.js | 36 - ...networkWatchersGetTroubleshootingSample.js | 39 - ...networkWatchersGetVMSecurityRulesSample.js | 36 - .../networkWatchersListAllSample.js | 29 - ...orkWatchersListAvailableProvidersSample.js | 38 - .../javascript/networkWatchersListSample.js | 30 - ...rkWatchersSetFlowLogConfigurationSample.js | 46 - .../networkWatchersUpdateTagsSample.js | 33 - .../networkWatchersVerifyIPFlowSample.js | 42 - .../v35/javascript/operationsListSample.js | 30 - .../p2SVpnGatewaysCreateOrUpdateSample.js | 72 - .../javascript/p2SVpnGatewaysDeleteSample.js | 28 - ...tewaysDisconnectP2SvpnConnectionsSample.js | 35 - .../p2SVpnGatewaysGenerateVpnProfileSample.js | 35 - ...GetP2SvpnConnectionHealthDetailedSample.js | 37 - ...GatewaysGetP2SvpnConnectionHealthSample.js | 31 - .../v35/javascript/p2SVpnGatewaysGetSample.js | 28 - ...p2SVpnGatewaysListByResourceGroupSample.js | 30 - .../javascript/p2SVpnGatewaysListSample.js | 29 - .../javascript/p2SVpnGatewaysResetSample.js | 28 - .../p2SVpnGatewaysUpdateTagsSample.js | 35 - .../samples/v35/javascript/package.json | 36 - .../javascript/packetCapturesCreateSample.js | 48 - .../javascript/packetCapturesDeleteSample.js | 33 - .../v35/javascript/packetCapturesGetSample.js | 33 - .../packetCapturesGetStatusSample.js | 33 - .../javascript/packetCapturesListSample.js | 31 - .../javascript/packetCapturesStopSample.js | 33 - ...ExpressRouteCircuitConnectionsGetSample.js | 35 - ...xpressRouteCircuitConnectionsListSample.js | 36 - ...rivateDnsZoneGroupsCreateOrUpdateSample.js | 42 - .../privateDnsZoneGroupsDeleteSample.js | 33 - .../privateDnsZoneGroupsGetSample.js | 33 - .../privateDnsZoneGroupsListSample.js | 34 - .../privateEndpointsCreateOrUpdateSample.js | 140 - .../privateEndpointsDeleteSample.js | 31 - .../javascript/privateEndpointsGetSample.js | 62 - ...rivateEndpointsListBySubscriptionSample.js | 29 - .../javascript/privateEndpointsListSample.js | 30 - ...kServiceVisibilityByResourceGroupSample.js | 36 - ...CheckPrivateLinkServiceVisibilitySample.js | 33 - ...privateLinkServicesCreateOrUpdateSample.js | 56 - ...esDeletePrivateEndpointConnectionSample.js | 33 - .../privateLinkServicesDeleteSample.js | 31 - ...vicesGetPrivateEndpointConnectionSample.js | 33 - .../privateLinkServicesGetSample.js | 28 - ...rivateLinkServicesByResourceGroupSample.js | 34 - ...stAutoApprovedPrivateLinkServicesSample.js | 32 - ...ateLinkServicesListBySubscriptionSample.js | 29 - ...cesListPrivateEndpointConnectionsSample.js | 34 - .../privateLinkServicesListSample.js | 30 - ...esUpdatePrivateEndpointConnectionSample.js | 44 - .../publicIPAddressesCreateOrUpdateSample.js | 136 - ...icIPAddressesDdosProtectionStatusSample.js | 31 - .../publicIPAddressesDeleteSample.js | 31 - ...ciateCloudServiceReservedPublicIPSample.js | 37 - ...sesGetCloudServicePublicIpaddressSample.js | 39 - .../javascript/publicIPAddressesGetSample.js | 45 - ...ualMachineScaleSetPublicIpaddressSample.js | 39 - .../publicIPAddressesListAllSample.js | 29 - ...ListCloudServicePublicIpaddressesSample.js | 34 - ...viceRoleInstancePublicIpaddressesSample.js | 40 - .../javascript/publicIPAddressesListSample.js | 30 - ...lMachineScaleSetPublicIpaddressesSample.js | 34 - ...achineScaleSetVmpublicIpaddressesSample.js | 40 - ...eserveCloudServicePublicIPAddressSample.js | 35 - .../publicIPAddressesUpdateTagsSample.js | 33 - .../publicIPPrefixesCreateOrUpdateSample.js | 90 - .../publicIPPrefixesDeleteSample.js | 31 - .../javascript/publicIPPrefixesGetSample.js | 45 - .../publicIPPrefixesListAllSample.js | 29 - .../javascript/publicIPPrefixesListSample.js | 30 - .../publicIPPrefixesUpdateTagsSample.js | 33 - .../putBastionShareableLinkSample.js | 49 - ...reachabilityAnalysisIntentsCreateSample.js | 53 - ...reachabilityAnalysisIntentsDeleteSample.js | 36 - .../reachabilityAnalysisIntentsGetSample.js | 36 - .../reachabilityAnalysisIntentsListSample.js | 37 - .../reachabilityAnalysisRunsCreateSample.js | 44 - .../reachabilityAnalysisRunsDeleteSample.js | 36 - .../reachabilityAnalysisRunsGetSample.js | 36 - .../reachabilityAnalysisRunsListSample.js | 37 - .../resourceNavigationLinksListSample.js | 33 - .../routeFilterRulesCreateOrUpdateSample.js | 39 - .../routeFilterRulesDeleteSample.js | 33 - .../javascript/routeFilterRulesGetSample.js | 29 - ...routeFilterRulesListByRouteFilterSample.js | 34 - .../routeFiltersCreateOrUpdateSample.js | 44 - .../javascript/routeFiltersDeleteSample.js | 28 - .../v35/javascript/routeFiltersGetSample.js | 28 - .../routeFiltersListByResourceGroupSample.js | 30 - .../v35/javascript/routeFiltersListSample.js | 29 - .../routeFiltersUpdateTagsSample.js | 33 - .../routeMapsCreateOrUpdateSample.js | 60 - .../v35/javascript/routeMapsDeleteSample.js | 33 - .../v35/javascript/routeMapsGetSample.js | 29 - .../v35/javascript/routeMapsListSample.js | 31 - .../routeTablesCreateOrUpdateSample.js | 65 - .../v35/javascript/routeTablesDeleteSample.js | 28 - .../v35/javascript/routeTablesGetSample.js | 28 - .../javascript/routeTablesListAllSample.js | 29 - .../v35/javascript/routeTablesListSample.js | 30 - .../javascript/routeTablesUpdateTagsSample.js | 29 - .../javascript/routesCreateOrUpdateSample.js | 38 - .../v35/javascript/routesDeleteSample.js | 33 - .../samples/v35/javascript/routesGetSample.js | 29 - .../v35/javascript/routesListSample.js | 31 - .../routingIntentCreateOrUpdateSample.js | 50 - .../javascript/routingIntentDeleteSample.js | 33 - .../v35/javascript/routingIntentGetSample.js | 33 - .../v35/javascript/routingIntentListSample.js | 31 - ...tingRuleCollectionsCreateOrUpdateSample.js | 46 - .../routingRuleCollectionsDeleteSample.js | 36 - .../routingRuleCollectionsGetSample.js | 36 - .../routingRuleCollectionsListSample.js | 37 - .../routingRulesCreateOrUpdateSample.js | 77 - .../javascript/routingRulesDeleteSample.js | 41 - .../v35/javascript/routingRulesGetSample.js | 38 - .../v35/javascript/routingRulesListSample.js | 39 - .../samples/v35/javascript/sample.env | 1 - .../scopeConnectionsCreateOrUpdateSample.js | 40 - .../scopeConnectionsDeleteSample.js | 34 - .../javascript/scopeConnectionsGetSample.js | 34 - .../javascript/scopeConnectionsListSample.js | 32 - ...AdminConfigurationsCreateOrUpdateSample.js | 68 - ...securityAdminConfigurationsDeleteSample.js | 37 - .../securityAdminConfigurationsGetSample.js | 34 - .../securityAdminConfigurationsListSample.js | 35 - ...ityPartnerProvidersCreateOrUpdateSample.js | 40 - .../securityPartnerProvidersDeleteSample.js | 31 - .../securityPartnerProvidersGetSample.js | 31 - ...rtnerProvidersListByResourceGroupSample.js | 30 - .../securityPartnerProvidersListSample.js | 29 - ...ecurityPartnerProvidersUpdateTagsSample.js | 33 - .../securityRulesCreateOrUpdateSample.js | 44 - .../javascript/securityRulesDeleteSample.js | 33 - .../v35/javascript/securityRulesGetSample.js | 33 - .../v35/javascript/securityRulesListSample.js | 31 - ...yUserConfigurationsCreateOrUpdateSample.js | 38 - .../securityUserConfigurationsDeleteSample.js | 37 - .../securityUserConfigurationsGetSample.js | 34 - .../securityUserConfigurationsListSample.js | 35 - ...UserRuleCollectionsCreateOrUpdateSample.js | 46 - ...securityUserRuleCollectionsDeleteSample.js | 39 - .../securityUserRuleCollectionsGetSample.js | 36 - .../securityUserRuleCollectionsListSample.js | 37 - .../securityUserRulesCreateOrUpdateSample.js | 48 - .../securityUserRulesDeleteSample.js | 41 - .../javascript/securityUserRulesGetSample.js | 38 - .../javascript/securityUserRulesListSample.js | 39 - .../serviceAssociationLinksListSample.js | 33 - ...iceEndpointPoliciesCreateOrUpdateSample.js | 69 - .../serviceEndpointPoliciesDeleteSample.js | 31 - .../serviceEndpointPoliciesGetSample.js | 31 - ...dpointPoliciesListByResourceGroupSample.js | 30 - .../serviceEndpointPoliciesListSample.js | 29 - ...serviceEndpointPoliciesUpdateTagsSample.js | 33 - ...ntPolicyDefinitionsCreateOrUpdateSample.js | 43 - ...ceEndpointPolicyDefinitionsDeleteSample.js | 33 - ...rviceEndpointPolicyDefinitionsGetSample.js | 33 - ...icyDefinitionsListByResourceGroupSample.js | 34 - .../serviceTagInformationListSample.js | 74 - .../v35/javascript/serviceTagsListSample.js | 27 - .../v35/javascript/staticCidrsCreateSample.js | 36 - .../v35/javascript/staticCidrsDeleteSample.js | 36 - .../v35/javascript/staticCidrsGetSample.js | 36 - .../v35/javascript/staticCidrsListSample.js | 37 - .../staticMembersCreateOrUpdateSample.js | 41 - .../javascript/staticMembersDeleteSample.js | 36 - .../v35/javascript/staticMembersGetSample.js | 36 - .../v35/javascript/staticMembersListSample.js | 37 - .../javascript/subnetsCreateOrUpdateSample.js | 144 - .../v35/javascript/subnetsDeleteSample.js | 33 - .../v35/javascript/subnetsGetSample.js | 65 - .../v35/javascript/subnetsListSample.js | 31 - .../subnetsPrepareNetworkPoliciesSample.js | 35 - .../subnetsUnprepareNetworkPoliciesSample.js | 37 - ...kManagerConnectionsCreateOrUpdateSample.js | 35 - ...onNetworkManagerConnectionsDeleteSample.js | 30 - ...ptionNetworkManagerConnectionsGetSample.js | 30 - ...tionNetworkManagerConnectionsListSample.js | 30 - .../supportedSecurityProvidersSample.js | 28 - .../v35/javascript/usagesListSample.js | 49 - .../verifierWorkspacesCreateSample.js | 39 - .../verifierWorkspacesDeleteSample.js | 34 - .../javascript/verifierWorkspacesGetSample.js | 34 - .../verifierWorkspacesListSample.js | 32 - .../verifierWorkspacesUpdateSample.js | 34 - .../v35/javascript/vipSwapCreateSample.js | 29 - .../v35/javascript/vipSwapGetSample.js | 28 - .../v35/javascript/vipSwapListSample.js | 28 - ...rtualApplianceSitesCreateOrUpdateSample.js | 40 - .../virtualApplianceSitesDeleteSample.js | 33 - .../virtualApplianceSitesGetSample.js | 33 - .../virtualApplianceSitesListSample.js | 34 - .../virtualApplianceSkusGetSample.js | 27 - .../virtualApplianceSkusListSample.js | 29 - ...ualHubBgpConnectionCreateOrUpdateSample.js | 41 - .../virtualHubBgpConnectionDeleteSample.js | 33 - .../virtualHubBgpConnectionGetSample.js | 33 - ...gpConnectionsListAdvertisedRoutesSample.js | 33 - ...ubBgpConnectionsListLearnedRoutesSample.js | 33 - .../virtualHubBgpConnectionsListSample.js | 34 - ...lHubIPConfigurationCreateOrUpdateSample.js | 39 - .../virtualHubIPConfigurationDeleteSample.js | 33 - .../virtualHubIPConfigurationGetSample.js | 33 - .../virtualHubIPConfigurationListSample.js | 34 - ...ualHubRouteTableV2SCreateOrUpdateSample.js | 51 - .../virtualHubRouteTableV2SDeleteSample.js | 33 - .../virtualHubRouteTableV2SGetSample.js | 33 - .../virtualHubRouteTableV2SListSample.js | 31 - .../virtualHubsCreateOrUpdateSample.js | 41 - .../v35/javascript/virtualHubsDeleteSample.js | 28 - ...lHubsGetEffectiveVirtualHubRoutesSample.js | 94 - .../virtualHubsGetInboundRoutesSample.js | 37 - .../virtualHubsGetOutboundRoutesSample.js | 37 - .../v35/javascript/virtualHubsGetSample.js | 28 - .../virtualHubsListByResourceGroupSample.js | 30 - .../v35/javascript/virtualHubsListSample.js | 29 - .../javascript/virtualHubsUpdateTagsSample.js | 35 - ...kGatewayConnectionsCreateOrUpdateSample.js | 116 - ...alNetworkGatewayConnectionsDeleteSample.js | 31 - ...etworkGatewayConnectionsGetIkeSasSample.js | 31 - ...rtualNetworkGatewayConnectionsGetSample.js | 31 - ...orkGatewayConnectionsGetSharedKeySample.js | 31 - ...tualNetworkGatewayConnectionsListSample.js | 30 - ...GatewayConnectionsResetConnectionSample.js | 31 - ...kGatewayConnectionsResetSharedKeySample.js | 33 - ...orkGatewayConnectionsSetSharedKeySample.js | 33 - ...ewayConnectionsStartPacketCaptureSample.js | 57 - ...tewayConnectionsStopPacketCaptureSample.js | 36 - ...tworkGatewayConnectionsUpdateTagsSample.js | 33 - ...workGatewayNatRulesCreateOrUpdateSample.js | 42 - ...rtualNetworkGatewayNatRulesDeleteSample.js | 33 - .../virtualNetworkGatewayNatRulesGetSample.js | 33 - ...tRulesListByVirtualNetworkGatewaySample.js | 34 - ...tualNetworkGatewaysCreateOrUpdateSample.js | 150 - .../virtualNetworkGatewaysDeleteSample.js | 31 - ...rtualNetworkGatewayVpnConnectionsSample.js | 36 - ...NetworkGatewaysGenerateVpnProfileSample.js | 33 - ...kGatewaysGeneratevpnclientpackageSample.js | 33 - ...etworkGatewaysGetAdvertisedRoutesSample.js | 33 - ...alNetworkGatewaysGetBgpPeerStatusSample.js | 31 - ...GatewaysGetFailoverAllTestDetailsSample.js | 35 - ...ewaysGetFailoverSingleTestDetailsSample.js | 35 - ...alNetworkGatewaysGetLearnedRoutesSample.js | 31 - ...kGatewaysGetResiliencyInformationSample.js | 34 - ...tworkGatewaysGetRoutesInformationSample.js | 36 - .../virtualNetworkGatewaysGetSample.js | 51 - ...rkGatewaysGetVpnProfilePackageUrlSample.js | 31 - ...ewaysGetVpnclientConnectionHealthSample.js | 31 - ...tewaysGetVpnclientIpsecParametersSample.js | 31 - ...tworkGatewaysInvokeAbortMigrationSample.js | 31 - ...workGatewaysInvokeCommitMigrationSample.js | 31 - ...orkGatewaysInvokeExecuteMigrationSample.js | 31 - ...orkGatewaysInvokePrepareMigrationSample.js | 36 - ...ualNetworkGatewaysListConnectionsSample.js | 34 - ...lNetworkGatewaysListRadiusSecretsSample.js | 32 - .../virtualNetworkGatewaysListSample.js | 30 - .../virtualNetworkGatewaysResetSample.js | 31 - ...rkGatewaysResetVpnClientSharedKeySample.js | 31 - ...tewaysSetVpnclientIpsecParametersSample.js | 42 - ...xpressRouteSiteFailoverSimulationSample.js | 34 - ...NetworkGatewaysStartPacketCaptureSample.js | 59 - ...xpressRouteSiteFailoverSimulationSample.js | 49 - ...lNetworkGatewaysStopPacketCaptureSample.js | 36 - ...etworkGatewaysSupportedVpnDevicesSample.js | 31 - .../virtualNetworkGatewaysUpdateTagsSample.js | 33 - ...ewaysVpnDeviceConfigurationScriptSample.js | 37 - ...tualNetworkPeeringsCreateOrUpdateSample.js | 262 - .../virtualNetworkPeeringsDeleteSample.js | 33 - .../virtualNetworkPeeringsGetSample.js | 99 - .../virtualNetworkPeeringsListSample.js | 57 - .../virtualNetworkTapsCreateOrUpdateSample.js | 38 - .../virtualNetworkTapsDeleteSample.js | 28 - .../javascript/virtualNetworkTapsGetSample.js | 28 - .../virtualNetworkTapsListAllSample.js | 29 - ...ualNetworkTapsListByResourceGroupSample.js | 30 - .../virtualNetworkTapsUpdateTagsSample.js | 35 - ...etworksCheckIPAddressAvailabilitySample.js | 33 - .../virtualNetworksCreateOrUpdateSample.js | 292 - .../javascript/virtualNetworksDeleteSample.js | 31 - .../javascript/virtualNetworksGetSample.js | 62 - .../virtualNetworksListAllSample.js | 29 - ...lNetworksListDdosProtectionStatusSample.js | 39 - .../javascript/virtualNetworksListSample.js | 30 - .../virtualNetworksListUsageSample.js | 34 - .../virtualNetworksUpdateTagsSample.js | 33 - ...rtualRouterPeeringsCreateOrUpdateSample.js | 38 - .../virtualRouterPeeringsDeleteSample.js | 33 - .../virtualRouterPeeringsGetSample.js | 33 - .../virtualRouterPeeringsListSample.js | 34 - .../virtualRoutersCreateOrUpdateSample.js | 39 - .../javascript/virtualRoutersDeleteSample.js | 31 - .../v35/javascript/virtualRoutersGetSample.js | 28 - ...virtualRoutersListByResourceGroupSample.js | 30 - .../javascript/virtualRoutersListSample.js | 29 - .../virtualWansCreateOrUpdateSample.js | 38 - .../v35/javascript/virtualWansDeleteSample.js | 28 - .../v35/javascript/virtualWansGetSample.js | 28 - .../virtualWansListByResourceGroupSample.js | 30 - .../v35/javascript/virtualWansListSample.js | 29 - .../javascript/virtualWansUpdateTagsSample.js | 35 - .../vpnConnectionsCreateOrUpdateSample.js | 78 - .../javascript/vpnConnectionsDeleteSample.js | 33 - .../v35/javascript/vpnConnectionsGetSample.js | 29 - .../vpnConnectionsListByVpnGatewaySample.js | 31 - .../vpnConnectionsStartPacketCaptureSample.js | 71 - .../vpnConnectionsStopPacketCaptureSample.js | 40 - .../vpnGatewaysCreateOrUpdateSample.js | 89 - .../v35/javascript/vpnGatewaysDeleteSample.js | 28 - .../v35/javascript/vpnGatewaysGetSample.js | 28 - .../vpnGatewaysListByResourceGroupSample.js | 30 - .../v35/javascript/vpnGatewaysListSample.js | 29 - .../v35/javascript/vpnGatewaysResetSample.js | 28 - .../vpnGatewaysStartPacketCaptureSample.js | 57 - .../vpnGatewaysStopPacketCaptureSample.js | 37 - .../javascript/vpnGatewaysUpdateTagsSample.js | 35 - ...pnLinkConnectionsGetAllSharedKeysSample.js | 38 - ...inkConnectionsGetDefaultSharedKeySample.js | 35 - .../vpnLinkConnectionsGetIkeSasSample.js | 35 - ...inkConnectionsListByVpnConnectionSample.js | 36 - ...nkConnectionsListDefaultSharedKeySample.js | 35 - ...vpnLinkConnectionsResetConnectionSample.js | 35 - ...nectionsSetOrInitDefaultSharedKeySample.js | 39 - ...tionsAssociatedWithVirtualWanListSample.js | 31 - ...erverConfigurationsCreateOrUpdateSample.js | 110 - .../vpnServerConfigurationsDeleteSample.js | 31 - .../vpnServerConfigurationsGetSample.js | 31 - ...ConfigurationsListByResourceGroupSample.js | 30 - ...erConfigurationsListRadiusSecretsSample.js | 32 - .../vpnServerConfigurationsListSample.js | 29 - ...vpnServerConfigurationsUpdateTagsSample.js | 35 - .../vpnSiteLinkConnectionsGetSample.js | 35 - .../v35/javascript/vpnSiteLinksGetSample.js | 29 - .../vpnSiteLinksListByVpnSiteSample.js | 31 - .../vpnSitesConfigurationDownloadSample.js | 37 - .../vpnSitesCreateOrUpdateSample.js | 53 - .../v35/javascript/vpnSitesDeleteSample.js | 28 - .../v35/javascript/vpnSitesGetSample.js | 28 - .../vpnSitesListByResourceGroupSample.js | 30 - .../v35/javascript/vpnSitesListSample.js | 29 - .../javascript/vpnSitesUpdateTagsSample.js | 35 - ...ionFirewallPoliciesCreateOrUpdateSample.js | 242 - ...ApplicationFirewallPoliciesDeleteSample.js | 31 - ...webApplicationFirewallPoliciesGetSample.js | 28 - ...pplicationFirewallPoliciesListAllSample.js | 29 - ...ebApplicationFirewallPoliciesListSample.js | 30 - .../v35/javascript/webCategoriesGetSample.js | 28 - .../webCategoriesListBySubscriptionSample.js | 30 - .../samples/v35/typescript/README.md | 1523 - .../samples/v35/typescript/package.json | 43 - .../samples/v35/typescript/sample.env | 1 - ...dminRuleCollectionsCreateOrUpdateSample.ts | 51 - .../src/adminRuleCollectionsDeleteSample.ts | 44 - .../src/adminRuleCollectionsGetSample.ts | 37 - .../src/adminRuleCollectionsListSample.ts | 38 - .../src/adminRulesCreateOrUpdateSample.ts | 100 - .../typescript/src/adminRulesDeleteSample.ts | 46 - .../v35/typescript/src/adminRulesGetSample.ts | 67 - .../typescript/src/adminRulesListSample.ts | 40 - ...yPrivateEndpointConnectionsDeleteSample.ts | 34 - ...ewayPrivateEndpointConnectionsGetSample.ts | 33 - ...wayPrivateEndpointConnectionsListSample.ts | 34 - ...yPrivateEndpointConnectionsUpdateSample.ts | 49 - ...onGatewayPrivateLinkResourcesListSample.ts | 34 - ...ewayWafDynamicManifestsDefaultGetSample.ts | 28 - ...tionGatewayWafDynamicManifestsGetSample.ts | 32 - ...tionGatewaysBackendHealthOnDemandSample.ts | 49 - .../applicationGatewaysBackendHealthSample.ts | 31 - ...applicationGatewaysCreateOrUpdateSample.ts | 215 - .../src/applicationGatewaysDeleteSample.ts | 31 - .../src/applicationGatewaysGetSample.ts | 31 - ...ionGatewaysGetSslPredefinedPolicySample.ts | 30 - .../src/applicationGatewaysListAllSample.ts | 29 - ...tewaysListAvailableRequestHeadersSample.ts | 28 - ...ewaysListAvailableResponseHeadersSample.ts | 29 - ...ewaysListAvailableServerVariablesSample.ts | 29 - ...onGatewaysListAvailableSslOptionsSample.ts | 26 - ...istAvailableSslPredefinedPoliciesSample.ts | 29 - ...nGatewaysListAvailableWafRuleSetsSample.ts | 26 - .../src/applicationGatewaysListSample.ts | 30 - .../src/applicationGatewaysStartSample.ts | 31 - .../src/applicationGatewaysStopSample.ts | 31 - .../applicationGatewaysUpdateTagsSample.ts | 34 - ...ationSecurityGroupsCreateOrUpdateSample.ts | 38 - .../applicationSecurityGroupsDeleteSample.ts | 31 - .../src/applicationSecurityGroupsGetSample.ts | 31 - .../applicationSecurityGroupsListAllSample.ts | 29 - .../applicationSecurityGroupsListSample.ts | 32 - ...plicationSecurityGroupsUpdateTagsSample.ts | 34 - .../src/availableDelegationsListSample.ts | 30 - .../availableEndpointServicesListSample.ts | 30 - ...eEndpointTypesListByResourceGroupSample.ts | 34 - ...availablePrivateEndpointTypesListSample.ts | 32 - ...lableResourceGroupDelegationsListSample.ts | 34 - ...ServiceAliasesListByResourceGroupSample.ts | 34 - .../src/availableServiceAliasesListSample.ts | 30 - .../src/azureFirewallFqdnTagsListAllSample.ts | 29 - .../src/azureFirewallsCreateOrUpdateSample.ts | 638 - .../src/azureFirewallsDeleteSample.ts | 31 - .../typescript/src/azureFirewallsGetSample.ts | 111 - .../src/azureFirewallsListAllSample.ts | 29 - ...azureFirewallsListLearnedPrefixesSample.ts | 31 - .../src/azureFirewallsListSample.ts | 30 - ...reFirewallsPacketCaptureOperationSample.ts | 57 - .../src/azureFirewallsPacketCaptureSample.ts | 56 - .../src/azureFirewallsUpdateTagsSample.ts | 34 - .../src/bastionHostsCreateOrUpdateSample.ts | 140 - .../src/bastionHostsDeleteSample.ts | 51 - .../typescript/src/bastionHostsGetSample.ts | 91 - .../bastionHostsListByResourceGroupSample.ts | 32 - .../typescript/src/bastionHostsListSample.ts | 29 - .../src/bastionHostsUpdateTagsSample.ts | 34 - .../src/bgpServiceCommunitiesListSample.ts | 29 - .../src/checkDnsNameAvailabilitySample.ts | 31 - ...urationPolicyGroupsCreateOrUpdateSample.ts | 56 - .../configurationPolicyGroupsDeleteSample.ts | 33 - .../src/configurationPolicyGroupsGetSample.ts | 33 - ...roupsListByVpnServerConfigurationSample.ts | 34 - .../connectionMonitorsCreateOrUpdateSample.ts | 183 - .../src/connectionMonitorsDeleteSample.ts | 33 - .../src/connectionMonitorsGetSample.ts | 33 - .../src/connectionMonitorsListSample.ts | 34 - .../src/connectionMonitorsStopSample.ts | 33 - .../src/connectionMonitorsUpdateTagsSample.ts | 36 - ...ivityConfigurationsCreateOrUpdateSample.ts | 68 - .../connectivityConfigurationsDeleteSample.ts | 43 - .../connectivityConfigurationsGetSample.ts | 36 - .../connectivityConfigurationsListSample.ts | 37 - .../customIPPrefixesCreateOrUpdateSample.ts | 34 - .../src/customIPPrefixesDeleteSample.ts | 31 - .../src/customIPPrefixesGetSample.ts | 31 - .../src/customIPPrefixesListAllSample.ts | 29 - .../src/customIPPrefixesListSample.ts | 30 - .../src/customIPPrefixesUpdateTagsSample.ts | 34 - .../ddosCustomPoliciesCreateOrUpdateSample.ts | 43 - .../src/ddosCustomPoliciesDeleteSample.ts | 31 - .../src/ddosCustomPoliciesGetSample.ts | 31 - .../src/ddosCustomPoliciesUpdateTagsSample.ts | 34 - ...ddosProtectionPlansCreateOrUpdateSample.ts | 37 - .../src/ddosProtectionPlansDeleteSample.ts | 31 - .../src/ddosProtectionPlansGetSample.ts | 31 - ...rotectionPlansListByResourceGroupSample.ts | 32 - .../src/ddosProtectionPlansListSample.ts | 29 - .../ddosProtectionPlansUpdateTagsSample.ts | 34 - .../src/defaultSecurityRulesGetSample.ts | 33 - .../src/defaultSecurityRulesListSample.ts | 34 - ...deleteBastionShareableLinkByTokenSample.ts | 42 - .../src/deleteBastionShareableLinkSample.ts | 50 - .../src/disconnectActiveSessionsSample.ts | 37 - .../dscpConfigurationCreateOrUpdateSample.ts | 58 - .../src/dscpConfigurationDeleteSample.ts | 31 - .../src/dscpConfigurationGetSample.ts | 31 - .../src/dscpConfigurationListAllSample.ts | 29 - .../src/dscpConfigurationListSample.ts | 32 - ...rcuitAuthorizationsCreateOrUpdateSample.ts | 40 - ...sRouteCircuitAuthorizationsDeleteSample.ts | 34 - ...ressRouteCircuitAuthorizationsGetSample.ts | 33 - ...essRouteCircuitAuthorizationsListSample.ts | 34 - ...eCircuitConnectionsCreateOrUpdateSample.ts | 53 - ...ressRouteCircuitConnectionsDeleteSample.ts | 35 - ...expressRouteCircuitConnectionsGetSample.ts | 35 - ...xpressRouteCircuitConnectionsListSample.ts | 36 - ...outeCircuitPeeringsCreateOrUpdateSample.ts | 45 - ...expressRouteCircuitPeeringsDeleteSample.ts | 33 - .../expressRouteCircuitPeeringsGetSample.ts | 33 - .../expressRouteCircuitPeeringsListSample.ts | 34 - ...xpressRouteCircuitsCreateOrUpdateSample.ts | 87 - .../src/expressRouteCircuitsDeleteSample.ts | 31 - ...pressRouteCircuitsGetPeeringStatsSample.ts | 33 - .../src/expressRouteCircuitsGetSample.ts | 31 - .../src/expressRouteCircuitsGetStatsSample.ts | 31 - .../src/expressRouteCircuitsListAllSample.ts | 29 - .../expressRouteCircuitsListArpTableSample.ts | 35 - ...pressRouteCircuitsListRoutesTableSample.ts | 35 - ...uteCircuitsListRoutesTableSummarySample.ts | 36 - .../src/expressRouteCircuitsListSample.ts | 32 - .../expressRouteCircuitsUpdateTagsSample.ts | 34 - ...essRouteConnectionsCreateOrUpdateSample.ts | 74 - .../expressRouteConnectionsDeleteSample.ts | 34 - .../src/expressRouteConnectionsGetSample.ts | 34 - .../src/expressRouteConnectionsListSample.ts | 32 - ...sConnectionPeeringsCreateOrUpdateSample.ts | 50 - ...outeCrossConnectionPeeringsDeleteSample.ts | 35 - ...ssRouteCrossConnectionPeeringsGetSample.ts | 34 - ...sRouteCrossConnectionPeeringsListSample.ts | 35 - ...uteCrossConnectionsCreateOrUpdateSample.ts | 41 - .../expressRouteCrossConnectionsGetSample.ts | 32 - ...RouteCrossConnectionsListArpTableSample.ts | 37 - ...ossConnectionsListByResourceGroupSample.ts | 33 - ...teCrossConnectionsListRoutesTableSample.ts | 37 - ...ConnectionsListRoutesTableSummarySample.ts | 37 - .../expressRouteCrossConnectionsListSample.ts | 29 - ...ssRouteCrossConnectionsUpdateTagsSample.ts | 37 - ...xpressRouteGatewaysCreateOrUpdateSample.ts | 45 - .../src/expressRouteGatewaysDeleteSample.ts | 32 - .../src/expressRouteGatewaysGetSample.ts | 32 - ...sRouteGatewaysListByResourceGroupSample.ts | 29 - ...ssRouteGatewaysListBySubscriptionSample.ts | 26 - .../expressRouteGatewaysUpdateTagsSample.ts | 37 - .../src/expressRouteLinksGetSample.ts | 33 - .../src/expressRouteLinksListSample.ts | 34 - ...ePortAuthorizationsCreateOrUpdateSample.ts | 40 - ...ressRoutePortAuthorizationsDeleteSample.ts | 33 - ...expressRoutePortAuthorizationsGetSample.ts | 33 - ...xpressRoutePortAuthorizationsListSample.ts | 34 - .../expressRoutePortsCreateOrUpdateSample.ts | 69 - .../src/expressRoutePortsDeleteSample.ts | 31 - .../src/expressRoutePortsGenerateLoaSample.ts | 39 - .../src/expressRoutePortsGetSample.ts | 31 - ...ressRoutePortsListByResourceGroupSample.ts | 32 - .../src/expressRoutePortsListSample.ts | 29 - .../expressRoutePortsLocationsGetSample.ts | 27 - .../expressRoutePortsLocationsListSample.ts | 29 - .../src/expressRoutePortsUpdateTagsSample.ts | 34 - .../src/expressRouteProviderPortSample.ts | 27 - ...essRouteProviderPortsLocationListSample.ts | 26 - .../expressRouteServiceProvidersListSample.ts | 29 - .../firewallPoliciesCreateOrUpdateSample.ts | 105 - .../src/firewallPoliciesDeleteSample.ts | 31 - .../src/firewallPoliciesGetSample.ts | 31 - .../src/firewallPoliciesListAllSample.ts | 29 - .../src/firewallPoliciesListSample.ts | 30 - .../src/firewallPoliciesUpdateTagsSample.ts | 35 - .../firewallPolicyDeploymentsDeploySample.ts | 31 - ...irewallPolicyDraftsCreateOrUpdateSample.ts | 99 - .../src/firewallPolicyDraftsDeleteSample.ts | 31 - .../src/firewallPolicyDraftsGetSample.ts | 31 - ...icyIdpsSignaturesFilterValuesListSample.ts | 41 - .../firewallPolicyIdpsSignaturesListSample.ts | 42 - ...lPolicyIdpsSignaturesOverridesGetSample.ts | 33 - ...PolicyIdpsSignaturesOverridesListSample.ts | 33 - ...olicyIdpsSignaturesOverridesPatchSample.ts | 44 - ...lPolicyIdpsSignaturesOverridesPutSample.ts | 44 - ...llectionGroupDraftsCreateOrUpdateSample.ts | 60 - ...cyRuleCollectionGroupDraftsDeleteSample.ts | 33 - ...olicyRuleCollectionGroupDraftsGetSample.ts | 33 - ...uleCollectionGroupsCreateOrUpdateSample.ts | 254 - ...lPolicyRuleCollectionGroupsDeleteSample.ts | 34 - ...wallPolicyRuleCollectionGroupsGetSample.ts | 101 - ...allPolicyRuleCollectionGroupsListSample.ts | 82 - .../src/flowLogsCreateOrUpdateSample.ts | 53 - .../typescript/src/flowLogsDeleteSample.ts | 33 - .../v35/typescript/src/flowLogsGetSample.ts | 33 - .../v35/typescript/src/flowLogsListSample.ts | 34 - .../src/flowLogsUpdateTagsSample.ts | 36 - ...nvpnserverconfigurationvpnprofileSample.ts | 42 - .../typescript/src/getActiveSessionsSample.ts | 34 - .../src/getBastionShareableLinkSample.ts | 53 - .../src/hubRouteTablesCreateOrUpdateSample.ts | 48 - .../src/hubRouteTablesDeleteSample.ts | 33 - .../typescript/src/hubRouteTablesGetSample.ts | 33 - .../src/hubRouteTablesListSample.ts | 34 - ...lNetworkConnectionsCreateOrUpdateSample.ts | 79 - ...ubVirtualNetworkConnectionsDeleteSample.ts | 33 - .../hubVirtualNetworkConnectionsGetSample.ts | 33 - .../hubVirtualNetworkConnectionsListSample.ts | 34 - .../inboundNatRulesCreateOrUpdateSample.ts | 46 - .../src/inboundNatRulesDeleteSample.ts | 33 - .../src/inboundNatRulesGetSample.ts | 33 - .../src/inboundNatRulesListSample.ts | 34 - ...inboundSecurityRuleCreateOrUpdateSample.ts | 52 - .../src/inboundSecurityRuleGetSample.ts | 33 - .../src/ipAllocationsCreateOrUpdateSample.ts | 42 - .../src/ipAllocationsDeleteSample.ts | 31 - .../typescript/src/ipAllocationsGetSample.ts | 31 - .../ipAllocationsListByResourceGroupSample.ts | 32 - .../typescript/src/ipAllocationsListSample.ts | 29 - .../src/ipAllocationsUpdateTagsSample.ts | 34 - .../src/ipGroupsCreateOrUpdateSample.ts | 39 - .../typescript/src/ipGroupsDeleteSample.ts | 32 - .../v35/typescript/src/ipGroupsGetSample.ts | 29 - .../src/ipGroupsListByResourceGroupSample.ts | 33 - .../v35/typescript/src/ipGroupsListSample.ts | 29 - .../src/ipGroupsUpdateGroupsSample.ts | 35 - .../typescript/src/ipamPoolsCreateSample.ts | 45 - .../typescript/src/ipamPoolsDeleteSample.ts | 35 - .../src/ipamPoolsGetPoolUsageSample.ts | 35 - .../v35/typescript/src/ipamPoolsGetSample.ts | 35 - .../ipamPoolsListAssociatedResourcesSample.ts | 38 - .../v35/typescript/src/ipamPoolsListSample.ts | 36 - .../typescript/src/ipamPoolsUpdateSample.ts | 35 - ...tActiveConnectivityConfigurationsSample.ts | 43 - .../src/listActiveSecurityAdminRulesSample.ts | 43 - ...fectiveConnectivityConfigurationsSample.ts | 41 - ...anagerEffectiveSecurityAdminRulesSample.ts | 40 - ...BackendAddressPoolsCreateOrUpdateSample.ts | 57 - ...BalancerBackendAddressPoolsDeleteSample.ts | 34 - ...oadBalancerBackendAddressPoolsGetSample.ts | 55 - ...adBalancerBackendAddressPoolsListSample.ts | 57 - ...lancerFrontendIPConfigurationsGetSample.ts | 33 - ...ancerFrontendIPConfigurationsListSample.ts | 34 - ...loadBalancerLoadBalancingRulesGetSample.ts | 33 - ...dBalancerLoadBalancingRulesHealthSample.ts | 33 - ...oadBalancerLoadBalancingRulesListSample.ts | 34 - ...loadBalancerNetworkInterfacesListSample.ts | 57 - .../src/loadBalancerOutboundRulesGetSample.ts | 33 - .../loadBalancerOutboundRulesListSample.ts | 34 - .../src/loadBalancerProbesGetSample.ts | 33 - .../src/loadBalancerProbesListSample.ts | 34 - .../src/loadBalancersCreateOrUpdateSample.ts | 803 - .../src/loadBalancersDeleteSample.ts | 31 - .../typescript/src/loadBalancersGetSample.ts | 51 - .../src/loadBalancersListAllSample.ts | 29 - ...ersListInboundNatRulePortMappingsSample.ts | 42 - .../typescript/src/loadBalancersListSample.ts | 30 - .../loadBalancersMigrateToIPBasedSample.ts | 41 - ...oadBalancersSwapPublicIPAddressesSample.ts | 50 - .../src/loadBalancersUpdateTagsSample.ts | 34 - ...ocalNetworkGatewaysCreateOrUpdateSample.ts | 42 - .../src/localNetworkGatewaysDeleteSample.ts | 31 - .../src/localNetworkGatewaysGetSample.ts | 31 - .../src/localNetworkGatewaysListSample.ts | 32 - .../localNetworkGatewaysUpdateTagsSample.ts | 34 - ...kManagerConnectionsCreateOrUpdateSample.ts | 40 - ...upNetworkManagerConnectionsDeleteSample.ts | 30 - ...GroupNetworkManagerConnectionsGetSample.ts | 30 - ...roupNetworkManagerConnectionsListSample.ts | 31 - .../src/natGatewaysCreateOrUpdateSample.ts | 82 - .../typescript/src/natGatewaysDeleteSample.ts | 31 - .../typescript/src/natGatewaysGetSample.ts | 51 - .../src/natGatewaysListAllSample.ts | 29 - .../typescript/src/natGatewaysListSample.ts | 30 - .../src/natGatewaysUpdateTagsSample.ts | 56 - .../src/natRulesCreateOrUpdateSample.ts | 43 - .../typescript/src/natRulesDeleteSample.ts | 33 - .../v35/typescript/src/natRulesGetSample.ts | 33 - .../src/natRulesListByVpnGatewaySample.ts | 34 - .../src/networkGroupsCreateOrUpdateSample.ts | 41 - .../src/networkGroupsDeleteSample.ts | 42 - .../typescript/src/networkGroupsGetSample.ts | 35 - .../typescript/src/networkGroupsListSample.ts | 36 - ...tworkInterfaceIPConfigurationsGetSample.ts | 33 - ...workInterfaceIPConfigurationsListSample.ts | 34 - ...networkInterfaceLoadBalancersListSample.ts | 34 - ...ceTapConfigurationsCreateOrUpdateSample.ts | 44 - ...kInterfaceTapConfigurationsDeleteSample.ts | 34 - ...workInterfaceTapConfigurationsGetSample.ts | 33 - ...orkInterfaceTapConfigurationsListSample.ts | 34 - .../networkInterfacesCreateOrUpdateSample.ts | 89 - .../src/networkInterfacesDeleteSample.ts | 31 - ...esGetCloudServiceNetworkInterfaceSample.ts | 35 - ...kInterfacesGetEffectiveRouteTableSample.ts | 32 - .../src/networkInterfacesGetSample.ts | 31 - ...ualMachineScaleSetIPConfigurationSample.ts | 38 - ...alMachineScaleSetNetworkInterfaceSample.ts | 36 - .../src/networkInterfacesListAllSample.ts | 29 - ...ListCloudServiceNetworkInterfacesSample.ts | 34 - ...viceRoleInstanceNetworkInterfacesSample.ts | 36 - ...istEffectiveNetworkSecurityGroupsSample.ts | 32 - .../src/networkInterfacesListSample.ts | 30 - ...alMachineScaleSetIPConfigurationsSample.ts | 38 - ...lMachineScaleSetNetworkInterfacesSample.ts | 34 - ...achineScaleSetVMNetworkInterfacesSample.ts | 36 - .../src/networkInterfacesUpdateTagsSample.ts | 34 - .../src/networkManagerCommitsPostSample.ts | 46 - ...etworkManagerDeploymentStatusListSample.ts | 44 - ...utingConfigurationsCreateOrUpdateSample.ts | 45 - ...anagerRoutingConfigurationsDeleteSample.ts | 36 - ...rkManagerRoutingConfigurationsGetSample.ts | 35 - ...kManagerRoutingConfigurationsListSample.ts | 36 - .../networkManagersCreateOrUpdateSample.ts | 43 - .../src/networkManagersDeleteSample.ts | 40 - .../src/networkManagersGetSample.ts | 33 - ...networkManagersListBySubscriptionSample.ts | 31 - .../src/networkManagersListSample.ts | 32 - .../src/networkManagersPatchSample.ts | 36 - .../networkProfilesCreateOrUpdateSample.ts | 49 - .../src/networkProfilesDeleteSample.ts | 31 - .../src/networkProfilesGetSample.ts | 51 - .../src/networkProfilesListAllSample.ts | 29 - .../src/networkProfilesListSample.ts | 30 - .../src/networkProfilesUpdateTagsSample.ts | 34 - ...tworkSecurityGroupsCreateOrUpdateSample.ts | 74 - .../src/networkSecurityGroupsDeleteSample.ts | 31 - .../src/networkSecurityGroupsGetSample.ts | 31 - .../src/networkSecurityGroupsListAllSample.ts | 29 - .../src/networkSecurityGroupsListSample.ts | 32 - .../networkSecurityGroupsUpdateTagsSample.ts | 34 - ...erimeterAccessRulesCreateOrUpdateSample.ts | 42 - ...ecurityPerimeterAccessRulesDeleteSample.ts | 35 - ...rkSecurityPerimeterAccessRulesGetSample.ts | 35 - ...kSecurityPerimeterAccessRulesListSample.ts | 36 - ...rityPerimeterAccessRulesReconcileSample.ts | 37 - ...imeterAssociableResourceTypesListSample.ts | 32 - ...rimeterAssociationsCreateOrUpdateSample.ts | 45 - ...curityPerimeterAssociationsDeleteSample.ts | 34 - ...kSecurityPerimeterAssociationsGetSample.ts | 33 - ...SecurityPerimeterAssociationsListSample.ts | 34 - ...ityPerimeterAssociationsReconcileSample.ts | 35 - ...rityPerimeterLinkReferencesDeleteSample.ts | 34 - ...ecurityPerimeterLinkReferencesGetSample.ts | 33 - ...curityPerimeterLinkReferencesListSample.ts | 34 - ...urityPerimeterLinksCreateOrUpdateSample.ts | 41 - ...tworkSecurityPerimeterLinksDeleteSample.ts | 33 - .../networkSecurityPerimeterLinksGetSample.ts | 33 - ...networkSecurityPerimeterLinksListSample.ts | 34 - ...ggingConfigurationsCreateOrUpdateSample.ts | 45 - ...imeterLoggingConfigurationsDeleteSample.ts | 34 - ...PerimeterLoggingConfigurationsGetSample.ts | 33 - ...erimeterLoggingConfigurationsListSample.ts | 34 - ...rityPerimeterOperationStatusesGetSample.ts | 31 - ...tyPerimeterProfilesCreateOrUpdateSample.ts | 36 - ...rkSecurityPerimeterProfilesDeleteSample.ts | 33 - ...tworkSecurityPerimeterProfilesGetSample.ts | 33 - ...workSecurityPerimeterProfilesListSample.ts | 34 - ...kSecurityPerimeterServiceTagsListSample.ts | 32 - ...kSecurityPerimetersCreateOrUpdateSample.ts | 37 - .../networkSecurityPerimetersDeleteSample.ts | 31 - .../src/networkSecurityPerimetersGetSample.ts | 31 - ...urityPerimetersListBySubscriptionSample.ts | 29 - .../networkSecurityPerimetersListSample.ts | 32 - .../networkSecurityPerimetersPatchSample.ts | 34 - ...pplianceConnectionsCreateOrUpdateSample.ts | 66 - ...VirtualApplianceConnectionsDeleteSample.ts | 34 - ...orkVirtualApplianceConnectionsGetSample.ts | 33 - ...rkVirtualApplianceConnectionsListSample.ts | 34 - ...rkVirtualAppliancesCreateOrUpdateSample.ts | 479 - .../networkVirtualAppliancesDeleteSample.ts | 31 - ...alAppliancesGetBootDiagnosticLogsSample.ts | 44 - .../src/networkVirtualAppliancesGetSample.ts | 31 - ...tualAppliancesListByResourceGroupSample.ts | 32 - .../src/networkVirtualAppliancesListSample.ts | 29 - .../networkVirtualAppliancesReimageSample.ts | 31 - .../networkVirtualAppliancesRestartSample.ts | 51 - ...etworkVirtualAppliancesUpdateTagsSample.ts | 34 - .../networkWatchersCheckConnectivitySample.ts | 44 - .../networkWatchersCreateOrUpdateSample.ts | 34 - .../src/networkWatchersDeleteSample.ts | 31 - ...atchersGetAzureReachabilityReportSample.ts | 44 - .../networkWatchersGetFlowLogStatusSample.ts | 40 - ...GetNetworkConfigurationDiagnosticSample.ts | 50 - .../src/networkWatchersGetNextHopSample.ts | 41 - .../src/networkWatchersGetSample.ts | 31 - .../src/networkWatchersGetTopologySample.ts | 37 - ...kWatchersGetTroubleshootingResultSample.ts | 41 - ...networkWatchersGetTroubleshootingSample.ts | 43 - ...networkWatchersGetVMSecurityRulesSample.ts | 40 - .../src/networkWatchersListAllSample.ts | 29 - ...orkWatchersListAvailableProvidersSample.ts | 43 - .../src/networkWatchersListSample.ts | 30 - ...rkWatchersSetFlowLogConfigurationSample.ts | 51 - .../src/networkWatchersUpdateTagsSample.ts | 34 - .../src/networkWatchersVerifyIPFlowSample.ts | 46 - .../typescript/src/operationsListSample.ts | 31 - .../src/p2SVpnGatewaysCreateOrUpdateSample.ts | 73 - .../src/p2SVpnGatewaysDeleteSample.ts | 31 - ...tewaysDisconnectP2SvpnConnectionsSample.ts | 41 - .../p2SVpnGatewaysGenerateVpnProfileSample.ts | 39 - ...GetP2SvpnConnectionHealthDetailedSample.ts | 43 - ...GatewaysGetP2SvpnConnectionHealthSample.ts | 32 - .../typescript/src/p2SVpnGatewaysGetSample.ts | 31 - ...p2SVpnGatewaysListByResourceGroupSample.ts | 32 - .../src/p2SVpnGatewaysListSample.ts | 29 - .../src/p2SVpnGatewaysResetSample.ts | 31 - .../src/p2SVpnGatewaysUpdateTagsSample.ts | 36 - .../src/packetCapturesCreateSample.ts | 50 - .../src/packetCapturesDeleteSample.ts | 33 - .../typescript/src/packetCapturesGetSample.ts | 33 - .../src/packetCapturesGetStatusSample.ts | 33 - .../src/packetCapturesListSample.ts | 34 - .../src/packetCapturesStopSample.ts | 33 - ...ExpressRouteCircuitConnectionsGetSample.ts | 35 - ...xpressRouteCircuitConnectionsListSample.ts | 36 - ...rivateDnsZoneGroupsCreateOrUpdateSample.ts | 46 - .../src/privateDnsZoneGroupsDeleteSample.ts | 33 - .../src/privateDnsZoneGroupsGetSample.ts | 33 - .../src/privateDnsZoneGroupsListSample.ts | 34 - .../privateEndpointsCreateOrUpdateSample.ts | 141 - .../src/privateEndpointsDeleteSample.ts | 31 - .../src/privateEndpointsGetSample.ts | 71 - ...rivateEndpointsListBySubscriptionSample.ts | 29 - .../src/privateEndpointsListSample.ts | 30 - ...kServiceVisibilityByResourceGroupSample.ts | 41 - ...CheckPrivateLinkServiceVisibilitySample.ts | 39 - ...privateLinkServicesCreateOrUpdateSample.ts | 60 - ...esDeletePrivateEndpointConnectionSample.ts | 34 - .../src/privateLinkServicesDeleteSample.ts | 31 - ...vicesGetPrivateEndpointConnectionSample.ts | 33 - .../src/privateLinkServicesGetSample.ts | 31 - ...rivateLinkServicesByResourceGroupSample.ts | 34 - ...stAutoApprovedPrivateLinkServicesSample.ts | 32 - ...ateLinkServicesListBySubscriptionSample.ts | 29 - ...cesListPrivateEndpointConnectionsSample.ts | 34 - .../src/privateLinkServicesListSample.ts | 30 - ...esUpdatePrivateEndpointConnectionSample.ts | 49 - .../publicIPAddressesCreateOrUpdateSample.ts | 137 - ...icIPAddressesDdosProtectionStatusSample.ts | 32 - .../src/publicIPAddressesDeleteSample.ts | 31 - ...ciateCloudServiceReservedPublicIPSample.ts | 41 - ...sesGetCloudServicePublicIpaddressSample.ts | 40 - .../src/publicIPAddressesGetSample.ts | 51 - ...ualMachineScaleSetPublicIpaddressSample.ts | 41 - .../src/publicIPAddressesListAllSample.ts | 29 - ...ListCloudServicePublicIpaddressesSample.ts | 35 - ...viceRoleInstancePublicIpaddressesSample.ts | 41 - .../src/publicIPAddressesListSample.ts | 30 - ...lMachineScaleSetPublicIpaddressesSample.ts | 35 - ...achineScaleSetVmpublicIpaddressesSample.ts | 41 - ...eserveCloudServicePublicIPAddressSample.ts | 40 - .../src/publicIPAddressesUpdateTagsSample.ts | 34 - .../publicIPPrefixesCreateOrUpdateSample.ts | 91 - .../src/publicIPPrefixesDeleteSample.ts | 31 - .../src/publicIPPrefixesGetSample.ts | 51 - .../src/publicIPPrefixesListAllSample.ts | 29 - .../src/publicIPPrefixesListSample.ts | 30 - .../src/publicIPPrefixesUpdateTagsSample.ts | 34 - .../src/putBastionShareableLinkSample.ts | 53 - ...reachabilityAnalysisIntentsCreateSample.ts | 58 - ...reachabilityAnalysisIntentsDeleteSample.ts | 37 - .../reachabilityAnalysisIntentsGetSample.ts | 37 - .../reachabilityAnalysisIntentsListSample.ts | 38 - .../reachabilityAnalysisRunsCreateSample.ts | 49 - .../reachabilityAnalysisRunsDeleteSample.ts | 37 - .../src/reachabilityAnalysisRunsGetSample.ts | 37 - .../src/reachabilityAnalysisRunsListSample.ts | 38 - .../src/resourceNavigationLinksListSample.ts | 33 - .../routeFilterRulesCreateOrUpdateSample.ts | 40 - .../src/routeFilterRulesDeleteSample.ts | 33 - .../src/routeFilterRulesGetSample.ts | 33 - ...routeFilterRulesListByRouteFilterSample.ts | 34 - .../src/routeFiltersCreateOrUpdateSample.ts | 45 - .../src/routeFiltersDeleteSample.ts | 31 - .../typescript/src/routeFiltersGetSample.ts | 31 - .../routeFiltersListByResourceGroupSample.ts | 32 - .../typescript/src/routeFiltersListSample.ts | 29 - .../src/routeFiltersUpdateTagsSample.ts | 34 - .../src/routeMapsCreateOrUpdateSample.ts | 61 - .../typescript/src/routeMapsDeleteSample.ts | 33 - .../v35/typescript/src/routeMapsGetSample.ts | 33 - .../v35/typescript/src/routeMapsListSample.ts | 34 - .../src/routeTablesCreateOrUpdateSample.ts | 66 - .../typescript/src/routeTablesDeleteSample.ts | 31 - .../typescript/src/routeTablesGetSample.ts | 31 - .../src/routeTablesListAllSample.ts | 29 - .../typescript/src/routeTablesListSample.ts | 30 - .../src/routeTablesUpdateTagsSample.ts | 34 - .../src/routesCreateOrUpdateSample.ts | 39 - .../v35/typescript/src/routesDeleteSample.ts | 33 - .../v35/typescript/src/routesGetSample.ts | 33 - .../v35/typescript/src/routesListSample.ts | 34 - .../src/routingIntentCreateOrUpdateSample.ts | 52 - .../src/routingIntentDeleteSample.ts | 33 - .../typescript/src/routingIntentGetSample.ts | 33 - .../typescript/src/routingIntentListSample.ts | 34 - ...tingRuleCollectionsCreateOrUpdateSample.ts | 51 - .../src/routingRuleCollectionsDeleteSample.ts | 37 - .../src/routingRuleCollectionsGetSample.ts | 37 - .../src/routingRuleCollectionsListSample.ts | 38 - .../src/routingRulesCreateOrUpdateSample.ts | 80 - .../src/routingRulesDeleteSample.ts | 46 - .../typescript/src/routingRulesGetSample.ts | 39 - .../typescript/src/routingRulesListSample.ts | 40 - .../scopeConnectionsCreateOrUpdateSample.ts | 42 - .../src/scopeConnectionsDeleteSample.ts | 35 - .../src/scopeConnectionsGetSample.ts | 35 - .../src/scopeConnectionsListSample.ts | 36 - ...AdminConfigurationsCreateOrUpdateSample.ts | 74 - ...securityAdminConfigurationsDeleteSample.ts | 42 - .../securityAdminConfigurationsGetSample.ts | 35 - .../securityAdminConfigurationsListSample.ts | 36 - ...ityPartnerProvidersCreateOrUpdateSample.ts | 45 - .../securityPartnerProvidersDeleteSample.ts | 31 - .../src/securityPartnerProvidersGetSample.ts | 31 - ...rtnerProvidersListByResourceGroupSample.ts | 32 - .../src/securityPartnerProvidersListSample.ts | 29 - ...ecurityPartnerProvidersUpdateTagsSample.ts | 34 - .../src/securityRulesCreateOrUpdateSample.ts | 45 - .../src/securityRulesDeleteSample.ts | 33 - .../typescript/src/securityRulesGetSample.ts | 33 - .../typescript/src/securityRulesListSample.ts | 34 - ...yUserConfigurationsCreateOrUpdateSample.ts | 43 - .../securityUserConfigurationsDeleteSample.ts | 42 - .../securityUserConfigurationsGetSample.ts | 35 - .../securityUserConfigurationsListSample.ts | 36 - ...UserRuleCollectionsCreateOrUpdateSample.ts | 51 - ...securityUserRuleCollectionsDeleteSample.ts | 44 - .../securityUserRuleCollectionsGetSample.ts | 37 - .../securityUserRuleCollectionsListSample.ts | 38 - .../securityUserRulesCreateOrUpdateSample.ts | 50 - .../src/securityUserRulesDeleteSample.ts | 46 - .../src/securityUserRulesGetSample.ts | 39 - .../src/securityUserRulesListSample.ts | 40 - .../src/serviceAssociationLinksListSample.ts | 33 - ...iceEndpointPoliciesCreateOrUpdateSample.ts | 75 - .../serviceEndpointPoliciesDeleteSample.ts | 31 - .../src/serviceEndpointPoliciesGetSample.ts | 31 - ...dpointPoliciesListByResourceGroupSample.ts | 32 - .../src/serviceEndpointPoliciesListSample.ts | 29 - ...serviceEndpointPoliciesUpdateTagsSample.ts | 34 - ...ntPolicyDefinitionsCreateOrUpdateSample.ts | 48 - ...ceEndpointPolicyDefinitionsDeleteSample.ts | 34 - ...rviceEndpointPolicyDefinitionsGetSample.ts | 33 - ...icyDefinitionsListByResourceGroupSample.ts | 34 - .../src/serviceTagInformationListSample.ts | 86 - .../typescript/src/serviceTagsListSample.ts | 27 - .../typescript/src/staticCidrsCreateSample.ts | 37 - .../typescript/src/staticCidrsDeleteSample.ts | 37 - .../typescript/src/staticCidrsGetSample.ts | 37 - .../typescript/src/staticCidrsListSample.ts | 38 - .../src/staticMembersCreateOrUpdateSample.ts | 43 - .../src/staticMembersDeleteSample.ts | 37 - .../typescript/src/staticMembersGetSample.ts | 37 - .../typescript/src/staticMembersListSample.ts | 38 - .../src/subnetsCreateOrUpdateSample.ts | 150 - .../v35/typescript/src/subnetsDeleteSample.ts | 34 - .../v35/typescript/src/subnetsGetSample.ts | 80 - .../v35/typescript/src/subnetsListSample.ts | 35 - .../subnetsPrepareNetworkPoliciesSample.ts | 40 - .../subnetsUnprepareNetworkPoliciesSample.ts | 40 - ...kManagerConnectionsCreateOrUpdateSample.ts | 41 - ...onNetworkManagerConnectionsDeleteSample.ts | 31 - ...ptionNetworkManagerConnectionsGetSample.ts | 31 - ...tionNetworkManagerConnectionsListSample.ts | 31 - .../src/supportedSecurityProvidersSample.ts | 31 - .../v35/typescript/src/usagesListSample.ts | 49 - .../src/verifierWorkspacesCreateSample.ts | 41 - .../src/verifierWorkspacesDeleteSample.ts | 35 - .../src/verifierWorkspacesGetSample.ts | 35 - .../src/verifierWorkspacesListSample.ts | 36 - .../src/verifierWorkspacesUpdateSample.ts | 35 - .../v35/typescript/src/vipSwapCreateSample.ts | 34 - .../v35/typescript/src/vipSwapGetSample.ts | 28 - .../v35/typescript/src/vipSwapListSample.ts | 28 - ...rtualApplianceSitesCreateOrUpdateSample.ts | 44 - .../src/virtualApplianceSitesDeleteSample.ts | 33 - .../src/virtualApplianceSitesGetSample.ts | 33 - .../src/virtualApplianceSitesListSample.ts | 34 - .../src/virtualApplianceSkusGetSample.ts | 27 - .../src/virtualApplianceSkusListSample.ts | 29 - ...ualHubBgpConnectionCreateOrUpdateSample.ts | 43 - .../virtualHubBgpConnectionDeleteSample.ts | 33 - .../src/virtualHubBgpConnectionGetSample.ts | 33 - ...gpConnectionsListAdvertisedRoutesSample.ts | 34 - ...ubBgpConnectionsListLearnedRoutesSample.ts | 34 - .../src/virtualHubBgpConnectionsListSample.ts | 34 - ...lHubIPConfigurationCreateOrUpdateSample.ts | 44 - .../virtualHubIPConfigurationDeleteSample.ts | 33 - .../src/virtualHubIPConfigurationGetSample.ts | 33 - .../virtualHubIPConfigurationListSample.ts | 34 - ...ualHubRouteTableV2SCreateOrUpdateSample.ts | 56 - .../virtualHubRouteTableV2SDeleteSample.ts | 33 - .../src/virtualHubRouteTableV2SGetSample.ts | 33 - .../src/virtualHubRouteTableV2SListSample.ts | 34 - .../src/virtualHubsCreateOrUpdateSample.ts | 42 - .../typescript/src/virtualHubsDeleteSample.ts | 31 - ...lHubsGetEffectiveVirtualHubRoutesSample.ts | 102 - .../src/virtualHubsGetInboundRoutesSample.ts | 41 - .../src/virtualHubsGetOutboundRoutesSample.ts | 41 - .../typescript/src/virtualHubsGetSample.ts | 31 - .../virtualHubsListByResourceGroupSample.ts | 32 - .../typescript/src/virtualHubsListSample.ts | 29 - .../src/virtualHubsUpdateTagsSample.ts | 36 - ...kGatewayConnectionsCreateOrUpdateSample.ts | 121 - ...alNetworkGatewayConnectionsDeleteSample.ts | 32 - ...etworkGatewayConnectionsGetIkeSasSample.ts | 32 - ...rtualNetworkGatewayConnectionsGetSample.ts | 31 - ...orkGatewayConnectionsGetSharedKeySample.ts | 31 - ...tualNetworkGatewayConnectionsListSample.ts | 32 - ...GatewayConnectionsResetConnectionSample.ts | 32 - ...kGatewayConnectionsResetSharedKeySample.ts | 38 - ...orkGatewayConnectionsSetSharedKeySample.ts | 38 - ...ewayConnectionsStartPacketCaptureSample.ts | 65 - ...tewayConnectionsStopPacketCaptureSample.ts | 41 - ...tworkGatewayConnectionsUpdateTagsSample.ts | 35 - ...workGatewayNatRulesCreateOrUpdateSample.ts | 49 - ...rtualNetworkGatewayNatRulesDeleteSample.ts | 33 - .../virtualNetworkGatewayNatRulesGetSample.ts | 33 - ...tRulesListByVirtualNetworkGatewaySample.ts | 34 - ...tualNetworkGatewaysCreateOrUpdateSample.ts | 154 - .../src/virtualNetworkGatewaysDeleteSample.ts | 31 - ...rtualNetworkGatewayVpnConnectionsSample.ts | 41 - ...NetworkGatewaysGenerateVpnProfileSample.ts | 38 - ...kGatewaysGeneratevpnclientpackageSample.ts | 38 - ...etworkGatewaysGetAdvertisedRoutesSample.ts | 34 - ...alNetworkGatewaysGetBgpPeerStatusSample.ts | 32 - ...GatewaysGetFailoverAllTestDetailsSample.ts | 36 - ...ewaysGetFailoverSingleTestDetailsSample.ts | 36 - ...alNetworkGatewaysGetLearnedRoutesSample.ts | 32 - ...kGatewaysGetResiliencyInformationSample.ts | 40 - ...tworkGatewaysGetRoutesInformationSample.ts | 41 - .../src/virtualNetworkGatewaysGetSample.ts | 51 - ...rkGatewaysGetVpnProfilePackageUrlSample.ts | 32 - ...ewaysGetVpnclientConnectionHealthSample.ts | 33 - ...tewaysGetVpnclientIpsecParametersSample.ts | 32 - ...tworkGatewaysInvokeAbortMigrationSample.ts | 32 - ...workGatewaysInvokeCommitMigrationSample.ts | 32 - ...orkGatewaysInvokeExecuteMigrationSample.ts | 32 - ...orkGatewaysInvokePrepareMigrationSample.ts | 41 - ...ualNetworkGatewaysListConnectionsSample.ts | 34 - ...lNetworkGatewaysListRadiusSecretsSample.ts | 33 - .../src/virtualNetworkGatewaysListSample.ts | 32 - .../src/virtualNetworkGatewaysResetSample.ts | 31 - ...rkGatewaysResetVpnClientSharedKeySample.ts | 32 - ...tewaysSetVpnclientIpsecParametersSample.ts | 47 - ...xpressRouteSiteFailoverSimulationSample.ts | 34 - ...NetworkGatewaysStartPacketCaptureSample.ts | 66 - ...xpressRouteSiteFailoverSimulationSample.ts | 53 - ...lNetworkGatewaysStopPacketCaptureSample.ts | 41 - ...etworkGatewaysSupportedVpnDevicesSample.ts | 31 - .../virtualNetworkGatewaysUpdateTagsSample.ts | 34 - ...ewaysVpnDeviceConfigurationScriptSample.ts | 42 - ...tualNetworkPeeringsCreateOrUpdateSample.ts | 267 - .../src/virtualNetworkPeeringsDeleteSample.ts | 33 - .../src/virtualNetworkPeeringsGetSample.ts | 99 - .../src/virtualNetworkPeeringsListSample.ts | 57 - .../virtualNetworkTapsCreateOrUpdateSample.ts | 39 - .../src/virtualNetworkTapsDeleteSample.ts | 31 - .../src/virtualNetworkTapsGetSample.ts | 31 - .../src/virtualNetworkTapsListAllSample.ts | 29 - ...ualNetworkTapsListByResourceGroupSample.ts | 32 - .../src/virtualNetworkTapsUpdateTagsSample.ts | 36 - ...etworksCheckIPAddressAvailabilitySample.ts | 33 - .../virtualNetworksCreateOrUpdateSample.ts | 295 - .../src/virtualNetworksDeleteSample.ts | 31 - .../src/virtualNetworksGetSample.ts | 71 - .../src/virtualNetworksListAllSample.ts | 29 - ...lNetworksListDdosProtectionStatusSample.ts | 43 - .../src/virtualNetworksListSample.ts | 30 - .../src/virtualNetworksListUsageSample.ts | 34 - .../src/virtualNetworksUpdateTagsSample.ts | 34 - ...rtualRouterPeeringsCreateOrUpdateSample.ts | 42 - .../src/virtualRouterPeeringsDeleteSample.ts | 33 - .../src/virtualRouterPeeringsGetSample.ts | 33 - .../src/virtualRouterPeeringsListSample.ts | 34 - .../src/virtualRoutersCreateOrUpdateSample.ts | 40 - .../src/virtualRoutersDeleteSample.ts | 31 - .../typescript/src/virtualRoutersGetSample.ts | 31 - ...virtualRoutersListByResourceGroupSample.ts | 32 - .../src/virtualRoutersListSample.ts | 29 - .../src/virtualWansCreateOrUpdateSample.ts | 39 - .../typescript/src/virtualWansDeleteSample.ts | 31 - .../typescript/src/virtualWansGetSample.ts | 31 - .../virtualWansListByResourceGroupSample.ts | 32 - .../typescript/src/virtualWansListSample.ts | 29 - .../src/virtualWansUpdateTagsSample.ts | 36 - .../src/vpnConnectionsCreateOrUpdateSample.ts | 79 - .../src/vpnConnectionsDeleteSample.ts | 33 - .../typescript/src/vpnConnectionsGetSample.ts | 33 - .../vpnConnectionsListByVpnGatewaySample.ts | 34 - .../vpnConnectionsStartPacketCaptureSample.ts | 76 - .../vpnConnectionsStopPacketCaptureSample.ts | 45 - .../src/vpnGatewaysCreateOrUpdateSample.ts | 90 - .../typescript/src/vpnGatewaysDeleteSample.ts | 31 - .../typescript/src/vpnGatewaysGetSample.ts | 28 - .../vpnGatewaysListByResourceGroupSample.ts | 32 - .../typescript/src/vpnGatewaysListSample.ts | 29 - .../typescript/src/vpnGatewaysResetSample.ts | 31 - .../vpnGatewaysStartPacketCaptureSample.ts | 62 - .../src/vpnGatewaysStopPacketCaptureSample.ts | 42 - .../src/vpnGatewaysUpdateTagsSample.ts | 36 - ...pnLinkConnectionsGetAllSharedKeysSample.ts | 38 - ...inkConnectionsGetDefaultSharedKeySample.ts | 35 - .../src/vpnLinkConnectionsGetIkeSasSample.ts | 35 - ...inkConnectionsListByVpnConnectionSample.ts | 36 - ...nkConnectionsListDefaultSharedKeySample.ts | 35 - ...vpnLinkConnectionsResetConnectionSample.ts | 35 - ...nectionsSetOrInitDefaultSharedKeySample.ts | 44 - ...tionsAssociatedWithVirtualWanListSample.ts | 32 - ...erverConfigurationsCreateOrUpdateSample.ts | 115 - .../vpnServerConfigurationsDeleteSample.ts | 31 - .../src/vpnServerConfigurationsGetSample.ts | 31 - ...ConfigurationsListByResourceGroupSample.ts | 32 - ...erConfigurationsListRadiusSecretsSample.ts | 33 - .../src/vpnServerConfigurationsListSample.ts | 29 - ...vpnServerConfigurationsUpdateTagsSample.ts | 36 - .../src/vpnSiteLinkConnectionsGetSample.ts | 35 - .../typescript/src/vpnSiteLinksGetSample.ts | 33 - .../src/vpnSiteLinksListByVpnSiteSample.ts | 34 - .../vpnSitesConfigurationDownloadSample.ts | 43 - .../src/vpnSitesCreateOrUpdateSample.ts | 54 - .../typescript/src/vpnSitesDeleteSample.ts | 31 - .../v35/typescript/src/vpnSitesGetSample.ts | 28 - .../src/vpnSitesListByResourceGroupSample.ts | 32 - .../v35/typescript/src/vpnSitesListSample.ts | 29 - .../src/vpnSitesUpdateTagsSample.ts | 36 - ...ionFirewallPoliciesCreateOrUpdateSample.ts | 268 - ...ApplicationFirewallPoliciesDeleteSample.ts | 31 - ...webApplicationFirewallPoliciesGetSample.ts | 31 - ...pplicationFirewallPoliciesListAllSample.ts | 29 - ...ebApplicationFirewallPoliciesListSample.ts | 32 - .../typescript/src/webCategoriesGetSample.ts | 29 - .../webCategoriesListBySubscriptionSample.ts | 31 - .../samples/v35/typescript/tsconfig.json | 20 - .../samples/v36/javascript/README.md | 1542 - ...dminRuleCollectionsCreateOrUpdateSample.js | 46 - .../adminRuleCollectionsDeleteSample.js | 39 - .../adminRuleCollectionsGetSample.js | 36 - .../adminRuleCollectionsListSample.js | 37 - .../adminRulesCreateOrUpdateSample.js | 97 - .../v36/javascript/adminRulesDeleteSample.js | 41 - .../v36/javascript/adminRulesGetSample.js | 65 - .../v36/javascript/adminRulesListSample.js | 39 - ...yPrivateEndpointConnectionsDeleteSample.js | 33 - ...ewayPrivateEndpointConnectionsGetSample.js | 33 - ...wayPrivateEndpointConnectionsListSample.js | 34 - ...yPrivateEndpointConnectionsUpdateSample.js | 44 - ...onGatewayPrivateLinkResourcesListSample.js | 34 - ...ewayWafDynamicManifestsDefaultGetSample.js | 27 - ...tionGatewayWafDynamicManifestsGetSample.js | 30 - ...tionGatewaysBackendHealthOnDemandSample.js | 44 - .../applicationGatewaysBackendHealthSample.js | 31 - ...applicationGatewaysCreateOrUpdateSample.js | 205 - .../applicationGatewaysDeleteSample.js | 31 - .../applicationGatewaysGetSample.js | 28 - ...ionGatewaysGetSslPredefinedPolicySample.js | 27 - .../applicationGatewaysListAllSample.js | 29 - ...tewaysListAvailableRequestHeadersSample.js | 27 - ...ewaysListAvailableResponseHeadersSample.js | 27 - ...ewaysListAvailableServerVariablesSample.js | 27 - ...onGatewaysListAvailableSslOptionsSample.js | 26 - ...istAvailableSslPredefinedPoliciesSample.js | 29 - ...nGatewaysListAvailableWafRuleSetsSample.js | 26 - .../applicationGatewaysListSample.js | 30 - .../applicationGatewaysStartSample.js | 31 - .../applicationGatewaysStopSample.js | 31 - .../applicationGatewaysUpdateTagsSample.js | 33 - ...ationSecurityGroupsCreateOrUpdateSample.js | 33 - .../applicationSecurityGroupsDeleteSample.js | 31 - .../applicationSecurityGroupsGetSample.js | 31 - .../applicationSecurityGroupsListAllSample.js | 29 - .../applicationSecurityGroupsListSample.js | 30 - ...plicationSecurityGroupsUpdateTagsSample.js | 33 - .../availableDelegationsListSample.js | 30 - .../availableEndpointServicesListSample.js | 30 - ...eEndpointTypesListByResourceGroupSample.js | 34 - ...availablePrivateEndpointTypesListSample.js | 30 - ...lableResourceGroupDelegationsListSample.js | 34 - ...ServiceAliasesListByResourceGroupSample.js | 34 - .../availableServiceAliasesListSample.js | 30 - .../azureFirewallFqdnTagsListAllSample.js | 29 - .../azureFirewallsCreateOrUpdateSample.js | 617 - .../javascript/azureFirewallsDeleteSample.js | 31 - .../v36/javascript/azureFirewallsGetSample.js | 96 - .../javascript/azureFirewallsListAllSample.js | 29 - ...azureFirewallsListLearnedPrefixesSample.js | 31 - .../javascript/azureFirewallsListSample.js | 30 - ...reFirewallsPacketCaptureOperationSample.js | 53 - .../azureFirewallsPacketCaptureSample.js | 52 - .../azureFirewallsUpdateTagsSample.js | 33 - .../bastionHostsCreateOrUpdateSample.js | 139 - .../javascript/bastionHostsDeleteSample.js | 45 - .../v36/javascript/bastionHostsGetSample.js | 79 - .../bastionHostsListByResourceGroupSample.js | 30 - .../v36/javascript/bastionHostsListSample.js | 29 - .../bastionHostsUpdateTagsSample.js | 33 - .../bgpServiceCommunitiesListSample.js | 29 - .../checkDnsNameAvailabilitySample.js | 28 - ...urationPolicyGroupsCreateOrUpdateSample.js | 50 - .../configurationPolicyGroupsDeleteSample.js | 33 - .../configurationPolicyGroupsGetSample.js | 33 - ...roupsListByVpnServerConfigurationSample.js | 34 - .../connectionMonitorsCreateOrUpdateSample.js | 182 - .../connectionMonitorsDeleteSample.js | 33 - .../javascript/connectionMonitorsGetSample.js | 33 - .../connectionMonitorsListSample.js | 31 - .../connectionMonitorsStopSample.js | 33 - .../connectionMonitorsUpdateTagsSample.js | 35 - ...ivityConfigurationsCreateOrUpdateSample.js | 62 - .../connectivityConfigurationsDeleteSample.js | 37 - .../connectivityConfigurationsGetSample.js | 34 - .../connectivityConfigurationsListSample.js | 35 - .../customIPPrefixesCreateOrUpdateSample.js | 33 - .../customIPPrefixesDeleteSample.js | 31 - .../javascript/customIPPrefixesGetSample.js | 28 - .../customIPPrefixesListAllSample.js | 29 - .../javascript/customIPPrefixesListSample.js | 30 - .../customIPPrefixesUpdateTagsSample.js | 33 - .../ddosCustomPoliciesCreateOrUpdateSample.js | 42 - .../ddosCustomPoliciesDeleteSample.js | 31 - .../javascript/ddosCustomPoliciesGetSample.js | 28 - .../ddosCustomPoliciesUpdateTagsSample.js | 33 - ...ddosProtectionPlansCreateOrUpdateSample.js | 33 - .../ddosProtectionPlansDeleteSample.js | 31 - .../ddosProtectionPlansGetSample.js | 28 - ...rotectionPlansListByResourceGroupSample.js | 30 - .../ddosProtectionPlansListSample.js | 29 - .../ddosProtectionPlansUpdateTagsSample.js | 33 - .../defaultSecurityRulesGetSample.js | 33 - .../defaultSecurityRulesListSample.js | 34 - ...deleteBastionShareableLinkByTokenSample.js | 35 - .../deleteBastionShareableLinkSample.js | 46 - .../disconnectActiveSessionsSample.js | 36 - .../dscpConfigurationCreateOrUpdateSample.js | 56 - .../dscpConfigurationDeleteSample.js | 31 - .../javascript/dscpConfigurationGetSample.js | 31 - .../dscpConfigurationListAllSample.js | 29 - .../javascript/dscpConfigurationListSample.js | 30 - ...rcuitAuthorizationsCreateOrUpdateSample.js | 35 - ...sRouteCircuitAuthorizationsDeleteSample.js | 33 - ...ressRouteCircuitAuthorizationsGetSample.js | 33 - ...essRouteCircuitAuthorizationsListSample.js | 34 - ...eCircuitConnectionsCreateOrUpdateSample.js | 47 - ...ressRouteCircuitConnectionsDeleteSample.js | 35 - ...expressRouteCircuitConnectionsGetSample.js | 35 - ...xpressRouteCircuitConnectionsListSample.js | 36 - ...outeCircuitPeeringsCreateOrUpdateSample.js | 40 - ...expressRouteCircuitPeeringsDeleteSample.js | 33 - .../expressRouteCircuitPeeringsGetSample.js | 33 - .../expressRouteCircuitPeeringsListSample.js | 34 - ...xpressRouteCircuitsCreateOrUpdateSample.js | 83 - .../expressRouteCircuitsDeleteSample.js | 31 - ...pressRouteCircuitsGetPeeringStatsSample.js | 33 - .../expressRouteCircuitsGetSample.js | 28 - .../expressRouteCircuitsGetStatsSample.js | 28 - .../expressRouteCircuitsListAllSample.js | 29 - .../expressRouteCircuitsListArpTableSample.js | 35 - ...pressRouteCircuitsListRoutesTableSample.js | 35 - ...uteCircuitsListRoutesTableSummarySample.js | 35 - .../expressRouteCircuitsListSample.js | 30 - .../expressRouteCircuitsUpdateTagsSample.js | 33 - ...essRouteConnectionsCreateOrUpdateSample.js | 68 - .../expressRouteConnectionsDeleteSample.js | 33 - .../expressRouteConnectionsGetSample.js | 33 - .../expressRouteConnectionsListSample.js | 31 - ...sConnectionPeeringsCreateOrUpdateSample.js | 45 - ...outeCrossConnectionPeeringsDeleteSample.js | 34 - ...ssRouteCrossConnectionPeeringsGetSample.js | 34 - ...sRouteCrossConnectionPeeringsListSample.js | 35 - ...uteCrossConnectionsCreateOrUpdateSample.js | 36 - .../expressRouteCrossConnectionsGetSample.js | 32 - ...RouteCrossConnectionsListArpTableSample.js | 36 - ...ossConnectionsListByResourceGroupSample.js | 33 - ...teCrossConnectionsListRoutesTableSample.js | 36 - ...ConnectionsListRoutesTableSummarySample.js | 36 - .../expressRouteCrossConnectionsListSample.js | 29 - ...ssRouteCrossConnectionsUpdateTagsSample.js | 36 - ...xpressRouteGatewaysCreateOrUpdateSample.js | 40 - .../expressRouteGatewaysDeleteSample.js | 31 - .../expressRouteGatewaysGetSample.js | 28 - ...sRouteGatewaysListByResourceGroupSample.js | 27 - ...ssRouteGatewaysListBySubscriptionSample.js | 26 - .../expressRouteGatewaysUpdateTagsSample.js | 35 - .../javascript/expressRouteLinksGetSample.js | 33 - .../javascript/expressRouteLinksListSample.js | 31 - ...ePortAuthorizationsCreateOrUpdateSample.js | 35 - ...ressRoutePortAuthorizationsDeleteSample.js | 33 - ...expressRoutePortAuthorizationsGetSample.js | 33 - ...xpressRoutePortAuthorizationsListSample.js | 34 - .../expressRoutePortsCreateOrUpdateSample.js | 68 - .../expressRoutePortsDeleteSample.js | 31 - .../expressRoutePortsGenerateLoaSample.js | 35 - .../javascript/expressRoutePortsGetSample.js | 28 - ...ressRoutePortsListByResourceGroupSample.js | 30 - .../javascript/expressRoutePortsListSample.js | 29 - .../expressRoutePortsLocationsGetSample.js | 27 - .../expressRoutePortsLocationsListSample.js | 29 - .../expressRoutePortsUpdateTagsSample.js | 33 - .../expressRouteProviderPortSample.js | 27 - ...essRouteProviderPortsLocationListSample.js | 26 - .../expressRouteServiceProvidersListSample.js | 29 - .../firewallPoliciesCreateOrUpdateSample.js | 104 - .../firewallPoliciesDeleteSample.js | 31 - .../javascript/firewallPoliciesGetSample.js | 28 - .../firewallPoliciesListAllSample.js | 29 - .../javascript/firewallPoliciesListSample.js | 30 - .../firewallPoliciesUpdateTagsSample.js | 33 - .../firewallPolicyDeploymentsDeploySample.js | 31 - ...irewallPolicyDraftsCreateOrUpdateSample.js | 95 - .../firewallPolicyDraftsDeleteSample.js | 28 - .../firewallPolicyDraftsGetSample.js | 28 - ...icyIdpsSignaturesFilterValuesListSample.js | 36 - .../firewallPolicyIdpsSignaturesListSample.js | 40 - ...lPolicyIdpsSignaturesOverridesGetSample.js | 32 - ...PolicyIdpsSignaturesOverridesListSample.js | 32 - ...olicyIdpsSignaturesOverridesPatchSample.js | 39 - ...lPolicyIdpsSignaturesOverridesPutSample.js | 39 - ...llectionGroupDraftsCreateOrUpdateSample.js | 55 - ...cyRuleCollectionGroupDraftsDeleteSample.js | 33 - ...olicyRuleCollectionGroupDraftsGetSample.js | 33 - ...uleCollectionGroupsCreateOrUpdateSample.js | 243 - ...lPolicyRuleCollectionGroupsDeleteSample.js | 33 - ...wallPolicyRuleCollectionGroupsGetSample.js | 100 - ...allPolicyRuleCollectionGroupsListSample.js | 81 - .../flowLogsCreateOrUpdateSample.js | 52 - .../v36/javascript/flowLogsDeleteSample.js | 33 - .../v36/javascript/flowLogsGetSample.js | 29 - .../v36/javascript/flowLogsListSample.js | 31 - .../javascript/flowLogsUpdateTagsSample.js | 35 - ...nvpnserverconfigurationvpnprofileSample.js | 37 - .../v36/javascript/getActiveSessionsSample.js | 34 - .../getBastionShareableLinkSample.js | 49 - .../hubRouteTablesCreateOrUpdateSample.js | 47 - .../javascript/hubRouteTablesDeleteSample.js | 33 - .../v36/javascript/hubRouteTablesGetSample.js | 29 - .../javascript/hubRouteTablesListSample.js | 31 - ...lNetworkConnectionsCreateOrUpdateSample.js | 74 - ...ubVirtualNetworkConnectionsDeleteSample.js | 33 - .../hubVirtualNetworkConnectionsGetSample.js | 33 - .../hubVirtualNetworkConnectionsListSample.js | 34 - .../inboundNatRulesCreateOrUpdateSample.js | 45 - .../javascript/inboundNatRulesDeleteSample.js | 33 - .../javascript/inboundNatRulesGetSample.js | 33 - .../javascript/inboundNatRulesListSample.js | 31 - ...inboundSecurityRuleCreateOrUpdateSample.js | 47 - .../inboundSecurityRuleGetSample.js | 33 - .../ipAllocationsCreateOrUpdateSample.js | 41 - .../javascript/ipAllocationsDeleteSample.js | 28 - .../v36/javascript/ipAllocationsGetSample.js | 28 - .../ipAllocationsListByResourceGroupSample.js | 30 - .../v36/javascript/ipAllocationsListSample.js | 29 - .../ipAllocationsUpdateTagsSample.js | 33 - .../ipGroupsCreateOrUpdateSample.js | 37 - .../v36/javascript/ipGroupsDeleteSample.js | 28 - .../v36/javascript/ipGroupsGetSample.js | 28 - .../ipGroupsListByResourceGroupSample.js | 30 - .../v36/javascript/ipGroupsListSample.js | 29 - .../javascript/ipGroupsUpdateGroupsSample.js | 29 - .../v36/javascript/ipamPoolsCreateSample.js | 43 - .../v36/javascript/ipamPoolsDeleteSample.js | 34 - .../javascript/ipamPoolsGetPoolUsageSample.js | 34 - .../v36/javascript/ipamPoolsGetSample.js | 30 - .../ipamPoolsListAssociatedResourcesSample.js | 37 - .../v36/javascript/ipamPoolsListSample.js | 32 - .../v36/javascript/ipamPoolsUpdateSample.js | 30 - ...tActiveConnectivityConfigurationsSample.js | 37 - .../listActiveSecurityAdminRulesSample.js | 37 - ...fectiveConnectivityConfigurationsSample.js | 34 - ...anagerEffectiveSecurityAdminRulesSample.js | 34 - ...BackendAddressPoolsCreateOrUpdateSample.js | 52 - ...BalancerBackendAddressPoolsDeleteSample.js | 33 - ...oadBalancerBackendAddressPoolsGetSample.js | 55 - ...adBalancerBackendAddressPoolsListSample.js | 57 - ...lancerFrontendIPConfigurationsGetSample.js | 33 - ...ancerFrontendIPConfigurationsListSample.js | 34 - ...loadBalancerLoadBalancingRulesGetSample.js | 33 - ...dBalancerLoadBalancingRulesHealthSample.js | 33 - ...oadBalancerLoadBalancingRulesListSample.js | 34 - ...loadBalancerNetworkInterfacesListSample.js | 57 - .../loadBalancerOutboundRulesGetSample.js | 33 - .../loadBalancerOutboundRulesListSample.js | 34 - .../javascript/loadBalancerProbesGetSample.js | 33 - .../loadBalancerProbesListSample.js | 31 - .../loadBalancersCreateOrUpdateSample.js | 802 - .../javascript/loadBalancersDeleteSample.js | 28 - .../v36/javascript/loadBalancersGetSample.js | 45 - .../javascript/loadBalancersListAllSample.js | 29 - ...ersListInboundNatRulePortMappingsSample.js | 37 - .../v36/javascript/loadBalancersListSample.js | 30 - .../loadBalancersMigrateToIPBasedSample.js | 32 - ...oadBalancersSwapPublicIPAddressesSample.js | 43 - .../loadBalancersUpdateTagsSample.js | 33 - ...ocalNetworkGatewaysCreateOrUpdateSample.js | 38 - .../localNetworkGatewaysDeleteSample.js | 31 - .../localNetworkGatewaysGetSample.js | 28 - .../localNetworkGatewaysListSample.js | 30 - .../localNetworkGatewaysUpdateTagsSample.js | 33 - ...kManagerConnectionsCreateOrUpdateSample.js | 35 - ...upNetworkManagerConnectionsDeleteSample.js | 30 - ...GroupNetworkManagerConnectionsGetSample.js | 30 - ...roupNetworkManagerConnectionsListSample.js | 31 - .../natGatewaysCreateOrUpdateSample.js | 119 - .../v36/javascript/natGatewaysDeleteSample.js | 28 - .../v36/javascript/natGatewaysGetSample.js | 62 - .../javascript/natGatewaysListAllSample.js | 29 - .../v36/javascript/natGatewaysListSample.js | 30 - .../javascript/natGatewaysUpdateTagsSample.js | 47 - .../natRulesCreateOrUpdateSample.js | 42 - .../v36/javascript/natRulesDeleteSample.js | 33 - .../v36/javascript/natRulesGetSample.js | 29 - .../natRulesListByVpnGatewaySample.js | 31 - .../networkGroupsCreateOrUpdateSample.js | 39 - .../javascript/networkGroupsDeleteSample.js | 37 - .../v36/javascript/networkGroupsGetSample.js | 34 - .../v36/javascript/networkGroupsListSample.js | 32 - ...tworkInterfaceIPConfigurationsGetSample.js | 33 - ...workInterfaceIPConfigurationsListSample.js | 34 - ...networkInterfaceLoadBalancersListSample.js | 34 - ...ceTapConfigurationsCreateOrUpdateSample.js | 39 - ...kInterfaceTapConfigurationsDeleteSample.js | 33 - ...workInterfaceTapConfigurationsGetSample.js | 33 - ...orkInterfaceTapConfigurationsListSample.js | 34 - .../networkInterfacesCreateOrUpdateSample.js | 88 - .../networkInterfacesDeleteSample.js | 31 - ...esGetCloudServiceNetworkInterfaceSample.js | 35 - ...kInterfacesGetEffectiveRouteTableSample.js | 31 - .../javascript/networkInterfacesGetSample.js | 28 - ...ualMachineScaleSetIPConfigurationSample.js | 37 - ...alMachineScaleSetNetworkInterfaceSample.js | 35 - .../networkInterfacesListAllSample.js | 29 - ...ListCloudServiceNetworkInterfacesSample.js | 34 - ...viceRoleInstanceNetworkInterfacesSample.js | 36 - ...istEffectiveNetworkSecurityGroupsSample.js | 31 - .../javascript/networkInterfacesListSample.js | 30 - ...alMachineScaleSetIPConfigurationsSample.js | 38 - ...lMachineScaleSetNetworkInterfacesSample.js | 34 - ...achineScaleSetVMNetworkInterfacesSample.js | 36 - .../networkInterfacesUpdateTagsSample.js | 33 - .../networkManagerCommitsPostSample.js | 40 - ...etworkManagerDeploymentStatusListSample.js | 38 - ...utingConfigurationsCreateOrUpdateSample.js | 39 - ...anagerRoutingConfigurationsDeleteSample.js | 34 - ...rkManagerRoutingConfigurationsGetSample.js | 34 - ...kManagerRoutingConfigurationsListSample.js | 35 - .../networkManagersCreateOrUpdateSample.js | 41 - .../javascript/networkManagersDeleteSample.js | 35 - .../javascript/networkManagersGetSample.js | 29 - ...networkManagersListBySubscriptionSample.js | 30 - .../javascript/networkManagersListSample.js | 31 - .../javascript/networkManagersPatchSample.js | 34 - .../networkProfilesCreateOrUpdateSample.js | 48 - .../javascript/networkProfilesDeleteSample.js | 31 - .../javascript/networkProfilesGetSample.js | 45 - .../networkProfilesListAllSample.js | 29 - .../javascript/networkProfilesListSample.js | 30 - .../networkProfilesUpdateTagsSample.js | 33 - ...tworkSecurityGroupsCreateOrUpdateSample.js | 70 - .../networkSecurityGroupsDeleteSample.js | 31 - .../networkSecurityGroupsGetSample.js | 31 - .../networkSecurityGroupsListAllSample.js | 29 - .../networkSecurityGroupsListSample.js | 30 - .../networkSecurityGroupsUpdateTagsSample.js | 33 - ...erimeterAccessRulesCreateOrUpdateSample.js | 40 - ...ecurityPerimeterAccessRulesDeleteSample.js | 35 - ...rkSecurityPerimeterAccessRulesGetSample.js | 35 - ...kSecurityPerimeterAccessRulesListSample.js | 36 - ...rityPerimeterAccessRulesReconcileSample.js | 37 - ...imeterAssociableResourceTypesListSample.js | 30 - ...rimeterAssociationsCreateOrUpdateSample.js | 43 - ...curityPerimeterAssociationsDeleteSample.js | 33 - ...kSecurityPerimeterAssociationsGetSample.js | 33 - ...SecurityPerimeterAssociationsListSample.js | 34 - ...ityPerimeterAssociationsReconcileSample.js | 35 - ...rityPerimeterLinkReferencesDeleteSample.js | 33 - ...ecurityPerimeterLinkReferencesGetSample.js | 33 - ...curityPerimeterLinkReferencesListSample.js | 34 - ...urityPerimeterLinksCreateOrUpdateSample.js | 40 - ...tworkSecurityPerimeterLinksDeleteSample.js | 33 - .../networkSecurityPerimeterLinksGetSample.js | 33 - ...networkSecurityPerimeterLinksListSample.js | 34 - ...ggingConfigurationsCreateOrUpdateSample.js | 40 - ...imeterLoggingConfigurationsDeleteSample.js | 33 - ...PerimeterLoggingConfigurationsGetSample.js | 33 - ...erimeterLoggingConfigurationsListSample.js | 34 - ...rityPerimeterOperationStatusesGetSample.js | 28 - ...tyPerimeterProfilesCreateOrUpdateSample.js | 35 - ...rkSecurityPerimeterProfilesDeleteSample.js | 33 - ...tworkSecurityPerimeterProfilesGetSample.js | 33 - ...workSecurityPerimeterProfilesListSample.js | 34 - ...kSecurityPerimeterServiceTagsListSample.js | 30 - ...kSecurityPerimetersCreateOrUpdateSample.js | 33 - .../networkSecurityPerimetersDeleteSample.js | 31 - .../networkSecurityPerimetersGetSample.js | 31 - ...urityPerimetersListBySubscriptionSample.js | 29 - .../networkSecurityPerimetersListSample.js | 30 - .../networkSecurityPerimetersPatchSample.js | 33 - ...pplianceConnectionsCreateOrUpdateSample.js | 60 - ...VirtualApplianceConnectionsDeleteSample.js | 33 - ...orkVirtualApplianceConnectionsGetSample.js | 33 - ...rkVirtualApplianceConnectionsListSample.js | 34 - ...rkVirtualAppliancesCreateOrUpdateSample.js | 468 - .../networkVirtualAppliancesDeleteSample.js | 31 - ...alAppliancesGetBootDiagnosticLogsSample.js | 39 - .../networkVirtualAppliancesGetSample.js | 31 - ...tualAppliancesListByResourceGroupSample.js | 30 - .../networkVirtualAppliancesListSample.js | 29 - .../networkVirtualAppliancesReimageSample.js | 31 - .../networkVirtualAppliancesRestartSample.js | 51 - ...etworkVirtualAppliancesUpdateTagsSample.js | 33 - .../networkWatchersCheckConnectivitySample.js | 40 - .../networkWatchersCreateOrUpdateSample.js | 33 - .../javascript/networkWatchersDeleteSample.js | 31 - ...atchersGetAzureReachabilityReportSample.js | 39 - .../networkWatchersGetFlowLogStatusSample.js | 36 - ...GetNetworkConfigurationDiagnosticSample.js | 45 - .../networkWatchersGetNextHopSample.js | 40 - .../javascript/networkWatchersGetSample.js | 28 - .../networkWatchersGetTopologySample.js | 33 - ...kWatchersGetTroubleshootingResultSample.js | 36 - ...networkWatchersGetTroubleshootingSample.js | 39 - ...networkWatchersGetVMSecurityRulesSample.js | 36 - .../networkWatchersListAllSample.js | 29 - ...orkWatchersListAvailableProvidersSample.js | 38 - .../javascript/networkWatchersListSample.js | 30 - ...rkWatchersSetFlowLogConfigurationSample.js | 46 - .../networkWatchersUpdateTagsSample.js | 33 - .../networkWatchersVerifyIPFlowSample.js | 42 - .../v36/javascript/operationsListSample.js | 30 - .../p2SVpnGatewaysCreateOrUpdateSample.js | 72 - .../javascript/p2SVpnGatewaysDeleteSample.js | 28 - ...tewaysDisconnectP2SvpnConnectionsSample.js | 35 - .../p2SVpnGatewaysGenerateVpnProfileSample.js | 35 - ...GetP2SvpnConnectionHealthDetailedSample.js | 37 - ...GatewaysGetP2SvpnConnectionHealthSample.js | 31 - .../v36/javascript/p2SVpnGatewaysGetSample.js | 28 - ...p2SVpnGatewaysListByResourceGroupSample.js | 30 - .../javascript/p2SVpnGatewaysListSample.js | 29 - .../javascript/p2SVpnGatewaysResetSample.js | 28 - .../p2SVpnGatewaysUpdateTagsSample.js | 35 - .../samples/v36/javascript/package.json | 36 - .../javascript/packetCapturesCreateSample.js | 48 - .../javascript/packetCapturesDeleteSample.js | 33 - .../v36/javascript/packetCapturesGetSample.js | 33 - .../packetCapturesGetStatusSample.js | 33 - .../javascript/packetCapturesListSample.js | 31 - .../javascript/packetCapturesStopSample.js | 33 - ...ExpressRouteCircuitConnectionsGetSample.js | 35 - ...xpressRouteCircuitConnectionsListSample.js | 36 - ...rivateDnsZoneGroupsCreateOrUpdateSample.js | 42 - .../privateDnsZoneGroupsDeleteSample.js | 33 - .../privateDnsZoneGroupsGetSample.js | 33 - .../privateDnsZoneGroupsListSample.js | 34 - .../privateEndpointsCreateOrUpdateSample.js | 140 - .../privateEndpointsDeleteSample.js | 31 - .../javascript/privateEndpointsGetSample.js | 62 - ...rivateEndpointsListBySubscriptionSample.js | 29 - .../javascript/privateEndpointsListSample.js | 30 - ...kServiceVisibilityByResourceGroupSample.js | 36 - ...CheckPrivateLinkServiceVisibilitySample.js | 33 - ...privateLinkServicesCreateOrUpdateSample.js | 56 - ...esDeletePrivateEndpointConnectionSample.js | 33 - .../privateLinkServicesDeleteSample.js | 31 - ...vicesGetPrivateEndpointConnectionSample.js | 33 - .../privateLinkServicesGetSample.js | 28 - ...rivateLinkServicesByResourceGroupSample.js | 34 - ...stAutoApprovedPrivateLinkServicesSample.js | 32 - ...ateLinkServicesListBySubscriptionSample.js | 29 - ...cesListPrivateEndpointConnectionsSample.js | 34 - .../privateLinkServicesListSample.js | 30 - ...esUpdatePrivateEndpointConnectionSample.js | 44 - .../publicIPAddressesCreateOrUpdateSample.js | 136 - ...icIPAddressesDdosProtectionStatusSample.js | 31 - .../publicIPAddressesDeleteSample.js | 31 - ...ciateCloudServiceReservedPublicIPSample.js | 37 - ...sesGetCloudServicePublicIpaddressSample.js | 39 - .../javascript/publicIPAddressesGetSample.js | 45 - ...ualMachineScaleSetPublicIpaddressSample.js | 39 - .../publicIPAddressesListAllSample.js | 29 - ...ListCloudServicePublicIpaddressesSample.js | 34 - ...viceRoleInstancePublicIpaddressesSample.js | 40 - .../javascript/publicIPAddressesListSample.js | 30 - ...lMachineScaleSetPublicIpaddressesSample.js | 34 - ...achineScaleSetVmpublicIpaddressesSample.js | 40 - ...eserveCloudServicePublicIPAddressSample.js | 35 - .../publicIPAddressesUpdateTagsSample.js | 33 - .../publicIPPrefixesCreateOrUpdateSample.js | 90 - .../publicIPPrefixesDeleteSample.js | 31 - .../javascript/publicIPPrefixesGetSample.js | 45 - .../publicIPPrefixesListAllSample.js | 29 - .../javascript/publicIPPrefixesListSample.js | 30 - .../publicIPPrefixesUpdateTagsSample.js | 33 - .../putBastionShareableLinkSample.js | 49 - ...reachabilityAnalysisIntentsCreateSample.js | 53 - ...reachabilityAnalysisIntentsDeleteSample.js | 36 - .../reachabilityAnalysisIntentsGetSample.js | 36 - .../reachabilityAnalysisIntentsListSample.js | 37 - .../reachabilityAnalysisRunsCreateSample.js | 44 - .../reachabilityAnalysisRunsDeleteSample.js | 36 - .../reachabilityAnalysisRunsGetSample.js | 36 - .../reachabilityAnalysisRunsListSample.js | 37 - .../resourceNavigationLinksListSample.js | 33 - .../routeFilterRulesCreateOrUpdateSample.js | 39 - .../routeFilterRulesDeleteSample.js | 33 - .../javascript/routeFilterRulesGetSample.js | 29 - ...routeFilterRulesListByRouteFilterSample.js | 34 - .../routeFiltersCreateOrUpdateSample.js | 44 - .../javascript/routeFiltersDeleteSample.js | 28 - .../v36/javascript/routeFiltersGetSample.js | 28 - .../routeFiltersListByResourceGroupSample.js | 30 - .../v36/javascript/routeFiltersListSample.js | 29 - .../routeFiltersUpdateTagsSample.js | 33 - .../routeMapsCreateOrUpdateSample.js | 60 - .../v36/javascript/routeMapsDeleteSample.js | 33 - .../v36/javascript/routeMapsGetSample.js | 29 - .../v36/javascript/routeMapsListSample.js | 31 - .../routeTablesCreateOrUpdateSample.js | 65 - .../v36/javascript/routeTablesDeleteSample.js | 28 - .../v36/javascript/routeTablesGetSample.js | 28 - .../javascript/routeTablesListAllSample.js | 29 - .../v36/javascript/routeTablesListSample.js | 30 - .../javascript/routeTablesUpdateTagsSample.js | 29 - .../javascript/routesCreateOrUpdateSample.js | 38 - .../v36/javascript/routesDeleteSample.js | 33 - .../samples/v36/javascript/routesGetSample.js | 29 - .../v36/javascript/routesListSample.js | 31 - .../routingIntentCreateOrUpdateSample.js | 50 - .../javascript/routingIntentDeleteSample.js | 33 - .../v36/javascript/routingIntentGetSample.js | 33 - .../v36/javascript/routingIntentListSample.js | 31 - ...tingRuleCollectionsCreateOrUpdateSample.js | 46 - .../routingRuleCollectionsDeleteSample.js | 36 - .../routingRuleCollectionsGetSample.js | 36 - .../routingRuleCollectionsListSample.js | 37 - .../routingRulesCreateOrUpdateSample.js | 77 - .../javascript/routingRulesDeleteSample.js | 41 - .../v36/javascript/routingRulesGetSample.js | 38 - .../v36/javascript/routingRulesListSample.js | 39 - .../samples/v36/javascript/sample.env | 1 - .../scopeConnectionsCreateOrUpdateSample.js | 40 - .../scopeConnectionsDeleteSample.js | 34 - .../javascript/scopeConnectionsGetSample.js | 34 - .../javascript/scopeConnectionsListSample.js | 32 - ...AdminConfigurationsCreateOrUpdateSample.js | 68 - ...securityAdminConfigurationsDeleteSample.js | 37 - .../securityAdminConfigurationsGetSample.js | 34 - .../securityAdminConfigurationsListSample.js | 35 - ...ityPartnerProvidersCreateOrUpdateSample.js | 40 - .../securityPartnerProvidersDeleteSample.js | 31 - .../securityPartnerProvidersGetSample.js | 31 - ...rtnerProvidersListByResourceGroupSample.js | 30 - .../securityPartnerProvidersListSample.js | 29 - ...ecurityPartnerProvidersUpdateTagsSample.js | 33 - .../securityRulesCreateOrUpdateSample.js | 44 - .../javascript/securityRulesDeleteSample.js | 33 - .../v36/javascript/securityRulesGetSample.js | 33 - .../v36/javascript/securityRulesListSample.js | 31 - ...yUserConfigurationsCreateOrUpdateSample.js | 38 - .../securityUserConfigurationsDeleteSample.js | 37 - .../securityUserConfigurationsGetSample.js | 34 - .../securityUserConfigurationsListSample.js | 35 - ...UserRuleCollectionsCreateOrUpdateSample.js | 46 - ...securityUserRuleCollectionsDeleteSample.js | 39 - .../securityUserRuleCollectionsGetSample.js | 36 - .../securityUserRuleCollectionsListSample.js | 37 - .../securityUserRulesCreateOrUpdateSample.js | 48 - .../securityUserRulesDeleteSample.js | 41 - .../javascript/securityUserRulesGetSample.js | 38 - .../javascript/securityUserRulesListSample.js | 39 - .../serviceAssociationLinksListSample.js | 33 - ...iceEndpointPoliciesCreateOrUpdateSample.js | 69 - .../serviceEndpointPoliciesDeleteSample.js | 31 - .../serviceEndpointPoliciesGetSample.js | 31 - ...dpointPoliciesListByResourceGroupSample.js | 30 - .../serviceEndpointPoliciesListSample.js | 29 - ...serviceEndpointPoliciesUpdateTagsSample.js | 33 - ...ntPolicyDefinitionsCreateOrUpdateSample.js | 43 - ...ceEndpointPolicyDefinitionsDeleteSample.js | 33 - ...rviceEndpointPolicyDefinitionsGetSample.js | 33 - ...icyDefinitionsListByResourceGroupSample.js | 34 - .../serviceGatewaysCreateOrUpdateSample.js | 46 - .../javascript/serviceGatewaysDeleteSample.js | 32 - ...erviceGatewaysGetAddressLocationsSample.js | 35 - .../javascript/serviceGatewaysGetSample.js | 29 - .../serviceGatewaysGetServicesSample.js | 35 - .../serviceGatewaysListAllSample.js | 30 - .../javascript/serviceGatewaysListSample.js | 31 - ...iceGatewaysUpdateAddressLocationsSample.js | 186 - .../serviceGatewaysUpdateServicesSample.js | 74 - .../serviceGatewaysUpdateTagsSample.js | 34 - .../serviceTagInformationListSample.js | 74 - .../v36/javascript/serviceTagsListSample.js | 27 - .../v36/javascript/staticCidrsCreateSample.js | 36 - .../v36/javascript/staticCidrsDeleteSample.js | 36 - .../v36/javascript/staticCidrsGetSample.js | 36 - .../v36/javascript/staticCidrsListSample.js | 37 - .../staticMembersCreateOrUpdateSample.js | 41 - .../javascript/staticMembersDeleteSample.js | 36 - .../v36/javascript/staticMembersGetSample.js | 36 - .../v36/javascript/staticMembersListSample.js | 37 - .../javascript/subnetsCreateOrUpdateSample.js | 173 - .../v36/javascript/subnetsDeleteSample.js | 33 - .../v36/javascript/subnetsGetSample.js | 65 - .../v36/javascript/subnetsListSample.js | 31 - .../subnetsPrepareNetworkPoliciesSample.js | 35 - .../subnetsUnprepareNetworkPoliciesSample.js | 37 - ...kManagerConnectionsCreateOrUpdateSample.js | 35 - ...onNetworkManagerConnectionsDeleteSample.js | 30 - ...ptionNetworkManagerConnectionsGetSample.js | 30 - ...tionNetworkManagerConnectionsListSample.js | 30 - .../supportedSecurityProvidersSample.js | 28 - .../v36/javascript/usagesListSample.js | 49 - .../verifierWorkspacesCreateSample.js | 39 - .../verifierWorkspacesDeleteSample.js | 34 - .../javascript/verifierWorkspacesGetSample.js | 34 - .../verifierWorkspacesListSample.js | 32 - .../verifierWorkspacesUpdateSample.js | 34 - .../v36/javascript/vipSwapCreateSample.js | 29 - .../v36/javascript/vipSwapGetSample.js | 28 - .../v36/javascript/vipSwapListSample.js | 28 - ...rtualApplianceSitesCreateOrUpdateSample.js | 40 - .../virtualApplianceSitesDeleteSample.js | 33 - .../virtualApplianceSitesGetSample.js | 33 - .../virtualApplianceSitesListSample.js | 34 - .../virtualApplianceSkusGetSample.js | 27 - .../virtualApplianceSkusListSample.js | 29 - ...ualHubBgpConnectionCreateOrUpdateSample.js | 41 - .../virtualHubBgpConnectionDeleteSample.js | 33 - .../virtualHubBgpConnectionGetSample.js | 33 - ...gpConnectionsListAdvertisedRoutesSample.js | 33 - ...ubBgpConnectionsListLearnedRoutesSample.js | 33 - .../virtualHubBgpConnectionsListSample.js | 34 - ...lHubIPConfigurationCreateOrUpdateSample.js | 39 - .../virtualHubIPConfigurationDeleteSample.js | 33 - .../virtualHubIPConfigurationGetSample.js | 33 - .../virtualHubIPConfigurationListSample.js | 34 - ...ualHubRouteTableV2SCreateOrUpdateSample.js | 51 - .../virtualHubRouteTableV2SDeleteSample.js | 33 - .../virtualHubRouteTableV2SGetSample.js | 33 - .../virtualHubRouteTableV2SListSample.js | 31 - .../virtualHubsCreateOrUpdateSample.js | 41 - .../v36/javascript/virtualHubsDeleteSample.js | 28 - ...lHubsGetEffectiveVirtualHubRoutesSample.js | 94 - .../virtualHubsGetInboundRoutesSample.js | 37 - .../virtualHubsGetOutboundRoutesSample.js | 37 - .../v36/javascript/virtualHubsGetSample.js | 28 - .../virtualHubsListByResourceGroupSample.js | 30 - .../v36/javascript/virtualHubsListSample.js | 29 - .../javascript/virtualHubsUpdateTagsSample.js | 35 - ...alNetworkAppliancesCreateOrUpdateSample.js | 39 - .../virtualNetworkAppliancesDeleteSample.js | 31 - .../virtualNetworkAppliancesGetSample.js | 31 - .../virtualNetworkAppliancesListAllSample.js | 29 - .../virtualNetworkAppliancesListSample.js | 30 - ...irtualNetworkAppliancesUpdateTagsSample.js | 33 - ...kGatewayConnectionsCreateOrUpdateSample.js | 116 - ...alNetworkGatewayConnectionsDeleteSample.js | 31 - ...etworkGatewayConnectionsGetIkeSasSample.js | 31 - ...rtualNetworkGatewayConnectionsGetSample.js | 31 - ...orkGatewayConnectionsGetSharedKeySample.js | 31 - ...tualNetworkGatewayConnectionsListSample.js | 30 - ...GatewayConnectionsResetConnectionSample.js | 31 - ...kGatewayConnectionsResetSharedKeySample.js | 33 - ...orkGatewayConnectionsSetSharedKeySample.js | 33 - ...ewayConnectionsStartPacketCaptureSample.js | 57 - ...tewayConnectionsStopPacketCaptureSample.js | 36 - ...tworkGatewayConnectionsUpdateTagsSample.js | 33 - ...workGatewayNatRulesCreateOrUpdateSample.js | 42 - ...rtualNetworkGatewayNatRulesDeleteSample.js | 33 - .../virtualNetworkGatewayNatRulesGetSample.js | 33 - ...tRulesListByVirtualNetworkGatewaySample.js | 34 - ...tualNetworkGatewaysCreateOrUpdateSample.js | 150 - .../virtualNetworkGatewaysDeleteSample.js | 31 - ...rtualNetworkGatewayVpnConnectionsSample.js | 36 - ...NetworkGatewaysGenerateVpnProfileSample.js | 33 - ...kGatewaysGeneratevpnclientpackageSample.js | 33 - ...etworkGatewaysGetAdvertisedRoutesSample.js | 33 - ...alNetworkGatewaysGetBgpPeerStatusSample.js | 31 - ...GatewaysGetFailoverAllTestDetailsSample.js | 35 - ...ewaysGetFailoverSingleTestDetailsSample.js | 35 - ...alNetworkGatewaysGetLearnedRoutesSample.js | 31 - ...kGatewaysGetResiliencyInformationSample.js | 34 - ...tworkGatewaysGetRoutesInformationSample.js | 36 - .../virtualNetworkGatewaysGetSample.js | 51 - ...rkGatewaysGetVpnProfilePackageUrlSample.js | 31 - ...ewaysGetVpnclientConnectionHealthSample.js | 31 - ...tewaysGetVpnclientIpsecParametersSample.js | 31 - ...tworkGatewaysInvokeAbortMigrationSample.js | 31 - ...workGatewaysInvokeCommitMigrationSample.js | 31 - ...orkGatewaysInvokeExecuteMigrationSample.js | 31 - ...orkGatewaysInvokePrepareMigrationSample.js | 36 - ...ualNetworkGatewaysListConnectionsSample.js | 34 - ...lNetworkGatewaysListRadiusSecretsSample.js | 32 - .../virtualNetworkGatewaysListSample.js | 30 - .../virtualNetworkGatewaysResetSample.js | 31 - ...rkGatewaysResetVpnClientSharedKeySample.js | 31 - ...tewaysSetVpnclientIpsecParametersSample.js | 42 - ...xpressRouteSiteFailoverSimulationSample.js | 34 - ...NetworkGatewaysStartPacketCaptureSample.js | 59 - ...xpressRouteSiteFailoverSimulationSample.js | 49 - ...lNetworkGatewaysStopPacketCaptureSample.js | 36 - ...etworkGatewaysSupportedVpnDevicesSample.js | 31 - .../virtualNetworkGatewaysUpdateTagsSample.js | 33 - ...ewaysVpnDeviceConfigurationScriptSample.js | 37 - ...tualNetworkPeeringsCreateOrUpdateSample.js | 262 - .../virtualNetworkPeeringsDeleteSample.js | 33 - .../virtualNetworkPeeringsGetSample.js | 99 - .../virtualNetworkPeeringsListSample.js | 57 - .../virtualNetworkTapsCreateOrUpdateSample.js | 38 - .../virtualNetworkTapsDeleteSample.js | 28 - .../javascript/virtualNetworkTapsGetSample.js | 28 - .../virtualNetworkTapsListAllSample.js | 29 - ...ualNetworkTapsListByResourceGroupSample.js | 30 - .../virtualNetworkTapsUpdateTagsSample.js | 35 - ...etworksCheckIPAddressAvailabilitySample.js | 33 - .../virtualNetworksCreateOrUpdateSample.js | 292 - .../javascript/virtualNetworksDeleteSample.js | 31 - .../javascript/virtualNetworksGetSample.js | 62 - .../virtualNetworksListAllSample.js | 29 - ...lNetworksListDdosProtectionStatusSample.js | 39 - .../javascript/virtualNetworksListSample.js | 30 - .../virtualNetworksListUsageSample.js | 34 - .../virtualNetworksUpdateTagsSample.js | 33 - ...rtualRouterPeeringsCreateOrUpdateSample.js | 38 - .../virtualRouterPeeringsDeleteSample.js | 33 - .../virtualRouterPeeringsGetSample.js | 33 - .../virtualRouterPeeringsListSample.js | 34 - .../virtualRoutersCreateOrUpdateSample.js | 39 - .../javascript/virtualRoutersDeleteSample.js | 31 - .../v36/javascript/virtualRoutersGetSample.js | 28 - ...virtualRoutersListByResourceGroupSample.js | 30 - .../javascript/virtualRoutersListSample.js | 29 - .../virtualWansCreateOrUpdateSample.js | 38 - .../v36/javascript/virtualWansDeleteSample.js | 28 - .../v36/javascript/virtualWansGetSample.js | 28 - .../virtualWansListByResourceGroupSample.js | 30 - .../v36/javascript/virtualWansListSample.js | 29 - .../javascript/virtualWansUpdateTagsSample.js | 35 - .../vpnConnectionsCreateOrUpdateSample.js | 78 - .../javascript/vpnConnectionsDeleteSample.js | 33 - .../v36/javascript/vpnConnectionsGetSample.js | 29 - .../vpnConnectionsListByVpnGatewaySample.js | 31 - .../vpnConnectionsStartPacketCaptureSample.js | 71 - .../vpnConnectionsStopPacketCaptureSample.js | 40 - .../vpnGatewaysCreateOrUpdateSample.js | 89 - .../v36/javascript/vpnGatewaysDeleteSample.js | 28 - .../v36/javascript/vpnGatewaysGetSample.js | 28 - .../vpnGatewaysListByResourceGroupSample.js | 30 - .../v36/javascript/vpnGatewaysListSample.js | 29 - .../v36/javascript/vpnGatewaysResetSample.js | 28 - .../vpnGatewaysStartPacketCaptureSample.js | 57 - .../vpnGatewaysStopPacketCaptureSample.js | 37 - .../javascript/vpnGatewaysUpdateTagsSample.js | 35 - ...pnLinkConnectionsGetAllSharedKeysSample.js | 38 - ...inkConnectionsGetDefaultSharedKeySample.js | 35 - .../vpnLinkConnectionsGetIkeSasSample.js | 35 - ...inkConnectionsListByVpnConnectionSample.js | 36 - ...nkConnectionsListDefaultSharedKeySample.js | 35 - ...vpnLinkConnectionsResetConnectionSample.js | 35 - ...nectionsSetOrInitDefaultSharedKeySample.js | 39 - ...tionsAssociatedWithVirtualWanListSample.js | 31 - ...erverConfigurationsCreateOrUpdateSample.js | 110 - .../vpnServerConfigurationsDeleteSample.js | 31 - .../vpnServerConfigurationsGetSample.js | 31 - ...ConfigurationsListByResourceGroupSample.js | 30 - ...erConfigurationsListRadiusSecretsSample.js | 32 - .../vpnServerConfigurationsListSample.js | 29 - ...vpnServerConfigurationsUpdateTagsSample.js | 35 - .../vpnSiteLinkConnectionsGetSample.js | 35 - .../v36/javascript/vpnSiteLinksGetSample.js | 29 - .../vpnSiteLinksListByVpnSiteSample.js | 31 - .../vpnSitesConfigurationDownloadSample.js | 37 - .../vpnSitesCreateOrUpdateSample.js | 53 - .../v36/javascript/vpnSitesDeleteSample.js | 28 - .../v36/javascript/vpnSitesGetSample.js | 28 - .../vpnSitesListByResourceGroupSample.js | 30 - .../v36/javascript/vpnSitesListSample.js | 29 - .../javascript/vpnSitesUpdateTagsSample.js | 35 - ...ionFirewallPoliciesCreateOrUpdateSample.js | 267 - ...ApplicationFirewallPoliciesDeleteSample.js | 31 - ...webApplicationFirewallPoliciesGetSample.js | 28 - ...pplicationFirewallPoliciesListAllSample.js | 29 - ...ebApplicationFirewallPoliciesListSample.js | 30 - .../v36/javascript/webCategoriesGetSample.js | 28 - .../webCategoriesListBySubscriptionSample.js | 30 - .../samples/v36/typescript/README.md | 1555 - .../samples/v36/typescript/package.json | 43 - .../samples/v36/typescript/sample.env | 1 - ...dminRuleCollectionsCreateOrUpdateSample.ts | 51 - .../src/adminRuleCollectionsDeleteSample.ts | 44 - .../src/adminRuleCollectionsGetSample.ts | 37 - .../src/adminRuleCollectionsListSample.ts | 38 - .../src/adminRulesCreateOrUpdateSample.ts | 100 - .../typescript/src/adminRulesDeleteSample.ts | 46 - .../v36/typescript/src/adminRulesGetSample.ts | 67 - .../typescript/src/adminRulesListSample.ts | 40 - ...yPrivateEndpointConnectionsDeleteSample.ts | 34 - ...ewayPrivateEndpointConnectionsGetSample.ts | 33 - ...wayPrivateEndpointConnectionsListSample.ts | 34 - ...yPrivateEndpointConnectionsUpdateSample.ts | 49 - ...onGatewayPrivateLinkResourcesListSample.ts | 34 - ...ewayWafDynamicManifestsDefaultGetSample.ts | 28 - ...tionGatewayWafDynamicManifestsGetSample.ts | 32 - ...tionGatewaysBackendHealthOnDemandSample.ts | 49 - .../applicationGatewaysBackendHealthSample.ts | 31 - ...applicationGatewaysCreateOrUpdateSample.ts | 215 - .../src/applicationGatewaysDeleteSample.ts | 31 - .../src/applicationGatewaysGetSample.ts | 31 - ...ionGatewaysGetSslPredefinedPolicySample.ts | 30 - .../src/applicationGatewaysListAllSample.ts | 29 - ...tewaysListAvailableRequestHeadersSample.ts | 28 - ...ewaysListAvailableResponseHeadersSample.ts | 29 - ...ewaysListAvailableServerVariablesSample.ts | 29 - ...onGatewaysListAvailableSslOptionsSample.ts | 26 - ...istAvailableSslPredefinedPoliciesSample.ts | 29 - ...nGatewaysListAvailableWafRuleSetsSample.ts | 26 - .../src/applicationGatewaysListSample.ts | 30 - .../src/applicationGatewaysStartSample.ts | 31 - .../src/applicationGatewaysStopSample.ts | 31 - .../applicationGatewaysUpdateTagsSample.ts | 34 - ...ationSecurityGroupsCreateOrUpdateSample.ts | 38 - .../applicationSecurityGroupsDeleteSample.ts | 31 - .../src/applicationSecurityGroupsGetSample.ts | 31 - .../applicationSecurityGroupsListAllSample.ts | 29 - .../applicationSecurityGroupsListSample.ts | 32 - ...plicationSecurityGroupsUpdateTagsSample.ts | 34 - .../src/availableDelegationsListSample.ts | 30 - .../availableEndpointServicesListSample.ts | 30 - ...eEndpointTypesListByResourceGroupSample.ts | 34 - ...availablePrivateEndpointTypesListSample.ts | 32 - ...lableResourceGroupDelegationsListSample.ts | 34 - ...ServiceAliasesListByResourceGroupSample.ts | 34 - .../src/availableServiceAliasesListSample.ts | 30 - .../src/azureFirewallFqdnTagsListAllSample.ts | 29 - .../src/azureFirewallsCreateOrUpdateSample.ts | 638 - .../src/azureFirewallsDeleteSample.ts | 31 - .../typescript/src/azureFirewallsGetSample.ts | 111 - .../src/azureFirewallsListAllSample.ts | 29 - ...azureFirewallsListLearnedPrefixesSample.ts | 31 - .../src/azureFirewallsListSample.ts | 30 - ...reFirewallsPacketCaptureOperationSample.ts | 57 - .../src/azureFirewallsPacketCaptureSample.ts | 56 - .../src/azureFirewallsUpdateTagsSample.ts | 34 - .../src/bastionHostsCreateOrUpdateSample.ts | 140 - .../src/bastionHostsDeleteSample.ts | 51 - .../typescript/src/bastionHostsGetSample.ts | 91 - .../bastionHostsListByResourceGroupSample.ts | 32 - .../typescript/src/bastionHostsListSample.ts | 29 - .../src/bastionHostsUpdateTagsSample.ts | 34 - .../src/bgpServiceCommunitiesListSample.ts | 29 - .../src/checkDnsNameAvailabilitySample.ts | 31 - ...urationPolicyGroupsCreateOrUpdateSample.ts | 56 - .../configurationPolicyGroupsDeleteSample.ts | 33 - .../src/configurationPolicyGroupsGetSample.ts | 33 - ...roupsListByVpnServerConfigurationSample.ts | 34 - .../connectionMonitorsCreateOrUpdateSample.ts | 183 - .../src/connectionMonitorsDeleteSample.ts | 33 - .../src/connectionMonitorsGetSample.ts | 33 - .../src/connectionMonitorsListSample.ts | 34 - .../src/connectionMonitorsStopSample.ts | 33 - .../src/connectionMonitorsUpdateTagsSample.ts | 36 - ...ivityConfigurationsCreateOrUpdateSample.ts | 68 - .../connectivityConfigurationsDeleteSample.ts | 43 - .../connectivityConfigurationsGetSample.ts | 36 - .../connectivityConfigurationsListSample.ts | 37 - .../customIPPrefixesCreateOrUpdateSample.ts | 34 - .../src/customIPPrefixesDeleteSample.ts | 31 - .../src/customIPPrefixesGetSample.ts | 31 - .../src/customIPPrefixesListAllSample.ts | 29 - .../src/customIPPrefixesListSample.ts | 30 - .../src/customIPPrefixesUpdateTagsSample.ts | 34 - .../ddosCustomPoliciesCreateOrUpdateSample.ts | 43 - .../src/ddosCustomPoliciesDeleteSample.ts | 31 - .../src/ddosCustomPoliciesGetSample.ts | 31 - .../src/ddosCustomPoliciesUpdateTagsSample.ts | 34 - ...ddosProtectionPlansCreateOrUpdateSample.ts | 37 - .../src/ddosProtectionPlansDeleteSample.ts | 31 - .../src/ddosProtectionPlansGetSample.ts | 31 - ...rotectionPlansListByResourceGroupSample.ts | 32 - .../src/ddosProtectionPlansListSample.ts | 29 - .../ddosProtectionPlansUpdateTagsSample.ts | 34 - .../src/defaultSecurityRulesGetSample.ts | 33 - .../src/defaultSecurityRulesListSample.ts | 34 - ...deleteBastionShareableLinkByTokenSample.ts | 42 - .../src/deleteBastionShareableLinkSample.ts | 50 - .../src/disconnectActiveSessionsSample.ts | 37 - .../dscpConfigurationCreateOrUpdateSample.ts | 58 - .../src/dscpConfigurationDeleteSample.ts | 31 - .../src/dscpConfigurationGetSample.ts | 31 - .../src/dscpConfigurationListAllSample.ts | 29 - .../src/dscpConfigurationListSample.ts | 32 - ...rcuitAuthorizationsCreateOrUpdateSample.ts | 40 - ...sRouteCircuitAuthorizationsDeleteSample.ts | 34 - ...ressRouteCircuitAuthorizationsGetSample.ts | 33 - ...essRouteCircuitAuthorizationsListSample.ts | 34 - ...eCircuitConnectionsCreateOrUpdateSample.ts | 53 - ...ressRouteCircuitConnectionsDeleteSample.ts | 35 - ...expressRouteCircuitConnectionsGetSample.ts | 35 - ...xpressRouteCircuitConnectionsListSample.ts | 36 - ...outeCircuitPeeringsCreateOrUpdateSample.ts | 45 - ...expressRouteCircuitPeeringsDeleteSample.ts | 33 - .../expressRouteCircuitPeeringsGetSample.ts | 33 - .../expressRouteCircuitPeeringsListSample.ts | 34 - ...xpressRouteCircuitsCreateOrUpdateSample.ts | 87 - .../src/expressRouteCircuitsDeleteSample.ts | 31 - ...pressRouteCircuitsGetPeeringStatsSample.ts | 33 - .../src/expressRouteCircuitsGetSample.ts | 31 - .../src/expressRouteCircuitsGetStatsSample.ts | 31 - .../src/expressRouteCircuitsListAllSample.ts | 29 - .../expressRouteCircuitsListArpTableSample.ts | 35 - ...pressRouteCircuitsListRoutesTableSample.ts | 35 - ...uteCircuitsListRoutesTableSummarySample.ts | 36 - .../src/expressRouteCircuitsListSample.ts | 32 - .../expressRouteCircuitsUpdateTagsSample.ts | 34 - ...essRouteConnectionsCreateOrUpdateSample.ts | 74 - .../expressRouteConnectionsDeleteSample.ts | 34 - .../src/expressRouteConnectionsGetSample.ts | 34 - .../src/expressRouteConnectionsListSample.ts | 32 - ...sConnectionPeeringsCreateOrUpdateSample.ts | 50 - ...outeCrossConnectionPeeringsDeleteSample.ts | 35 - ...ssRouteCrossConnectionPeeringsGetSample.ts | 34 - ...sRouteCrossConnectionPeeringsListSample.ts | 35 - ...uteCrossConnectionsCreateOrUpdateSample.ts | 41 - .../expressRouteCrossConnectionsGetSample.ts | 32 - ...RouteCrossConnectionsListArpTableSample.ts | 37 - ...ossConnectionsListByResourceGroupSample.ts | 33 - ...teCrossConnectionsListRoutesTableSample.ts | 37 - ...ConnectionsListRoutesTableSummarySample.ts | 37 - .../expressRouteCrossConnectionsListSample.ts | 29 - ...ssRouteCrossConnectionsUpdateTagsSample.ts | 37 - ...xpressRouteGatewaysCreateOrUpdateSample.ts | 45 - .../src/expressRouteGatewaysDeleteSample.ts | 32 - .../src/expressRouteGatewaysGetSample.ts | 32 - ...sRouteGatewaysListByResourceGroupSample.ts | 29 - ...ssRouteGatewaysListBySubscriptionSample.ts | 26 - .../expressRouteGatewaysUpdateTagsSample.ts | 37 - .../src/expressRouteLinksGetSample.ts | 33 - .../src/expressRouteLinksListSample.ts | 34 - ...ePortAuthorizationsCreateOrUpdateSample.ts | 40 - ...ressRoutePortAuthorizationsDeleteSample.ts | 33 - ...expressRoutePortAuthorizationsGetSample.ts | 33 - ...xpressRoutePortAuthorizationsListSample.ts | 34 - .../expressRoutePortsCreateOrUpdateSample.ts | 69 - .../src/expressRoutePortsDeleteSample.ts | 31 - .../src/expressRoutePortsGenerateLoaSample.ts | 39 - .../src/expressRoutePortsGetSample.ts | 31 - ...ressRoutePortsListByResourceGroupSample.ts | 32 - .../src/expressRoutePortsListSample.ts | 29 - .../expressRoutePortsLocationsGetSample.ts | 27 - .../expressRoutePortsLocationsListSample.ts | 29 - .../src/expressRoutePortsUpdateTagsSample.ts | 34 - .../src/expressRouteProviderPortSample.ts | 27 - ...essRouteProviderPortsLocationListSample.ts | 26 - .../expressRouteServiceProvidersListSample.ts | 29 - .../firewallPoliciesCreateOrUpdateSample.ts | 105 - .../src/firewallPoliciesDeleteSample.ts | 31 - .../src/firewallPoliciesGetSample.ts | 31 - .../src/firewallPoliciesListAllSample.ts | 29 - .../src/firewallPoliciesListSample.ts | 30 - .../src/firewallPoliciesUpdateTagsSample.ts | 35 - .../firewallPolicyDeploymentsDeploySample.ts | 31 - ...irewallPolicyDraftsCreateOrUpdateSample.ts | 99 - .../src/firewallPolicyDraftsDeleteSample.ts | 31 - .../src/firewallPolicyDraftsGetSample.ts | 31 - ...icyIdpsSignaturesFilterValuesListSample.ts | 41 - .../firewallPolicyIdpsSignaturesListSample.ts | 42 - ...lPolicyIdpsSignaturesOverridesGetSample.ts | 33 - ...PolicyIdpsSignaturesOverridesListSample.ts | 33 - ...olicyIdpsSignaturesOverridesPatchSample.ts | 44 - ...lPolicyIdpsSignaturesOverridesPutSample.ts | 44 - ...llectionGroupDraftsCreateOrUpdateSample.ts | 60 - ...cyRuleCollectionGroupDraftsDeleteSample.ts | 33 - ...olicyRuleCollectionGroupDraftsGetSample.ts | 33 - ...uleCollectionGroupsCreateOrUpdateSample.ts | 254 - ...lPolicyRuleCollectionGroupsDeleteSample.ts | 34 - ...wallPolicyRuleCollectionGroupsGetSample.ts | 101 - ...allPolicyRuleCollectionGroupsListSample.ts | 82 - .../src/flowLogsCreateOrUpdateSample.ts | 53 - .../typescript/src/flowLogsDeleteSample.ts | 33 - .../v36/typescript/src/flowLogsGetSample.ts | 33 - .../v36/typescript/src/flowLogsListSample.ts | 34 - .../src/flowLogsUpdateTagsSample.ts | 36 - ...nvpnserverconfigurationvpnprofileSample.ts | 42 - .../typescript/src/getActiveSessionsSample.ts | 34 - .../src/getBastionShareableLinkSample.ts | 53 - .../src/hubRouteTablesCreateOrUpdateSample.ts | 48 - .../src/hubRouteTablesDeleteSample.ts | 33 - .../typescript/src/hubRouteTablesGetSample.ts | 33 - .../src/hubRouteTablesListSample.ts | 34 - ...lNetworkConnectionsCreateOrUpdateSample.ts | 79 - ...ubVirtualNetworkConnectionsDeleteSample.ts | 33 - .../hubVirtualNetworkConnectionsGetSample.ts | 33 - .../hubVirtualNetworkConnectionsListSample.ts | 34 - .../inboundNatRulesCreateOrUpdateSample.ts | 46 - .../src/inboundNatRulesDeleteSample.ts | 33 - .../src/inboundNatRulesGetSample.ts | 33 - .../src/inboundNatRulesListSample.ts | 34 - ...inboundSecurityRuleCreateOrUpdateSample.ts | 52 - .../src/inboundSecurityRuleGetSample.ts | 33 - .../src/ipAllocationsCreateOrUpdateSample.ts | 42 - .../src/ipAllocationsDeleteSample.ts | 31 - .../typescript/src/ipAllocationsGetSample.ts | 31 - .../ipAllocationsListByResourceGroupSample.ts | 32 - .../typescript/src/ipAllocationsListSample.ts | 29 - .../src/ipAllocationsUpdateTagsSample.ts | 34 - .../src/ipGroupsCreateOrUpdateSample.ts | 39 - .../typescript/src/ipGroupsDeleteSample.ts | 32 - .../v36/typescript/src/ipGroupsGetSample.ts | 29 - .../src/ipGroupsListByResourceGroupSample.ts | 33 - .../v36/typescript/src/ipGroupsListSample.ts | 29 - .../src/ipGroupsUpdateGroupsSample.ts | 35 - .../typescript/src/ipamPoolsCreateSample.ts | 45 - .../typescript/src/ipamPoolsDeleteSample.ts | 35 - .../src/ipamPoolsGetPoolUsageSample.ts | 35 - .../v36/typescript/src/ipamPoolsGetSample.ts | 35 - .../ipamPoolsListAssociatedResourcesSample.ts | 38 - .../v36/typescript/src/ipamPoolsListSample.ts | 36 - .../typescript/src/ipamPoolsUpdateSample.ts | 35 - ...tActiveConnectivityConfigurationsSample.ts | 43 - .../src/listActiveSecurityAdminRulesSample.ts | 43 - ...fectiveConnectivityConfigurationsSample.ts | 41 - ...anagerEffectiveSecurityAdminRulesSample.ts | 40 - ...BackendAddressPoolsCreateOrUpdateSample.ts | 57 - ...BalancerBackendAddressPoolsDeleteSample.ts | 34 - ...oadBalancerBackendAddressPoolsGetSample.ts | 55 - ...adBalancerBackendAddressPoolsListSample.ts | 57 - ...lancerFrontendIPConfigurationsGetSample.ts | 33 - ...ancerFrontendIPConfigurationsListSample.ts | 34 - ...loadBalancerLoadBalancingRulesGetSample.ts | 33 - ...dBalancerLoadBalancingRulesHealthSample.ts | 33 - ...oadBalancerLoadBalancingRulesListSample.ts | 34 - ...loadBalancerNetworkInterfacesListSample.ts | 57 - .../src/loadBalancerOutboundRulesGetSample.ts | 33 - .../loadBalancerOutboundRulesListSample.ts | 34 - .../src/loadBalancerProbesGetSample.ts | 33 - .../src/loadBalancerProbesListSample.ts | 34 - .../src/loadBalancersCreateOrUpdateSample.ts | 803 - .../src/loadBalancersDeleteSample.ts | 31 - .../typescript/src/loadBalancersGetSample.ts | 51 - .../src/loadBalancersListAllSample.ts | 29 - ...ersListInboundNatRulePortMappingsSample.ts | 42 - .../typescript/src/loadBalancersListSample.ts | 30 - .../loadBalancersMigrateToIPBasedSample.ts | 41 - ...oadBalancersSwapPublicIPAddressesSample.ts | 50 - .../src/loadBalancersUpdateTagsSample.ts | 34 - ...ocalNetworkGatewaysCreateOrUpdateSample.ts | 42 - .../src/localNetworkGatewaysDeleteSample.ts | 31 - .../src/localNetworkGatewaysGetSample.ts | 31 - .../src/localNetworkGatewaysListSample.ts | 32 - .../localNetworkGatewaysUpdateTagsSample.ts | 34 - ...kManagerConnectionsCreateOrUpdateSample.ts | 40 - ...upNetworkManagerConnectionsDeleteSample.ts | 30 - ...GroupNetworkManagerConnectionsGetSample.ts | 30 - ...roupNetworkManagerConnectionsListSample.ts | 31 - .../src/natGatewaysCreateOrUpdateSample.ts | 120 - .../typescript/src/natGatewaysDeleteSample.ts | 31 - .../typescript/src/natGatewaysGetSample.ts | 71 - .../src/natGatewaysListAllSample.ts | 29 - .../typescript/src/natGatewaysListSample.ts | 30 - .../src/natGatewaysUpdateTagsSample.ts | 56 - .../src/natRulesCreateOrUpdateSample.ts | 43 - .../typescript/src/natRulesDeleteSample.ts | 33 - .../v36/typescript/src/natRulesGetSample.ts | 33 - .../src/natRulesListByVpnGatewaySample.ts | 34 - .../src/networkGroupsCreateOrUpdateSample.ts | 41 - .../src/networkGroupsDeleteSample.ts | 42 - .../typescript/src/networkGroupsGetSample.ts | 35 - .../typescript/src/networkGroupsListSample.ts | 36 - ...tworkInterfaceIPConfigurationsGetSample.ts | 33 - ...workInterfaceIPConfigurationsListSample.ts | 34 - ...networkInterfaceLoadBalancersListSample.ts | 34 - ...ceTapConfigurationsCreateOrUpdateSample.ts | 44 - ...kInterfaceTapConfigurationsDeleteSample.ts | 34 - ...workInterfaceTapConfigurationsGetSample.ts | 33 - ...orkInterfaceTapConfigurationsListSample.ts | 34 - .../networkInterfacesCreateOrUpdateSample.ts | 89 - .../src/networkInterfacesDeleteSample.ts | 31 - ...esGetCloudServiceNetworkInterfaceSample.ts | 35 - ...kInterfacesGetEffectiveRouteTableSample.ts | 32 - .../src/networkInterfacesGetSample.ts | 31 - ...ualMachineScaleSetIPConfigurationSample.ts | 38 - ...alMachineScaleSetNetworkInterfaceSample.ts | 36 - .../src/networkInterfacesListAllSample.ts | 29 - ...ListCloudServiceNetworkInterfacesSample.ts | 34 - ...viceRoleInstanceNetworkInterfacesSample.ts | 36 - ...istEffectiveNetworkSecurityGroupsSample.ts | 32 - .../src/networkInterfacesListSample.ts | 30 - ...alMachineScaleSetIPConfigurationsSample.ts | 38 - ...lMachineScaleSetNetworkInterfacesSample.ts | 34 - ...achineScaleSetVMNetworkInterfacesSample.ts | 36 - .../src/networkInterfacesUpdateTagsSample.ts | 34 - .../src/networkManagerCommitsPostSample.ts | 46 - ...etworkManagerDeploymentStatusListSample.ts | 44 - ...utingConfigurationsCreateOrUpdateSample.ts | 45 - ...anagerRoutingConfigurationsDeleteSample.ts | 36 - ...rkManagerRoutingConfigurationsGetSample.ts | 35 - ...kManagerRoutingConfigurationsListSample.ts | 36 - .../networkManagersCreateOrUpdateSample.ts | 43 - .../src/networkManagersDeleteSample.ts | 40 - .../src/networkManagersGetSample.ts | 33 - ...networkManagersListBySubscriptionSample.ts | 31 - .../src/networkManagersListSample.ts | 32 - .../src/networkManagersPatchSample.ts | 36 - .../networkProfilesCreateOrUpdateSample.ts | 49 - .../src/networkProfilesDeleteSample.ts | 31 - .../src/networkProfilesGetSample.ts | 51 - .../src/networkProfilesListAllSample.ts | 29 - .../src/networkProfilesListSample.ts | 30 - .../src/networkProfilesUpdateTagsSample.ts | 34 - ...tworkSecurityGroupsCreateOrUpdateSample.ts | 74 - .../src/networkSecurityGroupsDeleteSample.ts | 31 - .../src/networkSecurityGroupsGetSample.ts | 31 - .../src/networkSecurityGroupsListAllSample.ts | 29 - .../src/networkSecurityGroupsListSample.ts | 32 - .../networkSecurityGroupsUpdateTagsSample.ts | 34 - ...erimeterAccessRulesCreateOrUpdateSample.ts | 42 - ...ecurityPerimeterAccessRulesDeleteSample.ts | 35 - ...rkSecurityPerimeterAccessRulesGetSample.ts | 35 - ...kSecurityPerimeterAccessRulesListSample.ts | 36 - ...rityPerimeterAccessRulesReconcileSample.ts | 37 - ...imeterAssociableResourceTypesListSample.ts | 32 - ...rimeterAssociationsCreateOrUpdateSample.ts | 45 - ...curityPerimeterAssociationsDeleteSample.ts | 34 - ...kSecurityPerimeterAssociationsGetSample.ts | 33 - ...SecurityPerimeterAssociationsListSample.ts | 34 - ...ityPerimeterAssociationsReconcileSample.ts | 35 - ...rityPerimeterLinkReferencesDeleteSample.ts | 34 - ...ecurityPerimeterLinkReferencesGetSample.ts | 33 - ...curityPerimeterLinkReferencesListSample.ts | 34 - ...urityPerimeterLinksCreateOrUpdateSample.ts | 41 - ...tworkSecurityPerimeterLinksDeleteSample.ts | 33 - .../networkSecurityPerimeterLinksGetSample.ts | 33 - ...networkSecurityPerimeterLinksListSample.ts | 34 - ...ggingConfigurationsCreateOrUpdateSample.ts | 45 - ...imeterLoggingConfigurationsDeleteSample.ts | 34 - ...PerimeterLoggingConfigurationsGetSample.ts | 33 - ...erimeterLoggingConfigurationsListSample.ts | 34 - ...rityPerimeterOperationStatusesGetSample.ts | 31 - ...tyPerimeterProfilesCreateOrUpdateSample.ts | 36 - ...rkSecurityPerimeterProfilesDeleteSample.ts | 33 - ...tworkSecurityPerimeterProfilesGetSample.ts | 33 - ...workSecurityPerimeterProfilesListSample.ts | 34 - ...kSecurityPerimeterServiceTagsListSample.ts | 32 - ...kSecurityPerimetersCreateOrUpdateSample.ts | 37 - .../networkSecurityPerimetersDeleteSample.ts | 31 - .../src/networkSecurityPerimetersGetSample.ts | 31 - ...urityPerimetersListBySubscriptionSample.ts | 29 - .../networkSecurityPerimetersListSample.ts | 32 - .../networkSecurityPerimetersPatchSample.ts | 34 - ...pplianceConnectionsCreateOrUpdateSample.ts | 66 - ...VirtualApplianceConnectionsDeleteSample.ts | 34 - ...orkVirtualApplianceConnectionsGetSample.ts | 33 - ...rkVirtualApplianceConnectionsListSample.ts | 34 - ...rkVirtualAppliancesCreateOrUpdateSample.ts | 479 - .../networkVirtualAppliancesDeleteSample.ts | 31 - ...alAppliancesGetBootDiagnosticLogsSample.ts | 44 - .../src/networkVirtualAppliancesGetSample.ts | 31 - ...tualAppliancesListByResourceGroupSample.ts | 32 - .../src/networkVirtualAppliancesListSample.ts | 29 - .../networkVirtualAppliancesReimageSample.ts | 31 - .../networkVirtualAppliancesRestartSample.ts | 51 - ...etworkVirtualAppliancesUpdateTagsSample.ts | 34 - .../networkWatchersCheckConnectivitySample.ts | 44 - .../networkWatchersCreateOrUpdateSample.ts | 34 - .../src/networkWatchersDeleteSample.ts | 31 - ...atchersGetAzureReachabilityReportSample.ts | 44 - .../networkWatchersGetFlowLogStatusSample.ts | 40 - ...GetNetworkConfigurationDiagnosticSample.ts | 50 - .../src/networkWatchersGetNextHopSample.ts | 41 - .../src/networkWatchersGetSample.ts | 31 - .../src/networkWatchersGetTopologySample.ts | 37 - ...kWatchersGetTroubleshootingResultSample.ts | 41 - ...networkWatchersGetTroubleshootingSample.ts | 43 - ...networkWatchersGetVMSecurityRulesSample.ts | 40 - .../src/networkWatchersListAllSample.ts | 29 - ...orkWatchersListAvailableProvidersSample.ts | 43 - .../src/networkWatchersListSample.ts | 30 - ...rkWatchersSetFlowLogConfigurationSample.ts | 51 - .../src/networkWatchersUpdateTagsSample.ts | 34 - .../src/networkWatchersVerifyIPFlowSample.ts | 46 - .../typescript/src/operationsListSample.ts | 31 - .../src/p2SVpnGatewaysCreateOrUpdateSample.ts | 73 - .../src/p2SVpnGatewaysDeleteSample.ts | 31 - ...tewaysDisconnectP2SvpnConnectionsSample.ts | 41 - .../p2SVpnGatewaysGenerateVpnProfileSample.ts | 39 - ...GetP2SvpnConnectionHealthDetailedSample.ts | 43 - ...GatewaysGetP2SvpnConnectionHealthSample.ts | 32 - .../typescript/src/p2SVpnGatewaysGetSample.ts | 31 - ...p2SVpnGatewaysListByResourceGroupSample.ts | 32 - .../src/p2SVpnGatewaysListSample.ts | 29 - .../src/p2SVpnGatewaysResetSample.ts | 31 - .../src/p2SVpnGatewaysUpdateTagsSample.ts | 36 - .../src/packetCapturesCreateSample.ts | 50 - .../src/packetCapturesDeleteSample.ts | 33 - .../typescript/src/packetCapturesGetSample.ts | 33 - .../src/packetCapturesGetStatusSample.ts | 33 - .../src/packetCapturesListSample.ts | 34 - .../src/packetCapturesStopSample.ts | 33 - ...ExpressRouteCircuitConnectionsGetSample.ts | 35 - ...xpressRouteCircuitConnectionsListSample.ts | 36 - ...rivateDnsZoneGroupsCreateOrUpdateSample.ts | 46 - .../src/privateDnsZoneGroupsDeleteSample.ts | 33 - .../src/privateDnsZoneGroupsGetSample.ts | 33 - .../src/privateDnsZoneGroupsListSample.ts | 34 - .../privateEndpointsCreateOrUpdateSample.ts | 141 - .../src/privateEndpointsDeleteSample.ts | 31 - .../src/privateEndpointsGetSample.ts | 71 - ...rivateEndpointsListBySubscriptionSample.ts | 29 - .../src/privateEndpointsListSample.ts | 30 - ...kServiceVisibilityByResourceGroupSample.ts | 41 - ...CheckPrivateLinkServiceVisibilitySample.ts | 39 - ...privateLinkServicesCreateOrUpdateSample.ts | 60 - ...esDeletePrivateEndpointConnectionSample.ts | 34 - .../src/privateLinkServicesDeleteSample.ts | 31 - ...vicesGetPrivateEndpointConnectionSample.ts | 33 - .../src/privateLinkServicesGetSample.ts | 31 - ...rivateLinkServicesByResourceGroupSample.ts | 34 - ...stAutoApprovedPrivateLinkServicesSample.ts | 32 - ...ateLinkServicesListBySubscriptionSample.ts | 29 - ...cesListPrivateEndpointConnectionsSample.ts | 34 - .../src/privateLinkServicesListSample.ts | 30 - ...esUpdatePrivateEndpointConnectionSample.ts | 49 - .../publicIPAddressesCreateOrUpdateSample.ts | 137 - ...icIPAddressesDdosProtectionStatusSample.ts | 32 - .../src/publicIPAddressesDeleteSample.ts | 31 - ...ciateCloudServiceReservedPublicIPSample.ts | 41 - ...sesGetCloudServicePublicIpaddressSample.ts | 40 - .../src/publicIPAddressesGetSample.ts | 51 - ...ualMachineScaleSetPublicIpaddressSample.ts | 41 - .../src/publicIPAddressesListAllSample.ts | 29 - ...ListCloudServicePublicIpaddressesSample.ts | 35 - ...viceRoleInstancePublicIpaddressesSample.ts | 41 - .../src/publicIPAddressesListSample.ts | 30 - ...lMachineScaleSetPublicIpaddressesSample.ts | 35 - ...achineScaleSetVmpublicIpaddressesSample.ts | 41 - ...eserveCloudServicePublicIPAddressSample.ts | 40 - .../src/publicIPAddressesUpdateTagsSample.ts | 34 - .../publicIPPrefixesCreateOrUpdateSample.ts | 91 - .../src/publicIPPrefixesDeleteSample.ts | 31 - .../src/publicIPPrefixesGetSample.ts | 51 - .../src/publicIPPrefixesListAllSample.ts | 29 - .../src/publicIPPrefixesListSample.ts | 30 - .../src/publicIPPrefixesUpdateTagsSample.ts | 34 - .../src/putBastionShareableLinkSample.ts | 53 - ...reachabilityAnalysisIntentsCreateSample.ts | 58 - ...reachabilityAnalysisIntentsDeleteSample.ts | 37 - .../reachabilityAnalysisIntentsGetSample.ts | 37 - .../reachabilityAnalysisIntentsListSample.ts | 38 - .../reachabilityAnalysisRunsCreateSample.ts | 49 - .../reachabilityAnalysisRunsDeleteSample.ts | 37 - .../src/reachabilityAnalysisRunsGetSample.ts | 37 - .../src/reachabilityAnalysisRunsListSample.ts | 38 - .../src/resourceNavigationLinksListSample.ts | 33 - .../routeFilterRulesCreateOrUpdateSample.ts | 40 - .../src/routeFilterRulesDeleteSample.ts | 33 - .../src/routeFilterRulesGetSample.ts | 33 - ...routeFilterRulesListByRouteFilterSample.ts | 34 - .../src/routeFiltersCreateOrUpdateSample.ts | 45 - .../src/routeFiltersDeleteSample.ts | 31 - .../typescript/src/routeFiltersGetSample.ts | 31 - .../routeFiltersListByResourceGroupSample.ts | 32 - .../typescript/src/routeFiltersListSample.ts | 29 - .../src/routeFiltersUpdateTagsSample.ts | 34 - .../src/routeMapsCreateOrUpdateSample.ts | 61 - .../typescript/src/routeMapsDeleteSample.ts | 33 - .../v36/typescript/src/routeMapsGetSample.ts | 33 - .../v36/typescript/src/routeMapsListSample.ts | 34 - .../src/routeTablesCreateOrUpdateSample.ts | 66 - .../typescript/src/routeTablesDeleteSample.ts | 31 - .../typescript/src/routeTablesGetSample.ts | 31 - .../src/routeTablesListAllSample.ts | 29 - .../typescript/src/routeTablesListSample.ts | 30 - .../src/routeTablesUpdateTagsSample.ts | 34 - .../src/routesCreateOrUpdateSample.ts | 39 - .../v36/typescript/src/routesDeleteSample.ts | 33 - .../v36/typescript/src/routesGetSample.ts | 33 - .../v36/typescript/src/routesListSample.ts | 34 - .../src/routingIntentCreateOrUpdateSample.ts | 52 - .../src/routingIntentDeleteSample.ts | 33 - .../typescript/src/routingIntentGetSample.ts | 33 - .../typescript/src/routingIntentListSample.ts | 34 - ...tingRuleCollectionsCreateOrUpdateSample.ts | 51 - .../src/routingRuleCollectionsDeleteSample.ts | 37 - .../src/routingRuleCollectionsGetSample.ts | 37 - .../src/routingRuleCollectionsListSample.ts | 38 - .../src/routingRulesCreateOrUpdateSample.ts | 80 - .../src/routingRulesDeleteSample.ts | 46 - .../typescript/src/routingRulesGetSample.ts | 39 - .../typescript/src/routingRulesListSample.ts | 40 - .../scopeConnectionsCreateOrUpdateSample.ts | 42 - .../src/scopeConnectionsDeleteSample.ts | 35 - .../src/scopeConnectionsGetSample.ts | 35 - .../src/scopeConnectionsListSample.ts | 36 - ...AdminConfigurationsCreateOrUpdateSample.ts | 74 - ...securityAdminConfigurationsDeleteSample.ts | 42 - .../securityAdminConfigurationsGetSample.ts | 35 - .../securityAdminConfigurationsListSample.ts | 36 - ...ityPartnerProvidersCreateOrUpdateSample.ts | 45 - .../securityPartnerProvidersDeleteSample.ts | 31 - .../src/securityPartnerProvidersGetSample.ts | 31 - ...rtnerProvidersListByResourceGroupSample.ts | 32 - .../src/securityPartnerProvidersListSample.ts | 29 - ...ecurityPartnerProvidersUpdateTagsSample.ts | 34 - .../src/securityRulesCreateOrUpdateSample.ts | 45 - .../src/securityRulesDeleteSample.ts | 33 - .../typescript/src/securityRulesGetSample.ts | 33 - .../typescript/src/securityRulesListSample.ts | 34 - ...yUserConfigurationsCreateOrUpdateSample.ts | 43 - .../securityUserConfigurationsDeleteSample.ts | 42 - .../securityUserConfigurationsGetSample.ts | 35 - .../securityUserConfigurationsListSample.ts | 36 - ...UserRuleCollectionsCreateOrUpdateSample.ts | 51 - ...securityUserRuleCollectionsDeleteSample.ts | 44 - .../securityUserRuleCollectionsGetSample.ts | 37 - .../securityUserRuleCollectionsListSample.ts | 38 - .../securityUserRulesCreateOrUpdateSample.ts | 50 - .../src/securityUserRulesDeleteSample.ts | 46 - .../src/securityUserRulesGetSample.ts | 39 - .../src/securityUserRulesListSample.ts | 40 - .../src/serviceAssociationLinksListSample.ts | 33 - ...iceEndpointPoliciesCreateOrUpdateSample.ts | 75 - .../serviceEndpointPoliciesDeleteSample.ts | 31 - .../src/serviceEndpointPoliciesGetSample.ts | 31 - ...dpointPoliciesListByResourceGroupSample.ts | 32 - .../src/serviceEndpointPoliciesListSample.ts | 29 - ...serviceEndpointPoliciesUpdateTagsSample.ts | 34 - ...ntPolicyDefinitionsCreateOrUpdateSample.ts | 48 - ...ceEndpointPolicyDefinitionsDeleteSample.ts | 34 - ...rviceEndpointPolicyDefinitionsGetSample.ts | 33 - ...icyDefinitionsListByResourceGroupSample.ts | 34 - .../serviceGatewaysCreateOrUpdateSample.ts | 48 - .../src/serviceGatewaysDeleteSample.ts | 33 - ...erviceGatewaysGetAddressLocationsSample.ts | 36 - .../src/serviceGatewaysGetSample.ts | 33 - .../src/serviceGatewaysGetServicesSample.ts | 36 - .../src/serviceGatewaysListAllSample.ts | 31 - .../src/serviceGatewaysListSample.ts | 32 - ...iceGatewaysUpdateAddressLocationsSample.ts | 140 - .../serviceGatewaysUpdateServicesSample.ts | 73 - .../src/serviceGatewaysUpdateTagsSample.ts | 36 - .../src/serviceTagInformationListSample.ts | 86 - .../typescript/src/serviceTagsListSample.ts | 27 - .../typescript/src/staticCidrsCreateSample.ts | 37 - .../typescript/src/staticCidrsDeleteSample.ts | 37 - .../typescript/src/staticCidrsGetSample.ts | 37 - .../typescript/src/staticCidrsListSample.ts | 38 - .../src/staticMembersCreateOrUpdateSample.ts | 43 - .../src/staticMembersDeleteSample.ts | 37 - .../typescript/src/staticMembersGetSample.ts | 37 - .../typescript/src/staticMembersListSample.ts | 38 - .../src/subnetsCreateOrUpdateSample.ts | 180 - .../v36/typescript/src/subnetsDeleteSample.ts | 34 - .../v36/typescript/src/subnetsGetSample.ts | 80 - .../v36/typescript/src/subnetsListSample.ts | 35 - .../subnetsPrepareNetworkPoliciesSample.ts | 40 - .../subnetsUnprepareNetworkPoliciesSample.ts | 40 - ...kManagerConnectionsCreateOrUpdateSample.ts | 41 - ...onNetworkManagerConnectionsDeleteSample.ts | 31 - ...ptionNetworkManagerConnectionsGetSample.ts | 31 - ...tionNetworkManagerConnectionsListSample.ts | 31 - .../src/supportedSecurityProvidersSample.ts | 31 - .../v36/typescript/src/usagesListSample.ts | 49 - .../src/verifierWorkspacesCreateSample.ts | 41 - .../src/verifierWorkspacesDeleteSample.ts | 35 - .../src/verifierWorkspacesGetSample.ts | 35 - .../src/verifierWorkspacesListSample.ts | 36 - .../src/verifierWorkspacesUpdateSample.ts | 35 - .../v36/typescript/src/vipSwapCreateSample.ts | 34 - .../v36/typescript/src/vipSwapGetSample.ts | 28 - .../v36/typescript/src/vipSwapListSample.ts | 28 - ...rtualApplianceSitesCreateOrUpdateSample.ts | 44 - .../src/virtualApplianceSitesDeleteSample.ts | 33 - .../src/virtualApplianceSitesGetSample.ts | 33 - .../src/virtualApplianceSitesListSample.ts | 34 - .../src/virtualApplianceSkusGetSample.ts | 27 - .../src/virtualApplianceSkusListSample.ts | 29 - ...ualHubBgpConnectionCreateOrUpdateSample.ts | 43 - .../virtualHubBgpConnectionDeleteSample.ts | 33 - .../src/virtualHubBgpConnectionGetSample.ts | 33 - ...gpConnectionsListAdvertisedRoutesSample.ts | 34 - ...ubBgpConnectionsListLearnedRoutesSample.ts | 34 - .../src/virtualHubBgpConnectionsListSample.ts | 34 - ...lHubIPConfigurationCreateOrUpdateSample.ts | 44 - .../virtualHubIPConfigurationDeleteSample.ts | 33 - .../src/virtualHubIPConfigurationGetSample.ts | 33 - .../virtualHubIPConfigurationListSample.ts | 34 - ...ualHubRouteTableV2SCreateOrUpdateSample.ts | 56 - .../virtualHubRouteTableV2SDeleteSample.ts | 33 - .../src/virtualHubRouteTableV2SGetSample.ts | 33 - .../src/virtualHubRouteTableV2SListSample.ts | 34 - .../src/virtualHubsCreateOrUpdateSample.ts | 42 - .../typescript/src/virtualHubsDeleteSample.ts | 31 - ...lHubsGetEffectiveVirtualHubRoutesSample.ts | 102 - .../src/virtualHubsGetInboundRoutesSample.ts | 41 - .../src/virtualHubsGetOutboundRoutesSample.ts | 41 - .../typescript/src/virtualHubsGetSample.ts | 31 - .../virtualHubsListByResourceGroupSample.ts | 32 - .../typescript/src/virtualHubsListSample.ts | 29 - .../src/virtualHubsUpdateTagsSample.ts | 36 - ...alNetworkAppliancesCreateOrUpdateSample.ts | 44 - .../virtualNetworkAppliancesDeleteSample.ts | 31 - .../src/virtualNetworkAppliancesGetSample.ts | 31 - .../virtualNetworkAppliancesListAllSample.ts | 29 - .../src/virtualNetworkAppliancesListSample.ts | 32 - ...irtualNetworkAppliancesUpdateTagsSample.ts | 34 - ...kGatewayConnectionsCreateOrUpdateSample.ts | 121 - ...alNetworkGatewayConnectionsDeleteSample.ts | 32 - ...etworkGatewayConnectionsGetIkeSasSample.ts | 32 - ...rtualNetworkGatewayConnectionsGetSample.ts | 31 - ...orkGatewayConnectionsGetSharedKeySample.ts | 31 - ...tualNetworkGatewayConnectionsListSample.ts | 32 - ...GatewayConnectionsResetConnectionSample.ts | 32 - ...kGatewayConnectionsResetSharedKeySample.ts | 38 - ...orkGatewayConnectionsSetSharedKeySample.ts | 38 - ...ewayConnectionsStartPacketCaptureSample.ts | 65 - ...tewayConnectionsStopPacketCaptureSample.ts | 41 - ...tworkGatewayConnectionsUpdateTagsSample.ts | 35 - ...workGatewayNatRulesCreateOrUpdateSample.ts | 49 - ...rtualNetworkGatewayNatRulesDeleteSample.ts | 33 - .../virtualNetworkGatewayNatRulesGetSample.ts | 33 - ...tRulesListByVirtualNetworkGatewaySample.ts | 34 - ...tualNetworkGatewaysCreateOrUpdateSample.ts | 154 - .../src/virtualNetworkGatewaysDeleteSample.ts | 31 - ...rtualNetworkGatewayVpnConnectionsSample.ts | 41 - ...NetworkGatewaysGenerateVpnProfileSample.ts | 38 - ...kGatewaysGeneratevpnclientpackageSample.ts | 38 - ...etworkGatewaysGetAdvertisedRoutesSample.ts | 34 - ...alNetworkGatewaysGetBgpPeerStatusSample.ts | 32 - ...GatewaysGetFailoverAllTestDetailsSample.ts | 36 - ...ewaysGetFailoverSingleTestDetailsSample.ts | 36 - ...alNetworkGatewaysGetLearnedRoutesSample.ts | 32 - ...kGatewaysGetResiliencyInformationSample.ts | 40 - ...tworkGatewaysGetRoutesInformationSample.ts | 41 - .../src/virtualNetworkGatewaysGetSample.ts | 51 - ...rkGatewaysGetVpnProfilePackageUrlSample.ts | 32 - ...ewaysGetVpnclientConnectionHealthSample.ts | 33 - ...tewaysGetVpnclientIpsecParametersSample.ts | 32 - ...tworkGatewaysInvokeAbortMigrationSample.ts | 32 - ...workGatewaysInvokeCommitMigrationSample.ts | 32 - ...orkGatewaysInvokeExecuteMigrationSample.ts | 32 - ...orkGatewaysInvokePrepareMigrationSample.ts | 41 - ...ualNetworkGatewaysListConnectionsSample.ts | 34 - ...lNetworkGatewaysListRadiusSecretsSample.ts | 33 - .../src/virtualNetworkGatewaysListSample.ts | 32 - .../src/virtualNetworkGatewaysResetSample.ts | 31 - ...rkGatewaysResetVpnClientSharedKeySample.ts | 32 - ...tewaysSetVpnclientIpsecParametersSample.ts | 47 - ...xpressRouteSiteFailoverSimulationSample.ts | 34 - ...NetworkGatewaysStartPacketCaptureSample.ts | 66 - ...xpressRouteSiteFailoverSimulationSample.ts | 53 - ...lNetworkGatewaysStopPacketCaptureSample.ts | 41 - ...etworkGatewaysSupportedVpnDevicesSample.ts | 31 - .../virtualNetworkGatewaysUpdateTagsSample.ts | 34 - ...ewaysVpnDeviceConfigurationScriptSample.ts | 42 - ...tualNetworkPeeringsCreateOrUpdateSample.ts | 267 - .../src/virtualNetworkPeeringsDeleteSample.ts | 33 - .../src/virtualNetworkPeeringsGetSample.ts | 99 - .../src/virtualNetworkPeeringsListSample.ts | 57 - .../virtualNetworkTapsCreateOrUpdateSample.ts | 39 - .../src/virtualNetworkTapsDeleteSample.ts | 31 - .../src/virtualNetworkTapsGetSample.ts | 31 - .../src/virtualNetworkTapsListAllSample.ts | 29 - ...ualNetworkTapsListByResourceGroupSample.ts | 32 - .../src/virtualNetworkTapsUpdateTagsSample.ts | 36 - ...etworksCheckIPAddressAvailabilitySample.ts | 33 - .../virtualNetworksCreateOrUpdateSample.ts | 295 - .../src/virtualNetworksDeleteSample.ts | 31 - .../src/virtualNetworksGetSample.ts | 71 - .../src/virtualNetworksListAllSample.ts | 29 - ...lNetworksListDdosProtectionStatusSample.ts | 43 - .../src/virtualNetworksListSample.ts | 30 - .../src/virtualNetworksListUsageSample.ts | 34 - .../src/virtualNetworksUpdateTagsSample.ts | 34 - ...rtualRouterPeeringsCreateOrUpdateSample.ts | 42 - .../src/virtualRouterPeeringsDeleteSample.ts | 33 - .../src/virtualRouterPeeringsGetSample.ts | 33 - .../src/virtualRouterPeeringsListSample.ts | 34 - .../src/virtualRoutersCreateOrUpdateSample.ts | 40 - .../src/virtualRoutersDeleteSample.ts | 31 - .../typescript/src/virtualRoutersGetSample.ts | 31 - ...virtualRoutersListByResourceGroupSample.ts | 32 - .../src/virtualRoutersListSample.ts | 29 - .../src/virtualWansCreateOrUpdateSample.ts | 39 - .../typescript/src/virtualWansDeleteSample.ts | 31 - .../typescript/src/virtualWansGetSample.ts | 31 - .../virtualWansListByResourceGroupSample.ts | 32 - .../typescript/src/virtualWansListSample.ts | 29 - .../src/virtualWansUpdateTagsSample.ts | 36 - .../src/vpnConnectionsCreateOrUpdateSample.ts | 79 - .../src/vpnConnectionsDeleteSample.ts | 33 - .../typescript/src/vpnConnectionsGetSample.ts | 33 - .../vpnConnectionsListByVpnGatewaySample.ts | 34 - .../vpnConnectionsStartPacketCaptureSample.ts | 76 - .../vpnConnectionsStopPacketCaptureSample.ts | 45 - .../src/vpnGatewaysCreateOrUpdateSample.ts | 90 - .../typescript/src/vpnGatewaysDeleteSample.ts | 31 - .../typescript/src/vpnGatewaysGetSample.ts | 28 - .../vpnGatewaysListByResourceGroupSample.ts | 32 - .../typescript/src/vpnGatewaysListSample.ts | 29 - .../typescript/src/vpnGatewaysResetSample.ts | 31 - .../vpnGatewaysStartPacketCaptureSample.ts | 62 - .../src/vpnGatewaysStopPacketCaptureSample.ts | 42 - .../src/vpnGatewaysUpdateTagsSample.ts | 36 - ...pnLinkConnectionsGetAllSharedKeysSample.ts | 38 - ...inkConnectionsGetDefaultSharedKeySample.ts | 35 - .../src/vpnLinkConnectionsGetIkeSasSample.ts | 35 - ...inkConnectionsListByVpnConnectionSample.ts | 36 - ...nkConnectionsListDefaultSharedKeySample.ts | 35 - ...vpnLinkConnectionsResetConnectionSample.ts | 35 - ...nectionsSetOrInitDefaultSharedKeySample.ts | 44 - ...tionsAssociatedWithVirtualWanListSample.ts | 32 - ...erverConfigurationsCreateOrUpdateSample.ts | 115 - .../vpnServerConfigurationsDeleteSample.ts | 31 - .../src/vpnServerConfigurationsGetSample.ts | 31 - ...ConfigurationsListByResourceGroupSample.ts | 32 - ...erConfigurationsListRadiusSecretsSample.ts | 33 - .../src/vpnServerConfigurationsListSample.ts | 29 - ...vpnServerConfigurationsUpdateTagsSample.ts | 36 - .../src/vpnSiteLinkConnectionsGetSample.ts | 35 - .../typescript/src/vpnSiteLinksGetSample.ts | 33 - .../src/vpnSiteLinksListByVpnSiteSample.ts | 34 - .../vpnSitesConfigurationDownloadSample.ts | 43 - .../src/vpnSitesCreateOrUpdateSample.ts | 54 - .../typescript/src/vpnSitesDeleteSample.ts | 31 - .../v36/typescript/src/vpnSitesGetSample.ts | 28 - .../src/vpnSitesListByResourceGroupSample.ts | 32 - .../v36/typescript/src/vpnSitesListSample.ts | 29 - .../src/vpnSitesUpdateTagsSample.ts | 36 - ...ionFirewallPoliciesCreateOrUpdateSample.ts | 295 - ...ApplicationFirewallPoliciesDeleteSample.ts | 31 - ...webApplicationFirewallPoliciesGetSample.ts | 31 - ...pplicationFirewallPoliciesListAllSample.ts | 29 - ...ebApplicationFirewallPoliciesListSample.ts | 32 - .../typescript/src/webCategoriesGetSample.ts | 29 - .../webCategoriesListBySubscriptionSample.ts | 31 - .../samples/v36/typescript/tsconfig.json | 20 - .../src/api/adminRuleCollections/index.ts | 10 + .../api/adminRuleCollections/operations.ts | 283 + .../src/api/adminRuleCollections/options.ts | 26 + .../arm-network/src/api/adminRules/index.ts | 10 + .../src/api/adminRules/operations.ts | 304 + .../arm-network/src/api/adminRules/options.ts | 26 + .../index.ts | 10 + .../operations.ts | 281 + .../options.ts | 22 + .../index.ts | 5 + .../operations.ts | 76 + .../options.ts | 7 + .../index.ts | 5 + .../operations.ts | 73 + .../options.ts | 7 + .../index.ts | 5 + .../operations.ts | 63 + .../options.ts | 7 + .../src/api/applicationGateways/index.ts | 41 + .../src/api/applicationGateways/operations.ts | 936 + .../src/api/applicationGateways/options.ts | 77 + .../api/applicationSecurityGroups/index.ts | 12 + .../applicationSecurityGroups/operations.ts | 358 + .../api/applicationSecurityGroups/options.ts | 28 + .../src/api/availableDelegations/index.ts | 5 + .../api/availableDelegations/operations.ts | 73 + .../src/api/availableDelegations/options.ts | 7 + .../api/availableEndpointServices/index.ts | 5 + .../availableEndpointServices/operations.ts | 73 + .../api/availableEndpointServices/options.ts | 7 + .../availablePrivateEndpointTypes/index.ts | 8 + .../operations.ts | 130 + .../availablePrivateEndpointTypes/options.ts | 10 + .../index.ts | 5 + .../operations.ts | 76 + .../options.ts | 7 + .../src/api/availableServiceAliases/index.ts | 8 + .../api/availableServiceAliases/operations.ts | 130 + .../api/availableServiceAliases/options.ts | 10 + .../src/api/azureFirewallFqdnTags/index.ts | 5 + .../api/azureFirewallFqdnTags/operations.ts | 70 + .../src/api/azureFirewallFqdnTags/options.ts | 7 + .../src/api/azureFirewalls/index.ts | 25 + .../src/api/azureFirewalls/operations.ts | 542 + .../src/api/azureFirewalls/options.ts | 51 + .../arm-network/src/api/bastionHosts/index.ts | 19 + .../src/api/bastionHosts/operations.ts | 345 + .../src/api/bastionHosts/options.ts | 31 + .../src/api/bgpServiceCommunities/index.ts | 5 + .../api/bgpServiceCommunities/operations.ts | 70 + .../src/api/bgpServiceCommunities/options.ts | 7 + .../arm-network/src/api/commits/index.ts | 10 + .../arm-network/src/api/commits/operations.ts | 260 + .../arm-network/src/api/commits/options.ts | 27 + .../api/configurationPolicyGroups/index.ts | 10 + .../configurationPolicyGroups/operations.ts | 287 + .../api/configurationPolicyGroups/options.ts | 22 + .../src/api/connectionMonitors/index.ts | 12 + .../src/api/connectionMonitors/operations.ts | 387 + .../src/api/connectionMonitors/options.ts | 33 + .../src/api/connectionPolicies/index.ts | 10 + .../src/api/connectionPolicies/operations.ts | 263 + .../src/api/connectionPolicies/options.ts | 22 + .../api/connectivityConfigurations/index.ts | 10 + .../connectivityConfigurations/operations.ts | 264 + .../api/connectivityConfigurations/options.ts | 26 + .../src/api/customIPPrefixes/index.ts | 12 + .../src/api/customIPPrefixes/operations.ts | 351 + .../src/api/customIPPrefixes/options.ts | 31 + .../src/api/ddosCustomPolicies/index.ts | 12 + .../src/api/ddosCustomPolicies/operations.ts | 351 + .../src/api/ddosCustomPolicies/options.ts | 28 + .../src/api/ddosProtectionPlans/index.ts | 19 + .../src/api/ddosProtectionPlans/operations.ts | 351 + .../src/api/ddosProtectionPlans/options.ts | 28 + .../src/api/defaultSecurityRules/index.ts | 8 + .../api/defaultSecurityRules/operations.ts | 138 + .../src/api/defaultSecurityRules/options.ts | 10 + .../src/api/dscpConfiguration/index.ts | 11 + .../src/api/dscpConfiguration/operations.ts | 289 + .../src/api/dscpConfiguration/options.ts | 25 + .../index.ts | 10 + .../operations.ts | 268 + .../options.ts | 22 + .../expressRouteCircuitConnections/index.ts | 10 + .../operations.ts | 281 + .../expressRouteCircuitConnections/options.ts | 22 + .../api/expressRouteCircuitPeerings/index.ts | 10 + .../expressRouteCircuitPeerings/operations.ts | 261 + .../expressRouteCircuitPeerings/options.ts | 22 + .../src/api/expressRouteCircuits/index.ts | 37 + .../api/expressRouteCircuits/operations.ts | 1014 + .../src/api/expressRouteCircuits/options.ts | 80 + .../src/api/expressRouteConnections/index.ts | 10 + .../api/expressRouteConnections/operations.ts | 256 + .../api/expressRouteConnections/options.ts | 22 + .../index.ts | 10 + .../operations.ts | 271 + .../options.ts | 22 + .../api/expressRouteCrossConnections/index.ts | 23 + .../operations.ts | 538 + .../expressRouteCrossConnections/options.ts | 43 + .../src/api/expressRouteGateways/index.ts | 31 + .../api/expressRouteGateways/operations.ts | 775 + .../src/api/expressRouteGateways/options.ts | 75 + .../src/api/expressRouteLinks/index.ts | 8 + .../src/api/expressRouteLinks/operations.ts | 136 + .../src/api/expressRouteLinks/options.ts | 10 + .../expressRoutePortAuthorizations/index.ts | 10 + .../operations.ts | 265 + .../expressRoutePortAuthorizations/options.ts | 22 + .../src/api/expressRoutePorts/index.ts | 21 + .../src/api/expressRoutePorts/operations.ts | 413 + .../src/api/expressRoutePorts/options.ts | 31 + .../api/expressRoutePortsLocations/index.ts | 8 + .../expressRoutePortsLocations/operations.ts | 120 + .../api/expressRoutePortsLocations/options.ts | 10 + .../index.ts | 5 + .../operations.ts | 61 + .../options.ts | 10 + .../api/expressRouteServiceProviders/index.ts | 5 + .../operations.ts | 70 + .../expressRouteServiceProviders/options.ts | 7 + .../src/api/firewallPolicies/index.ts | 12 + .../src/api/firewallPolicies/operations.ts | 351 + .../src/api/firewallPolicies/options.ts | 31 + .../api/firewallPolicyDeployments/index.ts | 5 + .../firewallPolicyDeployments/operations.ts | 64 + .../api/firewallPolicyDeployments/options.ts | 10 + .../src/api/firewallPolicyDrafts/index.ts | 9 + .../api/firewallPolicyDrafts/operations.ts | 172 + .../src/api/firewallPolicyDrafts/options.ts | 13 + .../api/firewallPolicyIdpsSignatures/index.ts | 5 + .../operations.ts | 76 + .../firewallPolicyIdpsSignatures/options.ts | 7 + .../index.ts | 5 + .../operations.ts | 78 + .../options.ts | 7 + .../index.ts | 10 + .../operations.ts | 237 + .../options.ts | 16 + .../index.ts | 9 + .../operations.ts | 200 + .../options.ts | 13 + .../index.ts | 10 + .../operations.ts | 279 + .../options.ts | 22 + .../arm-network/src/api/flowLogs/index.ts | 11 + .../src/api/flowLogs/operations.ts | 320 + .../arm-network/src/api/flowLogs/options.ts | 25 + .../src/api/hubRouteTables/index.ts | 10 + .../src/api/hubRouteTables/operations.ts | 263 + .../src/api/hubRouteTables/options.ts | 22 + .../api/hubVirtualNetworkConnections/index.ts | 10 + .../operations.ts | 265 + .../hubVirtualNetworkConnections/options.ts | 22 + .../src/api/inboundNatRules/index.ts | 10 + .../src/api/inboundNatRules/operations.ts | 266 + .../src/api/inboundNatRules/options.ts | 25 + .../src/api/inboundSecurityRule/index.ts | 8 + .../src/api/inboundSecurityRule/operations.ts | 148 + .../src/api/inboundSecurityRule/options.ts | 13 + sdk/network/arm-network/src/api/index.ts | 40 + .../src/api/interconnectGroups/index.ts | 21 + .../src/api/interconnectGroups/operations.ts | 409 + .../src/api/interconnectGroups/options.ts | 28 + .../src/api/ipAllocations/index.ts | 19 + .../src/api/ipAllocations/operations.ts | 349 + .../src/api/ipAllocations/options.ts | 31 + .../arm-network/src/api/ipGroups/index.ts | 19 + .../src/api/ipGroups/operations.ts | 342 + .../arm-network/src/api/ipGroups/options.ts | 31 + .../arm-network/src/api/ipamPools/index.ts | 21 + .../src/api/ipamPools/operations.ts | 452 + .../arm-network/src/api/ipamPools/options.ts | 52 + .../loadBalancerBackendAddressPools/index.ts | 10 + .../operations.ts | 265 + .../options.ts | 22 + .../index.ts | 8 + .../operations.ts | 140 + .../options.ts | 10 + .../loadBalancerLoadBalancingRules/index.ts | 9 + .../operations.ts | 201 + .../loadBalancerLoadBalancingRules/options.ts | 16 + .../loadBalancerNetworkInterfaces/index.ts | 5 + .../operations.ts | 75 + .../loadBalancerNetworkInterfaces/options.ts | 7 + .../api/loadBalancerOutboundRules/index.ts | 8 + .../loadBalancerOutboundRules/operations.ts | 138 + .../api/loadBalancerOutboundRules/options.ts | 10 + .../src/api/loadBalancerProbes/index.ts | 8 + .../src/api/loadBalancerProbes/operations.ts | 128 + .../src/api/loadBalancerProbes/options.ts | 10 + .../src/api/loadBalancers/index.ts | 25 + .../src/api/loadBalancers/operations.ts | 551 + .../src/api/loadBalancers/options.ts | 55 + .../src/api/localNetworkGateways/index.ts | 11 + .../api/localNetworkGateways/operations.ts | 302 + .../src/api/localNetworkGateways/options.ts | 25 + .../index.ts | 10 + .../operations.ts | 241 + .../options.ts | 21 + .../arm-network/src/api/natGateways/index.ts | 12 + .../src/api/natGateways/operations.ts | 345 + .../src/api/natGateways/options.ts | 31 + .../arm-network/src/api/natRules/index.ts | 10 + .../src/api/natRules/operations.ts | 257 + .../arm-network/src/api/natRules/options.ts | 22 + .../src/api/networkGroups/index.ts | 10 + .../src/api/networkGroups/operations.ts | 266 + .../src/api/networkGroups/options.ts | 29 + .../networkInterfaceIPConfigurations/index.ts | 8 + .../operations.ts | 140 + .../options.ts | 10 + .../networkInterfaceLoadBalancers/index.ts | 5 + .../operations.ts | 75 + .../networkInterfaceLoadBalancers/options.ts | 7 + .../index.ts | 10 + .../operations.ts | 270 + .../options.ts | 22 + .../src/api/networkInterfaces/index.ts | 39 + .../src/api/networkInterfaces/operations.ts | 1035 + .../src/api/networkInterfaces/options.ts | 79 + .../src/api/networkManagementContext.ts | 48 + .../src/api/networkManagerCommits/index.ts | 5 + .../api/networkManagerCommits/operations.ts | 79 + .../src/api/networkManagerCommits/options.ts | 10 + .../networkManagerDeploymentStatus/index.ts | 5 + .../operations.ts | 79 + .../networkManagerDeploymentStatus/options.ts | 10 + .../index.ts | 10 + .../operations.ts | 264 + .../options.ts | 26 + .../src/api/networkManagers/index.ts | 12 + .../src/api/networkManagers/operations.ts | 353 + .../src/api/networkManagers/options.ts | 37 + .../src/api/networkProfiles/index.ts | 12 + .../src/api/networkProfiles/operations.ts | 351 + .../src/api/networkProfiles/options.ts | 28 + .../src/api/networkSecurityGroups/index.ts | 12 + .../api/networkSecurityGroups/operations.ts | 359 + .../src/api/networkSecurityGroups/options.ts | 31 + .../index.ts | 11 + .../operations.ts | 342 + .../options.ts | 24 + .../index.ts | 5 + .../operations.ts | 77 + .../options.ts | 7 + .../index.ts | 11 + .../operations.ts | 339 + .../options.ts | 30 + .../index.ts | 9 + .../operations.ts | 202 + .../options.ts | 21 + .../networkSecurityPerimeterLinks/index.ts | 10 + .../operations.ts | 254 + .../networkSecurityPerimeterLinks/options.ts | 24 + .../index.ts | 10 + .../operations.ts | 267 + .../options.ts | 16 + .../index.ts | 5 + .../operations.ts | 63 + .../options.ts | 7 + .../networkSecurityPerimeterProfiles/index.ts | 10 + .../operations.ts | 256 + .../options.ts | 21 + .../index.ts | 5 + .../operations.ts | 73 + .../options.ts | 7 + .../api/networkSecurityPerimeters/index.ts | 12 + .../networkSecurityPerimeters/operations.ts | 358 + .../api/networkSecurityPerimeters/options.ts | 37 + .../index.ts | 10 + .../operations.ts | 277 + .../options.ts | 22 + .../src/api/networkVirtualAppliances/index.ts | 25 + .../networkVirtualAppliances/operations.ts | 571 + .../api/networkVirtualAppliances/options.ts | 54 + .../src/api/networkWatchers/index.ts | 43 + .../src/api/networkWatchers/operations.ts | 1162 + .../src/api/networkWatchers/options.ts | 94 + sdk/network/arm-network/src/api/operations.ts | 954 + .../arm-network/src/api/operations/index.ts | 5 + .../src/api/operations/operations.ts | 69 + .../arm-network/src/api/operations/options.ts | 7 + sdk/network/arm-network/src/api/options.ts | 73 + .../src/api/p2SVpnGateways/index.ts | 29 + .../src/api/p2SVpnGateways/operations.ts | 679 + .../src/api/p2SVpnGateways/options.ts | 61 + .../src/api/packetCaptures/index.ts | 12 + .../src/api/packetCaptures/operations.ts | 379 + .../src/api/packetCaptures/options.ts | 34 + .../index.ts | 8 + .../operations.ts | 147 + .../options.ts | 10 + .../src/api/privateDnsZoneGroups/index.ts | 10 + .../api/privateDnsZoneGroups/operations.ts | 269 + .../src/api/privateDnsZoneGroups/options.ts | 22 + .../src/api/privateEndpoints/index.ts | 11 + .../src/api/privateEndpoints/operations.ts | 290 + .../src/api/privateEndpoints/options.ts | 28 + .../src/api/privateLinkServices/index.ts | 33 + .../src/api/privateLinkServices/operations.ts | 820 + .../src/api/privateLinkServices/options.ts | 64 + .../src/api/publicIPAddresses/index.ts | 37 + .../src/api/publicIPAddresses/operations.ts | 999 + .../src/api/publicIPAddresses/options.ts | 73 + .../src/api/publicIPPrefixes/index.ts | 12 + .../src/api/publicIPPrefixes/operations.ts | 351 + .../src/api/publicIPPrefixes/options.ts | 31 + .../api/reachabilityAnalysisIntents/index.ts | 10 + .../reachabilityAnalysisIntents/operations.ts | 279 + .../reachabilityAnalysisIntents/options.ts | 27 + .../src/api/reachabilityAnalysisRuns/index.ts | 10 + .../reachabilityAnalysisRuns/operations.ts | 287 + .../api/reachabilityAnalysisRuns/options.ts | 30 + .../src/api/resourceNavigationLinks/index.ts | 5 + .../api/resourceNavigationLinks/operations.ts | 75 + .../api/resourceNavigationLinks/options.ts | 7 + .../src/api/routeFilterRules/index.ts | 10 + .../src/api/routeFilterRules/operations.ts | 257 + .../src/api/routeFilterRules/options.ts | 22 + .../arm-network/src/api/routeFilters/index.ts | 19 + .../src/api/routeFilters/operations.ts | 352 + .../src/api/routeFilters/options.ts | 31 + .../arm-network/src/api/routeMaps/index.ts | 10 + .../src/api/routeMaps/operations.ts | 255 + .../arm-network/src/api/routeMaps/options.ts | 22 + .../arm-network/src/api/routeTables/index.ts | 12 + .../src/api/routeTables/operations.ts | 345 + .../src/api/routeTables/options.ts | 31 + .../arm-network/src/api/routes/index.ts | 10 + .../arm-network/src/api/routes/operations.ts | 252 + .../arm-network/src/api/routes/options.ts | 22 + .../src/api/routingIntent/index.ts | 10 + .../src/api/routingIntent/operations.ts | 263 + .../src/api/routingIntent/options.ts | 22 + .../src/api/routingRuleCollections/index.ts | 10 + .../api/routingRuleCollections/operations.ts | 285 + .../src/api/routingRuleCollections/options.ts | 26 + .../arm-network/src/api/routingRules/index.ts | 10 + .../src/api/routingRules/operations.ts | 303 + .../src/api/routingRules/options.ts | 26 + .../src/api/scopeConnections/index.ts | 10 + .../src/api/scopeConnections/operations.ts | 259 + .../src/api/scopeConnections/options.ts | 21 + .../api/securityAdminConfigurations/index.ts | 10 + .../securityAdminConfigurations/operations.ts | 264 + .../securityAdminConfigurations/options.ts | 26 + .../src/api/securityPartnerProviders/index.ts | 19 + .../securityPartnerProviders/operations.ts | 359 + .../api/securityPartnerProviders/options.ts | 28 + .../src/api/securityRules/index.ts | 10 + .../src/api/securityRules/operations.ts | 265 + .../src/api/securityRules/options.ts | 22 + .../api/securityUserConfigurations/index.ts | 10 + .../securityUserConfigurations/operations.ts | 264 + .../api/securityUserConfigurations/options.ts | 26 + .../api/securityUserRuleCollections/index.ts | 10 + .../securityUserRuleCollections/operations.ts | 285 + .../securityUserRuleCollections/options.ts | 26 + .../src/api/securityUserRules/index.ts | 10 + .../src/api/securityUserRules/operations.ts | 306 + .../src/api/securityUserRules/options.ts | 26 + .../src/api/serviceAssociationLinks/index.ts | 5 + .../api/serviceAssociationLinks/operations.ts | 75 + .../api/serviceAssociationLinks/options.ts | 7 + .../src/api/serviceEndpointPolicies/index.ts | 19 + .../api/serviceEndpointPolicies/operations.ts | 359 + .../api/serviceEndpointPolicies/options.ts | 31 + .../serviceEndpointPolicyDefinitions/index.ts | 10 + .../operations.ts | 280 + .../options.ts | 22 + .../src/api/serviceGateways/index.ts | 27 + .../src/api/serviceGateways/operations.ts | 615 + .../src/api/serviceGateways/options.ts | 46 + .../src/api/serviceTagInformation/index.ts | 5 + .../api/serviceTagInformation/operations.ts | 75 + .../src/api/serviceTagInformation/options.ts | 12 + .../arm-network/src/api/serviceTags/index.ts | 5 + .../src/api/serviceTags/operations.ts | 63 + .../src/api/serviceTags/options.ts | 7 + .../arm-network/src/api/staticCidrs/index.ts | 10 + .../src/api/staticCidrs/operations.ts | 276 + .../src/api/staticCidrs/options.ts | 34 + .../src/api/staticMembers/index.ts | 10 + .../src/api/staticMembers/operations.ts | 274 + .../src/api/staticMembers/options.ts | 21 + .../arm-network/src/api/subgroups/index.ts | 5 + .../src/api/subgroups/operations.ts | 129 + .../arm-network/src/api/subgroups/options.ts | 10 + .../arm-network/src/api/subnets/index.ts | 19 + .../arm-network/src/api/subnets/operations.ts | 408 + .../arm-network/src/api/subnets/options.ts | 37 + .../index.ts | 10 + .../operations.ts | 227 + .../options.ts | 21 + .../arm-network/src/api/usages/index.ts | 5 + .../arm-network/src/api/usages/operations.ts | 71 + .../arm-network/src/api/usages/options.ts | 7 + .../src/api/verifierWorkspaces/index.ts | 11 + .../src/api/verifierWorkspaces/operations.ts | 340 + .../src/api/verifierWorkspaces/options.ts | 44 + .../arm-network/src/api/vipSwap/index.ts | 9 + .../arm-network/src/api/vipSwap/operations.ts | 179 + .../arm-network/src/api/vipSwap/options.ts | 16 + .../src/api/virtualApplianceSites/index.ts | 10 + .../api/virtualApplianceSites/operations.ts | 265 + .../src/api/virtualApplianceSites/options.ts | 22 + .../src/api/virtualApplianceSkus/index.ts | 8 + .../api/virtualApplianceSkus/operations.ts | 122 + .../src/api/virtualApplianceSkus/options.ts | 10 + .../src/api/virtualHubBgpConnection/index.ts | 9 + .../api/virtualHubBgpConnection/operations.ts | 202 + .../api/virtualHubBgpConnection/options.ts | 19 + .../src/api/virtualHubBgpConnections/index.ts | 9 + .../virtualHubBgpConnections/operations.ts | 200 + .../api/virtualHubBgpConnections/options.ts | 19 + .../api/virtualHubIpConfiguration/index.ts | 10 + .../virtualHubIpConfiguration/operations.ts | 257 + .../api/virtualHubIpConfiguration/options.ts | 22 + .../src/api/virtualHubRouteTableV2S/index.ts | 10 + .../api/virtualHubRouteTableV2S/operations.ts | 266 + .../api/virtualHubRouteTableV2S/options.ts | 22 + .../arm-network/src/api/virtualHubs/index.ts | 25 + .../src/api/virtualHubs/operations.ts | 558 + .../src/api/virtualHubs/options.ts | 49 + .../src/api/virtualNetworkAppliances/index.ts | 12 + .../virtualNetworkAppliances/operations.ts | 359 + .../api/virtualNetworkAppliances/options.ts | 28 + .../virtualNetworkGatewayConnections/index.ts | 31 + .../operations.ts | 793 + .../options.ts | 70 + .../virtualNetworkGatewayNatRules/index.ts | 10 + .../operations.ts | 275 + .../virtualNetworkGatewayNatRules/options.ts | 22 + .../src/api/virtualNetworkGateways/index.ts | 73 + .../api/virtualNetworkGateways/operations.ts | 2181 + .../src/api/virtualNetworkGateways/options.ts | 195 + .../src/api/virtualNetworkPeerings/index.ts | 10 + .../api/virtualNetworkPeerings/operations.ts | 274 + .../src/api/virtualNetworkPeerings/options.ts | 25 + .../src/api/virtualNetworkTaps/index.ts | 19 + .../src/api/virtualNetworkTaps/operations.ts | 343 + .../src/api/virtualNetworkTaps/options.ts | 28 + .../src/api/virtualNetworks/index.ts | 25 + .../src/api/virtualNetworks/operations.ts | 546 + .../src/api/virtualNetworks/options.ts | 47 + .../src/api/virtualRouterPeerings/index.ts | 10 + .../api/virtualRouterPeerings/operations.ts | 267 + .../src/api/virtualRouterPeerings/options.ts | 22 + .../src/api/virtualRouters/index.ts | 11 + .../src/api/virtualRouters/operations.ts | 289 + .../src/api/virtualRouters/options.ts | 28 + .../arm-network/src/api/virtualWans/index.ts | 19 + .../src/api/virtualWans/operations.ts | 346 + .../src/api/virtualWans/options.ts | 28 + .../src/api/vpnConnections/index.ts | 19 + .../src/api/vpnConnections/operations.ts | 401 + .../src/api/vpnConnections/options.ts | 42 + .../arm-network/src/api/vpnGateways/index.ts | 25 + .../src/api/vpnGateways/operations.ts | 538 + .../src/api/vpnGateways/options.ts | 59 + .../src/api/vpnLinkConnections/index.ts | 21 + .../src/api/vpnLinkConnections/operations.ts | 504 + .../src/api/vpnLinkConnections/options.ts | 34 + .../src/api/vpnServerConfigurations/index.ts | 21 + .../api/vpnServerConfigurations/operations.ts | 414 + .../api/vpnServerConfigurations/options.ts | 31 + .../index.ts | 5 + .../operations.ts | 80 + .../options.ts | 10 + .../src/api/vpnSiteLinkConnections/index.ts | 5 + .../api/vpnSiteLinkConnections/operations.ts | 79 + .../src/api/vpnSiteLinkConnections/options.ts | 7 + .../arm-network/src/api/vpnSiteLinks/index.ts | 8 + .../src/api/vpnSiteLinks/operations.ts | 130 + .../src/api/vpnSiteLinks/options.ts | 10 + .../arm-network/src/api/vpnSites/index.ts | 19 + .../src/api/vpnSites/operations.ts | 344 + .../arm-network/src/api/vpnSites/options.ts | 28 + .../src/api/vpnSitesConfiguration/index.ts | 5 + .../api/vpnSitesConfiguration/operations.ts | 75 + .../src/api/vpnSitesConfiguration/options.ts | 10 + .../webApplicationFirewallPolicies/index.ts | 11 + .../operations.ts | 288 + .../webApplicationFirewallPolicies/options.ts | 22 + .../src/api/webCategories/index.ts | 8 + .../src/api/webCategories/operations.ts | 119 + .../src/api/webCategories/options.ts | 13 + .../src/classic/adminRuleCollections/index.ts | 167 + .../src/classic/adminRules/index.ts | 190 + .../index.ts | 199 + .../index.ts | 36 + .../index.ts | 32 + .../index.ts | 33 + .../src/classic/applicationGateways/index.ts | 453 + .../applicationSecurityGroups/index.ts | 178 + .../src/classic/availableDelegations/index.ts | 32 + .../availableEndpointServices/index.ts | 32 + .../availablePrivateEndpointTypes/index.ts | 46 + .../index.ts | 36 + .../classic/availableServiceAliases/index.ts | 46 + .../classic/azureFirewallFqdnTags/index.ts | 30 + .../src/classic/azureFirewalls/index.ts | 378 + .../src/classic/bastionHosts/index.ts | 199 + .../classic/bgpServiceCommunities/index.ts | 30 + .../arm-network/src/classic/commits/index.ts | 165 + .../configurationPolicyGroups/index.ts | 214 + .../src/classic/connectionMonitors/index.ts | 279 + .../src/classic/connectionPolicies/index.ts | 186 + .../connectivityConfigurations/index.ts | 141 + .../src/classic/customIPPrefixes/index.ts | 173 + .../src/classic/ddosCustomPolicies/index.ts | 173 + .../src/classic/ddosProtectionPlans/index.ts | 175 + .../src/classic/defaultSecurityRules/index.ts | 53 + .../src/classic/dscpConfiguration/index.ts | 158 + .../index.ts | 187 + .../expressRouteCircuitConnections/index.ts | 214 + .../expressRouteCircuitPeerings/index.ts | 181 + .../src/classic/expressRouteCircuits/index.ts | 749 + .../classic/expressRouteConnections/index.ts | 193 + .../index.ts | 187 + .../expressRouteCrossConnections/index.ts | 398 + .../src/classic/expressRouteGateways/index.ts | 647 + .../src/classic/expressRouteLinks/index.ts | 52 + .../expressRoutePortAuthorizations/index.ts | 193 + .../src/classic/expressRoutePorts/index.ts | 195 + .../expressRoutePortsLocations/index.ts | 40 + .../index.ts | 29 + .../expressRouteServiceProviders/index.ts | 30 + .../src/classic/firewallPolicies/index.ts | 173 + .../firewallPolicyDeployments/index.ts | 64 + .../src/classic/firewallPolicyDrafts/index.ts | 63 + .../firewallPolicyIdpsSignatures/index.ts | 37 + .../index.ts | 40 + .../index.ts | 85 + .../index.ts | 81 + .../index.ts | 199 + .../arm-network/src/classic/flowLogs/index.ts | 190 + .../src/classic/hubRouteTables/index.ts | 174 + .../hubVirtualNetworkConnections/index.ts | 181 + .../src/classic/inboundNatRules/index.ts | 186 + .../src/classic/inboundSecurityRule/index.ts | 115 + sdk/network/arm-network/src/classic/index.ts | 165 + .../src/classic/interconnectGroups/index.ts | 159 + .../src/classic/ipAllocations/index.ts | 173 + .../arm-network/src/classic/ipGroups/index.ts | 156 + .../src/classic/ipamPools/index.ts | 207 + .../loadBalancerBackendAddressPools/index.ts | 191 + .../index.ts | 52 + .../loadBalancerLoadBalancingRules/index.ts | 103 + .../loadBalancerNetworkInterfaces/index.ts | 36 + .../loadBalancerOutboundRules/index.ts | 52 + .../src/classic/loadBalancerProbes/index.ts | 52 + .../src/classic/loadBalancers/index.ts | 317 + .../src/classic/localNetworkGateways/index.ts | 166 + .../index.ts | 80 + .../src/classic/natGateways/index.ts | 166 + .../arm-network/src/classic/natRules/index.ts | 172 + .../src/classic/networkGroups/index.ts | 136 + .../networkInterfaceIPConfigurations/index.ts | 52 + .../networkInterfaceLoadBalancers/index.ts | 36 + .../index.ts | 199 + .../src/classic/networkInterfaces/index.ts | 470 + .../classic/networkManagerCommits/index.ts | 71 + .../networkManagerDeploymentStatus/index.ts | 40 + .../index.ts | 141 + .../src/classic/networkManagers/index.ts | 130 + .../src/classic/networkProfiles/index.ts | 129 + .../classic/networkSecurityGroups/index.ts | 174 + .../index.ts | 148 + .../index.ts | 34 + .../index.ts | 217 + .../index.ts | 113 + .../networkSecurityPerimeterLinks/index.ts | 141 + .../index.ts | 109 + .../index.ts | 35 + .../networkSecurityPerimeterProfiles/index.ts | 95 + .../index.ts | 32 + .../networkSecurityPerimeters/index.ts | 134 + .../index.ts | 199 + .../classic/networkVirtualAppliances/index.ts | 354 + .../src/classic/networkWatchers/index.ts | 838 + .../src/classic/operations/index.ts | 26 + .../src/classic/p2SVpnGateways/index.ts | 480 + .../src/classic/packetCaptures/index.ts | 309 + .../index.ts | 56 + .../src/classic/privateDnsZoneGroups/index.ts | 186 + .../src/classic/privateEndpoints/index.ts | 159 + .../src/classic/privateLinkServices/index.ts | 419 + .../src/classic/publicIPAddresses/index.ts | 510 + .../src/classic/publicIPPrefixes/index.ts | 173 + .../reachabilityAnalysisIntents/index.ts | 115 + .../classic/reachabilityAnalysisRuns/index.ts | 167 + .../classic/resourceNavigationLinks/index.ts | 37 + .../src/classic/routeFilterRules/index.ts | 179 + .../src/classic/routeFilters/index.ts | 174 + .../src/classic/routeMaps/index.ts | 172 + .../src/classic/routeTables/index.ts | 166 + .../arm-network/src/classic/routes/index.ts | 169 + .../src/classic/routingIntent/index.ts | 180 + .../classic/routingRuleCollections/index.ts | 167 + .../src/classic/routingRules/index.ts | 192 + .../src/classic/scopeConnections/index.ts | 90 + .../securityAdminConfigurations/index.ts | 141 + .../classic/securityPartnerProviders/index.ts | 176 + .../src/classic/securityRules/index.ts | 186 + .../securityUserConfigurations/index.ts | 141 + .../securityUserRuleCollections/index.ts | 172 + .../src/classic/securityUserRules/index.ts | 192 + .../classic/serviceAssociationLinks/index.ts | 37 + .../classic/serviceEndpointPolicies/index.ts | 176 + .../serviceEndpointPolicyDefinitions/index.ts | 210 + .../src/classic/serviceGateways/index.ts | 343 + .../classic/serviceTagInformation/index.ts | 32 + .../src/classic/serviceTags/index.ts | 31 + .../src/classic/staticCidrs/index.ts | 140 + .../src/classic/staticMembers/index.ts | 115 + .../src/classic/subgroups/index.ts | 50 + .../arm-network/src/classic/subnets/index.ts | 331 + .../index.ts | 70 + .../arm-network/src/classic/usages/index.ts | 27 + .../src/classic/verifierWorkspaces/index.ts | 136 + .../arm-network/src/classic/vipSwap/index.ts | 89 + .../classic/virtualApplianceSites/index.ts | 186 + .../src/classic/virtualApplianceSkus/index.ts | 40 + .../classic/virtualHubBgpConnection/index.ts | 161 + .../classic/virtualHubBgpConnections/index.ts | 158 + .../virtualHubIpConfiguration/index.ts | 172 + .../classic/virtualHubRouteTableV2S/index.ts | 179 + .../src/classic/virtualHubs/index.ts | 369 + .../classic/virtualNetworkAppliances/index.ts | 174 + .../virtualNetworkGatewayConnections/index.ts | 648 + .../virtualNetworkGatewayNatRules/index.ts | 194 + .../classic/virtualNetworkGateways/index.ts | 1765 + .../classic/virtualNetworkPeerings/index.ts | 187 + .../src/classic/virtualNetworkTaps/index.ts | 164 + .../src/classic/virtualNetworks/index.ts | 240 + .../classic/virtualRouterPeerings/index.ts | 174 + .../src/classic/virtualRouters/index.ts | 158 + .../src/classic/virtualWans/index.ts | 173 + .../src/classic/vpnConnections/index.ts | 317 + .../src/classic/vpnGateways/index.ts | 357 + .../src/classic/vpnLinkConnections/index.ts | 367 + .../classic/vpnServerConfigurations/index.ts | 206 + .../index.ts | 70 + .../classic/vpnSiteLinkConnections/index.ts | 39 + .../src/classic/vpnSiteLinks/index.ts | 52 + .../arm-network/src/classic/vpnSites/index.ts | 168 + .../classic/vpnSitesConfiguration/index.ts | 71 + .../webApplicationFirewallPolicies/index.ts | 115 + .../src/classic/webCategories/index.ts | 37 + sdk/network/arm-network/src/index.ts | 2732 +- sdk/network/arm-network/src/logger.ts | 5 + sdk/network/arm-network/src/lroImpl.ts | 34 - .../arm-network/src/models/common/index.ts | 212 + .../arm-network/src/models/common/models.ts | 8838 ++++ sdk/network/arm-network/src/models/index.ts | 28014 +--------- sdk/network/arm-network/src/models/mappers.ts | 37592 ------------- .../src/models/microsoft/network/index.ts | 1265 + .../src/models/microsoft/network/models.ts | 43521 ++++++++++++++++ sdk/network/arm-network/src/models/models.ts | 1693 + .../arm-network/src/models/parameters.ts | 3150 -- .../src/networkManagementClient.ts | 3527 +- .../src/operations/adminRuleCollections.ts | 452 - .../arm-network/src/operations/adminRules.ts | 494 - ...cationGatewayPrivateEndpointConnections.ts | 489 - .../applicationGatewayPrivateLinkResources.ts | 186 - .../applicationGatewayWafDynamicManifests.ts | 157 - ...cationGatewayWafDynamicManifestsDefault.ts | 59 - .../src/operations/applicationGateways.ts | 1342 - .../operations/applicationSecurityGroups.ts | 592 - .../src/operations/availableDelegations.ts | 157 - .../operations/availableEndpointServices.ts | 157 - .../availablePrivateEndpointTypes.ts | 314 - .../availableResourceGroupDelegations.ts | 177 - .../src/operations/availableServiceAliases.ts | 310 - .../src/operations/azureFirewallFqdnTags.ts | 144 - .../src/operations/azureFirewalls.ts | 1049 - .../src/operations/bastionHosts.ts | 667 - .../src/operations/bgpServiceCommunities.ts | 144 - .../operations/configurationPolicyGroups.ts | 508 - .../src/operations/connectionMonitors.ts | 592 - .../operations/connectivityConfigurations.ts | 403 - .../src/operations/customIPPrefixes.ts | 587 - .../src/operations/ddosCustomPolicies.ts | 346 - .../src/operations/ddosProtectionPlans.ts | 590 - .../src/operations/defaultSecurityRules.ts | 234 - .../operations/dscpConfigurationOperations.ts | 542 - .../expressRouteCircuitAuthorizations.ts | 475 - .../expressRouteCircuitConnections.ts | 518 - .../operations/expressRouteCircuitPeerings.ts | 470 - .../src/operations/expressRouteCircuits.ts | 1093 - .../src/operations/expressRouteConnections.ts | 373 - .../expressRouteCrossConnectionPeerings.ts | 480 - .../expressRouteCrossConnections.ts | 916 - .../src/operations/expressRouteGateways.ts | 507 - .../src/operations/expressRouteLinks.ts | 229 - .../expressRoutePortAuthorizations.ts | 489 - .../src/operations/expressRoutePorts.ts | 635 - .../operations/expressRoutePortsLocations.ts | 177 - .../expressRouteProviderPortsLocation.ts | 57 - .../expressRouteServiceProviders.ts | 144 - .../src/operations/firewallPolicies.ts | 587 - .../operations/firewallPolicyDeployments.ts | 149 - .../src/operations/firewallPolicyDrafts.ts | 155 - .../firewallPolicyIdpsSignatures.ts | 75 - ...irewallPolicyIdpsSignaturesFilterValues.ts | 74 - .../firewallPolicyIdpsSignaturesOverrides.ts | 198 - ...firewallPolicyRuleCollectionGroupDrafts.ts | 181 - .../firewallPolicyRuleCollectionGroups.ts | 490 - .../arm-network/src/operations/flowLogs.ts | 529 - .../src/operations/hubRouteTables.ts | 473 - .../hubVirtualNetworkConnections.ts | 475 - .../src/operations/inboundNatRules.ts | 485 - .../inboundSecurityRuleOperations.ts | 223 - .../arm-network/src/operations/index.ts | 164 - .../src/operations/ipAllocations.ts | 586 - .../arm-network/src/operations/ipGroups.ts | 583 - .../arm-network/src/operations/ipamPools.ts | 752 - .../loadBalancerBackendAddressPools.ts | 485 - .../loadBalancerFrontendIPConfigurations.ts | 230 - .../loadBalancerLoadBalancingRules.ts | 355 - .../loadBalancerNetworkInterfaces.ts | 182 - .../operations/loadBalancerOutboundRules.ts | 225 - .../src/operations/loadBalancerProbes.ts | 225 - .../src/operations/loadBalancers.ts | 868 - .../src/operations/localNetworkGateways.ts | 476 - ...anagementGroupNetworkManagerConnections.ts | 283 - .../arm-network/src/operations/natGateways.ts | 587 - .../arm-network/src/operations/natRules.ts | 476 - .../src/operations/networkGroups.ts | 401 - .../networkInterfaceIPConfigurations.ts | 229 - .../networkInterfaceLoadBalancers.ts | 186 - .../networkInterfaceTapConfigurations.ts | 494 - .../src/operations/networkInterfaces.ts | 1915 - .../src/operations/networkManagerCommits.ts | 156 - ...etworkManagerDeploymentStatusOperations.ts | 74 - .../networkManagerRoutingConfigurations.ts | 399 - .../src/operations/networkManagers.ts | 509 - .../src/operations/networkProfiles.ts | 506 - .../src/operations/networkSecurityGroups.ts | 592 - .../networkSecurityPerimeterAccessRules.ts | 441 - ...ecurityPerimeterAssociableResourceTypes.ts | 159 - .../networkSecurityPerimeterAssociations.ts | 552 - .../networkSecurityPerimeterLinkReferences.ts | 357 - .../networkSecurityPerimeterLinks.ts | 408 - ...kSecurityPerimeterLoggingConfigurations.ts | 344 - ...tworkSecurityPerimeterOperationStatuses.ts | 66 - .../networkSecurityPerimeterProfiles.ts | 331 - .../networkSecurityPerimeterServiceTags.ts | 159 - .../operations/networkSecurityPerimeters.ts | 509 - .../networkVirtualApplianceConnections.ts | 501 - .../operations/networkVirtualAppliances.ts | 969 - .../src/operations/networkWatchers.ts | 1891 - .../arm-network/src/operations/operations.ts | 140 - .../src/operations/p2SVpnGateways.ts | 1293 - .../src/operations/packetCaptures.ts | 667 - .../peerExpressRouteCircuitConnections.ts | 246 - .../src/operations/privateDnsZoneGroups.ts | 488 - .../src/operations/privateEndpoints.ts | 545 - .../src/operations/privateLinkServices.ts | 1464 - .../src/operations/publicIPAddresses.ts | 1886 - .../src/operations/publicIPPrefixes.ts | 587 - .../operations/reachabilityAnalysisIntents.ts | 379 - .../operations/reachabilityAnalysisRuns.ts | 471 - .../src/operations/resourceNavigationLinks.ts | 72 - .../src/operations/routeFilterRules.ts | 484 - .../src/operations/routeFilters.ts | 591 - .../arm-network/src/operations/routeMaps.ts | 468 - .../arm-network/src/operations/routeTables.ts | 587 - .../arm-network/src/operations/routes.ts | 465 - .../src/operations/routingIntentOperations.ts | 473 - .../src/operations/routingRuleCollections.ts | 452 - .../src/operations/routingRules.ts | 494 - .../src/operations/scopeConnections.ts | 322 - .../operations/securityAdminConfigurations.ts | 401 - .../operations/securityPartnerProviders.ts | 595 - .../src/operations/securityRules.ts | 494 - .../operations/securityUserConfigurations.ts | 401 - .../operations/securityUserRuleCollections.ts | 452 - .../src/operations/securityUserRules.ts | 494 - .../src/operations/serviceAssociationLinks.ts | 72 - .../src/operations/serviceEndpointPolicies.ts | 595 - .../serviceEndpointPolicyDefinitions.ts | 507 - .../src/operations/serviceGateways.ts | 1206 - .../serviceTagInformationOperations.ts | 163 - .../arm-network/src/operations/serviceTags.ts | 58 - .../arm-network/src/operations/staticCidrs.ts | 459 - .../src/operations/staticMembers.ts | 377 - .../arm-network/src/operations/subnets.ts | 727 - .../subscriptionNetworkManagerConnections.ts | 260 - .../arm-network/src/operations/usages.ts | 154 - .../src/operations/verifierWorkspaces.ts | 457 - .../arm-network/src/operations/vipSwap.ts | 221 - .../src/operations/virtualApplianceSites.ts | 494 - .../src/operations/virtualApplianceSkus.ts | 174 - .../src/operations/virtualHubBgpConnection.ts | 328 - .../operations/virtualHubBgpConnections.ts | 514 - .../operations/virtualHubIpConfiguration.ts | 470 - .../src/operations/virtualHubRouteTableV2S.ts | 477 - .../arm-network/src/operations/virtualHubs.ts | 986 - .../operations/virtualNetworkAppliances.ts | 609 - .../virtualNetworkGatewayConnections.ts | 1387 - .../virtualNetworkGatewayNatRules.ts | 503 - .../src/operations/virtualNetworkGateways.ts | 3983 -- .../src/operations/virtualNetworkPeerings.ts | 490 - .../src/operations/virtualNetworkTaps.ts | 585 - .../src/operations/virtualNetworks.ts | 1015 - .../src/operations/virtualRouterPeerings.ts | 478 - .../src/operations/virtualRouters.ts | 543 - .../arm-network/src/operations/virtualWans.ts | 586 - .../src/operations/vpnConnections.ts | 737 - .../arm-network/src/operations/vpnGateways.ts | 1017 - .../src/operations/vpnLinkConnections.ts | 945 - .../src/operations/vpnServerConfigurations.ts | 644 - ...rConfigurationsAssociatedWithVirtualWan.ts | 149 - .../src/operations/vpnSiteLinkConnections.ts | 81 - .../src/operations/vpnSiteLinks.ts | 229 - .../arm-network/src/operations/vpnSites.ts | 583 - .../src/operations/vpnSitesConfiguration.ts | 139 - .../webApplicationFirewallPolicies.ts | 461 - .../src/operations/webCategories.ts | 174 - .../adminRuleCollections.ts | 97 - .../src/operationsInterfaces/adminRules.ts | 107 - ...cationGatewayPrivateEndpointConnections.ts | 109 - .../applicationGatewayPrivateLinkResources.ts | 27 - .../applicationGatewayWafDynamicManifests.ts | 25 - ...cationGatewayWafDynamicManifestsDefault.ts | 23 - .../applicationGateways.ts | 295 - .../applicationSecurityGroups.ts | 119 - .../availableDelegations.ts | 25 - .../availableEndpointServices.ts | 25 - .../availablePrivateEndpointTypes.ts | 39 - .../availableResourceGroupDelegations.ts | 27 - .../availableServiceAliases.ts | 37 - .../azureFirewallFqdnTags.ts | 23 - .../operationsInterfaces/azureFirewalls.ts | 231 - .../src/operationsInterfaces/bastionHosts.ts | 132 - .../bgpServiceCommunities.ts | 23 - .../configurationPolicyGroups.ts | 109 - .../connectionMonitors.ts | 153 - .../connectivityConfigurations.ts | 91 - .../operationsInterfaces/customIPPrefixes.ts | 119 - .../ddosCustomPolicies.ts | 99 - .../ddosProtectionPlans.ts | 119 - .../defaultSecurityRules.ts | 42 - .../dscpConfigurationOperations.ts | 103 - .../expressRouteCircuitAuthorizations.ts | 109 - .../expressRouteCircuitConnections.ts | 121 - .../expressRouteCircuitPeerings.ts | 109 - .../expressRouteCircuits.ts | 264 - .../expressRouteConnections.ts | 108 - .../expressRouteCrossConnectionPeerings.ts | 109 - .../expressRouteCrossConnections.ts | 211 - .../expressRouteGateways.ts | 143 - .../operationsInterfaces/expressRouteLinks.ts | 42 - .../expressRoutePortAuthorizations.ts | 109 - .../operationsInterfaces/expressRoutePorts.ts | 133 - .../expressRoutePortsLocations.ts | 36 - .../expressRouteProviderPortsLocation.ts | 21 - .../expressRouteServiceProviders.ts | 23 - .../operationsInterfaces/firewallPolicies.ts | 119 - .../firewallPolicyDeployments.ts | 42 - .../firewallPolicyDrafts.ts | 53 - .../firewallPolicyIdpsSignatures.ts | 29 - ...irewallPolicyIdpsSignaturesFilterValues.ts | 28 - .../firewallPolicyIdpsSignaturesOverrides.ts | 69 - ...firewallPolicyRuleCollectionGroupDrafts.ts | 60 - .../firewallPolicyRuleCollectionGroups.ts | 109 - .../src/operationsInterfaces/flowLogs.ts | 122 - .../operationsInterfaces/hubRouteTables.ts | 107 - .../hubVirtualNetworkConnections.ts | 109 - .../operationsInterfaces/inboundNatRules.ts | 109 - .../inboundSecurityRuleOperations.ts | 68 - .../src/operationsInterfaces/index.ts | 164 - .../src/operationsInterfaces/ipAllocations.ts | 117 - .../src/operationsInterfaces/ipGroups.ts | 114 - .../src/operationsInterfaces/ipamPools.ts | 148 - .../loadBalancerBackendAddressPools.ts | 109 - .../loadBalancerFrontendIPConfigurations.ts | 42 - .../loadBalancerLoadBalancingRules.ts | 76 - .../loadBalancerNetworkInterfaces.ts | 27 - .../loadBalancerOutboundRules.ts | 42 - .../loadBalancerProbes.ts | 42 - .../src/operationsInterfaces/loadBalancers.ts | 192 - .../localNetworkGateways.ts | 111 - ...anagementGroupNetworkManagerConnections.ts | 69 - .../src/operationsInterfaces/natGateways.ts | 117 - .../src/operationsInterfaces/natRules.ts | 106 - .../src/operationsInterfaces/networkGroups.ts | 87 - .../networkInterfaceIPConfigurations.ts | 42 - .../networkInterfaceLoadBalancers.ts | 27 - .../networkInterfaceTapConfigurations.ts | 109 - .../operationsInterfaces/networkInterfaces.ts | 299 - .../networkManagerCommits.ts | 47 - ...etworkManagerDeploymentStatusOperations.ts | 28 - .../networkManagerRoutingConfigurations.ts | 87 - .../operationsInterfaces/networkManagers.ts | 101 - .../operationsInterfaces/networkProfiles.ts | 101 - .../networkSecurityGroups.ts | 119 - .../networkSecurityPerimeterAccessRules.ts | 100 - ...ecurityPerimeterAssociableResourceTypes.ts | 26 - .../networkSecurityPerimeterAssociations.ts | 124 - .../networkSecurityPerimeterLinkReferences.ts | 70 - .../networkSecurityPerimeterLinks.ts | 87 - ...kSecurityPerimeterLoggingConfigurations.ts | 76 - ...tworkSecurityPerimeterOperationStatuses.ts | 25 - .../networkSecurityPerimeterProfiles.ts | 73 - .../networkSecurityPerimeterServiceTags.ts | 26 - .../networkSecurityPerimeters.ts | 101 - .../networkVirtualApplianceConnections.ts | 111 - .../networkVirtualAppliances.ts | 213 - .../operationsInterfaces/networkWatchers.ts | 507 - .../src/operationsInterfaces/operations.ts | 18 - .../operationsInterfaces/p2SVpnGateways.ts | 292 - .../operationsInterfaces/packetCaptures.ts | 165 - .../peerExpressRouteCircuitConnections.ts | 47 - .../privateDnsZoneGroups.ts | 107 - .../operationsInterfaces/privateEndpoints.ts | 103 - .../privateLinkServices.ts | 264 - .../operationsInterfaces/publicIPAddresses.ts | 328 - .../operationsInterfaces/publicIPPrefixes.ts | 119 - .../reachabilityAnalysisIntents.ts | 81 - .../reachabilityAnalysisRuns.ts | 103 - .../resourceNavigationLinks.ts | 27 - .../operationsInterfaces/routeFilterRules.ts | 109 - .../src/operationsInterfaces/routeFilters.ts | 117 - .../src/operationsInterfaces/routeMaps.ts | 107 - .../src/operationsInterfaces/routeTables.ts | 117 - .../src/operationsInterfaces/routes.ts | 104 - .../routingIntentOperations.ts | 107 - .../routingRuleCollections.ts | 97 - .../src/operationsInterfaces/routingRules.ts | 107 - .../operationsInterfaces/scopeConnections.ts | 73 - .../securityAdminConfigurations.ts | 88 - .../securityPartnerProviders.ts | 119 - .../src/operationsInterfaces/securityRules.ts | 109 - .../securityUserConfigurations.ts | 88 - .../securityUserRuleCollections.ts | 97 - .../operationsInterfaces/securityUserRules.ts | 107 - .../serviceAssociationLinks.ts | 27 - .../serviceEndpointPolicies.ts | 119 - .../serviceEndpointPolicyDefinitions.ts | 109 - .../operationsInterfaces/serviceGateways.ts | 250 - .../serviceTagInformationOperations.ts | 27 - .../src/operationsInterfaces/serviceTags.ts | 19 - .../src/operationsInterfaces/staticCidrs.ts | 98 - .../src/operationsInterfaces/staticMembers.ts | 81 - .../src/operationsInterfaces/subnets.ts | 172 - .../subscriptionNetworkManagerConnections.ts | 57 - .../src/operationsInterfaces/usages.ts | 19 - .../verifierWorkspaces.ts | 108 - .../src/operationsInterfaces/vipSwap.ts | 71 - .../virtualApplianceSites.ts | 109 - .../virtualApplianceSkus.ts | 34 - .../virtualHubBgpConnection.ts | 95 - .../virtualHubBgpConnections.ts | 94 - .../virtualHubIpConfiguration.ts | 109 - .../virtualHubRouteTableV2S.ts | 111 - .../src/operationsInterfaces/virtualHubs.ts | 218 - .../virtualNetworkAppliances.ts | 125 - .../virtualNetworkGatewayConnections.ts | 347 - .../virtualNetworkGatewayNatRules.ts | 109 - .../virtualNetworkGateways.ts | 966 - .../virtualNetworkPeerings.ts | 109 - .../virtualNetworkTaps.ts | 119 - .../operationsInterfaces/virtualNetworks.ts | 160 - .../virtualRouterPeerings.ts | 107 - .../operationsInterfaces/virtualRouters.ts | 101 - .../src/operationsInterfaces/virtualWans.ts | 117 - .../operationsInterfaces/vpnConnections.ts | 175 - .../src/operationsInterfaces/vpnGateways.ts | 214 - .../vpnLinkConnections.ts | 196 - .../vpnServerConfigurations.ts | 136 - ...rConfigurationsAssociatedWithVirtualWan.ts | 42 - .../vpnSiteLinkConnections.ts | 29 - .../src/operationsInterfaces/vpnSiteLinks.ts | 42 - .../src/operationsInterfaces/vpnSites.ts | 114 - .../vpnSitesConfiguration.ts | 41 - .../webApplicationFirewallPolicies.ts | 85 - .../src/operationsInterfaces/webCategories.ts | 31 - sdk/network/arm-network/src/pagingHelper.ts | 34 - .../arm-network/src/restorePollerHelpers.ts | 1753 + .../src/static-helpers/cloudSettingHelpers.ts | 42 + .../src/static-helpers/pagingHelpers.ts | 267 + .../src/static-helpers/pollingHelpers.ts | 147 + .../serialization/check-prop-undefined.ts | 17 + .../src/static-helpers/simplePollerHelpers.ts | 119 + .../src/static-helpers/urlTemplate.ts | 227 + sdk/network/arm-network/test/snippets.spec.ts | 2 +- .../arm-network/tsconfig.browser.config.json | 10 - sdk/network/arm-network/tsconfig.json | 22 +- sdk/network/arm-network/tsconfig.samples.json | 8 - .../arm-network/tsconfig.snippets.json | 3 - sdk/network/arm-network/tsconfig.src.json | 3 - sdk/network/arm-network/tsconfig.test.json | 14 - .../arm-network/tsconfig.test.node.json | 10 - sdk/network/arm-network/tsp-location.yaml | 4 + .../arm-network/vitest.browser.config.ts | 4 +- sdk/network/arm-network/vitest.esm.config.ts | 8 - sdk/network/arm-network/warp.config.yml | 26 +- 4785 files changed, 158540 insertions(+), 334349 deletions(-) delete mode 100644 sdk/network/arm-network/_meta.json create mode 100644 sdk/network/arm-network/config/tsconfig.samples.json create mode 100644 sdk/network/arm-network/config/tsconfig.snippets.json create mode 100644 sdk/network/arm-network/config/tsconfig.src.browser.json create mode 100644 sdk/network/arm-network/config/tsconfig.src.cjs.json create mode 100644 sdk/network/arm-network/config/tsconfig.src.esm.json create mode 100644 sdk/network/arm-network/config/tsconfig.src.react-native.json create mode 100644 sdk/network/arm-network/config/tsconfig.test.browser.json create mode 100644 sdk/network/arm-network/config/tsconfig.test.node.json create mode 100644 sdk/network/arm-network/eslint.config.mjs create mode 100644 sdk/network/arm-network/metadata.json delete mode 100644 sdk/network/arm-network/review/arm-network-node.api.md delete mode 100644 sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsGetSample.ts create mode 100644 sdk/network/arm-network/samples-dev/commitsCreateOrUpdateSample.ts create mode 100644 sdk/network/arm-network/samples-dev/commitsDeleteSample.ts create mode 100644 sdk/network/arm-network/samples-dev/commitsGetSample.ts create mode 100644 sdk/network/arm-network/samples-dev/commitsListSample.ts create mode 100644 sdk/network/arm-network/samples-dev/connectionPoliciesCreateOrUpdateSample.ts create mode 100644 sdk/network/arm-network/samples-dev/connectionPoliciesDeleteSample.ts create mode 100644 sdk/network/arm-network/samples-dev/connectionPoliciesGetSample.ts create mode 100644 sdk/network/arm-network/samples-dev/connectionPoliciesListSample.ts create mode 100644 sdk/network/arm-network/samples-dev/ddosCustomPoliciesListAllSample.ts create mode 100644 sdk/network/arm-network/samples-dev/ddosCustomPoliciesListSample.ts create mode 100644 sdk/network/arm-network/samples-dev/expressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsSample.ts create mode 100644 sdk/network/arm-network/samples-dev/expressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsSample.ts create mode 100644 sdk/network/arm-network/samples-dev/expressRouteCircuitsStartCircuitLinkFailoverTestSample.ts create mode 100644 sdk/network/arm-network/samples-dev/expressRouteCircuitsStopCircuitLinkFailoverTestSample.ts create mode 100644 sdk/network/arm-network/samples-dev/expressRouteGatewaysGetFailoverAllTestsDetailsSample.ts create mode 100644 sdk/network/arm-network/samples-dev/expressRouteGatewaysGetFailoverSingleTestDetailsSample.ts create mode 100644 sdk/network/arm-network/samples-dev/expressRouteGatewaysGetResiliencyInformationSample.ts create mode 100644 sdk/network/arm-network/samples-dev/expressRouteGatewaysGetRoutesInformationSample.ts create mode 100644 sdk/network/arm-network/samples-dev/expressRouteGatewaysStartSiteFailoverTestSample.ts create mode 100644 sdk/network/arm-network/samples-dev/expressRouteGatewaysStopSiteFailoverTestSample.ts create mode 100644 sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLOASample.ts delete mode 100644 sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLoaSample.ts create mode 100644 sdk/network/arm-network/samples-dev/interconnectGroupsCreateOrUpdateSample.ts create mode 100644 sdk/network/arm-network/samples-dev/interconnectGroupsDeleteSample.ts create mode 100644 sdk/network/arm-network/samples-dev/interconnectGroupsGetNodeAvailabilitySample.ts create mode 100644 sdk/network/arm-network/samples-dev/interconnectGroupsGetSample.ts create mode 100644 sdk/network/arm-network/samples-dev/interconnectGroupsListAllSample.ts create mode 100644 sdk/network/arm-network/samples-dev/interconnectGroupsListSample.ts create mode 100644 sdk/network/arm-network/samples-dev/interconnectGroupsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/loadBalancersMigrateToIPBasedSample.ts create mode 100644 sdk/network/arm-network/samples-dev/loadBalancersMigrateToIpBasedSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIPAddressesSample.ts create mode 100644 sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIpAddressesSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts create mode 100644 sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SVpnConnectionsSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts create mode 100644 sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SVpnConnectionHealthDetailedSample.ts create mode 100644 sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SVpnConnectionHealthSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts create mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesDisassociateCloudServiceReservedPublicIpSample.ts create mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIPAddressSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIpaddressSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts create mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIPAddressesSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIpaddressesSample.ts create mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIPAddressesSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts create mode 100644 sdk/network/arm-network/samples-dev/publicIPAddressesReserveCloudServicePublicIpAddressSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/serviceGatewaysGetAddressLocationsSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/serviceGatewaysGetServicesSample.ts create mode 100644 sdk/network/arm-network/samples-dev/serviceGatewaysListAddressLocationsSample.ts create mode 100644 sdk/network/arm-network/samples-dev/serviceGatewaysListServicesSample.ts create mode 100644 sdk/network/arm-network/samples-dev/subgroupsGetSample.ts create mode 100644 sdk/network/arm-network/samples-dev/subgroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/virtualHubIPConfigurationCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/virtualHubIPConfigurationDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/virtualHubIPConfigurationGetSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/virtualHubIPConfigurationListSample.ts create mode 100644 sdk/network/arm-network/samples-dev/virtualHubIpConfigurationCreateOrUpdateSample.ts create mode 100644 sdk/network/arm-network/samples-dev/virtualHubIpConfigurationDeleteSample.ts create mode 100644 sdk/network/arm-network/samples-dev/virtualHubIpConfigurationGetSample.ts create mode 100644 sdk/network/arm-network/samples-dev/virtualHubIpConfigurationListSample.ts delete mode 100644 sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetAllSharedKeysSample.ts create mode 100644 sdk/network/arm-network/samples-dev/vpnLinkConnectionsListAllSharedKeysSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/javascript/README.md delete mode 100644 sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/adminRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/adminRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/adminRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/adminRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateLinkResourcesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewayWafDynamicManifestsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysBackendHealthOnDemandSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysBackendHealthSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysGetSslPredefinedPolicySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableRequestHeadersSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableResponseHeadersSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableServerVariablesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableSslOptionsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysStartSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysStopSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/availableDelegationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/availableEndpointServicesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/availablePrivateEndpointTypesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/availableResourceGroupDelegationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/availableServiceAliasesListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/availableServiceAliasesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/azureFirewallFqdnTagsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/azureFirewallsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/azureFirewallsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/azureFirewallsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/azureFirewallsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/azureFirewallsListLearnedPrefixesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/azureFirewallsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/azureFirewallsPacketCaptureOperationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/azureFirewallsPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/azureFirewallsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/bastionHostsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/bastionHostsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/bastionHostsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/bastionHostsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/bastionHostsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/bastionHostsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/bgpServiceCommunitiesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/checkDnsNameAvailabilitySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/connectionMonitorsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/connectionMonitorsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/connectionMonitorsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/connectionMonitorsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/connectionMonitorsStopSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/connectionMonitorsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/customIPPrefixesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/customIPPrefixesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/customIPPrefixesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/customIPPrefixesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/customIPPrefixesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/customIPPrefixesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/defaultSecurityRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/defaultSecurityRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/deleteBastionShareableLinkByTokenSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/deleteBastionShareableLinkSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/disconnectActiveSessionsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/dscpConfigurationCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/dscpConfigurationDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/dscpConfigurationGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/dscpConfigurationListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/dscpConfigurationListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetPeeringStatsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetStatsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListArpTableSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListRoutesTableSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListRoutesTableSummarySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListArpTableSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListRoutesTableSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteLinksGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteLinksListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortsGenerateLoaSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortsLocationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortsLocationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRoutePortsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteProviderPortSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteProviderPortsLocationListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/expressRouteServiceProvidersListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPoliciesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPoliciesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPoliciesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPoliciesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPoliciesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPoliciesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyDeploymentsDeploySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/flowLogsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/flowLogsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/flowLogsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/flowLogsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/flowLogsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/getActiveSessionsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/getBastionShareableLinkSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/hubRouteTablesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/hubRouteTablesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/hubRouteTablesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/hubRouteTablesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/inboundNatRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/inboundNatRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/inboundNatRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/inboundNatRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/inboundSecurityRuleCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/inboundSecurityRuleGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipAllocationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipAllocationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipAllocationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipAllocationsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipAllocationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipAllocationsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipGroupsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipGroupsUpdateGroupsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipamPoolsCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipamPoolsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipamPoolsGetPoolUsageSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipamPoolsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipamPoolsListAssociatedResourcesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipamPoolsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/ipamPoolsUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/listActiveConnectivityConfigurationsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/listActiveSecurityAdminRulesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerFrontendIPConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerFrontendIPConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesHealthSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerNetworkInterfacesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerOutboundRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerOutboundRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerProbesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancerProbesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancersListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancersListInboundNatRulePortMappingsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancersListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancersMigrateToIPBasedSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancersSwapPublicIPAddressesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/loadBalancersUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/natGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/natGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/natGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/natGatewaysListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/natGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/natGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/natRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/natRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/natRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/natRulesListByVpnGatewaySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfaceIPConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfaceIPConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfaceLoadBalancersListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetEffectiveRouteTableSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkInterfacesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagerCommitsPostSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagerDeploymentStatusListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagersListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagersListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkManagersPatchSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkProfilesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkProfilesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkProfilesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkProfilesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkProfilesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkProfilesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesReconcileSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociableResourceTypesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsReconcileSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterOperationStatusesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterServiceTagsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersPatchSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesGetBootDiagnosticLogsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesReimageSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesRestartSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersCheckConnectivitySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersGetAzureReachabilityReportSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersGetFlowLogStatusSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersGetNextHopSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTopologySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTroubleshootingResultSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTroubleshootingSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersGetVMSecurityRulesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersListAvailableProvidersSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersSetFlowLogConfigurationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/networkWatchersVerifyIPFlowSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/operationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysResetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/package.json delete mode 100644 sdk/network/arm-network/samples/v35/javascript/packetCapturesCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/packetCapturesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/packetCapturesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/packetCapturesGetStatusSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/packetCapturesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/packetCapturesStopSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/peerExpressRouteCircuitConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/peerExpressRouteCircuitConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateEndpointsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateEndpointsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateEndpointsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateEndpointsListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateEndpointsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDdosProtectionStatusSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesReserveCloudServicePublicIPAddressSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPAddressesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/putBastionShareableLinkSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/resourceNavigationLinksListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeFilterRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeFilterRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeFilterRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeFilterRulesListByRouteFilterSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeFiltersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeFiltersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeFiltersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeFiltersListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeFiltersListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeFiltersUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeMapsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeMapsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeMapsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeMapsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeTablesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeTablesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeTablesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeTablesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeTablesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routeTablesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingIntentCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingIntentDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingIntentGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingIntentListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/routingRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/sample.env delete mode 100644 sdk/network/arm-network/samples/v35/javascript/scopeConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/scopeConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/scopeConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/scopeConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/securityUserRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceAssociationLinksListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceTagInformationListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/serviceTagsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/staticCidrsCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/staticCidrsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/staticCidrsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/staticCidrsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/staticMembersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/staticMembersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/staticMembersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/staticMembersListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/subnetsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/subnetsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/subnetsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/subnetsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/subnetsPrepareNetworkPoliciesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/subnetsUnprepareNetworkPoliciesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/supportedSecurityProvidersSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/usagesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vipSwapCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vipSwapGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vipSwapListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualApplianceSkusGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualApplianceSkusListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubsGetInboundRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubsGetOutboundRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualHubsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetResiliencyInformationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetRoutesInformationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeAbortMigrationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeCommitMigrationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeExecuteMigrationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokePrepareMigrationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListConnectionsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListRadiusSecretsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysResetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworksCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworksDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworksGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworksListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworksListDdosProtectionStatusSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworksListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworksListUsageSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualNetworksUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualRoutersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualRoutersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualRoutersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualRoutersListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualRoutersListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualWansCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualWansDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualWansGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualWansListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualWansListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/virtualWansUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnConnectionsListByVpnGatewaySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnConnectionsStartPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnConnectionsStopPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnGatewaysListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnGatewaysResetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnGatewaysStartPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnGatewaysStopPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetIkeSasSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsListByVpnConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsResetConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListRadiusSecretsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnSiteLinkConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnSiteLinksGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnSiteLinksListByVpnSiteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnSitesConfigurationDownloadSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnSitesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnSitesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnSitesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnSitesListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnSitesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/vpnSitesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesListSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/webCategoriesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v35/javascript/webCategoriesListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v35/typescript/README.md delete mode 100644 sdk/network/arm-network/samples/v35/typescript/package.json delete mode 100644 sdk/network/arm-network/samples/v35/typescript/sample.env delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/adminRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/adminRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/adminRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/adminRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysBackendHealthSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysStartSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysStopSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/availableDelegationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/availableEndpointServicesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/availablePrivateEndpointTypesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/availableResourceGroupDelegationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/availableServiceAliasesListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/availableServiceAliasesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/azureFirewallFqdnTagsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListLearnedPrefixesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsPacketCaptureOperationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/bastionHostsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/bastionHostsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/bastionHostsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/bastionHostsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/bastionHostsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/bastionHostsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/bgpServiceCommunitiesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/checkDnsNameAvailabilitySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsStopSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/defaultSecurityRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/defaultSecurityRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/deleteBastionShareableLinkByTokenSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/deleteBastionShareableLinkSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/disconnectActiveSessionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetStatsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListArpTableSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListRoutesTableSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteLinksGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteLinksListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsGenerateLoaSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsLocationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsLocationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteProviderPortSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteProviderPortsLocationListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/expressRouteServiceProvidersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDeploymentsDeploySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/flowLogsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/flowLogsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/flowLogsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/flowLogsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/flowLogsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/getActiveSessionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/getBastionShareableLinkSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/inboundSecurityRuleGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipGroupsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipGroupsUpdateGroupsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsGetPoolUsageSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsListAssociatedResourcesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/listActiveConnectivityConfigurationsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/listActiveSecurityAdminRulesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerNetworkInterfacesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerOutboundRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerOutboundRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerProbesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancerProbesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancersMigrateToIPBasedSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/loadBalancersUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/natGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/natGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/natGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/natGatewaysListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/natGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/natGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/natRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/natRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/natRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/natRulesListByVpnGatewaySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceIPConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceIPConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceLoadBalancersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagerCommitsPostSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagerDeploymentStatusListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagersListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkManagersPatchSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkProfilesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkProfilesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkProfilesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkProfilesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkProfilesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkProfilesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesReconcileSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociableResourceTypesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsReconcileSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterOperationStatusesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterServiceTagsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersPatchSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesReimageSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesRestartSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersCheckConnectivitySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetFlowLogStatusSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetNextHopSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTopologySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTroubleshootingResultSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTroubleshootingSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetVMSecurityRulesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListAvailableProvidersSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/networkWatchersVerifyIPFlowSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/operationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysResetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/packetCapturesCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/packetCapturesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/packetCapturesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/packetCapturesGetStatusSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/packetCapturesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/packetCapturesStopSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/putBastionShareableLinkSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/resourceNavigationLinksListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesListByRouteFilterSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeFiltersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeFiltersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeFiltersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeFiltersListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeFiltersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeFiltersUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeMapsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeMapsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeMapsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeMapsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeTablesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeTablesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeTablesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeTablesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeTablesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routeTablesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingIntentCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingIntentDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingIntentGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingIntentListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/routingRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceAssociationLinksListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceTagInformationListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/serviceTagsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/staticCidrsCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/staticCidrsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/staticCidrsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/staticCidrsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/staticMembersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/staticMembersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/staticMembersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/staticMembersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/subnetsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/subnetsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/subnetsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/subnetsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/subnetsPrepareNetworkPoliciesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/supportedSecurityProvidersSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/usagesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vipSwapCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vipSwapGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vipSwapListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSkusGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSkusListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetInboundRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetOutboundRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualHubsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetResiliencyInformationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetRoutesInformationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeAbortMigrationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeCommitMigrationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokePrepareMigrationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListRadiusSecretsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysResetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListUsageSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualWansCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualWansDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualWansGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualWansListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualWansListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/virtualWansUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsListByVpnGatewaySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsStartPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsStopPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysResetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysStartPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysStopPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsResetConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListRadiusSecretsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinkConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinksGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinksListByVpnSiteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnSitesConfigurationDownloadSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnSitesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnSitesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnSitesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnSitesListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnSitesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/vpnSitesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/webCategoriesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/src/webCategoriesListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v35/typescript/tsconfig.json delete mode 100644 sdk/network/arm-network/samples/v36/javascript/README.md delete mode 100644 sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/adminRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/adminRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/adminRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/adminRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateLinkResourcesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewayWafDynamicManifestsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysBackendHealthOnDemandSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysBackendHealthSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysGetSslPredefinedPolicySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableRequestHeadersSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableResponseHeadersSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableServerVariablesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableSslOptionsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysStartSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysStopSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/availableDelegationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/availableEndpointServicesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/availablePrivateEndpointTypesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/availableResourceGroupDelegationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/availableServiceAliasesListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/availableServiceAliasesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/azureFirewallFqdnTagsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/azureFirewallsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/azureFirewallsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/azureFirewallsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/azureFirewallsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/azureFirewallsListLearnedPrefixesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/azureFirewallsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/azureFirewallsPacketCaptureOperationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/azureFirewallsPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/azureFirewallsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/bastionHostsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/bastionHostsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/bastionHostsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/bastionHostsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/bastionHostsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/bastionHostsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/bgpServiceCommunitiesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/checkDnsNameAvailabilitySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/connectionMonitorsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/connectionMonitorsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/connectionMonitorsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/connectionMonitorsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/connectionMonitorsStopSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/connectionMonitorsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/customIPPrefixesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/customIPPrefixesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/customIPPrefixesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/customIPPrefixesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/customIPPrefixesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/customIPPrefixesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/defaultSecurityRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/defaultSecurityRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/deleteBastionShareableLinkByTokenSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/deleteBastionShareableLinkSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/disconnectActiveSessionsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/dscpConfigurationCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/dscpConfigurationDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/dscpConfigurationGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/dscpConfigurationListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/dscpConfigurationListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetPeeringStatsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetStatsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListArpTableSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListRoutesTableSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListRoutesTableSummarySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListArpTableSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListRoutesTableSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteLinksGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteLinksListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortsGenerateLoaSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortsLocationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortsLocationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRoutePortsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteProviderPortSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteProviderPortsLocationListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/expressRouteServiceProvidersListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPoliciesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPoliciesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPoliciesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPoliciesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPoliciesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPoliciesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyDeploymentsDeploySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/flowLogsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/flowLogsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/flowLogsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/flowLogsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/flowLogsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/getActiveSessionsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/getBastionShareableLinkSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/hubRouteTablesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/hubRouteTablesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/hubRouteTablesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/hubRouteTablesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/inboundNatRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/inboundNatRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/inboundNatRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/inboundNatRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/inboundSecurityRuleCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/inboundSecurityRuleGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipAllocationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipAllocationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipAllocationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipAllocationsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipAllocationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipAllocationsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipGroupsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipGroupsUpdateGroupsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipamPoolsCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipamPoolsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipamPoolsGetPoolUsageSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipamPoolsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipamPoolsListAssociatedResourcesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipamPoolsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/ipamPoolsUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/listActiveConnectivityConfigurationsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/listActiveSecurityAdminRulesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerFrontendIPConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerFrontendIPConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesHealthSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerNetworkInterfacesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerOutboundRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerOutboundRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerProbesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancerProbesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancersListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancersListInboundNatRulePortMappingsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancersListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancersMigrateToIPBasedSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancersSwapPublicIPAddressesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/loadBalancersUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/natGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/natGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/natGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/natGatewaysListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/natGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/natGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/natRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/natRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/natRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/natRulesListByVpnGatewaySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfaceIPConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfaceIPConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfaceLoadBalancersListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetEffectiveRouteTableSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkInterfacesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagerCommitsPostSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagerDeploymentStatusListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagersListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagersListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkManagersPatchSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkProfilesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkProfilesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkProfilesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkProfilesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkProfilesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkProfilesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesReconcileSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociableResourceTypesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsReconcileSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterOperationStatusesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterServiceTagsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersPatchSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesGetBootDiagnosticLogsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesReimageSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesRestartSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersCheckConnectivitySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersGetAzureReachabilityReportSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersGetFlowLogStatusSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersGetNextHopSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTopologySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTroubleshootingResultSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTroubleshootingSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersGetVMSecurityRulesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersListAvailableProvidersSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersSetFlowLogConfigurationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/networkWatchersVerifyIPFlowSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/operationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysResetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/package.json delete mode 100644 sdk/network/arm-network/samples/v36/javascript/packetCapturesCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/packetCapturesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/packetCapturesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/packetCapturesGetStatusSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/packetCapturesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/packetCapturesStopSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/peerExpressRouteCircuitConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/peerExpressRouteCircuitConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateEndpointsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateEndpointsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateEndpointsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateEndpointsListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateEndpointsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDdosProtectionStatusSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesReserveCloudServicePublicIPAddressSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPAddressesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/putBastionShareableLinkSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/resourceNavigationLinksListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeFilterRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeFilterRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeFilterRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeFilterRulesListByRouteFilterSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeFiltersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeFiltersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeFiltersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeFiltersListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeFiltersListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeFiltersUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeMapsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeMapsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeMapsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeMapsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeTablesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeTablesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeTablesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeTablesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeTablesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routeTablesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingIntentCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingIntentDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingIntentGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingIntentListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/routingRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/sample.env delete mode 100644 sdk/network/arm-network/samples/v36/javascript/scopeConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/scopeConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/scopeConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/scopeConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/securityUserRulesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceAssociationLinksListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetAddressLocationsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetServicesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceGatewaysListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateAddressLocationsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateServicesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceTagInformationListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/serviceTagsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/staticCidrsCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/staticCidrsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/staticCidrsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/staticCidrsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/staticMembersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/staticMembersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/staticMembersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/staticMembersListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/subnetsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/subnetsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/subnetsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/subnetsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/subnetsPrepareNetworkPoliciesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/subnetsUnprepareNetworkPoliciesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/supportedSecurityProvidersSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/usagesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vipSwapCreateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vipSwapGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vipSwapListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualApplianceSkusGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualApplianceSkusListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubsGetInboundRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubsGetOutboundRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualHubsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetResiliencyInformationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetRoutesInformationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeAbortMigrationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeCommitMigrationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeExecuteMigrationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokePrepareMigrationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListConnectionsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListRadiusSecretsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysResetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworksCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworksDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworksGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworksListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworksListDdosProtectionStatusSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworksListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworksListUsageSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualNetworksUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualRoutersCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualRoutersDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualRoutersGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualRoutersListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualRoutersListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualWansCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualWansDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualWansGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualWansListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualWansListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/virtualWansUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnConnectionsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnConnectionsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnConnectionsListByVpnGatewaySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnConnectionsStartPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnConnectionsStopPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnGatewaysCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnGatewaysDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnGatewaysGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnGatewaysListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnGatewaysListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnGatewaysResetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnGatewaysStartPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnGatewaysStopPacketCaptureSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnGatewaysUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetIkeSasSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsListByVpnConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsResetConnectionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListRadiusSecretsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnSiteLinkConnectionsGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnSiteLinksGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnSiteLinksListByVpnSiteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnSitesConfigurationDownloadSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnSitesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnSitesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnSitesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnSitesListByResourceGroupSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnSitesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/vpnSitesUpdateTagsSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesDeleteSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesListAllSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesListSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/webCategoriesGetSample.js delete mode 100644 sdk/network/arm-network/samples/v36/javascript/webCategoriesListBySubscriptionSample.js delete mode 100644 sdk/network/arm-network/samples/v36/typescript/README.md delete mode 100644 sdk/network/arm-network/samples/v36/typescript/package.json delete mode 100644 sdk/network/arm-network/samples/v36/typescript/sample.env delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/adminRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/adminRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/adminRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/adminRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysBackendHealthSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysStartSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysStopSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/availableDelegationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/availableEndpointServicesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/availablePrivateEndpointTypesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/availableResourceGroupDelegationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/availableServiceAliasesListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/availableServiceAliasesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/azureFirewallFqdnTagsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListLearnedPrefixesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsPacketCaptureOperationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/bastionHostsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/bastionHostsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/bastionHostsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/bastionHostsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/bastionHostsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/bastionHostsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/bgpServiceCommunitiesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/checkDnsNameAvailabilitySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsStopSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/defaultSecurityRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/defaultSecurityRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/deleteBastionShareableLinkByTokenSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/deleteBastionShareableLinkSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/disconnectActiveSessionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetStatsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListArpTableSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListRoutesTableSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteLinksGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteLinksListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsGenerateLoaSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsLocationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsLocationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteProviderPortSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteProviderPortsLocationListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/expressRouteServiceProvidersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDeploymentsDeploySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/flowLogsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/flowLogsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/flowLogsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/flowLogsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/flowLogsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/getActiveSessionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/getBastionShareableLinkSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/inboundSecurityRuleGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipGroupsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipGroupsUpdateGroupsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsGetPoolUsageSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsListAssociatedResourcesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/listActiveConnectivityConfigurationsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/listActiveSecurityAdminRulesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerNetworkInterfacesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerOutboundRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerOutboundRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerProbesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancerProbesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancersMigrateToIPBasedSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/loadBalancersUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/natGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/natGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/natGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/natGatewaysListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/natGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/natGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/natRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/natRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/natRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/natRulesListByVpnGatewaySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceIPConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceIPConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceLoadBalancersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagerCommitsPostSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagerDeploymentStatusListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagersListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkManagersPatchSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkProfilesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkProfilesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkProfilesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkProfilesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkProfilesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkProfilesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesReconcileSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociableResourceTypesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsReconcileSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterOperationStatusesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterServiceTagsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersPatchSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesReimageSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesRestartSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersCheckConnectivitySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetFlowLogStatusSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetNextHopSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTopologySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTroubleshootingResultSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTroubleshootingSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetVMSecurityRulesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListAvailableProvidersSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/networkWatchersVerifyIPFlowSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/operationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysResetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/packetCapturesCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/packetCapturesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/packetCapturesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/packetCapturesGetStatusSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/packetCapturesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/packetCapturesStopSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/putBastionShareableLinkSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/resourceNavigationLinksListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesListByRouteFilterSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeFiltersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeFiltersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeFiltersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeFiltersListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeFiltersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeFiltersUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeMapsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeMapsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeMapsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeMapsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeTablesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeTablesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeTablesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeTablesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeTablesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routeTablesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingIntentCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingIntentDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingIntentGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingIntentListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/routingRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceAssociationLinksListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetAddressLocationsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetServicesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateAddressLocationsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateServicesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceTagInformationListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/serviceTagsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/staticCidrsCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/staticCidrsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/staticCidrsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/staticCidrsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/staticMembersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/staticMembersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/staticMembersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/staticMembersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/subnetsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/subnetsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/subnetsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/subnetsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/subnetsPrepareNetworkPoliciesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/supportedSecurityProvidersSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/usagesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vipSwapCreateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vipSwapGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vipSwapListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSkusGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSkusListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetInboundRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetOutboundRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualHubsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetResiliencyInformationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetRoutesInformationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeAbortMigrationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeCommitMigrationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokePrepareMigrationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListRadiusSecretsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysResetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListUsageSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualWansCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualWansDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualWansGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualWansListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualWansListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/virtualWansUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsListByVpnGatewaySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsStartPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsStopPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysResetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysStartPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysStopPacketCaptureSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsResetConnectionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListRadiusSecretsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinkConnectionsGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinksGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinksListByVpnSiteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnSitesConfigurationDownloadSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnSitesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnSitesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnSitesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnSitesListByResourceGroupSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnSitesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/vpnSitesUpdateTagsSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesListAllSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesListSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/webCategoriesGetSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/src/webCategoriesListBySubscriptionSample.ts delete mode 100644 sdk/network/arm-network/samples/v36/typescript/tsconfig.json create mode 100644 sdk/network/arm-network/src/api/adminRuleCollections/index.ts create mode 100644 sdk/network/arm-network/src/api/adminRuleCollections/operations.ts create mode 100644 sdk/network/arm-network/src/api/adminRuleCollections/options.ts create mode 100644 sdk/network/arm-network/src/api/adminRules/index.ts create mode 100644 sdk/network/arm-network/src/api/adminRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/adminRules/options.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/index.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/operations.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/options.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/index.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/operations.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/options.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/index.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/operations.ts create mode 100644 sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/options.ts create mode 100644 sdk/network/arm-network/src/api/applicationGateways/index.ts create mode 100644 sdk/network/arm-network/src/api/applicationGateways/operations.ts create mode 100644 sdk/network/arm-network/src/api/applicationGateways/options.ts create mode 100644 sdk/network/arm-network/src/api/applicationSecurityGroups/index.ts create mode 100644 sdk/network/arm-network/src/api/applicationSecurityGroups/operations.ts create mode 100644 sdk/network/arm-network/src/api/applicationSecurityGroups/options.ts create mode 100644 sdk/network/arm-network/src/api/availableDelegations/index.ts create mode 100644 sdk/network/arm-network/src/api/availableDelegations/operations.ts create mode 100644 sdk/network/arm-network/src/api/availableDelegations/options.ts create mode 100644 sdk/network/arm-network/src/api/availableEndpointServices/index.ts create mode 100644 sdk/network/arm-network/src/api/availableEndpointServices/operations.ts create mode 100644 sdk/network/arm-network/src/api/availableEndpointServices/options.ts create mode 100644 sdk/network/arm-network/src/api/availablePrivateEndpointTypes/index.ts create mode 100644 sdk/network/arm-network/src/api/availablePrivateEndpointTypes/operations.ts create mode 100644 sdk/network/arm-network/src/api/availablePrivateEndpointTypes/options.ts create mode 100644 sdk/network/arm-network/src/api/availableResourceGroupDelegations/index.ts create mode 100644 sdk/network/arm-network/src/api/availableResourceGroupDelegations/operations.ts create mode 100644 sdk/network/arm-network/src/api/availableResourceGroupDelegations/options.ts create mode 100644 sdk/network/arm-network/src/api/availableServiceAliases/index.ts create mode 100644 sdk/network/arm-network/src/api/availableServiceAliases/operations.ts create mode 100644 sdk/network/arm-network/src/api/availableServiceAliases/options.ts create mode 100644 sdk/network/arm-network/src/api/azureFirewallFqdnTags/index.ts create mode 100644 sdk/network/arm-network/src/api/azureFirewallFqdnTags/operations.ts create mode 100644 sdk/network/arm-network/src/api/azureFirewallFqdnTags/options.ts create mode 100644 sdk/network/arm-network/src/api/azureFirewalls/index.ts create mode 100644 sdk/network/arm-network/src/api/azureFirewalls/operations.ts create mode 100644 sdk/network/arm-network/src/api/azureFirewalls/options.ts create mode 100644 sdk/network/arm-network/src/api/bastionHosts/index.ts create mode 100644 sdk/network/arm-network/src/api/bastionHosts/operations.ts create mode 100644 sdk/network/arm-network/src/api/bastionHosts/options.ts create mode 100644 sdk/network/arm-network/src/api/bgpServiceCommunities/index.ts create mode 100644 sdk/network/arm-network/src/api/bgpServiceCommunities/operations.ts create mode 100644 sdk/network/arm-network/src/api/bgpServiceCommunities/options.ts create mode 100644 sdk/network/arm-network/src/api/commits/index.ts create mode 100644 sdk/network/arm-network/src/api/commits/operations.ts create mode 100644 sdk/network/arm-network/src/api/commits/options.ts create mode 100644 sdk/network/arm-network/src/api/configurationPolicyGroups/index.ts create mode 100644 sdk/network/arm-network/src/api/configurationPolicyGroups/operations.ts create mode 100644 sdk/network/arm-network/src/api/configurationPolicyGroups/options.ts create mode 100644 sdk/network/arm-network/src/api/connectionMonitors/index.ts create mode 100644 sdk/network/arm-network/src/api/connectionMonitors/operations.ts create mode 100644 sdk/network/arm-network/src/api/connectionMonitors/options.ts create mode 100644 sdk/network/arm-network/src/api/connectionPolicies/index.ts create mode 100644 sdk/network/arm-network/src/api/connectionPolicies/operations.ts create mode 100644 sdk/network/arm-network/src/api/connectionPolicies/options.ts create mode 100644 sdk/network/arm-network/src/api/connectivityConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/api/connectivityConfigurations/operations.ts create mode 100644 sdk/network/arm-network/src/api/connectivityConfigurations/options.ts create mode 100644 sdk/network/arm-network/src/api/customIPPrefixes/index.ts create mode 100644 sdk/network/arm-network/src/api/customIPPrefixes/operations.ts create mode 100644 sdk/network/arm-network/src/api/customIPPrefixes/options.ts create mode 100644 sdk/network/arm-network/src/api/ddosCustomPolicies/index.ts create mode 100644 sdk/network/arm-network/src/api/ddosCustomPolicies/operations.ts create mode 100644 sdk/network/arm-network/src/api/ddosCustomPolicies/options.ts create mode 100644 sdk/network/arm-network/src/api/ddosProtectionPlans/index.ts create mode 100644 sdk/network/arm-network/src/api/ddosProtectionPlans/operations.ts create mode 100644 sdk/network/arm-network/src/api/ddosProtectionPlans/options.ts create mode 100644 sdk/network/arm-network/src/api/defaultSecurityRules/index.ts create mode 100644 sdk/network/arm-network/src/api/defaultSecurityRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/defaultSecurityRules/options.ts create mode 100644 sdk/network/arm-network/src/api/dscpConfiguration/index.ts create mode 100644 sdk/network/arm-network/src/api/dscpConfiguration/operations.ts create mode 100644 sdk/network/arm-network/src/api/dscpConfiguration/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuitConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuitConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuitConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuitPeerings/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuitPeerings/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuitPeerings/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuits/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuits/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCircuits/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCrossConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCrossConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteCrossConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteGateways/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteGateways/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteGateways/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteLinks/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteLinks/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteLinks/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRoutePortAuthorizations/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRoutePortAuthorizations/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRoutePortAuthorizations/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRoutePorts/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRoutePorts/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRoutePorts/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRoutePortsLocations/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRoutePortsLocations/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRoutePortsLocations/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/options.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteServiceProviders/index.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteServiceProviders/operations.ts create mode 100644 sdk/network/arm-network/src/api/expressRouteServiceProviders/options.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicies/index.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicies/operations.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicies/options.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyDeployments/index.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyDeployments/operations.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyDeployments/options.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyDrafts/index.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyDrafts/operations.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyDrafts/options.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/index.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/operations.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/options.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/index.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/operations.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/options.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/index.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/operations.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/options.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/index.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/operations.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/options.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/index.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/operations.ts create mode 100644 sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/options.ts create mode 100644 sdk/network/arm-network/src/api/flowLogs/index.ts create mode 100644 sdk/network/arm-network/src/api/flowLogs/operations.ts create mode 100644 sdk/network/arm-network/src/api/flowLogs/options.ts create mode 100644 sdk/network/arm-network/src/api/hubRouteTables/index.ts create mode 100644 sdk/network/arm-network/src/api/hubRouteTables/operations.ts create mode 100644 sdk/network/arm-network/src/api/hubRouteTables/options.ts create mode 100644 sdk/network/arm-network/src/api/hubVirtualNetworkConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/hubVirtualNetworkConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/hubVirtualNetworkConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/inboundNatRules/index.ts create mode 100644 sdk/network/arm-network/src/api/inboundNatRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/inboundNatRules/options.ts create mode 100644 sdk/network/arm-network/src/api/inboundSecurityRule/index.ts create mode 100644 sdk/network/arm-network/src/api/inboundSecurityRule/operations.ts create mode 100644 sdk/network/arm-network/src/api/inboundSecurityRule/options.ts create mode 100644 sdk/network/arm-network/src/api/index.ts create mode 100644 sdk/network/arm-network/src/api/interconnectGroups/index.ts create mode 100644 sdk/network/arm-network/src/api/interconnectGroups/operations.ts create mode 100644 sdk/network/arm-network/src/api/interconnectGroups/options.ts create mode 100644 sdk/network/arm-network/src/api/ipAllocations/index.ts create mode 100644 sdk/network/arm-network/src/api/ipAllocations/operations.ts create mode 100644 sdk/network/arm-network/src/api/ipAllocations/options.ts create mode 100644 sdk/network/arm-network/src/api/ipGroups/index.ts create mode 100644 sdk/network/arm-network/src/api/ipGroups/operations.ts create mode 100644 sdk/network/arm-network/src/api/ipGroups/options.ts create mode 100644 sdk/network/arm-network/src/api/ipamPools/index.ts create mode 100644 sdk/network/arm-network/src/api/ipamPools/operations.ts create mode 100644 sdk/network/arm-network/src/api/ipamPools/options.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/index.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/operations.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/options.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/operations.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/options.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/index.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/options.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/index.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/operations.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/options.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerOutboundRules/index.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerOutboundRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerOutboundRules/options.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerProbes/index.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerProbes/operations.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancerProbes/options.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancers/index.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancers/operations.ts create mode 100644 sdk/network/arm-network/src/api/loadBalancers/options.ts create mode 100644 sdk/network/arm-network/src/api/localNetworkGateways/index.ts create mode 100644 sdk/network/arm-network/src/api/localNetworkGateways/operations.ts create mode 100644 sdk/network/arm-network/src/api/localNetworkGateways/options.ts create mode 100644 sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/natGateways/index.ts create mode 100644 sdk/network/arm-network/src/api/natGateways/operations.ts create mode 100644 sdk/network/arm-network/src/api/natGateways/options.ts create mode 100644 sdk/network/arm-network/src/api/natRules/index.ts create mode 100644 sdk/network/arm-network/src/api/natRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/natRules/options.ts create mode 100644 sdk/network/arm-network/src/api/networkGroups/index.ts create mode 100644 sdk/network/arm-network/src/api/networkGroups/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkGroups/options.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/options.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/index.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/options.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/options.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaces/index.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaces/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkInterfaces/options.ts create mode 100644 sdk/network/arm-network/src/api/networkManagementContext.ts create mode 100644 sdk/network/arm-network/src/api/networkManagerCommits/index.ts create mode 100644 sdk/network/arm-network/src/api/networkManagerCommits/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkManagerCommits/options.ts create mode 100644 sdk/network/arm-network/src/api/networkManagerDeploymentStatus/index.ts create mode 100644 sdk/network/arm-network/src/api/networkManagerDeploymentStatus/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkManagerDeploymentStatus/options.ts create mode 100644 sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/options.ts create mode 100644 sdk/network/arm-network/src/api/networkManagers/index.ts create mode 100644 sdk/network/arm-network/src/api/networkManagers/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkManagers/options.ts create mode 100644 sdk/network/arm-network/src/api/networkProfiles/index.ts create mode 100644 sdk/network/arm-network/src/api/networkProfiles/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkProfiles/options.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityGroups/index.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityGroups/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityGroups/options.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/index.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/options.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/index.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/options.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/index.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/options.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/index.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/options.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/index.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/options.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/options.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/index.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/options.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/index.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/options.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/index.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/options.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeters/index.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeters/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkSecurityPerimeters/options.ts create mode 100644 sdk/network/arm-network/src/api/networkVirtualApplianceConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/networkVirtualApplianceConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkVirtualApplianceConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/networkVirtualAppliances/index.ts create mode 100644 sdk/network/arm-network/src/api/networkVirtualAppliances/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkVirtualAppliances/options.ts create mode 100644 sdk/network/arm-network/src/api/networkWatchers/index.ts create mode 100644 sdk/network/arm-network/src/api/networkWatchers/operations.ts create mode 100644 sdk/network/arm-network/src/api/networkWatchers/options.ts create mode 100644 sdk/network/arm-network/src/api/operations.ts create mode 100644 sdk/network/arm-network/src/api/operations/index.ts create mode 100644 sdk/network/arm-network/src/api/operations/operations.ts create mode 100644 sdk/network/arm-network/src/api/operations/options.ts create mode 100644 sdk/network/arm-network/src/api/options.ts create mode 100644 sdk/network/arm-network/src/api/p2SVpnGateways/index.ts create mode 100644 sdk/network/arm-network/src/api/p2SVpnGateways/operations.ts create mode 100644 sdk/network/arm-network/src/api/p2SVpnGateways/options.ts create mode 100644 sdk/network/arm-network/src/api/packetCaptures/index.ts create mode 100644 sdk/network/arm-network/src/api/packetCaptures/operations.ts create mode 100644 sdk/network/arm-network/src/api/packetCaptures/options.ts create mode 100644 sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/privateDnsZoneGroups/index.ts create mode 100644 sdk/network/arm-network/src/api/privateDnsZoneGroups/operations.ts create mode 100644 sdk/network/arm-network/src/api/privateDnsZoneGroups/options.ts create mode 100644 sdk/network/arm-network/src/api/privateEndpoints/index.ts create mode 100644 sdk/network/arm-network/src/api/privateEndpoints/operations.ts create mode 100644 sdk/network/arm-network/src/api/privateEndpoints/options.ts create mode 100644 sdk/network/arm-network/src/api/privateLinkServices/index.ts create mode 100644 sdk/network/arm-network/src/api/privateLinkServices/operations.ts create mode 100644 sdk/network/arm-network/src/api/privateLinkServices/options.ts create mode 100644 sdk/network/arm-network/src/api/publicIPAddresses/index.ts create mode 100644 sdk/network/arm-network/src/api/publicIPAddresses/operations.ts create mode 100644 sdk/network/arm-network/src/api/publicIPAddresses/options.ts create mode 100644 sdk/network/arm-network/src/api/publicIPPrefixes/index.ts create mode 100644 sdk/network/arm-network/src/api/publicIPPrefixes/operations.ts create mode 100644 sdk/network/arm-network/src/api/publicIPPrefixes/options.ts create mode 100644 sdk/network/arm-network/src/api/reachabilityAnalysisIntents/index.ts create mode 100644 sdk/network/arm-network/src/api/reachabilityAnalysisIntents/operations.ts create mode 100644 sdk/network/arm-network/src/api/reachabilityAnalysisIntents/options.ts create mode 100644 sdk/network/arm-network/src/api/reachabilityAnalysisRuns/index.ts create mode 100644 sdk/network/arm-network/src/api/reachabilityAnalysisRuns/operations.ts create mode 100644 sdk/network/arm-network/src/api/reachabilityAnalysisRuns/options.ts create mode 100644 sdk/network/arm-network/src/api/resourceNavigationLinks/index.ts create mode 100644 sdk/network/arm-network/src/api/resourceNavigationLinks/operations.ts create mode 100644 sdk/network/arm-network/src/api/resourceNavigationLinks/options.ts create mode 100644 sdk/network/arm-network/src/api/routeFilterRules/index.ts create mode 100644 sdk/network/arm-network/src/api/routeFilterRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/routeFilterRules/options.ts create mode 100644 sdk/network/arm-network/src/api/routeFilters/index.ts create mode 100644 sdk/network/arm-network/src/api/routeFilters/operations.ts create mode 100644 sdk/network/arm-network/src/api/routeFilters/options.ts create mode 100644 sdk/network/arm-network/src/api/routeMaps/index.ts create mode 100644 sdk/network/arm-network/src/api/routeMaps/operations.ts create mode 100644 sdk/network/arm-network/src/api/routeMaps/options.ts create mode 100644 sdk/network/arm-network/src/api/routeTables/index.ts create mode 100644 sdk/network/arm-network/src/api/routeTables/operations.ts create mode 100644 sdk/network/arm-network/src/api/routeTables/options.ts create mode 100644 sdk/network/arm-network/src/api/routes/index.ts create mode 100644 sdk/network/arm-network/src/api/routes/operations.ts create mode 100644 sdk/network/arm-network/src/api/routes/options.ts create mode 100644 sdk/network/arm-network/src/api/routingIntent/index.ts create mode 100644 sdk/network/arm-network/src/api/routingIntent/operations.ts create mode 100644 sdk/network/arm-network/src/api/routingIntent/options.ts create mode 100644 sdk/network/arm-network/src/api/routingRuleCollections/index.ts create mode 100644 sdk/network/arm-network/src/api/routingRuleCollections/operations.ts create mode 100644 sdk/network/arm-network/src/api/routingRuleCollections/options.ts create mode 100644 sdk/network/arm-network/src/api/routingRules/index.ts create mode 100644 sdk/network/arm-network/src/api/routingRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/routingRules/options.ts create mode 100644 sdk/network/arm-network/src/api/scopeConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/scopeConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/scopeConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/securityAdminConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/api/securityAdminConfigurations/operations.ts create mode 100644 sdk/network/arm-network/src/api/securityAdminConfigurations/options.ts create mode 100644 sdk/network/arm-network/src/api/securityPartnerProviders/index.ts create mode 100644 sdk/network/arm-network/src/api/securityPartnerProviders/operations.ts create mode 100644 sdk/network/arm-network/src/api/securityPartnerProviders/options.ts create mode 100644 sdk/network/arm-network/src/api/securityRules/index.ts create mode 100644 sdk/network/arm-network/src/api/securityRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/securityRules/options.ts create mode 100644 sdk/network/arm-network/src/api/securityUserConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/api/securityUserConfigurations/operations.ts create mode 100644 sdk/network/arm-network/src/api/securityUserConfigurations/options.ts create mode 100644 sdk/network/arm-network/src/api/securityUserRuleCollections/index.ts create mode 100644 sdk/network/arm-network/src/api/securityUserRuleCollections/operations.ts create mode 100644 sdk/network/arm-network/src/api/securityUserRuleCollections/options.ts create mode 100644 sdk/network/arm-network/src/api/securityUserRules/index.ts create mode 100644 sdk/network/arm-network/src/api/securityUserRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/securityUserRules/options.ts create mode 100644 sdk/network/arm-network/src/api/serviceAssociationLinks/index.ts create mode 100644 sdk/network/arm-network/src/api/serviceAssociationLinks/operations.ts create mode 100644 sdk/network/arm-network/src/api/serviceAssociationLinks/options.ts create mode 100644 sdk/network/arm-network/src/api/serviceEndpointPolicies/index.ts create mode 100644 sdk/network/arm-network/src/api/serviceEndpointPolicies/operations.ts create mode 100644 sdk/network/arm-network/src/api/serviceEndpointPolicies/options.ts create mode 100644 sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/index.ts create mode 100644 sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/operations.ts create mode 100644 sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/options.ts create mode 100644 sdk/network/arm-network/src/api/serviceGateways/index.ts create mode 100644 sdk/network/arm-network/src/api/serviceGateways/operations.ts create mode 100644 sdk/network/arm-network/src/api/serviceGateways/options.ts create mode 100644 sdk/network/arm-network/src/api/serviceTagInformation/index.ts create mode 100644 sdk/network/arm-network/src/api/serviceTagInformation/operations.ts create mode 100644 sdk/network/arm-network/src/api/serviceTagInformation/options.ts create mode 100644 sdk/network/arm-network/src/api/serviceTags/index.ts create mode 100644 sdk/network/arm-network/src/api/serviceTags/operations.ts create mode 100644 sdk/network/arm-network/src/api/serviceTags/options.ts create mode 100644 sdk/network/arm-network/src/api/staticCidrs/index.ts create mode 100644 sdk/network/arm-network/src/api/staticCidrs/operations.ts create mode 100644 sdk/network/arm-network/src/api/staticCidrs/options.ts create mode 100644 sdk/network/arm-network/src/api/staticMembers/index.ts create mode 100644 sdk/network/arm-network/src/api/staticMembers/operations.ts create mode 100644 sdk/network/arm-network/src/api/staticMembers/options.ts create mode 100644 sdk/network/arm-network/src/api/subgroups/index.ts create mode 100644 sdk/network/arm-network/src/api/subgroups/operations.ts create mode 100644 sdk/network/arm-network/src/api/subgroups/options.ts create mode 100644 sdk/network/arm-network/src/api/subnets/index.ts create mode 100644 sdk/network/arm-network/src/api/subnets/operations.ts create mode 100644 sdk/network/arm-network/src/api/subnets/options.ts create mode 100644 sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/usages/index.ts create mode 100644 sdk/network/arm-network/src/api/usages/operations.ts create mode 100644 sdk/network/arm-network/src/api/usages/options.ts create mode 100644 sdk/network/arm-network/src/api/verifierWorkspaces/index.ts create mode 100644 sdk/network/arm-network/src/api/verifierWorkspaces/operations.ts create mode 100644 sdk/network/arm-network/src/api/verifierWorkspaces/options.ts create mode 100644 sdk/network/arm-network/src/api/vipSwap/index.ts create mode 100644 sdk/network/arm-network/src/api/vipSwap/operations.ts create mode 100644 sdk/network/arm-network/src/api/vipSwap/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualApplianceSites/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualApplianceSites/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualApplianceSites/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualApplianceSkus/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualApplianceSkus/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualApplianceSkus/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubBgpConnection/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubBgpConnection/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubBgpConnection/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubBgpConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubBgpConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubBgpConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubIpConfiguration/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubIpConfiguration/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubIpConfiguration/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubRouteTableV2S/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubRouteTableV2S/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubRouteTableV2S/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubs/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubs/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualHubs/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkAppliances/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkAppliances/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkAppliances/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkGateways/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkGateways/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkGateways/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkPeerings/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkPeerings/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkPeerings/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkTaps/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkTaps/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworkTaps/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworks/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworks/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualNetworks/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualRouterPeerings/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualRouterPeerings/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualRouterPeerings/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualRouters/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualRouters/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualRouters/options.ts create mode 100644 sdk/network/arm-network/src/api/virtualWans/index.ts create mode 100644 sdk/network/arm-network/src/api/virtualWans/operations.ts create mode 100644 sdk/network/arm-network/src/api/virtualWans/options.ts create mode 100644 sdk/network/arm-network/src/api/vpnConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/vpnConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/vpnConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/vpnGateways/index.ts create mode 100644 sdk/network/arm-network/src/api/vpnGateways/operations.ts create mode 100644 sdk/network/arm-network/src/api/vpnGateways/options.ts create mode 100644 sdk/network/arm-network/src/api/vpnLinkConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/vpnLinkConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/vpnLinkConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/vpnServerConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/api/vpnServerConfigurations/operations.ts create mode 100644 sdk/network/arm-network/src/api/vpnServerConfigurations/options.ts create mode 100644 sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/index.ts create mode 100644 sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/operations.ts create mode 100644 sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/options.ts create mode 100644 sdk/network/arm-network/src/api/vpnSiteLinkConnections/index.ts create mode 100644 sdk/network/arm-network/src/api/vpnSiteLinkConnections/operations.ts create mode 100644 sdk/network/arm-network/src/api/vpnSiteLinkConnections/options.ts create mode 100644 sdk/network/arm-network/src/api/vpnSiteLinks/index.ts create mode 100644 sdk/network/arm-network/src/api/vpnSiteLinks/operations.ts create mode 100644 sdk/network/arm-network/src/api/vpnSiteLinks/options.ts create mode 100644 sdk/network/arm-network/src/api/vpnSites/index.ts create mode 100644 sdk/network/arm-network/src/api/vpnSites/operations.ts create mode 100644 sdk/network/arm-network/src/api/vpnSites/options.ts create mode 100644 sdk/network/arm-network/src/api/vpnSitesConfiguration/index.ts create mode 100644 sdk/network/arm-network/src/api/vpnSitesConfiguration/operations.ts create mode 100644 sdk/network/arm-network/src/api/vpnSitesConfiguration/options.ts create mode 100644 sdk/network/arm-network/src/api/webApplicationFirewallPolicies/index.ts create mode 100644 sdk/network/arm-network/src/api/webApplicationFirewallPolicies/operations.ts create mode 100644 sdk/network/arm-network/src/api/webApplicationFirewallPolicies/options.ts create mode 100644 sdk/network/arm-network/src/api/webCategories/index.ts create mode 100644 sdk/network/arm-network/src/api/webCategories/operations.ts create mode 100644 sdk/network/arm-network/src/api/webCategories/options.ts create mode 100644 sdk/network/arm-network/src/classic/adminRuleCollections/index.ts create mode 100644 sdk/network/arm-network/src/classic/adminRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/applicationGatewayPrivateEndpointConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/applicationGatewayPrivateLinkResources/index.ts create mode 100644 sdk/network/arm-network/src/classic/applicationGatewayWafDynamicManifests/index.ts create mode 100644 sdk/network/arm-network/src/classic/applicationGatewayWafDynamicManifestsDefault/index.ts create mode 100644 sdk/network/arm-network/src/classic/applicationGateways/index.ts create mode 100644 sdk/network/arm-network/src/classic/applicationSecurityGroups/index.ts create mode 100644 sdk/network/arm-network/src/classic/availableDelegations/index.ts create mode 100644 sdk/network/arm-network/src/classic/availableEndpointServices/index.ts create mode 100644 sdk/network/arm-network/src/classic/availablePrivateEndpointTypes/index.ts create mode 100644 sdk/network/arm-network/src/classic/availableResourceGroupDelegations/index.ts create mode 100644 sdk/network/arm-network/src/classic/availableServiceAliases/index.ts create mode 100644 sdk/network/arm-network/src/classic/azureFirewallFqdnTags/index.ts create mode 100644 sdk/network/arm-network/src/classic/azureFirewalls/index.ts create mode 100644 sdk/network/arm-network/src/classic/bastionHosts/index.ts create mode 100644 sdk/network/arm-network/src/classic/bgpServiceCommunities/index.ts create mode 100644 sdk/network/arm-network/src/classic/commits/index.ts create mode 100644 sdk/network/arm-network/src/classic/configurationPolicyGroups/index.ts create mode 100644 sdk/network/arm-network/src/classic/connectionMonitors/index.ts create mode 100644 sdk/network/arm-network/src/classic/connectionPolicies/index.ts create mode 100644 sdk/network/arm-network/src/classic/connectivityConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/classic/customIPPrefixes/index.ts create mode 100644 sdk/network/arm-network/src/classic/ddosCustomPolicies/index.ts create mode 100644 sdk/network/arm-network/src/classic/ddosProtectionPlans/index.ts create mode 100644 sdk/network/arm-network/src/classic/defaultSecurityRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/dscpConfiguration/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRouteCircuitAuthorizations/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRouteCircuitConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRouteCircuitPeerings/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRouteCircuits/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRouteConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRouteCrossConnectionPeerings/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRouteCrossConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRouteGateways/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRouteLinks/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRoutePortAuthorizations/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRoutePorts/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRoutePortsLocations/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRouteProviderPortsLocation/index.ts create mode 100644 sdk/network/arm-network/src/classic/expressRouteServiceProviders/index.ts create mode 100644 sdk/network/arm-network/src/classic/firewallPolicies/index.ts create mode 100644 sdk/network/arm-network/src/classic/firewallPolicyDeployments/index.ts create mode 100644 sdk/network/arm-network/src/classic/firewallPolicyDrafts/index.ts create mode 100644 sdk/network/arm-network/src/classic/firewallPolicyIdpsSignatures/index.ts create mode 100644 sdk/network/arm-network/src/classic/firewallPolicyIdpsSignaturesFilterValues/index.ts create mode 100644 sdk/network/arm-network/src/classic/firewallPolicyIdpsSignaturesOverrides/index.ts create mode 100644 sdk/network/arm-network/src/classic/firewallPolicyRuleCollectionGroupDrafts/index.ts create mode 100644 sdk/network/arm-network/src/classic/firewallPolicyRuleCollectionGroups/index.ts create mode 100644 sdk/network/arm-network/src/classic/flowLogs/index.ts create mode 100644 sdk/network/arm-network/src/classic/hubRouteTables/index.ts create mode 100644 sdk/network/arm-network/src/classic/hubVirtualNetworkConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/inboundNatRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/inboundSecurityRule/index.ts create mode 100644 sdk/network/arm-network/src/classic/index.ts create mode 100644 sdk/network/arm-network/src/classic/interconnectGroups/index.ts create mode 100644 sdk/network/arm-network/src/classic/ipAllocations/index.ts create mode 100644 sdk/network/arm-network/src/classic/ipGroups/index.ts create mode 100644 sdk/network/arm-network/src/classic/ipamPools/index.ts create mode 100644 sdk/network/arm-network/src/classic/loadBalancerBackendAddressPools/index.ts create mode 100644 sdk/network/arm-network/src/classic/loadBalancerFrontendIPConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/classic/loadBalancerLoadBalancingRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/loadBalancerNetworkInterfaces/index.ts create mode 100644 sdk/network/arm-network/src/classic/loadBalancerOutboundRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/loadBalancerProbes/index.ts create mode 100644 sdk/network/arm-network/src/classic/loadBalancers/index.ts create mode 100644 sdk/network/arm-network/src/classic/localNetworkGateways/index.ts create mode 100644 sdk/network/arm-network/src/classic/managementGroupNetworkManagerConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/natGateways/index.ts create mode 100644 sdk/network/arm-network/src/classic/natRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkGroups/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkInterfaceIPConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkInterfaceLoadBalancers/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkInterfaceTapConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkInterfaces/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkManagerCommits/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkManagerDeploymentStatus/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkManagerRoutingConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkManagers/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkProfiles/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkSecurityGroups/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkSecurityPerimeterAccessRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkSecurityPerimeterAssociableResourceTypes/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkSecurityPerimeterAssociations/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkSecurityPerimeterLinkReferences/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkSecurityPerimeterLinks/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkSecurityPerimeterLoggingConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkSecurityPerimeterOperationStatuses/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkSecurityPerimeterProfiles/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkSecurityPerimeterServiceTags/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkSecurityPerimeters/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkVirtualApplianceConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkVirtualAppliances/index.ts create mode 100644 sdk/network/arm-network/src/classic/networkWatchers/index.ts create mode 100644 sdk/network/arm-network/src/classic/operations/index.ts create mode 100644 sdk/network/arm-network/src/classic/p2SVpnGateways/index.ts create mode 100644 sdk/network/arm-network/src/classic/packetCaptures/index.ts create mode 100644 sdk/network/arm-network/src/classic/peerExpressRouteCircuitConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/privateDnsZoneGroups/index.ts create mode 100644 sdk/network/arm-network/src/classic/privateEndpoints/index.ts create mode 100644 sdk/network/arm-network/src/classic/privateLinkServices/index.ts create mode 100644 sdk/network/arm-network/src/classic/publicIPAddresses/index.ts create mode 100644 sdk/network/arm-network/src/classic/publicIPPrefixes/index.ts create mode 100644 sdk/network/arm-network/src/classic/reachabilityAnalysisIntents/index.ts create mode 100644 sdk/network/arm-network/src/classic/reachabilityAnalysisRuns/index.ts create mode 100644 sdk/network/arm-network/src/classic/resourceNavigationLinks/index.ts create mode 100644 sdk/network/arm-network/src/classic/routeFilterRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/routeFilters/index.ts create mode 100644 sdk/network/arm-network/src/classic/routeMaps/index.ts create mode 100644 sdk/network/arm-network/src/classic/routeTables/index.ts create mode 100644 sdk/network/arm-network/src/classic/routes/index.ts create mode 100644 sdk/network/arm-network/src/classic/routingIntent/index.ts create mode 100644 sdk/network/arm-network/src/classic/routingRuleCollections/index.ts create mode 100644 sdk/network/arm-network/src/classic/routingRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/scopeConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/securityAdminConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/classic/securityPartnerProviders/index.ts create mode 100644 sdk/network/arm-network/src/classic/securityRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/securityUserConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/classic/securityUserRuleCollections/index.ts create mode 100644 sdk/network/arm-network/src/classic/securityUserRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/serviceAssociationLinks/index.ts create mode 100644 sdk/network/arm-network/src/classic/serviceEndpointPolicies/index.ts create mode 100644 sdk/network/arm-network/src/classic/serviceEndpointPolicyDefinitions/index.ts create mode 100644 sdk/network/arm-network/src/classic/serviceGateways/index.ts create mode 100644 sdk/network/arm-network/src/classic/serviceTagInformation/index.ts create mode 100644 sdk/network/arm-network/src/classic/serviceTags/index.ts create mode 100644 sdk/network/arm-network/src/classic/staticCidrs/index.ts create mode 100644 sdk/network/arm-network/src/classic/staticMembers/index.ts create mode 100644 sdk/network/arm-network/src/classic/subgroups/index.ts create mode 100644 sdk/network/arm-network/src/classic/subnets/index.ts create mode 100644 sdk/network/arm-network/src/classic/subscriptionNetworkManagerConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/usages/index.ts create mode 100644 sdk/network/arm-network/src/classic/verifierWorkspaces/index.ts create mode 100644 sdk/network/arm-network/src/classic/vipSwap/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualApplianceSites/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualApplianceSkus/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualHubBgpConnection/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualHubBgpConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualHubIpConfiguration/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualHubRouteTableV2S/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualHubs/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualNetworkAppliances/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualNetworkGatewayConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualNetworkGatewayNatRules/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualNetworkGateways/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualNetworkPeerings/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualNetworkTaps/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualNetworks/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualRouterPeerings/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualRouters/index.ts create mode 100644 sdk/network/arm-network/src/classic/virtualWans/index.ts create mode 100644 sdk/network/arm-network/src/classic/vpnConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/vpnGateways/index.ts create mode 100644 sdk/network/arm-network/src/classic/vpnLinkConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/vpnServerConfigurations/index.ts create mode 100644 sdk/network/arm-network/src/classic/vpnServerConfigurationsAssociatedWithVirtualWan/index.ts create mode 100644 sdk/network/arm-network/src/classic/vpnSiteLinkConnections/index.ts create mode 100644 sdk/network/arm-network/src/classic/vpnSiteLinks/index.ts create mode 100644 sdk/network/arm-network/src/classic/vpnSites/index.ts create mode 100644 sdk/network/arm-network/src/classic/vpnSitesConfiguration/index.ts create mode 100644 sdk/network/arm-network/src/classic/webApplicationFirewallPolicies/index.ts create mode 100644 sdk/network/arm-network/src/classic/webCategories/index.ts create mode 100644 sdk/network/arm-network/src/logger.ts delete mode 100644 sdk/network/arm-network/src/lroImpl.ts create mode 100644 sdk/network/arm-network/src/models/common/index.ts create mode 100644 sdk/network/arm-network/src/models/common/models.ts delete mode 100644 sdk/network/arm-network/src/models/mappers.ts create mode 100644 sdk/network/arm-network/src/models/microsoft/network/index.ts create mode 100644 sdk/network/arm-network/src/models/microsoft/network/models.ts create mode 100644 sdk/network/arm-network/src/models/models.ts delete mode 100644 sdk/network/arm-network/src/models/parameters.ts delete mode 100644 sdk/network/arm-network/src/operations/adminRuleCollections.ts delete mode 100644 sdk/network/arm-network/src/operations/adminRules.ts delete mode 100644 sdk/network/arm-network/src/operations/applicationGatewayPrivateEndpointConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/applicationGatewayPrivateLinkResources.ts delete mode 100644 sdk/network/arm-network/src/operations/applicationGatewayWafDynamicManifests.ts delete mode 100644 sdk/network/arm-network/src/operations/applicationGatewayWafDynamicManifestsDefault.ts delete mode 100644 sdk/network/arm-network/src/operations/applicationGateways.ts delete mode 100644 sdk/network/arm-network/src/operations/applicationSecurityGroups.ts delete mode 100644 sdk/network/arm-network/src/operations/availableDelegations.ts delete mode 100644 sdk/network/arm-network/src/operations/availableEndpointServices.ts delete mode 100644 sdk/network/arm-network/src/operations/availablePrivateEndpointTypes.ts delete mode 100644 sdk/network/arm-network/src/operations/availableResourceGroupDelegations.ts delete mode 100644 sdk/network/arm-network/src/operations/availableServiceAliases.ts delete mode 100644 sdk/network/arm-network/src/operations/azureFirewallFqdnTags.ts delete mode 100644 sdk/network/arm-network/src/operations/azureFirewalls.ts delete mode 100644 sdk/network/arm-network/src/operations/bastionHosts.ts delete mode 100644 sdk/network/arm-network/src/operations/bgpServiceCommunities.ts delete mode 100644 sdk/network/arm-network/src/operations/configurationPolicyGroups.ts delete mode 100644 sdk/network/arm-network/src/operations/connectionMonitors.ts delete mode 100644 sdk/network/arm-network/src/operations/connectivityConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operations/customIPPrefixes.ts delete mode 100644 sdk/network/arm-network/src/operations/ddosCustomPolicies.ts delete mode 100644 sdk/network/arm-network/src/operations/ddosProtectionPlans.ts delete mode 100644 sdk/network/arm-network/src/operations/defaultSecurityRules.ts delete mode 100644 sdk/network/arm-network/src/operations/dscpConfigurationOperations.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRouteCircuitAuthorizations.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRouteCircuitConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRouteCircuitPeerings.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRouteCircuits.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRouteConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRouteCrossConnectionPeerings.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRouteCrossConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRouteGateways.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRouteLinks.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRoutePortAuthorizations.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRoutePorts.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRoutePortsLocations.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRouteProviderPortsLocation.ts delete mode 100644 sdk/network/arm-network/src/operations/expressRouteServiceProviders.ts delete mode 100644 sdk/network/arm-network/src/operations/firewallPolicies.ts delete mode 100644 sdk/network/arm-network/src/operations/firewallPolicyDeployments.ts delete mode 100644 sdk/network/arm-network/src/operations/firewallPolicyDrafts.ts delete mode 100644 sdk/network/arm-network/src/operations/firewallPolicyIdpsSignatures.ts delete mode 100644 sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesFilterValues.ts delete mode 100644 sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesOverrides.ts delete mode 100644 sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroupDrafts.ts delete mode 100644 sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroups.ts delete mode 100644 sdk/network/arm-network/src/operations/flowLogs.ts delete mode 100644 sdk/network/arm-network/src/operations/hubRouteTables.ts delete mode 100644 sdk/network/arm-network/src/operations/hubVirtualNetworkConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/inboundNatRules.ts delete mode 100644 sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts delete mode 100644 sdk/network/arm-network/src/operations/index.ts delete mode 100644 sdk/network/arm-network/src/operations/ipAllocations.ts delete mode 100644 sdk/network/arm-network/src/operations/ipGroups.ts delete mode 100644 sdk/network/arm-network/src/operations/ipamPools.ts delete mode 100644 sdk/network/arm-network/src/operations/loadBalancerBackendAddressPools.ts delete mode 100644 sdk/network/arm-network/src/operations/loadBalancerFrontendIPConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operations/loadBalancerLoadBalancingRules.ts delete mode 100644 sdk/network/arm-network/src/operations/loadBalancerNetworkInterfaces.ts delete mode 100644 sdk/network/arm-network/src/operations/loadBalancerOutboundRules.ts delete mode 100644 sdk/network/arm-network/src/operations/loadBalancerProbes.ts delete mode 100644 sdk/network/arm-network/src/operations/loadBalancers.ts delete mode 100644 sdk/network/arm-network/src/operations/localNetworkGateways.ts delete mode 100644 sdk/network/arm-network/src/operations/managementGroupNetworkManagerConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/natGateways.ts delete mode 100644 sdk/network/arm-network/src/operations/natRules.ts delete mode 100644 sdk/network/arm-network/src/operations/networkGroups.ts delete mode 100644 sdk/network/arm-network/src/operations/networkInterfaceIPConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operations/networkInterfaceLoadBalancers.ts delete mode 100644 sdk/network/arm-network/src/operations/networkInterfaceTapConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operations/networkInterfaces.ts delete mode 100644 sdk/network/arm-network/src/operations/networkManagerCommits.ts delete mode 100644 sdk/network/arm-network/src/operations/networkManagerDeploymentStatusOperations.ts delete mode 100644 sdk/network/arm-network/src/operations/networkManagerRoutingConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operations/networkManagers.ts delete mode 100644 sdk/network/arm-network/src/operations/networkProfiles.ts delete mode 100644 sdk/network/arm-network/src/operations/networkSecurityGroups.ts delete mode 100644 sdk/network/arm-network/src/operations/networkSecurityPerimeterAccessRules.ts delete mode 100644 sdk/network/arm-network/src/operations/networkSecurityPerimeterAssociableResourceTypes.ts delete mode 100644 sdk/network/arm-network/src/operations/networkSecurityPerimeterAssociations.ts delete mode 100644 sdk/network/arm-network/src/operations/networkSecurityPerimeterLinkReferences.ts delete mode 100644 sdk/network/arm-network/src/operations/networkSecurityPerimeterLinks.ts delete mode 100644 sdk/network/arm-network/src/operations/networkSecurityPerimeterLoggingConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operations/networkSecurityPerimeterOperationStatuses.ts delete mode 100644 sdk/network/arm-network/src/operations/networkSecurityPerimeterProfiles.ts delete mode 100644 sdk/network/arm-network/src/operations/networkSecurityPerimeterServiceTags.ts delete mode 100644 sdk/network/arm-network/src/operations/networkSecurityPerimeters.ts delete mode 100644 sdk/network/arm-network/src/operations/networkVirtualApplianceConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/networkVirtualAppliances.ts delete mode 100644 sdk/network/arm-network/src/operations/networkWatchers.ts delete mode 100644 sdk/network/arm-network/src/operations/operations.ts delete mode 100644 sdk/network/arm-network/src/operations/p2SVpnGateways.ts delete mode 100644 sdk/network/arm-network/src/operations/packetCaptures.ts delete mode 100644 sdk/network/arm-network/src/operations/peerExpressRouteCircuitConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/privateDnsZoneGroups.ts delete mode 100644 sdk/network/arm-network/src/operations/privateEndpoints.ts delete mode 100644 sdk/network/arm-network/src/operations/privateLinkServices.ts delete mode 100644 sdk/network/arm-network/src/operations/publicIPAddresses.ts delete mode 100644 sdk/network/arm-network/src/operations/publicIPPrefixes.ts delete mode 100644 sdk/network/arm-network/src/operations/reachabilityAnalysisIntents.ts delete mode 100644 sdk/network/arm-network/src/operations/reachabilityAnalysisRuns.ts delete mode 100644 sdk/network/arm-network/src/operations/resourceNavigationLinks.ts delete mode 100644 sdk/network/arm-network/src/operations/routeFilterRules.ts delete mode 100644 sdk/network/arm-network/src/operations/routeFilters.ts delete mode 100644 sdk/network/arm-network/src/operations/routeMaps.ts delete mode 100644 sdk/network/arm-network/src/operations/routeTables.ts delete mode 100644 sdk/network/arm-network/src/operations/routes.ts delete mode 100644 sdk/network/arm-network/src/operations/routingIntentOperations.ts delete mode 100644 sdk/network/arm-network/src/operations/routingRuleCollections.ts delete mode 100644 sdk/network/arm-network/src/operations/routingRules.ts delete mode 100644 sdk/network/arm-network/src/operations/scopeConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/securityAdminConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operations/securityPartnerProviders.ts delete mode 100644 sdk/network/arm-network/src/operations/securityRules.ts delete mode 100644 sdk/network/arm-network/src/operations/securityUserConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operations/securityUserRuleCollections.ts delete mode 100644 sdk/network/arm-network/src/operations/securityUserRules.ts delete mode 100644 sdk/network/arm-network/src/operations/serviceAssociationLinks.ts delete mode 100644 sdk/network/arm-network/src/operations/serviceEndpointPolicies.ts delete mode 100644 sdk/network/arm-network/src/operations/serviceEndpointPolicyDefinitions.ts delete mode 100644 sdk/network/arm-network/src/operations/serviceGateways.ts delete mode 100644 sdk/network/arm-network/src/operations/serviceTagInformationOperations.ts delete mode 100644 sdk/network/arm-network/src/operations/serviceTags.ts delete mode 100644 sdk/network/arm-network/src/operations/staticCidrs.ts delete mode 100644 sdk/network/arm-network/src/operations/staticMembers.ts delete mode 100644 sdk/network/arm-network/src/operations/subnets.ts delete mode 100644 sdk/network/arm-network/src/operations/subscriptionNetworkManagerConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/usages.ts delete mode 100644 sdk/network/arm-network/src/operations/verifierWorkspaces.ts delete mode 100644 sdk/network/arm-network/src/operations/vipSwap.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualApplianceSites.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualApplianceSkus.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualHubBgpConnection.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualHubBgpConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualHubIpConfiguration.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualHubRouteTableV2S.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualHubs.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualNetworkAppliances.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualNetworkGatewayConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualNetworkGateways.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualNetworkTaps.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualNetworks.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualRouterPeerings.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualRouters.ts delete mode 100644 sdk/network/arm-network/src/operations/virtualWans.ts delete mode 100644 sdk/network/arm-network/src/operations/vpnConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/vpnGateways.ts delete mode 100644 sdk/network/arm-network/src/operations/vpnLinkConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/vpnServerConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operations/vpnServerConfigurationsAssociatedWithVirtualWan.ts delete mode 100644 sdk/network/arm-network/src/operations/vpnSiteLinkConnections.ts delete mode 100644 sdk/network/arm-network/src/operations/vpnSiteLinks.ts delete mode 100644 sdk/network/arm-network/src/operations/vpnSites.ts delete mode 100644 sdk/network/arm-network/src/operations/vpnSitesConfiguration.ts delete mode 100644 sdk/network/arm-network/src/operations/webApplicationFirewallPolicies.ts delete mode 100644 sdk/network/arm-network/src/operations/webCategories.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/adminRuleCollections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/adminRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/applicationGatewayPrivateEndpointConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/applicationGatewayPrivateLinkResources.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/applicationGatewayWafDynamicManifests.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/applicationGatewayWafDynamicManifestsDefault.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/applicationGateways.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/applicationSecurityGroups.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/availableDelegations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/availableEndpointServices.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/availablePrivateEndpointTypes.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/availableResourceGroupDelegations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/availableServiceAliases.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/azureFirewallFqdnTags.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/azureFirewalls.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/bastionHosts.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/bgpServiceCommunities.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/configurationPolicyGroups.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/connectionMonitors.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/connectivityConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/customIPPrefixes.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/ddosCustomPolicies.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/ddosProtectionPlans.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/defaultSecurityRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/dscpConfigurationOperations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitAuthorizations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitPeerings.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuits.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteCrossConnectionPeerings.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteCrossConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteGateways.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteLinks.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRoutePortAuthorizations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRoutePorts.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRoutePortsLocations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteProviderPortsLocation.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteServiceProviders.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/firewallPolicies.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/firewallPolicyDeployments.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/firewallPolicyDrafts.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignatures.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignaturesFilterValues.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignaturesOverrides.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/firewallPolicyRuleCollectionGroupDrafts.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/firewallPolicyRuleCollectionGroups.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/flowLogs.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/hubRouteTables.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/hubVirtualNetworkConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/inboundNatRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/inboundSecurityRuleOperations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/index.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/ipAllocations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/ipGroups.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/ipamPools.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/loadBalancerBackendAddressPools.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/loadBalancerFrontendIPConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/loadBalancerLoadBalancingRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/loadBalancerNetworkInterfaces.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/loadBalancerOutboundRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/loadBalancerProbes.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/loadBalancers.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/localNetworkGateways.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/managementGroupNetworkManagerConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/natGateways.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/natRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkGroups.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkInterfaceIPConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkInterfaceLoadBalancers.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkInterfaceTapConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkInterfaces.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkManagerCommits.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkManagerDeploymentStatusOperations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkManagerRoutingConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkManagers.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkProfiles.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkSecurityGroups.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAccessRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAssociableResourceTypes.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAssociations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLinkReferences.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLinks.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLoggingConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterOperationStatuses.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterProfiles.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterServiceTags.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeters.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkVirtualApplianceConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkVirtualAppliances.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/networkWatchers.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/operations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/p2SVpnGateways.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/packetCaptures.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/peerExpressRouteCircuitConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/privateDnsZoneGroups.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/privateEndpoints.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/privateLinkServices.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/publicIPAddresses.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/publicIPPrefixes.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisIntents.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisRuns.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/resourceNavigationLinks.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/routeFilterRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/routeFilters.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/routeMaps.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/routeTables.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/routes.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/routingIntentOperations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/routingRuleCollections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/routingRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/scopeConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/securityAdminConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/securityPartnerProviders.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/securityRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/securityUserConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/securityUserRuleCollections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/securityUserRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/serviceAssociationLinks.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/serviceEndpointPolicies.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/serviceEndpointPolicyDefinitions.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/serviceGateways.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/serviceTagInformationOperations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/serviceTags.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/staticCidrs.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/staticMembers.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/subnets.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/subscriptionNetworkManagerConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/usages.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/verifierWorkspaces.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/vipSwap.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualApplianceSites.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualApplianceSkus.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualHubBgpConnection.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualHubBgpConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualHubIpConfiguration.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualHubRouteTableV2S.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualHubs.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualNetworkAppliances.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGatewayConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGatewayNatRules.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGateways.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualNetworkPeerings.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualNetworkTaps.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualNetworks.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualRouterPeerings.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualRouters.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/virtualWans.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/vpnConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/vpnGateways.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/vpnLinkConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/vpnServerConfigurations.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/vpnServerConfigurationsAssociatedWithVirtualWan.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/vpnSiteLinkConnections.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/vpnSiteLinks.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/vpnSites.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/vpnSitesConfiguration.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/webApplicationFirewallPolicies.ts delete mode 100644 sdk/network/arm-network/src/operationsInterfaces/webCategories.ts delete mode 100644 sdk/network/arm-network/src/pagingHelper.ts create mode 100644 sdk/network/arm-network/src/restorePollerHelpers.ts create mode 100644 sdk/network/arm-network/src/static-helpers/cloudSettingHelpers.ts create mode 100644 sdk/network/arm-network/src/static-helpers/pagingHelpers.ts create mode 100644 sdk/network/arm-network/src/static-helpers/pollingHelpers.ts create mode 100644 sdk/network/arm-network/src/static-helpers/serialization/check-prop-undefined.ts create mode 100644 sdk/network/arm-network/src/static-helpers/simplePollerHelpers.ts create mode 100644 sdk/network/arm-network/src/static-helpers/urlTemplate.ts delete mode 100644 sdk/network/arm-network/tsconfig.browser.config.json delete mode 100644 sdk/network/arm-network/tsconfig.samples.json delete mode 100644 sdk/network/arm-network/tsconfig.snippets.json delete mode 100644 sdk/network/arm-network/tsconfig.src.json delete mode 100644 sdk/network/arm-network/tsconfig.test.json delete mode 100644 sdk/network/arm-network/tsconfig.test.node.json create mode 100644 sdk/network/arm-network/tsp-location.yaml delete mode 100644 sdk/network/arm-network/vitest.esm.config.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9092bb834bf9..ff94996a4d85 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -796,7 +796,7 @@ # PRLabel: %Mgmt /sdk/nginx/arm-nginx/ @qiaozha @MaryGao @JialinHuang803 -# PRLabel: %Mgmt +# PRLabel: %Mgmt %mgmt-review-needed /sdk/network/arm-network/ @qiaozha @MaryGao @JialinHuang803 # PRLabel: %Mgmt diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 65a6adcdc8ec..ecab133c8a36 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22638,24 +22638,27 @@ importers: sdk/network/arm-network: dependencies: + '@azure-rest/core-client': + specifier: ^2.3.1 + version: link:../../core/core-client-rest '@azure/abort-controller': specifier: ^2.1.2 version: link:../../core/abort-controller '@azure/core-auth': specifier: ^1.9.0 version: link:../../core/core-auth - '@azure/core-client': - specifier: ^1.9.3 - version: link:../../core/core-client '@azure/core-lro': - specifier: ^2.5.4 - version: 2.7.2 - '@azure/core-paging': - specifier: ^1.6.2 - version: link:../../core/core-paging + specifier: ^3.1.0 + version: link:../../core/core-lro '@azure/core-rest-pipeline': specifier: link:../../core/core-rest-pipeline version: link:../../core/core-rest-pipeline + '@azure/core-util': + specifier: ^1.12.0 + version: link:../../core/core-util + '@azure/logger': + specifier: ^1.2.0 + version: link:../../core/logger tslib: specifier: ^2.8.1 version: 2.8.1 @@ -22672,12 +22675,12 @@ importers: '@azure/dev-tool': specifier: workspace:^ version: link:../../../common/tools/dev-tool + '@azure/eslint-plugin-azure-sdk': + specifier: workspace:^ + version: link:../../../common/tools/eslint-plugin-azure-sdk '@azure/identity': specifier: catalog:internal version: 4.13.0 - '@azure/logger': - specifier: workspace:^ - version: link:../../core/logger '@types/node': specifier: 'catalog:' version: 20.19.40 @@ -22702,9 +22705,6 @@ importers: prettier: specifier: 'catalog:' version: 3.8.3 - react-native: - specifier: catalog:testing - version: 0.84.1(@babel/core@7.29.0)(@types/react@19.2.14)(react@19.2.4) rimraf: specifier: 'catalog:' version: 6.1.3 diff --git a/sdk/network/arm-network/CHANGELOG.md b/sdk/network/arm-network/CHANGELOG.md index 4b5d20174cbb..13dd08af78ab 100644 --- a/sdk/network/arm-network/CHANGELOG.md +++ b/sdk/network/arm-network/CHANGELOG.md @@ -1,1770 +1,11 @@ # Release History -## 36.0.0 (2026-02-11) +## 1.0.0-beta.1 (Unreleased) ### Features Added - - Added operation group ServiceGateways - - Added operation group VirtualNetworkAppliances - - Added Interface GetServiceGatewayAddressLocationsResult - - Added Interface GetServiceGatewayServicesResult - - Added Interface RouteTargetAddressPropertiesFormat - - Added Interface ServiceGateway - - Added Interface ServiceGatewayAddress - - Added Interface ServiceGatewayAddressLocation - - Added Interface ServiceGatewayAddressLocationResponse - - Added Interface ServiceGatewayListResult - - Added Interface ServiceGatewaysCreateOrUpdateOptionalParams - - Added Interface ServiceGatewaysDeleteHeaders - - Added Interface ServiceGatewaysDeleteOptionalParams - - Added Interface ServiceGatewayService - - Added Interface ServiceGatewayServiceRequest - - Added Interface ServiceGatewaysGetAddressLocationsOptionalParams - - Added Interface ServiceGatewaysGetOptionalParams - - Added Interface ServiceGatewaysGetServicesOptionalParams - - Added Interface ServiceGatewaySku - - Added Interface ServiceGatewaysListAllOptionalParams - - Added Interface ServiceGatewaysListOptionalParams - - Added Interface ServiceGatewaysUpdateAddressLocationsHeaders - - Added Interface ServiceGatewaysUpdateAddressLocationsOptionalParams - - Added Interface ServiceGatewaysUpdateServicesHeaders - - Added Interface ServiceGatewaysUpdateServicesOptionalParams - - Added Interface ServiceGatewaysUpdateTagsOptionalParams - - Added Interface ServiceGatewayUpdateAddressLocationsRequest - - Added Interface ServiceGatewayUpdateServicesRequest - - Added Interface VirtualNetworkAppliance - - Added Interface VirtualNetworkApplianceIpConfiguration - - Added Interface VirtualNetworkApplianceListResult - - Added Interface VirtualNetworkAppliancesCreateOrUpdateOptionalParams - - Added Interface VirtualNetworkAppliancesDeleteHeaders - - Added Interface VirtualNetworkAppliancesDeleteOptionalParams - - Added Interface VirtualNetworkAppliancesGetOptionalParams - - Added Interface VirtualNetworkAppliancesListAllOptionalParams - - Added Interface VirtualNetworkAppliancesListOptionalParams - - Added Interface VirtualNetworkAppliancesUpdateTagsOptionalParams - - Interface NatGateway has a new optional parameter serviceGateway - - Interface PolicySettings has a new optional parameter captchaCookieExpirationInMins - - Interface Subnet has a new optional parameter serviceGateway - - Added Type Alias AddressUpdateAction - - Added Type Alias ServiceGatewaysCreateOrUpdateResponse - - Added Type Alias ServiceGatewaysDeleteResponse - - Added Type Alias ServiceGatewaysGetAddressLocationsNextResponse - - Added Type Alias ServiceGatewaysGetAddressLocationsResponse - - Added Type Alias ServiceGatewaysGetResponse - - Added Type Alias ServiceGatewaysGetServicesNextResponse - - Added Type Alias ServiceGatewaysGetServicesResponse - - Added Type Alias ServiceGatewaySkuName - - Added Type Alias ServiceGatewaySkuTier - - Added Type Alias ServiceGatewaysListAllNextResponse - - Added Type Alias ServiceGatewaysListAllResponse - - Added Type Alias ServiceGatewaysListNextResponse - - Added Type Alias ServiceGatewaysListResponse - - Added Type Alias ServiceGatewaysUpdateAddressLocationsResponse - - Added Type Alias ServiceGatewaysUpdateServicesResponse - - Added Type Alias ServiceGatewaysUpdateTagsResponse - - Added Type Alias ServiceType - - Added Type Alias ServiceUpdateAction - - Added Type Alias UpdateAction - - Added Type Alias VirtualNetworkAppliancesCreateOrUpdateResponse - - Added Type Alias VirtualNetworkAppliancesDeleteResponse - - Added Type Alias VirtualNetworkAppliancesGetResponse - - Added Type Alias VirtualNetworkAppliancesListAllNextResponse - - Added Type Alias VirtualNetworkAppliancesListAllResponse - - Added Type Alias VirtualNetworkAppliancesListNextResponse - - Added Type Alias VirtualNetworkAppliancesListResponse - - Added Type Alias VirtualNetworkAppliancesUpdateTagsResponse - - Added Enum KnownAddressUpdateAction - - Added Enum KnownServiceGatewaySkuName - - Added Enum KnownServiceGatewaySkuTier - - Added Enum KnownServiceType - - Added Enum KnownServiceUpdateAction - - Added Enum KnownUpdateAction - - Enum KnownActionType has a new value Captcha - - Enum KnownFirewallPolicyIntrusionDetectionProfileType has a new value Core - - Enum KnownFirewallPolicyIntrusionDetectionProfileType has a new value Emerging - - Enum KnownFirewallPolicyIntrusionDetectionProfileType has a new value Off - - Enum KnownWebApplicationFirewallAction has a new value Captcha ### Breaking Changes - - Enum KnownFirewallPolicyIntrusionDetectionProfileType no longer has value Advanced - - Enum KnownFirewallPolicyIntrusionDetectionProfileType no longer has value Basic - - Enum KnownFirewallPolicyIntrusionDetectionProfileType no longer has value Standard -## 35.0.0 (2025-11-19) +### Bugs Fixed -### Features Added - - Added operation PublicIPAddresses.beginDisassociateCloudServiceReservedPublicIp - - Added operation PublicIPAddresses.beginDisassociateCloudServiceReservedPublicIpAndWait - - Added operation PublicIPAddresses.beginReserveCloudServicePublicIpAddress - - Added operation PublicIPAddresses.beginReserveCloudServicePublicIpAddressAndWait - - Added Interface ApplicationGatewayEntraJWTValidationConfig - - Added Interface DdosDetectionRule - - Added Interface DisassociateCloudServicePublicIpRequest - - Added Interface PublicIPAddressesDisassociateCloudServiceReservedPublicIpHeaders - - Added Interface PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams - - Added Interface PublicIPAddressesReserveCloudServicePublicIpAddressHeaders - - Added Interface PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams - - Added Interface ReserveCloudServicePublicIpAddressRequest - - Added Interface TrafficDetectionRule - - Interface ApplicationGateway has a new optional parameter entraJWTValidationConfigs - - Interface ApplicationGatewayClientAuthConfiguration has a new optional parameter verifyClientAuthMode - - Interface ApplicationGatewayRequestRoutingRule has a new optional parameter entraJWTValidationConfig - - Interface DdosCustomPolicy has a new optional parameter detectionRules - - Interface DdosCustomPolicy has a new optional parameter frontEndIpConfiguration - - Interface FlowLog has a new optional parameter recordTypes - - Interface FlowLogInformation has a new optional parameter recordTypes - - Interface PrivateEndpoint has a new optional parameter ipVersionType - - Added Type Alias ApplicationGatewayClientAuthVerificationModes - - Added Type Alias ApplicationGatewayUnAuthorizedRequestAction - - Added Type Alias DdosDetectionMode - - Added Type Alias DdosTrafficType - - Added Type Alias IsRollback - - Added Type Alias PrivateEndpointIPVersionType - - Added Type Alias PublicIPAddressesDisassociateCloudServiceReservedPublicIpResponse - - Added Type Alias PublicIPAddressesReserveCloudServicePublicIpAddressResponse - - Added Enum KnownApplicationGatewayClientAuthVerificationModes - - Added Enum KnownApplicationGatewayUnAuthorizedRequestAction - - Added Enum KnownDdosDetectionMode - - Added Enum KnownDdosTrafficType - - Added Enum KnownIsRollback - - Added Enum KnownPrivateEndpointIPVersionType - -### Breaking Changes - - Enum KnownApplicationGatewayWafRuleSensitivityTypes no longer has value None - - Enum KnownSensitivityType no longer has value None - -## 34.2.0 (2025-11-12) - -### Features Added - - Added Interface CertificateAuthentication - - Interface ApplicationGatewayBackendSettings has a new optional parameter enableL4ClientIpPreservation - - Interface ApplicationGatewayOnDemandProbe has a new optional parameter enableProbeProxyProtocolHeader - - Interface ApplicationGatewayProbe has a new optional parameter enableProbeProxyProtocolHeader - - Interface LoadBalancer has a new optional parameter scope - - Interface NetworkManagerRoutingConfiguration has a new optional parameter routeTableUsageMode - - Interface PrivateLinkService has a new optional parameter accessMode - - Interface VirtualNetworkGatewayConnection has a new optional parameter authenticationType - - Interface VirtualNetworkGatewayConnection has a new optional parameter certificateAuthentication - - Added Type Alias AccessMode - - Added Type Alias ConnectionAuthenticationType - - Added Type Alias LoadBalancerScope - - Added Type Alias RouteTableUsageMode - - Added Enum KnownAccessMode - - Added Enum KnownConnectionAuthenticationType - - Added Enum KnownLoadBalancerScope - - Added Enum KnownRouteTableUsageMode - -## 34.1.0 (2025-10-16) - -### Features Added - - Added operation group NetworkSecurityPerimeterServiceTags - - Added operation AzureFirewalls.beginPacketCaptureOperation - - Added operation AzureFirewalls.beginPacketCaptureOperationAndWait - - Added operation VirtualNetworkGateways.listRadiusSecrets - - Added operation VpnServerConfigurations.listRadiusSecrets - - Added Interface AzureFirewallPacketCaptureResponse - - Added Interface AzureFirewallsPacketCaptureOperationHeaders - - Added Interface AzureFirewallsPacketCaptureOperationOptionalParams - - Added Interface NetworkSecurityPerimeterServiceTagsListOptionalParams - - Added Interface NspServiceTagsListResult - - Added Interface NspServiceTagsResource - - Added Interface NvaInterfaceConfigurationsProperties - - Added Interface NvaInVnetSubnetReferenceProperties - - Added Interface RadiusAuthServer - - Added Interface RadiusAuthServerListResult - - Added Interface VirtualNetworkGatewaysListRadiusSecretsOptionalParams - - Added Interface VpnServerConfigurationsListRadiusSecretsOptionalParams - - Interface ApplicationGatewayBackendHttpSettings has a new optional parameter dedicatedBackendConnection - - Interface ApplicationGatewayBackendHttpSettings has a new optional parameter sniName - - Interface ApplicationGatewayBackendHttpSettings has a new optional parameter validateCertChainAndExpiry - - Interface ApplicationGatewayBackendHttpSettings has a new optional parameter validateSNI - - Interface AzureFirewall has a new optional parameter extendedLocation - - Interface FirewallPacketCaptureParameters has a new optional parameter operation - - Interface NetworkVirtualAppliance has a new optional parameter nvaInterfaceConfigurations - - Interface NetworkVirtualAppliance has a new optional parameter privateIpAddress - - Added Type Alias AzureFirewallPacketCaptureOperationType - - Added Type Alias AzureFirewallPacketCaptureResponseCode - - Added Type Alias AzureFirewallsPacketCaptureOperationResponse - - Added Type Alias NetworkSecurityPerimeterServiceTagsListNextResponse - - Added Type Alias NetworkSecurityPerimeterServiceTagsListResponse - - Added Type Alias NvaNicType - - Added Type Alias VirtualNetworkGatewaysListRadiusSecretsResponse - - Added Type Alias VpnServerConfigurationsListRadiusSecretsResponse - - Added Enum KnownAzureFirewallPacketCaptureOperationType - - Added Enum KnownAzureFirewallPacketCaptureResponseCode - - Added Enum KnownNvaNicType - - Enum KnownTransportProtocol has a new value Quic - - -## 34.0.0 (2025-05-22) - -### Features Added - - - Added operation group NetworkSecurityPerimeterAccessRules - - Added operation group NetworkSecurityPerimeterAssociableResourceTypes - - Added operation group NetworkSecurityPerimeterAssociations - - Added operation group NetworkSecurityPerimeterLinkReferences - - Added operation group NetworkSecurityPerimeterLinks - - Added operation group NetworkSecurityPerimeterLoggingConfigurations - - Added operation group NetworkSecurityPerimeterOperationStatuses - - Added operation group NetworkSecurityPerimeterProfiles - - Added operation group NetworkSecurityPerimeters - - Added operation NetworkVirtualAppliances.beginGetBootDiagnosticLogs - - Added operation NetworkVirtualAppliances.beginGetBootDiagnosticLogsAndWait - - Added operation NetworkVirtualAppliances.beginReimage - - Added operation NetworkVirtualAppliances.beginReimageAndWait - - Added operation VirtualNetworkGateways.beginGetResiliencyInformation - - Added operation VirtualNetworkGateways.beginGetResiliencyInformationAndWait - - Added operation VirtualNetworkGateways.beginGetRoutesInformation - - Added operation VirtualNetworkGateways.beginGetRoutesInformationAndWait - - Added operation VirtualNetworkGateways.beginInvokeAbortMigration - - Added operation VirtualNetworkGateways.beginInvokeAbortMigrationAndWait - - Added operation VirtualNetworkGateways.beginInvokeCommitMigration - - Added operation VirtualNetworkGateways.beginInvokeCommitMigrationAndWait - - Added operation VirtualNetworkGateways.beginInvokeExecuteMigration - - Added operation VirtualNetworkGateways.beginInvokeExecuteMigrationAndWait - - Added operation VirtualNetworkGateways.beginInvokePrepareMigration - - Added operation VirtualNetworkGateways.beginInvokePrepareMigrationAndWait - - Added Interface AdvertisedPublicPrefixProperties - - Added Interface CircuitMetadataMap - - Added Interface ConnectivityConfigurationPropertiesConnectivityCapabilities - - Added Interface ErrorAdditionalInfo - - Added Interface ErrorDetail - - Added Interface GatewayResiliencyInformation - - Added Interface GatewayResiliencyRecommendation - - Added Interface GatewayRouteSet - - Added Interface GatewayRouteSetsInformation - - Added Interface ManagedRuleSetRuleGroup - - Added Interface NetworkSecurityPerimeter - - Added Interface NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams - - Added Interface NetworkSecurityPerimeterAccessRulesDeleteOptionalParams - - Added Interface NetworkSecurityPerimeterAccessRulesGetOptionalParams - - Added Interface NetworkSecurityPerimeterAccessRulesListNextOptionalParams - - Added Interface NetworkSecurityPerimeterAccessRulesListOptionalParams - - Added Interface NetworkSecurityPerimeterAccessRulesReconcileOptionalParams - - Added Interface NetworkSecurityPerimeterAssociableResourceTypesListNextOptionalParams - - Added Interface NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams - - Added Interface NetworkSecurityPerimeterAssociationsCreateOrUpdateHeaders - - Added Interface NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams - - Added Interface NetworkSecurityPerimeterAssociationsDeleteHeaders - - Added Interface NetworkSecurityPerimeterAssociationsDeleteOptionalParams - - Added Interface NetworkSecurityPerimeterAssociationsGetOptionalParams - - Added Interface NetworkSecurityPerimeterAssociationsListNextOptionalParams - - Added Interface NetworkSecurityPerimeterAssociationsListOptionalParams - - Added Interface NetworkSecurityPerimeterAssociationsReconcileOptionalParams - - Added Interface NetworkSecurityPerimeterLinkReferencesDeleteHeaders - - Added Interface NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams - - Added Interface NetworkSecurityPerimeterLinkReferencesGetOptionalParams - - Added Interface NetworkSecurityPerimeterLinkReferencesListNextOptionalParams - - Added Interface NetworkSecurityPerimeterLinkReferencesListOptionalParams - - Added Interface NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams - - Added Interface NetworkSecurityPerimeterLinksDeleteHeaders - - Added Interface NetworkSecurityPerimeterLinksDeleteOptionalParams - - Added Interface NetworkSecurityPerimeterLinksGetOptionalParams - - Added Interface NetworkSecurityPerimeterLinksListNextOptionalParams - - Added Interface NetworkSecurityPerimeterLinksListOptionalParams - - Added Interface NetworkSecurityPerimeterListResult - - Added Interface NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams - - Added Interface NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams - - Added Interface NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams - - Added Interface NetworkSecurityPerimeterLoggingConfigurationsListNextOptionalParams - - Added Interface NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams - - Added Interface NetworkSecurityPerimeterOperationStatusesGetOptionalParams - - Added Interface NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams - - Added Interface NetworkSecurityPerimeterProfilesDeleteOptionalParams - - Added Interface NetworkSecurityPerimeterProfilesGetOptionalParams - - Added Interface NetworkSecurityPerimeterProfilesListNextOptionalParams - - Added Interface NetworkSecurityPerimeterProfilesListOptionalParams - - Added Interface NetworkSecurityPerimetersCreateOrUpdateOptionalParams - - Added Interface NetworkSecurityPerimetersDeleteHeaders - - Added Interface NetworkSecurityPerimetersDeleteOptionalParams - - Added Interface NetworkSecurityPerimetersGetOptionalParams - - Added Interface NetworkSecurityPerimetersListBySubscriptionNextOptionalParams - - Added Interface NetworkSecurityPerimetersListBySubscriptionOptionalParams - - Added Interface NetworkSecurityPerimetersListNextOptionalParams - - Added Interface NetworkSecurityPerimetersListOptionalParams - - Added Interface NetworkSecurityPerimetersPatchOptionalParams - - Added Interface NetworkVirtualApplianceBootDiagnosticParameters - - Added Interface NetworkVirtualApplianceInstanceId - - Added Interface NetworkVirtualAppliancesGetBootDiagnosticLogsHeaders - - Added Interface NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams - - Added Interface NetworkVirtualAppliancesReimageHeaders - - Added Interface NetworkVirtualAppliancesReimageOptionalParams - - Added Interface NspAccessRule - - Added Interface NspAccessRuleListResult - - Added Interface NspAssociation - - Added Interface NspAssociationsListResult - - Added Interface NspLink - - Added Interface NspLinkListResult - - Added Interface NspLinkReference - - Added Interface NspLinkReferenceListResult - - Added Interface NspLoggingConfiguration - - Added Interface NspLoggingConfigurationListResult - - Added Interface NspProfile - - Added Interface NspProfileListResult - - Added Interface OperationStatusResult - - Added Interface PerimeterAssociableResource - - Added Interface PerimeterAssociableResourcesListResult - - Added Interface PerimeterBasedAccessRule - - Added Interface ProxyResource - - Added Interface ResiliencyRecommendationComponents - - Added Interface RouteSourceDetails - - Added Interface SecurityPerimeterProxyResource - - Added Interface SecurityPerimeterResource - - Added Interface SecurityPerimeterSystemData - - Added Interface SubscriptionId - - Added Interface TrackedResource - - Added Interface UpdateTagsRequest - - Added Interface VirtualNetworkGatewayConnectionTunnelProperties - - Added Interface VirtualNetworkGatewayMigrationParameters - - Added Interface VirtualNetworkGatewayMigrationStatus - - Added Interface VirtualNetworkGatewaysGetResiliencyInformationHeaders - - Added Interface VirtualNetworkGatewaysGetResiliencyInformationOptionalParams - - Added Interface VirtualNetworkGatewaysGetRoutesInformationHeaders - - Added Interface VirtualNetworkGatewaysGetRoutesInformationOptionalParams - - Added Interface VirtualNetworkGatewaysInvokeAbortMigrationHeaders - - Added Interface VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams - - Added Interface VirtualNetworkGatewaysInvokeCommitMigrationHeaders - - Added Interface VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams - - Added Interface VirtualNetworkGatewaysInvokeExecuteMigrationHeaders - - Added Interface VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams - - Added Interface VirtualNetworkGatewaysInvokePrepareMigrationHeaders - - Added Interface VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams - - Added Type Alias AccessRuleDirection - - Added Type Alias AdvertisedPublicPrefixPropertiesValidationState - - Added Type Alias AssociationAccessMode - - Added Type Alias ConnectedGroupAddressOverlap - - Added Type Alias ConnectedGroupPrivateEndpointsScale - - Added Type Alias NetworkSecurityPerimeterAccessRulesCreateOrUpdateResponse - - Added Type Alias NetworkSecurityPerimeterAccessRulesGetResponse - - Added Type Alias NetworkSecurityPerimeterAccessRulesListNextResponse - - Added Type Alias NetworkSecurityPerimeterAccessRulesListResponse - - Added Type Alias NetworkSecurityPerimeterAccessRulesReconcileResponse - - Added Type Alias NetworkSecurityPerimeterAssociableResourceTypesListNextResponse - - Added Type Alias NetworkSecurityPerimeterAssociableResourceTypesListResponse - - Added Type Alias NetworkSecurityPerimeterAssociationsCreateOrUpdateResponse - - Added Type Alias NetworkSecurityPerimeterAssociationsGetResponse - - Added Type Alias NetworkSecurityPerimeterAssociationsListNextResponse - - Added Type Alias NetworkSecurityPerimeterAssociationsListResponse - - Added Type Alias NetworkSecurityPerimeterAssociationsReconcileResponse - - Added Type Alias NetworkSecurityPerimeterLinkReferencesGetResponse - - Added Type Alias NetworkSecurityPerimeterLinkReferencesListNextResponse - - Added Type Alias NetworkSecurityPerimeterLinkReferencesListResponse - - Added Type Alias NetworkSecurityPerimeterLinksCreateOrUpdateResponse - - Added Type Alias NetworkSecurityPerimeterLinksGetResponse - - Added Type Alias NetworkSecurityPerimeterLinksListNextResponse - - Added Type Alias NetworkSecurityPerimeterLinksListResponse - - Added Type Alias NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateResponse - - Added Type Alias NetworkSecurityPerimeterLoggingConfigurationsGetResponse - - Added Type Alias NetworkSecurityPerimeterLoggingConfigurationsListNextResponse - - Added Type Alias NetworkSecurityPerimeterLoggingConfigurationsListResponse - - Added Type Alias NetworkSecurityPerimeterOperationStatusesGetResponse - - Added Type Alias NetworkSecurityPerimeterProfilesCreateOrUpdateResponse - - Added Type Alias NetworkSecurityPerimeterProfilesGetResponse - - Added Type Alias NetworkSecurityPerimeterProfilesListNextResponse - - Added Type Alias NetworkSecurityPerimeterProfilesListResponse - - Added Type Alias NetworkSecurityPerimetersCreateOrUpdateResponse - - Added Type Alias NetworkSecurityPerimetersGetResponse - - Added Type Alias NetworkSecurityPerimetersListBySubscriptionNextResponse - - Added Type Alias NetworkSecurityPerimetersListBySubscriptionResponse - - Added Type Alias NetworkSecurityPerimetersListNextResponse - - Added Type Alias NetworkSecurityPerimetersListResponse - - Added Type Alias NetworkSecurityPerimetersPatchResponse - - Added Type Alias NetworkVirtualAppliancesGetBootDiagnosticLogsResponse - - Added Type Alias NetworkVirtualAppliancesReimageResponse - - Added Type Alias NspLinkProvisioningState - - Added Type Alias NspLinkStatus - - Added Type Alias NspProvisioningState - - Added Type Alias PeeringEnforcement - - Added Type Alias VirtualNetworkGatewayMigrationPhase - - Added Type Alias VirtualNetworkGatewayMigrationState - - Added Type Alias VirtualNetworkGatewayMigrationType - - Added Type Alias VirtualNetworkGatewaysGetResiliencyInformationResponse - - Added Type Alias VirtualNetworkGatewaysGetRoutesInformationResponse - - Added Type Alias VirtualNetworkGatewaysInvokeAbortMigrationResponse - - Added Type Alias VirtualNetworkGatewaysInvokeCommitMigrationResponse - - Added Type Alias VirtualNetworkGatewaysInvokeExecuteMigrationResponse - - Added Type Alias VirtualNetworkGatewaysInvokePrepareMigrationResponse - - Interface ConnectivityConfiguration has a new optional parameter connectivityCapabilities - - Interface EffectiveConnectivityConfiguration has a new optional parameter connectivityCapabilities - - Interface ExpressRouteCircuitPeeringConfig has a new optional parameter advertisedPublicPrefixInfo - - Interface IpamPool has a new optional parameter etag - - Interface IpamPoolsCreateOptionalParams has a new optional parameter ifMatch - - Interface IpamPoolsDeleteOptionalParams has a new optional parameter ifMatch - - Interface IpamPoolsUpdateOptionalParams has a new optional parameter ifMatch - - Interface LoadBalancingRule has a new optional parameter enableConnectionTracking - - Interface ManagedRuleSet has a new optional parameter computedDisabledRules - - Interface NatGateway has a new optional parameter publicIpAddressesV6 - - Interface NatGateway has a new optional parameter publicIpPrefixesV6 - - Interface NatGateway has a new optional parameter sourceVirtualNetwork - - Interface VerifierWorkspace has a new optional parameter etag - - Interface VerifierWorkspacesCreateOptionalParams has a new optional parameter ifMatch - - Interface VerifierWorkspacesDeleteOptionalParams has a new optional parameter ifMatch - - Interface VerifierWorkspacesUpdateOptionalParams has a new optional parameter ifMatch - - Interface VirtualNetwork has a new optional parameter defaultPublicNatGateway - - Interface VirtualNetworkGateway has a new optional parameter enableHighBandwidthVpnGateway - - Interface VirtualNetworkGateway has a new optional parameter virtualNetworkGatewayMigrationStatus - - Interface VirtualNetworkGatewayConnection has a new optional parameter tunnelProperties - - Added Enum KnownAccessRuleDirection - - Added Enum KnownAdvertisedPublicPrefixPropertiesValidationState - - Added Enum KnownAssociationAccessMode - - Added Enum KnownConnectedGroupAddressOverlap - - Added Enum KnownConnectedGroupPrivateEndpointsScale - - Added Enum KnownNspLinkProvisioningState - - Added Enum KnownNspLinkStatus - - Added Enum KnownNspProvisioningState - - Added Enum KnownPeeringEnforcement - - Added Enum KnownVirtualNetworkGatewayMigrationPhase - - Added Enum KnownVirtualNetworkGatewayMigrationState - - Added Enum KnownVirtualNetworkGatewayMigrationType - - Enum KnownApplicationGatewayFirewallUserSessionVariable has a new value ClientAddrXFFHeader - - Enum KnownApplicationGatewayFirewallUserSessionVariable has a new value GeoLocationXFFHeader - - Enum KnownNatGatewaySkuName has a new value StandardV2 - - Enum KnownPublicIPAddressSkuName has a new value StandardV2 - - Enum KnownPublicIPPrefixSkuName has a new value StandardV2 - -### Breaking Changes - - - Removed operation ConnectionMonitors.beginQuery - - Removed operation ConnectionMonitors.beginQueryAndWait - - Removed operation ConnectionMonitors.beginStart - - Removed operation ConnectionMonitors.beginStartAndWait - - Type of parameter networkInterfaceIPConfigurationId of interface LoadBalancerHealthPerRulePerBackendAddress is changed from NetworkInterfaceIPConfiguration to string - - -## 33.5.0 (2024-12-10) - -### Features Added - - - Added operation group IpamPools - - Added operation group ReachabilityAnalysisIntents - - Added operation group ReachabilityAnalysisRuns - - Added operation group StaticCidrs - - Added operation group VerifierWorkspaces - - Added operation LoadBalancerLoadBalancingRules.beginHealth - - Added operation LoadBalancerLoadBalancingRules.beginHealthAndWait - - Added operation VirtualNetworkGateways.beginGetFailoverAllTestDetails - - Added operation VirtualNetworkGateways.beginGetFailoverAllTestDetailsAndWait - - Added operation VirtualNetworkGateways.beginGetFailoverSingleTestDetails - - Added operation VirtualNetworkGateways.beginGetFailoverSingleTestDetailsAndWait - - Added operation VirtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulation - - Added operation VirtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulationAndWait - - Added operation VirtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulation - - Added operation VirtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulationAndWait - - Added Interface CommonErrorAdditionalInfo - - Added Interface CommonErrorDetail - - Added Interface CommonErrorResponse - - Added Interface CommonProxyResource - - Added Interface CommonResource - - Added Interface CommonTrackedResource - - Added Interface ExpressRouteFailoverCircuitResourceDetails - - Added Interface ExpressRouteFailoverConnectionResourceDetails - - Added Interface ExpressRouteFailoverRedundantRoute - - Added Interface ExpressRouteFailoverSingleTestDetails - - Added Interface ExpressRouteFailoverStopApiParameters - - Added Interface ExpressRouteFailoverTestDetails - - Added Interface FailoverConnectionDetails - - Added Interface IntentContent - - Added Interface IpamPool - - Added Interface IpamPoolList - - Added Interface IpamPoolPrefixAllocation - - Added Interface IpamPoolProperties - - Added Interface IpamPoolsCreateHeaders - - Added Interface IpamPoolsCreateOptionalParams - - Added Interface IpamPoolsDeleteHeaders - - Added Interface IpamPoolsDeleteOptionalParams - - Added Interface IpamPoolsGetOptionalParams - - Added Interface IpamPoolsGetPoolUsageOptionalParams - - Added Interface IpamPoolsListAssociatedResourcesNextOptionalParams - - Added Interface IpamPoolsListAssociatedResourcesOptionalParams - - Added Interface IpamPoolsListNextOptionalParams - - Added Interface IpamPoolsListOptionalParams - - Added Interface IpamPoolsUpdateOptionalParams - - Added Interface IpamPoolUpdate - - Added Interface IpamPoolUpdateProperties - - Added Interface IPTraffic - - Added Interface LoadBalancerHealthPerRule - - Added Interface LoadBalancerHealthPerRulePerBackendAddress - - Added Interface LoadBalancerLoadBalancingRulesHealthHeaders - - Added Interface LoadBalancerLoadBalancingRulesHealthOptionalParams - - Added Interface PoolAssociation - - Added Interface PoolAssociationList - - Added Interface PoolUsage - - Added Interface ReachabilityAnalysisIntent - - Added Interface ReachabilityAnalysisIntentListResult - - Added Interface ReachabilityAnalysisIntentProperties - - Added Interface ReachabilityAnalysisIntentsCreateOptionalParams - - Added Interface ReachabilityAnalysisIntentsDeleteOptionalParams - - Added Interface ReachabilityAnalysisIntentsGetOptionalParams - - Added Interface ReachabilityAnalysisIntentsListNextOptionalParams - - Added Interface ReachabilityAnalysisIntentsListOptionalParams - - Added Interface ReachabilityAnalysisRun - - Added Interface ReachabilityAnalysisRunListResult - - Added Interface ReachabilityAnalysisRunProperties - - Added Interface ReachabilityAnalysisRunsCreateOptionalParams - - Added Interface ReachabilityAnalysisRunsDeleteHeaders - - Added Interface ReachabilityAnalysisRunsDeleteOptionalParams - - Added Interface ReachabilityAnalysisRunsGetOptionalParams - - Added Interface ReachabilityAnalysisRunsListNextOptionalParams - - Added Interface ReachabilityAnalysisRunsListOptionalParams - - Added Interface ResourceBasics - - Added Interface StaticCidr - - Added Interface StaticCidrList - - Added Interface StaticCidrProperties - - Added Interface StaticCidrsCreateOptionalParams - - Added Interface StaticCidrsDeleteHeaders - - Added Interface StaticCidrsDeleteOptionalParams - - Added Interface StaticCidrsGetOptionalParams - - Added Interface StaticCidrsListNextOptionalParams - - Added Interface StaticCidrsListOptionalParams - - Added Interface VerifierWorkspace - - Added Interface VerifierWorkspaceListResult - - Added Interface VerifierWorkspaceProperties - - Added Interface VerifierWorkspacesCreateOptionalParams - - Added Interface VerifierWorkspacesDeleteHeaders - - Added Interface VerifierWorkspacesDeleteOptionalParams - - Added Interface VerifierWorkspacesGetOptionalParams - - Added Interface VerifierWorkspacesListNextOptionalParams - - Added Interface VerifierWorkspacesListOptionalParams - - Added Interface VerifierWorkspacesUpdateOptionalParams - - Added Interface VerifierWorkspaceUpdate - - Added Interface VerifierWorkspaceUpdateProperties - - Added Interface VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders - - Added Interface VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams - - Added Interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders - - Added Interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams - - Added Interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders - - Added Interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams - - Added Interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders - - Added Interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams - - Added Type Alias AddressSpaceAggregationOption - - Added Type Alias FailoverConnectionStatus - - Added Type Alias FailoverTestStatus - - Added Type Alias FailoverTestStatusForSingleTest - - Added Type Alias FailoverTestType - - Added Type Alias IpamPoolsCreateResponse - - Added Type Alias IpamPoolsDeleteResponse - - Added Type Alias IpamPoolsGetPoolUsageResponse - - Added Type Alias IpamPoolsGetResponse - - Added Type Alias IpamPoolsListAssociatedResourcesNextResponse - - Added Type Alias IpamPoolsListAssociatedResourcesResponse - - Added Type Alias IpamPoolsListNextResponse - - Added Type Alias IpamPoolsListResponse - - Added Type Alias IpamPoolsUpdateResponse - - Added Type Alias IpType - - Added Type Alias LoadBalancerLoadBalancingRulesHealthResponse - - Added Type Alias NetworkProtocol - - Added Type Alias ReachabilityAnalysisIntentsCreateResponse - - Added Type Alias ReachabilityAnalysisIntentsGetResponse - - Added Type Alias ReachabilityAnalysisIntentsListNextResponse - - Added Type Alias ReachabilityAnalysisIntentsListResponse - - Added Type Alias ReachabilityAnalysisRunsCreateResponse - - Added Type Alias ReachabilityAnalysisRunsDeleteResponse - - Added Type Alias ReachabilityAnalysisRunsGetResponse - - Added Type Alias ReachabilityAnalysisRunsListNextResponse - - Added Type Alias ReachabilityAnalysisRunsListResponse - - Added Type Alias StaticCidrsCreateResponse - - Added Type Alias StaticCidrsDeleteResponse - - Added Type Alias StaticCidrsGetResponse - - Added Type Alias StaticCidrsListNextResponse - - Added Type Alias StaticCidrsListResponse - - Added Type Alias VerifierWorkspacesCreateResponse - - Added Type Alias VerifierWorkspacesDeleteResponse - - Added Type Alias VerifierWorkspacesGetResponse - - Added Type Alias VerifierWorkspacesListNextResponse - - Added Type Alias VerifierWorkspacesListResponse - - Added Type Alias VerifierWorkspacesUpdateResponse - - Added Type Alias VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse - - Added Type Alias VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse - - Added Type Alias VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse - - Added Type Alias VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse - - Interface AddressSpace has a new optional parameter ipamPoolPrefixAllocations - - Interface BastionHost has a new optional parameter enablePrivateOnlyBastion - - Interface NetworkInterface has a new optional parameter defaultOutboundConnectivityEnabled - - Interface SecurityAdminConfiguration has a new optional parameter networkGroupAddressSpaceAggregationOption - - Interface Subnet has a new optional parameter ipamPoolPrefixAllocations - - Added Enum KnownAddressSpaceAggregationOption - - Added Enum KnownFailoverConnectionStatus - - Added Enum KnownFailoverTestStatus - - Added Enum KnownFailoverTestStatusForSingleTest - - Added Enum KnownFailoverTestType - - Added Enum KnownIpType - - Added Enum KnownNetworkProtocol - - Enum KnownAddressPrefixType has a new value NetworkGroup - - Enum KnownProvisioningState has a new value Canceled - - Enum KnownProvisioningState has a new value Creating - - -## 33.4.0 (2024-09-13) - -### Features Added - - - Added operation group NetworkManagerRoutingConfigurations - - Added operation group RoutingRuleCollections - - Added operation group RoutingRules - - Added operation group SecurityUserConfigurations - - Added operation group SecurityUserRuleCollections - - Added operation group SecurityUserRules - - Added operation VpnLinkConnections.beginSetOrInitDefaultSharedKey - - Added operation VpnLinkConnections.beginSetOrInitDefaultSharedKeyAndWait - - Added operation VpnLinkConnections.getDefaultSharedKey - - Added operation VpnLinkConnections.listAllSharedKeys - - Added operation VpnLinkConnections.listDefaultSharedKey - - Added Interface ApplicationGatewayForContainersReferenceDefinition - - Added Interface AzureFirewallAutoscaleConfiguration - - Added Interface ConnectionSharedKeyResult - - Added Interface ConnectionSharedKeyResultList - - Added Interface ExceptionEntry - - Added Interface IpAllocationsDeleteHeaders - - Added Interface NetworkManagerRoutingConfiguration - - Added Interface NetworkManagerRoutingConfigurationListResult - - Added Interface NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams - - Added Interface NetworkManagerRoutingConfigurationsDeleteHeaders - - Added Interface NetworkManagerRoutingConfigurationsDeleteOptionalParams - - Added Interface NetworkManagerRoutingConfigurationsGetOptionalParams - - Added Interface NetworkManagerRoutingConfigurationsListNextOptionalParams - - Added Interface NetworkManagerRoutingConfigurationsListOptionalParams - - Added Interface NetworkManagerRoutingGroupItem - - Added Interface RoutingRule - - Added Interface RoutingRuleCollection - - Added Interface RoutingRuleCollectionListResult - - Added Interface RoutingRuleCollectionsCreateOrUpdateOptionalParams - - Added Interface RoutingRuleCollectionsDeleteHeaders - - Added Interface RoutingRuleCollectionsDeleteOptionalParams - - Added Interface RoutingRuleCollectionsGetOptionalParams - - Added Interface RoutingRuleCollectionsListNextOptionalParams - - Added Interface RoutingRuleCollectionsListOptionalParams - - Added Interface RoutingRuleListResult - - Added Interface RoutingRuleNextHop - - Added Interface RoutingRuleRouteDestination - - Added Interface RoutingRulesCreateOrUpdateOptionalParams - - Added Interface RoutingRulesDeleteHeaders - - Added Interface RoutingRulesDeleteOptionalParams - - Added Interface RoutingRulesGetOptionalParams - - Added Interface RoutingRulesListNextOptionalParams - - Added Interface RoutingRulesListOptionalParams - - Added Interface SecurityUserConfiguration - - Added Interface SecurityUserConfigurationListResult - - Added Interface SecurityUserConfigurationsCreateOrUpdateOptionalParams - - Added Interface SecurityUserConfigurationsDeleteHeaders - - Added Interface SecurityUserConfigurationsDeleteOptionalParams - - Added Interface SecurityUserConfigurationsGetOptionalParams - - Added Interface SecurityUserConfigurationsListNextOptionalParams - - Added Interface SecurityUserConfigurationsListOptionalParams - - Added Interface SecurityUserGroupItem - - Added Interface SecurityUserRule - - Added Interface SecurityUserRuleCollection - - Added Interface SecurityUserRuleCollectionListResult - - Added Interface SecurityUserRuleCollectionsCreateOrUpdateOptionalParams - - Added Interface SecurityUserRuleCollectionsDeleteHeaders - - Added Interface SecurityUserRuleCollectionsDeleteOptionalParams - - Added Interface SecurityUserRuleCollectionsGetOptionalParams - - Added Interface SecurityUserRuleCollectionsListNextOptionalParams - - Added Interface SecurityUserRuleCollectionsListOptionalParams - - Added Interface SecurityUserRuleListResult - - Added Interface SecurityUserRulesCreateOrUpdateOptionalParams - - Added Interface SecurityUserRulesDeleteHeaders - - Added Interface SecurityUserRulesDeleteOptionalParams - - Added Interface SecurityUserRulesGetOptionalParams - - Added Interface SecurityUserRulesListNextOptionalParams - - Added Interface SecurityUserRulesListOptionalParams - - Added Interface SharedKeyProperties - - Added Interface VpnLinkConnectionsGetAllSharedKeysNextOptionalParams - - Added Interface VpnLinkConnectionsGetAllSharedKeysOptionalParams - - Added Interface VpnLinkConnectionsGetDefaultSharedKeyOptionalParams - - Added Interface VpnLinkConnectionsListDefaultSharedKeyOptionalParams - - Added Interface VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams - - Added Type Alias ApplicationGatewayWafRuleSensitivityTypes - - Added Type Alias DisableBgpRoutePropagation - - Added Type Alias ExceptionEntryMatchVariable - - Added Type Alias ExceptionEntrySelectorMatchOperator - - Added Type Alias ExceptionEntryValueMatchOperator - - Added Type Alias GroupMemberType - - Added Type Alias NetworkManagerRoutingConfigurationsCreateOrUpdateResponse - - Added Type Alias NetworkManagerRoutingConfigurationsGetResponse - - Added Type Alias NetworkManagerRoutingConfigurationsListNextResponse - - Added Type Alias NetworkManagerRoutingConfigurationsListResponse - - Added Type Alias PrivateEndpointVNetPolicies - - Added Type Alias ResiliencyModel - - Added Type Alias RoutingRuleCollectionsCreateOrUpdateResponse - - Added Type Alias RoutingRuleCollectionsGetResponse - - Added Type Alias RoutingRuleCollectionsListNextResponse - - Added Type Alias RoutingRuleCollectionsListResponse - - Added Type Alias RoutingRuleDestinationType - - Added Type Alias RoutingRuleNextHopType - - Added Type Alias RoutingRulesCreateOrUpdateResponse - - Added Type Alias RoutingRulesGetResponse - - Added Type Alias RoutingRulesListNextResponse - - Added Type Alias RoutingRulesListResponse - - Added Type Alias SecurityUserConfigurationsCreateOrUpdateResponse - - Added Type Alias SecurityUserConfigurationsGetResponse - - Added Type Alias SecurityUserConfigurationsListNextResponse - - Added Type Alias SecurityUserConfigurationsListResponse - - Added Type Alias SecurityUserRuleCollectionsCreateOrUpdateResponse - - Added Type Alias SecurityUserRuleCollectionsGetResponse - - Added Type Alias SecurityUserRuleCollectionsListNextResponse - - Added Type Alias SecurityUserRuleCollectionsListResponse - - Added Type Alias SecurityUserRulesCreateOrUpdateResponse - - Added Type Alias SecurityUserRulesGetResponse - - Added Type Alias SecurityUserRulesListNextResponse - - Added Type Alias SecurityUserRulesListResponse - - Added Type Alias SensitivityType - - Added Type Alias VpnLinkConnectionsGetAllSharedKeysNextResponse - - Added Type Alias VpnLinkConnectionsGetAllSharedKeysResponse - - Added Type Alias VpnLinkConnectionsGetDefaultSharedKeyResponse - - Added Type Alias VpnLinkConnectionsListDefaultSharedKeyResponse - - Added Type Alias VpnLinkConnectionsSetOrInitDefaultSharedKeyResponse - - Interface ApplicationGatewayFirewallRule has a new optional parameter sensitivity - - Interface AzureFirewall has a new optional parameter autoscaleConfiguration - - Interface ConfigurationGroup has a new optional parameter memberType - - Interface FlowLog has a new optional parameter enabledFilteringCriteria - - Interface FlowLogInformation has a new optional parameter enabledFilteringCriteria - - Interface ManagedRuleOverride has a new optional parameter sensitivity - - Interface ManagedRulesDefinition has a new optional parameter exceptions - - Interface NetworkGroup has a new optional parameter memberType - - Interface PrivateLinkService has a new optional parameter destinationIPAddress - - Interface VirtualNetwork has a new optional parameter privateEndpointVNetPolicies - - Interface VirtualNetworkGateway has a new optional parameter resiliencyModel - - Interface WebApplicationFirewallPolicy has a new optional parameter applicationGatewayForContainers - - Added Enum KnownApplicationGatewayWafRuleSensitivityTypes - - Added Enum KnownDisableBgpRoutePropagation - - Added Enum KnownExceptionEntryMatchVariable - - Added Enum KnownExceptionEntrySelectorMatchOperator - - Added Enum KnownExceptionEntryValueMatchOperator - - Added Enum KnownGroupMemberType - - Added Enum KnownPrivateEndpointVNetPolicies - - Added Enum KnownResiliencyModel - - Added Enum KnownRoutingRuleDestinationType - - Added Enum KnownRoutingRuleNextHopType - - Added Enum KnownSensitivityType - - Enum KnownConfigurationType has a new value Routing - - Enum KnownConfigurationType has a new value SecurityUser - - -## 33.3.0 (2024-07-17) - -### Features Added - - - Added operation InboundSecurityRuleOperations.get - - Added Interface ExpressRoutePortAuthorizationsDeleteHeaders - - Added Interface ExpressRoutePortsDeleteHeaders - - Added Interface InboundSecurityRuleGetOptionalParams - - Added Interface RouteFilterRulesDeleteHeaders - - Added Interface RouteFiltersDeleteHeaders - - Added Type Alias InboundSecurityRuleGetResponse - - Added Type Alias ProbeNoHealthyBackendsBehavior - - Interface BastionHost has a new optional parameter enableSessionRecording - - Interface ExpressRouteCircuitAuthorization has a new optional parameter connectionResourceUri - - Interface ExpressRouteCrossConnectionsListOptionalParams has a new optional parameter filter - - Interface FlowLog has a new optional parameter identity - - Interface FlowLogInformation has a new optional parameter identity - - Interface Probe has a new optional parameter noHealthyBackendsBehavior - - Interface ServiceEndpointPropertiesFormat has a new optional parameter networkIdentifier - - Interface VirtualNetworkGateway has a new optional parameter identity - - Added Enum KnownProbeNoHealthyBackendsBehavior - - Enum KnownBastionHostSkuName has a new value Premium - - -## 33.2.0 (2024-06-07) - -### Features Added - - - Added operation group FirewallPolicyDeployments - - Added operation group FirewallPolicyDrafts - - Added operation group FirewallPolicyRuleCollectionGroupDrafts - - Added operation NetworkVirtualAppliances.beginRestart - - Added operation NetworkVirtualAppliances.beginRestartAndWait - - Added Interface ConnectionMonitorEndpointLocationDetails - - Added Interface FirewallPolicyDeploymentsDeployHeaders - - Added Interface FirewallPolicyDeploymentsDeployOptionalParams - - Added Interface FirewallPolicyDraft - - Added Interface FirewallPolicyDraftsCreateOrUpdateOptionalParams - - Added Interface FirewallPolicyDraftsDeleteOptionalParams - - Added Interface FirewallPolicyDraftsGetOptionalParams - - Added Interface FirewallPolicyRuleCollectionGroupDraft - - Added Interface FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams - - Added Interface FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams - - Added Interface FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams - - Added Interface HeaderValueMatcher - - Added Interface NetworkVirtualApplianceInstanceIds - - Added Interface NetworkVirtualAppliancePropertiesFormatNetworkProfile - - Added Interface NetworkVirtualAppliancesRestartHeaders - - Added Interface NetworkVirtualAppliancesRestartOptionalParams - - Added Interface PacketCaptureSettings - - Added Interface VirtualApplianceIPConfiguration - - Added Interface VirtualApplianceIPConfigurationProperties - - Added Interface VirtualApplianceNetworkInterfaceConfiguration - - Added Interface VirtualApplianceNetworkInterfaceConfigurationProperties - - Added Type Alias ApplicationGatewaySkuFamily - - Added Type Alias FirewallPolicyDeploymentsDeployResponse - - Added Type Alias FirewallPolicyDraftsCreateOrUpdateResponse - - Added Type Alias FirewallPolicyDraftsGetResponse - - Added Type Alias FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateResponse - - Added Type Alias FirewallPolicyRuleCollectionGroupDraftsGetResponse - - Added Type Alias InboundSecurityRuleType - - Added Type Alias NetworkVirtualAppliancesRestartResponse - - Added Type Alias NicTypeInRequest - - Added Type Alias NicTypeInResponse - - Added Type Alias SharingScope - - Interface ApplicationGatewayHeaderConfiguration has a new optional parameter headerValueMatcher - - Interface ApplicationGatewaySku has a new optional parameter family - - Interface ConnectionMonitorEndpoint has a new optional parameter locationDetails - - Interface ConnectionMonitorEndpoint has a new optional parameter subscriptionId - - Interface ExpressRouteCircuit has a new optional parameter enableDirectPortRateLimit - - Interface InboundSecurityRule has a new optional parameter ruleType - - Interface InboundSecurityRules has a new optional parameter appliesOn - - Interface InboundSecurityRules has a new optional parameter destinationPortRanges - - Interface InboundSecurityRules has a new optional parameter name - - Interface NetworkInterfaceIPConfiguration has a new optional parameter privateIPAddressPrefixLength - - Interface NetworkVirtualAppliance has a new optional parameter networkProfile - - Interface PacketCapture has a new optional parameter captureSettings - - Interface PacketCapture has a new optional parameter continuousCapture - - Interface PacketCaptureParameters has a new optional parameter captureSettings - - Interface PacketCaptureParameters has a new optional parameter continuousCapture - - Interface PacketCaptureResult has a new optional parameter captureSettings - - Interface PacketCaptureResult has a new optional parameter continuousCapture - - Interface PacketCaptureStorageLocation has a new optional parameter localPath - - Interface PolicySettings has a new optional parameter jsChallengeCookieExpirationInMins - - Interface Subnet has a new optional parameter sharingScope - - Interface VirtualApplianceNicProperties has a new optional parameter nicType - - Interface VirtualNetworkPeering has a new optional parameter enableOnlyIPv6Peering - - Interface VirtualNetworkPeering has a new optional parameter localAddressSpace - - Interface VirtualNetworkPeering has a new optional parameter localSubnetNames - - Interface VirtualNetworkPeering has a new optional parameter localVirtualNetworkAddressSpace - - Interface VirtualNetworkPeering has a new optional parameter peerCompleteVnets - - Interface VirtualNetworkPeering has a new optional parameter remoteSubnetNames - - Interface VpnSiteLinkConnection has a new optional parameter dpdTimeoutSeconds - - Added Enum KnownApplicationGatewaySkuFamily - - Added Enum KnownInboundSecurityRuleType - - Added Enum KnownNicTypeInRequest - - Added Enum KnownNicTypeInResponse - - Added Enum KnownSharingScope - - Enum KnownEndpointType has a new value AzureArcNetwork - - -## 33.1.0 (2024-02-02) - -### Features Added - - - Interface BastionHost has a new optional parameter zones - - Enum KnownVirtualNetworkPrivateEndpointNetworkPolicies has a new value NetworkSecurityGroupEnabled - - Enum KnownVirtualNetworkPrivateEndpointNetworkPolicies has a new value RouteTableEnabled - - -## 33.0.0 (2023-12-07) - -### Features Added - - - Added Interface BastionShareableLinkTokenListRequest - - Added Interface DdosCustomPoliciesDeleteHeaders - - Added Interface DeleteBastionShareableLinkByTokenOptionalParams - - Added Interface InternetIngressPublicIpsProperties - - Added Interface NetworkManagementClientDeleteBastionShareableLinkByTokenHeaders - - Added Type Alias DeleteBastionShareableLinkByTokenResponse - - Added Type Alias FirewallPolicyIntrusionDetectionProfileType - - Interface ApplicationGatewayListener has a new optional parameter hostNames - - Interface FirewallPolicyIntrusionDetection has a new optional parameter profile - - Interface NetworkVirtualAppliance has a new optional parameter internetIngressPublicIps - - Added Enum KnownFirewallPolicyIntrusionDetectionProfileType - - Enum KnownActionType has a new value JSChallenge - - Enum KnownBastionHostSkuName has a new value Developer - - Enum KnownVirtualNetworkGatewaySkuName has a new value ErGwScale - - Enum KnownVirtualNetworkGatewaySkuTier has a new value ErGwScale - - Enum KnownWebApplicationFirewallAction has a new value JSChallenge - -### Breaking Changes - - - Type of parameter routingConfiguration of interface NetworkVirtualApplianceConnection is changed from RoutingConfigurationNfv to RoutingConfiguration - - -## 32.2.0 (2023-09-07) - -### Features Added - - - Added Interface BastionHostPropertiesFormatNetworkAcls - - Added Interface IPRule - - Added Interface VirtualNetworkGatewayAutoScaleBounds - - Added Interface VirtualNetworkGatewayAutoScaleConfiguration - - Interface BastionHost has a new optional parameter networkAcls - - Interface BastionHost has a new optional parameter virtualNetwork - - Interface FirewallPolicy has a new optional parameter size - - Interface FirewallPolicyRuleCollectionGroup has a new optional parameter size - - Interface Subnet has a new optional parameter defaultOutboundAccess - - Interface VirtualNetworkGateway has a new optional parameter autoScaleConfiguration - - -## 32.1.0 (2023-08-08) - -### Features Added - - - Added operation LoadBalancers.migrateToIpBased - - Added Interface LoadBalancersMigrateToIpBasedOptionalParams - - Added Interface MigratedPools - - Added Interface MigrateLoadBalancerToIpBasedRequest - - Added Type Alias LoadBalancersMigrateToIpBasedResponse - - Added Type Alias SyncMode - - Interface BackendAddressPool has a new optional parameter syncMode - - Added Enum KnownSyncMode - - Enum KnownApplicationGatewaySkuName has a new value Basic - - Enum KnownApplicationGatewayTier has a new value Basic - - -## 32.0.0 (2023-07-06) - -### Features Added - - - Added Type Alias AdminState - - Interface ActiveDefaultSecurityAdminRule has a new optional parameter resourceGuid - - Interface ActiveSecurityAdminRule has a new optional parameter resourceGuid - - Interface AdminRule has a new optional parameter resourceGuid - - Interface AdminRuleCollection has a new optional parameter resourceGuid - - Interface ApplicationGateway has a new optional parameter defaultPredefinedSslPolicy - - Interface ConfigurationGroup has a new optional parameter resourceGuid - - Interface ConnectivityConfiguration has a new optional parameter resourceGuid - - Interface DefaultAdminRule has a new optional parameter resourceGuid - - Interface EffectiveConnectivityConfiguration has a new optional parameter resourceGuid - - Interface EffectiveDefaultSecurityAdminRule has a new optional parameter resourceGuid - - Interface EffectiveSecurityAdminRule has a new optional parameter resourceGuid - - Interface NetworkGroup has a new optional parameter resourceGuid - - Interface NetworkManager has a new optional parameter resourceGuid - - Interface SecurityAdminConfiguration has a new optional parameter resourceGuid - - Interface VirtualNetworkGateway has a new optional parameter adminState - - Added Enum KnownAdminState - - Class NetworkManagementClient has a new signature - -### Breaking Changes - - - Enum KnownApplicationGatewayCustomErrorStatusCode no longer has value HttpStatus499 - - -## 31.0.0 (2023-05-19) - -### Features Added - - - Added operation group NetworkVirtualApplianceConnections - - Added operation AzureFirewalls.beginPacketCapture - - Added operation AzureFirewalls.beginPacketCaptureAndWait - - Added Interface AzureFirewallPacketCaptureFlags - - Added Interface AzureFirewallPacketCaptureRule - - Added Interface AzureFirewallsPacketCaptureHeaders - - Added Interface AzureFirewallsPacketCaptureOptionalParams - - Added Interface EffectiveRouteMapRouteList - - Added Interface FirewallPacketCaptureParameters - - Added Interface FirewallPolicyHttpHeaderToInsert - - Added Interface GroupByUserSession - - Added Interface GroupByVariable - - Added Interface NetworkVirtualApplianceConnection - - Added Interface NetworkVirtualApplianceConnectionList - - Added Interface NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams - - Added Interface NetworkVirtualApplianceConnectionsDeleteHeaders - - Added Interface NetworkVirtualApplianceConnectionsDeleteOptionalParams - - Added Interface NetworkVirtualApplianceConnectionsGetOptionalParams - - Added Interface NetworkVirtualApplianceConnectionsListNextOptionalParams - - Added Interface NetworkVirtualApplianceConnectionsListOptionalParams - - Added Interface NetworkVirtualAppliancesCreateOrUpdateHeaders - - Added Interface NetworkVirtualAppliancesDeleteHeaders - - Added Interface PolicySettingsLogScrubbing - - Added Interface PropagatedRouteTableNfv - - Added Interface RoutingConfigurationNfv - - Added Interface RoutingConfigurationNfvSubResource - - Added Interface VirtualApplianceAdditionalNicProperties - - Added Interface WebApplicationFirewallScrubbingRules - - Added Type Alias ApplicationGatewayFirewallRateLimitDuration - - Added Type Alias ApplicationGatewayFirewallUserSessionVariable - - Added Type Alias AzureFirewallPacketCaptureFlagsType - - Added Type Alias AzureFirewallsPacketCaptureResponse - - Added Type Alias NetworkInterfaceAuxiliarySku - - Added Type Alias NetworkVirtualApplianceConnectionsCreateOrUpdateResponse - - Added Type Alias NetworkVirtualApplianceConnectionsGetResponse - - Added Type Alias NetworkVirtualApplianceConnectionsListNextResponse - - Added Type Alias NetworkVirtualApplianceConnectionsListResponse - - Added Type Alias PublicIpAddressDnsSettingsDomainNameLabelScope - - Added Type Alias ScrubbingRuleEntryMatchOperator - - Added Type Alias ScrubbingRuleEntryMatchVariable - - Added Type Alias ScrubbingRuleEntryState - - Added Type Alias VirtualHubsGetEffectiveVirtualHubRoutesResponse - - Added Type Alias VirtualHubsGetInboundRoutesResponse - - Added Type Alias VirtualHubsGetOutboundRoutesResponse - - Added Type Alias WebApplicationFirewallScrubbingState - - Interface ApplicationRule has a new optional parameter httpHeadersToInsert - - Interface BastionHost has a new optional parameter enableKerberos - - Interface DdosProtectionPlan has a new optional parameter publicIPAddresses - - Interface NetworkInterface has a new optional parameter auxiliarySku - - Interface NetworkVirtualAppliance has a new optional parameter additionalNics - - Interface NetworkVirtualAppliance has a new optional parameter virtualApplianceConnections - - Interface PolicySettings has a new optional parameter fileUploadEnforcement - - Interface PolicySettings has a new optional parameter logScrubbing - - Interface PolicySettings has a new optional parameter requestBodyEnforcement - - Interface PolicySettings has a new optional parameter requestBodyInspectLimitInKB - - Interface PrivateEndpointConnection has a new optional parameter privateEndpointLocation - - Interface PublicIPAddressDnsSettings has a new optional parameter domainNameLabelScope - - Interface Subnet has a new optional parameter applicationGatewayIPConfigurations - - Interface VirtualApplianceNicProperties has a new optional parameter instanceName - - Interface WebApplicationFirewallCustomRule has a new optional parameter groupByUserSession - - Interface WebApplicationFirewallCustomRule has a new optional parameter rateLimitDuration - - Interface WebApplicationFirewallCustomRule has a new optional parameter rateLimitThreshold - - Added Enum KnownApplicationGatewayFirewallRateLimitDuration - - Added Enum KnownApplicationGatewayFirewallUserSessionVariable - - Added Enum KnownAzureFirewallPacketCaptureFlagsType - - Added Enum KnownNetworkInterfaceAuxiliarySku - - Added Enum KnownScrubbingRuleEntryMatchOperator - - Added Enum KnownScrubbingRuleEntryMatchVariable - - Added Enum KnownScrubbingRuleEntryState - - Added Enum KnownWebApplicationFirewallScrubbingState - - Enum KnownNetworkInterfaceAuxiliaryMode has a new value AcceleratedConnections - - Enum KnownWebApplicationFirewallRuleType has a new value RateLimitRule - -### Breaking Changes - - - Interface DdosProtectionPlan no longer has parameter publicIpAddresses - - Interface Subnet no longer has parameter applicationGatewayIpConfigurations - - Type of parameter prefix of interface EffectiveRouteMapRoute is changed from string[] to string - - Enum KnownLoadBalancerBackendAddressAdminState no longer has value Drain - - -## 30.2.0 (2023-03-07) - -### Features Added - - - Added Type Alias WebApplicationFirewallState - - Interface ExpressRouteCircuit has a new optional parameter authorizationStatus - - Interface VirtualNetwork has a new optional parameter flowLogs - - Interface VpnGatewaysResetOptionalParams has a new optional parameter ipConfigurationId - - Interface WebApplicationFirewallCustomRule has a new optional parameter state - - Added Enum KnownWebApplicationFirewallState - - Enum KnownApplicationGatewayCustomErrorStatusCode has a new value HttpStatus400 - - Enum KnownApplicationGatewayCustomErrorStatusCode has a new value HttpStatus404 - - Enum KnownApplicationGatewayCustomErrorStatusCode has a new value HttpStatus405 - - Enum KnownApplicationGatewayCustomErrorStatusCode has a new value HttpStatus408 - - Enum KnownApplicationGatewayCustomErrorStatusCode has a new value HttpStatus499 - - Enum KnownApplicationGatewayCustomErrorStatusCode has a new value HttpStatus500 - - Enum KnownApplicationGatewayCustomErrorStatusCode has a new value HttpStatus503 - - Enum KnownApplicationGatewayCustomErrorStatusCode has a new value HttpStatus504 - - Interface AdminRuleCollectionsListNextOptionalParams no longer has parameter skipToken - - Interface AdminRuleCollectionsListNextOptionalParams no longer has parameter top - - Interface AdminRulesListNextOptionalParams no longer has parameter skipToken - - Interface AdminRulesListNextOptionalParams no longer has parameter top - - Interface ConnectivityConfigurationsListNextOptionalParams no longer has parameter skipToken - - Interface ConnectivityConfigurationsListNextOptionalParams no longer has parameter top - - Interface ManagementGroupNetworkManagerConnectionsListNextOptionalParams no longer has parameter skipToken - - Interface ManagementGroupNetworkManagerConnectionsListNextOptionalParams no longer has parameter top - - Interface NetworkGroupsListNextOptionalParams no longer has parameter skipToken - - Interface NetworkGroupsListNextOptionalParams no longer has parameter top - - Interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsNextOptionalParams no longer has parameter expand - - Interface NetworkManagersListBySubscriptionNextOptionalParams no longer has parameter skipToken - - Interface NetworkManagersListBySubscriptionNextOptionalParams no longer has parameter top - - Interface NetworkManagersListNextOptionalParams no longer has parameter skipToken - - Interface NetworkManagersListNextOptionalParams no longer has parameter top - - Interface ScopeConnectionsListNextOptionalParams no longer has parameter skipToken - - Interface ScopeConnectionsListNextOptionalParams no longer has parameter top - - Interface SecurityAdminConfigurationsListNextOptionalParams no longer has parameter skipToken - - Interface SecurityAdminConfigurationsListNextOptionalParams no longer has parameter top - - Interface ServiceTagInformationListNextOptionalParams no longer has parameter noAddressPrefixes - - Interface ServiceTagInformationListNextOptionalParams no longer has parameter tagName - - Interface StaticMembersListNextOptionalParams no longer has parameter skipToken - - Interface StaticMembersListNextOptionalParams no longer has parameter top - - Interface SubscriptionNetworkManagerConnectionsListNextOptionalParams no longer has parameter skipToken - - Interface SubscriptionNetworkManagerConnectionsListNextOptionalParams no longer has parameter top - - Interface VirtualNetworksListDdosProtectionStatusNextOptionalParams no longer has parameter skipToken - - Interface VirtualNetworksListDdosProtectionStatusNextOptionalParams no longer has parameter top - - -## 30.1.0 (2022-12-13) - -### Features Added - - - Added Interface DdosProtectionPlansDeleteHeaders - - Added Interface DelegationProperties - - Added Interface PartnerManagedResourceProperties - - Added Interface PublicIPAddressesDdosProtectionStatusHeaders - - Added Interface PublicIPAddressesDeleteHeaders - - Interface BackendAddressPool has a new optional parameter virtualNetwork - - Interface NetworkVirtualAppliance has a new optional parameter delegation - - Interface NetworkVirtualAppliance has a new optional parameter deploymentType - - Interface NetworkVirtualAppliance has a new optional parameter partnerManagedResource - - Interface PolicySettings has a new optional parameter customBlockResponseBody - - Interface PolicySettings has a new optional parameter customBlockResponseStatusCode - - Added function getContinuationToken - - -## 30.0.0 (2022-09-29) - -### Features Added - - - Added operation group ApplicationGatewayWafDynamicManifests - - Added operation group ApplicationGatewayWafDynamicManifestsDefault - - Added operation group RouteMaps - - Added operation group VipSwap - - Added operation PublicIPAddresses.beginDdosProtectionStatus - - Added operation PublicIPAddresses.beginDdosProtectionStatusAndWait - - Added operation VirtualHubs.beginGetInboundRoutes - - Added operation VirtualHubs.beginGetInboundRoutesAndWait - - Added operation VirtualHubs.beginGetOutboundRoutes - - Added operation VirtualHubs.beginGetOutboundRoutesAndWait - - Added operation VirtualNetworks.beginListDdosProtectionStatusAndWait - - Added Interface Action - - Added Interface ApplicationGatewayFirewallManifestRuleSet - - Added Interface ApplicationGatewayWafDynamicManifestResult - - Added Interface ApplicationGatewayWafDynamicManifestResultList - - Added Interface ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams - - Added Interface ApplicationGatewayWafDynamicManifestsGetNextOptionalParams - - Added Interface ApplicationGatewayWafDynamicManifestsGetOptionalParams - - Added Interface Criterion - - Added Interface EffectiveRouteMapRoute - - Added Interface GetInboundRoutesParameters - - Added Interface GetOutboundRoutesParameters - - Added Interface ListRouteMapsResult - - Added Interface Parameter - - Added Interface PublicIPAddressesDdosProtectionStatusOptionalParams - - Added Interface PublicIpDdosProtectionStatusResult - - Added Interface RouteMap - - Added Interface RouteMapRule - - Added Interface RouteMapsCreateOrUpdateOptionalParams - - Added Interface RouteMapsDeleteOptionalParams - - Added Interface RouteMapsGetOptionalParams - - Added Interface RouteMapsListNextOptionalParams - - Added Interface RouteMapsListOptionalParams - - Added Interface StaticRoutesConfig - - Added Interface SwapResource - - Added Interface SwapResourceListResult - - Added Interface SwapResourceProperties - - Added Interface VipSwapCreateOptionalParams - - Added Interface VipSwapGetOptionalParams - - Added Interface VipSwapListOptionalParams - - Added Interface VirtualHubsGetInboundRoutesOptionalParams - - Added Interface VirtualHubsGetOutboundRoutesOptionalParams - - Added Interface VirtualNetworkDdosProtectionStatusResult - - Added Interface VirtualNetworkGatewayPolicyGroup - - Added Interface VirtualNetworkGatewayPolicyGroupMember - - Added Interface VirtualNetworksListDdosProtectionStatusNextOptionalParams - - Added Interface VirtualNetworksListDdosProtectionStatusOptionalParams - - Added Interface VngClientConnectionConfiguration - - Added Type Alias ActionType - - Added Type Alias ApplicationGatewayClientRevocationOptions - - Added Type Alias ApplicationGatewayRuleSetStatusOptions - - Added Type Alias ApplicationGatewayTierTypes - - Added Type Alias ApplicationGatewayWafDynamicManifestsDefaultGetResponse - - Added Type Alias ApplicationGatewayWafDynamicManifestsGetNextResponse - - Added Type Alias ApplicationGatewayWafDynamicManifestsGetResponse - - Added Type Alias ApplicationGatewayWafRuleActionTypes - - Added Type Alias ApplicationGatewayWafRuleStateTypes - - Added Type Alias CustomIpPrefixType - - Added Type Alias DdosSettingsProtectionMode - - Added Type Alias ExpressRoutePortsBillingType - - Added Type Alias Geo - - Added Type Alias IsWorkloadProtected - - Added Type Alias NextStep - - Added Type Alias PublicIPAddressesDdosProtectionStatusResponse - - Added Type Alias RouteMapActionType - - Added Type Alias RouteMapMatchCondition - - Added Type Alias RouteMapsCreateOrUpdateResponse - - Added Type Alias RouteMapsGetResponse - - Added Type Alias RouteMapsListNextResponse - - Added Type Alias RouteMapsListResponse - - Added Type Alias SlotType - - Added Type Alias VipSwapGetResponse - - Added Type Alias VipSwapListResponse - - Added Type Alias VirtualNetworksListDdosProtectionStatusNextResponse - - Added Type Alias VirtualNetworksListDdosProtectionStatusResponse - - Added Type Alias VnetLocalRouteOverrideCriteria - - Interface ApplicationGatewayClientAuthConfiguration has a new optional parameter verifyClientRevocation - - Interface ApplicationGatewayFirewallRule has a new optional parameter action - - Interface ApplicationGatewayFirewallRule has a new optional parameter ruleIdString - - Interface ApplicationGatewayFirewallRule has a new optional parameter state - - Interface ApplicationGatewayFirewallRuleSet has a new optional parameter tiers - - Interface CustomIpPrefix has a new optional parameter asn - - Interface CustomIpPrefix has a new optional parameter expressRouteAdvertise - - Interface CustomIpPrefix has a new optional parameter geo - - Interface CustomIpPrefix has a new optional parameter prefixType - - Interface DdosProtectionPlan has a new optional parameter publicIpAddresses - - Interface DdosSettings has a new optional parameter ddosProtectionPlan - - Interface DdosSettings has a new optional parameter protectionMode - - Interface ExpressRouteConnection has a new optional parameter enablePrivateLinkFastPath - - Interface ExpressRouteGateway has a new optional parameter allowNonVirtualWanTraffic - - Interface ExpressRouteLink has a new optional parameter coloLocation - - Interface ExpressRoutePort has a new optional parameter billingType - - Interface ListActiveConnectivityConfigurationsOptionalParams has a new optional parameter top - - Interface ListActiveSecurityAdminRulesOptionalParams has a new optional parameter top - - Interface ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams has a new optional parameter top - - Interface ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams has a new optional parameter top - - Interface ManagedRuleOverride has a new optional parameter action - - Interface NetworkInterface has a new optional parameter disableTcpStateTracking - - Interface NetworkManagerDeploymentStatusListOptionalParams has a new optional parameter top - - Interface Probe has a new optional parameter probeThreshold - - Interface RoutingConfiguration has a new optional parameter inboundRouteMap - - Interface RoutingConfiguration has a new optional parameter outboundRouteMap - - Interface VirtualHub has a new optional parameter routeMaps - - Interface VirtualNetworkGateway has a new optional parameter allowRemoteVnetTraffic - - Interface VirtualNetworkGateway has a new optional parameter allowVirtualWanTraffic - - Interface VirtualNetworkGateway has a new optional parameter virtualNetworkGatewayPolicyGroups - - Interface VirtualNetworkGatewayConnection has a new optional parameter enablePrivateLinkFastPath - - Interface VirtualNetworkGatewayConnectionListEntity has a new optional parameter enablePrivateLinkFastPath - - Interface VnetRoute has a new optional parameter staticRoutesConfig - - Interface VpnClientConfiguration has a new optional parameter vngClientConnectionConfigurations - - Class NetworkManagementClient has a new parameter applicationGatewayWafDynamicManifests - - Class NetworkManagementClient has a new parameter applicationGatewayWafDynamicManifestsDefault - - Class NetworkManagementClient has a new parameter routeMaps - - Class NetworkManagementClient has a new parameter vipSwap - - Added Enum KnownActionType - - Added Enum KnownApplicationGatewayClientRevocationOptions - - Added Enum KnownApplicationGatewayRuleSetStatusOptions - - Added Enum KnownApplicationGatewayTierTypes - - Added Enum KnownApplicationGatewayWafRuleActionTypes - - Added Enum KnownApplicationGatewayWafRuleStateTypes - - Added Enum KnownCustomIpPrefixType - - Added Enum KnownDdosSettingsProtectionMode - - Added Enum KnownExpressRoutePortsBillingType - - Added Enum KnownGeo - - Added Enum KnownIsWorkloadProtected - - Added Enum KnownNextStep - - Added Enum KnownRouteMapActionType - - Added Enum KnownRouteMapMatchCondition - - Added Enum KnownVnetLocalRouteOverrideCriteria - - Enum KnownCommissionedState has a new value Deprovisioned - - Enum KnownManagedRuleEnabledState has a new value Enabled - - Enum KnownNetworkIntentPolicyBasedService has a new value AllowRulesOnly - - Enum KnownWebApplicationFirewallTransform has a new value Uppercase - -### Breaking Changes - - - Interface DdosCustomPolicy no longer has parameter protocolCustomSettings - - Interface DdosCustomPolicy no longer has parameter publicIPAddresses - - Interface DdosSettings no longer has parameter ddosCustomPolicy - - Interface DdosSettings no longer has parameter protectedIP - - Interface DdosSettings no longer has parameter protectionCoverage - - Interface AdminRule has a new required parameter kind - - Interface DefaultAdminRule has a new required parameter kind - - Removed Enum KnownDdosCustomPolicyProtocol - - Removed Enum KnownDdosCustomPolicyTriggerSensitivityOverride - - Removed Enum KnownDdosSettingsProtectionCoverage - - -## 29.0.0 (2022-08-02) - -### Features Added - - - Added operation group AdminRuleCollections - - Added operation group AdminRules - - Added operation group ConnectivityConfigurations - - Added operation group ExpressRouteProviderPortsLocation - - Added operation group ManagementGroupNetworkManagerConnections - - Added operation group NetworkGroups - - Added operation group NetworkManagerCommits - - Added operation group NetworkManagerDeploymentStatusOperations - - Added operation group NetworkManagers - - Added operation group ScopeConnections - - Added operation group SecurityAdminConfigurations - - Added operation group StaticMembers - - Added operation group SubscriptionNetworkManagerConnections - - Added operation AzureFirewalls.beginListLearnedPrefixes - - Added operation AzureFirewalls.beginListLearnedPrefixesAndWait - - Added Interface ActiveBaseSecurityAdminRule - - Added Interface ActiveConfigurationParameter - - Added Interface ActiveConnectivityConfiguration - - Added Interface ActiveConnectivityConfigurationsListResult - - Added Interface ActiveDefaultSecurityAdminRule - - Added Interface ActiveSecurityAdminRule - - Added Interface ActiveSecurityAdminRulesListResult - - Added Interface AddressPrefixItem - - Added Interface AdminRule - - Added Interface AdminRuleCollection - - Added Interface AdminRuleCollectionListResult - - Added Interface AdminRuleCollectionsCreateOrUpdateOptionalParams - - Added Interface AdminRuleCollectionsDeleteHeaders - - Added Interface AdminRuleCollectionsDeleteOptionalParams - - Added Interface AdminRuleCollectionsGetOptionalParams - - Added Interface AdminRuleCollectionsListNextOptionalParams - - Added Interface AdminRuleCollectionsListOptionalParams - - Added Interface AdminRuleListResult - - Added Interface AdminRulesCreateOrUpdateOptionalParams - - Added Interface AdminRulesDeleteHeaders - - Added Interface AdminRulesDeleteOptionalParams - - Added Interface AdminRulesGetOptionalParams - - Added Interface AdminRulesListNextOptionalParams - - Added Interface AdminRulesListOptionalParams - - Added Interface ApplicationGateway - - Added Interface ApplicationGatewayAuthenticationCertificate - - Added Interface ApplicationGatewayAvailableSslOptions - - Added Interface ApplicationGatewayBackendAddressPool - - Added Interface ApplicationGatewayBackendHttpSettings - - Added Interface ApplicationGatewayBackendSettings - - Added Interface ApplicationGatewayFirewallRuleSet - - Added Interface ApplicationGatewayFrontendIPConfiguration - - Added Interface ApplicationGatewayFrontendPort - - Added Interface ApplicationGatewayHttpListener - - Added Interface ApplicationGatewayIPConfiguration - - Added Interface ApplicationGatewayListener - - Added Interface ApplicationGatewayLoadDistributionPolicy - - Added Interface ApplicationGatewayLoadDistributionTarget - - Added Interface ApplicationGatewayPathRule - - Added Interface ApplicationGatewayPrivateEndpointConnection - - Added Interface ApplicationGatewayPrivateLinkConfiguration - - Added Interface ApplicationGatewayPrivateLinkIpConfiguration - - Added Interface ApplicationGatewayPrivateLinkResource - - Added Interface ApplicationGatewayProbe - - Added Interface ApplicationGatewayRedirectConfiguration - - Added Interface ApplicationGatewayRequestRoutingRule - - Added Interface ApplicationGatewayRewriteRuleSet - - Added Interface ApplicationGatewayRoutingRule - - Added Interface ApplicationGatewaySslCertificate - - Added Interface ApplicationGatewaySslPredefinedPolicy - - Added Interface ApplicationGatewaySslProfile - - Added Interface ApplicationGatewayTrustedClientCertificate - - Added Interface ApplicationGatewayTrustedRootCertificate - - Added Interface ApplicationGatewayUrlPathMap - - Added Interface ApplicationRule - - Added Interface ApplicationSecurityGroup - - Added Interface AzureFirewall - - Added Interface AzureFirewallApplicationRuleCollection - - Added Interface AzureFirewallFqdnTag - - Added Interface AzureFirewallIPConfiguration - - Added Interface AzureFirewallNatRuleCollection - - Added Interface AzureFirewallNetworkRuleCollection - - Added Interface AzureFirewallsListLearnedPrefixesOptionalParams - - Added Interface BackendAddressPool - - Added Interface BaseAdminRule - - Added Interface BastionHost - - Added Interface BastionHostIPConfiguration - - Added Interface BgpConnection - - Added Interface BgpServiceCommunity - - Added Interface ChildResource - - Added Interface ConfigurationGroup - - Added Interface ConnectionMonitorResultProperties - - Added Interface ConnectionSharedKey - - Added Interface ConnectivityConfiguration - - Added Interface ConnectivityConfigurationListResult - - Added Interface ConnectivityConfigurationsCreateOrUpdateOptionalParams - - Added Interface ConnectivityConfigurationsDeleteHeaders - - Added Interface ConnectivityConfigurationsDeleteOptionalParams - - Added Interface ConnectivityConfigurationsGetOptionalParams - - Added Interface ConnectivityConfigurationsListNextOptionalParams - - Added Interface ConnectivityConfigurationsListOptionalParams - - Added Interface ConnectivityGroupItem - - Added Interface Container - - Added Interface ContainerNetworkInterface - - Added Interface ContainerNetworkInterfaceConfiguration - - Added Interface CrossTenantScopes - - Added Interface CustomIpPrefix - - Added Interface DdosCustomPolicy - - Added Interface DefaultAdminRule - - Added Interface Delegation - - Added Interface DscpConfiguration - - Added Interface EffectiveBaseSecurityAdminRule - - Added Interface EffectiveConnectivityConfiguration - - Added Interface EffectiveDefaultSecurityAdminRule - - Added Interface EffectiveSecurityAdminRule - - Added Interface EndpointServiceResult - - Added Interface ExplicitProxy - - Added Interface ExpressRouteCircuit - - Added Interface ExpressRouteCircuitAuthorization - - Added Interface ExpressRouteCircuitConnection - - Added Interface ExpressRouteCircuitPeering - - Added Interface ExpressRouteConnection - - Added Interface ExpressRouteCrossConnection - - Added Interface ExpressRouteCrossConnectionPeering - - Added Interface ExpressRouteGateway - - Added Interface ExpressRouteLink - - Added Interface ExpressRoutePort - - Added Interface ExpressRoutePortAuthorization - - Added Interface ExpressRoutePortsLocation - - Added Interface ExpressRouteProviderPort - - Added Interface ExpressRouteProviderPortListResult - - Added Interface ExpressRouteProviderPortOptionalParams - - Added Interface ExpressRouteProviderPortsLocationListOptionalParams - - Added Interface ExpressRouteServiceProvider - - Added Interface FirewallPolicy - - Added Interface FirewallPolicyFilterRuleCollection - - Added Interface FirewallPolicyNatRuleCollection - - Added Interface FirewallPolicyRuleCollectionGroup - - Added Interface FlowLog - - Added Interface FrontendIPConfiguration - - Added Interface Hub - - Added Interface HubIpConfiguration - - Added Interface HubRouteTable - - Added Interface HubVirtualNetworkConnection - - Added Interface InboundNatPool - - Added Interface InboundNatRule - - Added Interface InboundSecurityRule - - Added Interface IpAllocation - - Added Interface IPConfiguration - - Added Interface IPConfigurationProfile - - Added Interface IpGroup - - Added Interface IPPrefixesList - - Added Interface ListActiveConnectivityConfigurationsOptionalParams - - Added Interface ListActiveSecurityAdminRulesOptionalParams - - Added Interface ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams - - Added Interface ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams - - Added Interface LoadBalancer - - Added Interface LoadBalancingRule - - Added Interface LocalNetworkGateway - - Added Interface ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams - - Added Interface ManagementGroupNetworkManagerConnectionsDeleteOptionalParams - - Added Interface ManagementGroupNetworkManagerConnectionsGetOptionalParams - - Added Interface ManagementGroupNetworkManagerConnectionsListNextOptionalParams - - Added Interface ManagementGroupNetworkManagerConnectionsListOptionalParams - - Added Interface NatGateway - - Added Interface NatRule - - Added Interface NetworkGroup - - Added Interface NetworkGroupListResult - - Added Interface NetworkGroupsCreateOrUpdateHeaders - - Added Interface NetworkGroupsCreateOrUpdateOptionalParams - - Added Interface NetworkGroupsDeleteHeaders - - Added Interface NetworkGroupsDeleteOptionalParams - - Added Interface NetworkGroupsGetOptionalParams - - Added Interface NetworkGroupsListNextOptionalParams - - Added Interface NetworkGroupsListOptionalParams - - Added Interface NetworkIntentPolicy - - Added Interface NetworkInterface - - Added Interface NetworkInterfaceIPConfiguration - - Added Interface NetworkInterfaceTapConfiguration - - Added Interface NetworkManager - - Added Interface NetworkManagerCommit - - Added Interface NetworkManagerCommitsPostHeaders - - Added Interface NetworkManagerCommitsPostOptionalParams - - Added Interface NetworkManagerConnection - - Added Interface NetworkManagerConnectionListResult - - Added Interface NetworkManagerDeploymentStatus - - Added Interface NetworkManagerDeploymentStatusListOptionalParams - - Added Interface NetworkManagerDeploymentStatusListResult - - Added Interface NetworkManagerDeploymentStatusParameter - - Added Interface NetworkManagerEffectiveConnectivityConfigurationListResult - - Added Interface NetworkManagerEffectiveSecurityAdminRulesListResult - - Added Interface NetworkManagerListResult - - Added Interface NetworkManagerPropertiesNetworkManagerScopes - - Added Interface NetworkManagersCreateOrUpdateOptionalParams - - Added Interface NetworkManagersDeleteHeaders - - Added Interface NetworkManagersDeleteOptionalParams - - Added Interface NetworkManagerSecurityGroupItem - - Added Interface NetworkManagersGetOptionalParams - - Added Interface NetworkManagersListBySubscriptionNextOptionalParams - - Added Interface NetworkManagersListBySubscriptionOptionalParams - - Added Interface NetworkManagersListNextOptionalParams - - Added Interface NetworkManagersListOptionalParams - - Added Interface NetworkManagersPatchOptionalParams - - Added Interface NetworkProfile - - Added Interface NetworkRule - - Added Interface NetworkSecurityGroup - - Added Interface NetworkVirtualAppliance - - Added Interface NetworkVirtualApplianceSku - - Added Interface NetworkWatcher - - Added Interface OutboundRule - - Added Interface P2SConnectionConfiguration - - Added Interface P2SVpnGateway - - Added Interface PacketCaptureMachineScope - - Added Interface PacketCaptureResultProperties - - Added Interface PatchObject - - Added Interface PatchRouteFilter - - Added Interface PatchRouteFilterRule - - Added Interface PeerExpressRouteCircuitConnection - - Added Interface PrivateDnsZoneGroup - - Added Interface PrivateEndpoint - - Added Interface PrivateEndpointConnection - - Added Interface PrivateLinkService - - Added Interface PrivateLinkServiceConnection - - Added Interface PrivateLinkServiceIpConfiguration - - Added Interface PrivateLinkServicePropertiesAutoApproval - - Added Interface PrivateLinkServicePropertiesVisibility - - Added Interface Probe - - Added Interface PublicIPAddress - - Added Interface PublicIPPrefix - - Added Interface QueryRequestOptions - - Added Interface ResourceNavigationLink - - Added Interface Route - - Added Interface RouteFilter - - Added Interface RouteFilterRule - - Added Interface RouteTable - - Added Interface RoutingIntent - - Added Interface ScopeConnection - - Added Interface ScopeConnectionListResult - - Added Interface ScopeConnectionsCreateOrUpdateOptionalParams - - Added Interface ScopeConnectionsDeleteOptionalParams - - Added Interface ScopeConnectionsGetOptionalParams - - Added Interface ScopeConnectionsListNextOptionalParams - - Added Interface ScopeConnectionsListOptionalParams - - Added Interface SecurityAdminConfiguration - - Added Interface SecurityAdminConfigurationListResult - - Added Interface SecurityAdminConfigurationsCreateOrUpdateOptionalParams - - Added Interface SecurityAdminConfigurationsDeleteHeaders - - Added Interface SecurityAdminConfigurationsDeleteOptionalParams - - Added Interface SecurityAdminConfigurationsGetOptionalParams - - Added Interface SecurityAdminConfigurationsListNextOptionalParams - - Added Interface SecurityAdminConfigurationsListOptionalParams - - Added Interface SecurityPartnerProvider - - Added Interface SecurityRule - - Added Interface ServiceAssociationLink - - Added Interface ServiceEndpointPolicy - - Added Interface ServiceEndpointPolicyDefinition - - Added Interface StaticMember - - Added Interface StaticMemberListResult - - Added Interface StaticMembersCreateOrUpdateOptionalParams - - Added Interface StaticMembersDeleteOptionalParams - - Added Interface StaticMembersGetOptionalParams - - Added Interface StaticMembersListNextOptionalParams - - Added Interface StaticMembersListOptionalParams - - Added Interface Subnet - - Added Interface SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams - - Added Interface SubscriptionNetworkManagerConnectionsDeleteOptionalParams - - Added Interface SubscriptionNetworkManagerConnectionsGetOptionalParams - - Added Interface SubscriptionNetworkManagerConnectionsListNextOptionalParams - - Added Interface SubscriptionNetworkManagerConnectionsListOptionalParams - - Added Interface SystemData - - Added Interface VirtualApplianceSite - - Added Interface VirtualHub - - Added Interface VirtualHubRouteTableV2 - - Added Interface VirtualNetwork - - Added Interface VirtualNetworkGateway - - Added Interface VirtualNetworkGatewayConnection - - Added Interface VirtualNetworkGatewayConnectionListEntity - - Added Interface VirtualNetworkGatewayIPConfiguration - - Added Interface VirtualNetworkGatewayNatRule - - Added Interface VirtualNetworkPeering - - Added Interface VirtualNetworkTap - - Added Interface VirtualRouter - - Added Interface VirtualRouterAutoScaleConfiguration - - Added Interface VirtualRouterPeering - - Added Interface VirtualWAN - - Added Interface Vm - - Added Interface VpnClientRevokedCertificate - - Added Interface VpnClientRootCertificate - - Added Interface VpnConnection - - Added Interface VpnGateway - - Added Interface VpnGatewayNatRule - - Added Interface VpnServerConfiguration - - Added Interface VpnServerConfigurationPolicyGroup - - Added Interface VpnSite - - Added Interface VpnSiteLink - - Added Interface VpnSiteLinkConnection - - Added Interface WebApplicationFirewallPolicy - - Added Type Alias ActiveBaseSecurityAdminRuleUnion - - Added Type Alias AddressPrefixType - - Added Type Alias AdminRuleCollectionsCreateOrUpdateResponse - - Added Type Alias AdminRuleCollectionsGetResponse - - Added Type Alias AdminRuleCollectionsListNextResponse - - Added Type Alias AdminRuleCollectionsListResponse - - Added Type Alias AdminRuleKind - - Added Type Alias AdminRulesCreateOrUpdateResponse - - Added Type Alias AdminRulesGetResponse - - Added Type Alias AdminRulesListNextResponse - - Added Type Alias AdminRulesListResponse - - Added Type Alias AutoLearnPrivateRangesMode - - Added Type Alias AzureFirewallsListLearnedPrefixesResponse - - Added Type Alias BaseAdminRuleUnion - - Added Type Alias ConfigurationType - - Added Type Alias ConnectivityConfigurationsCreateOrUpdateResponse - - Added Type Alias ConnectivityConfigurationsGetResponse - - Added Type Alias ConnectivityConfigurationsListNextResponse - - Added Type Alias ConnectivityConfigurationsListResponse - - Added Type Alias ConnectivityTopology - - Added Type Alias CreatedByType - - Added Type Alias DeleteExistingPeering - - Added Type Alias DeploymentStatus - - Added Type Alias EffectiveAdminRuleKind - - Added Type Alias EffectiveBaseSecurityAdminRuleUnion - - Added Type Alias ExpressRouteProviderPortResponse - - Added Type Alias ExpressRouteProviderPortsLocationListResponse - - Added Type Alias GroupConnectivity - - Added Type Alias IsGlobal - - Added Type Alias ListActiveConnectivityConfigurationsResponse - - Added Type Alias ListActiveSecurityAdminRulesResponse - - Added Type Alias ListNetworkManagerEffectiveConnectivityConfigurationsResponse - - Added Type Alias ListNetworkManagerEffectiveSecurityAdminRulesResponse - - Added Type Alias ManagementGroupNetworkManagerConnectionsCreateOrUpdateResponse - - Added Type Alias ManagementGroupNetworkManagerConnectionsGetResponse - - Added Type Alias ManagementGroupNetworkManagerConnectionsListNextResponse - - Added Type Alias ManagementGroupNetworkManagerConnectionsListResponse - - Added Type Alias NetworkGroupsCreateOrUpdateResponse - - Added Type Alias NetworkGroupsGetResponse - - Added Type Alias NetworkGroupsListNextResponse - - Added Type Alias NetworkGroupsListResponse - - Added Type Alias NetworkIntentPolicyBasedService - - Added Type Alias NetworkManagerCommitsPostResponse - - Added Type Alias NetworkManagerDeploymentStatusListResponse - - Added Type Alias NetworkManagersCreateOrUpdateResponse - - Added Type Alias NetworkManagersGetResponse - - Added Type Alias NetworkManagersListBySubscriptionNextResponse - - Added Type Alias NetworkManagersListBySubscriptionResponse - - Added Type Alias NetworkManagersListNextResponse - - Added Type Alias NetworkManagersListResponse - - Added Type Alias NetworkManagersPatchResponse - - Added Type Alias PacketCaptureTargetType - - Added Type Alias ScopeConnectionsCreateOrUpdateResponse - - Added Type Alias ScopeConnectionsGetResponse - - Added Type Alias ScopeConnectionsListNextResponse - - Added Type Alias ScopeConnectionsListResponse - - Added Type Alias ScopeConnectionState - - Added Type Alias SecurityAdminConfigurationsCreateOrUpdateResponse - - Added Type Alias SecurityAdminConfigurationsGetResponse - - Added Type Alias SecurityAdminConfigurationsListNextResponse - - Added Type Alias SecurityAdminConfigurationsListResponse - - Added Type Alias SecurityConfigurationRuleAccess - - Added Type Alias SecurityConfigurationRuleDirection - - Added Type Alias SecurityConfigurationRuleProtocol - - Added Type Alias StaticMembersCreateOrUpdateResponse - - Added Type Alias StaticMembersGetResponse - - Added Type Alias StaticMembersListNextResponse - - Added Type Alias StaticMembersListResponse - - Added Type Alias SubscriptionNetworkManagerConnectionsCreateOrUpdateResponse - - Added Type Alias SubscriptionNetworkManagerConnectionsGetResponse - - Added Type Alias SubscriptionNetworkManagerConnectionsListNextResponse - - Added Type Alias SubscriptionNetworkManagerConnectionsListResponse - - Added Type Alias UseHubGateway - - Interface FirewallPolicySnat has a new optional parameter autoLearnPrivateRanges - - Interface PacketCapture has a new optional parameter scope - - Interface PacketCapture has a new optional parameter targetType - - Interface PacketCaptureParameters has a new optional parameter scope - - Interface PacketCaptureParameters has a new optional parameter targetType - - Interface PacketCaptureResult has a new optional parameter scope - - Interface PacketCaptureResult has a new optional parameter targetType - - Class NetworkManagementClient has a new parameter adminRuleCollections - - Class NetworkManagementClient has a new parameter adminRules - - Class NetworkManagementClient has a new parameter connectivityConfigurations - - Class NetworkManagementClient has a new parameter expressRouteProviderPortsLocation - - Class NetworkManagementClient has a new parameter managementGroupNetworkManagerConnections - - Class NetworkManagementClient has a new parameter networkGroups - - Class NetworkManagementClient has a new parameter networkManagerCommits - - Class NetworkManagementClient has a new parameter networkManagerDeploymentStatusOperations - - Class NetworkManagementClient has a new parameter networkManagers - - Class NetworkManagementClient has a new parameter scopeConnections - - Class NetworkManagementClient has a new parameter securityAdminConfigurations - - Class NetworkManagementClient has a new parameter staticMembers - - Class NetworkManagementClient has a new parameter subscriptionNetworkManagerConnections - - Added Enum KnownAddressPrefixType - - Added Enum KnownAdminRuleKind - - Added Enum KnownAutoLearnPrivateRangesMode - - Added Enum KnownConfigurationType - - Added Enum KnownConnectivityTopology - - Added Enum KnownCreatedByType - - Added Enum KnownDeleteExistingPeering - - Added Enum KnownDeploymentStatus - - Added Enum KnownEffectiveAdminRuleKind - - Added Enum KnownGroupConnectivity - - Added Enum KnownIsGlobal - - Added Enum KnownNetworkIntentPolicyBasedService - - Added Enum KnownScopeConnectionState - - Added Enum KnownSecurityConfigurationRuleAccess - - Added Enum KnownSecurityConfigurationRuleDirection - - Added Enum KnownSecurityConfigurationRuleProtocol - - Added Enum KnownUseHubGateway - - Enum KnownApplicationGatewaySslPolicyName has a new value AppGwSslPolicy20220101 - - Enum KnownApplicationGatewaySslPolicyName has a new value AppGwSslPolicy20220101S - - Enum KnownApplicationGatewaySslPolicyType has a new value CustomV2 - - Enum KnownApplicationGatewaySslProtocol has a new value TLSv13 - - Enum KnownCommissionedState has a new value CommissionedNoInternetAdvertise - - Enum KnownEndpointType has a new value AzureArcVM - - Enum KnownEndpointType has a new value AzureVmss - - Enum KnownWebApplicationFirewallOperator has a new value Any - -### Breaking Changes - - - Interface NetworkManagementClientOptionalParams no longer has parameter apiVersion - - Class NetworkManagementClient no longer has parameter apiVersion - - -## 28.0.0 (2022-05-18) - -### Features Added - - - 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 - -### Breaking Changes - - - Removed Enum KnownOrderByOrder - - Removed Enum KnownSingleQueryResultDirection - - Removed Enum KnownSingleQueryResultMode - - Removed Enum KnownSingleQueryResultSeverity - - -## 27.0.0 (2022-04-27) - -### Features Added - - - Added Type Alias SingleQueryResultDirection - - Added Type Alias SingleQueryResultMode - - Added Type Alias SingleQueryResultSeverity - - Added Enum KnownSingleQueryResultDirection - - Added Enum KnownSingleQueryResultMode - - Added Enum KnownSingleQueryResultSeverity - -### Breaking Changes - - - Removed Enum KnownEnum69 - - Removed Enum KnownEnum70 - - Removed Enum KnownEnum71 - - -## 26.0.0 (2021-12-06) - -The package of @azure/arm-network is using our next generation design principles since version 26.0.0, which contains breaking changes. - -To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). - -To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). - -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). +### Other Changes diff --git a/sdk/network/arm-network/README.md b/sdk/network/arm-network/README.md index 349c41912d7f..9c085b8ea67e 100644 --- a/sdk/network/arm-network/README.md +++ b/sdk/network/arm-network/README.md @@ -2,12 +2,14 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure NetworkManagement client. -Network Client +APIs to manage web application firewall rules. -[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network) | -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-network) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-network?view=azure-node-preview) | -[Samples](https://github.com/Azure-Samples/azure-samples-js-management) +Key links: + +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network) +- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-network) +- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-network) +- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network/samples) ## Getting started @@ -63,14 +65,15 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur import { InteractiveBrowserCredential } from "@azure/identity"; import { NetworkManagementClient } from "@azure/arm-network"; -const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", clientId: "", }); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); ``` + ### JavaScript Bundle To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). @@ -96,7 +99,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur ## Next steps -Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. +Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network/samples) directory for detailed examples on how to use this library. ## Contributing @@ -106,9 +109,6 @@ If you'd like to contribute to this library, please read the [contributing guide - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) - -[azure_cli]: https://learn.microsoft.com/cli/azure -[azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ [azure_portal]: https://portal.azure.com [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity diff --git a/sdk/network/arm-network/_meta.json b/sdk/network/arm-network/_meta.json deleted file mode 100644 index 76c894c77f2e..000000000000 --- a/sdk/network/arm-network/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "commit": "d1af484800b17b00d835755936b7a5cbda3e4d5b", - "readme": "specification/network/resource-manager/Microsoft.Network/Network/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\network\\resource-manager\\Microsoft.Network\\Network\\readme.md --use=@autorest/typescript@6.0.57 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.14.8", - "use": "@autorest/typescript@6.0.57" -} diff --git a/sdk/network/arm-network/api-extractor.json b/sdk/network/arm-network/api-extractor.json index 16d81e2eb512..870d6d399477 100644 --- a/sdk/network/arm-network/api-extractor.json +++ b/sdk/network/arm-network/api-extractor.json @@ -1,3 +1 @@ -{ - "extends": "../../../api-extractor-base.json" -} +{ "extends": "../../../api-extractor-base.json" } diff --git a/sdk/network/arm-network/config/tsconfig.samples.json b/sdk/network/arm-network/config/tsconfig.samples.json new file mode 100644 index 000000000000..98e148d91e83 --- /dev/null +++ b/sdk/network/arm-network/config/tsconfig.samples.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../../eng/tsconfigs/samples.json", + "compilerOptions": { + "paths": { + "@azure/arm-network": ["../dist/esm"] + } + } +} diff --git a/sdk/network/arm-network/config/tsconfig.snippets.json b/sdk/network/arm-network/config/tsconfig.snippets.json new file mode 100644 index 000000000000..a5ba563b0506 --- /dev/null +++ b/sdk/network/arm-network/config/tsconfig.snippets.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../../eng/tsconfigs/snippets.json" +} diff --git a/sdk/network/arm-network/config/tsconfig.src.browser.json b/sdk/network/arm-network/config/tsconfig.src.browser.json new file mode 100644 index 000000000000..429817e79b26 --- /dev/null +++ b/sdk/network/arm-network/config/tsconfig.src.browser.json @@ -0,0 +1,4 @@ +{ + "extends": "../../../../eng/tsconfigs/src.browser.json", + "include": ["../src/index.ts"] +} diff --git a/sdk/network/arm-network/config/tsconfig.src.cjs.json b/sdk/network/arm-network/config/tsconfig.src.cjs.json new file mode 100644 index 000000000000..b000a4a9909e --- /dev/null +++ b/sdk/network/arm-network/config/tsconfig.src.cjs.json @@ -0,0 +1,4 @@ +{ + "extends": "../../../../eng/tsconfigs/src.cjs.json", + "include": ["../src/index.ts"] +} diff --git a/sdk/network/arm-network/config/tsconfig.src.esm.json b/sdk/network/arm-network/config/tsconfig.src.esm.json new file mode 100644 index 000000000000..b393943938eb --- /dev/null +++ b/sdk/network/arm-network/config/tsconfig.src.esm.json @@ -0,0 +1,4 @@ +{ + "extends": "../../../../eng/tsconfigs/src.esm.json", + "include": ["../src/index.ts"] +} diff --git a/sdk/network/arm-network/config/tsconfig.src.react-native.json b/sdk/network/arm-network/config/tsconfig.src.react-native.json new file mode 100644 index 000000000000..931bc65e3b5f --- /dev/null +++ b/sdk/network/arm-network/config/tsconfig.src.react-native.json @@ -0,0 +1,4 @@ +{ + "extends": "../../../../eng/tsconfigs/src.react-native.json", + "include": ["../src/index.ts"] +} diff --git a/sdk/network/arm-network/config/tsconfig.test.browser.json b/sdk/network/arm-network/config/tsconfig.test.browser.json new file mode 100644 index 000000000000..8ab141bddc82 --- /dev/null +++ b/sdk/network/arm-network/config/tsconfig.test.browser.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../../eng/tsconfigs/test.browser.json", + "compilerOptions": { + "paths": { + "@azure/arm-network": ["../src/index.ts"], + "@azure/arm-network/*": ["../src/*"], + "$internal/*": ["../src/*"] + } + } +} diff --git a/sdk/network/arm-network/config/tsconfig.test.node.json b/sdk/network/arm-network/config/tsconfig.test.node.json new file mode 100644 index 000000000000..971a5124728d --- /dev/null +++ b/sdk/network/arm-network/config/tsconfig.test.node.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../../eng/tsconfigs/test.node.json", + "compilerOptions": { + "paths": { + "@azure/arm-network": ["../src/index.ts"], + "@azure/arm-network/*": ["../src/*"], + "$internal/*": ["../src/*"] + } + } +} diff --git a/sdk/network/arm-network/eslint.config.mjs b/sdk/network/arm-network/eslint.config.mjs new file mode 100644 index 000000000000..6d2f8a5914c3 --- /dev/null +++ b/sdk/network/arm-network/eslint.config.mjs @@ -0,0 +1,14 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", + }, + }, +]); diff --git a/sdk/network/arm-network/metadata.json b/sdk/network/arm-network/metadata.json new file mode 100644 index 000000000000..aea64d27b4eb --- /dev/null +++ b/sdk/network/arm-network/metadata.json @@ -0,0 +1,2138 @@ +{ + "apiVersions": { + "Microsoft.Network": "2025-07-01", + "Microsoft.Compute": "2018-10-01" + }, + "emitterVersion": "0.53.1", + "crossLanguageDefinitions": { + "CrossLanguagePackageId": "Microsoft.Network", + "CrossLanguageDefinitionId": { + "@azure/arm-network!BastionShareableLinkListRequest:interface": "Microsoft.Network.BastionShareableLinkListRequest", + "@azure/arm-network!BastionShareableLink:interface": "Microsoft.Network.BastionShareableLink", + "@azure/arm-network!Vm:interface": "Microsoft.Network.VM", + "@azure/arm-network!Resource:interface": "Common.Resource", + "@azure/arm-network!BastionShareableLinkListResult:interface": "Microsoft.Network.BastionShareableLinkListResult", + "@azure/arm-network!CloudError:interface": "Common.CloudError", + "@azure/arm-network!CloudErrorBody:interface": "Common.CloudErrorBody", + "@azure/arm-network!ArmOperationStatusResourceProvisioningState:interface": "Azure.ResourceManager.ArmOperationStatus", + "@azure/arm-network!ErrorDetail:interface": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "@azure/arm-network!ErrorAdditionalInfo:interface": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "@azure/arm-network!BastionShareableLinkTokenListRequest:interface": "Microsoft.Network.BastionShareableLinkTokenListRequest", + "@azure/arm-network!BastionActiveSessionListResult:interface": "Microsoft.Network.BastionActiveSessionListResult", + "@azure/arm-network!BastionActiveSession:interface": "Microsoft.Network.BastionActiveSession", + "@azure/arm-network!SessionIds:interface": "Microsoft.Network.SessionIds", + "@azure/arm-network!BastionSessionDeleteResult:interface": "Microsoft.Network.BastionSessionDeleteResult", + "@azure/arm-network!BastionSessionState:interface": "Microsoft.Network.BastionSessionState", + "@azure/arm-network!ExpressRouteProviderPort:interface": "Microsoft.Network.ExpressRouteProviderPort", + "@azure/arm-network!ExpressRouteProviderPortProperties:interface": "Microsoft.Network.ExpressRouteProviderPortProperties", + "@azure/arm-network!TrackedResourceWithOptionalLocation:interface": "Microsoft.Network.TrackedResourceWithOptionalLocation", + "@azure/arm-network!ActiveConfigurationParameter:interface": "Microsoft.Network.ActiveConfigurationParameter", + "@azure/arm-network!ActiveConnectivityConfigurationsListResult:interface": "Microsoft.Network.ActiveConnectivityConfigurationsListResult", + "@azure/arm-network!ActiveConnectivityConfiguration:interface": "Microsoft.Network.ActiveConnectivityConfiguration", + "@azure/arm-network!EffectiveConnectivityConfiguration:interface": "Microsoft.Network.EffectiveConnectivityConfiguration", + "@azure/arm-network!ConnectivityConfigurationProperties:interface": "Microsoft.Network.ConnectivityConfigurationProperties", + "@azure/arm-network!Hub:interface": "Microsoft.Network.Hub", + "@azure/arm-network!ConnectivityConfigurationPropertiesConnectivityCapabilities:interface": "Microsoft.Network.ConnectivityConfigurationPropertiesConnectivityCapabilities", + "@azure/arm-network!connectivityGroupItem:interface": "Microsoft.Network.ConnectivityGroupItem", + "@azure/arm-network!ConfigurationGroup:interface": "Microsoft.Network.ConfigurationGroup", + "@azure/arm-network!NetworkGroupProperties:interface": "Microsoft.Network.NetworkGroupProperties", + "@azure/arm-network!ActiveSecurityAdminRulesListResult:interface": "Microsoft.Network.ActiveSecurityAdminRulesListResult", + "@azure/arm-network!ActiveBaseSecurityAdminRule:interface": "Microsoft.Network.ActiveBaseSecurityAdminRule", + "@azure/arm-network!NetworkManagerSecurityGroupItem:interface": "Microsoft.Network.NetworkManagerSecurityGroupItem", + "@azure/arm-network!ActiveSecurityAdminRule:interface": "Microsoft.Network.ActiveSecurityAdminRule", + "@azure/arm-network!AdminPropertiesFormat:interface": "Microsoft.Network.AdminPropertiesFormat", + "@azure/arm-network!AddressPrefixItem:interface": "Microsoft.Network.AddressPrefixItem", + "@azure/arm-network!ActiveDefaultSecurityAdminRule:interface": "Microsoft.Network.ActiveDefaultSecurityAdminRule", + "@azure/arm-network!DefaultAdminPropertiesFormat:interface": "Microsoft.Network.DefaultAdminPropertiesFormat", + "@azure/arm-network!QueryRequestOptions:interface": "Microsoft.Network.QueryRequestOptions", + "@azure/arm-network!NetworkManagerEffectiveConnectivityConfigurationListResult:interface": "Microsoft.Network.NetworkManagerEffectiveConnectivityConfigurationListResult", + "@azure/arm-network!NetworkManagerEffectiveSecurityAdminRulesListResult:interface": "Microsoft.Network.NetworkManagerEffectiveSecurityAdminRulesListResult", + "@azure/arm-network!EffectiveBaseSecurityAdminRule:interface": "Microsoft.Network.EffectiveBaseSecurityAdminRule", + "@azure/arm-network!EffectiveSecurityAdminRule:interface": "Microsoft.Network.EffectiveSecurityAdminRule", + "@azure/arm-network!EffectiveDefaultSecurityAdminRule:interface": "Microsoft.Network.EffectiveDefaultSecurityAdminRule", + "@azure/arm-network!VirtualWanSecurityProviders:interface": "Microsoft.Network.VirtualWanSecurityProviders", + "@azure/arm-network!VirtualWanSecurityProvider:interface": "Microsoft.Network.VirtualWanSecurityProvider", + "@azure/arm-network!VirtualWanVpnProfileParameters:interface": "Microsoft.Network.VirtualWanVpnProfileParameters", + "@azure/arm-network!VpnProfileResponse:interface": "Microsoft.Network.VpnProfileResponse", + "@azure/arm-network!DnsNameAvailabilityResult:interface": "Microsoft.Network.DnsNameAvailabilityResult", + "@azure/arm-network!OperationListResult:interface": "Microsoft.Network.OperationListResult", + "@azure/arm-network!Operation:interface": "Microsoft.Network.Operation", + "@azure/arm-network!OperationDisplay:interface": "Microsoft.Network.OperationDisplay", + "@azure/arm-network!OperationPropertiesFormat:interface": "Microsoft.Network.OperationPropertiesFormat", + "@azure/arm-network!OperationPropertiesFormatServiceSpecification:interface": "Microsoft.Network.OperationPropertiesFormatServiceSpecification", + "@azure/arm-network!MetricSpecification:interface": "Microsoft.Network.MetricSpecification", + "@azure/arm-network!Availability:interface": "Microsoft.Network.Availability", + "@azure/arm-network!Dimension:interface": "Microsoft.Network.Dimension", + "@azure/arm-network!LogSpecification:interface": "Microsoft.Network.LogSpecification", + "@azure/arm-network!ApplicationGateway:interface": "Microsoft.Network.ApplicationGateway", + "@azure/arm-network!ApplicationGatewayPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayPropertiesFormat", + "@azure/arm-network!ApplicationGatewaySku:interface": "Microsoft.Network.ApplicationGatewaySku", + "@azure/arm-network!ApplicationGatewaySslPolicy:interface": "Microsoft.Network.ApplicationGatewaySslPolicy", + "@azure/arm-network!ApplicationGatewayIPConfiguration:interface": "Common.ApplicationGatewayIPConfiguration", + "@azure/arm-network!ApplicationGatewayIPConfigurationPropertiesFormat:interface": "Common.ApplicationGatewayIPConfigurationPropertiesFormat", + "@azure/arm-network!SubResource:interface": "Common.SubResource", + "@azure/arm-network!ApplicationGatewayAuthenticationCertificate:interface": "Microsoft.Network.ApplicationGatewayAuthenticationCertificate", + "@azure/arm-network!ApplicationGatewayAuthenticationCertificatePropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayAuthenticationCertificatePropertiesFormat", + "@azure/arm-network!ApplicationGatewayTrustedRootCertificate:interface": "Microsoft.Network.ApplicationGatewayTrustedRootCertificate", + "@azure/arm-network!ApplicationGatewayTrustedRootCertificatePropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayTrustedRootCertificatePropertiesFormat", + "@azure/arm-network!ApplicationGatewayTrustedClientCertificate:interface": "Microsoft.Network.ApplicationGatewayTrustedClientCertificate", + "@azure/arm-network!ApplicationGatewayTrustedClientCertificatePropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayTrustedClientCertificatePropertiesFormat", + "@azure/arm-network!ApplicationGatewaySslCertificate:interface": "Microsoft.Network.ApplicationGatewaySslCertificate", + "@azure/arm-network!ApplicationGatewaySslCertificatePropertiesFormat:interface": "Microsoft.Network.ApplicationGatewaySslCertificatePropertiesFormat", + "@azure/arm-network!ApplicationGatewayManagedHsm:interface": "Microsoft.Network.ApplicationGatewayManagedHsm", + "@azure/arm-network!ApplicationGatewayFrontendIPConfiguration:interface": "Microsoft.Network.ApplicationGatewayFrontendIPConfiguration", + "@azure/arm-network!ApplicationGatewayFrontendIPConfigurationPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayFrontendIPConfigurationPropertiesFormat", + "@azure/arm-network!ApplicationGatewayFrontendPort:interface": "Microsoft.Network.ApplicationGatewayFrontendPort", + "@azure/arm-network!ApplicationGatewayFrontendPortPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayFrontendPortPropertiesFormat", + "@azure/arm-network!ApplicationGatewayProbe:interface": "Microsoft.Network.ApplicationGatewayProbe", + "@azure/arm-network!ApplicationGatewayProbePropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayProbePropertiesFormat", + "@azure/arm-network!ApplicationGatewayProbeHealthResponseMatch:interface": "Microsoft.Network.ApplicationGatewayProbeHealthResponseMatch", + "@azure/arm-network!ApplicationGatewayBackendAddressPool:interface": "Common.ApplicationGatewayBackendAddressPool", + "@azure/arm-network!ApplicationGatewayBackendAddressPoolPropertiesFormat:interface": "Common.ApplicationGatewayBackendAddressPoolPropertiesFormat", + "@azure/arm-network!NetworkInterfaceIPConfiguration:interface": "Common.NetworkInterfaceIPConfiguration", + "@azure/arm-network!NetworkInterfaceIPConfigurationPropertiesFormat:interface": "Common.NetworkInterfaceIPConfigurationPropertiesFormat", + "@azure/arm-network!VirtualNetworkTap:interface": "Common.VirtualNetworkTap", + "@azure/arm-network!VirtualNetworkTapPropertiesFormat:interface": "Common.VirtualNetworkTapPropertiesFormat", + "@azure/arm-network!NetworkInterfaceTapConfiguration:interface": "Common.NetworkInterfaceTapConfiguration", + "@azure/arm-network!NetworkInterfaceTapConfigurationPropertiesFormat:interface": "Common.NetworkInterfaceTapConfigurationPropertiesFormat", + "@azure/arm-network!SubResourceModel:interface": "Common.SubResourceModel", + "@azure/arm-network!FrontendIPConfiguration:interface": "Common.FrontendIPConfiguration", + "@azure/arm-network!FrontendIPConfigurationPropertiesFormat:interface": "Common.FrontendIPConfigurationPropertiesFormat", + "@azure/arm-network!Subnet:interface": "Common.Subnet", + "@azure/arm-network!SubnetPropertiesFormat:interface": "Common.SubnetPropertiesFormat", + "@azure/arm-network!NetworkSecurityGroup:interface": "Common.NetworkSecurityGroup", + "@azure/arm-network!NetworkSecurityGroupPropertiesFormat:interface": "Common.NetworkSecurityGroupPropertiesFormat", + "@azure/arm-network!SecurityRule:interface": "Common.SecurityRule", + "@azure/arm-network!SecurityRulePropertiesFormat:interface": "Common.SecurityRulePropertiesFormat", + "@azure/arm-network!ApplicationSecurityGroup:interface": "Common.ApplicationSecurityGroup", + "@azure/arm-network!ApplicationSecurityGroupPropertiesFormat:interface": "Common.ApplicationSecurityGroupPropertiesFormat", + "@azure/arm-network!NetworkInterface:interface": "Common.NetworkInterface", + "@azure/arm-network!NetworkInterfacePropertiesFormat:interface": "Common.NetworkInterfacePropertiesFormat", + "@azure/arm-network!PrivateEndpoint:interface": "Common.PrivateEndpoint", + "@azure/arm-network!PrivateEndpointProperties:interface": "Common.PrivateEndpointProperties", + "@azure/arm-network!PrivateLinkServiceConnection:interface": "Common.PrivateLinkServiceConnection", + "@azure/arm-network!PrivateLinkServiceConnectionProperties:interface": "Common.PrivateLinkServiceConnectionProperties", + "@azure/arm-network!PrivateLinkServiceConnectionState:interface": "Common.PrivateLinkServiceConnectionState", + "@azure/arm-network!CustomDnsConfigPropertiesFormat:interface": "Common.CustomDnsConfigPropertiesFormat", + "@azure/arm-network!PrivateEndpointIPConfiguration:interface": "Common.PrivateEndpointIPConfiguration", + "@azure/arm-network!PrivateEndpointIPConfigurationProperties:interface": "Common.PrivateEndpointIPConfigurationProperties", + "@azure/arm-network!ExtendedLocation:interface": "Common.ExtendedLocation", + "@azure/arm-network!NetworkInterfaceDnsSettings:interface": "Common.NetworkInterfaceDnsSettings", + "@azure/arm-network!PrivateLinkService:interface": "Common.PrivateLinkService", + "@azure/arm-network!PrivateLinkServiceProperties:interface": "Common.PrivateLinkServiceProperties", + "@azure/arm-network!PrivateLinkServiceIpConfiguration:interface": "Common.PrivateLinkServiceIpConfiguration", + "@azure/arm-network!PrivateLinkServiceIpConfigurationProperties:interface": "Common.PrivateLinkServiceIpConfigurationProperties", + "@azure/arm-network!PrivateEndpointConnection:interface": "Common.PrivateEndpointConnection", + "@azure/arm-network!PrivateEndpointConnectionProperties:interface": "Common.PrivateEndpointConnectionProperties", + "@azure/arm-network!PrivateLinkServicePropertiesVisibility:interface": "Common.PrivateLinkServicePropertiesVisibility", + "@azure/arm-network!ResourceSet:interface": "Common.ResourceSet", + "@azure/arm-network!PrivateLinkServicePropertiesAutoApproval:interface": "Common.PrivateLinkServicePropertiesAutoApproval", + "@azure/arm-network!FlowLog:interface": "Common.FlowLog", + "@azure/arm-network!FlowLogPropertiesFormat:interface": "Common.FlowLogPropertiesFormat", + "@azure/arm-network!RetentionPolicyParameters:interface": "Common.RetentionPolicyParameters", + "@azure/arm-network!FlowLogFormatParameters:interface": "Common.FlowLogFormatParameters", + "@azure/arm-network!TrafficAnalyticsProperties:interface": "Common.TrafficAnalyticsProperties", + "@azure/arm-network!TrafficAnalyticsConfigurationProperties:interface": "Common.TrafficAnalyticsConfigurationProperties", + "@azure/arm-network!ManagedServiceIdentity:interface": "Common.ManagedServiceIdentity", + "@azure/arm-network!Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties:interface": "Common.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", + "@azure/arm-network!RouteTable:interface": "Common.RouteTable", + "@azure/arm-network!RouteTablePropertiesFormat:interface": "Common.RouteTablePropertiesFormat", + "@azure/arm-network!Route:interface": "Common.Route", + "@azure/arm-network!RoutePropertiesFormat:interface": "Common.RoutePropertiesFormat", + "@azure/arm-network!RouteNextHopEcmp:interface": "Common.RouteNextHopEcmp", + "@azure/arm-network!ServiceEndpointPropertiesFormat:interface": "Common.ServiceEndpointPropertiesFormat", + "@azure/arm-network!ServiceEndpointPolicy:interface": "Common.ServiceEndpointPolicy", + "@azure/arm-network!ServiceEndpointPolicyPropertiesFormat:interface": "Common.ServiceEndpointPolicyPropertiesFormat", + "@azure/arm-network!ServiceEndpointPolicyDefinition:interface": "Common.ServiceEndpointPolicyDefinition", + "@azure/arm-network!ServiceEndpointPolicyDefinitionPropertiesFormat:interface": "Common.ServiceEndpointPolicyDefinitionPropertiesFormat", + "@azure/arm-network!IPConfiguration:interface": "Common.IPConfiguration", + "@azure/arm-network!IPConfigurationPropertiesFormat:interface": "Common.IPConfigurationPropertiesFormat", + "@azure/arm-network!PublicIPAddress:interface": "Common.PublicIPAddress", + "@azure/arm-network!PublicIPAddressPropertiesFormat:interface": "Common.PublicIPAddressPropertiesFormat", + "@azure/arm-network!PublicIPAddressDnsSettings:interface": "Common.PublicIPAddressDnsSettings", + "@azure/arm-network!DdosSettings:interface": "Common.DdosSettings", + "@azure/arm-network!IpTag:interface": "Common.IpTag", + "@azure/arm-network!NatGateway:interface": "Common.NatGateway", + "@azure/arm-network!NatGatewayPropertiesFormat:interface": "Common.NatGatewayPropertiesFormat", + "@azure/arm-network!NatGatewaySku:interface": "Common.NatGatewaySku", + "@azure/arm-network!PublicIPAddressSku:interface": "Common.PublicIPAddressSku", + "@azure/arm-network!IPConfigurationProfile:interface": "Common.IPConfigurationProfile", + "@azure/arm-network!IPConfigurationProfilePropertiesFormat:interface": "Common.IPConfigurationProfilePropertiesFormat", + "@azure/arm-network!ResourceNavigationLink:interface": "Common.ResourceNavigationLink", + "@azure/arm-network!ResourceNavigationLinkFormat:interface": "Common.ResourceNavigationLinkFormat", + "@azure/arm-network!ServiceAssociationLink:interface": "Common.ServiceAssociationLink", + "@azure/arm-network!ServiceAssociationLinkPropertiesFormat:interface": "Common.ServiceAssociationLinkPropertiesFormat", + "@azure/arm-network!Delegation:interface": "Common.Delegation", + "@azure/arm-network!ServiceDelegationPropertiesFormat:interface": "Common.ServiceDelegationPropertiesFormat", + "@azure/arm-network!IpamPoolPrefixAllocation:interface": "Common.IpamPoolPrefixAllocation", + "@azure/arm-network!IpamPoolPrefixAllocationPool:interface": "Common.IpamPoolPrefixAllocationPool", + "@azure/arm-network!DdosFrontendIpConfigurationSettings:interface": "Common.DdosFrontendIpConfigurationSettings", + "@azure/arm-network!BackendAddressPool:interface": "Common.BackendAddressPool", + "@azure/arm-network!BackendAddressPoolPropertiesFormat:interface": "Common.BackendAddressPoolPropertiesFormat", + "@azure/arm-network!GatewayLoadBalancerTunnelInterface:interface": "Common.GatewayLoadBalancerTunnelInterface", + "@azure/arm-network!LoadBalancerBackendAddress:interface": "Common.LoadBalancerBackendAddress", + "@azure/arm-network!LoadBalancerBackendAddressPropertiesFormat:interface": "Common.LoadBalancerBackendAddressPropertiesFormat", + "@azure/arm-network!NatRulePortMapping:interface": "Common.NatRulePortMapping", + "@azure/arm-network!InboundNatRule:interface": "Common.InboundNatRule", + "@azure/arm-network!InboundNatRulePropertiesFormat:interface": "Common.InboundNatRulePropertiesFormat", + "@azure/arm-network!NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties:interface": "Common.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties", + "@azure/arm-network!ApplicationGatewayBackendAddress:interface": "Common.ApplicationGatewayBackendAddress", + "@azure/arm-network!ApplicationGatewayBackendHttpSettings:interface": "Microsoft.Network.ApplicationGatewayBackendHttpSettings", + "@azure/arm-network!ApplicationGatewayBackendHttpSettingsPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayBackendHttpSettingsPropertiesFormat", + "@azure/arm-network!ApplicationGatewayConnectionDraining:interface": "Microsoft.Network.ApplicationGatewayConnectionDraining", + "@azure/arm-network!ApplicationGatewayBackendSettings:interface": "Microsoft.Network.ApplicationGatewayBackendSettings", + "@azure/arm-network!ApplicationGatewayBackendSettingsPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayBackendSettingsPropertiesFormat", + "@azure/arm-network!ApplicationGatewayHttpListener:interface": "Microsoft.Network.ApplicationGatewayHttpListener", + "@azure/arm-network!ApplicationGatewayHttpListenerPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayHttpListenerPropertiesFormat", + "@azure/arm-network!ApplicationGatewayCustomError:interface": "Microsoft.Network.ApplicationGatewayCustomError", + "@azure/arm-network!ApplicationGatewayListener:interface": "Microsoft.Network.ApplicationGatewayListener", + "@azure/arm-network!ApplicationGatewayListenerPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayListenerPropertiesFormat", + "@azure/arm-network!ApplicationGatewaySslProfile:interface": "Microsoft.Network.ApplicationGatewaySslProfile", + "@azure/arm-network!ApplicationGatewaySslProfilePropertiesFormat:interface": "Microsoft.Network.ApplicationGatewaySslProfilePropertiesFormat", + "@azure/arm-network!ApplicationGatewayClientAuthConfiguration:interface": "Microsoft.Network.ApplicationGatewayClientAuthConfiguration", + "@azure/arm-network!ApplicationGatewayUrlPathMap:interface": "Microsoft.Network.ApplicationGatewayUrlPathMap", + "@azure/arm-network!ApplicationGatewayUrlPathMapPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayUrlPathMapPropertiesFormat", + "@azure/arm-network!ApplicationGatewayPathRule:interface": "Microsoft.Network.ApplicationGatewayPathRule", + "@azure/arm-network!ApplicationGatewayPathRulePropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayPathRulePropertiesFormat", + "@azure/arm-network!ApplicationGatewayRequestRoutingRule:interface": "Microsoft.Network.ApplicationGatewayRequestRoutingRule", + "@azure/arm-network!ApplicationGatewayRequestRoutingRulePropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayRequestRoutingRulePropertiesFormat", + "@azure/arm-network!ApplicationGatewayRoutingRule:interface": "Microsoft.Network.ApplicationGatewayRoutingRule", + "@azure/arm-network!ApplicationGatewayRoutingRulePropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayRoutingRulePropertiesFormat", + "@azure/arm-network!ApplicationGatewayRewriteRuleSet:interface": "Microsoft.Network.ApplicationGatewayRewriteRuleSet", + "@azure/arm-network!ApplicationGatewayRewriteRuleSetPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayRewriteRuleSetPropertiesFormat", + "@azure/arm-network!ApplicationGatewayRewriteRule:interface": "Microsoft.Network.ApplicationGatewayRewriteRule", + "@azure/arm-network!ApplicationGatewayRewriteRuleCondition:interface": "Microsoft.Network.ApplicationGatewayRewriteRuleCondition", + "@azure/arm-network!ApplicationGatewayRewriteRuleActionSet:interface": "Microsoft.Network.ApplicationGatewayRewriteRuleActionSet", + "@azure/arm-network!ApplicationGatewayHeaderConfiguration:interface": "Microsoft.Network.ApplicationGatewayHeaderConfiguration", + "@azure/arm-network!HeaderValueMatcher:interface": "Microsoft.Network.HeaderValueMatcher", + "@azure/arm-network!ApplicationGatewayUrlConfiguration:interface": "Microsoft.Network.ApplicationGatewayUrlConfiguration", + "@azure/arm-network!ApplicationGatewayRedirectConfiguration:interface": "Microsoft.Network.ApplicationGatewayRedirectConfiguration", + "@azure/arm-network!ApplicationGatewayRedirectConfigurationPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayRedirectConfigurationPropertiesFormat", + "@azure/arm-network!ApplicationGatewayWebApplicationFirewallConfiguration:interface": "Microsoft.Network.ApplicationGatewayWebApplicationFirewallConfiguration", + "@azure/arm-network!ApplicationGatewayFirewallDisabledRuleGroup:interface": "Microsoft.Network.ApplicationGatewayFirewallDisabledRuleGroup", + "@azure/arm-network!ApplicationGatewayFirewallExclusion:interface": "Microsoft.Network.ApplicationGatewayFirewallExclusion", + "@azure/arm-network!ApplicationGatewayAutoscaleConfiguration:interface": "Microsoft.Network.ApplicationGatewayAutoscaleConfiguration", + "@azure/arm-network!ApplicationGatewayPrivateLinkConfiguration:interface": "Microsoft.Network.ApplicationGatewayPrivateLinkConfiguration", + "@azure/arm-network!ApplicationGatewayPrivateLinkConfigurationProperties:interface": "Microsoft.Network.ApplicationGatewayPrivateLinkConfigurationProperties", + "@azure/arm-network!ApplicationGatewayPrivateLinkIpConfiguration:interface": "Microsoft.Network.ApplicationGatewayPrivateLinkIpConfiguration", + "@azure/arm-network!ApplicationGatewayPrivateLinkIpConfigurationProperties:interface": "Microsoft.Network.ApplicationGatewayPrivateLinkIpConfigurationProperties", + "@azure/arm-network!ApplicationGatewayPrivateEndpointConnection:interface": "Microsoft.Network.ApplicationGatewayPrivateEndpointConnection", + "@azure/arm-network!ApplicationGatewayPrivateEndpointConnectionProperties:interface": "Microsoft.Network.ApplicationGatewayPrivateEndpointConnectionProperties", + "@azure/arm-network!ApplicationGatewayLoadDistributionPolicy:interface": "Microsoft.Network.ApplicationGatewayLoadDistributionPolicy", + "@azure/arm-network!ApplicationGatewayLoadDistributionPolicyPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayLoadDistributionPolicyPropertiesFormat", + "@azure/arm-network!ApplicationGatewayLoadDistributionTarget:interface": "Microsoft.Network.ApplicationGatewayLoadDistributionTarget", + "@azure/arm-network!ApplicationGatewayLoadDistributionTargetPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayLoadDistributionTargetPropertiesFormat", + "@azure/arm-network!ApplicationGatewayEntraJWTValidationConfig:interface": "Microsoft.Network.ApplicationGatewayEntraJWTValidationConfig", + "@azure/arm-network!ApplicationGatewayEntraJWTValidationConfigPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayEntraJWTValidationConfigPropertiesFormat", + "@azure/arm-network!ApplicationGatewayGlobalConfiguration:interface": "Microsoft.Network.ApplicationGatewayGlobalConfiguration", + "@azure/arm-network!TagsObject:interface": "Microsoft.Network.TagsObject", + "@azure/arm-network!ApplicationGatewayListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ApplicationGatewayBackendHealth:interface": "Microsoft.Network.ApplicationGatewayBackendHealth", + "@azure/arm-network!ApplicationGatewayBackendHealthPool:interface": "Microsoft.Network.ApplicationGatewayBackendHealthPool", + "@azure/arm-network!ApplicationGatewayBackendHealthHttpSettings:interface": "Microsoft.Network.ApplicationGatewayBackendHealthHttpSettings", + "@azure/arm-network!ApplicationGatewayBackendHealthServer:interface": "Microsoft.Network.ApplicationGatewayBackendHealthServer", + "@azure/arm-network!ApplicationGatewayOnDemandProbe:interface": "Microsoft.Network.ApplicationGatewayOnDemandProbe", + "@azure/arm-network!ApplicationGatewayBackendHealthOnDemand:interface": "Microsoft.Network.ApplicationGatewayBackendHealthOnDemand", + "@azure/arm-network!ApplicationGatewayAvailableSslOptions:interface": "Microsoft.Network.ApplicationGatewayAvailableSslOptions", + "@azure/arm-network!ApplicationGatewayAvailableSslOptionsPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayAvailableSslOptionsPropertiesFormat", + "@azure/arm-network!ApplicationGatewayAvailableSslPredefinedPolicies:interface": "Microsoft.Network.ApplicationGatewayAvailableSslPredefinedPolicies", + "@azure/arm-network!ApplicationGatewaySslPredefinedPolicy:interface": "Microsoft.Network.ApplicationGatewaySslPredefinedPolicy", + "@azure/arm-network!ApplicationGatewaySslPredefinedPolicyPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewaySslPredefinedPolicyPropertiesFormat", + "@azure/arm-network!Error:interface": "Microsoft.Network.Error", + "@azure/arm-network!ErrorDetails:interface": "Microsoft.Network.ErrorDetails", + "@azure/arm-network!ApplicationGatewayAvailableWafRuleSetsResult:interface": "Microsoft.Network.ApplicationGatewayAvailableWafRuleSetsResult", + "@azure/arm-network!ApplicationGatewayFirewallRuleSet:interface": "Microsoft.Network.ApplicationGatewayFirewallRuleSet", + "@azure/arm-network!ApplicationGatewayFirewallRuleSetPropertiesFormat:interface": "Microsoft.Network.ApplicationGatewayFirewallRuleSetPropertiesFormat", + "@azure/arm-network!ApplicationGatewayFirewallRuleGroup:interface": "Microsoft.Network.ApplicationGatewayFirewallRuleGroup", + "@azure/arm-network!ApplicationGatewayFirewallRule:interface": "Microsoft.Network.ApplicationGatewayFirewallRule", + "@azure/arm-network!ApplicationGatewayPrivateEndpointConnectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ApplicationSecurityGroupListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!AzureFirewall:interface": "Microsoft.Network.AzureFirewall", + "@azure/arm-network!AzureFirewallPropertiesFormat:interface": "Microsoft.Network.AzureFirewallPropertiesFormat", + "@azure/arm-network!AzureFirewallApplicationRuleCollection:interface": "Microsoft.Network.AzureFirewallApplicationRuleCollection", + "@azure/arm-network!AzureFirewallApplicationRuleCollectionPropertiesFormat:interface": "Microsoft.Network.AzureFirewallApplicationRuleCollectionPropertiesFormat", + "@azure/arm-network!AzureFirewallRCAction:interface": "Microsoft.Network.AzureFirewallRCAction", + "@azure/arm-network!AzureFirewallApplicationRule:interface": "Microsoft.Network.AzureFirewallApplicationRule", + "@azure/arm-network!AzureFirewallApplicationRuleProtocol:interface": "Microsoft.Network.AzureFirewallApplicationRuleProtocol", + "@azure/arm-network!AzureFirewallNatRuleCollection:interface": "Microsoft.Network.AzureFirewallNatRuleCollection", + "@azure/arm-network!AzureFirewallNatRuleCollectionProperties:interface": "Microsoft.Network.AzureFirewallNatRuleCollectionProperties", + "@azure/arm-network!AzureFirewallNatRCAction:interface": "Microsoft.Network.AzureFirewallNatRCAction", + "@azure/arm-network!AzureFirewallNatRule:interface": "Microsoft.Network.AzureFirewallNatRule", + "@azure/arm-network!AzureFirewallNetworkRuleCollection:interface": "Microsoft.Network.AzureFirewallNetworkRuleCollection", + "@azure/arm-network!AzureFirewallNetworkRuleCollectionPropertiesFormat:interface": "Microsoft.Network.AzureFirewallNetworkRuleCollectionPropertiesFormat", + "@azure/arm-network!AzureFirewallNetworkRule:interface": "Microsoft.Network.AzureFirewallNetworkRule", + "@azure/arm-network!AzureFirewallIPConfiguration:interface": "Microsoft.Network.AzureFirewallIPConfiguration", + "@azure/arm-network!AzureFirewallIPConfigurationPropertiesFormat:interface": "Microsoft.Network.AzureFirewallIPConfigurationPropertiesFormat", + "@azure/arm-network!HubIPAddresses:interface": "Microsoft.Network.HubIPAddresses", + "@azure/arm-network!HubPublicIPAddresses:interface": "Microsoft.Network.HubPublicIPAddresses", + "@azure/arm-network!AzureFirewallPublicIPAddress:interface": "Microsoft.Network.AzureFirewallPublicIPAddress", + "@azure/arm-network!AzureFirewallIpGroups:interface": "Microsoft.Network.AzureFirewallIPGroups", + "@azure/arm-network!AzureFirewallSku:interface": "Microsoft.Network.AzureFirewallSku", + "@azure/arm-network!AzureFirewallAutoscaleConfiguration:interface": "Microsoft.Network.AzureFirewallAutoscaleConfiguration", + "@azure/arm-network!AfcConfiguration:interface": "Microsoft.Network.AfcConfiguration", + "@azure/arm-network!AzureFirewallListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!IPPrefixesList:interface": "Microsoft.Network.IPPrefixesList", + "@azure/arm-network!FirewallPacketCaptureParameters:interface": "Microsoft.Network.FirewallPacketCaptureParameters", + "@azure/arm-network!AzureFirewallPacketCaptureFlags:interface": "Microsoft.Network.AzureFirewallPacketCaptureFlags", + "@azure/arm-network!AzureFirewallPacketCaptureRule:interface": "Microsoft.Network.AzureFirewallPacketCaptureRule", + "@azure/arm-network!AzureFirewallPacketCaptureResponse:interface": "Microsoft.Network.AzureFirewallPacketCaptureResponse", + "@azure/arm-network!BastionHost:interface": "Microsoft.Network.BastionHost", + "@azure/arm-network!BastionHostPropertiesFormat:interface": "Microsoft.Network.BastionHostPropertiesFormat", + "@azure/arm-network!BastionHostIPConfiguration:interface": "Microsoft.Network.BastionHostIPConfiguration", + "@azure/arm-network!BastionHostIPConfigurationPropertiesFormat:interface": "Microsoft.Network.BastionHostIPConfigurationPropertiesFormat", + "@azure/arm-network!BastionHostPropertiesFormatNetworkAcls:interface": "Microsoft.Network.BastionHostPropertiesFormatNetworkAcls", + "@azure/arm-network!IPRule:interface": "Microsoft.Network.IPRule", + "@azure/arm-network!Sku:interface": "Microsoft.Network.Sku", + "@azure/arm-network!BastionHostListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NetworkInterfaceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!EffectiveRouteListResult:interface": "Microsoft.Network.EffectiveRouteListResult", + "@azure/arm-network!EffectiveRoute:interface": "Microsoft.Network.EffectiveRoute", + "@azure/arm-network!EffectiveNetworkSecurityGroupListResult:interface": "Microsoft.Network.EffectiveNetworkSecurityGroupListResult", + "@azure/arm-network!EffectiveNetworkSecurityGroup:interface": "Microsoft.Network.EffectiveNetworkSecurityGroup", + "@azure/arm-network!EffectiveNetworkSecurityGroupAssociation:interface": "Microsoft.Network.EffectiveNetworkSecurityGroupAssociation", + "@azure/arm-network!EffectiveNetworkSecurityRule:interface": "Microsoft.Network.EffectiveNetworkSecurityRule", + "@azure/arm-network!NetworkInterfaceIPConfigurationListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!PublicIPAddressListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!PublicIpDdosProtectionStatusResult:interface": "Microsoft.Network.PublicIpDdosProtectionStatusResult", + "@azure/arm-network!ReserveCloudServicePublicIpAddressRequest:interface": "Microsoft.Network.ReserveCloudServicePublicIpAddressRequest", + "@azure/arm-network!DisassociateCloudServicePublicIpRequest:interface": "Microsoft.Network.DisassociateCloudServicePublicIpRequest", + "@azure/arm-network!DdosCustomPolicy:interface": "Microsoft.Network.DdosCustomPolicy", + "@azure/arm-network!DdosCustomPolicyPropertiesFormat:interface": "Microsoft.Network.DdosCustomPolicyPropertiesFormat", + "@azure/arm-network!DdosDetectionRule:interface": "Microsoft.Network.DdosDetectionRule", + "@azure/arm-network!DdosDetectionRulePropertiesFormat:interface": "Microsoft.Network.DdosDetectionRulePropertiesFormat", + "@azure/arm-network!TrafficDetectionRule:interface": "Microsoft.Network.TrafficDetectionRule", + "@azure/arm-network!DdosCustomPolicyListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!DdosProtectionPlan:interface": "Microsoft.Network.DdosProtectionPlan", + "@azure/arm-network!DdosProtectionPlanPropertiesFormat:interface": "Microsoft.Network.DdosProtectionPlanPropertiesFormat", + "@azure/arm-network!DdosProtectionPlanListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ExpressRouteCircuitAuthorization:interface": "Microsoft.Network.ExpressRouteCircuitAuthorization", + "@azure/arm-network!AuthorizationPropertiesFormat:interface": "Microsoft.Network.AuthorizationPropertiesFormat", + "@azure/arm-network!AuthorizationListResult:interface": "Microsoft.Network.AuthorizationListResult", + "@azure/arm-network!ExpressRouteCircuit:interface": "Microsoft.Network.ExpressRouteCircuit", + "@azure/arm-network!ExpressRouteCircuitPropertiesFormat:interface": "Microsoft.Network.ExpressRouteCircuitPropertiesFormat", + "@azure/arm-network!ExpressRouteCircuitPeering:interface": "Microsoft.Network.ExpressRouteCircuitPeering", + "@azure/arm-network!ExpressRouteCircuitPeeringPropertiesFormat:interface": "Microsoft.Network.ExpressRouteCircuitPeeringPropertiesFormat", + "@azure/arm-network!ExpressRouteCircuitPeeringConfig:interface": "Microsoft.Network.ExpressRouteCircuitPeeringConfig", + "@azure/arm-network!AdvertisedPublicPrefixProperties:interface": "Microsoft.Network.AdvertisedPublicPrefixProperties", + "@azure/arm-network!ExpressRouteCircuitStats:interface": "Microsoft.Network.ExpressRouteCircuitStats", + "@azure/arm-network!Ipv6ExpressRouteCircuitPeeringConfig:interface": "Microsoft.Network.Ipv6ExpressRouteCircuitPeeringConfig", + "@azure/arm-network!ExpressRouteConnectionId:interface": "Microsoft.Network.ExpressRouteConnectionId", + "@azure/arm-network!ExpressRouteCircuitConnection:interface": "Microsoft.Network.ExpressRouteCircuitConnection", + "@azure/arm-network!ExpressRouteCircuitConnectionPropertiesFormat:interface": "Microsoft.Network.ExpressRouteCircuitConnectionPropertiesFormat", + "@azure/arm-network!Ipv6CircuitConnectionConfig:interface": "Microsoft.Network.Ipv6CircuitConnectionConfig", + "@azure/arm-network!PeerExpressRouteCircuitConnection:interface": "Microsoft.Network.PeerExpressRouteCircuitConnection", + "@azure/arm-network!PeerExpressRouteCircuitConnectionPropertiesFormat:interface": "Microsoft.Network.PeerExpressRouteCircuitConnectionPropertiesFormat", + "@azure/arm-network!ExpressRouteCircuitServiceProviderProperties:interface": "Microsoft.Network.ExpressRouteCircuitServiceProviderProperties", + "@azure/arm-network!ExpressRouteCircuitSku:interface": "Microsoft.Network.ExpressRouteCircuitSku", + "@azure/arm-network!ExpressRouteCircuitListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ExpressRouteLinkFailoverAllTestsDetails:interface": "Microsoft.Network.ExpressRouteLinkFailoverAllTestsDetails", + "@azure/arm-network!ExpressRouteLinkFailoverTestBgpStatus:interface": "Microsoft.Network.ExpressRouteLinkFailoverTestBgpStatus", + "@azure/arm-network!ExpressRouteLinkFailoverSingleTestDetails:interface": "Microsoft.Network.ExpressRouteLinkFailoverSingleTestDetails", + "@azure/arm-network!ExpressRouteLinkFailoverRouteList:interface": "Microsoft.Network.ExpressRouteLinkFailoverRouteList", + "@azure/arm-network!ExpressRouteLinkFailoverRoute:interface": "Microsoft.Network.ExpressRouteLinkFailoverRoute", + "@azure/arm-network!ExpressRouteLinkFailoverStopApiParameters:interface": "Microsoft.Network.ExpressRouteLinkFailoverStopApiParameters", + "@azure/arm-network!StopCircuitLinkFailoverTestParameterBody:interface": "Microsoft.Network.stopCircuitLinkFailoverTest.Parameter.body.anonymous", + "@azure/arm-network!ExpressRouteCircuitsArpTableListResult:interface": "Microsoft.Network.ExpressRouteCircuitsArpTableListResult", + "@azure/arm-network!ExpressRouteCircuitArpTable:interface": "Microsoft.Network.ExpressRouteCircuitArpTable", + "@azure/arm-network!ExpressRouteCircuitsRoutesTableListResult:interface": "Microsoft.Network.ExpressRouteCircuitsRoutesTableListResult", + "@azure/arm-network!ExpressRouteCircuitRoutesTable:interface": "Microsoft.Network.ExpressRouteCircuitRoutesTable", + "@azure/arm-network!ExpressRouteCircuitsRoutesTableSummaryListResult:interface": "Microsoft.Network.ExpressRouteCircuitsRoutesTableSummaryListResult", + "@azure/arm-network!ExpressRouteCircuitRoutesTableSummary:interface": "Microsoft.Network.ExpressRouteCircuitRoutesTableSummary", + "@azure/arm-network!ExpressRouteCircuitPeeringListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ExpressRouteCircuitConnectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!PeerExpressRouteCircuitConnectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ExpressRouteCrossConnection:interface": "Microsoft.Network.ExpressRouteCrossConnection", + "@azure/arm-network!ExpressRouteCrossConnectionProperties:interface": "Microsoft.Network.ExpressRouteCrossConnectionProperties", + "@azure/arm-network!ExpressRouteCircuitReference:interface": "Microsoft.Network.ExpressRouteCircuitReference", + "@azure/arm-network!ExpressRouteCrossConnectionPeering:interface": "Microsoft.Network.ExpressRouteCrossConnectionPeering", + "@azure/arm-network!ExpressRouteCrossConnectionPeeringProperties:interface": "Microsoft.Network.ExpressRouteCrossConnectionPeeringProperties", + "@azure/arm-network!ExpressRouteCrossConnectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ExpressRouteCrossConnectionsRoutesTableSummaryListResult:interface": "Microsoft.Network.ExpressRouteCrossConnectionsRoutesTableSummaryListResult", + "@azure/arm-network!ExpressRouteCrossConnectionRoutesTableSummary:interface": "Microsoft.Network.ExpressRouteCrossConnectionRoutesTableSummary", + "@azure/arm-network!ExpressRoutePortsLocation:interface": "Microsoft.Network.ExpressRoutePortsLocation", + "@azure/arm-network!ExpressRoutePortsLocationPropertiesFormat:interface": "Microsoft.Network.ExpressRoutePortsLocationPropertiesFormat", + "@azure/arm-network!ExpressRoutePortsLocationBandwidths:interface": "Microsoft.Network.ExpressRoutePortsLocationBandwidths", + "@azure/arm-network!ExpressRoutePortsLocationListResult:interface": "Microsoft.Network.ExpressRoutePortsLocationListResult", + "@azure/arm-network!ExpressRoutePort:interface": "Microsoft.Network.ExpressRoutePort", + "@azure/arm-network!ExpressRoutePortPropertiesFormat:interface": "Microsoft.Network.ExpressRoutePortPropertiesFormat", + "@azure/arm-network!ExpressRouteLink:interface": "Microsoft.Network.ExpressRouteLink", + "@azure/arm-network!ExpressRouteLinkPropertiesFormat:interface": "Microsoft.Network.ExpressRouteLinkPropertiesFormat", + "@azure/arm-network!ExpressRouteLinkMacSecConfig:interface": "Microsoft.Network.ExpressRouteLinkMacSecConfig", + "@azure/arm-network!ExpressRoutePortListResult:interface": "Microsoft.Network.ExpressRoutePortListResult", + "@azure/arm-network!GenerateExpressRoutePortsLOARequest:interface": "Microsoft.Network.GenerateExpressRoutePortsLOARequest", + "@azure/arm-network!GenerateExpressRoutePortsLOAResult:interface": "Microsoft.Network.GenerateExpressRoutePortsLOAResult", + "@azure/arm-network!ExpressRoutePortAuthorization:interface": "Microsoft.Network.ExpressRoutePortAuthorization", + "@azure/arm-network!ExpressRoutePortAuthorizationPropertiesFormat:interface": "Microsoft.Network.ExpressRoutePortAuthorizationPropertiesFormat", + "@azure/arm-network!ExpressRoutePortAuthorizationListResult:interface": "Microsoft.Network.ExpressRoutePortAuthorizationListResult", + "@azure/arm-network!FirewallPolicy:interface": "Microsoft.Network.FirewallPolicy", + "@azure/arm-network!FirewallPolicyPropertiesFormat:interface": "Microsoft.Network.FirewallPolicyPropertiesFormat", + "@azure/arm-network!FirewallPolicyThreatIntelWhitelist:interface": "Microsoft.Network.FirewallPolicyThreatIntelWhitelist", + "@azure/arm-network!FirewallPolicyInsights:interface": "Microsoft.Network.FirewallPolicyInsights", + "@azure/arm-network!FirewallPolicyLogAnalyticsResources:interface": "Microsoft.Network.FirewallPolicyLogAnalyticsResources", + "@azure/arm-network!FirewallPolicyLogAnalyticsWorkspace:interface": "Microsoft.Network.FirewallPolicyLogAnalyticsWorkspace", + "@azure/arm-network!FirewallPolicySNAT:interface": "Microsoft.Network.FirewallPolicySnat", + "@azure/arm-network!FirewallPolicySQL:interface": "Microsoft.Network.FirewallPolicySQL", + "@azure/arm-network!DnsSettings:interface": "Microsoft.Network.DnsSettings", + "@azure/arm-network!ExplicitProxy:interface": "Microsoft.Network.ExplicitProxy", + "@azure/arm-network!FirewallPolicyIntrusionDetection:interface": "Microsoft.Network.FirewallPolicyIntrusionDetection", + "@azure/arm-network!FirewallPolicyIntrusionDetectionConfiguration:interface": "Microsoft.Network.FirewallPolicyIntrusionDetectionConfiguration", + "@azure/arm-network!FirewallPolicyIntrusionDetectionSignatureSpecification:interface": "Microsoft.Network.FirewallPolicyIntrusionDetectionSignatureSpecification", + "@azure/arm-network!FirewallPolicyIntrusionDetectionBypassTrafficSpecifications:interface": "Microsoft.Network.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications", + "@azure/arm-network!FirewallPolicyTransportSecurity:interface": "Microsoft.Network.FirewallPolicyTransportSecurity", + "@azure/arm-network!FirewallPolicyCertificateAuthority:interface": "Microsoft.Network.FirewallPolicyCertificateAuthority", + "@azure/arm-network!FirewallPolicySku:interface": "Microsoft.Network.FirewallPolicySku", + "@azure/arm-network!FirewallPolicyListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!FirewallPolicyRuleCollectionGroup:interface": "Microsoft.Network.FirewallPolicyRuleCollectionGroup", + "@azure/arm-network!FirewallPolicyRuleCollectionGroupProperties:interface": "Microsoft.Network.FirewallPolicyRuleCollectionGroupProperties", + "@azure/arm-network!FirewallPolicyRuleCollection:interface": "Microsoft.Network.FirewallPolicyRuleCollection", + "@azure/arm-network!FirewallPolicyNatRuleCollection:interface": "Microsoft.Network.FirewallPolicyNatRuleCollection", + "@azure/arm-network!FirewallPolicyNatRuleCollectionAction:interface": "Microsoft.Network.FirewallPolicyNatRuleCollectionAction", + "@azure/arm-network!FirewallPolicyRule:interface": "Microsoft.Network.FirewallPolicyRule", + "@azure/arm-network!ApplicationRule:interface": "Microsoft.Network.ApplicationRule", + "@azure/arm-network!FirewallPolicyRuleApplicationProtocol:interface": "Microsoft.Network.FirewallPolicyRuleApplicationProtocol", + "@azure/arm-network!FirewallPolicyHttpHeaderToInsert:interface": "Microsoft.Network.FirewallPolicyHttpHeaderToInsert", + "@azure/arm-network!NatRule:interface": "Microsoft.Network.NatRule", + "@azure/arm-network!NetworkRule:interface": "Microsoft.Network.NetworkRule", + "@azure/arm-network!FirewallPolicyFilterRuleCollection:interface": "Microsoft.Network.FirewallPolicyFilterRuleCollection", + "@azure/arm-network!FirewallPolicyFilterRuleCollectionAction:interface": "Microsoft.Network.FirewallPolicyFilterRuleCollectionAction", + "@azure/arm-network!FirewallPolicyRuleCollectionGroupListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!SignaturesOverrides:interface": "Microsoft.Network.SignaturesOverrides", + "@azure/arm-network!SignaturesOverridesProperties:interface": "Microsoft.Network.SignaturesOverridesProperties", + "@azure/arm-network!WritableResource:interface": "Microsoft.Network.WritableResource", + "@azure/arm-network!SignaturesOverridesList:interface": "Microsoft.Network.SignaturesOverridesList", + "@azure/arm-network!FirewallPolicyDraft:interface": "Microsoft.Network.FirewallPolicyDraft", + "@azure/arm-network!FirewallPolicyDraftProperties:interface": "Microsoft.Network.FirewallPolicyDraftProperties", + "@azure/arm-network!FirewallPolicyRuleCollectionGroupDraft:interface": "Microsoft.Network.FirewallPolicyRuleCollectionGroupDraft", + "@azure/arm-network!FirewallPolicyRuleCollectionGroupDraftProperties:interface": "Microsoft.Network.FirewallPolicyRuleCollectionGroupDraftProperties", + "@azure/arm-network!IpamPool:interface": "Microsoft.Network.IpamPool", + "@azure/arm-network!IpamPoolProperties:interface": "Microsoft.Network.IpamPoolProperties", + "@azure/arm-network!CommonTrackedResource:interface": "Microsoft.Network.CommonTrackedResource", + "@azure/arm-network!CommonResource:interface": "Microsoft.Network.CommonResource", + "@azure/arm-network!SystemData:interface": "Azure.ResourceManager.CommonTypes.SystemData", + "@azure/arm-network!CommonErrorResponse:interface": "Microsoft.Network.CommonErrorResponse", + "@azure/arm-network!CommonErrorDetail:interface": "Microsoft.Network.CommonErrorDetail", + "@azure/arm-network!CommonErrorAdditionalInfo:interface": "Microsoft.Network.CommonErrorAdditionalInfo", + "@azure/arm-network!IpamPoolUpdate:interface": "Microsoft.Network.IpamPoolUpdate", + "@azure/arm-network!IpamPoolUpdateProperties:interface": "Microsoft.Network.IpamPoolUpdateProperties", + "@azure/arm-network!IpamPoolList:interface": "Microsoft.Network.IpamPoolList", + "@azure/arm-network!PoolUsage:interface": "Microsoft.Network.PoolUsage", + "@azure/arm-network!ResourceBasics:interface": "Microsoft.Network.ResourceBasics", + "@azure/arm-network!PoolAssociationList:interface": "Microsoft.Network.PoolAssociationList", + "@azure/arm-network!PoolAssociation:interface": "Microsoft.Network.PoolAssociation", + "@azure/arm-network!NetworkManager:interface": "Microsoft.Network.NetworkManager", + "@azure/arm-network!NetworkManagerProperties:interface": "Microsoft.Network.NetworkManagerProperties", + "@azure/arm-network!NetworkManagerPropertiesNetworkManagerScopes:interface": "Microsoft.Network.NetworkManagerPropertiesNetworkManagerScopes", + "@azure/arm-network!CrossTenantScopes:interface": "Microsoft.Network.CrossTenantScopes", + "@azure/arm-network!PatchObject:interface": "Microsoft.Network.PatchObject", + "@azure/arm-network!NetworkManagerListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!StaticCidr:interface": "Microsoft.Network.StaticCidr", + "@azure/arm-network!StaticCidrProperties:interface": "Microsoft.Network.StaticCidrProperties", + "@azure/arm-network!CommonProxyResource:interface": "Microsoft.Network.CommonProxyResource", + "@azure/arm-network!StaticCidrList:interface": "Microsoft.Network.StaticCidrList", + "@azure/arm-network!IpAllocation:interface": "Microsoft.Network.IpAllocation", + "@azure/arm-network!IpAllocationPropertiesFormat:interface": "Microsoft.Network.IpAllocationPropertiesFormat", + "@azure/arm-network!IpAllocationListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!IpGroup:interface": "Microsoft.Network.IpGroup", + "@azure/arm-network!IpGroupPropertiesFormat:interface": "Microsoft.Network.IpGroupPropertiesFormat", + "@azure/arm-network!IpGroupListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!LoadBalancer:interface": "Common.LoadBalancer", + "@azure/arm-network!LoadBalancerPropertiesFormat:interface": "Common.LoadBalancerPropertiesFormat", + "@azure/arm-network!LoadBalancingRule:interface": "Common.LoadBalancingRule", + "@azure/arm-network!LoadBalancingRulePropertiesFormat:interface": "Common.LoadBalancingRulePropertiesFormat", + "@azure/arm-network!Probe:interface": "Common.Probe", + "@azure/arm-network!ProbePropertiesFormat:interface": "Common.ProbePropertiesFormat", + "@azure/arm-network!InboundNatPool:interface": "Common.InboundNatPool", + "@azure/arm-network!InboundNatPoolPropertiesFormat:interface": "Common.InboundNatPoolPropertiesFormat", + "@azure/arm-network!OutboundRule:interface": "Common.OutboundRule", + "@azure/arm-network!OutboundRulePropertiesFormat:interface": "Common.OutboundRulePropertiesFormat", + "@azure/arm-network!LoadBalancerSku:interface": "Common.LoadBalancerSku", + "@azure/arm-network!LoadBalancerListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!MigrateLoadBalancerToIpBasedRequest:interface": "Microsoft.Network.MigrateLoadBalancerToIpBasedRequest", + "@azure/arm-network!MigratedPools:interface": "Microsoft.Network.MigratedPools", + "@azure/arm-network!QueryInboundNatRulePortMappingRequest:interface": "Microsoft.Network.QueryInboundNatRulePortMappingRequest", + "@azure/arm-network!BackendAddressInboundNatRulePortMappings:interface": "Microsoft.Network.BackendAddressInboundNatRulePortMappings", + "@azure/arm-network!InboundNatRulePortMapping:interface": "Microsoft.Network.InboundNatRulePortMapping", + "@azure/arm-network!LoadBalancerVipSwapRequest:interface": "Microsoft.Network.LoadBalancerVipSwapRequest", + "@azure/arm-network!LoadBalancerVipSwapRequestFrontendIPConfiguration:interface": "Microsoft.Network.LoadBalancerVipSwapRequestFrontendIPConfiguration", + "@azure/arm-network!LoadBalancerVipSwapRequestFrontendIPConfigurationProperties:interface": "Microsoft.Network.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties", + "@azure/arm-network!InboundNatRuleListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NatGatewayListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NetworkInterfaceTapConfigurationListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NetworkManagerConnection:interface": "Microsoft.Network.NetworkManagerConnection", + "@azure/arm-network!NetworkManagerConnectionProperties:interface": "Microsoft.Network.NetworkManagerConnectionProperties", + "@azure/arm-network!ChildResource:interface": "Microsoft.Network.ChildResource", + "@azure/arm-network!NetworkManagerConnectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ConnectivityConfiguration:interface": "Microsoft.Network.ConnectivityConfiguration", + "@azure/arm-network!ConnectivityConfigurationListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NetworkGroup:interface": "Microsoft.Network.NetworkGroup", + "@azure/arm-network!NetworkGroupListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!StaticMember:interface": "Microsoft.Network.StaticMember", + "@azure/arm-network!StaticMemberProperties:interface": "Microsoft.Network.StaticMemberProperties", + "@azure/arm-network!StaticMemberListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NetworkManagerRoutingConfiguration:interface": "Microsoft.Network.NetworkManagerRoutingConfiguration", + "@azure/arm-network!NetworkManagerRoutingConfigurationPropertiesFormat:interface": "Microsoft.Network.NetworkManagerRoutingConfigurationPropertiesFormat", + "@azure/arm-network!NetworkManagerRoutingConfigurationListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!RoutingRuleCollection:interface": "Microsoft.Network.RoutingRuleCollection", + "@azure/arm-network!RoutingRuleCollectionPropertiesFormat:interface": "Microsoft.Network.RoutingRuleCollectionPropertiesFormat", + "@azure/arm-network!NetworkManagerRoutingGroupItem:interface": "Microsoft.Network.NetworkManagerRoutingGroupItem", + "@azure/arm-network!RoutingRuleCollectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!RoutingRule:interface": "Microsoft.Network.RoutingRule", + "@azure/arm-network!RoutingRulePropertiesFormat:interface": "Microsoft.Network.RoutingRulePropertiesFormat", + "@azure/arm-network!RoutingRuleRouteDestination:interface": "Microsoft.Network.RoutingRuleRouteDestination", + "@azure/arm-network!RoutingRuleNextHop:interface": "Microsoft.Network.RoutingRuleNextHop", + "@azure/arm-network!RoutingRuleListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ScopeConnection:interface": "Microsoft.Network.ScopeConnection", + "@azure/arm-network!ScopeConnectionProperties:interface": "Microsoft.Network.ScopeConnectionProperties", + "@azure/arm-network!ScopeConnectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!Commit:interface": "Microsoft.Network.Commit", + "@azure/arm-network!CommitProperties:interface": "Microsoft.Network.CommitProperties", + "@azure/arm-network!CommitListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!SecurityAdminConfiguration:interface": "Microsoft.Network.SecurityAdminConfiguration", + "@azure/arm-network!SecurityAdminConfigurationPropertiesFormat:interface": "Microsoft.Network.SecurityAdminConfigurationPropertiesFormat", + "@azure/arm-network!SecurityAdminConfigurationListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!AdminRuleCollection:interface": "Microsoft.Network.AdminRuleCollection", + "@azure/arm-network!AdminRuleCollectionPropertiesFormat:interface": "Microsoft.Network.AdminRuleCollectionPropertiesFormat", + "@azure/arm-network!AdminRuleCollectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!SecurityUserConfiguration:interface": "Microsoft.Network.SecurityUserConfiguration", + "@azure/arm-network!SecurityUserConfigurationPropertiesFormat:interface": "Microsoft.Network.SecurityUserConfigurationPropertiesFormat", + "@azure/arm-network!SecurityUserConfigurationListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!SecurityUserRuleCollection:interface": "Microsoft.Network.SecurityUserRuleCollection", + "@azure/arm-network!SecurityUserRuleCollectionPropertiesFormat:interface": "Microsoft.Network.SecurityUserRuleCollectionPropertiesFormat", + "@azure/arm-network!SecurityUserGroupItem:interface": "Microsoft.Network.SecurityUserGroupItem", + "@azure/arm-network!SecurityUserRuleCollectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!SecurityUserRule:interface": "Microsoft.Network.SecurityUserRule", + "@azure/arm-network!SecurityUserRulePropertiesFormat:interface": "Microsoft.Network.SecurityUserRulePropertiesFormat", + "@azure/arm-network!SecurityUserRuleListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NetworkProfile:interface": "Microsoft.Network.NetworkProfile", + "@azure/arm-network!NetworkProfilePropertiesFormat:interface": "Microsoft.Network.NetworkProfilePropertiesFormat", + "@azure/arm-network!ContainerNetworkInterface:interface": "Microsoft.Network.ContainerNetworkInterface", + "@azure/arm-network!ContainerNetworkInterfacePropertiesFormat:interface": "Microsoft.Network.ContainerNetworkInterfacePropertiesFormat", + "@azure/arm-network!ContainerNetworkInterfaceConfiguration:interface": "Microsoft.Network.ContainerNetworkInterfaceConfiguration", + "@azure/arm-network!ContainerNetworkInterfaceConfigurationPropertiesFormat:interface": "Microsoft.Network.ContainerNetworkInterfaceConfigurationPropertiesFormat", + "@azure/arm-network!Container:interface": "Microsoft.Network.Container", + "@azure/arm-network!ContainerNetworkInterfaceIpConfiguration:interface": "Microsoft.Network.ContainerNetworkInterfaceIpConfiguration", + "@azure/arm-network!ContainerNetworkInterfaceIpConfigurationPropertiesFormat:interface": "Microsoft.Network.ContainerNetworkInterfaceIpConfigurationPropertiesFormat", + "@azure/arm-network!NetworkProfileListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NetworkSecurityGroupListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!SecurityRuleListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NetworkSecurityPerimeter:interface": "Microsoft.Network.NetworkSecurityPerimeter", + "@azure/arm-network!NetworkSecurityPerimeterProperties:interface": "Microsoft.Network.NetworkSecurityPerimeterProperties", + "@azure/arm-network!SecurityPerimeterTrackedResource:interface": "Microsoft.Network.SecurityPerimeterTrackedResource", + "@azure/arm-network!SecurityPerimeterResource:interface": "Microsoft.Network.SecurityPerimeterResource", + "@azure/arm-network!SecurityPerimeterSystemData:interface": "Microsoft.Network.SecurityPerimeterSystemData", + "@azure/arm-network!UpdateTagsRequest:interface": "Microsoft.Network.UpdateTagsRequest", + "@azure/arm-network!NetworkSecurityPerimeterListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ReachabilityAnalysisIntent:interface": "Microsoft.Network.ReachabilityAnalysisIntent", + "@azure/arm-network!ReachabilityAnalysisIntentProperties:interface": "Microsoft.Network.ReachabilityAnalysisIntentProperties", + "@azure/arm-network!IPTraffic:interface": "Microsoft.Network.IPTraffic", + "@azure/arm-network!ReachabilityAnalysisIntentListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!VerifierWorkspace:interface": "Microsoft.Network.VerifierWorkspace", + "@azure/arm-network!VerifierWorkspaceProperties:interface": "Microsoft.Network.VerifierWorkspaceProperties", + "@azure/arm-network!VerifierWorkspaceUpdate:interface": "Microsoft.Network.VerifierWorkspaceUpdate", + "@azure/arm-network!VerifierWorkspaceUpdateProperties:interface": "Microsoft.Network.VerifierWorkspaceUpdateProperties", + "@azure/arm-network!VerifierWorkspaceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ReachabilityAnalysisRun:interface": "Microsoft.Network.ReachabilityAnalysisRun", + "@azure/arm-network!ReachabilityAnalysisRunProperties:interface": "Microsoft.Network.ReachabilityAnalysisRunProperties", + "@azure/arm-network!IntentContent:interface": "Microsoft.Network.IntentContent", + "@azure/arm-network!ReachabilityAnalysisRunListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NetworkVirtualApplianceConnection:interface": "Microsoft.Network.NetworkVirtualApplianceConnection", + "@azure/arm-network!NetworkVirtualApplianceConnectionProperties:interface": "Microsoft.Network.NetworkVirtualApplianceConnectionProperties", + "@azure/arm-network!RoutingConfiguration:interface": "Microsoft.Network.RoutingConfiguration", + "@azure/arm-network!PropagatedRouteTable:interface": "Microsoft.Network.PropagatedRouteTable", + "@azure/arm-network!VnetRoute:interface": "Microsoft.Network.VnetRoute", + "@azure/arm-network!StaticRoutesConfig:interface": "Microsoft.Network.StaticRoutesConfig", + "@azure/arm-network!StaticRoute:interface": "Microsoft.Network.StaticRoute", + "@azure/arm-network!NetworkVirtualApplianceConnectionList:interface": "Microsoft.Network.NetworkVirtualApplianceConnectionList", + "@azure/arm-network!NetworkVirtualAppliance:interface": "Microsoft.Network.NetworkVirtualAppliance", + "@azure/arm-network!NetworkVirtualAppliancePropertiesFormat:interface": "Microsoft.Network.NetworkVirtualAppliancePropertiesFormat", + "@azure/arm-network!VirtualApplianceSkuProperties:interface": "Microsoft.Network.VirtualApplianceSkuProperties", + "@azure/arm-network!VirtualApplianceNicProperties:interface": "Microsoft.Network.VirtualApplianceNicProperties", + "@azure/arm-network!NetworkVirtualAppliancePropertiesFormatNetworkProfile:interface": "Microsoft.Network.NetworkVirtualAppliancePropertiesFormatNetworkProfile", + "@azure/arm-network!VirtualApplianceNetworkInterfaceConfiguration:interface": "Microsoft.Network.VirtualApplianceNetworkInterfaceConfiguration", + "@azure/arm-network!VirtualApplianceNetworkInterfaceConfigurationProperties:interface": "Microsoft.Network.VirtualApplianceNetworkInterfaceConfigurationProperties", + "@azure/arm-network!VirtualApplianceIPConfiguration:interface": "Microsoft.Network.VirtualApplianceIPConfiguration", + "@azure/arm-network!VirtualApplianceIPConfigurationProperties:interface": "Microsoft.Network.VirtualApplianceIPConfigurationProperties", + "@azure/arm-network!VirtualApplianceAdditionalNicProperties:interface": "Microsoft.Network.VirtualApplianceAdditionalNicProperties", + "@azure/arm-network!InternetIngressPublicIpsProperties:interface": "Microsoft.Network.InternetIngressPublicIpsProperties", + "@azure/arm-network!DelegationProperties:interface": "Microsoft.Network.DelegationProperties", + "@azure/arm-network!PartnerManagedResourceProperties:interface": "Microsoft.Network.PartnerManagedResourceProperties", + "@azure/arm-network!NvaInterfaceConfigurationsProperties:interface": "Microsoft.Network.NvaInterfaceConfigurationsProperties", + "@azure/arm-network!NvaInVnetSubnetReferenceProperties:interface": "Microsoft.Network.NvaInVnetSubnetReferenceProperties", + "@azure/arm-network!NetworkVirtualApplianceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NetworkVirtualApplianceInstanceIds:interface": "Microsoft.Network.NetworkVirtualApplianceInstanceIds", + "@azure/arm-network!NetworkVirtualApplianceBootDiagnosticParameters:interface": "Microsoft.Network.NetworkVirtualApplianceBootDiagnosticParameters", + "@azure/arm-network!NetworkVirtualApplianceInstanceId:interface": "Microsoft.Network.NetworkVirtualApplianceInstanceId", + "@azure/arm-network!VirtualApplianceSite:interface": "Microsoft.Network.VirtualApplianceSite", + "@azure/arm-network!VirtualApplianceSiteProperties:interface": "Microsoft.Network.VirtualApplianceSiteProperties", + "@azure/arm-network!Office365PolicyProperties:interface": "Microsoft.Network.Office365PolicyProperties", + "@azure/arm-network!BreakOutCategoryPolicies:interface": "Microsoft.Network.BreakOutCategoryPolicies", + "@azure/arm-network!NetworkVirtualApplianceSiteListResult:interface": "Microsoft.Network.NetworkVirtualApplianceSiteListResult", + "@azure/arm-network!NetworkWatcher:interface": "Common.NetworkWatcher", + "@azure/arm-network!NetworkWatcherPropertiesFormat:interface": "Common.NetworkWatcherPropertiesFormat", + "@azure/arm-network!ErrorResponse:interface": "Microsoft.Network.ErrorResponse", + "@azure/arm-network!NetworkWatcherListResult:interface": "Microsoft.Network.NetworkWatcherListResult", + "@azure/arm-network!TopologyParameters:interface": "Microsoft.Network.TopologyParameters", + "@azure/arm-network!Topology:interface": "Microsoft.Network.Topology", + "@azure/arm-network!TopologyResource:interface": "Microsoft.Network.TopologyResource", + "@azure/arm-network!TopologyAssociation:interface": "Microsoft.Network.TopologyAssociation", + "@azure/arm-network!VerificationIPFlowParameters:interface": "Microsoft.Network.VerificationIPFlowParameters", + "@azure/arm-network!VerificationIPFlowResult:interface": "Microsoft.Network.VerificationIPFlowResult", + "@azure/arm-network!NextHopParameters:interface": "Microsoft.Network.NextHopParameters", + "@azure/arm-network!NextHopResult:interface": "Microsoft.Network.NextHopResult", + "@azure/arm-network!SecurityGroupViewParameters:interface": "Microsoft.Network.SecurityGroupViewParameters", + "@azure/arm-network!SecurityGroupViewResult:interface": "Microsoft.Network.SecurityGroupViewResult", + "@azure/arm-network!SecurityGroupNetworkInterface:interface": "Microsoft.Network.SecurityGroupNetworkInterface", + "@azure/arm-network!SecurityRuleAssociations:interface": "Microsoft.Network.SecurityRuleAssociations", + "@azure/arm-network!NetworkInterfaceAssociation:interface": "Microsoft.Network.NetworkInterfaceAssociation", + "@azure/arm-network!SubnetAssociation:interface": "Microsoft.Network.SubnetAssociation", + "@azure/arm-network!TroubleshootingParameters:interface": "Microsoft.Network.TroubleshootingParameters", + "@azure/arm-network!TroubleshootingProperties:interface": "Microsoft.Network.TroubleshootingProperties", + "@azure/arm-network!TroubleshootingResult:interface": "Microsoft.Network.TroubleshootingResult", + "@azure/arm-network!TroubleshootingDetails:interface": "Microsoft.Network.TroubleshootingDetails", + "@azure/arm-network!TroubleshootingRecommendedActions:interface": "Microsoft.Network.TroubleshootingRecommendedActions", + "@azure/arm-network!QueryTroubleshootingParameters:interface": "Microsoft.Network.QueryTroubleshootingParameters", + "@azure/arm-network!FlowLogInformation:interface": "Microsoft.Network.FlowLogInformation", + "@azure/arm-network!FlowLogProperties:interface": "Microsoft.Network.FlowLogProperties", + "@azure/arm-network!FlowLogStatusParameters:interface": "Microsoft.Network.FlowLogStatusParameters", + "@azure/arm-network!ConnectivityParameters:interface": "Microsoft.Network.ConnectivityParameters", + "@azure/arm-network!ConnectivitySource:interface": "Microsoft.Network.ConnectivitySource", + "@azure/arm-network!ConnectivityDestination:interface": "Microsoft.Network.ConnectivityDestination", + "@azure/arm-network!ProtocolConfiguration:interface": "Microsoft.Network.ProtocolConfiguration", + "@azure/arm-network!HTTPConfiguration:interface": "Microsoft.Network.HttpConfiguration", + "@azure/arm-network!HTTPHeader:interface": "Microsoft.Network.HttpHeader", + "@azure/arm-network!ConnectivityInformation:interface": "Microsoft.Network.ConnectivityInformation", + "@azure/arm-network!ConnectivityHop:interface": "Microsoft.Network.ConnectivityHop", + "@azure/arm-network!HopLink:interface": "Microsoft.Network.HopLink", + "@azure/arm-network!HopLinkProperties:interface": "Microsoft.Network.HopLinkProperties", + "@azure/arm-network!ConnectivityIssue:interface": "Microsoft.Network.ConnectivityIssue", + "@azure/arm-network!AzureReachabilityReportParameters:interface": "Microsoft.Network.AzureReachabilityReportParameters", + "@azure/arm-network!AzureReachabilityReportLocation:interface": "Microsoft.Network.AzureReachabilityReportLocation", + "@azure/arm-network!AzureReachabilityReport:interface": "Microsoft.Network.AzureReachabilityReport", + "@azure/arm-network!AzureReachabilityReportItem:interface": "Microsoft.Network.AzureReachabilityReportItem", + "@azure/arm-network!AzureReachabilityReportLatencyInfo:interface": "Microsoft.Network.AzureReachabilityReportLatencyInfo", + "@azure/arm-network!AvailableProvidersListParameters:interface": "Microsoft.Network.AvailableProvidersListParameters", + "@azure/arm-network!AvailableProvidersList:interface": "Microsoft.Network.AvailableProvidersList", + "@azure/arm-network!AvailableProvidersListCountry:interface": "Microsoft.Network.AvailableProvidersListCountry", + "@azure/arm-network!AvailableProvidersListState:interface": "Microsoft.Network.AvailableProvidersListState", + "@azure/arm-network!AvailableProvidersListCity:interface": "Microsoft.Network.AvailableProvidersListCity", + "@azure/arm-network!NetworkConfigurationDiagnosticParameters:interface": "Microsoft.Network.NetworkConfigurationDiagnosticParameters", + "@azure/arm-network!NetworkConfigurationDiagnosticProfile:interface": "Microsoft.Network.NetworkConfigurationDiagnosticProfile", + "@azure/arm-network!NetworkConfigurationDiagnosticResponse:interface": "Microsoft.Network.NetworkConfigurationDiagnosticResponse", + "@azure/arm-network!NetworkConfigurationDiagnosticResult:interface": "Microsoft.Network.NetworkConfigurationDiagnosticResult", + "@azure/arm-network!NetworkSecurityGroupResult:interface": "Microsoft.Network.NetworkSecurityGroupResult", + "@azure/arm-network!EvaluatedNetworkSecurityGroup:interface": "Microsoft.Network.EvaluatedNetworkSecurityGroup", + "@azure/arm-network!MatchedRule:interface": "Microsoft.Network.MatchedRule", + "@azure/arm-network!NetworkSecurityRulesEvaluationResult:interface": "Microsoft.Network.NetworkSecurityRulesEvaluationResult", + "@azure/arm-network!FlowLogListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!PrivateEndpointListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!PrivateLinkServiceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!PrivateEndpointConnectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!CheckPrivateLinkServiceVisibilityRequest:interface": "Microsoft.Network.CheckPrivateLinkServiceVisibilityRequest", + "@azure/arm-network!PrivateLinkServiceVisibility:interface": "Microsoft.Network.PrivateLinkServiceVisibility", + "@azure/arm-network!AutoApprovedPrivateLinkServicesResult:interface": "Microsoft.Network.AutoApprovedPrivateLinkServicesResult", + "@azure/arm-network!AutoApprovedPrivateLinkService:interface": "Microsoft.Network.AutoApprovedPrivateLinkService", + "@azure/arm-network!PublicIPPrefix:interface": "Microsoft.Network.PublicIPPrefix", + "@azure/arm-network!PublicIPPrefixPropertiesFormat:interface": "Microsoft.Network.PublicIPPrefixPropertiesFormat", + "@azure/arm-network!ReferencedPublicIpAddress:interface": "Microsoft.Network.ReferencedPublicIpAddress", + "@azure/arm-network!PublicIPPrefixSku:interface": "Microsoft.Network.PublicIPPrefixSku", + "@azure/arm-network!PublicIPPrefixListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!RouteFilter:interface": "Microsoft.Network.RouteFilter", + "@azure/arm-network!RouteFilterPropertiesFormat:interface": "Microsoft.Network.RouteFilterPropertiesFormat", + "@azure/arm-network!RouteFilterRule:interface": "Microsoft.Network.RouteFilterRule", + "@azure/arm-network!RouteFilterRulePropertiesFormat:interface": "Microsoft.Network.RouteFilterRulePropertiesFormat", + "@azure/arm-network!TrackedResourceWithSettableIdOptionalLocation:interface": "Microsoft.Network.TrackedResourceWithSettableIdOptionalLocation", + "@azure/arm-network!RouteFilterListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!RouteTableListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!RouteListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!SecurityPartnerProvider:interface": "Microsoft.Network.SecurityPartnerProvider", + "@azure/arm-network!SecurityPartnerProviderPropertiesFormat:interface": "Microsoft.Network.SecurityPartnerProviderPropertiesFormat", + "@azure/arm-network!SecurityPartnerProviderListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ServiceEndpointPolicyListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ServiceEndpointPolicyDefinitionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!VirtualNetwork:interface": "Common.VirtualNetwork", + "@azure/arm-network!VirtualNetworkPropertiesFormat:interface": "Common.VirtualNetworkPropertiesFormat", + "@azure/arm-network!AddressSpace:interface": "Common.AddressSpace", + "@azure/arm-network!DhcpOptions:interface": "Common.DhcpOptions", + "@azure/arm-network!VirtualNetworkPeering:interface": "Common.VirtualNetworkPeering", + "@azure/arm-network!VirtualNetworkPeeringPropertiesFormat:interface": "Common.VirtualNetworkPeeringPropertiesFormat", + "@azure/arm-network!VirtualNetworkBgpCommunities:interface": "Common.VirtualNetworkBgpCommunities", + "@azure/arm-network!VirtualNetworkEncryption:interface": "Common.VirtualNetworkEncryption", + "@azure/arm-network!VirtualNetworkListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!IPAddressAvailabilityResult:interface": "Microsoft.Network.IPAddressAvailabilityResult", + "@azure/arm-network!VirtualNetworkListUsageResult:interface": "Microsoft.Network.VirtualNetworkListUsageResult", + "@azure/arm-network!VirtualNetworkUsage:interface": "Microsoft.Network.VirtualNetworkUsage", + "@azure/arm-network!VirtualNetworkUsageName:interface": "Microsoft.Network.VirtualNetworkUsageName", + "@azure/arm-network!VirtualNetworkDdosProtectionStatusResult:interface": "Microsoft.Network.VirtualNetworkDdosProtectionStatusResult", + "@azure/arm-network!SubnetListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!PrepareNetworkPoliciesRequest:interface": "Microsoft.Network.PrepareNetworkPoliciesRequest", + "@azure/arm-network!NetworkIntentPolicyConfiguration:interface": "Microsoft.Network.NetworkIntentPolicyConfiguration", + "@azure/arm-network!NetworkIntentPolicy:interface": "Microsoft.Network.NetworkIntentPolicy", + "@azure/arm-network!UnprepareNetworkPoliciesRequest:interface": "Microsoft.Network.UnprepareNetworkPoliciesRequest", + "@azure/arm-network!VirtualNetworkPeeringListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!VirtualNetworkGateway:interface": "Microsoft.Network.VirtualNetworkGateway", + "@azure/arm-network!VirtualNetworkGatewayPropertiesFormat:interface": "Microsoft.Network.VirtualNetworkGatewayPropertiesFormat", + "@azure/arm-network!VirtualNetworkGatewayAutoScaleConfiguration:interface": "Microsoft.Network.VirtualNetworkGatewayAutoScaleConfiguration", + "@azure/arm-network!VirtualNetworkGatewayAutoScaleBounds:interface": "Microsoft.Network.VirtualNetworkGatewayAutoScaleBounds", + "@azure/arm-network!VirtualNetworkGatewayIPConfiguration:interface": "Microsoft.Network.VirtualNetworkGatewayIPConfiguration", + "@azure/arm-network!VirtualNetworkGatewayIPConfigurationPropertiesFormat:interface": "Microsoft.Network.VirtualNetworkGatewayIPConfigurationPropertiesFormat", + "@azure/arm-network!VirtualNetworkGatewayMigrationStatus:interface": "Microsoft.Network.VirtualNetworkGatewayMigrationStatus", + "@azure/arm-network!VirtualNetworkGatewaySku:interface": "Microsoft.Network.VirtualNetworkGatewaySku", + "@azure/arm-network!VpnClientConfiguration:interface": "Microsoft.Network.VpnClientConfiguration", + "@azure/arm-network!VpnClientRootCertificate:interface": "Microsoft.Network.VpnClientRootCertificate", + "@azure/arm-network!VpnClientRootCertificatePropertiesFormat:interface": "Microsoft.Network.VpnClientRootCertificatePropertiesFormat", + "@azure/arm-network!VpnClientRevokedCertificate:interface": "Microsoft.Network.VpnClientRevokedCertificate", + "@azure/arm-network!VpnClientRevokedCertificatePropertiesFormat:interface": "Microsoft.Network.VpnClientRevokedCertificatePropertiesFormat", + "@azure/arm-network!IpsecPolicy:interface": "Microsoft.Network.IpsecPolicy", + "@azure/arm-network!RadiusServer:interface": "Microsoft.Network.RadiusServer", + "@azure/arm-network!VngClientConnectionConfiguration:interface": "Microsoft.Network.VngClientConnectionConfiguration", + "@azure/arm-network!VngClientConnectionConfigurationProperties:interface": "Microsoft.Network.VngClientConnectionConfigurationProperties", + "@azure/arm-network!VirtualNetworkGatewayPolicyGroup:interface": "Microsoft.Network.VirtualNetworkGatewayPolicyGroup", + "@azure/arm-network!VirtualNetworkGatewayPolicyGroupProperties:interface": "Microsoft.Network.VirtualNetworkGatewayPolicyGroupProperties", + "@azure/arm-network!VirtualNetworkGatewayPolicyGroupMember:interface": "Microsoft.Network.VirtualNetworkGatewayPolicyGroupMember", + "@azure/arm-network!BgpSettings:interface": "Microsoft.Network.BgpSettings", + "@azure/arm-network!IPConfigurationBgpPeeringAddress:interface": "Microsoft.Network.IPConfigurationBgpPeeringAddress", + "@azure/arm-network!VirtualNetworkGatewayNatRule:interface": "Microsoft.Network.VirtualNetworkGatewayNatRule", + "@azure/arm-network!VirtualNetworkGatewayNatRuleProperties:interface": "Microsoft.Network.VirtualNetworkGatewayNatRuleProperties", + "@azure/arm-network!VpnNatRuleMapping:interface": "Microsoft.Network.VpnNatRuleMapping", + "@azure/arm-network!VirtualNetworkGatewayListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!VirtualNetworkGatewayListConnectionsResult:interface": "Microsoft.Network.VirtualNetworkGatewayListConnectionsResult", + "@azure/arm-network!VirtualNetworkGatewayConnectionListEntity:interface": "Microsoft.Network.VirtualNetworkGatewayConnectionListEntity", + "@azure/arm-network!VirtualNetworkGatewayConnectionListEntityPropertiesFormat:interface": "Microsoft.Network.VirtualNetworkGatewayConnectionListEntityPropertiesFormat", + "@azure/arm-network!VirtualNetworkConnectionGatewayReference:interface": "Microsoft.Network.VirtualNetworkConnectionGatewayReference", + "@azure/arm-network!TunnelConnectionHealth:interface": "Microsoft.Network.TunnelConnectionHealth", + "@azure/arm-network!GatewayCustomBgpIpAddressIpConfiguration:interface": "Microsoft.Network.GatewayCustomBgpIpAddressIpConfiguration", + "@azure/arm-network!TrafficSelectorPolicy:interface": "Microsoft.Network.TrafficSelectorPolicy", + "@azure/arm-network!VpnClientParameters:interface": "Microsoft.Network.VpnClientParameters", + "@azure/arm-network!BgpPeerStatusListResult:interface": "Microsoft.Network.BgpPeerStatusListResult", + "@azure/arm-network!BgpPeerStatus:interface": "Microsoft.Network.BgpPeerStatus", + "@azure/arm-network!RadiusAuthServerListResult:interface": "Microsoft.Network.RadiusAuthServerListResult", + "@azure/arm-network!RadiusAuthServer:interface": "Microsoft.Network.RadiusAuthServer", + "@azure/arm-network!GatewayRouteListResult:interface": "Microsoft.Network.GatewayRouteListResult", + "@azure/arm-network!GatewayRoute:interface": "Microsoft.Network.GatewayRoute", + "@azure/arm-network!GatewayResiliencyInformation:interface": "Microsoft.Network.GatewayResiliencyInformation", + "@azure/arm-network!ResiliencyRecommendationComponents:interface": "Microsoft.Network.ResiliencyRecommendationComponents", + "@azure/arm-network!GatewayResiliencyRecommendation:interface": "Microsoft.Network.GatewayResiliencyRecommendation", + "@azure/arm-network!GatewayRouteSetsInformation:interface": "Microsoft.Network.GatewayRouteSetsInformation", + "@azure/arm-network!GatewayRouteSet:interface": "Microsoft.Network.GatewayRouteSet", + "@azure/arm-network!RouteSourceDetails:interface": "Microsoft.Network.RouteSourceDetails", + "@azure/arm-network!CircuitMetadataMap:interface": "Microsoft.Network.CircuitMetadataMap", + "@azure/arm-network!VpnClientIPsecParameters:interface": "Microsoft.Network.VpnClientIPsecParameters", + "@azure/arm-network!VpnPacketCaptureStartParameters:interface": "Microsoft.Network.VpnPacketCaptureStartParameters", + "@azure/arm-network!VpnPacketCaptureStopParameters:interface": "Microsoft.Network.VpnPacketCaptureStopParameters", + "@azure/arm-network!ExpressRouteFailoverTestDetails:interface": "Microsoft.Network.ExpressRouteFailoverTestDetails", + "@azure/arm-network!ExpressRouteFailoverCircuitResourceDetails:interface": "Microsoft.Network.ExpressRouteFailoverCircuitResourceDetails", + "@azure/arm-network!ExpressRouteFailoverConnectionResourceDetails:interface": "Microsoft.Network.ExpressRouteFailoverConnectionResourceDetails", + "@azure/arm-network!ExpressRouteFailoverSingleTestDetails:interface": "Microsoft.Network.ExpressRouteFailoverSingleTestDetails", + "@azure/arm-network!ExpressRouteFailoverRedundantRoute:interface": "Microsoft.Network.ExpressRouteFailoverRedundantRoute", + "@azure/arm-network!FailoverConnectionDetails:interface": "Microsoft.Network.FailoverConnectionDetails", + "@azure/arm-network!ExpressRouteFailoverStopApiParameters:interface": "Microsoft.Network.ExpressRouteFailoverStopApiParameters", + "@azure/arm-network!VpnClientConnectionHealthDetailListResult:interface": "Microsoft.Network.VpnClientConnectionHealthDetailListResult", + "@azure/arm-network!VpnClientConnectionHealthDetail:interface": "Microsoft.Network.VpnClientConnectionHealthDetail", + "@azure/arm-network!P2SVpnConnectionRequest:interface": "Microsoft.Network.P2SVpnConnectionRequest", + "@azure/arm-network!VirtualNetworkGatewayMigrationParameters:interface": "Microsoft.Network.VirtualNetworkGatewayMigrationParameters", + "@azure/arm-network!VpnDeviceScriptParameters:interface": "Microsoft.Network.VpnDeviceScriptParameters", + "@azure/arm-network!VirtualNetworkGatewayConnection:interface": "Microsoft.Network.VirtualNetworkGatewayConnection", + "@azure/arm-network!VirtualNetworkGatewayConnectionPropertiesFormat:interface": "Microsoft.Network.VirtualNetworkGatewayConnectionPropertiesFormat", + "@azure/arm-network!LocalNetworkGateway:interface": "Microsoft.Network.LocalNetworkGateway", + "@azure/arm-network!LocalNetworkGatewayPropertiesFormat:interface": "Microsoft.Network.LocalNetworkGatewayPropertiesFormat", + "@azure/arm-network!VirtualNetworkGatewayConnectionTunnelProperties:interface": "Microsoft.Network.VirtualNetworkGatewayConnectionTunnelProperties", + "@azure/arm-network!CertificateAuthentication:interface": "Microsoft.Network.CertificateAuthentication", + "@azure/arm-network!VirtualNetworkGatewayConnectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ConnectionSharedKey:interface": "Microsoft.Network.ConnectionSharedKey", + "@azure/arm-network!ConnectionResetSharedKey:interface": "Microsoft.Network.ConnectionResetSharedKey", + "@azure/arm-network!LocalNetworkGatewayListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ListVirtualNetworkGatewayNatRulesResult:interface": "Microsoft.Network.ListVirtualNetworkGatewayNatRulesResult", + "@azure/arm-network!VirtualNetworkTapListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!VirtualRouter:interface": "Microsoft.Network.VirtualRouter", + "@azure/arm-network!VirtualRouterPropertiesFormat:interface": "Microsoft.Network.VirtualRouterPropertiesFormat", + "@azure/arm-network!VirtualRouterListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!VirtualRouterPeering:interface": "Microsoft.Network.VirtualRouterPeering", + "@azure/arm-network!VirtualRouterPeeringProperties:interface": "Microsoft.Network.VirtualRouterPeeringProperties", + "@azure/arm-network!VirtualRouterPeeringListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!VirtualWAN:interface": "Microsoft.Network.VirtualWAN", + "@azure/arm-network!VirtualWanProperties:interface": "Microsoft.Network.VirtualWanProperties", + "@azure/arm-network!ListVirtualWANsResult:interface": "Microsoft.Network.ListVirtualWANsResult", + "@azure/arm-network!VpnSite:interface": "Microsoft.Network.VpnSite", + "@azure/arm-network!VpnSiteProperties:interface": "Microsoft.Network.VpnSiteProperties", + "@azure/arm-network!DeviceProperties:interface": "Microsoft.Network.DeviceProperties", + "@azure/arm-network!VpnSiteLink:interface": "Microsoft.Network.VpnSiteLink", + "@azure/arm-network!VpnSiteLinkProperties:interface": "Microsoft.Network.VpnSiteLinkProperties", + "@azure/arm-network!VpnLinkProviderProperties:interface": "Microsoft.Network.VpnLinkProviderProperties", + "@azure/arm-network!VpnLinkBgpSettings:interface": "Microsoft.Network.VpnLinkBgpSettings", + "@azure/arm-network!O365PolicyProperties:interface": "Microsoft.Network.O365PolicyProperties", + "@azure/arm-network!O365BreakOutCategoryPolicies:interface": "Microsoft.Network.O365BreakOutCategoryPolicies", + "@azure/arm-network!ListVpnSitesResult:interface": "Microsoft.Network.ListVpnSitesResult", + "@azure/arm-network!ListVpnSiteLinksResult:interface": "Microsoft.Network.ListVpnSiteLinksResult", + "@azure/arm-network!VpnServerConfiguration:interface": "Microsoft.Network.VpnServerConfiguration", + "@azure/arm-network!VpnServerConfigurationProperties:interface": "Microsoft.Network.VpnServerConfigurationProperties", + "@azure/arm-network!VpnServerConfigVpnClientRootCertificate:interface": "Microsoft.Network.VpnServerConfigVpnClientRootCertificate", + "@azure/arm-network!VpnServerConfigVpnClientRevokedCertificate:interface": "Microsoft.Network.VpnServerConfigVpnClientRevokedCertificate", + "@azure/arm-network!VpnServerConfigRadiusServerRootCertificate:interface": "Microsoft.Network.VpnServerConfigRadiusServerRootCertificate", + "@azure/arm-network!VpnServerConfigRadiusClientRootCertificate:interface": "Microsoft.Network.VpnServerConfigRadiusClientRootCertificate", + "@azure/arm-network!AadAuthenticationParameters:interface": "Microsoft.Network.AadAuthenticationParameters", + "@azure/arm-network!P2SVpnGateway:interface": "Microsoft.Network.P2SVpnGateway", + "@azure/arm-network!P2SVpnGatewayProperties:interface": "Microsoft.Network.P2SVpnGatewayProperties", + "@azure/arm-network!P2SConnectionConfiguration:interface": "Microsoft.Network.P2SConnectionConfiguration", + "@azure/arm-network!P2SConnectionConfigurationProperties:interface": "Microsoft.Network.P2SConnectionConfigurationProperties", + "@azure/arm-network!VpnServerConfigurationPolicyGroup:interface": "Microsoft.Network.VpnServerConfigurationPolicyGroup", + "@azure/arm-network!VpnServerConfigurationPolicyGroupProperties:interface": "Microsoft.Network.VpnServerConfigurationPolicyGroupProperties", + "@azure/arm-network!VpnServerConfigurationPolicyGroupMember:interface": "Microsoft.Network.VpnServerConfigurationPolicyGroupMember", + "@azure/arm-network!VpnClientConnectionHealth:interface": "Microsoft.Network.VpnClientConnectionHealth", + "@azure/arm-network!TrackedResourceWithSettableName:interface": "Microsoft.Network.TrackedResourceWithSettableName", + "@azure/arm-network!ListVpnServerConfigurationsResult:interface": "Microsoft.Network.ListVpnServerConfigurationsResult", + "@azure/arm-network!VirtualHub:interface": "Microsoft.Network.VirtualHub", + "@azure/arm-network!VirtualHubProperties:interface": "Microsoft.Network.VirtualHubProperties", + "@azure/arm-network!VirtualHubRouteTable:interface": "Microsoft.Network.VirtualHubRouteTable", + "@azure/arm-network!VirtualHubRoute:interface": "Microsoft.Network.VirtualHubRoute", + "@azure/arm-network!VirtualHubRouteTableV2:interface": "Microsoft.Network.VirtualHubRouteTableV2", + "@azure/arm-network!VirtualHubRouteTableV2Properties:interface": "Microsoft.Network.VirtualHubRouteTableV2Properties", + "@azure/arm-network!VirtualHubRouteV2:interface": "Microsoft.Network.VirtualHubRouteV2", + "@azure/arm-network!VirtualRouterAutoScaleConfiguration:interface": "Microsoft.Network.VirtualRouterAutoScaleConfiguration", + "@azure/arm-network!ListVirtualHubsResult:interface": "Microsoft.Network.ListVirtualHubsResult", + "@azure/arm-network!EffectiveRoutesParameters:interface": "Microsoft.Network.EffectiveRoutesParameters", + "@azure/arm-network!VirtualHubEffectiveRouteList:interface": "Microsoft.Network.VirtualHubEffectiveRouteList", + "@azure/arm-network!VirtualHubEffectiveRoute:interface": "Microsoft.Network.VirtualHubEffectiveRoute", + "@azure/arm-network!GetInboundRoutesParameters:interface": "Microsoft.Network.GetInboundRoutesParameters", + "@azure/arm-network!EffectiveRouteMapRouteList:interface": "Microsoft.Network.EffectiveRouteMapRouteList", + "@azure/arm-network!EffectiveRouteMapRoute:interface": "Microsoft.Network.EffectiveRouteMapRoute", + "@azure/arm-network!GetOutboundRoutesParameters:interface": "Microsoft.Network.GetOutboundRoutesParameters", + "@azure/arm-network!RouteMap:interface": "Microsoft.Network.RouteMap", + "@azure/arm-network!RouteMapProperties:interface": "Microsoft.Network.RouteMapProperties", + "@azure/arm-network!RouteMapRule:interface": "Microsoft.Network.RouteMapRule", + "@azure/arm-network!Criterion:interface": "Microsoft.Network.Criterion", + "@azure/arm-network!Action:interface": "Microsoft.Network.Action", + "@azure/arm-network!Parameter:interface": "Microsoft.Network.Parameter", + "@azure/arm-network!ReadOnlySubResourceModel:interface": "Microsoft.Network.ReadOnlySubResourceModel", + "@azure/arm-network!ListRouteMapsResult:interface": "Microsoft.Network.ListRouteMapsResult", + "@azure/arm-network!VpnGateway:interface": "Microsoft.Network.VpnGateway", + "@azure/arm-network!VpnGatewayProperties:interface": "Microsoft.Network.VpnGatewayProperties", + "@azure/arm-network!VpnConnection:interface": "Microsoft.Network.VpnConnection", + "@azure/arm-network!VpnConnectionProperties:interface": "Microsoft.Network.VpnConnectionProperties", + "@azure/arm-network!VpnSiteLinkConnection:interface": "Microsoft.Network.VpnSiteLinkConnection", + "@azure/arm-network!VpnSiteLinkConnectionProperties:interface": "Microsoft.Network.VpnSiteLinkConnectionProperties", + "@azure/arm-network!VpnGatewayIpConfiguration:interface": "Microsoft.Network.VpnGatewayIpConfiguration", + "@azure/arm-network!VpnGatewayNatRule:interface": "Microsoft.Network.VpnGatewayNatRule", + "@azure/arm-network!VpnGatewayNatRuleProperties:interface": "Microsoft.Network.VpnGatewayNatRuleProperties", + "@azure/arm-network!ListVpnGatewaysResult:interface": "Microsoft.Network.ListVpnGatewaysResult", + "@azure/arm-network!VpnGatewayPacketCaptureStartParameters:interface": "Microsoft.Network.VpnGatewayPacketCaptureStartParameters", + "@azure/arm-network!VpnGatewayPacketCaptureStopParameters:interface": "Microsoft.Network.VpnGatewayPacketCaptureStopParameters", + "@azure/arm-network!ExpressRouteGateway:interface": "Microsoft.Network.ExpressRouteGateway", + "@azure/arm-network!ExpressRouteGatewayProperties:interface": "Microsoft.Network.ExpressRouteGatewayProperties", + "@azure/arm-network!ExpressRouteGatewayPropertiesAutoScaleConfiguration:interface": "Microsoft.Network.ExpressRouteGatewayPropertiesAutoScaleConfiguration", + "@azure/arm-network!ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds:interface": "Microsoft.Network.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds", + "@azure/arm-network!ExpressRouteConnection:interface": "Microsoft.Network.ExpressRouteConnection", + "@azure/arm-network!ExpressRouteConnectionProperties:interface": "Microsoft.Network.ExpressRouteConnectionProperties", + "@azure/arm-network!ExpressRouteCircuitPeeringId:interface": "Microsoft.Network.ExpressRouteCircuitPeeringId", + "@azure/arm-network!VirtualHubId:interface": "Microsoft.Network.VirtualHubId", + "@azure/arm-network!ExpressRouteGatewayList:interface": "Microsoft.Network.ExpressRouteGatewayList", + "@azure/arm-network!StopSiteFailoverTestParameterBody:interface": "Microsoft.Network.stopSiteFailoverTest.Parameter.body.anonymous", + "@azure/arm-network!HubRouteTable:interface": "Microsoft.Network.HubRouteTable", + "@azure/arm-network!HubRouteTableProperties:interface": "Microsoft.Network.HubRouteTableProperties", + "@azure/arm-network!HubRoute:interface": "Microsoft.Network.HubRoute", + "@azure/arm-network!ListHubRouteTablesResult:interface": "Microsoft.Network.ListHubRouteTablesResult", + "@azure/arm-network!ConnectionPolicy:interface": "Microsoft.Network.ConnectionPolicy", + "@azure/arm-network!ConnectionPolicyProperties:interface": "Microsoft.Network.ConnectionPolicyProperties", + "@azure/arm-network!ProxyResource:interface": "Microsoft.Network.ProxyResource", + "@azure/arm-network!ListConnectionPoliciesResult:interface": "Microsoft.Network.ListConnectionPoliciesResult", + "@azure/arm-network!WebApplicationFirewallPolicy:interface": "Microsoft.Network.WebApplicationFirewallPolicy", + "@azure/arm-network!WebApplicationFirewallPolicyPropertiesFormat:interface": "Microsoft.Network.WebApplicationFirewallPolicyPropertiesFormat", + "@azure/arm-network!PolicySettings:interface": "Microsoft.Network.PolicySettings", + "@azure/arm-network!PolicySettingsLogScrubbing:interface": "Microsoft.Network.PolicySettingsLogScrubbing", + "@azure/arm-network!WebApplicationFirewallScrubbingRules:interface": "Microsoft.Network.WebApplicationFirewallScrubbingRules", + "@azure/arm-network!WebApplicationFirewallCustomRule:interface": "Microsoft.Network.WebApplicationFirewallCustomRule", + "@azure/arm-network!MatchCondition:interface": "Microsoft.Network.MatchCondition", + "@azure/arm-network!MatchVariable:interface": "Microsoft.Network.MatchVariable", + "@azure/arm-network!GroupByUserSession:interface": "Microsoft.Network.GroupByUserSession", + "@azure/arm-network!GroupByVariable:interface": "Microsoft.Network.GroupByVariable", + "@azure/arm-network!ManagedRulesDefinition:interface": "Microsoft.Network.ManagedRulesDefinition", + "@azure/arm-network!ExceptionEntry:interface": "Microsoft.Network.ExceptionEntry", + "@azure/arm-network!ExclusionManagedRuleSet:interface": "Microsoft.Network.ExclusionManagedRuleSet", + "@azure/arm-network!ExclusionManagedRuleGroup:interface": "Microsoft.Network.ExclusionManagedRuleGroup", + "@azure/arm-network!ExclusionManagedRule:interface": "Microsoft.Network.ExclusionManagedRule", + "@azure/arm-network!OwaspCrsExclusionEntry:interface": "Microsoft.Network.OwaspCrsExclusionEntry", + "@azure/arm-network!ManagedRuleSet:interface": "Microsoft.Network.ManagedRuleSet", + "@azure/arm-network!ManagedRuleGroupOverride:interface": "Microsoft.Network.ManagedRuleGroupOverride", + "@azure/arm-network!ManagedRuleOverride:interface": "Microsoft.Network.ManagedRuleOverride", + "@azure/arm-network!ManagedRuleSetRuleGroup:interface": "Microsoft.Network.ManagedRuleSetRuleGroup", + "@azure/arm-network!ApplicationGatewayForContainersReferenceDefinition:interface": "Microsoft.Network.ApplicationGatewayForContainersReferenceDefinition", + "@azure/arm-network!WebApplicationFirewallPolicyListResult:interface": "Microsoft.Network.WebApplicationFirewallPolicyListResult", + "@azure/arm-network!VirtualNetworkAppliance:interface": "Microsoft.Network.VirtualNetworkAppliance", + "@azure/arm-network!VirtualNetworkAppliancePropertiesFormat:interface": "Microsoft.Network.VirtualNetworkAppliancePropertiesFormat", + "@azure/arm-network!VirtualNetworkApplianceIpConfiguration:interface": "Microsoft.Network.VirtualNetworkApplianceIpConfiguration", + "@azure/arm-network!VirtualNetworkApplianceIpConfigurationProperties:interface": "Microsoft.Network.VirtualNetworkApplianceIpConfigurationProperties", + "@azure/arm-network!VirtualNetworkApplianceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ServiceGateway:interface": "Microsoft.Network.ServiceGateway", + "@azure/arm-network!ServiceGatewayPropertiesFormat:interface": "Microsoft.Network.ServiceGatewayPropertiesFormat", + "@azure/arm-network!RouteTargetAddressPropertiesFormat:interface": "Microsoft.Network.RouteTargetAddressPropertiesFormat", + "@azure/arm-network!ServiceGatewaySku:interface": "Microsoft.Network.ServiceGatewaySku", + "@azure/arm-network!ServiceGatewayListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ServiceGatewayUpdateAddressLocationsRequest:interface": "Microsoft.Network.ServiceGatewayUpdateAddressLocationsRequest", + "@azure/arm-network!ServiceGatewayAddressLocation:interface": "Microsoft.Network.ServiceGatewayAddressLocation", + "@azure/arm-network!ServiceGatewayAddress:interface": "Microsoft.Network.ServiceGatewayAddress", + "@azure/arm-network!ServiceGatewayUpdateServicesRequest:interface": "Microsoft.Network.ServiceGatewayUpdateServicesRequest", + "@azure/arm-network!ServiceGatewayServiceRequest:interface": "Microsoft.Network.ServiceGatewayServiceRequest", + "@azure/arm-network!ServiceGatewayService:interface": "Microsoft.Network.ServiceGatewayService", + "@azure/arm-network!ServiceGatewayServicePropertiesFormat:interface": "Microsoft.Network.ServiceGatewayServicePropertiesFormat", + "@azure/arm-network!GetServiceGatewayAddressLocationsResult:interface": "Microsoft.Network.GetServiceGatewayAddressLocationsResult", + "@azure/arm-network!ServiceGatewayAddressLocationResponse:interface": "Microsoft.Network.ServiceGatewayAddressLocationResponse", + "@azure/arm-network!GetServiceGatewayServicesResult:interface": "Microsoft.Network.GetServiceGatewayServicesResult", + "@azure/arm-network!InterconnectGroup:interface": "Microsoft.Network.InterconnectGroup", + "@azure/arm-network!InterconnectGroupPropertiesFormat:interface": "Microsoft.Network.InterconnectGroupPropertiesFormat", + "@azure/arm-network!Subgroup:interface": "Microsoft.Network.Subgroup", + "@azure/arm-network!SubgroupProperties:interface": "Microsoft.Network.SubgroupProperties", + "@azure/arm-network!SubgroupProfile:interface": "Microsoft.Network.SubgroupProfile", + "@azure/arm-network!InterconnectGroupListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!InterconnectGroupNodeAvailability:interface": "Microsoft.Network.InterconnectGroupNodeAvailability", + "@azure/arm-network!SubgroupNodeAvailabilityEntry:interface": "Microsoft.Network.SubgroupNodeAvailabilityEntry", + "@azure/arm-network!SubgroupListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ApplicationGatewayPrivateLinkResourceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ApplicationGatewayPrivateLinkResource:interface": "Microsoft.Network.ApplicationGatewayPrivateLinkResource", + "@azure/arm-network!ApplicationGatewayPrivateLinkResourceProperties:interface": "Microsoft.Network.ApplicationGatewayPrivateLinkResourceProperties", + "@azure/arm-network!ApplicationGatewayWafDynamicManifestResult:interface": "Microsoft.Network.ApplicationGatewayWafDynamicManifestResult", + "@azure/arm-network!ApplicationGatewayWafDynamicManifestPropertiesResult:interface": "Microsoft.Network.ApplicationGatewayWafDynamicManifestPropertiesResult", + "@azure/arm-network!DefaultRuleSetPropertyFormat:interface": "Microsoft.Network.DefaultRuleSetPropertyFormat", + "@azure/arm-network!ApplicationGatewayFirewallManifestRuleSet:interface": "Microsoft.Network.ApplicationGatewayFirewallManifestRuleSet", + "@azure/arm-network!ProxyResourceWithSettableId:interface": "Microsoft.Network.ProxyResourceWithSettableId", + "@azure/arm-network!ApplicationGatewayWafDynamicManifestResultList:interface": "Microsoft.Network.ApplicationGatewayWafDynamicManifestResultList", + "@azure/arm-network!AzureWebCategory:interface": "Microsoft.Network.AzureWebCategory", + "@azure/arm-network!AzureWebCategoryPropertiesFormat:interface": "Microsoft.Network.AzureWebCategoryPropertiesFormat", + "@azure/arm-network!AzureWebCategoryListResult:interface": "Microsoft.Network.AzureWebCategoryListResult", + "@azure/arm-network!ExpressRouteProviderPortListResult:interface": "Microsoft.Network.ExpressRouteProviderPortListResult", + "@azure/arm-network!NetworkInterfaceLoadBalancerListResult:interface": "Microsoft.Network.NetworkInterfaceLoadBalancerListResult", + "@azure/arm-network!SwapResource:interface": "Microsoft.Network.SwapResource", + "@azure/arm-network!SwapResourceProperties:interface": "Microsoft.Network.SwapResourceProperties", + "@azure/arm-network!ProxyResourceWithReadOnlyID:interface": "Microsoft.Network.ProxyResourceWithReadOnlyID", + "@azure/arm-network!SwapResourceListResult:interface": "Microsoft.Network.SwapResourceListResult", + "@azure/arm-network!CustomIpPrefix:interface": "Microsoft.Network.CustomIpPrefix", + "@azure/arm-network!CustomIpPrefixPropertiesFormat:interface": "Microsoft.Network.CustomIpPrefixPropertiesFormat", + "@azure/arm-network!CustomIpPrefixListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!DscpConfiguration:interface": "Microsoft.Network.DscpConfiguration", + "@azure/arm-network!DscpConfigurationPropertiesFormat:interface": "Microsoft.Network.DscpConfigurationPropertiesFormat", + "@azure/arm-network!QosIpRange:interface": "Microsoft.Network.QosIpRange", + "@azure/arm-network!QosPortRange:interface": "Microsoft.Network.QosPortRange", + "@azure/arm-network!QosDefinition:interface": "Microsoft.Network.QosDefinition", + "@azure/arm-network!DscpConfigurationListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ExpressRouteCrossConnectionPeeringList:interface": "Microsoft.Network.ExpressRouteCrossConnectionPeeringList", + "@azure/arm-network!ExpressRouteLinkListResult:interface": "Microsoft.Network.ExpressRouteLinkListResult", + "@azure/arm-network!IDPSQueryObject:interface": "Microsoft.Network.IdpsQueryObject", + "@azure/arm-network!FilterItems:interface": "Microsoft.Network.FilterItems", + "@azure/arm-network!OrderBy:interface": "Microsoft.Network.OrderBy", + "@azure/arm-network!QueryResults:interface": "Microsoft.Network.QueryResults", + "@azure/arm-network!SingleQueryResult:interface": "Microsoft.Network.SingleQueryResult", + "@azure/arm-network!SignatureOverridesFilterValuesQuery:interface": "Microsoft.Network.SignatureOverridesFilterValuesQuery", + "@azure/arm-network!SignatureOverridesFilterValuesResponse:interface": "Microsoft.Network.SignatureOverridesFilterValuesResponse", + "@azure/arm-network!NetworkManagerCommit:interface": "Microsoft.Network.NetworkManagerCommit", + "@azure/arm-network!NetworkManagerDeploymentStatusParameter:interface": "Microsoft.Network.NetworkManagerDeploymentStatusParameter", + "@azure/arm-network!NetworkManagerDeploymentStatusListResult:interface": "Microsoft.Network.NetworkManagerDeploymentStatusListResult", + "@azure/arm-network!NetworkManagerDeploymentStatus:interface": "Microsoft.Network.NetworkManagerDeploymentStatus", + "@azure/arm-network!LoadBalancerBackendAddressPoolListResult:interface": "Microsoft.Network.LoadBalancerBackendAddressPoolListResult", + "@azure/arm-network!LoadBalancerFrontendIPConfigurationListResult:interface": "Microsoft.Network.LoadBalancerFrontendIPConfigurationListResult", + "@azure/arm-network!LoadBalancerLoadBalancingRuleListResult:interface": "Microsoft.Network.LoadBalancerLoadBalancingRuleListResult", + "@azure/arm-network!LoadBalancerHealthPerRule:interface": "Microsoft.Network.LoadBalancerHealthPerRule", + "@azure/arm-network!LoadBalancerHealthPerRulePerBackendAddress:interface": "Microsoft.Network.LoadBalancerHealthPerRulePerBackendAddress", + "@azure/arm-network!LoadBalancerOutboundRuleListResult:interface": "Microsoft.Network.LoadBalancerOutboundRuleListResult", + "@azure/arm-network!LoadBalancerProbeListResult:interface": "Microsoft.Network.LoadBalancerProbeListResult", + "@azure/arm-network!BaseAdminRule:interface": "Microsoft.Network.BaseAdminRule", + "@azure/arm-network!AdminRule:interface": "Microsoft.Network.AdminRule", + "@azure/arm-network!DefaultAdminRule:interface": "Microsoft.Network.DefaultAdminRule", + "@azure/arm-network!AdminRuleListResult:interface": "Microsoft.Network.AdminRuleListResult", + "@azure/arm-network!NspProfile:interface": "Microsoft.Network.NspProfile", + "@azure/arm-network!NspProfileProperties:interface": "Microsoft.Network.NspProfileProperties", + "@azure/arm-network!SecurityPerimeterProxyResource:interface": "Microsoft.Network.SecurityPerimeterProxyResource", + "@azure/arm-network!NspProfileListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NspAccessRule:interface": "Microsoft.Network.NspAccessRule", + "@azure/arm-network!NspAccessRuleProperties:interface": "Microsoft.Network.NspAccessRuleProperties", + "@azure/arm-network!SubscriptionId:interface": "Microsoft.Network.SubscriptionId", + "@azure/arm-network!PerimeterBasedAccessRule:interface": "Microsoft.Network.PerimeterBasedAccessRule", + "@azure/arm-network!NspAccessRuleListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NspAssociation:interface": "Microsoft.Network.NspAssociation", + "@azure/arm-network!NspAssociationProperties:interface": "Microsoft.Network.NspAssociationProperties", + "@azure/arm-network!NspAssociationsListResult:interface": "Microsoft.Network.NspAssociationsListResult", + "@azure/arm-network!NspLink:interface": "Microsoft.Network.NspLink", + "@azure/arm-network!NspLinkProperties:interface": "Microsoft.Network.NspLinkProperties", + "@azure/arm-network!NspLinkListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NspLinkReference:interface": "Microsoft.Network.NspLinkReference", + "@azure/arm-network!NspLinkReferenceProperties:interface": "Microsoft.Network.NspLinkReferenceProperties", + "@azure/arm-network!NspLinkReferenceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NspLoggingConfiguration:interface": "Microsoft.Network.NspLoggingConfiguration", + "@azure/arm-network!NspLoggingConfigurationProperties:interface": "Microsoft.Network.NspLoggingConfigurationProperties", + "@azure/arm-network!NspLoggingConfigurationListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!NetworkVirtualApplianceSku:interface": "Microsoft.Network.NetworkVirtualApplianceSku", + "@azure/arm-network!NetworkVirtualApplianceSkuPropertiesFormat:interface": "Microsoft.Network.NetworkVirtualApplianceSkuPropertiesFormat", + "@azure/arm-network!NetworkVirtualApplianceSkuInstances:interface": "Microsoft.Network.NetworkVirtualApplianceSkuInstances", + "@azure/arm-network!NetworkVirtualApplianceSkuListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!InboundSecurityRule:interface": "Microsoft.Network.InboundSecurityRule", + "@azure/arm-network!InboundSecurityRuleProperties:interface": "Microsoft.Network.InboundSecurityRuleProperties", + "@azure/arm-network!InboundSecurityRules:interface": "Microsoft.Network.InboundSecurityRules", + "@azure/arm-network!PacketCapture:interface": "Microsoft.Network.PacketCapture", + "@azure/arm-network!PacketCaptureParameters:interface": "Microsoft.Network.PacketCaptureParameters", + "@azure/arm-network!PacketCaptureMachineScope:interface": "Microsoft.Network.PacketCaptureMachineScope", + "@azure/arm-network!PacketCaptureStorageLocation:interface": "Microsoft.Network.PacketCaptureStorageLocation", + "@azure/arm-network!PacketCaptureFilter:interface": "Microsoft.Network.PacketCaptureFilter", + "@azure/arm-network!PacketCaptureSettings:interface": "Microsoft.Network.PacketCaptureSettings", + "@azure/arm-network!PacketCaptureResult:interface": "Microsoft.Network.PacketCaptureResult", + "@azure/arm-network!PacketCaptureResultProperties:interface": "Microsoft.Network.PacketCaptureResultProperties", + "@azure/arm-network!PacketCaptureQueryStatusResult:interface": "Microsoft.Network.PacketCaptureQueryStatusResult", + "@azure/arm-network!PacketCaptureListResult:interface": "Microsoft.Network.PacketCaptureListResult", + "@azure/arm-network!ConnectionMonitorResult:interface": "Microsoft.Network.ConnectionMonitorResult", + "@azure/arm-network!ConnectionMonitorResultProperties:interface": "Microsoft.Network.ConnectionMonitorResultProperties", + "@azure/arm-network!ConnectionMonitorParameters:interface": "Microsoft.Network.ConnectionMonitorParameters", + "@azure/arm-network!ConnectionMonitorSource:interface": "Microsoft.Network.ConnectionMonitorSource", + "@azure/arm-network!ConnectionMonitorDestination:interface": "Microsoft.Network.ConnectionMonitorDestination", + "@azure/arm-network!ConnectionMonitorEndpoint:interface": "Microsoft.Network.ConnectionMonitorEndpoint", + "@azure/arm-network!ConnectionMonitorEndpointFilter:interface": "Microsoft.Network.ConnectionMonitorEndpointFilter", + "@azure/arm-network!ConnectionMonitorEndpointFilterItem:interface": "Microsoft.Network.ConnectionMonitorEndpointFilterItem", + "@azure/arm-network!ConnectionMonitorEndpointScope:interface": "Microsoft.Network.ConnectionMonitorEndpointScope", + "@azure/arm-network!ConnectionMonitorEndpointScopeItem:interface": "Microsoft.Network.ConnectionMonitorEndpointScopeItem", + "@azure/arm-network!ConnectionMonitorEndpointLocationDetails:interface": "Microsoft.Network.ConnectionMonitorEndpointLocationDetails", + "@azure/arm-network!ConnectionMonitorTestConfiguration:interface": "Microsoft.Network.ConnectionMonitorTestConfiguration", + "@azure/arm-network!ConnectionMonitorHttpConfiguration:interface": "Microsoft.Network.ConnectionMonitorHttpConfiguration", + "@azure/arm-network!ConnectionMonitorTcpConfiguration:interface": "Microsoft.Network.ConnectionMonitorTcpConfiguration", + "@azure/arm-network!ConnectionMonitorIcmpConfiguration:interface": "Microsoft.Network.ConnectionMonitorIcmpConfiguration", + "@azure/arm-network!ConnectionMonitorSuccessThreshold:interface": "Microsoft.Network.ConnectionMonitorSuccessThreshold", + "@azure/arm-network!ConnectionMonitorTestGroup:interface": "Microsoft.Network.ConnectionMonitorTestGroup", + "@azure/arm-network!ConnectionMonitorOutput:interface": "Microsoft.Network.ConnectionMonitorOutput", + "@azure/arm-network!ConnectionMonitorWorkspaceSettings:interface": "Microsoft.Network.ConnectionMonitorWorkspaceSettings", + "@azure/arm-network!TrackedResourceWithEtag:interface": "Microsoft.Network.TrackedResourceWithEtag", + "@azure/arm-network!ConnectionMonitor:interface": "Microsoft.Network.ConnectionMonitor", + "@azure/arm-network!ConnectionMonitorListResult:interface": "Microsoft.Network.ConnectionMonitorListResult", + "@azure/arm-network!PrivateDnsZoneGroup:interface": "Microsoft.Network.PrivateDnsZoneGroup", + "@azure/arm-network!PrivateDnsZoneGroupPropertiesFormat:interface": "Microsoft.Network.PrivateDnsZoneGroupPropertiesFormat", + "@azure/arm-network!PrivateDnsZoneConfig:interface": "Microsoft.Network.PrivateDnsZoneConfig", + "@azure/arm-network!PrivateDnsZonePropertiesFormat:interface": "Microsoft.Network.PrivateDnsZonePropertiesFormat", + "@azure/arm-network!RecordSet:interface": "Microsoft.Network.RecordSet", + "@azure/arm-network!PrivateDnsZoneGroupListResult:interface": "Microsoft.Network.PrivateDnsZoneGroupListResult", + "@azure/arm-network!RouteFilterRuleListResult:interface": "Microsoft.Network.RouteFilterRuleListResult", + "@azure/arm-network!ResourceNavigationLinksListResult:interface": "Microsoft.Network.ResourceNavigationLinksListResult", + "@azure/arm-network!ServiceAssociationLinksListResult:interface": "Microsoft.Network.ServiceAssociationLinksListResult", + "@azure/arm-network!GetVpnSitesConfigurationRequest:interface": "Microsoft.Network.GetVpnSitesConfigurationRequest", + "@azure/arm-network!VpnServerConfigurationsResponse:interface": "Microsoft.Network.VpnServerConfigurationsResponse", + "@azure/arm-network!ListVpnServerConfigurationPolicyGroupsResult:interface": "Microsoft.Network.ListVpnServerConfigurationPolicyGroupsResult", + "@azure/arm-network!HubVirtualNetworkConnection:interface": "Microsoft.Network.HubVirtualNetworkConnection", + "@azure/arm-network!HubVirtualNetworkConnectionProperties:interface": "Microsoft.Network.HubVirtualNetworkConnectionProperties", + "@azure/arm-network!ListHubVirtualNetworkConnectionsResult:interface": "Microsoft.Network.ListHubVirtualNetworkConnectionsResult", + "@azure/arm-network!ListVirtualHubRouteTableV2sResult:interface": "Microsoft.Network.ListVirtualHubRouteTableV2SResult", + "@azure/arm-network!VpnConnectionPacketCaptureStartParameters:interface": "Microsoft.Network.VpnConnectionPacketCaptureStartParameters", + "@azure/arm-network!VpnConnectionPacketCaptureStopParameters:interface": "Microsoft.Network.VpnConnectionPacketCaptureStopParameters", + "@azure/arm-network!ListVpnConnectionsResult:interface": "Microsoft.Network.ListVpnConnectionsResult", + "@azure/arm-network!ConnectionSharedKeyResult:interface": "Microsoft.Network.ConnectionSharedKeyResult", + "@azure/arm-network!SharedKeyProperties:interface": "Microsoft.Network.SharedKeyProperties", + "@azure/arm-network!ConnectionSharedKeyResultList:interface": "Microsoft.Network.ConnectionSharedKeyResultList", + "@azure/arm-network!ListVpnSiteLinkConnectionsResult:interface": "Microsoft.Network.ListVpnSiteLinkConnectionsResult", + "@azure/arm-network!ListVpnGatewayNatRulesResult:interface": "Microsoft.Network.ListVpnGatewayNatRulesResult", + "@azure/arm-network!ListP2SVpnGatewaysResult:interface": "Microsoft.Network.ListP2SVpnGatewaysResult", + "@azure/arm-network!P2SVpnProfileParameters:interface": "Microsoft.Network.P2SVpnProfileParameters", + "@azure/arm-network!P2SVpnConnectionHealthRequest:interface": "Microsoft.Network.P2SVpnConnectionHealthRequest", + "@azure/arm-network!P2SVpnConnectionHealth:interface": "Microsoft.Network.P2SVpnConnectionHealth", + "@azure/arm-network!ExpressRouteConnectionList:interface": "Microsoft.Network.ExpressRouteConnectionList", + "@azure/arm-network!BgpConnection:interface": "Microsoft.Network.BgpConnection", + "@azure/arm-network!BgpConnectionProperties:interface": "Microsoft.Network.BgpConnectionProperties", + "@azure/arm-network!ListVirtualHubBgpConnectionResults:interface": "Microsoft.Network.ListVirtualHubBgpConnectionResults", + "@azure/arm-network!PeerRoute:interface": "Microsoft.Network.PeerRoute", + "@azure/arm-network!HubIpConfiguration:interface": "Microsoft.Network.HubIpConfiguration", + "@azure/arm-network!HubIPConfigurationPropertiesFormat:interface": "Microsoft.Network.HubIPConfigurationPropertiesFormat", + "@azure/arm-network!ListVirtualHubIpConfigurationResults:interface": "Microsoft.Network.ListVirtualHubIpConfigurationResults", + "@azure/arm-network!RoutingIntent:interface": "Microsoft.Network.RoutingIntent", + "@azure/arm-network!RoutingIntentProperties:interface": "Microsoft.Network.RoutingIntentProperties", + "@azure/arm-network!RoutingPolicy:interface": "Microsoft.Network.RoutingPolicy", + "@azure/arm-network!ListRoutingIntentResult:interface": "Microsoft.Network.ListRoutingIntentResult", + "@azure/arm-network!AvailableDelegationsResult:interface": "Microsoft.Network.AvailableDelegationsResult", + "@azure/arm-network!AvailableDelegation:interface": "Microsoft.Network.AvailableDelegation", + "@azure/arm-network!AvailableServiceAliasesResult:interface": "Microsoft.Network.AvailableServiceAliasesResult", + "@azure/arm-network!AvailableServiceAlias:interface": "Microsoft.Network.AvailableServiceAlias", + "@azure/arm-network!AzureFirewallFqdnTagListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!AzureFirewallFqdnTag:interface": "Microsoft.Network.AzureFirewallFqdnTag", + "@azure/arm-network!AzureFirewallFqdnTagPropertiesFormat:interface": "Microsoft.Network.AzureFirewallFqdnTagPropertiesFormat", + "@azure/arm-network!EndpointServicesListResult:interface": "Microsoft.Network.EndpointServicesListResult", + "@azure/arm-network!EndpointServiceResult:interface": "Microsoft.Network.EndpointServiceResult", + "@azure/arm-network!ExpressRouteServiceProviderListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!ExpressRouteServiceProvider:interface": "Microsoft.Network.ExpressRouteServiceProvider", + "@azure/arm-network!ExpressRouteServiceProviderPropertiesFormat:interface": "Microsoft.Network.ExpressRouteServiceProviderPropertiesFormat", + "@azure/arm-network!ExpressRouteServiceProviderBandwidthsOffered:interface": "Microsoft.Network.ExpressRouteServiceProviderBandwidthsOffered", + "@azure/arm-network!PerimeterAssociableResourcesListResult:interface": "Microsoft.Network.PerimeterAssociableResourcesListResult", + "@azure/arm-network!PerimeterAssociableResource:interface": "Microsoft.Network.PerimeterAssociableResource", + "@azure/arm-network!PerimeterAssociableResourceProperties:interface": "Microsoft.Network.PerimeterAssociableResourceProperties", + "@azure/arm-network!OperationStatusResult:interface": "Azure.ResourceManager.CommonTypes.OperationStatusResult", + "@azure/arm-network!NspServiceTagsListResult:interface": "Microsoft.Network.NspServiceTagsListResult", + "@azure/arm-network!NspServiceTagsResource:interface": "Microsoft.Network.NspServiceTagsResource", + "@azure/arm-network!AvailablePrivateEndpointTypesResult:interface": "Microsoft.Network.AvailablePrivateEndpointTypesResult", + "@azure/arm-network!AvailablePrivateEndpointType:interface": "Microsoft.Network.AvailablePrivateEndpointType", + "@azure/arm-network!BgpServiceCommunityListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-network!BgpServiceCommunity:interface": "Microsoft.Network.BgpServiceCommunity", + "@azure/arm-network!BgpServiceCommunityPropertiesFormat:interface": "Microsoft.Network.BgpServiceCommunityPropertiesFormat", + "@azure/arm-network!BGPCommunity:interface": "Microsoft.Network.BGPCommunity", + "@azure/arm-network!ServiceTagsListResult:interface": "Microsoft.Network.ServiceTagsListResult", + "@azure/arm-network!ServiceTagInformation:interface": "Microsoft.Network.ServiceTagInformation", + "@azure/arm-network!ServiceTagInformationPropertiesFormat:interface": "Microsoft.Network.ServiceTagInformationPropertiesFormat", + "@azure/arm-network!ServiceTagInformationListResult:interface": "Microsoft.Network.ServiceTagInformationListResult", + "@azure/arm-network!UsagesListResult:interface": "Microsoft.Network.UsagesListResult", + "@azure/arm-network!Usage:interface": "Microsoft.Network.Usage", + "@azure/arm-network!UsageName:interface": "Microsoft.Network.UsageName", + "@azure/arm-network!KnownArmResourceProvisioningState:enum": "Azure.ResourceManager.ResourceProvisioningState", + "@azure/arm-network!KnownBastionConnectProtocol:enum": "Microsoft.Network.BastionConnectProtocol", + "@azure/arm-network!KnownConnectivityTopology:enum": "Microsoft.Network.ConnectivityTopology", + "@azure/arm-network!KnownIsGlobal:enum": "Microsoft.Network.IsGlobal", + "@azure/arm-network!KnownConnectedGroupPrivateEndpointsScale:enum": "Microsoft.Network.ConnectedGroupPrivateEndpointsScale", + "@azure/arm-network!KnownConnectedGroupAddressOverlap:enum": "Microsoft.Network.ConnectedGroupAddressOverlap", + "@azure/arm-network!KnownPeeringEnforcement:enum": "Microsoft.Network.PeeringEnforcement", + "@azure/arm-network!KnownUseHubGateway:enum": "Microsoft.Network.UseHubGateway", + "@azure/arm-network!KnownGroupConnectivity:enum": "Microsoft.Network.GroupConnectivity", + "@azure/arm-network!KnownCommonProvisioningState:enum": "Common.ProvisioningState", + "@azure/arm-network!KnownDeleteExistingPeering:enum": "Microsoft.Network.DeleteExistingPeering", + "@azure/arm-network!KnownGroupMemberType:enum": "Microsoft.Network.GroupMemberType", + "@azure/arm-network!KnownEffectiveAdminRuleKind:enum": "Microsoft.Network.EffectiveAdminRuleKind", + "@azure/arm-network!KnownSecurityConfigurationRuleProtocol:enum": "Microsoft.Network.SecurityConfigurationRuleProtocol", + "@azure/arm-network!KnownAddressPrefixType:enum": "Microsoft.Network.AddressPrefixType", + "@azure/arm-network!KnownSecurityConfigurationRuleAccess:enum": "Microsoft.Network.SecurityConfigurationRuleAccess", + "@azure/arm-network!KnownSecurityConfigurationRuleDirection:enum": "Microsoft.Network.SecurityConfigurationRuleDirection", + "@azure/arm-network!KnownVirtualWanSecurityProviderType:enum": "Microsoft.Network.VirtualWanSecurityProviderType", + "@azure/arm-network!KnownAuthenticationMethod:enum": "Microsoft.Network.AuthenticationMethod", + "@azure/arm-network!KnownApplicationGatewaySkuName:enum": "Microsoft.Network.ApplicationGatewaySkuName", + "@azure/arm-network!KnownApplicationGatewayTier:enum": "Microsoft.Network.ApplicationGatewayTier", + "@azure/arm-network!KnownApplicationGatewaySkuFamily:enum": "Microsoft.Network.ApplicationGatewaySkuFamily", + "@azure/arm-network!KnownApplicationGatewaySslProtocol:enum": "Microsoft.Network.ApplicationGatewaySslProtocol", + "@azure/arm-network!KnownApplicationGatewaySslPolicyType:enum": "Microsoft.Network.ApplicationGatewaySslPolicyType", + "@azure/arm-network!KnownApplicationGatewaySslPolicyName:enum": "Microsoft.Network.ApplicationGatewaySslPolicyName", + "@azure/arm-network!KnownApplicationGatewaySslCipherSuite:enum": "Microsoft.Network.ApplicationGatewaySslCipherSuite", + "@azure/arm-network!KnownApplicationGatewayOperationalState:enum": "Microsoft.Network.ApplicationGatewayOperationalState", + "@azure/arm-network!KnownIPAllocationMethod:enum": "Common.IPAllocationMethod", + "@azure/arm-network!KnownApplicationGatewayProtocol:enum": "Microsoft.Network.ApplicationGatewayProtocol", + "@azure/arm-network!KnownIPVersion:enum": "Common.IPVersion", + "@azure/arm-network!KnownSecurityRuleProtocol:enum": "Common.SecurityRuleProtocol", + "@azure/arm-network!KnownSecurityRuleAccess:enum": "Common.SecurityRuleAccess", + "@azure/arm-network!KnownSecurityRuleDirection:enum": "Common.SecurityRuleDirection", + "@azure/arm-network!KnownPrivateEndpointIPVersionType:enum": "Common.PrivateEndpointIPVersionType", + "@azure/arm-network!KnownPrivateEndpointBillingSku:enum": "Common.PrivateEndpointBillingSku", + "@azure/arm-network!KnownExtendedLocationTypes:enum": "Common.ExtendedLocationTypes", + "@azure/arm-network!KnownNetworkInterfaceNicType:enum": "Common.NetworkInterfaceNicType", + "@azure/arm-network!KnownAccessMode:enum": "Common.AccessMode", + "@azure/arm-network!KnownNetworkInterfaceMigrationPhase:enum": "Common.NetworkInterfaceMigrationPhase", + "@azure/arm-network!KnownNetworkInterfaceAuxiliaryMode:enum": "Common.NetworkInterfaceAuxiliaryMode", + "@azure/arm-network!KnownNetworkInterfaceAuxiliarySku:enum": "Common.NetworkInterfaceAuxiliarySku", + "@azure/arm-network!KnownFlowLogFormatType:enum": "Common.FlowLogFormatType", + "@azure/arm-network!KnownResourceIdentityType:enum": "Common.ResourceIdentityType", + "@azure/arm-network!KnownRouteNextHopType:enum": "Common.RouteNextHopType", + "@azure/arm-network!KnownDisablePeeringRoute:enum": "Common.DisablePeeringRoute", + "@azure/arm-network!KnownPublicIpAddressDnsSettingsDomainNameLabelScope:enum": "Common.PublicIpAddressDnsSettingsDomainNameLabelScope", + "@azure/arm-network!KnownDdosSettingsProtectionMode:enum": "Common.DdosSettingsProtectionMode", + "@azure/arm-network!KnownNat64State:enum": "Common.Nat64State", + "@azure/arm-network!KnownNatGatewaySkuName:enum": "Common.NatGatewaySkuName", + "@azure/arm-network!KnownPublicIPAddressMigrationPhase:enum": "Common.PublicIPAddressMigrationPhase", + "@azure/arm-network!KnownDeleteOptions:enum": "Common.DeleteOptions", + "@azure/arm-network!KnownPublicIPAddressSkuName:enum": "Common.PublicIPAddressSkuName", + "@azure/arm-network!KnownPublicIPAddressSkuTier:enum": "Common.PublicIPAddressSkuTier", + "@azure/arm-network!KnownVirtualNetworkPrivateEndpointNetworkPolicies:enum": "Common.VirtualNetworkPrivateEndpointNetworkPolicies", + "@azure/arm-network!KnownVirtualNetworkPrivateLinkServiceNetworkPolicies:enum": "Common.VirtualNetworkPrivateLinkServiceNetworkPolicies", + "@azure/arm-network!KnownSharingScope:enum": "Common.SharingScope", + "@azure/arm-network!KnownGatewayLoadBalancerTunnelProtocol:enum": "Common.GatewayLoadBalancerTunnelProtocol", + "@azure/arm-network!KnownGatewayLoadBalancerTunnelInterfaceType:enum": "Common.GatewayLoadBalancerTunnelInterfaceType", + "@azure/arm-network!KnownLoadBalancerBackendAddressAdminState:enum": "Common.LoadBalancerBackendAddressAdminState", + "@azure/arm-network!KnownSyncMode:enum": "Common.SyncMode", + "@azure/arm-network!KnownTransportProtocol:enum": "Common.TransportProtocol", + "@azure/arm-network!KnownApplicationGatewayCookieBasedAffinity:enum": "Microsoft.Network.ApplicationGatewayCookieBasedAffinity", + "@azure/arm-network!KnownApplicationGatewayCustomErrorStatusCode:enum": "Microsoft.Network.ApplicationGatewayCustomErrorStatusCode", + "@azure/arm-network!KnownApplicationGatewayClientRevocationOptions:enum": "Microsoft.Network.ApplicationGatewayClientRevocationOptions", + "@azure/arm-network!KnownApplicationGatewayClientAuthVerificationModes:enum": "Microsoft.Network.ApplicationGatewayClientAuthVerificationModes", + "@azure/arm-network!KnownApplicationGatewayRequestRoutingRuleType:enum": "Microsoft.Network.ApplicationGatewayRequestRoutingRuleType", + "@azure/arm-network!KnownApplicationGatewayRedirectType:enum": "Microsoft.Network.ApplicationGatewayRedirectType", + "@azure/arm-network!KnownApplicationGatewayFirewallMode:enum": "Microsoft.Network.ApplicationGatewayFirewallMode", + "@azure/arm-network!KnownApplicationGatewayLoadDistributionAlgorithm:enum": "Microsoft.Network.ApplicationGatewayLoadDistributionAlgorithm", + "@azure/arm-network!KnownApplicationGatewayUnAuthorizedRequestAction:enum": "Microsoft.Network.ApplicationGatewayUnAuthorizedRequestAction", + "@azure/arm-network!KnownApplicationGatewayBackendHealthServerHealth:enum": "Microsoft.Network.ApplicationGatewayBackendHealthServerHealth", + "@azure/arm-network!KnownApplicationGatewayWafRuleStateTypes:enum": "Microsoft.Network.ApplicationGatewayWafRuleStateTypes", + "@azure/arm-network!KnownApplicationGatewayWafRuleActionTypes:enum": "Microsoft.Network.ApplicationGatewayWafRuleActionTypes", + "@azure/arm-network!KnownApplicationGatewayWafRuleSensitivityTypes:enum": "Microsoft.Network.ApplicationGatewayWafRuleSensitivityTypes", + "@azure/arm-network!KnownApplicationGatewayTierTypes:enum": "Microsoft.Network.ApplicationGatewayTierTypes", + "@azure/arm-network!KnownAzureFirewallRCActionType:enum": "Microsoft.Network.AzureFirewallRCActionType", + "@azure/arm-network!KnownAzureFirewallApplicationRuleProtocolType:enum": "Microsoft.Network.AzureFirewallApplicationRuleProtocolType", + "@azure/arm-network!KnownAzureFirewallNatRCActionType:enum": "Microsoft.Network.AzureFirewallNatRCActionType", + "@azure/arm-network!KnownAzureFirewallNetworkRuleProtocol:enum": "Microsoft.Network.AzureFirewallNetworkRuleProtocol", + "@azure/arm-network!KnownAzureFirewallThreatIntelMode:enum": "Microsoft.Network.AzureFirewallThreatIntelMode", + "@azure/arm-network!KnownAzureFirewallSkuName:enum": "Microsoft.Network.AzureFirewallSkuName", + "@azure/arm-network!KnownAzureFirewallSkuTier:enum": "Microsoft.Network.AzureFirewallSkuTier", + "@azure/arm-network!KnownAzureFirewallPacketCaptureFlagsType:enum": "Microsoft.Network.AzureFirewallPacketCaptureFlagsType", + "@azure/arm-network!KnownAzureFirewallPacketCaptureOperationType:enum": "Microsoft.Network.AzureFirewallPacketCaptureOperationType", + "@azure/arm-network!KnownAzureFirewallPacketCaptureResponseCode:enum": "Microsoft.Network.AzureFirewallPacketCaptureResponseCode", + "@azure/arm-network!KnownBastionHostSkuName:enum": "Microsoft.Network.BastionHostSkuName", + "@azure/arm-network!KnownEffectiveRouteSource:enum": "Microsoft.Network.EffectiveRouteSource", + "@azure/arm-network!KnownEffectiveRouteState:enum": "Microsoft.Network.EffectiveRouteState", + "@azure/arm-network!KnownEffectiveSecurityRuleProtocol:enum": "Microsoft.Network.EffectiveSecurityRuleProtocol", + "@azure/arm-network!KnownIsWorkloadProtected:enum": "Microsoft.Network.IsWorkloadProtected", + "@azure/arm-network!KnownIsRollback:enum": "Microsoft.Network.IsRollback", + "@azure/arm-network!KnownDdosDetectionMode:enum": "Microsoft.Network.DdosDetectionMode", + "@azure/arm-network!KnownDdosTrafficType:enum": "Microsoft.Network.DdosTrafficType", + "@azure/arm-network!KnownAuthorizationUseStatus:enum": "Microsoft.Network.AuthorizationUseStatus", + "@azure/arm-network!KnownServiceProviderProvisioningState:enum": "Microsoft.Network.ServiceProviderProvisioningState", + "@azure/arm-network!KnownExpressRoutePeeringType:enum": "Microsoft.Network.ExpressRoutePeeringType", + "@azure/arm-network!KnownExpressRoutePeeringState:enum": "Microsoft.Network.ExpressRoutePeeringState", + "@azure/arm-network!KnownExpressRouteCircuitPeeringAdvertisedPublicPrefixState:enum": "Microsoft.Network.ExpressRouteCircuitPeeringAdvertisedPublicPrefixState", + "@azure/arm-network!KnownAdvertisedPublicPrefixPropertiesValidationState:enum": "Microsoft.Network.AdvertisedPublicPrefixPropertiesValidationState", + "@azure/arm-network!KnownExpressRouteCircuitPeeringState:enum": "Microsoft.Network.ExpressRouteCircuitPeeringState", + "@azure/arm-network!KnownCircuitConnectionStatus:enum": "Microsoft.Network.CircuitConnectionStatus", + "@azure/arm-network!KnownExpressRouteCircuitSkuTier:enum": "Microsoft.Network.ExpressRouteCircuitSkuTier", + "@azure/arm-network!KnownExpressRouteCircuitSkuFamily:enum": "Microsoft.Network.ExpressRouteCircuitSkuFamily", + "@azure/arm-network!KnownFailoverTestStatus:enum": "Microsoft.Network.FailoverTestStatus", + "@azure/arm-network!KnownFailoverTestType:enum": "Microsoft.Network.FailoverTestType", + "@azure/arm-network!KnownMaintenanceTestCategory:enum": "Microsoft.Network.MaintenanceTestCategory", + "@azure/arm-network!KnownExpressRouteFailoverLinkType:enum": "Microsoft.Network.ExpressRouteFailoverLinkType", + "@azure/arm-network!KnownExpressRouteFailoverBgpStatusAddressFamily:enum": "Microsoft.Network.ExpressRouteFailoverBgpStatusAddressFamily", + "@azure/arm-network!KnownExpressRouteLinkFailoverBgpStatus:enum": "Microsoft.Network.ExpressRouteLinkFailoverBgpStatus", + "@azure/arm-network!KnownExpressRoutePortsEncapsulation:enum": "Microsoft.Network.ExpressRoutePortsEncapsulation", + "@azure/arm-network!KnownExpressRouteLinkConnectorType:enum": "Microsoft.Network.ExpressRouteLinkConnectorType", + "@azure/arm-network!KnownExpressRouteLinkAdminState:enum": "Microsoft.Network.ExpressRouteLinkAdminState", + "@azure/arm-network!KnownExpressRouteLinkMacSecCipher:enum": "Microsoft.Network.ExpressRouteLinkMacSecCipher", + "@azure/arm-network!KnownExpressRouteLinkMacSecSciState:enum": "Microsoft.Network.ExpressRouteLinkMacSecSciState", + "@azure/arm-network!KnownExpressRoutePortsBillingType:enum": "Microsoft.Network.ExpressRoutePortsBillingType", + "@azure/arm-network!KnownExpressRoutePortAuthorizationUseStatus:enum": "Microsoft.Network.ExpressRoutePortAuthorizationUseStatus", + "@azure/arm-network!KnownAutoLearnPrivateRangesMode:enum": "Microsoft.Network.AutoLearnPrivateRangesMode", + "@azure/arm-network!KnownFirewallPolicyIntrusionDetectionStateType:enum": "Microsoft.Network.FirewallPolicyIntrusionDetectionStateType", + "@azure/arm-network!KnownFirewallPolicyIntrusionDetectionProfileType:enum": "Microsoft.Network.FirewallPolicyIntrusionDetectionProfileType", + "@azure/arm-network!KnownFirewallPolicyIntrusionDetectionProtocol:enum": "Microsoft.Network.FirewallPolicyIntrusionDetectionProtocol", + "@azure/arm-network!KnownFirewallPolicySkuTier:enum": "Microsoft.Network.FirewallPolicySkuTier", + "@azure/arm-network!KnownFirewallPolicyRuleCollectionType:enum": "Microsoft.Network.FirewallPolicyRuleCollectionType", + "@azure/arm-network!KnownFirewallPolicyNatRuleCollectionActionType:enum": "Microsoft.Network.FirewallPolicyNatRuleCollectionActionType", + "@azure/arm-network!KnownFirewallPolicyRuleType:enum": "Microsoft.Network.FirewallPolicyRuleType", + "@azure/arm-network!KnownFirewallPolicyRuleApplicationProtocolType:enum": "Microsoft.Network.FirewallPolicyRuleApplicationProtocolType", + "@azure/arm-network!KnownFirewallPolicyRuleNetworkProtocol:enum": "Microsoft.Network.FirewallPolicyRuleNetworkProtocol", + "@azure/arm-network!KnownFirewallPolicyFilterRuleCollectionActionType:enum": "Microsoft.Network.FirewallPolicyFilterRuleCollectionActionType", + "@azure/arm-network!KnownIpType:enum": "Microsoft.Network.IpType", + "@azure/arm-network!KnowncreatedByType:enum": "Azure.ResourceManager.CommonTypes.createdByType", + "@azure/arm-network!KnownConfigurationType:enum": "Microsoft.Network.ConfigurationType", + "@azure/arm-network!KnownIpAllocationType:enum": "Microsoft.Network.IpAllocationType", + "@azure/arm-network!KnownLoadBalancerDetailLevel:enum": "Microsoft.Network.LoadBalancerDetailLevel", + "@azure/arm-network!KnownLoadDistribution:enum": "Common.LoadDistribution", + "@azure/arm-network!KnownProbeProtocol:enum": "Common.ProbeProtocol", + "@azure/arm-network!KnownProbeNoHealthyBackendsBehavior:enum": "Common.ProbeNoHealthyBackendsBehavior", + "@azure/arm-network!KnownLoadBalancerOutboundRuleProtocol:enum": "Common.LoadBalancerOutboundRuleProtocol", + "@azure/arm-network!KnownLoadBalancerScope:enum": "Common.LoadBalancerScope", + "@azure/arm-network!KnownLoadBalancerSkuName:enum": "Common.LoadBalancerSkuName", + "@azure/arm-network!KnownLoadBalancerSkuTier:enum": "Common.LoadBalancerSkuTier", + "@azure/arm-network!KnownScopeConnectionState:enum": "Microsoft.Network.ScopeConnectionState", + "@azure/arm-network!KnownRouteTableUsageMode:enum": "Microsoft.Network.RouteTableUsageMode", + "@azure/arm-network!KnownDisableBgpRoutePropagation:enum": "Microsoft.Network.DisableBgpRoutePropagation", + "@azure/arm-network!KnownRoutingRuleDestinationType:enum": "Microsoft.Network.RoutingRuleDestinationType", + "@azure/arm-network!KnownRoutingRuleNextHopType:enum": "Microsoft.Network.RoutingRuleNextHopType", + "@azure/arm-network!KnownNetworkIntentPolicyBasedService:enum": "Microsoft.Network.NetworkIntentPolicyBasedService", + "@azure/arm-network!KnownAddressSpaceAggregationOption:enum": "Microsoft.Network.AddressSpaceAggregationOption", + "@azure/arm-network!KnownNspProvisioningState:enum": "Microsoft.Network.NspProvisioningState", + "@azure/arm-network!KnownCreatedByType:enum": "Microsoft.Network.CreatedByType", + "@azure/arm-network!KnownNetworkProtocol:enum": "Microsoft.Network.NetworkProtocol", + "@azure/arm-network!KnownVnetLocalRouteOverrideCriteria:enum": "Microsoft.Network.VnetLocalRouteOverrideCriteria", + "@azure/arm-network!KnownNicTypeInResponse:enum": "Microsoft.Network.NicTypeInResponse", + "@azure/arm-network!KnownNicTypeInRequest:enum": "Microsoft.Network.NicTypeInRequest", + "@azure/arm-network!KnownNvaNicType:enum": "Microsoft.Network.NvaNicType", + "@azure/arm-network!KnownAssociationType:enum": "Microsoft.Network.AssociationType", + "@azure/arm-network!KnownDirection:enum": "Microsoft.Network.Direction", + "@azure/arm-network!KnownIpFlowProtocol:enum": "Microsoft.Network.IpFlowProtocol", + "@azure/arm-network!KnownAccess:enum": "Microsoft.Network.Access", + "@azure/arm-network!KnownNextHopType:enum": "Microsoft.Network.NextHopType", + "@azure/arm-network!KnownProtocol:enum": "Microsoft.Network.Protocol", + "@azure/arm-network!KnownHTTPMethod:enum": "Microsoft.Network.HttpMethod", + "@azure/arm-network!KnownOrigin:enum": "Microsoft.Network.Origin", + "@azure/arm-network!KnownSeverity:enum": "Microsoft.Network.Severity", + "@azure/arm-network!KnownIssueType:enum": "Microsoft.Network.IssueType", + "@azure/arm-network!KnownConnectionStatus:enum": "Microsoft.Network.ConnectionStatus", + "@azure/arm-network!KnownVerbosityLevel:enum": "Microsoft.Network.VerbosityLevel", + "@azure/arm-network!KnownPublicIPPrefixSkuName:enum": "Microsoft.Network.PublicIPPrefixSkuName", + "@azure/arm-network!KnownPublicIPPrefixSkuTier:enum": "Microsoft.Network.PublicIPPrefixSkuTier", + "@azure/arm-network!KnownRouteFilterRuleType:enum": "Microsoft.Network.RouteFilterRuleType", + "@azure/arm-network!KnownSecurityProviderName:enum": "Microsoft.Network.SecurityProviderName", + "@azure/arm-network!KnownSecurityPartnerProviderConnectionStatus:enum": "Microsoft.Network.SecurityPartnerProviderConnectionStatus", + "@azure/arm-network!KnownVirtualNetworkEncryptionEnforcement:enum": "Common.VirtualNetworkEncryptionEnforcement", + "@azure/arm-network!KnownVirtualNetworkPeeringState:enum": "Common.VirtualNetworkPeeringState", + "@azure/arm-network!KnownVirtualNetworkPeeringLevel:enum": "Common.VirtualNetworkPeeringLevel", + "@azure/arm-network!KnownPrivateEndpointVNetPolicies:enum": "Common.PrivateEndpointVNetPolicies", + "@azure/arm-network!KnownSyncRemoteAddressSpace:enum": "Microsoft.Network.SyncRemoteAddressSpace", + "@azure/arm-network!KnownVirtualNetworkGatewayType:enum": "Microsoft.Network.VirtualNetworkGatewayType", + "@azure/arm-network!KnownVpnType:enum": "Microsoft.Network.VpnType", + "@azure/arm-network!KnownVpnGatewayGeneration:enum": "Microsoft.Network.VpnGatewayGeneration", + "@azure/arm-network!KnownVirtualNetworkGatewayMigrationState:enum": "Microsoft.Network.VirtualNetworkGatewayMigrationState", + "@azure/arm-network!KnownVirtualNetworkGatewayMigrationPhase:enum": "Microsoft.Network.VirtualNetworkGatewayMigrationPhase", + "@azure/arm-network!KnownVirtualNetworkGatewaySkuName:enum": "Microsoft.Network.VirtualNetworkGatewaySkuName", + "@azure/arm-network!KnownVirtualNetworkGatewaySkuTier:enum": "Microsoft.Network.VirtualNetworkGatewaySkuTier", + "@azure/arm-network!KnownVpnClientProtocol:enum": "Microsoft.Network.VpnClientProtocol", + "@azure/arm-network!KnownVpnAuthenticationType:enum": "Microsoft.Network.VpnAuthenticationType", + "@azure/arm-network!KnownIpsecEncryption:enum": "Microsoft.Network.IpsecEncryption", + "@azure/arm-network!KnownIpsecIntegrity:enum": "Microsoft.Network.IpsecIntegrity", + "@azure/arm-network!KnownIkeEncryption:enum": "Microsoft.Network.IkeEncryption", + "@azure/arm-network!KnownIkeIntegrity:enum": "Microsoft.Network.IkeIntegrity", + "@azure/arm-network!KnownDhGroup:enum": "Microsoft.Network.DhGroup", + "@azure/arm-network!KnownPfsGroup:enum": "Microsoft.Network.PfsGroup", + "@azure/arm-network!KnownVpnPolicyMemberAttributeType:enum": "Microsoft.Network.VpnPolicyMemberAttributeType", + "@azure/arm-network!KnownVpnNatRuleType:enum": "Microsoft.Network.VpnNatRuleType", + "@azure/arm-network!KnownVpnNatRuleMode:enum": "Microsoft.Network.VpnNatRuleMode", + "@azure/arm-network!KnownAdminState:enum": "Microsoft.Network.AdminState", + "@azure/arm-network!KnownResiliencyModel:enum": "Microsoft.Network.ResiliencyModel", + "@azure/arm-network!KnownVirtualNetworkGatewayConnectionType:enum": "Microsoft.Network.VirtualNetworkGatewayConnectionType", + "@azure/arm-network!KnownVirtualNetworkGatewayConnectionProtocol:enum": "Microsoft.Network.VirtualNetworkGatewayConnectionProtocol", + "@azure/arm-network!KnownVirtualNetworkGatewayConnectionMode:enum": "Microsoft.Network.VirtualNetworkGatewayConnectionMode", + "@azure/arm-network!KnownVirtualNetworkGatewayConnectionStatus:enum": "Microsoft.Network.VirtualNetworkGatewayConnectionStatus", + "@azure/arm-network!KnownProcessorArchitecture:enum": "Microsoft.Network.ProcessorArchitecture", + "@azure/arm-network!KnownBgpPeerState:enum": "Microsoft.Network.BgpPeerState", + "@azure/arm-network!KnownFailoverConnectionStatus:enum": "Microsoft.Network.FailoverConnectionStatus", + "@azure/arm-network!KnownFailoverTestStatusForSingleTest:enum": "Microsoft.Network.FailoverTestStatusForSingleTest", + "@azure/arm-network!KnownVirtualNetworkGatewayMigrationType:enum": "Microsoft.Network.VirtualNetworkGatewayMigrationType", + "@azure/arm-network!KnownConnectionAuthenticationType:enum": "Microsoft.Network.ConnectionAuthenticationType", + "@azure/arm-network!KnownOfficeTrafficCategory:enum": "Microsoft.Network.OfficeTrafficCategory", + "@azure/arm-network!KnownVpnGatewayTunnelingProtocol:enum": "Microsoft.Network.VpnGatewayTunnelingProtocol", + "@azure/arm-network!KnownRoutingState:enum": "Microsoft.Network.RoutingState", + "@azure/arm-network!KnownPreferredRoutingGateway:enum": "Microsoft.Network.PreferredRoutingGateway", + "@azure/arm-network!KnownHubRoutingPreference:enum": "Microsoft.Network.HubRoutingPreference", + "@azure/arm-network!KnownRouteMapMatchCondition:enum": "Microsoft.Network.RouteMapMatchCondition", + "@azure/arm-network!KnownRouteMapActionType:enum": "Microsoft.Network.RouteMapActionType", + "@azure/arm-network!KnownNextStep:enum": "Microsoft.Network.NextStep", + "@azure/arm-network!KnownVpnConnectionStatus:enum": "Microsoft.Network.VpnConnectionStatus", + "@azure/arm-network!KnownVpnLinkConnectionMode:enum": "Microsoft.Network.VpnLinkConnectionMode", + "@azure/arm-network!KnownWebApplicationFirewallEnabledState:enum": "Microsoft.Network.WebApplicationFirewallEnabledState", + "@azure/arm-network!KnownWebApplicationFirewallMode:enum": "Microsoft.Network.WebApplicationFirewallMode", + "@azure/arm-network!KnownWebApplicationFirewallScrubbingState:enum": "Microsoft.Network.WebApplicationFirewallScrubbingState", + "@azure/arm-network!KnownScrubbingRuleEntryMatchVariable:enum": "Microsoft.Network.ScrubbingRuleEntryMatchVariable", + "@azure/arm-network!KnownscrubbingRuleEntryMatchOperator:enum": "Microsoft.Network.ScrubbingRuleEntryMatchOperator", + "@azure/arm-network!KnownscrubbingRuleEntryState:enum": "Microsoft.Network.ScrubbingRuleEntryState", + "@azure/arm-network!KnownWebApplicationFirewallState:enum": "Microsoft.Network.WebApplicationFirewallState", + "@azure/arm-network!KnownApplicationGatewayFirewallRateLimitDuration:enum": "Microsoft.Network.ApplicationGatewayFirewallRateLimitDuration", + "@azure/arm-network!KnownWebApplicationFirewallRuleType:enum": "Microsoft.Network.WebApplicationFirewallRuleType", + "@azure/arm-network!KnownWebApplicationFirewallMatchVariable:enum": "Microsoft.Network.WebApplicationFirewallMatchVariable", + "@azure/arm-network!KnownWebApplicationFirewallOperator:enum": "Microsoft.Network.WebApplicationFirewallOperator", + "@azure/arm-network!KnownWebApplicationFirewallTransform:enum": "Microsoft.Network.WebApplicationFirewallTransform", + "@azure/arm-network!KnownApplicationGatewayFirewallUserSessionVariable:enum": "Microsoft.Network.ApplicationGatewayFirewallUserSessionVariable", + "@azure/arm-network!KnownWebApplicationFirewallAction:enum": "Microsoft.Network.WebApplicationFirewallAction", + "@azure/arm-network!KnownWebApplicationFirewallPolicyResourceState:enum": "Microsoft.Network.WebApplicationFirewallPolicyResourceState", + "@azure/arm-network!KnownExceptionEntryMatchVariable:enum": "Microsoft.Network.ExceptionEntryMatchVariable", + "@azure/arm-network!KnownExceptionEntryValueMatchOperator:enum": "Microsoft.Network.ExceptionEntryValueMatchOperator", + "@azure/arm-network!KnownExceptionEntrySelectorMatchOperator:enum": "Microsoft.Network.ExceptionEntrySelectorMatchOperator", + "@azure/arm-network!KnownOwaspCrsExclusionEntryMatchVariable:enum": "Microsoft.Network.OwaspCrsExclusionEntryMatchVariable", + "@azure/arm-network!KnownOwaspCrsExclusionEntrySelectorMatchOperator:enum": "Microsoft.Network.OwaspCrsExclusionEntrySelectorMatchOperator", + "@azure/arm-network!KnownManagedRuleEnabledState:enum": "Microsoft.Network.ManagedRuleEnabledState", + "@azure/arm-network!KnownActionType:enum": "Microsoft.Network.ActionType", + "@azure/arm-network!KnownSensitivityType:enum": "Microsoft.Network.SensitivityType", + "@azure/arm-network!KnownVirtualNetworkApplianceIpVersionType:enum": "Microsoft.Network.VirtualNetworkApplianceIpVersionType", + "@azure/arm-network!KnownServiceGatewaySkuName:enum": "Microsoft.Network.ServiceGatewaySkuName", + "@azure/arm-network!KnownServiceGatewaySkuTier:enum": "Microsoft.Network.ServiceGatewaySkuTier", + "@azure/arm-network!KnownUpdateAction:enum": "Microsoft.Network.UpdateAction", + "@azure/arm-network!KnownAddressUpdateAction:enum": "Microsoft.Network.AddressUpdateAction", + "@azure/arm-network!KnownServiceUpdateAction:enum": "Microsoft.Network.ServiceUpdateAction", + "@azure/arm-network!KnownServiceType:enum": "Microsoft.Network.ServiceType", + "@azure/arm-network!KnownInterconnectGroupScope:enum": "Microsoft.Network.InterconnectGroupScope", + "@azure/arm-network!KnownSubgroupProfileScope:enum": "Microsoft.Network.SubgroupProfileScope", + "@azure/arm-network!KnownApplicationGatewayRuleSetStatusOptions:enum": "Microsoft.Network.ApplicationGatewayRuleSetStatusOptions", + "@azure/arm-network!KnownSlotType:enum": "Microsoft.Network.SlotType", + "@azure/arm-network!KnownCommissionedState:enum": "Microsoft.Network.CommissionedState", + "@azure/arm-network!KnownGeo:enum": "Microsoft.Network.Geo", + "@azure/arm-network!KnownCustomIpPrefixType:enum": "Microsoft.Network.CustomIpPrefixType", + "@azure/arm-network!KnownProtocolType:enum": "Microsoft.Network.ProtocolType", + "@azure/arm-network!KnownFirewallPolicyIDPSQuerySortOrder:enum": "Microsoft.Network.FirewallPolicyIdpsQuerySortOrder", + "@azure/arm-network!KnownFirewallPolicyIDPSSignatureMode:enum": "Microsoft.Network.FirewallPolicyIdpsSignatureMode", + "@azure/arm-network!KnownFirewallPolicyIDPSSignatureSeverity:enum": "Microsoft.Network.FirewallPolicyIdpsSignatureSeverity", + "@azure/arm-network!KnownFirewallPolicyIDPSSignatureDirection:enum": "Microsoft.Network.FirewallPolicyIdpsSignatureDirection", + "@azure/arm-network!KnownDeploymentStatus:enum": "Microsoft.Network.DeploymentStatus", + "@azure/arm-network!KnownAdminRuleKind:enum": "Microsoft.Network.AdminRuleKind", + "@azure/arm-network!KnownAccessRuleDirection:enum": "Microsoft.Network.AccessRuleDirection", + "@azure/arm-network!KnownAssociationAccessMode:enum": "Microsoft.Network.AssociationAccessMode", + "@azure/arm-network!KnownNspLinkProvisioningState:enum": "Microsoft.Network.NspLinkProvisioningState", + "@azure/arm-network!KnownNspLinkStatus:enum": "Microsoft.Network.NspLinkStatus", + "@azure/arm-network!KnownInboundSecurityRuleType:enum": "Microsoft.Network.InboundSecurityRuleType", + "@azure/arm-network!KnownInboundSecurityRulesProtocol:enum": "Microsoft.Network.InboundSecurityRulesProtocol", + "@azure/arm-network!KnownPacketCaptureTargetType:enum": "Microsoft.Network.PacketCaptureTargetType", + "@azure/arm-network!KnownPcProtocol:enum": "Microsoft.Network.PcProtocol", + "@azure/arm-network!KnownPcStatus:enum": "Microsoft.Network.PcStatus", + "@azure/arm-network!KnownPcError:enum": "Microsoft.Network.PcError", + "@azure/arm-network!KnownConnectionMonitorType:enum": "Microsoft.Network.ConnectionMonitorType", + "@azure/arm-network!KnownEndpointType:enum": "Microsoft.Network.EndpointType", + "@azure/arm-network!KnownConnectionMonitorEndpointFilterType:enum": "Microsoft.Network.ConnectionMonitorEndpointFilterType", + "@azure/arm-network!KnownConnectionMonitorEndpointFilterItemType:enum": "Microsoft.Network.ConnectionMonitorEndpointFilterItemType", + "@azure/arm-network!KnownCoverageLevel:enum": "Microsoft.Network.CoverageLevel", + "@azure/arm-network!KnownConnectionMonitorTestConfigurationProtocol:enum": "Microsoft.Network.ConnectionMonitorTestConfigurationProtocol", + "@azure/arm-network!KnownPreferredIPVersion:enum": "Microsoft.Network.PreferredIPVersion", + "@azure/arm-network!KnownHTTPConfigurationMethod:enum": "Microsoft.Network.HttpConfigurationMethod", + "@azure/arm-network!KnownDestinationPortBehavior:enum": "Microsoft.Network.DestinationPortBehavior", + "@azure/arm-network!KnownOutputType:enum": "Microsoft.Network.OutputType", + "@azure/arm-network!KnownHubBgpConnectionStatus:enum": "Microsoft.Network.HubBgpConnectionStatus", + "@azure/arm-network!KnownNspReadinessState:enum": "Microsoft.Network.NspReadinessState", + "@azure/arm-network!KnownUsageUnit:enum": "Microsoft.Network.UsageUnit", + "@azure/arm-network!NetworkInterfaceIPConfigurationPropertiesFormatPrivateIpAddressPrefixLength:type": "Common.NetworkInterfaceIPConfigurationPropertiesFormat.privateIPAddressPrefixLength.anonymous", + "@azure/arm-network!AzureFirewallAutoscaleConfigurationMinCapacity:type": "Microsoft.Network.AzureFirewallAutoscaleConfiguration.minCapacity.anonymous", + "@azure/arm-network!AzureFirewallAutoscaleConfigurationMaxCapacity:type": "Microsoft.Network.AzureFirewallAutoscaleConfiguration.maxCapacity.anonymous", + "@azure/arm-network!DnsSettingsRequireProxyForNetworkRules:type": "Microsoft.Network.DnsSettings.requireProxyForNetworkRules.anonymous", + "@azure/arm-network!ExplicitProxyEnableExplicitProxy:type": "Microsoft.Network.ExplicitProxy.enableExplicitProxy.anonymous", + "@azure/arm-network!ExplicitProxyEnablePacFile:type": "Microsoft.Network.ExplicitProxy.enablePacFile.anonymous", + "@azure/arm-network!IpAllocationPropertiesFormatPrefixLength:type": "Microsoft.Network.IpAllocationPropertiesFormat.prefixLength.anonymous", + "@azure/arm-network!NetworkManagementClient#checkDnsNameAvailability:member(1)": "Microsoft.Network.CheckDnsNameAvailability.checkDnsNameAvailability", + "@azure/arm-network!NetworkManagementClient#generatevirtualwanvpnserverconfigurationvpnprofile:member(1)": "Microsoft.Network.VirtualWans.generatevirtualwanvpnserverconfigurationvpnprofile", + "@azure/arm-network!NetworkManagementClient#supportedSecurityProviders:member(1)": "Microsoft.Network.VirtualWans.supportedSecurityProviders", + "@azure/arm-network!NetworkManagementClient#listNetworkManagerEffectiveSecurityAdminRules:member(1)": "Microsoft.Network.EffectiveConfigurations.listNetworkManagerEffectiveSecurityAdminRules", + "@azure/arm-network!NetworkManagementClient#listNetworkManagerEffectiveConnectivityConfigurations:member(1)": "Microsoft.Network.EffectiveConfigurations.listNetworkManagerEffectiveConnectivityConfigurations", + "@azure/arm-network!NetworkManagementClient#listActiveSecurityAdminRules:member(1)": "Microsoft.Network.NetworkManagers.listActiveSecurityAdminRules", + "@azure/arm-network!NetworkManagementClient#listActiveConnectivityConfigurations:member(1)": "Microsoft.Network.NetworkManagers.listActiveConnectivityConfigurations", + "@azure/arm-network!NetworkManagementClient#expressRouteProviderPort:member(1)": "Microsoft.Network.ExpressRouteProviderPorts.expressRouteProviderPort", + "@azure/arm-network!NetworkManagementClient#disconnectActiveSessions:member(1)": "Microsoft.Network.BastionHosts.disconnectActiveSessions", + "@azure/arm-network!NetworkManagementClient#getActiveSessions:member(1)": "Microsoft.Network.BastionHosts.getActiveSessions", + "@azure/arm-network!NetworkManagementClient#getBastionShareableLink:member(1)": "Microsoft.Network.BastionHosts.getBastionShareableLink", + "@azure/arm-network!NetworkManagementClient#deleteBastionShareableLinkByToken:member(1)": "Microsoft.Network.BastionHosts.deleteBastionShareableLinkByToken", + "@azure/arm-network!NetworkManagementClient#deleteBastionShareableLink:member(1)": "Microsoft.Network.BastionHosts.deleteBastionShareableLink", + "@azure/arm-network!NetworkManagementClient#putBastionShareableLink:member(1)": "Microsoft.Network.BastionHosts.putBastionShareableLink", + "@azure/arm-network!UsagesOperations#list:member": "Microsoft.Network.UsagesOperationGroup.list", + "@azure/arm-network!ServiceTagInformationOperations#list:member": "Microsoft.Network.ServiceTagInformationOperationGroup.list", + "@azure/arm-network!ServiceTagsOperations#list:member": "Microsoft.Network.ServiceTagsOperationGroup.list", + "@azure/arm-network!BgpServiceCommunitiesOperations#list:member": "Microsoft.Network.BgpServiceCommunitiesOperationGroup.list", + "@azure/arm-network!AvailablePrivateEndpointTypesOperations#listByResourceGroup:member": "Microsoft.Network.AvailablePrivateEndpointTypesOperationGroup.listByResourceGroup", + "@azure/arm-network!AvailablePrivateEndpointTypesOperations#list:member": "Microsoft.Network.AvailablePrivateEndpointTypesOperationGroup.list", + "@azure/arm-network!NetworkSecurityPerimeterServiceTagsOperations#list:member": "Microsoft.Network.NetworkSecurityPerimeterServiceTagsOperationGroup.list", + "@azure/arm-network!NetworkSecurityPerimeterOperationStatusesOperations#get:member": "Microsoft.Network.NetworkSecurityPerimeterOperationStatusesOperationGroup.get", + "@azure/arm-network!NetworkSecurityPerimeterAssociableResourceTypesOperations#list:member": "Microsoft.Network.NetworkSecurityPerimeterAssociableResourceTypesOperationGroup.list", + "@azure/arm-network!ExpressRouteServiceProvidersOperations#list:member": "Microsoft.Network.ExpressRouteServiceProvidersOperationGroup.list", + "@azure/arm-network!AvailableEndpointServicesOperations#list:member": "Microsoft.Network.AvailableEndpointServicesOperationGroup.list", + "@azure/arm-network!AzureFirewallFqdnTagsOperations#listAll:member": "Microsoft.Network.AzureFirewallFqdnTagsOperationGroup.listAll", + "@azure/arm-network!AvailableServiceAliasesOperations#listByResourceGroup:member": "Microsoft.Network.AvailableServiceAliasesOperationGroup.listByResourceGroup", + "@azure/arm-network!AvailableServiceAliasesOperations#list:member": "Microsoft.Network.AvailableServiceAliasesOperationGroup.list", + "@azure/arm-network!AvailableResourceGroupDelegationsOperations#list:member": "Microsoft.Network.AvailableResourceGroupDelegationsOperationGroup.list", + "@azure/arm-network!AvailableDelegationsOperations#list:member": "Microsoft.Network.AvailableDelegationsOperationGroup.list", + "@azure/arm-network!RoutingIntentOperations#list:member": "Microsoft.Network.RoutingIntents.list", + "@azure/arm-network!RoutingIntentOperations#delete:member": "Microsoft.Network.RoutingIntents.delete", + "@azure/arm-network!RoutingIntentOperations#createOrUpdate:member": "Microsoft.Network.RoutingIntents.createOrUpdate", + "@azure/arm-network!RoutingIntentOperations#get:member": "Microsoft.Network.RoutingIntents.get", + "@azure/arm-network!VirtualHubIpConfigurationOperations#list:member": "Microsoft.Network.HubIpConfigurations.list", + "@azure/arm-network!VirtualHubIpConfigurationOperations#delete:member": "Microsoft.Network.HubIpConfigurations.delete", + "@azure/arm-network!VirtualHubIpConfigurationOperations#createOrUpdate:member": "Microsoft.Network.HubIpConfigurations.createOrUpdate", + "@azure/arm-network!VirtualHubIpConfigurationOperations#get:member": "Microsoft.Network.HubIpConfigurations.get", + "@azure/arm-network!VirtualHubBgpConnectionsOperations#listAdvertisedRoutes:member": "Microsoft.Network.BgpConnections.listAdvertisedRoutes", + "@azure/arm-network!VirtualHubBgpConnectionsOperations#listLearnedRoutes:member": "Microsoft.Network.BgpConnections.listLearnedRoutes", + "@azure/arm-network!VirtualHubBgpConnectionsOperations#list:member": "Microsoft.Network.BgpConnections.list", + "@azure/arm-network!VirtualHubBgpConnectionOperations#delete:member": "Microsoft.Network.BgpConnections.delete", + "@azure/arm-network!VirtualHubBgpConnectionOperations#createOrUpdate:member": "Microsoft.Network.BgpConnections.createOrUpdate", + "@azure/arm-network!VirtualHubBgpConnectionOperations#get:member": "Microsoft.Network.BgpConnections.get", + "@azure/arm-network!ExpressRouteConnectionsOperations#list:member": "Microsoft.Network.ExpressRouteGateways.list", + "@azure/arm-network!ExpressRouteConnectionsOperations#Delete:member": "Microsoft.Network.ExpressRouteGateways.expressRouteConnectionsDelete", + "@azure/arm-network!ExpressRouteConnectionsOperations#Get:member": "Microsoft.Network.ExpressRouteGateways.expressRouteConnectionsGet", + "@azure/arm-network!ExpressRouteConnectionsOperations#CreateOrUpdate:member": "Microsoft.Network.ExpressRouteGateways.expressRouteConnectionsCreateOrUpdate", + "@azure/arm-network!P2SVpnGatewaysOperations#disconnectP2sVpnConnections:member": "Microsoft.Network.P2SVpnGateways.disconnectP2sVpnConnections", + "@azure/arm-network!P2SVpnGatewaysOperations#getP2sVpnConnectionHealthDetailed:member": "Microsoft.Network.P2SVpnGateways.getP2sVpnConnectionHealthDetailed", + "@azure/arm-network!P2SVpnGatewaysOperations#getP2sVpnConnectionHealth:member": "Microsoft.Network.P2SVpnGateways.getP2sVpnConnectionHealth", + "@azure/arm-network!P2SVpnGatewaysOperations#generateVpnProfile:member": "Microsoft.Network.P2SVpnGateways.generateVpnProfile", + "@azure/arm-network!P2SVpnGatewaysOperations#reset:member": "Microsoft.Network.P2SVpnGateways.reset", + "@azure/arm-network!P2SVpnGatewaysOperations#list:member": "Microsoft.Network.P2SVpnGateways.list", + "@azure/arm-network!P2SVpnGatewaysOperations#listByResourceGroup:member": "Microsoft.Network.P2SVpnGateways.listByResourceGroup", + "@azure/arm-network!P2SVpnGatewaysOperations#delete:member": "Microsoft.Network.P2SVpnGateways.delete", + "@azure/arm-network!P2SVpnGatewaysOperations#updateTags:member": "Microsoft.Network.P2SVpnGateways.updateTags", + "@azure/arm-network!P2SVpnGatewaysOperations#createOrUpdate:member": "Microsoft.Network.P2SVpnGateways.createOrUpdate", + "@azure/arm-network!P2SVpnGatewaysOperations#get:member": "Microsoft.Network.P2SVpnGateways.get", + "@azure/arm-network!NatRulesOperations#listByVpnGateway:member": "Microsoft.Network.VpnGatewayNatRules.listByVpnGateway", + "@azure/arm-network!NatRulesOperations#delete:member": "Microsoft.Network.VpnGatewayNatRules.delete", + "@azure/arm-network!NatRulesOperations#createOrUpdate:member": "Microsoft.Network.VpnGatewayNatRules.createOrUpdate", + "@azure/arm-network!NatRulesOperations#get:member": "Microsoft.Network.VpnGatewayNatRules.get", + "@azure/arm-network!VpnLinkConnectionsOperations#getIkeSas:member": "Microsoft.Network.VpnSiteLinkConnections.getIkeSas", + "@azure/arm-network!VpnLinkConnectionsOperations#resetConnection:member": "Microsoft.Network.VpnSiteLinkConnections.resetConnection", + "@azure/arm-network!VpnLinkConnectionsOperations#listByVpnConnection:member": "Microsoft.Network.VpnSiteLinkConnections.listByVpnConnection", + "@azure/arm-network!VpnLinkConnectionsOperations#listDefaultSharedKey:member": "Microsoft.Network.ConnectionSharedKeyResults.listDefaultSharedKey", + "@azure/arm-network!VpnLinkConnectionsOperations#listAllSharedKeys:member": "Microsoft.Network.ConnectionSharedKeyResults.getAllSharedKeys", + "@azure/arm-network!VpnLinkConnectionsOperations#setOrInitDefaultSharedKey:member": "Microsoft.Network.ConnectionSharedKeyResults.setOrInitDefaultSharedKey", + "@azure/arm-network!VpnLinkConnectionsOperations#getDefaultSharedKey:member": "Microsoft.Network.ConnectionSharedKeyResults.getDefaultSharedKey", + "@azure/arm-network!VpnConnectionsOperations#listByVpnGateway:member": "Microsoft.Network.VpnGateways.listByVpnGateway", + "@azure/arm-network!VpnConnectionsOperations#StopPacketCapture:member": "Microsoft.Network.VpnGateways.vpnConnectionsStopPacketCapture", + "@azure/arm-network!VpnConnectionsOperations#StartPacketCapture:member": "Microsoft.Network.VpnGateways.vpnConnectionsStartPacketCapture", + "@azure/arm-network!VpnConnectionsOperations#Delete:member": "Microsoft.Network.VpnGateways.vpnConnectionsDelete", + "@azure/arm-network!VpnConnectionsOperations#CreateOrUpdate:member": "Microsoft.Network.VpnGateways.vpnConnectionsCreateOrUpdate", + "@azure/arm-network!VpnConnectionsOperations#Get:member": "Microsoft.Network.VpnGateways.vpnConnectionsGet", + "@azure/arm-network!VirtualHubRouteTableV2SOperations#List:member": "Microsoft.Network.VirtualHubs.virtualHubRouteTableV2sList", + "@azure/arm-network!VirtualHubRouteTableV2SOperations#Delete:member": "Microsoft.Network.VirtualHubs.virtualHubRouteTableV2sDelete", + "@azure/arm-network!VirtualHubRouteTableV2SOperations#CreateOrUpdate:member": "Microsoft.Network.VirtualHubs.virtualHubRouteTableV2sCreateOrUpdate", + "@azure/arm-network!VirtualHubRouteTableV2SOperations#Get:member": "Microsoft.Network.VirtualHubs.virtualHubRouteTableV2sGet", + "@azure/arm-network!HubVirtualNetworkConnectionsOperations#List:member": "Microsoft.Network.VirtualHubs.hubVirtualNetworkConnectionsList", + "@azure/arm-network!HubVirtualNetworkConnectionsOperations#Get:member": "Microsoft.Network.VirtualHubs.hubVirtualNetworkConnectionsGet", + "@azure/arm-network!HubVirtualNetworkConnectionsOperations#Delete:member": "Microsoft.Network.VirtualHubs.hubVirtualNetworkConnectionsDelete", + "@azure/arm-network!HubVirtualNetworkConnectionsOperations#CreateOrUpdate:member": "Microsoft.Network.VirtualHubs.hubVirtualNetworkConnectionsCreateOrUpdate", + "@azure/arm-network!ConfigurationPolicyGroupsOperations#listByVpnServerConfiguration:member": "Microsoft.Network.VpnServerConfigurationPolicyGroups.listByVpnServerConfiguration", + "@azure/arm-network!ConfigurationPolicyGroupsOperations#delete:member": "Microsoft.Network.VpnServerConfigurationPolicyGroups.delete", + "@azure/arm-network!ConfigurationPolicyGroupsOperations#createOrUpdate:member": "Microsoft.Network.VpnServerConfigurationPolicyGroups.createOrUpdate", + "@azure/arm-network!ConfigurationPolicyGroupsOperations#get:member": "Microsoft.Network.VpnServerConfigurationPolicyGroups.get", + "@azure/arm-network!VpnServerConfigurationsAssociatedWithVirtualWanOperations#List:member": "Microsoft.Network.VirtualWans.vpnServerConfigurationsAssociatedWithVirtualWanList", + "@azure/arm-network!VpnSitesConfigurationOperations#download:member": "Microsoft.Network.VirtualWans.download", + "@azure/arm-network!ServiceAssociationLinksOperations#List:member": "Microsoft.Network.Subnets.serviceAssociationLinksList", + "@azure/arm-network!ResourceNavigationLinksOperations#List:member": "Microsoft.Network.Subnets.resourceNavigationLinksList", + "@azure/arm-network!RouteFilterRulesOperations#listByRouteFilter:member": "Microsoft.Network.RouteFilters.listByRouteFilter", + "@azure/arm-network!RouteFilterRulesOperations#CreateOrUpdate:member": "Microsoft.Network.RouteFilters.routeFilterRulesCreateOrUpdate", + "@azure/arm-network!RouteFilterRulesOperations#Get:member": "Microsoft.Network.RouteFilters.routeFilterRulesGet", + "@azure/arm-network!RouteFilterRulesOperations#Delete:member": "Microsoft.Network.RouteFilters.routeFilterRulesDelete", + "@azure/arm-network!PrivateDnsZoneGroupsOperations#List:member": "Microsoft.Network.PrivateEndpoints.privateDnsZoneGroupsList", + "@azure/arm-network!PrivateDnsZoneGroupsOperations#CreateOrUpdate:member": "Microsoft.Network.PrivateEndpoints.privateDnsZoneGroupsCreateOrUpdate", + "@azure/arm-network!PrivateDnsZoneGroupsOperations#Get:member": "Microsoft.Network.PrivateEndpoints.privateDnsZoneGroupsGet", + "@azure/arm-network!PrivateDnsZoneGroupsOperations#Delete:member": "Microsoft.Network.PrivateEndpoints.privateDnsZoneGroupsDelete", + "@azure/arm-network!ConnectionMonitorsOperations#stop:member": "Microsoft.Network.ConnectionMonitorResults.stop", + "@azure/arm-network!ConnectionMonitorsOperations#list:member": "Microsoft.Network.ConnectionMonitorResults.list", + "@azure/arm-network!ConnectionMonitorsOperations#delete:member": "Microsoft.Network.ConnectionMonitorResults.delete", + "@azure/arm-network!ConnectionMonitorsOperations#updateTags:member": "Microsoft.Network.ConnectionMonitorResults.updateTags", + "@azure/arm-network!ConnectionMonitorsOperations#createOrUpdate:member": "Microsoft.Network.ConnectionMonitorResults.createOrUpdate", + "@azure/arm-network!ConnectionMonitorsOperations#get:member": "Microsoft.Network.ConnectionMonitorResults.get", + "@azure/arm-network!PacketCapturesOperations#List:member": "Microsoft.Network.NetworkWatchers.packetCapturesList", + "@azure/arm-network!PacketCapturesOperations#getStatus:member": "Microsoft.Network.NetworkWatchers.getStatus", + "@azure/arm-network!PacketCapturesOperations#stop:member": "Microsoft.Network.NetworkWatchers.stop", + "@azure/arm-network!PacketCapturesOperations#Delete:member": "Microsoft.Network.NetworkWatchers.packetCapturesDelete", + "@azure/arm-network!PacketCapturesOperations#Get:member": "Microsoft.Network.NetworkWatchers.packetCapturesGet", + "@azure/arm-network!PacketCapturesOperations#create:member": "Microsoft.Network.NetworkWatchers.create", + "@azure/arm-network!InboundSecurityRuleOperations#createOrUpdate:member": "Microsoft.Network.InboundSecurityRuleOperationGroup.createOrUpdate", + "@azure/arm-network!InboundSecurityRuleOperations#get:member": "Microsoft.Network.InboundSecurityRuleOperationGroup.get", + "@azure/arm-network!VirtualApplianceSkusOperations#list:member": "Microsoft.Network.NetworkVirtualApplianceSkus.list", + "@azure/arm-network!VirtualApplianceSkusOperations#get:member": "Microsoft.Network.NetworkVirtualApplianceSkus.get", + "@azure/arm-network!NetworkSecurityPerimeterLoggingConfigurationsOperations#list:member": "Microsoft.Network.NspLoggingConfigurations.list", + "@azure/arm-network!NetworkSecurityPerimeterLoggingConfigurationsOperations#delete:member": "Microsoft.Network.NspLoggingConfigurations.delete", + "@azure/arm-network!NetworkSecurityPerimeterLoggingConfigurationsOperations#createOrUpdate:member": "Microsoft.Network.NspLoggingConfigurations.createOrUpdate", + "@azure/arm-network!NetworkSecurityPerimeterLoggingConfigurationsOperations#get:member": "Microsoft.Network.NspLoggingConfigurations.get", + "@azure/arm-network!NetworkSecurityPerimeterLinkReferencesOperations#list:member": "Microsoft.Network.NspLinkReferences.list", + "@azure/arm-network!NetworkSecurityPerimeterLinkReferencesOperations#delete:member": "Microsoft.Network.NspLinkReferences.delete", + "@azure/arm-network!NetworkSecurityPerimeterLinkReferencesOperations#get:member": "Microsoft.Network.NspLinkReferences.get", + "@azure/arm-network!NetworkSecurityPerimeterLinksOperations#list:member": "Microsoft.Network.NspLinks.list", + "@azure/arm-network!NetworkSecurityPerimeterLinksOperations#delete:member": "Microsoft.Network.NspLinks.delete", + "@azure/arm-network!NetworkSecurityPerimeterLinksOperations#createOrUpdate:member": "Microsoft.Network.NspLinks.createOrUpdate", + "@azure/arm-network!NetworkSecurityPerimeterLinksOperations#get:member": "Microsoft.Network.NspLinks.get", + "@azure/arm-network!NetworkSecurityPerimeterAssociationsOperations#reconcile:member": "Microsoft.Network.NspAssociations.reconcile", + "@azure/arm-network!NetworkSecurityPerimeterAssociationsOperations#list:member": "Microsoft.Network.NspAssociations.list", + "@azure/arm-network!NetworkSecurityPerimeterAssociationsOperations#delete:member": "Microsoft.Network.NspAssociations.delete", + "@azure/arm-network!NetworkSecurityPerimeterAssociationsOperations#createOrUpdate:member": "Microsoft.Network.NspAssociations.createOrUpdate", + "@azure/arm-network!NetworkSecurityPerimeterAssociationsOperations#get:member": "Microsoft.Network.NspAssociations.get", + "@azure/arm-network!NetworkSecurityPerimeterAccessRulesOperations#reconcile:member": "Microsoft.Network.NspAccessRules.reconcile", + "@azure/arm-network!NetworkSecurityPerimeterAccessRulesOperations#list:member": "Microsoft.Network.NspAccessRules.list", + "@azure/arm-network!NetworkSecurityPerimeterAccessRulesOperations#delete:member": "Microsoft.Network.NspAccessRules.delete", + "@azure/arm-network!NetworkSecurityPerimeterAccessRulesOperations#createOrUpdate:member": "Microsoft.Network.NspAccessRules.createOrUpdate", + "@azure/arm-network!NetworkSecurityPerimeterAccessRulesOperations#get:member": "Microsoft.Network.NspAccessRules.get", + "@azure/arm-network!NetworkSecurityPerimeterProfilesOperations#list:member": "Microsoft.Network.NspProfiles.list", + "@azure/arm-network!NetworkSecurityPerimeterProfilesOperations#delete:member": "Microsoft.Network.NspProfiles.delete", + "@azure/arm-network!NetworkSecurityPerimeterProfilesOperations#createOrUpdate:member": "Microsoft.Network.NspProfiles.createOrUpdate", + "@azure/arm-network!NetworkSecurityPerimeterProfilesOperations#get:member": "Microsoft.Network.NspProfiles.get", + "@azure/arm-network!AdminRulesOperations#list:member": "Microsoft.Network.BaseAdminRules.list", + "@azure/arm-network!AdminRulesOperations#delete:member": "Microsoft.Network.BaseAdminRules.delete", + "@azure/arm-network!AdminRulesOperations#createOrUpdate:member": "Microsoft.Network.BaseAdminRules.createOrUpdate", + "@azure/arm-network!AdminRulesOperations#get:member": "Microsoft.Network.BaseAdminRules.get", + "@azure/arm-network!SubscriptionNetworkManagerConnectionsOperations#list:member": "Microsoft.Network.NetworkManagerConnections.list", + "@azure/arm-network!SubscriptionNetworkManagerConnectionsOperations#delete:member": "Microsoft.Network.NetworkManagerConnections.delete", + "@azure/arm-network!SubscriptionNetworkManagerConnectionsOperations#createOrUpdate:member": "Microsoft.Network.NetworkManagerConnections.createOrUpdate", + "@azure/arm-network!SubscriptionNetworkManagerConnectionsOperations#get:member": "Microsoft.Network.NetworkManagerConnections.get", + "@azure/arm-network!LoadBalancerProbesOperations#list:member": "Microsoft.Network.Probes.list", + "@azure/arm-network!LoadBalancerProbesOperations#get:member": "Microsoft.Network.Probes.get", + "@azure/arm-network!LoadBalancerOutboundRulesOperations#list:member": "Microsoft.Network.OutboundRules.list", + "@azure/arm-network!LoadBalancerOutboundRulesOperations#get:member": "Microsoft.Network.OutboundRules.get", + "@azure/arm-network!LoadBalancerLoadBalancingRulesOperations#health:member": "Microsoft.Network.LoadBalancingRules.health", + "@azure/arm-network!LoadBalancerLoadBalancingRulesOperations#list:member": "Microsoft.Network.LoadBalancingRules.list", + "@azure/arm-network!LoadBalancerLoadBalancingRulesOperations#get:member": "Microsoft.Network.LoadBalancingRules.get", + "@azure/arm-network!LoadBalancerFrontendIPConfigurationsOperations#list:member": "Microsoft.Network.FrontendIPConfigurations.list", + "@azure/arm-network!LoadBalancerFrontendIPConfigurationsOperations#get:member": "Microsoft.Network.FrontendIPConfigurations.get", + "@azure/arm-network!LoadBalancerBackendAddressPoolsOperations#list:member": "Microsoft.Network.BackendAddressPools.list", + "@azure/arm-network!LoadBalancerBackendAddressPoolsOperations#delete:member": "Microsoft.Network.BackendAddressPools.delete", + "@azure/arm-network!LoadBalancerBackendAddressPoolsOperations#createOrUpdate:member": "Microsoft.Network.BackendAddressPools.createOrUpdate", + "@azure/arm-network!LoadBalancerBackendAddressPoolsOperations#get:member": "Microsoft.Network.BackendAddressPools.get", + "@azure/arm-network!LoadBalancerNetworkInterfacesOperations#List:member": "Microsoft.Network.LoadBalancers.loadBalancerNetworkInterfacesList", + "@azure/arm-network!NetworkManagerDeploymentStatusOperations#List:member": "Microsoft.Network.NetworkManagers.networkManagerDeploymentStatusList", + "@azure/arm-network!NetworkManagerCommitsOperations#post:member": "Microsoft.Network.NetworkManagers.post", + "@azure/arm-network!FirewallPolicyDeploymentsOperations#deploy:member": "Microsoft.Network.FirewallPolicies.deploy", + "@azure/arm-network!FirewallPolicyIdpsSignaturesFilterValuesOperations#List:member": "Microsoft.Network.FirewallPolicies.firewallPolicyIdpsSignaturesFilterValuesList", + "@azure/arm-network!FirewallPolicyIdpsSignaturesOperations#List:member": "Microsoft.Network.FirewallPolicies.firewallPolicyIdpsSignaturesList", + "@azure/arm-network!ExpressRouteLinksOperations#List:member": "Microsoft.Network.ExpressRoutePorts.expressRouteLinksList", + "@azure/arm-network!ExpressRouteLinksOperations#Get:member": "Microsoft.Network.ExpressRoutePorts.expressRouteLinksGet", + "@azure/arm-network!ExpressRouteCrossConnectionPeeringsOperations#CreateOrUpdate:member": "Microsoft.Network.ExpressRouteCrossConnections.expressRouteCrossConnectionPeeringsCreateOrUpdate", + "@azure/arm-network!ExpressRouteCrossConnectionPeeringsOperations#Get:member": "Microsoft.Network.ExpressRouteCrossConnections.expressRouteCrossConnectionPeeringsGet", + "@azure/arm-network!ExpressRouteCrossConnectionPeeringsOperations#delete:member": "Microsoft.Network.ExpressRouteCrossConnections.delete", + "@azure/arm-network!ExpressRouteCrossConnectionPeeringsOperations#List:member": "Microsoft.Network.ExpressRouteCrossConnections.expressRouteCrossConnectionPeeringsList", + "@azure/arm-network!DscpConfigurationOperations#listAll:member": "Microsoft.Network.DscpConfigurations.listAll", + "@azure/arm-network!DscpConfigurationOperations#list:member": "Microsoft.Network.DscpConfigurations.list", + "@azure/arm-network!DscpConfigurationOperations#delete:member": "Microsoft.Network.DscpConfigurations.delete", + "@azure/arm-network!DscpConfigurationOperations#createOrUpdate:member": "Microsoft.Network.DscpConfigurations.createOrUpdate", + "@azure/arm-network!DscpConfigurationOperations#get:member": "Microsoft.Network.DscpConfigurations.get", + "@azure/arm-network!CustomIPPrefixesOperations#listAll:member": "Microsoft.Network.CustomIpPrefixes.listAll", + "@azure/arm-network!CustomIPPrefixesOperations#list:member": "Microsoft.Network.CustomIpPrefixes.list", + "@azure/arm-network!CustomIPPrefixesOperations#delete:member": "Microsoft.Network.CustomIpPrefixes.delete", + "@azure/arm-network!CustomIPPrefixesOperations#updateTags:member": "Microsoft.Network.CustomIpPrefixes.updateTags", + "@azure/arm-network!CustomIPPrefixesOperations#createOrUpdate:member": "Microsoft.Network.CustomIpPrefixes.createOrUpdate", + "@azure/arm-network!CustomIPPrefixesOperations#get:member": "Microsoft.Network.CustomIpPrefixes.get", + "@azure/arm-network!VipSwapOperations#list:member": "Microsoft.Network.SwapResources.list", + "@azure/arm-network!VipSwapOperations#create:member": "Microsoft.Network.SwapResources.create", + "@azure/arm-network!VipSwapOperations#get:member": "Microsoft.Network.SwapResources.get", + "@azure/arm-network!NetworkInterfaceLoadBalancersOperations#List:member": "Microsoft.Network.NetworkInterfaceOperationGroup.networkInterfaceLoadBalancersList", + "@azure/arm-network!ExpressRouteProviderPortsLocationOperations#list:member": "Microsoft.Network.ExpressRouteProviderPorts.list", + "@azure/arm-network!WebCategoriesOperations#listBySubscription:member": "Microsoft.Network.AzureWebCategories.listBySubscription", + "@azure/arm-network!WebCategoriesOperations#get:member": "Microsoft.Network.AzureWebCategories.get", + "@azure/arm-network!ApplicationGatewayWafDynamicManifestsOperations#list:member": "Microsoft.Network.ApplicationGatewayWafDynamicManifestResults.applicationGatewayWafDynamicManifestsGet", + "@azure/arm-network!ApplicationGatewayWafDynamicManifestsDefaultOperations#get:member": "Microsoft.Network.ApplicationGatewayWafDynamicManifestResults.get", + "@azure/arm-network!ApplicationGatewayPrivateLinkResourcesOperations#List:member": "Microsoft.Network.ApplicationGateways.applicationGatewayPrivateLinkResourcesList", + "@azure/arm-network!SubgroupsOperations#list:member": "Microsoft.Network.Subgroups.list", + "@azure/arm-network!SubgroupsOperations#get:member": "Microsoft.Network.Subgroups.get", + "@azure/arm-network!InterconnectGroupsOperations#getNodeAvailability:member": "Microsoft.Network.InterconnectGroups.getNodeAvailability", + "@azure/arm-network!InterconnectGroupsOperations#listAll:member": "Microsoft.Network.InterconnectGroups.listAll", + "@azure/arm-network!InterconnectGroupsOperations#list:member": "Microsoft.Network.InterconnectGroups.list", + "@azure/arm-network!InterconnectGroupsOperations#delete:member": "Microsoft.Network.InterconnectGroups.delete", + "@azure/arm-network!InterconnectGroupsOperations#updateTags:member": "Microsoft.Network.InterconnectGroups.updateTags", + "@azure/arm-network!InterconnectGroupsOperations#createOrUpdate:member": "Microsoft.Network.InterconnectGroups.createOrUpdate", + "@azure/arm-network!InterconnectGroupsOperations#get:member": "Microsoft.Network.InterconnectGroups.get", + "@azure/arm-network!ServiceGatewaysOperations#listServices:member": "Microsoft.Network.ServiceGateways.getServices", + "@azure/arm-network!ServiceGatewaysOperations#listAddressLocations:member": "Microsoft.Network.ServiceGateways.getAddressLocations", + "@azure/arm-network!ServiceGatewaysOperations#updateServices:member": "Microsoft.Network.ServiceGateways.updateServices", + "@azure/arm-network!ServiceGatewaysOperations#updateAddressLocations:member": "Microsoft.Network.ServiceGateways.updateAddressLocations", + "@azure/arm-network!ServiceGatewaysOperations#listAll:member": "Microsoft.Network.ServiceGateways.listAll", + "@azure/arm-network!ServiceGatewaysOperations#list:member": "Microsoft.Network.ServiceGateways.list", + "@azure/arm-network!ServiceGatewaysOperations#delete:member": "Microsoft.Network.ServiceGateways.delete", + "@azure/arm-network!ServiceGatewaysOperations#updateTags:member": "Microsoft.Network.ServiceGateways.updateTags", + "@azure/arm-network!ServiceGatewaysOperations#createOrUpdate:member": "Microsoft.Network.ServiceGateways.createOrUpdate", + "@azure/arm-network!ServiceGatewaysOperations#get:member": "Microsoft.Network.ServiceGateways.get", + "@azure/arm-network!VirtualNetworkAppliancesOperations#listAll:member": "Microsoft.Network.VirtualNetworkAppliances.listAll", + "@azure/arm-network!VirtualNetworkAppliancesOperations#list:member": "Microsoft.Network.VirtualNetworkAppliances.list", + "@azure/arm-network!VirtualNetworkAppliancesOperations#delete:member": "Microsoft.Network.VirtualNetworkAppliances.delete", + "@azure/arm-network!VirtualNetworkAppliancesOperations#updateTags:member": "Microsoft.Network.VirtualNetworkAppliances.updateTags", + "@azure/arm-network!VirtualNetworkAppliancesOperations#createOrUpdate:member": "Microsoft.Network.VirtualNetworkAppliances.createOrUpdate", + "@azure/arm-network!VirtualNetworkAppliancesOperations#get:member": "Microsoft.Network.VirtualNetworkAppliances.get", + "@azure/arm-network!WebApplicationFirewallPoliciesOperations#listAll:member": "Microsoft.Network.WebApplicationFirewallPolicies.listAll", + "@azure/arm-network!WebApplicationFirewallPoliciesOperations#list:member": "Microsoft.Network.WebApplicationFirewallPolicies.list", + "@azure/arm-network!WebApplicationFirewallPoliciesOperations#delete:member": "Microsoft.Network.WebApplicationFirewallPolicies.delete", + "@azure/arm-network!WebApplicationFirewallPoliciesOperations#createOrUpdate:member": "Microsoft.Network.WebApplicationFirewallPolicies.createOrUpdate", + "@azure/arm-network!WebApplicationFirewallPoliciesOperations#get:member": "Microsoft.Network.WebApplicationFirewallPolicies.get", + "@azure/arm-network!ConnectionPoliciesOperations#list:member": "Microsoft.Network.ConnectionPolicies.list", + "@azure/arm-network!ConnectionPoliciesOperations#delete:member": "Microsoft.Network.ConnectionPolicies.delete", + "@azure/arm-network!ConnectionPoliciesOperations#createOrUpdate:member": "Microsoft.Network.ConnectionPolicies.createOrUpdate", + "@azure/arm-network!ConnectionPoliciesOperations#get:member": "Microsoft.Network.ConnectionPolicies.get", + "@azure/arm-network!HubRouteTablesOperations#list:member": "Microsoft.Network.HubRouteTables.list", + "@azure/arm-network!HubRouteTablesOperations#delete:member": "Microsoft.Network.HubRouteTables.delete", + "@azure/arm-network!HubRouteTablesOperations#createOrUpdate:member": "Microsoft.Network.HubRouteTables.createOrUpdate", + "@azure/arm-network!HubRouteTablesOperations#get:member": "Microsoft.Network.HubRouteTables.get", + "@azure/arm-network!ExpressRouteGatewaysOperations#getResiliencyInformation:member": "Microsoft.Network.ExpressRouteGateways.getResiliencyInformation", + "@azure/arm-network!ExpressRouteGatewaysOperations#getRoutesInformation:member": "Microsoft.Network.ExpressRouteGateways.getRoutesInformation", + "@azure/arm-network!ExpressRouteGatewaysOperations#stopSiteFailoverTest:member": "Microsoft.Network.ExpressRouteGateways.stopSiteFailoverTest", + "@azure/arm-network!ExpressRouteGatewaysOperations#startSiteFailoverTest:member": "Microsoft.Network.ExpressRouteGateways.startSiteFailoverTest", + "@azure/arm-network!ExpressRouteGatewaysOperations#getFailoverSingleTestDetails:member": "Microsoft.Network.ExpressRouteGateways.getFailoverSingleTestDetails", + "@azure/arm-network!ExpressRouteGatewaysOperations#getFailoverAllTestsDetails:member": "Microsoft.Network.ExpressRouteGateways.getFailoverAllTestsDetails", + "@azure/arm-network!ExpressRouteGatewaysOperations#listBySubscription:member": "Microsoft.Network.ExpressRouteGateways.listBySubscription", + "@azure/arm-network!ExpressRouteGatewaysOperations#listByResourceGroup:member": "Microsoft.Network.ExpressRouteGateways.listByResourceGroup", + "@azure/arm-network!ExpressRouteGatewaysOperations#delete:member": "Microsoft.Network.ExpressRouteGateways.delete", + "@azure/arm-network!ExpressRouteGatewaysOperations#updateTags:member": "Microsoft.Network.ExpressRouteGateways.updateTags", + "@azure/arm-network!ExpressRouteGatewaysOperations#createOrUpdate:member": "Microsoft.Network.ExpressRouteGateways.createOrUpdate", + "@azure/arm-network!ExpressRouteGatewaysOperations#get:member": "Microsoft.Network.ExpressRouteGateways.get", + "@azure/arm-network!VpnSiteLinkConnectionsOperations#get:member": "Microsoft.Network.VpnSiteLinkConnections.get", + "@azure/arm-network!VpnGatewaysOperations#stopPacketCapture:member": "Microsoft.Network.VpnGateways.stopPacketCapture", + "@azure/arm-network!VpnGatewaysOperations#startPacketCapture:member": "Microsoft.Network.VpnGateways.startPacketCapture", + "@azure/arm-network!VpnGatewaysOperations#reset:member": "Microsoft.Network.VpnGateways.reset", + "@azure/arm-network!VpnGatewaysOperations#list:member": "Microsoft.Network.VpnGateways.list", + "@azure/arm-network!VpnGatewaysOperations#listByResourceGroup:member": "Microsoft.Network.VpnGateways.listByResourceGroup", + "@azure/arm-network!VpnGatewaysOperations#delete:member": "Microsoft.Network.VpnGateways.delete", + "@azure/arm-network!VpnGatewaysOperations#updateTags:member": "Microsoft.Network.VpnGateways.updateTags", + "@azure/arm-network!VpnGatewaysOperations#createOrUpdate:member": "Microsoft.Network.VpnGateways.createOrUpdate", + "@azure/arm-network!VpnGatewaysOperations#get:member": "Microsoft.Network.VpnGateways.get", + "@azure/arm-network!RouteMapsOperations#list:member": "Microsoft.Network.RouteMaps.list", + "@azure/arm-network!RouteMapsOperations#delete:member": "Microsoft.Network.RouteMaps.delete", + "@azure/arm-network!RouteMapsOperations#createOrUpdate:member": "Microsoft.Network.RouteMaps.createOrUpdate", + "@azure/arm-network!RouteMapsOperations#get:member": "Microsoft.Network.RouteMaps.get", + "@azure/arm-network!VirtualHubsOperations#getOutboundRoutes:member": "Microsoft.Network.VirtualHubs.getOutboundRoutes", + "@azure/arm-network!VirtualHubsOperations#getInboundRoutes:member": "Microsoft.Network.VirtualHubs.getInboundRoutes", + "@azure/arm-network!VirtualHubsOperations#getEffectiveVirtualHubRoutes:member": "Microsoft.Network.VirtualHubs.getEffectiveVirtualHubRoutes", + "@azure/arm-network!VirtualHubsOperations#list:member": "Microsoft.Network.VirtualHubs.list", + "@azure/arm-network!VirtualHubsOperations#listByResourceGroup:member": "Microsoft.Network.VirtualHubs.listByResourceGroup", + "@azure/arm-network!VirtualHubsOperations#delete:member": "Microsoft.Network.VirtualHubs.delete", + "@azure/arm-network!VirtualHubsOperations#updateTags:member": "Microsoft.Network.VirtualHubs.updateTags", + "@azure/arm-network!VirtualHubsOperations#createOrUpdate:member": "Microsoft.Network.VirtualHubs.createOrUpdate", + "@azure/arm-network!VirtualHubsOperations#get:member": "Microsoft.Network.VirtualHubs.get", + "@azure/arm-network!VpnServerConfigurationsOperations#listRadiusSecrets:member": "Microsoft.Network.VpnServerConfigurations.listRadiusSecrets", + "@azure/arm-network!VpnServerConfigurationsOperations#list:member": "Microsoft.Network.VpnServerConfigurations.list", + "@azure/arm-network!VpnServerConfigurationsOperations#listByResourceGroup:member": "Microsoft.Network.VpnServerConfigurations.listByResourceGroup", + "@azure/arm-network!VpnServerConfigurationsOperations#delete:member": "Microsoft.Network.VpnServerConfigurations.delete", + "@azure/arm-network!VpnServerConfigurationsOperations#updateTags:member": "Microsoft.Network.VpnServerConfigurations.updateTags", + "@azure/arm-network!VpnServerConfigurationsOperations#createOrUpdate:member": "Microsoft.Network.VpnServerConfigurations.createOrUpdate", + "@azure/arm-network!VpnServerConfigurationsOperations#get:member": "Microsoft.Network.VpnServerConfigurations.get", + "@azure/arm-network!VpnSiteLinksOperations#listByVpnSite:member": "Microsoft.Network.VpnSiteLinks.listByVpnSite", + "@azure/arm-network!VpnSiteLinksOperations#get:member": "Microsoft.Network.VpnSiteLinks.get", + "@azure/arm-network!VpnSitesOperations#list:member": "Microsoft.Network.VpnSites.list", + "@azure/arm-network!VpnSitesOperations#listByResourceGroup:member": "Microsoft.Network.VpnSites.listByResourceGroup", + "@azure/arm-network!VpnSitesOperations#delete:member": "Microsoft.Network.VpnSites.delete", + "@azure/arm-network!VpnSitesOperations#updateTags:member": "Microsoft.Network.VpnSites.updateTags", + "@azure/arm-network!VpnSitesOperations#createOrUpdate:member": "Microsoft.Network.VpnSites.createOrUpdate", + "@azure/arm-network!VpnSitesOperations#get:member": "Microsoft.Network.VpnSites.get", + "@azure/arm-network!VirtualWansOperations#list:member": "Microsoft.Network.VirtualWans.list", + "@azure/arm-network!VirtualWansOperations#listByResourceGroup:member": "Microsoft.Network.VirtualWans.listByResourceGroup", + "@azure/arm-network!VirtualWansOperations#delete:member": "Microsoft.Network.VirtualWans.delete", + "@azure/arm-network!VirtualWansOperations#updateTags:member": "Microsoft.Network.VirtualWans.updateTags", + "@azure/arm-network!VirtualWansOperations#createOrUpdate:member": "Microsoft.Network.VirtualWans.createOrUpdate", + "@azure/arm-network!VirtualWansOperations#get:member": "Microsoft.Network.VirtualWans.get", + "@azure/arm-network!VirtualRouterPeeringsOperations#list:member": "Microsoft.Network.VirtualRouterPeerings.list", + "@azure/arm-network!VirtualRouterPeeringsOperations#delete:member": "Microsoft.Network.VirtualRouterPeerings.delete", + "@azure/arm-network!VirtualRouterPeeringsOperations#createOrUpdate:member": "Microsoft.Network.VirtualRouterPeerings.createOrUpdate", + "@azure/arm-network!VirtualRouterPeeringsOperations#get:member": "Microsoft.Network.VirtualRouterPeerings.get", + "@azure/arm-network!VirtualRoutersOperations#list:member": "Microsoft.Network.VirtualRouters.list", + "@azure/arm-network!VirtualRoutersOperations#listByResourceGroup:member": "Microsoft.Network.VirtualRouters.listByResourceGroup", + "@azure/arm-network!VirtualRoutersOperations#delete:member": "Microsoft.Network.VirtualRouters.delete", + "@azure/arm-network!VirtualRoutersOperations#createOrUpdate:member": "Microsoft.Network.VirtualRouters.createOrUpdate", + "@azure/arm-network!VirtualRoutersOperations#get:member": "Microsoft.Network.VirtualRouters.get", + "@azure/arm-network!VirtualNetworkTapsOperations#listAll:member": "Microsoft.Network.VirtualNetworkTaps.listAll", + "@azure/arm-network!VirtualNetworkTapsOperations#listByResourceGroup:member": "Microsoft.Network.VirtualNetworkTaps.listByResourceGroup", + "@azure/arm-network!VirtualNetworkTapsOperations#delete:member": "Microsoft.Network.VirtualNetworkTaps.delete", + "@azure/arm-network!VirtualNetworkTapsOperations#updateTags:member": "Microsoft.Network.VirtualNetworkTaps.updateTags", + "@azure/arm-network!VirtualNetworkTapsOperations#createOrUpdate:member": "Microsoft.Network.VirtualNetworkTaps.createOrUpdate", + "@azure/arm-network!VirtualNetworkTapsOperations#get:member": "Microsoft.Network.VirtualNetworkTaps.get", + "@azure/arm-network!VirtualNetworkGatewayNatRulesOperations#listByVirtualNetworkGateway:member": "Microsoft.Network.VirtualNetworkGatewayNatRules.listByVirtualNetworkGateway", + "@azure/arm-network!VirtualNetworkGatewayNatRulesOperations#delete:member": "Microsoft.Network.VirtualNetworkGatewayNatRules.delete", + "@azure/arm-network!VirtualNetworkGatewayNatRulesOperations#createOrUpdate:member": "Microsoft.Network.VirtualNetworkGatewayNatRules.createOrUpdate", + "@azure/arm-network!VirtualNetworkGatewayNatRulesOperations#get:member": "Microsoft.Network.VirtualNetworkGatewayNatRules.get", + "@azure/arm-network!LocalNetworkGatewaysOperations#list:member": "Microsoft.Network.LocalNetworkGateways.list", + "@azure/arm-network!LocalNetworkGatewaysOperations#delete:member": "Microsoft.Network.LocalNetworkGateways.delete", + "@azure/arm-network!LocalNetworkGatewaysOperations#updateTags:member": "Microsoft.Network.LocalNetworkGateways.updateTags", + "@azure/arm-network!LocalNetworkGatewaysOperations#createOrUpdate:member": "Microsoft.Network.LocalNetworkGateways.createOrUpdate", + "@azure/arm-network!LocalNetworkGatewaysOperations#get:member": "Microsoft.Network.LocalNetworkGateways.get", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#resetConnection:member": "Microsoft.Network.VirtualNetworkGatewayConnections.resetConnection", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#getIkeSas:member": "Microsoft.Network.VirtualNetworkGatewayConnections.getIkeSas", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#stopPacketCapture:member": "Microsoft.Network.VirtualNetworkGatewayConnections.stopPacketCapture", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#startPacketCapture:member": "Microsoft.Network.VirtualNetworkGatewayConnections.startPacketCapture", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#resetSharedKey:member": "Microsoft.Network.VirtualNetworkGatewayConnections.resetSharedKey", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#getSharedKey:member": "Microsoft.Network.VirtualNetworkGatewayConnections.getSharedKey", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#setSharedKey:member": "Microsoft.Network.VirtualNetworkGatewayConnections.setSharedKey", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#list:member": "Microsoft.Network.VirtualNetworkGatewayConnections.list", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#delete:member": "Microsoft.Network.VirtualNetworkGatewayConnections.delete", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#updateTags:member": "Microsoft.Network.VirtualNetworkGatewayConnections.updateTags", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#createOrUpdate:member": "Microsoft.Network.VirtualNetworkGatewayConnections.createOrUpdate", + "@azure/arm-network!VirtualNetworkGatewayConnectionsOperations#get:member": "Microsoft.Network.VirtualNetworkGatewayConnections.get", + "@azure/arm-network!VirtualNetworkGatewaysOperations#vpnDeviceConfigurationScript:member": "Microsoft.Network.VirtualNetworkGatewayConnections.vpnDeviceConfigurationScript", + "@azure/arm-network!VirtualNetworkGatewaysOperations#invokeAbortMigration:member": "Microsoft.Network.VirtualNetworkGateways.invokeAbortMigration", + "@azure/arm-network!VirtualNetworkGatewaysOperations#invokeCommitMigration:member": "Microsoft.Network.VirtualNetworkGateways.invokeCommitMigration", + "@azure/arm-network!VirtualNetworkGatewaysOperations#invokeExecuteMigration:member": "Microsoft.Network.VirtualNetworkGateways.invokeExecuteMigration", + "@azure/arm-network!VirtualNetworkGatewaysOperations#invokePrepareMigration:member": "Microsoft.Network.VirtualNetworkGateways.invokePrepareMigration", + "@azure/arm-network!VirtualNetworkGatewaysOperations#disconnectVirtualNetworkGatewayVpnConnections:member": "Microsoft.Network.VirtualNetworkGateways.disconnectVirtualNetworkGatewayVpnConnections", + "@azure/arm-network!VirtualNetworkGatewaysOperations#getVpnclientConnectionHealth:member": "Microsoft.Network.VirtualNetworkGateways.getVpnclientConnectionHealth", + "@azure/arm-network!VirtualNetworkGatewaysOperations#stopExpressRouteSiteFailoverSimulation:member": "Microsoft.Network.VirtualNetworkGateways.stopExpressRouteSiteFailoverSimulation", + "@azure/arm-network!VirtualNetworkGatewaysOperations#startExpressRouteSiteFailoverSimulation:member": "Microsoft.Network.VirtualNetworkGateways.startExpressRouteSiteFailoverSimulation", + "@azure/arm-network!VirtualNetworkGatewaysOperations#getFailoverSingleTestDetails:member": "Microsoft.Network.VirtualNetworkGateways.getFailoverSingleTestDetails", + "@azure/arm-network!VirtualNetworkGatewaysOperations#getFailoverAllTestDetails:member": "Microsoft.Network.VirtualNetworkGateways.getFailoverAllTestDetails", + "@azure/arm-network!VirtualNetworkGatewaysOperations#stopPacketCapture:member": "Microsoft.Network.VirtualNetworkGateways.stopPacketCapture", + "@azure/arm-network!VirtualNetworkGatewaysOperations#startPacketCapture:member": "Microsoft.Network.VirtualNetworkGateways.startPacketCapture", + "@azure/arm-network!VirtualNetworkGatewaysOperations#getVpnclientIpsecParameters:member": "Microsoft.Network.VirtualNetworkGateways.getVpnclientIpsecParameters", + "@azure/arm-network!VirtualNetworkGatewaysOperations#setVpnclientIpsecParameters:member": "Microsoft.Network.VirtualNetworkGateways.setVpnclientIpsecParameters", + "@azure/arm-network!VirtualNetworkGatewaysOperations#getRoutesInformation:member": "Microsoft.Network.VirtualNetworkGateways.getRoutesInformation", + "@azure/arm-network!VirtualNetworkGatewaysOperations#getResiliencyInformation:member": "Microsoft.Network.VirtualNetworkGateways.getResiliencyInformation", + "@azure/arm-network!VirtualNetworkGatewaysOperations#getAdvertisedRoutes:member": "Microsoft.Network.VirtualNetworkGateways.getAdvertisedRoutes", + "@azure/arm-network!VirtualNetworkGatewaysOperations#getLearnedRoutes:member": "Microsoft.Network.VirtualNetworkGateways.getLearnedRoutes", + "@azure/arm-network!VirtualNetworkGatewaysOperations#listRadiusSecrets:member": "Microsoft.Network.VirtualNetworkGateways.listRadiusSecrets", + "@azure/arm-network!VirtualNetworkGatewaysOperations#supportedVpnDevices:member": "Microsoft.Network.VirtualNetworkGateways.supportedVpnDevices", + "@azure/arm-network!VirtualNetworkGatewaysOperations#getBgpPeerStatus:member": "Microsoft.Network.VirtualNetworkGateways.getBgpPeerStatus", + "@azure/arm-network!VirtualNetworkGatewaysOperations#getVpnProfilePackageUrl:member": "Microsoft.Network.VirtualNetworkGateways.getVpnProfilePackageUrl", + "@azure/arm-network!VirtualNetworkGatewaysOperations#generateVpnProfile:member": "Microsoft.Network.VirtualNetworkGateways.generateVpnProfile", + "@azure/arm-network!VirtualNetworkGatewaysOperations#generatevpnclientpackage:member": "Microsoft.Network.VirtualNetworkGateways.generatevpnclientpackage", + "@azure/arm-network!VirtualNetworkGatewaysOperations#resetVpnClientSharedKey:member": "Microsoft.Network.VirtualNetworkGateways.resetVpnClientSharedKey", + "@azure/arm-network!VirtualNetworkGatewaysOperations#reset:member": "Microsoft.Network.VirtualNetworkGateways.reset", + "@azure/arm-network!VirtualNetworkGatewaysOperations#listConnections:member": "Microsoft.Network.VirtualNetworkGateways.listConnections", + "@azure/arm-network!VirtualNetworkGatewaysOperations#list:member": "Microsoft.Network.VirtualNetworkGateways.list", + "@azure/arm-network!VirtualNetworkGatewaysOperations#delete:member": "Microsoft.Network.VirtualNetworkGateways.delete", + "@azure/arm-network!VirtualNetworkGatewaysOperations#updateTags:member": "Microsoft.Network.VirtualNetworkGateways.updateTags", + "@azure/arm-network!VirtualNetworkGatewaysOperations#createOrUpdate:member": "Microsoft.Network.VirtualNetworkGateways.createOrUpdate", + "@azure/arm-network!VirtualNetworkGatewaysOperations#get:member": "Microsoft.Network.VirtualNetworkGateways.get", + "@azure/arm-network!VirtualNetworkPeeringsOperations#list:member": "Microsoft.Network.VirtualNetworkPeerings.list", + "@azure/arm-network!VirtualNetworkPeeringsOperations#delete:member": "Microsoft.Network.VirtualNetworkPeerings.delete", + "@azure/arm-network!VirtualNetworkPeeringsOperations#createOrUpdate:member": "Microsoft.Network.VirtualNetworkPeerings.createOrUpdate", + "@azure/arm-network!VirtualNetworkPeeringsOperations#get:member": "Microsoft.Network.VirtualNetworkPeerings.get", + "@azure/arm-network!SubnetsOperations#unprepareNetworkPolicies:member": "Microsoft.Network.Subnets.unprepareNetworkPolicies", + "@azure/arm-network!SubnetsOperations#prepareNetworkPolicies:member": "Microsoft.Network.Subnets.prepareNetworkPolicies", + "@azure/arm-network!SubnetsOperations#list:member": "Microsoft.Network.Subnets.list", + "@azure/arm-network!SubnetsOperations#delete:member": "Microsoft.Network.Subnets.delete", + "@azure/arm-network!SubnetsOperations#createOrUpdate:member": "Microsoft.Network.Subnets.createOrUpdate", + "@azure/arm-network!SubnetsOperations#get:member": "Microsoft.Network.Subnets.get", + "@azure/arm-network!VirtualNetworksOperations#listDdosProtectionStatus:member": "Microsoft.Network.VirtualNetworks.listDdosProtectionStatus", + "@azure/arm-network!VirtualNetworksOperations#listUsage:member": "Microsoft.Network.VirtualNetworks.listUsage", + "@azure/arm-network!VirtualNetworksOperations#checkIPAddressAvailability:member": "Microsoft.Network.VirtualNetworks.checkIPAddressAvailability", + "@azure/arm-network!VirtualNetworksOperations#listAll:member": "Microsoft.Network.VirtualNetworks.listAll", + "@azure/arm-network!VirtualNetworksOperations#list:member": "Microsoft.Network.VirtualNetworks.list", + "@azure/arm-network!VirtualNetworksOperations#delete:member": "Microsoft.Network.VirtualNetworks.delete", + "@azure/arm-network!VirtualNetworksOperations#updateTags:member": "Microsoft.Network.VirtualNetworks.updateTags", + "@azure/arm-network!VirtualNetworksOperations#createOrUpdate:member": "Microsoft.Network.VirtualNetworks.createOrUpdate", + "@azure/arm-network!VirtualNetworksOperations#get:member": "Microsoft.Network.VirtualNetworks.get", + "@azure/arm-network!ServiceEndpointPolicyDefinitionsOperations#listByResourceGroup:member": "Microsoft.Network.ServiceEndpointPolicyDefinitions.listByResourceGroup", + "@azure/arm-network!ServiceEndpointPolicyDefinitionsOperations#delete:member": "Microsoft.Network.ServiceEndpointPolicyDefinitions.delete", + "@azure/arm-network!ServiceEndpointPolicyDefinitionsOperations#createOrUpdate:member": "Microsoft.Network.ServiceEndpointPolicyDefinitions.createOrUpdate", + "@azure/arm-network!ServiceEndpointPolicyDefinitionsOperations#get:member": "Microsoft.Network.ServiceEndpointPolicyDefinitions.get", + "@azure/arm-network!ServiceEndpointPoliciesOperations#list:member": "Microsoft.Network.ServiceEndpointPolicies.list", + "@azure/arm-network!ServiceEndpointPoliciesOperations#listByResourceGroup:member": "Microsoft.Network.ServiceEndpointPolicies.listByResourceGroup", + "@azure/arm-network!ServiceEndpointPoliciesOperations#delete:member": "Microsoft.Network.ServiceEndpointPolicies.delete", + "@azure/arm-network!ServiceEndpointPoliciesOperations#updateTags:member": "Microsoft.Network.ServiceEndpointPolicies.updateTags", + "@azure/arm-network!ServiceEndpointPoliciesOperations#createOrUpdate:member": "Microsoft.Network.ServiceEndpointPolicies.createOrUpdate", + "@azure/arm-network!ServiceEndpointPoliciesOperations#get:member": "Microsoft.Network.ServiceEndpointPolicies.get", + "@azure/arm-network!SecurityPartnerProvidersOperations#list:member": "Microsoft.Network.SecurityPartnerProviders.list", + "@azure/arm-network!SecurityPartnerProvidersOperations#listByResourceGroup:member": "Microsoft.Network.SecurityPartnerProviders.listByResourceGroup", + "@azure/arm-network!SecurityPartnerProvidersOperations#delete:member": "Microsoft.Network.SecurityPartnerProviders.delete", + "@azure/arm-network!SecurityPartnerProvidersOperations#updateTags:member": "Microsoft.Network.SecurityPartnerProviders.updateTags", + "@azure/arm-network!SecurityPartnerProvidersOperations#createOrUpdate:member": "Microsoft.Network.SecurityPartnerProviders.createOrUpdate", + "@azure/arm-network!SecurityPartnerProvidersOperations#get:member": "Microsoft.Network.SecurityPartnerProviders.get", + "@azure/arm-network!RoutesOperations#list:member": "Microsoft.Network.Routes.list", + "@azure/arm-network!RoutesOperations#delete:member": "Microsoft.Network.Routes.delete", + "@azure/arm-network!RoutesOperations#createOrUpdate:member": "Microsoft.Network.Routes.createOrUpdate", + "@azure/arm-network!RoutesOperations#get:member": "Microsoft.Network.Routes.get", + "@azure/arm-network!RouteTablesOperations#listAll:member": "Microsoft.Network.RouteTables.listAll", + "@azure/arm-network!RouteTablesOperations#list:member": "Microsoft.Network.RouteTables.list", + "@azure/arm-network!RouteTablesOperations#delete:member": "Microsoft.Network.RouteTables.delete", + "@azure/arm-network!RouteTablesOperations#updateTags:member": "Microsoft.Network.RouteTables.updateTags", + "@azure/arm-network!RouteTablesOperations#createOrUpdate:member": "Microsoft.Network.RouteTables.createOrUpdate", + "@azure/arm-network!RouteTablesOperations#get:member": "Microsoft.Network.RouteTables.get", + "@azure/arm-network!RouteFiltersOperations#list:member": "Microsoft.Network.RouteFilters.list", + "@azure/arm-network!RouteFiltersOperations#listByResourceGroup:member": "Microsoft.Network.RouteFilters.listByResourceGroup", + "@azure/arm-network!RouteFiltersOperations#delete:member": "Microsoft.Network.RouteFilters.delete", + "@azure/arm-network!RouteFiltersOperations#updateTags:member": "Microsoft.Network.RouteFilters.updateTags", + "@azure/arm-network!RouteFiltersOperations#createOrUpdate:member": "Microsoft.Network.RouteFilters.createOrUpdate", + "@azure/arm-network!RouteFiltersOperations#get:member": "Microsoft.Network.RouteFilters.get", + "@azure/arm-network!PublicIPPrefixesOperations#listAll:member": "Microsoft.Network.PublicIPPrefixes.listAll", + "@azure/arm-network!PublicIPPrefixesOperations#list:member": "Microsoft.Network.PublicIPPrefixes.list", + "@azure/arm-network!PublicIPPrefixesOperations#delete:member": "Microsoft.Network.PublicIPPrefixes.delete", + "@azure/arm-network!PublicIPPrefixesOperations#updateTags:member": "Microsoft.Network.PublicIPPrefixes.updateTags", + "@azure/arm-network!PublicIPPrefixesOperations#createOrUpdate:member": "Microsoft.Network.PublicIPPrefixes.createOrUpdate", + "@azure/arm-network!PublicIPPrefixesOperations#get:member": "Microsoft.Network.PublicIPPrefixes.get", + "@azure/arm-network!PrivateLinkServicesOperations#listAutoApprovedPrivateLinkServicesByResourceGroup:member": "Microsoft.Network.PrivateLinkServicesOperationGroup.listAutoApprovedPrivateLinkServicesByResourceGroup", + "@azure/arm-network!PrivateLinkServicesOperations#listAutoApprovedPrivateLinkServices:member": "Microsoft.Network.PrivateLinkServicesOperationGroup.listAutoApprovedPrivateLinkServices", + "@azure/arm-network!PrivateLinkServicesOperations#checkPrivateLinkServiceVisibilityByResourceGroup:member": "Microsoft.Network.PrivateLinkServicesOperationGroup.checkPrivateLinkServiceVisibilityByResourceGroup", + "@azure/arm-network!PrivateLinkServicesOperations#checkPrivateLinkServiceVisibility:member": "Microsoft.Network.PrivateLinkServicesOperationGroup.checkPrivateLinkServiceVisibility", + "@azure/arm-network!PrivateLinkServicesOperations#listPrivateEndpointConnections:member": "Microsoft.Network.PrivateEndpointConnections.listPrivateEndpointConnections", + "@azure/arm-network!PrivateLinkServicesOperations#deletePrivateEndpointConnection:member": "Microsoft.Network.PrivateEndpointConnections.deletePrivateEndpointConnection", + "@azure/arm-network!PrivateLinkServicesOperations#updatePrivateEndpointConnection:member": "Microsoft.Network.PrivateEndpointConnections.updatePrivateEndpointConnection", + "@azure/arm-network!PrivateLinkServicesOperations#getPrivateEndpointConnection:member": "Microsoft.Network.PrivateEndpointConnections.getPrivateEndpointConnection", + "@azure/arm-network!PrivateLinkServicesOperations#listBySubscription:member": "Microsoft.Network.PrivateLinkServices.listBySubscription", + "@azure/arm-network!PrivateLinkServicesOperations#list:member": "Microsoft.Network.PrivateLinkServices.list", + "@azure/arm-network!PrivateLinkServicesOperations#delete:member": "Microsoft.Network.PrivateLinkServices.delete", + "@azure/arm-network!PrivateLinkServicesOperations#createOrUpdate:member": "Microsoft.Network.PrivateLinkServices.createOrUpdate", + "@azure/arm-network!PrivateLinkServicesOperations#get:member": "Microsoft.Network.PrivateLinkServices.get", + "@azure/arm-network!PrivateEndpointsOperations#listBySubscription:member": "Microsoft.Network.PrivateEndpoints.listBySubscription", + "@azure/arm-network!PrivateEndpointsOperations#list:member": "Microsoft.Network.PrivateEndpoints.list", + "@azure/arm-network!PrivateEndpointsOperations#delete:member": "Microsoft.Network.PrivateEndpoints.delete", + "@azure/arm-network!PrivateEndpointsOperations#createOrUpdate:member": "Microsoft.Network.PrivateEndpoints.createOrUpdate", + "@azure/arm-network!PrivateEndpointsOperations#get:member": "Microsoft.Network.PrivateEndpoints.get", + "@azure/arm-network!FlowLogsOperations#list:member": "Microsoft.Network.FlowLogs.list", + "@azure/arm-network!FlowLogsOperations#delete:member": "Microsoft.Network.FlowLogs.delete", + "@azure/arm-network!FlowLogsOperations#updateTags:member": "Microsoft.Network.FlowLogs.updateTags", + "@azure/arm-network!FlowLogsOperations#createOrUpdate:member": "Microsoft.Network.FlowLogs.createOrUpdate", + "@azure/arm-network!FlowLogsOperations#get:member": "Microsoft.Network.FlowLogs.get", + "@azure/arm-network!NetworkWatchersOperations#getNetworkConfigurationDiagnostic:member": "Microsoft.Network.NetworkWatchers.getNetworkConfigurationDiagnostic", + "@azure/arm-network!NetworkWatchersOperations#listAvailableProviders:member": "Microsoft.Network.NetworkWatchers.listAvailableProviders", + "@azure/arm-network!NetworkWatchersOperations#getAzureReachabilityReport:member": "Microsoft.Network.NetworkWatchers.getAzureReachabilityReport", + "@azure/arm-network!NetworkWatchersOperations#checkConnectivity:member": "Microsoft.Network.NetworkWatchers.checkConnectivity", + "@azure/arm-network!NetworkWatchersOperations#getFlowLogStatus:member": "Microsoft.Network.NetworkWatchers.getFlowLogStatus", + "@azure/arm-network!NetworkWatchersOperations#setFlowLogConfiguration:member": "Microsoft.Network.NetworkWatchers.setFlowLogConfiguration", + "@azure/arm-network!NetworkWatchersOperations#getTroubleshootingResult:member": "Microsoft.Network.NetworkWatchers.getTroubleshootingResult", + "@azure/arm-network!NetworkWatchersOperations#getTroubleshooting:member": "Microsoft.Network.NetworkWatchers.getTroubleshooting", + "@azure/arm-network!NetworkWatchersOperations#getVMSecurityRules:member": "Microsoft.Network.NetworkWatchers.getVMSecurityRules", + "@azure/arm-network!NetworkWatchersOperations#getNextHop:member": "Microsoft.Network.NetworkWatchers.getNextHop", + "@azure/arm-network!NetworkWatchersOperations#verifyIPFlow:member": "Microsoft.Network.NetworkWatchers.verifyIPFlow", + "@azure/arm-network!NetworkWatchersOperations#getTopology:member": "Microsoft.Network.NetworkWatchers.getTopology", + "@azure/arm-network!NetworkWatchersOperations#listAll:member": "Microsoft.Network.NetworkWatchers.listAll", + "@azure/arm-network!NetworkWatchersOperations#list:member": "Microsoft.Network.NetworkWatchers.list", + "@azure/arm-network!NetworkWatchersOperations#delete:member": "Microsoft.Network.NetworkWatchers.delete", + "@azure/arm-network!NetworkWatchersOperations#updateTags:member": "Microsoft.Network.NetworkWatchers.updateTags", + "@azure/arm-network!NetworkWatchersOperations#createOrUpdate:member": "Microsoft.Network.NetworkWatchers.createOrUpdate", + "@azure/arm-network!NetworkWatchersOperations#get:member": "Microsoft.Network.NetworkWatchers.get", + "@azure/arm-network!VirtualApplianceSitesOperations#list:member": "Microsoft.Network.VirtualApplianceSites.list", + "@azure/arm-network!VirtualApplianceSitesOperations#delete:member": "Microsoft.Network.VirtualApplianceSites.delete", + "@azure/arm-network!VirtualApplianceSitesOperations#createOrUpdate:member": "Microsoft.Network.VirtualApplianceSites.createOrUpdate", + "@azure/arm-network!VirtualApplianceSitesOperations#get:member": "Microsoft.Network.VirtualApplianceSites.get", + "@azure/arm-network!NetworkVirtualAppliancesOperations#getBootDiagnosticLogs:member": "Microsoft.Network.NetworkVirtualAppliances.getBootDiagnosticLogs", + "@azure/arm-network!NetworkVirtualAppliancesOperations#reimage:member": "Microsoft.Network.NetworkVirtualAppliances.reimage", + "@azure/arm-network!NetworkVirtualAppliancesOperations#restart:member": "Microsoft.Network.NetworkVirtualAppliances.restart", + "@azure/arm-network!NetworkVirtualAppliancesOperations#list:member": "Microsoft.Network.NetworkVirtualAppliances.list", + "@azure/arm-network!NetworkVirtualAppliancesOperations#listByResourceGroup:member": "Microsoft.Network.NetworkVirtualAppliances.listByResourceGroup", + "@azure/arm-network!NetworkVirtualAppliancesOperations#delete:member": "Microsoft.Network.NetworkVirtualAppliances.delete", + "@azure/arm-network!NetworkVirtualAppliancesOperations#updateTags:member": "Microsoft.Network.NetworkVirtualAppliances.updateTags", + "@azure/arm-network!NetworkVirtualAppliancesOperations#createOrUpdate:member": "Microsoft.Network.NetworkVirtualAppliances.createOrUpdate", + "@azure/arm-network!NetworkVirtualAppliancesOperations#get:member": "Microsoft.Network.NetworkVirtualAppliances.get", + "@azure/arm-network!NetworkVirtualApplianceConnectionsOperations#List:member": "Microsoft.Network.NetworkVirtualApplianceConnections.networkVirtualApplianceConnectionsList", + "@azure/arm-network!NetworkVirtualApplianceConnectionsOperations#Delete:member": "Microsoft.Network.NetworkVirtualApplianceConnections.networkVirtualApplianceConnectionsDelete", + "@azure/arm-network!NetworkVirtualApplianceConnectionsOperations#Get:member": "Microsoft.Network.NetworkVirtualApplianceConnections.networkVirtualApplianceConnectionsGet", + "@azure/arm-network!NetworkVirtualApplianceConnectionsOperations#CreateOrUpdate:member": "Microsoft.Network.NetworkVirtualApplianceConnections.networkVirtualApplianceConnectionsCreateOrUpdate", + "@azure/arm-network!ReachabilityAnalysisRunsOperations#list:member": "Microsoft.Network.ReachabilityAnalysisRuns.list", + "@azure/arm-network!ReachabilityAnalysisRunsOperations#delete:member": "Microsoft.Network.ReachabilityAnalysisRuns.delete", + "@azure/arm-network!ReachabilityAnalysisRunsOperations#create:member": "Microsoft.Network.ReachabilityAnalysisRuns.create", + "@azure/arm-network!ReachabilityAnalysisRunsOperations#get:member": "Microsoft.Network.ReachabilityAnalysisRuns.get", + "@azure/arm-network!VerifierWorkspacesOperations#list:member": "Microsoft.Network.VerifierWorkspaces.list", + "@azure/arm-network!VerifierWorkspacesOperations#delete:member": "Microsoft.Network.VerifierWorkspaces.delete", + "@azure/arm-network!VerifierWorkspacesOperations#update:member": "Microsoft.Network.VerifierWorkspaces.update", + "@azure/arm-network!VerifierWorkspacesOperations#create:member": "Microsoft.Network.VerifierWorkspaces.create", + "@azure/arm-network!VerifierWorkspacesOperations#get:member": "Microsoft.Network.VerifierWorkspaces.get", + "@azure/arm-network!ReachabilityAnalysisIntentsOperations#list:member": "Microsoft.Network.ReachabilityAnalysisIntents.list", + "@azure/arm-network!ReachabilityAnalysisIntentsOperations#delete:member": "Microsoft.Network.ReachabilityAnalysisIntents.delete", + "@azure/arm-network!ReachabilityAnalysisIntentsOperations#create:member": "Microsoft.Network.ReachabilityAnalysisIntents.create", + "@azure/arm-network!ReachabilityAnalysisIntentsOperations#get:member": "Microsoft.Network.ReachabilityAnalysisIntents.get", + "@azure/arm-network!NetworkSecurityPerimetersOperations#listBySubscription:member": "Microsoft.Network.NetworkSecurityPerimeters.listBySubscription", + "@azure/arm-network!NetworkSecurityPerimetersOperations#list:member": "Microsoft.Network.NetworkSecurityPerimeters.list", + "@azure/arm-network!NetworkSecurityPerimetersOperations#delete:member": "Microsoft.Network.NetworkSecurityPerimeters.delete", + "@azure/arm-network!NetworkSecurityPerimetersOperations#patch:member": "Microsoft.Network.NetworkSecurityPerimeters.patch", + "@azure/arm-network!NetworkSecurityPerimetersOperations#createOrUpdate:member": "Microsoft.Network.NetworkSecurityPerimeters.createOrUpdate", + "@azure/arm-network!NetworkSecurityPerimetersOperations#get:member": "Microsoft.Network.NetworkSecurityPerimeters.get", + "@azure/arm-network!DefaultSecurityRulesOperations#list:member": "Microsoft.Network.DefaultSecurityRules.list", + "@azure/arm-network!DefaultSecurityRulesOperations#get:member": "Microsoft.Network.DefaultSecurityRules.get", + "@azure/arm-network!SecurityRulesOperations#list:member": "Microsoft.Network.SecurityRules.list", + "@azure/arm-network!SecurityRulesOperations#delete:member": "Microsoft.Network.SecurityRules.delete", + "@azure/arm-network!SecurityRulesOperations#createOrUpdate:member": "Microsoft.Network.SecurityRules.createOrUpdate", + "@azure/arm-network!SecurityRulesOperations#get:member": "Microsoft.Network.SecurityRules.get", + "@azure/arm-network!NetworkSecurityGroupsOperations#listAll:member": "Microsoft.Network.NetworkSecurityGroups.listAll", + "@azure/arm-network!NetworkSecurityGroupsOperations#list:member": "Microsoft.Network.NetworkSecurityGroups.list", + "@azure/arm-network!NetworkSecurityGroupsOperations#delete:member": "Microsoft.Network.NetworkSecurityGroups.delete", + "@azure/arm-network!NetworkSecurityGroupsOperations#updateTags:member": "Microsoft.Network.NetworkSecurityGroups.updateTags", + "@azure/arm-network!NetworkSecurityGroupsOperations#createOrUpdate:member": "Microsoft.Network.NetworkSecurityGroups.createOrUpdate", + "@azure/arm-network!NetworkSecurityGroupsOperations#get:member": "Microsoft.Network.NetworkSecurityGroups.get", + "@azure/arm-network!NetworkProfilesOperations#listAll:member": "Microsoft.Network.NetworkProfiles.listAll", + "@azure/arm-network!NetworkProfilesOperations#list:member": "Microsoft.Network.NetworkProfiles.list", + "@azure/arm-network!NetworkProfilesOperations#delete:member": "Microsoft.Network.NetworkProfiles.delete", + "@azure/arm-network!NetworkProfilesOperations#updateTags:member": "Microsoft.Network.NetworkProfiles.updateTags", + "@azure/arm-network!NetworkProfilesOperations#createOrUpdate:member": "Microsoft.Network.NetworkProfiles.createOrUpdate", + "@azure/arm-network!NetworkProfilesOperations#get:member": "Microsoft.Network.NetworkProfiles.get", + "@azure/arm-network!SecurityUserRulesOperations#list:member": "Microsoft.Network.SecurityUserRules.list", + "@azure/arm-network!SecurityUserRulesOperations#delete:member": "Microsoft.Network.SecurityUserRules.delete", + "@azure/arm-network!SecurityUserRulesOperations#createOrUpdate:member": "Microsoft.Network.SecurityUserRules.createOrUpdate", + "@azure/arm-network!SecurityUserRulesOperations#get:member": "Microsoft.Network.SecurityUserRules.get", + "@azure/arm-network!SecurityUserRuleCollectionsOperations#list:member": "Microsoft.Network.SecurityUserRuleCollections.list", + "@azure/arm-network!SecurityUserRuleCollectionsOperations#delete:member": "Microsoft.Network.SecurityUserRuleCollections.delete", + "@azure/arm-network!SecurityUserRuleCollectionsOperations#createOrUpdate:member": "Microsoft.Network.SecurityUserRuleCollections.createOrUpdate", + "@azure/arm-network!SecurityUserRuleCollectionsOperations#get:member": "Microsoft.Network.SecurityUserRuleCollections.get", + "@azure/arm-network!SecurityUserConfigurationsOperations#list:member": "Microsoft.Network.SecurityUserConfigurations.list", + "@azure/arm-network!SecurityUserConfigurationsOperations#delete:member": "Microsoft.Network.SecurityUserConfigurations.delete", + "@azure/arm-network!SecurityUserConfigurationsOperations#createOrUpdate:member": "Microsoft.Network.SecurityUserConfigurations.createOrUpdate", + "@azure/arm-network!SecurityUserConfigurationsOperations#get:member": "Microsoft.Network.SecurityUserConfigurations.get", + "@azure/arm-network!AdminRuleCollectionsOperations#list:member": "Microsoft.Network.AdminRuleCollections.list", + "@azure/arm-network!AdminRuleCollectionsOperations#delete:member": "Microsoft.Network.AdminRuleCollections.delete", + "@azure/arm-network!AdminRuleCollectionsOperations#createOrUpdate:member": "Microsoft.Network.AdminRuleCollections.createOrUpdate", + "@azure/arm-network!AdminRuleCollectionsOperations#get:member": "Microsoft.Network.AdminRuleCollections.get", + "@azure/arm-network!SecurityAdminConfigurationsOperations#list:member": "Microsoft.Network.SecurityAdminConfigurations.list", + "@azure/arm-network!SecurityAdminConfigurationsOperations#delete:member": "Microsoft.Network.SecurityAdminConfigurations.delete", + "@azure/arm-network!SecurityAdminConfigurationsOperations#createOrUpdate:member": "Microsoft.Network.SecurityAdminConfigurations.createOrUpdate", + "@azure/arm-network!SecurityAdminConfigurationsOperations#get:member": "Microsoft.Network.SecurityAdminConfigurations.get", + "@azure/arm-network!CommitsOperations#list:member": "Microsoft.Network.Commits.list", + "@azure/arm-network!CommitsOperations#delete:member": "Microsoft.Network.Commits.delete", + "@azure/arm-network!CommitsOperations#createOrUpdate:member": "Microsoft.Network.Commits.createOrUpdate", + "@azure/arm-network!CommitsOperations#get:member": "Microsoft.Network.Commits.get", + "@azure/arm-network!ScopeConnectionsOperations#list:member": "Microsoft.Network.ScopeConnections.list", + "@azure/arm-network!ScopeConnectionsOperations#delete:member": "Microsoft.Network.ScopeConnections.delete", + "@azure/arm-network!ScopeConnectionsOperations#createOrUpdate:member": "Microsoft.Network.ScopeConnections.createOrUpdate", + "@azure/arm-network!ScopeConnectionsOperations#get:member": "Microsoft.Network.ScopeConnections.get", + "@azure/arm-network!RoutingRulesOperations#list:member": "Microsoft.Network.RoutingRules.list", + "@azure/arm-network!RoutingRulesOperations#delete:member": "Microsoft.Network.RoutingRules.delete", + "@azure/arm-network!RoutingRulesOperations#createOrUpdate:member": "Microsoft.Network.RoutingRules.createOrUpdate", + "@azure/arm-network!RoutingRulesOperations#get:member": "Microsoft.Network.RoutingRules.get", + "@azure/arm-network!RoutingRuleCollectionsOperations#list:member": "Microsoft.Network.RoutingRuleCollections.list", + "@azure/arm-network!RoutingRuleCollectionsOperations#delete:member": "Microsoft.Network.RoutingRuleCollections.delete", + "@azure/arm-network!RoutingRuleCollectionsOperations#createOrUpdate:member": "Microsoft.Network.RoutingRuleCollections.createOrUpdate", + "@azure/arm-network!RoutingRuleCollectionsOperations#get:member": "Microsoft.Network.RoutingRuleCollections.get", + "@azure/arm-network!NetworkManagerRoutingConfigurationsOperations#list:member": "Microsoft.Network.NetworkManagerRoutingConfigurations.list", + "@azure/arm-network!NetworkManagerRoutingConfigurationsOperations#delete:member": "Microsoft.Network.NetworkManagerRoutingConfigurations.delete", + "@azure/arm-network!NetworkManagerRoutingConfigurationsOperations#createOrUpdate:member": "Microsoft.Network.NetworkManagerRoutingConfigurations.createOrUpdate", + "@azure/arm-network!NetworkManagerRoutingConfigurationsOperations#get:member": "Microsoft.Network.NetworkManagerRoutingConfigurations.get", + "@azure/arm-network!StaticMembersOperations#list:member": "Microsoft.Network.StaticMembers.list", + "@azure/arm-network!StaticMembersOperations#delete:member": "Microsoft.Network.StaticMembers.delete", + "@azure/arm-network!StaticMembersOperations#createOrUpdate:member": "Microsoft.Network.StaticMembers.createOrUpdate", + "@azure/arm-network!StaticMembersOperations#get:member": "Microsoft.Network.StaticMembers.get", + "@azure/arm-network!NetworkGroupsOperations#list:member": "Microsoft.Network.NetworkGroups.list", + "@azure/arm-network!NetworkGroupsOperations#delete:member": "Microsoft.Network.NetworkGroups.delete", + "@azure/arm-network!NetworkGroupsOperations#createOrUpdate:member": "Microsoft.Network.NetworkGroups.createOrUpdate", + "@azure/arm-network!NetworkGroupsOperations#get:member": "Microsoft.Network.NetworkGroups.get", + "@azure/arm-network!ConnectivityConfigurationsOperations#list:member": "Microsoft.Network.ConnectivityConfigurations.list", + "@azure/arm-network!ConnectivityConfigurationsOperations#delete:member": "Microsoft.Network.ConnectivityConfigurations.delete", + "@azure/arm-network!ConnectivityConfigurationsOperations#createOrUpdate:member": "Microsoft.Network.ConnectivityConfigurations.createOrUpdate", + "@azure/arm-network!ConnectivityConfigurationsOperations#get:member": "Microsoft.Network.ConnectivityConfigurations.get", + "@azure/arm-network!ManagementGroupNetworkManagerConnectionsOperations#list:member": "Microsoft.Network.ManagementGroupNetworkManagerConnections.list", + "@azure/arm-network!ManagementGroupNetworkManagerConnectionsOperations#delete:member": "Microsoft.Network.ManagementGroupNetworkManagerConnections.delete", + "@azure/arm-network!ManagementGroupNetworkManagerConnectionsOperations#createOrUpdate:member": "Microsoft.Network.ManagementGroupNetworkManagerConnections.createOrUpdate", + "@azure/arm-network!ManagementGroupNetworkManagerConnectionsOperations#get:member": "Microsoft.Network.ManagementGroupNetworkManagerConnections.get", + "@azure/arm-network!NetworkInterfaceTapConfigurationsOperations#list:member": "Microsoft.Network.NetworkInterfaceTapConfigurations.list", + "@azure/arm-network!NetworkInterfaceTapConfigurationsOperations#delete:member": "Microsoft.Network.NetworkInterfaceTapConfigurations.delete", + "@azure/arm-network!NetworkInterfaceTapConfigurationsOperations#createOrUpdate:member": "Microsoft.Network.NetworkInterfaceTapConfigurations.createOrUpdate", + "@azure/arm-network!NetworkInterfaceTapConfigurationsOperations#get:member": "Microsoft.Network.NetworkInterfaceTapConfigurations.get", + "@azure/arm-network!NetworkInterfaceIPConfigurationsOperations#list:member": "Microsoft.Network.NetworkInterfaceIPConfigurations.list", + "@azure/arm-network!NetworkInterfaceIPConfigurationsOperations#get:member": "Microsoft.Network.NetworkInterfaceIPConfigurations.get", + "@azure/arm-network!NatGatewaysOperations#listAll:member": "Microsoft.Network.NatGateways.listAll", + "@azure/arm-network!NatGatewaysOperations#list:member": "Microsoft.Network.NatGateways.list", + "@azure/arm-network!NatGatewaysOperations#delete:member": "Microsoft.Network.NatGateways.delete", + "@azure/arm-network!NatGatewaysOperations#updateTags:member": "Microsoft.Network.NatGateways.updateTags", + "@azure/arm-network!NatGatewaysOperations#createOrUpdate:member": "Microsoft.Network.NatGateways.createOrUpdate", + "@azure/arm-network!NatGatewaysOperations#get:member": "Microsoft.Network.NatGateways.get", + "@azure/arm-network!InboundNatRulesOperations#list:member": "Microsoft.Network.InboundNatRules.list", + "@azure/arm-network!InboundNatRulesOperations#delete:member": "Microsoft.Network.InboundNatRules.delete", + "@azure/arm-network!InboundNatRulesOperations#createOrUpdate:member": "Microsoft.Network.InboundNatRules.createOrUpdate", + "@azure/arm-network!InboundNatRulesOperations#get:member": "Microsoft.Network.InboundNatRules.get", + "@azure/arm-network!LoadBalancersOperations#swapPublicIpAddresses:member": "Microsoft.Network.LoadBalancersOperationGroup.swapPublicIpAddresses", + "@azure/arm-network!LoadBalancersOperations#listInboundNatRulePortMappings:member": "Microsoft.Network.BackendAddressPools.listInboundNatRulePortMappings", + "@azure/arm-network!LoadBalancersOperations#migrateToIpBased:member": "Microsoft.Network.LoadBalancers.migrateToIpBased", + "@azure/arm-network!LoadBalancersOperations#listAll:member": "Microsoft.Network.LoadBalancers.listAll", + "@azure/arm-network!LoadBalancersOperations#list:member": "Microsoft.Network.LoadBalancers.list", + "@azure/arm-network!LoadBalancersOperations#delete:member": "Microsoft.Network.LoadBalancers.delete", + "@azure/arm-network!LoadBalancersOperations#updateTags:member": "Microsoft.Network.LoadBalancers.updateTags", + "@azure/arm-network!LoadBalancersOperations#createOrUpdate:member": "Microsoft.Network.LoadBalancers.createOrUpdate", + "@azure/arm-network!LoadBalancersOperations#get:member": "Microsoft.Network.LoadBalancers.get", + "@azure/arm-network!IpGroupsOperations#list:member": "Microsoft.Network.IpGroups.list", + "@azure/arm-network!IpGroupsOperations#listByResourceGroup:member": "Microsoft.Network.IpGroups.listByResourceGroup", + "@azure/arm-network!IpGroupsOperations#delete:member": "Microsoft.Network.IpGroups.delete", + "@azure/arm-network!IpGroupsOperations#updateGroups:member": "Microsoft.Network.IpGroups.updateGroups", + "@azure/arm-network!IpGroupsOperations#createOrUpdate:member": "Microsoft.Network.IpGroups.createOrUpdate", + "@azure/arm-network!IpGroupsOperations#get:member": "Microsoft.Network.IpGroups.get", + "@azure/arm-network!IpAllocationsOperations#list:member": "Microsoft.Network.IpAllocations.list", + "@azure/arm-network!IpAllocationsOperations#listByResourceGroup:member": "Microsoft.Network.IpAllocations.listByResourceGroup", + "@azure/arm-network!IpAllocationsOperations#delete:member": "Microsoft.Network.IpAllocations.delete", + "@azure/arm-network!IpAllocationsOperations#updateTags:member": "Microsoft.Network.IpAllocations.updateTags", + "@azure/arm-network!IpAllocationsOperations#createOrUpdate:member": "Microsoft.Network.IpAllocations.createOrUpdate", + "@azure/arm-network!IpAllocationsOperations#get:member": "Microsoft.Network.IpAllocations.get", + "@azure/arm-network!StaticCidrsOperations#list:member": "Microsoft.Network.StaticCidrs.list", + "@azure/arm-network!StaticCidrsOperations#delete:member": "Microsoft.Network.StaticCidrs.delete", + "@azure/arm-network!StaticCidrsOperations#create:member": "Microsoft.Network.StaticCidrs.create", + "@azure/arm-network!StaticCidrsOperations#get:member": "Microsoft.Network.StaticCidrs.get", + "@azure/arm-network!NetworkManagersOperations#listBySubscription:member": "Microsoft.Network.NetworkManagers.listBySubscription", + "@azure/arm-network!NetworkManagersOperations#list:member": "Microsoft.Network.NetworkManagers.list", + "@azure/arm-network!NetworkManagersOperations#delete:member": "Microsoft.Network.NetworkManagers.delete", + "@azure/arm-network!NetworkManagersOperations#patch:member": "Microsoft.Network.NetworkManagers.patch", + "@azure/arm-network!NetworkManagersOperations#createOrUpdate:member": "Microsoft.Network.NetworkManagers.createOrUpdate", + "@azure/arm-network!NetworkManagersOperations#get:member": "Microsoft.Network.NetworkManagers.get", + "@azure/arm-network!IpamPoolsOperations#listAssociatedResources:member": "Microsoft.Network.IpamPools.listAssociatedResources", + "@azure/arm-network!IpamPoolsOperations#getPoolUsage:member": "Microsoft.Network.IpamPools.getPoolUsage", + "@azure/arm-network!IpamPoolsOperations#list:member": "Microsoft.Network.IpamPools.list", + "@azure/arm-network!IpamPoolsOperations#delete:member": "Microsoft.Network.IpamPools.delete", + "@azure/arm-network!IpamPoolsOperations#update:member": "Microsoft.Network.IpamPools.update", + "@azure/arm-network!IpamPoolsOperations#create:member": "Microsoft.Network.IpamPools.create", + "@azure/arm-network!IpamPoolsOperations#get:member": "Microsoft.Network.IpamPools.get", + "@azure/arm-network!FirewallPolicyRuleCollectionGroupDraftsOperations#delete:member": "Microsoft.Network.FirewallPolicyRuleCollectionGroupDrafts.delete", + "@azure/arm-network!FirewallPolicyRuleCollectionGroupDraftsOperations#createOrUpdate:member": "Microsoft.Network.FirewallPolicyRuleCollectionGroupDrafts.createOrUpdate", + "@azure/arm-network!FirewallPolicyRuleCollectionGroupDraftsOperations#get:member": "Microsoft.Network.FirewallPolicyRuleCollectionGroupDrafts.get", + "@azure/arm-network!FirewallPolicyDraftsOperations#delete:member": "Microsoft.Network.FirewallPolicyDrafts.delete", + "@azure/arm-network!FirewallPolicyDraftsOperations#createOrUpdate:member": "Microsoft.Network.FirewallPolicyDrafts.createOrUpdate", + "@azure/arm-network!FirewallPolicyDraftsOperations#get:member": "Microsoft.Network.FirewallPolicyDrafts.get", + "@azure/arm-network!FirewallPolicyIdpsSignaturesOverridesOperations#list:member": "Microsoft.Network.FirewallPolicyIdpsSignaturesOverrides.list", + "@azure/arm-network!FirewallPolicyIdpsSignaturesOverridesOperations#patch:member": "Microsoft.Network.FirewallPolicyIdpsSignaturesOverrides.patch", + "@azure/arm-network!FirewallPolicyIdpsSignaturesOverridesOperations#put:member": "Microsoft.Network.FirewallPolicyIdpsSignaturesOverrides.put", + "@azure/arm-network!FirewallPolicyIdpsSignaturesOverridesOperations#get:member": "Microsoft.Network.FirewallPolicyIdpsSignaturesOverrides.get", + "@azure/arm-network!FirewallPolicyRuleCollectionGroupsOperations#list:member": "Microsoft.Network.FirewallPolicyRuleCollectionGroups.list", + "@azure/arm-network!FirewallPolicyRuleCollectionGroupsOperations#delete:member": "Microsoft.Network.FirewallPolicyRuleCollectionGroups.delete", + "@azure/arm-network!FirewallPolicyRuleCollectionGroupsOperations#createOrUpdate:member": "Microsoft.Network.FirewallPolicyRuleCollectionGroups.createOrUpdate", + "@azure/arm-network!FirewallPolicyRuleCollectionGroupsOperations#get:member": "Microsoft.Network.FirewallPolicyRuleCollectionGroups.get", + "@azure/arm-network!FirewallPoliciesOperations#listAll:member": "Microsoft.Network.FirewallPolicies.listAll", + "@azure/arm-network!FirewallPoliciesOperations#list:member": "Microsoft.Network.FirewallPolicies.list", + "@azure/arm-network!FirewallPoliciesOperations#delete:member": "Microsoft.Network.FirewallPolicies.delete", + "@azure/arm-network!FirewallPoliciesOperations#updateTags:member": "Microsoft.Network.FirewallPolicies.updateTags", + "@azure/arm-network!FirewallPoliciesOperations#createOrUpdate:member": "Microsoft.Network.FirewallPolicies.createOrUpdate", + "@azure/arm-network!FirewallPoliciesOperations#get:member": "Microsoft.Network.FirewallPolicies.get", + "@azure/arm-network!ExpressRoutePortAuthorizationsOperations#list:member": "Microsoft.Network.ExpressRoutePortAuthorizations.list", + "@azure/arm-network!ExpressRoutePortAuthorizationsOperations#delete:member": "Microsoft.Network.ExpressRoutePortAuthorizations.delete", + "@azure/arm-network!ExpressRoutePortAuthorizationsOperations#createOrUpdate:member": "Microsoft.Network.ExpressRoutePortAuthorizations.createOrUpdate", + "@azure/arm-network!ExpressRoutePortAuthorizationsOperations#get:member": "Microsoft.Network.ExpressRoutePortAuthorizations.get", + "@azure/arm-network!ExpressRoutePortsOperations#generateLOA:member": "Microsoft.Network.ExpressRoutePorts.generateLOA", + "@azure/arm-network!ExpressRoutePortsOperations#list:member": "Microsoft.Network.ExpressRoutePorts.list", + "@azure/arm-network!ExpressRoutePortsOperations#listByResourceGroup:member": "Microsoft.Network.ExpressRoutePorts.listByResourceGroup", + "@azure/arm-network!ExpressRoutePortsOperations#delete:member": "Microsoft.Network.ExpressRoutePorts.delete", + "@azure/arm-network!ExpressRoutePortsOperations#updateTags:member": "Microsoft.Network.ExpressRoutePorts.updateTags", + "@azure/arm-network!ExpressRoutePortsOperations#createOrUpdate:member": "Microsoft.Network.ExpressRoutePorts.createOrUpdate", + "@azure/arm-network!ExpressRoutePortsOperations#get:member": "Microsoft.Network.ExpressRoutePorts.get", + "@azure/arm-network!ExpressRoutePortsLocationsOperations#list:member": "Microsoft.Network.ExpressRoutePortsLocations.list", + "@azure/arm-network!ExpressRoutePortsLocationsOperations#get:member": "Microsoft.Network.ExpressRoutePortsLocations.get", + "@azure/arm-network!ExpressRouteCrossConnectionsOperations#listRoutesTable:member": "Microsoft.Network.ExpressRouteCrossConnections.listRoutesTable", + "@azure/arm-network!ExpressRouteCrossConnectionsOperations#listRoutesTableSummary:member": "Microsoft.Network.ExpressRouteCrossConnections.listRoutesTableSummary", + "@azure/arm-network!ExpressRouteCrossConnectionsOperations#listArpTable:member": "Microsoft.Network.ExpressRouteCrossConnections.listArpTable", + "@azure/arm-network!ExpressRouteCrossConnectionsOperations#list:member": "Microsoft.Network.ExpressRouteCrossConnections.list", + "@azure/arm-network!ExpressRouteCrossConnectionsOperations#listByResourceGroup:member": "Microsoft.Network.ExpressRouteCrossConnections.listByResourceGroup", + "@azure/arm-network!ExpressRouteCrossConnectionsOperations#updateTags:member": "Microsoft.Network.ExpressRouteCrossConnections.updateTags", + "@azure/arm-network!ExpressRouteCrossConnectionsOperations#createOrUpdate:member": "Microsoft.Network.ExpressRouteCrossConnections.createOrUpdate", + "@azure/arm-network!ExpressRouteCrossConnectionsOperations#get:member": "Microsoft.Network.ExpressRouteCrossConnections.get", + "@azure/arm-network!PeerExpressRouteCircuitConnectionsOperations#list:member": "Microsoft.Network.PeerExpressRouteCircuitConnections.list", + "@azure/arm-network!PeerExpressRouteCircuitConnectionsOperations#get:member": "Microsoft.Network.PeerExpressRouteCircuitConnections.get", + "@azure/arm-network!ExpressRouteCircuitConnectionsOperations#list:member": "Microsoft.Network.ExpressRouteCircuitConnections.list", + "@azure/arm-network!ExpressRouteCircuitConnectionsOperations#delete:member": "Microsoft.Network.ExpressRouteCircuitConnections.delete", + "@azure/arm-network!ExpressRouteCircuitConnectionsOperations#createOrUpdate:member": "Microsoft.Network.ExpressRouteCircuitConnections.createOrUpdate", + "@azure/arm-network!ExpressRouteCircuitConnectionsOperations#get:member": "Microsoft.Network.ExpressRouteCircuitConnections.get", + "@azure/arm-network!ExpressRouteCircuitPeeringsOperations#list:member": "Microsoft.Network.ExpressRouteCircuitPeerings.list", + "@azure/arm-network!ExpressRouteCircuitPeeringsOperations#delete:member": "Microsoft.Network.ExpressRouteCircuitPeerings.delete", + "@azure/arm-network!ExpressRouteCircuitPeeringsOperations#createOrUpdate:member": "Microsoft.Network.ExpressRouteCircuitPeerings.createOrUpdate", + "@azure/arm-network!ExpressRouteCircuitPeeringsOperations#get:member": "Microsoft.Network.ExpressRouteCircuitPeerings.get", + "@azure/arm-network!ExpressRouteCircuitsOperations#getPeeringStats:member": "Microsoft.Network.ExpressRouteCircuitPeerings.getPeeringStats", + "@azure/arm-network!ExpressRouteCircuitsOperations#listRoutesTableSummary:member": "Microsoft.Network.ExpressRouteCircuitPeerings.listRoutesTableSummary", + "@azure/arm-network!ExpressRouteCircuitsOperations#listRoutesTable:member": "Microsoft.Network.ExpressRouteCircuitPeerings.listRoutesTable", + "@azure/arm-network!ExpressRouteCircuitsOperations#listArpTable:member": "Microsoft.Network.ExpressRouteCircuitPeerings.listArpTable", + "@azure/arm-network!ExpressRouteCircuitsOperations#stopCircuitLinkFailoverTest:member": "Microsoft.Network.ExpressRouteCircuits.stopCircuitLinkFailoverTest", + "@azure/arm-network!ExpressRouteCircuitsOperations#startCircuitLinkFailoverTest:member": "Microsoft.Network.ExpressRouteCircuits.startCircuitLinkFailoverTest", + "@azure/arm-network!ExpressRouteCircuitsOperations#getCircuitLinkFailoverSingleTestDetails:member": "Microsoft.Network.ExpressRouteCircuits.getCircuitLinkFailoverSingleTestDetails", + "@azure/arm-network!ExpressRouteCircuitsOperations#getCircuitLinkFailoverAllTestsDetails:member": "Microsoft.Network.ExpressRouteCircuits.getCircuitLinkFailoverAllTestsDetails", + "@azure/arm-network!ExpressRouteCircuitsOperations#getStats:member": "Microsoft.Network.ExpressRouteCircuits.getStats", + "@azure/arm-network!ExpressRouteCircuitsOperations#listAll:member": "Microsoft.Network.ExpressRouteCircuits.listAll", + "@azure/arm-network!ExpressRouteCircuitsOperations#list:member": "Microsoft.Network.ExpressRouteCircuits.list", + "@azure/arm-network!ExpressRouteCircuitsOperations#delete:member": "Microsoft.Network.ExpressRouteCircuits.delete", + "@azure/arm-network!ExpressRouteCircuitsOperations#updateTags:member": "Microsoft.Network.ExpressRouteCircuits.updateTags", + "@azure/arm-network!ExpressRouteCircuitsOperations#createOrUpdate:member": "Microsoft.Network.ExpressRouteCircuits.createOrUpdate", + "@azure/arm-network!ExpressRouteCircuitsOperations#get:member": "Microsoft.Network.ExpressRouteCircuits.get", + "@azure/arm-network!ExpressRouteCircuitAuthorizationsOperations#list:member": "Microsoft.Network.ExpressRouteCircuitAuthorizations.list", + "@azure/arm-network!ExpressRouteCircuitAuthorizationsOperations#delete:member": "Microsoft.Network.ExpressRouteCircuitAuthorizations.delete", + "@azure/arm-network!ExpressRouteCircuitAuthorizationsOperations#createOrUpdate:member": "Microsoft.Network.ExpressRouteCircuitAuthorizations.createOrUpdate", + "@azure/arm-network!ExpressRouteCircuitAuthorizationsOperations#get:member": "Microsoft.Network.ExpressRouteCircuitAuthorizations.get", + "@azure/arm-network!DdosProtectionPlansOperations#list:member": "Microsoft.Network.DdosProtectionPlans.list", + "@azure/arm-network!DdosProtectionPlansOperations#listByResourceGroup:member": "Microsoft.Network.DdosProtectionPlans.listByResourceGroup", + "@azure/arm-network!DdosProtectionPlansOperations#delete:member": "Microsoft.Network.DdosProtectionPlans.delete", + "@azure/arm-network!DdosProtectionPlansOperations#updateTags:member": "Microsoft.Network.DdosProtectionPlans.updateTags", + "@azure/arm-network!DdosProtectionPlansOperations#createOrUpdate:member": "Microsoft.Network.DdosProtectionPlans.createOrUpdate", + "@azure/arm-network!DdosProtectionPlansOperations#get:member": "Microsoft.Network.DdosProtectionPlans.get", + "@azure/arm-network!DdosCustomPoliciesOperations#listAll:member": "Microsoft.Network.DdosCustomPolicies.listAll", + "@azure/arm-network!DdosCustomPoliciesOperations#list:member": "Microsoft.Network.DdosCustomPolicies.list", + "@azure/arm-network!DdosCustomPoliciesOperations#delete:member": "Microsoft.Network.DdosCustomPolicies.delete", + "@azure/arm-network!DdosCustomPoliciesOperations#updateTags:member": "Microsoft.Network.DdosCustomPolicies.updateTags", + "@azure/arm-network!DdosCustomPoliciesOperations#createOrUpdate:member": "Microsoft.Network.DdosCustomPolicies.createOrUpdate", + "@azure/arm-network!DdosCustomPoliciesOperations#get:member": "Microsoft.Network.DdosCustomPolicies.get", + "@azure/arm-network!PublicIPAddressesOperations#listVirtualMachineScaleSetPublicIPAddresses:member": "Microsoft.Compute.PublicIPAddressesOperationGroup.listVirtualMachineScaleSetPublicIPAddresses", + "@azure/arm-network!PublicIPAddressesOperations#listCloudServicePublicIPAddresses:member": "Microsoft.Network.PublicIPAddressesOperationGroup.listCloudServicePublicIPAddresses", + "@azure/arm-network!PublicIPAddressesOperations#disassociateCloudServiceReservedPublicIp:member": "Microsoft.Network.PublicIPAddressOperationGroup.disassociateCloudServiceReservedPublicIp", + "@azure/arm-network!PublicIPAddressesOperations#reserveCloudServicePublicIpAddress:member": "Microsoft.Network.PublicIPAddressOperationGroup.reserveCloudServicePublicIpAddress", + "@azure/arm-network!PublicIPAddressesOperations#ddosProtectionStatus:member": "Microsoft.Network.PublicIPAddressOperationGroup.ddosProtectionStatus", + "@azure/arm-network!PublicIPAddressesOperations#listAll:member": "Microsoft.Network.PublicIPAddressOperationGroup.listAll", + "@azure/arm-network!PublicIPAddressesOperations#list:member": "Microsoft.Network.PublicIPAddressOperationGroup.list", + "@azure/arm-network!PublicIPAddressesOperations#delete:member": "Microsoft.Network.PublicIPAddressOperationGroup.delete", + "@azure/arm-network!PublicIPAddressesOperations#updateTags:member": "Microsoft.Network.PublicIPAddressOperationGroup.updateTags", + "@azure/arm-network!PublicIPAddressesOperations#createOrUpdate:member": "Microsoft.Network.PublicIPAddressOperationGroup.createOrUpdate", + "@azure/arm-network!PublicIPAddressesOperations#get:member": "Microsoft.Network.PublicIPAddressOperationGroup.get", + "@azure/arm-network!PublicIPAddressesOperations#listVirtualMachineScaleSetVMPublicIPAddresses:member": "Microsoft.Compute.PublicIPAddresses.listVirtualMachineScaleSetVMPublicIPAddresses", + "@azure/arm-network!PublicIPAddressesOperations#getVirtualMachineScaleSetPublicIPAddress:member": "Microsoft.Compute.PublicIPAddresses.getVirtualMachineScaleSetPublicIPAddress", + "@azure/arm-network!PublicIPAddressesOperations#listCloudServiceRoleInstancePublicIPAddresses:member": "Microsoft.Network.PublicIPAddresses.listCloudServiceRoleInstancePublicIPAddresses", + "@azure/arm-network!PublicIPAddressesOperations#getCloudServicePublicIPAddress:member": "Microsoft.Network.PublicIPAddresses.getCloudServicePublicIPAddress", + "@azure/arm-network!NetworkInterfacesOperations#listVirtualMachineScaleSetNetworkInterfaces:member": "Microsoft.Compute.NetworkInterfacesOperationGroup.listVirtualMachineScaleSetNetworkInterfaces", + "@azure/arm-network!NetworkInterfacesOperations#listCloudServiceNetworkInterfaces:member": "Microsoft.Network.NetworkInterfacesOperationGroup.listCloudServiceNetworkInterfaces", + "@azure/arm-network!NetworkInterfacesOperations#listVirtualMachineScaleSetIpConfigurations:member": "Microsoft.Compute.NetworkInterfaceIPConfigurations.listVirtualMachineScaleSetIpConfigurations", + "@azure/arm-network!NetworkInterfacesOperations#getVirtualMachineScaleSetIpConfiguration:member": "Microsoft.Compute.NetworkInterfaceIPConfigurations.getVirtualMachineScaleSetIpConfiguration", + "@azure/arm-network!NetworkInterfacesOperations#listEffectiveNetworkSecurityGroups:member": "Microsoft.Network.NetworkInterfaceOperationGroup.listEffectiveNetworkSecurityGroups", + "@azure/arm-network!NetworkInterfacesOperations#getEffectiveRouteTable:member": "Microsoft.Network.NetworkInterfaceOperationGroup.getEffectiveRouteTable", + "@azure/arm-network!NetworkInterfacesOperations#listAll:member": "Microsoft.Network.NetworkInterfaceOperationGroup.listAll", + "@azure/arm-network!NetworkInterfacesOperations#list:member": "Microsoft.Network.NetworkInterfaceOperationGroup.list", + "@azure/arm-network!NetworkInterfacesOperations#delete:member": "Microsoft.Network.NetworkInterfaceOperationGroup.delete", + "@azure/arm-network!NetworkInterfacesOperations#updateTags:member": "Microsoft.Network.NetworkInterfaceOperationGroup.updateTags", + "@azure/arm-network!NetworkInterfacesOperations#createOrUpdate:member": "Microsoft.Network.NetworkInterfaceOperationGroup.createOrUpdate", + "@azure/arm-network!NetworkInterfacesOperations#get:member": "Microsoft.Network.NetworkInterfaceOperationGroup.get", + "@azure/arm-network!NetworkInterfacesOperations#listVirtualMachineScaleSetVMNetworkInterfaces:member": "Microsoft.Compute.NetworkInterfaces.listVirtualMachineScaleSetVMNetworkInterfaces", + "@azure/arm-network!NetworkInterfacesOperations#getVirtualMachineScaleSetNetworkInterface:member": "Microsoft.Compute.NetworkInterfaces.getVirtualMachineScaleSetNetworkInterface", + "@azure/arm-network!NetworkInterfacesOperations#listCloudServiceRoleInstanceNetworkInterfaces:member": "Microsoft.Network.NetworkInterfaces.listCloudServiceRoleInstanceNetworkInterfaces", + "@azure/arm-network!NetworkInterfacesOperations#getCloudServiceNetworkInterface:member": "Microsoft.Network.NetworkInterfaces.getCloudServiceNetworkInterface", + "@azure/arm-network!BastionHostsOperations#list:member": "Microsoft.Network.BastionHosts.list", + "@azure/arm-network!BastionHostsOperations#listByResourceGroup:member": "Microsoft.Network.BastionHosts.listByResourceGroup", + "@azure/arm-network!BastionHostsOperations#delete:member": "Microsoft.Network.BastionHosts.delete", + "@azure/arm-network!BastionHostsOperations#updateTags:member": "Microsoft.Network.BastionHosts.updateTags", + "@azure/arm-network!BastionHostsOperations#createOrUpdate:member": "Microsoft.Network.BastionHosts.createOrUpdate", + "@azure/arm-network!BastionHostsOperations#get:member": "Microsoft.Network.BastionHosts.get", + "@azure/arm-network!AzureFirewallsOperations#packetCaptureOperation:member": "Microsoft.Network.AzureFirewalls.packetCaptureOperation", + "@azure/arm-network!AzureFirewallsOperations#packetCapture:member": "Microsoft.Network.AzureFirewalls.packetCapture", + "@azure/arm-network!AzureFirewallsOperations#listLearnedPrefixes:member": "Microsoft.Network.AzureFirewalls.listLearnedPrefixes", + "@azure/arm-network!AzureFirewallsOperations#listAll:member": "Microsoft.Network.AzureFirewalls.listAll", + "@azure/arm-network!AzureFirewallsOperations#list:member": "Microsoft.Network.AzureFirewalls.list", + "@azure/arm-network!AzureFirewallsOperations#delete:member": "Microsoft.Network.AzureFirewalls.delete", + "@azure/arm-network!AzureFirewallsOperations#updateTags:member": "Microsoft.Network.AzureFirewalls.updateTags", + "@azure/arm-network!AzureFirewallsOperations#createOrUpdate:member": "Microsoft.Network.AzureFirewalls.createOrUpdate", + "@azure/arm-network!AzureFirewallsOperations#get:member": "Microsoft.Network.AzureFirewalls.get", + "@azure/arm-network!ApplicationSecurityGroupsOperations#listAll:member": "Microsoft.Network.ApplicationSecurityGroups.listAll", + "@azure/arm-network!ApplicationSecurityGroupsOperations#list:member": "Microsoft.Network.ApplicationSecurityGroups.list", + "@azure/arm-network!ApplicationSecurityGroupsOperations#delete:member": "Microsoft.Network.ApplicationSecurityGroups.delete", + "@azure/arm-network!ApplicationSecurityGroupsOperations#updateTags:member": "Microsoft.Network.ApplicationSecurityGroups.updateTags", + "@azure/arm-network!ApplicationSecurityGroupsOperations#createOrUpdate:member": "Microsoft.Network.ApplicationSecurityGroups.createOrUpdate", + "@azure/arm-network!ApplicationSecurityGroupsOperations#get:member": "Microsoft.Network.ApplicationSecurityGroups.get", + "@azure/arm-network!ApplicationGatewayPrivateEndpointConnectionsOperations#list:member": "Microsoft.Network.ApplicationGatewayPrivateEndpointConnections.list", + "@azure/arm-network!ApplicationGatewayPrivateEndpointConnectionsOperations#delete:member": "Microsoft.Network.ApplicationGatewayPrivateEndpointConnections.delete", + "@azure/arm-network!ApplicationGatewayPrivateEndpointConnectionsOperations#update:member": "Microsoft.Network.ApplicationGatewayPrivateEndpointConnections.update", + "@azure/arm-network!ApplicationGatewayPrivateEndpointConnectionsOperations#get:member": "Microsoft.Network.ApplicationGatewayPrivateEndpointConnections.get", + "@azure/arm-network!ApplicationGatewaysOperations#listAvailableWafRuleSets:member": "Microsoft.Network.ApplicationGatewaysOperationGroup.listAvailableWafRuleSets", + "@azure/arm-network!ApplicationGatewaysOperations#listAvailableResponseHeaders:member": "Microsoft.Network.ApplicationGatewaysOperationGroup.listAvailableResponseHeaders", + "@azure/arm-network!ApplicationGatewaysOperations#listAvailableRequestHeaders:member": "Microsoft.Network.ApplicationGatewaysOperationGroup.listAvailableRequestHeaders", + "@azure/arm-network!ApplicationGatewaysOperations#listAvailableServerVariables:member": "Microsoft.Network.ApplicationGatewaysOperationGroup.listAvailableServerVariables", + "@azure/arm-network!ApplicationGatewaysOperations#getSslPredefinedPolicy:member": "Microsoft.Network.ApplicationGatewayAvailableSslOptionsOperationGroup.getSslPredefinedPolicy", + "@azure/arm-network!ApplicationGatewaysOperations#listAvailableSslPredefinedPolicies:member": "Microsoft.Network.ApplicationGatewayAvailableSslOptionsOperationGroup.listAvailableSslPredefinedPolicies", + "@azure/arm-network!ApplicationGatewaysOperations#listAvailableSslOptions:member": "Microsoft.Network.ApplicationGatewayAvailableSslOptionsOperationGroup.listAvailableSslOptions", + "@azure/arm-network!ApplicationGatewaysOperations#backendHealthOnDemand:member": "Microsoft.Network.ApplicationGateways.backendHealthOnDemand", + "@azure/arm-network!ApplicationGatewaysOperations#backendHealth:member": "Microsoft.Network.ApplicationGateways.backendHealth", + "@azure/arm-network!ApplicationGatewaysOperations#stop:member": "Microsoft.Network.ApplicationGateways.stop", + "@azure/arm-network!ApplicationGatewaysOperations#start:member": "Microsoft.Network.ApplicationGateways.start", + "@azure/arm-network!ApplicationGatewaysOperations#listAll:member": "Microsoft.Network.ApplicationGateways.listAll", + "@azure/arm-network!ApplicationGatewaysOperations#list:member": "Microsoft.Network.ApplicationGateways.list", + "@azure/arm-network!ApplicationGatewaysOperations#delete:member": "Microsoft.Network.ApplicationGateways.delete", + "@azure/arm-network!ApplicationGatewaysOperations#updateTags:member": "Microsoft.Network.ApplicationGateways.updateTags", + "@azure/arm-network!ApplicationGatewaysOperations#createOrUpdate:member": "Microsoft.Network.ApplicationGateways.createOrUpdate", + "@azure/arm-network!ApplicationGatewaysOperations#get:member": "Microsoft.Network.ApplicationGateways.get", + "@azure/arm-network!OperationsOperations#list:member": "Azure.ResourceManager.Legacy.Operations.list" + } + } +} diff --git a/sdk/network/arm-network/package.json b/sdk/network/arm-network/package.json index fb9e37277093..8c80a0f9d30b 100644 --- a/sdk/network/arm-network/package.json +++ b/sdk/network/arm-network/package.json @@ -1,130 +1,206 @@ { "name": "@azure/arm-network", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", - "description": "A generated SDK for NetworkManagementClient.", "version": "36.0.0", + "description": "A generated SDK for NetworkManagementClient.", "engines": { "node": ">=20.0.0" }, - "dependencies": { - "@azure/core-lro": "^2.5.4", - "@azure/abort-controller": "^2.1.2", - "@azure/core-paging": "^1.6.2", - "@azure/core-client": "^1.9.3", - "@azure/core-auth": "^1.9.0", - "@azure/core-rest-pipeline": "^1.19.1", - "tslib": "^2.8.1" + "sideEffects": false, + "autoPublish": false, + "type": "module", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", + "browser": "./dist/browser/index.js", + "react-native": "./dist/react-native/index.js", + "imports": { + "#platform/*.js": { + "browser": "./src/*-browser.mjs", + "react-native": "./src/*-react-native.mjs", + "default": "./src/*.js" + } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "react-native": { + "types": "./dist/react-native/index.d.ts", + "default": "./dist/react-native/index.js" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./api": { + "browser": { + "types": "./dist/browser/api/index.d.ts", + "default": "./dist/browser/api/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/index.d.ts", + "default": "./dist/react-native/api/index.js" + }, + "import": { + "types": "./dist/esm/api/index.d.ts", + "default": "./dist/esm/api/index.js" + }, + "require": { + "types": "./dist/commonjs/api/index.d.ts", + "default": "./dist/commonjs/api/index.js" + } + }, + "./models": { + "browser": { + "types": "./dist/browser/models/index.d.ts", + "default": "./dist/browser/models/index.js" + }, + "react-native": { + "types": "./dist/react-native/models/index.d.ts", + "default": "./dist/react-native/models/index.js" + }, + "import": { + "types": "./dist/esm/models/index.d.ts", + "default": "./dist/esm/models/index.js" + }, + "require": { + "types": "./dist/commonjs/models/index.d.ts", + "default": "./dist/commonjs/models/index.js" + } + }, + "./models/common": { + "browser": { + "types": "./dist/browser/models/common/index.d.ts", + "default": "./dist/browser/models/common/index.js" + }, + "react-native": { + "types": "./dist/react-native/models/common/index.d.ts", + "default": "./dist/react-native/models/common/index.js" + }, + "import": { + "types": "./dist/esm/models/common/index.d.ts", + "default": "./dist/esm/models/common/index.js" + }, + "require": { + "types": "./dist/commonjs/models/common/index.d.ts", + "default": "./dist/commonjs/models/common/index.js" + } + }, + "./models/microsoft/network": { + "browser": { + "types": "./dist/browser/models/microsoft/network/index.d.ts", + "default": "./dist/browser/models/microsoft/network/index.js" + }, + "react-native": { + "types": "./dist/react-native/models/microsoft/network/index.d.ts", + "default": "./dist/react-native/models/microsoft/network/index.js" + }, + "import": { + "types": "./dist/esm/models/microsoft/network/index.d.ts", + "default": "./dist/esm/models/microsoft/network/index.js" + }, + "require": { + "types": "./dist/commonjs/models/microsoft/network/index.d.ts", + "default": "./dist/commonjs/models/microsoft/network/index.js" + } + } }, "keywords": [ "node", "azure", + "cloud", "typescript", "browser", - "isomorphic", - "cloud" + "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", - "type": "module", + "files": [ + "dist/", + "!dist/**/*.d.*ts.map", + "README.md", + "LICENSE" + ], + "sdk-type": "mgmt", + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js", + "directory": "sdk/network/arm-network" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/api/networkManagementContext.ts", + "prefix": "userAgentInfo" + } + ] + }, + "dependencies": { + "@azure/core-util": "^1.12.0", + "@azure-rest/core-client": "^2.3.1", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-lro": "^3.1.0", + "@azure/core-rest-pipeline": "^1.20.0", + "@azure/logger": "^1.2.0", + "tslib": "^2.8.1" + }, "devDependencies": { "@azure-tools/test-credential": "workspace:^", "@azure-tools/test-recorder": "workspace:^", "@azure-tools/test-utils-vitest": "workspace:^", "@azure/dev-tool": "workspace:^", + "@azure/eslint-plugin-azure-sdk": "workspace:^", "@azure/identity": "catalog:internal", - "@azure/logger": "workspace:^", "@types/node": "catalog:", - "@vitest/browser-playwright": "catalog:testing", - "@vitest/coverage-istanbul": "catalog:testing", "cross-env": "catalog:", - "dotenv": "catalog:testing", "eslint": "catalog:", - "playwright": "catalog:testing", "prettier": "catalog:", - "react-native": "catalog:testing", "rimraf": "catalog:", + "@vitest/browser-playwright": "catalog:testing", + "@vitest/coverage-istanbul": "catalog:testing", + "dotenv": "catalog:testing", + "playwright": "catalog:testing", "typescript": "catalog:", "vitest": "catalog:testing" }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js", - "directory": "sdk/network/arm-network" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/", - "README.md", - "LICENSE" - ], "scripts": { - "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "extract-api": "rimraf review && dev-tool run extract-api", "pack": "pnpm pack 2>&1", - "extract-api": "dev-tool run extract-api", "lint": "echo skipped", - "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f", - "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", - "execute:samples": "echo skipped", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", - "test": "npm run test:node && npm run test:browser", + "lint:fix": "echo skipped", + "build:samples": "tsc -p config/tsconfig.samples.json && dev-tool samples publish -f", + "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "execute:samples": "dev-tool samples run samples-dev", + "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "generate:client": "echo skipped", + "test:browser": "dev-tool run build-test && dev-tool run test:vitest --browser", + "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", "test:node": "dev-tool run test:vitest", - "test:browser": "echo skipped", - "update-snippets": "dev-tool run update-snippets", - "test:node:esm": "dev-tool run test:vitest --esm" - }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/networkManagementClient.ts", - "prefix": "packageDetails" - } - ] + "test:node:esm": "dev-tool run test:vitest --esm", + "test": "npm run test:node && npm run test:browser", + "update-snippets": "dev-tool run update-snippets" }, - "autoPublish": true, - "browser": "./dist/browser/index.js", - "react-native": "./dist/react-native/index.js", - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network/README.md", "//sampleConfiguration": { - "productName": "", + "productName": "@azure/arm-network", "productSlugs": [ "azure" ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-network?view=azure-node-preview" - }, - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "react-native": { - "types": "./dist/react-native/index.d.ts", - "default": "./dist/react-native/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "imports": { - "#platform/*": { - "react-native": "./src/*-react-native.mts", - "browser": "./src/*-browser.mts", - "default": "./src/*.ts" - } } } diff --git a/sdk/network/arm-network/review/arm-network-node.api.md b/sdk/network/arm-network/review/arm-network-node.api.md deleted file mode 100644 index fd39ded5b2e8..000000000000 --- a/sdk/network/arm-network/review/arm-network-node.api.md +++ /dev/null @@ -1,19354 +0,0 @@ -## API Report File for "@azure/arm-network" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import type * as coreAuth from '@azure/core-auth'; -import * as coreClient from '@azure/core-client'; -import type { OperationState } from '@azure/core-lro'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; -import type { SimplePollerLike } from '@azure/core-lro'; - -// @public -export interface AadAuthenticationParameters { - aadAudience?: string; - aadIssuer?: string; - aadTenant?: string; -} - -// @public -export type Access = string; - -// @public -export type AccessMode = string; - -// @public -export type AccessRuleDirection = string; - -// @public -export interface Action { - parameters?: Parameter[]; - type?: RouteMapActionType; -} - -// @public -export type ActionType = string; - -// @public -export interface ActiveBaseSecurityAdminRule { - commitTime?: Date; - configurationDescription?: string; - id?: string; - kind: "Custom" | "Default"; - region?: string; - ruleCollectionAppliesToGroups?: NetworkManagerSecurityGroupItem[]; - ruleCollectionDescription?: string; - ruleGroups?: ConfigurationGroup[]; -} - -// @public (undocumented) -export type ActiveBaseSecurityAdminRuleUnion = ActiveBaseSecurityAdminRule | ActiveSecurityAdminRule | ActiveDefaultSecurityAdminRule; - -// @public -export interface ActiveConfigurationParameter { - regions?: string[]; - skipToken?: string; -} - -// @public -export interface ActiveConnectivityConfiguration extends EffectiveConnectivityConfiguration { - commitTime?: Date; - region?: string; -} - -// @public -export interface ActiveConnectivityConfigurationsListResult { - skipToken?: string; - value?: ActiveConnectivityConfiguration[]; -} - -// @public -export interface ActiveDefaultSecurityAdminRule extends ActiveBaseSecurityAdminRule { - readonly access?: SecurityConfigurationRuleAccess; - readonly description?: string; - readonly destinationPortRanges?: string[]; - readonly destinations?: AddressPrefixItem[]; - readonly direction?: SecurityConfigurationRuleDirection; - flag?: string; - kind: "Default"; - readonly priority?: number; - readonly protocol?: SecurityConfigurationRuleProtocol; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly sourcePortRanges?: string[]; - readonly sources?: AddressPrefixItem[]; -} - -// @public -export interface ActiveSecurityAdminRule extends ActiveBaseSecurityAdminRule { - access?: SecurityConfigurationRuleAccess; - description?: string; - destinationPortRanges?: string[]; - destinations?: AddressPrefixItem[]; - direction?: SecurityConfigurationRuleDirection; - kind: "Custom"; - priority?: number; - protocol?: SecurityConfigurationRuleProtocol; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - sourcePortRanges?: string[]; - sources?: AddressPrefixItem[]; -} - -// @public -export interface ActiveSecurityAdminRulesListResult { - skipToken?: string; - value?: ActiveBaseSecurityAdminRuleUnion[]; -} - -// @public -export interface AddressPrefixItem { - addressPrefix?: string; - addressPrefixType?: AddressPrefixType; -} - -// @public -export type AddressPrefixType = string; - -// @public -export interface AddressSpace { - addressPrefixes?: string[]; - ipamPoolPrefixAllocations?: IpamPoolPrefixAllocation[]; -} - -// @public -export type AddressSpaceAggregationOption = string; - -// @public -export type AddressUpdateAction = string; - -// @public -export interface AdminRule extends BaseAdminRule { - access?: SecurityConfigurationRuleAccess; - description?: string; - destinationPortRanges?: string[]; - destinations?: AddressPrefixItem[]; - direction?: SecurityConfigurationRuleDirection; - kind: "Custom"; - priority?: number; - protocol?: SecurityConfigurationRuleProtocol; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - sourcePortRanges?: string[]; - sources?: AddressPrefixItem[]; -} - -// @public -export interface AdminRuleCollection extends ChildResource { - appliesToGroups?: NetworkManagerSecurityGroupItem[]; - description?: string; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly systemData?: SystemData; -} - -// @public -export interface AdminRuleCollectionListResult { - nextLink?: string; - value?: AdminRuleCollection[]; -} - -// @public -export interface AdminRuleCollections { - beginDelete(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: AdminRuleCollectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: AdminRuleCollectionsDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleCollection: AdminRuleCollection, options?: AdminRuleCollectionsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: AdminRuleCollectionsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: AdminRuleCollectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AdminRuleCollectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AdminRuleCollectionsCreateOrUpdateResponse = AdminRuleCollection; - -// @public -export interface AdminRuleCollectionsDeleteHeaders { - location?: string; -} - -// @public -export interface AdminRuleCollectionsDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface AdminRuleCollectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AdminRuleCollectionsGetResponse = AdminRuleCollection; - -// @public -export interface AdminRuleCollectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AdminRuleCollectionsListNextResponse = AdminRuleCollectionListResult; - -// @public -export interface AdminRuleCollectionsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type AdminRuleCollectionsListResponse = AdminRuleCollectionListResult; - -// @public -export type AdminRuleKind = string; - -// @public -export interface AdminRuleListResult { - nextLink?: string; - value?: BaseAdminRuleUnion[]; -} - -// @public -export interface AdminRules { - beginDelete(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, options?: AdminRulesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, options?: AdminRulesDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, adminRule: BaseAdminRuleUnion, options?: AdminRulesCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, options?: AdminRulesGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: AdminRulesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AdminRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AdminRulesCreateOrUpdateResponse = BaseAdminRuleUnion; - -// @public -export interface AdminRulesDeleteHeaders { - location?: string; -} - -// @public -export interface AdminRulesDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface AdminRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AdminRulesGetResponse = BaseAdminRuleUnion; - -// @public -export interface AdminRulesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AdminRulesListNextResponse = AdminRuleListResult; - -// @public -export interface AdminRulesListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type AdminRulesListResponse = AdminRuleListResult; - -// @public -export type AdminState = string; - -// @public -export interface AdvertisedPublicPrefixProperties { - prefix?: string; - signature?: string; - validationId?: string; - readonly validationState?: AdvertisedPublicPrefixPropertiesValidationState; -} - -// @public -export type AdvertisedPublicPrefixPropertiesValidationState = string; - -// @public -export interface ApplicationGateway extends Resource { - authenticationCertificates?: ApplicationGatewayAuthenticationCertificate[]; - autoscaleConfiguration?: ApplicationGatewayAutoscaleConfiguration; - backendAddressPools?: ApplicationGatewayBackendAddressPool[]; - backendHttpSettingsCollection?: ApplicationGatewayBackendHttpSettings[]; - backendSettingsCollection?: ApplicationGatewayBackendSettings[]; - customErrorConfigurations?: ApplicationGatewayCustomError[]; - readonly defaultPredefinedSslPolicy?: ApplicationGatewaySslPolicyName; - enableFips?: boolean; - enableHttp2?: boolean; - entraJWTValidationConfigs?: ApplicationGatewayEntraJWTValidationConfig[]; - readonly etag?: string; - firewallPolicy?: SubResource; - forceFirewallPolicyAssociation?: boolean; - frontendIPConfigurations?: ApplicationGatewayFrontendIPConfiguration[]; - frontendPorts?: ApplicationGatewayFrontendPort[]; - gatewayIPConfigurations?: ApplicationGatewayIPConfiguration[]; - globalConfiguration?: ApplicationGatewayGlobalConfiguration; - httpListeners?: ApplicationGatewayHttpListener[]; - identity?: ManagedServiceIdentity; - listeners?: ApplicationGatewayListener[]; - loadDistributionPolicies?: ApplicationGatewayLoadDistributionPolicy[]; - readonly operationalState?: ApplicationGatewayOperationalState; - readonly privateEndpointConnections?: ApplicationGatewayPrivateEndpointConnection[]; - privateLinkConfigurations?: ApplicationGatewayPrivateLinkConfiguration[]; - probes?: ApplicationGatewayProbe[]; - readonly provisioningState?: ProvisioningState; - redirectConfigurations?: ApplicationGatewayRedirectConfiguration[]; - requestRoutingRules?: ApplicationGatewayRequestRoutingRule[]; - readonly resourceGuid?: string; - rewriteRuleSets?: ApplicationGatewayRewriteRuleSet[]; - routingRules?: ApplicationGatewayRoutingRule[]; - sku?: ApplicationGatewaySku; - sslCertificates?: ApplicationGatewaySslCertificate[]; - sslPolicy?: ApplicationGatewaySslPolicy; - sslProfiles?: ApplicationGatewaySslProfile[]; - trustedClientCertificates?: ApplicationGatewayTrustedClientCertificate[]; - trustedRootCertificates?: ApplicationGatewayTrustedRootCertificate[]; - urlPathMaps?: ApplicationGatewayUrlPathMap[]; - webApplicationFirewallConfiguration?: ApplicationGatewayWebApplicationFirewallConfiguration; - zones?: string[]; -} - -// @public -export interface ApplicationGatewayAuthenticationCertificate extends SubResource { - data?: string; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayAutoscaleConfiguration { - maxCapacity?: number; - minCapacity: number; -} - -// @public -export interface ApplicationGatewayAvailableSslOptions extends Resource { - availableCipherSuites?: ApplicationGatewaySslCipherSuite[]; - availableProtocols?: ApplicationGatewaySslProtocol[]; - defaultPolicy?: ApplicationGatewaySslPolicyName; - predefinedPolicies?: SubResource[]; -} - -// @public -export interface ApplicationGatewayAvailableSslPredefinedPolicies { - nextLink?: string; - value?: ApplicationGatewaySslPredefinedPolicy[]; -} - -// @public -export interface ApplicationGatewayAvailableWafRuleSetsResult { - value?: ApplicationGatewayFirewallRuleSet[]; -} - -// @public -export interface ApplicationGatewayBackendAddress { - fqdn?: string; - ipAddress?: string; -} - -// @public -export interface ApplicationGatewayBackendAddressPool extends SubResource { - backendAddresses?: ApplicationGatewayBackendAddress[]; - readonly backendIPConfigurations?: NetworkInterfaceIPConfiguration[]; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayBackendHealth { - backendAddressPools?: ApplicationGatewayBackendHealthPool[]; -} - -// @public -export interface ApplicationGatewayBackendHealthHttpSettings { - backendHttpSettings?: ApplicationGatewayBackendHttpSettings; - servers?: ApplicationGatewayBackendHealthServer[]; -} - -// @public -export interface ApplicationGatewayBackendHealthOnDemand { - backendAddressPool?: ApplicationGatewayBackendAddressPool; - backendHealthHttpSettings?: ApplicationGatewayBackendHealthHttpSettings; -} - -// @public -export interface ApplicationGatewayBackendHealthPool { - backendAddressPool?: ApplicationGatewayBackendAddressPool; - backendHttpSettingsCollection?: ApplicationGatewayBackendHealthHttpSettings[]; -} - -// @public -export interface ApplicationGatewayBackendHealthServer { - address?: string; - health?: ApplicationGatewayBackendHealthServerHealth; - healthProbeLog?: string; - ipConfiguration?: NetworkInterfaceIPConfiguration; -} - -// @public -export type ApplicationGatewayBackendHealthServerHealth = string; - -// @public -export interface ApplicationGatewayBackendHttpSettings extends SubResource { - affinityCookieName?: string; - authenticationCertificates?: SubResource[]; - connectionDraining?: ApplicationGatewayConnectionDraining; - cookieBasedAffinity?: ApplicationGatewayCookieBasedAffinity; - dedicatedBackendConnection?: boolean; - readonly etag?: string; - hostName?: string; - name?: string; - path?: string; - pickHostNameFromBackendAddress?: boolean; - port?: number; - probe?: SubResource; - probeEnabled?: boolean; - protocol?: ApplicationGatewayProtocol; - readonly provisioningState?: ProvisioningState; - requestTimeout?: number; - sniName?: string; - trustedRootCertificates?: SubResource[]; - readonly type?: string; - validateCertChainAndExpiry?: boolean; - validateSNI?: boolean; -} - -// @public -export interface ApplicationGatewayBackendSettings extends SubResource { - enableL4ClientIpPreservation?: boolean; - readonly etag?: string; - hostName?: string; - name?: string; - pickHostNameFromBackendAddress?: boolean; - port?: number; - probe?: SubResource; - protocol?: ApplicationGatewayProtocol; - readonly provisioningState?: ProvisioningState; - timeout?: number; - trustedRootCertificates?: SubResource[]; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayClientAuthConfiguration { - verifyClientAuthMode?: ApplicationGatewayClientAuthVerificationModes; - verifyClientCertIssuerDN?: boolean; - verifyClientRevocation?: ApplicationGatewayClientRevocationOptions; -} - -// @public -export type ApplicationGatewayClientAuthVerificationModes = string; - -// @public -export type ApplicationGatewayClientRevocationOptions = string; - -// @public -export interface ApplicationGatewayConnectionDraining { - drainTimeoutInSec: number; - enabled: boolean; -} - -// @public -export type ApplicationGatewayCookieBasedAffinity = string; - -// @public -export interface ApplicationGatewayCustomError { - customErrorPageUrl?: string; - statusCode?: ApplicationGatewayCustomErrorStatusCode; -} - -// @public -export type ApplicationGatewayCustomErrorStatusCode = string; - -// @public -export interface ApplicationGatewayEntraJWTValidationConfig extends SubResource { - audiences?: string[]; - clientId?: string; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - tenantId?: string; - unAuthorizedRequestAction?: ApplicationGatewayUnAuthorizedRequestAction; -} - -// @public -export interface ApplicationGatewayFirewallDisabledRuleGroup { - ruleGroupName: string; - rules?: number[]; -} - -// @public -export interface ApplicationGatewayFirewallExclusion { - matchVariable: string; - selector: string; - selectorMatchOperator: string; -} - -// @public -export interface ApplicationGatewayFirewallManifestRuleSet { - ruleGroups: ApplicationGatewayFirewallRuleGroup[]; - ruleSetType: string; - ruleSetVersion: string; - status?: ApplicationGatewayRuleSetStatusOptions; - tiers?: ApplicationGatewayTierTypes[]; -} - -// @public -export type ApplicationGatewayFirewallMode = string; - -// @public -export type ApplicationGatewayFirewallRateLimitDuration = string; - -// @public -export interface ApplicationGatewayFirewallRule { - action?: ApplicationGatewayWafRuleActionTypes; - description?: string; - ruleId: number; - ruleIdString?: string; - sensitivity?: ApplicationGatewayWafRuleSensitivityTypes; - state?: ApplicationGatewayWafRuleStateTypes; -} - -// @public -export interface ApplicationGatewayFirewallRuleGroup { - description?: string; - ruleGroupName: string; - rules: ApplicationGatewayFirewallRule[]; -} - -// @public -export interface ApplicationGatewayFirewallRuleSet extends Resource { - readonly provisioningState?: ProvisioningState; - ruleGroups?: ApplicationGatewayFirewallRuleGroup[]; - ruleSetType?: string; - ruleSetVersion?: string; - tiers?: ApplicationGatewayTierTypes[]; -} - -// @public -export type ApplicationGatewayFirewallUserSessionVariable = string; - -// @public -export interface ApplicationGatewayForContainersReferenceDefinition { - id: string; -} - -// @public -export interface ApplicationGatewayFrontendIPConfiguration extends SubResource { - readonly etag?: string; - name?: string; - privateIPAddress?: string; - privateIPAllocationMethod?: IPAllocationMethod; - privateLinkConfiguration?: SubResource; - readonly provisioningState?: ProvisioningState; - publicIPAddress?: SubResource; - subnet?: SubResource; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayFrontendPort extends SubResource { - readonly etag?: string; - name?: string; - port?: number; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayGlobalConfiguration { - enableRequestBuffering?: boolean; - enableResponseBuffering?: boolean; -} - -// @public -export interface ApplicationGatewayHeaderConfiguration { - headerName?: string; - headerValue?: string; - headerValueMatcher?: HeaderValueMatcher; -} - -// @public -export interface ApplicationGatewayHttpListener extends SubResource { - customErrorConfigurations?: ApplicationGatewayCustomError[]; - readonly etag?: string; - firewallPolicy?: SubResource; - frontendIPConfiguration?: SubResource; - frontendPort?: SubResource; - hostName?: string; - hostNames?: string[]; - name?: string; - protocol?: ApplicationGatewayProtocol; - readonly provisioningState?: ProvisioningState; - requireServerNameIndication?: boolean; - sslCertificate?: SubResource; - sslProfile?: SubResource; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayIPConfiguration extends SubResource { - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - subnet?: SubResource; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayListener extends SubResource { - readonly etag?: string; - frontendIPConfiguration?: SubResource; - frontendPort?: SubResource; - hostNames?: string[]; - name?: string; - protocol?: ApplicationGatewayProtocol; - readonly provisioningState?: ProvisioningState; - sslCertificate?: SubResource; - sslProfile?: SubResource; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayListResult { - nextLink?: string; - value?: ApplicationGateway[]; -} - -// @public -export type ApplicationGatewayLoadDistributionAlgorithm = string; - -// @public -export interface ApplicationGatewayLoadDistributionPolicy extends SubResource { - readonly etag?: string; - loadDistributionAlgorithm?: ApplicationGatewayLoadDistributionAlgorithm; - loadDistributionTargets?: ApplicationGatewayLoadDistributionTarget[]; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayLoadDistributionTarget extends SubResource { - backendAddressPool?: SubResource; - readonly etag?: string; - name?: string; - readonly type?: string; - weightPerServer?: number; -} - -// @public -export interface ApplicationGatewayOnDemandProbe { - backendAddressPool?: SubResource; - backendHttpSettings?: SubResource; - enableProbeProxyProtocolHeader?: boolean; - host?: string; - match?: ApplicationGatewayProbeHealthResponseMatch; - path?: string; - pickHostNameFromBackendHttpSettings?: boolean; - protocol?: ApplicationGatewayProtocol; - timeout?: number; -} - -// @public -export type ApplicationGatewayOperationalState = string; - -// @public -export interface ApplicationGatewayPathRule extends SubResource { - backendAddressPool?: SubResource; - backendHttpSettings?: SubResource; - readonly etag?: string; - firewallPolicy?: SubResource; - loadDistributionPolicy?: SubResource; - name?: string; - paths?: string[]; - readonly provisioningState?: ProvisioningState; - redirectConfiguration?: SubResource; - rewriteRuleSet?: SubResource; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayPrivateEndpointConnection extends SubResource { - readonly etag?: string; - readonly linkIdentifier?: string; - name?: string; - readonly privateEndpoint?: PrivateEndpoint; - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayPrivateEndpointConnectionListResult { - nextLink?: string; - value?: ApplicationGatewayPrivateEndpointConnection[]; -} - -// @public -export interface ApplicationGatewayPrivateEndpointConnections { - beginDelete(resourceGroupName: string, applicationGatewayName: string, connectionName: string, options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, applicationGatewayName: string, connectionName: string, options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, applicationGatewayName: string, connectionName: string, parameters: ApplicationGatewayPrivateEndpointConnection, options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams): Promise, ApplicationGatewayPrivateEndpointConnectionsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, applicationGatewayName: string, connectionName: string, parameters: ApplicationGatewayPrivateEndpointConnection, options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams): Promise; - get(resourceGroupName: string, applicationGatewayName: string, connectionName: string, options?: ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams): Promise; - list(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewayPrivateEndpointConnectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewayPrivateEndpointConnectionsGetResponse = ApplicationGatewayPrivateEndpointConnection; - -// @public -export interface ApplicationGatewayPrivateEndpointConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewayPrivateEndpointConnectionsListNextResponse = ApplicationGatewayPrivateEndpointConnectionListResult; - -// @public -export interface ApplicationGatewayPrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewayPrivateEndpointConnectionsListResponse = ApplicationGatewayPrivateEndpointConnectionListResult; - -// @public -export interface ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApplicationGatewayPrivateEndpointConnectionsUpdateResponse = ApplicationGatewayPrivateEndpointConnection; - -// @public -export interface ApplicationGatewayPrivateLinkConfiguration extends SubResource { - readonly etag?: string; - ipConfigurations?: ApplicationGatewayPrivateLinkIpConfiguration[]; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayPrivateLinkIpConfiguration extends SubResource { - readonly etag?: string; - name?: string; - primary?: boolean; - privateIPAddress?: string; - privateIPAllocationMethod?: IPAllocationMethod; - readonly provisioningState?: ProvisioningState; - subnet?: SubResource; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayPrivateLinkResource extends SubResource { - readonly etag?: string; - readonly groupId?: string; - name?: string; - readonly requiredMembers?: string[]; - requiredZoneNames?: string[]; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayPrivateLinkResourceListResult { - nextLink?: string; - value?: ApplicationGatewayPrivateLinkResource[]; -} - -// @public -export interface ApplicationGatewayPrivateLinkResources { - list(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewayPrivateLinkResourcesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApplicationGatewayPrivateLinkResourcesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewayPrivateLinkResourcesListNextResponse = ApplicationGatewayPrivateLinkResourceListResult; - -// @public -export interface ApplicationGatewayPrivateLinkResourcesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewayPrivateLinkResourcesListResponse = ApplicationGatewayPrivateLinkResourceListResult; - -// @public -export interface ApplicationGatewayProbe extends SubResource { - enableProbeProxyProtocolHeader?: boolean; - readonly etag?: string; - host?: string; - interval?: number; - match?: ApplicationGatewayProbeHealthResponseMatch; - minServers?: number; - name?: string; - path?: string; - pickHostNameFromBackendHttpSettings?: boolean; - pickHostNameFromBackendSettings?: boolean; - port?: number; - protocol?: ApplicationGatewayProtocol; - readonly provisioningState?: ProvisioningState; - timeout?: number; - readonly type?: string; - unhealthyThreshold?: number; -} - -// @public -export interface ApplicationGatewayProbeHealthResponseMatch { - body?: string; - statusCodes?: string[]; -} - -// @public -export type ApplicationGatewayProtocol = string; - -// @public -export interface ApplicationGatewayRedirectConfiguration extends SubResource { - readonly etag?: string; - includePath?: boolean; - includeQueryString?: boolean; - name?: string; - pathRules?: SubResource[]; - redirectType?: ApplicationGatewayRedirectType; - requestRoutingRules?: SubResource[]; - targetListener?: SubResource; - targetUrl?: string; - readonly type?: string; - urlPathMaps?: SubResource[]; -} - -// @public -export type ApplicationGatewayRedirectType = string; - -// @public -export interface ApplicationGatewayRequestRoutingRule extends SubResource { - backendAddressPool?: SubResource; - backendHttpSettings?: SubResource; - entraJWTValidationConfig?: SubResource; - readonly etag?: string; - httpListener?: SubResource; - loadDistributionPolicy?: SubResource; - name?: string; - priority?: number; - readonly provisioningState?: ProvisioningState; - redirectConfiguration?: SubResource; - rewriteRuleSet?: SubResource; - ruleType?: ApplicationGatewayRequestRoutingRuleType; - readonly type?: string; - urlPathMap?: SubResource; -} - -// @public -export type ApplicationGatewayRequestRoutingRuleType = string; - -// @public -export interface ApplicationGatewayRewriteRule { - actionSet?: ApplicationGatewayRewriteRuleActionSet; - conditions?: ApplicationGatewayRewriteRuleCondition[]; - name?: string; - ruleSequence?: number; -} - -// @public -export interface ApplicationGatewayRewriteRuleActionSet { - requestHeaderConfigurations?: ApplicationGatewayHeaderConfiguration[]; - responseHeaderConfigurations?: ApplicationGatewayHeaderConfiguration[]; - urlConfiguration?: ApplicationGatewayUrlConfiguration; -} - -// @public -export interface ApplicationGatewayRewriteRuleCondition { - ignoreCase?: boolean; - negate?: boolean; - pattern?: string; - variable?: string; -} - -// @public -export interface ApplicationGatewayRewriteRuleSet extends SubResource { - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - rewriteRules?: ApplicationGatewayRewriteRule[]; -} - -// @public -export interface ApplicationGatewayRoutingRule extends SubResource { - backendAddressPool?: SubResource; - backendSettings?: SubResource; - readonly etag?: string; - listener?: SubResource; - name?: string; - priority?: number; - readonly provisioningState?: ProvisioningState; - ruleType?: ApplicationGatewayRequestRoutingRuleType; - readonly type?: string; -} - -// @public -export type ApplicationGatewayRuleSetStatusOptions = string; - -// @public -export interface ApplicationGateways { - beginBackendHealth(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewaysBackendHealthOptionalParams): Promise, ApplicationGatewaysBackendHealthResponse>>; - beginBackendHealthAndWait(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewaysBackendHealthOptionalParams): Promise; - beginBackendHealthOnDemand(resourceGroupName: string, applicationGatewayName: string, probeRequest: ApplicationGatewayOnDemandProbe, options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams): Promise, ApplicationGatewaysBackendHealthOnDemandResponse>>; - beginBackendHealthOnDemandAndWait(resourceGroupName: string, applicationGatewayName: string, probeRequest: ApplicationGatewayOnDemandProbe, options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, applicationGatewayName: string, parameters: ApplicationGateway, options?: ApplicationGatewaysCreateOrUpdateOptionalParams): Promise, ApplicationGatewaysCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, applicationGatewayName: string, parameters: ApplicationGateway, options?: ApplicationGatewaysCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewaysDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewaysDeleteOptionalParams): Promise; - beginStart(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewaysStartOptionalParams): Promise, void>>; - beginStartAndWait(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewaysStartOptionalParams): Promise; - beginStop(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewaysStopOptionalParams): Promise, void>>; - beginStopAndWait(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewaysStopOptionalParams): Promise; - get(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewaysGetOptionalParams): Promise; - getSslPredefinedPolicy(predefinedPolicyName: string, options?: ApplicationGatewaysGetSslPredefinedPolicyOptionalParams): Promise; - list(resourceGroupName: string, options?: ApplicationGatewaysListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: ApplicationGatewaysListAllOptionalParams): PagedAsyncIterableIterator; - listAvailableRequestHeaders(options?: ApplicationGatewaysListAvailableRequestHeadersOptionalParams): Promise; - listAvailableResponseHeaders(options?: ApplicationGatewaysListAvailableResponseHeadersOptionalParams): Promise; - listAvailableServerVariables(options?: ApplicationGatewaysListAvailableServerVariablesOptionalParams): Promise; - listAvailableSslOptions(options?: ApplicationGatewaysListAvailableSslOptionsOptionalParams): Promise; - listAvailableSslPredefinedPolicies(options?: ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams): PagedAsyncIterableIterator; - listAvailableWafRuleSets(options?: ApplicationGatewaysListAvailableWafRuleSetsOptionalParams): Promise; - updateTags(resourceGroupName: string, applicationGatewayName: string, parameters: TagsObject, options?: ApplicationGatewaysUpdateTagsOptionalParams): Promise; -} - -// @public -export interface ApplicationGatewaysBackendHealthOnDemandOptionalParams extends coreClient.OperationOptions { - expand?: string; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApplicationGatewaysBackendHealthOnDemandResponse = ApplicationGatewayBackendHealthOnDemand; - -// @public -export interface ApplicationGatewaysBackendHealthOptionalParams extends coreClient.OperationOptions { - expand?: string; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApplicationGatewaysBackendHealthResponse = ApplicationGatewayBackendHealth; - -// @public -export interface ApplicationGatewaysCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApplicationGatewaysCreateOrUpdateResponse = ApplicationGateway; - -// @public -export interface ApplicationGatewaysDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ApplicationGatewaysGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysGetResponse = ApplicationGateway; - -// @public -export interface ApplicationGatewaysGetSslPredefinedPolicyOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysGetSslPredefinedPolicyResponse = ApplicationGatewaySslPredefinedPolicy; - -// @public -export interface ApplicationGatewaySku { - capacity?: number; - family?: ApplicationGatewaySkuFamily; - name?: ApplicationGatewaySkuName; - tier?: ApplicationGatewayTier; -} - -// @public -export type ApplicationGatewaySkuFamily = string; - -// @public -export type ApplicationGatewaySkuName = string; - -// @public -export interface ApplicationGatewaysListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysListAllNextResponse = ApplicationGatewayListResult; - -// @public -export interface ApplicationGatewaysListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysListAllResponse = ApplicationGatewayListResult; - -// @public -export interface ApplicationGatewaysListAvailableRequestHeadersOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysListAvailableRequestHeadersResponse = { - body: string[]; -}; - -// @public -export interface ApplicationGatewaysListAvailableResponseHeadersOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysListAvailableResponseHeadersResponse = { - body: string[]; -}; - -// @public -export interface ApplicationGatewaysListAvailableServerVariablesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysListAvailableServerVariablesResponse = { - body: string[]; -}; - -// @public -export interface ApplicationGatewaysListAvailableSslOptionsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysListAvailableSslOptionsResponse = ApplicationGatewayAvailableSslOptions; - -// @public -export interface ApplicationGatewaysListAvailableSslPredefinedPoliciesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysListAvailableSslPredefinedPoliciesNextResponse = ApplicationGatewayAvailableSslPredefinedPolicies; - -// @public -export interface ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysListAvailableSslPredefinedPoliciesResponse = ApplicationGatewayAvailableSslPredefinedPolicies; - -// @public -export interface ApplicationGatewaysListAvailableWafRuleSetsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysListAvailableWafRuleSetsResponse = ApplicationGatewayAvailableWafRuleSetsResult; - -// @public -export interface ApplicationGatewaysListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysListNextResponse = ApplicationGatewayListResult; - -// @public -export interface ApplicationGatewaysListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysListResponse = ApplicationGatewayListResult; - -// @public -export interface ApplicationGatewaySslCertificate extends SubResource { - data?: string; - readonly etag?: string; - keyVaultSecretId?: string; - name?: string; - password?: string; - readonly provisioningState?: ProvisioningState; - readonly publicCertData?: string; - readonly type?: string; -} - -// @public -export type ApplicationGatewaySslCipherSuite = string; - -// @public -export interface ApplicationGatewaySslPolicy { - cipherSuites?: ApplicationGatewaySslCipherSuite[]; - disabledSslProtocols?: ApplicationGatewaySslProtocol[]; - minProtocolVersion?: ApplicationGatewaySslProtocol; - policyName?: ApplicationGatewaySslPolicyName; - policyType?: ApplicationGatewaySslPolicyType; -} - -// @public -export type ApplicationGatewaySslPolicyName = string; - -// @public -export type ApplicationGatewaySslPolicyType = string; - -// @public -export interface ApplicationGatewaySslPredefinedPolicy extends SubResource { - cipherSuites?: ApplicationGatewaySslCipherSuite[]; - minProtocolVersion?: ApplicationGatewaySslProtocol; - name?: string; -} - -// @public -export interface ApplicationGatewaySslProfile extends SubResource { - clientAuthConfiguration?: ApplicationGatewayClientAuthConfiguration; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - sslPolicy?: ApplicationGatewaySslPolicy; - trustedClientCertificates?: SubResource[]; - readonly type?: string; -} - -// @public -export type ApplicationGatewaySslProtocol = string; - -// @public -export interface ApplicationGatewaysStartOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ApplicationGatewaysStopOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ApplicationGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewaysUpdateTagsResponse = ApplicationGateway; - -// @public -export type ApplicationGatewayTier = string; - -// @public -export type ApplicationGatewayTierTypes = string; - -// @public -export interface ApplicationGatewayTrustedClientCertificate extends SubResource { - readonly clientCertIssuerDN?: string; - data?: string; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; - readonly validatedCertData?: string; -} - -// @public -export interface ApplicationGatewayTrustedRootCertificate extends SubResource { - data?: string; - readonly etag?: string; - keyVaultSecretId?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export type ApplicationGatewayUnAuthorizedRequestAction = string; - -// @public -export interface ApplicationGatewayUrlConfiguration { - modifiedPath?: string; - modifiedQueryString?: string; - reroute?: boolean; -} - -// @public -export interface ApplicationGatewayUrlPathMap extends SubResource { - defaultBackendAddressPool?: SubResource; - defaultBackendHttpSettings?: SubResource; - defaultLoadDistributionPolicy?: SubResource; - defaultRedirectConfiguration?: SubResource; - defaultRewriteRuleSet?: SubResource; - readonly etag?: string; - name?: string; - pathRules?: ApplicationGatewayPathRule[]; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayWafDynamicManifestResult { - availableRuleSets?: ApplicationGatewayFirewallManifestRuleSet[]; - id?: string; - readonly name?: string; - ruleSetType?: string; - ruleSetVersion?: string; - readonly type?: string; -} - -// @public -export interface ApplicationGatewayWafDynamicManifestResultList { - nextLink?: string; - value?: ApplicationGatewayWafDynamicManifestResult[]; -} - -// @public -export interface ApplicationGatewayWafDynamicManifests { - list(location: string, options?: ApplicationGatewayWafDynamicManifestsGetOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApplicationGatewayWafDynamicManifestsDefault { - get(location: string, options?: ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams): Promise; -} - -// @public -export interface ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewayWafDynamicManifestsDefaultGetResponse = ApplicationGatewayWafDynamicManifestResult; - -// @public -export interface ApplicationGatewayWafDynamicManifestsGetNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewayWafDynamicManifestsGetNextResponse = ApplicationGatewayWafDynamicManifestResultList; - -// @public -export interface ApplicationGatewayWafDynamicManifestsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationGatewayWafDynamicManifestsGetResponse = ApplicationGatewayWafDynamicManifestResultList; - -// @public -export type ApplicationGatewayWafRuleActionTypes = string; - -// @public -export type ApplicationGatewayWafRuleSensitivityTypes = string; - -// @public -export type ApplicationGatewayWafRuleStateTypes = string; - -// @public -export interface ApplicationGatewayWebApplicationFirewallConfiguration { - disabledRuleGroups?: ApplicationGatewayFirewallDisabledRuleGroup[]; - enabled: boolean; - exclusions?: ApplicationGatewayFirewallExclusion[]; - fileUploadLimitInMb?: number; - firewallMode: ApplicationGatewayFirewallMode; - maxRequestBodySize?: number; - maxRequestBodySizeInKb?: number; - requestBodyCheck?: boolean; - ruleSetType: string; - ruleSetVersion: string; -} - -// @public -export interface ApplicationRule extends FirewallPolicyRule { - destinationAddresses?: string[]; - fqdnTags?: string[]; - httpHeadersToInsert?: FirewallPolicyHttpHeaderToInsert[]; - protocols?: FirewallPolicyRuleApplicationProtocol[]; - ruleType: "ApplicationRule"; - sourceAddresses?: string[]; - sourceIpGroups?: string[]; - targetFqdns?: string[]; - targetUrls?: string[]; - terminateTLS?: boolean; - webCategories?: string[]; -} - -// @public -export interface ApplicationSecurityGroup extends Resource { - readonly etag?: string; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; -} - -// @public -export interface ApplicationSecurityGroupListResult { - readonly nextLink?: string; - value?: ApplicationSecurityGroup[]; -} - -// @public -export interface ApplicationSecurityGroups { - beginCreateOrUpdate(resourceGroupName: string, applicationSecurityGroupName: string, parameters: ApplicationSecurityGroup, options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams): Promise, ApplicationSecurityGroupsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, applicationSecurityGroupName: string, parameters: ApplicationSecurityGroup, options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, applicationSecurityGroupName: string, options?: ApplicationSecurityGroupsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, applicationSecurityGroupName: string, options?: ApplicationSecurityGroupsDeleteOptionalParams): Promise; - get(resourceGroupName: string, applicationSecurityGroupName: string, options?: ApplicationSecurityGroupsGetOptionalParams): Promise; - list(resourceGroupName: string, options?: ApplicationSecurityGroupsListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: ApplicationSecurityGroupsListAllOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, applicationSecurityGroupName: string, parameters: TagsObject, options?: ApplicationSecurityGroupsUpdateTagsOptionalParams): Promise; -} - -// @public -export interface ApplicationSecurityGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApplicationSecurityGroupsCreateOrUpdateResponse = ApplicationSecurityGroup; - -// @public -export interface ApplicationSecurityGroupsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ApplicationSecurityGroupsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationSecurityGroupsGetResponse = ApplicationSecurityGroup; - -// @public -export interface ApplicationSecurityGroupsListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationSecurityGroupsListAllNextResponse = ApplicationSecurityGroupListResult; - -// @public -export interface ApplicationSecurityGroupsListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationSecurityGroupsListAllResponse = ApplicationSecurityGroupListResult; - -// @public -export interface ApplicationSecurityGroupsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationSecurityGroupsListNextResponse = ApplicationSecurityGroupListResult; - -// @public -export interface ApplicationSecurityGroupsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationSecurityGroupsListResponse = ApplicationSecurityGroupListResult; - -// @public -export interface ApplicationSecurityGroupsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationSecurityGroupsUpdateTagsResponse = ApplicationSecurityGroup; - -// @public -export type AssociationAccessMode = string; - -// @public -export type AssociationType = string; - -// @public -export type AuthenticationMethod = string; - -// @public -export interface AuthorizationListResult { - nextLink?: string; - value?: ExpressRouteCircuitAuthorization[]; -} - -// @public -export type AuthorizationUseStatus = string; - -// @public -export interface AutoApprovedPrivateLinkService { - privateLinkService?: string; -} - -// @public -export interface AutoApprovedPrivateLinkServicesResult { - readonly nextLink?: string; - value?: AutoApprovedPrivateLinkService[]; -} - -// @public -export type AutoLearnPrivateRangesMode = string; - -// @public -export interface Availability { - blobDuration?: string; - retention?: string; - timeGrain?: string; -} - -// @public -export interface AvailableDelegation { - actions?: string[]; - id?: string; - name?: string; - serviceName?: string; - type?: string; -} - -// @public -export interface AvailableDelegations { - list(location: string, options?: AvailableDelegationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AvailableDelegationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailableDelegationsListNextResponse = AvailableDelegationsResult; - -// @public -export interface AvailableDelegationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailableDelegationsListResponse = AvailableDelegationsResult; - -// @public -export interface AvailableDelegationsResult { - readonly nextLink?: string; - value?: AvailableDelegation[]; -} - -// @public -export interface AvailableEndpointServices { - list(location: string, options?: AvailableEndpointServicesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AvailableEndpointServicesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailableEndpointServicesListNextResponse = EndpointServicesListResult; - -// @public -export interface AvailableEndpointServicesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailableEndpointServicesListResponse = EndpointServicesListResult; - -// @public -export interface AvailablePrivateEndpointType { - displayName?: string; - id?: string; - name?: string; - resourceName?: string; - type?: string; -} - -// @public -export interface AvailablePrivateEndpointTypes { - list(location: string, options?: AvailablePrivateEndpointTypesListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(location: string, resourceGroupName: string, options?: AvailablePrivateEndpointTypesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AvailablePrivateEndpointTypesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailablePrivateEndpointTypesListByResourceGroupNextResponse = AvailablePrivateEndpointTypesResult; - -// @public -export interface AvailablePrivateEndpointTypesListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailablePrivateEndpointTypesListByResourceGroupResponse = AvailablePrivateEndpointTypesResult; - -// @public -export interface AvailablePrivateEndpointTypesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailablePrivateEndpointTypesListNextResponse = AvailablePrivateEndpointTypesResult; - -// @public -export interface AvailablePrivateEndpointTypesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailablePrivateEndpointTypesListResponse = AvailablePrivateEndpointTypesResult; - -// @public -export interface AvailablePrivateEndpointTypesResult { - readonly nextLink?: string; - value?: AvailablePrivateEndpointType[]; -} - -// @public -export interface AvailableProvidersList { - countries: AvailableProvidersListCountry[]; -} - -// @public -export interface AvailableProvidersListCity { - cityName?: string; - providers?: string[]; -} - -// @public -export interface AvailableProvidersListCountry { - countryName?: string; - providers?: string[]; - states?: AvailableProvidersListState[]; -} - -// @public -export interface AvailableProvidersListParameters { - azureLocations?: string[]; - city?: string; - country?: string; - state?: string; -} - -// @public -export interface AvailableProvidersListState { - cities?: AvailableProvidersListCity[]; - providers?: string[]; - stateName?: string; -} - -// @public -export interface AvailableResourceGroupDelegations { - list(location: string, resourceGroupName: string, options?: AvailableResourceGroupDelegationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AvailableResourceGroupDelegationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailableResourceGroupDelegationsListNextResponse = AvailableDelegationsResult; - -// @public -export interface AvailableResourceGroupDelegationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailableResourceGroupDelegationsListResponse = AvailableDelegationsResult; - -// @public -export interface AvailableServiceAlias { - id?: string; - name?: string; - resourceName?: string; - type?: string; -} - -// @public -export interface AvailableServiceAliases { - list(location: string, options?: AvailableServiceAliasesListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, location: string, options?: AvailableServiceAliasesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AvailableServiceAliasesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailableServiceAliasesListByResourceGroupNextResponse = AvailableServiceAliasesResult; - -// @public -export interface AvailableServiceAliasesListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailableServiceAliasesListByResourceGroupResponse = AvailableServiceAliasesResult; - -// @public -export interface AvailableServiceAliasesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailableServiceAliasesListNextResponse = AvailableServiceAliasesResult; - -// @public -export interface AvailableServiceAliasesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailableServiceAliasesListResponse = AvailableServiceAliasesResult; - -// @public -export interface AvailableServiceAliasesResult { - readonly nextLink?: string; - value?: AvailableServiceAlias[]; -} - -// @public -export interface AzureAsyncOperationResult { - error?: ErrorModel; - status?: NetworkOperationStatus; -} - -// @public -export interface AzureFirewall extends Resource { - additionalProperties?: { - [propertyName: string]: string; - }; - applicationRuleCollections?: AzureFirewallApplicationRuleCollection[]; - autoscaleConfiguration?: AzureFirewallAutoscaleConfiguration; - readonly etag?: string; - extendedLocation?: ExtendedLocation; - firewallPolicy?: SubResource; - hubIPAddresses?: HubIPAddresses; - ipConfigurations?: AzureFirewallIPConfiguration[]; - readonly ipGroups?: AzureFirewallIpGroups[]; - managementIpConfiguration?: AzureFirewallIPConfiguration; - natRuleCollections?: AzureFirewallNatRuleCollection[]; - networkRuleCollections?: AzureFirewallNetworkRuleCollection[]; - readonly provisioningState?: ProvisioningState; - sku?: AzureFirewallSku; - threatIntelMode?: AzureFirewallThreatIntelMode; - virtualHub?: SubResource; - zones?: string[]; -} - -// @public -export interface AzureFirewallApplicationRule { - description?: string; - fqdnTags?: string[]; - name?: string; - protocols?: AzureFirewallApplicationRuleProtocol[]; - sourceAddresses?: string[]; - sourceIpGroups?: string[]; - targetFqdns?: string[]; -} - -// @public -export interface AzureFirewallApplicationRuleCollection extends SubResource { - action?: AzureFirewallRCAction; - readonly etag?: string; - name?: string; - priority?: number; - readonly provisioningState?: ProvisioningState; - rules?: AzureFirewallApplicationRule[]; -} - -// @public -export interface AzureFirewallApplicationRuleProtocol { - port?: number; - protocolType?: AzureFirewallApplicationRuleProtocolType; -} - -// @public -export type AzureFirewallApplicationRuleProtocolType = string; - -// @public -export interface AzureFirewallAutoscaleConfiguration { - maxCapacity?: number; - minCapacity?: number; -} - -// @public -export interface AzureFirewallFqdnTag extends Resource { - readonly etag?: string; - readonly fqdnTagName?: string; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface AzureFirewallFqdnTagListResult { - nextLink?: string; - value?: AzureFirewallFqdnTag[]; -} - -// @public -export interface AzureFirewallFqdnTags { - listAll(options?: AzureFirewallFqdnTagsListAllOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AzureFirewallFqdnTagsListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureFirewallFqdnTagsListAllNextResponse = AzureFirewallFqdnTagListResult; - -// @public -export interface AzureFirewallFqdnTagsListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureFirewallFqdnTagsListAllResponse = AzureFirewallFqdnTagListResult; - -// @public -export interface AzureFirewallIPConfiguration extends SubResource { - readonly etag?: string; - name?: string; - readonly privateIPAddress?: string; - readonly provisioningState?: ProvisioningState; - publicIPAddress?: SubResource; - subnet?: SubResource; - readonly type?: string; -} - -// @public -export interface AzureFirewallIpGroups { - readonly changeNumber?: string; - readonly id?: string; -} - -// @public -export interface AzureFirewallListResult { - nextLink?: string; - value?: AzureFirewall[]; -} - -// @public -export interface AzureFirewallNatRCAction { - type?: AzureFirewallNatRCActionType; -} - -// @public -export type AzureFirewallNatRCActionType = string; - -// @public -export interface AzureFirewallNatRule { - description?: string; - destinationAddresses?: string[]; - destinationPorts?: string[]; - name?: string; - protocols?: AzureFirewallNetworkRuleProtocol[]; - sourceAddresses?: string[]; - sourceIpGroups?: string[]; - translatedAddress?: string; - translatedFqdn?: string; - translatedPort?: string; -} - -// @public -export interface AzureFirewallNatRuleCollection extends SubResource { - action?: AzureFirewallNatRCAction; - readonly etag?: string; - name?: string; - priority?: number; - readonly provisioningState?: ProvisioningState; - rules?: AzureFirewallNatRule[]; -} - -// @public -export interface AzureFirewallNetworkRule { - description?: string; - destinationAddresses?: string[]; - destinationFqdns?: string[]; - destinationIpGroups?: string[]; - destinationPorts?: string[]; - name?: string; - protocols?: AzureFirewallNetworkRuleProtocol[]; - sourceAddresses?: string[]; - sourceIpGroups?: string[]; -} - -// @public -export interface AzureFirewallNetworkRuleCollection extends SubResource { - action?: AzureFirewallRCAction; - readonly etag?: string; - name?: string; - priority?: number; - readonly provisioningState?: ProvisioningState; - rules?: AzureFirewallNetworkRule[]; -} - -// @public -export type AzureFirewallNetworkRuleProtocol = string; - -// @public -export interface AzureFirewallPacketCaptureFlags { - type?: AzureFirewallPacketCaptureFlagsType; -} - -// @public -export type AzureFirewallPacketCaptureFlagsType = string; - -// @public -export type AzureFirewallPacketCaptureOperationType = string; - -// @public -export interface AzureFirewallPacketCaptureResponse { - message?: string; - statusCode?: AzureFirewallPacketCaptureResponseCode; -} - -// @public -export type AzureFirewallPacketCaptureResponseCode = string; - -// @public -export interface AzureFirewallPacketCaptureRule { - destinationPorts?: string[]; - destinations?: string[]; - sources?: string[]; -} - -// @public -export interface AzureFirewallPublicIPAddress { - address?: string; -} - -// @public -export interface AzureFirewallRCAction { - type?: AzureFirewallRCActionType; -} - -// @public -export type AzureFirewallRCActionType = string; - -// @public -export interface AzureFirewalls { - beginCreateOrUpdate(resourceGroupName: string, azureFirewallName: string, parameters: AzureFirewall, options?: AzureFirewallsCreateOrUpdateOptionalParams): Promise, AzureFirewallsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, azureFirewallName: string, parameters: AzureFirewall, options?: AzureFirewallsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, azureFirewallName: string, options?: AzureFirewallsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, azureFirewallName: string, options?: AzureFirewallsDeleteOptionalParams): Promise; - beginListLearnedPrefixes(resourceGroupName: string, azureFirewallName: string, options?: AzureFirewallsListLearnedPrefixesOptionalParams): Promise, AzureFirewallsListLearnedPrefixesResponse>>; - beginListLearnedPrefixesAndWait(resourceGroupName: string, azureFirewallName: string, options?: AzureFirewallsListLearnedPrefixesOptionalParams): Promise; - beginPacketCapture(resourceGroupName: string, azureFirewallName: string, parameters: FirewallPacketCaptureParameters, options?: AzureFirewallsPacketCaptureOptionalParams): Promise, AzureFirewallsPacketCaptureResponse>>; - beginPacketCaptureAndWait(resourceGroupName: string, azureFirewallName: string, parameters: FirewallPacketCaptureParameters, options?: AzureFirewallsPacketCaptureOptionalParams): Promise; - beginPacketCaptureOperation(resourceGroupName: string, azureFirewallName: string, parameters: FirewallPacketCaptureParameters, options?: AzureFirewallsPacketCaptureOperationOptionalParams): Promise, AzureFirewallsPacketCaptureOperationResponse>>; - beginPacketCaptureOperationAndWait(resourceGroupName: string, azureFirewallName: string, parameters: FirewallPacketCaptureParameters, options?: AzureFirewallsPacketCaptureOperationOptionalParams): Promise; - beginUpdateTags(resourceGroupName: string, azureFirewallName: string, parameters: TagsObject, options?: AzureFirewallsUpdateTagsOptionalParams): Promise, AzureFirewallsUpdateTagsResponse>>; - beginUpdateTagsAndWait(resourceGroupName: string, azureFirewallName: string, parameters: TagsObject, options?: AzureFirewallsUpdateTagsOptionalParams): Promise; - get(resourceGroupName: string, azureFirewallName: string, options?: AzureFirewallsGetOptionalParams): Promise; - list(resourceGroupName: string, options?: AzureFirewallsListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: AzureFirewallsListAllOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AzureFirewallsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type AzureFirewallsCreateOrUpdateResponse = AzureFirewall; - -// @public -export interface AzureFirewallsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface AzureFirewallsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureFirewallsGetResponse = AzureFirewall; - -// @public -export interface AzureFirewallSku { - name?: AzureFirewallSkuName; - tier?: AzureFirewallSkuTier; -} - -// @public -export type AzureFirewallSkuName = string; - -// @public -export type AzureFirewallSkuTier = string; - -// @public -export interface AzureFirewallsListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureFirewallsListAllNextResponse = AzureFirewallListResult; - -// @public -export interface AzureFirewallsListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureFirewallsListAllResponse = AzureFirewallListResult; - -// @public -export interface AzureFirewallsListLearnedPrefixesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type AzureFirewallsListLearnedPrefixesResponse = IPPrefixesList; - -// @public -export interface AzureFirewallsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureFirewallsListNextResponse = AzureFirewallListResult; - -// @public -export interface AzureFirewallsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureFirewallsListResponse = AzureFirewallListResult; - -// @public -export interface AzureFirewallsPacketCaptureHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface AzureFirewallsPacketCaptureOperationHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface AzureFirewallsPacketCaptureOperationOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type AzureFirewallsPacketCaptureOperationResponse = AzureFirewallPacketCaptureResponse; - -// @public -export interface AzureFirewallsPacketCaptureOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type AzureFirewallsPacketCaptureResponse = AzureFirewallsPacketCaptureHeaders; - -// @public -export interface AzureFirewallsUpdateTagsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type AzureFirewallsUpdateTagsResponse = AzureFirewall; - -// @public -export type AzureFirewallThreatIntelMode = string; - -// @public -export interface AzureReachabilityReport { - aggregationLevel: string; - providerLocation: AzureReachabilityReportLocation; - reachabilityReport: AzureReachabilityReportItem[]; -} - -// @public -export interface AzureReachabilityReportItem { - azureLocation?: string; - latencies?: AzureReachabilityReportLatencyInfo[]; - provider?: string; -} - -// @public -export interface AzureReachabilityReportLatencyInfo { - score?: number; - timeStamp?: Date; -} - -// @public -export interface AzureReachabilityReportLocation { - city?: string; - country: string; - state?: string; -} - -// @public -export interface AzureReachabilityReportParameters { - azureLocations?: string[]; - endTime: Date; - providerLocation: AzureReachabilityReportLocation; - providers?: string[]; - startTime: Date; -} - -// @public -export interface AzureWebCategory { - readonly etag?: string; - readonly group?: string; - id?: string; - readonly name?: string; - readonly type?: string; -} - -// @public -export interface AzureWebCategoryListResult { - nextLink?: string; - value?: AzureWebCategory[]; -} - -// @public -export interface BackendAddressInboundNatRulePortMappings { - inboundNatRulePortMappings?: InboundNatRulePortMapping[]; -} - -// @public -export interface BackendAddressPool extends SubResource { - readonly backendIPConfigurations?: NetworkInterfaceIPConfiguration[]; - drainPeriodInSeconds?: number; - readonly etag?: string; - readonly inboundNatRules?: SubResource[]; - loadBalancerBackendAddresses?: LoadBalancerBackendAddress[]; - readonly loadBalancingRules?: SubResource[]; - location?: string; - name?: string; - readonly outboundRule?: SubResource; - readonly outboundRules?: SubResource[]; - readonly provisioningState?: ProvisioningState; - syncMode?: SyncMode; - tunnelInterfaces?: GatewayLoadBalancerTunnelInterface[]; - readonly type?: string; - virtualNetwork?: SubResource; -} - -// @public -export interface BaseAdminRule extends ChildResource { - kind: AdminRuleKind; - readonly systemData?: SystemData; -} - -// @public (undocumented) -export type BaseAdminRuleUnion = BaseAdminRule | AdminRule | DefaultAdminRule; - -// @public -export interface BastionActiveSession { - readonly protocol?: BastionConnectProtocol; - readonly resourceType?: string; - readonly sessionDurationInMins?: number; - readonly sessionId?: string; - readonly startTime?: Record; - readonly targetHostName?: string; - readonly targetIpAddress?: string; - readonly targetResourceGroup?: string; - readonly targetResourceId?: string; - readonly targetSubscriptionId?: string; - readonly userName?: string; -} - -// @public -export interface BastionActiveSessionListResult { - nextLink?: string; - value?: BastionActiveSession[]; -} - -// @public -export type BastionConnectProtocol = string; - -// @public -export interface BastionHost extends Resource { - disableCopyPaste?: boolean; - dnsName?: string; - enableFileCopy?: boolean; - enableIpConnect?: boolean; - enableKerberos?: boolean; - enablePrivateOnlyBastion?: boolean; - enableSessionRecording?: boolean; - enableShareableLink?: boolean; - enableTunneling?: boolean; - readonly etag?: string; - ipConfigurations?: BastionHostIPConfiguration[]; - // (undocumented) - networkAcls?: BastionHostPropertiesFormatNetworkAcls; - readonly provisioningState?: ProvisioningState; - scaleUnits?: number; - sku?: Sku; - virtualNetwork?: SubResource; - zones?: string[]; -} - -// @public -export interface BastionHostIPConfiguration extends SubResource { - readonly etag?: string; - name?: string; - privateIPAllocationMethod?: IPAllocationMethod; - readonly provisioningState?: ProvisioningState; - publicIPAddress?: SubResource; - subnet?: SubResource; - readonly type?: string; -} - -// @public -export interface BastionHostListResult { - nextLink?: string; - value?: BastionHost[]; -} - -// @public (undocumented) -export interface BastionHostPropertiesFormatNetworkAcls { - ipRules?: IPRule[]; -} - -// @public -export interface BastionHosts { - beginCreateOrUpdate(resourceGroupName: string, bastionHostName: string, parameters: BastionHost, options?: BastionHostsCreateOrUpdateOptionalParams): Promise, BastionHostsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, bastionHostName: string, parameters: BastionHost, options?: BastionHostsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, bastionHostName: string, options?: BastionHostsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, bastionHostName: string, options?: BastionHostsDeleteOptionalParams): Promise; - beginUpdateTags(resourceGroupName: string, bastionHostName: string, parameters: TagsObject, options?: BastionHostsUpdateTagsOptionalParams): Promise, BastionHostsUpdateTagsResponse>>; - beginUpdateTagsAndWait(resourceGroupName: string, bastionHostName: string, parameters: TagsObject, options?: BastionHostsUpdateTagsOptionalParams): Promise; - get(resourceGroupName: string, bastionHostName: string, options?: BastionHostsGetOptionalParams): Promise; - list(options?: BastionHostsListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: BastionHostsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface BastionHostsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type BastionHostsCreateOrUpdateResponse = BastionHost; - -// @public -export interface BastionHostsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface BastionHostsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BastionHostsGetResponse = BastionHost; - -// @public -export type BastionHostSkuName = string; - -// @public -export interface BastionHostsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BastionHostsListByResourceGroupNextResponse = BastionHostListResult; - -// @public -export interface BastionHostsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BastionHostsListByResourceGroupResponse = BastionHostListResult; - -// @public -export interface BastionHostsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BastionHostsListNextResponse = BastionHostListResult; - -// @public -export interface BastionHostsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BastionHostsListResponse = BastionHostListResult; - -// @public -export interface BastionHostsUpdateTagsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type BastionHostsUpdateTagsResponse = BastionHost; - -// @public -export interface BastionSessionDeleteResult { - nextLink?: string; - value?: BastionSessionState[]; -} - -// @public -export interface BastionSessionState { - readonly message?: string; - readonly sessionId?: string; - readonly state?: string; -} - -// @public -export interface BastionShareableLink { - readonly bsl?: string; - readonly createdAt?: string; - readonly message?: string; - vm: Vm; -} - -// @public -export interface BastionShareableLinkListRequest { - vms?: BastionShareableLink[]; -} - -// @public -export interface BastionShareableLinkListResult { - nextLink?: string; - value?: BastionShareableLink[]; -} - -// @public -export interface BastionShareableLinkTokenListRequest { - tokens?: string[]; -} - -// @public -export interface BGPCommunity { - communityName?: string; - communityPrefixes?: string[]; - communityValue?: string; - isAuthorizedToUse?: boolean; - serviceGroup?: string; - serviceSupportedRegion?: string; -} - -// @public -export interface BgpConnection extends SubResource { - readonly connectionState?: HubBgpConnectionStatus; - readonly etag?: string; - hubVirtualNetworkConnection?: SubResource; - name?: string; - peerAsn?: number; - peerIp?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export type BgpPeerState = string; - -// @public -export interface BgpPeerStatus { - readonly asn?: number; - readonly connectedDuration?: string; - readonly localAddress?: string; - readonly messagesReceived?: number; - readonly messagesSent?: number; - readonly neighbor?: string; - readonly routesReceived?: number; - readonly state?: BgpPeerState; -} - -// @public -export interface BgpPeerStatusListResult { - value?: BgpPeerStatus[]; -} - -// @public -export interface BgpServiceCommunities { - list(options?: BgpServiceCommunitiesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface BgpServiceCommunitiesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BgpServiceCommunitiesListNextResponse = BgpServiceCommunityListResult; - -// @public -export interface BgpServiceCommunitiesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BgpServiceCommunitiesListResponse = BgpServiceCommunityListResult; - -// @public -export interface BgpServiceCommunity extends Resource { - bgpCommunities?: BGPCommunity[]; - serviceName?: string; -} - -// @public -export interface BgpServiceCommunityListResult { - nextLink?: string; - value?: BgpServiceCommunity[]; -} - -// @public -export interface BgpSettings { - asn?: number; - bgpPeeringAddress?: string; - bgpPeeringAddresses?: IPConfigurationBgpPeeringAddress[]; - peerWeight?: number; -} - -// @public -export interface BreakOutCategoryPolicies { - allow?: boolean; - default?: boolean; - optimize?: boolean; -} - -// @public -export interface CertificateAuthentication { - inboundAuthCertificateChain?: string[]; - inboundAuthCertificateSubjectName?: string; - outboundAuthCertificate?: string; -} - -// @public -export interface CheckDnsNameAvailabilityOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CheckDnsNameAvailabilityResponse = DnsNameAvailabilityResult; - -// @public -export interface CheckPrivateLinkServiceVisibilityRequest { - privateLinkServiceAlias?: string; -} - -// @public -export interface ChildResource { - readonly etag?: string; - readonly id?: string; - readonly name?: string; - readonly type?: string; -} - -// @public -export type CircuitConnectionStatus = string; - -// @public (undocumented) -export interface CircuitMetadataMap { - link?: string; - location?: string; - name?: string; -} - -// @public -export interface CloudError { - error?: CloudErrorBody; -} - -// @public -export interface CloudErrorBody { - code?: string; - details?: CloudErrorBody[]; - message?: string; - target?: string; -} - -// @public -export type CommissionedState = string; - -// @public -export interface CommonErrorAdditionalInfo { - readonly info?: Record; - readonly type?: string; -} - -// @public -export interface CommonErrorDetail { - readonly additionalInfo?: CommonErrorAdditionalInfo[]; - readonly code?: string; - readonly details?: CommonErrorDetail[]; - readonly message?: string; - readonly target?: string; -} - -// @public -export interface CommonErrorResponse { - error?: CommonErrorDetail; -} - -// @public -export interface CommonProxyResource extends CommonResource { -} - -// @public -export interface CommonResource { - readonly id?: string; - readonly name?: string; - readonly systemData?: SystemData; - readonly type?: string; -} - -// @public -export interface CommonTrackedResource extends CommonResource { - location: string; - tags?: { - [propertyName: string]: string; - }; -} - -// @public (undocumented) -export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { - readonly clientId?: string; - readonly principalId?: string; -} - -// @public -export interface ConfigurationGroup { - description?: string; - id?: string; - memberType?: GroupMemberType; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: 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 type ConfigurationType = string; - -// @public -export type ConnectedGroupAddressOverlap = string; - -// @public -export type ConnectedGroupPrivateEndpointsScale = string; - -// @public -export type ConnectionAuthenticationType = string; - -// @public -export interface ConnectionMonitor { - autoStart?: boolean; - destination?: ConnectionMonitorDestination; - endpoints?: ConnectionMonitorEndpoint[]; - location?: string; - monitoringIntervalInSeconds?: number; - notes?: string; - outputs?: ConnectionMonitorOutput[]; - source?: ConnectionMonitorSource; - tags?: { - [propertyName: string]: string; - }; - testConfigurations?: ConnectionMonitorTestConfiguration[]; - testGroups?: ConnectionMonitorTestGroup[]; -} - -// @public -export interface ConnectionMonitorDestination { - address?: string; - port?: number; - resourceId?: string; -} - -// @public -export interface ConnectionMonitorEndpoint { - address?: string; - coverageLevel?: CoverageLevel; - filter?: ConnectionMonitorEndpointFilter; - locationDetails?: ConnectionMonitorEndpointLocationDetails; - name: string; - resourceId?: string; - scope?: ConnectionMonitorEndpointScope; - subscriptionId?: string; - type?: EndpointType; -} - -// @public -export interface ConnectionMonitorEndpointFilter { - items?: ConnectionMonitorEndpointFilterItem[]; - type?: ConnectionMonitorEndpointFilterType; -} - -// @public -export interface ConnectionMonitorEndpointFilterItem { - address?: string; - type?: ConnectionMonitorEndpointFilterItemType; -} - -// @public -export type ConnectionMonitorEndpointFilterItemType = string; - -// @public -export type ConnectionMonitorEndpointFilterType = string; - -// @public -export interface ConnectionMonitorEndpointLocationDetails { - region?: string; -} - -// @public -export interface ConnectionMonitorEndpointScope { - exclude?: ConnectionMonitorEndpointScopeItem[]; - include?: ConnectionMonitorEndpointScopeItem[]; -} - -// @public -export interface ConnectionMonitorEndpointScopeItem { - address?: string; -} - -// @public -export interface ConnectionMonitorHttpConfiguration { - method?: HttpConfigurationMethod; - path?: string; - port?: number; - preferHttps?: boolean; - requestHeaders?: HttpHeader[]; - validStatusCodeRanges?: string[]; -} - -// @public -export interface ConnectionMonitorIcmpConfiguration { - disableTraceRoute?: boolean; -} - -// @public -export interface ConnectionMonitorListResult { - value?: ConnectionMonitorResult[]; -} - -// @public -export interface ConnectionMonitorOutput { - type?: OutputType; - workspaceSettings?: ConnectionMonitorWorkspaceSettings; -} - -// @public -export interface ConnectionMonitorParameters { - autoStart?: boolean; - destination?: ConnectionMonitorDestination; - endpoints?: ConnectionMonitorEndpoint[]; - monitoringIntervalInSeconds?: number; - notes?: string; - outputs?: ConnectionMonitorOutput[]; - source?: ConnectionMonitorSource; - testConfigurations?: ConnectionMonitorTestConfiguration[]; - testGroups?: ConnectionMonitorTestGroup[]; -} - -// @public -export interface ConnectionMonitorQueryResult { - sourceStatus?: ConnectionMonitorSourceStatus; - states?: ConnectionStateSnapshot[]; -} - -// @public -export interface ConnectionMonitorResult { - autoStart?: boolean; - readonly connectionMonitorType?: ConnectionMonitorType; - destination?: ConnectionMonitorDestination; - endpoints?: ConnectionMonitorEndpoint[]; - readonly etag?: string; - readonly id?: string; - location?: string; - monitoringIntervalInSeconds?: number; - readonly monitoringStatus?: string; - readonly name?: string; - notes?: string; - outputs?: ConnectionMonitorOutput[]; - readonly provisioningState?: ProvisioningState; - source?: ConnectionMonitorSource; - readonly startTime?: Date; - tags?: { - [propertyName: string]: string; - }; - testConfigurations?: ConnectionMonitorTestConfiguration[]; - testGroups?: ConnectionMonitorTestGroup[]; - readonly type?: string; -} - -// @public -export interface ConnectionMonitorResultProperties extends ConnectionMonitorParameters { - readonly connectionMonitorType?: ConnectionMonitorType; - readonly monitoringStatus?: string; - readonly provisioningState?: ProvisioningState; - readonly startTime?: Date; -} - -// @public -export interface ConnectionMonitors { - beginCreateOrUpdate(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, parameters: ConnectionMonitor, options?: ConnectionMonitorsCreateOrUpdateOptionalParams): Promise, ConnectionMonitorsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, parameters: ConnectionMonitor, options?: ConnectionMonitorsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: ConnectionMonitorsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: ConnectionMonitorsDeleteOptionalParams): Promise; - beginStop(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: ConnectionMonitorsStopOptionalParams): Promise, void>>; - beginStopAndWait(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: ConnectionMonitorsStopOptionalParams): Promise; - get(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: ConnectionMonitorsGetOptionalParams): Promise; - list(resourceGroupName: string, networkWatcherName: string, options?: ConnectionMonitorsListOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, parameters: TagsObject, options?: ConnectionMonitorsUpdateTagsOptionalParams): Promise; -} - -// @public -export interface ConnectionMonitorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - migrate?: string; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ConnectionMonitorsCreateOrUpdateResponse = ConnectionMonitorResult; - -// @public -export interface ConnectionMonitorsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ConnectionMonitorsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ConnectionMonitorsGetResponse = ConnectionMonitorResult; - -// @public -export interface ConnectionMonitorsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ConnectionMonitorsListResponse = ConnectionMonitorListResult; - -// @public -export interface ConnectionMonitorSource { - port?: number; - resourceId: string; -} - -// @public -export type ConnectionMonitorSourceStatus = string; - -// @public -export interface ConnectionMonitorsStopOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ConnectionMonitorSuccessThreshold { - checksFailedPercent?: number; - roundTripTimeMs?: number; -} - -// @public -export interface ConnectionMonitorsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ConnectionMonitorsUpdateTagsResponse = ConnectionMonitorResult; - -// @public -export interface ConnectionMonitorTcpConfiguration { - destinationPortBehavior?: DestinationPortBehavior; - disableTraceRoute?: boolean; - port?: number; -} - -// @public -export interface ConnectionMonitorTestConfiguration { - httpConfiguration?: ConnectionMonitorHttpConfiguration; - icmpConfiguration?: ConnectionMonitorIcmpConfiguration; - name: string; - preferredIPVersion?: PreferredIPVersion; - protocol: ConnectionMonitorTestConfigurationProtocol; - successThreshold?: ConnectionMonitorSuccessThreshold; - tcpConfiguration?: ConnectionMonitorTcpConfiguration; - testFrequencySec?: number; -} - -// @public -export type ConnectionMonitorTestConfigurationProtocol = string; - -// @public -export interface ConnectionMonitorTestGroup { - destinations: string[]; - disable?: boolean; - name: string; - sources: string[]; - testConfigurations: string[]; -} - -// @public -export type ConnectionMonitorType = string; - -// @public -export interface ConnectionMonitorWorkspaceSettings { - workspaceResourceId?: string; -} - -// @public -export interface ConnectionResetSharedKey { - keyLength: number; -} - -// @public -export interface ConnectionSharedKey extends SubResource { - value: string; -} - -// @public -export interface ConnectionSharedKeyResult extends SubResource { - name?: string; - properties?: SharedKeyProperties; - readonly type?: string; -} - -// @public -export interface ConnectionSharedKeyResultList { - nextLink?: string; - value?: ConnectionSharedKeyResult[]; -} - -// @public -export type ConnectionState = string; - -// @public -export interface ConnectionStateSnapshot { - avgLatencyInMs?: number; - connectionState?: ConnectionState; - endTime?: Date; - evaluationState?: EvaluationState; - readonly hops?: ConnectivityHop[]; - maxLatencyInMs?: number; - minLatencyInMs?: number; - probesFailed?: number; - probesSent?: number; - startTime?: Date; -} - -// @public -export type ConnectionStatus = string; - -// @public -export interface ConnectivityConfiguration extends ChildResource { - appliesToGroups?: ConnectivityGroupItem[]; - connectivityCapabilities?: ConnectivityConfigurationPropertiesConnectivityCapabilities; - connectivityTopology?: ConnectivityTopology; - deleteExistingPeering?: DeleteExistingPeering; - description?: string; - hubs?: Hub[]; - isGlobal?: IsGlobal; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly systemData?: SystemData; -} - -// @public -export interface ConnectivityConfigurationListResult { - nextLink?: string; - value?: ConnectivityConfiguration[]; -} - -// @public -export interface ConnectivityConfigurationPropertiesConnectivityCapabilities { - connectedGroupAddressOverlap: ConnectedGroupAddressOverlap; - connectedGroupPrivateEndpointsScale: ConnectedGroupPrivateEndpointsScale; - peeringEnforcement: PeeringEnforcement; -} - -// @public -export interface ConnectivityConfigurations { - beginDelete(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: ConnectivityConfigurationsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: ConnectivityConfigurationsDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, configurationName: string, connectivityConfiguration: ConnectivityConfiguration, options?: ConnectivityConfigurationsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: ConnectivityConfigurationsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, options?: ConnectivityConfigurationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ConnectivityConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ConnectivityConfigurationsCreateOrUpdateResponse = ConnectivityConfiguration; - -// @public -export interface ConnectivityConfigurationsDeleteHeaders { - location?: string; -} - -// @public -export interface ConnectivityConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ConnectivityConfigurationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ConnectivityConfigurationsGetResponse = ConnectivityConfiguration; - -// @public -export interface ConnectivityConfigurationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ConnectivityConfigurationsListNextResponse = ConnectivityConfigurationListResult; - -// @public -export interface ConnectivityConfigurationsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type ConnectivityConfigurationsListResponse = ConnectivityConfigurationListResult; - -// @public -export interface ConnectivityDestination { - address?: string; - port?: number; - resourceId?: string; -} - -// @public -export interface ConnectivityGroupItem { - groupConnectivity: GroupConnectivity; - isGlobal?: IsGlobal; - networkGroupId: string; - useHubGateway?: UseHubGateway; -} - -// @public -export interface ConnectivityHop { - readonly address?: string; - readonly id?: string; - readonly issues?: ConnectivityIssue[]; - readonly links?: HopLink[]; - readonly nextHopIds?: string[]; - readonly previousHopIds?: string[]; - readonly previousLinks?: HopLink[]; - readonly resourceId?: string; - readonly type?: string; -} - -// @public -export interface ConnectivityInformation { - readonly avgLatencyInMs?: number; - readonly connectionStatus?: ConnectionStatus; - readonly hops?: ConnectivityHop[]; - readonly maxLatencyInMs?: number; - readonly minLatencyInMs?: number; - readonly probesFailed?: number; - readonly probesSent?: number; -} - -// @public -export interface ConnectivityIssue { - readonly context?: { - [propertyName: string]: string; - }[]; - readonly origin?: Origin; - readonly severity?: Severity; - readonly type?: IssueType; -} - -// @public -export interface ConnectivityParameters { - destination: ConnectivityDestination; - preferredIPVersion?: IPVersion; - protocol?: Protocol; - protocolConfiguration?: ProtocolConfiguration; - source: ConnectivitySource; -} - -// @public -export interface ConnectivitySource { - port?: number; - resourceId: string; -} - -// @public -export type ConnectivityTopology = string; - -// @public -export interface Container extends SubResource { -} - -// @public -export interface ContainerNetworkInterface extends SubResource { - container?: Container; - readonly containerNetworkInterfaceConfiguration?: ContainerNetworkInterfaceConfiguration; - readonly etag?: string; - readonly ipConfigurations?: ContainerNetworkInterfaceIpConfiguration[]; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ContainerNetworkInterfaceConfiguration extends SubResource { - containerNetworkInterfaces?: SubResource[]; - readonly etag?: string; - ipConfigurations?: IPConfigurationProfile[]; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ContainerNetworkInterfaceIpConfiguration { - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export type CoverageLevel = string; - -// @public -export type CreatedByType = string; - -// @public -export interface Criterion { - asPath?: string[]; - community?: string[]; - matchCondition?: RouteMapMatchCondition; - routePrefix?: string[]; -} - -// @public -export interface CrossTenantScopes { - readonly managementGroups?: string[]; - readonly subscriptions?: string[]; - readonly tenantId?: string; -} - -// @public -export interface CustomDnsConfigPropertiesFormat { - fqdn?: string; - ipAddresses?: string[]; -} - -// @public -export interface CustomIpPrefix extends Resource { - asn?: string; - authorizationMessage?: string; - readonly childCustomIpPrefixes?: SubResource[]; - cidr?: string; - commissionedState?: CommissionedState; - customIpPrefixParent?: SubResource; - readonly etag?: string; - expressRouteAdvertise?: boolean; - extendedLocation?: ExtendedLocation; - readonly failedReason?: string; - geo?: Geo; - noInternetAdvertise?: boolean; - prefixType?: CustomIpPrefixType; - readonly provisioningState?: ProvisioningState; - readonly publicIpPrefixes?: SubResource[]; - readonly resourceGuid?: string; - signedMessage?: string; - zones?: string[]; -} - -// @public -export interface CustomIPPrefixes { - beginCreateOrUpdate(resourceGroupName: string, customIpPrefixName: string, parameters: CustomIpPrefix, options?: CustomIPPrefixesCreateOrUpdateOptionalParams): Promise, CustomIPPrefixesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, customIpPrefixName: string, parameters: CustomIpPrefix, options?: CustomIPPrefixesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, customIpPrefixName: string, options?: CustomIPPrefixesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, customIpPrefixName: string, options?: CustomIPPrefixesDeleteOptionalParams): Promise; - get(resourceGroupName: string, customIpPrefixName: string, options?: CustomIPPrefixesGetOptionalParams): Promise; - list(resourceGroupName: string, options?: CustomIPPrefixesListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: CustomIPPrefixesListAllOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, customIpPrefixName: string, parameters: TagsObject, options?: CustomIPPrefixesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface CustomIPPrefixesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type CustomIPPrefixesCreateOrUpdateResponse = CustomIpPrefix; - -// @public -export interface CustomIPPrefixesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface CustomIPPrefixesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type CustomIPPrefixesGetResponse = CustomIpPrefix; - -// @public -export interface CustomIPPrefixesListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CustomIPPrefixesListAllNextResponse = CustomIpPrefixListResult; - -// @public -export interface CustomIPPrefixesListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CustomIPPrefixesListAllResponse = CustomIpPrefixListResult; - -// @public -export interface CustomIPPrefixesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CustomIPPrefixesListNextResponse = CustomIpPrefixListResult; - -// @public -export interface CustomIPPrefixesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CustomIPPrefixesListResponse = CustomIpPrefixListResult; - -// @public -export interface CustomIPPrefixesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CustomIPPrefixesUpdateTagsResponse = CustomIpPrefix; - -// @public -export interface CustomIpPrefixListResult { - nextLink?: string; - value?: CustomIpPrefix[]; -} - -// @public -export type CustomIpPrefixType = string; - -// @public -export interface DdosCustomPolicies { - beginCreateOrUpdate(resourceGroupName: string, ddosCustomPolicyName: string, parameters: DdosCustomPolicy, options?: DdosCustomPoliciesCreateOrUpdateOptionalParams): Promise, DdosCustomPoliciesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, ddosCustomPolicyName: string, parameters: DdosCustomPolicy, options?: DdosCustomPoliciesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, ddosCustomPolicyName: string, options?: DdosCustomPoliciesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, ddosCustomPolicyName: string, options?: DdosCustomPoliciesDeleteOptionalParams): Promise; - get(resourceGroupName: string, ddosCustomPolicyName: string, options?: DdosCustomPoliciesGetOptionalParams): Promise; - updateTags(resourceGroupName: string, ddosCustomPolicyName: string, parameters: TagsObject, options?: DdosCustomPoliciesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface DdosCustomPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type DdosCustomPoliciesCreateOrUpdateResponse = DdosCustomPolicy; - -// @public -export interface DdosCustomPoliciesDeleteHeaders { - location?: string; -} - -// @public -export interface DdosCustomPoliciesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface DdosCustomPoliciesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DdosCustomPoliciesGetResponse = DdosCustomPolicy; - -// @public -export interface DdosCustomPoliciesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DdosCustomPoliciesUpdateTagsResponse = DdosCustomPolicy; - -// @public -export interface DdosCustomPolicy extends Resource { - detectionRules?: DdosDetectionRule[]; - readonly etag?: string; - frontEndIpConfiguration?: SubResource[]; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; -} - -// @public -export type DdosDetectionMode = string; - -// @public -export interface DdosDetectionRule extends SubResource { - detectionMode?: DdosDetectionMode; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - trafficDetectionRule?: TrafficDetectionRule; - readonly type?: string; -} - -// @public -export interface DdosProtectionPlan { - readonly etag?: string; - readonly id?: string; - location?: string; - readonly name?: string; - readonly provisioningState?: ProvisioningState; - readonly publicIPAddresses?: SubResource[]; - readonly resourceGuid?: string; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; - readonly virtualNetworks?: SubResource[]; -} - -// @public -export interface DdosProtectionPlanListResult { - readonly nextLink?: string; - value?: DdosProtectionPlan[]; -} - -// @public -export interface DdosProtectionPlans { - beginCreateOrUpdate(resourceGroupName: string, ddosProtectionPlanName: string, parameters: DdosProtectionPlan, options?: DdosProtectionPlansCreateOrUpdateOptionalParams): Promise, DdosProtectionPlansCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, ddosProtectionPlanName: string, parameters: DdosProtectionPlan, options?: DdosProtectionPlansCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, ddosProtectionPlanName: string, options?: DdosProtectionPlansDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, ddosProtectionPlanName: string, options?: DdosProtectionPlansDeleteOptionalParams): Promise; - get(resourceGroupName: string, ddosProtectionPlanName: string, options?: DdosProtectionPlansGetOptionalParams): Promise; - list(options?: DdosProtectionPlansListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: DdosProtectionPlansListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, ddosProtectionPlanName: string, parameters: TagsObject, options?: DdosProtectionPlansUpdateTagsOptionalParams): Promise; -} - -// @public -export interface DdosProtectionPlansCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type DdosProtectionPlansCreateOrUpdateResponse = DdosProtectionPlan; - -// @public -export interface DdosProtectionPlansDeleteHeaders { - location?: string; -} - -// @public -export interface DdosProtectionPlansDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface DdosProtectionPlansGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DdosProtectionPlansGetResponse = DdosProtectionPlan; - -// @public -export interface DdosProtectionPlansListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DdosProtectionPlansListByResourceGroupNextResponse = DdosProtectionPlanListResult; - -// @public -export interface DdosProtectionPlansListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DdosProtectionPlansListByResourceGroupResponse = DdosProtectionPlanListResult; - -// @public -export interface DdosProtectionPlansListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DdosProtectionPlansListNextResponse = DdosProtectionPlanListResult; - -// @public -export interface DdosProtectionPlansListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DdosProtectionPlansListResponse = DdosProtectionPlanListResult; - -// @public -export interface DdosProtectionPlansUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DdosProtectionPlansUpdateTagsResponse = DdosProtectionPlan; - -// @public -export interface DdosSettings { - ddosProtectionPlan?: SubResource; - protectionMode?: DdosSettingsProtectionMode; -} - -// @public -export type DdosSettingsProtectionMode = string; - -// @public -export type DdosTrafficType = string; - -// @public -export interface DefaultAdminRule extends BaseAdminRule { - readonly access?: SecurityConfigurationRuleAccess; - readonly description?: string; - readonly destinationPortRanges?: string[]; - readonly destinations?: AddressPrefixItem[]; - readonly direction?: SecurityConfigurationRuleDirection; - flag?: string; - kind: "Default"; - readonly priority?: number; - readonly protocol?: SecurityConfigurationRuleProtocol; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly sourcePortRanges?: string[]; - readonly sources?: AddressPrefixItem[]; -} - -// @public -export interface DefaultSecurityRules { - get(resourceGroupName: string, networkSecurityGroupName: string, defaultSecurityRuleName: string, options?: DefaultSecurityRulesGetOptionalParams): Promise; - list(resourceGroupName: string, networkSecurityGroupName: string, options?: DefaultSecurityRulesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface DefaultSecurityRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DefaultSecurityRulesGetResponse = SecurityRule; - -// @public -export interface DefaultSecurityRulesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DefaultSecurityRulesListNextResponse = SecurityRuleListResult; - -// @public -export interface DefaultSecurityRulesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DefaultSecurityRulesListResponse = SecurityRuleListResult; - -// @public -export interface Delegation extends SubResource { - readonly actions?: string[]; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - serviceName?: string; - type?: string; -} - -// @public -export interface DelegationProperties { - readonly provisioningState?: ProvisioningState; - serviceName?: string; -} - -// @public -export interface DeleteBastionShareableLinkByTokenOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type DeleteBastionShareableLinkByTokenResponse = NetworkManagementClientDeleteBastionShareableLinkByTokenHeaders; - -// @public -export interface DeleteBastionShareableLinkOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type DeleteExistingPeering = string; - -// @public -export type DeleteOptions = string; - -// @public -export type DeploymentStatus = string; - -// @public -export type DestinationPortBehavior = string; - -// @public -export interface DeviceProperties { - deviceModel?: string; - deviceVendor?: string; - linkSpeedInMbps?: number; -} - -// @public -export interface DhcpOptions { - dnsServers?: string[]; -} - -// @public -export type DhGroup = string; - -// @public -export interface Dimension { - displayName?: string; - internalName?: string; - name?: string; -} - -// @public -export type Direction = string; - -// @public -export type DisableBgpRoutePropagation = string; - -// @public -export interface DisassociateCloudServicePublicIpRequest { - publicIpArmId: string; -} - -// @public -export interface DisconnectActiveSessionsNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DisconnectActiveSessionsNextResponse = BastionSessionDeleteResult; - -// @public -export interface DisconnectActiveSessionsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DisconnectActiveSessionsResponse = BastionSessionDeleteResult; - -// @public -export interface DnsNameAvailabilityResult { - available?: boolean; -} - -// @public -export interface DnsSettings { - enableProxy?: boolean; - requireProxyForNetworkRules?: boolean; - servers?: string[]; -} - -// @public -export interface DscpConfiguration extends Resource { - readonly associatedNetworkInterfaces?: NetworkInterface[]; - destinationIpRanges?: QosIpRange[]; - destinationPortRanges?: QosPortRange[]; - readonly etag?: string; - markings?: number[]; - protocol?: ProtocolType; - readonly provisioningState?: ProvisioningState; - readonly qosCollectionId?: string; - qosDefinitionCollection?: QosDefinition[]; - readonly resourceGuid?: string; - sourceIpRanges?: QosIpRange[]; - sourcePortRanges?: QosPortRange[]; -} - -// @public -export interface DscpConfigurationCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type DscpConfigurationCreateOrUpdateResponse = DscpConfiguration; - -// @public -export interface DscpConfigurationDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface DscpConfigurationGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DscpConfigurationGetResponse = DscpConfiguration; - -// @public -export interface DscpConfigurationListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DscpConfigurationListAllNextResponse = DscpConfigurationListResult; - -// @public -export interface DscpConfigurationListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DscpConfigurationListAllResponse = DscpConfigurationListResult; - -// @public -export interface DscpConfigurationListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DscpConfigurationListNextResponse = DscpConfigurationListResult; - -// @public -export interface DscpConfigurationListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DscpConfigurationListResponse = DscpConfigurationListResult; - -// @public -export interface DscpConfigurationListResult { - readonly nextLink?: string; - value?: DscpConfiguration[]; -} - -// @public -export interface DscpConfigurationOperations { - beginCreateOrUpdate(resourceGroupName: string, dscpConfigurationName: string, parameters: DscpConfiguration, options?: DscpConfigurationCreateOrUpdateOptionalParams): Promise, DscpConfigurationCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, dscpConfigurationName: string, parameters: DscpConfiguration, options?: DscpConfigurationCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, dscpConfigurationName: string, options?: DscpConfigurationDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, dscpConfigurationName: string, options?: DscpConfigurationDeleteOptionalParams): Promise; - get(resourceGroupName: string, dscpConfigurationName: string, options?: DscpConfigurationGetOptionalParams): Promise; - list(resourceGroupName: string, options?: DscpConfigurationListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: DscpConfigurationListAllOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export type EffectiveAdminRuleKind = string; - -// @public -export interface EffectiveBaseSecurityAdminRule { - configurationDescription?: string; - id?: string; - kind: "Custom" | "Default"; - ruleCollectionAppliesToGroups?: NetworkManagerSecurityGroupItem[]; - ruleCollectionDescription?: string; - ruleGroups?: ConfigurationGroup[]; -} - -// @public (undocumented) -export type EffectiveBaseSecurityAdminRuleUnion = EffectiveBaseSecurityAdminRule | EffectiveSecurityAdminRule | EffectiveDefaultSecurityAdminRule; - -// @public -export interface EffectiveConnectivityConfiguration { - appliesToGroups?: ConnectivityGroupItem[]; - configurationGroups?: ConfigurationGroup[]; - connectivityCapabilities?: ConnectivityConfigurationPropertiesConnectivityCapabilities; - connectivityTopology?: ConnectivityTopology; - deleteExistingPeering?: DeleteExistingPeering; - description?: string; - hubs?: Hub[]; - id?: string; - isGlobal?: IsGlobal; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; -} - -// @public -export interface EffectiveDefaultSecurityAdminRule extends EffectiveBaseSecurityAdminRule { - readonly access?: SecurityConfigurationRuleAccess; - readonly description?: string; - readonly destinationPortRanges?: string[]; - readonly destinations?: AddressPrefixItem[]; - readonly direction?: SecurityConfigurationRuleDirection; - flag?: string; - kind: "Default"; - readonly priority?: number; - readonly protocol?: SecurityConfigurationRuleProtocol; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly sourcePortRanges?: string[]; - readonly sources?: AddressPrefixItem[]; -} - -// @public -export interface EffectiveNetworkSecurityGroup { - association?: EffectiveNetworkSecurityGroupAssociation; - effectiveSecurityRules?: EffectiveNetworkSecurityRule[]; - networkSecurityGroup?: SubResource; - tagMap?: string; -} - -// @public -export interface EffectiveNetworkSecurityGroupAssociation { - networkInterface?: SubResource; - networkManager?: SubResource; - subnet?: SubResource; -} - -// @public -export interface EffectiveNetworkSecurityGroupListResult { - readonly nextLink?: string; - value?: EffectiveNetworkSecurityGroup[]; -} - -// @public -export interface EffectiveNetworkSecurityRule { - access?: SecurityRuleAccess; - destinationAddressPrefix?: string; - destinationAddressPrefixes?: string[]; - destinationPortRange?: string; - destinationPortRanges?: string[]; - direction?: SecurityRuleDirection; - expandedDestinationAddressPrefix?: string[]; - expandedSourceAddressPrefix?: string[]; - name?: string; - priority?: number; - protocol?: EffectiveSecurityRuleProtocol; - sourceAddressPrefix?: string; - sourceAddressPrefixes?: string[]; - sourcePortRange?: string; - sourcePortRanges?: string[]; -} - -// @public -export interface EffectiveRoute { - addressPrefix?: string[]; - disableBgpRoutePropagation?: boolean; - name?: string; - nextHopIpAddress?: string[]; - nextHopType?: RouteNextHopType; - source?: EffectiveRouteSource; - state?: EffectiveRouteState; -} - -// @public -export interface EffectiveRouteListResult { - readonly nextLink?: string; - value?: EffectiveRoute[]; -} - -// @public -export interface EffectiveRouteMapRoute { - asPath?: string; - bgpCommunities?: string; - prefix?: string; -} - -// @public -export interface EffectiveRouteMapRouteList { - value?: EffectiveRouteMapRoute[]; -} - -// @public -export type EffectiveRouteSource = string; - -// @public -export interface EffectiveRoutesParameters { - resourceId?: string; - virtualWanResourceType?: string; -} - -// @public -export type EffectiveRouteState = string; - -// @public -export interface EffectiveSecurityAdminRule extends EffectiveBaseSecurityAdminRule { - access?: SecurityConfigurationRuleAccess; - description?: string; - destinationPortRanges?: string[]; - destinations?: AddressPrefixItem[]; - direction?: SecurityConfigurationRuleDirection; - kind: "Custom"; - priority?: number; - protocol?: SecurityConfigurationRuleProtocol; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - sourcePortRanges?: string[]; - sources?: AddressPrefixItem[]; -} - -// @public -export type EffectiveSecurityRuleProtocol = string; - -// @public -export interface EndpointServiceResult extends SubResource { - readonly name?: string; - readonly type?: string; -} - -// @public -export interface EndpointServicesListResult { - nextLink?: string; - value?: EndpointServiceResult[]; -} - -// @public -export type EndpointType = string; - -// @public -export interface ErrorAdditionalInfo { - readonly info?: Record; - readonly type?: string; -} - -// @public -export interface ErrorDetail { - readonly additionalInfo?: ErrorAdditionalInfo[]; - readonly code?: string; - readonly details?: ErrorDetail[]; - readonly message?: string; - readonly target?: string; -} - -// @public -export interface ErrorDetails { - code?: string; - message?: string; - target?: string; -} - -// @public -export interface ErrorModel { - code?: string; - details?: ErrorDetails[]; - innerError?: string; - message?: string; - target?: string; -} - -// @public -export interface ErrorResponse { - error?: ErrorDetails; -} - -// @public -export interface EvaluatedNetworkSecurityGroup { - appliedTo?: string; - matchedRule?: MatchedRule; - networkSecurityGroupId?: string; - readonly rulesEvaluationResult?: NetworkSecurityRulesEvaluationResult[]; -} - -// @public -export type EvaluationState = string; - -// @public -export interface ExceptionEntry { - exceptionManagedRuleSets?: ExclusionManagedRuleSet[]; - matchVariable: ExceptionEntryMatchVariable; - selector?: string; - selectorMatchOperator?: ExceptionEntrySelectorMatchOperator; - valueMatchOperator: ExceptionEntryValueMatchOperator; - values?: string[]; -} - -// @public -export type ExceptionEntryMatchVariable = string; - -// @public -export type ExceptionEntrySelectorMatchOperator = string; - -// @public -export type ExceptionEntryValueMatchOperator = string; - -// @public -export interface ExclusionManagedRule { - ruleId: string; -} - -// @public -export interface ExclusionManagedRuleGroup { - ruleGroupName: string; - rules?: ExclusionManagedRule[]; -} - -// @public -export interface ExclusionManagedRuleSet { - ruleGroups?: ExclusionManagedRuleGroup[]; - ruleSetType: string; - ruleSetVersion: string; -} - -// @public -export interface ExplicitProxy { - enableExplicitProxy?: boolean; - enablePacFile?: boolean; - httpPort?: number; - httpsPort?: number; - pacFile?: string; - pacFilePort?: number; -} - -// @public -export interface ExpressRouteCircuit extends Resource { - allowClassicOperations?: boolean; - authorizationKey?: string; - authorizations?: ExpressRouteCircuitAuthorization[]; - readonly authorizationStatus?: string; - bandwidthInGbps?: number; - circuitProvisioningState?: string; - enableDirectPortRateLimit?: boolean; - readonly etag?: string; - expressRoutePort?: SubResource; - gatewayManagerEtag?: string; - globalReachEnabled?: boolean; - peerings?: ExpressRouteCircuitPeering[]; - readonly provisioningState?: ProvisioningState; - serviceKey?: string; - serviceProviderNotes?: string; - serviceProviderProperties?: ExpressRouteCircuitServiceProviderProperties; - serviceProviderProvisioningState?: ServiceProviderProvisioningState; - sku?: ExpressRouteCircuitSku; - readonly stag?: number; -} - -// @public -export interface ExpressRouteCircuitArpTable { - age?: number; - interface?: string; - ipAddress?: string; - macAddress?: string; -} - -// @public -export interface ExpressRouteCircuitAuthorization extends SubResource { - authorizationKey?: string; - authorizationUseStatus?: AuthorizationUseStatus; - readonly connectionResourceUri?: string; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ExpressRouteCircuitAuthorizations { - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: ExpressRouteCircuitAuthorization, options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams): Promise, ExpressRouteCircuitAuthorizationsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: ExpressRouteCircuitAuthorization, options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, circuitName: string, authorizationName: string, options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, circuitName: string, authorizationName: string, options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams): Promise; - get(resourceGroupName: string, circuitName: string, authorizationName: string, options?: ExpressRouteCircuitAuthorizationsGetOptionalParams): Promise; - list(resourceGroupName: string, circuitName: string, options?: ExpressRouteCircuitAuthorizationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCircuitAuthorizationsCreateOrUpdateResponse = ExpressRouteCircuitAuthorization; - -// @public -export interface ExpressRouteCircuitAuthorizationsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ExpressRouteCircuitAuthorizationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitAuthorizationsGetResponse = ExpressRouteCircuitAuthorization; - -// @public -export interface ExpressRouteCircuitAuthorizationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitAuthorizationsListNextResponse = AuthorizationListResult; - -// @public -export interface ExpressRouteCircuitAuthorizationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitAuthorizationsListResponse = AuthorizationListResult; - -// @public -export interface ExpressRouteCircuitConnection extends SubResource { - addressPrefix?: string; - authorizationKey?: string; - readonly circuitConnectionStatus?: CircuitConnectionStatus; - readonly etag?: string; - expressRouteCircuitPeering?: SubResource; - ipv6CircuitConnectionConfig?: Ipv6CircuitConnectionConfig; - name?: string; - peerExpressRouteCircuitPeering?: SubResource; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ExpressRouteCircuitConnectionListResult { - nextLink?: string; - value?: ExpressRouteCircuitConnection[]; -} - -// @public -export interface ExpressRouteCircuitConnections { - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams): Promise, ExpressRouteCircuitConnectionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options?: ExpressRouteCircuitConnectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options?: ExpressRouteCircuitConnectionsDeleteOptionalParams): Promise; - get(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options?: ExpressRouteCircuitConnectionsGetOptionalParams): Promise; - list(resourceGroupName: string, circuitName: string, peeringName: string, options?: ExpressRouteCircuitConnectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCircuitConnectionsCreateOrUpdateResponse = ExpressRouteCircuitConnection; - -// @public -export interface ExpressRouteCircuitConnectionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ExpressRouteCircuitConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitConnectionsGetResponse = ExpressRouteCircuitConnection; - -// @public -export interface ExpressRouteCircuitConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitConnectionsListNextResponse = ExpressRouteCircuitConnectionListResult; - -// @public -export interface ExpressRouteCircuitConnectionsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitConnectionsListResponse = ExpressRouteCircuitConnectionListResult; - -// @public -export interface ExpressRouteCircuitListResult { - nextLink?: string; - value?: ExpressRouteCircuit[]; -} - -// @public -export interface ExpressRouteCircuitPeering extends SubResource { - azureASN?: number; - connections?: ExpressRouteCircuitConnection[]; - readonly etag?: string; - expressRouteConnection?: ExpressRouteConnectionId; - gatewayManagerEtag?: string; - ipv6PeeringConfig?: Ipv6ExpressRouteCircuitPeeringConfig; - readonly lastModifiedBy?: string; - microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; - name?: string; - peerASN?: number; - readonly peeredConnections?: PeerExpressRouteCircuitConnection[]; - peeringType?: ExpressRoutePeeringType; - primaryAzurePort?: string; - primaryPeerAddressPrefix?: string; - readonly provisioningState?: ProvisioningState; - routeFilter?: SubResource; - secondaryAzurePort?: string; - secondaryPeerAddressPrefix?: string; - sharedKey?: string; - state?: ExpressRoutePeeringState; - stats?: ExpressRouteCircuitStats; - readonly type?: string; - vlanId?: number; -} - -// @public -export type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = string; - -// @public -export interface ExpressRouteCircuitPeeringConfig { - advertisedCommunities?: string[]; - advertisedPublicPrefixes?: string[]; - readonly advertisedPublicPrefixesState?: ExpressRouteCircuitPeeringAdvertisedPublicPrefixState; - advertisedPublicPrefixInfo?: AdvertisedPublicPrefixProperties[]; - customerASN?: number; - legacyMode?: number; - routingRegistryName?: string; -} - -// @public -export interface ExpressRouteCircuitPeeringId { - id?: string; -} - -// @public -export interface ExpressRouteCircuitPeeringListResult { - nextLink?: string; - value?: ExpressRouteCircuitPeering[]; -} - -// @public -export interface ExpressRouteCircuitPeerings { - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: ExpressRouteCircuitPeering, options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams): Promise, ExpressRouteCircuitPeeringsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: ExpressRouteCircuitPeering, options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, circuitName: string, peeringName: string, options?: ExpressRouteCircuitPeeringsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, circuitName: string, peeringName: string, options?: ExpressRouteCircuitPeeringsDeleteOptionalParams): Promise; - get(resourceGroupName: string, circuitName: string, peeringName: string, options?: ExpressRouteCircuitPeeringsGetOptionalParams): Promise; - list(resourceGroupName: string, circuitName: string, options?: ExpressRouteCircuitPeeringsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCircuitPeeringsCreateOrUpdateResponse = ExpressRouteCircuitPeering; - -// @public -export interface ExpressRouteCircuitPeeringsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ExpressRouteCircuitPeeringsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitPeeringsGetResponse = ExpressRouteCircuitPeering; - -// @public -export interface ExpressRouteCircuitPeeringsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitPeeringsListNextResponse = ExpressRouteCircuitPeeringListResult; - -// @public -export interface ExpressRouteCircuitPeeringsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitPeeringsListResponse = ExpressRouteCircuitPeeringListResult; - -// @public -export type ExpressRouteCircuitPeeringState = string; - -// @public -export interface ExpressRouteCircuitReference { - id?: string; -} - -// @public -export interface ExpressRouteCircuitRoutesTable { - locPrf?: string; - network?: string; - nextHop?: string; - path?: string; - weight?: number; -} - -// @public -export interface ExpressRouteCircuitRoutesTableSummary { - as?: number; - neighbor?: string; - statePfxRcd?: string; - upDown?: string; - v?: number; -} - -// @public -export interface ExpressRouteCircuits { - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, parameters: ExpressRouteCircuit, options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams): Promise, ExpressRouteCircuitsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, circuitName: string, parameters: ExpressRouteCircuit, options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, circuitName: string, options?: ExpressRouteCircuitsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, circuitName: string, options?: ExpressRouteCircuitsDeleteOptionalParams): Promise; - beginListArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: ExpressRouteCircuitsListArpTableOptionalParams): Promise, ExpressRouteCircuitsListArpTableResponse>>; - beginListArpTableAndWait(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: ExpressRouteCircuitsListArpTableOptionalParams): Promise; - beginListRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: ExpressRouteCircuitsListRoutesTableOptionalParams): Promise, ExpressRouteCircuitsListRoutesTableResponse>>; - beginListRoutesTableAndWait(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: ExpressRouteCircuitsListRoutesTableOptionalParams): Promise; - beginListRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams): Promise, ExpressRouteCircuitsListRoutesTableSummaryResponse>>; - beginListRoutesTableSummaryAndWait(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams): Promise; - get(resourceGroupName: string, circuitName: string, options?: ExpressRouteCircuitsGetOptionalParams): Promise; - getPeeringStats(resourceGroupName: string, circuitName: string, peeringName: string, options?: ExpressRouteCircuitsGetPeeringStatsOptionalParams): Promise; - getStats(resourceGroupName: string, circuitName: string, options?: ExpressRouteCircuitsGetStatsOptionalParams): Promise; - list(resourceGroupName: string, options?: ExpressRouteCircuitsListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: ExpressRouteCircuitsListAllOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, circuitName: string, parameters: TagsObject, options?: ExpressRouteCircuitsUpdateTagsOptionalParams): Promise; -} - -// @public -export interface ExpressRouteCircuitsArpTableListResult { - nextLink?: string; - value?: ExpressRouteCircuitArpTable[]; -} - -// @public -export interface ExpressRouteCircuitsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCircuitsCreateOrUpdateResponse = ExpressRouteCircuit; - -// @public -export interface ExpressRouteCircuitsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ExpressRouteCircuitServiceProviderProperties { - bandwidthInMbps?: number; - peeringLocation?: string; - serviceProviderName?: string; -} - -// @public -export interface ExpressRouteCircuitsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ExpressRouteCircuitsGetPeeringStatsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitsGetPeeringStatsResponse = ExpressRouteCircuitStats; - -// @public -export type ExpressRouteCircuitsGetResponse = ExpressRouteCircuit; - -// @public -export interface ExpressRouteCircuitsGetStatsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitsGetStatsResponse = ExpressRouteCircuitStats; - -// @public -export interface ExpressRouteCircuitSku { - family?: ExpressRouteCircuitSkuFamily; - name?: string; - tier?: ExpressRouteCircuitSkuTier; -} - -// @public -export type ExpressRouteCircuitSkuFamily = string; - -// @public -export type ExpressRouteCircuitSkuTier = string; - -// @public -export interface ExpressRouteCircuitsListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitsListAllNextResponse = ExpressRouteCircuitListResult; - -// @public -export interface ExpressRouteCircuitsListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitsListAllResponse = ExpressRouteCircuitListResult; - -// @public -export interface ExpressRouteCircuitsListArpTableOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCircuitsListArpTableResponse = ExpressRouteCircuitsArpTableListResult; - -// @public -export interface ExpressRouteCircuitsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitsListNextResponse = ExpressRouteCircuitListResult; - -// @public -export interface ExpressRouteCircuitsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitsListResponse = ExpressRouteCircuitListResult; - -// @public -export interface ExpressRouteCircuitsListRoutesTableOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCircuitsListRoutesTableResponse = ExpressRouteCircuitsRoutesTableListResult; - -// @public -export interface ExpressRouteCircuitsListRoutesTableSummaryOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCircuitsListRoutesTableSummaryResponse = ExpressRouteCircuitsRoutesTableSummaryListResult; - -// @public -export interface ExpressRouteCircuitsRoutesTableListResult { - nextLink?: string; - value?: ExpressRouteCircuitRoutesTable[]; -} - -// @public -export interface ExpressRouteCircuitsRoutesTableSummaryListResult { - nextLink?: string; - value?: ExpressRouteCircuitRoutesTableSummary[]; -} - -// @public -export interface ExpressRouteCircuitStats { - primarybytesIn?: number; - primarybytesOut?: number; - secondarybytesIn?: number; - secondarybytesOut?: number; -} - -// @public -export interface ExpressRouteCircuitsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCircuitsUpdateTagsResponse = ExpressRouteCircuit; - -// @public -export interface ExpressRouteConnection extends SubResource { - authorizationKey?: string; - enableInternetSecurity?: boolean; - enablePrivateLinkFastPath?: boolean; - expressRouteCircuitPeering?: ExpressRouteCircuitPeeringId; - expressRouteGatewayBypass?: boolean; - name: string; - readonly provisioningState?: ProvisioningState; - routingConfiguration?: RoutingConfiguration; - routingWeight?: number; -} - -// @public -export interface ExpressRouteConnectionId { - readonly id?: string; -} - -// @public -export interface ExpressRouteConnectionList { - value?: ExpressRouteConnection[]; -} - -// @public -export interface ExpressRouteConnections { - beginCreateOrUpdate(resourceGroupName: string, expressRouteGatewayName: string, connectionName: string, putExpressRouteConnectionParameters: ExpressRouteConnection, options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams): Promise, ExpressRouteConnectionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, expressRouteGatewayName: string, connectionName: string, putExpressRouteConnectionParameters: ExpressRouteConnection, options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, expressRouteGatewayName: string, connectionName: string, options?: ExpressRouteConnectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, expressRouteGatewayName: string, connectionName: string, options?: ExpressRouteConnectionsDeleteOptionalParams): Promise; - get(resourceGroupName: string, expressRouteGatewayName: string, connectionName: string, options?: ExpressRouteConnectionsGetOptionalParams): Promise; - list(resourceGroupName: string, expressRouteGatewayName: string, options?: ExpressRouteConnectionsListOptionalParams): Promise; -} - -// @public -export interface ExpressRouteConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteConnectionsCreateOrUpdateResponse = ExpressRouteConnection; - -// @public -export interface ExpressRouteConnectionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ExpressRouteConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteConnectionsGetResponse = ExpressRouteConnection; - -// @public -export interface ExpressRouteConnectionsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteConnectionsListResponse = ExpressRouteConnectionList; - -// @public -export interface ExpressRouteCrossConnection extends Resource { - readonly bandwidthInMbps?: number; - readonly etag?: string; - expressRouteCircuit?: ExpressRouteCircuitReference; - readonly peeringLocation?: string; - peerings?: ExpressRouteCrossConnectionPeering[]; - readonly primaryAzurePort?: string; - readonly provisioningState?: ProvisioningState; - readonly secondaryAzurePort?: string; - serviceProviderNotes?: string; - serviceProviderProvisioningState?: ServiceProviderProvisioningState; - readonly sTag?: number; -} - -// @public -export interface ExpressRouteCrossConnectionListResult { - readonly nextLink?: string; - value?: ExpressRouteCrossConnection[]; -} - -// @public -export interface ExpressRouteCrossConnectionPeering extends SubResource { - readonly azureASN?: number; - readonly etag?: string; - gatewayManagerEtag?: string; - ipv6PeeringConfig?: Ipv6ExpressRouteCircuitPeeringConfig; - readonly lastModifiedBy?: string; - microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; - name?: string; - peerASN?: number; - peeringType?: ExpressRoutePeeringType; - readonly primaryAzurePort?: string; - primaryPeerAddressPrefix?: string; - readonly provisioningState?: ProvisioningState; - readonly secondaryAzurePort?: string; - secondaryPeerAddressPrefix?: string; - sharedKey?: string; - state?: ExpressRoutePeeringState; - vlanId?: number; -} - -// @public -export interface ExpressRouteCrossConnectionPeeringList { - readonly nextLink?: string; - value?: ExpressRouteCrossConnectionPeering[]; -} - -// @public -export interface ExpressRouteCrossConnectionPeerings { - beginCreateOrUpdate(resourceGroupName: string, crossConnectionName: string, peeringName: string, peeringParameters: ExpressRouteCrossConnectionPeering, options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams): Promise, ExpressRouteCrossConnectionPeeringsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, crossConnectionName: string, peeringName: string, peeringParameters: ExpressRouteCrossConnectionPeering, options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, crossConnectionName: string, peeringName: string, options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, crossConnectionName: string, peeringName: string, options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams): Promise; - get(resourceGroupName: string, crossConnectionName: string, peeringName: string, options?: ExpressRouteCrossConnectionPeeringsGetOptionalParams): Promise; - list(resourceGroupName: string, crossConnectionName: string, options?: ExpressRouteCrossConnectionPeeringsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCrossConnectionPeeringsCreateOrUpdateResponse = ExpressRouteCrossConnectionPeering; - -// @public -export interface ExpressRouteCrossConnectionPeeringsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ExpressRouteCrossConnectionPeeringsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCrossConnectionPeeringsGetResponse = ExpressRouteCrossConnectionPeering; - -// @public -export interface ExpressRouteCrossConnectionPeeringsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCrossConnectionPeeringsListNextResponse = ExpressRouteCrossConnectionPeeringList; - -// @public -export interface ExpressRouteCrossConnectionPeeringsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCrossConnectionPeeringsListResponse = ExpressRouteCrossConnectionPeeringList; - -// @public -export interface ExpressRouteCrossConnectionRoutesTableSummary { - asn?: number; - neighbor?: string; - stateOrPrefixesReceived?: string; - upDown?: string; -} - -// @public -export interface ExpressRouteCrossConnections { - beginCreateOrUpdate(resourceGroupName: string, crossConnectionName: string, parameters: ExpressRouteCrossConnection, options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams): Promise, ExpressRouteCrossConnectionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, crossConnectionName: string, parameters: ExpressRouteCrossConnection, options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams): Promise; - beginListArpTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: ExpressRouteCrossConnectionsListArpTableOptionalParams): Promise, ExpressRouteCrossConnectionsListArpTableResponse>>; - beginListArpTableAndWait(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: ExpressRouteCrossConnectionsListArpTableOptionalParams): Promise; - beginListRoutesTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams): Promise, ExpressRouteCrossConnectionsListRoutesTableResponse>>; - beginListRoutesTableAndWait(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams): Promise; - beginListRoutesTableSummary(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams): Promise, ExpressRouteCrossConnectionsListRoutesTableSummaryResponse>>; - beginListRoutesTableSummaryAndWait(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams): Promise; - get(resourceGroupName: string, crossConnectionName: string, options?: ExpressRouteCrossConnectionsGetOptionalParams): Promise; - list(options?: ExpressRouteCrossConnectionsListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: ExpressRouteCrossConnectionsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, crossConnectionName: string, crossConnectionParameters: TagsObject, options?: ExpressRouteCrossConnectionsUpdateTagsOptionalParams): Promise; -} - -// @public -export interface ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCrossConnectionsCreateOrUpdateResponse = ExpressRouteCrossConnection; - -// @public -export interface ExpressRouteCrossConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCrossConnectionsGetResponse = ExpressRouteCrossConnection; - -// @public -export interface ExpressRouteCrossConnectionsListArpTableOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCrossConnectionsListArpTableResponse = ExpressRouteCircuitsArpTableListResult; - -// @public -export interface ExpressRouteCrossConnectionsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCrossConnectionsListByResourceGroupNextResponse = ExpressRouteCrossConnectionListResult; - -// @public -export interface ExpressRouteCrossConnectionsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCrossConnectionsListByResourceGroupResponse = ExpressRouteCrossConnectionListResult; - -// @public -export interface ExpressRouteCrossConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCrossConnectionsListNextResponse = ExpressRouteCrossConnectionListResult; - -// @public -export interface ExpressRouteCrossConnectionsListOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ExpressRouteCrossConnectionsListResponse = ExpressRouteCrossConnectionListResult; - -// @public -export interface ExpressRouteCrossConnectionsListRoutesTableOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCrossConnectionsListRoutesTableResponse = ExpressRouteCircuitsRoutesTableListResult; - -// @public -export interface ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteCrossConnectionsListRoutesTableSummaryResponse = ExpressRouteCrossConnectionsRoutesTableSummaryListResult; - -// @public -export interface ExpressRouteCrossConnectionsRoutesTableSummaryListResult { - readonly nextLink?: string; - value?: ExpressRouteCrossConnectionRoutesTableSummary[]; -} - -// @public -export interface ExpressRouteCrossConnectionsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteCrossConnectionsUpdateTagsResponse = ExpressRouteCrossConnection; - -// @public (undocumented) -export interface ExpressRouteFailoverCircuitResourceDetails { - connectionName?: string; - name?: string; - nrpResourceUri?: string; -} - -// @public (undocumented) -export interface ExpressRouteFailoverConnectionResourceDetails { - lastUpdatedTime?: string; - name?: string; - nrpResourceUri?: string; - status?: FailoverConnectionStatus; -} - -// @public (undocumented) -export interface ExpressRouteFailoverRedundantRoute { - peeringLocations?: string[]; - routes?: string[]; -} - -// @public -export interface ExpressRouteFailoverSingleTestDetails { - endTimeUtc?: string; - failoverConnectionDetails?: FailoverConnectionDetails[]; - nonRedundantRoutes?: string[]; - peeringLocation?: string; - redundantRoutes?: ExpressRouteFailoverRedundantRoute[]; - startTimeUtc?: string; - status?: FailoverTestStatusForSingleTest; - wasSimulationSuccessful?: boolean; -} - -// @public -export interface ExpressRouteFailoverStopApiParameters { - details?: FailoverConnectionDetails[]; - peeringLocation?: string; - wasSimulationSuccessful?: boolean; -} - -// @public -export interface ExpressRouteFailoverTestDetails { - circuits?: ExpressRouteFailoverCircuitResourceDetails[]; - connections?: ExpressRouteFailoverConnectionResourceDetails[]; - endTime?: string; - issues?: string[]; - peeringLocation?: string; - startTime?: string; - status?: FailoverTestStatus; - testGuid?: string; - testType?: FailoverTestType; -} - -// @public -export interface ExpressRouteGateway extends Resource { - allowNonVirtualWanTraffic?: boolean; - autoScaleConfiguration?: ExpressRouteGatewayPropertiesAutoScaleConfiguration; - readonly etag?: string; - expressRouteConnections?: ExpressRouteConnection[]; - readonly provisioningState?: ProvisioningState; - virtualHub?: VirtualHubId; -} - -// @public -export interface ExpressRouteGatewayList { - value?: ExpressRouteGateway[]; -} - -// @public -export interface ExpressRouteGatewayPropertiesAutoScaleConfiguration { - bounds?: ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds; -} - -// @public -export interface ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds { - max?: number; - min?: number; -} - -// @public -export interface ExpressRouteGateways { - beginCreateOrUpdate(resourceGroupName: string, expressRouteGatewayName: string, putExpressRouteGatewayParameters: ExpressRouteGateway, options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams): Promise, ExpressRouteGatewaysCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, expressRouteGatewayName: string, putExpressRouteGatewayParameters: ExpressRouteGateway, options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, expressRouteGatewayName: string, options?: ExpressRouteGatewaysDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, expressRouteGatewayName: string, options?: ExpressRouteGatewaysDeleteOptionalParams): Promise; - beginUpdateTags(resourceGroupName: string, expressRouteGatewayName: string, expressRouteGatewayParameters: TagsObject, options?: ExpressRouteGatewaysUpdateTagsOptionalParams): Promise, ExpressRouteGatewaysUpdateTagsResponse>>; - beginUpdateTagsAndWait(resourceGroupName: string, expressRouteGatewayName: string, expressRouteGatewayParameters: TagsObject, options?: ExpressRouteGatewaysUpdateTagsOptionalParams): Promise; - get(resourceGroupName: string, expressRouteGatewayName: string, options?: ExpressRouteGatewaysGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: ExpressRouteGatewaysListByResourceGroupOptionalParams): Promise; - listBySubscription(options?: ExpressRouteGatewaysListBySubscriptionOptionalParams): Promise; -} - -// @public -export interface ExpressRouteGatewaysCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteGatewaysCreateOrUpdateResponse = ExpressRouteGateway; - -// @public -export interface ExpressRouteGatewaysDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ExpressRouteGatewaysGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteGatewaysGetResponse = ExpressRouteGateway; - -// @public -export interface ExpressRouteGatewaysListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteGatewaysListByResourceGroupResponse = ExpressRouteGatewayList; - -// @public -export interface ExpressRouteGatewaysListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteGatewaysListBySubscriptionResponse = ExpressRouteGatewayList; - -// @public -export interface ExpressRouteGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRouteGatewaysUpdateTagsResponse = ExpressRouteGateway; - -// @public -export interface ExpressRouteLink extends SubResource { - adminState?: ExpressRouteLinkAdminState; - readonly coloLocation?: string; - readonly connectorType?: ExpressRouteLinkConnectorType; - readonly etag?: string; - readonly interfaceName?: string; - macSecConfig?: ExpressRouteLinkMacSecConfig; - name?: string; - readonly patchPanelId?: string; - readonly provisioningState?: ProvisioningState; - readonly rackId?: string; - readonly routerName?: string; -} - -// @public -export type ExpressRouteLinkAdminState = string; - -// @public -export type ExpressRouteLinkConnectorType = string; - -// @public -export interface ExpressRouteLinkListResult { - nextLink?: string; - value?: ExpressRouteLink[]; -} - -// @public -export type ExpressRouteLinkMacSecCipher = string; - -// @public -export interface ExpressRouteLinkMacSecConfig { - cakSecretIdentifier?: string; - cipher?: ExpressRouteLinkMacSecCipher; - cknSecretIdentifier?: string; - sciState?: ExpressRouteLinkMacSecSciState; -} - -// @public -export type ExpressRouteLinkMacSecSciState = string; - -// @public -export interface ExpressRouteLinks { - get(resourceGroupName: string, expressRoutePortName: string, linkName: string, options?: ExpressRouteLinksGetOptionalParams): Promise; - list(resourceGroupName: string, expressRoutePortName: string, options?: ExpressRouteLinksListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ExpressRouteLinksGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteLinksGetResponse = ExpressRouteLink; - -// @public -export interface ExpressRouteLinksListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteLinksListNextResponse = ExpressRouteLinkListResult; - -// @public -export interface ExpressRouteLinksListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteLinksListResponse = ExpressRouteLinkListResult; - -// @public -export type ExpressRoutePeeringState = string; - -// @public -export type ExpressRoutePeeringType = string; - -// @public -export interface ExpressRoutePort extends Resource { - readonly allocationDate?: string; - bandwidthInGbps?: number; - billingType?: ExpressRoutePortsBillingType; - readonly circuits?: SubResource[]; - encapsulation?: ExpressRoutePortsEncapsulation; - readonly etag?: string; - readonly etherType?: string; - identity?: ManagedServiceIdentity; - links?: ExpressRouteLink[]; - readonly mtu?: string; - peeringLocation?: string; - readonly provisionedBandwidthInGbps?: number; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; -} - -// @public -export interface ExpressRoutePortAuthorization extends SubResource { - readonly authorizationKey?: string; - readonly authorizationUseStatus?: ExpressRoutePortAuthorizationUseStatus; - readonly circuitResourceUri?: string; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @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 ExpressRoutePortAuthorizationsDeleteHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @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; - value?: ExpressRoutePort[]; -} - -// @public -export interface ExpressRoutePorts { - beginCreateOrUpdate(resourceGroupName: string, expressRoutePortName: string, parameters: ExpressRoutePort, options?: ExpressRoutePortsCreateOrUpdateOptionalParams): Promise, ExpressRoutePortsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, expressRoutePortName: string, parameters: ExpressRoutePort, options?: ExpressRoutePortsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, expressRoutePortName: string, options?: ExpressRoutePortsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, expressRoutePortName: string, options?: ExpressRoutePortsDeleteOptionalParams): Promise; - generateLOA(resourceGroupName: string, expressRoutePortName: string, request: GenerateExpressRoutePortsLOARequest, options?: ExpressRoutePortsGenerateLOAOptionalParams): Promise; - get(resourceGroupName: string, expressRoutePortName: string, options?: ExpressRoutePortsGetOptionalParams): Promise; - list(options?: ExpressRoutePortsListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: ExpressRoutePortsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, expressRoutePortName: string, parameters: TagsObject, options?: ExpressRoutePortsUpdateTagsOptionalParams): Promise; -} - -// @public -export type ExpressRoutePortsBillingType = string; - -// @public -export interface ExpressRoutePortsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRoutePortsCreateOrUpdateResponse = ExpressRoutePort; - -// @public -export interface ExpressRoutePortsDeleteHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface ExpressRoutePortsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ExpressRoutePortsEncapsulation = string; - -// @public -export interface ExpressRoutePortsGenerateLOAOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRoutePortsGenerateLOAResponse = GenerateExpressRoutePortsLOAResult; - -// @public -export interface ExpressRoutePortsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRoutePortsGetResponse = ExpressRoutePort; - -// @public -export interface ExpressRoutePortsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRoutePortsListByResourceGroupNextResponse = ExpressRoutePortListResult; - -// @public -export interface ExpressRoutePortsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRoutePortsListByResourceGroupResponse = ExpressRoutePortListResult; - -// @public -export interface ExpressRoutePortsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRoutePortsListNextResponse = ExpressRoutePortListResult; - -// @public -export interface ExpressRoutePortsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRoutePortsListResponse = ExpressRoutePortListResult; - -// @public -export interface ExpressRoutePortsLocation extends Resource { - readonly address?: string; - availableBandwidths?: ExpressRoutePortsLocationBandwidths[]; - readonly contact?: string; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface ExpressRoutePortsLocationBandwidths { - readonly offerName?: string; - readonly valueInGbps?: number; -} - -// @public -export interface ExpressRoutePortsLocationListResult { - nextLink?: string; - value?: ExpressRoutePortsLocation[]; -} - -// @public -export interface ExpressRoutePortsLocations { - get(locationName: string, options?: ExpressRoutePortsLocationsGetOptionalParams): Promise; - list(options?: ExpressRoutePortsLocationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ExpressRoutePortsLocationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRoutePortsLocationsGetResponse = ExpressRoutePortsLocation; - -// @public -export interface ExpressRoutePortsLocationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRoutePortsLocationsListNextResponse = ExpressRoutePortsLocationListResult; - -// @public -export interface ExpressRoutePortsLocationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRoutePortsLocationsListResponse = ExpressRoutePortsLocationListResult; - -// @public -export interface ExpressRoutePortsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRoutePortsUpdateTagsResponse = ExpressRoutePort; - -// @public -export interface ExpressRouteProviderPort extends Resource { - readonly etag?: string; - overprovisionFactor?: number; - peeringLocation?: string; - portBandwidthInMbps?: number; - readonly portPairDescriptor?: string; - readonly primaryAzurePort?: string; - remainingBandwidthInMbps?: number; - readonly secondaryAzurePort?: string; - usedBandwidthInMbps?: number; -} - -// @public -export interface ExpressRouteProviderPortListResult { - readonly nextLink?: string; - value?: ExpressRouteProviderPort[]; -} - -// @public -export interface ExpressRouteProviderPortOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteProviderPortResponse = ExpressRouteProviderPort; - -// @public -export interface ExpressRouteProviderPortsLocation { - list(options?: ExpressRouteProviderPortsLocationListOptionalParams): Promise; -} - -// @public -export interface ExpressRouteProviderPortsLocationListOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ExpressRouteProviderPortsLocationListResponse = ExpressRouteProviderPortListResult; - -// @public -export interface ExpressRouteServiceProvider extends Resource { - bandwidthsOffered?: ExpressRouteServiceProviderBandwidthsOffered[]; - peeringLocations?: string[]; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface ExpressRouteServiceProviderBandwidthsOffered { - offerName?: string; - valueInMbps?: number; -} - -// @public -export interface ExpressRouteServiceProviderListResult { - nextLink?: string; - value?: ExpressRouteServiceProvider[]; -} - -// @public -export interface ExpressRouteServiceProviders { - list(options?: ExpressRouteServiceProvidersListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ExpressRouteServiceProvidersListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteServiceProvidersListNextResponse = ExpressRouteServiceProviderListResult; - -// @public -export interface ExpressRouteServiceProvidersListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExpressRouteServiceProvidersListResponse = ExpressRouteServiceProviderListResult; - -// @public -export interface ExtendedLocation { - name?: string; - type?: ExtendedLocationTypes; -} - -// @public -export type ExtendedLocationTypes = string; - -// @public (undocumented) -export interface FailoverConnectionDetails { - failoverConnectionName?: string; - failoverLocation?: string; - isVerified?: boolean; -} - -// @public -export type FailoverConnectionStatus = string; - -// @public -export type FailoverTestStatus = string; - -// @public -export type FailoverTestStatusForSingleTest = string; - -// @public -export type FailoverTestType = string; - -// @public -export interface FilterItems { - field?: string; - values?: string[]; -} - -// @public -export interface FirewallPacketCaptureParameters { - durationInSeconds?: number; - fileName?: string; - filters?: AzureFirewallPacketCaptureRule[]; - flags?: AzureFirewallPacketCaptureFlags[]; - numberOfPacketsToCapture?: number; - operation?: AzureFirewallPacketCaptureOperationType; - protocol?: AzureFirewallNetworkRuleProtocol; - sasUrl?: string; -} - -// @public -export interface FirewallPolicies { - beginCreateOrUpdate(resourceGroupName: string, firewallPolicyName: string, parameters: FirewallPolicy, options?: FirewallPoliciesCreateOrUpdateOptionalParams): Promise, FirewallPoliciesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, firewallPolicyName: string, parameters: FirewallPolicy, options?: FirewallPoliciesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, firewallPolicyName: string, options?: FirewallPoliciesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, firewallPolicyName: string, options?: FirewallPoliciesDeleteOptionalParams): Promise; - 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 -export interface FirewallPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type FirewallPoliciesCreateOrUpdateResponse = FirewallPolicy; - -// @public -export interface FirewallPoliciesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface FirewallPoliciesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type FirewallPoliciesGetResponse = FirewallPolicy; - -// @public -export interface FirewallPoliciesListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPoliciesListAllNextResponse = FirewallPolicyListResult; - -// @public -export interface FirewallPoliciesListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPoliciesListAllResponse = FirewallPolicyListResult; - -// @public -export interface FirewallPoliciesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPoliciesListNextResponse = FirewallPolicyListResult; - -// @public -export interface FirewallPoliciesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPoliciesListResponse = FirewallPolicyListResult; - -// @public -export interface FirewallPoliciesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPoliciesUpdateTagsResponse = FirewallPolicy; - -// @public -export interface FirewallPolicy extends Resource { - basePolicy?: SubResource; - readonly childPolicies?: SubResource[]; - dnsSettings?: DnsSettings; - readonly etag?: string; - explicitProxy?: ExplicitProxy; - readonly firewalls?: SubResource[]; - identity?: ManagedServiceIdentity; - insights?: FirewallPolicyInsights; - intrusionDetection?: FirewallPolicyIntrusionDetection; - readonly provisioningState?: ProvisioningState; - readonly ruleCollectionGroups?: SubResource[]; - readonly size?: string; - sku?: FirewallPolicySku; - snat?: FirewallPolicySnat; - sql?: FirewallPolicySQL; - threatIntelMode?: AzureFirewallThreatIntelMode; - threatIntelWhitelist?: FirewallPolicyThreatIntelWhitelist; - transportSecurity?: FirewallPolicyTransportSecurity; -} - -// @public -export interface FirewallPolicyCertificateAuthority { - keyVaultSecretId?: string; - name?: string; -} - -// @public -export interface FirewallPolicyDeployments { - beginDeploy(resourceGroupName: string, firewallPolicyName: string, options?: FirewallPolicyDeploymentsDeployOptionalParams): Promise, FirewallPolicyDeploymentsDeployResponse>>; - beginDeployAndWait(resourceGroupName: string, firewallPolicyName: string, options?: FirewallPolicyDeploymentsDeployOptionalParams): Promise; -} - -// @public -export interface FirewallPolicyDeploymentsDeployHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface FirewallPolicyDeploymentsDeployOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type FirewallPolicyDeploymentsDeployResponse = FirewallPolicyDeploymentsDeployHeaders; - -// @public -export interface FirewallPolicyDraft extends Resource { - basePolicy?: SubResource; - dnsSettings?: DnsSettings; - explicitProxy?: ExplicitProxy; - insights?: FirewallPolicyInsights; - intrusionDetection?: FirewallPolicyIntrusionDetection; - snat?: FirewallPolicySnat; - sql?: FirewallPolicySQL; - threatIntelMode?: AzureFirewallThreatIntelMode; - threatIntelWhitelist?: FirewallPolicyThreatIntelWhitelist; -} - -// @public -export interface FirewallPolicyDrafts { - createOrUpdate(resourceGroupName: string, firewallPolicyName: string, parameters: FirewallPolicyDraft, options?: FirewallPolicyDraftsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, firewallPolicyName: string, options?: FirewallPolicyDraftsDeleteOptionalParams): Promise; - get(resourceGroupName: string, firewallPolicyName: string, options?: FirewallPolicyDraftsGetOptionalParams): Promise; -} - -// @public -export interface FirewallPolicyDraftsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyDraftsCreateOrUpdateResponse = FirewallPolicyDraft; - -// @public -export interface FirewallPolicyDraftsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface FirewallPolicyDraftsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyDraftsGetResponse = FirewallPolicyDraft; - -// @public -export interface FirewallPolicyFilterRuleCollection extends FirewallPolicyRuleCollection { - action?: FirewallPolicyFilterRuleCollectionAction; - ruleCollectionType: "FirewallPolicyFilterRuleCollection"; - rules?: FirewallPolicyRuleUnion[]; -} - -// @public -export interface FirewallPolicyFilterRuleCollectionAction { - type?: FirewallPolicyFilterRuleCollectionActionType; -} - -// @public -export type FirewallPolicyFilterRuleCollectionActionType = string; - -// @public -export interface FirewallPolicyHttpHeaderToInsert { - headerName?: string; - headerValue?: string; -} - -// @public -export type FirewallPolicyIdpsQuerySortOrder = string; - -// @public -export type FirewallPolicyIdpsSignatureDirection = 0 | 1 | 2 | 3 | 4 | 5; - -// @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; -} - -// @public -export interface FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyIdpsSignaturesFilterValuesListResponse = SignatureOverridesFilterValuesResponse; - -// @public -export interface FirewallPolicyIdpsSignaturesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyIdpsSignaturesListResponse = QueryResults; - -// @public -export interface FirewallPolicyIdpsSignaturesOverrides { - get(resourceGroupName: string, firewallPolicyName: string, options?: FirewallPolicyIdpsSignaturesOverridesGetOptionalParams): Promise; - list(resourceGroupName: string, firewallPolicyName: string, options?: FirewallPolicyIdpsSignaturesOverridesListOptionalParams): Promise; - patch(resourceGroupName: string, firewallPolicyName: string, parameters: SignaturesOverrides, options?: FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams): Promise; - put(resourceGroupName: string, firewallPolicyName: string, parameters: SignaturesOverrides, options?: FirewallPolicyIdpsSignaturesOverridesPutOptionalParams): Promise; -} - -// @public -export interface FirewallPolicyIdpsSignaturesOverridesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyIdpsSignaturesOverridesGetResponse = SignaturesOverrides; - -// @public -export interface FirewallPolicyIdpsSignaturesOverridesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyIdpsSignaturesOverridesListResponse = SignaturesOverridesList; - -// @public -export interface FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyIdpsSignaturesOverridesPatchResponse = SignaturesOverrides; - -// @public -export interface FirewallPolicyIdpsSignaturesOverridesPutOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyIdpsSignaturesOverridesPutResponse = SignaturesOverrides; - -// @public -export interface FirewallPolicyInsights { - isEnabled?: boolean; - logAnalyticsResources?: FirewallPolicyLogAnalyticsResources; - retentionDays?: number; -} - -// @public -export interface FirewallPolicyIntrusionDetection { - configuration?: FirewallPolicyIntrusionDetectionConfiguration; - mode?: FirewallPolicyIntrusionDetectionStateType; - profile?: FirewallPolicyIntrusionDetectionProfileType; -} - -// @public -export interface FirewallPolicyIntrusionDetectionBypassTrafficSpecifications { - description?: string; - destinationAddresses?: string[]; - destinationIpGroups?: string[]; - destinationPorts?: string[]; - name?: string; - protocol?: FirewallPolicyIntrusionDetectionProtocol; - sourceAddresses?: string[]; - sourceIpGroups?: string[]; -} - -// @public -export interface FirewallPolicyIntrusionDetectionConfiguration { - bypassTrafficSettings?: FirewallPolicyIntrusionDetectionBypassTrafficSpecifications[]; - privateRanges?: string[]; - signatureOverrides?: FirewallPolicyIntrusionDetectionSignatureSpecification[]; -} - -// @public -export type FirewallPolicyIntrusionDetectionProfileType = string; - -// @public -export type FirewallPolicyIntrusionDetectionProtocol = string; - -// @public -export interface FirewallPolicyIntrusionDetectionSignatureSpecification { - id?: string; - mode?: FirewallPolicyIntrusionDetectionStateType; -} - -// @public -export type FirewallPolicyIntrusionDetectionStateType = string; - -// @public -export interface FirewallPolicyListResult { - nextLink?: string; - value?: FirewallPolicy[]; -} - -// @public -export interface FirewallPolicyLogAnalyticsResources { - defaultWorkspaceId?: SubResource; - workspaces?: FirewallPolicyLogAnalyticsWorkspace[]; -} - -// @public -export interface FirewallPolicyLogAnalyticsWorkspace { - region?: string; - workspaceId?: SubResource; -} - -// @public -export interface FirewallPolicyNatRuleCollection extends FirewallPolicyRuleCollection { - action?: FirewallPolicyNatRuleCollectionAction; - ruleCollectionType: "FirewallPolicyNatRuleCollection"; - rules?: FirewallPolicyRuleUnion[]; -} - -// @public -export interface FirewallPolicyNatRuleCollectionAction { - type?: FirewallPolicyNatRuleCollectionActionType; -} - -// @public -export type FirewallPolicyNatRuleCollectionActionType = string; - -// @public -export interface FirewallPolicyRule { - description?: string; - name?: string; - ruleType: "ApplicationRule" | "NatRule" | "NetworkRule"; -} - -// @public -export interface FirewallPolicyRuleApplicationProtocol { - port?: number; - protocolType?: FirewallPolicyRuleApplicationProtocolType; -} - -// @public -export type FirewallPolicyRuleApplicationProtocolType = string; - -// @public -export interface FirewallPolicyRuleCollection { - name?: string; - priority?: number; - ruleCollectionType: "FirewallPolicyNatRuleCollection" | "FirewallPolicyFilterRuleCollection"; -} - -// @public -export interface FirewallPolicyRuleCollectionGroup extends SubResource { - readonly etag?: string; - name?: string; - priority?: number; - readonly provisioningState?: ProvisioningState; - ruleCollections?: FirewallPolicyRuleCollectionUnion[]; - readonly size?: string; - readonly type?: string; -} - -// @public -export interface FirewallPolicyRuleCollectionGroupDraft extends SubResource { - name?: string; - priority?: number; - ruleCollections?: FirewallPolicyRuleCollectionUnion[]; - readonly size?: string; - readonly type?: string; -} - -// @public -export interface FirewallPolicyRuleCollectionGroupDrafts { - createOrUpdate(resourceGroupName: string, firewallPolicyName: string, ruleCollectionGroupName: string, parameters: FirewallPolicyRuleCollectionGroupDraft, options?: FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, firewallPolicyName: string, ruleCollectionGroupName: string, options?: FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams): Promise; - get(resourceGroupName: string, firewallPolicyName: string, ruleCollectionGroupName: string, options?: FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams): Promise; -} - -// @public -export interface FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateResponse = FirewallPolicyRuleCollectionGroupDraft; - -// @public -export interface FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyRuleCollectionGroupDraftsGetResponse = FirewallPolicyRuleCollectionGroupDraft; - -// @public -export interface FirewallPolicyRuleCollectionGroupListResult { - nextLink?: string; - value?: FirewallPolicyRuleCollectionGroup[]; -} - -// @public -export interface FirewallPolicyRuleCollectionGroups { - beginCreateOrUpdate(resourceGroupName: string, firewallPolicyName: string, ruleCollectionGroupName: string, parameters: FirewallPolicyRuleCollectionGroup, options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams): Promise, FirewallPolicyRuleCollectionGroupsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, firewallPolicyName: string, ruleCollectionGroupName: string, parameters: FirewallPolicyRuleCollectionGroup, options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, firewallPolicyName: string, ruleCollectionGroupName: string, options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, firewallPolicyName: string, ruleCollectionGroupName: string, options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams): Promise; - get(resourceGroupName: string, firewallPolicyName: string, ruleCollectionGroupName: string, options?: FirewallPolicyRuleCollectionGroupsGetOptionalParams): Promise; - list(resourceGroupName: string, firewallPolicyName: string, options?: FirewallPolicyRuleCollectionGroupsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type FirewallPolicyRuleCollectionGroupsCreateOrUpdateResponse = FirewallPolicyRuleCollectionGroup; - -// @public -export interface FirewallPolicyRuleCollectionGroupsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface FirewallPolicyRuleCollectionGroupsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyRuleCollectionGroupsGetResponse = FirewallPolicyRuleCollectionGroup; - -// @public -export interface FirewallPolicyRuleCollectionGroupsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyRuleCollectionGroupsListNextResponse = FirewallPolicyRuleCollectionGroupListResult; - -// @public -export interface FirewallPolicyRuleCollectionGroupsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FirewallPolicyRuleCollectionGroupsListResponse = FirewallPolicyRuleCollectionGroupListResult; - -// @public -export type FirewallPolicyRuleCollectionType = string; - -// @public (undocumented) -export type FirewallPolicyRuleCollectionUnion = FirewallPolicyRuleCollection | FirewallPolicyNatRuleCollection | FirewallPolicyFilterRuleCollection; - -// @public -export type FirewallPolicyRuleNetworkProtocol = string; - -// @public -export type FirewallPolicyRuleType = string; - -// @public (undocumented) -export type FirewallPolicyRuleUnion = FirewallPolicyRule | ApplicationRule | NatRule | NetworkRule; - -// @public -export interface FirewallPolicySku { - tier?: FirewallPolicySkuTier; -} - -// @public -export type FirewallPolicySkuTier = string; - -// @public -export interface FirewallPolicySnat { - autoLearnPrivateRanges?: AutoLearnPrivateRangesMode; - privateRanges?: string[]; -} - -// @public -export interface FirewallPolicySQL { - allowSqlRedirect?: boolean; -} - -// @public -export interface FirewallPolicyThreatIntelWhitelist { - fqdns?: string[]; - ipAddresses?: string[]; -} - -// @public -export interface FirewallPolicyTransportSecurity { - certificateAuthority?: FirewallPolicyCertificateAuthority; -} - -// @public -export interface FlowLog extends Resource { - enabled?: boolean; - enabledFilteringCriteria?: string; - readonly etag?: string; - flowAnalyticsConfiguration?: TrafficAnalyticsProperties; - format?: FlowLogFormatParameters; - identity?: ManagedServiceIdentity; - readonly provisioningState?: ProvisioningState; - recordTypes?: string; - retentionPolicy?: RetentionPolicyParameters; - storageId?: string; - readonly targetResourceGuid?: string; - targetResourceId?: string; -} - -// @public -export interface FlowLogFormatParameters { - type?: FlowLogFormatType; - version?: number; -} - -// @public -export type FlowLogFormatType = string; - -// @public -export interface FlowLogInformation { - enabled: boolean; - enabledFilteringCriteria?: string; - flowAnalyticsConfiguration?: TrafficAnalyticsProperties; - format?: FlowLogFormatParameters; - identity?: ManagedServiceIdentity; - recordTypes?: string; - retentionPolicy?: RetentionPolicyParameters; - storageId: string; - targetResourceId: string; -} - -// @public -export interface FlowLogListResult { - readonly nextLink?: string; - value?: FlowLog[]; -} - -// @public -export interface FlowLogs { - beginCreateOrUpdate(resourceGroupName: string, networkWatcherName: string, flowLogName: string, parameters: FlowLog, options?: FlowLogsCreateOrUpdateOptionalParams): Promise, FlowLogsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, networkWatcherName: string, flowLogName: string, parameters: FlowLog, options?: FlowLogsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkWatcherName: string, flowLogName: string, options?: FlowLogsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkWatcherName: string, flowLogName: string, options?: FlowLogsDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkWatcherName: string, flowLogName: string, options?: FlowLogsGetOptionalParams): Promise; - list(resourceGroupName: string, networkWatcherName: string, options?: FlowLogsListOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, networkWatcherName: string, flowLogName: string, parameters: TagsObject, options?: FlowLogsUpdateTagsOptionalParams): Promise; -} - -// @public -export interface FlowLogsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type FlowLogsCreateOrUpdateResponse = FlowLog; - -// @public -export interface FlowLogsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface FlowLogsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FlowLogsGetResponse = FlowLog; - -// @public -export interface FlowLogsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FlowLogsListNextResponse = FlowLogListResult; - -// @public -export interface FlowLogsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FlowLogsListResponse = FlowLogListResult; - -// @public -export interface FlowLogStatusParameters { - targetResourceId: string; -} - -// @public -export interface FlowLogsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FlowLogsUpdateTagsResponse = FlowLog; - -// @public -export interface FrontendIPConfiguration extends SubResource { - readonly etag?: string; - gatewayLoadBalancer?: SubResource; - readonly inboundNatPools?: SubResource[]; - readonly inboundNatRules?: SubResource[]; - readonly loadBalancingRules?: SubResource[]; - name?: string; - readonly outboundRules?: SubResource[]; - privateIPAddress?: string; - privateIPAddressVersion?: IPVersion; - privateIPAllocationMethod?: IPAllocationMethod; - readonly provisioningState?: ProvisioningState; - publicIPAddress?: PublicIPAddress; - publicIPPrefix?: SubResource; - subnet?: Subnet; - readonly type?: string; - zones?: string[]; -} - -// @public -export interface GatewayCustomBgpIpAddressIpConfiguration { - customBgpIpAddress: string; - ipConfigurationId: string; -} - -// @public -export interface GatewayLoadBalancerTunnelInterface { - identifier?: number; - port?: number; - protocol?: GatewayLoadBalancerTunnelProtocol; - type?: GatewayLoadBalancerTunnelInterfaceType; -} - -// @public -export type GatewayLoadBalancerTunnelInterfaceType = string; - -// @public -export type GatewayLoadBalancerTunnelProtocol = string; - -// @public -export interface GatewayResiliencyInformation { - components?: ResiliencyRecommendationComponents[]; - lastComputedTime?: Date; - maxScoreFromRecommendations?: string; - minScoreFromRecommendations?: string; - nextEligibleComputeTime?: Date; - overallScore?: string; - scoreChange?: string; -} - -// @public -export interface GatewayResiliencyRecommendation { - callToActionLink?: string; - callToActionText?: string; - recommendationId?: string; - recommendationText?: string; - recommendationTitle?: string; - severity?: string; -} - -// @public -export interface GatewayRoute { - readonly asPath?: string; - readonly localAddress?: string; - readonly network?: string; - readonly nextHop?: string; - readonly origin?: string; - readonly sourcePeer?: string; - readonly weight?: number; -} - -// @public -export interface GatewayRouteListResult { - value?: GatewayRoute[]; -} - -// @public (undocumented) -export interface GatewayRouteSet { - details?: { - [propertyName: string]: RouteSourceDetails[]; - }; - locations?: string[]; - name?: string; -} - -// @public -export interface GatewayRouteSetsInformation { - circuitsMetadataMap?: { - [propertyName: string]: CircuitMetadataMap; - }; - lastComputedTime?: Date; - nextEligibleComputeTime?: Date; - routeSets?: GatewayRouteSet[]; - routeSetVersion?: string; -} - -// @public -export interface GenerateExpressRoutePortsLOARequest { - customerName: string; -} - -// @public -export interface GenerateExpressRoutePortsLOAResult { - encodedContent?: string; -} - -// @public -export interface GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type GeneratevirtualwanvpnserverconfigurationvpnprofileResponse = VpnProfileResponse; - -// @public -export type Geo = string; - -// @public -export interface GetActiveSessionsNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GetActiveSessionsNextResponse = BastionActiveSessionListResult; - -// @public -export interface GetActiveSessionsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type GetActiveSessionsResponse = BastionActiveSessionListResult; - -// @public -export interface GetBastionShareableLinkNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GetBastionShareableLinkNextResponse = BastionShareableLinkListResult; - -// @public -export interface GetBastionShareableLinkOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GetBastionShareableLinkResponse = BastionShareableLinkListResult; - -// @public -export function getContinuationToken(page: unknown): string | undefined; - -// @public -export interface GetInboundRoutesParameters { - connectionType?: string; - resourceUri?: string; -} - -// @public -export interface GetOutboundRoutesParameters { - connectionType?: string; - resourceUri?: string; -} - -// @public -export interface GetServiceGatewayAddressLocationsResult { - readonly nextLink?: string; - value?: ServiceGatewayAddressLocationResponse[]; -} - -// @public -export interface GetServiceGatewayServicesResult { - readonly nextLink?: string; - value?: ServiceGatewayService[]; -} - -// @public -export interface GetVpnSitesConfigurationRequest { - outputBlobSasUrl: string; - vpnSites?: string[]; -} - -// @public -export interface GroupByUserSession { - groupByVariables: GroupByVariable[]; -} - -// @public -export interface GroupByVariable { - variableName: ApplicationGatewayFirewallUserSessionVariable; -} - -// @public -export type GroupConnectivity = string; - -// @public -export type GroupMemberType = string; - -// @public -export interface HeaderValueMatcher { - ignoreCase?: boolean; - negate?: boolean; - pattern?: string; -} - -// @public -export interface HopLink { - readonly context?: { - [propertyName: string]: string; - }; - readonly issues?: ConnectivityIssue[]; - readonly linkType?: string; - readonly nextHopId?: string; - readonly resourceId?: string; - readonly roundTripTimeAvg?: number; - readonly roundTripTimeMax?: number; - readonly roundTripTimeMin?: number; -} - -// @public -export interface HttpConfiguration { - headers?: HttpHeader[]; - method?: HttpMethod; - validStatusCodes?: number[]; -} - -// @public -export type HttpConfigurationMethod = string; - -// @public -export interface HttpHeader { - name?: string; - value?: string; -} - -// @public -export type HttpMethod = string; - -// @public -export interface Hub { - resourceId?: string; - resourceType?: string; -} - -// @public -export type HubBgpConnectionStatus = string; - -// @public -export interface HubIPAddresses { - privateIPAddress?: string; - publicIPs?: HubPublicIPAddresses; -} - -// @public -export interface HubIpConfiguration extends SubResource { - readonly etag?: string; - name?: string; - privateIPAddress?: string; - privateIPAllocationMethod?: IPAllocationMethod; - readonly provisioningState?: ProvisioningState; - publicIPAddress?: PublicIPAddress; - subnet?: Subnet; - readonly type?: string; -} - -// @public -export interface HubPublicIPAddresses { - addresses?: AzureFirewallPublicIPAddress[]; - count?: number; -} - -// @public -export interface HubRoute { - destinations: string[]; - destinationType: string; - name: string; - nextHop: string; - nextHopType: string; -} - -// @public -export interface HubRouteTable extends SubResource { - readonly associatedConnections?: string[]; - readonly etag?: string; - labels?: string[]; - name?: string; - readonly propagatingConnections?: string[]; - readonly provisioningState?: ProvisioningState; - routes?: HubRoute[]; - readonly type?: string; -} - -// @public -export interface HubRouteTables { - beginCreateOrUpdate(resourceGroupName: string, virtualHubName: string, routeTableName: string, routeTableParameters: HubRouteTable, options?: HubRouteTablesCreateOrUpdateOptionalParams): Promise, HubRouteTablesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualHubName: string, routeTableName: string, routeTableParameters: HubRouteTable, options?: HubRouteTablesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualHubName: string, routeTableName: string, options?: HubRouteTablesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualHubName: string, routeTableName: string, options?: HubRouteTablesDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualHubName: string, routeTableName: string, options?: HubRouteTablesGetOptionalParams): Promise; - list(resourceGroupName: string, virtualHubName: string, options?: HubRouteTablesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface HubRouteTablesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type HubRouteTablesCreateOrUpdateResponse = HubRouteTable; - -// @public -export interface HubRouteTablesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface HubRouteTablesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HubRouteTablesGetResponse = HubRouteTable; - -// @public -export interface HubRouteTablesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HubRouteTablesListNextResponse = ListHubRouteTablesResult; - -// @public -export interface HubRouteTablesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HubRouteTablesListResponse = ListHubRouteTablesResult; - -// @public -export type HubRoutingPreference = string; - -// @public -export interface HubVirtualNetworkConnection extends SubResource { - allowHubToRemoteVnetTransit?: boolean; - allowRemoteVnetToUseHubVnetGateways?: boolean; - enableInternetSecurity?: boolean; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - remoteVirtualNetwork?: SubResource; - routingConfiguration?: RoutingConfiguration; -} - -// @public -export interface HubVirtualNetworkConnections { - beginCreateOrUpdate(resourceGroupName: string, virtualHubName: string, connectionName: string, hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams): Promise, HubVirtualNetworkConnectionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualHubName: string, connectionName: string, hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualHubName: string, connectionName: string, options?: HubVirtualNetworkConnectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualHubName: string, connectionName: string, options?: HubVirtualNetworkConnectionsDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualHubName: string, connectionName: string, options?: HubVirtualNetworkConnectionsGetOptionalParams): Promise; - list(resourceGroupName: string, virtualHubName: string, options?: HubVirtualNetworkConnectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type HubVirtualNetworkConnectionsCreateOrUpdateResponse = HubVirtualNetworkConnection; - -// @public -export interface HubVirtualNetworkConnectionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface HubVirtualNetworkConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HubVirtualNetworkConnectionsGetResponse = HubVirtualNetworkConnection; - -// @public -export interface HubVirtualNetworkConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HubVirtualNetworkConnectionsListNextResponse = ListHubVirtualNetworkConnectionsResult; - -// @public -export interface HubVirtualNetworkConnectionsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HubVirtualNetworkConnectionsListResponse = ListHubVirtualNetworkConnectionsResult; - -// @public -export type HubVirtualNetworkConnectionStatus = string; - -// @public -export interface IdpsQueryObject { - filters?: FilterItems[]; - orderBy?: OrderBy; - resultsPerPage?: number; - search?: string; - skip?: number; -} - -// @public -export type IkeEncryption = string; - -// @public -export type IkeIntegrity = string; - -// @public -export interface InboundNatPool extends SubResource { - backendPort?: number; - enableFloatingIP?: boolean; - enableTcpReset?: boolean; - readonly etag?: string; - frontendIPConfiguration?: SubResource; - frontendPortRangeEnd?: number; - frontendPortRangeStart?: number; - idleTimeoutInMinutes?: number; - name?: string; - protocol?: TransportProtocol; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface InboundNatRule extends SubResource { - backendAddressPool?: SubResource; - readonly backendIPConfiguration?: NetworkInterfaceIPConfiguration; - backendPort?: number; - enableFloatingIP?: boolean; - enableTcpReset?: boolean; - readonly etag?: string; - frontendIPConfiguration?: SubResource; - frontendPort?: number; - frontendPortRangeEnd?: number; - frontendPortRangeStart?: number; - idleTimeoutInMinutes?: number; - name?: string; - protocol?: TransportProtocol; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface InboundNatRuleListResult { - readonly nextLink?: string; - value?: InboundNatRule[]; -} - -// @public -export interface InboundNatRulePortMapping { - readonly backendPort?: number; - readonly frontendPort?: number; - readonly inboundNatRuleName?: string; - readonly protocol?: TransportProtocol; -} - -// @public -export interface InboundNatRules { - beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: InboundNatRule, options?: InboundNatRulesCreateOrUpdateOptionalParams): Promise, InboundNatRulesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: InboundNatRule, options?: InboundNatRulesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: InboundNatRulesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: InboundNatRulesDeleteOptionalParams): Promise; - get(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: InboundNatRulesGetOptionalParams): Promise; - list(resourceGroupName: string, loadBalancerName: string, options?: InboundNatRulesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface InboundNatRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type InboundNatRulesCreateOrUpdateResponse = InboundNatRule; - -// @public -export interface InboundNatRulesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface InboundNatRulesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type InboundNatRulesGetResponse = InboundNatRule; - -// @public -export interface InboundNatRulesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type InboundNatRulesListNextResponse = InboundNatRuleListResult; - -// @public -export interface InboundNatRulesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type InboundNatRulesListResponse = InboundNatRuleListResult; - -// @public -export interface InboundSecurityRule extends SubResource { - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - rules?: InboundSecurityRules[]; - ruleType?: InboundSecurityRuleType; - readonly type?: string; -} - -// @public -export interface InboundSecurityRuleCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type InboundSecurityRuleCreateOrUpdateResponse = InboundSecurityRule; - -// @public -export interface InboundSecurityRuleGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type InboundSecurityRuleGetResponse = InboundSecurityRule; - -// @public -export interface InboundSecurityRuleOperations { - beginCreateOrUpdate(resourceGroupName: string, networkVirtualApplianceName: string, ruleCollectionName: string, parameters: InboundSecurityRule, options?: InboundSecurityRuleCreateOrUpdateOptionalParams): Promise, InboundSecurityRuleCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, networkVirtualApplianceName: string, ruleCollectionName: string, parameters: InboundSecurityRule, options?: InboundSecurityRuleCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkVirtualApplianceName: string, ruleCollectionName: string, options?: InboundSecurityRuleGetOptionalParams): Promise; -} - -// @public -export interface InboundSecurityRules { - appliesOn?: string[]; - destinationPortRange?: number; - destinationPortRanges?: string[]; - name?: string; - protocol?: InboundSecurityRulesProtocol; - sourceAddressPrefix?: string; -} - -// @public -export type InboundSecurityRulesProtocol = string; - -// @public -export type InboundSecurityRuleType = string; - -// @public -export interface IntentContent { - // (undocumented) - description?: string; - destinationResourceId: string; - ipTraffic: IPTraffic; - sourceResourceId: string; -} - -// @public -export interface InternetIngressPublicIpsProperties { - id?: string; -} - -// @public -export interface IPAddressAvailabilityResult { - available?: boolean; - availableIPAddresses?: string[]; - isPlatformReserved?: boolean; -} - -// @public -export interface IpAllocation extends Resource { - allocationTags?: { - [propertyName: string]: string; - }; - readonly etag?: string; - ipamAllocationId?: string; - prefix?: string; - prefixLength?: number; - prefixType?: IPVersion; - readonly subnet?: SubResource; - typePropertiesType?: IpAllocationType; - readonly virtualNetwork?: SubResource; -} - -// @public -export interface IpAllocationListResult { - nextLink?: string; - value?: IpAllocation[]; -} - -// @public -export type IPAllocationMethod = string; - -// @public -export interface IpAllocations { - beginCreateOrUpdate(resourceGroupName: string, ipAllocationName: string, parameters: IpAllocation, options?: IpAllocationsCreateOrUpdateOptionalParams): Promise, IpAllocationsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, ipAllocationName: string, parameters: IpAllocation, options?: IpAllocationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, ipAllocationName: string, options?: IpAllocationsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, ipAllocationName: string, options?: IpAllocationsDeleteOptionalParams): Promise; - get(resourceGroupName: string, ipAllocationName: string, options?: IpAllocationsGetOptionalParams): Promise; - list(options?: IpAllocationsListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: IpAllocationsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, ipAllocationName: string, parameters: TagsObject, options?: IpAllocationsUpdateTagsOptionalParams): Promise; -} - -// @public -export interface IpAllocationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type IpAllocationsCreateOrUpdateResponse = IpAllocation; - -// @public -export interface IpAllocationsDeleteHeaders { - location?: string; -} - -// @public -export interface IpAllocationsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface IpAllocationsGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type IpAllocationsGetResponse = IpAllocation; - -// @public -export interface IpAllocationsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpAllocationsListByResourceGroupNextResponse = IpAllocationListResult; - -// @public -export interface IpAllocationsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpAllocationsListByResourceGroupResponse = IpAllocationListResult; - -// @public -export interface IpAllocationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpAllocationsListNextResponse = IpAllocationListResult; - -// @public -export interface IpAllocationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpAllocationsListResponse = IpAllocationListResult; - -// @public -export interface IpAllocationsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpAllocationsUpdateTagsResponse = IpAllocation; - -// @public -export type IpAllocationType = string; - -// @public -export interface IpamPool extends CommonTrackedResource { - readonly etag?: string; - properties: IpamPoolProperties; -} - -// @public -export interface IpamPoolList { - nextLink?: string; - // (undocumented) - value?: IpamPool[]; -} - -// @public -export interface IpamPoolPrefixAllocation { - readonly allocatedAddressPrefixes?: string[]; - id?: string; - numberOfIpAddresses?: string; -} - -// @public -export interface IpamPoolProperties { - addressPrefixes: string[]; - // (undocumented) - description?: string; - displayName?: string; - readonly ipAddressType?: IpType[]; - parentPoolName?: string; - provisioningState?: ProvisioningState; -} - -// @public -export interface IpamPools { - beginCreate(resourceGroupName: string, networkManagerName: string, poolName: string, body: IpamPool, options?: IpamPoolsCreateOptionalParams): Promise, IpamPoolsCreateResponse>>; - beginCreateAndWait(resourceGroupName: string, networkManagerName: string, poolName: string, body: IpamPool, options?: IpamPoolsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsDeleteOptionalParams): Promise, IpamPoolsDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsGetOptionalParams): Promise; - getPoolUsage(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsGetPoolUsageOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, options?: IpamPoolsListOptionalParams): PagedAsyncIterableIterator; - listAssociatedResources(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsListAssociatedResourcesOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsUpdateOptionalParams): Promise; -} - -// @public -export interface IpamPoolsCreateHeaders { - // (undocumented) - azureAsyncOperation?: string; -} - -// @public -export interface IpamPoolsCreateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type IpamPoolsCreateResponse = IpamPool; - -// @public -export interface IpamPoolsDeleteHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface IpamPoolsDeleteOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type IpamPoolsDeleteResponse = IpamPoolsDeleteHeaders; - -// @public -export interface IpamPoolsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface IpamPoolsGetPoolUsageOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpamPoolsGetPoolUsageResponse = PoolUsage; - -// @public -export type IpamPoolsGetResponse = IpamPool; - -// @public -export interface IpamPoolsListAssociatedResourcesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpamPoolsListAssociatedResourcesNextResponse = PoolAssociationList; - -// @public -export interface IpamPoolsListAssociatedResourcesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpamPoolsListAssociatedResourcesResponse = PoolAssociationList; - -// @public -export interface IpamPoolsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpamPoolsListNextResponse = IpamPoolList; - -// @public -export interface IpamPoolsListOptionalParams extends coreClient.OperationOptions { - skip?: number; - skipToken?: string; - sortKey?: string; - sortValue?: string; - top?: number; -} - -// @public -export type IpamPoolsListResponse = IpamPoolList; - -// @public -export interface IpamPoolsUpdateOptionalParams extends coreClient.OperationOptions { - body?: IpamPoolUpdate; - ifMatch?: string; -} - -// @public -export type IpamPoolsUpdateResponse = IpamPool; - -// @public -export interface IpamPoolUpdate { - properties?: IpamPoolUpdateProperties; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface IpamPoolUpdateProperties { - // (undocumented) - description?: string; - displayName?: string; -} - -// @public -export interface IPConfiguration extends SubResource { - readonly etag?: string; - name?: string; - privateIPAddress?: string; - privateIPAllocationMethod?: IPAllocationMethod; - readonly provisioningState?: ProvisioningState; - publicIPAddress?: PublicIPAddress; - subnet?: Subnet; -} - -// @public -export interface IPConfigurationBgpPeeringAddress { - customBgpIpAddresses?: string[]; - readonly defaultBgpIpAddresses?: string[]; - ipconfigurationId?: string; - readonly tunnelIpAddresses?: string[]; -} - -// @public -export interface IPConfigurationProfile extends SubResource { - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - subnet?: Subnet; - readonly type?: string; -} - -// @public -export type IpFlowProtocol = string; - -// @public -export interface IpGroup extends Resource { - readonly etag?: string; - readonly firewallPolicies?: SubResource[]; - readonly firewalls?: SubResource[]; - ipAddresses?: string[]; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface IpGroupListResult { - nextLink?: string; - value?: IpGroup[]; -} - -// @public -export interface IpGroups { - beginCreateOrUpdate(resourceGroupName: string, ipGroupsName: string, parameters: IpGroup, options?: IpGroupsCreateOrUpdateOptionalParams): Promise, IpGroupsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, ipGroupsName: string, parameters: IpGroup, options?: IpGroupsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, ipGroupsName: string, options?: IpGroupsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, ipGroupsName: string, options?: IpGroupsDeleteOptionalParams): Promise; - get(resourceGroupName: string, ipGroupsName: string, options?: IpGroupsGetOptionalParams): Promise; - list(options?: IpGroupsListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: IpGroupsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateGroups(resourceGroupName: string, ipGroupsName: string, parameters: TagsObject, options?: IpGroupsUpdateGroupsOptionalParams): Promise; -} - -// @public -export interface IpGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type IpGroupsCreateOrUpdateResponse = IpGroup; - -// @public -export interface IpGroupsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface IpGroupsGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type IpGroupsGetResponse = IpGroup; - -// @public -export interface IpGroupsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpGroupsListByResourceGroupNextResponse = IpGroupListResult; - -// @public -export interface IpGroupsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpGroupsListByResourceGroupResponse = IpGroupListResult; - -// @public -export interface IpGroupsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpGroupsListNextResponse = IpGroupListResult; - -// @public -export interface IpGroupsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpGroupsListResponse = IpGroupListResult; - -// @public -export interface IpGroupsUpdateGroupsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IpGroupsUpdateGroupsResponse = IpGroup; - -// @public -export interface IPPrefixesList { - ipPrefixes?: string[]; -} - -// @public (undocumented) -export interface IPRule { - addressPrefix?: string; -} - -// @public -export type IpsecEncryption = string; - -// @public -export type IpsecIntegrity = string; - -// @public -export interface IpsecPolicy { - dhGroup: DhGroup; - ikeEncryption: IkeEncryption; - ikeIntegrity: IkeIntegrity; - ipsecEncryption: IpsecEncryption; - ipsecIntegrity: IpsecIntegrity; - pfsGroup: PfsGroup; - saDataSizeKilobytes: number; - saLifeTimeSeconds: number; -} - -// @public -export interface IpTag { - ipTagType?: string; - tag?: string; -} - -// @public -export interface IPTraffic { - destinationIps: string[]; - destinationPorts: string[]; - // (undocumented) - protocols: NetworkProtocol[]; - sourceIps: string[]; - sourcePorts: string[]; -} - -// @public -export type IpType = string; - -// @public -export interface Ipv6CircuitConnectionConfig { - addressPrefix?: string; - readonly circuitConnectionStatus?: CircuitConnectionStatus; -} - -// @public -export interface Ipv6ExpressRouteCircuitPeeringConfig { - microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; - primaryPeerAddressPrefix?: string; - routeFilter?: SubResource; - secondaryPeerAddressPrefix?: string; - state?: ExpressRouteCircuitPeeringState; -} - -// @public -export type IPVersion = string; - -// @public -export type IsGlobal = string; - -// @public -export type IsRollback = string; - -// @public -export type IssueType = string; - -// @public -export type IsWorkloadProtected = string; - -// @public -export enum KnownAccess { - Allow = "Allow", - Deny = "Deny" -} - -// @public -export enum KnownAccessMode { - Default = "Default", - Restricted = "Restricted" -} - -// @public -export enum KnownAccessRuleDirection { - Inbound = "Inbound", - Outbound = "Outbound" -} - -// @public -export enum KnownActionType { - Allow = "Allow", - AnomalyScoring = "AnomalyScoring", - Block = "Block", - Captcha = "CAPTCHA", - JSChallenge = "JSChallenge", - Log = "Log" -} - -// @public -export enum KnownAddressPrefixType { - IPPrefix = "IPPrefix", - NetworkGroup = "NetworkGroup", - ServiceTag = "ServiceTag" -} - -// @public -export enum KnownAddressSpaceAggregationOption { - Manual = "Manual", - None = "None" -} - -// @public -export enum KnownAddressUpdateAction { - FullUpdate = "FullUpdate", - PartialUpdate = "PartialUpdate" -} - -// @public -export enum KnownAdminRuleKind { - Custom = "Custom", - Default = "Default" -} - -// @public -export enum KnownAdminState { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownAdvertisedPublicPrefixPropertiesValidationState { - AsnValidationFailed = "AsnValidationFailed", - CertificateMissingInRoutingRegistry = "CertificateMissingInRoutingRegistry", - Configured = "Configured", - Configuring = "Configuring", - InvalidSignatureEncoding = "InvalidSignatureEncoding", - ManualValidationNeeded = "ManualValidationNeeded", - NotConfigured = "NotConfigured", - SignatureVerificationFailed = "SignatureVerificationFailed", - ValidationFailed = "ValidationFailed", - ValidationNeeded = "ValidationNeeded" -} - -// @public -export enum KnownApplicationGatewayBackendHealthServerHealth { - Down = "Down", - Draining = "Draining", - Partial = "Partial", - Unknown = "Unknown", - Up = "Up" -} - -// @public -export enum KnownApplicationGatewayClientAuthVerificationModes { - Passthrough = "Passthrough", - Strict = "Strict" -} - -// @public -export enum KnownApplicationGatewayClientRevocationOptions { - None = "None", - Ocsp = "OCSP" -} - -// @public -export enum KnownApplicationGatewayCookieBasedAffinity { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownApplicationGatewayCustomErrorStatusCode { - HttpStatus400 = "HttpStatus400", - HttpStatus403 = "HttpStatus403", - HttpStatus404 = "HttpStatus404", - HttpStatus405 = "HttpStatus405", - HttpStatus408 = "HttpStatus408", - HttpStatus500 = "HttpStatus500", - HttpStatus502 = "HttpStatus502", - HttpStatus503 = "HttpStatus503", - HttpStatus504 = "HttpStatus504" -} - -// @public -export enum KnownApplicationGatewayFirewallMode { - Detection = "Detection", - Prevention = "Prevention" -} - -// @public -export enum KnownApplicationGatewayFirewallRateLimitDuration { - FiveMins = "FiveMins", - OneMin = "OneMin" -} - -// @public -export enum KnownApplicationGatewayFirewallUserSessionVariable { - ClientAddr = "ClientAddr", - ClientAddrXFFHeader = "ClientAddrXFFHeader", - GeoLocation = "GeoLocation", - GeoLocationXFFHeader = "GeoLocationXFFHeader", - None = "None" -} - -// @public -export enum KnownApplicationGatewayLoadDistributionAlgorithm { - IpHash = "IpHash", - LeastConnections = "LeastConnections", - RoundRobin = "RoundRobin" -} - -// @public -export enum KnownApplicationGatewayOperationalState { - Running = "Running", - Starting = "Starting", - Stopped = "Stopped", - Stopping = "Stopping" -} - -// @public -export enum KnownApplicationGatewayProtocol { - Http = "Http", - Https = "Https", - Tcp = "Tcp", - Tls = "Tls" -} - -// @public -export enum KnownApplicationGatewayRedirectType { - Found = "Found", - Permanent = "Permanent", - SeeOther = "SeeOther", - Temporary = "Temporary" -} - -// @public -export enum KnownApplicationGatewayRequestRoutingRuleType { - Basic = "Basic", - PathBasedRouting = "PathBasedRouting" -} - -// @public -export enum KnownApplicationGatewayRuleSetStatusOptions { - Deprecated = "Deprecated", - GA = "GA", - Preview = "Preview", - Supported = "Supported" -} - -// @public -export enum KnownApplicationGatewaySkuFamily { - Generation1 = "Generation_1", - Generation2 = "Generation_2" -} - -// @public -export enum KnownApplicationGatewaySkuName { - Basic = "Basic", - StandardLarge = "Standard_Large", - StandardMedium = "Standard_Medium", - StandardSmall = "Standard_Small", - StandardV2 = "Standard_v2", - WAFLarge = "WAF_Large", - WAFMedium = "WAF_Medium", - WAFV2 = "WAF_v2" -} - -// @public -export enum KnownApplicationGatewaySslCipherSuite { - TLSDHEDSSWith3DESEDECBCSHA = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA", - TLSDHEDSSWithAES128CBCSHA = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA", - TLSDHEDSSWithAES128CBCSHA256 = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", - TLSDHEDSSWithAES256CBCSHA = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA", - TLSDHEDSSWithAES256CBCSHA256 = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", - TLSDHERSAWithAES128CBCSHA = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", - TLSDHERSAWithAES128GCMSHA256 = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", - TLSDHERSAWithAES256CBCSHA = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA", - TLSDHERSAWithAES256GCMSHA384 = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", - TLSEcdheEcdsaWithAES128CBCSHA = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", - TLSEcdheEcdsaWithAES128CBCSHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", - TLSEcdheEcdsaWithAES128GCMSHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", - TLSEcdheEcdsaWithAES256CBCSHA = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", - TLSEcdheEcdsaWithAES256CBCSHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", - TLSEcdheEcdsaWithAES256GCMSHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", - TLSEcdheRSAWithAES128CBCSHA = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", - TLSEcdheRSAWithAES128CBCSHA256 = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", - TLSEcdheRSAWithAES128GCMSHA256 = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", - TLSEcdheRSAWithAES256CBCSHA = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", - TLSEcdheRSAWithAES256CBCSHA384 = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", - TLSEcdheRSAWithAES256GCMSHA384 = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", - TLSRSAWith3DESEDECBCSHA = "TLS_RSA_WITH_3DES_EDE_CBC_SHA", - TLSRSAWithAES128CBCSHA = "TLS_RSA_WITH_AES_128_CBC_SHA", - TLSRSAWithAES128CBCSHA256 = "TLS_RSA_WITH_AES_128_CBC_SHA256", - TLSRSAWithAES128GCMSHA256 = "TLS_RSA_WITH_AES_128_GCM_SHA256", - TLSRSAWithAES256CBCSHA = "TLS_RSA_WITH_AES_256_CBC_SHA", - TLSRSAWithAES256CBCSHA256 = "TLS_RSA_WITH_AES_256_CBC_SHA256", - TLSRSAWithAES256GCMSHA384 = "TLS_RSA_WITH_AES_256_GCM_SHA384" -} - -// @public -export enum KnownApplicationGatewaySslPolicyName { - AppGwSslPolicy20150501 = "AppGwSslPolicy20150501", - AppGwSslPolicy20170401 = "AppGwSslPolicy20170401", - AppGwSslPolicy20170401S = "AppGwSslPolicy20170401S", - AppGwSslPolicy20220101 = "AppGwSslPolicy20220101", - AppGwSslPolicy20220101S = "AppGwSslPolicy20220101S" -} - -// @public -export enum KnownApplicationGatewaySslPolicyType { - Custom = "Custom", - CustomV2 = "CustomV2", - Predefined = "Predefined" -} - -// @public -export enum KnownApplicationGatewaySslProtocol { - TLSv10 = "TLSv1_0", - TLSv11 = "TLSv1_1", - TLSv12 = "TLSv1_2", - TLSv13 = "TLSv1_3" -} - -// @public -export enum KnownApplicationGatewayTier { - Basic = "Basic", - Standard = "Standard", - StandardV2 = "Standard_v2", - WAF = "WAF", - WAFV2 = "WAF_v2" -} - -// @public -export enum KnownApplicationGatewayTierTypes { - Standard = "Standard", - StandardV2 = "Standard_v2", - WAF = "WAF", - WAFV2 = "WAF_v2" -} - -// @public -export enum KnownApplicationGatewayUnAuthorizedRequestAction { - Allow = "Allow", - Deny = "Deny" -} - -// @public -export enum KnownApplicationGatewayWafRuleActionTypes { - Allow = "Allow", - AnomalyScoring = "AnomalyScoring", - Block = "Block", - Log = "Log", - None = "None" -} - -// @public -export enum KnownApplicationGatewayWafRuleSensitivityTypes { - High = "High", - Low = "Low", - Medium = "Medium" -} - -// @public -export enum KnownApplicationGatewayWafRuleStateTypes { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownAssociationAccessMode { - Audit = "Audit", - Enforced = "Enforced", - Learning = "Learning" -} - -// @public -export enum KnownAssociationType { - Associated = "Associated", - Contains = "Contains" -} - -// @public -export enum KnownAuthenticationMethod { - EapmschaPv2 = "EAPMSCHAPv2", - Eaptls = "EAPTLS" -} - -// @public -export enum KnownAuthorizationUseStatus { - Available = "Available", - InUse = "InUse" -} - -// @public -export enum KnownAutoLearnPrivateRangesMode { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownAzureFirewallApplicationRuleProtocolType { - Http = "Http", - Https = "Https", - Mssql = "Mssql" -} - -// @public -export enum KnownAzureFirewallNatRCActionType { - Dnat = "Dnat", - Snat = "Snat" -} - -// @public -export enum KnownAzureFirewallNetworkRuleProtocol { - Any = "Any", - Icmp = "ICMP", - TCP = "TCP", - UDP = "UDP" -} - -// @public -export enum KnownAzureFirewallPacketCaptureFlagsType { - Ack = "ack", - Fin = "fin", - Push = "push", - Rst = "rst", - Syn = "syn", - Urg = "urg" -} - -// @public -export enum KnownAzureFirewallPacketCaptureOperationType { - Start = "Start", - Status = "Status", - Stop = "Stop" -} - -// @public -export enum KnownAzureFirewallPacketCaptureResponseCode { - AzureFirewallPacketCaptureCompleted = "AzureFirewallPacketCaptureCompleted", - AzureFirewallPacketCaptureFailed = "AzureFirewallPacketCaptureFailed", - AzureFirewallPacketCaptureInProgress = "AzureFirewallPacketCaptureInProgress", - AzureFirewallPacketCaptureNotInProgress = "AzureFirewallPacketCaptureNotInProgress", - AzureFirewallPacketCaptureStartFailed = "AzureFirewallPacketCaptureStartFailed", - AzureFirewallPacketCaptureStartFailedToUpload = "AzureFirewallPacketCaptureStartFailedToUpload", - AzureFirewallPacketCaptureStartFailure = "AzureFirewallPacketCaptureStartFailure", - AzureFirewallPacketCaptureStartSucceeded = "AzureFirewallPacketCaptureStartSucceeded", - AzureFirewallPacketCaptureStopSucceeded = "AzureFirewallPacketCaptureStopSucceeded", - NotImplemented = "NotImplemented" -} - -// @public -export enum KnownAzureFirewallRCActionType { - Allow = "Allow", - Deny = "Deny" -} - -// @public -export enum KnownAzureFirewallSkuName { - AzfwHub = "AZFW_Hub", - AzfwVnet = "AZFW_VNet" -} - -// @public -export enum KnownAzureFirewallSkuTier { - Basic = "Basic", - Premium = "Premium", - Standard = "Standard" -} - -// @public -export enum KnownAzureFirewallThreatIntelMode { - Alert = "Alert", - Deny = "Deny", - Off = "Off" -} - -// @public -export enum KnownBastionConnectProtocol { - RDP = "RDP", - SSH = "SSH" -} - -// @public -export enum KnownBastionHostSkuName { - Basic = "Basic", - Developer = "Developer", - Premium = "Premium", - Standard = "Standard" -} - -// @public -export enum KnownBgpPeerState { - Connected = "Connected", - Connecting = "Connecting", - Idle = "Idle", - Stopped = "Stopped", - Unknown = "Unknown" -} - -// @public -export enum KnownCircuitConnectionStatus { - Connected = "Connected", - Connecting = "Connecting", - Disconnected = "Disconnected" -} - -// @public -export enum KnownCommissionedState { - Commissioned = "Commissioned", - CommissionedNoInternetAdvertise = "CommissionedNoInternetAdvertise", - Commissioning = "Commissioning", - Decommissioning = "Decommissioning", - Deprovisioned = "Deprovisioned", - Deprovisioning = "Deprovisioning", - Provisioned = "Provisioned", - Provisioning = "Provisioning" -} - -// @public -export enum KnownConfigurationType { - Connectivity = "Connectivity", - Routing = "Routing", - SecurityAdmin = "SecurityAdmin", - SecurityUser = "SecurityUser" -} - -// @public -export enum KnownConnectedGroupAddressOverlap { - Allowed = "Allowed", - Disallowed = "Disallowed" -} - -// @public -export enum KnownConnectedGroupPrivateEndpointsScale { - HighScale = "HighScale", - Standard = "Standard" -} - -// @public -export enum KnownConnectionAuthenticationType { - Certificate = "Certificate", - PSK = "PSK" -} - -// @public -export enum KnownConnectionMonitorEndpointFilterItemType { - AgentAddress = "AgentAddress" -} - -// @public -export enum KnownConnectionMonitorEndpointFilterType { - Include = "Include" -} - -// @public -export enum KnownConnectionMonitorSourceStatus { - Active = "Active", - Inactive = "Inactive", - Unknown = "Unknown" -} - -// @public -export enum KnownConnectionMonitorTestConfigurationProtocol { - Http = "Http", - Icmp = "Icmp", - Tcp = "Tcp" -} - -// @public -export enum KnownConnectionMonitorType { - MultiEndpoint = "MultiEndpoint", - SingleSourceDestination = "SingleSourceDestination" -} - -// @public -export enum KnownConnectionState { - Reachable = "Reachable", - Unknown = "Unknown", - Unreachable = "Unreachable" -} - -// @public -export enum KnownConnectionStatus { - Connected = "Connected", - Degraded = "Degraded", - Disconnected = "Disconnected", - Unknown = "Unknown" -} - -// @public -export enum KnownConnectivityTopology { - HubAndSpoke = "HubAndSpoke", - Mesh = "Mesh" -} - -// @public -export enum KnownCoverageLevel { - AboveAverage = "AboveAverage", - Average = "Average", - BelowAverage = "BelowAverage", - Default = "Default", - Full = "Full", - Low = "Low" -} - -// @public -export enum KnownCreatedByType { - Application = "Application", - Key = "Key", - ManagedIdentity = "ManagedIdentity", - User = "User" -} - -// @public -export enum KnownCustomIpPrefixType { - Child = "Child", - Parent = "Parent", - Singular = "Singular" -} - -// @public -export enum KnownDdosDetectionMode { - TrafficThreshold = "TrafficThreshold" -} - -// @public -export enum KnownDdosSettingsProtectionMode { - Disabled = "Disabled", - Enabled = "Enabled", - VirtualNetworkInherited = "VirtualNetworkInherited" -} - -// @public -export enum KnownDdosTrafficType { - Tcp = "Tcp", - TcpSyn = "TcpSyn", - Udp = "Udp" -} - -// @public -export enum KnownDeleteExistingPeering { - False = "False", - True = "True" -} - -// @public -export enum KnownDeleteOptions { - Delete = "Delete", - Detach = "Detach" -} - -// @public -export enum KnownDeploymentStatus { - Deployed = "Deployed", - Deploying = "Deploying", - Failed = "Failed", - NotStarted = "NotStarted" -} - -// @public -export enum KnownDestinationPortBehavior { - ListenIfAvailable = "ListenIfAvailable", - None = "None" -} - -// @public -export enum KnownDhGroup { - DHGroup1 = "DHGroup1", - DHGroup14 = "DHGroup14", - DHGroup2 = "DHGroup2", - DHGroup2048 = "DHGroup2048", - DHGroup24 = "DHGroup24", - ECP256 = "ECP256", - ECP384 = "ECP384", - None = "None" -} - -// @public -export enum KnownDirection { - Inbound = "Inbound", - Outbound = "Outbound" -} - -// @public -export enum KnownDisableBgpRoutePropagation { - False = "False", - True = "True" -} - -// @public -export enum KnownEffectiveAdminRuleKind { - Custom = "Custom", - Default = "Default" -} - -// @public -export enum KnownEffectiveRouteSource { - Default = "Default", - Unknown = "Unknown", - User = "User", - VirtualNetworkGateway = "VirtualNetworkGateway" -} - -// @public -export enum KnownEffectiveRouteState { - Active = "Active", - Invalid = "Invalid" -} - -// @public -export enum KnownEffectiveSecurityRuleProtocol { - All = "All", - Tcp = "Tcp", - Udp = "Udp" -} - -// @public -export enum KnownEndpointType { - AzureArcNetwork = "AzureArcNetwork", - AzureArcVM = "AzureArcVM", - AzureSubnet = "AzureSubnet", - AzureVM = "AzureVM", - AzureVmss = "AzureVMSS", - AzureVNet = "AzureVNet", - ExternalAddress = "ExternalAddress", - MMAWorkspaceMachine = "MMAWorkspaceMachine", - MMAWorkspaceNetwork = "MMAWorkspaceNetwork" -} - -// @public -export enum KnownEvaluationState { - Completed = "Completed", - InProgress = "InProgress", - NotStarted = "NotStarted" -} - -// @public -export enum KnownExceptionEntryMatchVariable { - RemoteAddr = "RemoteAddr", - RequestHeader = "RequestHeader", - RequestURI = "RequestURI" -} - -// @public -export enum KnownExceptionEntrySelectorMatchOperator { - Contains = "Contains", - EndsWith = "EndsWith", - Equals = "Equals", - StartsWith = "StartsWith" -} - -// @public -export enum KnownExceptionEntryValueMatchOperator { - Contains = "Contains", - EndsWith = "EndsWith", - Equals = "Equals", - IPMatch = "IPMatch", - StartsWith = "StartsWith" -} - -// @public -export enum KnownExpressRouteCircuitPeeringAdvertisedPublicPrefixState { - Configured = "Configured", - Configuring = "Configuring", - NotConfigured = "NotConfigured", - ValidationNeeded = "ValidationNeeded" -} - -// @public -export enum KnownExpressRouteCircuitPeeringState { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownExpressRouteCircuitSkuFamily { - MeteredData = "MeteredData", - UnlimitedData = "UnlimitedData" -} - -// @public -export enum KnownExpressRouteCircuitSkuTier { - Basic = "Basic", - Local = "Local", - Premium = "Premium", - Standard = "Standard" -} - -// @public -export enum KnownExpressRouteLinkAdminState { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownExpressRouteLinkConnectorType { - LC = "LC", - SC = "SC" -} - -// @public -export enum KnownExpressRouteLinkMacSecCipher { - GcmAes128 = "GcmAes128", - GcmAes256 = "GcmAes256", - GcmAesXpn128 = "GcmAesXpn128", - GcmAesXpn256 = "GcmAesXpn256" -} - -// @public -export enum KnownExpressRouteLinkMacSecSciState { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownExpressRoutePeeringState { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownExpressRoutePeeringType { - AzurePrivatePeering = "AzurePrivatePeering", - AzurePublicPeering = "AzurePublicPeering", - MicrosoftPeering = "MicrosoftPeering" -} - -// @public -export enum KnownExpressRoutePortAuthorizationUseStatus { - Available = "Available", - InUse = "InUse" -} - -// @public -export enum KnownExpressRoutePortsBillingType { - MeteredData = "MeteredData", - UnlimitedData = "UnlimitedData" -} - -// @public -export enum KnownExpressRoutePortsEncapsulation { - Dot1Q = "Dot1Q", - QinQ = "QinQ" -} - -// @public -export enum KnownExtendedLocationTypes { - EdgeZone = "EdgeZone" -} - -// @public -export enum KnownFailoverConnectionStatus { - Connected = "Connected", - Disconnected = "Disconnected" -} - -// @public -export enum KnownFailoverTestStatus { - Completed = "Completed", - Expired = "Expired", - Invalid = "Invalid", - NotStarted = "NotStarted", - Running = "Running", - StartFailed = "StartFailed", - Starting = "Starting", - StopFailed = "StopFailed", - Stopping = "Stopping" -} - -// @public -export enum KnownFailoverTestStatusForSingleTest { - Completed = "Completed", - Expired = "Expired", - Invalid = "Invalid", - NotStarted = "NotStarted", - Running = "Running", - StartFailed = "StartFailed", - Starting = "Starting", - StopFailed = "StopFailed", - Stopping = "Stopping" -} - -// @public -export enum KnownFailoverTestType { - All = "All", - MultiSiteFailover = "MultiSiteFailover", - SingleSiteFailover = "SingleSiteFailover" -} - -// @public -export enum KnownFirewallPolicyFilterRuleCollectionActionType { - Allow = "Allow", - Deny = "Deny" -} - -// @public -export enum KnownFirewallPolicyIdpsQuerySortOrder { - Ascending = "Ascending", - Descending = "Descending" -} - -// @public -export enum KnownFirewallPolicyIntrusionDetectionProfileType { - Core = "Core", - Emerging = "Emerging", - Extended = "Extended", - Off = "Off" -} - -// @public -export enum KnownFirewallPolicyIntrusionDetectionProtocol { - ANY = "ANY", - Icmp = "ICMP", - TCP = "TCP", - UDP = "UDP" -} - -// @public -export enum KnownFirewallPolicyIntrusionDetectionStateType { - Alert = "Alert", - Deny = "Deny", - Off = "Off" -} - -// @public -export enum KnownFirewallPolicyNatRuleCollectionActionType { - Dnat = "DNAT" -} - -// @public -export enum KnownFirewallPolicyRuleApplicationProtocolType { - Http = "Http", - Https = "Https" -} - -// @public -export enum KnownFirewallPolicyRuleCollectionType { - FirewallPolicyFilterRuleCollection = "FirewallPolicyFilterRuleCollection", - FirewallPolicyNatRuleCollection = "FirewallPolicyNatRuleCollection" -} - -// @public -export enum KnownFirewallPolicyRuleNetworkProtocol { - Any = "Any", - Icmp = "ICMP", - TCP = "TCP", - UDP = "UDP" -} - -// @public -export enum KnownFirewallPolicyRuleType { - ApplicationRule = "ApplicationRule", - NatRule = "NatRule", - NetworkRule = "NetworkRule" -} - -// @public -export enum KnownFirewallPolicySkuTier { - Basic = "Basic", - Premium = "Premium", - Standard = "Standard" -} - -// @public -export enum KnownFlowLogFormatType { - Json = "JSON" -} - -// @public -export enum KnownGatewayLoadBalancerTunnelInterfaceType { - External = "External", - Internal = "Internal", - None = "None" -} - -// @public -export enum KnownGatewayLoadBalancerTunnelProtocol { - Native = "Native", - None = "None", - Vxlan = "VXLAN" -} - -// @public -export enum KnownGeo { - Afri = "AFRI", - Apac = "APAC", - AQ = "AQ", - Euro = "EURO", - Global = "GLOBAL", - Latam = "LATAM", - ME = "ME", - NAM = "NAM", - Oceania = "OCEANIA" -} - -// @public -export enum KnownGroupConnectivity { - DirectlyConnected = "DirectlyConnected", - None = "None" -} - -// @public -export enum KnownGroupMemberType { - Subnet = "Subnet", - VirtualNetwork = "VirtualNetwork" -} - -// @public -export enum KnownHttpConfigurationMethod { - Get = "Get", - Post = "Post" -} - -// @public -export enum KnownHttpMethod { - Get = "Get" -} - -// @public -export enum KnownHubBgpConnectionStatus { - Connected = "Connected", - Connecting = "Connecting", - NotConnected = "NotConnected", - Unknown = "Unknown" -} - -// @public -export enum KnownHubRoutingPreference { - ASPath = "ASPath", - ExpressRoute = "ExpressRoute", - VpnGateway = "VpnGateway" -} - -// @public -export enum KnownHubVirtualNetworkConnectionStatus { - Connected = "Connected", - Connecting = "Connecting", - NotConnected = "NotConnected", - Unknown = "Unknown" -} - -// @public -export enum KnownIkeEncryption { - AES128 = "AES128", - AES192 = "AES192", - AES256 = "AES256", - DES = "DES", - DES3 = "DES3", - Gcmaes128 = "GCMAES128", - Gcmaes256 = "GCMAES256" -} - -// @public -export enum KnownIkeIntegrity { - Gcmaes128 = "GCMAES128", - Gcmaes256 = "GCMAES256", - MD5 = "MD5", - SHA1 = "SHA1", - SHA256 = "SHA256", - SHA384 = "SHA384" -} - -// @public -export enum KnownInboundSecurityRulesProtocol { - TCP = "TCP", - UDP = "UDP" -} - -// @public -export enum KnownInboundSecurityRuleType { - AutoExpire = "AutoExpire", - Permanent = "Permanent" -} - -// @public -export enum KnownIPAllocationMethod { - Dynamic = "Dynamic", - Static = "Static" -} - -// @public -export enum KnownIpAllocationType { - Hypernet = "Hypernet", - Undefined = "Undefined" -} - -// @public -export enum KnownIpFlowProtocol { - TCP = "TCP", - UDP = "UDP" -} - -// @public -export enum KnownIpsecEncryption { - AES128 = "AES128", - AES192 = "AES192", - AES256 = "AES256", - DES = "DES", - DES3 = "DES3", - Gcmaes128 = "GCMAES128", - Gcmaes192 = "GCMAES192", - Gcmaes256 = "GCMAES256", - None = "None" -} - -// @public -export enum KnownIpsecIntegrity { - Gcmaes128 = "GCMAES128", - Gcmaes192 = "GCMAES192", - Gcmaes256 = "GCMAES256", - MD5 = "MD5", - SHA1 = "SHA1", - SHA256 = "SHA256" -} - -// @public -export enum KnownIpType { - IPv4 = "IPv4", - IPv6 = "IPv6" -} - -// @public -export enum KnownIPVersion { - IPv4 = "IPv4", - IPv6 = "IPv6" -} - -// @public -export enum KnownIsGlobal { - False = "False", - True = "True" -} - -// @public -export enum KnownIsRollback { - False = "false", - True = "true" -} - -// @public -export enum KnownIssueType { - AgentStopped = "AgentStopped", - DnsResolution = "DnsResolution", - GuestFirewall = "GuestFirewall", - NetworkSecurityRule = "NetworkSecurityRule", - Platform = "Platform", - PortThrottled = "PortThrottled", - SocketBind = "SocketBind", - Unknown = "Unknown", - UserDefinedRoute = "UserDefinedRoute" -} - -// @public -export enum KnownIsWorkloadProtected { - False = "False", - True = "True" -} - -// @public -export enum KnownLoadBalancerBackendAddressAdminState { - Down = "Down", - None = "None", - Up = "Up" -} - -// @public -export enum KnownLoadBalancerOutboundRuleProtocol { - All = "All", - Tcp = "Tcp", - Udp = "Udp" -} - -// @public -export enum KnownLoadBalancerScope { - Private = "Private", - Public = "Public" -} - -// @public -export enum KnownLoadBalancerSkuName { - Basic = "Basic", - Gateway = "Gateway", - Standard = "Standard" -} - -// @public -export enum KnownLoadBalancerSkuTier { - Global = "Global", - Regional = "Regional" -} - -// @public -export enum KnownLoadDistribution { - Default = "Default", - SourceIP = "SourceIP", - SourceIPProtocol = "SourceIPProtocol" -} - -// @public -export enum KnownManagedRuleEnabledState { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownNatGatewaySkuName { - Standard = "Standard", - StandardV2 = "StandardV2" -} - -// @public -export enum KnownNetworkIntentPolicyBasedService { - All = "All", - AllowRulesOnly = "AllowRulesOnly", - None = "None" -} - -// @public -export enum KnownNetworkInterfaceAuxiliaryMode { - AcceleratedConnections = "AcceleratedConnections", - Floating = "Floating", - MaxConnections = "MaxConnections", - None = "None" -} - -// @public -export enum KnownNetworkInterfaceAuxiliarySku { - A1 = "A1", - A2 = "A2", - A4 = "A4", - A8 = "A8", - None = "None" -} - -// @public -export enum KnownNetworkInterfaceMigrationPhase { - Abort = "Abort", - Commit = "Commit", - Committed = "Committed", - None = "None", - Prepare = "Prepare" -} - -// @public -export enum KnownNetworkInterfaceNicType { - Elastic = "Elastic", - Standard = "Standard" -} - -// @public -export enum KnownNetworkOperationStatus { - Failed = "Failed", - InProgress = "InProgress", - Succeeded = "Succeeded" -} - -// @public -export enum KnownNetworkProtocol { - Any = "Any", - Icmp = "ICMP", - TCP = "TCP", - UDP = "UDP" -} - -// @public -export enum KnownNextHopType { - HyperNetGateway = "HyperNetGateway", - Internet = "Internet", - None = "None", - VirtualAppliance = "VirtualAppliance", - VirtualNetworkGateway = "VirtualNetworkGateway", - VnetLocal = "VnetLocal" -} - -// @public -export enum KnownNextStep { - Continue = "Continue", - Terminate = "Terminate", - Unknown = "Unknown" -} - -// @public -export enum KnownNicTypeInRequest { - PrivateNic = "PrivateNic", - PublicNic = "PublicNic" -} - -// @public -export enum KnownNicTypeInResponse { - AdditionalNic = "AdditionalNic", - PrivateNic = "PrivateNic", - PublicNic = "PublicNic" -} - -// @public -export enum KnownNspLinkProvisioningState { - Accepted = "Accepted", - Creating = "Creating", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded", - Updating = "Updating", - WaitForRemoteCompletion = "WaitForRemoteCompletion" -} - -// @public -export enum KnownNspLinkStatus { - Approved = "Approved", - Disconnected = "Disconnected", - Pending = "Pending", - Rejected = "Rejected" -} - -// @public -export enum KnownNspProvisioningState { - Accepted = "Accepted", - Creating = "Creating", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded", - Updating = "Updating" -} - -// @public -export enum KnownNvaNicType { - AdditionalPrivateNic = "AdditionalPrivateNic", - AdditionalPublicNic = "AdditionalPublicNic", - PrivateNic = "PrivateNic", - PublicNic = "PublicNic" -} - -// @public -export enum KnownOfficeTrafficCategory { - All = "All", - None = "None", - Optimize = "Optimize", - OptimizeAndAllow = "OptimizeAndAllow" -} - -// @public -export enum KnownOrigin { - Inbound = "Inbound", - Local = "Local", - Outbound = "Outbound" -} - -// @public -export enum KnownOutputType { - Workspace = "Workspace" -} - -// @public -export enum KnownOwaspCrsExclusionEntryMatchVariable { - RequestArgKeys = "RequestArgKeys", - RequestArgNames = "RequestArgNames", - RequestArgValues = "RequestArgValues", - RequestCookieKeys = "RequestCookieKeys", - RequestCookieNames = "RequestCookieNames", - RequestCookieValues = "RequestCookieValues", - RequestHeaderKeys = "RequestHeaderKeys", - RequestHeaderNames = "RequestHeaderNames", - RequestHeaderValues = "RequestHeaderValues" -} - -// @public -export enum KnownOwaspCrsExclusionEntrySelectorMatchOperator { - Contains = "Contains", - EndsWith = "EndsWith", - Equals = "Equals", - EqualsAny = "EqualsAny", - StartsWith = "StartsWith" -} - -// @public -export enum KnownPcError { - AgentStopped = "AgentStopped", - CaptureFailed = "CaptureFailed", - InternalError = "InternalError", - LocalFileFailed = "LocalFileFailed", - StorageFailed = "StorageFailed" -} - -// @public -export enum KnownPcProtocol { - Any = "Any", - TCP = "TCP", - UDP = "UDP" -} - -// @public -export enum KnownPcStatus { - Error = "Error", - NotStarted = "NotStarted", - Running = "Running", - Stopped = "Stopped", - Unknown = "Unknown" -} - -// @public -export enum KnownPeeringEnforcement { - Enforced = "Enforced", - Unenforced = "Unenforced" -} - -// @public -export enum KnownPfsGroup { - ECP256 = "ECP256", - ECP384 = "ECP384", - None = "None", - PFS1 = "PFS1", - PFS14 = "PFS14", - PFS2 = "PFS2", - PFS2048 = "PFS2048", - PFS24 = "PFS24", - Pfsmm = "PFSMM" -} - -// @public -export enum KnownPreferredIPVersion { - IPv4 = "IPv4", - IPv6 = "IPv6" -} - -// @public -export enum KnownPreferredRoutingGateway { - ExpressRoute = "ExpressRoute", - None = "None", - VpnGateway = "VpnGateway" -} - -// @public -export enum KnownPrivateEndpointIPVersionType { - DualStack = "DualStack", - IPv4 = "IPv4", - IPv6 = "IPv6" -} - -// @public -export enum KnownPrivateEndpointVNetPolicies { - Basic = "Basic", - Disabled = "Disabled" -} - -// @public -export enum KnownProbeNoHealthyBackendsBehavior { - AllProbedDown = "AllProbedDown", - AllProbedUp = "AllProbedUp" -} - -// @public -export enum KnownProbeProtocol { - Http = "Http", - Https = "Https", - Tcp = "Tcp" -} - -// @public -export enum KnownProcessorArchitecture { - Amd64 = "Amd64", - X86 = "X86" -} - -// @public -export enum KnownProtocol { - Http = "Http", - Https = "Https", - Icmp = "Icmp", - Tcp = "Tcp" -} - -// @public -export enum KnownProtocolType { - Ah = "Ah", - All = "All", - DoNotUse = "DoNotUse", - Esp = "Esp", - Gre = "Gre", - Icmp = "Icmp", - Tcp = "Tcp", - Udp = "Udp", - Vxlan = "Vxlan" -} - -// @public -export enum KnownProvisioningState { - Canceled = "Canceled", - Creating = "Creating", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded", - Updating = "Updating" -} - -// @public -export enum KnownPublicIPAddressMigrationPhase { - Abort = "Abort", - Commit = "Commit", - Committed = "Committed", - None = "None", - Prepare = "Prepare" -} - -// @public -export enum KnownPublicIPAddressSkuName { - Basic = "Basic", - Standard = "Standard", - StandardV2 = "StandardV2" -} - -// @public -export enum KnownPublicIPAddressSkuTier { - Global = "Global", - Regional = "Regional" -} - -// @public -export enum KnownPublicIPPrefixSkuName { - Standard = "Standard", - StandardV2 = "StandardV2" -} - -// @public -export enum KnownPublicIPPrefixSkuTier { - Global = "Global", - Regional = "Regional" -} - -// @public -export enum KnownResiliencyModel { - MultiHomed = "MultiHomed", - SingleHomed = "SingleHomed" -} - -// @public -export enum KnownRouteFilterRuleType { - Community = "Community" -} - -// @public -export enum KnownRouteMapActionType { - Add = "Add", - Drop = "Drop", - Remove = "Remove", - Replace = "Replace", - Unknown = "Unknown" -} - -// @public -export enum KnownRouteMapMatchCondition { - Contains = "Contains", - Equals = "Equals", - NotContains = "NotContains", - NotEquals = "NotEquals", - Unknown = "Unknown" -} - -// @public -export enum KnownRouteNextHopType { - Internet = "Internet", - None = "None", - VirtualAppliance = "VirtualAppliance", - VirtualNetworkGateway = "VirtualNetworkGateway", - VnetLocal = "VnetLocal" -} - -// @public -export enum KnownRouteTableUsageMode { - ManagedOnly = "ManagedOnly", - UseExisting = "UseExisting" -} - -// @public -export enum KnownRoutingRuleDestinationType { - AddressPrefix = "AddressPrefix", - ServiceTag = "ServiceTag" -} - -// @public -export enum KnownRoutingRuleNextHopType { - Internet = "Internet", - NoNextHop = "NoNextHop", - VirtualAppliance = "VirtualAppliance", - VirtualNetworkGateway = "VirtualNetworkGateway", - VnetLocal = "VnetLocal" -} - -// @public -export enum KnownRoutingState { - Failed = "Failed", - None = "None", - Provisioned = "Provisioned", - Provisioning = "Provisioning" -} - -// @public -export enum KnownScopeConnectionState { - Conflict = "Conflict", - Connected = "Connected", - Pending = "Pending", - Rejected = "Rejected", - Revoked = "Revoked" -} - -// @public -export enum KnownScrubbingRuleEntryMatchOperator { - Equals = "Equals", - EqualsAny = "EqualsAny" -} - -// @public -export enum KnownScrubbingRuleEntryMatchVariable { - RequestArgNames = "RequestArgNames", - RequestCookieNames = "RequestCookieNames", - RequestHeaderNames = "RequestHeaderNames", - RequestIPAddress = "RequestIPAddress", - RequestJsonArgNames = "RequestJSONArgNames", - RequestPostArgNames = "RequestPostArgNames" -} - -// @public -export enum KnownScrubbingRuleEntryState { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownSecurityConfigurationRuleAccess { - Allow = "Allow", - AlwaysAllow = "AlwaysAllow", - Deny = "Deny" -} - -// @public -export enum KnownSecurityConfigurationRuleDirection { - Inbound = "Inbound", - Outbound = "Outbound" -} - -// @public -export enum KnownSecurityConfigurationRuleProtocol { - Ah = "Ah", - Any = "Any", - Esp = "Esp", - Icmp = "Icmp", - Tcp = "Tcp", - Udp = "Udp" -} - -// @public -export enum KnownSecurityPartnerProviderConnectionStatus { - Connected = "Connected", - NotConnected = "NotConnected", - PartiallyConnected = "PartiallyConnected", - Unknown = "Unknown" -} - -// @public -export enum KnownSecurityProviderName { - Checkpoint = "Checkpoint", - IBoss = "IBoss", - ZScaler = "ZScaler" -} - -// @public -export enum KnownSecurityRuleAccess { - Allow = "Allow", - Deny = "Deny" -} - -// @public -export enum KnownSecurityRuleDirection { - Inbound = "Inbound", - Outbound = "Outbound" -} - -// @public -export enum KnownSecurityRuleProtocol { - Ah = "Ah", - Asterisk = "*", - Esp = "Esp", - Icmp = "Icmp", - Tcp = "Tcp", - Udp = "Udp" -} - -// @public -export enum KnownSensitivityType { - High = "High", - Low = "Low", - Medium = "Medium" -} - -// @public -export enum KnownServiceGatewaySkuName { - Standard = "Standard" -} - -// @public -export enum KnownServiceGatewaySkuTier { - Regional = "Regional" -} - -// @public -export enum KnownServiceProviderProvisioningState { - Deprovisioning = "Deprovisioning", - NotProvisioned = "NotProvisioned", - Provisioned = "Provisioned", - Provisioning = "Provisioning" -} - -// @public -export enum KnownServiceType { - Inbound = "Inbound", - InboundOutbound = "InboundOutbound", - Outbound = "Outbound" -} - -// @public -export enum KnownServiceUpdateAction { - FullUpdate = "FullUpdate", - PartialUpdate = "PartialUpdate" -} - -// @public -export enum KnownSeverity { - Error = "Error", - Warning = "Warning" -} - -// @public -export enum KnownSharingScope { - DelegatedServices = "DelegatedServices", - Tenant = "Tenant" -} - -// @public -export enum KnownSyncMode { - Automatic = "Automatic", - Manual = "Manual" -} - -// @public -export enum KnownSyncRemoteAddressSpace { - True = "true" -} - -// @public -export enum KnownTransportProtocol { - All = "All", - Quic = "Quic", - Tcp = "Tcp", - Udp = "Udp" -} - -// @public -export enum KnownTunnelConnectionStatus { - Connected = "Connected", - Connecting = "Connecting", - NotConnected = "NotConnected", - Unknown = "Unknown" -} - -// @public -export enum KnownUpdateAction { - FullUpdate = "FullUpdate", - PartialUpdate = "PartialUpdate" -} - -// @public -export enum KnownUsageUnit { - Count = "Count" -} - -// @public -export enum KnownUseHubGateway { - False = "False", - True = "True" -} - -// @public -export enum KnownVerbosityLevel { - Full = "Full", - Minimum = "Minimum", - Normal = "Normal" -} - -// @public -export enum KnownVirtualNetworkEncryptionEnforcement { - AllowUnencrypted = "AllowUnencrypted", - DropUnencrypted = "DropUnencrypted" -} - -// @public -export enum KnownVirtualNetworkGatewayConnectionMode { - Default = "Default", - InitiatorOnly = "InitiatorOnly", - ResponderOnly = "ResponderOnly" -} - -// @public -export enum KnownVirtualNetworkGatewayConnectionProtocol { - IKEv1 = "IKEv1", - IKEv2 = "IKEv2" -} - -// @public -export enum KnownVirtualNetworkGatewayConnectionStatus { - Connected = "Connected", - Connecting = "Connecting", - NotConnected = "NotConnected", - Unknown = "Unknown" -} - -// @public -export enum KnownVirtualNetworkGatewayConnectionType { - ExpressRoute = "ExpressRoute", - IPsec = "IPsec", - Vnet2Vnet = "Vnet2Vnet", - VPNClient = "VPNClient" -} - -// @public -export enum KnownVirtualNetworkGatewayMigrationPhase { - Abort = "Abort", - AbortSucceeded = "AbortSucceeded", - Commit = "Commit", - CommitSucceeded = "CommitSucceeded", - Execute = "Execute", - ExecuteSucceeded = "ExecuteSucceeded", - None = "None", - Prepare = "Prepare", - PrepareSucceeded = "PrepareSucceeded" -} - -// @public -export enum KnownVirtualNetworkGatewayMigrationState { - Failed = "Failed", - InProgress = "InProgress", - None = "None", - Succeeded = "Succeeded" -} - -// @public -export enum KnownVirtualNetworkGatewayMigrationType { - UpgradeDeploymentToStandardIP = "UpgradeDeploymentToStandardIP" -} - -// @public -export enum KnownVirtualNetworkGatewaySkuName { - Basic = "Basic", - ErGw1AZ = "ErGw1AZ", - ErGw2AZ = "ErGw2AZ", - ErGw3AZ = "ErGw3AZ", - ErGwScale = "ErGwScale", - HighPerformance = "HighPerformance", - Standard = "Standard", - UltraPerformance = "UltraPerformance", - VpnGw1 = "VpnGw1", - VpnGw1AZ = "VpnGw1AZ", - VpnGw2 = "VpnGw2", - VpnGw2AZ = "VpnGw2AZ", - VpnGw3 = "VpnGw3", - VpnGw3AZ = "VpnGw3AZ", - VpnGw4 = "VpnGw4", - VpnGw4AZ = "VpnGw4AZ", - VpnGw5 = "VpnGw5", - VpnGw5AZ = "VpnGw5AZ" -} - -// @public -export enum KnownVirtualNetworkGatewaySkuTier { - Basic = "Basic", - ErGw1AZ = "ErGw1AZ", - ErGw2AZ = "ErGw2AZ", - ErGw3AZ = "ErGw3AZ", - ErGwScale = "ErGwScale", - HighPerformance = "HighPerformance", - Standard = "Standard", - UltraPerformance = "UltraPerformance", - VpnGw1 = "VpnGw1", - VpnGw1AZ = "VpnGw1AZ", - VpnGw2 = "VpnGw2", - VpnGw2AZ = "VpnGw2AZ", - VpnGw3 = "VpnGw3", - VpnGw3AZ = "VpnGw3AZ", - VpnGw4 = "VpnGw4", - VpnGw4AZ = "VpnGw4AZ", - VpnGw5 = "VpnGw5", - VpnGw5AZ = "VpnGw5AZ" -} - -// @public -export enum KnownVirtualNetworkGatewayType { - ExpressRoute = "ExpressRoute", - LocalGateway = "LocalGateway", - Vpn = "Vpn" -} - -// @public -export enum KnownVirtualNetworkPeeringLevel { - FullyInSync = "FullyInSync", - LocalAndRemoteNotInSync = "LocalAndRemoteNotInSync", - LocalNotInSync = "LocalNotInSync", - RemoteNotInSync = "RemoteNotInSync" -} - -// @public -export enum KnownVirtualNetworkPeeringState { - Connected = "Connected", - Disconnected = "Disconnected", - Initiated = "Initiated" -} - -// @public -export enum KnownVirtualNetworkPrivateEndpointNetworkPolicies { - Disabled = "Disabled", - Enabled = "Enabled", - NetworkSecurityGroupEnabled = "NetworkSecurityGroupEnabled", - RouteTableEnabled = "RouteTableEnabled" -} - -// @public -export enum KnownVirtualNetworkPrivateLinkServiceNetworkPolicies { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownVirtualWanSecurityProviderType { - External = "External", - Native = "Native" -} - -// @public -export enum KnownVnetLocalRouteOverrideCriteria { - Contains = "Contains", - Equal = "Equal" -} - -// @public -export enum KnownVpnAuthenticationType { - AAD = "AAD", - Certificate = "Certificate", - Radius = "Radius" -} - -// @public -export enum KnownVpnClientProtocol { - IkeV2 = "IkeV2", - OpenVPN = "OpenVPN", - Sstp = "SSTP" -} - -// @public -export enum KnownVpnConnectionStatus { - Connected = "Connected", - Connecting = "Connecting", - NotConnected = "NotConnected", - Unknown = "Unknown" -} - -// @public -export enum KnownVpnGatewayGeneration { - Generation1 = "Generation1", - Generation2 = "Generation2", - None = "None" -} - -// @public -export enum KnownVpnGatewayTunnelingProtocol { - IkeV2 = "IkeV2", - OpenVPN = "OpenVPN" -} - -// @public -export enum KnownVpnLinkConnectionMode { - Default = "Default", - InitiatorOnly = "InitiatorOnly", - ResponderOnly = "ResponderOnly" -} - -// @public -export enum KnownVpnNatRuleMode { - EgressSnat = "EgressSnat", - IngressSnat = "IngressSnat" -} - -// @public -export enum KnownVpnNatRuleType { - Dynamic = "Dynamic", - Static = "Static" -} - -// @public -export enum KnownVpnPolicyMemberAttributeType { - AADGroupId = "AADGroupId", - CertificateGroupId = "CertificateGroupId", - RadiusAzureGroupId = "RadiusAzureGroupId" -} - -// @public -export enum KnownVpnType { - PolicyBased = "PolicyBased", - RouteBased = "RouteBased" -} - -// @public -export enum KnownWebApplicationFirewallAction { - Allow = "Allow", - Block = "Block", - Captcha = "CAPTCHA", - JSChallenge = "JSChallenge", - Log = "Log" -} - -// @public -export enum KnownWebApplicationFirewallEnabledState { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownWebApplicationFirewallMatchVariable { - PostArgs = "PostArgs", - QueryString = "QueryString", - RemoteAddr = "RemoteAddr", - RequestBody = "RequestBody", - RequestCookies = "RequestCookies", - RequestHeaders = "RequestHeaders", - RequestMethod = "RequestMethod", - RequestUri = "RequestUri" -} - -// @public -export enum KnownWebApplicationFirewallMode { - Detection = "Detection", - Prevention = "Prevention" -} - -// @public -export enum KnownWebApplicationFirewallOperator { - Any = "Any", - BeginsWith = "BeginsWith", - Contains = "Contains", - EndsWith = "EndsWith", - Equal = "Equal", - GeoMatch = "GeoMatch", - GreaterThan = "GreaterThan", - GreaterThanOrEqual = "GreaterThanOrEqual", - IPMatch = "IPMatch", - LessThan = "LessThan", - LessThanOrEqual = "LessThanOrEqual", - Regex = "Regex" -} - -// @public -export enum KnownWebApplicationFirewallPolicyResourceState { - Creating = "Creating", - Deleting = "Deleting", - Disabled = "Disabled", - Disabling = "Disabling", - Enabled = "Enabled", - Enabling = "Enabling" -} - -// @public -export enum KnownWebApplicationFirewallRuleType { - Invalid = "Invalid", - MatchRule = "MatchRule", - RateLimitRule = "RateLimitRule" -} - -// @public -export enum KnownWebApplicationFirewallScrubbingState { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownWebApplicationFirewallState { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownWebApplicationFirewallTransform { - HtmlEntityDecode = "HtmlEntityDecode", - Lowercase = "Lowercase", - RemoveNulls = "RemoveNulls", - Trim = "Trim", - Uppercase = "Uppercase", - UrlDecode = "UrlDecode", - UrlEncode = "UrlEncode" -} - -// @public -export interface ListActiveConnectivityConfigurationsOptionalParams extends coreClient.OperationOptions { - top?: number; -} - -// @public -export type ListActiveConnectivityConfigurationsResponse = ActiveConnectivityConfigurationsListResult; - -// @public -export interface ListActiveSecurityAdminRulesOptionalParams extends coreClient.OperationOptions { - top?: number; -} - -// @public -export type ListActiveSecurityAdminRulesResponse = ActiveSecurityAdminRulesListResult; - -// @public -export interface ListHubRouteTablesResult { - nextLink?: string; - value?: HubRouteTable[]; -} - -// @public -export interface ListHubVirtualNetworkConnectionsResult { - nextLink?: string; - value?: HubVirtualNetworkConnection[]; -} - -// @public -export interface ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams extends coreClient.OperationOptions { - top?: number; -} - -// @public -export type ListNetworkManagerEffectiveConnectivityConfigurationsResponse = NetworkManagerEffectiveConnectivityConfigurationListResult; - -// @public -export interface ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams extends coreClient.OperationOptions { - top?: number; -} - -// @public -export type ListNetworkManagerEffectiveSecurityAdminRulesResponse = NetworkManagerEffectiveSecurityAdminRulesListResult; - -// @public -export interface ListP2SVpnGatewaysResult { - nextLink?: string; - value?: P2SVpnGateway[]; -} - -// @public -export interface ListRouteMapsResult { - nextLink?: string; - value?: RouteMap[]; -} - -// @public -export interface ListRoutingIntentResult { - nextLink?: string; - value?: RoutingIntent[]; -} - -// @public -export interface ListVirtualHubBgpConnectionResults { - nextLink?: string; - value?: BgpConnection[]; -} - -// @public -export interface ListVirtualHubIpConfigurationResults { - nextLink?: string; - value?: HubIpConfiguration[]; -} - -// @public -export interface ListVirtualHubRouteTableV2SResult { - nextLink?: string; - value?: VirtualHubRouteTableV2[]; -} - -// @public -export interface ListVirtualHubsResult { - nextLink?: string; - value?: VirtualHub[]; -} - -// @public -export interface ListVirtualNetworkGatewayNatRulesResult { - nextLink?: string; - value?: VirtualNetworkGatewayNatRule[]; -} - -// @public -export interface ListVirtualWANsResult { - nextLink?: string; - value?: VirtualWAN[]; -} - -// @public -export interface ListVpnConnectionsResult { - nextLink?: string; - value?: VpnConnection[]; -} - -// @public -export interface ListVpnGatewayNatRulesResult { - nextLink?: string; - value?: VpnGatewayNatRule[]; -} - -// @public -export interface ListVpnGatewaysResult { - nextLink?: string; - value?: VpnGateway[]; -} - -// @public -export interface ListVpnServerConfigurationPolicyGroupsResult { - nextLink?: string; - value?: VpnServerConfigurationPolicyGroup[]; -} - -// @public -export interface ListVpnServerConfigurationsResult { - nextLink?: string; - value?: VpnServerConfiguration[]; -} - -// @public -export interface ListVpnSiteLinkConnectionsResult { - nextLink?: string; - value?: VpnSiteLinkConnection[]; -} - -// @public -export interface ListVpnSiteLinksResult { - nextLink?: string; - value?: VpnSiteLink[]; -} - -// @public -export interface ListVpnSitesResult { - nextLink?: string; - value?: VpnSite[]; -} - -// @public -export interface LoadBalancer extends Resource { - backendAddressPools?: BackendAddressPool[]; - readonly etag?: string; - extendedLocation?: ExtendedLocation; - frontendIPConfigurations?: FrontendIPConfiguration[]; - inboundNatPools?: InboundNatPool[]; - inboundNatRules?: InboundNatRule[]; - loadBalancingRules?: LoadBalancingRule[]; - outboundRules?: OutboundRule[]; - probes?: Probe[]; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - scope?: LoadBalancerScope; - sku?: LoadBalancerSku; -} - -// @public -export interface LoadBalancerBackendAddress { - adminState?: LoadBalancerBackendAddressAdminState; - readonly inboundNatRulesPortMapping?: NatRulePortMapping[]; - ipAddress?: string; - loadBalancerFrontendIPConfiguration?: SubResource; - name?: string; - readonly networkInterfaceIPConfiguration?: SubResource; - subnet?: SubResource; - virtualNetwork?: SubResource; -} - -// @public -export type LoadBalancerBackendAddressAdminState = string; - -// @public -export interface LoadBalancerBackendAddressPoolListResult { - readonly nextLink?: string; - value?: BackendAddressPool[]; -} - -// @public -export interface LoadBalancerBackendAddressPools { - beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, parameters: BackendAddressPool, options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams): Promise, LoadBalancerBackendAddressPoolsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, parameters: BackendAddressPool, options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams): Promise; - get(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, options?: LoadBalancerBackendAddressPoolsGetOptionalParams): Promise; - list(resourceGroupName: string, loadBalancerName: string, options?: LoadBalancerBackendAddressPoolsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LoadBalancerBackendAddressPoolsCreateOrUpdateResponse = BackendAddressPool; - -// @public -export interface LoadBalancerBackendAddressPoolsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface LoadBalancerBackendAddressPoolsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerBackendAddressPoolsGetResponse = BackendAddressPool; - -// @public -export interface LoadBalancerBackendAddressPoolsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerBackendAddressPoolsListNextResponse = LoadBalancerBackendAddressPoolListResult; - -// @public -export interface LoadBalancerBackendAddressPoolsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerBackendAddressPoolsListResponse = LoadBalancerBackendAddressPoolListResult; - -// @public -export interface LoadBalancerFrontendIPConfigurationListResult { - readonly nextLink?: string; - value?: FrontendIPConfiguration[]; -} - -// @public -export interface LoadBalancerFrontendIPConfigurations { - get(resourceGroupName: string, loadBalancerName: string, frontendIPConfigurationName: string, options?: LoadBalancerFrontendIPConfigurationsGetOptionalParams): Promise; - list(resourceGroupName: string, loadBalancerName: string, options?: LoadBalancerFrontendIPConfigurationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface LoadBalancerFrontendIPConfigurationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerFrontendIPConfigurationsGetResponse = FrontendIPConfiguration; - -// @public -export interface LoadBalancerFrontendIPConfigurationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerFrontendIPConfigurationsListNextResponse = LoadBalancerFrontendIPConfigurationListResult; - -// @public -export interface LoadBalancerFrontendIPConfigurationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerFrontendIPConfigurationsListResponse = LoadBalancerFrontendIPConfigurationListResult; - -// @public -export interface LoadBalancerHealthPerRule { - down?: number; - loadBalancerBackendAddresses?: LoadBalancerHealthPerRulePerBackendAddress[]; - up?: number; -} - -// @public -export interface LoadBalancerHealthPerRulePerBackendAddress { - ipAddress?: string; - networkInterfaceIPConfigurationId?: string; - reason?: string; - state?: string; -} - -// @public -export interface LoadBalancerListResult { - readonly nextLink?: string; - value?: LoadBalancer[]; -} - -// @public -export interface LoadBalancerLoadBalancingRuleListResult { - readonly nextLink?: string; - value?: LoadBalancingRule[]; -} - -// @public -export interface LoadBalancerLoadBalancingRules { - beginHealth(groupName: string, loadBalancerName: string, loadBalancingRuleName: string, options?: LoadBalancerLoadBalancingRulesHealthOptionalParams): Promise, LoadBalancerLoadBalancingRulesHealthResponse>>; - beginHealthAndWait(groupName: string, loadBalancerName: string, loadBalancingRuleName: string, options?: LoadBalancerLoadBalancingRulesHealthOptionalParams): Promise; - get(resourceGroupName: string, loadBalancerName: string, loadBalancingRuleName: string, options?: LoadBalancerLoadBalancingRulesGetOptionalParams): Promise; - list(resourceGroupName: string, loadBalancerName: string, options?: LoadBalancerLoadBalancingRulesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface LoadBalancerLoadBalancingRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerLoadBalancingRulesGetResponse = LoadBalancingRule; - -// @public -export interface LoadBalancerLoadBalancingRulesHealthHeaders { - location?: string; -} - -// @public -export interface LoadBalancerLoadBalancingRulesHealthOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LoadBalancerLoadBalancingRulesHealthResponse = LoadBalancerHealthPerRule; - -// @public -export interface LoadBalancerLoadBalancingRulesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerLoadBalancingRulesListNextResponse = LoadBalancerLoadBalancingRuleListResult; - -// @public -export interface LoadBalancerLoadBalancingRulesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerLoadBalancingRulesListResponse = LoadBalancerLoadBalancingRuleListResult; - -// @public -export interface LoadBalancerNetworkInterfaces { - list(resourceGroupName: string, loadBalancerName: string, options?: LoadBalancerNetworkInterfacesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface LoadBalancerNetworkInterfacesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerNetworkInterfacesListNextResponse = NetworkInterfaceListResult; - -// @public -export interface LoadBalancerNetworkInterfacesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerNetworkInterfacesListResponse = NetworkInterfaceListResult; - -// @public -export interface LoadBalancerOutboundRuleListResult { - readonly nextLink?: string; - value?: OutboundRule[]; -} - -// @public -export type LoadBalancerOutboundRuleProtocol = string; - -// @public -export interface LoadBalancerOutboundRules { - get(resourceGroupName: string, loadBalancerName: string, outboundRuleName: string, options?: LoadBalancerOutboundRulesGetOptionalParams): Promise; - list(resourceGroupName: string, loadBalancerName: string, options?: LoadBalancerOutboundRulesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface LoadBalancerOutboundRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerOutboundRulesGetResponse = OutboundRule; - -// @public -export interface LoadBalancerOutboundRulesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerOutboundRulesListNextResponse = LoadBalancerOutboundRuleListResult; - -// @public -export interface LoadBalancerOutboundRulesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerOutboundRulesListResponse = LoadBalancerOutboundRuleListResult; - -// @public -export interface LoadBalancerProbeListResult { - readonly nextLink?: string; - value?: Probe[]; -} - -// @public -export interface LoadBalancerProbes { - get(resourceGroupName: string, loadBalancerName: string, probeName: string, options?: LoadBalancerProbesGetOptionalParams): Promise; - list(resourceGroupName: string, loadBalancerName: string, options?: LoadBalancerProbesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface LoadBalancerProbesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerProbesGetResponse = Probe; - -// @public -export interface LoadBalancerProbesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerProbesListNextResponse = LoadBalancerProbeListResult; - -// @public -export interface LoadBalancerProbesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancerProbesListResponse = LoadBalancerProbeListResult; - -// @public -export interface LoadBalancers { - beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: LoadBalancer, options?: LoadBalancersCreateOrUpdateOptionalParams): Promise, LoadBalancersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, loadBalancerName: string, parameters: LoadBalancer, options?: LoadBalancersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, loadBalancerName: string, options?: LoadBalancersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, loadBalancerName: string, options?: LoadBalancersDeleteOptionalParams): Promise; - beginListInboundNatRulePortMappings(groupName: string, loadBalancerName: string, backendPoolName: string, parameters: QueryInboundNatRulePortMappingRequest, options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams): Promise, LoadBalancersListInboundNatRulePortMappingsResponse>>; - beginListInboundNatRulePortMappingsAndWait(groupName: string, loadBalancerName: string, backendPoolName: string, parameters: QueryInboundNatRulePortMappingRequest, options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams): Promise; - beginSwapPublicIpAddresses(location: string, parameters: LoadBalancerVipSwapRequest, options?: LoadBalancersSwapPublicIpAddressesOptionalParams): Promise, void>>; - beginSwapPublicIpAddressesAndWait(location: string, parameters: LoadBalancerVipSwapRequest, options?: LoadBalancersSwapPublicIpAddressesOptionalParams): Promise; - get(resourceGroupName: string, loadBalancerName: string, options?: LoadBalancersGetOptionalParams): Promise; - list(resourceGroupName: string, options?: LoadBalancersListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: LoadBalancersListAllOptionalParams): PagedAsyncIterableIterator; - migrateToIpBased(groupName: string, loadBalancerName: string, options?: LoadBalancersMigrateToIpBasedOptionalParams): Promise; - updateTags(resourceGroupName: string, loadBalancerName: string, parameters: TagsObject, options?: LoadBalancersUpdateTagsOptionalParams): Promise; -} - -// @public -export type LoadBalancerScope = string; - -// @public -export interface LoadBalancersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LoadBalancersCreateOrUpdateResponse = LoadBalancer; - -// @public -export interface LoadBalancersDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface LoadBalancersGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type LoadBalancersGetResponse = LoadBalancer; - -// @public -export interface LoadBalancerSku { - name?: LoadBalancerSkuName; - tier?: LoadBalancerSkuTier; -} - -// @public -export type LoadBalancerSkuName = string; - -// @public -export type LoadBalancerSkuTier = string; - -// @public -export interface LoadBalancersListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancersListAllNextResponse = LoadBalancerListResult; - -// @public -export interface LoadBalancersListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancersListAllResponse = LoadBalancerListResult; - -// @public -export interface LoadBalancersListInboundNatRulePortMappingsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LoadBalancersListInboundNatRulePortMappingsResponse = BackendAddressInboundNatRulePortMappings; - -// @public -export interface LoadBalancersListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancersListNextResponse = LoadBalancerListResult; - -// @public -export interface LoadBalancersListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancersListResponse = LoadBalancerListResult; - -// @public -export interface LoadBalancersMigrateToIpBasedOptionalParams extends coreClient.OperationOptions { - parameters?: MigrateLoadBalancerToIpBasedRequest; -} - -// @public -export type LoadBalancersMigrateToIpBasedResponse = MigratedPools; - -// @public -export interface LoadBalancersSwapPublicIpAddressesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface LoadBalancersUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LoadBalancersUpdateTagsResponse = LoadBalancer; - -// @public -export interface LoadBalancerVipSwapRequest { - frontendIPConfigurations?: LoadBalancerVipSwapRequestFrontendIPConfiguration[]; -} - -// @public -export interface LoadBalancerVipSwapRequestFrontendIPConfiguration { - id?: string; - publicIPAddress?: SubResource; -} - -// @public -export interface LoadBalancingRule extends SubResource { - backendAddressPool?: SubResource; - backendAddressPools?: SubResource[]; - backendPort?: number; - disableOutboundSnat?: boolean; - enableConnectionTracking?: boolean; - enableFloatingIP?: boolean; - enableTcpReset?: boolean; - readonly etag?: string; - frontendIPConfiguration?: SubResource; - frontendPort?: number; - idleTimeoutInMinutes?: number; - loadDistribution?: LoadDistribution; - name?: string; - probe?: SubResource; - protocol?: TransportProtocol; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export type LoadDistribution = string; - -// @public -export interface LocalNetworkGateway extends Resource { - bgpSettings?: BgpSettings; - readonly etag?: string; - fqdn?: string; - gatewayIpAddress?: string; - localNetworkAddressSpace?: AddressSpace; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; -} - -// @public -export interface LocalNetworkGatewayListResult { - readonly nextLink?: string; - value?: LocalNetworkGateway[]; -} - -// @public -export interface LocalNetworkGateways { - beginCreateOrUpdate(resourceGroupName: string, localNetworkGatewayName: string, parameters: LocalNetworkGateway, options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams): Promise, LocalNetworkGatewaysCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, localNetworkGatewayName: string, parameters: LocalNetworkGateway, options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, localNetworkGatewayName: string, options?: LocalNetworkGatewaysDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, localNetworkGatewayName: string, options?: LocalNetworkGatewaysDeleteOptionalParams): Promise; - get(resourceGroupName: string, localNetworkGatewayName: string, options?: LocalNetworkGatewaysGetOptionalParams): Promise; - list(resourceGroupName: string, options?: LocalNetworkGatewaysListOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, localNetworkGatewayName: string, parameters: TagsObject, options?: LocalNetworkGatewaysUpdateTagsOptionalParams): Promise; -} - -// @public -export interface LocalNetworkGatewaysCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LocalNetworkGatewaysCreateOrUpdateResponse = LocalNetworkGateway; - -// @public -export interface LocalNetworkGatewaysDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface LocalNetworkGatewaysGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LocalNetworkGatewaysGetResponse = LocalNetworkGateway; - -// @public -export interface LocalNetworkGatewaysListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LocalNetworkGatewaysListNextResponse = LocalNetworkGatewayListResult; - -// @public -export interface LocalNetworkGatewaysListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LocalNetworkGatewaysListResponse = LocalNetworkGatewayListResult; - -// @public -export interface LocalNetworkGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LocalNetworkGatewaysUpdateTagsResponse = LocalNetworkGateway; - -// @public -export interface LogSpecification { - blobDuration?: string; - displayName?: string; - name?: string; -} - -// @public -export type ManagedRuleEnabledState = string; - -// @public -export interface ManagedRuleGroupOverride { - ruleGroupName: string; - rules?: ManagedRuleOverride[]; -} - -// @public -export interface ManagedRuleOverride { - action?: ActionType; - ruleId: string; - sensitivity?: SensitivityType; - state?: ManagedRuleEnabledState; -} - -// @public -export interface ManagedRulesDefinition { - exceptions?: ExceptionEntry[]; - exclusions?: OwaspCrsExclusionEntry[]; - managedRuleSets: ManagedRuleSet[]; -} - -// @public -export interface ManagedRuleSet { - readonly computedDisabledRules?: ManagedRuleSetRuleGroup[]; - ruleGroupOverrides?: ManagedRuleGroupOverride[]; - ruleSetType: string; - ruleSetVersion: string; -} - -// @public -export interface ManagedRuleSetRuleGroup { - ruleGroupName: string; - rules?: string[]; -} - -// @public -export interface ManagedServiceIdentity { - readonly principalId?: string; - readonly tenantId?: string; - type?: ResourceIdentityType; - userAssignedIdentities?: { - [propertyName: string]: Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties; - }; -} - -// @public -export interface ManagementGroupNetworkManagerConnections { - createOrUpdate(managementGroupId: string, networkManagerConnectionName: string, parameters: NetworkManagerConnection, options?: ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams): Promise; - delete(managementGroupId: string, networkManagerConnectionName: string, options?: ManagementGroupNetworkManagerConnectionsDeleteOptionalParams): Promise; - get(managementGroupId: string, networkManagerConnectionName: string, options?: ManagementGroupNetworkManagerConnectionsGetOptionalParams): Promise; - list(managementGroupId: string, options?: ManagementGroupNetworkManagerConnectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagementGroupNetworkManagerConnectionsCreateOrUpdateResponse = NetworkManagerConnection; - -// @public -export interface ManagementGroupNetworkManagerConnectionsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ManagementGroupNetworkManagerConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagementGroupNetworkManagerConnectionsGetResponse = NetworkManagerConnection; - -// @public -export interface ManagementGroupNetworkManagerConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagementGroupNetworkManagerConnectionsListNextResponse = NetworkManagerConnectionListResult; - -// @public -export interface ManagementGroupNetworkManagerConnectionsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type ManagementGroupNetworkManagerConnectionsListResponse = NetworkManagerConnectionListResult; - -// @public -export interface MatchCondition { - matchValues: string[]; - matchVariables: MatchVariable[]; - negationConditon?: boolean; - operator: WebApplicationFirewallOperator; - transforms?: WebApplicationFirewallTransform[]; -} - -// @public -export interface MatchedRule { - action?: string; - ruleName?: string; -} - -// @public -export interface MatchVariable { - selector?: string; - variableName: WebApplicationFirewallMatchVariable; -} - -// @public -export interface MetricSpecification { - aggregationType?: string; - availabilities?: Availability[]; - dimensions?: Dimension[]; - displayDescription?: string; - displayName?: string; - enableRegionalMdmAccount?: boolean; - fillGapWithZero?: boolean; - isInternal?: boolean; - metricFilterPattern?: string; - name?: string; - resourceIdDimensionNameOverride?: string; - sourceMdmAccount?: string; - sourceMdmNamespace?: string; - unit?: string; -} - -// @public -export interface MigratedPools { - migratedPools?: string[]; -} - -// @public -export interface MigrateLoadBalancerToIpBasedRequest { - pools?: string[]; -} - -// @public -export interface NatGateway extends Resource { - readonly etag?: string; - idleTimeoutInMinutes?: number; - readonly provisioningState?: ProvisioningState; - publicIpAddresses?: SubResource[]; - publicIpAddressesV6?: SubResource[]; - publicIpPrefixes?: SubResource[]; - publicIpPrefixesV6?: SubResource[]; - readonly resourceGuid?: string; - serviceGateway?: SubResource; - sku?: NatGatewaySku; - sourceVirtualNetwork?: SubResource; - readonly subnets?: SubResource[]; - zones?: string[]; -} - -// @public -export interface NatGatewayListResult { - nextLink?: string; - value?: NatGateway[]; -} - -// @public -export interface NatGateways { - beginCreateOrUpdate(resourceGroupName: string, natGatewayName: string, parameters: NatGateway, options?: NatGatewaysCreateOrUpdateOptionalParams): Promise, NatGatewaysCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, natGatewayName: string, parameters: NatGateway, options?: NatGatewaysCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, natGatewayName: string, options?: NatGatewaysDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, natGatewayName: string, options?: NatGatewaysDeleteOptionalParams): Promise; - get(resourceGroupName: string, natGatewayName: string, options?: NatGatewaysGetOptionalParams): Promise; - list(resourceGroupName: string, options?: NatGatewaysListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: NatGatewaysListAllOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, natGatewayName: string, parameters: TagsObject, options?: NatGatewaysUpdateTagsOptionalParams): Promise; -} - -// @public -export interface NatGatewaysCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NatGatewaysCreateOrUpdateResponse = NatGateway; - -// @public -export interface NatGatewaysDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NatGatewaysGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type NatGatewaysGetResponse = NatGateway; - -// @public -export interface NatGatewaySku { - name?: NatGatewaySkuName; -} - -// @public -export type NatGatewaySkuName = string; - -// @public -export interface NatGatewaysListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NatGatewaysListAllNextResponse = NatGatewayListResult; - -// @public -export interface NatGatewaysListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NatGatewaysListAllResponse = NatGatewayListResult; - -// @public -export interface NatGatewaysListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NatGatewaysListNextResponse = NatGatewayListResult; - -// @public -export interface NatGatewaysListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NatGatewaysListResponse = NatGatewayListResult; - -// @public -export interface NatGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NatGatewaysUpdateTagsResponse = NatGateway; - -// @public -export interface NatRule extends FirewallPolicyRule { - destinationAddresses?: string[]; - destinationPorts?: string[]; - ipProtocols?: FirewallPolicyRuleNetworkProtocol[]; - ruleType: "NatRule"; - sourceAddresses?: string[]; - sourceIpGroups?: string[]; - translatedAddress?: string; - translatedFqdn?: string; - translatedPort?: string; -} - -// @public -export interface NatRulePortMapping { - backendPort?: number; - frontendPort?: number; - inboundNatRuleName?: string; -} - -// @public -export interface NatRules { - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, natRuleName: string, natRuleParameters: VpnGatewayNatRule, options?: NatRulesCreateOrUpdateOptionalParams): Promise, NatRulesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, gatewayName: string, natRuleName: string, natRuleParameters: VpnGatewayNatRule, options?: NatRulesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, gatewayName: string, natRuleName: string, options?: NatRulesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, gatewayName: string, natRuleName: string, options?: NatRulesDeleteOptionalParams): Promise; - get(resourceGroupName: string, gatewayName: string, natRuleName: string, options?: NatRulesGetOptionalParams): Promise; - listByVpnGateway(resourceGroupName: string, gatewayName: string, options?: NatRulesListByVpnGatewayOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NatRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NatRulesCreateOrUpdateResponse = VpnGatewayNatRule; - -// @public -export interface NatRulesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NatRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NatRulesGetResponse = VpnGatewayNatRule; - -// @public -export interface NatRulesListByVpnGatewayNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NatRulesListByVpnGatewayNextResponse = ListVpnGatewayNatRulesResult; - -// @public -export interface NatRulesListByVpnGatewayOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NatRulesListByVpnGatewayResponse = ListVpnGatewayNatRulesResult; - -// @public -export interface NetworkConfigurationDiagnosticParameters { - profiles: NetworkConfigurationDiagnosticProfile[]; - targetResourceId: string; - verbosityLevel?: VerbosityLevel; -} - -// @public -export interface NetworkConfigurationDiagnosticProfile { - destination: string; - destinationPort: string; - direction: Direction; - protocol: string; - source: string; -} - -// @public -export interface NetworkConfigurationDiagnosticResponse { - readonly results?: NetworkConfigurationDiagnosticResult[]; -} - -// @public -export interface NetworkConfigurationDiagnosticResult { - networkSecurityGroupResult?: NetworkSecurityGroupResult; - profile?: NetworkConfigurationDiagnosticProfile; -} - -// @public -export interface NetworkGroup extends ChildResource { - description?: string; - memberType?: GroupMemberType; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly systemData?: SystemData; -} - -// @public -export interface NetworkGroupListResult { - nextLink?: string; - value?: NetworkGroup[]; -} - -// @public -export interface NetworkGroups { - beginDelete(resourceGroupName: string, networkManagerName: string, networkGroupName: string, options?: NetworkGroupsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, networkGroupName: string, options?: NetworkGroupsDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, networkGroupName: string, parameters: NetworkGroup, options?: NetworkGroupsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, networkGroupName: string, options?: NetworkGroupsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, options?: NetworkGroupsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkGroupsCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface NetworkGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type NetworkGroupsCreateOrUpdateResponse = NetworkGroupsCreateOrUpdateHeaders & NetworkGroup; - -// @public -export interface NetworkGroupsDeleteHeaders { - location?: string; -} - -// @public -export interface NetworkGroupsDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkGroupsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkGroupsGetResponse = NetworkGroup; - -// @public -export interface NetworkGroupsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkGroupsListNextResponse = NetworkGroupListResult; - -// @public -export interface NetworkGroupsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type NetworkGroupsListResponse = NetworkGroupListResult; - -// @public -export interface NetworkIntentPolicy extends Resource { - readonly etag?: string; -} - -// @public -export type NetworkIntentPolicyBasedService = string; - -// @public -export interface NetworkIntentPolicyConfiguration { - networkIntentPolicyName?: string; - sourceNetworkIntentPolicy?: NetworkIntentPolicy; -} - -// @public -export interface NetworkInterface extends Resource { - auxiliaryMode?: NetworkInterfaceAuxiliaryMode; - auxiliarySku?: NetworkInterfaceAuxiliarySku; - readonly defaultOutboundConnectivityEnabled?: boolean; - disableTcpStateTracking?: boolean; - dnsSettings?: NetworkInterfaceDnsSettings; - readonly dscpConfiguration?: SubResource; - enableAcceleratedNetworking?: boolean; - enableIPForwarding?: boolean; - readonly etag?: string; - extendedLocation?: ExtendedLocation; - readonly hostedWorkloads?: string[]; - ipConfigurations?: NetworkInterfaceIPConfiguration[]; - readonly macAddress?: string; - migrationPhase?: NetworkInterfaceMigrationPhase; - networkSecurityGroup?: NetworkSecurityGroup; - nicType?: NetworkInterfaceNicType; - readonly primary?: boolean; - readonly privateEndpoint?: PrivateEndpoint; - privateLinkService?: PrivateLinkService; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly tapConfigurations?: NetworkInterfaceTapConfiguration[]; - readonly virtualMachine?: SubResource; - readonly vnetEncryptionSupported?: boolean; - workloadType?: string; -} - -// @public -export interface NetworkInterfaceAssociation { - readonly id?: string; - securityRules?: SecurityRule[]; -} - -// @public -export type NetworkInterfaceAuxiliaryMode = string; - -// @public -export type NetworkInterfaceAuxiliarySku = string; - -// @public -export interface NetworkInterfaceDnsSettings { - readonly appliedDnsServers?: string[]; - dnsServers?: string[]; - internalDnsNameLabel?: string; - readonly internalDomainNameSuffix?: string; - readonly internalFqdn?: string; -} - -// @public -export interface NetworkInterfaceIPConfiguration extends SubResource { - applicationGatewayBackendAddressPools?: ApplicationGatewayBackendAddressPool[]; - applicationSecurityGroups?: ApplicationSecurityGroup[]; - readonly etag?: string; - gatewayLoadBalancer?: SubResource; - loadBalancerBackendAddressPools?: BackendAddressPool[]; - loadBalancerInboundNatRules?: InboundNatRule[]; - name?: string; - primary?: boolean; - privateIPAddress?: string; - privateIPAddressPrefixLength?: number; - privateIPAddressVersion?: IPVersion; - privateIPAllocationMethod?: IPAllocationMethod; - readonly privateLinkConnectionProperties?: NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties; - readonly provisioningState?: ProvisioningState; - publicIPAddress?: PublicIPAddress; - subnet?: Subnet; - type?: string; - virtualNetworkTaps?: VirtualNetworkTap[]; -} - -// @public -export interface NetworkInterfaceIPConfigurationListResult { - readonly nextLink?: string; - value?: NetworkInterfaceIPConfiguration[]; -} - -// @public -export interface NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties { - readonly fqdns?: string[]; - readonly groupId?: string; - readonly requiredMemberName?: string; -} - -// @public -export interface NetworkInterfaceIPConfigurations { - get(resourceGroupName: string, networkInterfaceName: string, ipConfigurationName: string, options?: NetworkInterfaceIPConfigurationsGetOptionalParams): Promise; - list(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfaceIPConfigurationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkInterfaceIPConfigurationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfaceIPConfigurationsGetResponse = NetworkInterfaceIPConfiguration; - -// @public -export interface NetworkInterfaceIPConfigurationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfaceIPConfigurationsListNextResponse = NetworkInterfaceIPConfigurationListResult; - -// @public -export interface NetworkInterfaceIPConfigurationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfaceIPConfigurationsListResponse = NetworkInterfaceIPConfigurationListResult; - -// @public -export interface NetworkInterfaceListResult { - readonly nextLink?: string; - value?: NetworkInterface[]; -} - -// @public -export interface NetworkInterfaceLoadBalancerListResult { - readonly nextLink?: string; - value?: LoadBalancer[]; -} - -// @public -export interface NetworkInterfaceLoadBalancers { - list(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfaceLoadBalancersListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkInterfaceLoadBalancersListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfaceLoadBalancersListNextResponse = NetworkInterfaceLoadBalancerListResult; - -// @public -export interface NetworkInterfaceLoadBalancersListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfaceLoadBalancersListResponse = NetworkInterfaceLoadBalancerListResult; - -// @public -export type NetworkInterfaceMigrationPhase = string; - -// @public -export type NetworkInterfaceNicType = string; - -// @public -export interface NetworkInterfaces { - beginCreateOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: NetworkInterface, options?: NetworkInterfacesCreateOrUpdateOptionalParams): Promise, NetworkInterfacesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, networkInterfaceName: string, parameters: NetworkInterface, options?: NetworkInterfacesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfacesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfacesDeleteOptionalParams): Promise; - beginGetEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams): Promise, NetworkInterfacesGetEffectiveRouteTableResponse>>; - beginGetEffectiveRouteTableAndWait(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams): Promise; - beginListEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams): Promise, NetworkInterfacesListEffectiveNetworkSecurityGroupsResponse>>; - beginListEffectiveNetworkSecurityGroupsAndWait(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams): Promise; - get(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfacesGetOptionalParams): Promise; - getCloudServiceNetworkInterface(resourceGroupName: string, cloudServiceName: string, roleInstanceName: string, networkInterfaceName: string, options?: NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams): Promise; - getVirtualMachineScaleSetIpConfiguration(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, ipConfigurationName: string, options?: NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams): Promise; - getVirtualMachineScaleSetNetworkInterface(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options?: NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams): Promise; - list(resourceGroupName: string, options?: NetworkInterfacesListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: NetworkInterfacesListAllOptionalParams): PagedAsyncIterableIterator; - listCloudServiceNetworkInterfaces(resourceGroupName: string, cloudServiceName: string, options?: NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams): PagedAsyncIterableIterator; - listCloudServiceRoleInstanceNetworkInterfaces(resourceGroupName: string, cloudServiceName: string, roleInstanceName: string, options?: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams): PagedAsyncIterableIterator; - listVirtualMachineScaleSetIpConfigurations(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options?: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams): PagedAsyncIterableIterator; - listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, options?: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams): PagedAsyncIterableIterator; - listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, options?: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, networkInterfaceName: string, parameters: TagsObject, options?: NetworkInterfacesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface NetworkInterfacesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkInterfacesCreateOrUpdateResponse = NetworkInterface; - -// @public -export interface NetworkInterfacesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type NetworkInterfacesGetCloudServiceNetworkInterfaceResponse = NetworkInterface; - -// @public -export interface NetworkInterfacesGetEffectiveRouteTableOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkInterfacesGetEffectiveRouteTableResponse = EffectiveRouteListResult; - -// @public -export interface NetworkInterfacesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type NetworkInterfacesGetResponse = NetworkInterface; - -// @public -export interface NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationResponse = NetworkInterfaceIPConfiguration; - -// @public -export interface NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceResponse = NetworkInterface; - -// @public -export interface NetworkInterfacesListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListAllNextResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListAllResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesListCloudServiceNetworkInterfacesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListCloudServiceNetworkInterfacesNextResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListCloudServiceNetworkInterfacesResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesNextResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkInterfacesListEffectiveNetworkSecurityGroupsResponse = EffectiveNetworkSecurityGroupListResult; - -// @public -export interface NetworkInterfacesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListNextResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsNextResponse = NetworkInterfaceIPConfigurationListResult; - -// @public -export interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsResponse = NetworkInterfaceIPConfigurationListResult; - -// @public -export interface NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesNextResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesNextResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesResponse = NetworkInterfaceListResult; - -// @public -export interface NetworkInterfacesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfacesUpdateTagsResponse = NetworkInterface; - -// @public -export interface NetworkInterfaceTapConfiguration extends SubResource { - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; - virtualNetworkTap?: VirtualNetworkTap; -} - -// @public -export interface NetworkInterfaceTapConfigurationListResult { - readonly nextLink?: string; - value?: NetworkInterfaceTapConfiguration[]; -} - -// @public -export interface NetworkInterfaceTapConfigurations { - beginCreateOrUpdate(resourceGroupName: string, networkInterfaceName: string, tapConfigurationName: string, tapConfigurationParameters: NetworkInterfaceTapConfiguration, options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams): Promise, NetworkInterfaceTapConfigurationsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, networkInterfaceName: string, tapConfigurationName: string, tapConfigurationParameters: NetworkInterfaceTapConfiguration, options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkInterfaceName: string, tapConfigurationName: string, options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkInterfaceName: string, tapConfigurationName: string, options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkInterfaceName: string, tapConfigurationName: string, options?: NetworkInterfaceTapConfigurationsGetOptionalParams): Promise; - list(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfaceTapConfigurationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkInterfaceTapConfigurationsCreateOrUpdateResponse = NetworkInterfaceTapConfiguration; - -// @public -export interface NetworkInterfaceTapConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkInterfaceTapConfigurationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfaceTapConfigurationsGetResponse = NetworkInterfaceTapConfiguration; - -// @public -export interface NetworkInterfaceTapConfigurationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfaceTapConfigurationsListNextResponse = NetworkInterfaceTapConfigurationListResult; - -// @public -export interface NetworkInterfaceTapConfigurationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkInterfaceTapConfigurationsListResponse = NetworkInterfaceTapConfigurationListResult; - -// @public (undocumented) -export class NetworkManagementClient extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: NetworkManagementClientOptionalParams); - constructor(credentials: coreAuth.TokenCredential, options?: NetworkManagementClientOptionalParams); - // (undocumented) - adminRuleCollections: AdminRuleCollections; - // (undocumented) - adminRules: AdminRules; - // (undocumented) - applicationGatewayPrivateEndpointConnections: ApplicationGatewayPrivateEndpointConnections; - // (undocumented) - applicationGatewayPrivateLinkResources: ApplicationGatewayPrivateLinkResources; - // (undocumented) - applicationGateways: ApplicationGateways; - // (undocumented) - applicationGatewayWafDynamicManifests: ApplicationGatewayWafDynamicManifests; - // (undocumented) - applicationGatewayWafDynamicManifestsDefault: ApplicationGatewayWafDynamicManifestsDefault; - // (undocumented) - applicationSecurityGroups: ApplicationSecurityGroups; - // (undocumented) - availableDelegations: AvailableDelegations; - // (undocumented) - availableEndpointServices: AvailableEndpointServices; - // (undocumented) - availablePrivateEndpointTypes: AvailablePrivateEndpointTypes; - // (undocumented) - availableResourceGroupDelegations: AvailableResourceGroupDelegations; - // (undocumented) - availableServiceAliases: AvailableServiceAliases; - // (undocumented) - azureFirewallFqdnTags: AzureFirewallFqdnTags; - // (undocumented) - azureFirewalls: AzureFirewalls; - // (undocumented) - bastionHosts: BastionHosts; - beginDeleteBastionShareableLink(resourceGroupName: string, bastionHostName: string, bslRequest: BastionShareableLinkListRequest, options?: DeleteBastionShareableLinkOptionalParams): Promise, void>>; - beginDeleteBastionShareableLinkAndWait(resourceGroupName: string, bastionHostName: string, bslRequest: BastionShareableLinkListRequest, options?: DeleteBastionShareableLinkOptionalParams): Promise; - beginDeleteBastionShareableLinkByToken(resourceGroupName: string, bastionHostName: string, bslTokenRequest: BastionShareableLinkTokenListRequest, options?: DeleteBastionShareableLinkByTokenOptionalParams): Promise, DeleteBastionShareableLinkByTokenResponse>>; - beginDeleteBastionShareableLinkByTokenAndWait(resourceGroupName: string, bastionHostName: string, bslTokenRequest: BastionShareableLinkTokenListRequest, options?: DeleteBastionShareableLinkByTokenOptionalParams): Promise; - beginGeneratevirtualwanvpnserverconfigurationvpnprofile(resourceGroupName: string, virtualWANName: string, vpnClientParams: VirtualWanVpnProfileParameters, options?: GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams): Promise, GeneratevirtualwanvpnserverconfigurationvpnprofileResponse>>; - beginGeneratevirtualwanvpnserverconfigurationvpnprofileAndWait(resourceGroupName: string, virtualWANName: string, vpnClientParams: VirtualWanVpnProfileParameters, options?: GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams): Promise; - beginListActiveSessionsAndWait(resourceGroupName: string, bastionHostName: string, options?: GetActiveSessionsOptionalParams): PagedAsyncIterableIterator; - beginListPutBastionShareableLinkAndWait(resourceGroupName: string, bastionHostName: string, bslRequest: BastionShareableLinkListRequest, options?: PutBastionShareableLinkOptionalParams): PagedAsyncIterableIterator; - // (undocumented) - bgpServiceCommunities: BgpServiceCommunities; - checkDnsNameAvailability(location: string, domainNameLabel: string, options?: CheckDnsNameAvailabilityOptionalParams): Promise; - // (undocumented) - configurationPolicyGroups: ConfigurationPolicyGroups; - // (undocumented) - connectionMonitors: ConnectionMonitors; - // (undocumented) - connectivityConfigurations: ConnectivityConfigurations; - // (undocumented) - customIPPrefixes: CustomIPPrefixes; - // (undocumented) - ddosCustomPolicies: DdosCustomPolicies; - // (undocumented) - ddosProtectionPlans: DdosProtectionPlans; - // (undocumented) - defaultSecurityRules: DefaultSecurityRules; - // (undocumented) - dscpConfigurationOperations: DscpConfigurationOperations; - // (undocumented) - expressRouteCircuitAuthorizations: ExpressRouteCircuitAuthorizations; - // (undocumented) - expressRouteCircuitConnections: ExpressRouteCircuitConnections; - // (undocumented) - expressRouteCircuitPeerings: ExpressRouteCircuitPeerings; - // (undocumented) - expressRouteCircuits: ExpressRouteCircuits; - // (undocumented) - expressRouteConnections: ExpressRouteConnections; - // (undocumented) - expressRouteCrossConnectionPeerings: ExpressRouteCrossConnectionPeerings; - // (undocumented) - expressRouteCrossConnections: ExpressRouteCrossConnections; - // (undocumented) - expressRouteGateways: ExpressRouteGateways; - // (undocumented) - expressRouteLinks: ExpressRouteLinks; - // (undocumented) - expressRoutePortAuthorizations: ExpressRoutePortAuthorizations; - // (undocumented) - expressRoutePorts: ExpressRoutePorts; - // (undocumented) - expressRoutePortsLocations: ExpressRoutePortsLocations; - expressRouteProviderPort(providerport: string, options?: ExpressRouteProviderPortOptionalParams): Promise; - // (undocumented) - expressRouteProviderPortsLocation: ExpressRouteProviderPortsLocation; - // (undocumented) - expressRouteServiceProviders: ExpressRouteServiceProviders; - // (undocumented) - firewallPolicies: FirewallPolicies; - // (undocumented) - firewallPolicyDeployments: FirewallPolicyDeployments; - // (undocumented) - firewallPolicyDrafts: FirewallPolicyDrafts; - // (undocumented) - firewallPolicyIdpsSignatures: FirewallPolicyIdpsSignatures; - // (undocumented) - firewallPolicyIdpsSignaturesFilterValues: FirewallPolicyIdpsSignaturesFilterValues; - // (undocumented) - firewallPolicyIdpsSignaturesOverrides: FirewallPolicyIdpsSignaturesOverrides; - // (undocumented) - firewallPolicyRuleCollectionGroupDrafts: FirewallPolicyRuleCollectionGroupDrafts; - // (undocumented) - firewallPolicyRuleCollectionGroups: FirewallPolicyRuleCollectionGroups; - // (undocumented) - flowLogs: FlowLogs; - // (undocumented) - hubRouteTables: HubRouteTables; - // (undocumented) - hubVirtualNetworkConnections: HubVirtualNetworkConnections; - // (undocumented) - inboundNatRules: InboundNatRules; - // (undocumented) - inboundSecurityRuleOperations: InboundSecurityRuleOperations; - // (undocumented) - ipAllocations: IpAllocations; - // (undocumented) - ipamPools: IpamPools; - // (undocumented) - ipGroups: IpGroups; - listActiveConnectivityConfigurations(resourceGroupName: string, networkManagerName: string, parameters: ActiveConfigurationParameter, options?: ListActiveConnectivityConfigurationsOptionalParams): Promise; - listActiveSecurityAdminRules(resourceGroupName: string, networkManagerName: string, parameters: ActiveConfigurationParameter, options?: ListActiveSecurityAdminRulesOptionalParams): Promise; - listBastionShareableLink(resourceGroupName: string, bastionHostName: string, bslRequest: BastionShareableLinkListRequest, options?: GetBastionShareableLinkOptionalParams): PagedAsyncIterableIterator; - listDisconnectActiveSessions(resourceGroupName: string, bastionHostName: string, sessionIds: SessionIds, options?: DisconnectActiveSessionsOptionalParams): PagedAsyncIterableIterator; - listNetworkManagerEffectiveConnectivityConfigurations(resourceGroupName: string, virtualNetworkName: string, parameters: QueryRequestOptions, options?: ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams): Promise; - listNetworkManagerEffectiveSecurityAdminRules(resourceGroupName: string, virtualNetworkName: string, parameters: QueryRequestOptions, options?: ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams): Promise; - // (undocumented) - loadBalancerBackendAddressPools: LoadBalancerBackendAddressPools; - // (undocumented) - loadBalancerFrontendIPConfigurations: LoadBalancerFrontendIPConfigurations; - // (undocumented) - loadBalancerLoadBalancingRules: LoadBalancerLoadBalancingRules; - // (undocumented) - loadBalancerNetworkInterfaces: LoadBalancerNetworkInterfaces; - // (undocumented) - loadBalancerOutboundRules: LoadBalancerOutboundRules; - // (undocumented) - loadBalancerProbes: LoadBalancerProbes; - // (undocumented) - loadBalancers: LoadBalancers; - // (undocumented) - localNetworkGateways: LocalNetworkGateways; - // (undocumented) - managementGroupNetworkManagerConnections: ManagementGroupNetworkManagerConnections; - // (undocumented) - natGateways: NatGateways; - // (undocumented) - natRules: NatRules; - // (undocumented) - networkGroups: NetworkGroups; - // (undocumented) - networkInterfaceIPConfigurations: NetworkInterfaceIPConfigurations; - // (undocumented) - networkInterfaceLoadBalancers: NetworkInterfaceLoadBalancers; - // (undocumented) - networkInterfaces: NetworkInterfaces; - // (undocumented) - networkInterfaceTapConfigurations: NetworkInterfaceTapConfigurations; - // (undocumented) - networkManagerCommits: NetworkManagerCommits; - // (undocumented) - networkManagerDeploymentStatusOperations: NetworkManagerDeploymentStatusOperations; - // (undocumented) - networkManagerRoutingConfigurations: NetworkManagerRoutingConfigurations; - // (undocumented) - networkManagers: NetworkManagers; - // (undocumented) - networkProfiles: NetworkProfiles; - // (undocumented) - networkSecurityGroups: NetworkSecurityGroups; - // (undocumented) - networkSecurityPerimeterAccessRules: NetworkSecurityPerimeterAccessRules; - // (undocumented) - networkSecurityPerimeterAssociableResourceTypes: NetworkSecurityPerimeterAssociableResourceTypes; - // (undocumented) - networkSecurityPerimeterAssociations: NetworkSecurityPerimeterAssociations; - // (undocumented) - networkSecurityPerimeterLinkReferences: NetworkSecurityPerimeterLinkReferences; - // (undocumented) - networkSecurityPerimeterLinks: NetworkSecurityPerimeterLinks; - // (undocumented) - networkSecurityPerimeterLoggingConfigurations: NetworkSecurityPerimeterLoggingConfigurations; - // (undocumented) - networkSecurityPerimeterOperationStatuses: NetworkSecurityPerimeterOperationStatuses; - // (undocumented) - networkSecurityPerimeterProfiles: NetworkSecurityPerimeterProfiles; - // (undocumented) - networkSecurityPerimeters: NetworkSecurityPerimeters; - // (undocumented) - networkSecurityPerimeterServiceTags: NetworkSecurityPerimeterServiceTags; - // (undocumented) - networkVirtualApplianceConnections: NetworkVirtualApplianceConnections; - // (undocumented) - networkVirtualAppliances: NetworkVirtualAppliances; - // (undocumented) - networkWatchers: NetworkWatchers; - // (undocumented) - operations: Operations; - // (undocumented) - p2SVpnGateways: P2SVpnGateways; - // (undocumented) - packetCaptures: PacketCaptures; - // (undocumented) - peerExpressRouteCircuitConnections: PeerExpressRouteCircuitConnections; - // (undocumented) - privateDnsZoneGroups: PrivateDnsZoneGroups; - // (undocumented) - privateEndpoints: PrivateEndpoints; - // (undocumented) - privateLinkServices: PrivateLinkServices; - // (undocumented) - publicIPAddresses: PublicIPAddresses; - // (undocumented) - publicIPPrefixes: PublicIPPrefixes; - // (undocumented) - reachabilityAnalysisIntents: ReachabilityAnalysisIntents; - // (undocumented) - reachabilityAnalysisRuns: ReachabilityAnalysisRuns; - // (undocumented) - resourceNavigationLinks: ResourceNavigationLinks; - // (undocumented) - routeFilterRules: RouteFilterRules; - // (undocumented) - routeFilters: RouteFilters; - // (undocumented) - routeMaps: RouteMaps; - // (undocumented) - routes: Routes; - // (undocumented) - routeTables: RouteTables; - // (undocumented) - routingIntentOperations: RoutingIntentOperations; - // (undocumented) - routingRuleCollections: RoutingRuleCollections; - // (undocumented) - routingRules: RoutingRules; - // (undocumented) - scopeConnections: ScopeConnections; - // (undocumented) - securityAdminConfigurations: SecurityAdminConfigurations; - // (undocumented) - securityPartnerProviders: SecurityPartnerProviders; - // (undocumented) - securityRules: SecurityRules; - // (undocumented) - securityUserConfigurations: SecurityUserConfigurations; - // (undocumented) - securityUserRuleCollections: SecurityUserRuleCollections; - // (undocumented) - securityUserRules: SecurityUserRules; - // (undocumented) - serviceAssociationLinks: ServiceAssociationLinks; - // (undocumented) - serviceEndpointPolicies: ServiceEndpointPolicies; - // (undocumented) - serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinitions; - // (undocumented) - serviceGateways: ServiceGateways; - // (undocumented) - serviceTagInformationOperations: ServiceTagInformationOperations; - // (undocumented) - serviceTags: ServiceTags; - // (undocumented) - staticCidrs: StaticCidrs; - // (undocumented) - staticMembers: StaticMembers; - // (undocumented) - subnets: Subnets; - // (undocumented) - subscriptionId?: string; - // (undocumented) - subscriptionNetworkManagerConnections: SubscriptionNetworkManagerConnections; - supportedSecurityProviders(resourceGroupName: string, virtualWANName: string, options?: SupportedSecurityProvidersOptionalParams): Promise; - // (undocumented) - usages: Usages; - // (undocumented) - verifierWorkspaces: VerifierWorkspaces; - // (undocumented) - vipSwap: VipSwap; - // (undocumented) - virtualApplianceSites: VirtualApplianceSites; - // (undocumented) - virtualApplianceSkus: VirtualApplianceSkus; - // (undocumented) - virtualHubBgpConnection: VirtualHubBgpConnection; - // (undocumented) - virtualHubBgpConnections: VirtualHubBgpConnections; - // (undocumented) - virtualHubIpConfiguration: VirtualHubIpConfiguration; - // (undocumented) - virtualHubRouteTableV2S: VirtualHubRouteTableV2S; - // (undocumented) - virtualHubs: VirtualHubs; - // (undocumented) - virtualNetworkAppliances: VirtualNetworkAppliances; - // (undocumented) - virtualNetworkGatewayConnections: VirtualNetworkGatewayConnections; - // (undocumented) - virtualNetworkGatewayNatRules: VirtualNetworkGatewayNatRules; - // (undocumented) - virtualNetworkGateways: VirtualNetworkGateways; - // (undocumented) - virtualNetworkPeerings: VirtualNetworkPeerings; - // (undocumented) - virtualNetworks: VirtualNetworks; - // (undocumented) - virtualNetworkTaps: VirtualNetworkTaps; - // (undocumented) - virtualRouterPeerings: VirtualRouterPeerings; - // (undocumented) - virtualRouters: VirtualRouters; - // (undocumented) - virtualWans: VirtualWans; - // (undocumented) - vpnConnections: VpnConnections; - // (undocumented) - vpnGateways: VpnGateways; - // (undocumented) - vpnLinkConnections: VpnLinkConnections; - // (undocumented) - vpnServerConfigurations: VpnServerConfigurations; - // (undocumented) - vpnServerConfigurationsAssociatedWithVirtualWan: VpnServerConfigurationsAssociatedWithVirtualWan; - // (undocumented) - vpnSiteLinkConnections: VpnSiteLinkConnections; - // (undocumented) - vpnSiteLinks: VpnSiteLinks; - // (undocumented) - vpnSites: VpnSites; - // (undocumented) - vpnSitesConfiguration: VpnSitesConfiguration; - // (undocumented) - webApplicationFirewallPolicies: WebApplicationFirewallPolicies; - // (undocumented) - webCategories: WebCategories; -} - -// @public -export interface NetworkManagementClientDeleteBastionShareableLinkByTokenHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface NetworkManagementClientOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - endpoint?: string; -} - -// @public -export interface NetworkManager extends Resource { - description?: string; - readonly etag?: string; - networkManagerScopeAccesses?: ConfigurationType[]; - networkManagerScopes?: NetworkManagerPropertiesNetworkManagerScopes; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly systemData?: SystemData; -} - -// @public -export interface NetworkManagerCommit { - readonly commitId?: string; - commitType: ConfigurationType; - configurationIds?: string[]; - targetLocations: string[]; -} - -// @public -export interface NetworkManagerCommits { - beginPost(resourceGroupName: string, networkManagerName: string, parameters: NetworkManagerCommit, options?: NetworkManagerCommitsPostOptionalParams): Promise, NetworkManagerCommitsPostResponse>>; - beginPostAndWait(resourceGroupName: string, networkManagerName: string, parameters: NetworkManagerCommit, options?: NetworkManagerCommitsPostOptionalParams): Promise; -} - -// @public -export interface NetworkManagerCommitsPostHeaders { - location?: string; -} - -// @public -export interface NetworkManagerCommitsPostOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkManagerCommitsPostResponse = NetworkManagerCommit; - -// @public -export interface NetworkManagerConnection extends ChildResource { - readonly connectionState?: ScopeConnectionState; - description?: string; - networkManagerId?: string; - readonly systemData?: SystemData; -} - -// @public -export interface NetworkManagerConnectionListResult { - nextLink?: string; - value?: NetworkManagerConnection[]; -} - -// @public -export interface NetworkManagerDeploymentStatus { - commitTime?: Date; - configurationIds?: string[]; - deploymentStatus?: DeploymentStatus; - deploymentType?: ConfigurationType; - errorMessage?: string; - region?: string; -} - -// @public -export interface NetworkManagerDeploymentStatusListOptionalParams extends coreClient.OperationOptions { - top?: number; -} - -// @public -export type NetworkManagerDeploymentStatusListResponse = NetworkManagerDeploymentStatusListResult; - -// @public -export interface NetworkManagerDeploymentStatusListResult { - skipToken?: string; - value?: NetworkManagerDeploymentStatus[]; -} - -// @public -export interface NetworkManagerDeploymentStatusOperations { - list(resourceGroupName: string, networkManagerName: string, parameters: NetworkManagerDeploymentStatusParameter, options?: NetworkManagerDeploymentStatusListOptionalParams): Promise; -} - -// @public -export interface NetworkManagerDeploymentStatusParameter { - deploymentTypes?: ConfigurationType[]; - regions?: string[]; - skipToken?: string; -} - -// @public -export interface NetworkManagerEffectiveConnectivityConfigurationListResult { - skipToken?: string; - value?: EffectiveConnectivityConfiguration[]; -} - -// @public -export interface NetworkManagerEffectiveSecurityAdminRulesListResult { - skipToken?: string; - value?: EffectiveBaseSecurityAdminRuleUnion[]; -} - -// @public -export interface NetworkManagerListResult { - nextLink?: string; - value?: NetworkManager[]; -} - -// @public -export interface NetworkManagerPropertiesNetworkManagerScopes { - readonly crossTenantScopes?: CrossTenantScopes[]; - managementGroups?: string[]; - subscriptions?: string[]; -} - -// @public -export interface NetworkManagerRoutingConfiguration extends ChildResource { - description?: string; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - routeTableUsageMode?: RouteTableUsageMode; - readonly systemData?: SystemData; -} - -// @public -export interface NetworkManagerRoutingConfigurationListResult { - nextLink?: string; - value?: NetworkManagerRoutingConfiguration[]; -} - -// @public -export interface NetworkManagerRoutingConfigurations { - beginDelete(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, configurationName: string, routingConfiguration: NetworkManagerRoutingConfiguration, options?: NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: NetworkManagerRoutingConfigurationsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, options?: NetworkManagerRoutingConfigurationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkManagerRoutingConfigurationsCreateOrUpdateResponse = NetworkManagerRoutingConfiguration; - -// @public -export interface NetworkManagerRoutingConfigurationsDeleteHeaders { - location?: string; -} - -// @public -export interface NetworkManagerRoutingConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkManagerRoutingConfigurationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkManagerRoutingConfigurationsGetResponse = NetworkManagerRoutingConfiguration; - -// @public -export interface NetworkManagerRoutingConfigurationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkManagerRoutingConfigurationsListNextResponse = NetworkManagerRoutingConfigurationListResult; - -// @public -export interface NetworkManagerRoutingConfigurationsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type NetworkManagerRoutingConfigurationsListResponse = NetworkManagerRoutingConfigurationListResult; - -// @public -export interface NetworkManagerRoutingGroupItem { - networkGroupId: string; -} - -// @public -export interface NetworkManagers { - beginDelete(resourceGroupName: string, networkManagerName: string, options?: NetworkManagersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, options?: NetworkManagersDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, parameters: NetworkManager, options?: NetworkManagersCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, options?: NetworkManagersGetOptionalParams): Promise; - list(resourceGroupName: string, options?: NetworkManagersListOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: NetworkManagersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - patch(resourceGroupName: string, networkManagerName: string, parameters: PatchObject, options?: NetworkManagersPatchOptionalParams): Promise; -} - -// @public -export interface NetworkManagersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkManagersCreateOrUpdateResponse = NetworkManager; - -// @public -export interface NetworkManagersDeleteHeaders { - location?: string; -} - -// @public -export interface NetworkManagersDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkManagerSecurityGroupItem { - networkGroupId: string; -} - -// @public -export interface NetworkManagersGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkManagersGetResponse = NetworkManager; - -// @public -export interface NetworkManagersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkManagersListBySubscriptionNextResponse = NetworkManagerListResult; - -// @public -export interface NetworkManagersListBySubscriptionOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type NetworkManagersListBySubscriptionResponse = NetworkManagerListResult; - -// @public -export interface NetworkManagersListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkManagersListNextResponse = NetworkManagerListResult; - -// @public -export interface NetworkManagersListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type NetworkManagersListResponse = NetworkManagerListResult; - -// @public -export interface NetworkManagersPatchOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkManagersPatchResponse = NetworkManager; - -// @public -export type NetworkOperationStatus = string; - -// @public -export interface NetworkProfile extends Resource { - containerNetworkInterfaceConfigurations?: ContainerNetworkInterfaceConfiguration[]; - readonly containerNetworkInterfaces?: ContainerNetworkInterface[]; - readonly etag?: string; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; -} - -// @public -export interface NetworkProfileListResult { - nextLink?: string; - value?: NetworkProfile[]; -} - -// @public -export interface NetworkProfiles { - beginDelete(resourceGroupName: string, networkProfileName: string, options?: NetworkProfilesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkProfileName: string, options?: NetworkProfilesDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkProfileName: string, parameters: NetworkProfile, options?: NetworkProfilesCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkProfileName: string, options?: NetworkProfilesGetOptionalParams): Promise; - list(resourceGroupName: string, options?: NetworkProfilesListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: NetworkProfilesListAllOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, networkProfileName: string, parameters: TagsObject, options?: NetworkProfilesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface NetworkProfilesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkProfilesCreateOrUpdateResponse = NetworkProfile; - -// @public -export interface NetworkProfilesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkProfilesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type NetworkProfilesGetResponse = NetworkProfile; - -// @public -export interface NetworkProfilesListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkProfilesListAllNextResponse = NetworkProfileListResult; - -// @public -export interface NetworkProfilesListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkProfilesListAllResponse = NetworkProfileListResult; - -// @public -export interface NetworkProfilesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkProfilesListNextResponse = NetworkProfileListResult; - -// @public -export interface NetworkProfilesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkProfilesListResponse = NetworkProfileListResult; - -// @public -export interface NetworkProfilesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkProfilesUpdateTagsResponse = NetworkProfile; - -// @public -export type NetworkProtocol = string; - -// @public -export interface NetworkRule extends FirewallPolicyRule { - destinationAddresses?: string[]; - destinationFqdns?: string[]; - destinationIpGroups?: string[]; - destinationPorts?: string[]; - ipProtocols?: FirewallPolicyRuleNetworkProtocol[]; - ruleType: "NetworkRule"; - sourceAddresses?: string[]; - sourceIpGroups?: string[]; -} - -// @public -export interface NetworkSecurityGroup extends Resource { - readonly defaultSecurityRules?: SecurityRule[]; - readonly etag?: string; - readonly flowLogs?: FlowLog[]; - flushConnection?: boolean; - readonly networkInterfaces?: NetworkInterface[]; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - securityRules?: SecurityRule[]; - readonly subnets?: Subnet[]; -} - -// @public -export interface NetworkSecurityGroupListResult { - nextLink?: string; - value?: NetworkSecurityGroup[]; -} - -// @public -export interface NetworkSecurityGroupResult { - readonly evaluatedNetworkSecurityGroups?: EvaluatedNetworkSecurityGroup[]; - securityRuleAccessResult?: SecurityRuleAccess; -} - -// @public -export interface NetworkSecurityGroups { - beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: NetworkSecurityGroup, options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams): Promise, NetworkSecurityGroupsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, networkSecurityGroupName: string, parameters: NetworkSecurityGroup, options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkSecurityGroupName: string, options?: NetworkSecurityGroupsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkSecurityGroupName: string, options?: NetworkSecurityGroupsDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkSecurityGroupName: string, options?: NetworkSecurityGroupsGetOptionalParams): Promise; - list(resourceGroupName: string, options?: NetworkSecurityGroupsListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: NetworkSecurityGroupsListAllOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: TagsObject, options?: NetworkSecurityGroupsUpdateTagsOptionalParams): Promise; -} - -// @public -export interface NetworkSecurityGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkSecurityGroupsCreateOrUpdateResponse = NetworkSecurityGroup; - -// @public -export interface NetworkSecurityGroupsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkSecurityGroupsGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type NetworkSecurityGroupsGetResponse = NetworkSecurityGroup; - -// @public -export interface NetworkSecurityGroupsListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityGroupsListAllNextResponse = NetworkSecurityGroupListResult; - -// @public -export interface NetworkSecurityGroupsListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityGroupsListAllResponse = NetworkSecurityGroupListResult; - -// @public -export interface NetworkSecurityGroupsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityGroupsListNextResponse = NetworkSecurityGroupListResult; - -// @public -export interface NetworkSecurityGroupsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityGroupsListResponse = NetworkSecurityGroupListResult; - -// @public -export interface NetworkSecurityGroupsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityGroupsUpdateTagsResponse = NetworkSecurityGroup; - -// @public -export interface NetworkSecurityPerimeter extends TrackedResource { - readonly perimeterGuid?: string; - readonly provisioningState?: NspProvisioningState; -} - -// @public -export interface NetworkSecurityPerimeterAccessRules { - createOrUpdate(resourceGroupName: string, networkSecurityPerimeterName: string, profileName: string, accessRuleName: string, parameters: NspAccessRule, options?: NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, networkSecurityPerimeterName: string, profileName: string, accessRuleName: string, options?: NetworkSecurityPerimeterAccessRulesDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkSecurityPerimeterName: string, profileName: string, accessRuleName: string, options?: NetworkSecurityPerimeterAccessRulesGetOptionalParams): Promise; - list(resourceGroupName: string, networkSecurityPerimeterName: string, profileName: string, options?: NetworkSecurityPerimeterAccessRulesListOptionalParams): PagedAsyncIterableIterator; - reconcile(resourceGroupName: string, networkSecurityPerimeterName: string, profileName: string, accessRuleName: string, parameters: Record, options?: NetworkSecurityPerimeterAccessRulesReconcileOptionalParams): Promise; -} - -// @public -export interface NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterAccessRulesCreateOrUpdateResponse = NspAccessRule; - -// @public -export interface NetworkSecurityPerimeterAccessRulesDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface NetworkSecurityPerimeterAccessRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterAccessRulesGetResponse = NspAccessRule; - -// @public -export interface NetworkSecurityPerimeterAccessRulesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterAccessRulesListNextResponse = NspAccessRuleListResult; - -// @public -export interface NetworkSecurityPerimeterAccessRulesListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type NetworkSecurityPerimeterAccessRulesListResponse = NspAccessRuleListResult; - -// @public -export interface NetworkSecurityPerimeterAccessRulesReconcileOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterAccessRulesReconcileResponse = Record; - -// @public -export interface NetworkSecurityPerimeterAssociableResourceTypes { - list(location: string, options?: NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkSecurityPerimeterAssociableResourceTypesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterAssociableResourceTypesListNextResponse = PerimeterAssociableResourcesListResult; - -// @public -export interface NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterAssociableResourceTypesListResponse = PerimeterAssociableResourcesListResult; - -// @public -export interface NetworkSecurityPerimeterAssociations { - beginCreateOrUpdate(resourceGroupName: string, networkSecurityPerimeterName: string, associationName: string, parameters: NspAssociation, options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams): Promise, NetworkSecurityPerimeterAssociationsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, networkSecurityPerimeterName: string, associationName: string, parameters: NspAssociation, options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkSecurityPerimeterName: string, associationName: string, options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkSecurityPerimeterName: string, associationName: string, options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkSecurityPerimeterName: string, associationName: string, options?: NetworkSecurityPerimeterAssociationsGetOptionalParams): Promise; - list(resourceGroupName: string, networkSecurityPerimeterName: string, options?: NetworkSecurityPerimeterAssociationsListOptionalParams): PagedAsyncIterableIterator; - reconcile(resourceGroupName: string, networkSecurityPerimeterName: string, associationName: string, parameters: Record, options?: NetworkSecurityPerimeterAssociationsReconcileOptionalParams): Promise; -} - -// @public -export interface NetworkSecurityPerimeterAssociationsCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} - -// @public -export interface NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkSecurityPerimeterAssociationsCreateOrUpdateResponse = NspAssociation; - -// @public -export interface NetworkSecurityPerimeterAssociationsDeleteHeaders { - azureAsyncOperation?: string; -} - -// @public -export interface NetworkSecurityPerimeterAssociationsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkSecurityPerimeterAssociationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterAssociationsGetResponse = NspAssociation; - -// @public -export interface NetworkSecurityPerimeterAssociationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterAssociationsListNextResponse = NspAssociationsListResult; - -// @public -export interface NetworkSecurityPerimeterAssociationsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type NetworkSecurityPerimeterAssociationsListResponse = NspAssociationsListResult; - -// @public -export interface NetworkSecurityPerimeterAssociationsReconcileOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterAssociationsReconcileResponse = Record; - -// @public -export interface NetworkSecurityPerimeterLinkReferences { - beginDelete(resourceGroupName: string, networkSecurityPerimeterName: string, linkReferenceName: string, options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkSecurityPerimeterName: string, linkReferenceName: string, options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkSecurityPerimeterName: string, linkReferenceName: string, options?: NetworkSecurityPerimeterLinkReferencesGetOptionalParams): Promise; - list(resourceGroupName: string, networkSecurityPerimeterName: string, options?: NetworkSecurityPerimeterLinkReferencesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkSecurityPerimeterLinkReferencesDeleteHeaders { - location?: string; -} - -// @public -export interface NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkSecurityPerimeterLinkReferencesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterLinkReferencesGetResponse = NspLinkReference; - -// @public -export interface NetworkSecurityPerimeterLinkReferencesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterLinkReferencesListNextResponse = NspLinkReferenceListResult; - -// @public -export interface NetworkSecurityPerimeterLinkReferencesListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type NetworkSecurityPerimeterLinkReferencesListResponse = NspLinkReferenceListResult; - -// @public -export interface NetworkSecurityPerimeterLinks { - beginDelete(resourceGroupName: string, networkSecurityPerimeterName: string, linkName: string, options?: NetworkSecurityPerimeterLinksDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkSecurityPerimeterName: string, linkName: string, options?: NetworkSecurityPerimeterLinksDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkSecurityPerimeterName: string, linkName: string, parameters: NspLink, options?: NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkSecurityPerimeterName: string, linkName: string, options?: NetworkSecurityPerimeterLinksGetOptionalParams): Promise; - list(resourceGroupName: string, networkSecurityPerimeterName: string, options?: NetworkSecurityPerimeterLinksListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterLinksCreateOrUpdateResponse = NspLink; - -// @public -export interface NetworkSecurityPerimeterLinksDeleteHeaders { - location?: string; -} - -// @public -export interface NetworkSecurityPerimeterLinksDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkSecurityPerimeterLinksGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterLinksGetResponse = NspLink; - -// @public -export interface NetworkSecurityPerimeterLinksListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterLinksListNextResponse = NspLinkListResult; - -// @public -export interface NetworkSecurityPerimeterLinksListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type NetworkSecurityPerimeterLinksListResponse = NspLinkListResult; - -// @public -export interface NetworkSecurityPerimeterListResult { - nextLink?: string; - value?: NetworkSecurityPerimeter[]; -} - -// @public -export interface NetworkSecurityPerimeterLoggingConfigurations { - createOrUpdate(resourceGroupName: string, networkSecurityPerimeterName: string, loggingConfigurationName: string, parameters: NspLoggingConfiguration, options?: NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, networkSecurityPerimeterName: string, loggingConfigurationName: string, options?: NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkSecurityPerimeterName: string, loggingConfigurationName: string, options?: NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams): Promise; - list(resourceGroupName: string, networkSecurityPerimeterName: string, options?: NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateResponse = NspLoggingConfiguration; - -// @public -export interface NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterLoggingConfigurationsGetResponse = NspLoggingConfiguration; - -// @public -export interface NetworkSecurityPerimeterLoggingConfigurationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterLoggingConfigurationsListNextResponse = NspLoggingConfigurationListResult; - -// @public -export interface NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterLoggingConfigurationsListResponse = NspLoggingConfigurationListResult; - -// @public -export interface NetworkSecurityPerimeterOperationStatuses { - get(location: string, operationId: string, options?: NetworkSecurityPerimeterOperationStatusesGetOptionalParams): Promise; -} - -// @public -export interface NetworkSecurityPerimeterOperationStatusesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterOperationStatusesGetResponse = OperationStatusResult; - -// @public -export interface NetworkSecurityPerimeterProfiles { - createOrUpdate(resourceGroupName: string, networkSecurityPerimeterName: string, profileName: string, parameters: NspProfile, options?: NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, networkSecurityPerimeterName: string, profileName: string, options?: NetworkSecurityPerimeterProfilesDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkSecurityPerimeterName: string, profileName: string, options?: NetworkSecurityPerimeterProfilesGetOptionalParams): Promise; - list(resourceGroupName: string, networkSecurityPerimeterName: string, options?: NetworkSecurityPerimeterProfilesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterProfilesCreateOrUpdateResponse = NspProfile; - -// @public -export interface NetworkSecurityPerimeterProfilesDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface NetworkSecurityPerimeterProfilesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterProfilesGetResponse = NspProfile; - -// @public -export interface NetworkSecurityPerimeterProfilesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterProfilesListNextResponse = NspProfileListResult; - -// @public -export interface NetworkSecurityPerimeterProfilesListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type NetworkSecurityPerimeterProfilesListResponse = NspProfileListResult; - -// @public -export interface NetworkSecurityPerimeters { - beginDelete(resourceGroupName: string, networkSecurityPerimeterName: string, options?: NetworkSecurityPerimetersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkSecurityPerimeterName: string, options?: NetworkSecurityPerimetersDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkSecurityPerimeterName: string, parameters: NetworkSecurityPerimeter, options?: NetworkSecurityPerimetersCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkSecurityPerimeterName: string, options?: NetworkSecurityPerimetersGetOptionalParams): Promise; - list(resourceGroupName: string, options?: NetworkSecurityPerimetersListOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: NetworkSecurityPerimetersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - patch(resourceGroupName: string, networkSecurityPerimeterName: string, parameters: UpdateTagsRequest, options?: NetworkSecurityPerimetersPatchOptionalParams): Promise; -} - -// @public -export interface NetworkSecurityPerimetersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimetersCreateOrUpdateResponse = NetworkSecurityPerimeter; - -// @public -export interface NetworkSecurityPerimetersDeleteHeaders { - azureAsyncOperation?: string; -} - -// @public -export interface NetworkSecurityPerimetersDeleteOptionalParams extends coreClient.OperationOptions { - forceDeletion?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkSecurityPerimeterServiceTags { - list(location: string, options?: NetworkSecurityPerimeterServiceTagsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkSecurityPerimeterServiceTagsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterServiceTagsListNextResponse = NspServiceTagsListResult; - -// @public -export interface NetworkSecurityPerimeterServiceTagsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimeterServiceTagsListResponse = NspServiceTagsListResult; - -// @public -export interface NetworkSecurityPerimetersGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimetersGetResponse = NetworkSecurityPerimeter; - -// @public -export interface NetworkSecurityPerimetersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimetersListBySubscriptionNextResponse = NetworkSecurityPerimeterListResult; - -// @public -export interface NetworkSecurityPerimetersListBySubscriptionOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type NetworkSecurityPerimetersListBySubscriptionResponse = NetworkSecurityPerimeterListResult; - -// @public -export interface NetworkSecurityPerimetersListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimetersListNextResponse = NetworkSecurityPerimeterListResult; - -// @public -export interface NetworkSecurityPerimetersListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type NetworkSecurityPerimetersListResponse = NetworkSecurityPerimeterListResult; - -// @public -export interface NetworkSecurityPerimetersPatchOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkSecurityPerimetersPatchResponse = NetworkSecurityPerimeter; - -// @public -export interface NetworkSecurityRulesEvaluationResult { - destinationMatched?: boolean; - destinationPortMatched?: boolean; - name?: string; - protocolMatched?: boolean; - sourceMatched?: boolean; - sourcePortMatched?: boolean; -} - -// @public -export interface NetworkVirtualAppliance extends Resource { - additionalNics?: VirtualApplianceAdditionalNicProperties[]; - readonly addressPrefix?: string; - bootStrapConfigurationBlobs?: string[]; - cloudInitConfiguration?: string; - cloudInitConfigurationBlobs?: string[]; - delegation?: DelegationProperties; - readonly deploymentType?: string; - readonly etag?: string; - identity?: ManagedServiceIdentity; - readonly inboundSecurityRules?: SubResource[]; - internetIngressPublicIps?: InternetIngressPublicIpsProperties[]; - networkProfile?: NetworkVirtualAppliancePropertiesFormatNetworkProfile; - nvaInterfaceConfigurations?: NvaInterfaceConfigurationsProperties[]; - nvaSku?: VirtualApplianceSkuProperties; - partnerManagedResource?: PartnerManagedResourceProperties; - readonly privateIpAddress?: string; - readonly provisioningState?: ProvisioningState; - sshPublicKey?: string; - virtualApplianceAsn?: number; - readonly virtualApplianceConnections?: SubResource[]; - readonly virtualApplianceNics?: VirtualApplianceNicProperties[]; - readonly virtualApplianceSites?: SubResource[]; - virtualHub?: SubResource; -} - -// @public -export interface NetworkVirtualApplianceBootDiagnosticParameters { - consoleScreenshotStorageSasUrl?: string; - instanceId?: number; - serialConsoleStorageSasUrl?: string; -} - -// @public -export interface NetworkVirtualApplianceConnection extends SubResource { - asn?: number; - bgpPeerAddress?: string[]; - enableInternetSecurity?: boolean; - name?: string; - namePropertiesName?: string; - readonly provisioningState?: ProvisioningState; - routingConfiguration?: RoutingConfiguration; - tunnelIdentifier?: number; -} - -// @public -export interface NetworkVirtualApplianceConnectionList { - nextLink?: string; - value?: NetworkVirtualApplianceConnection[]; -} - -// @public -export interface NetworkVirtualApplianceConnections { - beginCreateOrUpdate(resourceGroupName: string, networkVirtualApplianceName: string, connectionName: string, networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams): Promise, NetworkVirtualApplianceConnectionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, networkVirtualApplianceName: string, connectionName: string, networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkVirtualApplianceName: string, connectionName: string, options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkVirtualApplianceName: string, connectionName: string, options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkVirtualApplianceName: string, connectionName: string, options?: NetworkVirtualApplianceConnectionsGetOptionalParams): Promise; - list(resourceGroupName: string, networkVirtualApplianceName: string, options?: NetworkVirtualApplianceConnectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkVirtualApplianceConnectionsCreateOrUpdateResponse = NetworkVirtualApplianceConnection; - -// @public -export interface NetworkVirtualApplianceConnectionsDeleteHeaders { - location?: string; -} - -// @public -export interface NetworkVirtualApplianceConnectionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkVirtualApplianceConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkVirtualApplianceConnectionsGetResponse = NetworkVirtualApplianceConnection; - -// @public -export interface NetworkVirtualApplianceConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkVirtualApplianceConnectionsListNextResponse = NetworkVirtualApplianceConnectionList; - -// @public -export interface NetworkVirtualApplianceConnectionsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkVirtualApplianceConnectionsListResponse = NetworkVirtualApplianceConnectionList; - -// @public (undocumented) -export interface NetworkVirtualApplianceInstanceId { - instanceId?: number; -} - -// @public -export interface NetworkVirtualApplianceInstanceIds { - instanceIds?: string[]; -} - -// @public -export interface NetworkVirtualApplianceListResult { - nextLink?: string; - value?: NetworkVirtualAppliance[]; -} - -// @public -export interface NetworkVirtualAppliancePropertiesFormatNetworkProfile { - // (undocumented) - networkInterfaceConfigurations?: VirtualApplianceNetworkInterfaceConfiguration[]; -} - -// @public -export interface NetworkVirtualAppliances { - beginCreateOrUpdate(resourceGroupName: string, networkVirtualApplianceName: string, parameters: NetworkVirtualAppliance, options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams): Promise, NetworkVirtualAppliancesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, networkVirtualApplianceName: string, parameters: NetworkVirtualAppliance, options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkVirtualApplianceName: string, options?: NetworkVirtualAppliancesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkVirtualApplianceName: string, options?: NetworkVirtualAppliancesDeleteOptionalParams): Promise; - beginGetBootDiagnosticLogs(resourceGroupName: string, networkVirtualApplianceName: string, request: NetworkVirtualApplianceBootDiagnosticParameters, options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams): Promise, NetworkVirtualAppliancesGetBootDiagnosticLogsResponse>>; - beginGetBootDiagnosticLogsAndWait(resourceGroupName: string, networkVirtualApplianceName: string, request: NetworkVirtualApplianceBootDiagnosticParameters, options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams): Promise; - beginReimage(resourceGroupName: string, networkVirtualApplianceName: string, options?: NetworkVirtualAppliancesReimageOptionalParams): Promise, NetworkVirtualAppliancesReimageResponse>>; - beginReimageAndWait(resourceGroupName: string, networkVirtualApplianceName: string, options?: NetworkVirtualAppliancesReimageOptionalParams): Promise; - beginRestart(resourceGroupName: string, networkVirtualApplianceName: string, options?: NetworkVirtualAppliancesRestartOptionalParams): Promise, NetworkVirtualAppliancesRestartResponse>>; - beginRestartAndWait(resourceGroupName: string, networkVirtualApplianceName: string, options?: NetworkVirtualAppliancesRestartOptionalParams): Promise; - get(resourceGroupName: string, networkVirtualApplianceName: string, options?: NetworkVirtualAppliancesGetOptionalParams): Promise; - list(options?: NetworkVirtualAppliancesListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: NetworkVirtualAppliancesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, networkVirtualApplianceName: string, parameters: TagsObject, options?: NetworkVirtualAppliancesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface NetworkVirtualAppliancesCreateOrUpdateHeaders { - location?: string; -} - -// @public -export interface NetworkVirtualAppliancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkVirtualAppliancesCreateOrUpdateResponse = NetworkVirtualAppliance; - -// @public -export interface NetworkVirtualAppliancesDeleteHeaders { - location?: string; -} - -// @public -export interface NetworkVirtualAppliancesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkVirtualAppliancesGetBootDiagnosticLogsHeaders { - location?: string; -} - -// @public -export interface NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkVirtualAppliancesGetBootDiagnosticLogsResponse = NetworkVirtualApplianceInstanceId; - -// @public -export interface NetworkVirtualAppliancesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type NetworkVirtualAppliancesGetResponse = NetworkVirtualAppliance; - -// @public -export interface NetworkVirtualApplianceSiteListResult { - nextLink?: string; - value?: VirtualApplianceSite[]; -} - -// @public -export interface NetworkVirtualApplianceSku extends Resource { - availableScaleUnits?: NetworkVirtualApplianceSkuInstances[]; - readonly availableVersions?: string[]; - readonly etag?: string; - readonly vendor?: string; -} - -// @public -export interface NetworkVirtualApplianceSkuInstances { - readonly instanceCount?: number; - readonly scaleUnit?: string; -} - -// @public -export interface NetworkVirtualApplianceSkuListResult { - nextLink?: string; - value?: NetworkVirtualApplianceSku[]; -} - -// @public -export interface NetworkVirtualAppliancesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkVirtualAppliancesListByResourceGroupNextResponse = NetworkVirtualApplianceListResult; - -// @public -export interface NetworkVirtualAppliancesListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkVirtualAppliancesListByResourceGroupResponse = NetworkVirtualApplianceListResult; - -// @public -export interface NetworkVirtualAppliancesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkVirtualAppliancesListNextResponse = NetworkVirtualApplianceListResult; - -// @public -export interface NetworkVirtualAppliancesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkVirtualAppliancesListResponse = NetworkVirtualApplianceListResult; - -// @public -export interface NetworkVirtualAppliancesReimageHeaders { - location?: string; -} - -// @public -export interface NetworkVirtualAppliancesReimageOptionalParams extends coreClient.OperationOptions { - networkVirtualApplianceInstanceIds?: NetworkVirtualApplianceInstanceIds; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkVirtualAppliancesReimageResponse = NetworkVirtualApplianceInstanceIds; - -// @public -export interface NetworkVirtualAppliancesRestartHeaders { - location?: string; -} - -// @public -export interface NetworkVirtualAppliancesRestartOptionalParams extends coreClient.OperationOptions { - networkVirtualApplianceInstanceIds?: NetworkVirtualApplianceInstanceIds; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkVirtualAppliancesRestartResponse = NetworkVirtualApplianceInstanceIds; - -// @public -export interface NetworkVirtualAppliancesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkVirtualAppliancesUpdateTagsResponse = NetworkVirtualAppliance; - -// @public -export interface NetworkWatcher extends Resource { - readonly etag?: string; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface NetworkWatcherListResult { - value?: NetworkWatcher[]; -} - -// @public -export interface NetworkWatchers { - beginCheckConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: ConnectivityParameters, options?: NetworkWatchersCheckConnectivityOptionalParams): Promise, NetworkWatchersCheckConnectivityResponse>>; - beginCheckConnectivityAndWait(resourceGroupName: string, networkWatcherName: string, parameters: ConnectivityParameters, options?: NetworkWatchersCheckConnectivityOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkWatcherName: string, options?: NetworkWatchersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkWatcherName: string, options?: NetworkWatchersDeleteOptionalParams): Promise; - beginGetAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: AzureReachabilityReportParameters, options?: NetworkWatchersGetAzureReachabilityReportOptionalParams): Promise, NetworkWatchersGetAzureReachabilityReportResponse>>; - beginGetAzureReachabilityReportAndWait(resourceGroupName: string, networkWatcherName: string, parameters: AzureReachabilityReportParameters, options?: NetworkWatchersGetAzureReachabilityReportOptionalParams): Promise; - beginGetFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: FlowLogStatusParameters, options?: NetworkWatchersGetFlowLogStatusOptionalParams): Promise, NetworkWatchersGetFlowLogStatusResponse>>; - beginGetFlowLogStatusAndWait(resourceGroupName: string, networkWatcherName: string, parameters: FlowLogStatusParameters, options?: NetworkWatchersGetFlowLogStatusOptionalParams): Promise; - beginGetNetworkConfigurationDiagnostic(resourceGroupName: string, networkWatcherName: string, parameters: NetworkConfigurationDiagnosticParameters, options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams): Promise, NetworkWatchersGetNetworkConfigurationDiagnosticResponse>>; - beginGetNetworkConfigurationDiagnosticAndWait(resourceGroupName: string, networkWatcherName: string, parameters: NetworkConfigurationDiagnosticParameters, options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams): Promise; - beginGetNextHop(resourceGroupName: string, networkWatcherName: string, parameters: NextHopParameters, options?: NetworkWatchersGetNextHopOptionalParams): Promise, NetworkWatchersGetNextHopResponse>>; - beginGetNextHopAndWait(resourceGroupName: string, networkWatcherName: string, parameters: NextHopParameters, options?: NetworkWatchersGetNextHopOptionalParams): Promise; - beginGetTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: TroubleshootingParameters, options?: NetworkWatchersGetTroubleshootingOptionalParams): Promise, NetworkWatchersGetTroubleshootingResponse>>; - beginGetTroubleshootingAndWait(resourceGroupName: string, networkWatcherName: string, parameters: TroubleshootingParameters, options?: NetworkWatchersGetTroubleshootingOptionalParams): Promise; - beginGetTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: QueryTroubleshootingParameters, options?: NetworkWatchersGetTroubleshootingResultOptionalParams): Promise, NetworkWatchersGetTroubleshootingResultResponse>>; - beginGetTroubleshootingResultAndWait(resourceGroupName: string, networkWatcherName: string, parameters: QueryTroubleshootingParameters, options?: NetworkWatchersGetTroubleshootingResultOptionalParams): Promise; - beginGetVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: SecurityGroupViewParameters, options?: NetworkWatchersGetVMSecurityRulesOptionalParams): Promise, NetworkWatchersGetVMSecurityRulesResponse>>; - beginGetVMSecurityRulesAndWait(resourceGroupName: string, networkWatcherName: string, parameters: SecurityGroupViewParameters, options?: NetworkWatchersGetVMSecurityRulesOptionalParams): Promise; - beginListAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: AvailableProvidersListParameters, options?: NetworkWatchersListAvailableProvidersOptionalParams): Promise, NetworkWatchersListAvailableProvidersResponse>>; - beginListAvailableProvidersAndWait(resourceGroupName: string, networkWatcherName: string, parameters: AvailableProvidersListParameters, options?: NetworkWatchersListAvailableProvidersOptionalParams): Promise; - beginSetFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: FlowLogInformation, options?: NetworkWatchersSetFlowLogConfigurationOptionalParams): Promise, NetworkWatchersSetFlowLogConfigurationResponse>>; - beginSetFlowLogConfigurationAndWait(resourceGroupName: string, networkWatcherName: string, parameters: FlowLogInformation, options?: NetworkWatchersSetFlowLogConfigurationOptionalParams): Promise; - beginVerifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: VerificationIPFlowParameters, options?: NetworkWatchersVerifyIPFlowOptionalParams): Promise, NetworkWatchersVerifyIPFlowResponse>>; - beginVerifyIPFlowAndWait(resourceGroupName: string, networkWatcherName: string, parameters: VerificationIPFlowParameters, options?: NetworkWatchersVerifyIPFlowOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkWatcherName: string, parameters: NetworkWatcher, options?: NetworkWatchersCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkWatcherName: string, options?: NetworkWatchersGetOptionalParams): Promise; - getTopology(resourceGroupName: string, networkWatcherName: string, parameters: TopologyParameters, options?: NetworkWatchersGetTopologyOptionalParams): Promise; - list(resourceGroupName: string, options?: NetworkWatchersListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: NetworkWatchersListAllOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, networkWatcherName: string, parameters: TagsObject, options?: NetworkWatchersUpdateTagsOptionalParams): Promise; -} - -// @public -export interface NetworkWatchersCheckConnectivityOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkWatchersCheckConnectivityResponse = ConnectivityInformation; - -// @public -export interface NetworkWatchersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkWatchersCreateOrUpdateResponse = NetworkWatcher; - -// @public -export interface NetworkWatchersDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface NetworkWatchersGetAzureReachabilityReportOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkWatchersGetAzureReachabilityReportResponse = AzureReachabilityReport; - -// @public -export interface NetworkWatchersGetFlowLogStatusOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkWatchersGetFlowLogStatusResponse = FlowLogInformation; - -// @public -export interface NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkWatchersGetNetworkConfigurationDiagnosticResponse = NetworkConfigurationDiagnosticResponse; - -// @public -export interface NetworkWatchersGetNextHopOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkWatchersGetNextHopResponse = NextHopResult; - -// @public -export interface NetworkWatchersGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkWatchersGetResponse = NetworkWatcher; - -// @public -export interface NetworkWatchersGetTopologyOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkWatchersGetTopologyResponse = Topology; - -// @public -export interface NetworkWatchersGetTroubleshootingOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkWatchersGetTroubleshootingResponse = TroubleshootingResult; - -// @public -export interface NetworkWatchersGetTroubleshootingResultOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkWatchersGetTroubleshootingResultResponse = TroubleshootingResult; - -// @public -export interface NetworkWatchersGetVMSecurityRulesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkWatchersGetVMSecurityRulesResponse = SecurityGroupViewResult; - -// @public -export interface NetworkWatchersListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkWatchersListAllResponse = NetworkWatcherListResult; - -// @public -export interface NetworkWatchersListAvailableProvidersOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkWatchersListAvailableProvidersResponse = AvailableProvidersList; - -// @public -export interface NetworkWatchersListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkWatchersListResponse = NetworkWatcherListResult; - -// @public -export interface NetworkWatchersSetFlowLogConfigurationOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkWatchersSetFlowLogConfigurationResponse = FlowLogInformation; - -// @public -export interface NetworkWatchersUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type NetworkWatchersUpdateTagsResponse = NetworkWatcher; - -// @public -export interface NetworkWatchersVerifyIPFlowOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type NetworkWatchersVerifyIPFlowResponse = VerificationIPFlowResult; - -// @public -export interface NextHopParameters { - destinationIPAddress: string; - sourceIPAddress: string; - targetNicResourceId?: string; - targetResourceId: string; -} - -// @public -export interface NextHopResult { - nextHopIpAddress?: string; - nextHopType?: NextHopType; - routeTableId?: string; -} - -// @public -export type NextHopType = string; - -// @public -export type NextStep = string; - -// @public -export type NicTypeInRequest = string; - -// @public -export type NicTypeInResponse = string; - -// @public -export interface NspAccessRule extends SecurityPerimeterProxyResource { - addressPrefixes?: string[]; - direction?: AccessRuleDirection; - emailAddresses?: string[]; - fullyQualifiedDomainNames?: string[]; - readonly networkSecurityPerimeters?: PerimeterBasedAccessRule[]; - phoneNumbers?: string[]; - readonly provisioningState?: NspProvisioningState; - serviceTags?: string[]; - subscriptions?: SubscriptionId[]; -} - -// @public -export interface NspAccessRuleListResult { - nextLink?: string; - value?: NspAccessRule[]; -} - -// @public -export interface NspAssociation extends SecurityPerimeterProxyResource { - accessMode?: AssociationAccessMode; - readonly hasProvisioningIssues?: string; - privateLinkResource?: SubResource; - profile?: SubResource; - readonly provisioningState?: NspProvisioningState; -} - -// @public -export interface NspAssociationsListResult { - nextLink?: string; - value?: NspAssociation[]; -} - -// @public -export interface NspLink extends SecurityPerimeterProxyResource { - autoApprovedRemotePerimeterResourceId?: string; - description?: string; - localInboundProfiles?: string[]; - readonly localOutboundProfiles?: string[]; - readonly provisioningState?: NspLinkProvisioningState; - remoteInboundProfiles?: string[]; - readonly remoteOutboundProfiles?: string[]; - readonly remotePerimeterGuid?: string; - readonly remotePerimeterLocation?: string; - readonly status?: NspLinkStatus; -} - -// @public -export interface NspLinkListResult { - nextLink?: string; - value?: NspLink[]; -} - -// @public -export type NspLinkProvisioningState = string; - -// @public -export interface NspLinkReference extends SecurityPerimeterProxyResource { - readonly description?: string; - localInboundProfiles?: string[]; - readonly localOutboundProfiles?: string[]; - readonly provisioningState?: NspLinkProvisioningState; - readonly remoteInboundProfiles?: string[]; - readonly remoteOutboundProfiles?: string[]; - readonly remotePerimeterGuid?: string; - readonly remotePerimeterLocation?: string; - readonly remotePerimeterResourceId?: string; - status?: NspLinkStatus; -} - -// @public -export interface NspLinkReferenceListResult { - nextLink?: string; - value?: NspLinkReference[]; -} - -// @public -export type NspLinkStatus = string; - -// @public -export interface NspLoggingConfiguration extends SecurityPerimeterProxyResource { - enabledLogCategories?: string[]; - version?: string; -} - -// @public -export interface NspLoggingConfigurationListResult { - nextLink?: string; - value?: NspLoggingConfiguration[]; -} - -// @public -export interface NspProfile extends SecurityPerimeterProxyResource { - readonly accessRulesVersion?: string; - readonly diagnosticSettingsVersion?: string; -} - -// @public -export interface NspProfileListResult { - nextLink?: string; - value?: NspProfile[]; -} - -// @public -export type NspProvisioningState = string; - -// @public -export interface NspServiceTagsListResult { - nextLink?: string; - value?: NspServiceTagsResource[]; -} - -// @public -export interface NspServiceTagsResource { - serviceTags?: string[]; -} - -// @public -export interface NvaInterfaceConfigurationsProperties { - name?: string; - subnet?: NvaInVnetSubnetReferenceProperties; - type?: NvaNicType[]; -} - -// @public -export interface NvaInVnetSubnetReferenceProperties { - id?: string; -} - -// @public -export type NvaNicType = string; - -// @public -export interface O365BreakOutCategoryPolicies { - allow?: boolean; - default?: boolean; - optimize?: boolean; -} - -// @public -export interface O365PolicyProperties { - breakOutCategories?: O365BreakOutCategoryPolicies; -} - -// @public -export interface Office365PolicyProperties { - breakOutCategories?: BreakOutCategoryPolicies; -} - -// @public -export type OfficeTrafficCategory = string; - -// @public -export interface Operation { - display?: OperationDisplay; - name?: string; - origin?: string; - serviceSpecification?: OperationPropertiesFormatServiceSpecification; -} - -// @public -export interface OperationDisplay { - description?: string; - operation?: string; - provider?: string; - resource?: string; -} - -// @public -export interface OperationListResult { - nextLink?: string; - value?: Operation[]; -} - -// @public -export interface OperationPropertiesFormatServiceSpecification { - logSpecifications?: LogSpecification[]; - metricSpecifications?: MetricSpecification[]; -} - -// @public -export interface Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationsListNextResponse = OperationListResult; - -// @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationsListResponse = OperationListResult; - -// @public -export interface OperationStatusResult { - endTime?: Date; - error?: ErrorDetail; - id?: string; - name?: string; - operations?: OperationStatusResult[]; - percentComplete?: number; - readonly resourceId?: string; - startTime?: Date; - status: string; -} - -// @public -export interface OrderBy { - field?: string; - order?: FirewallPolicyIdpsQuerySortOrder; -} - -// @public -export type Origin = string; - -// @public -export interface OutboundRule extends SubResource { - allocatedOutboundPorts?: number; - backendAddressPool?: SubResource; - enableTcpReset?: boolean; - readonly etag?: string; - frontendIPConfigurations?: SubResource[]; - idleTimeoutInMinutes?: number; - name?: string; - protocol?: LoadBalancerOutboundRuleProtocol; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export type OutputType = string; - -// @public -export interface OwaspCrsExclusionEntry { - exclusionManagedRuleSets?: ExclusionManagedRuleSet[]; - matchVariable: OwaspCrsExclusionEntryMatchVariable; - selector: string; - selectorMatchOperator: OwaspCrsExclusionEntrySelectorMatchOperator; -} - -// @public -export type OwaspCrsExclusionEntryMatchVariable = string; - -// @public -export type OwaspCrsExclusionEntrySelectorMatchOperator = string; - -// @public -export interface P2SConnectionConfiguration extends SubResource { - configurationPolicyGroupAssociations?: SubResource[]; - enableInternetSecurity?: boolean; - readonly etag?: string; - name?: string; - readonly previousConfigurationPolicyGroupAssociations?: VpnServerConfigurationPolicyGroup[]; - readonly provisioningState?: ProvisioningState; - routingConfiguration?: RoutingConfiguration; - vpnClientAddressPool?: AddressSpace; -} - -// @public -export interface P2SVpnConnectionHealth { - sasUrl?: string; -} - -// @public -export interface P2SVpnConnectionHealthRequest { - outputBlobSasUrl?: string; - vpnUserNamesFilter?: string[]; -} - -// @public -export interface P2SVpnConnectionRequest { - vpnConnectionIds?: string[]; -} - -// @public -export interface P2SVpnGateway extends Resource { - customDnsServers?: string[]; - readonly etag?: string; - isRoutingPreferenceInternet?: boolean; - p2SConnectionConfigurations?: P2SConnectionConfiguration[]; - readonly provisioningState?: ProvisioningState; - virtualHub?: SubResource; - readonly vpnClientConnectionHealth?: VpnClientConnectionHealth; - vpnGatewayScaleUnit?: number; - vpnServerConfiguration?: SubResource; -} - -// @public -export interface P2SVpnGateways { - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: P2SVpnGateway, options?: P2SVpnGatewaysCreateOrUpdateOptionalParams): Promise, P2SVpnGatewaysCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: P2SVpnGateway, options?: P2SVpnGatewaysCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, gatewayName: string, options?: P2SVpnGatewaysDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, gatewayName: string, options?: P2SVpnGatewaysDeleteOptionalParams): Promise; - beginDisconnectP2SVpnConnections(resourceGroupName: string, p2SVpnGatewayName: string, request: P2SVpnConnectionRequest, options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams): Promise, void>>; - beginDisconnectP2SVpnConnectionsAndWait(resourceGroupName: string, p2SVpnGatewayName: string, request: P2SVpnConnectionRequest, options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams): Promise; - beginGenerateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: P2SVpnProfileParameters, options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams): Promise, P2SVpnGatewaysGenerateVpnProfileResponse>>; - beginGenerateVpnProfileAndWait(resourceGroupName: string, gatewayName: string, parameters: P2SVpnProfileParameters, options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams): Promise; - beginGetP2SVpnConnectionHealth(resourceGroupName: string, gatewayName: string, options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams): Promise, P2SVpnGatewaysGetP2SVpnConnectionHealthResponse>>; - beginGetP2SVpnConnectionHealthAndWait(resourceGroupName: string, gatewayName: string, options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams): Promise; - beginGetP2SVpnConnectionHealthDetailed(resourceGroupName: string, gatewayName: string, request: P2SVpnConnectionHealthRequest, options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams): Promise, P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedResponse>>; - beginGetP2SVpnConnectionHealthDetailedAndWait(resourceGroupName: string, gatewayName: string, request: P2SVpnConnectionHealthRequest, options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams): Promise; - beginReset(resourceGroupName: string, gatewayName: string, options?: P2SVpnGatewaysResetOptionalParams): Promise, P2SVpnGatewaysResetResponse>>; - beginResetAndWait(resourceGroupName: string, gatewayName: string, options?: P2SVpnGatewaysResetOptionalParams): Promise; - beginUpdateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: TagsObject, options?: P2SVpnGatewaysUpdateTagsOptionalParams): Promise, P2SVpnGatewaysUpdateTagsResponse>>; - beginUpdateTagsAndWait(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: TagsObject, options?: P2SVpnGatewaysUpdateTagsOptionalParams): Promise; - get(resourceGroupName: string, gatewayName: string, options?: P2SVpnGatewaysGetOptionalParams): Promise; - list(options?: P2SVpnGatewaysListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: P2SVpnGatewaysListByResourceGroupOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface P2SVpnGatewaysCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type P2SVpnGatewaysCreateOrUpdateResponse = P2SVpnGateway; - -// @public -export interface P2SVpnGatewaysDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface P2SVpnGatewaysGenerateVpnProfileOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type P2SVpnGatewaysGenerateVpnProfileResponse = VpnProfileResponse; - -// @public -export interface P2SVpnGatewaysGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedResponse = P2SVpnConnectionHealth; - -// @public -export interface P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type P2SVpnGatewaysGetP2SVpnConnectionHealthResponse = P2SVpnGateway; - -// @public -export type P2SVpnGatewaysGetResponse = P2SVpnGateway; - -// @public -export interface P2SVpnGatewaysListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type P2SVpnGatewaysListByResourceGroupNextResponse = ListP2SVpnGatewaysResult; - -// @public -export interface P2SVpnGatewaysListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type P2SVpnGatewaysListByResourceGroupResponse = ListP2SVpnGatewaysResult; - -// @public -export interface P2SVpnGatewaysListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type P2SVpnGatewaysListNextResponse = ListP2SVpnGatewaysResult; - -// @public -export interface P2SVpnGatewaysListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type P2SVpnGatewaysListResponse = ListP2SVpnGatewaysResult; - -// @public -export interface P2SVpnGatewaysResetOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type P2SVpnGatewaysResetResponse = P2SVpnGateway; - -// @public -export interface P2SVpnGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type P2SVpnGatewaysUpdateTagsResponse = P2SVpnGateway; - -// @public -export interface P2SVpnProfileParameters { - authenticationMethod?: AuthenticationMethod; -} - -// @public -export interface PacketCapture { - bytesToCapturePerPacket?: number; - captureSettings?: PacketCaptureSettings; - continuousCapture?: boolean; - filters?: PacketCaptureFilter[]; - scope?: PacketCaptureMachineScope; - storageLocation: PacketCaptureStorageLocation; - target: string; - targetType?: PacketCaptureTargetType; - timeLimitInSeconds?: number; - totalBytesPerSession?: number; -} - -// @public -export interface PacketCaptureFilter { - localIPAddress?: string; - localPort?: string; - protocol?: PcProtocol; - remoteIPAddress?: string; - remotePort?: string; -} - -// @public -export interface PacketCaptureListResult { - value?: PacketCaptureResult[]; -} - -// @public -export interface PacketCaptureMachineScope { - exclude?: string[]; - include?: string[]; -} - -// @public -export interface PacketCaptureParameters { - bytesToCapturePerPacket?: number; - captureSettings?: PacketCaptureSettings; - continuousCapture?: boolean; - filters?: PacketCaptureFilter[]; - scope?: PacketCaptureMachineScope; - storageLocation: PacketCaptureStorageLocation; - target: string; - targetType?: PacketCaptureTargetType; - timeLimitInSeconds?: number; - totalBytesPerSession?: number; -} - -// @public -export interface PacketCaptureQueryStatusResult { - captureStartTime?: Date; - id?: string; - name?: string; - packetCaptureError?: PcError[]; - packetCaptureStatus?: PcStatus; - stopReason?: string; -} - -// @public -export interface PacketCaptureResult { - bytesToCapturePerPacket?: number; - captureSettings?: PacketCaptureSettings; - continuousCapture?: boolean; - readonly etag?: string; - filters?: PacketCaptureFilter[]; - readonly id?: string; - readonly name?: string; - readonly provisioningState?: ProvisioningState; - scope?: PacketCaptureMachineScope; - storageLocation?: PacketCaptureStorageLocation; - target?: string; - targetType?: PacketCaptureTargetType; - timeLimitInSeconds?: number; - totalBytesPerSession?: number; -} - -// @public -export interface PacketCaptureResultProperties extends PacketCaptureParameters { - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface PacketCaptures { - beginCreate(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: PacketCapture, options?: PacketCapturesCreateOptionalParams): Promise, PacketCapturesCreateResponse>>; - beginCreateAndWait(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: PacketCapture, options?: PacketCapturesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: PacketCapturesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: PacketCapturesDeleteOptionalParams): Promise; - beginGetStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: PacketCapturesGetStatusOptionalParams): Promise, PacketCapturesGetStatusResponse>>; - beginGetStatusAndWait(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: PacketCapturesGetStatusOptionalParams): Promise; - beginStop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: PacketCapturesStopOptionalParams): Promise, void>>; - beginStopAndWait(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: PacketCapturesStopOptionalParams): Promise; - get(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: PacketCapturesGetOptionalParams): Promise; - list(resourceGroupName: string, networkWatcherName: string, options?: PacketCapturesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface PacketCapturesCreateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PacketCapturesCreateResponse = PacketCaptureResult; - -// @public -export interface PacketCapturesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface PacketCaptureSettings { - fileCount?: number; - fileSizeInBytes?: number; - sessionTimeLimitInSeconds?: number; -} - -// @public -export interface PacketCapturesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PacketCapturesGetResponse = PacketCaptureResult; - -// @public -export interface PacketCapturesGetStatusOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PacketCapturesGetStatusResponse = PacketCaptureQueryStatusResult; - -// @public -export interface PacketCapturesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PacketCapturesListResponse = PacketCaptureListResult; - -// @public -export interface PacketCapturesStopOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface PacketCaptureStorageLocation { - filePath?: string; - localPath?: string; - storageId?: string; - storagePath?: string; -} - -// @public -export type PacketCaptureTargetType = "AzureVM" | "AzureVMSS"; - -// @public -export interface Parameter { - asPath?: string[]; - community?: string[]; - routePrefix?: string[]; -} - -// @public -export interface PartnerManagedResourceProperties { - readonly id?: string; - readonly internalLoadBalancerId?: string; - readonly standardLoadBalancerId?: string; -} - -// @public -export interface PatchObject { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface PatchRouteFilter extends SubResource { - readonly etag?: string; - readonly ipv6Peerings?: ExpressRouteCircuitPeering[]; - readonly name?: string; - readonly peerings?: ExpressRouteCircuitPeering[]; - readonly provisioningState?: ProvisioningState; - rules?: RouteFilterRule[]; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; -} - -// @public -export interface PatchRouteFilterRule extends SubResource { - access?: Access; - communities?: string[]; - readonly etag?: string; - readonly name?: string; - readonly provisioningState?: ProvisioningState; - routeFilterRuleType?: RouteFilterRuleType; -} - -// @public -export type PcError = string; - -// @public -export type PcProtocol = string; - -// @public -export type PcStatus = string; - -// @public -export interface PeerExpressRouteCircuitConnection extends SubResource { - addressPrefix?: string; - authResourceGuid?: string; - readonly circuitConnectionStatus?: CircuitConnectionStatus; - connectionName?: string; - readonly etag?: string; - expressRouteCircuitPeering?: SubResource; - name?: string; - peerExpressRouteCircuitPeering?: SubResource; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface PeerExpressRouteCircuitConnectionListResult { - nextLink?: string; - value?: PeerExpressRouteCircuitConnection[]; -} - -// @public -export interface PeerExpressRouteCircuitConnections { - get(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options?: PeerExpressRouteCircuitConnectionsGetOptionalParams): Promise; - list(resourceGroupName: string, circuitName: string, peeringName: string, options?: PeerExpressRouteCircuitConnectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface PeerExpressRouteCircuitConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PeerExpressRouteCircuitConnectionsGetResponse = PeerExpressRouteCircuitConnection; - -// @public -export interface PeerExpressRouteCircuitConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PeerExpressRouteCircuitConnectionsListNextResponse = PeerExpressRouteCircuitConnectionListResult; - -// @public -export interface PeerExpressRouteCircuitConnectionsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PeerExpressRouteCircuitConnectionsListResponse = PeerExpressRouteCircuitConnectionListResult; - -// @public -export type PeeringEnforcement = string; - -// @public -export interface PeerRoute { - readonly asPath?: string; - readonly localAddress?: string; - readonly network?: string; - readonly nextHop?: string; - readonly origin?: string; - readonly sourcePeer?: string; - readonly weight?: number; -} - -// @public -export interface PerimeterAssociableResource { - readonly displayName?: string; - readonly id?: string; - name?: string; - readonly publicDnsZones?: string[]; - readonly resourceType?: string; - readonly type?: string; -} - -// @public -export interface PerimeterAssociableResourcesListResult { - nextLink?: string; - value?: PerimeterAssociableResource[]; -} - -// @public (undocumented) -export interface PerimeterBasedAccessRule { - readonly id?: string; - readonly location?: string; - readonly perimeterGuid?: string; -} - -// @public -export type PfsGroup = string; - -// @public -export interface PolicySettings { - captchaCookieExpirationInMins?: number; - customBlockResponseBody?: string; - customBlockResponseStatusCode?: number; - fileUploadEnforcement?: boolean; - fileUploadLimitInMb?: number; - jsChallengeCookieExpirationInMins?: number; - logScrubbing?: PolicySettingsLogScrubbing; - maxRequestBodySizeInKb?: number; - mode?: WebApplicationFirewallMode; - requestBodyCheck?: boolean; - requestBodyEnforcement?: boolean; - requestBodyInspectLimitInKB?: number; - state?: WebApplicationFirewallEnabledState; -} - -// @public -export interface PolicySettingsLogScrubbing { - scrubbingRules?: WebApplicationFirewallScrubbingRules[]; - state?: WebApplicationFirewallScrubbingState; -} - -// @public -export interface PoolAssociation { - readonly addressPrefixes?: string[]; - readonly createdAt?: Date; - // (undocumented) - description?: string; - readonly numberOfReservedIPAddresses?: string; - poolId?: string; - readonly reservationExpiresAt?: Date; - readonly reservedPrefixes?: string[]; - resourceId: string; - readonly totalNumberOfIPAddresses?: string; -} - -// @public -export interface PoolAssociationList { - nextLink?: string; - // (undocumented) - value?: PoolAssociation[]; -} - -// @public -export interface PoolUsage { - readonly addressPrefixes?: string[]; - readonly allocatedAddressPrefixes?: string[]; - readonly availableAddressPrefixes?: string[]; - readonly childPools?: ResourceBasics[]; - readonly numberOfAllocatedIPAddresses?: string; - readonly numberOfAvailableIPAddresses?: string; - readonly numberOfReservedIPAddresses?: string; - readonly reservedAddressPrefixes?: string[]; - readonly totalNumberOfIPAddresses?: string; -} - -// @public -export type PreferredIPVersion = string; - -// @public -export type PreferredRoutingGateway = string; - -// @public -export interface PrepareNetworkPoliciesRequest { - networkIntentPolicyConfigurations?: NetworkIntentPolicyConfiguration[]; - serviceName?: string; -} - -// @public -export interface PrivateDnsZoneConfig { - name?: string; - privateDnsZoneId?: string; - readonly recordSets?: RecordSet[]; -} - -// @public -export interface PrivateDnsZoneGroup extends SubResource { - readonly etag?: string; - name?: string; - privateDnsZoneConfigs?: PrivateDnsZoneConfig[]; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface PrivateDnsZoneGroupListResult { - readonly nextLink?: string; - value?: PrivateDnsZoneGroup[]; -} - -// @public -export interface PrivateDnsZoneGroups { - beginCreateOrUpdate(resourceGroupName: string, privateEndpointName: string, privateDnsZoneGroupName: string, parameters: PrivateDnsZoneGroup, options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams): Promise, PrivateDnsZoneGroupsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateEndpointName: string, privateDnsZoneGroupName: string, parameters: PrivateDnsZoneGroup, options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateEndpointName: string, privateDnsZoneGroupName: string, options?: PrivateDnsZoneGroupsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateEndpointName: string, privateDnsZoneGroupName: string, options?: PrivateDnsZoneGroupsDeleteOptionalParams): Promise; - get(resourceGroupName: string, privateEndpointName: string, privateDnsZoneGroupName: string, options?: PrivateDnsZoneGroupsGetOptionalParams): Promise; - list(privateEndpointName: string, resourceGroupName: string, options?: PrivateDnsZoneGroupsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface PrivateDnsZoneGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PrivateDnsZoneGroupsCreateOrUpdateResponse = PrivateDnsZoneGroup; - -// @public -export interface PrivateDnsZoneGroupsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface PrivateDnsZoneGroupsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateDnsZoneGroupsGetResponse = PrivateDnsZoneGroup; - -// @public -export interface PrivateDnsZoneGroupsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateDnsZoneGroupsListNextResponse = PrivateDnsZoneGroupListResult; - -// @public -export interface PrivateDnsZoneGroupsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateDnsZoneGroupsListResponse = PrivateDnsZoneGroupListResult; - -// @public -export interface PrivateEndpoint extends Resource { - applicationSecurityGroups?: ApplicationSecurityGroup[]; - customDnsConfigs?: CustomDnsConfigPropertiesFormat[]; - customNetworkInterfaceName?: string; - readonly etag?: string; - extendedLocation?: ExtendedLocation; - ipConfigurations?: PrivateEndpointIPConfiguration[]; - ipVersionType?: PrivateEndpointIPVersionType; - manualPrivateLinkServiceConnections?: PrivateLinkServiceConnection[]; - readonly networkInterfaces?: NetworkInterface[]; - privateLinkServiceConnections?: PrivateLinkServiceConnection[]; - readonly provisioningState?: ProvisioningState; - subnet?: Subnet; -} - -// @public -export interface PrivateEndpointConnection extends SubResource { - readonly etag?: string; - readonly linkIdentifier?: string; - name?: string; - readonly privateEndpoint?: PrivateEndpoint; - readonly privateEndpointLocation?: string; - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface PrivateEndpointConnectionListResult { - readonly nextLink?: string; - value?: PrivateEndpointConnection[]; -} - -// @public -export interface PrivateEndpointIPConfiguration { - readonly etag?: string; - groupId?: string; - memberName?: string; - name?: string; - privateIPAddress?: string; - readonly type?: string; -} - -// @public -export type PrivateEndpointIPVersionType = string; - -// @public -export interface PrivateEndpointListResult { - readonly nextLink?: string; - value?: PrivateEndpoint[]; -} - -// @public -export interface PrivateEndpoints { - beginCreateOrUpdate(resourceGroupName: string, privateEndpointName: string, parameters: PrivateEndpoint, options?: PrivateEndpointsCreateOrUpdateOptionalParams): Promise, PrivateEndpointsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateEndpointName: string, parameters: PrivateEndpoint, options?: PrivateEndpointsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateEndpointName: string, options?: PrivateEndpointsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateEndpointName: string, options?: PrivateEndpointsDeleteOptionalParams): Promise; - get(resourceGroupName: string, privateEndpointName: string, options?: PrivateEndpointsGetOptionalParams): Promise; - list(resourceGroupName: string, options?: PrivateEndpointsListOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: PrivateEndpointsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface PrivateEndpointsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PrivateEndpointsCreateOrUpdateResponse = PrivateEndpoint; - -// @public -export interface PrivateEndpointsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface PrivateEndpointsGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type PrivateEndpointsGetResponse = PrivateEndpoint; - -// @public -export interface PrivateEndpointsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateEndpointsListBySubscriptionNextResponse = PrivateEndpointListResult; - -// @public -export interface PrivateEndpointsListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateEndpointsListBySubscriptionResponse = PrivateEndpointListResult; - -// @public -export interface PrivateEndpointsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateEndpointsListNextResponse = PrivateEndpointListResult; - -// @public -export interface PrivateEndpointsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateEndpointsListResponse = PrivateEndpointListResult; - -// @public -export type PrivateEndpointVNetPolicies = string; - -// @public -export interface PrivateLinkService extends Resource { - accessMode?: AccessMode; - readonly alias?: string; - autoApproval?: PrivateLinkServicePropertiesAutoApproval; - destinationIPAddress?: string; - enableProxyProtocol?: boolean; - readonly etag?: string; - extendedLocation?: ExtendedLocation; - fqdns?: string[]; - ipConfigurations?: PrivateLinkServiceIpConfiguration[]; - loadBalancerFrontendIpConfigurations?: FrontendIPConfiguration[]; - readonly networkInterfaces?: NetworkInterface[]; - readonly privateEndpointConnections?: PrivateEndpointConnection[]; - readonly provisioningState?: ProvisioningState; - visibility?: PrivateLinkServicePropertiesVisibility; -} - -// @public -export interface PrivateLinkServiceConnection extends SubResource { - readonly etag?: string; - groupIds?: string[]; - name?: string; - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - privateLinkServiceId?: string; - readonly provisioningState?: ProvisioningState; - requestMessage?: string; - readonly type?: string; -} - -// @public -export interface PrivateLinkServiceConnectionState { - actionsRequired?: string; - description?: string; - status?: string; -} - -// @public -export interface PrivateLinkServiceIpConfiguration extends SubResource { - readonly etag?: string; - name?: string; - primary?: boolean; - privateIPAddress?: string; - privateIPAddressVersion?: IPVersion; - privateIPAllocationMethod?: IPAllocationMethod; - readonly provisioningState?: ProvisioningState; - subnet?: Subnet; - readonly type?: string; -} - -// @public -export interface PrivateLinkServiceListResult { - readonly nextLink?: string; - value?: PrivateLinkService[]; -} - -// @public -export interface PrivateLinkServicePropertiesAutoApproval extends ResourceSet { -} - -// @public -export interface PrivateLinkServicePropertiesVisibility extends ResourceSet { -} - -// @public -export interface PrivateLinkServices { - beginCheckPrivateLinkServiceVisibility(location: string, parameters: CheckPrivateLinkServiceVisibilityRequest, options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams): Promise, PrivateLinkServicesCheckPrivateLinkServiceVisibilityResponse>>; - beginCheckPrivateLinkServiceVisibilityAndWait(location: string, parameters: CheckPrivateLinkServiceVisibilityRequest, options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams): Promise; - beginCheckPrivateLinkServiceVisibilityByResourceGroup(location: string, resourceGroupName: string, parameters: CheckPrivateLinkServiceVisibilityRequest, options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams): Promise, PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupResponse>>; - beginCheckPrivateLinkServiceVisibilityByResourceGroupAndWait(location: string, resourceGroupName: string, parameters: CheckPrivateLinkServiceVisibilityRequest, options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, parameters: PrivateLinkService, options?: PrivateLinkServicesCreateOrUpdateOptionalParams): Promise, PrivateLinkServicesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, parameters: PrivateLinkService, options?: PrivateLinkServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, options?: PrivateLinkServicesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, serviceName: string, options?: PrivateLinkServicesDeleteOptionalParams): Promise; - beginDeletePrivateEndpointConnection(resourceGroupName: string, serviceName: string, peConnectionName: string, options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams): Promise, void>>; - beginDeletePrivateEndpointConnectionAndWait(resourceGroupName: string, serviceName: string, peConnectionName: string, options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, options?: PrivateLinkServicesGetOptionalParams): Promise; - getPrivateEndpointConnection(resourceGroupName: string, serviceName: string, peConnectionName: string, options?: PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams): Promise; - list(resourceGroupName: string, options?: PrivateLinkServicesListOptionalParams): PagedAsyncIterableIterator; - listAutoApprovedPrivateLinkServices(location: string, options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams): PagedAsyncIterableIterator; - listAutoApprovedPrivateLinkServicesByResourceGroup(location: string, resourceGroupName: string, options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: PrivateLinkServicesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - listPrivateEndpointConnections(resourceGroupName: string, serviceName: string, options?: PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams): PagedAsyncIterableIterator; - updatePrivateEndpointConnection(resourceGroupName: string, serviceName: string, peConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams): Promise; -} - -// @public -export interface PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupResponse = PrivateLinkServiceVisibility; - -// @public -export interface PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PrivateLinkServicesCheckPrivateLinkServiceVisibilityResponse = PrivateLinkServiceVisibility; - -// @public -export interface PrivateLinkServicesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PrivateLinkServicesCreateOrUpdateResponse = PrivateLinkService; - -// @public -export interface PrivateLinkServicesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface PrivateLinkServicesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export interface PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type PrivateLinkServicesGetPrivateEndpointConnectionResponse = PrivateEndpointConnection; - -// @public -export type PrivateLinkServicesGetResponse = PrivateLinkService; - -// @public -export interface PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupNextResponse = AutoApprovedPrivateLinkServicesResult; - -// @public -export interface PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupResponse = AutoApprovedPrivateLinkServicesResult; - -// @public -export interface PrivateLinkServicesListAutoApprovedPrivateLinkServicesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkServicesListAutoApprovedPrivateLinkServicesNextResponse = AutoApprovedPrivateLinkServicesResult; - -// @public -export interface PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkServicesListAutoApprovedPrivateLinkServicesResponse = AutoApprovedPrivateLinkServicesResult; - -// @public -export interface PrivateLinkServicesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkServicesListBySubscriptionNextResponse = PrivateLinkServiceListResult; - -// @public -export interface PrivateLinkServicesListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkServicesListBySubscriptionResponse = PrivateLinkServiceListResult; - -// @public -export interface PrivateLinkServicesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkServicesListNextResponse = PrivateLinkServiceListResult; - -// @public -export interface PrivateLinkServicesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface PrivateLinkServicesListPrivateEndpointConnectionsNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkServicesListPrivateEndpointConnectionsNextResponse = PrivateEndpointConnectionListResult; - -// @public -export interface PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkServicesListPrivateEndpointConnectionsResponse = PrivateEndpointConnectionListResult; - -// @public -export type PrivateLinkServicesListResponse = PrivateLinkServiceListResult; - -// @public -export interface PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkServicesUpdatePrivateEndpointConnectionResponse = PrivateEndpointConnection; - -// @public -export interface PrivateLinkServiceVisibility { - visible?: boolean; -} - -// @public -export interface Probe extends SubResource { - readonly etag?: string; - intervalInSeconds?: number; - readonly loadBalancingRules?: SubResource[]; - name?: string; - noHealthyBackendsBehavior?: ProbeNoHealthyBackendsBehavior; - numberOfProbes?: number; - port?: number; - probeThreshold?: number; - protocol?: ProbeProtocol; - readonly provisioningState?: ProvisioningState; - requestPath?: string; - readonly type?: string; -} - -// @public -export type ProbeNoHealthyBackendsBehavior = string; - -// @public -export type ProbeProtocol = string; - -// @public -export type ProcessorArchitecture = string; - -// @public -export interface PropagatedRouteTable { - ids?: SubResource[]; - labels?: string[]; -} - -// @public -export type Protocol = string; - -// @public -export interface ProtocolConfiguration { - httpConfiguration?: HttpConfiguration; -} - -// @public -export type ProtocolType = string; - -// @public -export type ProvisioningState = string; - -// @public -export interface ProxyResource { - readonly etag?: string; - readonly id?: string; - readonly name?: string; - readonly type?: string; -} - -// @public -export interface PublicIPAddress extends Resource { - ddosSettings?: DdosSettings; - deleteOption?: DeleteOptions; - dnsSettings?: PublicIPAddressDnsSettings; - readonly etag?: string; - extendedLocation?: ExtendedLocation; - idleTimeoutInMinutes?: number; - ipAddress?: string; - readonly ipConfiguration?: IPConfiguration; - ipTags?: IpTag[]; - linkedPublicIPAddress?: PublicIPAddress; - migrationPhase?: PublicIPAddressMigrationPhase; - natGateway?: NatGateway; - readonly provisioningState?: ProvisioningState; - publicIPAddressVersion?: IPVersion; - publicIPAllocationMethod?: IPAllocationMethod; - publicIPPrefix?: SubResource; - readonly resourceGuid?: string; - servicePublicIPAddress?: PublicIPAddress; - sku?: PublicIPAddressSku; - zones?: string[]; -} - -// @public -export interface PublicIPAddressDnsSettings { - domainNameLabel?: string; - domainNameLabelScope?: PublicIpAddressDnsSettingsDomainNameLabelScope; - fqdn?: string; - reverseFqdn?: string; -} - -// @public -export type PublicIpAddressDnsSettingsDomainNameLabelScope = "TenantReuse" | "SubscriptionReuse" | "ResourceGroupReuse" | "NoReuse"; - -// @public -export interface PublicIPAddresses { - beginCreateOrUpdate(resourceGroupName: string, publicIpAddressName: string, parameters: PublicIPAddress, options?: PublicIPAddressesCreateOrUpdateOptionalParams): Promise, PublicIPAddressesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, publicIpAddressName: string, parameters: PublicIPAddress, options?: PublicIPAddressesCreateOrUpdateOptionalParams): Promise; - beginDdosProtectionStatus(resourceGroupName: string, publicIpAddressName: string, options?: PublicIPAddressesDdosProtectionStatusOptionalParams): Promise, PublicIPAddressesDdosProtectionStatusResponse>>; - beginDdosProtectionStatusAndWait(resourceGroupName: string, publicIpAddressName: string, options?: PublicIPAddressesDdosProtectionStatusOptionalParams): Promise; - beginDelete(resourceGroupName: string, publicIpAddressName: string, options?: PublicIPAddressesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, publicIpAddressName: string, options?: PublicIPAddressesDeleteOptionalParams): Promise; - beginDisassociateCloudServiceReservedPublicIp(resourceGroupName: string, publicIpAddressName: string, parameters: DisassociateCloudServicePublicIpRequest, options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams): Promise, PublicIPAddressesDisassociateCloudServiceReservedPublicIpResponse>>; - beginDisassociateCloudServiceReservedPublicIpAndWait(resourceGroupName: string, publicIpAddressName: string, parameters: DisassociateCloudServicePublicIpRequest, options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams): Promise; - beginReserveCloudServicePublicIpAddress(resourceGroupName: string, publicIpAddressName: string, parameters: ReserveCloudServicePublicIpAddressRequest, options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams): Promise, PublicIPAddressesReserveCloudServicePublicIpAddressResponse>>; - beginReserveCloudServicePublicIpAddressAndWait(resourceGroupName: string, publicIpAddressName: string, parameters: ReserveCloudServicePublicIpAddressRequest, options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams): Promise; - get(resourceGroupName: string, publicIpAddressName: string, options?: PublicIPAddressesGetOptionalParams): Promise; - getCloudServicePublicIPAddress(resourceGroupName: string, cloudServiceName: string, roleInstanceName: string, networkInterfaceName: string, ipConfigurationName: string, publicIpAddressName: string, options?: PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams): Promise; - getVirtualMachineScaleSetPublicIPAddress(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, ipConfigurationName: string, publicIpAddressName: string, options?: PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams): Promise; - list(resourceGroupName: string, options?: PublicIPAddressesListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: PublicIPAddressesListAllOptionalParams): PagedAsyncIterableIterator; - listCloudServicePublicIPAddresses(resourceGroupName: string, cloudServiceName: string, options?: PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams): PagedAsyncIterableIterator; - listCloudServiceRoleInstancePublicIPAddresses(resourceGroupName: string, cloudServiceName: string, roleInstanceName: string, networkInterfaceName: string, ipConfigurationName: string, options?: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams): PagedAsyncIterableIterator; - listVirtualMachineScaleSetPublicIPAddresses(resourceGroupName: string, virtualMachineScaleSetName: string, options?: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams): PagedAsyncIterableIterator; - listVirtualMachineScaleSetVMPublicIPAddresses(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, ipConfigurationName: string, options?: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, publicIpAddressName: string, parameters: TagsObject, options?: PublicIPAddressesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface PublicIPAddressesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PublicIPAddressesCreateOrUpdateResponse = PublicIPAddress; - -// @public -export interface PublicIPAddressesDdosProtectionStatusHeaders { - location?: string; -} - -// @public -export interface PublicIPAddressesDdosProtectionStatusOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PublicIPAddressesDdosProtectionStatusResponse = PublicIpDdosProtectionStatusResult; - -// @public -export interface PublicIPAddressesDeleteHeaders { - location?: string; -} - -// @public -export interface PublicIPAddressesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface PublicIPAddressesDisassociateCloudServiceReservedPublicIpHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PublicIPAddressesDisassociateCloudServiceReservedPublicIpResponse = PublicIPAddress; - -// @public -export interface PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type PublicIPAddressesGetCloudServicePublicIPAddressResponse = PublicIPAddress; - -// @public -export interface PublicIPAddressesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type PublicIPAddressesGetResponse = PublicIPAddress; - -// @public -export interface PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressResponse = PublicIPAddress; - -// @public -export interface PublicIPAddressesListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListAllNextResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListAllResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesListCloudServicePublicIPAddressesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListCloudServicePublicIPAddressesNextResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListCloudServicePublicIPAddressesResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesNextResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListNextResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesNextResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesNextResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesResponse = PublicIPAddressListResult; - -// @public -export interface PublicIPAddressesReserveCloudServicePublicIpAddressHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PublicIPAddressesReserveCloudServicePublicIpAddressResponse = PublicIPAddress; - -// @public -export interface PublicIPAddressesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPAddressesUpdateTagsResponse = PublicIPAddress; - -// @public -export interface PublicIPAddressListResult { - nextLink?: string; - value?: PublicIPAddress[]; -} - -// @public -export type PublicIPAddressMigrationPhase = string; - -// @public -export interface PublicIPAddressSku { - name?: PublicIPAddressSkuName; - tier?: PublicIPAddressSkuTier; -} - -// @public -export type PublicIPAddressSkuName = string; - -// @public -export type PublicIPAddressSkuTier = string; - -// @public -export interface PublicIpDdosProtectionStatusResult { - ddosProtectionPlanId?: string; - isWorkloadProtected?: IsWorkloadProtected; - publicIpAddress?: string; - publicIpAddressId?: string; -} - -// @public -export interface PublicIPPrefix extends Resource { - customIPPrefix?: SubResource; - readonly etag?: string; - extendedLocation?: ExtendedLocation; - readonly ipPrefix?: string; - ipTags?: IpTag[]; - readonly loadBalancerFrontendIpConfiguration?: SubResource; - natGateway?: NatGateway; - prefixLength?: number; - readonly provisioningState?: ProvisioningState; - readonly publicIPAddresses?: ReferencedPublicIpAddress[]; - publicIPAddressVersion?: IPVersion; - readonly resourceGuid?: string; - sku?: PublicIPPrefixSku; - zones?: string[]; -} - -// @public -export interface PublicIPPrefixes { - beginCreateOrUpdate(resourceGroupName: string, publicIpPrefixName: string, parameters: PublicIPPrefix, options?: PublicIPPrefixesCreateOrUpdateOptionalParams): Promise, PublicIPPrefixesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, publicIpPrefixName: string, parameters: PublicIPPrefix, options?: PublicIPPrefixesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, publicIpPrefixName: string, options?: PublicIPPrefixesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, publicIpPrefixName: string, options?: PublicIPPrefixesDeleteOptionalParams): Promise; - get(resourceGroupName: string, publicIpPrefixName: string, options?: PublicIPPrefixesGetOptionalParams): Promise; - list(resourceGroupName: string, options?: PublicIPPrefixesListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: PublicIPPrefixesListAllOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, publicIpPrefixName: string, parameters: TagsObject, options?: PublicIPPrefixesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface PublicIPPrefixesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PublicIPPrefixesCreateOrUpdateResponse = PublicIPPrefix; - -// @public -export interface PublicIPPrefixesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface PublicIPPrefixesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type PublicIPPrefixesGetResponse = PublicIPPrefix; - -// @public -export interface PublicIPPrefixesListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPPrefixesListAllNextResponse = PublicIPPrefixListResult; - -// @public -export interface PublicIPPrefixesListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPPrefixesListAllResponse = PublicIPPrefixListResult; - -// @public -export interface PublicIPPrefixesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPPrefixesListNextResponse = PublicIPPrefixListResult; - -// @public -export interface PublicIPPrefixesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPPrefixesListResponse = PublicIPPrefixListResult; - -// @public -export interface PublicIPPrefixesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PublicIPPrefixesUpdateTagsResponse = PublicIPPrefix; - -// @public -export interface PublicIPPrefixListResult { - nextLink?: string; - value?: PublicIPPrefix[]; -} - -// @public -export interface PublicIPPrefixSku { - name?: PublicIPPrefixSkuName; - tier?: PublicIPPrefixSkuTier; -} - -// @public -export type PublicIPPrefixSkuName = string; - -// @public -export type PublicIPPrefixSkuTier = string; - -// @public -export interface PutBastionShareableLinkNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PutBastionShareableLinkNextResponse = BastionShareableLinkListResult; - -// @public -export interface PutBastionShareableLinkOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PutBastionShareableLinkResponse = BastionShareableLinkListResult; - -// @public -export interface QosDefinition { - destinationIpRanges?: QosIpRange[]; - destinationPortRanges?: QosPortRange[]; - markings?: number[]; - protocol?: ProtocolType; - sourceIpRanges?: QosIpRange[]; - sourcePortRanges?: QosPortRange[]; -} - -// @public -export interface QosIpRange { - endIP?: string; - startIP?: string; -} - -// @public -export interface QosPortRange { - end?: number; - start?: number; -} - -// @public -export interface QueryInboundNatRulePortMappingRequest { - ipAddress?: string; - ipConfiguration?: SubResource; -} - -// @public -export interface QueryRequestOptions { - skipToken?: string; -} - -// @public -export interface QueryResults { - matchingRecordsCount?: number; - signatures?: SingleQueryResult[]; -} - -// @public -export interface QueryTroubleshootingParameters { - targetResourceId: string; -} - -// @public -export interface RadiusAuthServer { - radiusServerAddress?: string; - radiusServerSecret?: string; -} - -// @public -export interface RadiusAuthServerListResult { - nextLink?: string; - value?: RadiusAuthServer[]; -} - -// @public -export interface RadiusServer { - radiusServerAddress: string; - radiusServerScore?: number; - radiusServerSecret?: string; -} - -// @public -export interface ReachabilityAnalysisIntent extends CommonProxyResource { - properties: ReachabilityAnalysisIntentProperties; -} - -// @public -export interface ReachabilityAnalysisIntentListResult { - nextLink?: string; - value?: ReachabilityAnalysisIntent[]; -} - -// @public -export interface ReachabilityAnalysisIntentProperties { - // (undocumented) - description?: string; - destinationResourceId: string; - ipTraffic: IPTraffic; - provisioningState?: ProvisioningState; - sourceResourceId: string; -} - -// @public -export interface ReachabilityAnalysisIntents { - create(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisIntentName: string, body: ReachabilityAnalysisIntent, options?: ReachabilityAnalysisIntentsCreateOptionalParams): Promise; - delete(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisIntentName: string, options?: ReachabilityAnalysisIntentsDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisIntentName: string, options?: ReachabilityAnalysisIntentsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: ReachabilityAnalysisIntentsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ReachabilityAnalysisIntentsCreateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ReachabilityAnalysisIntentsCreateResponse = ReachabilityAnalysisIntent; - -// @public -export interface ReachabilityAnalysisIntentsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ReachabilityAnalysisIntentsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ReachabilityAnalysisIntentsGetResponse = ReachabilityAnalysisIntent; - -// @public -export interface ReachabilityAnalysisIntentsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ReachabilityAnalysisIntentsListNextResponse = ReachabilityAnalysisIntentListResult; - -// @public -export interface ReachabilityAnalysisIntentsListOptionalParams extends coreClient.OperationOptions { - skip?: number; - skipToken?: string; - sortKey?: string; - sortValue?: string; - top?: number; -} - -// @public -export type ReachabilityAnalysisIntentsListResponse = ReachabilityAnalysisIntentListResult; - -// @public -export interface ReachabilityAnalysisRun extends CommonProxyResource { - properties: ReachabilityAnalysisRunProperties; -} - -// @public -export interface ReachabilityAnalysisRunListResult { - nextLink?: string; - value?: ReachabilityAnalysisRun[]; -} - -// @public -export interface ReachabilityAnalysisRunProperties { - readonly analysisResult?: string; - // (undocumented) - description?: string; - readonly errorMessage?: string; - readonly intentContent?: IntentContent; - intentId: string; - provisioningState?: ProvisioningState; -} - -// @public -export interface ReachabilityAnalysisRuns { - beginDelete(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisRunName: string, options?: ReachabilityAnalysisRunsDeleteOptionalParams): Promise, ReachabilityAnalysisRunsDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisRunName: string, options?: ReachabilityAnalysisRunsDeleteOptionalParams): Promise; - create(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisRunName: string, body: ReachabilityAnalysisRun, options?: ReachabilityAnalysisRunsCreateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisRunName: string, options?: ReachabilityAnalysisRunsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: ReachabilityAnalysisRunsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ReachabilityAnalysisRunsCreateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ReachabilityAnalysisRunsCreateResponse = ReachabilityAnalysisRun; - -// @public -export interface ReachabilityAnalysisRunsDeleteHeaders { - location?: string; -} - -// @public -export interface ReachabilityAnalysisRunsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ReachabilityAnalysisRunsDeleteResponse = ReachabilityAnalysisRunsDeleteHeaders; - -// @public -export interface ReachabilityAnalysisRunsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ReachabilityAnalysisRunsGetResponse = ReachabilityAnalysisRun; - -// @public -export interface ReachabilityAnalysisRunsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ReachabilityAnalysisRunsListNextResponse = ReachabilityAnalysisRunListResult; - -// @public -export interface ReachabilityAnalysisRunsListOptionalParams extends coreClient.OperationOptions { - skip?: number; - skipToken?: string; - sortKey?: string; - sortValue?: string; - top?: number; -} - -// @public -export type ReachabilityAnalysisRunsListResponse = ReachabilityAnalysisRunListResult; - -// @public -export interface RecordSet { - fqdn?: string; - ipAddresses?: string[]; - readonly provisioningState?: ProvisioningState; - recordSetName?: string; - recordType?: string; - ttl?: number; -} - -// @public -export interface ReferencedPublicIpAddress { - id?: string; -} - -// @public -export interface ReserveCloudServicePublicIpAddressRequest { - isRollback: IsRollback; -} - -// @public -export type ResiliencyModel = string; - -// @public -export interface ResiliencyRecommendationComponents { - currentScore?: string; - maxScore?: string; - name?: string; - recommendations?: GatewayResiliencyRecommendation[]; -} - -// @public -export interface Resource { - id?: string; - location?: string; - readonly name?: string; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; -} - -// @public -export interface ResourceBasics { - addressPrefixes?: string[]; - resourceId?: string; -} - -// @public -export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "SystemAssigned, UserAssigned" | "None"; - -// @public -export interface ResourceNavigationLink extends SubResource { - readonly etag?: string; - link?: string; - linkedResourceType?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ResourceNavigationLinks { - list(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options?: ResourceNavigationLinksListOptionalParams): Promise; -} - -// @public -export interface ResourceNavigationLinksListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ResourceNavigationLinksListResponse = ResourceNavigationLinksListResult; - -// @public -export interface ResourceNavigationLinksListResult { - readonly nextLink?: string; - value?: ResourceNavigationLink[]; -} - -// @public -export interface ResourceSet { - subscriptions?: string[]; -} - -// @public -export interface RetentionPolicyParameters { - days?: number; - enabled?: boolean; -} - -// @public -export interface Route extends SubResource { - addressPrefix?: string; - readonly etag?: string; - readonly hasBgpOverride?: boolean; - name?: string; - nextHopIpAddress?: string; - nextHopType?: RouteNextHopType; - readonly provisioningState?: ProvisioningState; - type?: string; -} - -// @public -export interface RouteFilter extends Resource { - readonly etag?: string; - readonly ipv6Peerings?: ExpressRouteCircuitPeering[]; - readonly peerings?: ExpressRouteCircuitPeering[]; - readonly provisioningState?: ProvisioningState; - rules?: RouteFilterRule[]; -} - -// @public -export interface RouteFilterListResult { - nextLink?: string; - value?: RouteFilter[]; -} - -// @public -export interface RouteFilterRule extends SubResource { - access?: Access; - communities?: string[]; - readonly etag?: string; - location?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - routeFilterRuleType?: RouteFilterRuleType; -} - -// @public -export interface RouteFilterRuleListResult { - nextLink?: string; - value?: RouteFilterRule[]; -} - -// @public -export interface RouteFilterRules { - beginCreateOrUpdate(resourceGroupName: string, routeFilterName: string, ruleName: string, routeFilterRuleParameters: RouteFilterRule, options?: RouteFilterRulesCreateOrUpdateOptionalParams): Promise, RouteFilterRulesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, routeFilterName: string, ruleName: string, routeFilterRuleParameters: RouteFilterRule, options?: RouteFilterRulesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, routeFilterName: string, ruleName: string, options?: RouteFilterRulesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, routeFilterName: string, ruleName: string, options?: RouteFilterRulesDeleteOptionalParams): Promise; - get(resourceGroupName: string, routeFilterName: string, ruleName: string, options?: RouteFilterRulesGetOptionalParams): Promise; - listByRouteFilter(resourceGroupName: string, routeFilterName: string, options?: RouteFilterRulesListByRouteFilterOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface RouteFilterRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type RouteFilterRulesCreateOrUpdateResponse = RouteFilterRule; - -// @public -export interface RouteFilterRulesDeleteHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface RouteFilterRulesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface RouteFilterRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteFilterRulesGetResponse = RouteFilterRule; - -// @public -export interface RouteFilterRulesListByRouteFilterNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteFilterRulesListByRouteFilterNextResponse = RouteFilterRuleListResult; - -// @public -export interface RouteFilterRulesListByRouteFilterOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteFilterRulesListByRouteFilterResponse = RouteFilterRuleListResult; - -// @public -export type RouteFilterRuleType = string; - -// @public -export interface RouteFilters { - beginCreateOrUpdate(resourceGroupName: string, routeFilterName: string, routeFilterParameters: RouteFilter, options?: RouteFiltersCreateOrUpdateOptionalParams): Promise, RouteFiltersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, routeFilterName: string, routeFilterParameters: RouteFilter, options?: RouteFiltersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, routeFilterName: string, options?: RouteFiltersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, routeFilterName: string, options?: RouteFiltersDeleteOptionalParams): Promise; - get(resourceGroupName: string, routeFilterName: string, options?: RouteFiltersGetOptionalParams): Promise; - list(options?: RouteFiltersListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: RouteFiltersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, routeFilterName: string, parameters: TagsObject, options?: RouteFiltersUpdateTagsOptionalParams): Promise; -} - -// @public -export interface RouteFiltersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type RouteFiltersCreateOrUpdateResponse = RouteFilter; - -// @public -export interface RouteFiltersDeleteHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface RouteFiltersDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface RouteFiltersGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type RouteFiltersGetResponse = RouteFilter; - -// @public -export interface RouteFiltersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteFiltersListByResourceGroupNextResponse = RouteFilterListResult; - -// @public -export interface RouteFiltersListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteFiltersListByResourceGroupResponse = RouteFilterListResult; - -// @public -export interface RouteFiltersListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteFiltersListNextResponse = RouteFilterListResult; - -// @public -export interface RouteFiltersListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteFiltersListResponse = RouteFilterListResult; - -// @public -export interface RouteFiltersUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteFiltersUpdateTagsResponse = RouteFilter; - -// @public -export interface RouteListResult { - nextLink?: string; - value?: Route[]; -} - -// @public -export interface RouteMap extends SubResource { - associatedInboundConnections?: string[]; - associatedOutboundConnections?: string[]; - readonly etag?: string; - readonly name?: string; - readonly provisioningState?: ProvisioningState; - rules?: RouteMapRule[]; - readonly type?: string; -} - -// @public -export type RouteMapActionType = string; - -// @public -export type RouteMapMatchCondition = string; - -// @public -export interface RouteMapRule { - actions?: Action[]; - matchCriteria?: Criterion[]; - name?: string; - nextStepIfMatched?: NextStep; -} - -// @public -export interface RouteMaps { - beginCreateOrUpdate(resourceGroupName: string, virtualHubName: string, routeMapName: string, routeMapParameters: RouteMap, options?: RouteMapsCreateOrUpdateOptionalParams): Promise, RouteMapsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualHubName: string, routeMapName: string, routeMapParameters: RouteMap, options?: RouteMapsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualHubName: string, routeMapName: string, options?: RouteMapsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualHubName: string, routeMapName: string, options?: RouteMapsDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualHubName: string, routeMapName: string, options?: RouteMapsGetOptionalParams): Promise; - list(resourceGroupName: string, virtualHubName: string, options?: RouteMapsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface RouteMapsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type RouteMapsCreateOrUpdateResponse = RouteMap; - -// @public -export interface RouteMapsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface RouteMapsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteMapsGetResponse = RouteMap; - -// @public -export interface RouteMapsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteMapsListNextResponse = ListRouteMapsResult; - -// @public -export interface RouteMapsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteMapsListResponse = ListRouteMapsResult; - -// @public -export type RouteNextHopType = string; - -// @public -export interface Routes { - beginCreateOrUpdate(resourceGroupName: string, routeTableName: string, routeName: string, routeParameters: Route, options?: RoutesCreateOrUpdateOptionalParams): Promise, RoutesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, routeTableName: string, routeName: string, routeParameters: Route, options?: RoutesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, routeTableName: string, routeName: string, options?: RoutesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, routeTableName: string, routeName: string, options?: RoutesDeleteOptionalParams): Promise; - get(resourceGroupName: string, routeTableName: string, routeName: string, options?: RoutesGetOptionalParams): Promise; - list(resourceGroupName: string, routeTableName: string, options?: RoutesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface RoutesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type RoutesCreateOrUpdateResponse = Route; - -// @public -export interface RoutesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface RoutesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutesGetResponse = Route; - -// @public -export interface RoutesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutesListNextResponse = RouteListResult; - -// @public -export interface RoutesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutesListResponse = RouteListResult; - -// @public (undocumented) -export interface RouteSourceDetails { - circuit?: string; - pri?: string; - sec?: string; -} - -// @public -export interface RouteTable extends Resource { - disableBgpRoutePropagation?: boolean; - readonly etag?: string; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - routes?: Route[]; - readonly subnets?: Subnet[]; -} - -// @public -export interface RouteTableListResult { - nextLink?: string; - value?: RouteTable[]; -} - -// @public -export interface RouteTables { - beginCreateOrUpdate(resourceGroupName: string, routeTableName: string, parameters: RouteTable, options?: RouteTablesCreateOrUpdateOptionalParams): Promise, RouteTablesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, routeTableName: string, parameters: RouteTable, options?: RouteTablesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, routeTableName: string, options?: RouteTablesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, routeTableName: string, options?: RouteTablesDeleteOptionalParams): Promise; - get(resourceGroupName: string, routeTableName: string, options?: RouteTablesGetOptionalParams): Promise; - list(resourceGroupName: string, options?: RouteTablesListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: RouteTablesListAllOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, routeTableName: string, parameters: TagsObject, options?: RouteTablesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface RouteTablesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type RouteTablesCreateOrUpdateResponse = RouteTable; - -// @public -export interface RouteTablesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface RouteTablesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type RouteTablesGetResponse = RouteTable; - -// @public -export interface RouteTablesListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteTablesListAllNextResponse = RouteTableListResult; - -// @public -export interface RouteTablesListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteTablesListAllResponse = RouteTableListResult; - -// @public -export interface RouteTablesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteTablesListNextResponse = RouteTableListResult; - -// @public -export interface RouteTablesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteTablesListResponse = RouteTableListResult; - -// @public -export interface RouteTablesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RouteTablesUpdateTagsResponse = RouteTable; - -// @public -export type RouteTableUsageMode = string; - -// @public -export interface RouteTargetAddressPropertiesFormat { - privateIPAddress?: string; - privateIPAllocationMethod?: IPAllocationMethod; - subnet?: Subnet; -} - -// @public -export interface RoutingConfiguration { - associatedRouteTable?: SubResource; - inboundRouteMap?: SubResource; - outboundRouteMap?: SubResource; - propagatedRouteTables?: PropagatedRouteTable; - vnetRoutes?: VnetRoute; -} - -// @public -export interface RoutingIntent extends SubResource { - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - routingPolicies?: RoutingPolicy[]; - readonly type?: string; -} - -// @public -export interface RoutingIntentCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type RoutingIntentCreateOrUpdateResponse = RoutingIntent; - -// @public -export interface RoutingIntentDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface RoutingIntentGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutingIntentGetResponse = RoutingIntent; - -// @public -export interface RoutingIntentListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutingIntentListNextResponse = ListRoutingIntentResult; - -// @public -export interface RoutingIntentListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutingIntentListResponse = ListRoutingIntentResult; - -// @public -export interface RoutingIntentOperations { - beginCreateOrUpdate(resourceGroupName: string, virtualHubName: string, routingIntentName: string, routingIntentParameters: RoutingIntent, options?: RoutingIntentCreateOrUpdateOptionalParams): Promise, RoutingIntentCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualHubName: string, routingIntentName: string, routingIntentParameters: RoutingIntent, options?: RoutingIntentCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualHubName: string, routingIntentName: string, options?: RoutingIntentDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualHubName: string, routingIntentName: string, options?: RoutingIntentDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualHubName: string, routingIntentName: string, options?: RoutingIntentGetOptionalParams): Promise; - list(resourceGroupName: string, virtualHubName: string, options?: RoutingIntentListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface RoutingPolicy { - destinations: string[]; - name: string; - nextHop: string; -} - -// @public -export interface RoutingRule extends ChildResource { - description?: string; - destination?: RoutingRuleRouteDestination; - nextHop?: RoutingRuleNextHop; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly systemData?: SystemData; -} - -// @public -export interface RoutingRuleCollection extends ChildResource { - appliesTo?: NetworkManagerRoutingGroupItem[]; - description?: string; - disableBgpRoutePropagation?: DisableBgpRoutePropagation; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly systemData?: SystemData; -} - -// @public -export interface RoutingRuleCollectionListResult { - nextLink?: string; - value?: RoutingRuleCollection[]; -} - -// @public -export interface RoutingRuleCollections { - beginDelete(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: RoutingRuleCollectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: RoutingRuleCollectionsDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleCollection: RoutingRuleCollection, options?: RoutingRuleCollectionsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: RoutingRuleCollectionsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: RoutingRuleCollectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface RoutingRuleCollectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutingRuleCollectionsCreateOrUpdateResponse = RoutingRuleCollection; - -// @public -export interface RoutingRuleCollectionsDeleteHeaders { - location?: string; -} - -// @public -export interface RoutingRuleCollectionsDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface RoutingRuleCollectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutingRuleCollectionsGetResponse = RoutingRuleCollection; - -// @public -export interface RoutingRuleCollectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutingRuleCollectionsListNextResponse = RoutingRuleCollectionListResult; - -// @public -export interface RoutingRuleCollectionsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type RoutingRuleCollectionsListResponse = RoutingRuleCollectionListResult; - -// @public -export type RoutingRuleDestinationType = string; - -// @public -export interface RoutingRuleListResult { - nextLink?: string; - value?: RoutingRule[]; -} - -// @public -export interface RoutingRuleNextHop { - nextHopAddress?: string; - nextHopType: RoutingRuleNextHopType; -} - -// @public -export type RoutingRuleNextHopType = string; - -// @public -export interface RoutingRuleRouteDestination { - destinationAddress: string; - type: RoutingRuleDestinationType; -} - -// @public -export interface RoutingRules { - beginDelete(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, options?: RoutingRulesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, options?: RoutingRulesDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, routingRule: RoutingRule, options?: RoutingRulesCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, options?: RoutingRulesGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: RoutingRulesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface RoutingRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutingRulesCreateOrUpdateResponse = RoutingRule; - -// @public -export interface RoutingRulesDeleteHeaders { - location?: string; -} - -// @public -export interface RoutingRulesDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface RoutingRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutingRulesGetResponse = RoutingRule; - -// @public -export interface RoutingRulesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RoutingRulesListNextResponse = RoutingRuleListResult; - -// @public -export interface RoutingRulesListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type RoutingRulesListResponse = RoutingRuleListResult; - -// @public -export type RoutingState = string; - -// @public -export interface ScopeConnection extends ChildResource { - readonly connectionState?: ScopeConnectionState; - description?: string; - resourceId?: string; - readonly systemData?: SystemData; - tenantId?: string; -} - -// @public -export interface ScopeConnectionListResult { - nextLink?: string; - value?: ScopeConnection[]; -} - -// @public -export interface ScopeConnections { - createOrUpdate(resourceGroupName: string, networkManagerName: string, scopeConnectionName: string, parameters: ScopeConnection, options?: ScopeConnectionsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, networkManagerName: string, scopeConnectionName: string, options?: ScopeConnectionsDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, scopeConnectionName: string, options?: ScopeConnectionsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, options?: ScopeConnectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ScopeConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScopeConnectionsCreateOrUpdateResponse = ScopeConnection; - -// @public -export interface ScopeConnectionsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ScopeConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScopeConnectionsGetResponse = ScopeConnection; - -// @public -export interface ScopeConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScopeConnectionsListNextResponse = ScopeConnectionListResult; - -// @public -export interface ScopeConnectionsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type ScopeConnectionsListResponse = ScopeConnectionListResult; - -// @public -export type ScopeConnectionState = string; - -// @public -export type ScrubbingRuleEntryMatchOperator = string; - -// @public -export type ScrubbingRuleEntryMatchVariable = string; - -// @public -export type ScrubbingRuleEntryState = string; - -// @public -export interface SecurityAdminConfiguration extends ChildResource { - applyOnNetworkIntentPolicyBasedServices?: NetworkIntentPolicyBasedService[]; - description?: string; - networkGroupAddressSpaceAggregationOption?: AddressSpaceAggregationOption; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly systemData?: SystemData; -} - -// @public -export interface SecurityAdminConfigurationListResult { - nextLink?: string; - value?: SecurityAdminConfiguration[]; -} - -// @public -export interface SecurityAdminConfigurations { - beginDelete(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: SecurityAdminConfigurationsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: SecurityAdminConfigurationsDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, configurationName: string, securityAdminConfiguration: SecurityAdminConfiguration, options?: SecurityAdminConfigurationsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: SecurityAdminConfigurationsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, options?: SecurityAdminConfigurationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface SecurityAdminConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityAdminConfigurationsCreateOrUpdateResponse = SecurityAdminConfiguration; - -// @public -export interface SecurityAdminConfigurationsDeleteHeaders { - location?: string; -} - -// @public -export interface SecurityAdminConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface SecurityAdminConfigurationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityAdminConfigurationsGetResponse = SecurityAdminConfiguration; - -// @public -export interface SecurityAdminConfigurationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityAdminConfigurationsListNextResponse = SecurityAdminConfigurationListResult; - -// @public -export interface SecurityAdminConfigurationsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type SecurityAdminConfigurationsListResponse = SecurityAdminConfigurationListResult; - -// @public -export type SecurityConfigurationRuleAccess = string; - -// @public -export type SecurityConfigurationRuleDirection = string; - -// @public -export type SecurityConfigurationRuleProtocol = string; - -// @public -export interface SecurityGroupNetworkInterface { - id?: string; - securityRuleAssociations?: SecurityRuleAssociations; -} - -// @public -export interface SecurityGroupViewParameters { - targetResourceId: string; -} - -// @public -export interface SecurityGroupViewResult { - networkInterfaces?: SecurityGroupNetworkInterface[]; -} - -// @public -export interface SecurityPartnerProvider extends Resource { - readonly connectionStatus?: SecurityPartnerProviderConnectionStatus; - readonly etag?: string; - readonly provisioningState?: ProvisioningState; - securityProviderName?: SecurityProviderName; - virtualHub?: SubResource; -} - -// @public -export type SecurityPartnerProviderConnectionStatus = string; - -// @public -export interface SecurityPartnerProviderListResult { - nextLink?: string; - value?: SecurityPartnerProvider[]; -} - -// @public -export interface SecurityPartnerProviders { - beginCreateOrUpdate(resourceGroupName: string, securityPartnerProviderName: string, parameters: SecurityPartnerProvider, options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams): Promise, SecurityPartnerProvidersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, securityPartnerProviderName: string, parameters: SecurityPartnerProvider, options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, securityPartnerProviderName: string, options?: SecurityPartnerProvidersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, securityPartnerProviderName: string, options?: SecurityPartnerProvidersDeleteOptionalParams): Promise; - get(resourceGroupName: string, securityPartnerProviderName: string, options?: SecurityPartnerProvidersGetOptionalParams): Promise; - list(options?: SecurityPartnerProvidersListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: SecurityPartnerProvidersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, securityPartnerProviderName: string, parameters: TagsObject, options?: SecurityPartnerProvidersUpdateTagsOptionalParams): Promise; -} - -// @public -export interface SecurityPartnerProvidersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SecurityPartnerProvidersCreateOrUpdateResponse = SecurityPartnerProvider; - -// @public -export interface SecurityPartnerProvidersDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface SecurityPartnerProvidersGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityPartnerProvidersGetResponse = SecurityPartnerProvider; - -// @public -export interface SecurityPartnerProvidersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityPartnerProvidersListByResourceGroupNextResponse = SecurityPartnerProviderListResult; - -// @public -export interface SecurityPartnerProvidersListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityPartnerProvidersListByResourceGroupResponse = SecurityPartnerProviderListResult; - -// @public -export interface SecurityPartnerProvidersListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityPartnerProvidersListNextResponse = SecurityPartnerProviderListResult; - -// @public -export interface SecurityPartnerProvidersListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityPartnerProvidersListResponse = SecurityPartnerProviderListResult; - -// @public -export interface SecurityPartnerProvidersUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityPartnerProvidersUpdateTagsResponse = SecurityPartnerProvider; - -// @public -export interface SecurityPerimeterProxyResource extends SecurityPerimeterResource { -} - -// @public -export interface SecurityPerimeterResource { - readonly id?: string; - readonly name?: string; - readonly systemData?: SecurityPerimeterSystemData; - readonly type?: string; -} - -// @public -export interface SecurityPerimeterSystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; -} - -// @public -export type SecurityProviderName = string; - -// @public -export interface SecurityRule extends SubResource { - access?: SecurityRuleAccess; - description?: string; - destinationAddressPrefix?: string; - destinationAddressPrefixes?: string[]; - destinationApplicationSecurityGroups?: ApplicationSecurityGroup[]; - destinationPortRange?: string; - destinationPortRanges?: string[]; - direction?: SecurityRuleDirection; - readonly etag?: string; - name?: string; - priority?: number; - protocol?: SecurityRuleProtocol; - readonly provisioningState?: ProvisioningState; - sourceAddressPrefix?: string; - sourceAddressPrefixes?: string[]; - sourceApplicationSecurityGroups?: ApplicationSecurityGroup[]; - sourcePortRange?: string; - sourcePortRanges?: string[]; - type?: string; -} - -// @public -export type SecurityRuleAccess = string; - -// @public -export interface SecurityRuleAssociations { - defaultSecurityRules?: SecurityRule[]; - effectiveSecurityRules?: EffectiveNetworkSecurityRule[]; - networkInterfaceAssociation?: NetworkInterfaceAssociation; - subnetAssociation?: SubnetAssociation; -} - -// @public -export type SecurityRuleDirection = string; - -// @public -export interface SecurityRuleListResult { - nextLink?: string; - value?: SecurityRule[]; -} - -// @public -export type SecurityRuleProtocol = string; - -// @public -export interface SecurityRules { - beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: SecurityRule, options?: SecurityRulesCreateOrUpdateOptionalParams): Promise, SecurityRulesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: SecurityRule, options?: SecurityRulesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: SecurityRulesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: SecurityRulesDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: SecurityRulesGetOptionalParams): Promise; - list(resourceGroupName: string, networkSecurityGroupName: string, options?: SecurityRulesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface SecurityRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SecurityRulesCreateOrUpdateResponse = SecurityRule; - -// @public -export interface SecurityRulesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface SecurityRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityRulesGetResponse = SecurityRule; - -// @public -export interface SecurityRulesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityRulesListNextResponse = SecurityRuleListResult; - -// @public -export interface SecurityRulesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityRulesListResponse = SecurityRuleListResult; - -// @public -export interface SecurityUserConfiguration extends ChildResource { - description?: string; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly systemData?: SystemData; -} - -// @public -export interface SecurityUserConfigurationListResult { - nextLink?: string; - value?: SecurityUserConfiguration[]; -} - -// @public -export interface SecurityUserConfigurations { - beginDelete(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: SecurityUserConfigurationsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: SecurityUserConfigurationsDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, configurationName: string, securityUserConfiguration: SecurityUserConfiguration, options?: SecurityUserConfigurationsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: SecurityUserConfigurationsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, options?: SecurityUserConfigurationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface SecurityUserConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityUserConfigurationsCreateOrUpdateResponse = SecurityUserConfiguration; - -// @public -export interface SecurityUserConfigurationsDeleteHeaders { - location?: string; -} - -// @public -export interface SecurityUserConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface SecurityUserConfigurationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityUserConfigurationsGetResponse = SecurityUserConfiguration; - -// @public -export interface SecurityUserConfigurationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityUserConfigurationsListNextResponse = SecurityUserConfigurationListResult; - -// @public -export interface SecurityUserConfigurationsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type SecurityUserConfigurationsListResponse = SecurityUserConfigurationListResult; - -// @public -export interface SecurityUserGroupItem { - networkGroupId: string; -} - -// @public -export interface SecurityUserRule extends ChildResource { - description?: string; - destinationPortRanges?: string[]; - destinations?: AddressPrefixItem[]; - direction?: SecurityConfigurationRuleDirection; - protocol?: SecurityConfigurationRuleProtocol; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - sourcePortRanges?: string[]; - sources?: AddressPrefixItem[]; - readonly systemData?: SystemData; -} - -// @public -export interface SecurityUserRuleCollection extends ChildResource { - appliesToGroups?: SecurityUserGroupItem[]; - description?: string; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - readonly systemData?: SystemData; -} - -// @public -export interface SecurityUserRuleCollectionListResult { - nextLink?: string; - value?: SecurityUserRuleCollection[]; -} - -// @public -export interface SecurityUserRuleCollections { - beginDelete(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: SecurityUserRuleCollectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: SecurityUserRuleCollectionsDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, securityUserRuleCollection: SecurityUserRuleCollection, options?: SecurityUserRuleCollectionsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: SecurityUserRuleCollectionsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, configurationName: string, options?: SecurityUserRuleCollectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface SecurityUserRuleCollectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityUserRuleCollectionsCreateOrUpdateResponse = SecurityUserRuleCollection; - -// @public -export interface SecurityUserRuleCollectionsDeleteHeaders { - location?: string; -} - -// @public -export interface SecurityUserRuleCollectionsDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface SecurityUserRuleCollectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityUserRuleCollectionsGetResponse = SecurityUserRuleCollection; - -// @public -export interface SecurityUserRuleCollectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityUserRuleCollectionsListNextResponse = SecurityUserRuleCollectionListResult; - -// @public -export interface SecurityUserRuleCollectionsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type SecurityUserRuleCollectionsListResponse = SecurityUserRuleCollectionListResult; - -// @public -export interface SecurityUserRuleListResult { - nextLink?: string; - value?: SecurityUserRule[]; -} - -// @public -export interface SecurityUserRules { - beginDelete(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, options?: SecurityUserRulesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, options?: SecurityUserRulesDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, securityUserRule: SecurityUserRule, options?: SecurityUserRulesCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, ruleName: string, options?: SecurityUserRulesGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, configurationName: string, ruleCollectionName: string, options?: SecurityUserRulesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface SecurityUserRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityUserRulesCreateOrUpdateResponse = SecurityUserRule; - -// @public -export interface SecurityUserRulesDeleteHeaders { - location?: string; -} - -// @public -export interface SecurityUserRulesDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface SecurityUserRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityUserRulesGetResponse = SecurityUserRule; - -// @public -export interface SecurityUserRulesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityUserRulesListNextResponse = SecurityUserRuleListResult; - -// @public -export interface SecurityUserRulesListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type SecurityUserRulesListResponse = SecurityUserRuleListResult; - -// @public -export type SensitivityType = string; - -// @public -export interface ServiceAssociationLink extends SubResource { - allowDelete?: boolean; - readonly etag?: string; - link?: string; - linkedResourceType?: string; - locations?: string[]; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface ServiceAssociationLinks { - list(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options?: ServiceAssociationLinksListOptionalParams): Promise; -} - -// @public -export interface ServiceAssociationLinksListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceAssociationLinksListResponse = ServiceAssociationLinksListResult; - -// @public -export interface ServiceAssociationLinksListResult { - readonly nextLink?: string; - value?: ServiceAssociationLink[]; -} - -// @public -export interface ServiceEndpointPolicies { - beginCreateOrUpdate(resourceGroupName: string, serviceEndpointPolicyName: string, parameters: ServiceEndpointPolicy, options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams): Promise, ServiceEndpointPoliciesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceEndpointPolicyName: string, parameters: ServiceEndpointPolicy, options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceEndpointPolicyName: string, options?: ServiceEndpointPoliciesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, serviceEndpointPolicyName: string, options?: ServiceEndpointPoliciesDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceEndpointPolicyName: string, options?: ServiceEndpointPoliciesGetOptionalParams): Promise; - list(options?: ServiceEndpointPoliciesListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: ServiceEndpointPoliciesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, serviceEndpointPolicyName: string, parameters: TagsObject, options?: ServiceEndpointPoliciesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface ServiceEndpointPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ServiceEndpointPoliciesCreateOrUpdateResponse = ServiceEndpointPolicy; - -// @public -export interface ServiceEndpointPoliciesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ServiceEndpointPoliciesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type ServiceEndpointPoliciesGetResponse = ServiceEndpointPolicy; - -// @public -export interface ServiceEndpointPoliciesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceEndpointPoliciesListByResourceGroupNextResponse = ServiceEndpointPolicyListResult; - -// @public -export interface ServiceEndpointPoliciesListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceEndpointPoliciesListByResourceGroupResponse = ServiceEndpointPolicyListResult; - -// @public -export interface ServiceEndpointPoliciesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceEndpointPoliciesListNextResponse = ServiceEndpointPolicyListResult; - -// @public -export interface ServiceEndpointPoliciesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceEndpointPoliciesListResponse = ServiceEndpointPolicyListResult; - -// @public -export interface ServiceEndpointPoliciesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceEndpointPoliciesUpdateTagsResponse = ServiceEndpointPolicy; - -// @public -export interface ServiceEndpointPolicy extends Resource { - contextualServiceEndpointPolicies?: string[]; - readonly etag?: string; - readonly kind?: string; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - serviceAlias?: string; - serviceEndpointPolicyDefinitions?: ServiceEndpointPolicyDefinition[]; - readonly subnets?: Subnet[]; -} - -// @public -export interface ServiceEndpointPolicyDefinition extends SubResource { - description?: string; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - service?: string; - serviceResources?: string[]; - type?: string; -} - -// @public -export interface ServiceEndpointPolicyDefinitionListResult { - nextLink?: string; - value?: ServiceEndpointPolicyDefinition[]; -} - -// @public -export interface ServiceEndpointPolicyDefinitions { - beginCreateOrUpdate(resourceGroupName: string, serviceEndpointPolicyName: string, serviceEndpointPolicyDefinitionName: string, serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams): Promise, ServiceEndpointPolicyDefinitionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceEndpointPolicyName: string, serviceEndpointPolicyDefinitionName: string, serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceEndpointPolicyName: string, serviceEndpointPolicyDefinitionName: string, options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, serviceEndpointPolicyName: string, serviceEndpointPolicyDefinitionName: string, options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceEndpointPolicyName: string, serviceEndpointPolicyDefinitionName: string, options?: ServiceEndpointPolicyDefinitionsGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, serviceEndpointPolicyName: string, options?: ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ServiceEndpointPolicyDefinitionsCreateOrUpdateResponse = ServiceEndpointPolicyDefinition; - -// @public -export interface ServiceEndpointPolicyDefinitionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ServiceEndpointPolicyDefinitionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceEndpointPolicyDefinitionsGetResponse = ServiceEndpointPolicyDefinition; - -// @public -export interface ServiceEndpointPolicyDefinitionsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceEndpointPolicyDefinitionsListByResourceGroupNextResponse = ServiceEndpointPolicyDefinitionListResult; - -// @public -export interface ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceEndpointPolicyDefinitionsListByResourceGroupResponse = ServiceEndpointPolicyDefinitionListResult; - -// @public -export interface ServiceEndpointPolicyListResult { - readonly nextLink?: string; - value?: ServiceEndpointPolicy[]; -} - -// @public -export interface ServiceEndpointPropertiesFormat { - locations?: string[]; - networkIdentifier?: SubResource; - readonly provisioningState?: ProvisioningState; - service?: string; -} - -// @public -export interface ServiceGateway extends TrackedResource { - readonly etag?: string; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - routeTargetAddress?: RouteTargetAddressPropertiesFormat; - routeTargetAddressV6?: RouteTargetAddressPropertiesFormat; - sku?: ServiceGatewaySku; - virtualNetwork?: VirtualNetwork; - zones?: string[]; -} - -// @public -export interface ServiceGatewayAddress { - address?: string; - services?: string[]; -} - -// @public -export interface ServiceGatewayAddressLocation { - addresses?: ServiceGatewayAddress[]; - addressLocation?: string; - addressUpdateAction?: AddressUpdateAction; -} - -// @public -export interface ServiceGatewayAddressLocationResponse { - addresses?: ServiceGatewayAddress[]; - addressLocation?: string; -} - -// @public -export interface ServiceGatewayListResult { - readonly nextLink?: string; - value?: ServiceGateway[]; -} - -// @public -export interface ServiceGateways { - beginCreateOrUpdate(resourceGroupName: string, serviceGatewayName: string, parameters: ServiceGateway, options?: ServiceGatewaysCreateOrUpdateOptionalParams): Promise, ServiceGatewaysCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceGatewayName: string, parameters: ServiceGateway, options?: ServiceGatewaysCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceGatewayName: string, options?: ServiceGatewaysDeleteOptionalParams): Promise, ServiceGatewaysDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, serviceGatewayName: string, options?: ServiceGatewaysDeleteOptionalParams): Promise; - beginUpdateAddressLocations(resourceGroupName: string, serviceGatewayName: string, parameters: ServiceGatewayUpdateAddressLocationsRequest, options?: ServiceGatewaysUpdateAddressLocationsOptionalParams): Promise, ServiceGatewaysUpdateAddressLocationsResponse>>; - beginUpdateAddressLocationsAndWait(resourceGroupName: string, serviceGatewayName: string, parameters: ServiceGatewayUpdateAddressLocationsRequest, options?: ServiceGatewaysUpdateAddressLocationsOptionalParams): Promise; - beginUpdateServices(resourceGroupName: string, serviceGatewayName: string, parameters: ServiceGatewayUpdateServicesRequest, options?: ServiceGatewaysUpdateServicesOptionalParams): Promise, ServiceGatewaysUpdateServicesResponse>>; - beginUpdateServicesAndWait(resourceGroupName: string, serviceGatewayName: string, parameters: ServiceGatewayUpdateServicesRequest, options?: ServiceGatewaysUpdateServicesOptionalParams): Promise; - get(resourceGroupName: string, serviceGatewayName: string, options?: ServiceGatewaysGetOptionalParams): Promise; - list(resourceGroupName: string, options?: ServiceGatewaysListOptionalParams): PagedAsyncIterableIterator; - listAddressLocations(resourceGroupName: string, serviceGatewayName: string, options?: ServiceGatewaysGetAddressLocationsOptionalParams): PagedAsyncIterableIterator; - listAll(options?: ServiceGatewaysListAllOptionalParams): PagedAsyncIterableIterator; - listServices(resourceGroupName: string, serviceGatewayName: string, options?: ServiceGatewaysGetServicesOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, serviceGatewayName: string, parameters: TagsObject, options?: ServiceGatewaysUpdateTagsOptionalParams): Promise; -} - -// @public -export interface ServiceGatewaysCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ServiceGatewaysCreateOrUpdateResponse = ServiceGateway; - -// @public -export interface ServiceGatewaysDeleteHeaders { - location?: string; -} - -// @public -export interface ServiceGatewaysDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ServiceGatewaysDeleteResponse = ServiceGatewaysDeleteHeaders; - -// @public -export interface ServiceGatewayService { - isDefault?: boolean; - loadBalancerBackendPools?: BackendAddressPool[]; - name?: string; - publicNatGatewayId?: string; - serviceType?: ServiceType; -} - -// @public -export interface ServiceGatewayServiceRequest { - isDelete?: boolean; - service?: ServiceGatewayService; -} - -// @public -export interface ServiceGatewaysGetAddressLocationsNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceGatewaysGetAddressLocationsNextResponse = GetServiceGatewayAddressLocationsResult; - -// @public -export interface ServiceGatewaysGetAddressLocationsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceGatewaysGetAddressLocationsResponse = GetServiceGatewayAddressLocationsResult; - -// @public -export interface ServiceGatewaysGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceGatewaysGetResponse = ServiceGateway; - -// @public -export interface ServiceGatewaysGetServicesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceGatewaysGetServicesNextResponse = GetServiceGatewayServicesResult; - -// @public -export interface ServiceGatewaysGetServicesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceGatewaysGetServicesResponse = GetServiceGatewayServicesResult; - -// @public -export interface ServiceGatewaySku { - name?: ServiceGatewaySkuName; - tier?: ServiceGatewaySkuTier; -} - -// @public -export type ServiceGatewaySkuName = string; - -// @public -export type ServiceGatewaySkuTier = string; - -// @public -export interface ServiceGatewaysListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceGatewaysListAllNextResponse = ServiceGatewayListResult; - -// @public -export interface ServiceGatewaysListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceGatewaysListAllResponse = ServiceGatewayListResult; - -// @public -export interface ServiceGatewaysListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceGatewaysListNextResponse = ServiceGatewayListResult; - -// @public -export interface ServiceGatewaysListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceGatewaysListResponse = ServiceGatewayListResult; - -// @public -export interface ServiceGatewaysUpdateAddressLocationsHeaders { - location?: string; -} - -// @public -export interface ServiceGatewaysUpdateAddressLocationsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ServiceGatewaysUpdateAddressLocationsResponse = ServiceGatewaysUpdateAddressLocationsHeaders; - -// @public -export interface ServiceGatewaysUpdateServicesHeaders { - location?: string; -} - -// @public -export interface ServiceGatewaysUpdateServicesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ServiceGatewaysUpdateServicesResponse = ServiceGatewaysUpdateServicesHeaders; - -// @public -export interface ServiceGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceGatewaysUpdateTagsResponse = ServiceGateway; - -// @public -export interface ServiceGatewayUpdateAddressLocationsRequest { - action?: UpdateAction; - addressLocations?: ServiceGatewayAddressLocation[]; -} - -// @public -export interface ServiceGatewayUpdateServicesRequest { - action?: ServiceUpdateAction; - serviceRequests?: ServiceGatewayServiceRequest[]; -} - -// @public -export type ServiceProviderProvisioningState = string; - -// @public -export interface ServiceTagInformation { - readonly id?: string; - readonly name?: string; - readonly properties?: ServiceTagInformationPropertiesFormat; - readonly serviceTagChangeNumber?: string; -} - -// @public -export interface ServiceTagInformationListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceTagInformationListNextResponse = ServiceTagInformationListResult; - -// @public -export interface ServiceTagInformationListOptionalParams extends coreClient.OperationOptions { - noAddressPrefixes?: boolean; - tagName?: string; -} - -// @public -export type ServiceTagInformationListResponse = ServiceTagInformationListResult; - -// @public -export interface ServiceTagInformationListResult { - readonly nextLink?: string; - value?: ServiceTagInformation[]; -} - -// @public -export interface ServiceTagInformationOperations { - list(location: string, options?: ServiceTagInformationListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ServiceTagInformationPropertiesFormat { - readonly addressPrefixes?: string[]; - readonly changeNumber?: string; - readonly region?: string; - readonly state?: string; - readonly systemService?: string; -} - -// @public -export interface ServiceTags { - list(location: string, options?: ServiceTagsListOptionalParams): Promise; -} - -// @public -export interface ServiceTagsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceTagsListResponse = ServiceTagsListResult; - -// @public -export interface ServiceTagsListResult { - readonly changeNumber?: string; - readonly cloud?: string; - readonly id?: string; - readonly name?: string; - readonly nextLink?: string; - readonly type?: string; - readonly values?: ServiceTagInformation[]; -} - -// @public -export type ServiceType = string; - -// @public -export type ServiceUpdateAction = string; - -// @public -export interface SessionIds { - sessionIds?: string[]; -} - -// @public -export type Severity = string; - -// @public -export interface SharedKeyProperties { - readonly provisioningState?: ProvisioningState; - sharedKey?: string; - sharedKeyLength?: number; -} - -// @public -export type SharingScope = string; - -// @public -export interface SignatureOverridesFilterValuesQuery { - filterName?: string; -} - -// @public -export interface SignatureOverridesFilterValuesResponse { - filterValues?: string[]; -} - -// @public -export interface SignaturesOverrides { - id?: string; - name?: string; - properties?: SignaturesOverridesProperties; - type?: string; -} - -// @public -export interface SignaturesOverridesList { - value?: SignaturesOverrides[]; -} - -// @public -export interface SignaturesOverridesProperties { - signatures?: { - [propertyName: string]: string; - }; -} - -// @public (undocumented) -export interface SingleQueryResult { - description?: string; - destinationPorts?: string[]; - direction?: FirewallPolicyIdpsSignatureDirection; - group?: string; - inheritedFromParentPolicy?: boolean; - lastUpdated?: string; - mode?: FirewallPolicyIdpsSignatureMode; - protocol?: string; - severity?: FirewallPolicyIdpsSignatureSeverity; - signatureId?: number; - sourcePorts?: string[]; -} - -// @public -export interface Sku { - name?: BastionHostSkuName; -} - -// @public -export type SlotType = "Production" | "Staging"; - -// @public -export interface StaticCidr extends CommonProxyResource { - properties?: StaticCidrProperties; -} - -// @public -export interface StaticCidrList { - nextLink?: string; - // (undocumented) - value?: StaticCidr[]; -} - -// @public -export interface StaticCidrProperties { - addressPrefixes?: string[]; - // (undocumented) - description?: string; - numberOfIPAddressesToAllocate?: string; - provisioningState?: ProvisioningState; - readonly totalNumberOfIPAddresses?: string; -} - -// @public -export interface StaticCidrs { - beginDelete(resourceGroupName: string, networkManagerName: string, poolName: string, staticCidrName: string, options?: StaticCidrsDeleteOptionalParams): Promise, StaticCidrsDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, poolName: string, staticCidrName: string, options?: StaticCidrsDeleteOptionalParams): Promise; - create(resourceGroupName: string, networkManagerName: string, poolName: string, staticCidrName: string, options?: StaticCidrsCreateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, poolName: string, staticCidrName: string, options?: StaticCidrsGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, poolName: string, options?: StaticCidrsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface StaticCidrsCreateOptionalParams extends coreClient.OperationOptions { - body?: StaticCidr; -} - -// @public -export type StaticCidrsCreateResponse = StaticCidr; - -// @public -export interface StaticCidrsDeleteHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface StaticCidrsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type StaticCidrsDeleteResponse = StaticCidrsDeleteHeaders; - -// @public -export interface StaticCidrsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type StaticCidrsGetResponse = StaticCidr; - -// @public -export interface StaticCidrsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type StaticCidrsListNextResponse = StaticCidrList; - -// @public -export interface StaticCidrsListOptionalParams extends coreClient.OperationOptions { - skip?: number; - skipToken?: string; - sortKey?: string; - sortValue?: string; - top?: number; -} - -// @public -export type StaticCidrsListResponse = StaticCidrList; - -// @public -export interface StaticMember extends ChildResource { - readonly provisioningState?: ProvisioningState; - readonly region?: string; - resourceId?: string; - readonly systemData?: SystemData; -} - -// @public -export interface StaticMemberListResult { - nextLink?: string; - value?: StaticMember[]; -} - -// @public -export interface StaticMembers { - createOrUpdate(resourceGroupName: string, networkManagerName: string, networkGroupName: string, staticMemberName: string, parameters: StaticMember, options?: StaticMembersCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, networkManagerName: string, networkGroupName: string, staticMemberName: string, options?: StaticMembersDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, networkGroupName: string, staticMemberName: string, options?: StaticMembersGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, networkGroupName: string, options?: StaticMembersListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface StaticMembersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type StaticMembersCreateOrUpdateResponse = StaticMember; - -// @public -export interface StaticMembersDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface StaticMembersGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type StaticMembersGetResponse = StaticMember; - -// @public -export interface StaticMembersListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type StaticMembersListNextResponse = StaticMemberListResult; - -// @public -export interface StaticMembersListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type StaticMembersListResponse = StaticMemberListResult; - -// @public -export interface StaticRoute { - addressPrefixes?: string[]; - name?: string; - nextHopIpAddress?: string; -} - -// @public -export interface StaticRoutesConfig { - readonly propagateStaticRoutes?: boolean; - vnetLocalRouteOverrideCriteria?: VnetLocalRouteOverrideCriteria; -} - -// @public -export interface Subnet extends SubResource { - addressPrefix?: string; - addressPrefixes?: string[]; - applicationGatewayIPConfigurations?: ApplicationGatewayIPConfiguration[]; - defaultOutboundAccess?: boolean; - delegations?: Delegation[]; - readonly etag?: string; - ipAllocations?: SubResource[]; - ipamPoolPrefixAllocations?: IpamPoolPrefixAllocation[]; - readonly ipConfigurationProfiles?: IPConfigurationProfile[]; - readonly ipConfigurations?: IPConfiguration[]; - name?: string; - natGateway?: SubResource; - networkSecurityGroup?: NetworkSecurityGroup; - privateEndpointNetworkPolicies?: VirtualNetworkPrivateEndpointNetworkPolicies; - readonly privateEndpoints?: PrivateEndpoint[]; - privateLinkServiceNetworkPolicies?: VirtualNetworkPrivateLinkServiceNetworkPolicies; - readonly provisioningState?: ProvisioningState; - readonly purpose?: string; - readonly resourceNavigationLinks?: ResourceNavigationLink[]; - routeTable?: RouteTable; - readonly serviceAssociationLinks?: ServiceAssociationLink[]; - serviceEndpointPolicies?: ServiceEndpointPolicy[]; - serviceEndpoints?: ServiceEndpointPropertiesFormat[]; - serviceGateway?: SubResource; - sharingScope?: SharingScope; - type?: string; -} - -// @public -export interface SubnetAssociation { - readonly id?: string; - securityRules?: SecurityRule[]; -} - -// @public -export interface SubnetListResult { - nextLink?: string; - value?: Subnet[]; -} - -// @public -export interface Subnets { - beginCreateOrUpdate(resourceGroupName: string, virtualNetworkName: string, subnetName: string, subnetParameters: Subnet, options?: SubnetsCreateOrUpdateOptionalParams): Promise, SubnetsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworkName: string, subnetName: string, subnetParameters: Subnet, options?: SubnetsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options?: SubnetsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options?: SubnetsDeleteOptionalParams): Promise; - beginPrepareNetworkPolicies(resourceGroupName: string, virtualNetworkName: string, subnetName: string, prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, options?: SubnetsPrepareNetworkPoliciesOptionalParams): Promise, void>>; - beginPrepareNetworkPoliciesAndWait(resourceGroupName: string, virtualNetworkName: string, subnetName: string, prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, options?: SubnetsPrepareNetworkPoliciesOptionalParams): Promise; - beginUnprepareNetworkPolicies(resourceGroupName: string, virtualNetworkName: string, subnetName: string, unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, options?: SubnetsUnprepareNetworkPoliciesOptionalParams): Promise, void>>; - beginUnprepareNetworkPoliciesAndWait(resourceGroupName: string, virtualNetworkName: string, subnetName: string, unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, options?: SubnetsUnprepareNetworkPoliciesOptionalParams): Promise; - get(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options?: SubnetsGetOptionalParams): Promise; - list(resourceGroupName: string, virtualNetworkName: string, options?: SubnetsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface SubnetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SubnetsCreateOrUpdateResponse = Subnet; - -// @public -export interface SubnetsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface SubnetsGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type SubnetsGetResponse = Subnet; - -// @public -export interface SubnetsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SubnetsListNextResponse = SubnetListResult; - -// @public -export interface SubnetsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SubnetsListResponse = SubnetListResult; - -// @public -export interface SubnetsPrepareNetworkPoliciesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface SubnetsUnprepareNetworkPoliciesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface SubResource { - id?: string; -} - -// @public (undocumented) -export interface SubscriptionId { - id?: string; -} - -// @public -export interface SubscriptionNetworkManagerConnections { - createOrUpdate(networkManagerConnectionName: string, parameters: NetworkManagerConnection, options?: SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams): Promise; - delete(networkManagerConnectionName: string, options?: SubscriptionNetworkManagerConnectionsDeleteOptionalParams): Promise; - get(networkManagerConnectionName: string, options?: SubscriptionNetworkManagerConnectionsGetOptionalParams): Promise; - list(options?: SubscriptionNetworkManagerConnectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SubscriptionNetworkManagerConnectionsCreateOrUpdateResponse = NetworkManagerConnection; - -// @public -export interface SubscriptionNetworkManagerConnectionsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface SubscriptionNetworkManagerConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SubscriptionNetworkManagerConnectionsGetResponse = NetworkManagerConnection; - -// @public -export interface SubscriptionNetworkManagerConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SubscriptionNetworkManagerConnectionsListNextResponse = NetworkManagerConnectionListResult; - -// @public -export interface SubscriptionNetworkManagerConnectionsListOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; -} - -// @public -export type SubscriptionNetworkManagerConnectionsListResponse = NetworkManagerConnectionListResult; - -// @public -export interface SupportedSecurityProvidersOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SupportedSecurityProvidersResponse = VirtualWanSecurityProviders; - -// @public -export interface SwapResource { - readonly id?: string; - readonly name?: string; - properties?: SwapResourceProperties; - readonly type?: string; -} - -// @public -export interface SwapResourceListResult { - // (undocumented) - value?: SwapResource[]; -} - -// @public -export interface SwapResourceProperties { - slotType?: SlotType; -} - -// @public -export type SyncMode = string; - -// @public -export type SyncRemoteAddressSpace = string; - -// @public -export interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; -} - -// @public -export interface TagsObject { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface Topology { - readonly createdDateTime?: Date; - readonly id?: string; - readonly lastModified?: Date; - resources?: TopologyResource[]; -} - -// @public -export interface TopologyAssociation { - associationType?: AssociationType; - name?: string; - resourceId?: string; -} - -// @public -export interface TopologyParameters { - targetResourceGroupName?: string; - targetSubnet?: SubResource; - targetVirtualNetwork?: SubResource; -} - -// @public -export interface TopologyResource { - associations?: TopologyAssociation[]; - id?: string; - location?: string; - name?: string; -} - -// @public -export interface TrackedResource extends SecurityPerimeterResource { - location: string; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface TrafficAnalyticsConfigurationProperties { - enabled?: boolean; - trafficAnalyticsInterval?: number; - workspaceId?: string; - workspaceRegion?: string; - workspaceResourceId?: string; -} - -// @public -export interface TrafficAnalyticsProperties { - networkWatcherFlowAnalyticsConfiguration?: TrafficAnalyticsConfigurationProperties; -} - -// @public -export interface TrafficDetectionRule { - packetsPerSecond?: number; - trafficType?: DdosTrafficType; -} - -// @public -export interface TrafficSelectorPolicy { - localAddressRanges: string[]; - remoteAddressRanges: string[]; -} - -// @public -export type TransportProtocol = string; - -// @public -export interface TroubleshootingDetails { - detail?: string; - id?: string; - reasonType?: string; - recommendedActions?: TroubleshootingRecommendedActions[]; - summary?: string; -} - -// @public -export interface TroubleshootingParameters { - storageId: string; - storagePath: string; - targetResourceId: string; -} - -// @public -export interface TroubleshootingRecommendedActions { - actionId?: string; - actionText?: string; - actionUri?: string; - actionUriText?: string; -} - -// @public -export interface TroubleshootingResult { - code?: string; - endTime?: Date; - results?: TroubleshootingDetails[]; - startTime?: Date; -} - -// @public -export interface TunnelConnectionHealth { - readonly connectionStatus?: VirtualNetworkGatewayConnectionStatus; - readonly egressBytesTransferred?: number; - readonly ingressBytesTransferred?: number; - readonly lastConnectionEstablishedUtcTime?: string; - readonly tunnel?: string; -} - -// @public -export type TunnelConnectionStatus = string; - -// @public -export interface UnprepareNetworkPoliciesRequest { - serviceName?: string; -} - -// @public -export type UpdateAction = string; - -// @public -export interface UpdateTagsRequest { - readonly id?: string; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface Usage { - currentValue: number; - readonly id?: string; - limit: number; - name: UsageName; - unit: UsageUnit; -} - -// @public -export interface UsageName { - localizedValue?: string; - value?: string; -} - -// @public -export interface Usages { - list(location: string, options?: UsagesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface UsagesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type UsagesListNextResponse = UsagesListResult; - -// @public -export interface UsagesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type UsagesListResponse = UsagesListResult; - -// @public -export interface UsagesListResult { - nextLink?: string; - value?: Usage[]; -} - -// @public -export type UsageUnit = string; - -// @public -export type UseHubGateway = string; - -// @public -export type VerbosityLevel = string; - -// @public -export interface VerificationIPFlowParameters { - direction: Direction; - localIPAddress: string; - localPort: string; - protocol: IpFlowProtocol; - remoteIPAddress: string; - remotePort: string; - targetNicResourceId?: string; - targetResourceId: string; -} - -// @public -export interface VerificationIPFlowResult { - access?: Access; - ruleName?: string; -} - -// @public -export interface VerifierWorkspace extends CommonTrackedResource { - readonly etag?: string; - properties?: VerifierWorkspaceProperties; -} - -// @public -export interface VerifierWorkspaceListResult { - nextLink?: string; - value?: VerifierWorkspace[]; -} - -// @public -export interface VerifierWorkspaceProperties { - // (undocumented) - description?: string; - provisioningState?: ProvisioningState; -} - -// @public -export interface VerifierWorkspaces { - beginDelete(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: VerifierWorkspacesDeleteOptionalParams): Promise, VerifierWorkspacesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: VerifierWorkspacesDeleteOptionalParams): Promise; - create(resourceGroupName: string, networkManagerName: string, workspaceName: string, body: VerifierWorkspace, options?: VerifierWorkspacesCreateOptionalParams): Promise; - get(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: VerifierWorkspacesGetOptionalParams): Promise; - list(resourceGroupName: string, networkManagerName: string, options?: VerifierWorkspacesListOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: VerifierWorkspacesUpdateOptionalParams): Promise; -} - -// @public -export interface VerifierWorkspacesCreateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type VerifierWorkspacesCreateResponse = VerifierWorkspace; - -// @public -export interface VerifierWorkspacesDeleteHeaders { - location?: string; -} - -// @public -export interface VerifierWorkspacesDeleteOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VerifierWorkspacesDeleteResponse = VerifierWorkspacesDeleteHeaders; - -// @public -export interface VerifierWorkspacesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VerifierWorkspacesGetResponse = VerifierWorkspace; - -// @public -export interface VerifierWorkspacesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VerifierWorkspacesListNextResponse = VerifierWorkspaceListResult; - -// @public -export interface VerifierWorkspacesListOptionalParams extends coreClient.OperationOptions { - skip?: number; - skipToken?: string; - sortKey?: string; - sortValue?: string; - top?: number; -} - -// @public -export type VerifierWorkspacesListResponse = VerifierWorkspaceListResult; - -// @public -export interface VerifierWorkspacesUpdateOptionalParams extends coreClient.OperationOptions { - body?: VerifierWorkspaceUpdate; - ifMatch?: string; -} - -// @public -export type VerifierWorkspacesUpdateResponse = VerifierWorkspace; - -// @public -export interface VerifierWorkspaceUpdate { - properties?: VerifierWorkspaceUpdateProperties; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface VerifierWorkspaceUpdateProperties { - // (undocumented) - description?: string; -} - -// @public -export interface VipSwap { - beginCreate(groupName: string, resourceName: string, parameters: SwapResource, options?: VipSwapCreateOptionalParams): Promise, void>>; - beginCreateAndWait(groupName: string, resourceName: string, parameters: SwapResource, options?: VipSwapCreateOptionalParams): Promise; - get(groupName: string, resourceName: string, options?: VipSwapGetOptionalParams): Promise; - list(groupName: string, resourceName: string, options?: VipSwapListOptionalParams): Promise; -} - -// @public -export interface VipSwapCreateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VipSwapGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VipSwapGetResponse = SwapResource; - -// @public -export interface VipSwapListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VipSwapListResponse = SwapResourceListResult; - -// @public -export interface VirtualApplianceAdditionalNicProperties { - hasPublicIp?: boolean; - name?: string; -} - -// @public -export interface VirtualApplianceIPConfiguration { - name?: string; - properties?: VirtualApplianceIPConfigurationProperties; -} - -// @public -export interface VirtualApplianceIPConfigurationProperties { - primary?: boolean; -} - -// @public -export interface VirtualApplianceNetworkInterfaceConfiguration { - nicType?: NicTypeInRequest; - properties?: VirtualApplianceNetworkInterfaceConfigurationProperties; -} - -// @public -export interface VirtualApplianceNetworkInterfaceConfigurationProperties { - // (undocumented) - ipConfigurations?: VirtualApplianceIPConfiguration[]; -} - -// @public -export interface VirtualApplianceNicProperties { - readonly instanceName?: string; - readonly name?: string; - readonly nicType?: NicTypeInResponse; - readonly privateIpAddress?: string; - readonly publicIpAddress?: string; -} - -// @public -export interface VirtualApplianceSite extends SubResource { - addressPrefix?: string; - readonly etag?: string; - name?: string; - o365Policy?: Office365PolicyProperties; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface VirtualApplianceSites { - beginCreateOrUpdate(resourceGroupName: string, networkVirtualApplianceName: string, siteName: string, parameters: VirtualApplianceSite, options?: VirtualApplianceSitesCreateOrUpdateOptionalParams): Promise, VirtualApplianceSitesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, networkVirtualApplianceName: string, siteName: string, parameters: VirtualApplianceSite, options?: VirtualApplianceSitesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkVirtualApplianceName: string, siteName: string, options?: VirtualApplianceSitesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, networkVirtualApplianceName: string, siteName: string, options?: VirtualApplianceSitesDeleteOptionalParams): Promise; - get(resourceGroupName: string, networkVirtualApplianceName: string, siteName: string, options?: VirtualApplianceSitesGetOptionalParams): Promise; - list(resourceGroupName: string, networkVirtualApplianceName: string, options?: VirtualApplianceSitesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualApplianceSitesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualApplianceSitesCreateOrUpdateResponse = VirtualApplianceSite; - -// @public -export interface VirtualApplianceSitesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualApplianceSitesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualApplianceSitesGetResponse = VirtualApplianceSite; - -// @public -export interface VirtualApplianceSitesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualApplianceSitesListNextResponse = NetworkVirtualApplianceSiteListResult; - -// @public -export interface VirtualApplianceSitesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualApplianceSitesListResponse = NetworkVirtualApplianceSiteListResult; - -// @public -export interface VirtualApplianceSkuProperties { - bundledScaleUnit?: string; - marketPlaceVersion?: string; - vendor?: string; -} - -// @public -export interface VirtualApplianceSkus { - get(skuName: string, options?: VirtualApplianceSkusGetOptionalParams): Promise; - list(options?: VirtualApplianceSkusListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualApplianceSkusGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualApplianceSkusGetResponse = NetworkVirtualApplianceSku; - -// @public -export interface VirtualApplianceSkusListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualApplianceSkusListNextResponse = NetworkVirtualApplianceSkuListResult; - -// @public -export interface VirtualApplianceSkusListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualApplianceSkusListResponse = NetworkVirtualApplianceSkuListResult; - -// @public -export interface VirtualHub extends Resource { - addressPrefix?: string; - allowBranchToBranchTraffic?: boolean; - azureFirewall?: SubResource; - readonly bgpConnections?: SubResource[]; - readonly etag?: string; - expressRouteGateway?: SubResource; - hubRoutingPreference?: HubRoutingPreference; - readonly ipConfigurations?: SubResource[]; - readonly kind?: string; - p2SVpnGateway?: SubResource; - preferredRoutingGateway?: PreferredRoutingGateway; - readonly provisioningState?: ProvisioningState; - readonly routeMaps?: SubResource[]; - routeTable?: VirtualHubRouteTable; - readonly routingState?: RoutingState; - securityPartnerProvider?: SubResource; - securityProviderName?: string; - sku?: string; - virtualHubRouteTableV2S?: VirtualHubRouteTableV2[]; - virtualRouterAsn?: number; - virtualRouterAutoScaleConfiguration?: VirtualRouterAutoScaleConfiguration; - virtualRouterIps?: string[]; - virtualWan?: SubResource; - vpnGateway?: SubResource; -} - -// @public -export interface VirtualHubBgpConnection { - beginCreateOrUpdate(resourceGroupName: string, virtualHubName: string, connectionName: string, parameters: BgpConnection, options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams): Promise, VirtualHubBgpConnectionCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualHubName: string, connectionName: string, parameters: BgpConnection, options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualHubName: string, connectionName: string, options?: VirtualHubBgpConnectionDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualHubName: string, connectionName: string, options?: VirtualHubBgpConnectionDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualHubName: string, connectionName: string, options?: VirtualHubBgpConnectionGetOptionalParams): Promise; -} - -// @public -export interface VirtualHubBgpConnectionCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualHubBgpConnectionCreateOrUpdateResponse = BgpConnection; - -// @public -export interface VirtualHubBgpConnectionDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualHubBgpConnectionGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubBgpConnectionGetResponse = BgpConnection; - -// @public -export interface VirtualHubBgpConnections { - beginListAdvertisedRoutes(resourceGroupName: string, hubName: string, connectionName: string, options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams): Promise, VirtualHubBgpConnectionsListAdvertisedRoutesResponse>>; - beginListAdvertisedRoutesAndWait(resourceGroupName: string, hubName: string, connectionName: string, options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams): Promise; - beginListLearnedRoutes(resourceGroupName: string, hubName: string, connectionName: string, options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams): Promise, VirtualHubBgpConnectionsListLearnedRoutesResponse>>; - beginListLearnedRoutesAndWait(resourceGroupName: string, hubName: string, connectionName: string, options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams): Promise; - list(resourceGroupName: string, virtualHubName: string, options?: VirtualHubBgpConnectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualHubBgpConnectionsListAdvertisedRoutesResponse = { - [propertyName: string]: PeerRoute[]; -}; - -// @public -export interface VirtualHubBgpConnectionsListLearnedRoutesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualHubBgpConnectionsListLearnedRoutesResponse = { - [propertyName: string]: PeerRoute[]; -}; - -// @public -export interface VirtualHubBgpConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubBgpConnectionsListNextResponse = ListVirtualHubBgpConnectionResults; - -// @public -export interface VirtualHubBgpConnectionsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubBgpConnectionsListResponse = ListVirtualHubBgpConnectionResults; - -// @public -export interface VirtualHubEffectiveRoute { - addressPrefixes?: string[]; - asPath?: string; - nextHops?: string[]; - nextHopType?: string; - routeOrigin?: string; -} - -// @public -export interface VirtualHubEffectiveRouteList { - value?: VirtualHubEffectiveRoute[]; -} - -// @public -export interface VirtualHubId { - id?: string; -} - -// @public -export interface VirtualHubIpConfiguration { - beginCreateOrUpdate(resourceGroupName: string, virtualHubName: string, ipConfigName: string, parameters: HubIpConfiguration, options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams): Promise, VirtualHubIpConfigurationCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualHubName: string, ipConfigName: string, parameters: HubIpConfiguration, options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualHubName: string, ipConfigName: string, options?: VirtualHubIpConfigurationDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualHubName: string, ipConfigName: string, options?: VirtualHubIpConfigurationDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualHubName: string, ipConfigName: string, options?: VirtualHubIpConfigurationGetOptionalParams): Promise; - list(resourceGroupName: string, virtualHubName: string, options?: VirtualHubIpConfigurationListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualHubIpConfigurationCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualHubIpConfigurationCreateOrUpdateResponse = HubIpConfiguration; - -// @public -export interface VirtualHubIpConfigurationDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualHubIpConfigurationGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubIpConfigurationGetResponse = HubIpConfiguration; - -// @public -export interface VirtualHubIpConfigurationListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubIpConfigurationListNextResponse = ListVirtualHubIpConfigurationResults; - -// @public -export interface VirtualHubIpConfigurationListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubIpConfigurationListResponse = ListVirtualHubIpConfigurationResults; - -// @public -export interface VirtualHubRoute { - addressPrefixes?: string[]; - nextHopIpAddress?: string; -} - -// @public -export interface VirtualHubRouteTable { - routes?: VirtualHubRoute[]; -} - -// @public -export interface VirtualHubRouteTableV2 extends SubResource { - attachedConnections?: string[]; - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - routes?: VirtualHubRouteV2[]; -} - -// @public -export interface VirtualHubRouteTableV2S { - beginCreateOrUpdate(resourceGroupName: string, virtualHubName: string, routeTableName: string, virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams): Promise, VirtualHubRouteTableV2SCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualHubName: string, routeTableName: string, virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualHubName: string, routeTableName: string, options?: VirtualHubRouteTableV2SDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualHubName: string, routeTableName: string, options?: VirtualHubRouteTableV2SDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualHubName: string, routeTableName: string, options?: VirtualHubRouteTableV2SGetOptionalParams): Promise; - list(resourceGroupName: string, virtualHubName: string, options?: VirtualHubRouteTableV2SListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualHubRouteTableV2SCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualHubRouteTableV2SCreateOrUpdateResponse = VirtualHubRouteTableV2; - -// @public -export interface VirtualHubRouteTableV2SDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualHubRouteTableV2SGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubRouteTableV2SGetResponse = VirtualHubRouteTableV2; - -// @public -export interface VirtualHubRouteTableV2SListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubRouteTableV2SListNextResponse = ListVirtualHubRouteTableV2SResult; - -// @public -export interface VirtualHubRouteTableV2SListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubRouteTableV2SListResponse = ListVirtualHubRouteTableV2SResult; - -// @public -export interface VirtualHubRouteV2 { - destinations?: string[]; - destinationType?: string; - nextHops?: string[]; - nextHopType?: string; -} - -// @public -export interface VirtualHubs { - beginCreateOrUpdate(resourceGroupName: string, virtualHubName: string, virtualHubParameters: VirtualHub, options?: VirtualHubsCreateOrUpdateOptionalParams): Promise, VirtualHubsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualHubName: string, virtualHubParameters: VirtualHub, options?: VirtualHubsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualHubName: string, options?: VirtualHubsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualHubName: string, options?: VirtualHubsDeleteOptionalParams): Promise; - beginGetEffectiveVirtualHubRoutes(resourceGroupName: string, virtualHubName: string, options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams): Promise, VirtualHubsGetEffectiveVirtualHubRoutesResponse>>; - beginGetEffectiveVirtualHubRoutesAndWait(resourceGroupName: string, virtualHubName: string, options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams): Promise; - beginGetInboundRoutes(resourceGroupName: string, virtualHubName: string, getInboundRoutesParameters: GetInboundRoutesParameters, options?: VirtualHubsGetInboundRoutesOptionalParams): Promise, VirtualHubsGetInboundRoutesResponse>>; - beginGetInboundRoutesAndWait(resourceGroupName: string, virtualHubName: string, getInboundRoutesParameters: GetInboundRoutesParameters, options?: VirtualHubsGetInboundRoutesOptionalParams): Promise; - beginGetOutboundRoutes(resourceGroupName: string, virtualHubName: string, getOutboundRoutesParameters: GetOutboundRoutesParameters, options?: VirtualHubsGetOutboundRoutesOptionalParams): Promise, VirtualHubsGetOutboundRoutesResponse>>; - beginGetOutboundRoutesAndWait(resourceGroupName: string, virtualHubName: string, getOutboundRoutesParameters: GetOutboundRoutesParameters, options?: VirtualHubsGetOutboundRoutesOptionalParams): Promise; - get(resourceGroupName: string, virtualHubName: string, options?: VirtualHubsGetOptionalParams): Promise; - list(options?: VirtualHubsListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: VirtualHubsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, virtualHubName: string, virtualHubParameters: TagsObject, options?: VirtualHubsUpdateTagsOptionalParams): Promise; -} - -// @public -export interface VirtualHubsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualHubsCreateOrUpdateResponse = VirtualHub; - -// @public -export interface VirtualHubsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams extends coreClient.OperationOptions { - effectiveRoutesParameters?: EffectiveRoutesParameters; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualHubsGetEffectiveVirtualHubRoutesResponse = VirtualHubEffectiveRouteList; - -// @public -export interface VirtualHubsGetInboundRoutesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualHubsGetInboundRoutesResponse = EffectiveRouteMapRouteList; - -// @public -export interface VirtualHubsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface VirtualHubsGetOutboundRoutesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualHubsGetOutboundRoutesResponse = EffectiveRouteMapRouteList; - -// @public -export type VirtualHubsGetResponse = VirtualHub; - -// @public -export interface VirtualHubsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubsListByResourceGroupNextResponse = ListVirtualHubsResult; - -// @public -export interface VirtualHubsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubsListByResourceGroupResponse = ListVirtualHubsResult; - -// @public -export interface VirtualHubsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubsListNextResponse = ListVirtualHubsResult; - -// @public -export interface VirtualHubsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubsListResponse = ListVirtualHubsResult; - -// @public -export interface VirtualHubsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualHubsUpdateTagsResponse = VirtualHub; - -// @public -export interface VirtualNetwork extends Resource { - addressSpace?: AddressSpace; - bgpCommunities?: VirtualNetworkBgpCommunities; - ddosProtectionPlan?: SubResource; - readonly defaultPublicNatGateway?: SubResource; - dhcpOptions?: DhcpOptions; - enableDdosProtection?: boolean; - enableVmProtection?: boolean; - encryption?: VirtualNetworkEncryption; - readonly etag?: string; - extendedLocation?: ExtendedLocation; - readonly flowLogs?: FlowLog[]; - flowTimeoutInMinutes?: number; - ipAllocations?: SubResource[]; - privateEndpointVNetPolicies?: PrivateEndpointVNetPolicies; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - subnets?: Subnet[]; - virtualNetworkPeerings?: VirtualNetworkPeering[]; -} - -// @public -export interface VirtualNetworkAppliance extends Resource { - bandwidthInGbps?: string; - readonly etag?: string; - readonly ipConfigurations?: VirtualNetworkApplianceIpConfiguration[]; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - subnet?: Subnet; -} - -// @public -export interface VirtualNetworkApplianceIpConfiguration extends SubResource { - readonly etag?: string; - name?: string; - primary?: boolean; - privateIPAddress?: string; - privateIPAddressVersion?: IPVersion; - privateIPAllocationMethod?: IPAllocationMethod; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface VirtualNetworkApplianceListResult { - readonly nextLink?: string; - value?: VirtualNetworkAppliance[]; -} - -// @public -export interface VirtualNetworkAppliances { - beginCreateOrUpdate(resourceGroupName: string, virtualNetworkApplianceName: string, parameters: VirtualNetworkAppliance, options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams): Promise, VirtualNetworkAppliancesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworkApplianceName: string, parameters: VirtualNetworkAppliance, options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualNetworkApplianceName: string, options?: VirtualNetworkAppliancesDeleteOptionalParams): Promise, VirtualNetworkAppliancesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, virtualNetworkApplianceName: string, options?: VirtualNetworkAppliancesDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualNetworkApplianceName: string, options?: VirtualNetworkAppliancesGetOptionalParams): Promise; - list(resourceGroupName: string, options?: VirtualNetworkAppliancesListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: VirtualNetworkAppliancesListAllOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, virtualNetworkApplianceName: string, parameters: TagsObject, options?: VirtualNetworkAppliancesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface VirtualNetworkAppliancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkAppliancesCreateOrUpdateResponse = VirtualNetworkAppliance; - -// @public -export interface VirtualNetworkAppliancesDeleteHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface VirtualNetworkAppliancesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkAppliancesDeleteResponse = VirtualNetworkAppliancesDeleteHeaders; - -// @public -export interface VirtualNetworkAppliancesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkAppliancesGetResponse = VirtualNetworkAppliance; - -// @public -export interface VirtualNetworkAppliancesListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkAppliancesListAllNextResponse = VirtualNetworkApplianceListResult; - -// @public -export interface VirtualNetworkAppliancesListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkAppliancesListAllResponse = VirtualNetworkApplianceListResult; - -// @public -export interface VirtualNetworkAppliancesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkAppliancesListNextResponse = VirtualNetworkApplianceListResult; - -// @public -export interface VirtualNetworkAppliancesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkAppliancesListResponse = VirtualNetworkApplianceListResult; - -// @public -export interface VirtualNetworkAppliancesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkAppliancesUpdateTagsResponse = VirtualNetworkAppliance; - -// @public -export interface VirtualNetworkBgpCommunities { - readonly regionalCommunity?: string; - virtualNetworkCommunity: string; -} - -// @public -export interface VirtualNetworkConnectionGatewayReference { - id: string; -} - -// @public -export interface VirtualNetworkDdosProtectionStatusResult { - nextLink?: string; - value?: PublicIpDdosProtectionStatusResult[]; -} - -// @public -export interface VirtualNetworkEncryption { - enabled: boolean; - enforcement?: VirtualNetworkEncryptionEnforcement; -} - -// @public -export type VirtualNetworkEncryptionEnforcement = string; - -// @public -export interface VirtualNetworkGateway extends Resource { - active?: boolean; - adminState?: AdminState; - allowRemoteVnetTraffic?: boolean; - allowVirtualWanTraffic?: boolean; - autoScaleConfiguration?: VirtualNetworkGatewayAutoScaleConfiguration; - bgpSettings?: BgpSettings; - customRoutes?: AddressSpace; - disableIPSecReplayProtection?: boolean; - enableBgp?: boolean; - enableBgpRouteTranslationForNat?: boolean; - enableDnsForwarding?: boolean; - enableHighBandwidthVpnGateway?: boolean; - enablePrivateIpAddress?: boolean; - readonly etag?: string; - extendedLocation?: ExtendedLocation; - gatewayDefaultSite?: SubResource; - gatewayType?: VirtualNetworkGatewayType; - identity?: ManagedServiceIdentity; - readonly inboundDnsForwardingEndpoint?: string; - ipConfigurations?: VirtualNetworkGatewayIPConfiguration[]; - natRules?: VirtualNetworkGatewayNatRule[]; - readonly provisioningState?: ProvisioningState; - resiliencyModel?: ResiliencyModel; - readonly resourceGuid?: string; - sku?: VirtualNetworkGatewaySku; - virtualNetworkGatewayMigrationStatus?: VirtualNetworkGatewayMigrationStatus; - virtualNetworkGatewayPolicyGroups?: VirtualNetworkGatewayPolicyGroup[]; - vNetExtendedLocationResourceId?: string; - vpnClientConfiguration?: VpnClientConfiguration; - vpnGatewayGeneration?: VpnGatewayGeneration; - vpnType?: VpnType; -} - -// @public (undocumented) -export interface VirtualNetworkGatewayAutoScaleBounds { - max?: number; - min?: number; -} - -// @public -export interface VirtualNetworkGatewayAutoScaleConfiguration { - bounds?: VirtualNetworkGatewayAutoScaleBounds; -} - -// @public -export interface VirtualNetworkGatewayConnection extends Resource { - authenticationType?: ConnectionAuthenticationType; - authorizationKey?: string; - certificateAuthentication?: CertificateAuthentication; - connectionMode?: VirtualNetworkGatewayConnectionMode; - connectionProtocol?: VirtualNetworkGatewayConnectionProtocol; - readonly connectionStatus?: VirtualNetworkGatewayConnectionStatus; - connectionType: VirtualNetworkGatewayConnectionType; - dpdTimeoutSeconds?: number; - readonly egressBytesTransferred?: number; - egressNatRules?: SubResource[]; - enableBgp?: boolean; - enablePrivateLinkFastPath?: boolean; - readonly etag?: string; - expressRouteGatewayBypass?: boolean; - gatewayCustomBgpIpAddresses?: GatewayCustomBgpIpAddressIpConfiguration[]; - readonly ingressBytesTransferred?: number; - ingressNatRules?: SubResource[]; - ipsecPolicies?: IpsecPolicy[]; - localNetworkGateway2?: LocalNetworkGateway; - peer?: SubResource; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - routingWeight?: number; - sharedKey?: string; - trafficSelectorPolicies?: TrafficSelectorPolicy[]; - readonly tunnelConnectionStatus?: TunnelConnectionHealth[]; - tunnelProperties?: VirtualNetworkGatewayConnectionTunnelProperties[]; - useLocalAzureIpAddress?: boolean; - usePolicyBasedTrafficSelectors?: boolean; - virtualNetworkGateway1: VirtualNetworkGateway; - virtualNetworkGateway2?: VirtualNetworkGateway; -} - -// @public -export interface VirtualNetworkGatewayConnectionListEntity extends Resource { - authorizationKey?: string; - connectionMode?: VirtualNetworkGatewayConnectionMode; - connectionProtocol?: VirtualNetworkGatewayConnectionProtocol; - readonly connectionStatus?: VirtualNetworkGatewayConnectionStatus; - connectionType: VirtualNetworkGatewayConnectionType; - readonly egressBytesTransferred?: number; - enableBgp?: boolean; - enablePrivateLinkFastPath?: boolean; - readonly etag?: string; - expressRouteGatewayBypass?: boolean; - gatewayCustomBgpIpAddresses?: GatewayCustomBgpIpAddressIpConfiguration[]; - readonly ingressBytesTransferred?: number; - ipsecPolicies?: IpsecPolicy[]; - localNetworkGateway2?: VirtualNetworkConnectionGatewayReference; - peer?: SubResource; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; - routingWeight?: number; - sharedKey?: string; - trafficSelectorPolicies?: TrafficSelectorPolicy[]; - readonly tunnelConnectionStatus?: TunnelConnectionHealth[]; - usePolicyBasedTrafficSelectors?: boolean; - virtualNetworkGateway1: VirtualNetworkConnectionGatewayReference; - virtualNetworkGateway2?: VirtualNetworkConnectionGatewayReference; -} - -// @public -export interface VirtualNetworkGatewayConnectionListResult { - readonly nextLink?: string; - value?: VirtualNetworkGatewayConnection[]; -} - -// @public -export type VirtualNetworkGatewayConnectionMode = string; - -// @public -export type VirtualNetworkGatewayConnectionProtocol = string; - -// @public -export interface VirtualNetworkGatewayConnections { - beginCreateOrUpdate(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, parameters: VirtualNetworkGatewayConnection, options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams): Promise, VirtualNetworkGatewayConnectionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, parameters: VirtualNetworkGatewayConnection, options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams): Promise; - beginGetIkeSas(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams): Promise, VirtualNetworkGatewayConnectionsGetIkeSasResponse>>; - beginGetIkeSasAndWait(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams): Promise; - beginResetConnection(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams): Promise, void>>; - beginResetConnectionAndWait(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams): Promise; - beginResetSharedKey(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, parameters: ConnectionResetSharedKey, options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams): Promise, VirtualNetworkGatewayConnectionsResetSharedKeyResponse>>; - beginResetSharedKeyAndWait(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, parameters: ConnectionResetSharedKey, options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams): Promise; - beginSetSharedKey(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, parameters: ConnectionSharedKey, options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams): Promise, VirtualNetworkGatewayConnectionsSetSharedKeyResponse>>; - beginSetSharedKeyAndWait(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, parameters: ConnectionSharedKey, options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams): Promise; - beginStartPacketCapture(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams): Promise, VirtualNetworkGatewayConnectionsStartPacketCaptureResponse>>; - beginStartPacketCaptureAndWait(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams): Promise; - beginStopPacketCapture(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, parameters: VpnPacketCaptureStopParameters, options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams): Promise, VirtualNetworkGatewayConnectionsStopPacketCaptureResponse>>; - beginStopPacketCaptureAndWait(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, parameters: VpnPacketCaptureStopParameters, options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams): Promise; - beginUpdateTags(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, parameters: TagsObject, options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams): Promise, VirtualNetworkGatewayConnectionsUpdateTagsResponse>>; - beginUpdateTagsAndWait(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, parameters: TagsObject, options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams): Promise; - get(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, options?: VirtualNetworkGatewayConnectionsGetOptionalParams): Promise; - getSharedKey(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, options?: VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams): Promise; - list(resourceGroupName: string, options?: VirtualNetworkGatewayConnectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewayConnectionsCreateOrUpdateResponse = VirtualNetworkGatewayConnection; - -// @public -export interface VirtualNetworkGatewayConnectionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewayConnectionsGetIkeSasResponse = { - body: string; -}; - -// @public -export interface VirtualNetworkGatewayConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewayConnectionsGetResponse = VirtualNetworkGatewayConnection; - -// @public -export interface VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewayConnectionsGetSharedKeyResponse = ConnectionSharedKey; - -// @public -export interface VirtualNetworkGatewayConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewayConnectionsListNextResponse = VirtualNetworkGatewayConnectionListResult; - -// @public -export interface VirtualNetworkGatewayConnectionsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewayConnectionsListResponse = VirtualNetworkGatewayConnectionListResult; - -// @public -export interface VirtualNetworkGatewayConnectionsResetConnectionOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewayConnectionsResetSharedKeyResponse = ConnectionResetSharedKey; - -// @public -export interface VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewayConnectionsSetSharedKeyResponse = ConnectionSharedKey; - -// @public -export interface VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams extends coreClient.OperationOptions { - parameters?: VpnPacketCaptureStartParameters; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewayConnectionsStartPacketCaptureResponse = { - body: string; -}; - -// @public -export interface VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewayConnectionsStopPacketCaptureResponse = { - body: string; -}; - -// @public -export type VirtualNetworkGatewayConnectionStatus = string; - -// @public -export interface VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewayConnectionsUpdateTagsResponse = VirtualNetworkGatewayConnection; - -// @public (undocumented) -export interface VirtualNetworkGatewayConnectionTunnelProperties { - bgpPeeringAddress?: string; - tunnelIpAddress?: string; -} - -// @public -export type VirtualNetworkGatewayConnectionType = string; - -// @public -export interface VirtualNetworkGatewayIPConfiguration extends SubResource { - readonly etag?: string; - name?: string; - readonly privateIPAddress?: string; - privateIPAllocationMethod?: IPAllocationMethod; - readonly provisioningState?: ProvisioningState; - publicIPAddress?: SubResource; - subnet?: SubResource; -} - -// @public -export interface VirtualNetworkGatewayListConnectionsResult { - readonly nextLink?: string; - value?: VirtualNetworkGatewayConnectionListEntity[]; -} - -// @public -export interface VirtualNetworkGatewayListResult { - readonly nextLink?: string; - value?: VirtualNetworkGateway[]; -} - -// @public -export interface VirtualNetworkGatewayMigrationParameters { - migrationType: VirtualNetworkGatewayMigrationType; - resourceUrl?: string; -} - -// @public -export type VirtualNetworkGatewayMigrationPhase = string; - -// @public -export type VirtualNetworkGatewayMigrationState = string; - -// @public -export interface VirtualNetworkGatewayMigrationStatus { - errorMessage?: string; - phase?: VirtualNetworkGatewayMigrationPhase; - state?: VirtualNetworkGatewayMigrationState; -} - -// @public -export type VirtualNetworkGatewayMigrationType = string; - -// @public -export interface VirtualNetworkGatewayNatRule extends SubResource { - readonly etag?: string; - externalMappings?: VpnNatRuleMapping[]; - internalMappings?: VpnNatRuleMapping[]; - ipConfigurationId?: string; - mode?: VpnNatRuleMode; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; - typePropertiesType?: VpnNatRuleType; -} - -// @public -export interface VirtualNetworkGatewayNatRules { - beginCreateOrUpdate(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, natRuleParameters: VirtualNetworkGatewayNatRule, options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams): Promise, VirtualNetworkGatewayNatRulesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, natRuleParameters: VirtualNetworkGatewayNatRule, options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualNetworkGatewayName: string, natRuleName: string, options?: VirtualNetworkGatewayNatRulesGetOptionalParams): Promise; - listByVirtualNetworkGateway(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewayNatRulesCreateOrUpdateResponse = VirtualNetworkGatewayNatRule; - -// @public -export interface VirtualNetworkGatewayNatRulesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualNetworkGatewayNatRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewayNatRulesGetResponse = VirtualNetworkGatewayNatRule; - -// @public -export interface VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayNextResponse = ListVirtualNetworkGatewayNatRulesResult; - -// @public -export interface VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayResponse = ListVirtualNetworkGatewayNatRulesResult; - -// @public -export interface VirtualNetworkGatewayPolicyGroup extends SubResource { - readonly etag?: string; - isDefault?: boolean; - name?: string; - policyMembers?: VirtualNetworkGatewayPolicyGroupMember[]; - priority?: number; - readonly provisioningState?: ProvisioningState; - readonly vngClientConnectionConfigurations?: SubResource[]; -} - -// @public -export interface VirtualNetworkGatewayPolicyGroupMember { - attributeType?: VpnPolicyMemberAttributeType; - attributeValue?: string; - name?: string; -} - -// @public -export interface VirtualNetworkGateways { - beginCreateOrUpdate(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: VirtualNetworkGateway, options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams): Promise, VirtualNetworkGatewaysCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: VirtualNetworkGateway, options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysDeleteOptionalParams): Promise; - beginDisconnectVirtualNetworkGatewayVpnConnections(resourceGroupName: string, virtualNetworkGatewayName: string, request: P2SVpnConnectionRequest, options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams): Promise, void>>; - beginDisconnectVirtualNetworkGatewayVpnConnectionsAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, request: P2SVpnConnectionRequest, options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams): Promise; - beginGeneratevpnclientpackage(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: VpnClientParameters, options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams): Promise, VirtualNetworkGatewaysGeneratevpnclientpackageResponse>>; - beginGeneratevpnclientpackageAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: VpnClientParameters, options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams): Promise; - beginGenerateVpnProfile(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: VpnClientParameters, options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams): Promise, VirtualNetworkGatewaysGenerateVpnProfileResponse>>; - beginGenerateVpnProfileAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: VpnClientParameters, options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams): Promise; - beginGetAdvertisedRoutes(resourceGroupName: string, virtualNetworkGatewayName: string, peer: string, options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams): Promise, VirtualNetworkGatewaysGetAdvertisedRoutesResponse>>; - beginGetAdvertisedRoutesAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, peer: string, options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams): Promise; - beginGetBgpPeerStatus(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams): Promise, VirtualNetworkGatewaysGetBgpPeerStatusResponse>>; - beginGetBgpPeerStatusAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams): Promise; - beginGetFailoverAllTestDetails(resourceGroupName: string, virtualNetworkGatewayName: string, typeParam: string, fetchLatest: boolean, options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams): Promise, VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse>>; - beginGetFailoverAllTestDetailsAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, typeParam: string, fetchLatest: boolean, options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams): Promise; - beginGetFailoverSingleTestDetails(resourceGroupName: string, virtualNetworkGatewayName: string, peeringLocation: string, failoverTestId: string, options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams): Promise, VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse>>; - beginGetFailoverSingleTestDetailsAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, peeringLocation: string, failoverTestId: string, options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams): Promise; - beginGetLearnedRoutes(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams): Promise, VirtualNetworkGatewaysGetLearnedRoutesResponse>>; - beginGetLearnedRoutesAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams): Promise; - beginGetResiliencyInformation(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams): Promise, VirtualNetworkGatewaysGetResiliencyInformationResponse>>; - beginGetResiliencyInformationAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams): Promise; - beginGetRoutesInformation(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams): Promise, VirtualNetworkGatewaysGetRoutesInformationResponse>>; - beginGetRoutesInformationAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams): Promise; - beginGetVpnclientConnectionHealth(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams): Promise, VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse>>; - beginGetVpnclientConnectionHealthAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams): Promise; - beginGetVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams): Promise, VirtualNetworkGatewaysGetVpnclientIpsecParametersResponse>>; - beginGetVpnclientIpsecParametersAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams): Promise; - beginGetVpnProfilePackageUrl(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams): Promise, VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse>>; - beginGetVpnProfilePackageUrlAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams): Promise; - beginInvokeAbortMigration(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams): Promise, VirtualNetworkGatewaysInvokeAbortMigrationResponse>>; - beginInvokeAbortMigrationAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams): Promise; - beginInvokeCommitMigration(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams): Promise, VirtualNetworkGatewaysInvokeCommitMigrationResponse>>; - beginInvokeCommitMigrationAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams): Promise; - beginInvokeExecuteMigration(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams): Promise, VirtualNetworkGatewaysInvokeExecuteMigrationResponse>>; - beginInvokeExecuteMigrationAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams): Promise; - beginInvokePrepareMigration(resourceGroupName: string, virtualNetworkGatewayName: string, migrationParams: VirtualNetworkGatewayMigrationParameters, options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams): Promise, VirtualNetworkGatewaysInvokePrepareMigrationResponse>>; - beginInvokePrepareMigrationAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, migrationParams: VirtualNetworkGatewayMigrationParameters, options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams): Promise; - beginReset(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysResetOptionalParams): Promise, VirtualNetworkGatewaysResetResponse>>; - beginResetAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysResetOptionalParams): Promise; - beginResetVpnClientSharedKey(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams): Promise, void>>; - beginResetVpnClientSharedKeyAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams): Promise; - beginSetVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: VpnClientIPsecParameters, options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams): Promise, VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse>>; - beginSetVpnclientIpsecParametersAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: VpnClientIPsecParameters, options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams): Promise; - beginStartExpressRouteSiteFailoverSimulation(resourceGroupName: string, virtualNetworkGatewayName: string, peeringLocation: string, options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams): Promise, VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse>>; - beginStartExpressRouteSiteFailoverSimulationAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, peeringLocation: string, options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams): Promise; - beginStartPacketCapture(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams): Promise, VirtualNetworkGatewaysStartPacketCaptureResponse>>; - beginStartPacketCaptureAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams): Promise; - beginStopExpressRouteSiteFailoverSimulation(resourceGroupName: string, virtualNetworkGatewayName: string, stopParameters: ExpressRouteFailoverStopApiParameters, options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams): Promise, VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse>>; - beginStopExpressRouteSiteFailoverSimulationAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, stopParameters: ExpressRouteFailoverStopApiParameters, options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams): Promise; - beginStopPacketCapture(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: VpnPacketCaptureStopParameters, options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams): Promise, VirtualNetworkGatewaysStopPacketCaptureResponse>>; - beginStopPacketCaptureAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: VpnPacketCaptureStopParameters, options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams): Promise; - beginUpdateTags(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: TagsObject, options?: VirtualNetworkGatewaysUpdateTagsOptionalParams): Promise, VirtualNetworkGatewaysUpdateTagsResponse>>; - beginUpdateTagsAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: TagsObject, options?: VirtualNetworkGatewaysUpdateTagsOptionalParams): Promise; - get(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetOptionalParams): Promise; - list(resourceGroupName: string, options?: VirtualNetworkGatewaysListOptionalParams): PagedAsyncIterableIterator; - listConnections(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysListConnectionsOptionalParams): PagedAsyncIterableIterator; - listRadiusSecrets(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysListRadiusSecretsOptionalParams): Promise; - supportedVpnDevices(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams): Promise; - vpnDeviceConfigurationScript(resourceGroupName: string, virtualNetworkGatewayConnectionName: string, parameters: VpnDeviceScriptParameters, options?: VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams): Promise; -} - -// @public -export interface VirtualNetworkGatewaysCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysCreateOrUpdateResponse = VirtualNetworkGateway; - -// @public -export interface VirtualNetworkGatewaysDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGeneratevpnclientpackageResponse = { - body: string; -}; - -// @public -export interface VirtualNetworkGatewaysGenerateVpnProfileOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGenerateVpnProfileResponse = { - body: string; -}; - -// @public -export interface VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGetAdvertisedRoutesResponse = GatewayRouteListResult; - -// @public -export interface VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams extends coreClient.OperationOptions { - peer?: string; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGetBgpPeerStatusResponse = BgpPeerStatusListResult; - -// @public -export interface VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse = ExpressRouteFailoverTestDetails[]; - -// @public -export interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse = ExpressRouteFailoverSingleTestDetails[]; - -// @public -export interface VirtualNetworkGatewaysGetLearnedRoutesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGetLearnedRoutesResponse = GatewayRouteListResult; - -// @public -export interface VirtualNetworkGatewaysGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface VirtualNetworkGatewaysGetResiliencyInformationHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface VirtualNetworkGatewaysGetResiliencyInformationOptionalParams extends coreClient.OperationOptions { - attemptRefresh?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGetResiliencyInformationResponse = GatewayResiliencyInformation; - -// @public -export type VirtualNetworkGatewaysGetResponse = VirtualNetworkGateway; - -// @public -export interface VirtualNetworkGatewaysGetRoutesInformationHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface VirtualNetworkGatewaysGetRoutesInformationOptionalParams extends coreClient.OperationOptions { - attemptRefresh?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGetRoutesInformationResponse = GatewayRouteSetsInformation; - -// @public -export interface VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse = VpnClientConnectionHealthDetailListResult; - -// @public -export interface VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGetVpnclientIpsecParametersResponse = VpnClientIPsecParameters; - -// @public -export interface VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse = { - body: string; -}; - -// @public -export interface VirtualNetworkGatewaysInvokeAbortMigrationHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysInvokeAbortMigrationResponse = VirtualNetworkGatewaysInvokeAbortMigrationHeaders; - -// @public -export interface VirtualNetworkGatewaysInvokeCommitMigrationHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysInvokeCommitMigrationResponse = VirtualNetworkGatewaysInvokeCommitMigrationHeaders; - -// @public -export interface VirtualNetworkGatewaysInvokeExecuteMigrationHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysInvokeExecuteMigrationResponse = VirtualNetworkGatewaysInvokeExecuteMigrationHeaders; - -// @public -export interface VirtualNetworkGatewaysInvokePrepareMigrationHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysInvokePrepareMigrationResponse = VirtualNetworkGatewaysInvokePrepareMigrationHeaders; - -// @public -export interface VirtualNetworkGatewaySku { - readonly capacity?: number; - name?: VirtualNetworkGatewaySkuName; - tier?: VirtualNetworkGatewaySkuTier; -} - -// @public -export type VirtualNetworkGatewaySkuName = string; - -// @public -export type VirtualNetworkGatewaySkuTier = string; - -// @public -export interface VirtualNetworkGatewaysListConnectionsNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewaysListConnectionsNextResponse = VirtualNetworkGatewayListConnectionsResult; - -// @public -export interface VirtualNetworkGatewaysListConnectionsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewaysListConnectionsResponse = VirtualNetworkGatewayListConnectionsResult; - -// @public -export interface VirtualNetworkGatewaysListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewaysListNextResponse = VirtualNetworkGatewayListResult; - -// @public -export interface VirtualNetworkGatewaysListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface VirtualNetworkGatewaysListRadiusSecretsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewaysListRadiusSecretsResponse = RadiusAuthServerListResult; - -// @public -export type VirtualNetworkGatewaysListResponse = VirtualNetworkGatewayListResult; - -// @public -export interface VirtualNetworkGatewaysResetOptionalParams extends coreClient.OperationOptions { - gatewayVip?: string; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysResetResponse = VirtualNetworkGateway; - -// @public -export interface VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse = VpnClientIPsecParameters; - -// @public -export interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse = { - body: string; -}; - -// @public -export interface VirtualNetworkGatewaysStartPacketCaptureOptionalParams extends coreClient.OperationOptions { - parameters?: VpnPacketCaptureStartParameters; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysStartPacketCaptureResponse = { - body: string; -}; - -// @public -export interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse = { - body: string; -}; - -// @public -export interface VirtualNetworkGatewaysStopPacketCaptureOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysStopPacketCaptureResponse = { - body: string; -}; - -// @public -export interface VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewaysSupportedVpnDevicesResponse = { - body: string; -}; - -// @public -export interface VirtualNetworkGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkGatewaysUpdateTagsResponse = VirtualNetworkGateway; - -// @public -export interface VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkGatewaysVpnDeviceConfigurationScriptResponse = { - body: string; -}; - -// @public -export type VirtualNetworkGatewayType = string; - -// @public -export interface VirtualNetworkListResult { - nextLink?: string; - value?: VirtualNetwork[]; -} - -// @public -export interface VirtualNetworkListUsageResult { - nextLink?: string; - readonly value?: VirtualNetworkUsage[]; -} - -// @public -export interface VirtualNetworkPeering extends SubResource { - allowForwardedTraffic?: boolean; - allowGatewayTransit?: boolean; - allowVirtualNetworkAccess?: boolean; - doNotVerifyRemoteGateways?: boolean; - enableOnlyIPv6Peering?: boolean; - readonly etag?: string; - localAddressSpace?: AddressSpace; - localSubnetNames?: string[]; - localVirtualNetworkAddressSpace?: AddressSpace; - name?: string; - peerCompleteVnets?: boolean; - peeringState?: VirtualNetworkPeeringState; - peeringSyncLevel?: VirtualNetworkPeeringLevel; - readonly provisioningState?: ProvisioningState; - remoteAddressSpace?: AddressSpace; - remoteBgpCommunities?: VirtualNetworkBgpCommunities; - remoteSubnetNames?: string[]; - remoteVirtualNetwork?: SubResource; - remoteVirtualNetworkAddressSpace?: AddressSpace; - readonly remoteVirtualNetworkEncryption?: VirtualNetworkEncryption; - readonly resourceGuid?: string; - type?: string; - useRemoteGateways?: boolean; -} - -// @public -export type VirtualNetworkPeeringLevel = string; - -// @public -export interface VirtualNetworkPeeringListResult { - nextLink?: string; - value?: VirtualNetworkPeering[]; -} - -// @public -export interface VirtualNetworkPeerings { - beginCreateOrUpdate(resourceGroupName: string, virtualNetworkName: string, virtualNetworkPeeringName: string, virtualNetworkPeeringParameters: VirtualNetworkPeering, options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams): Promise, VirtualNetworkPeeringsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworkName: string, virtualNetworkPeeringName: string, virtualNetworkPeeringParameters: VirtualNetworkPeering, options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualNetworkName: string, virtualNetworkPeeringName: string, options?: VirtualNetworkPeeringsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualNetworkName: string, virtualNetworkPeeringName: string, options?: VirtualNetworkPeeringsDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualNetworkName: string, virtualNetworkPeeringName: string, options?: VirtualNetworkPeeringsGetOptionalParams): Promise; - list(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworkPeeringsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualNetworkPeeringsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - syncRemoteAddressSpace?: SyncRemoteAddressSpace; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkPeeringsCreateOrUpdateResponse = VirtualNetworkPeering; - -// @public -export interface VirtualNetworkPeeringsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualNetworkPeeringsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkPeeringsGetResponse = VirtualNetworkPeering; - -// @public -export interface VirtualNetworkPeeringsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkPeeringsListNextResponse = VirtualNetworkPeeringListResult; - -// @public -export interface VirtualNetworkPeeringsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkPeeringsListResponse = VirtualNetworkPeeringListResult; - -// @public -export type VirtualNetworkPeeringState = string; - -// @public -export type VirtualNetworkPrivateEndpointNetworkPolicies = string; - -// @public -export type VirtualNetworkPrivateLinkServiceNetworkPolicies = string; - -// @public -export interface VirtualNetworks { - beginCreateOrUpdate(resourceGroupName: string, virtualNetworkName: string, parameters: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise, VirtualNetworksCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworkName: string, parameters: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise; - beginListDdosProtectionStatusAndWait(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksListDdosProtectionStatusOptionalParams): PagedAsyncIterableIterator; - checkIPAddressAvailability(resourceGroupName: string, virtualNetworkName: string, ipAddress: string, options?: VirtualNetworksCheckIPAddressAvailabilityOptionalParams): Promise; - get(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksGetOptionalParams): Promise; - list(resourceGroupName: string, options?: VirtualNetworksListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: VirtualNetworksListAllOptionalParams): PagedAsyncIterableIterator; - listUsage(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksListUsageOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, virtualNetworkName: string, parameters: TagsObject, options?: VirtualNetworksUpdateTagsOptionalParams): Promise; -} - -// @public -export interface VirtualNetworksCheckIPAddressAvailabilityOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksCheckIPAddressAvailabilityResponse = IPAddressAvailabilityResult; - -// @public -export interface VirtualNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworksCreateOrUpdateResponse = VirtualNetwork; - -// @public -export interface VirtualNetworksDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualNetworksGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type VirtualNetworksGetResponse = VirtualNetwork; - -// @public -export interface VirtualNetworksListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksListAllNextResponse = VirtualNetworkListResult; - -// @public -export interface VirtualNetworksListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksListAllResponse = VirtualNetworkListResult; - -// @public -export interface VirtualNetworksListDdosProtectionStatusNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksListDdosProtectionStatusNextResponse = VirtualNetworkDdosProtectionStatusResult; - -// @public -export interface VirtualNetworksListDdosProtectionStatusOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - skipToken?: string; - top?: number; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworksListDdosProtectionStatusResponse = VirtualNetworkDdosProtectionStatusResult; - -// @public -export interface VirtualNetworksListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksListNextResponse = VirtualNetworkListResult; - -// @public -export interface VirtualNetworksListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksListResponse = VirtualNetworkListResult; - -// @public -export interface VirtualNetworksListUsageNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksListUsageNextResponse = VirtualNetworkListUsageResult; - -// @public -export interface VirtualNetworksListUsageOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksListUsageResponse = VirtualNetworkListUsageResult; - -// @public -export interface VirtualNetworksUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksUpdateTagsResponse = VirtualNetwork; - -// @public -export interface VirtualNetworkTap extends Resource { - destinationLoadBalancerFrontEndIPConfiguration?: FrontendIPConfiguration; - destinationNetworkInterfaceIPConfiguration?: NetworkInterfaceIPConfiguration; - destinationPort?: number; - readonly etag?: string; - readonly networkInterfaceTapConfigurations?: NetworkInterfaceTapConfiguration[]; - readonly provisioningState?: ProvisioningState; - readonly resourceGuid?: string; -} - -// @public -export interface VirtualNetworkTapListResult { - nextLink?: string; - value?: VirtualNetworkTap[]; -} - -// @public -export interface VirtualNetworkTaps { - beginCreateOrUpdate(resourceGroupName: string, tapName: string, parameters: VirtualNetworkTap, options?: VirtualNetworkTapsCreateOrUpdateOptionalParams): Promise, VirtualNetworkTapsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, tapName: string, parameters: VirtualNetworkTap, options?: VirtualNetworkTapsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, tapName: string, options?: VirtualNetworkTapsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, tapName: string, options?: VirtualNetworkTapsDeleteOptionalParams): Promise; - get(resourceGroupName: string, tapName: string, options?: VirtualNetworkTapsGetOptionalParams): Promise; - listAll(options?: VirtualNetworkTapsListAllOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: VirtualNetworkTapsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, tapName: string, tapParameters: TagsObject, options?: VirtualNetworkTapsUpdateTagsOptionalParams): Promise; -} - -// @public -export interface VirtualNetworkTapsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworkTapsCreateOrUpdateResponse = VirtualNetworkTap; - -// @public -export interface VirtualNetworkTapsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualNetworkTapsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkTapsGetResponse = VirtualNetworkTap; - -// @public -export interface VirtualNetworkTapsListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkTapsListAllNextResponse = VirtualNetworkTapListResult; - -// @public -export interface VirtualNetworkTapsListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkTapsListAllResponse = VirtualNetworkTapListResult; - -// @public -export interface VirtualNetworkTapsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkTapsListByResourceGroupNextResponse = VirtualNetworkTapListResult; - -// @public -export interface VirtualNetworkTapsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkTapsListByResourceGroupResponse = VirtualNetworkTapListResult; - -// @public -export interface VirtualNetworkTapsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworkTapsUpdateTagsResponse = VirtualNetworkTap; - -// @public -export interface VirtualNetworkUsage { - readonly currentValue?: number; - readonly id?: string; - readonly limit?: number; - readonly name?: VirtualNetworkUsageName; - readonly unit?: string; -} - -// @public -export interface VirtualNetworkUsageName { - readonly localizedValue?: string; - readonly value?: string; -} - -// @public -export interface VirtualRouter extends Resource { - readonly etag?: string; - hostedGateway?: SubResource; - hostedSubnet?: SubResource; - readonly peerings?: SubResource[]; - readonly provisioningState?: ProvisioningState; - virtualRouterAsn?: number; - virtualRouterIps?: string[]; -} - -// @public -export interface VirtualRouterAutoScaleConfiguration { - minCapacity?: number; -} - -// @public -export interface VirtualRouterListResult { - nextLink?: string; - value?: VirtualRouter[]; -} - -// @public -export interface VirtualRouterPeering extends SubResource { - readonly etag?: string; - name?: string; - peerAsn?: number; - peerIp?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface VirtualRouterPeeringListResult { - nextLink?: string; - value?: VirtualRouterPeering[]; -} - -// @public -export interface VirtualRouterPeerings { - beginCreateOrUpdate(resourceGroupName: string, virtualRouterName: string, peeringName: string, parameters: VirtualRouterPeering, options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams): Promise, VirtualRouterPeeringsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualRouterName: string, peeringName: string, parameters: VirtualRouterPeering, options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualRouterName: string, peeringName: string, options?: VirtualRouterPeeringsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualRouterName: string, peeringName: string, options?: VirtualRouterPeeringsDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualRouterName: string, peeringName: string, options?: VirtualRouterPeeringsGetOptionalParams): Promise; - list(resourceGroupName: string, virtualRouterName: string, options?: VirtualRouterPeeringsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualRouterPeeringsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualRouterPeeringsCreateOrUpdateResponse = VirtualRouterPeering; - -// @public -export interface VirtualRouterPeeringsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualRouterPeeringsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualRouterPeeringsGetResponse = VirtualRouterPeering; - -// @public -export interface VirtualRouterPeeringsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualRouterPeeringsListNextResponse = VirtualRouterPeeringListResult; - -// @public -export interface VirtualRouterPeeringsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualRouterPeeringsListResponse = VirtualRouterPeeringListResult; - -// @public -export interface VirtualRouters { - beginCreateOrUpdate(resourceGroupName: string, virtualRouterName: string, parameters: VirtualRouter, options?: VirtualRoutersCreateOrUpdateOptionalParams): Promise, VirtualRoutersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualRouterName: string, parameters: VirtualRouter, options?: VirtualRoutersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualRouterName: string, options?: VirtualRoutersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualRouterName: string, options?: VirtualRoutersDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualRouterName: string, options?: VirtualRoutersGetOptionalParams): Promise; - list(options?: VirtualRoutersListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: VirtualRoutersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualRoutersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualRoutersCreateOrUpdateResponse = VirtualRouter; - -// @public -export interface VirtualRoutersDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualRoutersGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type VirtualRoutersGetResponse = VirtualRouter; - -// @public -export interface VirtualRoutersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualRoutersListByResourceGroupNextResponse = VirtualRouterListResult; - -// @public -export interface VirtualRoutersListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualRoutersListByResourceGroupResponse = VirtualRouterListResult; - -// @public -export interface VirtualRoutersListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualRoutersListNextResponse = VirtualRouterListResult; - -// @public -export interface VirtualRoutersListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualRoutersListResponse = VirtualRouterListResult; - -// @public -export interface VirtualWAN extends Resource { - allowBranchToBranchTraffic?: boolean; - allowVnetToVnetTraffic?: boolean; - disableVpnEncryption?: boolean; - readonly etag?: string; - readonly office365LocalBreakoutCategory?: OfficeTrafficCategory; - readonly provisioningState?: ProvisioningState; - typePropertiesType?: string; - readonly virtualHubs?: SubResource[]; - readonly vpnSites?: SubResource[]; -} - -// @public -export interface VirtualWans { - beginCreateOrUpdate(resourceGroupName: string, virtualWANName: string, wANParameters: VirtualWAN, options?: VirtualWansCreateOrUpdateOptionalParams): Promise, VirtualWansCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualWANName: string, wANParameters: VirtualWAN, options?: VirtualWansCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualWANName: string, options?: VirtualWansDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualWANName: string, options?: VirtualWansDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualWANName: string, options?: VirtualWansGetOptionalParams): Promise; - list(options?: VirtualWansListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: VirtualWansListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, virtualWANName: string, wANParameters: TagsObject, options?: VirtualWansUpdateTagsOptionalParams): Promise; -} - -// @public -export interface VirtualWansCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualWansCreateOrUpdateResponse = VirtualWAN; - -// @public -export interface VirtualWansDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VirtualWanSecurityProvider { - name?: string; - readonly type?: VirtualWanSecurityProviderType; - url?: string; -} - -// @public -export interface VirtualWanSecurityProviders { - supportedProviders?: VirtualWanSecurityProvider[]; -} - -// @public -export type VirtualWanSecurityProviderType = string; - -// @public -export interface VirtualWansGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualWansGetResponse = VirtualWAN; - -// @public -export interface VirtualWansListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualWansListByResourceGroupNextResponse = ListVirtualWANsResult; - -// @public -export interface VirtualWansListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualWansListByResourceGroupResponse = ListVirtualWANsResult; - -// @public -export interface VirtualWansListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualWansListNextResponse = ListVirtualWANsResult; - -// @public -export interface VirtualWansListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualWansListResponse = ListVirtualWANsResult; - -// @public -export interface VirtualWansUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualWansUpdateTagsResponse = VirtualWAN; - -// @public -export interface VirtualWanVpnProfileParameters { - authenticationMethod?: AuthenticationMethod; - vpnServerConfigurationResourceId?: string; -} - -// @public -export interface Vm extends Resource { -} - -// @public -export type VnetLocalRouteOverrideCriteria = string; - -// @public -export interface VnetRoute { - readonly bgpConnections?: SubResource[]; - staticRoutes?: StaticRoute[]; - staticRoutesConfig?: StaticRoutesConfig; -} - -// @public -export interface VngClientConnectionConfiguration extends SubResource { - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - virtualNetworkGatewayPolicyGroups?: SubResource[]; - vpnClientAddressPool?: AddressSpace; -} - -// @public -export type VpnAuthenticationType = string; - -// @public -export interface VpnClientConfiguration { - aadAudience?: string; - aadIssuer?: string; - aadTenant?: string; - radiusServerAddress?: string; - radiusServers?: RadiusServer[]; - radiusServerSecret?: string; - vngClientConnectionConfigurations?: VngClientConnectionConfiguration[]; - vpnAuthenticationTypes?: VpnAuthenticationType[]; - vpnClientAddressPool?: AddressSpace; - vpnClientIpsecPolicies?: IpsecPolicy[]; - vpnClientProtocols?: VpnClientProtocol[]; - vpnClientRevokedCertificates?: VpnClientRevokedCertificate[]; - vpnClientRootCertificates?: VpnClientRootCertificate[]; -} - -// @public -export interface VpnClientConnectionHealth { - allocatedIpAddresses?: string[]; - readonly totalEgressBytesTransferred?: number; - readonly totalIngressBytesTransferred?: number; - vpnClientConnectionsCount?: number; -} - -// @public -export interface VpnClientConnectionHealthDetail { - readonly egressBytesTransferred?: number; - readonly egressPacketsTransferred?: number; - readonly ingressBytesTransferred?: number; - readonly ingressPacketsTransferred?: number; - readonly maxBandwidth?: number; - readonly maxPacketsPerSecond?: number; - readonly privateIpAddress?: string; - readonly publicIpAddress?: string; - readonly vpnConnectionDuration?: number; - readonly vpnConnectionId?: string; - readonly vpnConnectionTime?: string; - readonly vpnUserName?: string; -} - -// @public -export interface VpnClientConnectionHealthDetailListResult { - value?: VpnClientConnectionHealthDetail[]; -} - -// @public -export interface VpnClientIPsecParameters { - dhGroup: DhGroup; - ikeEncryption: IkeEncryption; - ikeIntegrity: IkeIntegrity; - ipsecEncryption: IpsecEncryption; - ipsecIntegrity: IpsecIntegrity; - pfsGroup: PfsGroup; - saDataSizeKilobytes: number; - saLifeTimeSeconds: number; -} - -// @public -export interface VpnClientParameters { - authenticationMethod?: AuthenticationMethod; - clientRootCertificates?: string[]; - processorArchitecture?: ProcessorArchitecture; - radiusServerAuthCertificate?: string; -} - -// @public -export type VpnClientProtocol = string; - -// @public -export interface VpnClientRevokedCertificate extends SubResource { - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - thumbprint?: string; -} - -// @public -export interface VpnClientRootCertificate extends SubResource { - readonly etag?: string; - name?: string; - readonly provisioningState?: ProvisioningState; - publicCertData: string; -} - -// @public -export interface VpnConnection extends SubResource { - connectionBandwidth?: number; - readonly connectionStatus?: VpnConnectionStatus; - dpdTimeoutSeconds?: number; - readonly egressBytesTransferred?: number; - enableBgp?: boolean; - enableInternetSecurity?: boolean; - enableRateLimiting?: boolean; - readonly etag?: string; - readonly ingressBytesTransferred?: number; - ipsecPolicies?: IpsecPolicy[]; - name?: string; - readonly provisioningState?: ProvisioningState; - remoteVpnSite?: SubResource; - routingConfiguration?: RoutingConfiguration; - routingWeight?: number; - sharedKey?: string; - trafficSelectorPolicies?: TrafficSelectorPolicy[]; - useLocalAzureIpAddress?: boolean; - usePolicyBasedTrafficSelectors?: boolean; - vpnConnectionProtocolType?: VirtualNetworkGatewayConnectionProtocol; - vpnLinkConnections?: VpnSiteLinkConnection[]; -} - -// @public -export interface VpnConnectionPacketCaptureStartParameters { - filterData?: string; - linkConnectionNames?: string[]; -} - -// @public -export interface VpnConnectionPacketCaptureStopParameters { - linkConnectionNames?: string[]; - sasUrl?: string; -} - -// @public -export interface VpnConnections { - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: VpnConnection, options?: VpnConnectionsCreateOrUpdateOptionalParams): Promise, VpnConnectionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: VpnConnection, options?: VpnConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, gatewayName: string, connectionName: string, options?: VpnConnectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, gatewayName: string, connectionName: string, options?: VpnConnectionsDeleteOptionalParams): Promise; - beginStartPacketCapture(resourceGroupName: string, gatewayName: string, vpnConnectionName: string, options?: VpnConnectionsStartPacketCaptureOptionalParams): Promise, VpnConnectionsStartPacketCaptureResponse>>; - beginStartPacketCaptureAndWait(resourceGroupName: string, gatewayName: string, vpnConnectionName: string, options?: VpnConnectionsStartPacketCaptureOptionalParams): Promise; - beginStopPacketCapture(resourceGroupName: string, gatewayName: string, vpnConnectionName: string, options?: VpnConnectionsStopPacketCaptureOptionalParams): Promise, VpnConnectionsStopPacketCaptureResponse>>; - beginStopPacketCaptureAndWait(resourceGroupName: string, gatewayName: string, vpnConnectionName: string, options?: VpnConnectionsStopPacketCaptureOptionalParams): Promise; - get(resourceGroupName: string, gatewayName: string, connectionName: string, options?: VpnConnectionsGetOptionalParams): Promise; - listByVpnGateway(resourceGroupName: string, gatewayName: string, options?: VpnConnectionsListByVpnGatewayOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VpnConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnConnectionsCreateOrUpdateResponse = VpnConnection; - -// @public -export interface VpnConnectionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VpnConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnConnectionsGetResponse = VpnConnection; - -// @public -export interface VpnConnectionsListByVpnGatewayNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnConnectionsListByVpnGatewayNextResponse = ListVpnConnectionsResult; - -// @public -export interface VpnConnectionsListByVpnGatewayOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnConnectionsListByVpnGatewayResponse = ListVpnConnectionsResult; - -// @public -export interface VpnConnectionsStartPacketCaptureOptionalParams extends coreClient.OperationOptions { - parameters?: VpnConnectionPacketCaptureStartParameters; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnConnectionsStartPacketCaptureResponse = { - body: string; -}; - -// @public -export interface VpnConnectionsStopPacketCaptureOptionalParams extends coreClient.OperationOptions { - parameters?: VpnConnectionPacketCaptureStopParameters; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnConnectionsStopPacketCaptureResponse = { - body: string; -}; - -// @public -export type VpnConnectionStatus = string; - -// @public -export interface VpnDeviceScriptParameters { - deviceFamily?: string; - firmwareVersion?: string; - vendor?: string; -} - -// @public -export interface VpnGateway extends Resource { - bgpSettings?: BgpSettings; - connections?: VpnConnection[]; - enableBgpRouteTranslationForNat?: boolean; - readonly etag?: string; - readonly ipConfigurations?: VpnGatewayIpConfiguration[]; - isRoutingPreferenceInternet?: boolean; - natRules?: VpnGatewayNatRule[]; - readonly provisioningState?: ProvisioningState; - virtualHub?: SubResource; - vpnGatewayScaleUnit?: number; -} - -// @public -export type VpnGatewayGeneration = string; - -// @public -export interface VpnGatewayIpConfiguration { - id?: string; - privateIpAddress?: string; - publicIpAddress?: string; -} - -// @public -export interface VpnGatewayNatRule extends SubResource { - readonly egressVpnSiteLinkConnections?: SubResource[]; - readonly etag?: string; - externalMappings?: VpnNatRuleMapping[]; - readonly ingressVpnSiteLinkConnections?: SubResource[]; - internalMappings?: VpnNatRuleMapping[]; - ipConfigurationId?: string; - mode?: VpnNatRuleMode; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; - typePropertiesType?: VpnNatRuleType; -} - -// @public -export interface VpnGatewayPacketCaptureStartParameters { - filterData?: string; -} - -// @public -export interface VpnGatewayPacketCaptureStopParameters { - sasUrl?: string; -} - -// @public -export interface VpnGateways { - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: VpnGateway, options?: VpnGatewaysCreateOrUpdateOptionalParams): Promise, VpnGatewaysCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: VpnGateway, options?: VpnGatewaysCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, gatewayName: string, options?: VpnGatewaysDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, gatewayName: string, options?: VpnGatewaysDeleteOptionalParams): Promise; - beginReset(resourceGroupName: string, gatewayName: string, options?: VpnGatewaysResetOptionalParams): Promise, VpnGatewaysResetResponse>>; - beginResetAndWait(resourceGroupName: string, gatewayName: string, options?: VpnGatewaysResetOptionalParams): Promise; - beginStartPacketCapture(resourceGroupName: string, gatewayName: string, options?: VpnGatewaysStartPacketCaptureOptionalParams): Promise, VpnGatewaysStartPacketCaptureResponse>>; - beginStartPacketCaptureAndWait(resourceGroupName: string, gatewayName: string, options?: VpnGatewaysStartPacketCaptureOptionalParams): Promise; - beginStopPacketCapture(resourceGroupName: string, gatewayName: string, options?: VpnGatewaysStopPacketCaptureOptionalParams): Promise, VpnGatewaysStopPacketCaptureResponse>>; - beginStopPacketCaptureAndWait(resourceGroupName: string, gatewayName: string, options?: VpnGatewaysStopPacketCaptureOptionalParams): Promise; - beginUpdateTags(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: TagsObject, options?: VpnGatewaysUpdateTagsOptionalParams): Promise, VpnGatewaysUpdateTagsResponse>>; - beginUpdateTagsAndWait(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: TagsObject, options?: VpnGatewaysUpdateTagsOptionalParams): Promise; - get(resourceGroupName: string, gatewayName: string, options?: VpnGatewaysGetOptionalParams): Promise; - list(options?: VpnGatewaysListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: VpnGatewaysListByResourceGroupOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VpnGatewaysCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnGatewaysCreateOrUpdateResponse = VpnGateway; - -// @public -export interface VpnGatewaysDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VpnGatewaysGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnGatewaysGetResponse = VpnGateway; - -// @public -export interface VpnGatewaysListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnGatewaysListByResourceGroupNextResponse = ListVpnGatewaysResult; - -// @public -export interface VpnGatewaysListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnGatewaysListByResourceGroupResponse = ListVpnGatewaysResult; - -// @public -export interface VpnGatewaysListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnGatewaysListNextResponse = ListVpnGatewaysResult; - -// @public -export interface VpnGatewaysListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnGatewaysListResponse = ListVpnGatewaysResult; - -// @public -export interface VpnGatewaysResetOptionalParams extends coreClient.OperationOptions { - ipConfigurationId?: string; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnGatewaysResetResponse = VpnGateway; - -// @public -export interface VpnGatewaysStartPacketCaptureOptionalParams extends coreClient.OperationOptions { - parameters?: VpnGatewayPacketCaptureStartParameters; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnGatewaysStartPacketCaptureResponse = { - body: string; -}; - -// @public -export interface VpnGatewaysStopPacketCaptureOptionalParams extends coreClient.OperationOptions { - parameters?: VpnGatewayPacketCaptureStopParameters; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnGatewaysStopPacketCaptureResponse = { - body: string; -}; - -// @public -export interface VpnGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnGatewaysUpdateTagsResponse = VpnGateway; - -// @public -export type VpnGatewayTunnelingProtocol = string; - -// @public -export interface VpnLinkBgpSettings { - asn?: number; - bgpPeeringAddress?: string; -} - -// @public -export type VpnLinkConnectionMode = string; - -// @public -export interface VpnLinkConnections { - beginGetIkeSas(resourceGroupName: string, gatewayName: string, connectionName: string, linkConnectionName: string, options?: VpnLinkConnectionsGetIkeSasOptionalParams): Promise, VpnLinkConnectionsGetIkeSasResponse>>; - beginGetIkeSasAndWait(resourceGroupName: string, gatewayName: string, connectionName: string, linkConnectionName: string, options?: VpnLinkConnectionsGetIkeSasOptionalParams): Promise; - beginResetConnection(resourceGroupName: string, gatewayName: string, connectionName: string, linkConnectionName: string, options?: VpnLinkConnectionsResetConnectionOptionalParams): Promise, void>>; - beginResetConnectionAndWait(resourceGroupName: string, gatewayName: string, connectionName: string, linkConnectionName: string, options?: VpnLinkConnectionsResetConnectionOptionalParams): Promise; - beginSetOrInitDefaultSharedKey(resourceGroupName: string, gatewayName: string, connectionName: string, linkConnectionName: string, connectionSharedKeyParameters: ConnectionSharedKeyResult, options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams): Promise, VpnLinkConnectionsSetOrInitDefaultSharedKeyResponse>>; - beginSetOrInitDefaultSharedKeyAndWait(resourceGroupName: string, gatewayName: string, connectionName: string, linkConnectionName: string, connectionSharedKeyParameters: ConnectionSharedKeyResult, options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams): Promise; - getDefaultSharedKey(resourceGroupName: string, gatewayName: string, connectionName: string, linkConnectionName: string, options?: VpnLinkConnectionsGetDefaultSharedKeyOptionalParams): Promise; - listAllSharedKeys(resourceGroupName: string, gatewayName: string, connectionName: string, linkConnectionName: string, options?: VpnLinkConnectionsGetAllSharedKeysOptionalParams): PagedAsyncIterableIterator; - listByVpnConnection(resourceGroupName: string, gatewayName: string, connectionName: string, options?: VpnLinkConnectionsListByVpnConnectionOptionalParams): PagedAsyncIterableIterator; - listDefaultSharedKey(resourceGroupName: string, gatewayName: string, connectionName: string, linkConnectionName: string, options?: VpnLinkConnectionsListDefaultSharedKeyOptionalParams): Promise; -} - -// @public -export interface VpnLinkConnectionsGetAllSharedKeysNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnLinkConnectionsGetAllSharedKeysNextResponse = ConnectionSharedKeyResultList; - -// @public -export interface VpnLinkConnectionsGetAllSharedKeysOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnLinkConnectionsGetAllSharedKeysResponse = ConnectionSharedKeyResultList; - -// @public -export interface VpnLinkConnectionsGetDefaultSharedKeyOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnLinkConnectionsGetDefaultSharedKeyResponse = ConnectionSharedKeyResult; - -// @public -export interface VpnLinkConnectionsGetIkeSasOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnLinkConnectionsGetIkeSasResponse = { - body: string; -}; - -// @public -export interface VpnLinkConnectionsListByVpnConnectionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnLinkConnectionsListByVpnConnectionNextResponse = ListVpnSiteLinkConnectionsResult; - -// @public -export interface VpnLinkConnectionsListByVpnConnectionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnLinkConnectionsListByVpnConnectionResponse = ListVpnSiteLinkConnectionsResult; - -// @public -export interface VpnLinkConnectionsListDefaultSharedKeyOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnLinkConnectionsListDefaultSharedKeyResponse = ConnectionSharedKeyResult; - -// @public -export interface VpnLinkConnectionsResetConnectionOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnLinkConnectionsSetOrInitDefaultSharedKeyResponse = ConnectionSharedKeyResult; - -// @public -export interface VpnLinkProviderProperties { - linkProviderName?: string; - linkSpeedInMbps?: number; -} - -// @public -export interface VpnNatRuleMapping { - addressSpace?: string; - portRange?: string; -} - -// @public -export type VpnNatRuleMode = string; - -// @public -export type VpnNatRuleType = string; - -// @public -export interface VpnPacketCaptureStartParameters { - filterData?: string; -} - -// @public -export interface VpnPacketCaptureStopParameters { - sasUrl?: string; -} - -// @public -export type VpnPolicyMemberAttributeType = string; - -// @public -export interface VpnProfileResponse { - profileUrl?: string; -} - -// @public -export interface VpnServerConfigRadiusClientRootCertificate { - name?: string; - thumbprint?: string; -} - -// @public -export interface VpnServerConfigRadiusServerRootCertificate { - name?: string; - publicCertData?: string; -} - -// @public -export interface VpnServerConfiguration extends Resource { - aadAuthenticationParameters?: AadAuthenticationParameters; - configurationPolicyGroups?: VpnServerConfigurationPolicyGroup[]; - readonly etag?: string; - readonly etagPropertiesEtag?: string; - namePropertiesName?: string; - readonly p2SVpnGateways?: P2SVpnGateway[]; - readonly provisioningState?: string; - radiusClientRootCertificates?: VpnServerConfigRadiusClientRootCertificate[]; - radiusServerAddress?: string; - radiusServerRootCertificates?: VpnServerConfigRadiusServerRootCertificate[]; - radiusServers?: RadiusServer[]; - radiusServerSecret?: string; - vpnAuthenticationTypes?: VpnAuthenticationType[]; - vpnClientIpsecPolicies?: IpsecPolicy[]; - vpnClientRevokedCertificates?: VpnServerConfigVpnClientRevokedCertificate[]; - vpnClientRootCertificates?: VpnServerConfigVpnClientRootCertificate[]; - vpnProtocols?: VpnGatewayTunnelingProtocol[]; -} - -// @public -export interface VpnServerConfigurationPolicyGroup extends SubResource { - readonly etag?: string; - isDefault?: boolean; - name?: string; - readonly p2SConnectionConfigurations?: SubResource[]; - policyMembers?: VpnServerConfigurationPolicyGroupMember[]; - priority?: number; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @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>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, vpnServerConfigurationName: string, vpnServerConfigurationParameters: VpnServerConfiguration, options?: VpnServerConfigurationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vpnServerConfigurationName: string, options?: VpnServerConfigurationsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, vpnServerConfigurationName: string, options?: VpnServerConfigurationsDeleteOptionalParams): Promise; - get(resourceGroupName: string, vpnServerConfigurationName: string, options?: VpnServerConfigurationsGetOptionalParams): Promise; - list(options?: VpnServerConfigurationsListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: VpnServerConfigurationsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listRadiusSecrets(resourceGroupName: string, vpnServerConfigurationName: string, options?: VpnServerConfigurationsListRadiusSecretsOptionalParams): Promise; - updateTags(resourceGroupName: string, vpnServerConfigurationName: string, vpnServerConfigurationParameters: TagsObject, options?: VpnServerConfigurationsUpdateTagsOptionalParams): Promise; -} - -// @public -export interface VpnServerConfigurationsAssociatedWithVirtualWan { - beginList(resourceGroupName: string, virtualWANName: string, options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams): Promise, VpnServerConfigurationsAssociatedWithVirtualWanListResponse>>; - beginListAndWait(resourceGroupName: string, virtualWANName: string, options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams): Promise; -} - -// @public -export interface VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnServerConfigurationsAssociatedWithVirtualWanListResponse = VpnServerConfigurationsResponse; - -// @public -export interface VpnServerConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnServerConfigurationsCreateOrUpdateResponse = VpnServerConfiguration; - -// @public -export interface VpnServerConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VpnServerConfigurationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnServerConfigurationsGetResponse = VpnServerConfiguration; - -// @public -export interface VpnServerConfigurationsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnServerConfigurationsListByResourceGroupNextResponse = ListVpnServerConfigurationsResult; - -// @public -export interface VpnServerConfigurationsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnServerConfigurationsListByResourceGroupResponse = ListVpnServerConfigurationsResult; - -// @public -export interface VpnServerConfigurationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnServerConfigurationsListNextResponse = ListVpnServerConfigurationsResult; - -// @public -export interface VpnServerConfigurationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface VpnServerConfigurationsListRadiusSecretsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnServerConfigurationsListRadiusSecretsResponse = RadiusAuthServerListResult; - -// @public -export type VpnServerConfigurationsListResponse = ListVpnServerConfigurationsResult; - -// @public -export interface VpnServerConfigurationsResponse { - vpnServerConfigurationResourceIds?: string[]; -} - -// @public -export interface VpnServerConfigurationsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnServerConfigurationsUpdateTagsResponse = VpnServerConfiguration; - -// @public -export interface VpnServerConfigVpnClientRevokedCertificate { - name?: string; - thumbprint?: string; -} - -// @public -export interface VpnServerConfigVpnClientRootCertificate { - name?: string; - publicCertData?: string; -} - -// @public -export interface VpnSite extends Resource { - addressSpace?: AddressSpace; - bgpProperties?: BgpSettings; - deviceProperties?: DeviceProperties; - readonly etag?: string; - ipAddress?: string; - isSecuritySite?: boolean; - o365Policy?: O365PolicyProperties; - readonly provisioningState?: ProvisioningState; - siteKey?: string; - virtualWan?: SubResource; - vpnSiteLinks?: VpnSiteLink[]; -} - -// @public -export interface VpnSiteId { - readonly vpnSite?: string; -} - -// @public -export interface VpnSiteLink extends SubResource { - bgpProperties?: VpnLinkBgpSettings; - readonly etag?: string; - fqdn?: string; - ipAddress?: string; - linkProperties?: VpnLinkProviderProperties; - name?: string; - readonly provisioningState?: ProvisioningState; - readonly type?: string; -} - -// @public -export interface VpnSiteLinkConnection extends SubResource { - connectionBandwidth?: number; - readonly connectionStatus?: VpnConnectionStatus; - dpdTimeoutSeconds?: number; - readonly egressBytesTransferred?: number; - egressNatRules?: SubResource[]; - enableBgp?: boolean; - enableRateLimiting?: boolean; - readonly etag?: string; - readonly ingressBytesTransferred?: number; - ingressNatRules?: SubResource[]; - ipsecPolicies?: IpsecPolicy[]; - name?: string; - readonly provisioningState?: ProvisioningState; - routingWeight?: number; - sharedKey?: string; - readonly type?: string; - useLocalAzureIpAddress?: boolean; - usePolicyBasedTrafficSelectors?: boolean; - vpnConnectionProtocolType?: VirtualNetworkGatewayConnectionProtocol; - vpnGatewayCustomBgpAddresses?: GatewayCustomBgpIpAddressIpConfiguration[]; - vpnLinkConnectionMode?: VpnLinkConnectionMode; - vpnSiteLink?: SubResource; -} - -// @public -export interface VpnSiteLinkConnections { - get(resourceGroupName: string, gatewayName: string, connectionName: string, linkConnectionName: string, options?: VpnSiteLinkConnectionsGetOptionalParams): Promise; -} - -// @public -export interface VpnSiteLinkConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnSiteLinkConnectionsGetResponse = VpnSiteLinkConnection; - -// @public -export interface VpnSiteLinks { - get(resourceGroupName: string, vpnSiteName: string, vpnSiteLinkName: string, options?: VpnSiteLinksGetOptionalParams): Promise; - listByVpnSite(resourceGroupName: string, vpnSiteName: string, options?: VpnSiteLinksListByVpnSiteOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VpnSiteLinksGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnSiteLinksGetResponse = VpnSiteLink; - -// @public -export interface VpnSiteLinksListByVpnSiteNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnSiteLinksListByVpnSiteNextResponse = ListVpnSiteLinksResult; - -// @public -export interface VpnSiteLinksListByVpnSiteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnSiteLinksListByVpnSiteResponse = ListVpnSiteLinksResult; - -// @public -export interface VpnSites { - beginCreateOrUpdate(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: VpnSite, options?: VpnSitesCreateOrUpdateOptionalParams): Promise, VpnSitesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: VpnSite, options?: VpnSitesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vpnSiteName: string, options?: VpnSitesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, vpnSiteName: string, options?: VpnSitesDeleteOptionalParams): Promise; - get(resourceGroupName: string, vpnSiteName: string, options?: VpnSitesGetOptionalParams): Promise; - list(options?: VpnSitesListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: VpnSitesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: TagsObject, options?: VpnSitesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface VpnSitesConfiguration { - beginDownload(resourceGroupName: string, virtualWANName: string, request: GetVpnSitesConfigurationRequest, options?: VpnSitesConfigurationDownloadOptionalParams): Promise, void>>; - beginDownloadAndWait(resourceGroupName: string, virtualWANName: string, request: GetVpnSitesConfigurationRequest, options?: VpnSitesConfigurationDownloadOptionalParams): Promise; -} - -// @public -export interface VpnSitesConfigurationDownloadOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VpnSitesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VpnSitesCreateOrUpdateResponse = VpnSite; - -// @public -export interface VpnSitesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface VpnSitesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnSitesGetResponse = VpnSite; - -// @public -export interface VpnSitesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnSitesListByResourceGroupNextResponse = ListVpnSitesResult; - -// @public -export interface VpnSitesListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnSitesListByResourceGroupResponse = ListVpnSitesResult; - -// @public -export interface VpnSitesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnSitesListNextResponse = ListVpnSitesResult; - -// @public -export interface VpnSitesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnSitesListResponse = ListVpnSitesResult; - -// @public -export interface VpnSitesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VpnSitesUpdateTagsResponse = VpnSite; - -// @public -export type VpnType = string; - -// @public -export type WebApplicationFirewallAction = string; - -// @public -export interface WebApplicationFirewallCustomRule { - action: WebApplicationFirewallAction; - readonly etag?: string; - groupByUserSession?: GroupByUserSession[]; - matchConditions: MatchCondition[]; - name?: string; - priority: number; - rateLimitDuration?: ApplicationGatewayFirewallRateLimitDuration; - rateLimitThreshold?: number; - ruleType: WebApplicationFirewallRuleType; - state?: WebApplicationFirewallState; -} - -// @public -export type WebApplicationFirewallEnabledState = string; - -// @public -export type WebApplicationFirewallMatchVariable = string; - -// @public -export type WebApplicationFirewallMode = string; - -// @public -export type WebApplicationFirewallOperator = string; - -// @public -export interface WebApplicationFirewallPolicies { - beginDelete(resourceGroupName: string, policyName: string, options?: WebApplicationFirewallPoliciesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, policyName: string, options?: WebApplicationFirewallPoliciesDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, policyName: string, parameters: WebApplicationFirewallPolicy, options?: WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, policyName: string, options?: WebApplicationFirewallPoliciesGetOptionalParams): Promise; - list(resourceGroupName: string, options?: WebApplicationFirewallPoliciesListOptionalParams): PagedAsyncIterableIterator; - listAll(options?: WebApplicationFirewallPoliciesListAllOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WebApplicationFirewallPoliciesCreateOrUpdateResponse = WebApplicationFirewallPolicy; - -// @public -export interface WebApplicationFirewallPoliciesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface WebApplicationFirewallPoliciesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WebApplicationFirewallPoliciesGetResponse = WebApplicationFirewallPolicy; - -// @public -export interface WebApplicationFirewallPoliciesListAllNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WebApplicationFirewallPoliciesListAllNextResponse = WebApplicationFirewallPolicyListResult; - -// @public -export interface WebApplicationFirewallPoliciesListAllOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WebApplicationFirewallPoliciesListAllResponse = WebApplicationFirewallPolicyListResult; - -// @public -export interface WebApplicationFirewallPoliciesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WebApplicationFirewallPoliciesListNextResponse = WebApplicationFirewallPolicyListResult; - -// @public -export interface WebApplicationFirewallPoliciesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WebApplicationFirewallPoliciesListResponse = WebApplicationFirewallPolicyListResult; - -// @public -export interface WebApplicationFirewallPolicy extends Resource { - readonly applicationGatewayForContainers?: ApplicationGatewayForContainersReferenceDefinition[]; - readonly applicationGateways?: ApplicationGateway[]; - customRules?: WebApplicationFirewallCustomRule[]; - readonly etag?: string; - readonly httpListeners?: SubResource[]; - managedRules?: ManagedRulesDefinition; - readonly pathBasedRules?: SubResource[]; - policySettings?: PolicySettings; - readonly provisioningState?: ProvisioningState; - readonly resourceState?: WebApplicationFirewallPolicyResourceState; -} - -// @public -export interface WebApplicationFirewallPolicyListResult { - readonly nextLink?: string; - readonly value?: WebApplicationFirewallPolicy[]; -} - -// @public -export type WebApplicationFirewallPolicyResourceState = string; - -// @public -export type WebApplicationFirewallRuleType = string; - -// @public -export interface WebApplicationFirewallScrubbingRules { - matchVariable: ScrubbingRuleEntryMatchVariable; - selector?: string; - selectorMatchOperator: ScrubbingRuleEntryMatchOperator; - state?: ScrubbingRuleEntryState; -} - -// @public -export type WebApplicationFirewallScrubbingState = string; - -// @public -export type WebApplicationFirewallState = string; - -// @public -export type WebApplicationFirewallTransform = string; - -// @public -export interface WebCategories { - get(name: string, options?: WebCategoriesGetOptionalParams): Promise; - listBySubscription(options?: WebCategoriesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface WebCategoriesGetOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type WebCategoriesGetResponse = AzureWebCategory; - -// @public -export interface WebCategoriesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WebCategoriesListBySubscriptionNextResponse = AzureWebCategoryListResult; - -// @public -export interface WebCategoriesListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WebCategoriesListBySubscriptionResponse = AzureWebCategoryListResult; - -// (No @packageDocumentation comment for this package) - -``` diff --git a/sdk/network/arm-network/samples-dev/adminRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/adminRuleCollectionsCreateOrUpdateSample.ts index 52278885d932..69d5ce8051cb 100644 --- a/sdk/network/arm-network/samples-dev/adminRuleCollectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRuleCollectionsCreateOrUpdateSample.ts @@ -1,45 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - AdminRuleCollection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates an admin rule collection. + * This sample demonstrates how to creates or updates an admin rule collection. * - * @summary Creates or updates an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionPut.json + * @summary creates or updates an admin rule collection. + * x-ms-original-file: 2025-07-01/NetworkManagerAdminRuleCollectionPut.json */ async function createOrUpdateAnAdminRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleCollection: AdminRuleCollection = { - description: "A sample policy", - appliesToGroups: [ - { - networkGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.adminRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + { + description: "A sample policy", + appliesToGroups: [ + { + networkGroupId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", + }, + ], + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/adminRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/adminRuleCollectionsDeleteSample.ts index ab71eefe3b9c..d38702d250cd 100644 --- a/sdk/network/arm-network/samples-dev/adminRuleCollectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRuleCollectionsDeleteSample.ts @@ -1,40 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - AdminRuleCollectionsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes an admin rule collection. + * This sample demonstrates how to deletes an admin rule collection. * - * @summary Deletes an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json + * @summary deletes an admin rule collection. + * x-ms-original-file: 2025-07-01/NetworkManagerAdminRuleCollectionDelete.json */ async function deletesAnAdminRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const force = false; - const options: AdminRuleCollectionsDeleteOptionalParams = { force }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, + await client.adminRuleCollections.delete( + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + { force: false }, ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/adminRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples-dev/adminRuleCollectionsGetSample.ts index ecafbc31956e..de8f11780048 100644 --- a/sdk/network/arm-network/samples-dev/adminRuleCollectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRuleCollectionsGetSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a network manager security admin configuration rule collection. + * This sample demonstrates how to gets a network manager security admin configuration rule collection. * - * @summary Gets a network manager security admin configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionGet.json + * @summary gets a network manager security admin configuration rule collection. + * x-ms-original-file: 2025-07-01/NetworkManagerAdminRuleCollectionGet.json */ async function getsSecurityAdminRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.adminRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/adminRuleCollectionsListSample.ts b/sdk/network/arm-network/samples-dev/adminRuleCollectionsListSample.ts index 049b14580be8..ebf54ac6c41d 100644 --- a/sdk/network/arm-network/samples-dev/adminRuleCollectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRuleCollectionsListSample.ts @@ -3,31 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the rule collections in a security admin configuration, in a paginated format. + * This sample demonstrates how to lists all the rule collections in a security admin configuration, in a paginated format. * - * @summary Lists all the rule collections in a security admin configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionList.json + * @summary lists all the rule collections in a security admin configuration, in a paginated format. + * x-ms-original-file: 2025-07-01/NetworkManagerAdminRuleCollectionList.json */ async function listSecurityAdminRuleCollections(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.adminRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/adminRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/adminRulesCreateOrUpdateSample.ts index e5b56031e4ed..18a8928171f7 100644 --- a/sdk/network/arm-network/samples-dev/adminRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRulesCreateOrUpdateSample.ts @@ -1,100 +1,82 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { AdminRule} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates an admin rule. + * This sample demonstrates how to creates or updates an admin rule. * - * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json + * @summary creates or updates an admin rule. + * x-ms-original-file: 2025-07-01/NetworkManagerAdminRulePut.json */ -async function createAAdminRuleWithNetworkGroupAsSourceOrDestination(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const adminRule: AdminRule = { - description: "This is Sample Admin Rule", - access: "Deny", - destinationPortRanges: ["22"], - destinations: [ - { - addressPrefix: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1", - addressPrefixType: "NetworkGroup", - }, - ], - direction: "Inbound", - kind: "Custom", - priority: 1, - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], - protocol: "Tcp", - }; +async function createAnAdminRule(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.adminRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - adminRule, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + "SampleAdminRule", + { + kind: "Custom", + description: "This is Sample Admin Rule", + access: "Deny", + destinationPortRanges: ["22"], + destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], + direction: "Inbound", + priority: 1, + sourcePortRanges: ["0-65535"], + sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], + protocol: "Tcp", + }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates an admin rule. + * This sample demonstrates how to creates or updates an admin rule. * - * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRulePut.json + * @summary creates or updates an admin rule. + * x-ms-original-file: 2025-07-01/NetworkManagerAdminRulePut_NetworkGroupSource.json */ -async function createAnAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const adminRule: AdminRule = { - description: "This is Sample Admin Rule", - access: "Deny", - destinationPortRanges: ["22"], - destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - direction: "Inbound", - kind: "Custom", - priority: 1, - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], - protocol: "Tcp", - }; +async function createAAdminRuleWithNetworkGroupAsSourceOrDestination(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.adminRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - adminRule, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + "SampleAdminRule", + { + kind: "Custom", + description: "This is Sample Admin Rule", + access: "Deny", + destinationPortRanges: ["22"], + destinations: [ + { + addressPrefix: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1", + addressPrefixType: "NetworkGroup", + }, + ], + direction: "Inbound", + priority: 1, + sourcePortRanges: ["0-65535"], + sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], + protocol: "Tcp", + }, ); console.log(result); } async function main(): Promise { - await createAAdminRuleWithNetworkGroupAsSourceOrDestination(); await createAnAdminRule(); + await createAAdminRuleWithNetworkGroupAsSourceOrDestination(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/adminRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/adminRulesDeleteSample.ts index 9223201a84c5..d973a91a32ec 100644 --- a/sdk/network/arm-network/samples-dev/adminRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRulesDeleteSample.ts @@ -1,42 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - AdminRulesDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes an admin rule. + * This sample demonstrates how to deletes an admin rule. * - * @summary Deletes an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleDelete.json + * @summary deletes an admin rule. + * x-ms-original-file: 2025-07-01/NetworkManagerAdminRuleDelete.json */ async function deletesAnAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const force = false; - const options: AdminRulesDeleteOptionalParams = { force }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, + await client.adminRules.delete( + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + "SampleAdminRule", + { force: false }, ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/adminRulesGetSample.ts b/sdk/network/arm-network/samples-dev/adminRulesGetSample.ts index 52bc2c2cbdec..556e294824fb 100644 --- a/sdk/network/arm-network/samples-dev/adminRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRulesGetSample.ts @@ -3,58 +3,43 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a network manager security configuration admin rule. + * This sample demonstrates how to gets a network manager security configuration admin rule. * - * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleGet.json + * @summary gets a network manager security configuration admin rule. + * x-ms-original-file: 2025-07-01/NetworkManagerAdminRuleGet.json */ async function getsSecurityAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.adminRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + "SampleAdminRule", ); console.log(result); } /** - * This sample demonstrates how to Gets a network manager security configuration admin rule. + * This sample demonstrates how to gets a network manager security configuration admin rule. * - * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDefaultAdminRuleGet.json + * @summary gets a network manager security configuration admin rule. + * x-ms-original-file: 2025-07-01/NetworkManagerDefaultAdminRuleGet.json */ async function getsSecurityDefaultAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleDefaultAdminRule"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.adminRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + "SampleDefaultAdminRule", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/adminRulesListSample.ts b/sdk/network/arm-network/samples-dev/adminRulesListSample.ts index 74ed363abd41..785238391dfc 100644 --- a/sdk/network/arm-network/samples-dev/adminRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRulesListSample.ts @@ -3,33 +3,27 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all network manager security configuration admin rules. + * This sample demonstrates how to list all network manager security configuration admin rules. * - * @summary List all network manager security configuration admin rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleList.json + * @summary list all network manager security configuration admin rules. + * x-ms-original-file: 2025-07-01/NetworkManagerAdminRuleList.json */ async function listSecurityAdminRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.adminRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts index ddc572dde1ef..a3192156fc09 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified private endpoint connection on application gateway. + * This sample demonstrates how to deletes the specified private endpoint connection on application gateway. * - * @summary Deletes the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json + * @summary deletes the specified private endpoint connection on application gateway. + * x-ms-original-file: 2025-07-01/ApplicationGatewayPrivateEndpointConnectionDelete.json */ async function deleteApplicationGatewayPrivateEndpointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGatewayPrivateEndpointConnections.beginDeleteAndWait( - resourceGroupName, - applicationGatewayName, - connectionName, - ); - console.log(result); + await client.applicationGatewayPrivateEndpointConnections.delete("rg1", "appgw", "connection1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsGetSample.ts index 24097da80e1b..c03922ba0007 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified private endpoint connection on application gateway. + * This sample demonstrates how to gets the specified private endpoint connection on application gateway. * - * @summary Gets the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + * @summary gets the specified private endpoint connection on application gateway. + * x-ms-original-file: 2025-07-01/ApplicationGatewayPrivateEndpointConnectionGet.json */ async function getApplicationGatewayPrivateEndpointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.applicationGatewayPrivateEndpointConnections.get( - resourceGroupName, - applicationGatewayName, - connectionName, + "rg1", + "appgw", + "connection1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsListSample.ts index fe550fa45c9f..b0e2fb108463 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsListSample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all private endpoint connections on an application gateway. + * This sample demonstrates how to lists all private endpoint connections on an application gateway. * - * @summary Lists all private endpoint connections on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json + * @summary lists all private endpoint connections on an application gateway. + * x-ms-original-file: 2025-07-01/ApplicationGatewayPrivateEndpointConnectionList.json */ async function listsAllPrivateEndpointConnectionsOnApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.applicationGatewayPrivateEndpointConnections.list( - resourceGroupName, - applicationGatewayName, + "rg1", + "appgw", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts index 44cc672f6dc5..1fabf8578076 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts @@ -1,44 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ApplicationGatewayPrivateEndpointConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates the specified private endpoint connection on application gateway. + * This sample demonstrates how to updates the specified private endpoint connection on application gateway. * - * @summary Updates the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json + * @summary updates the specified private endpoint connection on application gateway. + * x-ms-original-file: 2025-07-01/ApplicationGatewayPrivateEndpointConnectionUpdate.json */ async function updateApplicationGatewayPrivateEndpointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const parameters: ApplicationGatewayPrivateEndpointConnection = { - name: "connection1", - privateEndpoint: { - id: "/subscriptions/subId2/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe", - }, - privateLinkServiceConnectionState: { - description: "approved it for some reason.", - status: "Approved", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGatewayPrivateEndpointConnections.beginUpdateAndWait( - resourceGroupName, - applicationGatewayName, - connectionName, - parameters, - ); + const result = await client.applicationGatewayPrivateEndpointConnections.update( + "rg1", + "appgw", + "connection1", + { + privateLinkServiceConnectionState: { + description: "approved it for some reason.", + status: "Approved", + }, + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateLinkResourcesListSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateLinkResourcesListSample.ts index 6dcad2676ecc..d141a8a00927 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateLinkResourcesListSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateLinkResourcesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all private link resources on an application gateway. + * This sample demonstrates how to lists all private link resources on an application gateway. * - * @summary Lists all private link resources on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json + * @summary lists all private link resources on an application gateway. + * x-ms-original-file: 2025-07-01/ApplicationGatewayPrivateLinkResourceList.json */ async function listsAllPrivateLinkResourcesOnApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.applicationGatewayPrivateLinkResources.list( - resourceGroupName, - applicationGatewayName, - )) { + for await (const item of client.applicationGatewayPrivateLinkResources.list("rg1", "appgw")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsDefaultGetSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsDefaultGetSample.ts index d7f65301ff50..4b4dbfcdf365 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsDefaultGetSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsDefaultGetSample.ts @@ -3,26 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the regional application gateway waf manifest. + * This sample demonstrates how to gets the regional application gateway waf manifest. * - * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + * @summary gets the regional application gateway waf manifest. + * x-ms-original-file: 2025-07-01/GetApplicationGatewayWafDynamicManifestsDefault.json */ -async function getsWafDefaultManifest(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; +async function getsWAFDefaultManifest(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGatewayWafDynamicManifestsDefault.get(location); + const result = await client.applicationGatewayWafDynamicManifestsDefault.get("westus"); console.log(result); } async function main(): Promise { - await getsWafDefaultManifest(); + await getsWAFDefaultManifest(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsGetSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsGetSample.ts deleted file mode 100644 index a298a8fb8b49..000000000000 --- a/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsGetSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the regional application gateway waf manifest. - * - * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetApplicationGatewayWafDynamicManifests.json - */ -async function getsWafManifests(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayWafDynamicManifests.list( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getsWafManifests(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthOnDemandSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthOnDemandSample.ts index ae1b2cef3c5e..75c450ae7929 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthOnDemandSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthOnDemandSample.ts @@ -1,44 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ApplicationGatewayOnDemandProbe} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * This sample demonstrates how to gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. * - * @summary Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayBackendHealthTest.json + * @summary gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * x-ms-original-file: 2025-07-01/ApplicationGatewayBackendHealthTest.json */ async function testBackendHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const probeRequest: ApplicationGatewayOnDemandProbe = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.applicationGateways.backendHealthOnDemand("rg1", "appgw", { path: "/", backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendaddressPools/MFAnalyticsPool", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendaddressPools/MFAnalyticsPool", }, backendHttpSettings: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/MFPoolSettings", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/MFPoolSettings", }, pickHostNameFromBackendHttpSettings: true, timeout: 30, protocol: "Http", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.beginBackendHealthOnDemandAndWait( - resourceGroupName, - applicationGatewayName, - probeRequest, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthSample.ts index b595a0bb267a..8f8c5fbd10d8 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the backend health of the specified application gateway in a resource group. + * This sample demonstrates how to gets the backend health of the specified application gateway in a resource group. * - * @summary Gets the backend health of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayBackendHealthGet.json + * @summary gets the backend health of the specified application gateway in a resource group. + * x-ms-original-file: 2025-07-01/ApplicationGatewayBackendHealthGet.json */ async function getBackendHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "appgw"; - const applicationGatewayName = "appgw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginBackendHealthAndWait( - resourceGroupName, - applicationGatewayName, - ); + const result = await client.applicationGateways.backendHealth("appgw", "appgw"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysCreateOrUpdateSample.ts index 50864b79cdfc..cda1f6b95e48 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysCreateOrUpdateSample.ts @@ -1,40 +1,37 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ApplicationGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified application gateway. + * This sample demonstrates how to creates or updates the specified application gateway. * - * @summary Creates or updates the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayCreate.json + * @summary creates or updates the specified application gateway. + * x-ms-original-file: 2025-07-01/ApplicationGatewayCreate.json */ async function createApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const parameters: ApplicationGateway = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.applicationGateways.createOrUpdate("rg1", "appgw", { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": + {}, + }, + }, + location: "eastus", backendAddressPools: [ { name: "appgwpool", - backendAddresses: [ - { ipAddress: "10.0.1.1" }, - { ipAddress: "10.0.1.2" }, - ], + backendAddresses: [{ ipAddress: "10.0.1.1" }, { ipAddress: "10.0.1.2" }], }, { name: "appgwpool1", - backendAddresses: [ - { ipAddress: "10.0.0.1" }, - { ipAddress: "10.0.0.2" }, - ], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool1", + backendAddresses: [{ ipAddress: "10.0.0.1" }, { ipAddress: "10.0.0.2" }], }, ], backendHttpSettingsCollection: [ @@ -58,7 +55,7 @@ async function createApplicationGateway(): Promise { { name: "appgwfip", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/appgwpip", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/appgwpip", }, }, ], @@ -70,69 +67,58 @@ async function createApplicationGateway(): Promise { { name: "appgwipc", subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet/subnets/appgwsubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet/subnets/appgwsubnet", }, }, ], - globalConfiguration: { - enableRequestBuffering: true, - enableResponseBuffering: true, - }, + globalConfiguration: { enableRequestBuffering: true, enableResponseBuffering: true }, httpListeners: [ { name: "appgwhl", frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", }, frontendPort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp", }, requireServerNameIndication: false, sslCertificate: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslCertificates/sslcert", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslCertificates/sslcert", }, sslProfile: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslProfiles/sslProfile1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslProfiles/sslProfile1", }, protocol: "Https", }, { name: "appgwhttplistener", frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", }, frontendPort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp80", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp80", }, protocol: "Http", }, ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "eastus", requestRoutingRules: [ { name: "appgwrule", backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool", }, backendHttpSettings: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs", }, entraJWTValidationConfig: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/entraJWTValidationConfigs/entraJWTValidationConfig1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/entraJWTValidationConfigs/entraJWTValidationConfig1", }, httpListener: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhl", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhl", }, priority: 10, rewriteRuleSet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1", }, ruleType: "Basic", }, @@ -145,16 +131,10 @@ async function createApplicationGateway(): Promise { name: "Set X-Forwarded-For", actionSet: { requestHeaderConfigurations: [ - { - headerName: "X-Forwarded-For", - headerValue: "{var_add_x_forwarded_for_proxy}", - }, + { headerName: "X-Forwarded-For", headerValue: "{var_add_x_forwarded_for_proxy}" }, ], responseHeaderConfigurations: [ - { - headerName: "Strict-Transport-Security", - headerValue: "max-age=31536000", - }, + { headerName: "Strict-Transport-Security", headerValue: "max-age=31536000" }, ], urlConfiguration: { modifiedPath: "/abc" }, }, @@ -187,7 +167,7 @@ async function createApplicationGateway(): Promise { }, trustedClientCertificates: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/trustedClientCertificates/clientcert", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/trustedClientCertificates/clientcert", }, ], }, @@ -197,14 +177,7 @@ async function createApplicationGateway(): Promise { { name: "rootcert", data: "****" }, { name: "rootcert1", keyVaultSecretId: "https://kv/secret" }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - applicationGatewayName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysDeleteSample.ts index 9f6c5c962eab..8af3d8794c9c 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified application gateway. + * This sample demonstrates how to deletes the specified application gateway. * - * @summary Deletes the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayDelete.json + * @summary deletes the specified application gateway. + * x-ms-original-file: 2025-07-01/ApplicationGatewayDelete.json */ async function deleteApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginDeleteAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); + await client.applicationGateways.delete("rg1", "appgw"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysGetSample.ts index e8e7427e100c..208bbf398af2 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified application gateway. + * This sample demonstrates how to gets the specified application gateway. * - * @summary Gets the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayGet.json + * @summary gets the specified application gateway. + * x-ms-original-file: 2025-07-01/ApplicationGatewayGet.json */ async function getApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.get( - resourceGroupName, - applicationGatewayName, - ); + const result = await client.applicationGateways.get("rg1", "appgw"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysGetSslPredefinedPolicySample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysGetSslPredefinedPolicySample.ts index 95663af6c47d..22d4e716db7f 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysGetSslPredefinedPolicySample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysGetSslPredefinedPolicySample.ts @@ -3,23 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets Ssl predefined policy with the specified policy name. + * This sample demonstrates how to gets Ssl predefined policy with the specified policy name. * - * @summary Gets Ssl predefined policy with the specified policy name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json + * @summary gets Ssl predefined policy with the specified policy name. + * x-ms-original-file: 2025-07-01/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json */ async function getAvailableSslPredefinedPolicyByName(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const predefinedPolicyName = "AppGwSslPolicy20150501"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.getSslPredefinedPolicy( - predefinedPolicyName, - ); + const result = await client.applicationGateways.getSslPredefinedPolicy("AppGwSslPolicy20150501"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAllSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAllSample.ts index 704a57e51060..7fba3f44cd17 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the application gateways in a subscription. + * This sample demonstrates how to gets all the application gateways in a subscription. * - * @summary Gets all the application gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayListAll.json + * @summary gets all the application gateways in a subscription. + * x-ms-original-file: 2025-07-01/ApplicationGatewayListAll.json */ async function listsAllApplicationGatewaysInASubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.applicationGateways.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableRequestHeadersSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableRequestHeadersSample.ts index 6dfc2cd9363a..2f0524c6413d 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableRequestHeadersSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableRequestHeadersSample.ts @@ -3,19 +3,16 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all available request headers. + * This sample demonstrates how to lists all available request headers. * - * @summary Lists all available request headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json + * @summary lists all available request headers. + * x-ms-original-file: 2025-07-01/ApplicationGatewayAvailableRequestHeadersGet.json */ async function getAvailableRequestHeaders(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; const credential = new DefaultAzureCredential(); + const subscriptionId = "72f988bf-86f1-41af-91ab-2d7cd011db47"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.applicationGateways.listAvailableRequestHeaders(); console.log(result); diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableResponseHeadersSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableResponseHeadersSample.ts index f042ff220d76..716e69c32312 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableResponseHeadersSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableResponseHeadersSample.ts @@ -3,22 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all available response headers. + * This sample demonstrates how to lists all available response headers. * - * @summary Lists all available response headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json + * @summary lists all available response headers. + * x-ms-original-file: 2025-07-01/ApplicationGatewayAvailableResponseHeadersGet.json */ async function getAvailableResponseHeaders(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; const credential = new DefaultAzureCredential(); + const subscriptionId = "72f988bf-86f1-41af-91ab-2d7cd011db47"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.listAvailableResponseHeaders(); + const result = await client.applicationGateways.listAvailableResponseHeaders(); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableServerVariablesSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableServerVariablesSample.ts index 2c255abd7b53..4d275dda590a 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableServerVariablesSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableServerVariablesSample.ts @@ -3,22 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all available server variables. + * This sample demonstrates how to lists all available server variables. * - * @summary Lists all available server variables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json + * @summary lists all available server variables. + * x-ms-original-file: 2025-07-01/ApplicationGatewayAvailableServerVariablesGet.json */ async function getAvailableServerVariables(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; const credential = new DefaultAzureCredential(); + const subscriptionId = "72f988bf-86f1-41af-91ab-2d7cd011db47"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.listAvailableServerVariables(); + const result = await client.applicationGateways.listAvailableServerVariables(); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslOptionsSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslOptionsSample.ts index ed489bd2c45b..d46532489987 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslOptionsSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslOptionsSample.ts @@ -3,17 +3,16 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists available Ssl options for configuring Ssl policy. + * This sample demonstrates how to lists available Ssl options for configuring Ssl policy. * - * @summary Lists available Ssl options for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json + * @summary lists available Ssl options for configuring Ssl policy. + * x-ms-original-file: 2025-07-01/ApplicationGatewayAvailableSslOptionsGet.json */ async function getAvailableSslOptions(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.applicationGateways.listAvailableSslOptions(); console.log(result); diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts index 3c0a2d0d91e4..0eff1c631cac 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all SSL predefined policies for configuring Ssl policy. + * This sample demonstrates how to lists all SSL predefined policies for configuring Ssl policy. * - * @summary Lists all SSL predefined policies for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json + * @summary lists all SSL predefined policies for configuring Ssl policy. + * x-ms-original-file: 2025-07-01/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json */ async function getAvailableSslPredefinedPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.applicationGateways.listAvailableSslPredefinedPolicies()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableWafRuleSetsSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableWafRuleSetsSample.ts index fdbc7f936c0a..419c06a014a4 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableWafRuleSetsSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableWafRuleSetsSample.ts @@ -3,17 +3,16 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all available web application firewall rule sets. + * This sample demonstrates how to lists all available web application firewall rule sets. * - * @summary Lists all available web application firewall rule sets. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json + * @summary lists all available web application firewall rule sets. + * x-ms-original-file: 2025-07-01/ApplicationGatewayAvailableWafRuleSetsGet.json */ async function getAvailableWafRuleSets(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.applicationGateways.listAvailableWafRuleSets(); console.log(result); diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListSample.ts index 260765a1bddf..eca4a231fd1f 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all application gateways in a resource group. + * This sample demonstrates how to lists all application gateways in a resource group. * - * @summary Lists all application gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayList.json + * @summary lists all application gateways in a resource group. + * x-ms-original-file: 2025-07-01/ApplicationGatewayList.json */ async function listsAllApplicationGatewaysInAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.applicationGateways.list(resourceGroupName)) { + for await (const item of client.applicationGateways.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysStartSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysStartSample.ts index c07ea6df15fc..a13b0c953641 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysStartSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysStartSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Starts the specified application gateway. + * This sample demonstrates how to starts the specified application gateway. * - * @summary Starts the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayStart.json + * @summary starts the specified application gateway. + * x-ms-original-file: 2025-07-01/ApplicationGatewayStart.json */ async function startApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginStartAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); + await client.applicationGateways.start("rg1", "appgw"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysStopSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysStopSample.ts index f3e304a49f42..7eddcc366350 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysStopSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysStopSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Stops the specified application gateway in a resource group. + * This sample demonstrates how to stops the specified application gateway in a resource group. * - * @summary Stops the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayStop.json + * @summary stops the specified application gateway in a resource group. + * x-ms-original-file: 2025-07-01/ApplicationGatewayStop.json */ async function stopApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginStopAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); + await client.applicationGateways.stop("rg1", "appgw"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysUpdateTagsSample.ts index d3e7c5238e30..f8a75f142b15 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates the specified application gateway tags. + * This sample demonstrates how to updates the specified application gateway tags. * - * @summary Updates the specified application gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayUpdateTags.json + * @summary updates the specified application gateway tags. + * x-ms-original-file: 2025-07-01/ApplicationGatewayUpdateTags.json */ async function updateApplicationGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "AppGw"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.updateTags( - resourceGroupName, - applicationGatewayName, - parameters, - ); + const result = await client.applicationGateways.updateTags("rg1", "AppGw", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsCreateOrUpdateSample.ts index 390d0508deb9..dbefba171db5 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsCreateOrUpdateSample.ts @@ -1,33 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ApplicationSecurityGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates an application security group. + * This sample demonstrates how to creates or updates an application security group. * - * @summary Creates or updates an application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupCreate.json + * @summary creates or updates an application security group. + * x-ms-original-file: 2025-07-01/ApplicationSecurityGroupCreate.json */ async function createApplicationSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const parameters: ApplicationSecurityGroup = { location: "westus" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - applicationSecurityGroupName, - parameters, - ); + const result = await client.applicationSecurityGroups.createOrUpdate("rg1", "test-asg", { + location: "westus", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsDeleteSample.ts index 3b2253f4c826..7a137a174c4c 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified application security group. + * This sample demonstrates how to deletes the specified application security group. * - * @summary Deletes the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupDelete.json + * @summary deletes the specified application security group. + * x-ms-original-file: 2025-07-01/ApplicationSecurityGroupDelete.json */ async function deleteApplicationSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.beginDeleteAndWait( - resourceGroupName, - applicationSecurityGroupName, - ); - console.log(result); + await client.applicationSecurityGroups.delete("rg1", "test-asg"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsGetSample.ts index deebc64d4481..106096272997 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets information about the specified application security group. + * This sample demonstrates how to gets information about the specified application security group. * - * @summary Gets information about the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupGet.json + * @summary gets information about the specified application security group. + * x-ms-original-file: 2025-07-01/ApplicationSecurityGroupGet.json */ async function getApplicationSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.get( - resourceGroupName, - applicationSecurityGroupName, - ); + const result = await client.applicationSecurityGroups.get("rg1", "test-asg"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListAllSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListAllSample.ts index 3b4fe36b42be..be3d454039c8 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all application security groups in a subscription. + * This sample demonstrates how to gets all application security groups in a subscription. * - * @summary Gets all application security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupListAll.json + * @summary gets all application security groups in a subscription. + * x-ms-original-file: 2025-07-01/ApplicationSecurityGroupListAll.json */ async function listAllApplicationSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.applicationSecurityGroups.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListSample.ts index d9e7029db1a5..7b1172ae3ece 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the application security groups in a resource group. + * This sample demonstrates how to gets all the application security groups in a resource group. * - * @summary Gets all the application security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupList.json + * @summary gets all the application security groups in a resource group. + * x-ms-original-file: 2025-07-01/ApplicationSecurityGroupList.json */ async function listLoadBalancersInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.applicationSecurityGroups.list( - resourceGroupName, - )) { + for await (const item of client.applicationSecurityGroups.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsUpdateTagsSample.ts index bc914dd557f9..10a7241e71a6 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates an application security group's tags. + * This sample demonstrates how to updates an application security group's tags. * - * @summary Updates an application security group's tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupUpdateTags.json + * @summary updates an application security group's tags. + * x-ms-original-file: 2025-07-01/ApplicationSecurityGroupUpdateTags.json */ async function updateApplicationSecurityGroupTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.updateTags( - resourceGroupName, - applicationSecurityGroupName, - parameters, - ); + const result = await client.applicationSecurityGroups.updateTags("rg1", "test-asg", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/availableDelegationsListSample.ts b/sdk/network/arm-network/samples-dev/availableDelegationsListSample.ts index fafc495884aa..4d7e67107ca6 100644 --- a/sdk/network/arm-network/samples-dev/availableDelegationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/availableDelegationsListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all of the available subnet delegations for this subscription in this region. + * This sample demonstrates how to gets all of the available subnet delegations for this subscription in this region. * - * @summary Gets all of the available subnet delegations for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableDelegationsSubscriptionGet.json + * @summary gets all of the available subnet delegations for this subscription in this region. + * x-ms-original-file: 2025-07-01/AvailableDelegationsSubscriptionGet.json */ async function getAvailableDelegations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.availableDelegations.list(location)) { + for await (const item of client.availableDelegations.list("westcentralus")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/availableEndpointServicesListSample.ts b/sdk/network/arm-network/samples-dev/availableEndpointServicesListSample.ts index 031e2c3cec99..70bb868cb23a 100644 --- a/sdk/network/arm-network/samples-dev/availableEndpointServicesListSample.ts +++ b/sdk/network/arm-network/samples-dev/availableEndpointServicesListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List what values of endpoint services are available for use. + * This sample demonstrates how to list what values of endpoint services are available for use. * - * @summary List what values of endpoint services are available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EndpointServicesList.json + * @summary list what values of endpoint services are available for use. + * x-ms-original-file: 2025-07-01/EndpointServicesList.json */ async function endpointServicesList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.availableEndpointServices.list(location)) { + for await (const item of client.availableEndpointServices.list("westus")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListByResourceGroupSample.ts index 91ecd5eed380..83499ea32095 100644 --- a/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListByResourceGroupSample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * This sample demonstrates how to returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. * - * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json + * @summary returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * x-ms-original-file: 2025-07-01/AvailablePrivateEndpointTypesResourceGroupGet.json */ async function getAvailablePrivateEndpointTypesInTheResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.availablePrivateEndpointTypes.listByResourceGroup( - location, - resourceGroupName, + "rg1", + "regionName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListSample.ts b/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListSample.ts index fe2e2fa09f8f..8f3a8ce1442f 100644 --- a/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListSample.ts +++ b/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * This sample demonstrates how to returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. * - * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailablePrivateEndpointTypesGet.json + * @summary returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * x-ms-original-file: 2025-07-01/AvailablePrivateEndpointTypesGet.json */ async function getAvailablePrivateEndpointTypes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.availablePrivateEndpointTypes.list( - location, - )) { + for await (const item of client.availablePrivateEndpointTypes.list("regionName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/availableResourceGroupDelegationsListSample.ts b/sdk/network/arm-network/samples-dev/availableResourceGroupDelegationsListSample.ts index 4febf85450a1..9bc7c50953ae 100644 --- a/sdk/network/arm-network/samples-dev/availableResourceGroupDelegationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/availableResourceGroupDelegationsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all of the available subnet delegations for this resource group in this region. + * This sample demonstrates how to gets all of the available subnet delegations for this resource group in this region. * - * @summary Gets all of the available subnet delegations for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableDelegationsResourceGroupGet.json + * @summary gets all of the available subnet delegations for this resource group in this region. + * x-ms-original-file: 2025-07-01/AvailableDelegationsResourceGroupGet.json */ async function getAvailableDelegationsInTheResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.availableResourceGroupDelegations.list( - location, - resourceGroupName, - )) { + for await (const item of client.availableResourceGroupDelegations.list("rg1", "westcentralus")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/availableServiceAliasesListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/availableServiceAliasesListByResourceGroupSample.ts index bed7d04d14af..4cd08b0e01b6 100644 --- a/sdk/network/arm-network/samples-dev/availableServiceAliasesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/availableServiceAliasesListByResourceGroupSample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all available service aliases for this resource group in this region. + * This sample demonstrates how to gets all available service aliases for this resource group in this region. * - * @summary Gets all available service aliases for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableServiceAliasesListByResourceGroup.json + * @summary gets all available service aliases for this resource group in this region. + * x-ms-original-file: 2025-07-01/AvailableServiceAliasesListByResourceGroup.json */ async function getAvailableServiceAliasesInTheResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const location = "westcentralus"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.availableServiceAliases.listByResourceGroup( - resourceGroupName, - location, + "rg1", + "westcentralus", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/availableServiceAliasesListSample.ts b/sdk/network/arm-network/samples-dev/availableServiceAliasesListSample.ts index 3f4129015bbe..2b5cdf26b358 100644 --- a/sdk/network/arm-network/samples-dev/availableServiceAliasesListSample.ts +++ b/sdk/network/arm-network/samples-dev/availableServiceAliasesListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all available service aliases for this subscription in this region. + * This sample demonstrates how to gets all available service aliases for this subscription in this region. * - * @summary Gets all available service aliases for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableServiceAliasesList.json + * @summary gets all available service aliases for this subscription in this region. + * x-ms-original-file: 2025-07-01/AvailableServiceAliasesList.json */ async function getAvailableServiceAliases(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.availableServiceAliases.list(location)) { + for await (const item of client.availableServiceAliases.list("westcentralus")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/azureFirewallFqdnTagsListAllSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallFqdnTagsListAllSample.ts index 5efe556c864b..c7248768d2a8 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallFqdnTagsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallFqdnTagsListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the Azure Firewall FQDN Tags in a subscription. + * This sample demonstrates how to gets all the Azure Firewall FQDN Tags in a subscription. * - * @summary Gets all the Azure Firewall FQDN Tags in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json + * @summary gets all the Azure Firewall FQDN Tags in a subscription. + * x-ms-original-file: 2025-07-01/AzureFirewallFqdnTagsListBySubscription.json */ async function listAllAzureFirewallFqdnTagsForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.azureFirewallFqdnTags.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsCreateOrUpdateSample.ts index 90e75393abb5..05d5ec32ef66 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsCreateOrUpdateSample.ts @@ -1,27 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { AzureFirewall} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. + * This sample demonstrates how to creates or updates the specified Azure Firewall. * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPut.json + * @summary creates or updates the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallPut.json */ async function createAzureFirewall(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.azureFirewalls.createOrUpdate("rg1", "azurefirewall", { + location: "West US", applicationRuleCollections: [ { name: "apprulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", priority: 110, rules: [ { @@ -38,19 +37,18 @@ async function createAzureFirewall(): Promise { { name: "azureFirewallIpConfiguration", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", }, }, ], - location: "West US", natRuleCollections: [ { name: "natrulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", priority: 112, rules: [ { @@ -79,8 +77,8 @@ async function createAzureFirewall(): Promise { networkRuleCollections: [ { name: "netrulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", priority: 112, rules: [ { @@ -89,15 +87,11 @@ async function createAzureFirewall(): Promise { destinationAddresses: ["*"], destinationPorts: ["443-444", "8443"], protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], + sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], }, { name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", + description: "Block traffic based on source IPs and ports to amazon", destinationFqdns: ["www.amazon.com"], destinationPorts: ["443-444", "8443"], protocols: ["TCP"], @@ -107,37 +101,58 @@ async function createAzureFirewall(): Promise { }, ], sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, threatIntelMode: "Alert", + tags: { key1: "value1" }, zones: [], - }; + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates the specified Azure Firewall. + * + * @summary creates or updates the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallPutInHub.json + */ +async function createAzureFirewallInVirtualHub(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); + const result = await client.azureFirewalls.createOrUpdate("rg1", "azurefirewall", { + location: "West US", + firewallPolicy: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/policy1", + }, + hubIPAddresses: { publicIPs: { addresses: [], count: 1 } }, + sku: { name: "AZFW_Hub", tier: "Standard" }, + threatIntelMode: "Alert", + virtualHub: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", + }, + tags: { key1: "value1" }, + zones: [], + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. + * This sample demonstrates how to creates or updates the specified Azure Firewall. * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithAdditionalProperties.json + * @summary creates or updates the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallPutWithAdditionalProperties.json */ async function createAzureFirewallWithAdditionalProperties(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.azureFirewalls.createOrUpdate("rg1", "azurefirewall", { + location: "West US", additionalProperties: { key1: "value1", key2: "value2" }, applicationRuleCollections: [ { name: "apprulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", priority: 110, rules: [ { @@ -154,20 +169,18 @@ async function createAzureFirewallWithAdditionalProperties(): Promise { { name: "azureFirewallIpConfiguration", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", }, }, ], - ipGroups: [], - location: "West US", natRuleCollections: [ { name: "natrulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", priority: 112, rules: [ { @@ -196,8 +209,8 @@ async function createAzureFirewallWithAdditionalProperties(): Promise { networkRuleCollections: [ { name: "netrulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", priority: 112, rules: [ { @@ -206,15 +219,11 @@ async function createAzureFirewallWithAdditionalProperties(): Promise { destinationAddresses: ["*"], destinationPorts: ["443-444", "8443"], protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], + sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], }, { name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", + description: "Block traffic based on source IPs and ports to amazon", destinationFqdns: ["www.amazon.com"], destinationPorts: ["443-444", "8443"], protocols: ["TCP"], @@ -224,36 +233,66 @@ async function createAzureFirewallWithAdditionalProperties(): Promise { }, ], sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, threatIntelMode: "Alert", + tags: { key1: "value1" }, zones: [], - }; + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates the specified Azure Firewall. + * + * @summary creates or updates the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallPutWithAfcConfiguration.json + */ +async function createAzureFirewallWithAFCControlPlane(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, + const result = await client.azureFirewalls.createOrUpdate( + "rg1", + "azurefirewall", + { + location: "West US", + ipConfigurations: [ + { + name: "azureFirewallIpConfiguration", + publicIPAddress: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", + }, + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", + }, + }, + ], + sku: { name: "AZFW_VNet", tier: "Standard" }, + threatIntelMode: "Alert", + tags: { key1: "value1" }, + zones: [], + }, + { createAfcControlPlane: true }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. + * This sample demonstrates how to creates or updates the specified Azure Firewall. * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithIpGroups.json + * @summary creates or updates the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallPutWithIpGroups.json */ -async function createAzureFirewallWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { +async function createAzureFirewallWithIpGroups(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.azureFirewalls.createOrUpdate("rg1", "azurefirewall", { + location: "West US", applicationRuleCollections: [ { name: "apprulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", priority: 110, rules: [ { @@ -270,19 +309,18 @@ async function createAzureFirewallWithIPGroups(): Promise { { name: "azureFirewallIpConfiguration", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", }, }, ], - location: "West US", natRuleCollections: [ { name: "natrulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", priority: 112, rules: [ { @@ -311,8 +349,8 @@ async function createAzureFirewallWithIPGroups(): Promise { networkRuleCollections: [ { name: "netrulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", priority: 112, rules: [ { @@ -321,15 +359,11 @@ async function createAzureFirewallWithIPGroups(): Promise { destinationAddresses: ["*"], destinationPorts: ["443-444", "8443"], protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], + sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], }, { name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", + description: "Block traffic based on source IPs and ports to amazon", destinationFqdns: ["www.amazon.com"], destinationPorts: ["443-444", "8443"], protocols: ["TCP"], @@ -339,36 +373,30 @@ async function createAzureFirewallWithIPGroups(): Promise { }, ], sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, threatIntelMode: "Alert", + tags: { key1: "value1" }, zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. + * This sample demonstrates how to creates or updates the specified Azure Firewall. * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithZones.json + * @summary creates or updates the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallPutWithMgmtSubnet.json */ -async function createAzureFirewallWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { +async function createAzureFirewallWithManagementSubnet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.azureFirewalls.createOrUpdate("rg1", "azurefirewall", { + location: "West US", applicationRuleCollections: [ { name: "apprulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", priority: 110, rules: [ { @@ -385,19 +413,27 @@ async function createAzureFirewallWithZones(): Promise { { name: "azureFirewallIpConfiguration", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", }, }, ], - location: "West US 2", + managementIpConfiguration: { + name: "azureFirewallMgmtIpConfiguration", + publicIPAddress: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/managementPipName", + }, + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallManagementSubnet", + }, + }, natRuleCollections: [ { name: "natrulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", priority: 112, rules: [ { @@ -426,8 +462,8 @@ async function createAzureFirewallWithZones(): Promise { networkRuleCollections: [ { name: "netrulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", priority: 112, rules: [ { @@ -436,15 +472,11 @@ async function createAzureFirewallWithZones(): Promise { destinationAddresses: ["*"], destinationPorts: ["443-444", "8443"], protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], + sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], }, { name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", + description: "Block traffic based on source IPs and ports to amazon", destinationFqdns: ["www.amazon.com"], destinationPorts: ["443-444", "8443"], protocols: ["TCP"], @@ -454,36 +486,30 @@ async function createAzureFirewallWithZones(): Promise { }, ], sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, threatIntelMode: "Alert", - zones: ["1", "2", "3"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); + tags: { key1: "value1" }, + zones: [], + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. + * This sample demonstrates how to creates or updates the specified Azure Firewall. * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithMgmtSubnet.json + * @summary creates or updates the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallPutWithZones.json */ -async function createAzureFirewallWithManagementSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { +async function createAzureFirewallWithZones(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.azureFirewalls.createOrUpdate("rg1", "azurefirewall", { + location: "West US 2", applicationRuleCollections: [ { name: "apprulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", priority: 110, rules: [ { @@ -500,28 +526,18 @@ async function createAzureFirewallWithManagementSubnet(): Promise { { name: "azureFirewallIpConfiguration", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", }, }, ], - location: "West US", - managementIpConfiguration: { - name: "azureFirewallMgmtIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/managementPipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallManagementSubnet", - }, - }, natRuleCollections: [ { name: "natrulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", priority: 112, rules: [ { @@ -550,8 +566,8 @@ async function createAzureFirewallWithManagementSubnet(): Promise { networkRuleCollections: [ { name: "netrulecoll", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", priority: 112, rules: [ { @@ -560,15 +576,11 @@ async function createAzureFirewallWithManagementSubnet(): Promise { destinationAddresses: ["*"], destinationPorts: ["443-444", "8443"], protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], + sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], }, { name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", + description: "Block traffic based on source IPs and ports to amazon", destinationFqdns: ["www.amazon.com"], destinationPorts: ["443-444", "8443"], protocols: ["TCP"], @@ -578,61 +590,21 @@ async function createAzureFirewallWithManagementSubnet(): Promise { }, ], sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutInHub.json - */ -async function createAzureFirewallInVirtualHub(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - firewallPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/policy1", - }, - hubIPAddresses: { publicIPs: { addresses: [], count: 1 } }, - location: "West US", - sku: { name: "AZFW_Hub", tier: "Standard" }, tags: { key1: "value1" }, - threatIntelMode: "Alert", - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); + zones: ["1", "2", "3"], + }); console.log(result); } async function main(): Promise { await createAzureFirewall(); + await createAzureFirewallInVirtualHub(); await createAzureFirewallWithAdditionalProperties(); - await createAzureFirewallWithIPGroups(); - await createAzureFirewallWithZones(); + await createAzureFirewallWithAFCControlPlane(); + await createAzureFirewallWithIpGroups(); await createAzureFirewallWithManagementSubnet(); - await createAzureFirewallInVirtualHub(); + await createAzureFirewallWithZones(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsDeleteSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsDeleteSample.ts index 3ef8a684cf48..7a69a26afef2 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified Azure Firewall. + * This sample demonstrates how to deletes the specified Azure Firewall. * - * @summary Deletes the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallDelete.json + * @summary deletes the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallDelete.json */ async function deleteAzureFirewall(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginDeleteAndWait( - resourceGroupName, - azureFirewallName, - ); - console.log(result); + await client.azureFirewalls.delete("rg1", "azurefirewall"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsGetSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsGetSample.ts index 60d21597136b..323747c757eb 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsGetSample.ts @@ -3,109 +3,98 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Azure Firewall. + * This sample demonstrates how to gets the specified Azure Firewall. * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGet.json + * @summary gets the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallGet.json */ async function getAzureFirewall(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); + const result = await client.azureFirewalls.get("rg1", "azurefirewall"); console.log(result); } /** - * This sample demonstrates how to Gets the specified Azure Firewall. + * This sample demonstrates how to gets the specified Azure Firewall. * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithAdditionalProperties.json + * @summary gets the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallGetWithAdditionalProperties.json */ async function getAzureFirewallWithAdditionalProperties(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); + const result = await client.azureFirewalls.get("rg1", "azurefirewall"); console.log(result); } /** - * This sample demonstrates how to Gets the specified Azure Firewall. + * This sample demonstrates how to gets the specified Azure Firewall. * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithIpGroups.json + * @summary gets the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallGetWithAfcConfiguration.json */ -async function getAzureFirewallWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; +async function getAzureFirewallWithAFCControlPlane(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); + const result = await client.azureFirewalls.get("rg1", "azurefirewall"); console.log(result); } /** - * This sample demonstrates how to Gets the specified Azure Firewall. + * This sample demonstrates how to gets the specified Azure Firewall. * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithZones.json + * @summary gets the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallGetWithIpGroups.json */ -async function getAzureFirewallWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; +async function getAzureFirewallWithIpGroups(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); + const result = await client.azureFirewalls.get("rg1", "azurefirewall"); console.log(result); } /** - * This sample demonstrates how to Gets the specified Azure Firewall. + * This sample demonstrates how to gets the specified Azure Firewall. * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithMgmtSubnet.json + * @summary gets the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallGetWithMgmtSubnet.json */ async function getAzureFirewallWithManagementSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.azureFirewalls.get("rg1", "azurefirewall"); + console.log(result); +} + +/** + * This sample demonstrates how to gets the specified Azure Firewall. + * + * @summary gets the specified Azure Firewall. + * x-ms-original-file: 2025-07-01/AzureFirewallGetWithZones.json + */ +async function getAzureFirewallWithZones(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); + const result = await client.azureFirewalls.get("rg1", "azurefirewall"); console.log(result); } async function main(): Promise { await getAzureFirewall(); await getAzureFirewallWithAdditionalProperties(); - await getAzureFirewallWithIPGroups(); - await getAzureFirewallWithZones(); + await getAzureFirewallWithAFCControlPlane(); + await getAzureFirewallWithIpGroups(); await getAzureFirewallWithManagementSubnet(); + await getAzureFirewallWithZones(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsListAllSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsListAllSample.ts index a2c6c53d1e89..99adea55f845 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the Azure Firewalls in a subscription. + * This sample demonstrates how to gets all the Azure Firewalls in a subscription. * - * @summary Gets all the Azure Firewalls in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListBySubscription.json + * @summary gets all the Azure Firewalls in a subscription. + * x-ms-original-file: 2025-07-01/AzureFirewallListBySubscription.json */ async function listAllAzureFirewallsForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.azureFirewalls.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsListLearnedPrefixesSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsListLearnedPrefixesSample.ts index d13ba2dad60e..42592ff7c0a6 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsListLearnedPrefixesSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsListLearnedPrefixesSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. + * This sample demonstrates how to retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. * - * @summary Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListLearnedIPPrefixes.json + * @summary retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. + * x-ms-original-file: 2025-07-01/AzureFirewallListLearnedIPPrefixes.json */ async function azureFirewallListLearnedPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginListLearnedPrefixesAndWait( - resourceGroupName, - azureFirewallName, - ); + const result = await client.azureFirewalls.listLearnedPrefixes("rg1", "azureFirewall1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsListSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsListSample.ts index 388b675d1ac8..510e1392d4f1 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsListSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all Azure Firewalls in a resource group. + * This sample demonstrates how to lists all Azure Firewalls in a resource group. * - * @summary Lists all Azure Firewalls in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListByResourceGroup.json + * @summary lists all Azure Firewalls in a resource group. + * x-ms-original-file: 2025-07-01/AzureFirewallListByResourceGroup.json */ async function listAllAzureFirewallsForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.azureFirewalls.list(resourceGroupName)) { + for await (const item of client.azureFirewalls.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureOperationSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureOperationSample.ts index 3abbcc4186bd..d0677b6b36ed 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureOperationSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureOperationSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - FirewallPacketCaptureParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Runs a packet capture operation on AzureFirewall. + * This sample demonstrates how to runs a packet capture operation on AzureFirewall. * - * @summary Runs a packet capture operation on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPacketCaptureOperation.json + * @summary runs a packet capture operation on AzureFirewall. + * x-ms-original-file: 2025-07-01/AzureFirewallPacketCaptureOperation.json */ async function azureFirewallPacketCaptureOperation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const parameters: FirewallPacketCaptureParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.azureFirewalls.packetCaptureOperation("rg1", "azureFirewall1", { durationInSeconds: 300, fileName: "azureFirewallPacketCapture", filters: [ - { - destinationPorts: ["4500"], - destinations: ["20.1.2.0"], - sources: ["20.1.1.0"], - }, + { destinationPorts: ["4500"], destinations: ["20.1.2.0"], sources: ["20.1.1.0"] }, { destinationPorts: ["123", "80"], destinations: ["10.1.2.0"], @@ -39,14 +30,7 @@ async function azureFirewallPacketCaptureOperation(): Promise { operation: "Status", sasUrl: "someSASURL", protocol: "Any", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginPacketCaptureOperationAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureSample.ts index 90b16cacac2d..dfd16d6a1385 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - FirewallPacketCaptureParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Runs a packet capture on AzureFirewall. + * This sample demonstrates how to runs a packet capture on AzureFirewall. * - * @summary Runs a packet capture on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPacketCapture.json + * @summary runs a packet capture on AzureFirewall. + * x-ms-original-file: 2025-07-01/AzureFirewallPacketCapture.json */ async function azureFirewallPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const parameters: FirewallPacketCaptureParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.azureFirewalls.packetCapture("rg1", "azureFirewall1", { durationInSeconds: 300, fileName: "azureFirewallPacketCapture", filters: [ - { - destinationPorts: ["4500"], - destinations: ["20.1.2.0"], - sources: ["20.1.1.0"], - }, + { destinationPorts: ["4500"], destinations: ["20.1.2.0"], sources: ["20.1.1.0"] }, { destinationPorts: ["123", "80"], destinations: ["10.1.2.0"], @@ -38,15 +29,7 @@ async function azureFirewallPacketCapture(): Promise { numberOfPacketsToCapture: 5000, sasUrl: "someSASURL", protocol: "Any", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginPacketCaptureAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); + }); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsUpdateTagsSample.ts index 027a89d9d273..4013c0cf2705 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates tags of an Azure Firewall resource. + * This sample demonstrates how to updates tags of an Azure Firewall resource. * - * @summary Updates tags of an Azure Firewall resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallUpdateTags.json + * @summary updates tags of an Azure Firewall resource. + * x-ms-original-file: 2025-07-01/AzureFirewallUpdateTags.json */ async function updateAzureFirewallTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "azfwtest"; - const azureFirewallName = "fw1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginUpdateTagsAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); + const result = await client.azureFirewalls.updateTags("azfwtest", "fw1", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/bastionHostsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsCreateOrUpdateSample.ts index a5022f8182d4..a94a46e23f81 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsCreateOrUpdateSample.ts @@ -1,140 +1,110 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { BastionHost} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified Bastion Host. + * This sample demonstrates how to creates or updates the specified Bastion Host. * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPut.json + * @summary creates or updates the specified Bastion Host. + * x-ms-original-file: 2025-07-01/BastionHostDeveloperPut.json + */ +async function createDeveloperBastionHost(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.bastionHosts.createOrUpdate("rg2", "bastionhostdeveloper", { + ipConfigurations: [], + networkAcls: { ipRules: [{ addressPrefix: "1.1.1.1/16" }] }, + virtualNetwork: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/vnet2", + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates the specified Bastion Host. + * + * @summary creates or updates the specified Bastion Host. + * x-ms-original-file: 2025-07-01/BastionHostPut.json */ async function createBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: BastionHost = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.bastionHosts.createOrUpdate("rg1", "bastionhosttenant", { ipConfigurations: [ { name: "bastionHostIpConfiguration", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", }, }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified Bastion Host. + * This sample demonstrates how to creates or updates the specified Bastion Host. * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPutWithPrivateOnly.json + * @summary creates or updates the specified Bastion Host. + * x-ms-original-file: 2025-07-01/BastionHostPutWithPrivateOnly.json */ async function createBastionHostWithPrivateOnly(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: BastionHost = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.bastionHosts.createOrUpdate("rg1", "bastionhosttenant", { enablePrivateOnlyBastion: true, ipConfigurations: [ { name: "bastionHostIpConfiguration", subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", }, }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified Bastion Host. + * This sample demonstrates how to creates or updates the specified Bastion Host. * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPutWithZones.json + * @summary creates or updates the specified Bastion Host. + * x-ms-original-file: 2025-07-01/BastionHostPutWithZones.json */ async function createBastionHostWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: BastionHost = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.bastionHosts.createOrUpdate("rg1", "bastionhosttenant", { ipConfigurations: [ { name: "bastionHostIpConfiguration", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", }, }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDeveloperPut.json - */ -async function createDeveloperBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg2"; - const bastionHostName = "bastionhostdeveloper"; - const parameters: BastionHost = { - ipConfigurations: [], - networkAcls: { ipRules: [{ addressPrefix: "1.1.1.1/16" }] }, - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); + }); console.log(result); } async function main(): Promise { + await createDeveloperBastionHost(); await createBastionHost(); await createBastionHostWithPrivateOnly(); await createBastionHostWithZones(); - await createDeveloperBastionHost(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/bastionHostsDeleteSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsDeleteSample.ts index a21d2c89fd29..890b9200e553 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsDeleteSample.ts @@ -3,44 +3,31 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified Bastion Host. + * This sample demonstrates how to deletes the specified Bastion Host. * - * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDelete.json + * @summary deletes the specified Bastion Host. + * x-ms-original-file: 2025-07-01/BastionHostDelete.json */ async function deleteBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginDeleteAndWait( - resourceGroupName, - bastionHostName, - ); - console.log(result); + await client.bastionHosts.delete("rg1", "bastionhosttenant"); } /** - * This sample demonstrates how to Deletes the specified Bastion Host. + * This sample demonstrates how to deletes the specified Bastion Host. * - * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDeveloperDelete.json + * @summary deletes the specified Bastion Host. + * x-ms-original-file: 2025-07-01/BastionHostDeveloperDelete.json */ async function deleteDeveloperBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg2"; - const bastionHostName = "bastionhostdeveloper"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginDeleteAndWait( - resourceGroupName, - bastionHostName, - ); - console.log(result); + await client.bastionHosts.delete("rg2", "bastionhostdeveloper"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/bastionHostsGetSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsGetSample.ts index 9bc996855a8b..d60ffcfd228d 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsGetSample.ts @@ -3,89 +3,68 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Bastion Host. + * This sample demonstrates how to gets the specified Bastion Host. * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostGet.json + * @summary gets the specified Bastion Host. + * x-ms-original-file: 2025-07-01/BastionHostDeveloperGet.json */ -async function getBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant'"; +async function getDeveloperBastionHost(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); + const result = await client.bastionHosts.get("rg1", "bastionhostdeveloper'"); console.log(result); } /** - * This sample demonstrates how to Gets the specified Bastion Host. + * This sample demonstrates how to gets the specified Bastion Host. * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostGetWithPrivateOnly.json + * @summary gets the specified Bastion Host. + * x-ms-original-file: 2025-07-01/BastionHostGet.json */ -async function getBastionHostWithPrivateOnly(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; +async function getBastionHost(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); + const result = await client.bastionHosts.get("rg1", "bastionhosttenant'"); console.log(result); } /** - * This sample demonstrates how to Gets the specified Bastion Host. + * This sample demonstrates how to gets the specified Bastion Host. * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostGetWithZones.json + * @summary gets the specified Bastion Host. + * x-ms-original-file: 2025-07-01/BastionHostGetWithPrivateOnly.json */ -async function getBastionHostWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; +async function getBastionHostWithPrivateOnly(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); + const result = await client.bastionHosts.get("rg1", "bastionhosttenant"); console.log(result); } /** - * This sample demonstrates how to Gets the specified Bastion Host. + * This sample demonstrates how to gets the specified Bastion Host. * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDeveloperGet.json + * @summary gets the specified Bastion Host. + * x-ms-original-file: 2025-07-01/BastionHostGetWithZones.json */ -async function getDeveloperBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhostdeveloper'"; +async function getBastionHostWithZones(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); + const result = await client.bastionHosts.get("rg1", "bastionhosttenant"); console.log(result); } async function main(): Promise { + await getDeveloperBastionHost(); await getBastionHost(); await getBastionHostWithPrivateOnly(); await getBastionHostWithZones(); - await getDeveloperBastionHost(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/bastionHostsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsListByResourceGroupSample.ts index c5c757210d56..264f1dfdf5d2 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all Bastion Hosts in a resource group. + * This sample demonstrates how to lists all Bastion Hosts in a resource group. * - * @summary Lists all Bastion Hosts in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostListByResourceGroup.json + * @summary lists all Bastion Hosts in a resource group. + * x-ms-original-file: 2025-07-01/BastionHostListByResourceGroup.json */ async function listAllBastionHostsForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.bastionHosts.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.bastionHosts.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/bastionHostsListSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsListSample.ts index 95a611f0eb10..82a3fe0e1a9e 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsListSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all Bastion Hosts in a subscription. + * This sample demonstrates how to lists all Bastion Hosts in a subscription. * - * @summary Lists all Bastion Hosts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostListBySubscription.json + * @summary lists all Bastion Hosts in a subscription. + * x-ms-original-file: 2025-07-01/BastionHostListBySubscription.json */ async function listAllBastionHostsForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.bastionHosts.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/bastionHostsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsUpdateTagsSample.ts index 4a1782ff8d29..c6e768a9a2c6 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates Tags for BastionHost resource + * This sample demonstrates how to updates Tags for BastionHost resource * - * @summary Updates Tags for BastionHost resource - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPatch.json + * @summary updates Tags for BastionHost resource + * x-ms-original-file: 2025-07-01/BastionHostPatch.json */ async function patchBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginUpdateTagsAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); + const result = await client.bastionHosts.updateTags("rg1", "bastionhosttenant", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/bgpServiceCommunitiesListSample.ts b/sdk/network/arm-network/samples-dev/bgpServiceCommunitiesListSample.ts index 6502dadcd7cc..110a9df8b526 100644 --- a/sdk/network/arm-network/samples-dev/bgpServiceCommunitiesListSample.ts +++ b/sdk/network/arm-network/samples-dev/bgpServiceCommunitiesListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the available bgp service communities. + * This sample demonstrates how to gets all the available bgp service communities. * - * @summary Gets all the available bgp service communities. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceCommunityList.json + * @summary gets all the available bgp service communities. + * x-ms-original-file: 2025-07-01/ServiceCommunityList.json */ async function serviceCommunityList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.bgpServiceCommunities.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/checkDnsNameAvailabilitySample.ts b/sdk/network/arm-network/samples-dev/checkDnsNameAvailabilitySample.ts index 7630dbdae8f0..e244c3be4093 100644 --- a/sdk/network/arm-network/samples-dev/checkDnsNameAvailabilitySample.ts +++ b/sdk/network/arm-network/samples-dev/checkDnsNameAvailabilitySample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * This sample demonstrates how to checks whether a domain name in the cloudapp.azure.com zone is available for use. * - * @summary Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckDnsNameAvailability.json + * @summary checks whether a domain name in the cloudapp.azure.com zone is available for use. + * x-ms-original-file: 2025-07-01/CheckDnsNameAvailability.json */ async function checkDnsNameAvailability(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const domainNameLabel = "testdns"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.checkDnsNameAvailability( - location, - domainNameLabel, - ); + const result = await client.checkDnsNameAvailability("westus", "testdns"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/commitsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/commitsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..64695dec9ca3 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/commitsCreateOrUpdateSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates a commit. + * + * @summary creates or updates a commit. + * x-ms-original-file: 2025-07-01/NetworkManagerCommitPut.json + */ +async function createOrUpdateNetworkManagerCommit(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.commits.createOrUpdate( + "myResourceGroup", + "testNetworkManager", + "myTestCommit", + { + properties: { + description: "Sample Commit", + targetLocations: ["useast"], + configurationIds: [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resoureGroupSample/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/SampleSecurityAdminConfig", + ], + commitType: "SecurityAdmin", + forceUpdateTag: "00000000-0000-0000-0000-000000000000", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateNetworkManagerCommit(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/commitsDeleteSample.ts b/sdk/network/arm-network/samples-dev/commitsDeleteSample.ts new file mode 100644 index 000000000000..e88ad456cdca --- /dev/null +++ b/sdk/network/arm-network/samples-dev/commitsDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes a commit. + * + * @summary deletes a commit. + * x-ms-original-file: 2025-07-01/NetworkManagerCommitDelete.json + */ +async function deleteNetworkManagerCommit(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.commits.delete("myResourceGroup", "testNetworkManager", "myTestCommit"); +} + +async function main(): Promise { + await deleteNetworkManagerCommit(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/commitsGetSample.ts b/sdk/network/arm-network/samples-dev/commitsGetSample.ts new file mode 100644 index 000000000000..20e124eddc49 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/commitsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the specified commit. + * + * @summary gets the specified commit. + * x-ms-original-file: 2025-07-01/NetworkManagerCommitGet.json + */ +async function getNetworkManagerCommit(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.commits.get("myResourceGroup", "testNetworkManager", "myTestCommit"); + console.log(result); +} + +async function main(): Promise { + await getNetworkManagerCommit(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/commitsListSample.ts b/sdk/network/arm-network/samples-dev/commitsListSample.ts new file mode 100644 index 000000000000..836709903f8c --- /dev/null +++ b/sdk/network/arm-network/samples-dev/commitsListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all commits for the specified network manager. + * + * @summary lists all commits for the specified network manager. + * x-ms-original-file: 2025-07-01/NetworkManagerCommitList.json + */ +async function listNetworkManagerCommit(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.commits.list("myResourceGroup", "testNetworkManager")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listNetworkManagerCommit(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsCreateOrUpdateSample.ts index 8a1a52681363..ce9755fef7ea 100644 --- a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsCreateOrUpdateSample.ts @@ -1,51 +1,32 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnServerConfigurationPolicyGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. + * This sample demonstrates how to creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. * - * @summary Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupPut.json + * @summary creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. + * x-ms-original-file: 2025-07-01/ConfigurationPolicyGroupPut.json */ async function configurationPolicyGroupPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup = + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.configurationPolicyGroups.createOrUpdate( + "rg1", + "vpnServerConfiguration1", + "policyGroup1", { isDefault: true, policyMembers: [ - { - name: "policy1", - attributeType: "RadiusAzureGroupId", - attributeValue: "6ad1bd08", - }, - { - name: "policy2", - attributeType: "CertificateGroupId", - attributeValue: "red.com", - }, + { name: "policy1", attributeType: "RadiusAzureGroupId", attributeValue: "6ad1bd08" }, + { name: "policy2", attributeType: "CertificateGroupId", attributeValue: "red.com" }, ], priority: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.configurationPolicyGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - vpnServerConfigurationPolicyGroupParameters, - ); + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsDeleteSample.ts index 5f29520d2909..c16f8f76a937 100644 --- a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a ConfigurationPolicyGroup. + * This sample demonstrates how to deletes a ConfigurationPolicyGroup. * - * @summary Deletes a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupDelete.json + * @summary deletes a ConfigurationPolicyGroup. + * x-ms-original-file: 2025-07-01/ConfigurationPolicyGroupDelete.json */ async function configurationPolicyGroupDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.configurationPolicyGroups.beginDeleteAndWait( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - ); - console.log(result); + await client.configurationPolicyGroups.delete("rg1", "vpnServerConfiguration1", "policyGroup1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsGetSample.ts index fb49f380df59..84d21911398d 100644 --- a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a ConfigurationPolicyGroup. + * This sample demonstrates how to retrieves the details of a ConfigurationPolicyGroup. * - * @summary Retrieves the details of a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupGet.json + * @summary retrieves the details of a ConfigurationPolicyGroup. + * x-ms-original-file: 2025-07-01/ConfigurationPolicyGroupGet.json */ async function configurationPolicyGroupGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.configurationPolicyGroups.get( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, + "rg1", + "vpnServerConfiguration1", + "policyGroup1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsListByVpnServerConfigurationSample.ts b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsListByVpnServerConfigurationSample.ts index ada8d86e369a..a7e75e3f25b7 100644 --- a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsListByVpnServerConfigurationSample.ts +++ b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsListByVpnServerConfigurationSample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. + * This sample demonstrates how to lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. * - * @summary Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json + * @summary lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. + * x-ms-original-file: 2025-07-01/ConfigurationPolicyGroupListByVpnServerConfiguration.json */ async function configurationPolicyGroupListByVpnServerConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.configurationPolicyGroups.listByVpnServerConfiguration( - resourceGroupName, - vpnServerConfigurationName, + "rg1", + "vpnServerConfiguration1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsCreateOrUpdateSample.ts index d4e768b60c64..d786734f85aa 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsCreateOrUpdateSample.ts @@ -1,39 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { ConnectionMonitor} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create or update a connection monitor. + * This sample demonstrates how to create or update a connection monitor. * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorCreate.json + * @summary create or update a connection monitor. + * x-ms-original-file: 2025-07-01/NetworkWatcherConnectionMonitorCreate.json */ async function createConnectionMonitorV1(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: ConnectionMonitor = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.connectionMonitors.createOrUpdate("rg1", "nw1", "cm1", { + location: "eastus", endpoints: [ { name: "source", resourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/ct1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/ct1", }, { name: "destination", address: "bing.com" }, ], - location: "eastus", testConfigurations: [ - { - name: "tcp", - tcpConfiguration: { port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, + { name: "tcp", tcpConfiguration: { port: 80 }, testFrequencySec: 60, protocol: "Tcp" }, ], testGroups: [ { @@ -43,47 +35,37 @@ async function createConnectionMonitorV1(): Promise { testConfigurations: ["tcp"], }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Create or update a connection monitor. + * This sample demonstrates how to create or update a connection monitor. * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorV2Create.json + * @summary create or update a connection monitor. + * x-ms-original-file: 2025-07-01/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json */ -async function createConnectionMonitorV2(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: ConnectionMonitor = { +async function createConnectionMonitorWithArcNetwork(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.connectionMonitors.createOrUpdate("rg1", "nw1", "cm1", { endpoints: [ { name: "vm1", + type: "AzureVM", resourceId: - "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/NwRgIrinaCentralUSEUAP/providers/Microsoft.Compute/virtualMachines/vm1", + "/subscriptions/9cece3e3-0f7d-47ca-af0e-9772773f90b7/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/TESTVM", }, + { name: "bing", type: "ExternalAddress", address: "bing.com" }, + { name: "google", type: "ExternalAddress", address: "google.com" }, { - name: "CanaryWorkspaceVamshi", - filter: { - type: "Include", - items: [{ type: "AgentAddress", address: "npmuser" }], - }, - resourceId: - "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/vasamudrRG/providers/Microsoft.OperationalInsights/workspaces/vasamudrWorkspace", + name: "ArcBasedNetwork", + type: "AzureArcNetwork", + locationDetails: { region: "eastus" }, + scope: { include: [{ address: "172.21.128.0/20" }] }, + subscriptionId: "9cece3e3-0f7d-47ca-af0e-9772773f90b7", }, - { name: "bing", address: "bing.com" }, - { name: "google", address: "google.com" }, ], outputs: [], testConfigurations: [ @@ -99,50 +81,39 @@ async function createConnectionMonitorV2(): Promise { name: "test1", destinations: ["bing", "google"], disable: false, - sources: ["vm1", "CanaryWorkspaceVamshi"], + sources: ["vm1", "ArcBasedNetwork"], testConfigurations: ["testConfig1"], }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Create or update a connection monitor. + * This sample demonstrates how to create or update a connection monitor. * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json + * @summary create or update a connection monitor. + * x-ms-original-file: 2025-07-01/NetworkWatcherConnectionMonitorV2Create.json */ -async function createConnectionMonitorWithArcNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: ConnectionMonitor = { +async function createConnectionMonitorV2(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.connectionMonitors.createOrUpdate("rg1", "nw1", "cm1", { endpoints: [ { name: "vm1", - type: "AzureVM", resourceId: - "/subscriptions/9cece3e3-0f7d-47ca-af0e-9772773f90b7/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/TESTVM", + "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/NwRgIrinaCentralUSEUAP/providers/Microsoft.Compute/virtualMachines/vm1", }, - { name: "bing", type: "ExternalAddress", address: "bing.com" }, - { name: "google", type: "ExternalAddress", address: "google.com" }, { - name: "ArcBasedNetwork", - type: "AzureArcNetwork", - locationDetails: { region: "eastus" }, - scope: { include: [{ address: "172.21.128.0/20" }] }, - subscriptionId: "9cece3e3-0f7d-47ca-af0e-9772773f90b7", + name: "CanaryWorkspaceVamshi", + filter: { type: "Include", items: [{ type: "AgentAddress", address: "npmuser" }] }, + resourceId: + "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/vasamudrRG/providers/Microsoft.OperationalInsights/workspaces/vasamudrWorkspace", }, + { name: "bing", address: "bing.com" }, + { name: "google", address: "google.com" }, ], outputs: [], testConfigurations: [ @@ -158,26 +129,18 @@ async function createConnectionMonitorWithArcNetwork(): Promise { name: "test1", destinations: ["bing", "google"], disable: false, - sources: ["vm1", "ArcBasedNetwork"], + sources: ["vm1", "CanaryWorkspaceVamshi"], testConfigurations: ["testConfig1"], }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); + }); console.log(result); } async function main(): Promise { await createConnectionMonitorV1(); - await createConnectionMonitorV2(); await createConnectionMonitorWithArcNetwork(); + await createConnectionMonitorV2(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsDeleteSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsDeleteSample.ts index eb5f7cbadc1c..cabf2584fb44 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified connection monitor. + * This sample demonstrates how to deletes the specified connection monitor. * - * @summary Deletes the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorDelete.json + * @summary deletes the specified connection monitor. + * x-ms-original-file: 2025-07-01/NetworkWatcherConnectionMonitorDelete.json */ async function deleteConnectionMonitor(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); + await client.connectionMonitors.delete("rg1", "nw1", "cm1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsGetSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsGetSample.ts index f341bbf7b89d..2f47614cbe39 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a connection monitor by name. + * This sample demonstrates how to gets a connection monitor by name. * - * @summary Gets a connection monitor by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorGet.json + * @summary gets a connection monitor by name. + * x-ms-original-file: 2025-07-01/NetworkWatcherConnectionMonitorGet.json */ async function getConnectionMonitor(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.get( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); + const result = await client.connectionMonitors.get("rg1", "nw1", "cm1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsListSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsListSample.ts index a51c35f3c9d4..df140394b1d6 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsListSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all connection monitors for the specified Network Watcher. + * This sample demonstrates how to lists all connection monitors for the specified Network Watcher. * - * @summary Lists all connection monitors for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorList.json + * @summary lists all connection monitors for the specified Network Watcher. + * x-ms-original-file: 2025-07-01/NetworkWatcherConnectionMonitorList.json */ async function listConnectionMonitors(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.connectionMonitors.list( - resourceGroupName, - networkWatcherName, - )) { + for await (const item of client.connectionMonitors.list("rg1", "nw1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsStopSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsStopSample.ts index ae9a6131bfa2..40ac5781200e 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsStopSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsStopSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Stops the specified connection monitor. + * This sample demonstrates how to stops the specified connection monitor. * - * @summary Stops the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorStop.json + * @summary stops the specified connection monitor. + * x-ms-original-file: 2025-07-01/NetworkWatcherConnectionMonitorStop.json */ async function stopConnectionMonitor(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginStopAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); + await client.connectionMonitors.stop("rg1", "nw1", "cm1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsUpdateTagsSample.ts index cb8b93b9a4e6..1952829b329e 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsUpdateTagsSample.ts @@ -1,31 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update tags of the specified connection monitor. + * This sample demonstrates how to update tags of the specified connection monitor. * - * @summary Update tags of the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json + * @summary update tags of the specified connection monitor. + * x-ms-original-file: 2025-07-01/NetworkWatcherConnectionMonitorUpdateTags.json */ async function updateConnectionMonitorTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.updateTags( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); + const result = await client.connectionMonitors.updateTags("rg1", "nw1", "cm1", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/connectionPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/connectionPoliciesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..224f4fc45932 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/connectionPoliciesCreateOrUpdateSample.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a ConnectionPolicy if it doesn't exist else updates the existing one. + * + * @summary creates a ConnectionPolicy if it doesn't exist else updates the existing one. + * x-ms-original-file: 2025-07-01/ConnectionPolicyPut.json + */ +async function connectionPolicyPut(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.connectionPolicies.createOrUpdate("rg1", "TestHub", "testpolicy2", { + properties: { + routingConfiguration: { + associatedRouteTable: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/TestHub/hubRouteTables/defaultRouteTable", + }, + inboundRouteMap: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/TestHub/routeMaps/TestRouteMap", + }, + outboundRouteMap: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/TestHub/routeMaps/TestRouteMap", + }, + propagatedRouteTables: { labels: ["default"] }, + }, + enableInternetSecurity: true, + }, + }); + console.log(result); +} + +async function main(): Promise { + await connectionPolicyPut(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/connectionPoliciesDeleteSample.ts b/sdk/network/arm-network/samples-dev/connectionPoliciesDeleteSample.ts new file mode 100644 index 000000000000..33bce4a06195 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/connectionPoliciesDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes a ConnectionPolicy. + * + * @summary deletes a ConnectionPolicy. + * x-ms-original-file: 2025-07-01/ConnectionPolicyDelete.json + */ +async function connectionPolicyDelete(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.connectionPolicies.delete("rg1", "TestHub", "testpolicy"); +} + +async function main(): Promise { + await connectionPolicyDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/connectionPoliciesGetSample.ts b/sdk/network/arm-network/samples-dev/connectionPoliciesGetSample.ts new file mode 100644 index 000000000000..7c267bb48514 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/connectionPoliciesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves the details of a ConnectionPolicy. + * + * @summary retrieves the details of a ConnectionPolicy. + * x-ms-original-file: 2025-07-01/ConnectionPolicyGet.json + */ +async function connectionPolicyGet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.connectionPolicies.get("rg1", "TestHub", "testpolicy"); + console.log(result); +} + +async function main(): Promise { + await connectionPolicyGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/connectionPoliciesListSample.ts b/sdk/network/arm-network/samples-dev/connectionPoliciesListSample.ts new file mode 100644 index 000000000000..18997b93709e --- /dev/null +++ b/sdk/network/arm-network/samples-dev/connectionPoliciesListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves the details of all ConnectionPolicies. + * + * @summary retrieves the details of all ConnectionPolicies. + * x-ms-original-file: 2025-07-01/ConnectionPolicyList.json + */ +async function connectionPolicyList(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.connectionPolicies.list("rg1", "TestHub")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await connectionPolicyList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/connectivityConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/connectivityConfigurationsCreateOrUpdateSample.ts index 971731171ebf..83ab7e8c78bf 100644 --- a/sdk/network/arm-network/samples-dev/connectivityConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/connectivityConfigurationsCreateOrUpdateSample.ts @@ -1,62 +1,50 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ConnectivityConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates/Updates a new network manager connectivity configuration + * This sample demonstrates how to creates/Updates a new network manager connectivity configuration * - * @summary Creates/Updates a new network manager connectivity configuration - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationPut.json + * @summary creates/Updates a new network manager connectivity configuration + * x-ms-original-file: 2025-07-01/NetworkManagerConnectivityConfigurationPut.json */ async function connectivityConfigurationsPut(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const connectivityConfiguration: ConnectivityConfiguration = { - description: "Sample Configuration", - appliesToGroups: [ - { - groupConnectivity: "None", - isGlobal: "False", - networkGroupId: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/group1", - useHubGateway: "True", - }, - ], - connectivityCapabilities: { - connectedGroupAddressOverlap: "Allowed", - connectedGroupPrivateEndpointsScale: "Standard", - peeringEnforcement: "Unenforced", - }, - connectivityTopology: "HubAndSpoke", - deleteExistingPeering: "True", - hubs: [ - { - resourceId: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myTestConnectivityConfig", - resourceType: "Microsoft.Network/virtualNetworks", - }, - ], - isGlobal: "True", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.connectivityConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - connectivityConfiguration, + "myResourceGroup", + "testNetworkManager", + "myTestConnectivityConfig", + { + description: "Sample Configuration", + appliesToGroups: [ + { + groupConnectivity: "None", + isGlobal: "False", + networkGroupId: + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/group1", + useHubGateway: "True", + }, + ], + connectivityCapabilities: { + connectedGroupAddressOverlap: "Allowed", + connectedGroupPrivateEndpointsScale: "Standard", + peeringEnforcement: "Unenforced", + }, + connectivityTopology: "HubAndSpoke", + deleteExistingPeering: "True", + hubs: [ + { + resourceId: + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myTestConnectivityConfig", + resourceType: "Microsoft.Network/virtualNetworks", + }, + ], + isGlobal: "True", + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/connectivityConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/connectivityConfigurationsDeleteSample.ts index 4fd68bfbba18..7187d5c8ef20 100644 --- a/sdk/network/arm-network/samples-dev/connectivityConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/connectivityConfigurationsDeleteSample.ts @@ -1,39 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ConnectivityConfigurationsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name + * This sample demonstrates how to deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name * - * @summary Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json + * @summary deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name + * x-ms-original-file: 2025-07-01/NetworkManagerConnectivityConfigurationDelete.json */ async function connectivityConfigurationsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const force = false; - const options: ConnectivityConfigurationsDeleteOptionalParams = { force }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, + await client.connectivityConfigurations.delete( + "myResourceGroup", + "testNetworkManager", + "myTestConnectivityConfig", + { force: false }, ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/connectivityConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/connectivityConfigurationsGetSample.ts index 8da8e0804342..a1110c1fed41 100644 --- a/sdk/network/arm-network/samples-dev/connectivityConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/connectivityConfigurationsGetSample.ts @@ -3,28 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name + * This sample demonstrates how to gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name * - * @summary Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationGet.json + * @summary gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name + * x-ms-original-file: 2025-07-01/NetworkManagerConnectivityConfigurationGet.json */ async function connectivityConfigurationsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.connectivityConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, + "myResourceGroup", + "testNetworkManager", + "myTestConnectivityConfig", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/connectivityConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/connectivityConfigurationsListSample.ts index c050a97078f8..a38f301122b4 100644 --- a/sdk/network/arm-network/samples-dev/connectivityConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/connectivityConfigurationsListSample.ts @@ -3,30 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the network manager connectivity configuration in a specified network manager. + * This sample demonstrates how to lists all the network manager connectivity configuration in a specified network manager. * - * @summary Lists all the network manager connectivity configuration in a specified network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationList.json + * @summary lists all the network manager connectivity configuration in a specified network manager. + * x-ms-original-file: 2025-07-01/NetworkManagerConnectivityConfigurationList.json */ async function connectivityConfigurationsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.connectivityConfigurations.list( - resourceGroupName, - networkManagerName, + "myResourceGroup", + "testNetworkManager", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesCreateOrUpdateSample.ts index ee8184724a76..e0ff80be9d1b 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesCreateOrUpdateSample.ts @@ -1,29 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { CustomIpPrefix} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a custom IP prefix. + * This sample demonstrates how to creates or updates a custom IP prefix. * - * @summary Creates or updates a custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixCreateCustomizedValues.json + * @summary creates or updates a custom IP prefix. + * x-ms-original-file: 2025-07-01/CustomIpPrefixCreateCustomizedValues.json */ async function createCustomIPPrefixAllocationMethod(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const parameters: CustomIpPrefix = { cidr: "0.0.0.0/24", location: "westus" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - customIpPrefixName, - parameters, - ); + const result = await client.customIPPrefixes.createOrUpdate("rg1", "test-customipprefix", { + location: "westus", + cidr: "0.0.0.0/24", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesDeleteSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesDeleteSample.ts index a6ad06fa8e21..ff6bb01d72c2 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified custom IP prefix. + * This sample demonstrates how to deletes the specified custom IP prefix. * - * @summary Deletes the specified custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixDelete.json + * @summary deletes the specified custom IP prefix. + * x-ms-original-file: 2025-07-01/CustomIpPrefixDelete.json */ async function deleteCustomIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.beginDeleteAndWait( - resourceGroupName, - customIpPrefixName, - ); - console.log(result); + await client.customIPPrefixes.delete("rg1", "test-customipprefix"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesGetSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesGetSample.ts index 01c40540de33..79eaa794f971 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified custom IP prefix in a specified resource group. + * This sample demonstrates how to gets the specified custom IP prefix in a specified resource group. * - * @summary Gets the specified custom IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixGet.json + * @summary gets the specified custom IP prefix in a specified resource group. + * x-ms-original-file: 2025-07-01/CustomIpPrefixGet.json */ async function getCustomIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.get( - resourceGroupName, - customIpPrefixName, - ); + const result = await client.customIPPrefixes.get("rg1", "test-customipprefix"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesListAllSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesListAllSample.ts index 009e7d9e10b1..2d1487a716ab 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the custom IP prefixes in a subscription. + * This sample demonstrates how to gets all the custom IP prefixes in a subscription. * - * @summary Gets all the custom IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixListAll.json + * @summary gets all the custom IP prefixes in a subscription. + * x-ms-original-file: 2025-07-01/CustomIpPrefixListAll.json */ async function listAllCustomIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.customIPPrefixes.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesListSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesListSample.ts index 1e1c98db830a..ca86f4c46fcf 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesListSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all custom IP prefixes in a resource group. + * This sample demonstrates how to gets all custom IP prefixes in a resource group. * - * @summary Gets all custom IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixList.json + * @summary gets all custom IP prefixes in a resource group. + * x-ms-original-file: 2025-07-01/CustomIpPrefixList.json */ async function listResourceGroupCustomIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.customIPPrefixes.list(resourceGroupName)) { + for await (const item of client.customIPPrefixes.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesUpdateTagsSample.ts index 3231a90497cb..d6c08d646060 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates custom IP prefix tags. + * This sample demonstrates how to updates custom IP prefix tags. * - * @summary Updates custom IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixUpdateTags.json + * @summary updates custom IP prefix tags. + * x-ms-original-file: 2025-07-01/CustomIpPrefixUpdateTags.json */ async function updatePublicIPAddressTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.updateTags( - resourceGroupName, - customIpPrefixName, - parameters, - ); + const result = await client.customIPPrefixes.updateTags("rg1", "test-customipprefix", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesCreateOrUpdateSample.ts index 3066949a48e8..fec4b87ee5b8 100644 --- a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesCreateOrUpdateSample.ts @@ -1,22 +1,21 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { DdosCustomPolicy} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a DDoS custom policy. + * This sample demonstrates how to creates or updates a DDoS custom policy. * - * @summary Creates or updates a DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyCreate.json + * @summary creates or updates a DDoS custom policy. + * x-ms-original-file: 2025-07-01/DdosCustomPolicyCreate.json */ async function createDDoSCustomPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const parameters: DdosCustomPolicy = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ddosCustomPolicies.createOrUpdate("rg1", "test-ddos-custom-policy", { + location: "centraluseuap", detectionRules: [ { name: "detectionRuleTcp", @@ -24,15 +23,7 @@ async function createDDoSCustomPolicy(): Promise { trafficDetectionRule: { packetsPerSecond: 1000000, trafficType: "Tcp" }, }, ], - location: "centraluseuap", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - ddosCustomPolicyName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesDeleteSample.ts b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesDeleteSample.ts index 54b335f6a278..9f11adaa3cfa 100644 --- a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified DDoS custom policy. + * This sample demonstrates how to deletes the specified DDoS custom policy. * - * @summary Deletes the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyDelete.json + * @summary deletes the specified DDoS custom policy. + * x-ms-original-file: 2025-07-01/DdosCustomPolicyDelete.json */ async function deleteDDoSCustomPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.beginDeleteAndWait( - resourceGroupName, - ddosCustomPolicyName, - ); - console.log(result); + await client.ddosCustomPolicies.delete("rg1", "test-ddos-custom-policy"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesGetSample.ts b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesGetSample.ts index 77566f0ca6e7..2bba6160369c 100644 --- a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets information about the specified DDoS custom policy. + * This sample demonstrates how to gets information about the specified DDoS custom policy. * - * @summary Gets information about the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyGet.json + * @summary gets information about the specified DDoS custom policy. + * x-ms-original-file: 2025-07-01/DdosCustomPolicyGet.json */ async function getDDoSCustomPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.get( - resourceGroupName, - ddosCustomPolicyName, - ); + const result = await client.ddosCustomPolicies.get("rg1", "test-ddos-custom-policy"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesListAllSample.ts b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesListAllSample.ts new file mode 100644 index 000000000000..6602a234bacc --- /dev/null +++ b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesListAllSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets all the DDoS custom policies in a subscription. + * + * @summary gets all the DDoS custom policies in a subscription. + * x-ms-original-file: 2025-07-01/DdosCustomPolicyListAll.json + */ +async function listAllDDoSCustomPoliciesInSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.ddosCustomPolicies.listAll()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listAllDDoSCustomPoliciesInSubscription(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesListSample.ts b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesListSample.ts new file mode 100644 index 000000000000..7a7488b3f393 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets all the DDoS custom policies in a resource group. + * + * @summary gets all the DDoS custom policies in a resource group. + * x-ms-original-file: 2025-07-01/DdosCustomPolicyList.json + */ +async function listDDoSCustomPoliciesInAResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.ddosCustomPolicies.list("rg1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listDDoSCustomPoliciesInAResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesUpdateTagsSample.ts index e40ed50a2ca5..497e5cb8fa88 100644 --- a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update a DDoS custom policy tags. + * This sample demonstrates how to update a DDoS custom policy tags. * - * @summary Update a DDoS custom policy tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyUpdateTags.json + * @summary update a DDoS custom policy tags. + * x-ms-original-file: 2025-07-01/DdosCustomPolicyUpdateTags.json */ async function dDoSCustomPolicyUpdateTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.updateTags( - resourceGroupName, - ddosCustomPolicyName, - parameters, - ); + const result = await client.ddosCustomPolicies.updateTags("rg1", "test-ddos-custom-policy", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansCreateOrUpdateSample.ts index c94de9c1bef6..1b2af1966d1f 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansCreateOrUpdateSample.ts @@ -1,32 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - DdosProtectionPlan} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a DDoS protection plan. + * This sample demonstrates how to creates or updates a DDoS protection plan. * - * @summary Creates or updates a DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanCreate.json + * @summary creates or updates a DDoS protection plan. + * x-ms-original-file: 2025-07-01/DdosProtectionPlanCreate.json */ async function createDDoSProtectionPlan(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const parameters: DdosProtectionPlan = { location: "westus" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.beginCreateOrUpdateAndWait( - resourceGroupName, - ddosProtectionPlanName, - parameters, - ); + const result = await client.ddosProtectionPlans.createOrUpdate("rg1", "test-plan", { + location: "westus", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansDeleteSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansDeleteSample.ts index 7f27f8ef6a51..ff5c44e8ce26 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified DDoS protection plan. + * This sample demonstrates how to deletes the specified DDoS protection plan. * - * @summary Deletes the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanDelete.json + * @summary deletes the specified DDoS protection plan. + * x-ms-original-file: 2025-07-01/DdosProtectionPlanDelete.json */ async function deleteDDoSProtectionPlan(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.beginDeleteAndWait( - resourceGroupName, - ddosProtectionPlanName, - ); - console.log(result); + await client.ddosProtectionPlans.delete("rg1", "test-plan"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansGetSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansGetSample.ts index cf6fdb947582..8a3b49b37bf9 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansGetSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets information about the specified DDoS protection plan. + * This sample demonstrates how to gets information about the specified DDoS protection plan. * - * @summary Gets information about the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanGet.json + * @summary gets information about the specified DDoS protection plan. + * x-ms-original-file: 2025-07-01/DdosProtectionPlanGet.json */ async function getDDoSProtectionPlan(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.get( - resourceGroupName, - ddosProtectionPlanName, - ); + const result = await client.ddosProtectionPlans.get("rg1", "test-plan"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansListByResourceGroupSample.ts index d51ff6c4a8ca..f15d3ba6290f 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the DDoS protection plans in a resource group. + * This sample demonstrates how to gets all the DDoS protection plans in a resource group. * - * @summary Gets all the DDoS protection plans in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanList.json + * @summary gets all the DDoS protection plans in a resource group. + * x-ms-original-file: 2025-07-01/DdosProtectionPlanList.json */ async function listDDoSProtectionPlansInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.ddosProtectionPlans.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.ddosProtectionPlans.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansListSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansListSample.ts index d9a5e58cf379..88c4e93790bc 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansListSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all DDoS protection plans in a subscription. + * This sample demonstrates how to gets all DDoS protection plans in a subscription. * - * @summary Gets all DDoS protection plans in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanListAll.json + * @summary gets all DDoS protection plans in a subscription. + * x-ms-original-file: 2025-07-01/DdosProtectionPlanListAll.json */ async function listAllDDoSProtectionPlans(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.ddosProtectionPlans.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansUpdateTagsSample.ts index 93437e8cd9b8..dd6f2d9ff272 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update a DDoS protection plan tags. + * This sample demonstrates how to update a DDoS protection plan tags. * - * @summary Update a DDoS protection plan tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanUpdateTags.json + * @summary update a DDoS protection plan tags. + * x-ms-original-file: 2025-07-01/DdosProtectionPlanUpdateTags.json */ async function dDoSProtectionPlanUpdateTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.updateTags( - resourceGroupName, - ddosProtectionPlanName, - parameters, - ); + const result = await client.ddosProtectionPlans.updateTags("rg1", "test-plan", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/defaultSecurityRulesGetSample.ts b/sdk/network/arm-network/samples-dev/defaultSecurityRulesGetSample.ts index 045c432c164e..b3c14d3b4241 100644 --- a/sdk/network/arm-network/samples-dev/defaultSecurityRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/defaultSecurityRulesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get the specified default network security rule. + * This sample demonstrates how to get the specified default network security rule. * - * @summary Get the specified default network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DefaultSecurityRuleGet.json + * @summary get the specified default network security rule. + * x-ms-original-file: 2025-07-01/DefaultSecurityRuleGet.json */ async function defaultSecurityRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkSecurityGroupName = "nsg1"; - const defaultSecurityRuleName = "AllowVnetInBound"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.defaultSecurityRules.get( - resourceGroupName, - networkSecurityGroupName, - defaultSecurityRuleName, - ); + const result = await client.defaultSecurityRules.get("testrg", "nsg1", "AllowVnetInBound"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/defaultSecurityRulesListSample.ts b/sdk/network/arm-network/samples-dev/defaultSecurityRulesListSample.ts index a14c3d9288f5..cab0f28ba5b4 100644 --- a/sdk/network/arm-network/samples-dev/defaultSecurityRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/defaultSecurityRulesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all default security rules in a network security group. + * This sample demonstrates how to gets all default security rules in a network security group. * - * @summary Gets all default security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DefaultSecurityRuleList.json + * @summary gets all default security rules in a network security group. + * x-ms-original-file: 2025-07-01/DefaultSecurityRuleList.json */ async function defaultSecurityRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkSecurityGroupName = "nsg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.defaultSecurityRules.list( - resourceGroupName, - networkSecurityGroupName, - )) { + for await (const item of client.defaultSecurityRules.list("testrg", "nsg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkByTokenSample.ts b/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkByTokenSample.ts index 19e991016571..8ccad01fb7ce 100644 --- a/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkByTokenSample.ts +++ b/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkByTokenSample.ts @@ -1,42 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BastionShareableLinkTokenListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the Bastion Shareable Links for all the tokens specified in the request. + * This sample demonstrates how to deletes the Bastion Shareable Links for all the tokens specified in the request. * - * @summary Deletes the Bastion Shareable Links for all the tokens specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkDeleteByToken.json + * @summary deletes the Bastion Shareable Links for all the tokens specified in the request. + * x-ms-original-file: 2025-07-01/BastionShareableLinkDeleteByToken.json */ -async function deleteBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslTokenRequest: BastionShareableLinkTokenListRequest = { - tokens: [ - "abcd1234-efgh-hijk-5678-abcdefgh1234", - "dcba4321-hgfe-kjih-8765-hgfedcba4321", - ], - }; +async function deleteBastionShareableLinksForTheRequestVMs(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginDeleteBastionShareableLinkByTokenAndWait( - resourceGroupName, - bastionHostName, - bslTokenRequest, - ); - console.log(result); + await client.deleteBastionShareableLinkByToken("rg1", "bastionhosttenant", { + tokens: ["abcd1234-efgh-hijk-5678-abcdefgh1234", "dcba4321-hgfe-kjih-8765-hgfedcba4321"], + }); } async function main(): Promise { - await deleteBastionShareableLinksForTheRequestVMS(); + await deleteBastionShareableLinksForTheRequestVMs(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkSample.ts b/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkSample.ts index 5fe2cd046093..ed32befea7de 100644 --- a/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkSample.ts +++ b/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkSample.ts @@ -1,50 +1,37 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BastionShareableLinkListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the Bastion Shareable Links for all the VMs specified in the request. + * This sample demonstrates how to deletes the Bastion Shareable Links for all the VMs specified in the request. * - * @summary Deletes the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkDelete.json + * @summary deletes the Bastion Shareable Links for all the VMs specified in the request. + * x-ms-original-file: 2025-07-01/BastionShareableLinkDelete.json */ -async function deleteBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest: BastionShareableLinkListRequest = { +async function deleteBastionShareableLinksForTheRequestVMs(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.deleteBastionShareableLink("rg1", "bastionhosttenant", { vms: [ { vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", }, }, { vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", }, }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginDeleteBastionShareableLinkAndWait( - resourceGroupName, - bastionHostName, - bslRequest, - ); - console.log(result); + }); } async function main(): Promise { - await deleteBastionShareableLinksForTheRequestVMS(); + await deleteBastionShareableLinksForTheRequestVMs(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/disconnectActiveSessionsSample.ts b/sdk/network/arm-network/samples-dev/disconnectActiveSessionsSample.ts index 1e3e46af719a..56aca3af7c1c 100644 --- a/sdk/network/arm-network/samples-dev/disconnectActiveSessionsSample.ts +++ b/sdk/network/arm-network/samples-dev/disconnectActiveSessionsSample.ts @@ -1,32 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { SessionIds} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. + * This sample demonstrates how to returns the list of currently active sessions on the Bastion. * - * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionSessionDelete.json + * @summary returns the list of currently active sessions on the Bastion. + * x-ms-original-file: 2025-07-01/BastionSessionDelete.json */ async function deletesTheSpecifiedActiveSession(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const sessionIds: SessionIds = {}; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.listDisconnectActiveSessions( - resourceGroupName, - bastionHostName, - sessionIds, - )) { + for await (const item of client.disconnectActiveSessions("rg1", "bastionhosttenant", { + sessionIds: ["session1", "session2", "session3"], + })) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/dscpConfigurationCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/dscpConfigurationCreateOrUpdateSample.ts index 5ee041632229..ddd1c34493f2 100644 --- a/sdk/network/arm-network/samples-dev/dscpConfigurationCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/dscpConfigurationCreateOrUpdateSample.ts @@ -1,22 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { DscpConfiguration} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a DSCP Configuration. + * This sample demonstrates how to creates or updates a DSCP Configuration. * - * @summary Creates or updates a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationCreate.json + * @summary creates or updates a DSCP Configuration. + * x-ms-original-file: 2025-07-01/DscpConfigurationCreate.json */ async function createDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpconfig"; - const parameters: DscpConfiguration = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.dscpConfiguration.createOrUpdate("rg1", "mydscpconfig", { location: "eastus", qosDefinitionCollection: [ { @@ -39,15 +37,7 @@ async function createDscpConfiguration(): Promise { protocol: "Udp", }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.dscpConfigurationOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - dscpConfigurationName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/dscpConfigurationDeleteSample.ts b/sdk/network/arm-network/samples-dev/dscpConfigurationDeleteSample.ts index 300160211a32..e8ee10abd78c 100644 --- a/sdk/network/arm-network/samples-dev/dscpConfigurationDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/dscpConfigurationDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a DSCP Configuration. + * This sample demonstrates how to deletes a DSCP Configuration. * - * @summary Deletes a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationDelete.json + * @summary deletes a DSCP Configuration. + * x-ms-original-file: 2025-07-01/DscpConfigurationDelete.json */ async function deleteDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpConfig"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.beginDeleteAndWait( - resourceGroupName, - dscpConfigurationName, - ); - console.log(result); + await client.dscpConfiguration.delete("rg1", "mydscpConfig"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/dscpConfigurationGetSample.ts b/sdk/network/arm-network/samples-dev/dscpConfigurationGetSample.ts index 567ff7c80a53..a8d34b255d43 100644 --- a/sdk/network/arm-network/samples-dev/dscpConfigurationGetSample.ts +++ b/sdk/network/arm-network/samples-dev/dscpConfigurationGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a DSCP Configuration. + * This sample demonstrates how to gets a DSCP Configuration. * - * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationGet.json + * @summary gets a DSCP Configuration. + * x-ms-original-file: 2025-07-01/DscpConfigurationGet.json */ async function getDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpConfig"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.get( - resourceGroupName, - dscpConfigurationName, - ); + const result = await client.dscpConfiguration.get("rg1", "mydscpConfig"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/dscpConfigurationListAllSample.ts b/sdk/network/arm-network/samples-dev/dscpConfigurationListAllSample.ts index fa4707dd4259..359d912a2847 100644 --- a/sdk/network/arm-network/samples-dev/dscpConfigurationListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/dscpConfigurationListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all dscp configurations in a subscription. + * This sample demonstrates how to gets all dscp configurations in a subscription. * - * @summary Gets all dscp configurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationListAll.json + * @summary gets all dscp configurations in a subscription. + * x-ms-original-file: 2025-07-01/DscpConfigurationListAll.json */ async function listAllNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.dscpConfigurationOperations.listAll()) { + for await (const item of client.dscpConfiguration.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/dscpConfigurationListSample.ts b/sdk/network/arm-network/samples-dev/dscpConfigurationListSample.ts index e8c65d63f939..b0507b062dee 100644 --- a/sdk/network/arm-network/samples-dev/dscpConfigurationListSample.ts +++ b/sdk/network/arm-network/samples-dev/dscpConfigurationListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a DSCP Configuration. + * This sample demonstrates how to gets a DSCP Configuration. * - * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationList.json + * @summary gets a DSCP Configuration. + * x-ms-original-file: 2025-07-01/DscpConfigurationList.json */ async function getDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.dscpConfigurationOperations.list( - resourceGroupName, - )) { + for await (const item of client.dscpConfiguration.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts index 6601e16793a7..0e02ed98272a 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ExpressRouteCircuitAuthorization} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates an authorization in the specified express route circuit. + * This sample demonstrates how to creates or updates an authorization in the specified express route circuit. * - * @summary Creates or updates an authorization in the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json + * @summary creates or updates an authorization in the specified express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitAuthorizationCreate.json */ async function createExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizatinName"; - const authorizationParameters: ExpressRouteCircuitAuthorization = {}; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitAuthorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - authorizationName, - authorizationParameters, - ); + const result = await client.expressRouteCircuitAuthorizations.createOrUpdate( + "rg1", + "circuitName", + "authorizatinName", + {}, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsDeleteSample.ts index bc8dad6f1d2d..75a9282f46c7 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsDeleteSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified authorization from the specified express route circuit. + * This sample demonstrates how to deletes the specified authorization from the specified express route circuit. * - * @summary Deletes the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json + * @summary deletes the specified authorization from the specified express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitAuthorizationDelete.json */ async function deleteExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizationName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitAuthorizations.beginDeleteAndWait( - resourceGroupName, - circuitName, - authorizationName, - ); - console.log(result); + await client.expressRouteCircuitAuthorizations.delete("rg1", "circuitName", "authorizationName"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsGetSample.ts index 5d11332b71ab..e965c4908806 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified authorization from the specified express route circuit. + * This sample demonstrates how to gets the specified authorization from the specified express route circuit. * - * @summary Gets the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationGet.json + * @summary gets the specified authorization from the specified express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitAuthorizationGet.json */ async function getExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizationName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteCircuitAuthorizations.get( - resourceGroupName, - circuitName, - authorizationName, + "rg1", + "circuitName", + "authorizationName", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsListSample.ts index d09c01d045de..ae873d2139b8 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all authorizations in an express route circuit. + * This sample demonstrates how to gets all authorizations in an express route circuit. * - * @summary Gets all authorizations in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationList.json + * @summary gets all authorizations in an express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitAuthorizationList.json */ async function listExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.expressRouteCircuitAuthorizations.list( - resourceGroupName, - circuitName, - )) { + for await (const item of client.expressRouteCircuitAuthorizations.list("rg1", "circuitName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsCreateOrUpdateSample.ts index 67505d778227..b5cee3701d94 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsCreateOrUpdateSample.ts @@ -1,48 +1,36 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ExpressRouteCircuitConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * This sample demonstrates how to creates or updates a Express Route Circuit Connection in the specified express route circuits. * - * @summary Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionCreate.json + * @summary creates or updates a Express Route Circuit Connection in the specified express route circuits. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitConnectionCreate.json */ async function expressRouteCircuitConnectionCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection = + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteCircuitConnections.createOrUpdate( + "rg1", + "ExpressRouteARMCircuitA", + "AzurePrivatePeering", + "circuitConnectionUSAUS", { addressPrefix: "10.0.0.0/29", authorizationKey: "946a1918-b7a2-4917-b43c-8c4cdaee006a", expressRouteCircuitPeering: { - id: "/subscriptions/subid1/resourceGroups/dedharcktinit/providers/Microsoft.Network/expressRouteCircuits/dedharcktlocal/peerings/AzurePrivatePeering", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dedharcktinit/providers/Microsoft.Network/expressRouteCircuits/dedharcktlocal/peerings/AzurePrivatePeering", }, ipv6CircuitConnectionConfig: { addressPrefix: "aa:bb::/125" }, peerExpressRouteCircuitPeering: { - id: "/subscriptions/subid2/resourceGroups/dedharcktpeer/providers/Microsoft.Network/expressRouteCircuits/dedharcktremote/peerings/AzurePrivatePeering", + id: "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/dedharcktpeer/providers/Microsoft.Network/expressRouteCircuits/dedharcktremote/peerings/AzurePrivatePeering", }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - peeringName, - connectionName, - expressRouteCircuitConnectionParameters, - ); + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsDeleteSample.ts index 151fd8e36568..1cc5effe122f 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsDeleteSample.ts @@ -3,29 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * This sample demonstrates how to deletes the specified Express Route Circuit Connection from the specified express route circuit. * - * @summary Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionDelete.json + * @summary deletes the specified Express Route Circuit Connection from the specified express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitConnectionDelete.json */ async function deleteExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitConnections.beginDeleteAndWait( - resourceGroupName, - circuitName, - peeringName, - connectionName, + await client.expressRouteCircuitConnections.delete( + "rg1", + "ExpressRouteARMCircuitA", + "AzurePrivatePeering", + "circuitConnectionUSAUS", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsGetSample.ts index 51c192d1b0c7..c2cc862685d7 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsGetSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Express Route Circuit Connection from the specified express route circuit. + * This sample demonstrates how to gets the specified Express Route Circuit Connection from the specified express route circuit. * - * @summary Gets the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionGet.json + * @summary gets the specified Express Route Circuit Connection from the specified express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitConnectionGet.json */ async function expressRouteCircuitConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteCircuitConnections.get( - resourceGroupName, - circuitName, - peeringName, - connectionName, + "rg1", + "ExpressRouteARMCircuitA", + "AzurePrivatePeering", + "circuitConnectionUSAUS", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsListSample.ts index c76cc815da65..98856938ea44 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsListSample.ts @@ -3,29 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all global reach connections associated with a private peering in an express route circuit. + * This sample demonstrates how to gets all global reach connections associated with a private peering in an express route circuit. * - * @summary Gets all global reach connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionList.json + * @summary gets all global reach connections associated with a private peering in an express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitConnectionList.json */ async function listExpressRouteCircuitConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.expressRouteCircuitConnections.list( - resourceGroupName, - circuitName, - peeringName, + "rg1", + "ExpressRouteARMCircuitA", + "AzurePrivatePeering", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsCreateOrUpdateSample.ts index 95b612c2178a..35d18ceb30b8 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsCreateOrUpdateSample.ts @@ -1,40 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ExpressRouteCircuitPeering} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a peering in the specified express route circuits. + * This sample demonstrates how to creates or updates a peering in the specified express route circuits. * - * @summary Creates or updates a peering in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringCreate.json + * @summary creates or updates a peering in the specified express route circuits. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitPeeringCreate.json */ async function createExpressRouteCircuitPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "AzurePrivatePeering"; - const peeringParameters: ExpressRouteCircuitPeering = { - peerASN: 200, - primaryPeerAddressPrefix: "192.168.16.252/30", - secondaryPeerAddressPrefix: "192.168.18.252/30", - vlanId: 200, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - peeringName, - peeringParameters, - ); + const result = await client.expressRouteCircuitPeerings.createOrUpdate( + "rg1", + "circuitName", + "AzurePrivatePeering", + { + peerASN: 200, + primaryPeerAddressPrefix: "192.168.16.252/30", + secondaryPeerAddressPrefix: "192.168.18.252/30", + vlanId: 200, + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsDeleteSample.ts index cd1237ce282a..3d0c5c5935b6 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified peering from the specified express route circuit. + * This sample demonstrates how to deletes the specified peering from the specified express route circuit. * - * @summary Deletes the specified peering from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringDelete.json + * @summary deletes the specified peering from the specified express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitPeeringDelete.json */ async function deleteExpressRouteCircuitPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitPeerings.beginDeleteAndWait( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); + await client.expressRouteCircuitPeerings.delete("rg1", "circuitName", "peeringName"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsGetSample.ts index 520a505e9675..bf4543640dc6 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified peering for the express route circuit. + * This sample demonstrates how to gets the specified peering for the express route circuit. * - * @summary Gets the specified peering for the express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringGet.json + * @summary gets the specified peering for the express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitPeeringGet.json */ async function getExpressRouteCircuitPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "MicrosoftPeering"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteCircuitPeerings.get( - resourceGroupName, - circuitName, - peeringName, + "rg1", + "circuitName", + "MicrosoftPeering", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsListSample.ts index 493552648ce4..c750b4a6c30c 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all peerings in a specified express route circuit. + * This sample demonstrates how to gets all peerings in a specified express route circuit. * - * @summary Gets all peerings in a specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringList.json + * @summary gets all peerings in a specified express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitPeeringList.json */ async function listExpressRouteCircuitPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.expressRouteCircuitPeerings.list( - resourceGroupName, - circuitName, - )) { + for await (const item of client.expressRouteCircuitPeerings.list("rg1", "circuitName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsCreateOrUpdateSample.ts index 335e0e1cfd32..323cb4cbf41e 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsCreateOrUpdateSample.ts @@ -1,81 +1,54 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ExpressRouteCircuit} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates an express route circuit. + * This sample demonstrates how to creates or updates an express route circuit. * - * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitCreate.json + * @summary creates or updates an express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitCreate.json */ async function createExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const parameters: ExpressRouteCircuit = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteCircuits.createOrUpdate("rg1", "circuitName", { + location: "Brazil South", allowClassicOperations: false, authorizations: [], - location: "Brazil South", peerings: [], serviceProviderProperties: { bandwidthInMbps: 200, peeringLocation: "Silicon Valley", serviceProviderName: "Equinix", }, - sku: { - name: "Standard_MeteredData", - family: "MeteredData", - tier: "Standard", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - parameters, - ); + sku: { name: "Standard_MeteredData", family: "MeteredData", tier: "Standard" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an express route circuit. + * This sample demonstrates how to creates or updates an express route circuit. * - * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json + * @summary creates or updates an express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitCreateOnExpressRoutePort.json */ async function createExpressRouteCircuitOnExpressRoutePort(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "expressRouteCircuit1"; - const parameters: ExpressRouteCircuit = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteCircuits.createOrUpdate("rg1", "expressRouteCircuit1", { + location: "westus", authorizationKey: "b0be57f5-1fba-463b-adec-ffe767354cdd", bandwidthInGbps: 10, enableDirectPortRateLimit: false, expressRoutePort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRoutePorts/portName", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/expressRoutePorts/portName", }, - location: "westus", - sku: { - name: "Premium_MeteredData", - family: "MeteredData", - tier: "Premium", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - parameters, - ); + sku: { name: "Premium_MeteredData", family: "MeteredData", tier: "Premium" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsDeleteSample.ts index d56581a3b339..f1fdb7aa5d82 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified express route circuit. + * This sample demonstrates how to deletes the specified express route circuit. * - * @summary Deletes the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitDelete.json + * @summary deletes the specified express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitDelete.json */ async function deleteExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginDeleteAndWait( - resourceGroupName, - circuitName, - ); - console.log(result); + await client.expressRouteCircuits.delete("rg1", "circuitName"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsSample.ts new file mode 100644 index 000000000000..c35857e6b913 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves the details of all the link failover tests performed on the express route circuit. + * + * @summary retrieves the details of all the link failover tests performed on the express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitGetCircuitLinkFailoverAllTestsDetails.json + */ +async function expressRouteCircuitGetCircuitLinkFailoverAllTestsDetails(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteCircuits.getCircuitLinkFailoverAllTestsDetails( + "rg1", + "circuit1", + { failoverTestType: "SingleSiteFailover", fetchLatest: true }, + ); + console.log(result); +} + +async function main(): Promise { + await expressRouteCircuitGetCircuitLinkFailoverAllTestsDetails(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsSample.ts new file mode 100644 index 000000000000..0ade72591b2f --- /dev/null +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves the details of a particular link failover test performed on the express route circuit. + * + * @summary retrieves the details of a particular link failover test performed on the express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitGetCircuitLinkFailoverSingleTestDetails.json + */ +async function expressRouteCircuitGetCircuitLinkFailoverSingleTestDetails(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteCircuits.getCircuitLinkFailoverSingleTestDetails( + "rg1", + "circuit1", + "Primary", + "BgpDisconnect", + "00000000-0000-0000-0000-000000000001", + ); + console.log(result); +} + +async function main(): Promise { + await expressRouteCircuitGetCircuitLinkFailoverSingleTestDetails(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetPeeringStatsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetPeeringStatsSample.ts index e737f1698c27..eeb71f12a2e1 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetPeeringStatsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetPeeringStatsSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all stats from an express route circuit in a resource group. + * This sample demonstrates how to gets all stats from an express route circuit in a resource group. * - * @summary Gets all stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringStats.json + * @summary gets all stats from an express route circuit in a resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitPeeringStats.json */ async function getExpressRouteCircuitPeeringTrafficStats(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteCircuits.getPeeringStats( - resourceGroupName, - circuitName, - peeringName, + "rg1", + "circuitName", + "peeringName", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetSample.ts index a00ad69f406f..2d1d97e154c8 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets information about the specified express route circuit. + * This sample demonstrates how to gets information about the specified express route circuit. * - * @summary Gets information about the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitGet.json + * @summary gets information about the specified express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitGet.json */ async function getExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.get( - resourceGroupName, - circuitName, - ); + const result = await client.expressRouteCircuits.get("rg1", "circuitName"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetStatsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetStatsSample.ts index 346ce7de9106..69a27a71016e 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetStatsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetStatsSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the stats from an express route circuit in a resource group. + * This sample demonstrates how to gets all the stats from an express route circuit in a resource group. * - * @summary Gets all the stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitStats.json + * @summary gets all the stats from an express route circuit in a resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitStats.json */ async function getExpressRouteCircuitTrafficStats(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.getStats( - resourceGroupName, - circuitName, - ); + const result = await client.expressRouteCircuits.getStats("rg1", "circuitName"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListAllSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListAllSample.ts index 5b5a80fff24f..50e07bdd8b0c 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the express route circuits in a subscription. + * This sample demonstrates how to gets all the express route circuits in a subscription. * - * @summary Gets all the express route circuits in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitListBySubscription.json + * @summary gets all the express route circuits in a subscription. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitListBySubscription.json */ async function listExpressRouteCircuitsInASubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.expressRouteCircuits.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListArpTableSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListArpTableSample.ts index 5db37c07ca5a..337f6787ba4c 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListArpTableSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListArpTableSample.ts @@ -3,33 +3,28 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route circuit in a resource group. + * This sample demonstrates how to gets the currently advertised ARP table associated with the express route circuit in a resource group. * - * @summary Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitARPTableList.json + * @summary gets the currently advertised ARP table associated with the express route circuit in a resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitARPTableList.json */ -async function listArpTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; +async function listARPTable(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListArpTableAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, + const result = await client.expressRouteCircuits.listArpTable( + "rg1", + "circuitName", + "peeringName", + "devicePath", ); console.log(result); } async function main(): Promise { - await listArpTable(); + await listARPTable(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSample.ts index cfcb1e2a4912..4c4626cf8cf2 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the currently advertised routes table associated with the express route circuit in a resource group. + * This sample demonstrates how to gets the currently advertised routes table associated with the express route circuit in a resource group. * - * @summary Gets the currently advertised routes table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitRouteTableList.json + * @summary gets the currently advertised routes table associated with the express route circuit in a resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitRouteTableList.json */ async function listRouteTables(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListRoutesTableAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, + const result = await client.expressRouteCircuits.listRoutesTable( + "rg1", + "circuitName", + "peeringName", + "devicePath", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSummarySample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSummarySample.ts index 5077bdf1d7a6..83c0c3f4f7dd 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSummarySample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSummarySample.ts @@ -3,29 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the currently advertised routes table summary associated with the express route circuit in a resource group. + * This sample demonstrates how to gets the currently advertised routes table summary associated with the express route circuit in a resource group. * - * @summary Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json + * @summary gets the currently advertised routes table summary associated with the express route circuit in a resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitRouteTableSummaryList.json */ async function listRouteTableSummary(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuits.beginListRoutesTableSummaryAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); + const result = await client.expressRouteCircuits.listRoutesTableSummary( + "rg1", + "circuitName", + "peeringName", + "devicePath", + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListSample.ts index 1fac3f08ba30..63ed145aa021 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the express route circuits in a resource group. + * This sample demonstrates how to gets all the express route circuits in a resource group. * - * @summary Gets all the express route circuits in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitListByResourceGroup.json + * @summary gets all the express route circuits in a resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitListByResourceGroup.json */ async function listExpressRouteCircuitsInAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.expressRouteCircuits.list( - resourceGroupName, - )) { + for await (const item of client.expressRouteCircuits.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsStartCircuitLinkFailoverTestSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsStartCircuitLinkFailoverTestSample.ts new file mode 100644 index 000000000000..174b0f49c79b --- /dev/null +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsStartCircuitLinkFailoverTestSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to starts link failover simulation on the express route circuit for the specified link type and test category. + * + * @summary starts link failover simulation on the express route circuit for the specified link type and test category. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitStartCircuitLinkFailoverTest.json + */ +async function expressRouteCircuitStartCircuitLinkFailoverTest(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteCircuits.startCircuitLinkFailoverTest( + "rg1", + "circuit1", + "Primary", + "BgpDisconnect", + ); + console.log(result); +} + +async function main(): Promise { + await expressRouteCircuitStartCircuitLinkFailoverTest(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsStopCircuitLinkFailoverTestSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsStopCircuitLinkFailoverTestSample.ts new file mode 100644 index 000000000000..1d53accd2e1e --- /dev/null +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsStopCircuitLinkFailoverTestSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to stops link failover simulation on the express route circuit. + * + * @summary stops link failover simulation on the express route circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitStopCircuitLinkFailoverTest.json + */ +async function expressRouteCircuitStopCircuitLinkFailoverTest(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteCircuits.stopCircuitLinkFailoverTest("rg1", "circuit1"); + console.log(result); +} + +async function main(): Promise { + await expressRouteCircuitStopCircuitLinkFailoverTest(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsUpdateTagsSample.ts index 4377297ad0dd..f9457753e5c5 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates an express route circuit tags. + * This sample demonstrates how to updates an express route circuit tags. * - * @summary Updates an express route circuit tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitUpdateTags.json + * @summary updates an express route circuit tags. + * x-ms-original-file: 2025-07-01/ExpressRouteCircuitUpdateTags.json */ async function updateExpressRouteCircuitTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "ertest"; - const circuitName = "er1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.updateTags( - resourceGroupName, - circuitName, - parameters, - ); + const result = await client.expressRouteCircuits.updateTags("ertest", "er1", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteConnectionsCreateOrUpdateSample.ts index c80f5513dd2d..f46c013b2066 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteConnectionsCreateOrUpdateSample.ts @@ -1,69 +1,58 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ExpressRouteConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + * This sample demonstrates how to creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. * - * @summary Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionCreate.json + * @summary creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteConnectionCreate.json */ async function expressRouteConnectionCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "gateway-2"; - const connectionName = "connectionName"; - const putExpressRouteConnectionParameters: ExpressRouteConnection = { - name: "connectionName", - authorizationKey: "authorizationKey", - expressRouteCircuitPeering: { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering", - }, - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/gateway-2/expressRouteConnections/connectionName", - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteConnections.createOrUpdate( + "resourceGroupName", + "gateway-2", + "connectionName", + { + name: "connectionName", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/gateway-2/expressRouteConnections/connectionName", + authorizationKey: "authorizationKey", + expressRouteCircuitPeering: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering", }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], + routingConfiguration: { + associatedRouteTable: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", + }, + inboundRouteMap: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", + }, + outboundRouteMap: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", + }, + propagatedRouteTables: { + ids: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", + }, + ], + labels: ["label1", "label2"], + }, }, + routingWeight: 2, }, - routingWeight: 2, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRouteGatewayName, - connectionName, - putExpressRouteConnectionParameters, - ); + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteConnectionsDeleteSample.ts index 6229aea64b93..5c467046f458 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteConnectionsDeleteSample.ts @@ -3,28 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a connection to a ExpressRoute circuit. + * This sample demonstrates how to deletes a connection to a ExpressRoute circuit. * - * @summary Deletes a connection to a ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionDelete.json + * @summary deletes a connection to a ExpressRoute circuit. + * x-ms-original-file: 2025-07-01/ExpressRouteConnectionDelete.json */ async function expressRouteConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const connectionName = "connectionName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.beginDeleteAndWait( - resourceGroupName, - expressRouteGatewayName, - connectionName, + await client.expressRouteConnections.delete( + "resourceGroupName", + "expressRouteGatewayName", + "connectionName", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/expressRouteConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteConnectionsGetSample.ts index d73a3344f9ab..ad06bf9ffbd9 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteConnectionsGetSample.ts @@ -3,26 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified ExpressRouteConnection. + * This sample demonstrates how to gets the specified ExpressRouteConnection. * - * @summary Gets the specified ExpressRouteConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionGet.json + * @summary gets the specified ExpressRouteConnection. + * x-ms-original-file: 2025-07-01/ExpressRouteConnectionGet.json */ async function expressRouteConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const connectionName = "connectionName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteConnections.get( - resourceGroupName, - expressRouteGatewayName, - connectionName, + "resourceGroupName", + "expressRouteGatewayName", + "connectionName", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteConnectionsListSample.ts index 7f7ca42a2930..822bda30c825 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteConnectionsListSample.ts @@ -3,24 +3,20 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists ExpressRouteConnections. + * This sample demonstrates how to lists ExpressRouteConnections. * - * @summary Lists ExpressRouteConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionList.json + * @summary lists ExpressRouteConnections. + * x-ms-original-file: 2025-07-01/ExpressRouteConnectionList.json */ async function expressRouteConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteConnections.list( - resourceGroupName, - expressRouteGatewayName, + "resourceGroupName", + "expressRouteGatewayName", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts index d7a4e5af4a5b..378314a34c22 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts @@ -1,45 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ExpressRouteCrossConnectionPeering} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a peering in the specified ExpressRouteCrossConnection. + * This sample demonstrates how to creates or updates a peering in the specified ExpressRouteCrossConnection. * - * @summary Creates or updates a peering in the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json + * @summary creates or updates a peering in the specified ExpressRouteCrossConnection. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionBgpPeeringCreate.json */ async function expressRouteCrossConnectionBgpPeeringCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const peeringParameters: ExpressRouteCrossConnectionPeering = { - ipv6PeeringConfig: { - primaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::/126", - secondaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::4/126", - }, - peerASN: 200, - primaryPeerAddressPrefix: "192.168.16.252/30", - secondaryPeerAddressPrefix: "192.168.18.252/30", - vlanId: 200, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnectionPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - peeringParameters, - ); + const result = await client.expressRouteCrossConnectionPeerings.createOrUpdate( + "CrossConnection-SiliconValley", + "", + "AzurePrivatePeering", + { + ipv6PeeringConfig: { + primaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::/126", + secondaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::4/126", + }, + peerASN: 200, + primaryPeerAddressPrefix: "192.168.16.252/30", + secondaryPeerAddressPrefix: "192.168.18.252/30", + vlanId: 200, + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsDeleteSample.ts index 96746a9b3fd8..f6d54867134a 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsDeleteSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified peering from the ExpressRouteCrossConnection. + * This sample demonstrates how to deletes the specified peering from the ExpressRouteCrossConnection. * - * @summary Deletes the specified peering from the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json + * @summary deletes the specified peering from the ExpressRouteCrossConnection. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionBgpPeeringDelete.json */ async function deleteExpressRouteCrossConnectionBgpPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnectionPeerings.beginDeleteAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - ); - console.log(result); + await client.expressRouteCrossConnectionPeerings.delete( + "CrossConnection-SiliconValley", + "", + "AzurePrivatePeering", + ); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsGetSample.ts index bca6150c9d30..dcf28eae5e32 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsGetSample.ts @@ -3,26 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified peering for the ExpressRouteCrossConnection. + * This sample demonstrates how to gets the specified peering for the ExpressRouteCrossConnection. * - * @summary Gets the specified peering for the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + * @summary gets the specified peering for the ExpressRouteCrossConnection. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionBgpPeeringGet.json */ async function getExpressRouteCrossConnectionBgpPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteCrossConnectionPeerings.get( - resourceGroupName, - crossConnectionName, - peeringName, + "CrossConnection-SiliconValley", + "", + "AzurePrivatePeering", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsListSample.ts index 3b12464e137f..d39564cd48ef 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsListSample.ts @@ -3,28 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all peerings in a specified ExpressRouteCrossConnection. + * This sample demonstrates how to gets all peerings in a specified ExpressRouteCrossConnection. * - * @summary Gets all peerings in a specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json + * @summary gets all peerings in a specified ExpressRouteCrossConnection. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionBgpPeeringList.json */ async function expressRouteCrossConnectionBgpPeeringList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.expressRouteCrossConnectionPeerings.list( - resourceGroupName, - crossConnectionName, + "CrossConnection-SiliconValley", + "", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsCreateOrUpdateSample.ts index eaf7ecee7a8c..7d575537d097 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsCreateOrUpdateSample.ts @@ -1,36 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ExpressRouteCrossConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update the specified ExpressRouteCrossConnection. + * This sample demonstrates how to update the specified ExpressRouteCrossConnection. * - * @summary Update the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionUpdate.json + * @summary update the specified ExpressRouteCrossConnection. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionUpdate.json */ async function updateExpressRouteCrossConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const parameters: ExpressRouteCrossConnection = { - serviceProviderProvisioningState: "NotProvisioned", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - crossConnectionName, - parameters, - ); + const result = await client.expressRouteCrossConnections.createOrUpdate( + "CrossConnection-SiliconValley", + "", + { serviceProviderProvisioningState: "NotProvisioned" }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsGetSample.ts index 473def1a59a5..68b81ff096fc 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsGetSample.ts @@ -3,24 +3,20 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets details about the specified ExpressRouteCrossConnection. + * This sample demonstrates how to gets details about the specified ExpressRouteCrossConnection. * - * @summary Gets details about the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionGet.json + * @summary gets details about the specified ExpressRouteCrossConnection. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionGet.json */ async function getExpressRouteCrossConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteCrossConnections.get( - resourceGroupName, - crossConnectionName, + "CrossConnection-SiliconValley", + "", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListArpTableSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListArpTableSample.ts index 2cc2571fc03b..24f04030b5b8 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListArpTableSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListArpTableSample.ts @@ -3,30 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * This sample demonstrates how to gets the currently advertised ARP table associated with the express route cross connection in a resource group. * - * @summary Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsArpTable.json + * @summary gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionsArpTable.json */ async function getExpressRouteCrossConnectionsArpTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginListArpTableAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); + const result = await client.expressRouteCrossConnections.listArpTable( + "CrossConnection-SiliconValley", + "", + "AzurePrivatePeering", + "primary", + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListByResourceGroupSample.ts index 4c6122345a38..70cb75579a37 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListByResourceGroupSample.ts @@ -3,26 +3,24 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a resource group. + * This sample demonstrates how to retrieves all the ExpressRouteCrossConnections in a resource group. * - * @summary Retrieves all the ExpressRouteCrossConnections in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json + * @summary retrieves all the ExpressRouteCrossConnections in a resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionListByResourceGroup.json */ async function expressRouteCrossConnectionListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.expressRouteCrossConnections.listByResourceGroup( - resourceGroupName, + "CrossConnection-SiliconValley", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSample.ts index 12cbd1ef6939..7328c11b8df9 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSample.ts @@ -3,30 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * This sample demonstrates how to gets the currently advertised routes table associated with the express route cross connection in a resource group. * - * @summary Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json + * @summary gets the currently advertised routes table associated with the express route cross connection in a resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionsRouteTable.json */ async function getExpressRouteCrossConnectionsRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginListRoutesTableAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); + const result = await client.expressRouteCrossConnections.listRoutesTable( + "CrossConnection-SiliconValley", + "", + "AzurePrivatePeering", + "primary", + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSummarySample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSummarySample.ts index 6cd4a4f0cf25..b1bd34cf0b47 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSummarySample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSummarySample.ts @@ -3,30 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the route table summary associated with the express route cross connection in a resource group. + * This sample demonstrates how to gets the route table summary associated with the express route cross connection in a resource group. * - * @summary Gets the route table summary associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json + * @summary gets the route table summary associated with the express route cross connection in a resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionsRouteTableSummary.json */ async function getExpressRouteCrossConnectionsRouteTableSummary(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginListRoutesTableSummaryAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); + const result = await client.expressRouteCrossConnections.listRoutesTableSummary( + "CrossConnection-SiliconValley", + "", + "AzurePrivatePeering", + "primary", + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListSample.ts index 246a69735b5d..21be8ae7028b 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a subscription. + * This sample demonstrates how to retrieves all the ExpressRouteCrossConnections in a subscription. * - * @summary Retrieves all the ExpressRouteCrossConnections in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionList.json + * @summary retrieves all the ExpressRouteCrossConnections in a subscription. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionList.json */ async function expressRouteCrossConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.expressRouteCrossConnections.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsUpdateTagsSample.ts index 9fb54128b985..847a2dbaa7ec 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsUpdateTagsSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates an express route cross connection tags. + * This sample demonstrates how to updates an express route cross connection tags. * - * @summary Updates an express route cross connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json + * @summary updates an express route cross connection tags. + * x-ms-original-file: 2025-07-01/ExpressRouteCrossConnectionUpdateTags.json */ async function updateExpressRouteCrossConnectionTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const crossConnectionParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteCrossConnections.updateTags( - resourceGroupName, - crossConnectionName, - crossConnectionParameters, + "CrossConnection-SiliconValley", + "", + { tags: { tag1: "value1", tag2: "value2" } }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysCreateOrUpdateSample.ts index 9f9709010620..d5c913084d0d 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysCreateOrUpdateSample.ts @@ -1,39 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ExpressRouteGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a ExpressRoute gateway in a specified resource group. + * This sample demonstrates how to creates or updates a ExpressRoute gateway in a specified resource group. * - * @summary Creates or updates a ExpressRoute gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayCreate.json + * @summary creates or updates a ExpressRoute gateway in a specified resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayCreate.json */ async function expressRouteGatewayCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "gateway-2"; - const putExpressRouteGatewayParameters: ExpressRouteGateway = { - allowNonVirtualWanTraffic: false, - autoScaleConfiguration: { bounds: { min: 3 } }, - location: "westus", - virtualHub: { - id: "/subscriptions/subid/resourceGroups/resourceGroupId/providers/Microsoft.Network/virtualHubs/virtualHubName", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRouteGatewayName, - putExpressRouteGatewayParameters, + const result = await client.expressRouteGateways.createOrUpdate( + "resourceGroupName", + "gateway-2", + { + location: "westus", + allowNonVirtualWanTraffic: false, + autoScaleConfiguration: { bounds: { min: 3 } }, + virtualHub: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupId/providers/Microsoft.Network/virtualHubs/virtualHubName", + }, + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysDeleteSample.ts index 76d66d87e37d..1995603b1d92 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysDeleteSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. + * This sample demonstrates how to deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. * - * @summary Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayDelete.json + * @summary deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayDelete.json */ async function expressRouteGatewayDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginDeleteAndWait( - resourceGroupName, - expressRouteGatewayName, - ); - console.log(result); + await client.expressRouteGateways.delete("resourceGroupName", "expressRouteGatewayName"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetFailoverAllTestsDetailsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetFailoverAllTestsDetailsSample.ts new file mode 100644 index 000000000000..83aed911b0a6 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetFailoverAllTestsDetailsSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves the details of all the failover tests performed on the ExpressRoute gateway for different peering locations. + * + * @summary retrieves the details of all the failover tests performed on the ExpressRoute gateway for different peering locations. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayGetFailoverAllTestsDetails.json + */ +async function expressRouteGatewayGetFailoverAllTestsDetails(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteGateways.getFailoverAllTestsDetails("rg1", "ergw1", { + typeParam: "SingleSiteFailover", + fetchLatest: true, + }); + console.log(result); +} + +async function main(): Promise { + await expressRouteGatewayGetFailoverAllTestsDetails(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetFailoverSingleTestDetailsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetFailoverSingleTestDetailsSample.ts new file mode 100644 index 000000000000..80d0cc4bcb4e --- /dev/null +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetFailoverSingleTestDetailsSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves the details of a particular failover test performed on the ExpressRoute gateway based on the test Guid. + * + * @summary retrieves the details of a particular failover test performed on the ExpressRoute gateway based on the test Guid. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayGetFailoverSingleTestDetails.json + */ +async function expressRouteGatewayGetFailoverSingleTestDetails(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteGateways.getFailoverSingleTestDetails( + "rg1", + "ergw1", + "Vancouver", + "00000000-0000-0000-0000-000000000001", + ); + console.log(result); +} + +async function main(): Promise { + await expressRouteGatewayGetFailoverSingleTestDetails(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetResiliencyInformationSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetResiliencyInformationSample.ts new file mode 100644 index 000000000000..87c635e346e2 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetResiliencyInformationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves the resiliency information for the ExpressRoute gateway. + * + * @summary retrieves the resiliency information for the ExpressRoute gateway. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayGetResiliencyInformation.json + */ +async function expressRouteGatewayGetResiliencyInformation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteGateways.getResiliencyInformation("rg1", "ergw1", { + attemptRefresh: false, + }); + console.log(result); +} + +async function main(): Promise { + await expressRouteGatewayGetResiliencyInformation(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetRoutesInformationSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetRoutesInformationSample.ts new file mode 100644 index 000000000000..dd6b77ea73b0 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetRoutesInformationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves the route sets information for the ExpressRoute gateway. + * + * @summary retrieves the route sets information for the ExpressRoute gateway. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayGetRoutesInformation.json + */ +async function expressRouteGatewayGetRoutesInformation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteGateways.getRoutesInformation("rg1", "ergw1", { + attemptRefresh: false, + }); + console.log(result); +} + +async function main(): Promise { + await expressRouteGatewayGetRoutesInformation(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetSample.ts index e805e43e68be..4e435562db13 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetSample.ts @@ -3,24 +3,20 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Fetches the details of a ExpressRoute gateway in a resource group. + * This sample demonstrates how to fetches the details of a ExpressRoute gateway in a resource group. * - * @summary Fetches the details of a ExpressRoute gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayGet.json + * @summary fetches the details of a ExpressRoute gateway in a resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayGet.json */ async function expressRouteGatewayGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteGateways.get( - resourceGroupName, - expressRouteGatewayName, + "resourceGroupName", + "expressRouteGatewayName", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysListByResourceGroupSample.ts index 8e3ddb0a6fd3..7f99c6c2ef96 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysListByResourceGroupSample.ts @@ -3,22 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists ExpressRoute gateways in a given resource group. + * This sample demonstrates how to lists ExpressRoute gateways in a given resource group. * - * @summary Lists ExpressRoute gateways in a given resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayListByResourceGroup.json + * @summary lists ExpressRoute gateways in a given resource group. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayListByResourceGroup.json */ async function expressRouteGatewayListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteGateways.listByResourceGroup(resourceGroupName); + const result = await client.expressRouteGateways.listByResourceGroup("resourceGroupName"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysListBySubscriptionSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysListBySubscriptionSample.ts index de2cb234106e..2d5c68aba60a 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysListBySubscriptionSample.ts @@ -3,17 +3,16 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists ExpressRoute gateways under a given subscription. + * This sample demonstrates how to lists ExpressRoute gateways under a given subscription. * - * @summary Lists ExpressRoute gateways under a given subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayListBySubscription.json + * @summary lists ExpressRoute gateways under a given subscription. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayListBySubscription.json */ async function expressRouteGatewayListBySubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteGateways.listBySubscription(); console.log(result); diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysStartSiteFailoverTestSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysStartSiteFailoverTestSample.ts new file mode 100644 index 000000000000..dabc34e70d44 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysStartSiteFailoverTestSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to starts failover simulation on the ExpressRoute gateway for the specified peering location. + * + * @summary starts failover simulation on the ExpressRoute gateway for the specified peering location. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayStartSiteFailoverTest.json + */ +async function expressRouteGatewayStartSiteFailoverTest(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteGateways.startSiteFailoverTest( + "rg1", + "ergw1", + "Vancouver", + ); + console.log(result); +} + +async function main(): Promise { + await expressRouteGatewayStartSiteFailoverTest(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysStopSiteFailoverTestSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysStopSiteFailoverTestSample.ts new file mode 100644 index 000000000000..c103f2a0afdb --- /dev/null +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysStopSiteFailoverTestSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to stops failover simulation on the ExpressRoute gateway for the specified peering location. + * + * @summary stops failover simulation on the ExpressRoute gateway for the specified peering location. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayStopSiteFailoverTest.json + */ +async function expressRouteGatewayStopSiteFailoverTest(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRouteGateways.stopSiteFailoverTest("rg1", "ergw1"); + console.log(result); +} + +async function main(): Promise { + await expressRouteGatewayStopSiteFailoverTest(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysUpdateTagsSample.ts index 056e27deceb5..2372fc003889 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysUpdateTagsSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates express route gateway tags. + * This sample demonstrates how to updates express route gateway tags. * - * @summary Updates express route gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayUpdateTags.json + * @summary updates express route gateway tags. + * x-ms-original-file: 2025-07-01/ExpressRouteGatewayUpdateTags.json */ async function expressRouteGatewayUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const expressRouteGatewayParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginUpdateTagsAndWait( - resourceGroupName, - expressRouteGatewayName, - expressRouteGatewayParameters, + const result = await client.expressRouteGateways.updateTags( + "resourceGroupName", + "expressRouteGatewayName", + { tags: { tag1: "value1", tag2: "value2" } }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteLinksGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteLinksGetSample.ts index 85d67a296190..cc25e8de2c34 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteLinksGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteLinksGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the specified ExpressRouteLink resource. + * This sample demonstrates how to retrieves the specified ExpressRouteLink resource. * - * @summary Retrieves the specified ExpressRouteLink resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteLinkGet.json + * @summary retrieves the specified ExpressRouteLink resource. + * x-ms-original-file: 2025-07-01/ExpressRouteLinkGet.json */ async function expressRouteLinkGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const linkName = "linkName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteLinks.get( - resourceGroupName, - expressRoutePortName, - linkName, - ); + const result = await client.expressRouteLinks.get("rg1", "portName", "linkName"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteLinksListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteLinksListSample.ts index b8b14f8bcc62..29347831917a 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteLinksListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteLinksListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * This sample demonstrates how to retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. * - * @summary Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteLinkList.json + * @summary retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * x-ms-original-file: 2025-07-01/ExpressRouteLinkList.json */ async function expressRouteLinkGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.expressRouteLinks.list( - resourceGroupName, - expressRoutePortName, - )) { + for await (const item of client.expressRouteLinks.list("rg1", "portName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsCreateOrUpdateSample.ts index b793bdf92b86..28fd4a8176c1 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsCreateOrUpdateSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ExpressRoutePortAuthorization} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates an authorization in the specified express route port. + * This sample demonstrates how to creates or updates an authorization in the specified express route port. * - * @summary Creates or updates an authorization in the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationCreate.json + * @summary creates or updates an authorization in the specified express route port. + * x-ms-original-file: 2025-07-01/ExpressRoutePortAuthorizationCreate.json */ async function createExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizatinName"; - const authorizationParameters: ExpressRoutePortAuthorization = {}; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRoutePortAuthorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - authorizationName, - authorizationParameters, - ); + const result = await client.expressRoutePortAuthorizations.createOrUpdate( + "rg1", + "expressRoutePortName", + "authorizatinName", + {}, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsDeleteSample.ts index 1f007a97e9a4..0336e5f56b9a 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsDeleteSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified authorization from the specified express route port. + * This sample demonstrates how to deletes the specified authorization from the specified express route port. * - * @summary Deletes the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationDelete.json + * @summary deletes the specified authorization from the specified express route port. + * x-ms-original-file: 2025-07-01/ExpressRoutePortAuthorizationDelete.json */ async function deleteExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizationName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortAuthorizations.beginDeleteAndWait( - resourceGroupName, - expressRoutePortName, - authorizationName, + await client.expressRoutePortAuthorizations.delete( + "rg1", + "expressRoutePortName", + "authorizationName", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsGetSample.ts index d2d5d3009e15..3693d0ec50d3 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified authorization from the specified express route port. + * This sample demonstrates how to gets the specified authorization from the specified express route port. * - * @summary Gets the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationGet.json + * @summary gets the specified authorization from the specified express route port. + * x-ms-original-file: 2025-07-01/ExpressRoutePortAuthorizationGet.json */ async function getExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizationName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRoutePortAuthorizations.get( - resourceGroupName, - expressRoutePortName, - authorizationName, + "rg1", + "expressRoutePortName", + "authorizationName", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsListSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsListSample.ts index 991c346feaaf..daa7fffdd7e8 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsListSample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all authorizations in an express route port. + * This sample demonstrates how to gets all authorizations in an express route port. * - * @summary Gets all authorizations in an express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationList.json + * @summary gets all authorizations in an express route port. + * x-ms-original-file: 2025-07-01/ExpressRoutePortAuthorizationList.json */ async function listExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.expressRoutePortAuthorizations.list( - resourceGroupName, - expressRoutePortName, + "rg1", + "expressRoutePortName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsCreateOrUpdateSample.ts index d4f45771bf9a..5ec35585a38a 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsCreateOrUpdateSample.ts @@ -1,63 +1,47 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { ExpressRoutePort} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. + * This sample demonstrates how to creates or updates the specified ExpressRoutePort resource. * - * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortCreate.json + * @summary creates or updates the specified ExpressRoutePort resource. + * x-ms-original-file: 2025-07-01/ExpressRoutePortCreate.json */ async function expressRoutePortCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters: ExpressRoutePort = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRoutePorts.createOrUpdate("rg1", "portName", { + location: "westus", bandwidthInGbps: 100, billingType: "UnlimitedData", encapsulation: "QinQ", - location: "westus", peeringLocation: "peeringLocationName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. + * This sample demonstrates how to creates or updates the specified ExpressRoutePort resource. * - * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortUpdateLink.json + * @summary creates or updates the specified ExpressRoutePort resource. + * x-ms-original-file: 2025-07-01/ExpressRoutePortUpdateLink.json */ async function expressRoutePortUpdateLink(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters: ExpressRoutePort = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRoutePorts.createOrUpdate("rg1", "portName", { + location: "westus", bandwidthInGbps: 100, billingType: "UnlimitedData", encapsulation: "QinQ", links: [{ name: "link1", adminState: "Enabled" }], - location: "westus", peeringLocation: "peeringLocationName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsDeleteSample.ts index 437e9e1c9116..b6e7ccbfef62 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified ExpressRoutePort resource. + * This sample demonstrates how to deletes the specified ExpressRoutePort resource. * - * @summary Deletes the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortDelete.json + * @summary deletes the specified ExpressRoutePort resource. + * x-ms-original-file: 2025-07-01/ExpressRoutePortDelete.json */ async function expressRoutePortDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginDeleteAndWait( - resourceGroupName, - expressRoutePortName, - ); - console.log(result); + await client.expressRoutePorts.delete("rg1", "portName"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLOASample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLOASample.ts new file mode 100644 index 000000000000..9ceb251e75ad --- /dev/null +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLOASample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to generate a letter of authorization for the requested ExpressRoutePort resource. + * + * @summary generate a letter of authorization for the requested ExpressRoutePort resource. + * x-ms-original-file: 2025-07-01/GenerateExpressRoutePortsLOA.json + */ +async function generateExpressRoutePortLOA(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.expressRoutePorts.generateLOA("rg1", "portName", { + customerName: "customerName", + }); + console.log(result); +} + +async function main(): Promise { + await generateExpressRoutePortLOA(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLoaSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLoaSample.ts deleted file mode 100644 index 79da4bf0fb67..000000000000 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLoaSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - GenerateExpressRoutePortsLOARequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Generate a letter of authorization for the requested ExpressRoutePort resource. - * - * @summary Generate a letter of authorization for the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GenerateExpressRoutePortsLOA.json - */ -async function generateExpressRoutePortLoa(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const request: GenerateExpressRoutePortsLOARequest = { - customerName: "customerName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.generateLOA( - resourceGroupName, - expressRoutePortName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await generateExpressRoutePortLoa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsGetSample.ts index 4229daa4b2e7..6a0eee890589 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the requested ExpressRoutePort resource. + * This sample demonstrates how to retrieves the requested ExpressRoutePort resource. * - * @summary Retrieves the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortGet.json + * @summary retrieves the requested ExpressRoutePort resource. + * x-ms-original-file: 2025-07-01/ExpressRoutePortGet.json */ async function expressRoutePortGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.get( - resourceGroupName, - expressRoutePortName, - ); + const result = await client.expressRoutePorts.get("rg1", "portName"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsListByResourceGroupSample.ts index 8a1815123db1..e13662ff0984 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all the ExpressRoutePort resources in the specified resource group. + * This sample demonstrates how to list all the ExpressRoutePort resources in the specified resource group. * - * @summary List all the ExpressRoutePort resources in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortListByResourceGroup.json + * @summary list all the ExpressRoutePort resources in the specified resource group. + * x-ms-original-file: 2025-07-01/ExpressRoutePortListByResourceGroup.json */ async function expressRoutePortListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.expressRoutePorts.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.expressRoutePorts.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsListSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsListSample.ts index 7041280ab68c..1454c3e86005 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all the ExpressRoutePort resources in the specified subscription. + * This sample demonstrates how to list all the ExpressRoutePort resources in the specified subscription. * - * @summary List all the ExpressRoutePort resources in the specified subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortList.json + * @summary list all the ExpressRoutePort resources in the specified subscription. + * x-ms-original-file: 2025-07-01/ExpressRoutePortList.json */ async function expressRoutePortList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.expressRoutePorts.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsGetSample.ts index 80561bd954ed..1e5f9b49e6ba 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsGetSample.ts @@ -3,20 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. + * This sample demonstrates how to retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. * - * @summary Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortsLocationGet.json + * @summary retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. + * x-ms-original-file: 2025-07-01/ExpressRoutePortsLocationGet.json */ async function expressRoutePortsLocationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const locationName = "locationName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortsLocations.get(locationName); + const result = await client.expressRoutePortsLocations.get("locationName"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsListSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsListSample.ts index bd04f41f7aaf..d21e470bf507 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * This sample demonstrates how to retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. * - * @summary Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortsLocationList.json + * @summary retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * x-ms-original-file: 2025-07-01/ExpressRoutePortsLocationList.json */ async function expressRoutePortsLocationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.expressRoutePortsLocations.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsUpdateTagsSample.ts index ccff356f6de4..a77332f01015 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update ExpressRoutePort tags. + * This sample demonstrates how to update ExpressRoutePort tags. * - * @summary Update ExpressRoutePort tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortUpdateTags.json + * @summary update ExpressRoutePort tags. + * x-ms-original-file: 2025-07-01/ExpressRoutePortUpdateTags.json */ async function expressRoutePortUpdateTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.updateTags( - resourceGroupName, - expressRoutePortName, - parameters, - ); + const result = await client.expressRoutePorts.updateTags("rg1", "portName", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteProviderPortSample.ts b/sdk/network/arm-network/samples-dev/expressRouteProviderPortSample.ts index 162f71026b7c..6b16629e7981 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteProviderPortSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteProviderPortSample.ts @@ -3,20 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves detail of a provider port. + * This sample demonstrates how to retrieves detail of a provider port. * - * @summary Retrieves detail of a provider port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/expressRouteProviderPort.json + * @summary retrieves detail of a provider port. + * x-ms-original-file: 2025-07-01/expressRouteProviderPort.json */ async function expressRouteProviderPort(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const providerport = "abc"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteProviderPort(providerport); + const result = await client.expressRouteProviderPort("abc"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/expressRouteProviderPortsLocationListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteProviderPortsLocationListSample.ts index c78f74cb4ef4..39fee0eff0c2 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteProviderPortsLocationListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteProviderPortsLocationListSample.ts @@ -3,17 +3,16 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves all the ExpressRouteProviderPorts in a subscription. + * This sample demonstrates how to retrieves all the ExpressRouteProviderPorts in a subscription. * - * @summary Retrieves all the ExpressRouteProviderPorts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/expressRouteProviderPortList.json + * @summary retrieves all the ExpressRouteProviderPorts in a subscription. + * x-ms-original-file: 2025-07-01/expressRouteProviderPortList.json */ async function expressRouteProviderPortList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.expressRouteProviderPortsLocation.list(); console.log(result); diff --git a/sdk/network/arm-network/samples-dev/expressRouteServiceProvidersListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteServiceProvidersListSample.ts index fccd0860bda8..b15d2dd4742c 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteServiceProvidersListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteServiceProvidersListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the available express route service providers. + * This sample demonstrates how to gets all the available express route service providers. * - * @summary Gets all the available express route service providers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteProviderList.json + * @summary gets all the available express route service providers. + * x-ms-original-file: 2025-07-01/ExpressRouteProviderList.json */ async function listExpressRouteProviders(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.expressRouteServiceProviders.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesCreateOrUpdateSample.ts index 5c75c935f7da..449ae498affe 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesCreateOrUpdateSample.ts @@ -1,27 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { FirewallPolicy} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified Firewall Policy. + * This sample demonstrates how to creates or updates the specified Firewall Policy. * - * @summary Creates or updates the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyPut.json + * @summary creates or updates the specified Firewall Policy. + * x-ms-original-file: 2025-07-01/FirewallPolicyPut.json */ async function createFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: FirewallPolicy = { - dnsSettings: { - enableProxy: true, - requireProxyForNetworkRules: false, - servers: ["30.3.4.5"], - }, + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.firewallPolicies.createOrUpdate("rg1", "firewallPolicy", { + location: "West US", + dnsSettings: { enableProxy: true, requireProxyForNetworkRules: false, servers: ["30.3.4.5"] }, explicitProxy: { enableExplicitProxy: true, enablePacFile: true, @@ -35,19 +30,19 @@ async function createFirewallPolicy(): Promise { isEnabled: true, logAnalyticsResources: { defaultWorkspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", }, workspaces: [ { region: "westus", workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", }, }, { region: "eastus", workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", }, }, ], @@ -69,32 +64,18 @@ async function createFirewallPolicy(): Promise { signatureOverrides: [{ id: "2525004", mode: "Deny" }], }, mode: "Alert", - profile: "Core", + profile: "Balanced", }, - location: "West US", sku: { tier: "Premium" }, snat: { privateRanges: ["IANAPrivateRanges"] }, sql: { allowSqlRedirect: true }, - tags: { key1: "value1" }, threatIntelMode: "Alert", - threatIntelWhitelist: { - fqdns: ["*.microsoft.com"], - ipAddresses: ["20.3.4.5"], - }, + threatIntelWhitelist: { fqdns: ["*.microsoft.com"], ipAddresses: ["20.3.4.5"] }, transportSecurity: { - certificateAuthority: { - name: "clientcert", - keyVaultSecretId: "https://kv/secret", - }, + certificateAuthority: { name: "clientcert", keyVaultSecretId: "https://kv/secret" }, }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - parameters, - ); + tags: { key1: "value1" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesDeleteSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesDeleteSample.ts index 17142a5edfb2..5f212b82f555 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified Firewall Policy. + * This sample demonstrates how to deletes the specified Firewall Policy. * - * @summary Deletes the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDelete.json + * @summary deletes the specified Firewall Policy. + * x-ms-original-file: 2025-07-01/FirewallPolicyDelete.json */ async function deleteFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.beginDeleteAndWait( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); + await client.firewallPolicies.delete("rg1", "firewallPolicy"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesGetSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesGetSample.ts index 4751d28f1d31..278980913c0a 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Firewall Policy. + * This sample demonstrates how to gets the specified Firewall Policy. * - * @summary Gets the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyGet.json + * @summary gets the specified Firewall Policy. + * x-ms-original-file: 2025-07-01/FirewallPolicyGet.json */ async function getFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.get( - resourceGroupName, - firewallPolicyName, - ); + const result = await client.firewallPolicies.get("rg1", "firewallPolicy"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesListAllSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesListAllSample.ts index e79188f6230d..8b0741e2abf8 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the Firewall Policies in a subscription. + * This sample demonstrates how to gets all the Firewall Policies in a subscription. * - * @summary Gets all the Firewall Policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyListBySubscription.json + * @summary gets all the Firewall Policies in a subscription. + * x-ms-original-file: 2025-07-01/FirewallPolicyListBySubscription.json */ async function listAllFirewallPoliciesForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.firewallPolicies.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesListSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesListSample.ts index c3d8d92c317a..41f103336101 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesListSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all Firewall Policies in a resource group. + * This sample demonstrates how to lists all Firewall Policies in a resource group. * - * @summary Lists all Firewall Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyListByResourceGroup.json + * @summary lists all Firewall Policies in a resource group. + * x-ms-original-file: 2025-07-01/FirewallPolicyListByResourceGroup.json */ async function listAllFirewallPoliciesForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.firewallPolicies.list(resourceGroupName)) { + for await (const item of client.firewallPolicies.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesUpdateTagsSample.ts index 5c14368305ab..88b497f7a446 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesUpdateTagsSample.ts @@ -1,30 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates tags of a Azure Firewall Policy resource. + * This sample demonstrates how to updates tags of a Azure Firewall Policy resource. * - * @summary Updates tags of a Azure Firewall Policy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyPatch.json + * @summary updates tags of a Azure Firewall Policy resource. + * x-ms-original-file: 2025-07-01/FirewallPolicyPatch.json */ async function updateFirewallPolicyTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const firewallPolicyName = "firewallPolicy"; - const parameters: TagsObject = { tags: { key1: "value1", key2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.updateTags( - resourceGroupName, - firewallPolicyName, - parameters, - ); + const result = await client.firewallPolicies.updateTags("myResourceGroup", "firewallPolicy", { + tags: { key1: "value1", key2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyDeploymentsDeploySample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyDeploymentsDeploySample.ts index bad3a4d109c2..89ec7fb301d7 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyDeploymentsDeploySample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyDeploymentsDeploySample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deploys the firewall policy draft and child rule collection group drafts. + * This sample demonstrates how to deploys the firewall policy draft and child rule collection group drafts. * - * @summary Deploys the firewall policy draft and child rule collection group drafts. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftDeploy.json + * @summary deploys the firewall policy draft and child rule collection group drafts. + * x-ms-original-file: 2025-07-01/FirewallPolicyDraftDeploy.json */ async function deployFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDeployments.beginDeployAndWait( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); + await client.firewallPolicyDeployments.deploy("rg1", "firewallPolicy"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsCreateOrUpdateSample.ts index b62d0cb06451..11430d00c888 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsCreateOrUpdateSample.ts @@ -1,30 +1,21 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - FirewallPolicyDraft} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create or update a draft Firewall Policy. + * This sample demonstrates how to create or update a draft Firewall Policy. * - * @summary Create or update a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftPut.json + * @summary create or update a draft Firewall Policy. + * x-ms-original-file: 2025-07-01/FirewallPolicyDraftPut.json */ async function createOrUpdateFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: FirewallPolicyDraft = { - dnsSettings: { - enableProxy: true, - requireProxyForNetworkRules: false, - servers: ["30.3.4.5"], - }, + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.firewallPolicyDrafts.createOrUpdate("rg1", "firewallPolicy", { + dnsSettings: { enableProxy: true, requireProxyForNetworkRules: false, servers: ["30.3.4.5"] }, explicitProxy: { enableExplicitProxy: true, enablePacFile: true, @@ -38,19 +29,19 @@ async function createOrUpdateFirewallPolicyDraft(): Promise { isEnabled: true, logAnalyticsResources: { defaultWorkspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", }, workspaces: [ { region: "westus", workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", }, }, { region: "eastus", workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", }, }, ], @@ -77,18 +68,8 @@ async function createOrUpdateFirewallPolicyDraft(): Promise { snat: { privateRanges: ["IANAPrivateRanges"] }, sql: { allowSqlRedirect: true }, threatIntelMode: "Alert", - threatIntelWhitelist: { - fqdns: ["*.microsoft.com"], - ipAddresses: ["20.3.4.5"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.createOrUpdate( - resourceGroupName, - firewallPolicyName, - parameters, - ); + threatIntelWhitelist: { fqdns: ["*.microsoft.com"], ipAddresses: ["20.3.4.5"] }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsDeleteSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsDeleteSample.ts index a73d19f8de96..1352cb11eb10 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a draft policy. + * This sample demonstrates how to delete a draft policy. * - * @summary Delete a draft policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftDelete.json + * @summary delete a draft policy. + * x-ms-original-file: 2025-07-01/FirewallPolicyDraftDelete.json */ async function deleteFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.delete( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); + await client.firewallPolicyDrafts.delete("rg1", "firewallPolicy"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsGetSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsGetSample.ts index 2083d20c7c75..cb8864247eb3 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a draft Firewall Policy. + * This sample demonstrates how to get a draft Firewall Policy. * - * @summary Get a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftGet.json + * @summary get a draft Firewall Policy. + * x-ms-original-file: 2025-07-01/FirewallPolicyDraftGet.json */ async function getFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.get( - resourceGroupName, - firewallPolicyName, - ); + const result = await client.firewallPolicyDrafts.get("rg1", "firewallPolicy"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesFilterValuesListSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesFilterValuesListSample.ts index 2231f4ac4c3e..92d813f87cc5 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesFilterValuesListSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesFilterValuesListSample.ts @@ -1,35 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SignatureOverridesFilterValuesQuery} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the current filter values for the signatures overrides + * This sample demonstrates how to retrieves the current filter values for the signatures overrides * - * @summary Retrieves the current filter values for the signatures overrides - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json + * @summary retrieves the current filter values for the signatures overrides + * x-ms-original-file: 2025-07-01/FirewallPolicyQuerySignatureOverridesFilterValues.json */ async function querySignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: SignatureOverridesFilterValuesQuery = { - filterName: "severity", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "e747cc13-97d4-4a79-b463-42d7f4e558f2"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.firewallPolicyIdpsSignaturesFilterValues.list( - resourceGroupName, - firewallPolicyName, - parameters, + "rg1", + "firewallPolicy", + { filterName: "severity" }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesListSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesListSample.ts index a3bc73ebedd7..81d6ea0d8a3d 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesListSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesListSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { IdpsQueryObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. + * This sample demonstrates how to retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. * - * @summary Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyQuerySignatureOverrides.json + * @summary retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. + * x-ms-original-file: 2025-07-01/FirewallPolicyQuerySignatureOverrides.json */ async function querySignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: IdpsQueryObject = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "e747cc13-97d4-4a79-b463-42d7f4e558f2"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.firewallPolicyIdpsSignatures.list("rg1", "firewallPolicy", { filters: [{ field: "Mode", values: ["Deny"] }], orderBy: { field: "severity", order: "Ascending" }, resultsPerPage: 20, search: "", skip: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignatures.list( - resourceGroupName, - firewallPolicyName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesGetSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesGetSample.ts index 576f8e11f774..2f4985096d08 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Returns all signatures overrides for a specific policy. + * This sample demonstrates how to returns all signatures overrides for a specific policy. * - * @summary Returns all signatures overrides for a specific policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesGet.json + * @summary returns all signatures overrides for a specific policy. + * x-ms-original-file: 2025-07-01/FirewallPolicySignatureOverridesGet.json */ async function getSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "e747cc13-97d4-4a79-b463-42d7f4e558f2"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.get( - resourceGroupName, - firewallPolicyName, - ); + const result = await client.firewallPolicyIdpsSignaturesOverrides.get("rg1", "firewallPolicy"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesListSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesListSample.ts index 589b5d4d9583..9df866546ef1 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesListSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesListSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Returns all signatures overrides objects for a specific policy as a list containing a single value. + * This sample demonstrates how to returns all signatures overrides objects for a specific policy as a list containing a single value. * - * @summary Returns all signatures overrides objects for a specific policy as a list containing a single value. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesList.json + * @summary returns all signatures overrides objects for a specific policy as a list containing a single value. + * x-ms-original-file: 2025-07-01/FirewallPolicySignatureOverridesList.json */ async function getSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "e747cc13-97d4-4a79-b463-42d7f4e558f2"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.list( - resourceGroupName, - firewallPolicyName, - ); + const result = await client.firewallPolicyIdpsSignaturesOverrides.list("rg1", "firewallPolicy"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPatchSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPatchSample.ts index b718ce2828a6..7d6502bf7cea 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPatchSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPatchSample.ts @@ -1,39 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SignaturesOverrides} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Will update the status of policy's signature overrides for IDPS + * This sample demonstrates how to will update the status of policy's signature overrides for IDPS * - * @summary Will update the status of policy's signature overrides for IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesPatch.json + * @summary will update the status of policy's signature overrides for IDPS + * x-ms-original-file: 2025-07-01/FirewallPolicySignatureOverridesPatch.json */ async function patchSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: SignaturesOverrides = { - name: "default", + const credential = new DefaultAzureCredential(); + const subscriptionId = "e747cc13-97d4-4a79-b463-42d7f4e558f2"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.firewallPolicyIdpsSignaturesOverrides.patch("rg1", "firewallPolicy", { type: "Microsoft.Network/firewallPolicies/signatureOverrides", id: "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", properties: { signatures: { "2000105": "Off", "2000106": "Deny" } }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.patch( - resourceGroupName, - firewallPolicyName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPutSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPutSample.ts index b89bca784ace..8aada8a1bf70 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPutSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPutSample.ts @@ -1,39 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SignaturesOverrides} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Will override/create a new signature overrides for the policy's IDPS + * This sample demonstrates how to will override/create a new signature overrides for the policy's IDPS * - * @summary Will override/create a new signature overrides for the policy's IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesPut.json + * @summary will override/create a new signature overrides for the policy's IDPS + * x-ms-original-file: 2025-07-01/FirewallPolicySignatureOverridesPut.json */ async function putSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: SignaturesOverrides = { - name: "default", + const credential = new DefaultAzureCredential(); + const subscriptionId = "e747cc13-97d4-4a79-b463-42d7f4e558f2"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.firewallPolicyIdpsSignaturesOverrides.put("rg1", "firewallPolicy", { type: "Microsoft.Network/firewallPolicies/signatureOverrides", id: "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", properties: { signatures: { "2000105": "Off", "2000106": "Deny" } }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.put( - resourceGroupName, - firewallPolicyName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts index 17513c8bbe23..bb47531e760e 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts @@ -1,55 +1,45 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - FirewallPolicyRuleCollectionGroupDraft} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create or Update Rule Collection Group Draft. + * This sample demonstrates how to create or Update Rule Collection Group Draft. * - * @summary Create or Update Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json + * @summary create or Update Rule Collection Group Draft. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupDraftPut.json */ async function createOrUpdateRuleCollectionGroupDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroupDraft = { - priority: 100, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - priority: 100, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-rule1", - destinationAddresses: ["*"], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceAddresses: ["10.1.25.0/24"], - }, - ], - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroupDrafts.createOrUpdate( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); + const result = await client.firewallPolicyRuleCollectionGroupDrafts.createOrUpdate( + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", + { + priority: 100, + ruleCollections: [ + { + name: "Example-Filter-Rule-Collection", + action: { type: "Deny" }, + priority: 100, + ruleCollectionType: "FirewallPolicyFilterRuleCollection", + rules: [ + { + name: "network-rule1", + destinationAddresses: ["*"], + destinationPorts: ["*"], + ipProtocols: ["TCP"], + ruleType: "NetworkRule", + sourceAddresses: ["10.1.25.0/24"], + }, + ], + }, + ], + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts index 9b4082047081..7490328663b6 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete Rule Collection Group Draft. + * This sample demonstrates how to delete Rule Collection Group Draft. * - * @summary Delete Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json + * @summary delete Rule Collection Group Draft. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupDraftDelete.json */ async function deleteFirewallRuleCollectionGroupDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroupDrafts.delete( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, + await client.firewallPolicyRuleCollectionGroupDrafts.delete( + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsGetSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsGetSample.ts index de0a353b6c3b..00259c92e8ca 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get Rule Collection Group Draft. + * This sample demonstrates how to get Rule Collection Group Draft. * - * @summary Get Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json + * @summary get Rule Collection Group Draft. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupDraftGet.json */ async function getRuleCollectionGroupDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.firewallPolicyRuleCollectionGroupDrafts.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts index c918fbd16d98..f3704e96cb46 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts @@ -1,254 +1,220 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - FirewallPolicyRuleCollectionGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. + * This sample demonstrates how to creates or updates the specified FirewallPolicyRuleCollectionGroup. * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json + * @summary creates or updates the specified FirewallPolicyRuleCollectionGroup. + * x-ms-original-file: 2025-07-01/FirewallPolicyNatRuleCollectionGroupPut.json */ async function createFirewallPolicyNatRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 100, - ruleCollections: [ - { - name: "Example-Nat-Rule-Collection", - action: { type: "DNAT" }, - priority: 100, - ruleCollectionType: "FirewallPolicyNatRuleCollection", - rules: [ - { - name: "nat-rule1", - destinationAddresses: ["152.23.32.23"], - destinationPorts: ["8080"], - ipProtocols: ["TCP", "UDP"], - ruleType: "NatRule", - sourceAddresses: ["2.2.2.2"], - sourceIpGroups: [], - translatedFqdn: "internalhttp.server.net", - translatedPort: "8080", - }, - ], - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); + const result = await client.firewallPolicyRuleCollectionGroups.createOrUpdate( + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", + { + priority: 100, + ruleCollections: [ + { + name: "Example-Nat-Rule-Collection", + action: { type: "DNAT" }, + priority: 100, + ruleCollectionType: "FirewallPolicyNatRuleCollection", + rules: [ + { + name: "nat-rule1", + destinationAddresses: ["152.23.32.23"], + destinationPorts: ["8080"], + ipProtocols: ["TCP", "UDP"], + ruleType: "NatRule", + sourceAddresses: ["2.2.2.2"], + sourceIpGroups: [], + translatedFqdn: "internalhttp.server.net", + translatedPort: "8080", + }, + ], + }, + ], + }, + ); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. + * This sample demonstrates how to creates or updates the specified FirewallPolicyRuleCollectionGroup. * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupPut.json + * @summary creates or updates the specified FirewallPolicyRuleCollectionGroup. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupPut.json */ async function createFirewallPolicyRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 100, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - priority: 100, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-rule1", - destinationAddresses: ["*"], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceAddresses: ["10.1.25.0/24"], - }, - ], - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); + const result = await client.firewallPolicyRuleCollectionGroups.createOrUpdate( + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", + { + priority: 100, + ruleCollections: [ + { + name: "Example-Filter-Rule-Collection", + action: { type: "Deny" }, + priority: 100, + ruleCollectionType: "FirewallPolicyFilterRuleCollection", + rules: [ + { + name: "network-rule1", + destinationAddresses: ["*"], + destinationPorts: ["*"], + ipProtocols: ["TCP"], + ruleType: "NetworkRule", + sourceAddresses: ["10.1.25.0/24"], + }, + ], + }, + ], + }, + ); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. + * This sample demonstrates how to creates or updates the specified FirewallPolicyRuleCollectionGroup. * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json + * @summary creates or updates the specified FirewallPolicyRuleCollectionGroup. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json */ -async function createFirewallPolicyRuleCollectionGroupWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-1", - destinationIpGroups: [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups2", - ], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceIpGroups: [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups1", - ], - }, - ], - }, - ], - }; +async function createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "e747cc13-97d4-4a79-b463-42d7f4e558f2"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); + const result = await client.firewallPolicyRuleCollectionGroups.createOrUpdate( + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", + { + priority: 110, + ruleCollections: [ + { + name: "Example-Filter-Rule-Collection", + action: { type: "Allow" }, + ruleCollectionType: "FirewallPolicyFilterRuleCollection", + rules: [ + { + name: "rule1", + description: "Insert trusted tenants header", + fqdnTags: ["WindowsVirtualDesktop"], + httpHeadersToInsert: [ + { + headerName: "Restrict-Access-To-Tenants", + headerValue: "contoso.com,fabrikam.onmicrosoft.com", + }, + ], + protocols: [{ port: 80, protocolType: "Http" }], + ruleType: "ApplicationRule", + sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], + }, + ], + }, + ], + }, + ); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. + * This sample demonstrates how to creates or updates the specified FirewallPolicyRuleCollectionGroup. * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json + * @summary creates or updates the specified FirewallPolicyRuleCollectionGroup. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json */ -async function createFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - ruleType: "ApplicationRule", - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - webCategories: ["Hacking"], - }, - ], - }, - ], - }; +async function createFirewallPolicyRuleCollectionGroupWithIPGroups(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); + const result = await client.firewallPolicyRuleCollectionGroups.createOrUpdate( + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", + { + priority: 110, + ruleCollections: [ + { + name: "Example-Filter-Rule-Collection", + action: { type: "Deny" }, + ruleCollectionType: "FirewallPolicyFilterRuleCollection", + rules: [ + { + name: "network-1", + destinationIpGroups: [ + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/resourceGroups/rg1/ipGroups/ipGroups2", + ], + destinationPorts: ["*"], + ipProtocols: ["TCP"], + ruleType: "NetworkRule", + sourceIpGroups: [ + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/resourceGroups/rg1/ipGroups/ipGroups1", + ], + }, + ], + }, + ], + }, + ); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. + * This sample demonstrates how to creates or updates the specified FirewallPolicyRuleCollectionGroup. * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json + * @summary creates or updates the specified FirewallPolicyRuleCollectionGroup. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json */ -async function createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Allow" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "rule1", - description: "Insert trusted tenants header", - fqdnTags: ["WindowsVirtualDesktop"], - httpHeadersToInsert: [ - { - headerName: "Restrict-Access-To-Tenants", - headerValue: "contoso.com,fabrikam.onmicrosoft.com", - }, - ], - protocols: [{ port: 80, protocolType: "Http" }], - ruleType: "ApplicationRule", - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - }, - ], - }, - ], - }; +async function createFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "e747cc13-97d4-4a79-b463-42d7f4e558f2"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); + const result = await client.firewallPolicyRuleCollectionGroups.createOrUpdate( + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", + { + priority: 110, + ruleCollections: [ + { + name: "Example-Filter-Rule-Collection", + action: { type: "Deny" }, + ruleCollectionType: "FirewallPolicyFilterRuleCollection", + rules: [ + { + name: "rule1", + description: "Deny inbound rule", + protocols: [{ port: 443, protocolType: "Https" }], + ruleType: "ApplicationRule", + sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], + webCategories: ["Hacking"], + }, + ], + }, + ], + }, + ); console.log(result); } async function main(): Promise { await createFirewallPolicyNatRuleCollectionGroup(); await createFirewallPolicyRuleCollectionGroup(); + await createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert(); await createFirewallPolicyRuleCollectionGroupWithIPGroups(); await createFirewallPolicyRuleCollectionGroupWithWebCategories(); - await createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsDeleteSample.ts index f27246710c1d..f33d28ea6975 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsDeleteSample.ts @@ -3,28 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified FirewallPolicyRuleCollectionGroup. + * This sample demonstrates how to deletes the specified FirewallPolicyRuleCollectionGroup. * - * @summary Deletes the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json + * @summary deletes the specified FirewallPolicyRuleCollectionGroup. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupDelete.json */ async function deleteFirewallPolicyRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginDeleteAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); + await client.firewallPolicyRuleCollectionGroups.delete( + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", + ); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsGetSample.ts index 20f98b8a2bad..0059e4cc8fd7 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsGetSample.ts @@ -3,90 +3,75 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. + * This sample demonstrates how to gets the specified FirewallPolicyRuleCollectionGroup. * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + * @summary gets the specified FirewallPolicyRuleCollectionGroup. + * x-ms-original-file: 2025-07-01/FirewallPolicyNatRuleCollectionGroupGet.json */ async function getFirewallPolicyNatRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", ); console.log(result); } /** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. + * This sample demonstrates how to gets the specified FirewallPolicyRuleCollectionGroup. * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupGet.json + * @summary gets the specified FirewallPolicyRuleCollectionGroup. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupGet.json */ async function getFirewallPolicyRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", ); console.log(result); } /** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. + * This sample demonstrates how to gets the specified FirewallPolicyRuleCollectionGroup. * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + * @summary gets the specified FirewallPolicyRuleCollectionGroup. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json */ -async function getFirewallPolicyRuleCollectionGroupWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleGroup1"; +async function getFirewallPolicyRuleCollectionGroupWithIpGroups(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, + "rg1", + "firewallPolicy", + "ruleGroup1", ); console.log(result); } /** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. + * This sample demonstrates how to gets the specified FirewallPolicyRuleCollectionGroup. * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + * @summary gets the specified FirewallPolicyRuleCollectionGroup. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json */ async function getFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "e747cc13-97d4-4a79-b463-42d7f4e558f2"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, + "rg1", + "firewallPolicy", + "ruleCollectionGroup1", ); console.log(result); } @@ -94,7 +79,7 @@ async function getFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise< async function main(): Promise { await getFirewallPolicyNatRuleCollectionGroup(); await getFirewallPolicyRuleCollectionGroup(); - await getFirewallPolicyRuleCollectionGroupWithIPGroups(); + await getFirewallPolicyRuleCollectionGroupWithIpGroups(); await getFirewallPolicyRuleCollectionGroupWithWebCategories(); } diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsListSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsListSample.ts index 22221578b85a..2ed2c08aca6f 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsListSample.ts @@ -3,80 +3,74 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. + * This sample demonstrates how to lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json + * @summary lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupList.json */ -async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; +async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, + "rg1", + "firewallPolicy", )) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. + * This sample demonstrates how to lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupList.json + * @summary lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json */ -async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; +async function listAllFirewallPolicyRuleCollectionGroupsWithIpGroupsForAGivenFirewallPolicy(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, + "rg1", + "firewallPolicy", )) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. + * This sample demonstrates how to lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json + * @summary lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. + * x-ms-original-file: 2025-07-01/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json */ -async function listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; +async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "e747cc13-97d4-4a79-b463-42d7f4e558f2"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, + "rg1", + "firewallPolicy", )) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await listAllFirewallPolicyRuleCollectionGroupWithWebCategories(); await listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy(); - await listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy(); + await listAllFirewallPolicyRuleCollectionGroupsWithIpGroupsForAGivenFirewallPolicy(); + await listAllFirewallPolicyRuleCollectionGroupWithWebCategories(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/flowLogsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/flowLogsCreateOrUpdateSample.ts index aea41cc7d710..4a87b3a2b344 100644 --- a/sdk/network/arm-network/samples-dev/flowLogsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/flowLogsCreateOrUpdateSample.ts @@ -1,48 +1,37 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { FlowLog} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create or update a flow log for the specified network security group. + * This sample demonstrates how to create or update a flow log for the specified network security group. * - * @summary Create or update a flow log for the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogCreate.json + * @summary create or update a flow log for the specified network security group. + * x-ms-original-file: 2025-07-01/NetworkWatcherFlowLogCreate.json */ async function createOrUpdateFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "fl"; - const parameters: FlowLog = { - format: { type: "JSON", version: 1 }, - enabled: true, - enabledFilteringCriteria: "srcIP=158.255.7.8 || dstPort=56891", + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.flowLogs.createOrUpdate("rg1", "nw1", "fl", { identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, }, }, location: "centraluseuap", + format: { type: "JSON", version: 1 }, + enabled: true, + enabledFilteringCriteria: "srcIP=158.255.7.8 || dstPort=56891", recordTypes: "B,E", storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe", targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - ); + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/flowLogsDeleteSample.ts b/sdk/network/arm-network/samples-dev/flowLogsDeleteSample.ts index 6dc0cd3a6133..08f31cc565b5 100644 --- a/sdk/network/arm-network/samples-dev/flowLogsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/flowLogsDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified flow log resource. + * This sample demonstrates how to deletes the specified flow log resource. * - * @summary Deletes the specified flow log resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogDelete.json + * @summary deletes the specified flow log resource. + * x-ms-original-file: 2025-07-01/NetworkWatcherFlowLogDelete.json */ async function deleteFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "fl"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - flowLogName, - ); - console.log(result); + await client.flowLogs.delete("rg1", "nw1", "fl"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/flowLogsGetSample.ts b/sdk/network/arm-network/samples-dev/flowLogsGetSample.ts index acabb9e272a3..15d62315f2a4 100644 --- a/sdk/network/arm-network/samples-dev/flowLogsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/flowLogsGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a flow log resource by name. + * This sample demonstrates how to gets a flow log resource by name. * - * @summary Gets a flow log resource by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogGet.json + * @summary gets a flow log resource by name. + * x-ms-original-file: 2025-07-01/NetworkWatcherFlowLogGet.json */ async function getFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "flowLog1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.get( - resourceGroupName, - networkWatcherName, - flowLogName, - ); + const result = await client.flowLogs.get("rg1", "nw1", "flowLog1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/flowLogsListSample.ts b/sdk/network/arm-network/samples-dev/flowLogsListSample.ts index 2d589ed6e491..7ecf042f2eef 100644 --- a/sdk/network/arm-network/samples-dev/flowLogsListSample.ts +++ b/sdk/network/arm-network/samples-dev/flowLogsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all flow log resources for the specified Network Watcher. + * This sample demonstrates how to lists all flow log resources for the specified Network Watcher. * - * @summary Lists all flow log resources for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogList.json + * @summary lists all flow log resources for the specified Network Watcher. + * x-ms-original-file: 2025-07-01/NetworkWatcherFlowLogList.json */ async function listConnectionMonitors(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.flowLogs.list( - resourceGroupName, - networkWatcherName, - )) { + for await (const item of client.flowLogs.list("rg1", "nw1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/flowLogsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/flowLogsUpdateTagsSample.ts index fa67816e98c9..e9709bbcfc7b 100644 --- a/sdk/network/arm-network/samples-dev/flowLogsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/flowLogsUpdateTagsSample.ts @@ -1,31 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update tags of the specified flow log. + * This sample demonstrates how to update tags of the specified flow log. * - * @summary Update tags of the specified flow log. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogUpdateTags.json + * @summary update tags of the specified flow log. + * x-ms-original-file: 2025-07-01/NetworkWatcherFlowLogUpdateTags.json */ async function updateFlowLogTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw"; - const flowLogName = "fl"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.updateTags( - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - ); + const result = await client.flowLogs.updateTags("rg1", "nw", "fl", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts b/sdk/network/arm-network/samples-dev/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts index 086d265e39f7..e621beb254cb 100644 --- a/sdk/network/arm-network/samples-dev/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts +++ b/sdk/network/arm-network/samples-dev/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts @@ -1,37 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualWanVpnProfileParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * This sample demonstrates how to generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. * - * @summary Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json + * @summary generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * x-ms-original-file: 2025-07-01/GenerateVirtualWanVpnServerConfigurationVpnProfile.json */ async function generateVirtualWanVpnServerConfigurationVpnProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const vpnClientParams: VirtualWanVpnProfileParameters = { - authenticationMethod: "EAPTLS", - vpnServerConfigurationResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnconfig1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.beginGeneratevirtualwanvpnserverconfigurationvpnprofileAndWait( - resourceGroupName, - virtualWANName, - vpnClientParams, - ); + const result = await client.generatevirtualwanvpnserverconfigurationvpnprofile("rg1", "wan1", { + authenticationMethod: "EAPTLS", + vpnServerConfigurationResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnconfig1", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/getActiveSessionsSample.ts b/sdk/network/arm-network/samples-dev/getActiveSessionsSample.ts index 96bb970e31cb..650790008dc9 100644 --- a/sdk/network/arm-network/samples-dev/getActiveSessionsSample.ts +++ b/sdk/network/arm-network/samples-dev/getActiveSessionsSample.ts @@ -3,28 +3,19 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. + * This sample demonstrates how to returns the list of currently active sessions on the Bastion. * - * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionSessionsList.json + * @summary returns the list of currently active sessions on the Bastion. + * x-ms-original-file: 2025-07-01/BastionSessionsList.json */ async function returnsAListOfCurrentlyActiveSessionsOnTheBastion(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.beginListActiveSessionsAndWait( - resourceGroupName, - bastionHostName, - )) { - resArray.push(item); - } - console.log(resArray); + const result = await client.getActiveSessions("rg1", "bastionhosttenant"); + console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/getBastionShareableLinkSample.ts b/sdk/network/arm-network/samples-dev/getBastionShareableLinkSample.ts index f3d2cc366dc0..6efbb2536adb 100644 --- a/sdk/network/arm-network/samples-dev/getBastionShareableLinkSample.ts +++ b/sdk/network/arm-network/samples-dev/getBastionShareableLinkSample.ts @@ -1,53 +1,42 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BastionShareableLinkListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Return the Bastion Shareable Links for all the VMs specified in the request. + * This sample demonstrates how to return the Bastion Shareable Links for all the VMs specified in the request. * - * @summary Return the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkGet.json + * @summary return the Bastion Shareable Links for all the VMs specified in the request. + * x-ms-original-file: 2025-07-01/BastionShareableLinkGet.json */ -async function returnsTheBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest: BastionShareableLinkListRequest = { +async function returnsTheBastionShareableLinksForTheRequestVMs(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.getBastionShareableLink("rg1", "bastionhosttenant", { vms: [ { vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", }, }, { vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", }, }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.listBastionShareableLink( - resourceGroupName, - bastionHostName, - bslRequest, - )) { + })) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await returnsTheBastionShareableLinksForTheRequestVMS(); + await returnsTheBastionShareableLinksForTheRequestVMs(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/hubRouteTablesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/hubRouteTablesCreateOrUpdateSample.ts index 416510149c06..3a325c1a5a3d 100644 --- a/sdk/network/arm-network/samples-dev/hubRouteTablesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/hubRouteTablesCreateOrUpdateSample.ts @@ -1,42 +1,36 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { HubRouteTable} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. + * This sample demonstrates how to creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. * - * @summary Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTablePut.json + * @summary creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. + * x-ms-original-file: 2025-07-01/HubRouteTablePut.json */ async function routeTablePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const routeTableParameters: HubRouteTable = { - labels: ["label1", "label2"], - routes: [ - { - name: "route1", - destinationType: "CIDR", - destinations: ["10.0.0.0/8", "20.0.0.0/8", "30.0.0.0/8"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1", - nextHopType: "ResourceId", - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - routeTableParameters, + const result = await client.hubRouteTables.createOrUpdate( + "rg1", + "virtualHub1", + "hubRouteTable1", + { + labels: ["label1", "label2"], + routes: [ + { + name: "route1", + destinationType: "CIDR", + destinations: ["10.0.0.0/8", "20.0.0.0/8", "30.0.0.0/8"], + nextHop: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1", + nextHopType: "ResourceId", + }, + ], + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/hubRouteTablesDeleteSample.ts b/sdk/network/arm-network/samples-dev/hubRouteTablesDeleteSample.ts index e873aea86a1a..f98f3bee4411 100644 --- a/sdk/network/arm-network/samples-dev/hubRouteTablesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/hubRouteTablesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a RouteTable. + * This sample demonstrates how to deletes a RouteTable. * - * @summary Deletes a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableDelete.json + * @summary deletes a RouteTable. + * x-ms-original-file: 2025-07-01/HubRouteTableDelete.json */ async function routeTableDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); + await client.hubRouteTables.delete("rg1", "virtualHub1", "hubRouteTable1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/hubRouteTablesGetSample.ts b/sdk/network/arm-network/samples-dev/hubRouteTablesGetSample.ts index eadbce073ac1..3a0a45dda551 100644 --- a/sdk/network/arm-network/samples-dev/hubRouteTablesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/hubRouteTablesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a RouteTable. + * This sample demonstrates how to retrieves the details of a RouteTable. * - * @summary Retrieves the details of a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableGet.json + * @summary retrieves the details of a RouteTable. + * x-ms-original-file: 2025-07-01/HubRouteTableGet.json */ async function routeTableGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.get( - resourceGroupName, - virtualHubName, - routeTableName, - ); + const result = await client.hubRouteTables.get("rg1", "virtualHub1", "hubRouteTable1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/hubRouteTablesListSample.ts b/sdk/network/arm-network/samples-dev/hubRouteTablesListSample.ts index 3fc599e9caec..15cd67e0b563 100644 --- a/sdk/network/arm-network/samples-dev/hubRouteTablesListSample.ts +++ b/sdk/network/arm-network/samples-dev/hubRouteTablesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of all RouteTables. + * This sample demonstrates how to retrieves the details of all RouteTables. * - * @summary Retrieves the details of all RouteTables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableList.json + * @summary retrieves the details of all RouteTables. + * x-ms-original-file: 2025-07-01/HubRouteTableList.json */ async function routeTableList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.hubRouteTables.list( - resourceGroupName, - virtualHubName, - )) { + for await (const item of client.hubRouteTables.list("rg1", "virtualHub1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts index ca765610db15..6cc21fe255c7 100644 --- a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts @@ -1,74 +1,64 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - HubVirtualNetworkConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a hub virtual network connection if it doesn't exist else updates the existing one. + * This sample demonstrates how to creates a hub virtual network connection if it doesn't exist else updates the existing one. * - * @summary Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionPut.json + * @summary creates a hub virtual network connection if it doesn't exist else updates the existing one. + * x-ms-original-file: 2025-07-01/HubVirtualNetworkConnectionPut.json */ async function hubVirtualNetworkConnectionPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection = { - enableInternetSecurity: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/SpokeVnet1", - }, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - ], - labels: ["label1", "label2"], + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.hubVirtualNetworkConnections.createOrUpdate( + "rg1", + "virtualHub1", + "connection1", + { + enableInternetSecurity: false, + remoteVirtualNetwork: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/SpokeVnet1", }, - vnetRoutes: { - staticRoutes: [ - { - name: "route1", - addressPrefixes: ["10.1.0.0/16", "10.2.0.0/16"], - nextHopIpAddress: "10.0.0.68", - }, - { - name: "route2", - addressPrefixes: ["10.3.0.0/16", "10.4.0.0/16"], - nextHopIpAddress: "10.0.0.65", - }, - ], - staticRoutesConfig: { vnetLocalRouteOverrideCriteria: "Equal" }, + routingConfiguration: { + associatedRouteTable: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", + }, + inboundRouteMap: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", + }, + outboundRouteMap: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", + }, + propagatedRouteTables: { + ids: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", + }, + ], + labels: ["label1", "label2"], + }, + vnetRoutes: { + staticRoutes: [ + { + name: "route1", + addressPrefixes: ["10.1.0.0/16", "10.2.0.0/16"], + nextHopIpAddress: "10.0.0.68", + }, + { + name: "route2", + addressPrefixes: ["10.3.0.0/16", "10.4.0.0/16"], + nextHopIpAddress: "10.0.0.65", + }, + ], + staticRoutesConfig: { vnetLocalRouteOverrideCriteria: "Equal" }, + }, }, }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.hubVirtualNetworkConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - connectionName, - hubVirtualNetworkConnectionParameters, - ); + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsDeleteSample.ts index 00608ce61001..40f6d034cbf3 100644 --- a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a HubVirtualNetworkConnection. + * This sample demonstrates how to deletes a HubVirtualNetworkConnection. * - * @summary Deletes a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionDelete.json + * @summary deletes a HubVirtualNetworkConnection. + * x-ms-original-file: 2025-07-01/HubVirtualNetworkConnectionDelete.json */ async function hubVirtualNetworkConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); + await client.hubVirtualNetworkConnections.delete("rg1", "virtualHub1", "connection1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsGetSample.ts index 85c889114ab5..58df135025f5 100644 --- a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a HubVirtualNetworkConnection. + * This sample demonstrates how to retrieves the details of a HubVirtualNetworkConnection. * - * @summary Retrieves the details of a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionGet.json + * @summary retrieves the details of a HubVirtualNetworkConnection. + * x-ms-original-file: 2025-07-01/HubVirtualNetworkConnectionGet.json */ async function hubVirtualNetworkConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.get( - resourceGroupName, - virtualHubName, - connectionName, - ); + const result = await client.hubVirtualNetworkConnections.get("rg1", "virtualHub1", "connection1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsListSample.ts index 28f9e9b04493..d1fa04d263ec 100644 --- a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of all HubVirtualNetworkConnections. + * This sample demonstrates how to retrieves the details of all HubVirtualNetworkConnections. * - * @summary Retrieves the details of all HubVirtualNetworkConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionList.json + * @summary retrieves the details of all HubVirtualNetworkConnections. + * x-ms-original-file: 2025-07-01/HubVirtualNetworkConnectionList.json */ async function hubVirtualNetworkConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.hubVirtualNetworkConnections.list( - resourceGroupName, - virtualHubName, - )) { + for await (const item of client.hubVirtualNetworkConnections.list("rg1", "virtualHub1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/inboundNatRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/inboundNatRulesCreateOrUpdateSample.ts index 0634d6c0b928..4870dc13ba12 100644 --- a/sdk/network/arm-network/samples-dev/inboundNatRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/inboundNatRulesCreateOrUpdateSample.ts @@ -1,41 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { InboundNatRule} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a load balancer inbound NAT rule. + * This sample demonstrates how to creates or updates a load balancer inbound NAT rule. * - * @summary Creates or updates a load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleCreate.json + * @summary creates or updates a load balancer inbound NAT rule. + * x-ms-original-file: 2025-07-01/InboundNatRuleCreate.json */ async function inboundNatRuleCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const inboundNatRuleParameters: InboundNatRule = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.inboundNatRules.createOrUpdate("testrg", "lb1", "natRule1.1", { backendPort: 3389, enableFloatingIP: false, enableTcpReset: false, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/ip1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/ip1", }, frontendPort: 3390, idleTimeoutInMinutes: 4, protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - inboundNatRuleParameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/inboundNatRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/inboundNatRulesDeleteSample.ts index 673b8c5d403d..8f0eff38b9c0 100644 --- a/sdk/network/arm-network/samples-dev/inboundNatRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/inboundNatRulesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified load balancer inbound NAT rule. + * This sample demonstrates how to deletes the specified load balancer inbound NAT rule. * - * @summary Deletes the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleDelete.json + * @summary deletes the specified load balancer inbound NAT rule. + * x-ms-original-file: 2025-07-01/InboundNatRuleDelete.json */ async function inboundNatRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - ); - console.log(result); + await client.inboundNatRules.delete("testrg", "lb1", "natRule1.1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/inboundNatRulesGetSample.ts b/sdk/network/arm-network/samples-dev/inboundNatRulesGetSample.ts index 314712d52be1..57f9a2e29537 100644 --- a/sdk/network/arm-network/samples-dev/inboundNatRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/inboundNatRulesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified load balancer inbound NAT rule. + * This sample demonstrates how to gets the specified load balancer inbound NAT rule. * - * @summary Gets the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleGet.json + * @summary gets the specified load balancer inbound NAT rule. + * x-ms-original-file: 2025-07-01/InboundNatRuleGet.json */ async function inboundNatRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.get( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - ); + const result = await client.inboundNatRules.get("testrg", "lb1", "natRule1.1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/inboundNatRulesListSample.ts b/sdk/network/arm-network/samples-dev/inboundNatRulesListSample.ts index f9a7a2199323..aec61e17fea6 100644 --- a/sdk/network/arm-network/samples-dev/inboundNatRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/inboundNatRulesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the inbound NAT rules in a load balancer. + * This sample demonstrates how to gets all the inbound NAT rules in a load balancer. * - * @summary Gets all the inbound NAT rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleList.json + * @summary gets all the inbound NAT rules in a load balancer. + * x-ms-original-file: 2025-07-01/InboundNatRuleList.json */ async function inboundNatRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.inboundNatRules.list( - resourceGroupName, - loadBalancerName, - )) { + for await (const item of client.inboundNatRules.list("testrg", "lb1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/inboundSecurityRuleCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/inboundSecurityRuleCreateOrUpdateSample.ts index 2d9de07d921d..8d643b276c57 100644 --- a/sdk/network/arm-network/samples-dev/inboundSecurityRuleCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/inboundSecurityRuleCreateOrUpdateSample.ts @@ -1,26 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - InboundSecurityRule} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + * This sample demonstrates how to creates or updates the specified Network Virtual Appliance Inbound Security Rules. * - * @summary Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundSecurityRulePut.json + * @summary creates or updates the specified Network Virtual Appliance Inbound Security Rules. + * x-ms-original-file: 2025-07-01/InboundSecurityRulePut.json */ async function createNetworkVirtualApplianceInboundSecurityRules(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const ruleCollectionName = "rule1"; - const parameters: InboundSecurityRule = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.inboundSecurityRule.createOrUpdate("rg1", "nva", "rule1", { ruleType: "Permanent", rules: [ { @@ -32,16 +26,7 @@ async function createNetworkVirtualApplianceInboundSecurityRules(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const ruleCollectionName = "rule1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundSecurityRuleOperations.get( - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - ); + const result = await client.inboundSecurityRule.get("rg1", "nva", "rule1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/interconnectGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/interconnectGroupsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..7be6684a1a13 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/interconnectGroupsCreateOrUpdateSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates an interconnect group. + * + * @summary creates or updates an interconnect group. + * x-ms-original-file: 2025-07-01/InterconnectGroupCreate.json + */ +async function createInterconnectGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.interconnectGroups.createOrUpdate("rg1", "test-ig", { + properties: { + scope: "InfiniBand", + subgroupProfile: { + vmSize: "Standard_ND128isr_NDR_GB200_v6", + scope: "VerticalConnect", + size: 18, + }, + }, + location: "eastus", + }); + console.log(result); +} + +async function main(): Promise { + await createInterconnectGroup(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/interconnectGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/interconnectGroupsDeleteSample.ts new file mode 100644 index 000000000000..fbb888744777 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/interconnectGroupsDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified interconnect group. + * + * @summary deletes the specified interconnect group. + * x-ms-original-file: 2025-07-01/InterconnectGroupDelete.json + */ +async function deleteInterconnectGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.interconnectGroups.delete("rg1", "test-ig"); +} + +async function main(): Promise { + await deleteInterconnectGroup(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/interconnectGroupsGetNodeAvailabilitySample.ts b/sdk/network/arm-network/samples-dev/interconnectGroupsGetNodeAvailabilitySample.ts new file mode 100644 index 000000000000..de74f5b2ecc7 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/interconnectGroupsGetNodeAvailabilitySample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets node availability for all subgroups in the specified interconnect group. + * + * @summary gets node availability for all subgroups in the specified interconnect group. + * x-ms-original-file: 2025-07-01/InterconnectGroupGetNodeAvailability.json + */ +async function getInterconnectGroupNodeAvailability(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.interconnectGroups.getNodeAvailability("rg1", "test-ig"); + console.log(result); +} + +async function main(): Promise { + await getInterconnectGroupNodeAvailability(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/interconnectGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/interconnectGroupsGetSample.ts new file mode 100644 index 000000000000..f73250f12ed1 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/interconnectGroupsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets information about the specified interconnect group. + * + * @summary gets information about the specified interconnect group. + * x-ms-original-file: 2025-07-01/InterconnectGroupGet.json + */ +async function getInterconnectGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.interconnectGroups.get("rg1", "test-ig"); + console.log(result); +} + +async function main(): Promise { + await getInterconnectGroup(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/interconnectGroupsListAllSample.ts b/sdk/network/arm-network/samples-dev/interconnectGroupsListAllSample.ts new file mode 100644 index 000000000000..154d3fa70aff --- /dev/null +++ b/sdk/network/arm-network/samples-dev/interconnectGroupsListAllSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets all interconnect groups in a subscription. + * + * @summary gets all interconnect groups in a subscription. + * x-ms-original-file: 2025-07-01/InterconnectGroupListAll.json + */ +async function listAllInterconnectGroups(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.interconnectGroups.listAll()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listAllInterconnectGroups(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/interconnectGroupsListSample.ts b/sdk/network/arm-network/samples-dev/interconnectGroupsListSample.ts new file mode 100644 index 000000000000..d80f0333a575 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/interconnectGroupsListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets all interconnect groups in a resource group. + * + * @summary gets all interconnect groups in a resource group. + * x-ms-original-file: 2025-07-01/InterconnectGroupList.json + */ +async function listInterconnectGroupsInResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.interconnectGroups.list("rg1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listInterconnectGroupsInResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/interconnectGroupsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/interconnectGroupsUpdateTagsSample.ts new file mode 100644 index 000000000000..c8bd2fa5d7ed --- /dev/null +++ b/sdk/network/arm-network/samples-dev/interconnectGroupsUpdateTagsSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates interconnect group tags. + * + * @summary updates interconnect group tags. + * x-ms-original-file: 2025-07-01/InterconnectGroupUpdateTags.json + */ +async function updateInterconnectGroupTags(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.interconnectGroups.updateTags("rg1", "test-ig", { + tags: { tag1: "value1", tag2: "value2" }, + }); + console.log(result); +} + +async function main(): Promise { + await updateInterconnectGroupTags(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsCreateOrUpdateSample.ts index 81e5e6a6e25b..4d8c8617b18b 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsCreateOrUpdateSample.ts @@ -1,42 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { IpAllocation} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates an IpAllocation in the specified resource group. + * This sample demonstrates how to creates or updates an IpAllocation in the specified resource group. * - * @summary Creates or updates an IpAllocation in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationCreate.json + * @summary creates or updates an IpAllocation in the specified resource group. + * x-ms-original-file: 2025-07-01/IpAllocationCreate.json */ -async function createIPAllocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const parameters: IpAllocation = { +async function createIpAllocation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipAllocations.createOrUpdate("rg1", "test-ipallocation", { + location: "centraluseuap", typePropertiesType: "Hypernet", allocationTags: { - vNetID: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1", + VNetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1", }, - location: "centraluseuap", prefix: "3.2.5.0/24", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.beginCreateOrUpdateAndWait( - resourceGroupName, - ipAllocationName, - parameters, - ); + }); console.log(result); } async function main(): Promise { - await createIPAllocation(); + await createIpAllocation(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsDeleteSample.ts index f90de92b82f0..860cc2d5e8f5 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsDeleteSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified IpAllocation. + * This sample demonstrates how to deletes the specified IpAllocation. * - * @summary Deletes the specified IpAllocation. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationDelete.json + * @summary deletes the specified IpAllocation. + * x-ms-original-file: 2025-07-01/IpAllocationDelete.json */ -async function deleteIPAllocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; +async function deleteIpAllocation(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.beginDeleteAndWait( - resourceGroupName, - ipAllocationName, - ); - console.log(result); + await client.ipAllocations.delete("rg1", "test-ipallocation"); } async function main(): Promise { - await deleteIPAllocation(); + await deleteIpAllocation(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsGetSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsGetSample.ts index 2c7a6573690e..e83aefb3dc38 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsGetSample.ts @@ -3,29 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified IpAllocation by resource group. + * This sample demonstrates how to gets the specified IpAllocation by resource group. * - * @summary Gets the specified IpAllocation by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationGet.json + * @summary gets the specified IpAllocation by resource group. + * x-ms-original-file: 2025-07-01/IpAllocationGet.json */ -async function getIPAllocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; +async function getIpAllocation(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.get( - resourceGroupName, - ipAllocationName, - ); + const result = await client.ipAllocations.get("rg1", "test-ipallocation"); console.log(result); } async function main(): Promise { - await getIPAllocation(); + await getIpAllocation(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsListByResourceGroupSample.ts index 715e360635f8..b653e42c02df 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsListByResourceGroupSample.ts @@ -3,30 +3,27 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all IpAllocations in a resource group. + * This sample demonstrates how to gets all IpAllocations in a resource group. * - * @summary Gets all IpAllocations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationListByResourceGroup.json + * @summary gets all IpAllocations in a resource group. + * x-ms-original-file: 2025-07-01/IpAllocationListByResourceGroup.json */ -async function listIPAllocationsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; +async function listIpAllocationsInResourceGroup(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.ipAllocations.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.ipAllocations.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await listIPAllocationsInResourceGroup(); + await listIpAllocationsInResourceGroup(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsListSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsListSample.ts index f68950861981..d5d2804563ab 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsListSample.ts @@ -3,27 +3,27 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all IpAllocations in a subscription. + * This sample demonstrates how to gets all IpAllocations in a subscription. * - * @summary Gets all IpAllocations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationList.json + * @summary gets all IpAllocations in a subscription. + * x-ms-original-file: 2025-07-01/IpAllocationList.json */ -async function listAllIPAllocations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; +async function listAllIpAllocations(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.ipAllocations.list()) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await listAllIPAllocations(); + await listAllIpAllocations(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsUpdateTagsSample.ts index 07f8201e1c07..56795d578b56 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a IpAllocation tags. + * This sample demonstrates how to updates a IpAllocation tags. * - * @summary Updates a IpAllocation tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationUpdateTags.json + * @summary updates a IpAllocation tags. + * x-ms-original-file: 2025-07-01/IpAllocationUpdateTags.json */ async function updateVirtualNetworkTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.updateTags( - resourceGroupName, - ipAllocationName, - parameters, - ); + const result = await client.ipAllocations.updateTags("rg1", "test-ipallocation", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/ipGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsCreateOrUpdateSample.ts index 05d12d5375ae..4921b6e087ed 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsCreateOrUpdateSample.ts @@ -1,39 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { IpGroup} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates an ipGroups in a specified resource group. + * This sample demonstrates how to creates or updates an ipGroups in a specified resource group. * - * @summary Creates or updates an ipGroups in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsCreate.json + * @summary creates or updates an ipGroups in a specified resource group. + * x-ms-original-file: 2025-07-01/IpGroupsCreate.json */ -async function createOrUpdateIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const parameters: IpGroup = { - ipAddresses: ["13.64.39.16/32", "40.74.146.80/31", "40.74.147.32/28"], - location: "West US", - tags: { key1: "value1" }, - }; +async function createOrUpdateIpGroups(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - ipGroupsName, - parameters, - ); + const result = await client.ipGroups.createOrUpdate("myResourceGroup", "ipGroups1", { + location: "West US", + ipAddresses: ["13.64.39.16/32", "40.74.146.80/31", "40.74.147.32/28"], + tags: { key1: "value1" }, + }); console.log(result); } async function main(): Promise { - await createOrUpdateIPGroups(); + await createOrUpdateIpGroups(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsDeleteSample.ts index 593e317da01f..ad40b1f585f6 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsDeleteSample.ts @@ -3,30 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified ipGroups. + * This sample demonstrates how to deletes the specified ipGroups. * - * @summary Deletes the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsDelete.json + * @summary deletes the specified ipGroups. + * x-ms-original-file: 2025-07-01/IpGroupsDelete.json */ -async function deleteIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; +async function deleteIpGroups(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.beginDeleteAndWait( - resourceGroupName, - ipGroupsName, - ); - console.log(result); + await client.ipGroups.delete("myResourceGroup", "ipGroups1"); } async function main(): Promise { - await deleteIPGroups(); + await deleteIpGroups(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsGetSample.ts index 8d64b8bf6777..ed1233fbc929 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsGetSample.ts @@ -3,27 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified ipGroups. + * This sample demonstrates how to gets the specified ipGroups. * - * @summary Gets the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsGet.json + * @summary gets the specified ipGroups. + * x-ms-original-file: 2025-07-01/IpGroupsGet.json */ -async function getIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; +async function getIpGroups(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.get(resourceGroupName, ipGroupsName); + const result = await client.ipGroups.get("myResourceGroup", "ipGroups1"); console.log(result); } async function main(): Promise { - await getIPGroups(); + await getIpGroups(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipGroupsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsListByResourceGroupSample.ts index 4ac24f20543e..7b11e50ec682 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsListByResourceGroupSample.ts @@ -3,31 +3,27 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all IpGroups in a resource group. + * This sample demonstrates how to gets all IpGroups in a resource group. * - * @summary Gets all IpGroups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsListByResourceGroup.json + * @summary gets all IpGroups in a resource group. + * x-ms-original-file: 2025-07-01/IpGroupsListByResourceGroup.json */ -async function listByResourceGroupIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; +async function listByResourceGroupIpGroups(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.ipGroups.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.ipGroups.listByResourceGroup("myResourceGroup")) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await listByResourceGroupIPGroups(); + await listByResourceGroupIpGroups(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipGroupsListSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsListSample.ts index 8531041cc41e..c506879e89ff 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsListSample.ts @@ -3,27 +3,27 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all IpGroups in a subscription. + * This sample demonstrates how to gets all IpGroups in a subscription. * - * @summary Gets all IpGroups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsListBySubscription.json + * @summary gets all IpGroups in a subscription. + * x-ms-original-file: 2025-07-01/IpGroupsListBySubscription.json */ -async function listIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; +async function listIpGroups(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.ipGroups.list()) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await listIPGroups(); + await listIpGroups(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipGroupsUpdateGroupsSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsUpdateGroupsSample.ts index 36bacd58e28d..89e900f721f6 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsUpdateGroupsSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsUpdateGroupsSample.ts @@ -1,35 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates tags of an IpGroups resource. + * This sample demonstrates how to updates tags of an IpGroups resource. * - * @summary Updates tags of an IpGroups resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsUpdateTags.json + * @summary updates tags of an IpGroups resource. + * x-ms-original-file: 2025-07-01/IpGroupsUpdateTags.json */ -async function updateIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const parameters: TagsObject = { tags: { key1: "value1", key2: "value2" } }; +async function updateIpGroups(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.updateGroups( - resourceGroupName, - ipGroupsName, - parameters, - ); + const result = await client.ipGroups.updateGroups("myResourceGroup", "ipGroups1", { + tags: { key1: "value1", key2: "value2" }, + }); console.log(result); } async function main(): Promise { - await updateIPGroups(); + await updateIpGroups(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsCreateSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsCreateSample.ts index 64554d2253c5..31b49c9bee31 100644 --- a/sdk/network/arm-network/samples-dev/ipamPoolsCreateSample.ts +++ b/sdk/network/arm-network/samples-dev/ipamPoolsCreateSample.ts @@ -1,40 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { IpamPool} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates/Updates the Pool resource. + * This sample demonstrates how to creates/Updates the Pool resource. * - * @summary Creates/Updates the Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Create.json + * @summary creates/Updates the Pool resource. + * x-ms-original-file: 2025-07-01/IpamPools_Create.json */ async function ipamPoolsCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const body: IpamPool = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.create("rg1", "TestNetworkManager", "TestPool", { location: "eastus", properties: { description: "Test description.", addressPrefixes: ["10.0.0.0/24"], parentPoolName: "", }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.beginCreateAndWait( - resourceGroupName, - networkManagerName, - poolName, - body, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsDeleteSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsDeleteSample.ts index 16355fcc8949..0c10c0133e4c 100644 --- a/sdk/network/arm-network/samples-dev/ipamPoolsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/ipamPoolsDeleteSample.ts @@ -3,29 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the Pool resource. + * This sample demonstrates how to delete the Pool resource. * - * @summary Delete the Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Delete.json + * @summary delete the Pool resource. + * x-ms-original-file: 2025-07-01/IpamPools_Delete.json */ async function ipamPoolsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); + await client.ipamPools.delete("rg1", "TestNetworkManager", "TestPool"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsGetPoolUsageSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsGetPoolUsageSample.ts index d4e356a31d80..2c570318449f 100644 --- a/sdk/network/arm-network/samples-dev/ipamPoolsGetPoolUsageSample.ts +++ b/sdk/network/arm-network/samples-dev/ipamPoolsGetPoolUsageSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get the Pool Usage. + * This sample demonstrates how to get the Pool Usage. * - * @summary Get the Pool Usage. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_GetPoolUsage.json + * @summary get the Pool Usage. + * x-ms-original-file: 2025-07-01/IpamPools_GetPoolUsage.json */ async function ipamPoolsGetPoolUsage(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.getPoolUsage( - resourceGroupName, - networkManagerName, - poolName, - ); + const result = await client.ipamPools.getPoolUsage("rg1", "TestNetworkManager", "TestPool"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsGetSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsGetSample.ts index c3cbeb7c27ab..6048e53a463c 100644 --- a/sdk/network/arm-network/samples-dev/ipamPoolsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/ipamPoolsGetSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specific Pool resource. + * This sample demonstrates how to gets the specific Pool resource. * - * @summary Gets the specific Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Get.json + * @summary gets the specific Pool resource. + * x-ms-original-file: 2025-07-01/IpamPools_Get.json */ async function ipamPoolsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.get( - resourceGroupName, - networkManagerName, - poolName, - ); + const result = await client.ipamPools.get("rg1", "TestNetworkManager", "TestPool"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsListAssociatedResourcesSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsListAssociatedResourcesSample.ts index 3da854e088ea..86d438ba7ed7 100644 --- a/sdk/network/arm-network/samples-dev/ipamPoolsListAssociatedResourcesSample.ts +++ b/sdk/network/arm-network/samples-dev/ipamPoolsListAssociatedResourcesSample.ts @@ -3,31 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List Associated Resource in the Pool. + * This sample demonstrates how to list Associated Resource in the Pool. * - * @summary List Associated Resource in the Pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_ListAssociatedResources.json + * @summary list Associated Resource in the Pool. + * x-ms-original-file: 2025-07-01/IpamPools_ListAssociatedResources.json */ async function ipamPoolsListAssociatedResources(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.ipamPools.listAssociatedResources( - resourceGroupName, - networkManagerName, - poolName, + "rg1", + "TestNetworkManager", + "TestPool", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsListSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsListSample.ts index ab700597e81e..4f61e1aa3f70 100644 --- a/sdk/network/arm-network/samples-dev/ipamPoolsListSample.ts +++ b/sdk/network/arm-network/samples-dev/ipamPoolsListSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets list of Pool resources at Network Manager level. + * This sample demonstrates how to gets list of Pool resources at Network Manager level. * - * @summary Gets list of Pool resources at Network Manager level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_List.json + * @summary gets list of Pool resources at Network Manager level. + * x-ms-original-file: 2025-07-01/IpamPools_List.json */ async function ipamPoolsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.ipamPools.list( - resourceGroupName, - networkManagerName, - )) { + for await (const item of client.ipamPools.list("rg1", "TestNetworkManager")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsUpdateSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsUpdateSample.ts index 69892123b5ef..1a35cb28aa55 100644 --- a/sdk/network/arm-network/samples-dev/ipamPoolsUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/ipamPoolsUpdateSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates the specific Pool resource. + * This sample demonstrates how to updates the specific Pool resource. * - * @summary Updates the specific Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Update.json + * @summary updates the specific Pool resource. + * x-ms-original-file: 2025-07-01/IpamPools_Update.json */ async function ipamPoolsUpdate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.update( - resourceGroupName, - networkManagerName, - poolName, - ); + const result = await client.ipamPools.update("rg1", "TestNetworkManager", "TestPool"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/listActiveConnectivityConfigurationsSample.ts b/sdk/network/arm-network/samples-dev/listActiveConnectivityConfigurationsSample.ts index e56ca5f19ea5..8b4c05526908 100644 --- a/sdk/network/arm-network/samples-dev/listActiveConnectivityConfigurationsSample.ts +++ b/sdk/network/arm-network/samples-dev/listActiveConnectivityConfigurationsSample.ts @@ -1,37 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ActiveConfigurationParameter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists active connectivity configurations in a network manager. + * This sample demonstrates how to lists active connectivity configurations in a network manager. * - * @summary Lists active connectivity configurations in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json + * @summary lists active connectivity configurations in a network manager. + * x-ms-original-file: 2025-07-01/NetworkManagerActiveConnectivityConfigurationsList.json */ async function listActiveConnectivityConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const parameters: ActiveConfigurationParameter = { - regions: ["westus"], - skipToken: "fakeSkipTokenCode", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.listActiveConnectivityConfigurations( - resourceGroupName, - networkManagerName, - parameters, + "myResourceGroup", + "testNetworkManager", + { regions: ["westus"], skipToken: "fakeSkipTokenCode" }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/listActiveSecurityAdminRulesSample.ts b/sdk/network/arm-network/samples-dev/listActiveSecurityAdminRulesSample.ts index 2c88688c9b50..b231667a9807 100644 --- a/sdk/network/arm-network/samples-dev/listActiveSecurityAdminRulesSample.ts +++ b/sdk/network/arm-network/samples-dev/listActiveSecurityAdminRulesSample.ts @@ -1,37 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ActiveConfigurationParameter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists active security admin rules in a network manager. + * This sample demonstrates how to lists active security admin rules in a network manager. * - * @summary Lists active security admin rules in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json + * @summary lists active security admin rules in a network manager. + * x-ms-original-file: 2025-07-01/NetworkManagerActiveSecurityAdminRulesList.json */ async function listActiveSecurityAdminRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const parameters: ActiveConfigurationParameter = { - regions: ["westus"], - skipToken: "fakeSkipTokenCode", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.listActiveSecurityAdminRules( - resourceGroupName, - networkManagerName, - parameters, + "myResourceGroup", + "testNetworkManager", + { regions: ["westus"], skipToken: "fakeSkipTokenCode" }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts b/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts index 52428d128dd9..0449ff51680b 100644 --- a/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts +++ b/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts @@ -1,36 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - QueryRequestOptions} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all effective connectivity configurations applied on a virtual network. + * This sample demonstrates how to list all effective connectivity configurations applied on a virtual network. * - * @summary List all effective connectivity configurations applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json + * @summary list all effective connectivity configurations applied on a virtual network. + * x-ms-original-file: 2025-07-01/NetworkManagerEffectiveConnectivityConfigurationsList.json */ async function listEffectiveConnectivityConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const virtualNetworkName = "testVirtualNetwork"; - const parameters: QueryRequestOptions = { skipToken: "FakeSkipTokenCode" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.listNetworkManagerEffectiveConnectivityConfigurations( - resourceGroupName, - virtualNetworkName, - parameters, - ); + const result = await client.listNetworkManagerEffectiveConnectivityConfigurations( + "myResourceGroup", + "testVirtualNetwork", + { skipToken: "FakeSkipTokenCode" }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveSecurityAdminRulesSample.ts b/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveSecurityAdminRulesSample.ts index a55a59ebd5db..99fcf773da4c 100644 --- a/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveSecurityAdminRulesSample.ts +++ b/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveSecurityAdminRulesSample.ts @@ -1,34 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - QueryRequestOptions} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all effective security admin rules applied on a virtual network. + * This sample demonstrates how to list all effective security admin rules applied on a virtual network. * - * @summary List all effective security admin rules applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json + * @summary list all effective security admin rules applied on a virtual network. + * x-ms-original-file: 2025-07-01/NetworkManagerEffectiveSecurityAdminRulesList.json */ async function listEffectiveSecurityAdminRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const virtualNetworkName = "testVirtualNetwork"; - const parameters: QueryRequestOptions = { skipToken: "FakeSkipTokenCode" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.listNetworkManagerEffectiveSecurityAdminRules( - resourceGroupName, - virtualNetworkName, - parameters, + "myResourceGroup", + "testVirtualNetwork", + { skipToken: "FakeSkipTokenCode" }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts index ae610180aec9..0b0397cdfdcf 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts @@ -1,52 +1,42 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BackendAddressPool} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a load balancer backend address pool. + * This sample demonstrates how to creates or updates a load balancer backend address pool. * - * @summary Creates or updates a load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json + * @summary creates or updates a load balancer backend address pool. + * x-ms-original-file: 2025-07-01/LBBackendAddressPoolWithBackendAddressesPut.json */ async function updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const parameters: BackendAddressPool = { - loadBalancerBackendAddresses: [ - { - name: "address1", - ipAddress: "10.0.0.4", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - { - name: "address2", - ipAddress: "10.0.0.5", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.loadBalancerBackendAddressPools.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - parameters, - ); + const result = await client.loadBalancerBackendAddressPools.createOrUpdate( + "testrg", + "lb", + "backend", + { + loadBalancerBackendAddresses: [ + { + name: "address1", + ipAddress: "10.0.0.4", + virtualNetwork: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", + }, + }, + { + name: "address2", + ipAddress: "10.0.0.5", + virtualNetwork: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", + }, + }, + ], + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsDeleteSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsDeleteSample.ts index 0f1cca4837fb..861e70c2bcd3 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsDeleteSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified load balancer backend address pool. + * This sample demonstrates how to deletes the specified load balancer backend address pool. * - * @summary Deletes the specified load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerBackendAddressPoolDelete.json + * @summary deletes the specified load balancer backend address pool. + * x-ms-original-file: 2025-07-01/LoadBalancerBackendAddressPoolDelete.json */ async function backendAddressPoolDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.loadBalancerBackendAddressPools.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); + await client.loadBalancerBackendAddressPools.delete("testrg", "lb", "backend"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsGetSample.ts index 434fc2a59eef..543ec1c8bdc7 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsGetSample.ts @@ -3,47 +3,32 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets load balancer backend address pool. + * This sample demonstrates how to gets load balancer backend address pool. * - * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + * @summary gets load balancer backend address pool. + * x-ms-original-file: 2025-07-01/LBBackendAddressPoolWithBackendAddressesGet.json */ async function loadBalancerWithBackendAddressPoolWithBackendAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.get( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); + const result = await client.loadBalancerBackendAddressPools.get("testrg", "lb", "backend"); console.log(result); } /** - * This sample demonstrates how to Gets load balancer backend address pool. + * This sample demonstrates how to gets load balancer backend address pool. * - * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerBackendAddressPoolGet.json + * @summary gets load balancer backend address pool. + * x-ms-original-file: 2025-07-01/LoadBalancerBackendAddressPoolGet.json */ async function loadBalancerBackendAddressPoolGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.get( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); + const result = await client.loadBalancerBackendAddressPools.get("testrg", "lb", "backend"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsListSample.ts index 84ddfdc12d0b..b22f1c29c039 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsListSample.ts @@ -3,49 +3,40 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the load balancer backed address pools. + * This sample demonstrates how to gets all the load balancer backed address pools. * - * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json + * @summary gets all the load balancer backed address pools. + * x-ms-original-file: 2025-07-01/LBBackendAddressPoolListWithBackendAddressesPoolType.json */ async function loadBalancerWithBackendAddressPoolContainingBackendAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.loadBalancerBackendAddressPools.list( - resourceGroupName, - loadBalancerName, - )) { + for await (const item of client.loadBalancerBackendAddressPools.list("testrg", "lb")) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to Gets all the load balancer backed address pools. + * This sample demonstrates how to gets all the load balancer backed address pools. * - * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerBackendAddressPoolList.json + * @summary gets all the load balancer backed address pools. + * x-ms-original-file: 2025-07-01/LoadBalancerBackendAddressPoolList.json */ async function loadBalancerBackendAddressPoolList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.loadBalancerBackendAddressPools.list( - resourceGroupName, - loadBalancerName, - )) { + for await (const item of client.loadBalancerBackendAddressPools.list("testrg", "lb")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsGetSample.ts index c543bfaf7dad..fa8de45a3e94 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets load balancer frontend IP configuration. + * This sample demonstrates how to gets load balancer frontend IP configuration. * - * @summary Gets load balancer frontend IP configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json + * @summary gets load balancer frontend IP configuration. + * x-ms-original-file: 2025-07-01/LoadBalancerFrontendIPConfigurationGet.json */ async function loadBalancerFrontendIPConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const frontendIPConfigurationName = "frontend"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerFrontendIPConfigurations.get( - resourceGroupName, - loadBalancerName, - frontendIPConfigurationName, - ); + const result = await client.loadBalancerFrontendIPConfigurations.get("testrg", "lb", "frontend"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsListSample.ts index c37c497c026e..6657ca9ffe2d 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the load balancer frontend IP configurations. + * This sample demonstrates how to gets all the load balancer frontend IP configurations. * - * @summary Gets all the load balancer frontend IP configurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerFrontendIPConfigurationList.json + * @summary gets all the load balancer frontend IP configurations. + * x-ms-original-file: 2025-07-01/LoadBalancerFrontendIPConfigurationList.json */ async function loadBalancerFrontendIPConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.loadBalancerFrontendIPConfigurations.list( - resourceGroupName, - loadBalancerName, - )) { + for await (const item of client.loadBalancerFrontendIPConfigurations.list("testrg", "lb")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesGetSample.ts index 9cef37a99ec2..7d85e932669e 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified load balancer load balancing rule. + * This sample demonstrates how to gets the specified load balancer load balancing rule. * - * @summary Gets the specified load balancer load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerLoadBalancingRuleGet.json + * @summary gets the specified load balancer load balancing rule. + * x-ms-original-file: 2025-07-01/LoadBalancerLoadBalancingRuleGet.json */ async function loadBalancerLoadBalancingRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const loadBalancingRuleName = "rule1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerLoadBalancingRules.get( - resourceGroupName, - loadBalancerName, - loadBalancingRuleName, - ); + const result = await client.loadBalancerLoadBalancingRules.get("testrg", "lb1", "rule1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesHealthSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesHealthSample.ts index 363b64359be1..9ed13c3a1b1f 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesHealthSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesHealthSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get health details of a load balancing rule. + * This sample demonstrates how to get health details of a load balancing rule. * - * @summary Get health details of a load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerHealth.json + * @summary get health details of a load balancing rule. + * x-ms-original-file: 2025-07-01/LoadBalancerHealth.json */ async function queryLoadBalancingRuleHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const loadBalancingRuleName = "rulelb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerLoadBalancingRules.beginHealthAndWait( - groupName, - loadBalancerName, - loadBalancingRuleName, - ); + const result = await client.loadBalancerLoadBalancingRules.health("rg1", "lb1", "rulelb"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesListSample.ts index 67672e0b1ccc..87735da4448b 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the load balancing rules in a load balancer. + * This sample demonstrates how to gets all the load balancing rules in a load balancer. * - * @summary Gets all the load balancing rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerLoadBalancingRuleList.json + * @summary gets all the load balancing rules in a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerLoadBalancingRuleList.json */ async function loadBalancerLoadBalancingRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.loadBalancerLoadBalancingRules.list( - resourceGroupName, - loadBalancerName, - )) { + for await (const item of client.loadBalancerLoadBalancingRules.list("testrg", "lb1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerNetworkInterfacesListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerNetworkInterfacesListSample.ts index 86c046ae082a..1aedc37a9639 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerNetworkInterfacesListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerNetworkInterfacesListSample.ts @@ -3,49 +3,40 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets associated load balancer network interfaces. + * This sample demonstrates how to gets associated load balancer network interfaces. * - * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json + * @summary gets associated load balancer network interfaces. + * x-ms-original-file: 2025-07-01/LoadBalancerNetworkInterfaceListSimple.json */ async function loadBalancerNetworkInterfaceListSimple(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.loadBalancerNetworkInterfaces.list( - resourceGroupName, - loadBalancerName, - )) { + for await (const item of client.loadBalancerNetworkInterfaces.list("testrg", "lb")) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to Gets associated load balancer network interfaces. + * This sample demonstrates how to gets associated load balancer network interfaces. * - * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerNetworkInterfaceListVmss.json + * @summary gets associated load balancer network interfaces. + * x-ms-original-file: 2025-07-01/LoadBalancerNetworkInterfaceListVmss.json */ async function loadBalancerNetworkInterfaceListVmss(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.loadBalancerNetworkInterfaces.list( - resourceGroupName, - loadBalancerName, - )) { + for await (const item of client.loadBalancerNetworkInterfaces.list("testrg", "lb")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesGetSample.ts index d864745371dc..fce86e3caae0 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified load balancer outbound rule. + * This sample demonstrates how to gets the specified load balancer outbound rule. * - * @summary Gets the specified load balancer outbound rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerOutboundRuleGet.json + * @summary gets the specified load balancer outbound rule. + * x-ms-original-file: 2025-07-01/LoadBalancerOutboundRuleGet.json */ async function loadBalancerOutboundRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const outboundRuleName = "rule1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerOutboundRules.get( - resourceGroupName, - loadBalancerName, - outboundRuleName, - ); + const result = await client.loadBalancerOutboundRules.get("testrg", "lb1", "rule1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesListSample.ts index 4dc8430b4efd..7cfab66b9536 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the outbound rules in a load balancer. + * This sample demonstrates how to gets all the outbound rules in a load balancer. * - * @summary Gets all the outbound rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerOutboundRuleList.json + * @summary gets all the outbound rules in a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerOutboundRuleList.json */ async function loadBalancerOutboundRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.loadBalancerOutboundRules.list( - resourceGroupName, - loadBalancerName, - )) { + for await (const item of client.loadBalancerOutboundRules.list("testrg", "lb1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerProbesGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerProbesGetSample.ts index d764ef133fee..bd97c3f467ce 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerProbesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerProbesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets load balancer probe. + * This sample demonstrates how to gets load balancer probe. * - * @summary Gets load balancer probe. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerProbeGet.json + * @summary gets load balancer probe. + * x-ms-original-file: 2025-07-01/LoadBalancerProbeGet.json */ async function loadBalancerProbeGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const probeName = "probe1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerProbes.get( - resourceGroupName, - loadBalancerName, - probeName, - ); + const result = await client.loadBalancerProbes.get("testrg", "lb", "probe1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancerProbesListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerProbesListSample.ts index 20425d9f9f1a..23b6e51ab847 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerProbesListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerProbesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the load balancer probes. + * This sample demonstrates how to gets all the load balancer probes. * - * @summary Gets all the load balancer probes. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerProbeList.json + * @summary gets all the load balancer probes. + * x-ms-original-file: 2025-07-01/LoadBalancerProbeList.json */ async function loadBalancerProbeList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.loadBalancerProbes.list( - resourceGroupName, - loadBalancerName, - )) { + for await (const item of client.loadBalancerProbes.list("testrg", "lb")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersCreateOrUpdateSample.ts index 0a9974175dfd..21297cd6cec5 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersCreateOrUpdateSample.ts @@ -1,40 +1,37 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { LoadBalancer} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a load balancer. + * This sample demonstrates how to creates or updates a load balancer. * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreate.json + * @summary creates or updates a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerCreate.json */ async function createLoadBalancer(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate("rg1", "lb", { + location: "eastus", + backendAddressPools: [{}], frontendIPConfigurations: [ { - name: "fe-lb", subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", }, }, ], inboundNatPools: [], inboundNatRules: [ { - name: "in-nat-rule", backendPort: 3389, enableFloatingIP: true, enableTcpReset: false, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 3389, idleTimeoutInMinutes: 15, @@ -43,29 +40,26 @@ async function createLoadBalancer(): Promise { ], loadBalancingRules: [ { - name: "rulelb", backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", }, backendPort: 80, enableFloatingIP: true, enableTcpReset: false, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 80, idleTimeoutInMinutes: 15, loadDistribution: "Default", probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", }, protocol: "Tcp", }, ], - location: "eastus", probes: [ { - name: "probe-lb", intervalInSeconds: 15, numberOfProbes: 2, port: 80, @@ -75,128 +69,40 @@ async function createLoadBalancer(): Promise { }, ], scope: "Public", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a load balancer. + * This sample demonstrates how to creates or updates a load balancer. * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithZones.json + * @summary creates or updates a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerCreateGatewayLoadBalancerConsumer.json */ -async function createLoadBalancerWithFrontendIPInZone1(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - zones: ["1"], - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; +async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json - */ -async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], + const result = await client.loadBalancers.createOrUpdate("rg1", "lb", { + location: "eastus", + backendAddressPools: [{}], frontendIPConfigurations: [ { - name: "fe-lb", gatewayLoadBalancer: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", }, }, ], inboundNatPools: [], inboundNatRules: [ { - name: "in-nat-rule", backendPort: 3389, enableFloatingIP: true, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 3389, idleTimeoutInMinutes: 15, @@ -205,29 +111,26 @@ async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured(): Pr ], loadBalancingRules: [ { - name: "rulelb", backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", }, backendPort: 80, enableFloatingIP: true, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 80, idleTimeoutInMinutes: 15, loadDistribution: "Default", probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", }, protocol: "Tcp", }, ], - location: "eastus", outboundRules: [], probes: [ { - name: "probe-lb", intervalInSeconds: 15, numberOfProbes: 2, port: 80, @@ -237,31 +140,24 @@ async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured(): Pr }, ], sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a load balancer. + * This sample demonstrates how to creates or updates a load balancer. * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json + * @summary creates or updates a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json */ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate("rg1", "lb", { + location: "eastus", backendAddressPools: [ { - name: "be-lb", tunnelInterfaces: [ { type: "Internal", identifier: 900, port: 15000, protocol: "VXLAN" }, { type: "Internal", identifier: 901, port: 15001, protocol: "VXLAN" }, @@ -270,40 +166,36 @@ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOn ], frontendIPConfigurations: [ { - name: "fe-lb", subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", }, }, ], inboundNatPools: [], loadBalancingRules: [ { - name: "rulelb", backendAddressPools: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", }, ], backendPort: 0, enableFloatingIP: true, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 0, idleTimeoutInMinutes: 15, loadDistribution: "Default", probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", }, protocol: "All", }, ], - location: "eastus", outboundRules: [], probes: [ { - name: "probe-lb", intervalInSeconds: 15, numberOfProbes: 2, port: 80, @@ -313,69 +205,59 @@ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOn }, ], sku: { name: "Gateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a load balancer. + * This sample demonstrates how to creates or updates a load balancer. * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json + * @summary creates or updates a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json */ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb1" }, { name: "be-lb2" }], + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate("rg1", "lb", { + location: "eastus", + backendAddressPools: [{}, {}], frontendIPConfigurations: [ { - name: "fe-lb", subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", }, }, ], inboundNatPools: [], loadBalancingRules: [ { - name: "rulelb", backendAddressPool: {}, backendAddressPools: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb1", }, { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb2", }, ], backendPort: 0, enableFloatingIP: true, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 0, idleTimeoutInMinutes: 15, loadDistribution: "Default", probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", }, protocol: "All", }, ], - location: "eastus", outboundRules: [], probes: [ { - name: "probe-lb", intervalInSeconds: 15, numberOfProbes: 2, port: 80, @@ -385,36 +267,29 @@ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTw }, ], sku: { name: "Gateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a load balancer. + * This sample demonstrates how to creates or updates a load balancer. * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGlobalTier.json + * @summary creates or updates a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerCreateGlobalTier.json */ async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate("rg1", "lb", { + location: "eastus", backendAddressPools: [ { - name: "be-lb", loadBalancerBackendAddresses: [ { name: "regional-lb1-address", loadBalancerFrontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/regional-lb-rg1/providers/Microsoft.Network/loadBalancers/regional-lb/frontendIPConfigurations/fe-rlb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/regional-lb-rg1/providers/Microsoft.Network/loadBalancers/regional-lb/frontendIPConfigurations/fe-rlb", }, }, ], @@ -422,36 +297,32 @@ async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBa ], frontendIPConfigurations: [ { - name: "fe-lb", subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", }, }, ], loadBalancingRules: [ { - name: "rulelb", backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", }, backendPort: 80, enableFloatingIP: false, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 80, idleTimeoutInMinutes: 15, loadDistribution: "Default", probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", }, protocol: "Tcp", }, ], - location: "eastus", probes: [ { - name: "probe-lb", intervalInSeconds: 15, numberOfProbes: 2, port: 80, @@ -461,45 +332,37 @@ async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBa }, ], sku: { name: "Standard", tier: "Global" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a load balancer. + * This sample demonstrates how to creates or updates a load balancer. * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateStandardSku.json + * @summary creates or updates a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerCreateStandardSku.json */ -async function createLoadBalancerWithStandardSku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], +async function createLoadBalancerWithStandardSKU(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate("rg1", "lb", { + location: "eastus", + backendAddressPools: [{}], frontendIPConfigurations: [ { - name: "fe-lb", subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", }, }, ], inboundNatPools: [], inboundNatRules: [ { - name: "in-nat-rule", backendPort: 3389, enableFloatingIP: true, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 3389, idleTimeoutInMinutes: 15, @@ -508,29 +371,26 @@ async function createLoadBalancerWithStandardSku(): Promise { ], loadBalancingRules: [ { - name: "rulelb", backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", }, backendPort: 80, enableFloatingIP: true, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 80, idleTimeoutInMinutes: 15, loadDistribution: "Default", probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", }, protocol: "Tcp", }, ], - location: "eastus", outboundRules: [], probes: [ { - name: "probe-lb", intervalInSeconds: 15, numberOfProbes: 2, port: 80, @@ -540,53 +400,85 @@ async function createLoadBalancerWithStandardSku(): Promise { }, ], sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a load balancer. + * This sample demonstrates how to creates or updates a load balancer. * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json + * @summary creates or updates a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerCreateWithInboundNatPool.json */ -async function createLoadBalancerWithSyncModePropertyOnPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [ +async function createLoadBalancerWithInboundNatPool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate("rg1", "lb", { + location: "eastus", + backendAddressPools: [], + frontendIPConfigurations: [ { - name: "be-lb", - syncMode: "Automatic", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", + privateIPAllocationMethod: "Dynamic", + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/lbvnet/subnets/lbsubnet", + }, + zones: [], + }, + ], + inboundNatPools: [ + { + name: "test", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/inboundNatPools/test", + backendPort: 8888, + enableFloatingIP: true, + enableTcpReset: true, + frontendIPConfiguration: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", }, + frontendPortRangeEnd: 8085, + frontendPortRangeStart: 8080, + idleTimeoutInMinutes: 10, + protocol: "Tcp", }, ], + inboundNatRules: [], + loadBalancingRules: [], + outboundRules: [], + probes: [], + sku: { name: "Standard" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates a load balancer. + * + * @summary creates or updates a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerCreateWithOutboundRules.json + */ +async function createLoadBalancerWithOutboundRules(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate("rg1", "lb", { + location: "eastus", + backendAddressPools: [{}], frontendIPConfigurations: [ { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", + publicIPAddress: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip", }, }, ], inboundNatPools: [], inboundNatRules: [ { - name: "in-nat-rule", backendPort: 3389, enableFloatingIP: true, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 3389, idleTimeoutInMinutes: 15, @@ -595,29 +487,39 @@ async function createLoadBalancerWithSyncModePropertyOnPool(): Promise { ], loadBalancingRules: [ { - name: "rulelb", backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", }, backendPort: 80, + disableOutboundSnat: true, enableFloatingIP: true, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 80, idleTimeoutInMinutes: 15, loadDistribution: "Default", probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", }, protocol: "Tcp", }, ], - location: "eastus", - outboundRules: [], + outboundRules: [ + { + backendAddressPool: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", + }, + frontendIPConfigurations: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + }, + ], + protocol: "All", + }, + ], probes: [ { - name: "probe-lb", intervalInSeconds: 15, numberOfProbes: 2, port: 80, @@ -627,101 +529,113 @@ async function createLoadBalancerWithSyncModePropertyOnPool(): Promise { }, ], sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a load balancer. + * This sample demonstrates how to creates or updates a load balancer. * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithInboundNatPool.json + * @summary creates or updates a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerCreateWithSyncModePropertyOnPool.json */ -async function createLoadBalancerWithInboundNatPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [], +async function createLoadBalancerWithSyncModePropertyOnPool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate("rg1", "lb", { + location: "eastus", + backendAddressPools: [ + { + syncMode: "Automatic", + virtualNetwork: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", + }, + }, + ], frontendIPConfigurations: [ { - name: "test", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", - privateIPAllocationMethod: "Dynamic", subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/lbvnet/subnets/lbsubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", }, - zones: [], }, ], - inboundNatPools: [ + inboundNatPools: [], + inboundNatRules: [ { - name: "test", - backendPort: 8888, + backendPort: 3389, enableFloatingIP: true, - enableTcpReset: true, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + }, + frontendPort: 3389, + idleTimeoutInMinutes: 15, + protocol: "Tcp", + }, + ], + loadBalancingRules: [ + { + backendAddressPool: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", + }, + backendPort: 80, + enableFloatingIP: true, + frontendIPConfiguration: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + }, + frontendPort: 80, + idleTimeoutInMinutes: 15, + loadDistribution: "Default", + probe: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", }, - frontendPortRangeEnd: 8085, - frontendPortRangeStart: 8080, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/inboundNatPools/test", - idleTimeoutInMinutes: 10, protocol: "Tcp", }, ], - inboundNatRules: [], - loadBalancingRules: [], - location: "eastus", outboundRules: [], - probes: [], + probes: [ + { + intervalInSeconds: 15, + numberOfProbes: 2, + port: 80, + probeThreshold: 1, + requestPath: "healthcheck.aspx", + protocol: "Http", + }, + ], sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a load balancer. + * This sample demonstrates how to creates or updates a load balancer. * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithOutboundRules.json + * @summary creates or updates a load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerCreateWithZones.json */ -async function createLoadBalancerWithOutboundRules(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], +async function createLoadBalancerWithFrontendIPInZone1(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate("rg1", "lb", { + location: "eastus", + backendAddressPools: [{}], frontendIPConfigurations: [ { - name: "fe-lb", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip", + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", }, + zones: ["1"], }, ], inboundNatPools: [], inboundNatRules: [ { - name: "in-nat-rule", backendPort: 3389, enableFloatingIP: true, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 3389, idleTimeoutInMinutes: 15, @@ -730,43 +644,26 @@ async function createLoadBalancerWithOutboundRules(): Promise { ], loadBalancingRules: [ { - name: "rulelb", backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", }, backendPort: 80, - disableOutboundSnat: true, enableFloatingIP: true, frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, frontendPort: 80, idleTimeoutInMinutes: 15, loadDistribution: "Default", probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", }, protocol: "Tcp", }, ], - location: "eastus", - outboundRules: [ - { - name: "rule1", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - frontendIPConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - ], - protocol: "All", - }, - ], + outboundRules: [], probes: [ { - name: "probe-lb", intervalInSeconds: 15, numberOfProbes: 2, port: 80, @@ -776,28 +673,21 @@ async function createLoadBalancerWithOutboundRules(): Promise { }, ], sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); + }); console.log(result); } async function main(): Promise { await createLoadBalancer(); - await createLoadBalancerWithFrontendIPInZone1(); await createLoadBalancerWithGatewayLoadBalancerConsumerConfigured(); await createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool(); await createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool(); await createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool(); - await createLoadBalancerWithStandardSku(); - await createLoadBalancerWithSyncModePropertyOnPool(); + await createLoadBalancerWithStandardSKU(); await createLoadBalancerWithInboundNatPool(); await createLoadBalancerWithOutboundRules(); + await createLoadBalancerWithSyncModePropertyOnPool(); + await createLoadBalancerWithFrontendIPInZone1(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/loadBalancersDeleteSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersDeleteSample.ts index 3182473680bc..62dcadec1fed 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified load balancer. + * This sample demonstrates how to deletes the specified load balancer. * - * @summary Deletes the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerDelete.json + * @summary deletes the specified load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerDelete.json */ async function deleteLoadBalancer(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - ); - console.log(result); + await client.loadBalancers.delete("rg1", "lb"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/loadBalancersGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersGetSample.ts index 9be1b199367c..b722a4be8478 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersGetSample.ts @@ -3,49 +3,53 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified load balancer. + * This sample demonstrates how to gets the specified load balancer. * - * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerGet.json + * @summary gets the specified load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerGet.json */ async function getLoadBalancer(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.get( - resourceGroupName, - loadBalancerName, - ); + const result = await client.loadBalancers.get("rg1", "lb"); console.log(result); } /** - * This sample demonstrates how to Gets the specified load balancer. + * This sample demonstrates how to gets the specified load balancer. * - * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + * @summary gets the specified load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerGetInboundNatRulePortMapping.json */ -async function getLoadBalancerWithInboundNatRulePortMapping(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; +async function getLoadBalancerWithInboundNATRulePortMapping(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.get( - resourceGroupName, - loadBalancerName, - ); + const result = await client.loadBalancers.get("rg1", "lb"); + console.log(result); +} + +/** + * This sample demonstrates how to gets the specified load balancer. + * + * @summary gets the specified load balancer. + * x-ms-original-file: 2025-07-01/LoadBalancerGetReduced.json + */ +async function getLoadBalancerReduced(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancers.get("rg-name", "lb-name", { detailLevel: "Reduced" }); console.log(result); } async function main(): Promise { await getLoadBalancer(); - await getLoadBalancerWithInboundNatRulePortMapping(); + await getLoadBalancerWithInboundNATRulePortMapping(); + await getLoadBalancerReduced(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/loadBalancersListAllSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersListAllSample.ts index a1dd25596b24..95844228eb4a 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the load balancers in a subscription. + * This sample demonstrates how to gets all the load balancers in a subscription. * - * @summary Gets all the load balancers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerListAll.json + * @summary gets all the load balancers in a subscription. + * x-ms-original-file: 2025-07-01/LoadBalancerListAll.json */ async function listAllLoadBalancers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.loadBalancers.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancersListInboundNatRulePortMappingsSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersListInboundNatRulePortMappingsSample.ts index f1e012f189b5..2f238cbdd768 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersListInboundNatRulePortMappingsSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersListInboundNatRulePortMappingsSample.ts @@ -1,42 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - QueryInboundNatRulePortMappingRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List of inbound NAT rule port mappings. + * This sample demonstrates how to list of inbound NAT rule port mappings. * - * @summary List of inbound NAT rule port mappings. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/QueryInboundNatRulePortMapping.json + * @summary list of inbound NAT rule port mappings. + * x-ms-original-file: 2025-07-01/QueryInboundNatRulePortMapping.json */ -async function queryInboundNatRulePortMapping(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const backendPoolName = "bp1"; - const parameters: QueryInboundNatRulePortMappingRequest = { - ipAddress: "10.0.0.4", - }; +async function queryInboundNATRulePortMapping(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.loadBalancers.beginListInboundNatRulePortMappingsAndWait( - groupName, - loadBalancerName, - backendPoolName, - parameters, - ); + const result = await client.loadBalancers.listInboundNatRulePortMappings("rg1", "lb1", "bp1", { + ipAddress: "10.0.0.4", + }); console.log(result); } async function main(): Promise { - await queryInboundNatRulePortMapping(); + await queryInboundNATRulePortMapping(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/loadBalancersListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersListSample.ts index 17606c3c692a..c2e61d6d1895 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the load balancers in a resource group. + * This sample demonstrates how to gets all the load balancers in a resource group. * - * @summary Gets all the load balancers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerList.json + * @summary gets all the load balancers in a resource group. + * x-ms-original-file: 2025-07-01/LoadBalancerList.json */ async function listLoadBalancersInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.loadBalancers.list(resourceGroupName)) { + for await (const item of client.loadBalancers.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/loadBalancersMigrateToIPBasedSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersMigrateToIPBasedSample.ts deleted file mode 100644 index 321cabbb1c08..000000000000 --- a/sdk/network/arm-network/samples-dev/loadBalancersMigrateToIPBasedSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - MigrateLoadBalancerToIpBasedRequest, - LoadBalancersMigrateToIpBasedOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Migrate load balancer to IP Based - * - * @summary Migrate load balancer to IP Based - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/MigrateLoadBalancerToIPBased.json - */ -async function migrateLoadBalancerToIPBased(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const parameters: MigrateLoadBalancerToIpBasedRequest = { - pools: ["pool1", "pool2"], - }; - const options: LoadBalancersMigrateToIpBasedOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.migrateToIpBased( - groupName, - loadBalancerName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await migrateLoadBalancerToIPBased(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/loadBalancersMigrateToIpBasedSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersMigrateToIpBasedSample.ts new file mode 100644 index 000000000000..e3bcf0ed5bb2 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/loadBalancersMigrateToIpBasedSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to migrate load balancer to IP Based + * + * @summary migrate load balancer to IP Based + * x-ms-original-file: 2025-07-01/MigrateLoadBalancerToIPBased.json + */ +async function migrateLoadBalancerToIPBased(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancers.migrateToIpBased("rg1", "lb1", { + parameters: { pools: ["pool1", "pool2"] }, + }); + console.log(result); +} + +async function main(): Promise { + await migrateLoadBalancerToIPBased(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIPAddressesSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIPAddressesSample.ts deleted file mode 100644 index ebaf8fe015c3..000000000000 --- a/sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIPAddressesSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - LoadBalancerVipSwapRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Swaps VIPs between two load balancers. - * - * @summary Swaps VIPs between two load balancers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancersSwapPublicIpAddresses.json - */ -async function swapViPsBetweenTwoLoadBalancers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const parameters: LoadBalancerVipSwapRequest = { - frontendIPConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/lbfe1", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/pip2", - }, - }, - { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/loadBalancers/lb2/frontendIPConfigurations/lbfe2", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginSwapPublicIpAddressesAndWait( - location, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await swapViPsBetweenTwoLoadBalancers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIpAddressesSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIpAddressesSample.ts new file mode 100644 index 000000000000..85ba6ee0ffb5 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIpAddressesSample.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to swaps VIPs between two load balancers. + * + * @summary swaps VIPs between two load balancers. + * x-ms-original-file: 2025-07-01/LoadBalancersSwapPublicIpAddresses.json + */ +async function swapVIPsBetweenTwoLoadBalancers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.loadBalancers.swapPublicIpAddresses("westus", { + frontendIPConfigurations: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/lbfe1", + publicIPAddress: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/pip2", + }, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Network/loadBalancers/lb2/frontendIPConfigurations/lbfe2", + publicIPAddress: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1", + }, + }, + ], + }); +} + +async function main(): Promise { + await swapVIPsBetweenTwoLoadBalancers(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/loadBalancersUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersUpdateTagsSample.ts index 841fbbb903dc..a9dae2ca073e 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a load balancer tags. + * This sample demonstrates how to updates a load balancer tags. * - * @summary Updates a load balancer tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerUpdateTags.json + * @summary updates a load balancer tags. + * x-ms-original-file: 2025-07-01/LoadBalancerUpdateTags.json */ async function updateLoadBalancerTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.updateTags( - resourceGroupName, - loadBalancerName, - parameters, - ); + const result = await client.loadBalancers.updateTags("rg1", "lb", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/localNetworkGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/localNetworkGatewaysCreateOrUpdateSample.ts index 7b4c664127b4..1d98025f643d 100644 --- a/sdk/network/arm-network/samples-dev/localNetworkGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/localNetworkGatewaysCreateOrUpdateSample.ts @@ -1,37 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - LocalNetworkGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a local network gateway in the specified resource group. + * This sample demonstrates how to creates or updates a local network gateway in the specified resource group. * - * @summary Creates or updates a local network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayCreate.json + * @summary creates or updates a local network gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/LocalNetworkGatewayCreate.json */ async function createLocalNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const parameters: LocalNetworkGateway = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.localNetworkGateways.createOrUpdate("rg1", "localgw", { + location: "Central US", fqdn: "site1.contoso.com", gatewayIpAddress: "11.12.13.14", localNetworkAddressSpace: { addressPrefixes: ["10.1.0.0/16"] }, - location: "Central US", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - localNetworkGatewayName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/localNetworkGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/localNetworkGatewaysDeleteSample.ts index b4dee4a41ba8..d28b9e93d567 100644 --- a/sdk/network/arm-network/samples-dev/localNetworkGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/localNetworkGatewaysDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified local network gateway. + * This sample demonstrates how to deletes the specified local network gateway. * - * @summary Deletes the specified local network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayDelete.json + * @summary deletes the specified local network gateway. + * x-ms-original-file: 2025-07-01/LocalNetworkGatewayDelete.json */ async function deleteLocalNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.beginDeleteAndWait( - resourceGroupName, - localNetworkGatewayName, - ); - console.log(result); + await client.localNetworkGateways.delete("rg1", "localgw"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/localNetworkGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/localNetworkGatewaysGetSample.ts index 3e6f06758839..b1f8f56677e2 100644 --- a/sdk/network/arm-network/samples-dev/localNetworkGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/localNetworkGatewaysGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified local network gateway in a resource group. + * This sample demonstrates how to gets the specified local network gateway in a resource group. * - * @summary Gets the specified local network gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayGet.json + * @summary gets the specified local network gateway in a resource group. + * x-ms-original-file: 2025-07-01/LocalNetworkGatewayGet.json */ async function getLocalNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.get( - resourceGroupName, - localNetworkGatewayName, - ); + const result = await client.localNetworkGateways.get("rg1", "localgw"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/localNetworkGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/localNetworkGatewaysListSample.ts index 78615db9889f..e49e0ef6f61b 100644 --- a/sdk/network/arm-network/samples-dev/localNetworkGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/localNetworkGatewaysListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the local network gateways in a resource group. + * This sample demonstrates how to gets all the local network gateways in a resource group. * - * @summary Gets all the local network gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayList.json + * @summary gets all the local network gateways in a resource group. + * x-ms-original-file: 2025-07-01/LocalNetworkGatewayList.json */ async function listLocalNetworkGateways(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.localNetworkGateways.list( - resourceGroupName, - )) { + for await (const item of client.localNetworkGateways.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/localNetworkGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/localNetworkGatewaysUpdateTagsSample.ts index 38e861efa208..534ad6cc92db 100644 --- a/sdk/network/arm-network/samples-dev/localNetworkGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/localNetworkGatewaysUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a local network gateway tags. + * This sample demonstrates how to updates a local network gateway tags. * - * @summary Updates a local network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayUpdateTags.json + * @summary updates a local network gateway tags. + * x-ms-original-file: 2025-07-01/LocalNetworkGatewayUpdateTags.json */ async function updateLocalNetworkGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "lgw"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.updateTags( - resourceGroupName, - localNetworkGatewayName, - parameters, - ); + const result = await client.localNetworkGateways.updateTags("rg1", "lgw", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts index 92978f2f7536..286d148d2682 100644 --- a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts @@ -1,35 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkManagerConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a network manager connection on this management group. + * This sample demonstrates how to create a network manager connection on this management group. * - * @summary Create a network manager connection on this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupPut.json + * @summary create a network manager connection on this management group. + * x-ms-original-file: 2025-07-01/NetworkManagerConnectionManagementGroupPut.json */ async function createOrUpdateManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const parameters: NetworkManagerConnection = { - networkManagerId: - "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", - }; const credential = new DefaultAzureCredential(); const client = new NetworkManagementClient(credential); - const result = - await client.managementGroupNetworkManagerConnections.createOrUpdate( - managementGroupId, - networkManagerConnectionName, - parameters, - ); + const result = await client.managementGroupNetworkManagerConnections.createOrUpdate( + "managementGroupA", + "TestNMConnection", + { + networkManagerId: + "/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsDeleteSample.ts index 772bba9f063d..9f12c51b50f8 100644 --- a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsDeleteSample.ts @@ -3,24 +3,20 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete specified pending connection created by this management group. + * This sample demonstrates how to delete specified pending connection created by this management group. * - * @summary Delete specified pending connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json + * @summary delete specified pending connection created by this management group. + * x-ms-original-file: 2025-07-01/NetworkManagerConnectionManagementGroupDelete.json */ async function deleteManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; const credential = new DefaultAzureCredential(); const client = new NetworkManagementClient(credential); - const result = await client.managementGroupNetworkManagerConnections.delete( - managementGroupId, - networkManagerConnectionName, + await client.managementGroupNetworkManagerConnections.delete( + "managementGroupA", + "TestNMConnection", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsGetSample.ts index 23c2646aa95f..d8f6eeab9cbc 100644 --- a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsGetSample.ts @@ -3,22 +3,19 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a specified connection created by this management group. + * This sample demonstrates how to get a specified connection created by this management group. * - * @summary Get a specified connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupGet.json + * @summary get a specified connection created by this management group. + * x-ms-original-file: 2025-07-01/NetworkManagerConnectionManagementGroupGet.json */ async function getManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; const credential = new DefaultAzureCredential(); const client = new NetworkManagementClient(credential); const result = await client.managementGroupNetworkManagerConnections.get( - managementGroupId, - networkManagerConnectionName, + "managementGroupA", + "TestNMConnection", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsListSample.ts index cdd38dba4d09..53572d43a530 100644 --- a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsListSample.ts @@ -3,24 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all network manager connections created by this management group. + * This sample demonstrates how to list all network manager connections created by this management group. * - * @summary List all network manager connections created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupList.json + * @summary list all network manager connections created by this management group. + * x-ms-original-file: 2025-07-01/NetworkManagerConnectionManagementGroupList.json */ async function listManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; const credential = new DefaultAzureCredential(); const client = new NetworkManagementClient(credential); const resArray = new Array(); for await (const item of client.managementGroupNetworkManagerConnections.list( - managementGroupId, + "managementGroupA", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/natGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysCreateOrUpdateSample.ts index 8d77f0435e4f..3e1053e683a1 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysCreateOrUpdateSample.ts @@ -1,119 +1,125 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { NatGateway} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a nat gateway. + * This sample demonstrates how to creates or updates a nat gateway. * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayCreateOrUpdate.json + * @summary creates or updates a nat gateway. + * x-ms-original-file: 2025-07-01/NatGatewayCreateOrUpdate.json */ async function createNatGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters: NatGateway = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.natGateways.createOrUpdate("rg1", "test-natgateway", { location: "westus", publicIpAddresses: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", }, ], publicIpPrefixes: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", }, ], sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a nat gateway. + * This sample demonstrates how to creates or updates a nat gateway. * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayCreateOrUpdateStandardV2Sku.json + * @summary creates or updates a nat gateway. + * x-ms-original-file: 2025-07-01/NatGatewayCreateOrUpdateStandardV2Sku.json */ async function createNatGatewayWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters: NatGateway = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.natGateways.createOrUpdate("rg1", "test-natgateway", { location: "westus", publicIpAddresses: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", }, ], publicIpPrefixes: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", }, ], sku: { name: "StandardV2" }, - }; + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates a nat gateway. + * + * @summary creates or updates a nat gateway. + * x-ms-original-file: 2025-07-01/NatGatewayWithNat64CreateOrUpdate.json + */ +async function createNatGatewayWithNat64(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); + const result = await client.natGateways.createOrUpdate("rg1", "test-natgateway", { + location: "westus", + nat64: "Enabled", + publicIpAddresses: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", + }, + ], + publicIpPrefixes: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", + }, + ], + sku: { name: "Standard" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a nat gateway. + * This sample demonstrates how to creates or updates a nat gateway. * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayWithServiceGatewayCreateOrUpdate.json + * @summary creates or updates a nat gateway. + * x-ms-original-file: 2025-07-01/NatGatewayWithServiceGatewayCreateOrUpdate.json */ async function createNatGatewayWithServiceGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters: NatGateway = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.natGateways.createOrUpdate("rg1", "test-natgateway", { location: "westus", publicIpAddresses: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", }, ], publicIpPrefixes: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", }, ], serviceGateway: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/serviceGateways/SG1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/serviceGateways/SG1", }, sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); + }); console.log(result); } async function main(): Promise { await createNatGateway(); await createNatGatewayWithStandardV2Sku(); + await createNatGatewayWithNat64(); await createNatGatewayWithServiceGateway(); } diff --git a/sdk/network/arm-network/samples-dev/natGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysDeleteSample.ts index 34f2f230b866..5edd72027b72 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified nat gateway. + * This sample demonstrates how to deletes the specified nat gateway. * - * @summary Deletes the specified nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayDelete.json + * @summary deletes the specified nat gateway. + * x-ms-original-file: 2025-07-01/NatGatewayDelete.json */ async function deleteNatGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginDeleteAndWait( - resourceGroupName, - natGatewayName, - ); - console.log(result); + await client.natGateways.delete("rg1", "test-natGateway"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/natGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysGetSample.ts index b3c63879a6cb..b4c2fdbb2e29 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysGetSample.ts @@ -3,68 +3,67 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. + * This sample demonstrates how to gets the specified nat gateway in a specified resource group. * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayGet.json + * @summary gets the specified nat gateway in a specified resource group. + * x-ms-original-file: 2025-07-01/NatGatewayGet.json */ async function getNatGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get( - resourceGroupName, - natGatewayName, - ); + const result = await client.natGateways.get("rg1", "test-natGateway"); console.log(result); } /** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. + * This sample demonstrates how to gets the specified nat gateway in a specified resource group. * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayGetStandardV2Sku.json + * @summary gets the specified nat gateway in a specified resource group. + * x-ms-original-file: 2025-07-01/NatGatewayGetStandardV2Sku.json */ async function getNatGatewayWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get( - resourceGroupName, - natGatewayName, - ); + const result = await client.natGateways.get("rg1", "test-natGateway"); console.log(result); } /** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. + * This sample demonstrates how to gets the specified nat gateway in a specified resource group. * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayWithServiceGatewayGet.json + * @summary gets the specified nat gateway in a specified resource group. + * x-ms-original-file: 2025-07-01/NatGatewayWithNat64Get.json + */ +async function getNatGatewayWithNat64(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.natGateways.get("rg1", "test-natGateway"); + console.log(result); +} + +/** + * This sample demonstrates how to gets the specified nat gateway in a specified resource group. + * + * @summary gets the specified nat gateway in a specified resource group. + * x-ms-original-file: 2025-07-01/NatGatewayWithServiceGatewayGet.json */ async function getNatGatewayWithServiceGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get( - resourceGroupName, - natGatewayName, - ); + const result = await client.natGateways.get("rg1", "test-natGateway"); console.log(result); } async function main(): Promise { await getNatGateway(); await getNatGatewayWithStandardV2Sku(); + await getNatGatewayWithNat64(); await getNatGatewayWithServiceGateway(); } diff --git a/sdk/network/arm-network/samples-dev/natGatewaysListAllSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysListAllSample.ts index 723c91af7cfb..bde136a93783 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the Nat Gateways in a subscription. + * This sample demonstrates how to gets all the Nat Gateways in a subscription. * - * @summary Gets all the Nat Gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayListAll.json + * @summary gets all the Nat Gateways in a subscription. + * x-ms-original-file: 2025-07-01/NatGatewayListAll.json */ async function listAllNatGateways(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.natGateways.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/natGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysListSample.ts index 0a016f76dcfe..ddb269f9abbf 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all nat gateways in a resource group. + * This sample demonstrates how to gets all nat gateways in a resource group. * - * @summary Gets all nat gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayList.json + * @summary gets all nat gateways in a resource group. + * x-ms-original-file: 2025-07-01/NatGatewayList.json */ async function listNatGatewaysInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.natGateways.list(resourceGroupName)) { + for await (const item of client.natGateways.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/natGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysUpdateTagsSample.ts index 2a7ef3b595f3..d31179b429ce 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysUpdateTagsSample.ts @@ -1,50 +1,38 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates nat gateway tags. + * This sample demonstrates how to updates nat gateway tags. * - * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayUpdateTags.json + * @summary updates nat gateway tags. + * x-ms-original-file: 2025-07-01/NatGatewayUpdateTags.json */ async function updateNatGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.updateTags( - resourceGroupName, - natGatewayName, - parameters, - ); + const result = await client.natGateways.updateTags("rg1", "test-natGateway", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } /** - * This sample demonstrates how to Updates nat gateway tags. + * This sample demonstrates how to updates nat gateway tags. * - * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayUpdateTagsStandardV2Sku.json + * @summary updates nat gateway tags. + * x-ms-original-file: 2025-07-01/NatGatewayUpdateTagsStandardV2Sku.json */ async function updateNatGatewayWithStandardV2SkuTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.updateTags( - resourceGroupName, - natGatewayName, - parameters, - ); + const result = await client.natGateways.updateTags("rg1", "test-natGateway", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/natRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/natRulesCreateOrUpdateSample.ts index a327433921e2..6cb6cdab7f56 100644 --- a/sdk/network/arm-network/samples-dev/natRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/natRulesCreateOrUpdateSample.ts @@ -1,38 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { VpnGatewayNatRule} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. + * This sample demonstrates how to creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. * - * @summary Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRulePut.json + * @summary creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. + * x-ms-original-file: 2025-07-01/NatRulePut.json */ async function natRulePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const natRuleParameters: VpnGatewayNatRule = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.natRules.createOrUpdate("rg1", "gateway1", "natRule1", { typePropertiesType: "Static", externalMappings: [{ addressSpace: "192.168.21.0/24" }], internalMappings: [{ addressSpace: "10.4.0.0/24" }], ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default", mode: "EgressSnat", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - natRuleName, - natRuleParameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/natRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/natRulesDeleteSample.ts index d0d36d918ad5..5140cde21108 100644 --- a/sdk/network/arm-network/samples-dev/natRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/natRulesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a nat rule. + * This sample demonstrates how to deletes a nat rule. * - * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleDelete.json + * @summary deletes a nat rule. + * x-ms-original-file: 2025-07-01/NatRuleDelete.json */ async function natRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.beginDeleteAndWait( - resourceGroupName, - gatewayName, - natRuleName, - ); - console.log(result); + await client.natRules.delete("rg1", "gateway1", "natRule1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/natRulesGetSample.ts b/sdk/network/arm-network/samples-dev/natRulesGetSample.ts index e53cace4f6c9..1445e2b26d72 100644 --- a/sdk/network/arm-network/samples-dev/natRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/natRulesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a nat ruleGet. + * This sample demonstrates how to retrieves the details of a nat ruleGet. * - * @summary Retrieves the details of a nat ruleGet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleGet.json + * @summary retrieves the details of a nat ruleGet. + * x-ms-original-file: 2025-07-01/NatRuleGet.json */ async function natRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.get( - resourceGroupName, - gatewayName, - natRuleName, - ); + const result = await client.natRules.get("rg1", "gateway1", "natRule1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/natRulesListByVpnGatewaySample.ts b/sdk/network/arm-network/samples-dev/natRulesListByVpnGatewaySample.ts index c1e15b9ee4d8..fe6e458e76ea 100644 --- a/sdk/network/arm-network/samples-dev/natRulesListByVpnGatewaySample.ts +++ b/sdk/network/arm-network/samples-dev/natRulesListByVpnGatewaySample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves all nat rules for a particular virtual wan vpn gateway. + * This sample demonstrates how to retrieves all nat rules for a particular virtual wan vpn gateway. * - * @summary Retrieves all nat rules for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleList.json + * @summary retrieves all nat rules for a particular virtual wan vpn gateway. + * x-ms-original-file: 2025-07-01/NatRuleList.json */ async function natRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.natRules.listByVpnGateway( - resourceGroupName, - gatewayName, - )) { + for await (const item of client.natRules.listByVpnGateway("rg1", "gateway1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkGroupsCreateOrUpdateSample.ts index 555f339ad2d2..e809e6f791c6 100644 --- a/sdk/network/arm-network/samples-dev/networkGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkGroupsCreateOrUpdateSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { NetworkGroup} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a network group. + * This sample demonstrates how to creates or updates a network group. * - * @summary Creates or updates a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupPut.json + * @summary creates or updates a network group. + * x-ms-original-file: 2025-07-01/NetworkManagerGroupPut.json */ async function networkGroupsPut(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const parameters: NetworkGroup = { - description: "A sample group", - memberType: "VirtualNetwork", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkGroups.createOrUpdate( - resourceGroupName, - networkManagerName, - networkGroupName, - parameters, + "rg1", + "testNetworkManager", + "testNetworkGroup", + { description: "A sample group", memberType: "VirtualNetwork" }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkGroupsDeleteSample.ts index 4887ff95a208..fd1cf6fed9a0 100644 --- a/sdk/network/arm-network/samples-dev/networkGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkGroupsDeleteSample.ts @@ -1,38 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkGroupsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a network group. + * This sample demonstrates how to deletes a network group. * - * @summary Deletes a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupDelete.json + * @summary deletes a network group. + * x-ms-original-file: 2025-07-01/NetworkManagerGroupDelete.json */ async function networkGroupsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const force = false; - const options: NetworkGroupsDeleteOptionalParams = { force }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - networkGroupName, - options, - ); - console.log(result); + await client.networkGroups.delete("rg1", "testNetworkManager", "testNetworkGroup", { + force: false, + }); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/networkGroupsGetSample.ts index 8056658ca02b..8bd1a6118fb8 100644 --- a/sdk/network/arm-network/samples-dev/networkGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkGroupsGetSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified network group. + * This sample demonstrates how to gets the specified network group. * - * @summary Gets the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupGet.json + * @summary gets the specified network group. + * x-ms-original-file: 2025-07-01/NetworkManagerGroupGet.json */ async function networkGroupsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.get( - resourceGroupName, - networkManagerName, - networkGroupName, - ); + const result = await client.networkGroups.get("rg1", "testNetworkManager", "testNetworkGroup"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkGroupsListSample.ts b/sdk/network/arm-network/samples-dev/networkGroupsListSample.ts index aa0cff3bc21b..3db8a4c53999 100644 --- a/sdk/network/arm-network/samples-dev/networkGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkGroupsListSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists the specified network group. + * This sample demonstrates how to lists the specified network group. * - * @summary Lists the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupList.json + * @summary lists the specified network group. + * x-ms-original-file: 2025-07-01/NetworkManagerGroupList.json */ async function networkGroupsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkGroups.list( - resourceGroupName, - networkManagerName, - )) { + for await (const item of client.networkGroups.list("rg1", "testNetworkManager")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsGetSample.ts index 1ff2cc234a61..1c924cb3b531 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified network interface ip configuration. + * This sample demonstrates how to gets the specified network interface ip configuration. * - * @summary Gets the specified network interface ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceIPConfigurationGet.json + * @summary gets the specified network interface ip configuration. + * x-ms-original-file: 2025-07-01/NetworkInterfaceIPConfigurationGet.json */ async function networkInterfaceIPConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const ipConfigurationName = "ipconfig1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceIPConfigurations.get( - resourceGroupName, - networkInterfaceName, - ipConfigurationName, - ); + const result = await client.networkInterfaceIPConfigurations.get("testrg", "mynic", "ipconfig1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsListSample.ts index 177ca1b34c06..cd306b44f398 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get all ip configurations in a network interface. + * This sample demonstrates how to get all ip configurations in a network interface. * - * @summary Get all ip configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceIPConfigurationList.json + * @summary get all ip configurations in a network interface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceIPConfigurationList.json */ async function networkInterfaceIPConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "nic1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkInterfaceIPConfigurations.list( - resourceGroupName, - networkInterfaceName, - )) { + for await (const item of client.networkInterfaceIPConfigurations.list("testrg", "nic1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceLoadBalancersListSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceLoadBalancersListSample.ts index 0b44afd9b6ed..86c35cb4a90a 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceLoadBalancersListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceLoadBalancersListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all load balancers in a network interface. + * This sample demonstrates how to list all load balancers in a network interface. * - * @summary List all load balancers in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceLoadBalancerList.json + * @summary list all load balancers in a network interface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceLoadBalancerList.json */ async function networkInterfaceLoadBalancerList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "nic1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkInterfaceLoadBalancers.list( - resourceGroupName, - networkInterfaceName, - )) { + for await (const item of client.networkInterfaceLoadBalancers.list("testrg", "nic1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts index 6913217e712f..c33a732ae237 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts @@ -1,39 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkInterfaceTapConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a Tap configuration in the specified NetworkInterface. + * This sample demonstrates how to creates or updates a Tap configuration in the specified NetworkInterface. * - * @summary Creates or updates a Tap configuration in the specified NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationCreate.json + * @summary creates or updates a Tap configuration in the specified NetworkInterface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceTapConfigurationCreate.json */ async function createNetworkInterfaceTapConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const tapConfigurationParameters: NetworkInterfaceTapConfiguration = { - virtualNetworkTap: { - id: "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworkTaps/testvtap", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaceTapConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - tapConfigurationParameters, - ); + const result = await client.networkInterfaceTapConfigurations.createOrUpdate( + "testrg", + "mynic", + "tapconfiguration1", + { + virtualNetworkTap: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworkTaps/testvtap", + }, + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsDeleteSample.ts index 776d97cc95cd..0630f2d205a0 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsDeleteSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified tap configuration from the NetworkInterface. + * This sample demonstrates how to deletes the specified tap configuration from the NetworkInterface. * - * @summary Deletes the specified tap configuration from the NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationDelete.json + * @summary deletes the specified tap configuration from the NetworkInterface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceTapConfigurationDelete.json */ async function deleteTapConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaceTapConfigurations.beginDeleteAndWait( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - ); - console.log(result); + await client.networkInterfaceTapConfigurations.delete("testrg", "mynic", "tapconfiguration1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsGetSample.ts index e893b86bd5c4..a4c8dfc750bc 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get the specified tap configuration on a network interface. + * This sample demonstrates how to get the specified tap configuration on a network interface. * - * @summary Get the specified tap configuration on a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationGet.json + * @summary get the specified tap configuration on a network interface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceTapConfigurationGet.json */ async function getNetworkInterfaceTapConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkInterfaceTapConfigurations.get( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, + "testrg", + "mynic", + "tapconfiguration1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsListSample.ts index 13fcb3b6cbbb..e864369a54f3 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get all Tap configurations in a network interface. + * This sample demonstrates how to get all Tap configurations in a network interface. * - * @summary Get all Tap configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationList.json + * @summary get all Tap configurations in a network interface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceTapConfigurationList.json */ async function listVirtualNetworkTapConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkInterfaceTapConfigurations.list( - resourceGroupName, - networkInterfaceName, - )) { + for await (const item of client.networkInterfaceTapConfigurations.list("testrg", "mynic")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesCreateOrUpdateSample.ts index a196836147c9..c6c34a2df90c 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesCreateOrUpdateSample.ts @@ -1,83 +1,65 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { NetworkInterface} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a network interface. + * This sample demonstrates how to creates or updates a network interface. * - * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceCreate.json + * @summary creates or updates a network interface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceCreate.json */ async function createNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters: NetworkInterface = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkInterfaces.createOrUpdate("rg1", "test-nic", { + location: "eastus", disableTcpStateTracking: true, enableAcceleratedNetworking: true, ipConfigurations: [ { - name: "ipconfig1", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", }, }, - { name: "ipconfig2", privateIPAddressPrefixLength: 28 }, + { privateIPAddressPrefixLength: 28 }, ], - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a network interface. + * This sample demonstrates how to creates or updates a network interface. * - * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json + * @summary creates or updates a network interface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json */ async function createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters: NetworkInterface = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkInterfaces.createOrUpdate("rg1", "test-nic", { + location: "eastus", enableAcceleratedNetworking: true, ipConfigurations: [ { - name: "ipconfig1", gatewayLoadBalancer: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", }, publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", }, }, ], - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesDeleteSample.ts index 3f39c627d0f0..4068ba428465 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified network interface. + * This sample demonstrates how to deletes the specified network interface. * - * @summary Deletes the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceDelete.json + * @summary deletes the specified network interface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceDelete.json */ async function deleteNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginDeleteAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); + await client.networkInterfaces.delete("rg1", "test-nic"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts index c40b5723b159..8dd927a30420 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get the specified network interface in a cloud service. + * This sample demonstrates how to get the specified network interface in a cloud service. * - * @summary Get the specified network interface in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceNetworkInterfaceGet.json + * @summary get the specified network interface in a cloud service. + * x-ms-original-file: 2025-07-01/CloudServiceNetworkInterfaceGet.json */ async function getCloudServiceNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const roleInstanceName = "TestVMRole_IN_0"; - const networkInterfaceName = "nic1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkInterfaces.getCloudServiceNetworkInterface( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, + "rg1", + "cs1", + "TestVMRole_IN_0", + "nic1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesGetEffectiveRouteTableSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesGetEffectiveRouteTableSample.ts index 1ca06574670f..ef75b7edd714 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesGetEffectiveRouteTableSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesGetEffectiveRouteTableSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all route tables applied to a network interface. + * This sample demonstrates how to gets all route tables applied to a network interface. * - * @summary Gets all route tables applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json + * @summary gets all route tables applied to a network interface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceEffectiveRouteTableList.json */ async function showNetworkInterfaceEffectiveRouteTables(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "nic1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.beginGetEffectiveRouteTableAndWait( - resourceGroupName, - networkInterfaceName, - ); + const result = await client.networkInterfaces.getEffectiveRouteTable("rg1", "nic1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesGetSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesGetSample.ts index b66d145914ac..ce11ecea9ff8 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets information about the specified network interface. + * This sample demonstrates how to gets information about the specified network interface. * - * @summary Gets information about the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceGet.json + * @summary gets information about the specified network interface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceGet.json */ async function getNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.get( - resourceGroupName, - networkInterfaceName, - ); + const result = await client.networkInterfaces.get("rg1", "test-nic"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts deleted file mode 100644 index da1777dd0691..000000000000 --- a/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. - * - * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceIpConfigGet.json - */ -async function getVirtualMachineScaleSetNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "2"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.getVirtualMachineScaleSetIpConfiguration( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualMachineScaleSetNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts deleted file mode 100644 index fa1a72be883c..000000000000 --- a/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network interface in a virtual machine scale set. - * - * @summary Get the specified network interface in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceGet.json - */ -async function getVirtualMachineScaleSetNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.getVirtualMachineScaleSetNetworkInterface( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualMachineScaleSetNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListAllSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListAllSample.ts index d3f487a8d3ba..e92a5e32176b 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all network interfaces in a subscription. + * This sample demonstrates how to gets all network interfaces in a subscription. * - * @summary Gets all network interfaces in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceListAll.json + * @summary gets all network interfaces in a subscription. + * x-ms-original-file: 2025-07-01/NetworkInterfaceListAll.json */ async function listAllNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkInterfaces.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceNetworkInterfacesSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceNetworkInterfacesSample.ts index c5465f88319f..290413f0cf44 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceNetworkInterfacesSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceNetworkInterfacesSample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all network interfaces in a cloud service. + * This sample demonstrates how to gets all network interfaces in a cloud service. * - * @summary Gets all network interfaces in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceNetworkInterfaceList.json + * @summary gets all network interfaces in a cloud service. + * x-ms-original-file: 2025-07-01/CloudServiceNetworkInterfaceList.json */ async function listCloudServiceNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkInterfaces.listCloudServiceNetworkInterfaces( - resourceGroupName, - cloudServiceName, + "rg1", + "cs1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts index 4802555ce99a..87af01aeb753 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts @@ -3,29 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets information about all network interfaces in a role instance in a cloud service. + * This sample demonstrates how to gets information about all network interfaces in a role instance in a cloud service. * - * @summary Gets information about all network interfaces in a role instance in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json + * @summary gets information about all network interfaces in a role instance in a cloud service. + * x-ms-original-file: 2025-07-01/CloudServiceRoleInstanceNetworkInterfaceList.json */ async function listCloudServiceRoleInstanceNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const roleInstanceName = "TestVMRole_IN_0"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkInterfaces.listCloudServiceRoleInstanceNetworkInterfaces( - resourceGroupName, - cloudServiceName, - roleInstanceName, + "rg1", + "cs1", + "TestVMRole_IN_0", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts index 3b3ed8826fff..9858e8d17f77 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all network security groups applied to a network interface. + * This sample demonstrates how to gets all network security groups applied to a network interface. * - * @summary Gets all network security groups applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceEffectiveNSGList.json + * @summary gets all network security groups applied to a network interface. + * x-ms-original-file: 2025-07-01/NetworkInterfaceEffectiveNSGList.json */ async function listNetworkInterfaceEffectiveNetworkSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "nic1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.beginListEffectiveNetworkSecurityGroupsAndWait( - resourceGroupName, - networkInterfaceName, - ); + const result = await client.networkInterfaces.listEffectiveNetworkSecurityGroups("rg1", "nic1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListSample.ts index 5449641a9371..3e0c44999724 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all network interfaces in a resource group. + * This sample demonstrates how to gets all network interfaces in a resource group. * - * @summary Gets all network interfaces in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceList.json + * @summary gets all network interfaces in a resource group. + * x-ms-original-file: 2025-07-01/NetworkInterfaceList.json */ async function listNetworkInterfacesInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkInterfaces.list(resourceGroupName)) { + for await (const item of client.networkInterfaces.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts deleted file mode 100644 index 2666892396e6..000000000000 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. - * - * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceIpConfigList.json - */ -async function listVirtualMachineScaleSetNetworkInterfaceIPConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "2"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetIpConfigurations( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualMachineScaleSetNetworkInterfaceIPConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts deleted file mode 100644 index c723cac0719f..000000000000 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network interfaces in a virtual machine scale set. - * - * @summary Gets all network interfaces in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceList.json - */ -async function listVirtualMachineScaleSetNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualMachineScaleSetNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts deleted file mode 100644 index a10381f7317c..000000000000 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * - * @summary Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssVmNetworkInterfaceList.json - */ -async function listVirtualMachineScaleSetVMNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetVMNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualMachineScaleSetVMNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesUpdateTagsSample.ts index 640e8807eb2b..ef0fbc0deadc 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a network interface tags. + * This sample demonstrates how to updates a network interface tags. * - * @summary Updates a network interface tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceUpdateTags.json + * @summary updates a network interface tags. + * x-ms-original-file: 2025-07-01/NetworkInterfaceUpdateTags.json */ async function updateNetworkInterfaceTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.updateTags( - resourceGroupName, - networkInterfaceName, - parameters, - ); + const result = await client.networkInterfaces.updateTags("rg1", "test-nic", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkManagerCommitsPostSample.ts b/sdk/network/arm-network/samples-dev/networkManagerCommitsPostSample.ts index 4c4e9bfc5677..04b20f6aea12 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerCommitsPostSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerCommitsPostSample.ts @@ -1,40 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkManagerCommit} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Post a Network Manager Commit. + * This sample demonstrates how to post a Network Manager Commit. * - * @summary Post a Network Manager Commit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerCommitPost.json + * @summary post a Network Manager Commit. + * x-ms-original-file: 2025-07-01/NetworkManagerCommitPost.json */ async function networkManageCommitPost(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resoureGroupSample"; - const networkManagerName = "testNetworkManager"; - const parameters: NetworkManagerCommit = { - commitType: "SecurityAdmin", - configurationIds: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resoureGroupSample/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/SampleSecurityAdminConfig", - ], - targetLocations: ["useast"], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerCommits.beginPostAndWait( - resourceGroupName, - networkManagerName, - parameters, + const result = await client.networkManagerCommits.post( + "resoureGroupSample", + "testNetworkManager", + { + commitType: "SecurityAdmin", + configurationIds: [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resoureGroupSample/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/SampleSecurityAdminConfig", + ], + targetLocations: ["useast"], + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkManagerDeploymentStatusListSample.ts b/sdk/network/arm-network/samples-dev/networkManagerDeploymentStatusListSample.ts index 259198594298..843edf39d9ef 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerDeploymentStatusListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerDeploymentStatusListSample.ts @@ -1,38 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkManagerDeploymentStatusParameter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Post to List of Network Manager Deployment Status. + * This sample demonstrates how to post to List of Network Manager Deployment Status. * - * @summary Post to List of Network Manager Deployment Status. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDeploymentStatusList.json + * @summary post to List of Network Manager Deployment Status. + * x-ms-original-file: 2025-07-01/NetworkManagerDeploymentStatusList.json */ async function networkManagerDeploymentStatusList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resoureGroupSample"; - const networkManagerName = "testNetworkManager"; - const parameters: NetworkManagerDeploymentStatusParameter = { - deploymentTypes: ["Connectivity", "AdminPolicy"], - regions: ["eastus", "westus"], - skipToken: "FakeSkipTokenCode", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerDeploymentStatusOperations.list( - resourceGroupName, - networkManagerName, - parameters, + const result = await client.networkManagerDeploymentStatus.list( + "resoureGroupSample", + "testNetworkManager", + { + deploymentTypes: ["Connectivity", "AdminPolicy"], + regions: ["eastus", "westus"], + skipToken: "FakeSkipTokenCode", + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts index 361007de33b8..195ebefa4d25 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts @@ -1,40 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkManagerRoutingConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a network manager routing configuration. + * This sample demonstrates how to creates or updates a network manager routing configuration. * - * @summary Creates or updates a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationPut.json + * @summary creates or updates a network manager routing configuration. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingConfigurationPut.json */ async function createNetworkManagerRoutingConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const routingConfiguration: NetworkManagerRoutingConfiguration = { - description: "A sample policy", - routeTableUsageMode: "ManagedOnly", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkManagerRoutingConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - routingConfiguration, - ); + const result = await client.networkManagerRoutingConfigurations.createOrUpdate( + "rg1", + "testNetworkManager", + "myTestRoutingConfig", + { description: "A sample policy", routeTableUsageMode: "ManagedOnly" }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsDeleteSample.ts index ce169d651400..7cca694b2572 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsDeleteSample.ts @@ -3,30 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a network manager routing configuration. + * This sample demonstrates how to deletes a network manager routing configuration. * - * @summary Deletes a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationDelete.json + * @summary deletes a network manager routing configuration. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingConfigurationDelete.json */ async function deleteNetworkManagerRoutingConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkManagerRoutingConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); + await client.networkManagerRoutingConfigurations.delete( + "rg1", + "testNetworkManager", + "myTestRoutingConfig", + ); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsGetSample.ts index 979dd5f22f0a..5e8ff11457bb 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsGetSample.ts @@ -3,27 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves a network manager routing configuration. + * This sample demonstrates how to retrieves a network manager routing configuration. * - * @summary Retrieves a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationGet.json + * @summary retrieves a network manager routing configuration. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingConfigurationGet.json */ async function getRoutingConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkManagerRoutingConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, + "rg1", + "testNetworkManager", + "myTestRoutingConfig", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsListSample.ts index a9e18b15355f..00300173e562 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsListSample.ts @@ -3,29 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the network manager routing configurations in a network manager, in a paginated format. + * This sample demonstrates how to lists all the network manager routing configurations in a network manager, in a paginated format. * - * @summary Lists all the network manager routing configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationList.json + * @summary lists all the network manager routing configurations in a network manager, in a paginated format. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingConfigurationList.json */ async function listRoutingConfigurationsInANetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkManagerRoutingConfigurations.list( - resourceGroupName, - networkManagerName, + "rg1", + "testNetworkManager", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkManagersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkManagersCreateOrUpdateSample.ts index 71e1d3138ecf..e0a4fc29815d 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersCreateOrUpdateSample.ts @@ -1,38 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { NetworkManager} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a Network Manager. + * This sample demonstrates how to creates or updates a Network Manager. * - * @summary Creates or updates a Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerPut.json + * @summary creates or updates a Network Manager. + * x-ms-original-file: 2025-07-01/NetworkManagerPut.json */ async function putNetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const parameters: NetworkManager = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkManagers.createOrUpdate("rg1", "TestNetworkManager", { description: "My Test Network Manager", networkManagerScopeAccesses: ["Connectivity"], networkManagerScopes: { managementGroups: ["/Microsoft.Management/testmg"], subscriptions: ["/subscriptions/00000000-0000-0000-0000-000000000000"], }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.createOrUpdate( - resourceGroupName, - networkManagerName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkManagersDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkManagersDeleteSample.ts index fd4309557d06..f0be1e048fcf 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersDeleteSample.ts @@ -1,36 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkManagersDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a network manager. + * This sample demonstrates how to deletes a network manager. * - * @summary Deletes a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDelete.json + * @summary deletes a network manager. + * x-ms-original-file: 2025-07-01/NetworkManagerDelete.json */ async function networkManagersDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const force = false; - const options: NetworkManagersDeleteOptionalParams = { force }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - options, - ); - console.log(result); + await client.networkManagers.delete("rg1", "testNetworkManager", { force: false }); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkManagersGetSample.ts b/sdk/network/arm-network/samples-dev/networkManagersGetSample.ts index 24e319c759c2..24bcc39b5585 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Network Manager. + * This sample demonstrates how to gets the specified Network Manager. * - * @summary Gets the specified Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGet.json + * @summary gets the specified Network Manager. + * x-ms-original-file: 2025-07-01/NetworkManagerGet.json */ async function networkManagersGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.get( - resourceGroupName, - networkManagerName, - ); + const result = await client.networkManagers.get("rg1", "testNetworkManager"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkManagersListBySubscriptionSample.ts b/sdk/network/arm-network/samples-dev/networkManagersListBySubscriptionSample.ts index ed8fe8bd96c9..b76e3356c6fc 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all network managers in a subscription. + * This sample demonstrates how to list all network managers in a subscription. * - * @summary List all network managers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerListAll.json + * @summary list all network managers in a subscription. + * x-ms-original-file: 2025-07-01/NetworkManagerListAll.json */ async function networkManagersList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkManagers.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkManagersListSample.ts b/sdk/network/arm-network/samples-dev/networkManagersListSample.ts index 575644412293..2596ed9c4e23 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List network managers in a resource group. + * This sample demonstrates how to list network managers in a resource group. * - * @summary List network managers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerList.json + * @summary list network managers in a resource group. + * x-ms-original-file: 2025-07-01/NetworkManagerList.json */ async function listNetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkManagers.list(resourceGroupName)) { + for await (const item of client.networkManagers.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkManagersPatchSample.ts b/sdk/network/arm-network/samples-dev/networkManagersPatchSample.ts index fac84808cef3..61674264b1be 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersPatchSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersPatchSample.ts @@ -1,31 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PatchObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Patch NetworkManager. + * This sample demonstrates how to patch NetworkManager. * - * @summary Patch NetworkManager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerPatch.json + * @summary patch NetworkManager. + * x-ms-original-file: 2025-07-01/NetworkManagerPatch.json */ async function networkManagesPatch(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const parameters: PatchObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.patch( - resourceGroupName, - networkManagerName, - parameters, - ); + const result = await client.networkManagers.patch("rg1", "testNetworkManager", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkProfilesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesCreateOrUpdateSample.ts index 67ab84817675..0fa93936c514 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesCreateOrUpdateSample.ts @@ -1,22 +1,21 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { NetworkProfile} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a network profile. + * This sample demonstrates how to creates or updates a network profile. * - * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileCreateConfigOnly.json + * @summary creates or updates a network profile. + * x-ms-original-file: 2025-07-01/NetworkProfileCreateConfigOnly.json */ async function createNetworkProfileDefaults(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const parameters: NetworkProfile = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkProfiles.createOrUpdate("rg1", "networkProfile1", { + location: "westus", containerNetworkInterfaceConfigurations: [ { name: "eth1", @@ -24,21 +23,13 @@ async function createNetworkProfileDefaults(): Promise { { name: "ipconfig1", subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/networkProfileVnet/subnets/networkProfileSubnet1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/networkProfileVnet/subnets/networkProfileSubnet1", }, }, ], }, ], - location: "westus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.createOrUpdate( - resourceGroupName, - networkProfileName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkProfilesDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesDeleteSample.ts index 5b7ff6dc138b..e0bb16b24367 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified network profile. + * This sample demonstrates how to deletes the specified network profile. * - * @summary Deletes the specified network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileDelete.json + * @summary deletes the specified network profile. + * x-ms-original-file: 2025-07-01/NetworkProfileDelete.json */ async function deleteNetworkProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.beginDeleteAndWait( - resourceGroupName, - networkProfileName, - ); - console.log(result); + await client.networkProfiles.delete("rg1", "networkProfile1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkProfilesGetSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesGetSample.ts index c1b4c6f902d3..3b494fec2494 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesGetSample.ts @@ -3,43 +3,32 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified network profile in a specified resource group. + * This sample demonstrates how to gets the specified network profile in a specified resource group. * - * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileGetConfigOnly.json + * @summary gets the specified network profile in a specified resource group. + * x-ms-original-file: 2025-07-01/NetworkProfileGetConfigOnly.json */ async function getNetworkProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.get( - resourceGroupName, - networkProfileName, - ); + const result = await client.networkProfiles.get("rg1", "networkProfile1"); console.log(result); } /** - * This sample demonstrates how to Gets the specified network profile in a specified resource group. + * This sample demonstrates how to gets the specified network profile in a specified resource group. * - * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileGetWithContainerNic.json + * @summary gets the specified network profile in a specified resource group. + * x-ms-original-file: 2025-07-01/NetworkProfileGetWithContainerNic.json */ async function getNetworkProfileWithContainerNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.get( - resourceGroupName, - networkProfileName, - ); + const result = await client.networkProfiles.get("rg1", "networkProfile1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkProfilesListAllSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesListAllSample.ts index 940dabada4eb..a95a0a596a16 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the network profiles in a subscription. + * This sample demonstrates how to gets all the network profiles in a subscription. * - * @summary Gets all the network profiles in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileListAll.json + * @summary gets all the network profiles in a subscription. + * x-ms-original-file: 2025-07-01/NetworkProfileListAll.json */ async function listAllNetworkProfiles(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkProfiles.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkProfilesListSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesListSample.ts index a2ea5b08ff27..29afb3d4a675 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all network profiles in a resource group. + * This sample demonstrates how to gets all network profiles in a resource group. * - * @summary Gets all network profiles in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileList.json + * @summary gets all network profiles in a resource group. + * x-ms-original-file: 2025-07-01/NetworkProfileList.json */ async function listResourceGroupNetworkProfiles(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkProfiles.list(resourceGroupName)) { + for await (const item of client.networkProfiles.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkProfilesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesUpdateTagsSample.ts index c23f229ca28a..b5e99d2aff4a 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates network profile tags. + * This sample demonstrates how to updates network profile tags. * - * @summary Updates network profile tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileUpdateTags.json + * @summary updates network profile tags. + * x-ms-original-file: 2025-07-01/NetworkProfileUpdateTags.json */ async function updateNetworkProfileTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "test-np"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.updateTags( - resourceGroupName, - networkProfileName, - parameters, - ); + const result = await client.networkProfiles.updateTags("rg1", "test-np", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsCreateOrUpdateSample.ts index 890f9d62f216..fa5258f47543 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsCreateOrUpdateSample.ts @@ -1,50 +1,39 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkSecurityGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a network security group in the specified resource group. + * This sample demonstrates how to creates or updates a network security group in the specified resource group. * - * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupCreate.json + * @summary creates or updates a network security group in the specified resource group. + * x-ms-original-file: 2025-07-01/NetworkSecurityGroupCreate.json */ async function createNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters: NetworkSecurityGroup = { location: "eastus" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); + const result = await client.networkSecurityGroups.createOrUpdate("rg1", "testnsg", { + location: "eastus", + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a network security group in the specified resource group. + * This sample demonstrates how to creates or updates a network security group in the specified resource group. * - * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupCreateWithRule.json + * @summary creates or updates a network security group in the specified resource group. + * x-ms-original-file: 2025-07-01/NetworkSecurityGroupCreateWithRule.json */ async function createNetworkSecurityGroupWithRule(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters: NetworkSecurityGroup = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkSecurityGroups.createOrUpdate("rg1", "testnsg", { location: "eastus", securityRules: [ { - name: "rule1", access: "Allow", destinationAddressPrefix: "*", destinationPortRange: "80", @@ -55,14 +44,7 @@ async function createNetworkSecurityGroupWithRule(): Promise { protocol: "*", }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsDeleteSample.ts index bda3f612fc7f..4c930c1048e8 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified network security group. + * This sample demonstrates how to deletes the specified network security group. * - * @summary Deletes the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupDelete.json + * @summary deletes the specified network security group. + * x-ms-original-file: 2025-07-01/NetworkSecurityGroupDelete.json */ async function deleteNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginDeleteAndWait( - resourceGroupName, - networkSecurityGroupName, - ); - console.log(result); + await client.networkSecurityGroups.delete("rg1", "testnsg"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsGetSample.ts index dec36f15fe0c..9d183945ee4c 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified network security group. + * This sample demonstrates how to gets the specified network security group. * - * @summary Gets the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupGet.json + * @summary gets the specified network security group. + * x-ms-original-file: 2025-07-01/NetworkSecurityGroupGet.json */ async function getNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.get( - resourceGroupName, - networkSecurityGroupName, - ); + const result = await client.networkSecurityGroups.get("rg1", "testnsg"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsListAllSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsListAllSample.ts index 60db6637bee7..3d6f5ad24261 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all network security groups in a subscription. + * This sample demonstrates how to gets all network security groups in a subscription. * - * @summary Gets all network security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupListAll.json + * @summary gets all network security groups in a subscription. + * x-ms-original-file: 2025-07-01/NetworkSecurityGroupListAll.json */ async function listAllNetworkSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkSecurityGroups.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsListSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsListSample.ts index 14385bb6a918..78f38170a837 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all network security groups in a resource group. + * This sample demonstrates how to gets all network security groups in a resource group. * - * @summary Gets all network security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupList.json + * @summary gets all network security groups in a resource group. + * x-ms-original-file: 2025-07-01/NetworkSecurityGroupList.json */ async function listNetworkSecurityGroupsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkSecurityGroups.list( - resourceGroupName, - )) { + for await (const item of client.networkSecurityGroups.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsUpdateTagsSample.ts index 2a220577b005..69473a16c872 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a network security group tags. + * This sample demonstrates how to updates a network security group tags. * - * @summary Updates a network security group tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupUpdateTags.json + * @summary updates a network security group tags. + * x-ms-original-file: 2025-07-01/NetworkSecurityGroupUpdateTags.json */ async function updateNetworkSecurityGroupTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.updateTags( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); + const result = await client.networkSecurityGroups.updateTags("rg1", "testnsg", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts index 99db45d8fb2e..160f8dd8f48a 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { NspAccessRule} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a network access rule. + * This sample demonstrates how to creates or updates a network access rule. * - * @summary Creates or updates a network access rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRulePut.json + * @summary creates or updates a network access rule. + * x-ms-original-file: 2025-07-01/NspAccessRulePut.json */ async function nspAccessRulePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const parameters: NspAccessRule = { - addressPrefixes: ["10.11.0.0/16", "10.10.1.0/24"], - direction: "Inbound", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterAccessRules.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, - ); + const result = await client.networkSecurityPerimeterAccessRules.createOrUpdate( + "rg1", + "nsp1", + "profile1", + "accessRule1", + { addressPrefixes: ["10.11.0.0/16", "10.10.1.0/24"], direction: "Inbound" }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesDeleteSample.ts index a019e8376a05..cef26ac304bf 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesDeleteSample.ts @@ -3,29 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes an NSP access rule. + * This sample demonstrates how to deletes an NSP access rule. * - * @summary Deletes an NSP access rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleDelete.json + * @summary deletes an NSP access rule. + * x-ms-original-file: 2025-07-01/NspAccessRuleDelete.json */ async function nspAccessRulesDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.delete( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - ); - console.log(result); + await client.networkSecurityPerimeterAccessRules.delete("rg1", "nsp1", "profile1", "accessRule1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesGetSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesGetSample.ts index 9167d5c36f45..00555c46c17c 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesGetSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified NSP access rule by name. + * This sample demonstrates how to gets the specified NSP access rule by name. * - * @summary Gets the specified NSP access rule by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleGet.json + * @summary gets the specified NSP access rule by name. + * x-ms-original-file: 2025-07-01/NspAccessRuleGet.json */ async function nspAccessRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkSecurityPerimeterAccessRules.get( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, + "rg1", + "nsp1", + "profile1", + "accessRule1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesListSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesListSample.ts index 8f9d86a1b87d..5aa91984d960 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesListSample.ts @@ -3,29 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists the NSP access rules in the specified NSP profile. + * This sample demonstrates how to lists the NSP access rules in the specified NSP profile. * - * @summary Lists the NSP access rules in the specified NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleList.json + * @summary lists the NSP access rules in the specified NSP profile. + * x-ms-original-file: 2025-07-01/NspAccessRuleList.json */ async function nspAccessRulesList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkSecurityPerimeterAccessRules.list( - resourceGroupName, - networkSecurityPerimeterName, - profileName, + "rg1", + "nsp1", + "profile1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesReconcileSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesReconcileSample.ts index 9462e137feff..3aeb60493038 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesReconcileSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAccessRulesReconcileSample.ts @@ -3,29 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Reconcile NSP access rules + * This sample demonstrates how to reconcile NSP access rules * - * @summary Reconcile NSP access rules - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleReconcile.json + * @summary reconcile NSP access rules + * x-ms-original-file: 2025-07-01/NspAccessRuleReconcile.json */ async function nspAccessRuleReconcile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRuleName1"; - const parameters: Record = { properties: {} }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkSecurityPerimeterAccessRules.reconcile( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, + "rg1", + "nsp1", + "profile1", + "accessRuleName1", + { properties: {} }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociableResourceTypesListSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociableResourceTypesListSample.ts index b51f9da24bc2..8c595597348d 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociableResourceTypesListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociableResourceTypesListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter + * This sample demonstrates how to gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter * - * @summary Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PerimeterAssociableResourcesList.json + * @summary gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter + * x-ms-original-file: 2025-07-01/PerimeterAssociableResourcesList.json */ async function networkSecurityPerimeterAssociableResourceTypes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westus"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAssociableResourceTypes.list( - location, - )) { + for await (const item of client.networkSecurityPerimeterAssociableResourceTypes.list("westus")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts index 6524b013d47e..ff60b5e25376 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts @@ -1,40 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { NspAssociation} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a NSP resource association. + * This sample demonstrates how to creates or updates a NSP resource association. * - * @summary Creates or updates a NSP resource association. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationPut.json + * @summary creates or updates a NSP resource association. + * x-ms-original-file: 2025-07-01/NspAssociationPut.json */ async function nspAssociationPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const parameters: NspAssociation = { - accessMode: "Enforced", - privateLinkResource: { - id: "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}", - }, - profile: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterAssociations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - ); + const result = await client.networkSecurityPerimeterAssociations.createOrUpdate( + "rg1", + "nsp1", + "association1", + { + accessMode: "Enforced", + privateLinkResource: { + id: "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}", + }, + profile: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}", + }, + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsDeleteSample.ts index a2dc74805b0a..098060a887b0 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsDeleteSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes an NSP association resource. + * This sample demonstrates how to deletes an NSP association resource. * - * @summary Deletes an NSP association resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationDelete.json + * @summary deletes an NSP association resource. + * x-ms-original-file: 2025-07-01/NspAssociationDelete.json */ async function nspAssociationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterAssociations.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - ); - console.log(result); + await client.networkSecurityPerimeterAssociations.delete("rg1", "nsp1", "association1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsGetSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsGetSample.ts index 3dabe22a5846..77135ce0e8b4 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified NSP association by name. + * This sample demonstrates how to gets the specified NSP association by name. * - * @summary Gets the specified NSP association by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationGet.json + * @summary gets the specified NSP association by name. + * x-ms-original-file: 2025-07-01/NspAssociationGet.json */ async function nspAssociationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkSecurityPerimeterAssociations.get( - resourceGroupName, - networkSecurityPerimeterName, - associationName, + "rg1", + "nsp1", + "association1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsListSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsListSample.ts index b85377113599..8a827bc13ba2 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists the NSP resource associations. + * This sample demonstrates how to lists the NSP resource associations. * - * @summary Lists the NSP resource associations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationList.json + * @summary lists the NSP resource associations. + * x-ms-original-file: 2025-07-01/NspAssociationList.json */ async function nspAssociationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAssociations.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { + for await (const item of client.networkSecurityPerimeterAssociations.list("rg1", "nsp1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsReconcileSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsReconcileSample.ts index d2c7eb318836..beeb35be1f22 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsReconcileSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterAssociationsReconcileSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Reconcile NSP association + * This sample demonstrates how to reconcile NSP association * - * @summary Reconcile NSP association - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationReconcile.json + * @summary reconcile NSP association + * x-ms-original-file: 2025-07-01/NspAssociationReconcile.json */ async function nspAssociationReconcile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const parameters: Record = { properties: {} }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkSecurityPerimeterAssociations.reconcile( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, + "rg1", + "nsp1", + "association1", + { properties: {} }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesDeleteSample.ts index 9ba89f8de087..927ff7ddbeb5 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesDeleteSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes an NSP LinkReference resource. + * This sample demonstrates how to deletes an NSP LinkReference resource. * - * @summary Deletes an NSP LinkReference resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceDelete.json + * @summary deletes an NSP LinkReference resource. + * x-ms-original-file: 2025-07-01/NspLinkReferenceDelete.json */ async function nspLinkReferenceDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const linkReferenceName = "link1-guid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterLinkReferences.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - ); - console.log(result); + await client.networkSecurityPerimeterLinkReferences.delete("rg1", "nsp2", "link1-guid"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesGetSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesGetSample.ts index 73daf6a9aa9b..94d2708dcd34 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified NSP linkReference resource. + * This sample demonstrates how to gets the specified NSP linkReference resource. * - * @summary Gets the specified NSP linkReference resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceGet.json + * @summary gets the specified NSP linkReference resource. + * x-ms-original-file: 2025-07-01/NspLinkReferenceGet.json */ async function nspLinkReferencesGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const linkReferenceName = "link1-guid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkSecurityPerimeterLinkReferences.get( - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, + "rg1", + "nsp2", + "link1-guid", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesListSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesListSample.ts index 08c8a91c0046..c708b6ca4a2d 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinkReferencesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists the NSP LinkReference resources in the specified network security perimeter. + * This sample demonstrates how to lists the NSP LinkReference resources in the specified network security perimeter. * - * @summary Lists the NSP LinkReference resources in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceList.json + * @summary lists the NSP LinkReference resources in the specified network security perimeter. + * x-ms-original-file: 2025-07-01/NspLinkReferenceList.json */ async function nspLinkReferenceList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLinkReferences.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { + for await (const item of client.networkSecurityPerimeterLinkReferences.list("rg1", "nsp2")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksCreateOrUpdateSample.ts index 3bf00d110f79..d9e78f02cb91 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksCreateOrUpdateSample.ts @@ -1,36 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { NspLink} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates NSP link resource. + * This sample demonstrates how to creates or updates NSP link resource. * - * @summary Creates or updates NSP link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkPut.json + * @summary creates or updates NSP link resource. + * x-ms-original-file: 2025-07-01/NspLinkPut.json */ async function nspLinksPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const parameters: NspLink = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkSecurityPerimeterLinks.createOrUpdate("rg1", "nsp1", "link1", { autoApprovedRemotePerimeterResourceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp2", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp2", localInboundProfiles: ["*"], remoteInboundProfiles: ["*"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksDeleteSample.ts index d759db2235a1..dad209f24511 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes an NSP Link resource. + * This sample demonstrates how to deletes an NSP Link resource. * - * @summary Deletes an NSP Link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkDelete.json + * @summary deletes an NSP Link resource. + * x-ms-original-file: 2025-07-01/NspLinkDelete.json */ async function nspLinkDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - ); - console.log(result); + await client.networkSecurityPerimeterLinks.delete("rg1", "nsp1", "link1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksGetSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksGetSample.ts index 42f5dcc86e57..aed9993d461e 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified NSP link resource. + * This sample demonstrates how to gets the specified NSP link resource. * - * @summary Gets the specified NSP link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkGet.json + * @summary gets the specified NSP link resource. + * x-ms-original-file: 2025-07-01/NspLinkGet.json */ async function nspLinksGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.get( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - ); + const result = await client.networkSecurityPerimeterLinks.get("rg1", "nsp1", "link1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksListSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksListSample.ts index 7f2ea54c22fa..5894e8f8458a 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLinksListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists the NSP Link resources in the specified network security perimeter. + * This sample demonstrates how to lists the NSP Link resources in the specified network security perimeter. * - * @summary Lists the NSP Link resources in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkList.json + * @summary lists the NSP Link resources in the specified network security perimeter. + * x-ms-original-file: 2025-07-01/NspLinkList.json */ async function nspLinkList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLinks.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { + for await (const item of client.networkSecurityPerimeterLinks.list("rg1", "nsp1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts index eefe607d5926..cba5b451f824 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts @@ -1,40 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NspLoggingConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates NSP logging configuration. + * This sample demonstrates how to creates or updates NSP logging configuration. * - * @summary Creates or updates NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationPut.json + * @summary creates or updates NSP logging configuration. + * x-ms-original-file: 2025-07-01/NspLoggingConfigurationPut.json */ async function nspLoggingConfigurationPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const parameters: NspLoggingConfiguration = { - enabledLogCategories: [ - "NspPublicInboundPerimeterRulesDenied", - "NspPublicOutboundPerimeterRulesDenied", - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterLoggingConfigurations.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - parameters, - ); + const result = await client.networkSecurityPerimeterLoggingConfigurations.createOrUpdate( + "rg1", + "nsp1", + "instance", + { + enabledLogCategories: [ + "NspPublicInboundPerimeterRulesDenied", + "NspPublicOutboundPerimeterRulesDenied", + ], + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts index 3191adc62e84..2b98372cb411 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes an NSP Logging configuration. + * This sample demonstrates how to deletes an NSP Logging configuration. * - * @summary Deletes an NSP Logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationDelete.json + * @summary deletes an NSP Logging configuration. + * x-ms-original-file: 2025-07-01/NspLoggingConfigurationDelete.json */ async function nspLoggingConfigurationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterLoggingConfigurations.delete( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - ); - console.log(result); + await client.networkSecurityPerimeterLoggingConfigurations.delete("rg1", "nsp1", "instance"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsGetSample.ts index f04ea003a275..d64c37065c44 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the NSP logging configuration. + * This sample demonstrates how to gets the NSP logging configuration. * - * @summary Gets the NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationGet.json + * @summary gets the NSP logging configuration. + * x-ms-original-file: 2025-07-01/NspLoggingConfigurationGet.json */ async function nspLoggingConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkSecurityPerimeterLoggingConfigurations.get( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, + "rg1", + "nsp1", + "instance", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsListSample.ts index 89990f76e9fb..c8ad60db8550 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterLoggingConfigurationsListSample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists the NSP logging configuration. + * This sample demonstrates how to lists the NSP logging configuration. * - * @summary Lists the NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationList.json + * @summary lists the NSP logging configuration. + * x-ms-original-file: 2025-07-01/NspLoggingConfigurationList.json */ async function nspLoggingConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkSecurityPerimeterLoggingConfigurations.list( - resourceGroupName, - networkSecurityPerimeterName, + "rg1", + "nsp1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterOperationStatusesGetSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterOperationStatusesGetSample.ts index e26c96a85c7b..bfb9b9ee9f7c 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterOperationStatusesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterOperationStatusesGetSample.ts @@ -3,23 +3,20 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the operation status for the given operation id. + * This sample demonstrates how to gets the operation status for the given operation id. * - * @summary Gets the operation status for the given operation id. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspOperationStatusGet.json + * @summary gets the operation status for the given operation id. + * x-ms-original-file: 2025-07-01/NspOperationStatusGet.json */ async function nspOperationStatusGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "location1"; - const operationId = "operationId1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkSecurityPerimeterOperationStatuses.get( - location, - operationId, + "location1", + "operationId1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts index d5552a939c02..ad33e69ad9fc 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts @@ -1,30 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { NspProfile} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a network profile. + * This sample demonstrates how to creates or updates a network profile. * - * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfilePut.json + * @summary creates or updates a network profile. + * x-ms-original-file: 2025-07-01/NspProfilePut.json */ async function nspProfilesPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const parameters: NspProfile = {}; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.networkSecurityPerimeterProfiles.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - parameters, + "rg1", + "nsp1", + "profile1", + {}, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesDeleteSample.ts index 32f161cdcc81..ab9c94ee6c0e 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes an NSP profile. + * This sample demonstrates how to deletes an NSP profile. * - * @summary Deletes an NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileDelete.json + * @summary deletes an NSP profile. + * x-ms-original-file: 2025-07-01/NspProfileDelete.json */ async function nspProfilesDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.delete( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - ); - console.log(result); + await client.networkSecurityPerimeterProfiles.delete("rg1", "nsp1", "profile1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesGetSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesGetSample.ts index 257f6bc53bf8..1629895bfc69 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified NSP profile. + * This sample demonstrates how to gets the specified NSP profile. * - * @summary Gets the specified NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileGet.json + * @summary gets the specified NSP profile. + * x-ms-original-file: 2025-07-01/NspProfileGet.json */ async function nspProfilesGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.get( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - ); + const result = await client.networkSecurityPerimeterProfiles.get("rg1", "nsp1", "profile1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesListSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesListSample.ts index 22ce1826100c..e3a538d93b1e 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterProfilesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists the NSP profiles in the specified network security perimeter. + * This sample demonstrates how to lists the NSP profiles in the specified network security perimeter. * - * @summary Lists the NSP profiles in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileList.json + * @summary lists the NSP profiles in the specified network security perimeter. + * x-ms-original-file: 2025-07-01/NspProfileList.json */ async function nspProfilesList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterProfiles.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { + for await (const item of client.networkSecurityPerimeterProfiles.list("rg1", "nsp1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterServiceTagsListSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterServiceTagsListSample.ts index f55b1daaeb13..c23e13a27fa8 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimeterServiceTagsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimeterServiceTagsListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. + * This sample demonstrates how to gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. * - * @summary Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspServiceTagsList.json + * @summary gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. + * x-ms-original-file: 2025-07-01/NspServiceTagsList.json */ async function nspServiceTagsList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westus"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterServiceTags.list( - location, - )) { + for await (const item of client.networkSecurityPerimeterServiceTags.list("westus")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersCreateOrUpdateSample.ts index 38d6b3639ee0..154d3f965599 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersCreateOrUpdateSample.ts @@ -1,32 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkSecurityPerimeter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a Network Security Perimeter. + * This sample demonstrates how to creates or updates a Network Security Perimeter. * - * @summary Creates or updates a Network Security Perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterPut.json + * @summary creates or updates a Network Security Perimeter. + * x-ms-original-file: 2025-07-01/NetworkSecurityPerimeterPut.json */ async function putNetworkSecurityPerimeter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const parameters: NetworkSecurityPerimeter = { location: "location1" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - parameters, - ); + const result = await client.networkSecurityPerimeters.createOrUpdate("rg1", "nsp1", { + location: "location1", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersDeleteSample.ts index 3d28e80266d4..8a93e2de7b55 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a network security perimeter. + * This sample demonstrates how to deletes a network security perimeter. * - * @summary Deletes a network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterDelete.json + * @summary deletes a network security perimeter. + * x-ms-original-file: 2025-07-01/NetworkSecurityPerimeterDelete.json */ async function networkSecurityPerimeterDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "testNSP1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - ); - console.log(result); + await client.networkSecurityPerimeters.delete("rg1", "testNSP1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersGetSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersGetSample.ts index a445b45febc4..aec0d04162a9 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified network security perimeter by the name. + * This sample demonstrates how to gets the specified network security perimeter by the name. * - * @summary Gets the specified network security perimeter by the name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterGet.json + * @summary gets the specified network security perimeter by the name. + * x-ms-original-file: 2025-07-01/NetworkSecurityPerimeterGet.json */ async function networkSecurityPerimeterGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.get( - resourceGroupName, - networkSecurityPerimeterName, - ); + const result = await client.networkSecurityPerimeters.get("rg1", "nsp1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersListBySubscriptionSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersListBySubscriptionSample.ts index d2bd622362a4..c60be7a7de5d 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersListBySubscriptionSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all network security perimeters in a subscription. + * This sample demonstrates how to list all network security perimeters in a subscription. * - * @summary List all network security perimeters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterListAll.json + * @summary list all network security perimeters in a subscription. + * x-ms-original-file: 2025-07-01/NetworkSecurityPerimeterListAll.json */ async function networkSecurityPerimetersList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkSecurityPerimeters.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersListSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersListSample.ts index 04eec97d7168..507d7ba82912 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List network security perimeters in a resource group. + * This sample demonstrates how to list network security perimeters in a resource group. * - * @summary List network security perimeters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterList.json + * @summary list network security perimeters in a resource group. + * x-ms-original-file: 2025-07-01/NetworkSecurityPerimeterList.json */ async function listNetworkSecurityPerimeter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkSecurityPerimeters.list( - resourceGroupName, - )) { + for await (const item of client.networkSecurityPerimeters.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersPatchSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersPatchSample.ts index 341d4fa1c815..4e9666da517b 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityPerimetersPatchSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityPerimetersPatchSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { UpdateTagsRequest} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Patch Tags for a Network Security Perimeter. + * This sample demonstrates how to patch Tags for a Network Security Perimeter. * - * @summary Patch Tags for a Network Security Perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterPatch.json + * @summary patch Tags for a Network Security Perimeter. + * x-ms-original-file: 2025-07-01/NetworkSecurityPerimeterPatch.json */ async function patchNetworkSecurityPerimeter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const parameters: UpdateTagsRequest = { tags: { description: "nsp1" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.patch( - resourceGroupName, - networkSecurityPerimeterName, - parameters, - ); + const result = await client.networkSecurityPerimeters.patch("rg1", "nsp1", { + tags: { description: "nsp1" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts index e7eed325a5c6..0fdeab0a6cca 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts @@ -1,26 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkVirtualApplianceConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' + * This sample demonstrates how to creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' * - * @summary Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionPut.json + * @summary creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceConnectionPut.json */ async function networkVirtualApplianceConnectionPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection = + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkVirtualApplianceConnections.createOrUpdate( + "rg1", + "nva1", + "connection1", { namePropertiesName: "connection1", asn: 64512, @@ -28,34 +25,26 @@ async function networkVirtualApplianceConnectionPut(): Promise { enableInternetSecurity: false, routingConfiguration: { associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", }, inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", }, outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", }, propagatedRouteTables: { ids: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", }, ], labels: ["label1"], }, }, tunnelIdentifier: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualApplianceConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - networkVirtualApplianceConnectionParameters, - ); + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsDeleteSample.ts index 4a24ef2470ad..7dbf699e1c3d 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsDeleteSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a NVA connection. + * This sample demonstrates how to deletes a NVA connection. * - * @summary Deletes a NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionDelete.json + * @summary deletes a NVA connection. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceConnectionDelete.json */ async function networkVirtualApplianceConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualApplianceConnections.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - ); - console.log(result); + await client.networkVirtualApplianceConnections.delete("rg1", "nva1", "connection1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsGetSample.ts index f2b81a3556c1..862073fd931d 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of specified NVA connection. + * This sample demonstrates how to retrieves the details of specified NVA connection. * - * @summary Retrieves the details of specified NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionGet.json + * @summary retrieves the details of specified NVA connection. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceConnectionGet.json */ async function networkVirtualApplianceConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualApplianceConnections.get( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - ); + const result = await client.networkVirtualApplianceConnections.get("rg1", "nva1", "connection1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsListSample.ts index b9be8da441c2..03c796a88992 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists NetworkVirtualApplianceConnections under the NVA. + * This sample demonstrates how to lists NetworkVirtualApplianceConnections under the NVA. * - * @summary Lists NetworkVirtualApplianceConnections under the NVA. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionList.json + * @summary lists NetworkVirtualApplianceConnections under the NVA. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceConnectionList.json */ async function networkVirtualApplianceConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkVirtualApplianceConnections.list( - resourceGroupName, - networkVirtualApplianceName, - )) { + for await (const item of client.networkVirtualApplianceConnections.list("rg1", "nva1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesCreateOrUpdateSample.ts index fb9a885a5be3..4fc89ee67e45 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesCreateOrUpdateSample.ts @@ -1,406 +1,337 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkVirtualAppliance} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. + * This sample demonstrates how to creates or updates the specified Network Virtual Appliance. * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetBasicPut.json + * @summary creates or updates the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualAppliancePut.json */ -async function createNvaInVNetWithPrivateNicPublicNic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], +async function createNetworkVirtualAppliance(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkVirtualAppliances.createOrUpdate("rg1", "nva", { identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, + additionalNics: [{ name: "exrsdwan", hasPublicIp: true }], + bootStrapConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", + ], + cloudInitConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", + ], + internetIngressPublicIps: [ { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, + id: "/subscriptions/{{subscriptionId}}/resourceGroups/{{rg}}/providers/Microsoft.Network/publicIPAddresses/slbip", }, ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", + networkProfile: { + networkInterfaceConfigurations: [ + { + nicType: "PublicNic", + properties: { + ipConfigurations: [ + { name: "publicnicipconfig", properties: { primary: true } }, + { name: "publicnicipconfig-2", properties: { primary: false } }, + ], + }, + }, + { + nicType: "PrivateNic", + properties: { + ipConfigurations: [ + { name: "privatenicipconfig", properties: { primary: true } }, + { name: "privatenicipconfig-2", properties: { primary: false } }, + ], + }, + }, + ], }, - tags: { key1: "value1" }, + nvaSku: { bundledScaleUnit: "1", marketPlaceVersion: "12.1", vendor: "Cisco SDWAN" }, virtualApplianceAsn: 10000, - }; + virtualHub: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", + }, + tags: { key1: "value1" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates the specified Network Virtual Appliance. + * + * @summary creates or updates the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceSaaSPut.json + */ +async function createSaaSNetworkVirtualAppliance(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); + const result = await client.networkVirtualAppliances.createOrUpdate("rg1", "nva", { + location: "West US", + delegation: { serviceName: "PaloAltoNetworks.Cloudngfw/firewalls" }, + virtualHub: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", + }, + tags: { key1: "value1" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. + * This sample demonstrates how to creates or updates the specified Network Virtual Appliance. * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetIngressPut.json + * @summary creates or updates the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceVnetAdditionalPrivatePut.json */ -async function createNvaInVNetWithPrivateNicPublicNicIncludingInternetIngress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], +async function createNVAInVNetWithPrivateNicPublicNicAdditionalPrivateNic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkVirtualAppliances.createOrUpdate("rg1", "nva", { identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, - internetIngressPublicIps: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/slbip", - }, - ], location: "West US", + bootStrapConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", + ], + cloudInitConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", + ], nvaInterfaceConfigurations: [ { name: "dataInterface", type: ["PrivateNic"], subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", }, }, { name: "managementInterface", type: ["PublicNic"], subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", + }, + }, + { + name: "myAdditionalInterface", + type: ["AdditionalPrivateNic"], + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", }, }, ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, + nvaSku: { bundledScaleUnit: "1", marketPlaceVersion: "latest", vendor: "Cisco SDWAN" }, virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); + tags: { key1: "value1" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. + * This sample demonstrates how to creates or updates the specified Network Virtual Appliance. * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetNetworkProfilePut.json + * @summary creates or updates the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceVnetAdditionalPublicPut.json */ -async function createNvaInVNetWithPrivateNicPublicNicIncludingNetworkProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], +async function createNVAInVNetWithPrivateNicPublicNicAdditionalPublicNic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkVirtualAppliances.createOrUpdate("rg1", "nva", { identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, location: "West US", - networkProfile: { - networkInterfaceConfigurations: [ - { - nicType: "PublicNic", - properties: { - ipConfigurations: [ - { - name: "myPrimaryPublicIpConfig", - properties: { primary: true }, - }, - { - name: "myNonPrimaryPublicIpConfig", - properties: { primary: false }, - }, - ], - }, - }, - { - nicType: "PrivateNic", - properties: { - ipConfigurations: [ - { - name: "myPrimaryPrivateIpConfig", - properties: { primary: true }, - }, - { - name: "myNonPrimaryPrivateIpConfig", - properties: { primary: false }, - }, - ], - }, - }, - ], - }, + bootStrapConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", + ], + cloudInitConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", + ], nvaInterfaceConfigurations: [ { name: "dataInterface", type: ["PrivateNic"], subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", }, }, { name: "managementInterface", type: ["PublicNic"], subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", + }, + }, + { + name: "myAdditionalPublicInterface", + type: ["AdditionalPublicNic"], + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", }, }, ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, + nvaSku: { bundledScaleUnit: "1", marketPlaceVersion: "latest", vendor: "Cisco SDWAN" }, virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); + tags: { key1: "value1" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. + * This sample demonstrates how to creates or updates the specified Network Virtual Appliance. * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetAdditionalPrivatePut.json + * @summary creates or updates the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceVnetBasicPut.json */ -async function createNvaInVNetWithPrivateNicPublicNicAdditionalPrivateNic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], +async function createNVAInVNetWithPrivateNicPublicNic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkVirtualAppliances.createOrUpdate("rg1", "nva", { identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, location: "West US", + bootStrapConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", + ], + cloudInitConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", + ], nvaInterfaceConfigurations: [ { name: "dataInterface", type: ["PrivateNic"], subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", }, }, { name: "managementInterface", type: ["PublicNic"], subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - { - name: "myAdditionalInterface", - type: ["AdditionalPrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", }, }, ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, + nvaSku: { bundledScaleUnit: "1", marketPlaceVersion: "latest", vendor: "Cisco SDWAN" }, virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); + tags: { key1: "value1" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. + * This sample demonstrates how to creates or updates the specified Network Virtual Appliance. * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetAdditionalPublicPut.json + * @summary creates or updates the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceVnetIngressPut.json */ -async function createNvaInVNetWithPrivateNicPublicNicAdditionalPublicNic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], +async function createNVAInVNetWithPrivateNicPublicNicIncludingInternetIngress(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkVirtualAppliances.createOrUpdate("rg1", "nva", { identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, location: "West US", + bootStrapConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", + ], + cloudInitConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", + ], + internetIngressPublicIps: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/slbip", + }, + ], nvaInterfaceConfigurations: [ { name: "dataInterface", type: ["PrivateNic"], subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", }, }, { name: "managementInterface", type: ["PublicNic"], subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - { - name: "myAdditionalPublicInterface", - type: ["AdditionalPublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", }, }, ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, + nvaSku: { bundledScaleUnit: "1", marketPlaceVersion: "latest", vendor: "Cisco SDWAN" }, virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); + tags: { key1: "value1" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. + * This sample demonstrates how to creates or updates the specified Network Virtual Appliance. * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualAppliancePut.json + * @summary creates or updates the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceVnetNetworkProfilePut.json */ -async function createNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - additionalNics: [{ name: "exrsdwan", hasPublicIp: true }], - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], +async function createNVAInVNetWithPrivateNicPublicNicIncludingNetworkProfile(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkVirtualAppliances.createOrUpdate("rg1", "nva", { identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, - internetIngressPublicIps: [ - { - id: "/subscriptions/{{subscriptionId}}/resourceGroups/{{rg}}/providers/Microsoft.Network/publicIPAddresses/slbip", - }, - ], location: "West US", + bootStrapConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", + ], + cloudInitConfigurationBlobs: [ + "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", + ], networkProfile: { networkInterfaceConfigurations: [ { nicType: "PublicNic", properties: { ipConfigurations: [ - { name: "publicnicipconfig", properties: { primary: true } }, - { name: "publicnicipconfig-2", properties: { primary: false } }, + { name: "myPrimaryPublicIpConfig", properties: { primary: true } }, + { name: "myNonPrimaryPublicIpConfig", properties: { primary: false } }, ], }, }, @@ -408,72 +339,44 @@ async function createNetworkVirtualAppliance(): Promise { nicType: "PrivateNic", properties: { ipConfigurations: [ - { name: "privatenicipconfig", properties: { primary: true } }, - { name: "privatenicipconfig-2", properties: { primary: false } }, + { name: "myPrimaryPrivateIpConfig", properties: { primary: true } }, + { name: "myNonPrimaryPrivateIpConfig", properties: { primary: false } }, ], }, }, ], }, - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "12.1", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, + nvaInterfaceConfigurations: [ + { + name: "dataInterface", + type: ["PrivateNic"], + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + }, + }, + { + name: "managementInterface", + type: ["PublicNic"], + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", + }, + }, + ], + nvaSku: { bundledScaleUnit: "1", marketPlaceVersion: "latest", vendor: "Cisco SDWAN" }, virtualApplianceAsn: 10000, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSaaSPut.json - */ -async function createSaaSNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - delegation: { serviceName: "PaloAltoNetworks.Cloudngfw/firewalls" }, - location: "West US", tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); + }); console.log(result); } async function main(): Promise { - await createNvaInVNetWithPrivateNicPublicNic(); - await createNvaInVNetWithPrivateNicPublicNicIncludingInternetIngress(); - await createNvaInVNetWithPrivateNicPublicNicIncludingNetworkProfile(); - await createNvaInVNetWithPrivateNicPublicNicAdditionalPrivateNic(); - await createNvaInVNetWithPrivateNicPublicNicAdditionalPublicNic(); await createNetworkVirtualAppliance(); await createSaaSNetworkVirtualAppliance(); + await createNVAInVNetWithPrivateNicPublicNicAdditionalPrivateNic(); + await createNVAInVNetWithPrivateNicPublicNicAdditionalPublicNic(); + await createNVAInVNetWithPrivateNicPublicNic(); + await createNVAInVNetWithPrivateNicPublicNicIncludingInternetIngress(); + await createNVAInVNetWithPrivateNicPublicNicIncludingNetworkProfile(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesDeleteSample.ts index deddde6bb6f9..a4fede037cf6 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified Network Virtual Appliance. + * This sample demonstrates how to deletes the specified Network Virtual Appliance. * - * @summary Deletes the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceDelete.json + * @summary deletes the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceDelete.json */ async function deleteNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); + await client.networkVirtualAppliances.delete("rg1", "nva"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts index 413a144463d2..3d402cc98bed 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts @@ -1,44 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkVirtualApplianceBootDiagnosticParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. + * This sample demonstrates how to retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. * - * @summary Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceBootDiagnostics.json + * @summary retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceBootDiagnostics.json */ -async function retrieveBootDiagnosticLogsForAGivenNvaVmssInstance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const request: NetworkVirtualApplianceBootDiagnosticParameters = { +async function retrieveBootDiagnosticLogsForAGivenNVAVmssInstance(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkVirtualAppliances.getBootDiagnosticLogs("rg1", "nva", { consoleScreenshotStorageSasUrl: "https://blobcortextesturl.blob.core.windows.net/nvaBootDiagContainer/consoleScreenshot.png?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", instanceId: 0, serialConsoleStorageSasUrl: "https://blobcortextesturl.blob.core.windows.net/nvaBootDiagContainer/serialLogs.txt?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginGetBootDiagnosticLogsAndWait( - resourceGroupName, - networkVirtualApplianceName, - request, - ); + }); console.log(result); } async function main(): Promise { - await retrieveBootDiagnosticLogsForAGivenNvaVmssInstance(); + await retrieveBootDiagnosticLogsForAGivenNVAVmssInstance(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetSample.ts index 143ef0815e75..0e73d4b93c7c 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Network Virtual Appliance. + * This sample demonstrates how to gets the specified Network Virtual Appliance. * - * @summary Gets the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceGet.json + * @summary gets the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceGet.json */ async function getNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.get( - resourceGroupName, - networkVirtualApplianceName, - ); + const result = await client.networkVirtualAppliances.get("rg1", "nva"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListByResourceGroupSample.ts index 4939f91026b4..08159d929cd7 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all Network Virtual Appliances in a resource group. + * This sample demonstrates how to lists all Network Virtual Appliances in a resource group. * - * @summary Lists all Network Virtual Appliances in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json + * @summary lists all Network Virtual Appliances in a resource group. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceListByResourceGroup.json */ async function listAllNetworkVirtualApplianceForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkVirtualAppliances.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.networkVirtualAppliances.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListSample.ts index 49736d492aa3..384223c38f69 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all Network Virtual Appliances in a subscription. + * This sample demonstrates how to gets all Network Virtual Appliances in a subscription. * - * @summary Gets all Network Virtual Appliances in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceListBySubscription.json + * @summary gets all Network Virtual Appliances in a subscription. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceListBySubscription.json */ async function listAllNetworkVirtualAppliancesForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkVirtualAppliances.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesReimageSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesReimageSample.ts index eae533485687..7ca96434290f 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesReimageSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesReimageSample.ts @@ -3,29 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Reimages one VM belonging to the specified Network Virtual Appliance. + * This sample demonstrates how to reimages one VM belonging to the specified Network Virtual Appliance. * - * @summary Reimages one VM belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSpecificReimage.json + * @summary reimages one VM belonging to the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceSpecificReimage.json */ -async function reimagesSpecificNetworkVirtualApplianceVMSInVMScaleSet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; +async function reimagesSpecificNetworkVirtualApplianceVMsInVMScaleSet(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginReimageAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); + const result = await client.networkVirtualAppliances.reimage("rg1", "nva"); console.log(result); } async function main(): Promise { - await reimagesSpecificNetworkVirtualApplianceVMSInVMScaleSet(); + await reimagesSpecificNetworkVirtualApplianceVMsInVMScaleSet(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesRestartSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesRestartSample.ts index 764e75cb6565..1eff427a8ca3 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesRestartSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesRestartSample.ts @@ -3,49 +3,38 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. + * This sample demonstrates how to restarts one or more VMs belonging to the specified Network Virtual Appliance. * - * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceEmptyRestart.json + * @summary restarts one or more VMs belonging to the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceEmptyRestart.json */ -async function restartAllNetworkVirtualApplianceVMSInVMScaleSet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; +async function restartAllNetworkVirtualApplianceVMsInVMScaleSet(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginRestartAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); + const result = await client.networkVirtualAppliances.restart("rg1", "nva"); console.log(result); } /** - * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. + * This sample demonstrates how to restarts one or more VMs belonging to the specified Network Virtual Appliance. * - * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSpecificRestart.json + * @summary restarts one or more VMs belonging to the specified Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceSpecificRestart.json */ -async function restartSpecificNetworkVirtualApplianceVMSInVMScaleSet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; +async function restartSpecificNetworkVirtualApplianceVMsInVMScaleSet(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginRestartAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); + const result = await client.networkVirtualAppliances.restart("rg1", "nva"); console.log(result); } async function main(): Promise { - await restartAllNetworkVirtualApplianceVMSInVMScaleSet(); - await restartSpecificNetworkVirtualApplianceVMSInVMScaleSet(); + await restartAllNetworkVirtualApplianceVMsInVMScaleSet(); + await restartSpecificNetworkVirtualApplianceVMsInVMScaleSet(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesUpdateTagsSample.ts index 576ed38ce159..9734ad447a72 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a Network Virtual Appliance. + * This sample demonstrates how to updates a Network Virtual Appliance. * - * @summary Updates a Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceUpdateTags.json + * @summary updates a Network Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceUpdateTags.json */ async function updateNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: TagsObject = { tags: { key1: "value1", key2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.updateTags( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); + const result = await client.networkVirtualAppliances.updateTags("rg1", "nva", { + tags: { key1: "value1", key2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersCheckConnectivitySample.ts b/sdk/network/arm-network/samples-dev/networkWatchersCheckConnectivitySample.ts index 86004c40096c..97486ed651e4 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersCheckConnectivitySample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersCheckConnectivitySample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ConnectivityParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. + * This sample demonstrates how to verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. * - * @summary Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectivityCheck.json + * @summary verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. + * x-ms-original-file: 2025-07-01/NetworkWatcherConnectivityCheck.json */ async function checkConnectivity(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: ConnectivityParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkWatchers.checkConnectivity("rg1", "nw1", { destination: { address: "192.168.100.4", port: 3389 }, preferredIPVersion: "IPv4", source: { resourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginCheckConnectivityAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersCreateOrUpdateSample.ts index 6096bad1b4f1..5e6dc0e1567e 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersCreateOrUpdateSample.ts @@ -1,29 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { NetworkWatcher} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a network watcher in the specified resource group. + * This sample demonstrates how to creates or updates a network watcher in the specified resource group. * - * @summary Creates or updates a network watcher in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherCreate.json + * @summary creates or updates a network watcher in the specified resource group. + * x-ms-original-file: 2025-07-01/NetworkWatcherCreate.json */ async function createNetworkWatcher(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: NetworkWatcher = { location: "eastus" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.createOrUpdate( - resourceGroupName, - networkWatcherName, - parameters, - ); + const result = await client.networkWatchers.createOrUpdate("rg1", "nw1", { location: "eastus" }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersDeleteSample.ts index 97c3356e1aec..ef17ecedf411 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified network watcher resource. + * This sample demonstrates how to deletes the specified network watcher resource. * - * @summary Deletes the specified network watcher resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherDelete.json + * @summary deletes the specified network watcher resource. + * x-ms-original-file: 2025-07-01/NetworkWatcherDelete.json */ async function deleteNetworkWatcher(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - ); - console.log(result); + await client.networkWatchers.delete("rg1", "nw1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetAzureReachabilityReportSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetAzureReachabilityReportSample.ts index 9c75adf0299f..cf13300d6602 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetAzureReachabilityReportSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetAzureReachabilityReportSample.ts @@ -1,39 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - AzureReachabilityReportParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. + * This sample demonstrates how to nOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. * - * @summary NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json + * @summary nOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. + * x-ms-original-file: 2025-07-01/NetworkWatcherAzureReachabilityReportGet.json */ async function getAzureReachabilityReport(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: AzureReachabilityReportParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkWatchers.getAzureReachabilityReport("rg1", "nw1", { azureLocations: ["West US"], endTime: new Date("2017-09-10T00:00:00Z"), providerLocation: { country: "United States", state: "washington" }, providers: ["Frontier Communications of America, Inc. - ASN 5650"], startTime: new Date("2017-09-07T00:00:00Z"), - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginGetAzureReachabilityReportAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetFlowLogStatusSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetFlowLogStatusSample.ts index 742802f302fa..1af7fb4c2416 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetFlowLogStatusSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetFlowLogStatusSample.ts @@ -1,35 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - FlowLogStatusParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Queries status of flow log and traffic analytics (optional) on a specified resource. + * This sample demonstrates how to queries status of flow log and traffic analytics (optional) on a specified resource. * - * @summary Queries status of flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogStatusQuery.json + * @summary queries status of flow log and traffic analytics (optional) on a specified resource. + * x-ms-original-file: 2025-07-01/NetworkWatcherFlowLogStatusQuery.json */ async function getFlowLogStatus(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: FlowLogStatusParameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetFlowLogStatusAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); + const result = await client.networkWatchers.getFlowLogStatus("rg1", "nw1", { + targetResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetNetworkConfigurationDiagnosticSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetNetworkConfigurationDiagnosticSample.ts index d354fc36d733..2beadb1bc94c 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetNetworkConfigurationDiagnosticSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetNetworkConfigurationDiagnosticSample.ts @@ -1,25 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkConfigurationDiagnosticParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. + * This sample demonstrates how to gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. * - * @summary Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json + * @summary gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. + * x-ms-original-file: 2025-07-01/NetworkWatcherNetworkConfigurationDiagnostic.json */ async function networkConfigurationDiagnostic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: NetworkConfigurationDiagnosticParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkWatchers.getNetworkConfigurationDiagnostic("rg1", "nw1", { profiles: [ { destination: "12.11.12.14", @@ -30,16 +25,8 @@ async function networkConfigurationDiagnostic(): Promise { }, ], targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginGetNetworkConfigurationDiagnosticAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetNextHopSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetNextHopSample.ts index b3e5a37f56a2..0b734b23e46a 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetNextHopSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetNextHopSample.ts @@ -1,36 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { NextHopParameters} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the next hop from the specified VM. + * This sample demonstrates how to gets the next hop from the specified VM. * - * @summary Gets the next hop from the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherNextHopGet.json + * @summary gets the next hop from the specified VM. + * x-ms-original-file: 2025-07-01/NetworkWatcherNextHopGet.json */ async function getNextHop(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: NextHopParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkWatchers.getNextHop("rg1", "nw1", { destinationIPAddress: "10.0.0.10", sourceIPAddress: "10.0.0.5", targetNicResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1", targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetNextHopAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetSample.ts index d7912422b85a..0c58c3f57f4d 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified network watcher by resource group. + * This sample demonstrates how to gets the specified network watcher by resource group. * - * @summary Gets the specified network watcher by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherGet.json + * @summary gets the specified network watcher by resource group. + * x-ms-original-file: 2025-07-01/NetworkWatcherGet.json */ async function getNetworkWatcher(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.get( - resourceGroupName, - networkWatcherName, - ); + const result = await client.networkWatchers.get("rg1", "nw1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetTopologySample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetTopologySample.ts index 046c01c32b8d..168a9073954c 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetTopologySample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetTopologySample.ts @@ -1,32 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - TopologyParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the current network topology by resource group. + * This sample demonstrates how to gets the current network topology by resource group. * - * @summary Gets the current network topology by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTopologyGet.json + * @summary gets the current network topology by resource group. + * x-ms-original-file: 2025-07-01/NetworkWatcherTopologyGet.json */ async function getTopology(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: TopologyParameters = { targetResourceGroupName: "rg2" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.getTopology( - resourceGroupName, - networkWatcherName, - parameters, - ); + const result = await client.networkWatchers.getTopology("rg1", "nw1", { + targetResourceGroupName: "rg2", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingResultSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingResultSample.ts index e1e2e9af4e63..fd0887c76a51 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingResultSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingResultSample.ts @@ -1,36 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - QueryTroubleshootingParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get the last completed troubleshooting result on a specified resource. + * This sample demonstrates how to get the last completed troubleshooting result on a specified resource. * - * @summary Get the last completed troubleshooting result on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTroubleshootResultQuery.json + * @summary get the last completed troubleshooting result on a specified resource. + * x-ms-original-file: 2025-07-01/NetworkWatcherTroubleshootResultQuery.json */ async function getTroubleshootResult(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: QueryTroubleshootingParameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginGetTroubleshootingResultAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); + const result = await client.networkWatchers.getTroubleshootingResult("rg1", "nw1", { + targetResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingSample.ts index ee4b9632b8eb..d48a010fb47d 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingSample.ts @@ -1,38 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - TroubleshootingParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Initiate troubleshooting on a specified resource. + * This sample demonstrates how to initiate troubleshooting on a specified resource. * - * @summary Initiate troubleshooting on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTroubleshootGet.json + * @summary initiate troubleshooting on a specified resource. + * x-ms-original-file: 2025-07-01/NetworkWatcherTroubleshootGet.json */ async function getTroubleshooting(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: TroubleshootingParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkWatchers.getTroubleshooting("rg1", "nw1", { storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", storagePath: "https://st1.blob.core.windows.net/cn1", targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetTroubleshootingAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetVMSecurityRulesSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetVMSecurityRulesSample.ts index 21767e08eb69..88216d042539 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetVMSecurityRulesSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetVMSecurityRulesSample.ts @@ -1,35 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SecurityGroupViewParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the configured and effective security group rules on the specified VM. + * This sample demonstrates how to gets the configured and effective security group rules on the specified VM. * - * @summary Gets the configured and effective security group rules on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherSecurityGroupViewGet.json + * @summary gets the configured and effective security group rules on the specified VM. + * x-ms-original-file: 2025-07-01/NetworkWatcherSecurityGroupViewGet.json */ async function getSecurityGroupView(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: SecurityGroupViewParameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetVMSecurityRulesAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); + const result = await client.networkWatchers.getVMSecurityRules("rg1", "nw1", { + targetResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersListAllSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersListAllSample.ts index 977bc2da5ec9..2465636ac67a 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all network watchers by subscription. + * This sample demonstrates how to gets all network watchers by subscription. * - * @summary Gets all network watchers by subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherListAll.json + * @summary gets all network watchers by subscription. + * x-ms-original-file: 2025-07-01/NetworkWatcherListAll.json */ async function listAllNetworkWatchers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.networkWatchers.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersListAvailableProvidersSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersListAvailableProvidersSample.ts index 15dfd82e3c19..f69642a23cf2 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersListAvailableProvidersSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersListAvailableProvidersSample.ts @@ -1,38 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - AvailableProvidersListParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. + * This sample demonstrates how to nOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. * - * @summary NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherAvailableProvidersListGet.json + * @summary nOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. + * x-ms-original-file: 2025-07-01/NetworkWatcherAvailableProvidersListGet.json */ async function getAvailableProvidersList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: AvailableProvidersListParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkWatchers.listAvailableProviders("rg1", "nw1", { azureLocations: ["West US"], city: "seattle", country: "United States", state: "washington", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginListAvailableProvidersAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersListSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersListSample.ts index 905bf6aad7bc..8e8ac36df5eb 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all network watchers by resource group. + * This sample demonstrates how to gets all network watchers by resource group. * - * @summary Gets all network watchers by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherList.json + * @summary gets all network watchers by resource group. + * x-ms-original-file: 2025-07-01/NetworkWatcherList.json */ async function listNetworkWatchers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.networkWatchers.list(resourceGroupName)) { + for await (const item of client.networkWatchers.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersSetFlowLogConfigurationSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersSetFlowLogConfigurationSample.ts index b950cce252ba..49d6cc43d5bb 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersSetFlowLogConfigurationSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersSetFlowLogConfigurationSample.ts @@ -1,46 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - FlowLogInformation} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Configures flow log and traffic analytics (optional) on a specified resource. + * This sample demonstrates how to configures flow log and traffic analytics (optional) on a specified resource. * - * @summary Configures flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogConfigure.json + * @summary configures flow log and traffic analytics (optional) on a specified resource. + * x-ms-original-file: 2025-07-01/NetworkWatcherFlowLogConfigure.json */ async function configureFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: FlowLogInformation = { - enabled: true, + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkWatchers.setFlowLogConfiguration("rg1", "nw1", { identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, }, }, + enabled: true, storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginSetFlowLogConfigurationAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersUpdateTagsSample.ts index 89f6ed6cfe9c..8a8e0caf104d 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a network watcher tags. + * This sample demonstrates how to updates a network watcher tags. * - * @summary Updates a network watcher tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherUpdateTags.json + * @summary updates a network watcher tags. + * x-ms-original-file: 2025-07-01/NetworkWatcherUpdateTags.json */ async function updateNetworkWatcherTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.updateTags( - resourceGroupName, - networkWatcherName, - parameters, - ); + const result = await client.networkWatchers.updateTags("rg1", "nw1", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/networkWatchersVerifyIPFlowSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersVerifyIPFlowSample.ts index 00ab00594bb8..26712d149e54 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersVerifyIPFlowSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersVerifyIPFlowSample.ts @@ -1,41 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VerificationIPFlowParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Verify IP flow from the specified VM to a location given the currently configured NSG rules. + * This sample demonstrates how to verify IP flow from the specified VM to a location given the currently configured NSG rules. * - * @summary Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherIpFlowVerify.json + * @summary verify IP flow from the specified VM to a location given the currently configured NSG rules. + * x-ms-original-file: 2025-07-01/NetworkWatcherIpFlowVerify.json */ async function ipFlowVerify(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: VerificationIPFlowParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.networkWatchers.verifyIPFlow("rg1", "nw1", { direction: "Outbound", localIPAddress: "10.2.0.4", localPort: "80", remoteIPAddress: "121.10.1.1", remotePort: "80", targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", protocol: "TCP", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginVerifyIPFlowAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/operationsListSample.ts b/sdk/network/arm-network/samples-dev/operationsListSample.ts index d780aa09727f..1b0a2735bde6 100644 --- a/sdk/network/arm-network/samples-dev/operationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/operationsListSample.ts @@ -3,24 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all of the available Network Rest API operations. + * This sample demonstrates how to lists all of the available Network Rest API operations. * - * @summary Lists all of the available Network Rest API operations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/OperationList.json + * @summary lists all of the available Network Rest API operations. + * x-ms-original-file: 2025-07-01/OperationList.json */ async function getAListOfOperationsForAResourceProvider(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); + const client = new NetworkManagementClient(credential); const resArray = new Array(); for await (const item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysCreateOrUpdateSample.ts index 16ae47c00a46..ca74ea18cbff 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysCreateOrUpdateSample.ts @@ -1,43 +1,41 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { P2SVpnGateway} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + * This sample demonstrates how to creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. * - * @summary Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayPut.json + * @summary creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + * x-ms-original-file: 2025-07-01/P2SVpnGatewayPut.json */ async function p2SVpnGatewayPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const p2SVpnGatewayParameters: P2SVpnGateway = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.p2SVpnGateways.createOrUpdate("rg1", "p2sVpnGateway1", { + location: "West US", customDnsServers: ["1.1.1.1", "2.2.2.2"], isRoutingPreferenceInternet: false, - location: "West US", p2SConnectionConfigurations: [ { name: "P2SConnectionConfig1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/p2sVpnGateways/p2sVpnGateway1/p2sConnectionConfigurations/P2SConnectionConfig1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/p2sVpnGateways/p2sVpnGateway1/p2sConnectionConfigurations/P2SConnectionConfig1", routingConfiguration: { associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", }, propagatedRouteTables: { ids: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", }, { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable2", }, { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable3", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable3", }, ], labels: ["label1", "label2"], @@ -47,22 +45,15 @@ async function p2SVpnGatewayPut(): Promise { vpnClientAddressPool: { addressPrefixes: ["101.3.0.0/16"] }, }, ], - tags: { key1: "value1" }, virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", }, vpnGatewayScaleUnit: 1, vpnServerConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1", }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - ); + tags: { key1: "value1" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDeleteSample.ts index bdb47aef54d2..c7b55d1a74f9 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a virtual wan p2s vpn gateway. + * This sample demonstrates how to deletes a virtual wan p2s vpn gateway. * - * @summary Deletes a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayDelete.json + * @summary deletes a virtual wan p2s vpn gateway. + * x-ms-original-file: 2025-07-01/P2SVpnGatewayDelete.json */ async function p2SVpnGatewayDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginDeleteAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); + await client.p2SVpnGateways.delete("rg1", "p2sVpnGateway1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SVpnConnectionsSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SVpnConnectionsSample.ts new file mode 100644 index 000000000000..4aa2cad0472a --- /dev/null +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SVpnConnectionsSample.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. + * + * @summary disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. + * x-ms-original-file: 2025-07-01/P2sVpnGatewaysDisconnectP2sVpnConnections.json + */ +async function disconnectVpnConnectionsFromP2SVpnGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.p2SVpnGateways.disconnectP2SVpnConnections("p2s-vpn-gateway-test", "p2svpngateway", { + vpnConnectionIds: ["vpnconnId1", "vpnconnId2"], + }); +} + +async function main(): Promise { + await disconnectVpnConnectionsFromP2SVpnGateway(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts deleted file mode 100644 index fd4f8f04d141..000000000000 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - P2SVpnConnectionRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json - */ -async function disconnectVpnConnectionsFromP2SVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vpn-gateway-test"; - const p2SVpnGatewayName = "p2svpngateway"; - const request: P2SVpnConnectionRequest = { - vpnConnectionIds: ["vpnconnId1", "vpnconnId2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.p2SVpnGateways.beginDisconnectP2SVpnConnectionsAndWait( - resourceGroupName, - p2SVpnGatewayName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await disconnectVpnConnectionsFromP2SVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGenerateVpnProfileSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGenerateVpnProfileSample.ts index d02221208f6d..daf2bc68d906 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGenerateVpnProfileSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGenerateVpnProfileSample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - P2SVpnProfileParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * This sample demonstrates how to generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. * - * @summary Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json + * @summary generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * x-ms-original-file: 2025-07-01/P2SVpnGatewayGenerateVpnProfile.json */ -async function generateP2SVpnGatewayVpnprofile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const parameters: P2SVpnProfileParameters = { - authenticationMethod: "EAPTLS", - }; +async function generateP2SVpnGatewayVPNProfile(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginGenerateVpnProfileAndWait( - resourceGroupName, - gatewayName, - parameters, - ); + const result = await client.p2SVpnGateways.generateVpnProfile("rg1", "p2sVpnGateway1", { + authenticationMethod: "EAPTLS", + }); console.log(result); } async function main(): Promise { - await generateP2SVpnGatewayVpnprofile(); + await generateP2SVpnGatewayVPNProfile(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SVpnConnectionHealthDetailedSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SVpnConnectionHealthDetailedSample.ts new file mode 100644 index 000000000000..94f8b77767fc --- /dev/null +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SVpnConnectionHealthDetailedSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @summary gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * x-ms-original-file: 2025-07-01/P2SVpnGatewayGetConnectionHealthDetailed.json + */ +async function p2SVpnGatewayGetConnectionHealthDetailed(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.p2SVpnGateways.getP2SVpnConnectionHealthDetailed( + "p2s-vpn-gateway-test", + "p2svpngateway", + { + outputBlobSasUrl: + "https://blobcortextesturl.blob.core.windows.net/folderforconfig/p2sconnectionhealths?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", + vpnUserNamesFilter: ["vpnUser1", "vpnUser2"], + }, + ); + console.log(result); +} + +async function main(): Promise { + await p2SVpnGatewayGetConnectionHealthDetailed(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SVpnConnectionHealthSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SVpnConnectionHealthSample.ts new file mode 100644 index 000000000000..f21fe683c0ca --- /dev/null +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SVpnConnectionHealthSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @summary gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * x-ms-original-file: 2025-07-01/P2SVpnGatewayGetConnectionHealth.json + */ +async function p2SVpnGatewayGetConnectionHealth(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.p2SVpnGateways.getP2SVpnConnectionHealth("rg1", "p2sVpnGateway1"); + console.log(result); +} + +async function main(): Promise { + await p2SVpnGatewayGetConnectionHealth(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts deleted file mode 100644 index 2fe9b68284cd..000000000000 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - P2SVpnConnectionHealthRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json - */ -async function p2SVpnGatewayGetConnectionHealthDetailed(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vpn-gateway-test"; - const gatewayName = "p2svpngateway"; - const request: P2SVpnConnectionHealthRequest = { - outputBlobSasUrl: - "https://blobcortextesturl.blob.core.windows.net/folderforconfig/p2sconnectionhealths?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - vpnUserNamesFilter: ["vpnUser1", "vpnUser2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.p2SVpnGateways.beginGetP2SVpnConnectionHealthDetailedAndWait( - resourceGroupName, - gatewayName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayGetConnectionHealthDetailed(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts deleted file mode 100644 index fa0518945158..000000000000 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGetConnectionHealth.json - */ -async function p2SVpnGatewayGetConnectionHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.p2SVpnGateways.beginGetP2SVpnConnectionHealthAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayGetConnectionHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetSample.ts index 076c52c92c2d..1f403e8716d9 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a virtual wan p2s vpn gateway. + * This sample demonstrates how to retrieves the details of a virtual wan p2s vpn gateway. * - * @summary Retrieves the details of a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGet.json + * @summary retrieves the details of a virtual wan p2s vpn gateway. + * x-ms-original-file: 2025-07-01/P2SVpnGatewayGet.json */ async function p2SVpnGatewayGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.get( - resourceGroupName, - gatewayName, - ); + const result = await client.p2SVpnGateways.get("rg1", "p2sVpnGateway1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListByResourceGroupSample.ts index 77b997157953..3f1373c48624 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the P2SVpnGateways in a resource group. + * This sample demonstrates how to lists all the P2SVpnGateways in a resource group. * - * @summary Lists all the P2SVpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayListByResourceGroup.json + * @summary lists all the P2SVpnGateways in a resource group. + * x-ms-original-file: 2025-07-01/P2SVpnGatewayListByResourceGroup.json */ async function p2SVpnGatewayListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.p2SVpnGateways.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.p2SVpnGateways.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListSample.ts index bfdc87b7a48a..3a36dcb03ab7 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the P2SVpnGateways in a subscription. + * This sample demonstrates how to lists all the P2SVpnGateways in a subscription. * - * @summary Lists all the P2SVpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayList.json + * @summary lists all the P2SVpnGateways in a subscription. + * x-ms-original-file: 2025-07-01/P2SVpnGatewayList.json */ async function p2SVpnGatewayListBySubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.p2SVpnGateways.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysResetSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysResetSample.ts index bd8a7e21a586..ba9e4ed6435e 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysResetSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysResetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Resets the primary of the p2s vpn gateway in the specified resource group. + * This sample demonstrates how to resets the primary of the p2s vpn gateway in the specified resource group. * - * @summary Resets the primary of the p2s vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayReset.json + * @summary resets the primary of the p2s vpn gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/P2SVpnGatewayReset.json */ async function resetP2SVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginResetAndWait( - resourceGroupName, - gatewayName, - ); + const result = await client.p2SVpnGateways.reset("rg1", "p2sVpnGateway1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysUpdateTagsSample.ts index de043d14741f..94766ef47dde 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysUpdateTagsSample.ts @@ -1,31 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates virtual wan p2s vpn gateway tags. + * This sample demonstrates how to updates virtual wan p2s vpn gateway tags. * - * @summary Updates virtual wan p2s vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayUpdateTags.json + * @summary updates virtual wan p2s vpn gateway tags. + * x-ms-original-file: 2025-07-01/P2SVpnGatewayUpdateTags.json */ async function p2SVpnGatewayUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const p2SVpnGatewayParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginUpdateTagsAndWait( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - ); + const result = await client.p2SVpnGateways.updateTags("rg1", "p2sVpnGateway1", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/packetCapturesCreateSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesCreateSample.ts index 7ccbae963060..0a2760af6318 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesCreateSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesCreateSample.ts @@ -1,45 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PacketCapture} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create and start a packet capture on the specified VM. + * This sample demonstrates how to create and start a packet capture on the specified VM. * - * @summary Create and start a packet capture on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureCreate.json + * @summary create and start a packet capture on the specified VM. + * x-ms-original-file: 2025-07-01/NetworkWatcherPacketCaptureCreate.json */ async function createPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const parameters: PacketCapture = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.packetCaptures.create("rg1", "nw1", "pc1", { bytesToCapturePerPacket: 10000, filters: [{ localIPAddress: "10.0.0.4", localPort: "80", protocol: "TCP" }], storageLocation: { filePath: "D:\\capture\\pc1.cap", storageId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/pcstore", - storagePath: - "https://mytestaccountname.blob.core.windows.net/capture/pc1.cap", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/pcstore", + storagePath: "https://mytestaccountname.blob.core.windows.net/capture/pc1.cap", }, target: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", timeLimitInSeconds: 100, totalBytesPerSession: 100000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginCreateAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/packetCapturesDeleteSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesDeleteSample.ts index d1be1f9b8d53..4b3dd9666406 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified packet capture session. + * This sample demonstrates how to deletes the specified packet capture session. * - * @summary Deletes the specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureDelete.json + * @summary deletes the specified packet capture session. + * x-ms-original-file: 2025-07-01/NetworkWatcherPacketCaptureDelete.json */ async function deletePacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); + await client.packetCaptures.delete("rg1", "nw1", "pc1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/packetCapturesGetSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesGetSample.ts index 61d5575f33a5..d05d46b0fa66 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a packet capture session by name. + * This sample demonstrates how to gets a packet capture session by name. * - * @summary Gets a packet capture session by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureGet.json + * @summary gets a packet capture session by name. + * x-ms-original-file: 2025-07-01/NetworkWatcherPacketCaptureGet.json */ async function getPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.get( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); + const result = await client.packetCaptures.get("rg1", "nw1", "pc1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/packetCapturesGetStatusSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesGetStatusSample.ts index 4c9bc1de3b4a..9eabf8a0998b 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesGetStatusSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesGetStatusSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Query the status of a running packet capture session. + * This sample demonstrates how to query the status of a running packet capture session. * - * @summary Query the status of a running packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json + * @summary query the status of a running packet capture session. + * x-ms-original-file: 2025-07-01/NetworkWatcherPacketCaptureQueryStatus.json */ async function queryPacketCaptureStatus(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginGetStatusAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); + const result = await client.packetCaptures.getStatus("rg1", "nw1", "pc1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/packetCapturesListSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesListSample.ts index 9d98c8fc05f1..f7972b51f493 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesListSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all packet capture sessions within the specified resource group. + * This sample demonstrates how to lists all packet capture sessions within the specified resource group. * - * @summary Lists all packet capture sessions within the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCapturesList.json + * @summary lists all packet capture sessions within the specified resource group. + * x-ms-original-file: 2025-07-01/NetworkWatcherPacketCapturesList.json */ async function listPacketCaptures(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.packetCaptures.list( - resourceGroupName, - networkWatcherName, - )) { + for await (const item of client.packetCaptures.list("rg1", "nw1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/packetCapturesStopSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesStopSample.ts index 5be4c192b412..4976a5b16a04 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesStopSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesStopSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Stops a specified packet capture session. + * This sample demonstrates how to stops a specified packet capture session. * - * @summary Stops a specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureStop.json + * @summary stops a specified packet capture session. + * x-ms-original-file: 2025-07-01/NetworkWatcherPacketCaptureStop.json */ async function stopPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginStopAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); + await client.packetCaptures.stop("rg1", "nw1", "pc1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsGetSample.ts index 389180e4fdbe..58303823d827 100644 --- a/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsGetSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. + * This sample demonstrates how to gets the specified Peer Express Route Circuit Connection from the specified express route circuit. * - * @summary Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PeerExpressRouteCircuitConnectionGet.json + * @summary gets the specified Peer Express Route Circuit Connection from the specified express route circuit. + * x-ms-original-file: 2025-07-01/PeerExpressRouteCircuitConnectionGet.json */ async function peerExpressRouteCircuitConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "60aee347-e889-4a42-8c1b-0aae8b1e4013"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.peerExpressRouteCircuitConnections.get( - resourceGroupName, - circuitName, - peeringName, - connectionName, + "rg1", + "ExpressRouteARMCircuitA", + "AzurePrivatePeering", + "60aee347-e889-4a42-8c1b-0aae8b1e4013", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsListSample.ts index c3368e8b522a..64ef27cac722 100644 --- a/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsListSample.ts @@ -3,29 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all global reach peer connections associated with a private peering in an express route circuit. + * This sample demonstrates how to gets all global reach peer connections associated with a private peering in an express route circuit. * - * @summary Gets all global reach peer connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PeerExpressRouteCircuitConnectionList.json + * @summary gets all global reach peer connections associated with a private peering in an express route circuit. + * x-ms-original-file: 2025-07-01/PeerExpressRouteCircuitConnectionList.json */ async function listPeerExpressRouteCircuitConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.peerExpressRouteCircuitConnections.list( - resourceGroupName, - circuitName, - peeringName, + "rg1", + "ExpressRouteARMCircuitA", + "AzurePrivatePeering", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsCreateOrUpdateSample.ts index e77d6f60b762..b7571a2dbcfe 100644 --- a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsCreateOrUpdateSample.ts @@ -1,40 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - PrivateDnsZoneGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a private dns zone group in the specified private endpoint. + * This sample demonstrates how to creates or updates a private dns zone group in the specified private endpoint. * - * @summary Creates or updates a private dns zone group in the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json + * @summary creates or updates a private dns zone group in the specified private endpoint. + * x-ms-original-file: 2025-07-01/PrivateEndpointDnsZoneGroupCreate.json */ async function createPrivateDnsZoneGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const parameters: PrivateDnsZoneGroup = { - privateDnsZoneConfigs: [ - { - privateDnsZoneId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/zone1.com", - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - parameters, + const result = await client.privateDnsZoneGroups.createOrUpdate( + "rg1", + "testPe", + "testPdnsgroup", + { + privateDnsZoneConfigs: [ + { + privateDnsZoneId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/zone1.com", + }, + ], + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsDeleteSample.ts index 66dbb0e00d7f..3410811d5cca 100644 --- a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified private dns zone group. + * This sample demonstrates how to deletes the specified private dns zone group. * - * @summary Deletes the specified private dns zone group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json + * @summary deletes the specified private dns zone group. + * x-ms-original-file: 2025-07-01/PrivateEndpointDnsZoneGroupDelete.json */ async function deletePrivateDnsZoneGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.beginDeleteAndWait( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - ); - console.log(result); + await client.privateDnsZoneGroups.delete("rg1", "testPe", "testPdnsgroup"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsGetSample.ts index a1b7ce811591..501998365dc4 100644 --- a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the private dns zone group resource by specified private dns zone group name. + * This sample demonstrates how to gets the private dns zone group resource by specified private dns zone group name. * - * @summary Gets the private dns zone group resource by specified private dns zone group name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupGet.json + * @summary gets the private dns zone group resource by specified private dns zone group name. + * x-ms-original-file: 2025-07-01/PrivateEndpointDnsZoneGroupGet.json */ async function getPrivateDnsZoneGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.get( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - ); + const result = await client.privateDnsZoneGroups.get("rg1", "testPe", "testPdnsgroup"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsListSample.ts b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsListSample.ts index a3254c37ee80..e804545e4b9e 100644 --- a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all private dns zone groups in a private endpoint. + * This sample demonstrates how to gets all private dns zone groups in a private endpoint. * - * @summary Gets all private dns zone groups in a private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupList.json + * @summary gets all private dns zone groups in a private endpoint. + * x-ms-original-file: 2025-07-01/PrivateEndpointDnsZoneGroupList.json */ async function listPrivateEndpointsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const privateEndpointName = "testPe"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.privateDnsZoneGroups.list( - privateEndpointName, - resourceGroupName, - )) { + for await (const item of client.privateDnsZoneGroups.list("rg1", "testPe")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/privateEndpointsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/privateEndpointsCreateOrUpdateSample.ts index 836299591a4f..0e6fc5eda8e3 100644 --- a/sdk/network/arm-network/samples-dev/privateEndpointsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/privateEndpointsCreateOrUpdateSample.ts @@ -1,22 +1,21 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PrivateEndpoint} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. + * This sample demonstrates how to creates or updates an private endpoint in the specified resource group. * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointCreate.json + * @summary creates or updates an private endpoint in the specified resource group. + * x-ms-original-file: 2025-07-01/PrivateEndpointCreate.json */ async function createPrivateEndpoint(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters: PrivateEndpoint = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.privateEndpoints.createOrUpdate("rg1", "testPe", { + location: "eastus2euap", customNetworkInterfaceName: "testPeNic", ipConfigurations: [ { @@ -27,115 +26,93 @@ async function createPrivateEndpoint(): Promise { }, ], ipVersionType: "IPv4", - location: "eastus2euap", privateLinkServiceConnections: [ { groupIds: ["groupIdFromResource"], privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", requestMessage: "Please approve my connection.", }, ], subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. + * This sample demonstrates how to creates or updates an private endpoint in the specified resource group. * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointCreateWithASG.json + * @summary creates or updates an private endpoint in the specified resource group. + * x-ms-original-file: 2025-07-01/PrivateEndpointCreateForManualApproval.json */ -async function createPrivateEndpointWithApplicationSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters: PrivateEndpoint = { - applicationSecurityGroups: [ +async function createPrivateEndpointWithManualApprovalConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.privateEndpoints.createOrUpdate("rg1", "testPe", { + location: "eastus", + customNetworkInterfaceName: "testPeNic", + ipConfigurations: [ { - id: "/subscriptions/subId/resourceGroups/rg1/provders/Microsoft.Network/applicationSecurityGroup/asg1", + name: "pestaticconfig", + groupId: "file", + memberName: "file", + privateIPAddress: "192.168.0.5", }, ], - location: "eastus2euap", - privateLinkServiceConnections: [ + manualPrivateLinkServiceConnections: [ { groupIds: ["groupIdFromResource"], privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please approve my connection.", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", + requestMessage: "Please manually approve my connection.", }, ], subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. + * This sample demonstrates how to creates or updates an private endpoint in the specified resource group. * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointCreateForManualApproval.json + * @summary creates or updates an private endpoint in the specified resource group. + * x-ms-original-file: 2025-07-01/PrivateEndpointCreateWithASG.json */ -async function createPrivateEndpointWithManualApprovalConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters: PrivateEndpoint = { - customNetworkInterfaceName: "testPeNic", - ipConfigurations: [ +async function createPrivateEndpointWithApplicationSecurityGroups(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.privateEndpoints.createOrUpdate("rg1", "testPe", { + location: "eastus2euap", + applicationSecurityGroups: [ { - name: "pestaticconfig", - groupId: "file", - memberName: "file", - privateIPAddress: "192.168.0.5", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/provders/Microsoft.Network/applicationSecurityGroup/asg1", }, ], - location: "eastus", - manualPrivateLinkServiceConnections: [ + privateLinkServiceConnections: [ { groupIds: ["groupIdFromResource"], privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please manually approve my connection.", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", + requestMessage: "Please approve my connection.", }, ], subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); + }); console.log(result); } async function main(): Promise { await createPrivateEndpoint(); - await createPrivateEndpointWithApplicationSecurityGroups(); await createPrivateEndpointWithManualApprovalConnection(); + await createPrivateEndpointWithApplicationSecurityGroups(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/privateEndpointsDeleteSample.ts b/sdk/network/arm-network/samples-dev/privateEndpointsDeleteSample.ts index d8e88ff3ba70..97653d1d0e4a 100644 --- a/sdk/network/arm-network/samples-dev/privateEndpointsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/privateEndpointsDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified private endpoint. + * This sample demonstrates how to deletes the specified private endpoint. * - * @summary Deletes the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDelete.json + * @summary deletes the specified private endpoint. + * x-ms-original-file: 2025-07-01/PrivateEndpointDelete.json */ async function deletePrivateEndpoint(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginDeleteAndWait( - resourceGroupName, - privateEndpointName, - ); - console.log(result); + await client.privateEndpoints.delete("rg1", "testPe"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/privateEndpointsGetSample.ts b/sdk/network/arm-network/samples-dev/privateEndpointsGetSample.ts index 6ce3c6a11d62..faea43be898c 100644 --- a/sdk/network/arm-network/samples-dev/privateEndpointsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/privateEndpointsGetSample.ts @@ -3,69 +3,53 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified private endpoint by resource group. + * This sample demonstrates how to gets the specified private endpoint by resource group. * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointGet.json + * @summary gets the specified private endpoint by resource group. + * x-ms-original-file: 2025-07-01/PrivateEndpointGet.json */ async function getPrivateEndpoint(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get( - resourceGroupName, - privateEndpointName, - ); + const result = await client.privateEndpoints.get("rg1", "testPe"); console.log(result); } /** - * This sample demonstrates how to Gets the specified private endpoint by resource group. + * This sample demonstrates how to gets the specified private endpoint by resource group. * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointGetWithASG.json + * @summary gets the specified private endpoint by resource group. + * x-ms-original-file: 2025-07-01/PrivateEndpointGetForManualApproval.json */ -async function getPrivateEndpointWithApplicationSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; +async function getPrivateEndpointWithManualApprovalConnection(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get( - resourceGroupName, - privateEndpointName, - ); + const result = await client.privateEndpoints.get("rg1", "testPe"); console.log(result); } /** - * This sample demonstrates how to Gets the specified private endpoint by resource group. + * This sample demonstrates how to gets the specified private endpoint by resource group. * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointGetForManualApproval.json + * @summary gets the specified private endpoint by resource group. + * x-ms-original-file: 2025-07-01/PrivateEndpointGetWithASG.json */ -async function getPrivateEndpointWithManualApprovalConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; +async function getPrivateEndpointWithApplicationSecurityGroups(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get( - resourceGroupName, - privateEndpointName, - ); + const result = await client.privateEndpoints.get("rg1", "testPe"); console.log(result); } async function main(): Promise { await getPrivateEndpoint(); - await getPrivateEndpointWithApplicationSecurityGroups(); await getPrivateEndpointWithManualApprovalConnection(); + await getPrivateEndpointWithApplicationSecurityGroups(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/privateEndpointsListBySubscriptionSample.ts b/sdk/network/arm-network/samples-dev/privateEndpointsListBySubscriptionSample.ts index ce2bf0eca776..d00e52af644a 100644 --- a/sdk/network/arm-network/samples-dev/privateEndpointsListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples-dev/privateEndpointsListBySubscriptionSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all private endpoints in a subscription. + * This sample demonstrates how to gets all private endpoints in a subscription. * - * @summary Gets all private endpoints in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointListAll.json + * @summary gets all private endpoints in a subscription. + * x-ms-original-file: 2025-07-01/PrivateEndpointListAll.json */ async function listAllPrivateEndpoints(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.privateEndpoints.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/privateEndpointsListSample.ts b/sdk/network/arm-network/samples-dev/privateEndpointsListSample.ts index c6a1d95b9f20..4b1ec8c66216 100644 --- a/sdk/network/arm-network/samples-dev/privateEndpointsListSample.ts +++ b/sdk/network/arm-network/samples-dev/privateEndpointsListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all private endpoints in a resource group. + * This sample demonstrates how to gets all private endpoints in a resource group. * - * @summary Gets all private endpoints in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointList.json + * @summary gets all private endpoints in a resource group. + * x-ms-original-file: 2025-07-01/PrivateEndpointList.json */ async function listPrivateEndpointsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.privateEndpoints.list(resourceGroupName)) { + for await (const item of client.privateEndpoints.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts index d9a4527c9e34..bf9dc01a5fb1 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts @@ -1,36 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - CheckPrivateLinkServiceVisibilityRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Checks whether the subscription is visible to private link service in the specified resource group. + * This sample demonstrates how to checks whether the subscription is visible to private link service in the specified resource group. * - * @summary Checks whether the subscription is visible to private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json + * @summary checks whether the subscription is visible to private link service in the specified resource group. + * x-ms-original-file: 2025-07-01/CheckPrivateLinkServiceVisibilityByResourceGroup.json */ async function checkPrivateLinkServiceVisibility(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const parameters: CheckPrivateLinkServiceVisibilityRequest = { - privateLinkServiceAlias: - "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.beginCheckPrivateLinkServiceVisibilityByResourceGroupAndWait( - location, - resourceGroupName, - parameters, - ); + const result = await client.privateLinkServices.checkPrivateLinkServiceVisibilityByResourceGroup( + "rg1", + "westus", + { + privateLinkServiceAlias: + "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts index d06098c30bef..31d484ae0a9d 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts @@ -1,34 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - CheckPrivateLinkServiceVisibilityRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Checks whether the subscription is visible to private link service. + * This sample demonstrates how to checks whether the subscription is visible to private link service. * - * @summary Checks whether the subscription is visible to private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckPrivateLinkServiceVisibility.json + * @summary checks whether the subscription is visible to private link service. + * x-ms-original-file: 2025-07-01/CheckPrivateLinkServiceVisibility.json */ async function checkPrivateLinkServiceVisibility(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const parameters: CheckPrivateLinkServiceVisibilityRequest = { - privateLinkServiceAlias: - "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.beginCheckPrivateLinkServiceVisibilityAndWait( - location, - parameters, - ); + const result = await client.privateLinkServices.checkPrivateLinkServiceVisibility("westus", { + privateLinkServiceAlias: "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesCreateOrUpdateSample.ts index 52e4221af9cf..dc1c370a95f3 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesCreateOrUpdateSample.ts @@ -1,25 +1,21 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - PrivateLinkService} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates an private link service in the specified resource group. + * This sample demonstrates how to creates or updates an private link service in the specified resource group. * - * @summary Creates or updates an private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceCreate.json + * @summary creates or updates an private link service in the specified resource group. + * x-ms-original-file: 2025-07-01/PrivateLinkServiceCreate.json */ async function createPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const parameters: PrivateLinkService = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.privateLinkServices.createOrUpdate("rg1", "testPls", { + location: "eastus", autoApproval: { subscriptions: ["subscription1", "subscription2"] }, fqdns: ["fqdn1", "fqdn2", "fqdn3"], ipConfigurations: [ @@ -29,27 +25,17 @@ async function createPrivateLinkService(): Promise { privateIPAddressVersion: "IPv4", privateIPAllocationMethod: "Static", subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", }, }, ], loadBalancerFrontendIpConfigurations: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", }, ], - location: "eastus", - visibility: { - subscriptions: ["subscription1", "subscription2", "subscription3"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + visibility: { subscriptions: ["subscription1", "subscription2", "subscription3"] }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesDeletePrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesDeletePrivateEndpointConnectionSample.ts index 2432116f703a..fdd3798837d4 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesDeletePrivateEndpointConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesDeletePrivateEndpointConnectionSample.ts @@ -3,28 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete private end point connection for a private link service in a subscription. + * This sample demonstrates how to delete private end point connection for a private link service in a subscription. * - * @summary Delete private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json + * @summary delete private end point connection for a private link service in a subscription. + * x-ms-original-file: 2025-07-01/PrivateLinkServiceDeletePrivateEndpointConnection.json */ async function deletePrivateEndPointConnectionForAPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.beginDeletePrivateEndpointConnectionAndWait( - resourceGroupName, - serviceName, - peConnectionName, - ); - console.log(result); + await client.privateLinkServices.deletePrivateEndpointConnection( + "rg1", + "testPls", + "testPlePeConnection", + ); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesDeleteSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesDeleteSample.ts index 0b33dc2a9309..22d3b5a730f1 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified private link service. + * This sample demonstrates how to deletes the specified private link service. * - * @summary Deletes the specified private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceDelete.json + * @summary deletes the specified private link service. + * x-ms-original-file: 2025-07-01/PrivateLinkServiceDelete.json */ async function deletePrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginDeleteAndWait( - resourceGroupName, - serviceName, - ); - console.log(result); + await client.privateLinkServices.delete("rg1", "testPls"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesGetPrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesGetPrivateEndpointConnectionSample.ts index 86a25b687d4b..5d69368af688 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesGetPrivateEndpointConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesGetPrivateEndpointConnectionSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get the specific private end point connection by specific private link service in the resource group. + * This sample demonstrates how to get the specific private end point connection by specific private link service in the resource group. * - * @summary Get the specific private end point connection by specific private link service in the resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + * @summary get the specific private end point connection by specific private link service in the resource group. + * x-ms-original-file: 2025-07-01/PrivateLinkServiceGetPrivateEndpointConnection.json */ async function getPrivateEndPointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.privateLinkServices.getPrivateEndpointConnection( - resourceGroupName, - serviceName, - peConnectionName, + "rg1", + "testPls", + "testPlePeConnection", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesGetSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesGetSample.ts index e35943be42a9..c6397097862d 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified private link service by resource group. + * This sample demonstrates how to gets the specified private link service by resource group. * - * @summary Gets the specified private link service by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceGet.json + * @summary gets the specified private link service by resource group. + * x-ms-original-file: 2025-07-01/PrivateLinkServiceGet.json */ async function getPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.get( - resourceGroupName, - serviceName, - ); + const result = await client.privateLinkServices.get("rg1", "testPls"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts index 0530889eca3b..807f651acd35 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * This sample demonstrates how to returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. * - * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json + * @summary returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * x-ms-original-file: 2025-07-01/AutoApprovedPrivateLinkServicesResourceGroupGet.json */ async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.privateLinkServices.listAutoApprovedPrivateLinkServicesByResourceGroup( - location, - resourceGroupName, + "rg1", + "regionName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts index 07728ed7867f..e7e5af1b568b 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts @@ -3,25 +3,24 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * This sample demonstrates how to returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. * - * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AutoApprovedPrivateLinkServicesGet.json + * @summary returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * x-ms-original-file: 2025-07-01/AutoApprovedPrivateLinkServicesGet.json */ async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.privateLinkServices.listAutoApprovedPrivateLinkServices( - location, + "regionName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesListBySubscriptionSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesListBySubscriptionSample.ts index 5c67956e6e9c..1e2ab990ca20 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesListBySubscriptionSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all private link service in a subscription. + * This sample demonstrates how to gets all private link service in a subscription. * - * @summary Gets all private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceListAll.json + * @summary gets all private link service in a subscription. + * x-ms-original-file: 2025-07-01/PrivateLinkServiceListAll.json */ async function listAllPrivateListService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.privateLinkServices.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesListPrivateEndpointConnectionsSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesListPrivateEndpointConnectionsSample.ts index 906cfbbf28b6..23cc917018d5 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesListPrivateEndpointConnectionsSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesListPrivateEndpointConnectionsSample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all private end point connections for a specific private link service. + * This sample demonstrates how to gets all private end point connections for a specific private link service. * - * @summary Gets all private end point connections for a specific private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json + * @summary gets all private end point connections for a specific private link service. + * x-ms-original-file: 2025-07-01/PrivateLinkServiceListPrivateEndpointConnection.json */ async function listPrivateLinkServiceInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.privateLinkServices.listPrivateEndpointConnections( - resourceGroupName, - serviceName, + "rg1", + "testPls", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesListSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesListSample.ts index d28bd5e7d293..f5b02655eb7b 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesListSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all private link services in a resource group. + * This sample demonstrates how to gets all private link services in a resource group. * - * @summary Gets all private link services in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceList.json + * @summary gets all private link services in a resource group. + * x-ms-original-file: 2025-07-01/PrivateLinkServiceList.json */ async function listPrivateLinkServiceInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.privateLinkServices.list(resourceGroupName)) { + for await (const item of client.privateLinkServices.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts index eade28955715..ebb5c1c2d6eb 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts @@ -1,44 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - PrivateEndpointConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Approve or reject private end point connection for a private link service in a subscription. + * This sample demonstrates how to approve or reject private end point connection for a private link service in a subscription. * - * @summary Approve or reject private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json + * @summary approve or reject private end point connection for a private link service in a subscription. + * x-ms-original-file: 2025-07-01/PrivateLinkServiceUpdatePrivateEndpointConnection.json */ async function approveOrRejectPrivateEndPointConnectionForAPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const parameters: PrivateEndpointConnection = { - name: "testPlePeConnection", - privateEndpoint: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe", - }, - privateLinkServiceConnectionState: { - description: "approved it for some reason.", - status: "Approved", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.updatePrivateEndpointConnection( - resourceGroupName, - serviceName, - peConnectionName, - parameters, - ); + const result = await client.privateLinkServices.updatePrivateEndpointConnection( + "rg1", + "testPls", + "testPlePeConnection", + { + privateLinkServiceConnectionState: { + description: "approved it for some reason.", + status: "Approved", + }, + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesCreateOrUpdateSample.ts index 6959cb71876e..e5b5784549a0 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesCreateOrUpdateSample.ts @@ -1,137 +1,101 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PublicIPAddress} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. + * This sample demonstrates how to creates or updates a static or dynamic public IP address. * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDns.json + * @summary creates or updates a static or dynamic public IP address. + * x-ms-original-file: 2025-07-01/PublicIpAddressCreateCustomizedValues.json */ -async function createPublicIPAddressDns(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { - dnsSettings: { domainNameLabel: "dnslbl" }, - location: "eastus", - }; +async function createPublicIPAddressAllocationMethod(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); + const result = await client.publicIPAddresses.createOrUpdate("rg1", "test-ip", { + location: "eastus", + idleTimeoutInMinutes: 10, + publicIPAddressVersion: "IPv4", + publicIPAllocationMethod: "Static", + sku: { name: "Standard", tier: "Global" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. + * This sample demonstrates how to creates or updates a static or dynamic public IP address. * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json + * @summary creates or updates a static or dynamic public IP address. + * x-ms-original-file: 2025-07-01/PublicIpAddressCreateDefaults.json */ -async function createPublicIPAddressDnsWithDomainNameLabelScope(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { - dnsSettings: { - domainNameLabel: "dnslbl", - domainNameLabelScope: "TenantReuse", - }, - location: "eastus", - }; +async function createPublicIPAddressDefaults(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); + const result = await client.publicIPAddresses.createOrUpdate("rg1", "test-ip", { + location: "eastus", + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. + * This sample demonstrates how to creates or updates a static or dynamic public IP address. * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateCustomizedValues.json + * @summary creates or updates a static or dynamic public IP address. + * x-ms-original-file: 2025-07-01/PublicIpAddressCreateDefaultsStandardV2Sku.json */ -async function createPublicIPAddressAllocationMethod(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { - idleTimeoutInMinutes: 10, - location: "eastus", - publicIPAddressVersion: "IPv4", - publicIPAllocationMethod: "Static", - sku: { name: "Standard", tier: "Global" }, - }; +async function createPublicIPAddressDefaultsWithStandardV2Sku(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); + const result = await client.publicIPAddresses.createOrUpdate("rg1", "test-ip", { + location: "eastus", + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. + * This sample demonstrates how to creates or updates a static or dynamic public IP address. * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDefaults.json + * @summary creates or updates a static or dynamic public IP address. + * x-ms-original-file: 2025-07-01/PublicIpAddressCreateDns.json */ -async function createPublicIPAddressDefaults(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { location: "eastus" }; +async function createPublicIPAddressDNS(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); + const result = await client.publicIPAddresses.createOrUpdate("rg1", "test-ip", { + location: "eastus", + dnsSettings: { domainNameLabel: "dnslbl" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. + * This sample demonstrates how to creates or updates a static or dynamic public IP address. * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDefaultsStandardV2Sku.json + * @summary creates or updates a static or dynamic public IP address. + * x-ms-original-file: 2025-07-01/PublicIpAddressCreateDnsWithDomainNameLabelScope.json */ -async function createPublicIPAddressDefaultsWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { location: "eastus" }; +async function createPublicIPAddressDNSWithDomainNameLabelScope(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); + const result = await client.publicIPAddresses.createOrUpdate("rg1", "test-ip", { + location: "eastus", + dnsSettings: { domainNameLabel: "dnslbl", domainNameLabelScope: "TenantReuse" }, + }); console.log(result); } async function main(): Promise { - await createPublicIPAddressDns(); - await createPublicIPAddressDnsWithDomainNameLabelScope(); await createPublicIPAddressAllocationMethod(); await createPublicIPAddressDefaults(); await createPublicIPAddressDefaultsWithStandardV2Sku(); + await createPublicIPAddressDNS(); + await createPublicIPAddressDNSWithDomainNameLabelScope(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesDdosProtectionStatusSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesDdosProtectionStatusSample.ts index f855eb3a35f4..7cac92ae1d96 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesDdosProtectionStatusSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesDdosProtectionStatusSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the Ddos Protection Status of a Public IP Address + * This sample demonstrates how to gets the Ddos Protection Status of a Public IP Address * - * @summary Gets the Ddos Protection Status of a Public IP Address - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json + * @summary gets the Ddos Protection Status of a Public IP Address + * x-ms-original-file: 2025-07-01/PublicIpAddressGetDdosProtectionStatus.json */ async function getDdosProtectionStatusOfAPublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-pip"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.beginDdosProtectionStatusAndWait( - resourceGroupName, - publicIpAddressName, - ); + const result = await client.publicIPAddresses.ddosProtectionStatus("rg1", "test-pip"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesDeleteSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesDeleteSample.ts index 6c83f7a80c24..2567ef844b49 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified public IP address. + * This sample demonstrates how to deletes the specified public IP address. * - * @summary Deletes the specified public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressDelete.json + * @summary deletes the specified public IP address. + * x-ms-original-file: 2025-07-01/PublicIpAddressDelete.json */ async function deletePublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginDeleteAndWait( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); + await client.publicIPAddresses.delete("rg1", "test-ip"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts deleted file mode 100644 index fb5169c88d5f..000000000000 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - DisassociateCloudServicePublicIpRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. - * - * @summary Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressDisassociateCloudServiceReservedPublicIp.json - */ -async function disassociatePublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "pip1"; - const parameters: DisassociateCloudServicePublicIpRequest = { - publicIpArmId: - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/publicIpAddresses/pip2", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.beginDisassociateCloudServiceReservedPublicIpAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await disassociatePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesDisassociateCloudServiceReservedPublicIpSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesDisassociateCloudServiceReservedPublicIpSample.ts new file mode 100644 index 000000000000..acecee6083c1 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesDisassociateCloudServiceReservedPublicIpSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. + * + * @summary disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. + * x-ms-original-file: 2025-07-01/PublicIpAddressDisassociateCloudServiceReservedPublicIp.json + */ +async function disassociatePublicIPAddress(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.publicIPAddresses.disassociateCloudServiceReservedPublicIp( + "rg1", + "pip1", + { + publicIpArmId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Network/publicIpAddresses/pip2", + }, + ); + console.log(result); +} + +async function main(): Promise { + await disassociatePublicIPAddress(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIPAddressSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIPAddressSample.ts new file mode 100644 index 000000000000..3a6fe02efa8d --- /dev/null +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIPAddressSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the specified public IP address in a cloud service. + * + * @summary get the specified public IP address in a cloud service. + * x-ms-original-file: 2025-07-01/CloudServicePublicIpGet.json + */ +async function getVmssPublicIP(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.publicIPAddresses.getCloudServicePublicIPAddress( + "cs-tester", + "cs1", + "Test_VM_0", + "nic1", + "ip1", + "pub1", + ); + console.log(result); +} + +async function main(): Promise { + await getVmssPublicIP(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIpaddressSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIpaddressSample.ts deleted file mode 100644 index 5a26b5532649..000000000000 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIpaddressSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified public IP address in a cloud service. - * - * @summary Get the specified public IP address in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServicePublicIpGet.json - */ -async function getVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const roleInstanceName = "Test_VM_0"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const publicIpAddressName = "pub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.getCloudServicePublicIPAddress( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await getVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesGetSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesGetSample.ts index f682b2905437..865ad4a1900e 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesGetSample.ts @@ -3,43 +3,32 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified public IP address in a specified resource group. + * This sample demonstrates how to gets the specified public IP address in a specified resource group. * - * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGet.json + * @summary gets the specified public IP address in a specified resource group. + * x-ms-original-file: 2025-07-01/PublicIpAddressGet.json */ async function getPublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "testDNS-ip"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.get( - resourceGroupName, - publicIpAddressName, - ); + const result = await client.publicIPAddresses.get("rg1", "testDNS-ip"); console.log(result); } /** - * This sample demonstrates how to Gets the specified public IP address in a specified resource group. + * This sample demonstrates how to gets the specified public IP address in a specified resource group. * - * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGetStandardV2Sku.json + * @summary gets the specified public IP address in a specified resource group. + * x-ms-original-file: 2025-07-01/PublicIpAddressGetStandardV2Sku.json */ async function getPublicIPAddressWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "testDNS-ip"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.get( - resourceGroupName, - publicIpAddressName, - ); + const result = await client.publicIPAddresses.get("rg1", "testDNS-ip"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts deleted file mode 100644 index 8112089cf7d5..000000000000 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified public IP address in a virtual machine scale set. - * - * @summary Get the specified public IP address in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssPublicIpGet.json - */ -async function getVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const publicIpAddressName = "pub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.getVirtualMachineScaleSetPublicIPAddress( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await getVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListAllSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListAllSample.ts index 753d8c4f3370..0e92f4114a6d 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the public IP addresses in a subscription. + * This sample demonstrates how to gets all the public IP addresses in a subscription. * - * @summary Gets all the public IP addresses in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressListAll.json + * @summary gets all the public IP addresses in a subscription. + * x-ms-original-file: 2025-07-01/PublicIpAddressListAll.json */ async function listAllPublicIPAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.publicIPAddresses.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIPAddressesSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIPAddressesSample.ts new file mode 100644 index 000000000000..c6c7d661984d --- /dev/null +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIPAddressesSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets information about all public IP addresses on a cloud service level. + * + * @summary gets information about all public IP addresses on a cloud service level. + * x-ms-original-file: 2025-07-01/CloudServicePublicIpListAll.json + */ +async function listVmssPublicIP(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.publicIPAddresses.listCloudServicePublicIPAddresses( + "cs-tester", + "cs1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listVmssPublicIP(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIpaddressesSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIpaddressesSample.ts deleted file mode 100644 index 1c179709a104..000000000000 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIpaddressesSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses on a cloud service level. - * - * @summary Gets information about all public IP addresses on a cloud service level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServicePublicIpListAll.json - */ -async function listVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listCloudServicePublicIPAddresses( - resourceGroupName, - cloudServiceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIPAddressesSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIPAddressesSample.ts new file mode 100644 index 000000000000..31a3a63d36bf --- /dev/null +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIPAddressesSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets information about all public IP addresses in a role instance IP configuration in a cloud service. + * + * @summary gets information about all public IP addresses in a role instance IP configuration in a cloud service. + * x-ms-original-file: 2025-07-01/CloudServiceRoleInstancePublicIpList.json + */ +async function listVmssvmPublicIP(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.publicIPAddresses.listCloudServiceRoleInstancePublicIPAddresses( + "cs-tester", + "cs1", + "Test_VM_0", + "nic1", + "ip1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listVmssvmPublicIP(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts deleted file mode 100644 index 920920e0ff63..000000000000 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * - * @summary Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceRoleInstancePublicIpList.json - */ -async function listVmssvmPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const roleInstanceName = "Test_VM_0"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listCloudServiceRoleInstancePublicIPAddresses( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssvmPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListSample.ts index b864ddc1f79a..0f9117c4ff2f 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all public IP addresses in a resource group. + * This sample demonstrates how to gets all public IP addresses in a resource group. * - * @summary Gets all public IP addresses in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressList.json + * @summary gets all public IP addresses in a resource group. + * x-ms-original-file: 2025-07-01/PublicIpAddressList.json */ async function listResourceGroupPublicIPAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.publicIPAddresses.list(resourceGroupName)) { + for await (const item of client.publicIPAddresses.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts deleted file mode 100644 index 8c0f1685fa9e..000000000000 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses on a virtual machine scale set level. - * - * @summary Gets information about all public IP addresses on a virtual machine scale set level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssPublicIpListAll.json - */ -async function listVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listVirtualMachineScaleSetPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts deleted file mode 100644 index 9c73398e3371..000000000000 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * - * @summary Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssVmPublicIpList.json - */ -async function listVmssvmPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listVirtualMachineScaleSetVMPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssvmPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts deleted file mode 100644 index e42864cbf205..000000000000 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ReserveCloudServicePublicIpAddressRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. - * - * @summary Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressReserve.json - */ -async function reservePublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: ReserveCloudServicePublicIpAddressRequest = { - isRollback: "false", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.beginReserveCloudServicePublicIpAddressAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await reservePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesReserveCloudServicePublicIpAddressSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesReserveCloudServicePublicIpAddressSample.ts new file mode 100644 index 000000000000..a80653c482ab --- /dev/null +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesReserveCloudServicePublicIpAddressSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. + * + * @summary reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. + * x-ms-original-file: 2025-07-01/PublicIpAddressReserve.json + */ +async function reservePublicIPAddress(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.publicIPAddresses.reserveCloudServicePublicIpAddress( + "rg1", + "test-ip", + { isRollback: "false" }, + ); + console.log(result); +} + +async function main(): Promise { + await reservePublicIPAddress(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesUpdateTagsSample.ts index 5b5a2c825d2e..4e170a1d7a46 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates public IP address tags. + * This sample demonstrates how to updates public IP address tags. * - * @summary Updates public IP address tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressUpdateTags.json + * @summary updates public IP address tags. + * x-ms-original-file: 2025-07-01/PublicIpAddressUpdateTags.json */ async function updatePublicIPAddressTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.updateTags( - resourceGroupName, - publicIpAddressName, - parameters, - ); + const result = await client.publicIPAddresses.updateTags("rg1", "test-ip", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesCreateOrUpdateSample.ts index 7980db1d3f61..64b76e61a810 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesCreateOrUpdateSample.ts @@ -1,84 +1,61 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PublicIPPrefix} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. + * This sample demonstrates how to creates or updates a static or dynamic public IP prefix. * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixCreateCustomizedValues.json + * @summary creates or updates a static or dynamic public IP prefix. + * x-ms-original-file: 2025-07-01/PublicIpPrefixCreateCustomizedValues.json */ async function createPublicIPPrefixAllocationMethod(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: PublicIPPrefix = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.publicIPPrefixes.createOrUpdate("rg1", "test-ipprefix", { location: "westus", prefixLength: 30, publicIPAddressVersion: "IPv4", sku: { name: "Standard", tier: "Regional" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. + * This sample demonstrates how to creates or updates a static or dynamic public IP prefix. * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixCreateDefaults.json + * @summary creates or updates a static or dynamic public IP prefix. + * x-ms-original-file: 2025-07-01/PublicIpPrefixCreateDefaults.json */ async function createPublicIPPrefixDefaults(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: PublicIPPrefix = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.publicIPPrefixes.createOrUpdate("rg1", "test-ipprefix", { location: "westus", prefixLength: 30, sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. + * This sample demonstrates how to creates or updates a static or dynamic public IP prefix. * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixCreateDefaultsStandardV2Sku.json + * @summary creates or updates a static or dynamic public IP prefix. + * x-ms-original-file: 2025-07-01/PublicIpPrefixCreateDefaultsStandardV2Sku.json */ async function createPublicIPPrefixDefaultsWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: PublicIPPrefix = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.publicIPPrefixes.createOrUpdate("rg1", "test-ipprefix", { location: "westus", prefixLength: 30, sku: { name: "StandardV2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesDeleteSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesDeleteSample.ts index ec9b4caf6f22..e96d60792f8a 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified public IP prefix. + * This sample demonstrates how to deletes the specified public IP prefix. * - * @summary Deletes the specified public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixDelete.json + * @summary deletes the specified public IP prefix. + * x-ms-original-file: 2025-07-01/PublicIpPrefixDelete.json */ async function deletePublicIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginDeleteAndWait( - resourceGroupName, - publicIpPrefixName, - ); - console.log(result); + await client.publicIPPrefixes.delete("rg1", "test-ipprefix"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesGetSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesGetSample.ts index 84e34d5dd034..3834f8e861af 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesGetSample.ts @@ -3,43 +3,32 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. + * This sample demonstrates how to gets the specified public IP prefix in a specified resource group. * - * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixGet.json + * @summary gets the specified public IP prefix in a specified resource group. + * x-ms-original-file: 2025-07-01/PublicIpPrefixGet.json */ async function getPublicIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.get( - resourceGroupName, - publicIpPrefixName, - ); + const result = await client.publicIPPrefixes.get("rg1", "test-ipprefix"); console.log(result); } /** - * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. + * This sample demonstrates how to gets the specified public IP prefix in a specified resource group. * - * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixGetStandardV2Sku.json + * @summary gets the specified public IP prefix in a specified resource group. + * x-ms-original-file: 2025-07-01/PublicIpPrefixGetStandardV2Sku.json */ async function getPublicIPPrefixWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.get( - resourceGroupName, - publicIpPrefixName, - ); + const result = await client.publicIPPrefixes.get("rg1", "test-ipprefix"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesListAllSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesListAllSample.ts index df742a5f8696..0f611ea57a3f 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the public IP prefixes in a subscription. + * This sample demonstrates how to gets all the public IP prefixes in a subscription. * - * @summary Gets all the public IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixListAll.json + * @summary gets all the public IP prefixes in a subscription. + * x-ms-original-file: 2025-07-01/PublicIpPrefixListAll.json */ async function listAllPublicIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.publicIPPrefixes.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesListSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesListSample.ts index 739a2392e4f1..4bae28bafff9 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesListSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all public IP prefixes in a resource group. + * This sample demonstrates how to gets all public IP prefixes in a resource group. * - * @summary Gets all public IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixList.json + * @summary gets all public IP prefixes in a resource group. + * x-ms-original-file: 2025-07-01/PublicIpPrefixList.json */ async function listResourceGroupPublicIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.publicIPPrefixes.list(resourceGroupName)) { + for await (const item of client.publicIPPrefixes.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesUpdateTagsSample.ts index fe5a14d375e1..07f6fb007594 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates public IP prefix tags. + * This sample demonstrates how to updates public IP prefix tags. * - * @summary Updates public IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixUpdateTags.json + * @summary updates public IP prefix tags. + * x-ms-original-file: 2025-07-01/PublicIpPrefixUpdateTags.json */ async function updatePublicIPPrefixTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.updateTags( - resourceGroupName, - publicIpPrefixName, - parameters, - ); + const result = await client.publicIPPrefixes.updateTags("rg1", "test-ipprefix", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/putBastionShareableLinkSample.ts b/sdk/network/arm-network/samples-dev/putBastionShareableLinkSample.ts index d83e445d66a1..2563236e945c 100644 --- a/sdk/network/arm-network/samples-dev/putBastionShareableLinkSample.ts +++ b/sdk/network/arm-network/samples-dev/putBastionShareableLinkSample.ts @@ -1,53 +1,38 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BastionShareableLinkListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a Bastion Shareable Links for all the VMs specified in the request. + * This sample demonstrates how to creates a Bastion Shareable Links for all the VMs specified in the request. * - * @summary Creates a Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkCreate.json + * @summary creates a Bastion Shareable Links for all the VMs specified in the request. + * x-ms-original-file: 2025-07-01/BastionShareableLinkCreate.json */ -async function createBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest: BastionShareableLinkListRequest = { +async function createBastionShareableLinksForTheRequestVMs(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.putBastionShareableLink("rg1", "bastionhosttenant", { vms: [ { vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", }, }, { vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", }, }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.beginListPutBastionShareableLinkAndWait( - resourceGroupName, - bastionHostName, - bslRequest, - )) { - resArray.push(item); - } - console.log(resArray); + }); + console.log(result); } async function main(): Promise { - await createBastionShareableLinksForTheRequestVMS(); + await createBastionShareableLinksForTheRequestVMs(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsCreateSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsCreateSample.ts index 04e53e5ba4a7..9d9289fe3c8d 100644 --- a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsCreateSample.ts +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsCreateSample.ts @@ -1,52 +1,40 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ReachabilityAnalysisIntent} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates Reachability Analysis Intent. + * This sample demonstrates how to creates Reachability Analysis Intent. * - * @summary Creates Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentPut.json + * @summary creates Reachability Analysis Intent. + * x-ms-original-file: 2025-07-01/ReachabilityAnalysisIntentPut.json */ async function reachabilityAnalysisIntentCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntentName"; - const body: ReachabilityAnalysisIntent = { - properties: { - description: "A sample reachability analysis intent", - destinationResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmDest", - ipTraffic: { - destinationIps: ["10.4.0.1"], - destinationPorts: ["0"], - protocols: ["Any"], - sourceIps: ["10.4.0.0"], - sourcePorts: ["0"], - }, - sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmSrc", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.reachabilityAnalysisIntents.create( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - body, + "rg1", + "testNetworkManager", + "testWorkspace", + "testAnalysisIntentName", + { + properties: { + description: "A sample reachability analysis intent", + destinationResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmDest", + ipTraffic: { + destinationIps: ["10.4.0.1"], + destinationPorts: ["0"], + protocols: ["Any"], + sourceIps: ["10.4.0.0"], + sourcePorts: ["0"], + }, + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmSrc", + }, + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsDeleteSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsDeleteSample.ts index 2afe6be5256a..132e5920896d 100644 --- a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsDeleteSample.ts @@ -3,31 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes Reachability Analysis Intent. + * This sample demonstrates how to deletes Reachability Analysis Intent. * - * @summary Deletes Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentDelete.json + * @summary deletes Reachability Analysis Intent. + * x-ms-original-file: 2025-07-01/ReachabilityAnalysisIntentDelete.json */ async function reachabilityAnalysisIntentDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntent"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.delete( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, + await client.reachabilityAnalysisIntents.delete( + "rg1", + "testNetworkManager", + "testWorkspace", + "testAnalysisIntent", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsGetSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsGetSample.ts index 09a630c81ba2..515e51a41cd0 100644 --- a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsGetSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get the Reachability Analysis Intent. + * This sample demonstrates how to get the Reachability Analysis Intent. * - * @summary Get the Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentGet.json + * @summary get the Reachability Analysis Intent. + * x-ms-original-file: 2025-07-01/ReachabilityAnalysisIntentGet.json */ async function reachabilityAnalysisIntentGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntentName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.reachabilityAnalysisIntents.get( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, + "rg1", + "testNetworkManager", + "testWorkspace", + "testAnalysisIntentName", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsListSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsListSample.ts index 56b2d175e671..72706e48b712 100644 --- a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsListSample.ts +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsListSample.ts @@ -3,31 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets list of Reachability Analysis Intents . + * This sample demonstrates how to gets list of Reachability Analysis Intents . * - * @summary Gets list of Reachability Analysis Intents . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentList.json + * @summary gets list of Reachability Analysis Intents . + * x-ms-original-file: 2025-07-01/ReachabilityAnalysisIntentList.json */ async function reachabilityAnalysisIntentList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testVerifierWorkspace1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.reachabilityAnalysisIntents.list( - resourceGroupName, - networkManagerName, - workspaceName, + "rg1", + "testNetworkManager", + "testVerifierWorkspace1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsCreateSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsCreateSample.ts index dc32272cbf44..804ff9520b63 100644 --- a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsCreateSample.ts +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsCreateSample.ts @@ -1,43 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ReachabilityAnalysisRun} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates Reachability Analysis Runs. + * This sample demonstrates how to creates Reachability Analysis Runs. * - * @summary Creates Reachability Analysis Runs. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunPut.json + * @summary creates Reachability Analysis Runs. + * x-ms-original-file: 2025-07-01/ReachabilityAnalysisRunPut.json */ async function reachabilityAnalysisRunCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRunName"; - const body: ReachabilityAnalysisRun = { - properties: { - description: "A sample reachability analysis run", - intentId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/verifierWorkspaces/testVerifierWorkspace1/reachabilityAnalysisIntents/testReachabilityAnalysisIntenant1", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.reachabilityAnalysisRuns.create( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - body, + "rg1", + "testNetworkManager", + "testWorkspace", + "testAnalysisRunName", + { + properties: { + description: "A sample reachability analysis run", + intentId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/verifierWorkspaces/testVerifierWorkspace1/reachabilityAnalysisIntents/testReachabilityAnalysisIntenant1", + }, + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsDeleteSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsDeleteSample.ts index 6a632dc0c29e..eed4c979d1a2 100644 --- a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsDeleteSample.ts @@ -3,31 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes Reachability Analysis Run. + * This sample demonstrates how to deletes Reachability Analysis Run. * - * @summary Deletes Reachability Analysis Run. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunDelete.json + * @summary deletes Reachability Analysis Run. + * x-ms-original-file: 2025-07-01/ReachabilityAnalysisRunDelete.json */ async function reachabilityAnalysisRunDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRun"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, + await client.reachabilityAnalysisRuns.delete( + "rg1", + "testNetworkManager", + "testWorkspace", + "testAnalysisRun", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsGetSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsGetSample.ts index 0914eed46132..24750f8b9991 100644 --- a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsGetSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets Reachability Analysis Run. + * This sample demonstrates how to gets Reachability Analysis Run. * - * @summary Gets Reachability Analysis Run. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunGet.json + * @summary gets Reachability Analysis Run. + * x-ms-original-file: 2025-07-01/ReachabilityAnalysisRunGet.json */ async function reachabilityAnalysisRunGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRunName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.reachabilityAnalysisRuns.get( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, + "rg1", + "testNetworkManager", + "testWorkspace", + "testAnalysisRunName", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsListSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsListSample.ts index 5b436c29ec75..f2f2bb0b4cab 100644 --- a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsListSample.ts +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsListSample.ts @@ -3,31 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets list of Reachability Analysis Runs. + * This sample demonstrates how to gets list of Reachability Analysis Runs. * - * @summary Gets list of Reachability Analysis Runs. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunList.json + * @summary gets list of Reachability Analysis Runs. + * x-ms-original-file: 2025-07-01/ReachabilityAnalysisRunList.json */ async function reachabilityAnalysisRunList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testVerifierWorkspace1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.reachabilityAnalysisRuns.list( - resourceGroupName, - networkManagerName, - workspaceName, + "rg1", + "testNetworkManager", + "testVerifierWorkspace1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/resourceNavigationLinksListSample.ts b/sdk/network/arm-network/samples-dev/resourceNavigationLinksListSample.ts index 54db045ec990..fbc1287530c4 100644 --- a/sdk/network/arm-network/samples-dev/resourceNavigationLinksListSample.ts +++ b/sdk/network/arm-network/samples-dev/resourceNavigationLinksListSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a list of resource navigation links for a subnet. + * This sample demonstrates how to gets a list of resource navigation links for a subnet. * - * @summary Gets a list of resource navigation links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json + * @summary gets a list of resource navigation links for a subnet. + * x-ms-original-file: 2025-07-01/VirtualNetworkGetResourceNavigationLinks.json */ async function getResourceNavigationLinks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnet"; - const subnetName = "subnet"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.resourceNavigationLinks.list( - resourceGroupName, - virtualNetworkName, - subnetName, - ); + const result = await client.resourceNavigationLinks.list("rg1", "vnet", "subnet"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routeFilterRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routeFilterRulesCreateOrUpdateSample.ts index ea40a626ecad..71f5b60f6f0c 100644 --- a/sdk/network/arm-network/samples-dev/routeFilterRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFilterRulesCreateOrUpdateSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { RouteFilterRule} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a route in the specified route filter. + * This sample demonstrates how to creates or updates a route in the specified route filter. * - * @summary Creates or updates a route in the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleCreate.json + * @summary creates or updates a route in the specified route filter. + * x-ms-original-file: 2025-07-01/RouteFilterRuleCreate.json */ async function routeFilterRuleCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "ruleName"; - const routeFilterRuleParameters: RouteFilterRule = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.routeFilterRules.createOrUpdate("rg1", "filterName", "ruleName", { access: "Allow", communities: ["12076:5030", "12076:5040"], routeFilterRuleType: "Community", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.beginCreateOrUpdateAndWait( - resourceGroupName, - routeFilterName, - ruleName, - routeFilterRuleParameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routeFilterRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/routeFilterRulesDeleteSample.ts index 0465d8ffc488..03ab39749a4b 100644 --- a/sdk/network/arm-network/samples-dev/routeFilterRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFilterRulesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified rule from a route filter. + * This sample demonstrates how to deletes the specified rule from a route filter. * - * @summary Deletes the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleDelete.json + * @summary deletes the specified rule from a route filter. + * x-ms-original-file: 2025-07-01/RouteFilterRuleDelete.json */ async function routeFilterRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "ruleName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.beginDeleteAndWait( - resourceGroupName, - routeFilterName, - ruleName, - ); - console.log(result); + await client.routeFilterRules.delete("rg1", "filterName", "ruleName"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/routeFilterRulesGetSample.ts b/sdk/network/arm-network/samples-dev/routeFilterRulesGetSample.ts index 47d983f2ef90..78da99378ae5 100644 --- a/sdk/network/arm-network/samples-dev/routeFilterRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFilterRulesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified rule from a route filter. + * This sample demonstrates how to gets the specified rule from a route filter. * - * @summary Gets the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleGet.json + * @summary gets the specified rule from a route filter. + * x-ms-original-file: 2025-07-01/RouteFilterRuleGet.json */ async function routeFilterRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "filterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.get( - resourceGroupName, - routeFilterName, - ruleName, - ); + const result = await client.routeFilterRules.get("rg1", "filterName", "filterName"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routeFilterRulesListByRouteFilterSample.ts b/sdk/network/arm-network/samples-dev/routeFilterRulesListByRouteFilterSample.ts index b25edaefeb2c..c22c99851116 100644 --- a/sdk/network/arm-network/samples-dev/routeFilterRulesListByRouteFilterSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFilterRulesListByRouteFilterSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all RouteFilterRules in a route filter. + * This sample demonstrates how to gets all RouteFilterRules in a route filter. * - * @summary Gets all RouteFilterRules in a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleListByRouteFilter.json + * @summary gets all RouteFilterRules in a route filter. + * x-ms-original-file: 2025-07-01/RouteFilterRuleListByRouteFilter.json */ async function routeFilterRuleListByRouteFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.routeFilterRules.listByRouteFilter( - resourceGroupName, - routeFilterName, - )) { + for await (const item of client.routeFilterRules.listByRouteFilter("rg1", "filterName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/routeFiltersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersCreateOrUpdateSample.ts index 8e23d6e9e3fd..e4d39043e726 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersCreateOrUpdateSample.ts @@ -1,22 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { RouteFilter} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a route filter in a specified resource group. + * This sample demonstrates how to creates or updates a route filter in a specified resource group. * - * @summary Creates or updates a route filter in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterCreate.json + * @summary creates or updates a route filter in a specified resource group. + * x-ms-original-file: 2025-07-01/RouteFilterCreate.json */ async function routeFilterCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const routeFilterParameters: RouteFilter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.routeFilters.createOrUpdate("rg1", "filterName", { location: "West US", rules: [ { @@ -27,14 +25,7 @@ async function routeFilterCreate(): Promise { }, ], tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.beginCreateOrUpdateAndWait( - resourceGroupName, - routeFilterName, - routeFilterParameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routeFiltersDeleteSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersDeleteSample.ts index 17ffc25d9266..e6181c40f4df 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified route filter. + * This sample demonstrates how to deletes the specified route filter. * - * @summary Deletes the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterDelete.json + * @summary deletes the specified route filter. + * x-ms-original-file: 2025-07-01/RouteFilterDelete.json */ async function routeFilterDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.beginDeleteAndWait( - resourceGroupName, - routeFilterName, - ); - console.log(result); + await client.routeFilters.delete("rg1", "filterName"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/routeFiltersGetSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersGetSample.ts index ba24c899b6a1..0c925b367280 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified route filter. + * This sample demonstrates how to gets the specified route filter. * - * @summary Gets the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterGet.json + * @summary gets the specified route filter. + * x-ms-original-file: 2025-07-01/RouteFilterGet.json */ async function routeFilterGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.get( - resourceGroupName, - routeFilterName, - ); + const result = await client.routeFilters.get("rg1", "filterName"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routeFiltersListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersListByResourceGroupSample.ts index b76a48a1030c..ffad1f7cc14e 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all route filters in a resource group. + * This sample demonstrates how to gets all route filters in a resource group. * - * @summary Gets all route filters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterListByResourceGroup.json + * @summary gets all route filters in a resource group. + * x-ms-original-file: 2025-07-01/RouteFilterListByResourceGroup.json */ async function routeFilterListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.routeFilters.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.routeFilters.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/routeFiltersListSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersListSample.ts index 66b0bae4cefd..deca6ce41435 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersListSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all route filters in a subscription. + * This sample demonstrates how to gets all route filters in a subscription. * - * @summary Gets all route filters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterList.json + * @summary gets all route filters in a subscription. + * x-ms-original-file: 2025-07-01/RouteFilterList.json */ async function routeFilterList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.routeFilters.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/routeFiltersUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersUpdateTagsSample.ts index 1d9b664869ac..d0d24a336702 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates tags of a route filter. + * This sample demonstrates how to updates tags of a route filter. * - * @summary Updates tags of a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterUpdateTags.json + * @summary updates tags of a route filter. + * x-ms-original-file: 2025-07-01/RouteFilterUpdateTags.json */ async function updateRouteFilterTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const parameters: TagsObject = { tags: { key1: "value1" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.updateTags( - resourceGroupName, - routeFilterName, - parameters, - ); + const result = await client.routeFilters.updateTags("rg1", "filterName", { + tags: { key1: "value1" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routeMapsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routeMapsCreateOrUpdateSample.ts index fe6cfdc60516..6703424c998f 100644 --- a/sdk/network/arm-network/samples-dev/routeMapsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routeMapsCreateOrUpdateSample.ts @@ -1,56 +1,37 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { RouteMap} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a RouteMap if it doesn't exist else updates the existing one. + * This sample demonstrates how to creates a RouteMap if it doesn't exist else updates the existing one. * - * @summary Creates a RouteMap if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapPut.json + * @summary creates a RouteMap if it doesn't exist else updates the existing one. + * x-ms-original-file: 2025-07-01/RouteMapPut.json */ async function routeMapPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const routeMapParameters: RouteMap = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.routeMaps.createOrUpdate("rg1", "virtualHub1", "routeMap1", { associatedInboundConnections: [ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGateway1/expressRouteConnections/exrConn1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGateway1/expressRouteConnections/exrConn1", ], associatedOutboundConnections: [], rules: [ { name: "rule1", actions: [ - { - type: "Add", - parameters: [{ asPath: ["22334"], community: [], routePrefix: [] }], - }, + { type: "Add", parameters: [{ asPath: ["22334"], community: [], routePrefix: [] }] }, ], matchCriteria: [ - { - asPath: [], - community: [], - matchCondition: "Contains", - routePrefix: ["10.0.0.0/8"], - }, + { asPath: [], community: [], matchCondition: "Contains", routePrefix: ["10.0.0.0/8"] }, ], nextStepIfMatched: "Continue", }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeMapName, - routeMapParameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routeMapsDeleteSample.ts b/sdk/network/arm-network/samples-dev/routeMapsDeleteSample.ts index e0642e9627f8..ae73b9c7e5d2 100644 --- a/sdk/network/arm-network/samples-dev/routeMapsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routeMapsDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a RouteMap. + * This sample demonstrates how to deletes a RouteMap. * - * @summary Deletes a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapDelete.json + * @summary deletes a RouteMap. + * x-ms-original-file: 2025-07-01/RouteMapDelete.json */ async function routeMapDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeMapName, - ); - console.log(result); + await client.routeMaps.delete("rg1", "virtualHub1", "routeMap1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/routeMapsGetSample.ts b/sdk/network/arm-network/samples-dev/routeMapsGetSample.ts index 7ff0f5e92df3..fa315e8cbe84 100644 --- a/sdk/network/arm-network/samples-dev/routeMapsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routeMapsGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a RouteMap. + * This sample demonstrates how to retrieves the details of a RouteMap. * - * @summary Retrieves the details of a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapGet.json + * @summary retrieves the details of a RouteMap. + * x-ms-original-file: 2025-07-01/RouteMapGet.json */ async function routeMapGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.get( - resourceGroupName, - virtualHubName, - routeMapName, - ); + const result = await client.routeMaps.get("rg1", "virtualHub1", "routeMap1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routeMapsListSample.ts b/sdk/network/arm-network/samples-dev/routeMapsListSample.ts index 03c6cd349336..d5b736d709e5 100644 --- a/sdk/network/arm-network/samples-dev/routeMapsListSample.ts +++ b/sdk/network/arm-network/samples-dev/routeMapsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of all RouteMaps. + * This sample demonstrates how to retrieves the details of all RouteMaps. * - * @summary Retrieves the details of all RouteMaps. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapList.json + * @summary retrieves the details of all RouteMaps. + * x-ms-original-file: 2025-07-01/RouteMapList.json */ async function routeMapList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.routeMaps.list( - resourceGroupName, - virtualHubName, - )) { + for await (const item of client.routeMaps.list("rg1", "virtualHub1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/routeTablesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routeTablesCreateOrUpdateSample.ts index c450a33fee2e..11d59bfbced5 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesCreateOrUpdateSample.ts @@ -1,65 +1,87 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { RouteTable} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create or updates a route table in a specified resource group. + * This sample demonstrates how to create or updates a route table in a specified resource group. * - * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableCreate.json + * @summary create or updates a route table in a specified resource group. + * x-ms-original-file: 2025-07-01/RouteTableCreate.json */ async function createRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters: RouteTable = { location: "westus" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - parameters, - ); + const result = await client.routeTables.createOrUpdate("rg1", "testrt", { location: "westus" }); console.log(result); } /** - * This sample demonstrates how to Create or updates a route table in a specified resource group. + * This sample demonstrates how to create or updates a route table in a specified resource group. * - * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableCreateWithRoute.json + * @summary create or updates a route table in a specified resource group. + * x-ms-original-file: 2025-07-01/RouteTableCreateWithDisablePeeringRoute.json */ -async function createRouteTableWithRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters: RouteTable = { +async function createRouteTableWithDisablePeeringRoute(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.routeTables.createOrUpdate("rg1", "testrt", { + location: "westus", disableBgpRoutePropagation: true, + disablePeeringRoute: "All", + }); + console.log(result); +} + +/** + * This sample demonstrates how to create or updates a route table in a specified resource group. + * + * @summary create or updates a route table in a specified resource group. + * x-ms-original-file: 2025-07-01/RouteTableCreateWithEcmpRoute.json + */ +async function createRouteTableWithEcmpRoute(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.routeTables.createOrUpdate("rg1", "testrt-ecmp", { location: "westus", + disableBgpRoutePropagation: false, routes: [ { - name: "route1", - addressPrefix: "10.0.3.0/24", - nextHopType: "VirtualNetworkGateway", + addressPrefix: "10.1.0.0/16", + nextHopType: "VirtualApplianceEcmp", + nextHop: { nextHopIpAddresses: ["10.0.0.4", "10.0.0.5", "10.0.0.6"] }, }, ], - }; + }); + console.log(result); +} + +/** + * This sample demonstrates how to create or updates a route table in a specified resource group. + * + * @summary create or updates a route table in a specified resource group. + * x-ms-original-file: 2025-07-01/RouteTableCreateWithRoute.json + */ +async function createRouteTableWithRoute(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - parameters, - ); + const result = await client.routeTables.createOrUpdate("rg1", "testrt", { + location: "westus", + disableBgpRoutePropagation: true, + routes: [{ addressPrefix: "10.0.3.0/24", nextHopType: "VirtualNetworkGateway" }], + }); console.log(result); } async function main(): Promise { await createRouteTable(); + await createRouteTableWithDisablePeeringRoute(); + await createRouteTableWithEcmpRoute(); await createRouteTableWithRoute(); } diff --git a/sdk/network/arm-network/samples-dev/routeTablesDeleteSample.ts b/sdk/network/arm-network/samples-dev/routeTablesDeleteSample.ts index b538f991cbac..1135a8ac1ac5 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified route table. + * This sample demonstrates how to deletes the specified route table. * - * @summary Deletes the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableDelete.json + * @summary deletes the specified route table. + * x-ms-original-file: 2025-07-01/RouteTableDelete.json */ async function deleteRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginDeleteAndWait( - resourceGroupName, - routeTableName, - ); - console.log(result); + await client.routeTables.delete("rg1", "testrt"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/routeTablesGetSample.ts b/sdk/network/arm-network/samples-dev/routeTablesGetSample.ts index ab338d52e6fc..3387082cf569 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified route table. + * This sample demonstrates how to gets the specified route table. * - * @summary Gets the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableGet.json + * @summary gets the specified route table. + * x-ms-original-file: 2025-07-01/RouteTableGet.json */ async function getRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.get( - resourceGroupName, - routeTableName, - ); + const result = await client.routeTables.get("rg1", "testrt"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routeTablesListAllSample.ts b/sdk/network/arm-network/samples-dev/routeTablesListAllSample.ts index 07ddc8dd7613..792e35f62ea2 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all route tables in a subscription. + * This sample demonstrates how to gets all route tables in a subscription. * - * @summary Gets all route tables in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableListAll.json + * @summary gets all route tables in a subscription. + * x-ms-original-file: 2025-07-01/RouteTableListAll.json */ async function listAllRouteTables(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.routeTables.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/routeTablesListSample.ts b/sdk/network/arm-network/samples-dev/routeTablesListSample.ts index 55dcf32c0f24..0af2a04f2e53 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesListSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all route tables in a resource group. + * This sample demonstrates how to gets all route tables in a resource group. * - * @summary Gets all route tables in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableList.json + * @summary gets all route tables in a resource group. + * x-ms-original-file: 2025-07-01/RouteTableList.json */ async function listRouteTablesInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.routeTables.list(resourceGroupName)) { + for await (const item of client.routeTables.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/routeTablesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/routeTablesUpdateTagsSample.ts index 5bb61621fd87..2f800e36c9b3 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a route table tags. + * This sample demonstrates how to updates a route table tags. * - * @summary Updates a route table tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableUpdateTags.json + * @summary updates a route table tags. + * x-ms-original-file: 2025-07-01/RouteTableUpdateTags.json */ async function updateRouteTableTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.updateTags( - resourceGroupName, - routeTableName, - parameters, - ); + const result = await client.routeTables.updateTags("rg1", "testrt", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routesCreateOrUpdateSample.ts index a30a922dd43c..b78d14c6a3bb 100644 --- a/sdk/network/arm-network/samples-dev/routesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routesCreateOrUpdateSample.ts @@ -1,39 +1,47 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Route} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a route in the specified route table. + * This sample demonstrates how to creates or updates a route in the specified route table. * - * @summary Creates or updates a route in the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteCreate.json + * @summary creates or updates a route in the specified route table. + * x-ms-original-file: 2025-07-01/RouteTableRouteCreate.json */ async function createRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const routeParameters: Route = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.routes.createOrUpdate("rg1", "testrt", "route1", { addressPrefix: "10.0.3.0/24", nextHopType: "VirtualNetworkGateway", - }; + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates a route in the specified route table. + * + * @summary creates or updates a route in the specified route table. + * x-ms-original-file: 2025-07-01/RouteTableRouteCreateEcmp.json + */ +async function createEcmpRoute(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - routeName, - routeParameters, - ); + const result = await client.routes.createOrUpdate("rg1", "testrt", "ecmp-route", { + addressPrefix: "10.1.0.0/16", + nextHopType: "VirtualApplianceEcmp", + nextHop: { nextHopIpAddresses: ["10.0.0.4", "10.0.0.5", "10.0.0.6"] }, + }); console.log(result); } async function main(): Promise { await createRoute(); + await createEcmpRoute(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/routesDeleteSample.ts b/sdk/network/arm-network/samples-dev/routesDeleteSample.ts index 6d85eaa86402..7886c650c968 100644 --- a/sdk/network/arm-network/samples-dev/routesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified route from a route table. + * This sample demonstrates how to deletes the specified route from a route table. * - * @summary Deletes the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteDelete.json + * @summary deletes the specified route from a route table. + * x-ms-original-file: 2025-07-01/RouteTableRouteDelete.json */ async function deleteRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.beginDeleteAndWait( - resourceGroupName, - routeTableName, - routeName, - ); - console.log(result); + await client.routes.delete("rg1", "testrt", "route1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/routesGetSample.ts b/sdk/network/arm-network/samples-dev/routesGetSample.ts index 0d9a91856ac6..4a0232d0cccb 100644 --- a/sdk/network/arm-network/samples-dev/routesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified route from a route table. + * This sample demonstrates how to gets the specified route from a route table. * - * @summary Gets the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteGet.json + * @summary gets the specified route from a route table. + * x-ms-original-file: 2025-07-01/RouteTableRouteGet.json */ async function getRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.get( - resourceGroupName, - routeTableName, - routeName, - ); + const result = await client.routes.get("rg1", "testrt", "route1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routesListSample.ts b/sdk/network/arm-network/samples-dev/routesListSample.ts index 301305ae773a..3901ed9a3d66 100644 --- a/sdk/network/arm-network/samples-dev/routesListSample.ts +++ b/sdk/network/arm-network/samples-dev/routesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all routes in a route table. + * This sample demonstrates how to gets all routes in a route table. * - * @summary Gets all routes in a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteList.json + * @summary gets all routes in a route table. + * x-ms-original-file: 2025-07-01/RouteTableRouteList.json */ async function listRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.routes.list( - resourceGroupName, - routeTableName, - )) { + for await (const item of client.routes.list("rg1", "testrt")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/routingIntentCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routingIntentCreateOrUpdateSample.ts index 49ba4274d704..f1d03d6dea4d 100644 --- a/sdk/network/arm-network/samples-dev/routingIntentCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routingIntentCreateOrUpdateSample.ts @@ -1,47 +1,35 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { RoutingIntent} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. + * This sample demonstrates how to creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. * - * @summary Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentPut.json + * @summary creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. + * x-ms-original-file: 2025-07-01/RoutingIntentPut.json */ async function routeTablePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const routingIntentParameters: RoutingIntent = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.routingIntent.createOrUpdate("rg1", "virtualHub1", "Intent1", { routingPolicies: [ { name: "InternetTraffic", destinations: ["Internet"], nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", }, { name: "PrivateTrafficPolicy", destinations: ["PrivateTraffic"], nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.routingIntentOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routingIntentName, - routingIntentParameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routingIntentDeleteSample.ts b/sdk/network/arm-network/samples-dev/routingIntentDeleteSample.ts index f7e9bbe0a286..15b89a42f60f 100644 --- a/sdk/network/arm-network/samples-dev/routingIntentDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routingIntentDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a RoutingIntent. + * This sample demonstrates how to deletes a RoutingIntent. * - * @summary Deletes a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentDelete.json + * @summary deletes a RoutingIntent. + * x-ms-original-file: 2025-07-01/RoutingIntentDelete.json */ async function routeTableDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routingIntentName, - ); - console.log(result); + await client.routingIntent.delete("rg1", "virtualHub1", "Intent1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/routingIntentGetSample.ts b/sdk/network/arm-network/samples-dev/routingIntentGetSample.ts index 8fe1d2b41d51..5cfe8bd94d38 100644 --- a/sdk/network/arm-network/samples-dev/routingIntentGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routingIntentGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a RoutingIntent. + * This sample demonstrates how to retrieves the details of a RoutingIntent. * - * @summary Retrieves the details of a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentGet.json + * @summary retrieves the details of a RoutingIntent. + * x-ms-original-file: 2025-07-01/RoutingIntentGet.json */ async function routeTableGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.get( - resourceGroupName, - virtualHubName, - routingIntentName, - ); + const result = await client.routingIntent.get("rg1", "virtualHub1", "Intent1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routingIntentListSample.ts b/sdk/network/arm-network/samples-dev/routingIntentListSample.ts index 8b6b09c31f73..b0d2f7a36c1f 100644 --- a/sdk/network/arm-network/samples-dev/routingIntentListSample.ts +++ b/sdk/network/arm-network/samples-dev/routingIntentListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of all RoutingIntent child resources of the VirtualHub. + * This sample demonstrates how to retrieves the details of all RoutingIntent child resources of the VirtualHub. * - * @summary Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentList.json + * @summary retrieves the details of all RoutingIntent child resources of the VirtualHub. + * x-ms-original-file: 2025-07-01/RoutingIntentList.json */ async function routingIntentList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.routingIntentOperations.list( - resourceGroupName, - virtualHubName, - )) { + for await (const item of client.routingIntent.list("rg1", "virtualHub1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/routingRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routingRuleCollectionsCreateOrUpdateSample.ts index 9981cb1575d2..ad6546831f6e 100644 --- a/sdk/network/arm-network/samples-dev/routingRuleCollectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRuleCollectionsCreateOrUpdateSample.ts @@ -1,45 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - RoutingRuleCollection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a routing rule collection. + * This sample demonstrates how to creates or updates a routing rule collection. * - * @summary Creates or updates a routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json + * @summary creates or updates a routing rule collection. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingRuleCollectionPut.json */ async function createOrUpdateARoutingRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleCollection: RoutingRuleCollection = { - description: "A sample policy", - appliesTo: [ - { - networkGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.routingRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, + "rg1", + "testNetworkManager", + "myTestRoutingConfig", + "testRuleCollection", + { + description: "A sample policy", + appliesTo: [ + { + networkGroupId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", + }, + ], + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routingRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/routingRuleCollectionsDeleteSample.ts index f47a10be498c..0795e2f7d6ad 100644 --- a/sdk/network/arm-network/samples-dev/routingRuleCollectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRuleCollectionsDeleteSample.ts @@ -3,31 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes an routing rule collection. + * This sample demonstrates how to deletes an routing rule collection. * - * @summary Deletes an routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json + * @summary deletes an routing rule collection. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingRuleCollectionDelete.json */ async function deletesAnRoutingRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, + await client.routingRuleCollections.delete( + "rg1", + "testNetworkManager", + "myTestRoutingConfig", + "testRuleCollection", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/routingRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples-dev/routingRuleCollectionsGetSample.ts index 8bfba9994944..e491fbda3bef 100644 --- a/sdk/network/arm-network/samples-dev/routingRuleCollectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRuleCollectionsGetSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a network manager routing configuration rule collection. + * This sample demonstrates how to gets a network manager routing configuration rule collection. * - * @summary Gets a network manager routing configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json + * @summary gets a network manager routing configuration rule collection. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingRuleCollectionGet.json */ async function getsRoutingRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.routingRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, + "rg1", + "testNetworkManager", + "myTestRoutingConfig", + "testRuleCollection", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routingRuleCollectionsListSample.ts b/sdk/network/arm-network/samples-dev/routingRuleCollectionsListSample.ts index 75e062e35caa..e227b8303505 100644 --- a/sdk/network/arm-network/samples-dev/routingRuleCollectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRuleCollectionsListSample.ts @@ -3,31 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the rule collections in a routing configuration, in a paginated format. + * This sample demonstrates how to lists all the rule collections in a routing configuration, in a paginated format. * - * @summary Lists all the rule collections in a routing configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionList.json + * @summary lists all the rule collections in a routing configuration, in a paginated format. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingRuleCollectionList.json */ async function listRoutingRuleCollections(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.routingRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, + "rg1", + "testNetworkManager", + "myTestRoutingConfig", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/routingRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routingRulesCreateOrUpdateSample.ts index d2524802b95c..c8d89f42051e 100644 --- a/sdk/network/arm-network/samples-dev/routingRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRulesCreateOrUpdateSample.ts @@ -1,80 +1,62 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { RoutingRule} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates an routing rule. + * This sample demonstrates how to creates or updates an routing rule. * - * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRulePut.json + * @summary creates or updates an routing rule. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingRulePut.json */ -async function createADefaultRoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const routingRule: RoutingRule = { - description: "This is Sample Routing Rule", - destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, - nextHop: { nextHopType: "VirtualNetworkGateway" }, - }; +async function createAnRoutingRule(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.routingRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - routingRule, + "rg1", + "testNetworkManager", + "myTestRoutingConfig", + "testRuleCollection", + "SampleRoutingRule", + { + description: "This is Sample Routing Rule", + destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, + nextHop: { nextHopType: "VirtualNetworkGateway" }, + }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates an routing rule. + * This sample demonstrates how to creates or updates an routing rule. * - * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRulePut.json + * @summary creates or updates an routing rule. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingRulePutEcmp.json */ -async function createAnRoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const routingRule: RoutingRule = { - description: "This is Sample Routing Rule", - destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, - nextHop: { nextHopType: "VirtualNetworkGateway" }, - }; +async function createAnEcmpRoutingRule(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.routingRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - routingRule, + "rg1", + "testNetworkManager", + "myTestRoutingConfig", + "testRuleCollection", + "SampleEcmpRoutingRule", + { + description: "This is a sample ECMP routing rule with multiple next hop IP addresses", + destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, + nextHop: { nextHopType: "VirtualAppliance", nextHopAddress: "10.1.0.4,10.1.0.5,10.1.0.6" }, + }, ); console.log(result); } async function main(): Promise { - await createADefaultRoutingRule(); await createAnRoutingRule(); + await createAnEcmpRoutingRule(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/routingRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/routingRulesDeleteSample.ts index 693fd97d853b..284115aec07e 100644 --- a/sdk/network/arm-network/samples-dev/routingRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRulesDeleteSample.ts @@ -1,42 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - RoutingRulesDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a routing rule. + * This sample demonstrates how to deletes a routing rule. * - * @summary Deletes a routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleDelete.json + * @summary deletes a routing rule. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingRuleDelete.json */ async function deletesARoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "sampleRule"; - const force = false; - const options: RoutingRulesDeleteOptionalParams = { force }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, + await client.routingRules.delete( + "rg1", + "testNetworkManager", + "myTestRoutingConfig", + "testRuleCollection", + "sampleRule", + { force: false }, ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/routingRulesGetSample.ts b/sdk/network/arm-network/samples-dev/routingRulesGetSample.ts index 92351663fae2..6de7c14117be 100644 --- a/sdk/network/arm-network/samples-dev/routingRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRulesGetSample.ts @@ -3,31 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a network manager routing configuration routing rule. + * This sample demonstrates how to gets a network manager routing configuration routing rule. * - * @summary Gets a network manager routing configuration routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleGet.json + * @summary gets a network manager routing configuration routing rule. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingRuleGet.json */ async function getsRoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.routingRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + "SampleRoutingRule", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/routingRulesListSample.ts b/sdk/network/arm-network/samples-dev/routingRulesListSample.ts index ba98d93ab74f..4dda67a3c33a 100644 --- a/sdk/network/arm-network/samples-dev/routingRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRulesListSample.ts @@ -3,33 +3,27 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all network manager routing configuration routing rules. + * This sample demonstrates how to list all network manager routing configuration routing rules. * - * @summary List all network manager routing configuration routing rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleList.json + * @summary list all network manager routing configuration routing rules. + * x-ms-original-file: 2025-07-01/NetworkManagerRoutingRuleList.json */ async function listRoutingRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.routingRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, + "rg1", + "testNetworkManager", + "myTestRoutingConfig", + "testRuleCollection", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/scopeConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/scopeConnectionsCreateOrUpdateSample.ts index dfd13e2daf15..f7021b90cb7c 100644 --- a/sdk/network/arm-network/samples-dev/scopeConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/scopeConnectionsCreateOrUpdateSample.ts @@ -1,36 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { ScopeConnection} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates scope connection from Network Manager + * This sample demonstrates how to creates or updates scope connection from Network Manager * - * @summary Creates or updates scope connection from Network Manager - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionPut.json + * @summary creates or updates scope connection from Network Manager + * x-ms-original-file: 2025-07-01/NetworkManagerScopeConnectionPut.json */ async function createOrUpdateNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const parameters: ScopeConnection = { - description: "This is a scope connection to a cross tenant subscription.", - resourceId: "subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b", - tenantId: "6babcaad-604b-40ac-a9d7-9fd97c0b779f", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.scopeConnections.createOrUpdate( - resourceGroupName, - networkManagerName, - scopeConnectionName, - parameters, + "rg1", + "testNetworkManager", + "TestScopeConnection", + { + description: "This is a scope connection to a cross tenant subscription.", + resourceId: "subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b", + tenantId: "6babcaad-604b-40ac-a9d7-9fd97c0b779f", + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/scopeConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/scopeConnectionsDeleteSample.ts index 55391e39580b..e85cda9f7a90 100644 --- a/sdk/network/arm-network/samples-dev/scopeConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/scopeConnectionsDeleteSample.ts @@ -3,29 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the pending scope connection created by this network manager. + * This sample demonstrates how to delete the pending scope connection created by this network manager. * - * @summary Delete the pending scope connection created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionDelete.json + * @summary delete the pending scope connection created by this network manager. + * x-ms-original-file: 2025-07-01/NetworkManagerScopeConnectionDelete.json */ async function deleteNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.delete( - resourceGroupName, - networkManagerName, - scopeConnectionName, - ); - console.log(result); + await client.scopeConnections.delete("rg1", "testNetworkManager", "TestScopeConnection"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/scopeConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/scopeConnectionsGetSample.ts index abd0ed54d6ae..359560d8b108 100644 --- a/sdk/network/arm-network/samples-dev/scopeConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/scopeConnectionsGetSample.ts @@ -3,27 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get specified scope connection created by this Network Manager. + * This sample demonstrates how to get specified scope connection created by this Network Manager. * - * @summary Get specified scope connection created by this Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionGet.json + * @summary get specified scope connection created by this Network Manager. + * x-ms-original-file: 2025-07-01/NetworkManagerScopeConnectionGet.json */ async function getNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.scopeConnections.get( - resourceGroupName, - networkManagerName, - scopeConnectionName, + "rg1", + "testNetworkManager", + "TestScopeConnection", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/scopeConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/scopeConnectionsListSample.ts index 0b084e131e72..08452cbc5642 100644 --- a/sdk/network/arm-network/samples-dev/scopeConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/scopeConnectionsListSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all scope connections created by this network manager. + * This sample demonstrates how to list all scope connections created by this network manager. * - * @summary List all scope connections created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionList.json + * @summary list all scope connections created by this network manager. + * x-ms-original-file: 2025-07-01/NetworkManagerScopeConnectionList.json */ async function listNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.scopeConnections.list( - resourceGroupName, - networkManagerName, - )) { + for await (const item of client.scopeConnections.list("rg1", "testNetworkManager")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsCreateOrUpdateSample.ts index 0e822757e0cb..c7fd320c0438 100644 --- a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsCreateOrUpdateSample.ts @@ -1,74 +1,54 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SecurityAdminConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a network manager security admin configuration. + * This sample demonstrates how to creates or updates a network manager security admin configuration. * - * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json + * @summary creates or updates a network manager security admin configuration. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityAdminConfigurationPut.json */ -async function createManualModeSecurityAdminConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityAdminConfiguration: SecurityAdminConfiguration = { - description: - "A configuration which will update any network groups ip addresses at commit times.", - networkGroupAddressSpaceAggregationOption: "Manual", - }; +async function createNetworkManagerSecurityAdminConfiguration(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.securityAdminConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityAdminConfiguration, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + { description: "A sample policy", applyOnNetworkIntentPolicyBasedServices: ["None"] }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates a network manager security admin configuration. + * This sample demonstrates how to creates or updates a network manager security admin configuration. * - * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationPut.json + * @summary creates or updates a network manager security admin configuration. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json */ -async function createNetworkManagerSecurityAdminConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityAdminConfiguration: SecurityAdminConfiguration = { - description: "A sample policy", - applyOnNetworkIntentPolicyBasedServices: ["None"], - }; +async function createManualModeSecurityAdminConfiguration(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.securityAdminConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityAdminConfiguration, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + { + description: + "A configuration which will update any network groups ip addresses at commit times.", + networkGroupAddressSpaceAggregationOption: "Manual", + }, ); console.log(result); } async function main(): Promise { - await createManualModeSecurityAdminConfiguration(); await createNetworkManagerSecurityAdminConfiguration(); + await createManualModeSecurityAdminConfiguration(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsDeleteSample.ts index bd053e27af25..522bc887993b 100644 --- a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsDeleteSample.ts @@ -1,38 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SecurityAdminConfigurationsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a network manager security admin configuration. + * This sample demonstrates how to deletes a network manager security admin configuration. * - * @summary Deletes a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json + * @summary deletes a network manager security admin configuration. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityAdminConfigurationDelete.json */ async function deleteNetworkManagerSecurityAdminConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const force = false; - const options: SecurityAdminConfigurationsDeleteOptionalParams = { force }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, + await client.securityAdminConfigurations.delete( + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + { force: false }, ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsGetSample.ts index 15c18a8fdc69..7278a10a1a6a 100644 --- a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsGetSample.ts @@ -3,27 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves a network manager security admin configuration. + * This sample demonstrates how to retrieves a network manager security admin configuration. * - * @summary Retrieves a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + * @summary retrieves a network manager security admin configuration. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityAdminConfigurationGet.json */ async function getSecurityAdminConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.securityAdminConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsListSample.ts index f6e218872f72..aab0ff87afa9 100644 --- a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsListSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the network manager security admin configurations in a network manager, in a paginated format. + * This sample demonstrates how to lists all the network manager security admin configurations in a network manager, in a paginated format. * - * @summary Lists all the network manager security admin configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json + * @summary lists all the network manager security admin configurations in a network manager, in a paginated format. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityAdminConfigurationList.json */ async function listSecurityAdminConfigurationsInANetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.securityAdminConfigurations.list( - resourceGroupName, - networkManagerName, - )) { + for await (const item of client.securityAdminConfigurations.list("rg1", "testNetworkManager")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersCreateOrUpdateSample.ts index 9ec6eb9e3ca0..129a8a4b872d 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersCreateOrUpdateSample.ts @@ -1,40 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SecurityPartnerProvider} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified Security Partner Provider. + * This sample demonstrates how to creates or updates the specified Security Partner Provider. * - * @summary Creates or updates the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderPut.json + * @summary creates or updates the specified Security Partner Provider. + * x-ms-original-file: 2025-07-01/SecurityPartnerProviderPut.json */ async function createSecurityPartnerProvider(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const parameters: SecurityPartnerProvider = { - location: "West US", - securityProviderName: "ZScaler", - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.securityPartnerProviders.beginCreateOrUpdateAndWait( - resourceGroupName, - securityPartnerProviderName, - parameters, - ); + const result = await client.securityPartnerProviders.createOrUpdate( + "rg1", + "securityPartnerProvider", + { + location: "West US", + securityProviderName: "ZScaler", + virtualHub: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", + }, + tags: { key1: "value1" }, + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersDeleteSample.ts index 881eb9c09781..ae88babef1d8 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified Security Partner Provider. + * This sample demonstrates how to deletes the specified Security Partner Provider. * - * @summary Deletes the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderDelete.json + * @summary deletes the specified Security Partner Provider. + * x-ms-original-file: 2025-07-01/SecurityPartnerProviderDelete.json */ async function deleteSecurityPartnerProvider(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.beginDeleteAndWait( - resourceGroupName, - securityPartnerProviderName, - ); - console.log(result); + await client.securityPartnerProviders.delete("rg1", "securityPartnerProvider"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersGetSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersGetSample.ts index e9322cf81d87..82b910f54e8a 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Security Partner Provider. + * This sample demonstrates how to gets the specified Security Partner Provider. * - * @summary Gets the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderGet.json + * @summary gets the specified Security Partner Provider. + * x-ms-original-file: 2025-07-01/SecurityPartnerProviderGet.json */ async function getSecurityPartnerProvider(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.get( - resourceGroupName, - securityPartnerProviderName, - ); + const result = await client.securityPartnerProviders.get("rg1", "securityPartnerProvider"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersListByResourceGroupSample.ts index 85667e0e26a0..d6331b076d41 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all Security Partner Providers in a resource group. + * This sample demonstrates how to lists all Security Partner Providers in a resource group. * - * @summary Lists all Security Partner Providers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderListByResourceGroup.json + * @summary lists all Security Partner Providers in a resource group. + * x-ms-original-file: 2025-07-01/SecurityPartnerProviderListByResourceGroup.json */ async function listAllSecurityPartnerProvidersForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.securityPartnerProviders.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.securityPartnerProviders.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersListSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersListSample.ts index ef4db796f4d3..09bd31099ae5 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the Security Partner Providers in a subscription. + * This sample demonstrates how to gets all the Security Partner Providers in a subscription. * - * @summary Gets all the Security Partner Providers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderListBySubscription.json + * @summary gets all the Security Partner Providers in a subscription. + * x-ms-original-file: 2025-07-01/SecurityPartnerProviderListBySubscription.json */ async function listAllSecurityPartnerProvidersForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.securityPartnerProviders.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersUpdateTagsSample.ts index d90efb3fbaa0..c63c91cb11f8 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersUpdateTagsSample.ts @@ -1,28 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates tags of a Security Partner Provider resource. + * This sample demonstrates how to updates tags of a Security Partner Provider resource. * - * @summary Updates tags of a Security Partner Provider resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderUpdateTags.json + * @summary updates tags of a Security Partner Provider resource. + * x-ms-original-file: 2025-07-01/SecurityPartnerProviderUpdateTags.json */ async function updateSecurityPartnerProviderTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.securityPartnerProviders.updateTags( - resourceGroupName, - securityPartnerProviderName, - parameters, + "rg1", + "securityPartnerProvider", + { tags: { tag1: "value1", tag2: "value2" } }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityRulesCreateOrUpdateSample.ts index bf6d399d7f0e..9674c822153a 100644 --- a/sdk/network/arm-network/samples-dev/securityRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityRulesCreateOrUpdateSample.ts @@ -1,23 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { SecurityRule} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a security rule in the specified network security group. + * This sample demonstrates how to creates or updates a security rule in the specified network security group. * - * @summary Creates or updates a security rule in the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleCreate.json + * @summary creates or updates a security rule in the specified network security group. + * x-ms-original-file: 2025-07-01/NetworkSecurityGroupRuleCreate.json */ async function createSecurityRule(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const securityRuleParameters: SecurityRule = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.securityRules.createOrUpdate("rg1", "testnsg", "rule1", { access: "Deny", destinationAddressPrefix: "11.0.0.0/8", destinationPortRange: "8080", @@ -26,15 +23,7 @@ async function createSecurityRule(): Promise { sourceAddressPrefix: "10.0.0.0/8", sourcePortRange: "*", protocol: "*", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - securityRuleParameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityRulesDeleteSample.ts index 12ac57737193..e00dd8208da1 100644 --- a/sdk/network/arm-network/samples-dev/securityRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityRulesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified network security rule. + * This sample demonstrates how to deletes the specified network security rule. * - * @summary Deletes the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleDelete.json + * @summary deletes the specified network security rule. + * x-ms-original-file: 2025-07-01/NetworkSecurityGroupRuleDelete.json */ async function deleteNetworkSecurityRuleFromNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.beginDeleteAndWait( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - ); - console.log(result); + await client.securityRules.delete("rg1", "testnsg", "rule1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/securityRulesGetSample.ts b/sdk/network/arm-network/samples-dev/securityRulesGetSample.ts index c60ca12c69c9..cfb58930a328 100644 --- a/sdk/network/arm-network/samples-dev/securityRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityRulesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get the specified network security rule. + * This sample demonstrates how to get the specified network security rule. * - * @summary Get the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleGet.json + * @summary get the specified network security rule. + * x-ms-original-file: 2025-07-01/NetworkSecurityGroupRuleGet.json */ async function getNetworkSecurityRuleInNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.get( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - ); + const result = await client.securityRules.get("rg1", "testnsg", "rule1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityRulesListSample.ts b/sdk/network/arm-network/samples-dev/securityRulesListSample.ts index 57828f028c16..0e30e4cd716a 100644 --- a/sdk/network/arm-network/samples-dev/securityRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityRulesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all security rules in a network security group. + * This sample demonstrates how to gets all security rules in a network security group. * - * @summary Gets all security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleList.json + * @summary gets all security rules in a network security group. + * x-ms-original-file: 2025-07-01/NetworkSecurityGroupRuleList.json */ async function listNetworkSecurityRulesInNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.securityRules.list( - resourceGroupName, - networkSecurityGroupName, - )) { + for await (const item of client.securityRules.list("rg1", "testnsg")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/securityUserConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityUserConfigurationsCreateOrUpdateSample.ts index b5d17e2c4d55..9b29286e41c0 100644 --- a/sdk/network/arm-network/samples-dev/securityUserConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserConfigurationsCreateOrUpdateSample.ts @@ -1,37 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SecurityUserConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a network manager security user configuration. + * This sample demonstrates how to creates or updates a network manager security user configuration. * - * @summary Creates or updates a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json + * @summary creates or updates a network manager security user configuration. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserConfigurationPut.json */ async function createNetworkManagerSecurityUserConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityUserConfiguration: SecurityUserConfiguration = { - description: "A sample policy", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.securityUserConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityUserConfiguration, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + { description: "A sample policy" }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityUserConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityUserConfigurationsDeleteSample.ts index 102926e9db16..3f55d8b09797 100644 --- a/sdk/network/arm-network/samples-dev/securityUserConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserConfigurationsDeleteSample.ts @@ -1,38 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SecurityUserConfigurationsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a network manager security user configuration. + * This sample demonstrates how to deletes a network manager security user configuration. * - * @summary Deletes a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json + * @summary deletes a network manager security user configuration. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserConfigurationDelete.json */ async function deleteNetworkManagerSecurityUserConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const force = false; - const options: SecurityUserConfigurationsDeleteOptionalParams = { force }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, + await client.securityUserConfigurations.delete( + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + { force: false }, ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/securityUserConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/securityUserConfigurationsGetSample.ts index c5ac28422b35..d2ef15d7789d 100644 --- a/sdk/network/arm-network/samples-dev/securityUserConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserConfigurationsGetSample.ts @@ -3,27 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves a network manager security user configuration. + * This sample demonstrates how to retrieves a network manager security user configuration. * - * @summary Retrieves a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json + * @summary retrieves a network manager security user configuration. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserConfigurationGet.json */ async function getSecurityUserConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.securityUserConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityUserConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/securityUserConfigurationsListSample.ts index ea660ff42fb8..6cafd2195873 100644 --- a/sdk/network/arm-network/samples-dev/securityUserConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserConfigurationsListSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the network manager security user configurations in a network manager, in a paginated format. + * This sample demonstrates how to lists all the network manager security user configurations in a network manager, in a paginated format. * - * @summary Lists all the network manager security user configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationList.json + * @summary lists all the network manager security user configurations in a network manager, in a paginated format. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserConfigurationList.json */ async function listSecurityUserConfigurationsInANetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.securityUserConfigurations.list( - resourceGroupName, - networkManagerName, - )) { + for await (const item of client.securityUserConfigurations.list("rg1", "testNetworkManager")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsCreateOrUpdateSample.ts index 840517fd6262..cfc6adbbdfe7 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsCreateOrUpdateSample.ts @@ -1,45 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SecurityUserRuleCollection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a security user rule collection. + * This sample demonstrates how to creates or updates a security user rule collection. * - * @summary Creates or updates a security user rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json + * @summary creates or updates a security user rule collection. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserRuleCollectionPut.json */ async function createOrUpdateASecurityUserRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const securityUserRuleCollection: SecurityUserRuleCollection = { - description: "A sample policy", - appliesToGroups: [ - { - networkGroupId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.securityUserRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - securityUserRuleCollection, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + { + description: "A sample policy", + appliesToGroups: [ + { + networkGroupId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", + }, + ], + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsDeleteSample.ts index 8d3d940e8949..2f3b9d783cca 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsDeleteSample.ts @@ -1,40 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SecurityUserRuleCollectionsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a Security User Rule collection. + * This sample demonstrates how to deletes a Security User Rule collection. * - * @summary Deletes a Security User Rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json + * @summary deletes a Security User Rule collection. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserRuleCollectionDelete.json */ async function deletesASecurityUserRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const force = false; - const options: SecurityUserRuleCollectionsDeleteOptionalParams = { force }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, + await client.securityUserRuleCollections.delete( + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + { force: false }, ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsGetSample.ts index 9f806cb5ce9d..2e6dbac3fa3d 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsGetSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a network manager security user configuration rule collection. + * This sample demonstrates how to gets a network manager security user configuration rule collection. * - * @summary Gets a network manager security user configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json + * @summary gets a network manager security user configuration rule collection. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserRuleCollectionGet.json */ async function getsSecurityUserRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.securityUserRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsListSample.ts b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsListSample.ts index 4c550fd4e8c0..e754fddecfc1 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsListSample.ts @@ -3,31 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the security user rule collections in a security configuration, in a paginated format. + * This sample demonstrates how to lists all the security user rule collections in a security configuration, in a paginated format. * - * @summary Lists all the security user rule collections in a security configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json + * @summary lists all the security user rule collections in a security configuration, in a paginated format. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserRuleCollectionList.json */ async function listRuleCollectionsInASecurityConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.securityUserRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/securityUserRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityUserRulesCreateOrUpdateSample.ts index 04ddab1ea062..36e350e8926d 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRulesCreateOrUpdateSample.ts @@ -1,44 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { SecurityUserRule} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a security user rule. + * This sample demonstrates how to creates or updates a security user rule. * - * @summary Creates or updates a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRulePut.json + * @summary creates or updates a security user rule. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserRulePut.json */ async function createASecurityUserRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const securityUserRule: SecurityUserRule = { - description: "Sample User Rule", - destinationPortRanges: ["22"], - destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - direction: "Inbound", - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - protocol: "Tcp", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.securityUserRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - securityUserRule, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + "SampleUserRule", + { + description: "Sample User Rule", + destinationPortRanges: ["22"], + destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], + direction: "Inbound", + sourcePortRanges: ["0-65535"], + sources: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], + protocol: "Tcp", + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityUserRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityUserRulesDeleteSample.ts index ce3c9a23294d..8ab75270da4c 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRulesDeleteSample.ts @@ -1,42 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - SecurityUserRulesDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a security user rule. + * This sample demonstrates how to deletes a security user rule. * - * @summary Deletes a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleDelete.json + * @summary deletes a security user rule. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserRuleDelete.json */ async function deleteASecurityUserRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const force = false; - const options: SecurityUserRulesDeleteOptionalParams = { force }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, + await client.securityUserRules.delete( + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + "SampleUserRule", + { force: false }, ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/securityUserRulesGetSample.ts b/sdk/network/arm-network/samples-dev/securityUserRulesGetSample.ts index 8f64b9f0a9a2..b6be9b0e47e6 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRulesGetSample.ts @@ -3,31 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a security user rule. + * This sample demonstrates how to gets a security user rule. * - * @summary Gets a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleGet.json + * @summary gets a security user rule. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserRuleGet.json */ async function getsASecurityUserRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.securityUserRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", + "SampleUserRule", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/securityUserRulesListSample.ts b/sdk/network/arm-network/samples-dev/securityUserRulesListSample.ts index 433f53abb1af..7d00e453c323 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRulesListSample.ts @@ -3,33 +3,27 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all Security User Rules in a rule collection. + * This sample demonstrates how to lists all Security User Rules in a rule collection. * - * @summary Lists all Security User Rules in a rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleList.json + * @summary lists all Security User Rules in a rule collection. + * x-ms-original-file: 2025-07-01/NetworkManagerSecurityUserRuleList.json */ async function listSecurityUserRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.securityUserRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, + "rg1", + "testNetworkManager", + "myTestSecurityConfig", + "testRuleCollection", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/serviceAssociationLinksListSample.ts b/sdk/network/arm-network/samples-dev/serviceAssociationLinksListSample.ts index 77bb8cf59b8a..8a89d33a800b 100644 --- a/sdk/network/arm-network/samples-dev/serviceAssociationLinksListSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceAssociationLinksListSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a list of service association links for a subnet. + * This sample demonstrates how to gets a list of service association links for a subnet. * - * @summary Gets a list of service association links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json + * @summary gets a list of service association links for a subnet. + * x-ms-original-file: 2025-07-01/VirtualNetworkGetServiceAssociationLinks.json */ async function getServiceAssociationLinks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnet"; - const subnetName = "subnet"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceAssociationLinks.list( - resourceGroupName, - virtualNetworkName, - subnetName, - ); + const result = await client.serviceAssociationLinks.list("rg1", "vnet", "subnet"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesCreateOrUpdateSample.ts index c646585e9662..c8c50c254e68 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesCreateOrUpdateSample.ts @@ -1,69 +1,49 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ServiceEndpointPolicy} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a service Endpoint Policies. + * This sample demonstrates how to creates or updates a service Endpoint Policies. * - * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyCreate.json + * @summary creates or updates a service Endpoint Policies. + * x-ms-original-file: 2025-07-01/ServiceEndpointPolicyCreate.json */ async function createServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const parameters: ServiceEndpointPolicy = { location: "westus" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); + const result = await client.serviceEndpointPolicies.createOrUpdate("rg1", "testPolicy", { + location: "westus", + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a service Endpoint Policies. + * This sample demonstrates how to creates or updates a service Endpoint Policies. * - * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyCreateWithDefinition.json + * @summary creates or updates a service Endpoint Policies. + * x-ms-original-file: 2025-07-01/ServiceEndpointPolicyCreateWithDefinition.json */ async function createServiceEndpointPolicyWithDefinition(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const parameters: ServiceEndpointPolicy = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.serviceEndpointPolicies.createOrUpdate("rg1", "testPolicy", { location: "westus", serviceEndpointPolicyDefinitions: [ { - name: "StorageServiceEndpointPolicyDefinition", description: "Storage Service EndpointPolicy Definition", service: "Microsoft.Storage", serviceResources: [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storageRg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", ], }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesDeleteSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesDeleteSample.ts index 39bb6391483c..2f6298da4996 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified service endpoint policy. + * This sample demonstrates how to deletes the specified service endpoint policy. * - * @summary Deletes the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDelete.json + * @summary deletes the specified service endpoint policy. + * x-ms-original-file: 2025-07-01/ServiceEndpointPolicyDelete.json */ async function deleteServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "serviceEndpointPolicy1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.beginDeleteAndWait( - resourceGroupName, - serviceEndpointPolicyName, - ); - console.log(result); + await client.serviceEndpointPolicies.delete("rg1", "serviceEndpointPolicy1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesGetSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesGetSample.ts index 29af69cf7c2b..39b227227270 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified service Endpoint Policies in a specified resource group. + * This sample demonstrates how to gets the specified service Endpoint Policies in a specified resource group. * - * @summary Gets the specified service Endpoint Policies in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyGet.json + * @summary gets the specified service Endpoint Policies in a specified resource group. + * x-ms-original-file: 2025-07-01/ServiceEndpointPolicyGet.json */ async function getServiceEndPointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testServiceEndpointPolicy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.get( - resourceGroupName, - serviceEndpointPolicyName, - ); + const result = await client.serviceEndpointPolicies.get("rg1", "testServiceEndpointPolicy"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListByResourceGroupSample.ts index 5c1d728091bf..7fa80121c3da 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all service endpoint Policies in a resource group. + * This sample demonstrates how to gets all service endpoint Policies in a resource group. * - * @summary Gets all service endpoint Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyList.json + * @summary gets all service endpoint Policies in a resource group. + * x-ms-original-file: 2025-07-01/ServiceEndpointPolicyList.json */ async function listResourceGroupServiceEndpointPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.serviceEndpointPolicies.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.serviceEndpointPolicies.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListSample.ts index bda1afca0273..fbd9b30ec057 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the service endpoint policies in a subscription. + * This sample demonstrates how to gets all the service endpoint policies in a subscription. * - * @summary Gets all the service endpoint policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyListAll.json + * @summary gets all the service endpoint policies in a subscription. + * x-ms-original-file: 2025-07-01/ServiceEndpointPolicyListAll.json */ async function listAllServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.serviceEndpointPolicies.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesUpdateTagsSample.ts index d4c2366b75e0..f46a07c5d83e 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesUpdateTagsSample.ts @@ -1,28 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates tags of a service endpoint policy. + * This sample demonstrates how to updates tags of a service endpoint policy. * - * @summary Updates tags of a service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyUpdateTags.json + * @summary updates tags of a service endpoint policy. + * x-ms-original-file: 2025-07-01/ServiceEndpointPolicyUpdateTags.json */ async function updateServiceEndpointPolicyTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testServiceEndpointPolicy"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.serviceEndpointPolicies.updateTags( - resourceGroupName, - serviceEndpointPolicyName, - parameters, + "rg1", + "testServiceEndpointPolicy", + { tags: { tag1: "value1", tag2: "value2" } }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts index 33debb0345b9..aba7bbb113fc 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts @@ -1,43 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ServiceEndpointPolicyDefinition} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a service endpoint policy definition in the specified service endpoint policy. + * This sample demonstrates how to creates or updates a service endpoint policy definition in the specified service endpoint policy. * - * @summary Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionCreate.json + * @summary creates or updates a service endpoint policy definition in the specified service endpoint policy. + * x-ms-original-file: 2025-07-01/ServiceEndpointPolicyDefinitionCreate.json */ async function createServiceEndpointPolicyDefinition(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition = { - description: "Storage Service EndpointPolicy Definition", - service: "Microsoft.Storage", - serviceResources: [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicyDefinitions.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - serviceEndpointPolicyDefinitions, - ); + const result = await client.serviceEndpointPolicyDefinitions.createOrUpdate( + "rg1", + "testPolicy", + "testDefinition", + { + description: "Storage Service EndpointPolicy Definition", + service: "Microsoft.Storage", + serviceResources: [ + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storageRg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", + ], + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsDeleteSample.ts index 9e60a8139cc8..5231f36feafd 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsDeleteSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified ServiceEndpoint policy definitions. + * This sample demonstrates how to deletes the specified ServiceEndpoint policy definitions. * - * @summary Deletes the specified ServiceEndpoint policy definitions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json + * @summary deletes the specified ServiceEndpoint policy definitions. + * x-ms-original-file: 2025-07-01/ServiceEndpointPolicyDefinitionDelete.json */ async function deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicyDefinitions.beginDeleteAndWait( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - ); - console.log(result); + await client.serviceEndpointPolicyDefinitions.delete("rg1", "testPolicy", "testDefinition"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsGetSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsGetSample.ts index 7e5d7627d3c1..e00683b8d93c 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get the specified service endpoint policy definitions from service endpoint policy. + * This sample demonstrates how to get a ServiceEndpointPolicyDefinition * - * @summary Get the specified service endpoint policy definitions from service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionGet.json + * @summary get a ServiceEndpointPolicyDefinition + * x-ms-original-file: 2025-07-01/ServiceEndpointPolicyDefinitionGet.json */ async function getServiceEndpointDefinitionInServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.serviceEndpointPolicyDefinitions.get( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, + "rg1", + "testPolicy", + "testDefinition", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts index 0ed55c12b0ce..1215c6ea380c 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all service endpoint policy definitions in a service end point policy. + * This sample demonstrates how to gets all service endpoint policy definitions in a service end point policy. * - * @summary Gets all service endpoint policy definitions in a service end point policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionList.json + * @summary gets all service endpoint policy definitions in a service end point policy. + * x-ms-original-file: 2025-07-01/ServiceEndpointPolicyDefinitionList.json */ async function listServiceEndpointDefinitionsInServiceEndPointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.serviceEndpointPolicyDefinitions.listByResourceGroup( - resourceGroupName, - serviceEndpointPolicyName, + "rg1", + "testPolicy", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysCreateOrUpdateSample.ts index e5a512114305..060640e4cefc 100644 --- a/sdk/network/arm-network/samples-dev/serviceGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceGatewaysCreateOrUpdateSample.ts @@ -1,24 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { ServiceGateway} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a service gateway. + * This sample demonstrates how to creates or updates a service gateway. * - * @summary Creates or updates a service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayCreate.json + * @summary creates or updates a service gateway. + * x-ms-original-file: 2025-07-01/ServiceGatewayCreate.json */ async function createServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters: ServiceGateway = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.serviceGateways.createOrUpdate("rg1", "sg", { location: "eastus", routeTargetAddress: { privateIPAddress: "10.0.1.4", @@ -30,14 +26,7 @@ async function createServiceGateway(): Promise { virtualNetwork: { id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet", }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysDeleteSample.ts index 271adf2beedc..9d80e52ef58d 100644 --- a/sdk/network/arm-network/samples-dev/serviceGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceGatewaysDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified service gateway. + * This sample demonstrates how to deletes the specified service gateway. * - * @summary Deletes the specified service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayDelete.json + * @summary deletes the specified service gateway. + * x-ms-original-file: 2025-07-01/ServiceGatewayDelete.json */ async function deleteServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.beginDeleteAndWait( - resourceGroupName, - serviceGatewayName, - ); - console.log(result); + await client.serviceGateways.delete("rg1", "sg"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysGetAddressLocationsSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysGetAddressLocationsSample.ts deleted file mode 100644 index bbbcc9d7a9bb..000000000000 --- a/sdk/network/arm-network/samples-dev/serviceGatewaysGetAddressLocationsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get address locations in service gateway. - * - * @summary Get address locations in service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGetAddressLocationsResponse.json - */ -async function getAddressLocationsInServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceGateways.listAddressLocations( - resourceGroupName, - serviceGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAddressLocationsInServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysGetSample.ts index a05f5911d4f5..4d2cf7661d55 100644 --- a/sdk/network/arm-network/samples-dev/serviceGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceGatewaysGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified service gateway. + * This sample demonstrates how to gets the specified service gateway. * - * @summary Gets the specified service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGet.json + * @summary gets the specified service gateway. + * x-ms-original-file: 2025-07-01/ServiceGatewayGet.json */ async function getLoadBalancer(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.get( - resourceGroupName, - serviceGatewayName, - ); + const result = await client.serviceGateways.get("rg1", "sg"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysGetServicesSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysGetServicesSample.ts deleted file mode 100644 index 3121d09dc431..000000000000 --- a/sdk/network/arm-network/samples-dev/serviceGatewaysGetServicesSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get Services in service gateway. - * - * @summary Get Services in service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGetServicesResponse.json - */ -async function getServicesInServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceGateways.listServices( - resourceGroupName, - serviceGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getServicesInServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysListAddressLocationsSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysListAddressLocationsSample.ts new file mode 100644 index 000000000000..d7f8f9e0326e --- /dev/null +++ b/sdk/network/arm-network/samples-dev/serviceGatewaysListAddressLocationsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get address locations in service gateway. + * + * @summary get address locations in service gateway. + * x-ms-original-file: 2025-07-01/ServiceGatewayGetAddressLocationsResponse.json + */ +async function getAddressLocationsInServiceGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.serviceGateways.listAddressLocations("rg1", "sg")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await getAddressLocationsInServiceGateway(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysListAllSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysListAllSample.ts index 8df94f0410dc..6272f5a89379 100644 --- a/sdk/network/arm-network/samples-dev/serviceGatewaysListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceGatewaysListAllSample.ts @@ -3,24 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the service gateways in a subscription. + * This sample demonstrates how to gets all the service gateways in a subscription. * - * @summary Gets all the service gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayListAll.json + * @summary gets all the service gateways in a subscription. + * x-ms-original-file: 2025-07-01/ServiceGatewayListAll.json */ async function listAllLoadBalancers(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.serviceGateways.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysListSample.ts index cd144dfa0013..0751bc30ce41 100644 --- a/sdk/network/arm-network/samples-dev/serviceGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceGatewaysListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the service gateways in a resource group. + * This sample demonstrates how to gets all the service gateways in a resource group. * - * @summary Gets all the service gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayList.json + * @summary gets all the service gateways in a resource group. + * x-ms-original-file: 2025-07-01/ServiceGatewayList.json */ async function listServiceGatewayInResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.serviceGateways.list(resourceGroupName)) { + for await (const item of client.serviceGateways.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysListServicesSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysListServicesSample.ts new file mode 100644 index 000000000000..c8f99ff171f9 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/serviceGatewaysListServicesSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get Services in service gateway. + * + * @summary get Services in service gateway. + * x-ms-original-file: 2025-07-01/ServiceGatewayGetServicesResponse.json + */ +async function getServicesInServiceGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.serviceGateways.listServices("rg1", "sg")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await getServicesInServiceGateway(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateAddressLocationsSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateAddressLocationsSample.ts index 5d6571f9e5ca..79eb6b134ebf 100644 --- a/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateAddressLocationsSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateAddressLocationsSample.ts @@ -1,47 +1,40 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ServiceGatewayUpdateAddressLocationsRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates address locations within the service gateway. - -The request supports both full and partial update modes at two levels: location and address. - -Full update replaces all existing data. - -Partial update modifies only the specified entries: - -For location-level partial updates, if no address is provided, the existing address will be deleted. - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. + * This sample demonstrates how to creates or updates address locations within the service gateway. * - * @summary Creates or updates address locations within the service gateway. - -The request supports both full and partial update modes at two levels: location and address. - -Full update replaces all existing data. - -Partial update modifies only the specified entries: - -For location-level partial updates, if no address is provided, the existing address will be deleted. - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayFullUpdateAddressLocationsRequest.json + * The request supports both full and partial update modes at two levels: location and address. + * + * Full update replaces all existing data. + * + * Partial update modifies only the specified entries: + * + * For location-level partial updates, if no address is provided, the existing address will be deleted. + * + * For address-level partial updates, if no services are provided, the existing services will be considered for deletion. + * + * @summary creates or updates address locations within the service gateway. + * + * The request supports both full and partial update modes at two levels: location and address. + * + * Full update replaces all existing data. + * + * Partial update modifies only the specified entries: + * + * For location-level partial updates, if no address is provided, the existing address will be deleted. + * + * For address-level partial updates, if no services are provided, the existing services will be considered for deletion. + * x-ms-original-file: 2025-07-01/ServiceGatewayFullUpdateAddressLocationsRequest.json */ async function fullUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters: ServiceGatewayUpdateAddressLocationsRequest = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.serviceGateways.updateAddressLocations("rg1", "sg", { action: "FullUpdate", addressLocations: [ { @@ -52,57 +45,43 @@ async function fullUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGateway { addressLocation: "192.0.0.2", addressUpdateAction: "PartialUpdate", - addresses: [ - { address: "10.0.0.5", services: ["Service2"] }, - { address: "10.0.0.6" }, - ], + addresses: [{ address: "10.0.0.5", services: ["Service2"] }, { address: "10.0.0.6" }], }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceGateways.beginUpdateAddressLocationsAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); + }); } /** - * This sample demonstrates how to Creates or updates address locations within the service gateway. - -The request supports both full and partial update modes at two levels: location and address. - -Full update replaces all existing data. - -Partial update modifies only the specified entries: - -For location-level partial updates, if no address is provided, the existing address will be deleted. - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. + * This sample demonstrates how to creates or updates address locations within the service gateway. * - * @summary Creates or updates address locations within the service gateway. - -The request supports both full and partial update modes at two levels: location and address. - -Full update replaces all existing data. - -Partial update modifies only the specified entries: - -For location-level partial updates, if no address is provided, the existing address will be deleted. - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayPartialUpdateAddressLocationsRequest.json + * The request supports both full and partial update modes at two levels: location and address. + * + * Full update replaces all existing data. + * + * Partial update modifies only the specified entries: + * + * For location-level partial updates, if no address is provided, the existing address will be deleted. + * + * For address-level partial updates, if no services are provided, the existing services will be considered for deletion. + * + * @summary creates or updates address locations within the service gateway. + * + * The request supports both full and partial update modes at two levels: location and address. + * + * Full update replaces all existing data. + * + * Partial update modifies only the specified entries: + * + * For location-level partial updates, if no address is provided, the existing address will be deleted. + * + * For address-level partial updates, if no services are provided, the existing services will be considered for deletion. + * x-ms-original-file: 2025-07-01/ServiceGatewayPartialUpdateAddressLocationsRequest.json */ async function partialUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters: ServiceGatewayUpdateAddressLocationsRequest = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.serviceGateways.updateAddressLocations("rg1", "sg", { action: "PartialUpdate", addressLocations: [ { @@ -113,23 +92,11 @@ async function partialUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGate { addressLocation: "192.0.0.2", addressUpdateAction: "PartialUpdate", - addresses: [ - { address: "10.0.0.5", services: ["Service2"] }, - { address: "10.0.0.6" }, - ], + addresses: [{ address: "10.0.0.5", services: ["Service2"] }, { address: "10.0.0.6" }], }, { addressLocation: "192.0.0.3" }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceGateways.beginUpdateAddressLocationsAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); + }); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateServicesSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateServicesSample.ts index cb8625c09aae..fcc661009a5f 100644 --- a/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateServicesSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateServicesSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ServiceGatewayUpdateServicesRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates, updates, or deletes services within the service gateway. -The request supports both full and partial update modes at the service level. - -Full update replaces all existing services with the new list provided in the request. -Partial update modifies only the specified services. + * This sample demonstrates how to creates, updates, or deletes services within the service gateway. + * The request supports both full and partial update modes at the service level. * - * @summary Creates, updates, or deletes services within the service gateway. -The request supports both full and partial update modes at the service level. - -Full update replaces all existing services with the new list provided in the request. -Partial update modifies only the specified services. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayUpdateServicesRequest.json + * Full update replaces all existing services with the new list provided in the request. + * Partial update modifies only the specified services. + * + * @summary creates, updates, or deletes services within the service gateway. + * The request supports both full and partial update modes at the service level. + * + * Full update replaces all existing services with the new list provided in the request. + * Partial update modifies only the specified services. + * x-ms-original-file: 2025-07-01/ServiceGatewayUpdateServicesRequest.json */ async function createOrFullUpdateServicesInServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters: ServiceGatewayUpdateServicesRequest = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.serviceGateways.updateServices("rg1", "sg", { action: "FullUpdate", serviceRequests: [ { @@ -38,32 +31,17 @@ async function createOrFullUpdateServicesInServiceGateway(): Promise { isDefault: true, loadBalancerBackendPools: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/be1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/be1", }, ], publicNatGatewayId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/natGateways/test-natGateway", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/natGateways/test-natGateway", serviceType: "Inbound", }, }, - { - isDelete: true, - service: { - name: "Service2", - isDefault: false, - serviceType: "Outbound", - }, - }, + { isDelete: true, service: { name: "Service2", isDefault: false, serviceType: "Outbound" } }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.beginUpdateServicesAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); + }); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateTagsSample.ts index 70833db1486d..1842bff7652a 100644 --- a/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceGatewaysUpdateTagsSample.ts @@ -1,31 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a service gateway tags. + * This sample demonstrates how to updates a service gateway tags. * - * @summary Updates a service gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayUpdateTags.json + * @summary updates a service gateway tags. + * x-ms-original-file: 2025-07-01/ServiceGatewayUpdateTags.json */ async function updateServiceGatewayTags(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.updateTags( - resourceGroupName, - serviceGatewayName, - parameters, - ); + const result = await client.serviceGateways.updateTags("rg1", "sg", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/serviceTagInformationListSample.ts b/sdk/network/arm-network/samples-dev/serviceTagInformationListSample.ts index 173265e4a018..e034ff9d9a78 100644 --- a/sdk/network/arm-network/samples-dev/serviceTagInformationListSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceTagInformationListSample.ts @@ -1,79 +1,64 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ServiceTagInformationListOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. + * This sample demonstrates how to gets a list of service tag information resources with pagination. * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagInformationListResult.json + * @summary gets a list of service tag information resources with pagination. + * x-ms-original-file: 2025-07-01/ServiceTagInformationListResult.json */ async function getListOfServiceTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list( - location, - )) { + for await (const item of client.serviceTagInformation.list("westeurope")) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. + * This sample demonstrates how to gets a list of service tag information resources with pagination. * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json + * @summary gets a list of service tag information resources with pagination. + * x-ms-original-file: 2025-07-01/ServiceTagInformationListResultWithNoAddressPrefixes.json */ async function getListOfServiceTagsWithNoAddressPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const noAddressPrefixes = true; - const options: ServiceTagInformationListOptionalParams = { - noAddressPrefixes, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list( - location, - options, - )) { + for await (const item of client.serviceTagInformation.list("westeurope", { + noAddressPrefixes: true, + })) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. + * This sample demonstrates how to gets a list of service tag information resources with pagination. * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagInformationListResultWithTagname.json + * @summary gets a list of service tag information resources with pagination. + * x-ms-original-file: 2025-07-01/ServiceTagInformationListResultWithTagname.json */ async function getListOfServiceTagsWithTagName(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const tagName = "ApiManagement"; - const options: ServiceTagInformationListOptionalParams = { tagName }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list( - location, - options, - )) { + for await (const item of client.serviceTagInformation.list("westeurope", { + tagName: "ApiManagement", + })) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/serviceTagsListSample.ts b/sdk/network/arm-network/samples-dev/serviceTagsListSample.ts index dbff0fb1e428..38d7b962ed69 100644 --- a/sdk/network/arm-network/samples-dev/serviceTagsListSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceTagsListSample.ts @@ -3,20 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a list of service tag information resources. + * This sample demonstrates how to gets a list of service tag information resources. * - * @summary Gets a list of service tag information resources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagsList.json + * @summary gets a list of service tag information resources. + * x-ms-original-file: 2025-07-01/ServiceTagsList.json */ async function getListOfServiceTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceTags.list(location); + const result = await client.serviceTags.list("westcentralus"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/staticCidrsCreateSample.ts b/sdk/network/arm-network/samples-dev/staticCidrsCreateSample.ts index d95801161f07..959519bf76f3 100644 --- a/sdk/network/arm-network/samples-dev/staticCidrsCreateSample.ts +++ b/sdk/network/arm-network/samples-dev/staticCidrsCreateSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates/Updates the Static CIDR resource. + * This sample demonstrates how to creates/Updates the Static CIDR resource. * - * @summary Creates/Updates the Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Create.json + * @summary creates/Updates the Static CIDR resource. + * x-ms-original-file: 2025-07-01/StaticCidrs_Create.json */ async function staticCidrsCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.staticCidrs.create( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, + "rg1", + "TestNetworkManager", + "TestPool", + "TestStaticCidr", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/staticCidrsDeleteSample.ts b/sdk/network/arm-network/samples-dev/staticCidrsDeleteSample.ts index 15a813208acc..8f2060d90edb 100644 --- a/sdk/network/arm-network/samples-dev/staticCidrsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/staticCidrsDeleteSample.ts @@ -3,31 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the Static CIDR resource. + * This sample demonstrates how to delete the Static CIDR resource. * - * @summary Delete the Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Delete.json + * @summary delete the Static CIDR resource. + * x-ms-original-file: 2025-07-01/StaticCidrs_Delete.json */ async function staticCidrsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); + await client.staticCidrs.delete("rg1", "TestNetworkManager", "TestPool", "TestStaticCidr"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/staticCidrsGetSample.ts b/sdk/network/arm-network/samples-dev/staticCidrsGetSample.ts index f1937af5fbc6..24288148508f 100644 --- a/sdk/network/arm-network/samples-dev/staticCidrsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/staticCidrsGetSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specific Static CIDR resource. + * This sample demonstrates how to gets the specific Static CIDR resource. * - * @summary Gets the specific Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Get.json + * @summary gets the specific Static CIDR resource. + * x-ms-original-file: 2025-07-01/StaticCidrs_Get.json */ async function staticCidrsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.staticCidrs.get( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, + "rg1", + "TestNetworkManager", + "TestPool", + "TestStaticCidr", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/staticCidrsListSample.ts b/sdk/network/arm-network/samples-dev/staticCidrsListSample.ts index fe1d718f799d..60ca208b109f 100644 --- a/sdk/network/arm-network/samples-dev/staticCidrsListSample.ts +++ b/sdk/network/arm-network/samples-dev/staticCidrsListSample.ts @@ -3,31 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets list of Static CIDR resources at Network Manager level. + * This sample demonstrates how to gets list of Static CIDR resources at Network Manager level. * - * @summary Gets list of Static CIDR resources at Network Manager level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_List.json + * @summary gets list of Static CIDR resources at Network Manager level. + * x-ms-original-file: 2025-07-01/StaticCidrs_List.json */ async function staticCidrsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; const credential = new DefaultAzureCredential(); + const subscriptionId = "11111111-1111-1111-1111-111111111111"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.staticCidrs.list( - resourceGroupName, - networkManagerName, - poolName, - )) { + for await (const item of client.staticCidrs.list("rg1", "TestNetworkManager", "TestPool")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/staticMembersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/staticMembersCreateOrUpdateSample.ts index ff7525f16fd4..6a921e82fb12 100644 --- a/sdk/network/arm-network/samples-dev/staticMembersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/staticMembersCreateOrUpdateSample.ts @@ -1,37 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { StaticMember} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a static member. + * This sample demonstrates how to creates or updates a static member. * - * @summary Creates or updates a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberPut.json + * @summary creates or updates a static member. + * x-ms-original-file: 2025-07-01/NetworkManagerStaticMemberPut.json */ async function staticMemberPut(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const parameters: StaticMember = { - resourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroup/rg1/providers/Microsoft.Network/virtualnetworks/vnet1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.staticMembers.createOrUpdate( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - parameters, + "rg1", + "testNetworkManager", + "testNetworkGroup", + "testStaticMember", + { + resourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualnetworks/vnet1", + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/staticMembersDeleteSample.ts b/sdk/network/arm-network/samples-dev/staticMembersDeleteSample.ts index 9f483dcec87d..01c94daa5d81 100644 --- a/sdk/network/arm-network/samples-dev/staticMembersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/staticMembersDeleteSample.ts @@ -3,31 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a static member. + * This sample demonstrates how to deletes a static member. * - * @summary Deletes a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberDelete.json + * @summary deletes a static member. + * x-ms-original-file: 2025-07-01/NetworkManagerStaticMemberDelete.json */ async function staticMembersDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "SampleRG"; - const networkManagerName = "TestNM"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.delete( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - ); - console.log(result); + await client.staticMembers.delete("SampleRG", "TestNM", "testNetworkGroup", "testStaticMember"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/staticMembersGetSample.ts b/sdk/network/arm-network/samples-dev/staticMembersGetSample.ts index 762330943c78..a2b3735160b1 100644 --- a/sdk/network/arm-network/samples-dev/staticMembersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/staticMembersGetSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified static member. + * This sample demonstrates how to gets the specified static member. * - * @summary Gets the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberGet.json + * @summary gets the specified static member. + * x-ms-original-file: 2025-07-01/NetworkManagerStaticMemberGet.json */ async function staticMembersGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.staticMembers.get( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, + "rg1", + "testNetworkManager", + "testNetworkGroup", + "testStaticMember", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/staticMembersListSample.ts b/sdk/network/arm-network/samples-dev/staticMembersListSample.ts index c5087015497e..226535cf4d60 100644 --- a/sdk/network/arm-network/samples-dev/staticMembersListSample.ts +++ b/sdk/network/arm-network/samples-dev/staticMembersListSample.ts @@ -3,31 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists the specified static member. + * This sample demonstrates how to lists the specified static member. * - * @summary Lists the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberList.json + * @summary lists the specified static member. + * x-ms-original-file: 2025-07-01/NetworkManagerStaticMemberList.json */ async function staticMembersList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.staticMembers.list( - resourceGroupName, - networkManagerName, - networkGroupName, + "rg1", + "testNetworkManager", + "testNetworkGroup", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/subgroupsGetSample.ts b/sdk/network/arm-network/samples-dev/subgroupsGetSample.ts new file mode 100644 index 000000000000..5ef84ea11fb4 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/subgroupsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the specified subgroup in an interconnect group. + * + * @summary gets the specified subgroup in an interconnect group. + * x-ms-original-file: 2025-07-01/SubgroupGet.json + */ +async function getSubgroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.subgroups.get("rg1", "test-ig", "subgroup0"); + console.log(result); +} + +async function main(): Promise { + await getSubgroup(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/subgroupsListSample.ts b/sdk/network/arm-network/samples-dev/subgroupsListSample.ts new file mode 100644 index 000000000000..a0845f0aa0a4 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/subgroupsListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets all subgroups in an interconnect group. + * + * @summary gets all subgroups in an interconnect group. + * x-ms-original-file: 2025-07-01/SubgroupList.json + */ +async function listSubgroups(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.subgroups.list("rg1", "test-ig")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listSubgroups(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/subnetsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/subnetsCreateOrUpdateSample.ts index 5882f944373f..9ee2343f344f 100644 --- a/sdk/network/arm-network/samples-dev/subnetsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsCreateOrUpdateSample.ts @@ -1,179 +1,123 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Subnet} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. + * This sample demonstrates how to creates or updates a subnet in the specified virtual network. * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateWithServiceGateway.json + * @summary creates or updates a subnet in the specified virtual network. + * x-ms-original-file: 2025-07-01/SubnetCreate.json */ -async function createSubnetWithServiceGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { - addressPrefix: "10.0.0.0/16", - serviceGateway: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/serviceGateways/SG1", - }, - }; +async function createSubnet(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); + const result = await client.subnets.createOrUpdate("subnet-test", "vnetname", "subnet1", { + addressPrefix: "10.0.0.0/16", + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. + * This sample demonstrates how to creates or updates a subnet in the specified virtual network. * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreate.json + * @summary creates or updates a subnet in the specified virtual network. + * x-ms-original-file: 2025-07-01/SubnetCreateServiceEndpoint.json */ -async function createSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { addressPrefix: "10.0.0.0/16" }; +async function createSubnetWithServiceEndpoints(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); + const result = await client.subnets.createOrUpdate("subnet-test", "vnetname", "subnet1", { + addressPrefix: "10.0.0.0/16", + serviceEndpoints: [{ service: "Microsoft.Storage" }], + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. + * This sample demonstrates how to creates or updates a subnet in the specified virtual network. * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateWithDelegation.json + * @summary creates or updates a subnet in the specified virtual network. + * x-ms-original-file: 2025-07-01/SubnetCreateServiceEndpointNetworkIdentifier.json */ -async function createSubnetWithADelegation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { addressPrefix: "10.0.0.0/16" }; +async function createSubnetWithServiceEndpointsWithNetworkIdentifier(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); + const result = await client.subnets.createOrUpdate("subnet-test", "vnetname", "subnet1", { + addressPrefix: "10.0.0.0/16", + serviceEndpoints: [ + { + networkIdentifier: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/subnet-test/providers/Microsoft.Network/publicIPAddresses/test-ip", + }, + service: "Microsoft.Storage", + }, + ], + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. + * This sample demonstrates how to creates or updates a subnet in the specified virtual network. * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateServiceEndpoint.json + * @summary creates or updates a subnet in the specified virtual network. + * x-ms-original-file: 2025-07-01/SubnetCreateWithDelegation.json */ -async function createSubnetWithServiceEndpoints(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }; +async function createSubnetWithADelegation(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); + const result = await client.subnets.createOrUpdate("subnet-test", "vnetname", "subnet1", { + addressPrefix: "10.0.0.0/16", + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. + * This sample demonstrates how to creates or updates a subnet in the specified virtual network. * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json + * @summary creates or updates a subnet in the specified virtual network. + * x-ms-original-file: 2025-07-01/SubnetCreateWithServiceGateway.json */ -async function createSubnetWithServiceEndpointsWithNetworkIdentifier(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [ - { - networkIdentifier: { - id: "/subscriptions/subid/resourceGroups/subnet-test/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - service: "Microsoft.Storage", - }, - ], - }; +async function createSubnetWithServiceGateway(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); + const result = await client.subnets.createOrUpdate("subnet-test", "vnetname", "subnet1", { + addressPrefix: "10.0.0.0/16", + serviceGateway: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/serviceGateways/SG1", + }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. + * This sample demonstrates how to creates or updates a subnet in the specified virtual network. * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateWithSharingScope.json + * @summary creates or updates a subnet in the specified virtual network. + * x-ms-original-file: 2025-07-01/SubnetCreateWithSharingScope.json */ async function createSubnetWithSharingScope(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { addressPrefix: "10.0.0.0/16" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); + const result = await client.subnets.createOrUpdate("subnet-test", "vnetname", "subnet1", { + addressPrefix: "10.0.0.0/16", + }); console.log(result); } async function main(): Promise { - await createSubnetWithServiceGateway(); await createSubnet(); - await createSubnetWithADelegation(); await createSubnetWithServiceEndpoints(); await createSubnetWithServiceEndpointsWithNetworkIdentifier(); + await createSubnetWithADelegation(); + await createSubnetWithServiceGateway(); await createSubnetWithSharingScope(); } diff --git a/sdk/network/arm-network/samples-dev/subnetsDeleteSample.ts b/sdk/network/arm-network/samples-dev/subnetsDeleteSample.ts index c85cefe78f04..334524fcc224 100644 --- a/sdk/network/arm-network/samples-dev/subnetsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsDeleteSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified subnet. + * This sample demonstrates how to deletes the specified subnet. * - * @summary Deletes the specified subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetDelete.json + * @summary deletes the specified subnet. + * x-ms-original-file: 2025-07-01/SubnetDelete.json */ async function deleteSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); + await client.subnets.delete("subnet-test", "vnetname", "subnet1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/subnetsGetSample.ts b/sdk/network/arm-network/samples-dev/subnetsGetSample.ts index 4d4ea1868396..1f8c2968a765 100644 --- a/sdk/network/arm-network/samples-dev/subnetsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsGetSample.ts @@ -3,71 +3,46 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. + * This sample demonstrates how to gets the specified subnet by virtual network and resource group. * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetGet.json + * @summary gets the specified subnet by virtual network and resource group. + * x-ms-original-file: 2025-07-01/SubnetGet.json */ async function getSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get( - resourceGroupName, - virtualNetworkName, - subnetName, - ); + const result = await client.subnets.get("subnet-test", "vnetname", "subnet1"); console.log(result); } /** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. + * This sample demonstrates how to gets the specified subnet by virtual network and resource group. * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetGetWithDelegation.json + * @summary gets the specified subnet by virtual network and resource group. + * x-ms-original-file: 2025-07-01/SubnetGetWithDelegation.json */ async function getSubnetWithADelegation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get( - resourceGroupName, - virtualNetworkName, - subnetName, - ); + const result = await client.subnets.get("subnet-test", "vnetname", "subnet1"); console.log(result); } /** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. + * This sample demonstrates how to gets the specified subnet by virtual network and resource group. * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetGetWithSharingScope.json + * @summary gets the specified subnet by virtual network and resource group. + * x-ms-original-file: 2025-07-01/SubnetGetWithSharingScope.json */ async function getSubnetWithSharingScope(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get( - resourceGroupName, - virtualNetworkName, - subnetName, - ); + const result = await client.subnets.get("subnet-test", "vnetname", "subnet1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/subnetsListSample.ts b/sdk/network/arm-network/samples-dev/subnetsListSample.ts index 3ea9c6acbf48..7b049a30efc6 100644 --- a/sdk/network/arm-network/samples-dev/subnetsListSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsListSample.ts @@ -3,28 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all subnets in a virtual network. + * This sample demonstrates how to gets all subnets in a virtual network. * - * @summary Gets all subnets in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetList.json + * @summary gets all subnets in a virtual network. + * x-ms-original-file: 2025-07-01/SubnetList.json */ async function listSubnets(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.subnets.list( - resourceGroupName, - virtualNetworkName, - )) { + for await (const item of client.subnets.list("subnet-test", "vnetname")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/subnetsPrepareNetworkPoliciesSample.ts b/sdk/network/arm-network/samples-dev/subnetsPrepareNetworkPoliciesSample.ts index c11fc69a0ea4..3ba74e14e1aa 100644 --- a/sdk/network/arm-network/samples-dev/subnetsPrepareNetworkPoliciesSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsPrepareNetworkPoliciesSample.ts @@ -1,36 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - PrepareNetworkPoliciesRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Prepares a subnet by applying network intent policies. + * This sample demonstrates how to prepares a subnet by applying network intent policies. * - * @summary Prepares a subnet by applying network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetPrepareNetworkPolicies.json + * @summary prepares a subnet by applying network intent policies. + * x-ms-original-file: 2025-07-01/SubnetPrepareNetworkPolicies.json */ async function prepareNetworkPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const subnetName = "subnet1"; - const prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest = - { serviceName: "Microsoft.Sql/managedInstances" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginPrepareNetworkPoliciesAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - prepareNetworkPoliciesRequestParameters, - ); - console.log(result); + await client.subnets.prepareNetworkPolicies("rg1", "test-vnet", "subnet1", { + serviceName: "Microsoft.Sql/managedInstances", + }); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/subnetsUnprepareNetworkPoliciesSample.ts b/sdk/network/arm-network/samples-dev/subnetsUnprepareNetworkPoliciesSample.ts index 962dc9346090..09cfa9a1ffd8 100644 --- a/sdk/network/arm-network/samples-dev/subnetsUnprepareNetworkPoliciesSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsUnprepareNetworkPoliciesSample.ts @@ -1,36 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - UnprepareNetworkPoliciesRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Unprepares a subnet by removing network intent policies. + * This sample demonstrates how to unprepares a subnet by removing network intent policies. * - * @summary Unprepares a subnet by removing network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetUnprepareNetworkPolicies.json + * @summary unprepares a subnet by removing network intent policies. + * x-ms-original-file: 2025-07-01/SubnetUnprepareNetworkPolicies.json */ async function unprepareNetworkPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const subnetName = "subnet1"; - const unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest = - { serviceName: "Microsoft.Sql/managedInstances" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginUnprepareNetworkPoliciesAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - unprepareNetworkPoliciesRequestParameters, - ); - console.log(result); + await client.subnets.unprepareNetworkPolicies("rg1", "test-vnet", "subnet1", { + serviceName: "Microsoft.Sql/managedInstances", + }); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts index 77656c1591df..6f1d14143f5e 100644 --- a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts @@ -1,36 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - NetworkManagerConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a network manager connection on this subscription. + * This sample demonstrates how to create a network manager connection on this subscription. * - * @summary Create a network manager connection on this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionPut.json + * @summary create a network manager connection on this subscription. + * x-ms-original-file: 2025-07-01/NetworkManagerConnectionSubscriptionPut.json */ async function createOrUpdateSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const parameters: NetworkManagerConnection = { - networkManagerId: - "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.subscriptionNetworkManagerConnections.createOrUpdate( - networkManagerConnectionName, - parameters, - ); + const result = await client.subscriptionNetworkManagerConnections.createOrUpdate( + "TestNMConnection", + { + networkManagerId: + "/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsDeleteSample.ts index f9709a3d1575..c1fcc5dc5e19 100644 --- a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete specified connection created by this subscription. + * This sample demonstrates how to delete specified connection created by this subscription. * - * @summary Delete specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json + * @summary delete specified connection created by this subscription. + * x-ms-original-file: 2025-07-01/NetworkManagerConnectionSubscriptionDelete.json */ async function deleteSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.delete( - networkManagerConnectionName, - ); - console.log(result); + await client.subscriptionNetworkManagerConnections.delete("TestNMConnection"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsGetSample.ts index 3349f95bb847..1aaecf5ddf09 100644 --- a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a specified connection created by this subscription. + * This sample demonstrates how to get a specified connection created by this subscription. * - * @summary Get a specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionGet.json + * @summary get a specified connection created by this subscription. + * x-ms-original-file: 2025-07-01/NetworkManagerConnectionSubscriptionGet.json */ async function getSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.get( - networkManagerConnectionName, - ); + const result = await client.subscriptionNetworkManagerConnections.get("TestNMConnection"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsListSample.ts index 8be51a3ea6d6..8d181b5b2c05 100644 --- a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsListSample.ts @@ -3,24 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all network manager connections created by this subscription. + * This sample demonstrates how to list all network manager connections created by this subscription. * - * @summary List all network manager connections created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionList.json + * @summary list all network manager connections created by this subscription. + * x-ms-original-file: 2025-07-01/NetworkManagerConnectionSubscriptionList.json */ async function listSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.subscriptionNetworkManagerConnections.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/supportedSecurityProvidersSample.ts b/sdk/network/arm-network/samples-dev/supportedSecurityProvidersSample.ts index e453eea1d6e7..01881c8334a2 100644 --- a/sdk/network/arm-network/samples-dev/supportedSecurityProvidersSample.ts +++ b/sdk/network/arm-network/samples-dev/supportedSecurityProvidersSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gives the supported security providers for the virtual wan. + * This sample demonstrates how to gives the supported security providers for the virtual wan. * - * @summary Gives the supported security providers for the virtual wan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWanSupportedSecurityProviders.json + * @summary gives the supported security providers for the virtual wan. + * x-ms-original-file: 2025-07-01/VirtualWanSupportedSecurityProviders.json */ async function supportedSecurityProviders(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.supportedSecurityProviders( - resourceGroupName, - virtualWANName, - ); + const result = await client.supportedSecurityProviders("rg1", "wan1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/usagesListSample.ts b/sdk/network/arm-network/samples-dev/usagesListSample.ts index 2fadb8c4ec2a..eec56d5757dc 100644 --- a/sdk/network/arm-network/samples-dev/usagesListSample.ts +++ b/sdk/network/arm-network/samples-dev/usagesListSample.ts @@ -3,41 +3,40 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List network usages for a subscription. + * This sample demonstrates how to list network usages for a subscription. * - * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/UsageList.json + * @summary list network usages for a subscription. + * x-ms-original-file: 2025-07-01/UsageList.json */ async function listUsages(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.usages.list(location)) { + for await (const item of client.usages.list("westus")) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to List network usages for a subscription. + * This sample demonstrates how to list network usages for a subscription. * - * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/UsageListSpacedLocation.json + * @summary list network usages for a subscription. + * x-ms-original-file: 2025-07-01/UsageListSpacedLocation.json */ async function listUsagesSpacedLocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "West US"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.usages.list(location)) { + for await (const item of client.usages.list("West US")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/verifierWorkspacesCreateSample.ts b/sdk/network/arm-network/samples-dev/verifierWorkspacesCreateSample.ts index ff5c445b927a..189c68959c1a 100644 --- a/sdk/network/arm-network/samples-dev/verifierWorkspacesCreateSample.ts +++ b/sdk/network/arm-network/samples-dev/verifierWorkspacesCreateSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { VerifierWorkspace} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates Verifier Workspace. + * This sample demonstrates how to creates Verifier Workspace. * - * @summary Creates Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspacePut.json + * @summary creates Verifier Workspace. + * x-ms-original-file: 2025-07-01/VerifierWorkspacePut.json */ async function verifierWorkspaceCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const body: VerifierWorkspace = { - location: "eastus", - properties: { description: "A sample workspace" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.verifierWorkspaces.create( - resourceGroupName, - networkManagerName, - workspaceName, - body, + "rg1", + "testNetworkManager", + "testWorkspace", + { location: "eastus", properties: { description: "A sample workspace" } }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/verifierWorkspacesDeleteSample.ts b/sdk/network/arm-network/samples-dev/verifierWorkspacesDeleteSample.ts index e69e0c1339a1..907837f75c17 100644 --- a/sdk/network/arm-network/samples-dev/verifierWorkspacesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/verifierWorkspacesDeleteSample.ts @@ -3,29 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes Verifier Workspace. + * This sample demonstrates how to deletes Verifier Workspace. * - * @summary Deletes Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceDelete.json + * @summary deletes Verifier Workspace. + * x-ms-original-file: 2025-07-01/VerifierWorkspaceDelete.json */ async function verifierWorkspaceDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); + await client.verifierWorkspaces.delete("rg1", "testNetworkManager", "testWorkspace"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/verifierWorkspacesGetSample.ts b/sdk/network/arm-network/samples-dev/verifierWorkspacesGetSample.ts index 1ff5d7e27725..a067357149d2 100644 --- a/sdk/network/arm-network/samples-dev/verifierWorkspacesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/verifierWorkspacesGetSample.ts @@ -3,28 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets Verifier Workspace. + * This sample demonstrates how to gets Verifier Workspace. * - * @summary Gets Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceGet.json + * @summary gets Verifier Workspace. + * x-ms-original-file: 2025-07-01/VerifierWorkspaceGet.json */ async function verifierWorkspaceGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.get( - resourceGroupName, - networkManagerName, - workspaceName, - ); + const result = await client.verifierWorkspaces.get("rg1", "testNetworkManager", "testWorkspace"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/verifierWorkspacesListSample.ts b/sdk/network/arm-network/samples-dev/verifierWorkspacesListSample.ts index 97b0bc039e89..e4550c1e59c1 100644 --- a/sdk/network/arm-network/samples-dev/verifierWorkspacesListSample.ts +++ b/sdk/network/arm-network/samples-dev/verifierWorkspacesListSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets list of Verifier Workspaces. + * This sample demonstrates how to gets list of Verifier Workspaces. * - * @summary Gets list of Verifier Workspaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceList.json + * @summary gets list of Verifier Workspaces. + * x-ms-original-file: 2025-07-01/VerifierWorkspaceList.json */ async function verifierWorkspaceList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.verifierWorkspaces.list( - resourceGroupName, - networkManagerName, - )) { + for await (const item of client.verifierWorkspaces.list("rg1", "testNetworkManager")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/verifierWorkspacesUpdateSample.ts b/sdk/network/arm-network/samples-dev/verifierWorkspacesUpdateSample.ts index c9dea62d2c54..a9b6efcefdb1 100644 --- a/sdk/network/arm-network/samples-dev/verifierWorkspacesUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/verifierWorkspacesUpdateSample.ts @@ -3,27 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates Verifier Workspace. + * This sample demonstrates how to updates Verifier Workspace. * - * @summary Updates Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspacePatch.json + * @summary updates Verifier Workspace. + * x-ms-original-file: 2025-07-01/VerifierWorkspacePatch.json */ async function verifierWorkspacePatch(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.verifierWorkspaces.update( - resourceGroupName, - networkManagerName, - workspaceName, + "rg1", + "testNetworkManager", + "testWorkspace", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vipSwapCreateSample.ts b/sdk/network/arm-network/samples-dev/vipSwapCreateSample.ts index 5e023f51727d..d96f39d5f40c 100644 --- a/sdk/network/arm-network/samples-dev/vipSwapCreateSample.ts +++ b/sdk/network/arm-network/samples-dev/vipSwapCreateSample.ts @@ -1,30 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { SwapResource} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Performs vip swap operation on swappable cloud services. + * This sample demonstrates how to performs vip swap operation on swappable cloud services. * - * @summary Performs vip swap operation on swappable cloud services. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapPut.json + * @summary performs vip swap operation on swappable cloud services. + * x-ms-original-file: 2025-07-01/CloudServiceSwapPut.json */ async function putVipSwapOperation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const parameters: SwapResource = { properties: { slotType: "Production" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.beginCreateAndWait( - groupName, - resourceName, - parameters, - ); - console.log(result); + await client.vipSwap.create("rg1", "testCloudService", { + properties: { slotType: "Production" }, + }); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/vipSwapGetSample.ts b/sdk/network/arm-network/samples-dev/vipSwapGetSample.ts index 5cef4f2b5821..742035b1abe1 100644 --- a/sdk/network/arm-network/samples-dev/vipSwapGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vipSwapGetSample.ts @@ -3,21 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production + * This sample demonstrates how to gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production * - * @summary Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapGet.json + * @summary gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production + * x-ms-original-file: 2025-07-01/CloudServiceSwapGet.json */ async function getSwapResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.get(groupName, resourceName); + const result = await client.vipSwap.get("rg1", "testCloudService"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vipSwapListSample.ts b/sdk/network/arm-network/samples-dev/vipSwapListSample.ts index c39f94979aa0..39242a5228b9 100644 --- a/sdk/network/arm-network/samples-dev/vipSwapListSample.ts +++ b/sdk/network/arm-network/samples-dev/vipSwapListSample.ts @@ -3,21 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production + * This sample demonstrates how to gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production * - * @summary Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapList.json + * @summary gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production + * x-ms-original-file: 2025-07-01/CloudServiceSwapList.json */ async function getSwapResourceList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.list(groupName, resourceName); + const result = await client.vipSwap.list("rg1", "testCloudService"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSitesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSitesCreateOrUpdateSample.ts index a80a7bbbe595..567b1c7c86eb 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSitesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSitesCreateOrUpdateSample.ts @@ -1,39 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualApplianceSite} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Site. + * This sample demonstrates how to creates or updates the specified Network Virtual Appliance Site. * - * @summary Creates or updates the specified Network Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSitePut.json + * @summary creates or updates the specified Network Virtual Appliance Site. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceSitePut.json */ async function createNetworkVirtualApplianceSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const parameters: VirtualApplianceSite = { - addressPrefix: "192.168.1.0/24", - o365Policy: { - breakOutCategories: { default: true, allow: true, optimize: true }, - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - siteName, - parameters, - ); + const result = await client.virtualApplianceSites.createOrUpdate("rg1", "nva", "site1", { + addressPrefix: "192.168.1.0/24", + o365Policy: { breakOutCategories: { default: true, allow: true, optimize: true } }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSitesDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSitesDeleteSample.ts index 15f99da290f5..e2f80f0a8115 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSitesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSitesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified site from a Virtual Appliance. + * This sample demonstrates how to deletes the specified site from a Virtual Appliance. * - * @summary Deletes the specified site from a Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteDelete.json + * @summary deletes the specified site from a Virtual Appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceSiteDelete.json */ async function deleteNetworkVirtualApplianceSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - siteName, - ); - console.log(result); + await client.virtualApplianceSites.delete("rg1", "nva", "site1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSitesGetSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSitesGetSample.ts index 97b64840d5ef..14bf6abf71c2 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSitesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSitesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Virtual Appliance Site. + * This sample demonstrates how to gets the specified Virtual Appliance Site. * - * @summary Gets the specified Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteGet.json + * @summary gets the specified Virtual Appliance Site. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceSiteGet.json */ async function getNetworkVirtualApplianceSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.get( - resourceGroupName, - networkVirtualApplianceName, - siteName, - ); + const result = await client.virtualApplianceSites.get("rg1", "nva", "site1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSitesListSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSitesListSample.ts index 81d80115968d..5e7ea2ce0f9d 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSitesListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSitesListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. + * This sample demonstrates how to lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. * - * @summary Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteList.json + * @summary lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceSiteList.json */ async function listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualApplianceSites.list( - resourceGroupName, - networkVirtualApplianceName, - )) { + for await (const item of client.virtualApplianceSites.list("rg1", "nva")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSkusGetSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSkusGetSample.ts index b4b2f5731065..65f29bd2c936 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSkusGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSkusGetSample.ts @@ -3,20 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves a single available sku for network virtual appliance. + * This sample demonstrates how to retrieves a single available sku for network virtual appliance. * - * @summary Retrieves a single available sku for network virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSkuGet.json + * @summary retrieves a single available sku for network virtual appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceSkuGet.json */ async function networkVirtualApplianceSkuGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const skuName = "ciscoSdwan"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSkus.get(skuName); + const result = await client.virtualApplianceSkus.get("ciscoSdwan"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSkusListSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSkusListSample.ts index 06ce0c8b2ed6..c6136286e3b8 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSkusListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSkusListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all SKUs available for a virtual appliance. + * This sample demonstrates how to list all SKUs available for a virtual appliance. * - * @summary List all SKUs available for a virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSkuList.json + * @summary list all SKUs available for a virtual appliance. + * x-ms-original-file: 2025-07-01/NetworkVirtualApplianceSkuList.json */ async function networkVirtualApplianceSkuListResult(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualApplianceSkus.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionCreateOrUpdateSample.ts index 791ddd912753..86fd3a80cb9f 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionCreateOrUpdateSample.ts @@ -1,38 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { BgpConnection} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. + * This sample demonstrates how to creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. * - * @summary Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionPut.json + * @summary creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. + * x-ms-original-file: 2025-07-01/VirtualHubBgpConnectionPut.json */ async function virtualHubRouteTableV2Put(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const parameters: BgpConnection = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualHubBgpConnection.createOrUpdate("rg1", "hub1", "conn1", { hubVirtualNetworkConnection: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1", }, peerAsn: 20000, peerIp: "192.168.1.5", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubBgpConnection.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - connectionName, - parameters, - ); + routingConfiguration: { + inboundRouteMap: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/routeMaps/routeMap1", + }, + outboundRouteMap: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/routeMaps/routeMap2", + }, + }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionDeleteSample.ts index 343c386f11b7..29ab6928b3d2 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a VirtualHubBgpConnection. + * This sample demonstrates how to deletes a VirtualHubBgpConnection. * - * @summary Deletes a VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionDelete.json + * @summary deletes a VirtualHubBgpConnection. + * x-ms-original-file: 2025-07-01/VirtualHubBgpConnectionDelete.json */ async function virtualHubRouteTableV2Delete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); + await client.virtualHubBgpConnection.delete("rg1", "hub1", "conn1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionGetSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionGetSample.ts index 5c9cd7c0a480..c8a426cbd21d 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a Virtual Hub Bgp Connection. + * This sample demonstrates how to retrieves the details of a Virtual Hub Bgp Connection. * - * @summary Retrieves the details of a Virtual Hub Bgp Connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionGet.json + * @summary retrieves the details of a Virtual Hub Bgp Connection. + * x-ms-original-file: 2025-07-01/VirtualHubBgpConnectionGet.json */ async function virtualHubVirtualHubRouteTableV2Get(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.get( - resourceGroupName, - virtualHubName, - connectionName, - ); + const result = await client.virtualHubBgpConnection.get("rg1", "hub1", "conn1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts index e546e8e9c745..574781ff1513 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + * This sample demonstrates how to retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. * - * @summary Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json + * @summary retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + * x-ms-original-file: 2025-07-01/VirtualRouterPeerListAdvertisedRoute.json */ async function virtualRouterPeerListAdvertisedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const hubName = "virtualRouter1"; - const connectionName = "peer1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubBgpConnections.beginListAdvertisedRoutesAndWait( - resourceGroupName, - hubName, - connectionName, - ); + const result = await client.virtualHubBgpConnections.listAdvertisedRoutes( + "rg1", + "virtualRouter1", + "peer1", + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListLearnedRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListLearnedRoutesSample.ts index ffaf8b821b86..90ea3b19681b 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListLearnedRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListLearnedRoutesSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection has learned. + * This sample demonstrates how to retrieves a list of routes the virtual hub bgp connection has learned. * - * @summary Retrieves a list of routes the virtual hub bgp connection has learned. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeerListLearnedRoute.json + * @summary retrieves a list of routes the virtual hub bgp connection has learned. + * x-ms-original-file: 2025-07-01/VirtualRouterPeerListLearnedRoute.json */ async function virtualRouterPeerListLearnedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const hubName = "virtualRouter1"; - const connectionName = "peer1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubBgpConnections.beginListLearnedRoutesAndWait( - resourceGroupName, - hubName, - connectionName, - ); + const result = await client.virtualHubBgpConnections.listLearnedRoutes( + "rg1", + "virtualRouter1", + "peer1", + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListSample.ts index 13850592f747..2945708b0c3d 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of all VirtualHubBgpConnections. + * This sample demonstrates how to retrieves the details of all VirtualHubBgpConnections. * - * @summary Retrieves the details of all VirtualHubBgpConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionList.json + * @summary retrieves the details of all VirtualHubBgpConnections. + * x-ms-original-file: 2025-07-01/VirtualHubBgpConnectionList.json */ async function virtualHubRouteTableV2List(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualHubBgpConnections.list( - resourceGroupName, - virtualHubName, - )) { + for await (const item of client.virtualHubBgpConnections.list("rg1", "hub1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationCreateOrUpdateSample.ts deleted file mode 100644 index 90a2cf396430..000000000000 --- a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationCreateOrUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - HubIpConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * - * @summary Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationPut.json - */ -async function virtualHubIPConfigurationPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const parameters: HubIpConfiguration = { - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubIpConfiguration.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - ipConfigName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubIPConfigurationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationDeleteSample.ts deleted file mode 100644 index 211769b507c4..000000000000 --- a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VirtualHubIpConfiguration. - * - * @summary Deletes a VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationDelete.json - */ -async function virtualHubIPConfigurationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - ipConfigName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubIPConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationGetSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationGetSample.ts deleted file mode 100644 index a93327b89553..000000000000 --- a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a Virtual Hub Ip configuration. - * - * @summary Retrieves the details of a Virtual Hub Ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationGet.json - */ -async function virtualHubVirtualHubRouteTableV2Get(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.get( - resourceGroupName, - virtualHubName, - ipConfigName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationListSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationListSample.ts deleted file mode 100644 index 8d93863d056c..000000000000 --- a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubIpConfigurations. - * - * @summary Retrieves the details of all VirtualHubIpConfigurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationList.json - */ -async function virtualHubRouteTableV2List(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubIpConfiguration.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationCreateOrUpdateSample.ts new file mode 100644 index 000000000000..37056ae0cc9a --- /dev/null +++ b/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationCreateOrUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. + * + * @summary creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. + * x-ms-original-file: 2025-07-01/VirtualHubIpConfigurationPut.json + */ +async function virtualHubIpConfigurationPut(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualHubIpConfiguration.createOrUpdate("rg1", "hub1", "ipconfig1", { + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + }, + }); + console.log(result); +} + +async function main(): Promise { + await virtualHubIpConfigurationPut(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationDeleteSample.ts new file mode 100644 index 000000000000..2575383026a8 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes a VirtualHubIpConfiguration. + * + * @summary deletes a VirtualHubIpConfiguration. + * x-ms-original-file: 2025-07-01/VirtualHubIpConfigurationDelete.json + */ +async function virtualHubIpConfigurationDelete(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.virtualHubIpConfiguration.delete("rg1", "hub1", "ipconfig1"); +} + +async function main(): Promise { + await virtualHubIpConfigurationDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationGetSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationGetSample.ts new file mode 100644 index 000000000000..bba5516658f3 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves the details of a Virtual Hub Ip configuration. + * + * @summary retrieves the details of a Virtual Hub Ip configuration. + * x-ms-original-file: 2025-07-01/VirtualHubIpConfigurationGet.json + */ +async function virtualHubVirtualHubRouteTableV2Get(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualHubIpConfiguration.get("rg1", "hub1", "ipconfig1"); + console.log(result); +} + +async function main(): Promise { + await virtualHubVirtualHubRouteTableV2Get(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationListSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationListSample.ts new file mode 100644 index 000000000000..81b5a653fb9d --- /dev/null +++ b/sdk/network/arm-network/samples-dev/virtualHubIpConfigurationListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves the details of all VirtualHubIpConfigurations. + * + * @summary retrieves the details of all VirtualHubIpConfigurations. + * x-ms-original-file: 2025-07-01/VirtualHubIpConfigurationList.json + */ +async function virtualHubRouteTableV2List(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.virtualHubIpConfiguration.list("rg1", "hub1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await virtualHubRouteTableV2List(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SCreateOrUpdateSample.ts index 883198cd5c93..e87360006958 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SCreateOrUpdateSample.ts @@ -1,51 +1,41 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualHubRouteTableV2} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. + * This sample demonstrates how to creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. * - * @summary Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Put.json + * @summary creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. + * x-ms-original-file: 2025-07-01/VirtualHubRouteTableV2Put.json */ async function virtualHubRouteTableV2Put(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2 = { - attachedConnections: ["All_Vnets"], - routes: [ - { - destinationType: "CIDR", - destinations: ["20.10.0.0/16", "20.20.0.0/16"], - nextHopType: "IPAddress", - nextHops: ["10.0.0.68"], - }, - { - destinationType: "CIDR", - destinations: ["0.0.0.0/0"], - nextHopType: "IPAddress", - nextHops: ["10.0.0.68"], - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubRouteTableV2S.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - virtualHubRouteTableV2Parameters, - ); + const result = await client.virtualHubRouteTableV2S.createOrUpdate( + "rg1", + "virtualHub1", + "virtualHubRouteTable1a", + { + attachedConnections: ["All_Vnets"], + routes: [ + { + destinationType: "CIDR", + destinations: ["20.10.0.0/16", "20.20.0.0/16"], + nextHopType: "IPAddress", + nextHops: ["10.0.0.68"], + }, + { + destinationType: "CIDR", + destinations: ["0.0.0.0/0"], + nextHopType: "IPAddress", + nextHops: ["10.0.0.68"], + }, + ], + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SDeleteSample.ts index 432e429dffa2..6e446a63172c 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a VirtualHubRouteTableV2. + * This sample demonstrates how to deletes a VirtualHubRouteTableV2. * - * @summary Deletes a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Delete.json + * @summary deletes a VirtualHubRouteTableV2. + * x-ms-original-file: 2025-07-01/VirtualHubRouteTableV2Delete.json */ async function virtualHubRouteTableV2Delete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubRouteTableV2S.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); + await client.virtualHubRouteTableV2S.delete("rg1", "virtualHub1", "virtualHubRouteTable1a"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SGetSample.ts b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SGetSample.ts index 596ff02dfe34..5080bd40edd5 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SGetSample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a VirtualHubRouteTableV2. + * This sample demonstrates how to retrieves the details of a VirtualHubRouteTableV2. * - * @summary Retrieves the details of a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Get.json + * @summary retrieves the details of a VirtualHubRouteTableV2. + * x-ms-original-file: 2025-07-01/VirtualHubRouteTableV2Get.json */ async function virtualHubVirtualHubRouteTableV2Get(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.virtualHubRouteTableV2S.get( - resourceGroupName, - virtualHubName, - routeTableName, + "rg1", + "virtualHub1", + "virtualHubRouteTable1a", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SListSample.ts b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SListSample.ts index 1cae4a5e532c..3f3af20f5c06 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of all VirtualHubRouteTableV2s. + * This sample demonstrates how to retrieves the details of all VirtualHubRouteTableV2s. * - * @summary Retrieves the details of all VirtualHubRouteTableV2s. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2List.json + * @summary retrieves the details of all VirtualHubRouteTableV2s. + * x-ms-original-file: 2025-07-01/VirtualHubRouteTableV2List.json */ async function virtualHubRouteTableV2List(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualHubRouteTableV2S.list( - resourceGroupName, - virtualHubName, - )) { + for await (const item of client.virtualHubRouteTableV2S.list("rg1", "virtualHub1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsCreateOrUpdateSample.ts index ff203532c5aa..2193e740e9f2 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsCreateOrUpdateSample.ts @@ -1,37 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { VirtualHub} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + * This sample demonstrates how to creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. * - * @summary Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubPut.json + * @summary creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + * x-ms-original-file: 2025-07-01/VirtualHubPut.json */ async function virtualHubPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub2"; - const virtualHubParameters: VirtualHub = { - addressPrefix: "10.168.0.0/24", + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualHubs.createOrUpdate("rg1", "virtualHub2", { location: "West US", + addressPrefix: "10.168.0.0/24", sku: "Basic", - tags: { key1: "value1" }, virtualWan: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1", }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - virtualHubParameters, - ); + tags: { key1: "value1" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubsDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsDeleteSample.ts index 0106312c2c08..1f2ed69b666b 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a VirtualHub. + * This sample demonstrates how to deletes a VirtualHub. * - * @summary Deletes a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubDelete.json + * @summary deletes a VirtualHub. + * x-ms-original-file: 2025-07-01/VirtualHubDelete.json */ async function virtualHubDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - ); - console.log(result); + await client.virtualHubs.delete("rg1", "virtualHub1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualHubsGetEffectiveVirtualHubRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsGetEffectiveVirtualHubRoutesSample.ts index 1f86d8ad5cee..e105561555c6 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsGetEffectiveVirtualHubRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsGetEffectiveVirtualHubRoutesSample.ts @@ -1,95 +1,60 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - EffectiveRoutesParameters, - VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . + * This sample demonstrates how to gets the effective routes configured for the Virtual Hub resource or the specified resource . * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EffectiveRoutesListForConnection.json + * @summary gets the effective routes configured for the Virtual Hub resource or the specified resource . + * x-ms-original-file: 2025-07-01/EffectiveRoutesListForConnection.json */ async function effectiveRoutesForAConnectionResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters: EffectiveRoutesParameters = { - resourceId: - "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName", - virtualWanResourceType: "ExpressRouteConnection", - }; - const options: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams = { - effectiveRoutesParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); + const result = await client.virtualHubs.getEffectiveVirtualHubRoutes("rg1", "virtualHub1", { + effectiveRoutesParameters: { + resourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName", + virtualWanResourceType: "ExpressRouteConnection", + }, + }); console.log(result); } /** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . + * This sample demonstrates how to gets the effective routes configured for the Virtual Hub resource or the specified resource . * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EffectiveRoutesListForRouteTable.json + * @summary gets the effective routes configured for the Virtual Hub resource or the specified resource . + * x-ms-original-file: 2025-07-01/EffectiveRoutesListForRouteTable.json */ async function effectiveRoutesForARouteTableResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters: EffectiveRoutesParameters = { - resourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - virtualWanResourceType: "RouteTable", - }; - const options: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams = { - effectiveRoutesParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); + const result = await client.virtualHubs.getEffectiveVirtualHubRoutes("rg1", "virtualHub1", { + effectiveRoutesParameters: { + resourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", + virtualWanResourceType: "RouteTable", + }, + }); console.log(result); } /** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . + * This sample demonstrates how to gets the effective routes configured for the Virtual Hub resource or the specified resource . * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EffectiveRoutesListForVirtualHub.json + * @summary gets the effective routes configured for the Virtual Hub resource or the specified resource . + * x-ms-original-file: 2025-07-01/EffectiveRoutesListForVirtualHub.json */ async function effectiveRoutesForTheVirtualHub(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters: EffectiveRoutesParameters = {}; - const options: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams = { - effectiveRoutesParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); + const result = await client.virtualHubs.getEffectiveVirtualHubRoutes("rg1", "virtualHub1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubsGetInboundRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsGetInboundRoutesSample.ts index b76ca713b8ea..387396fa38f8 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsGetInboundRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsGetInboundRoutesSample.ts @@ -1,36 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - GetInboundRoutesParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the inbound routes configured for the Virtual Hub on a particular connection. + * This sample demonstrates how to gets the inbound routes configured for the Virtual Hub on a particular connection. * - * @summary Gets the inbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetInboundRoutes.json + * @summary gets the inbound routes configured for the Virtual Hub on a particular connection. + * x-ms-original-file: 2025-07-01/GetInboundRoutes.json */ async function inboundRoutesForTheVirtualHubOnAParticularConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const getInboundRoutesParameters: GetInboundRoutesParameters = { - connectionType: "ExpressRouteConnection", - resourceUri: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetInboundRoutesAndWait( - resourceGroupName, - virtualHubName, - getInboundRoutesParameters, - ); + const result = await client.virtualHubs.getInboundRoutes("rg1", "virtualHub1", { + connectionType: "ExpressRouteConnection", + resourceUri: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubsGetOutboundRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsGetOutboundRoutesSample.ts index fb9d2fe814ef..a4fc5ce1d37e 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsGetOutboundRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsGetOutboundRoutesSample.ts @@ -1,36 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - GetOutboundRoutesParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the outbound routes configured for the Virtual Hub on a particular connection. + * This sample demonstrates how to gets the outbound routes configured for the Virtual Hub on a particular connection. * - * @summary Gets the outbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetOutboundRoutes.json + * @summary gets the outbound routes configured for the Virtual Hub on a particular connection. + * x-ms-original-file: 2025-07-01/GetOutboundRoutes.json */ async function outboundRoutesForTheVirtualHubOnAParticularConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const getOutboundRoutesParameters: GetOutboundRoutesParameters = { - connectionType: "ExpressRouteConnection", - resourceUri: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetOutboundRoutesAndWait( - resourceGroupName, - virtualHubName, - getOutboundRoutesParameters, - ); + const result = await client.virtualHubs.getOutboundRoutes("rg1", "virtualHub1", { + connectionType: "ExpressRouteConnection", + resourceUri: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubsGetSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsGetSample.ts index e7947b36185d..7c391ac089dd 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a VirtualHub. + * This sample demonstrates how to retrieves the details of a VirtualHub. * - * @summary Retrieves the details of a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubGet.json + * @summary retrieves the details of a VirtualHub. + * x-ms-original-file: 2025-07-01/VirtualHubGet.json */ async function virtualHubGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.get( - resourceGroupName, - virtualHubName, - ); + const result = await client.virtualHubs.get("rg1", "virtualHub1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsListByResourceGroupSample.ts index 600940a1b0ed..648fa7d917fe 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the VirtualHubs in a resource group. + * This sample demonstrates how to lists all the VirtualHubs in a resource group. * - * @summary Lists all the VirtualHubs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubListByResourceGroup.json + * @summary lists all the VirtualHubs in a resource group. + * x-ms-original-file: 2025-07-01/VirtualHubListByResourceGroup.json */ async function virtualHubListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualHubs.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.virtualHubs.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubsListSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsListSample.ts index cba21c60686d..96e4dc0da205 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the VirtualHubs in a subscription. + * This sample demonstrates how to lists all the VirtualHubs in a subscription. * - * @summary Lists all the VirtualHubs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubList.json + * @summary lists all the VirtualHubs in a subscription. + * x-ms-original-file: 2025-07-01/VirtualHubList.json */ async function virtualHubList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualHubs.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualHubsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsUpdateTagsSample.ts index f22df6600715..cbc41576304f 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsUpdateTagsSample.ts @@ -1,31 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates VirtualHub tags. + * This sample demonstrates how to updates VirtualHub tags. * - * @summary Updates VirtualHub tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubUpdateTags.json + * @summary updates VirtualHub tags. + * x-ms-original-file: 2025-07-01/VirtualHubUpdateTags.json */ async function virtualHubUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub2"; - const virtualHubParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.updateTags( - resourceGroupName, - virtualHubName, - virtualHubParameters, - ); + const result = await client.virtualHubs.updateTags("rg1", "virtualHub2", { + tags: { key1: "value1", key2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesCreateOrUpdateSample.ts index e0faa1c09c3b..e6a1d717dcf3 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesCreateOrUpdateSample.ts @@ -1,39 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualNetworkAppliance} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a virtual network appliance. + * This sample demonstrates how to creates or updates a virtual network appliance. * - * @summary Creates or updates a virtual network appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_CreateOrUpdate.json + * @summary creates or updates a virtual network appliance. + * x-ms-original-file: 2025-07-01/VirtualNetworkAppliances_CreateOrUpdate.json */ async function createVirtualNetworkAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; - const parameters: VirtualNetworkAppliance = { - bandwidthInGbps: "100", + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkAppliances.createOrUpdate("rg1", "test-vna", { location: "eastus", + bandwidthInGbps: 100, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkApplianceName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesDeleteSample.ts index 7d4284c02d8e..5c933bdde5e9 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified virtual network appliance. + * This sample demonstrates how to deletes the specified virtual network appliance. * - * @summary Deletes the specified virtual network appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_Delete.json + * @summary deletes the specified virtual network appliance. + * x-ms-original-file: 2025-07-01/VirtualNetworkAppliances_Delete.json */ async function deleteVirtualNetworkAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkAppliances.beginDeleteAndWait( - resourceGroupName, - virtualNetworkApplianceName, - ); - console.log(result); + await client.virtualNetworkAppliances.delete("rg1", "test-vna"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesGetSample.ts index def56ee4750b..8bef4a2338bd 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets information about the specified virtual network appliance. + * This sample demonstrates how to gets information about the specified virtual network appliance. * - * @summary Gets information about the specified virtual network appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_Get.json + * @summary gets information about the specified virtual network appliance. + * x-ms-original-file: 2025-07-01/VirtualNetworkAppliances_Get.json */ async function getVirtualNetworkAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkAppliances.get( - resourceGroupName, - virtualNetworkApplianceName, - ); + const result = await client.virtualNetworkAppliances.get("rg1", "test-vna"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesListAllSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesListAllSample.ts index 4ccbd19bfc45..35df8c3fb295 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all virtual network appliances in a subscription. + * This sample demonstrates how to gets all virtual network appliances in a subscription. * - * @summary Gets all virtual network appliances in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_ListBySubscription.json + * @summary gets all virtual network appliances in a subscription. + * x-ms-original-file: 2025-07-01/VirtualNetworkAppliances_ListBySubscription.json */ async function listAllVirtualNetworkAppliances(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualNetworkAppliances.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesListSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesListSample.ts index 053dbdd3200d..391538d15509 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all virtual network appliances in a resource group. + * This sample demonstrates how to gets all virtual network appliances in a resource group. * - * @summary Gets all virtual network appliances in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_List.json + * @summary gets all virtual network appliances in a resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkAppliances_List.json */ async function listVirtualNetworkAppliancesInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualNetworkAppliances.list( - resourceGroupName, - )) { + for await (const item of client.virtualNetworkAppliances.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesUpdateTagsSample.ts index 86251d7a01ed..e37bd9bfe616 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkAppliancesUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a virtual network appliance tags. + * This sample demonstrates how to updates a virtual network appliance tags. * - * @summary Updates a virtual network appliance tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_UpdateTags.json + * @summary updates a virtual network appliance tags. + * x-ms-original-file: 2025-07-01/VirtualNetworkAppliances_UpdateTags.json */ async function updateVirtualNetworkApplianceTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkAppliances.updateTags( - resourceGroupName, - virtualNetworkApplianceName, - parameters, - ); + const result = await client.virtualNetworkAppliances.updateTags("rg1", "test-vna", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts index a5deecb15adc..b4b5bd1518c1 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts @@ -1,25 +1,21 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualNetworkGatewayConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a virtual network gateway connection in the specified resource group. + * This sample demonstrates how to creates or updates a virtual network gateway connection in the specified resource group. * - * @summary Creates or updates a virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionCreate.json + * @summary creates or updates a virtual network gateway connection in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionCreate.json */ async function createVirtualNetworkGatewayConnectionS2S(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const parameters: VirtualNetworkGatewayConnection = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkGatewayConnections.createOrUpdate("rg1", "connS2S", { + location: "centralus", authenticationType: "Certificate", certificateAuthentication: { inboundAuthCertificateChain: [ @@ -36,7 +32,7 @@ async function createVirtualNetworkGatewayConnectionS2S(): Promise { dpdTimeoutSeconds: 30, egressNatRules: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", }, ], enableBgp: false, @@ -44,30 +40,37 @@ async function createVirtualNetworkGatewayConnectionS2S(): Promise { { customBgpIpAddress: "169.254.21.1", ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/default", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/default", }, { customBgpIpAddress: "169.254.21.3", ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/ActiveActive", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/ActiveActive", }, ], ingressNatRules: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", }, ], ipsecPolicies: [], localNetworkGateway2: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw", + location: "centralus", gatewayIpAddress: "x.x.x.x", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw", localNetworkAddressSpace: { addressPrefixes: ["10.1.0.0/16"] }, - location: "centralus", tags: {}, }, - location: "centralus", routingWeight: 0, sharedKey: "Abc123", + routingConfiguration: { + inboundRouteMap: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", + }, + outboundRouteMap: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", + }, + }, trafficSelectorPolicies: [], tunnelProperties: [ { bgpPeeringAddress: "10.78.1.17", tunnelIpAddress: "10.78.1.5" }, @@ -75,42 +78,30 @@ async function createVirtualNetworkGatewayConnectionS2S(): Promise { ], usePolicyBasedTrafficSelectors: false, virtualNetworkGateway1: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw", + location: "centralus", active: false, - bgpSettings: { - asn: 65514, - bgpPeeringAddress: "10.0.1.30", - peerWeight: 0, - }, + bgpSettings: { asn: 65514, bgpPeeringAddress: "10.0.1.30", peerWeight: 0 }, enableBgp: false, gatewayType: "Vpn", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw", ipConfigurations: [ { name: "gwipconfig1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/gwipconfig1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/gwipconfig1", privateIPAllocationMethod: "Dynamic", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", }, }, ], - location: "centralus", sku: { name: "VpnGw1", tier: "VpnGw1" }, - tags: {}, vpnType: "RouteBased", + tags: {}, }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsDeleteSample.ts index eef5c2a4d5db..7e5bf49cdecc 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsDeleteSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified virtual network Gateway connection. + * This sample demonstrates how to deletes the specified virtual network Gateway connection. * - * @summary Deletes the specified virtual network Gateway connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionDelete.json + * @summary deletes the specified virtual network Gateway connection. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionDelete.json */ async function deleteVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); + await client.virtualNetworkGatewayConnections.delete("rg1", "conn1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetIkeSasSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetIkeSasSample.ts index c1cf97cafc08..e24b3077e25e 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetIkeSasSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetIkeSasSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. + * This sample demonstrates how to lists IKE Security Associations for the virtual network gateway connection in the specified resource group. * - * @summary Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json + * @summary lists IKE Security Associations for the virtual network gateway connection in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionGetIkeSas.json */ async function getVirtualNetworkGatewayConnectionIkeSa(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginGetIkeSasAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); + const result = await client.virtualNetworkGatewayConnections.getIkeSas("rg1", "vpngwcn1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSample.ts index e893e09d5dfe..25eddee3790c 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified virtual network gateway connection by resource group. + * This sample demonstrates how to gets the specified virtual network gateway connection by resource group. * - * @summary Gets the specified virtual network gateway connection by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGet.json + * @summary gets the specified virtual network gateway connection by resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionGet.json */ async function getVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.get( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); + const result = await client.virtualNetworkGatewayConnections.get("rg1", "connS2S"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSharedKeySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSharedKeySample.ts index 5d365767b023..9a772b91a89d 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSharedKeySample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. + * This sample demonstrates how to the Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. * - * @summary The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json + * @summary the Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionGetSharedKey.json */ async function getVirtualNetworkGatewayConnectionSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.getSharedKey( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); + const result = await client.virtualNetworkGatewayConnections.getSharedKey("rg1", "connS2S"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsListSample.ts index 5875ed141596..354aabbd4bc9 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * This sample demonstrates how to the List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. * - * @summary The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionsList.json + * @summary the List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionsList.json */ async function listVirtualNetworkGatewayConnectionsinResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualNetworkGatewayConnections.list( - resourceGroupName, - )) { + for await (const item of client.virtualNetworkGatewayConnections.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetConnectionSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetConnectionSample.ts index 7f887defeb36..21d95bbd533d 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetConnectionSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Resets the virtual network gateway connection specified. + * This sample demonstrates how to resets the virtual network gateway connection specified. * - * @summary Resets the virtual network gateway connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionReset.json + * @summary resets the virtual network gateway connection specified. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionReset.json */ async function resetVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginResetConnectionAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); + await client.virtualNetworkGatewayConnections.resetConnection("rg1", "conn1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetSharedKeySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetSharedKeySample.ts index 9bde7da4cec7..54155f663718 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetSharedKeySample.ts @@ -1,33 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ConnectionResetSharedKey} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * This sample demonstrates how to the VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. * - * @summary The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json + * @summary the VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionResetSharedKey.json */ async function resetVirtualNetworkGatewayConnectionSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const parameters: ConnectionResetSharedKey = { keyLength: 128 }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginResetSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); + const result = await client.virtualNetworkGatewayConnections.resetSharedKey("rg1", "conn1", { + keyLength: 128, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsSetSharedKeySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsSetSharedKeySample.ts index 0c8de6429c2e..1f21f2fd4397 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsSetSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsSetSharedKeySample.ts @@ -1,33 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ConnectionSharedKey} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * This sample demonstrates how to the Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. * - * @summary The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json + * @summary the Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionSetSharedKey.json */ async function setVirtualNetworkGatewayConnectionSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const parameters: ConnectionSharedKey = { value: "AzureAbc123" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginSetSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); + const result = await client.virtualNetworkGatewayConnections.setSharedKey("rg1", "connS2S", { + value: "AzureAbc123", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts index 802d34f5caf1..8d8b364ad1a6 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts @@ -1,65 +1,52 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnPacketCaptureStartParameters, - VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. + * This sample demonstrates how to starts packet capture on virtual network gateway connection in the specified resource group. * - * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json + * @summary starts packet capture on virtual network gateway connection in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionStartPacketCapture.json */ -async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const parameters: VpnPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams = - { parameters }; +async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - options, - ); + const result = await client.virtualNetworkGatewayConnections.startPacketCapture( + "rg1", + "vpngwcn1", + ); console.log(result); } /** - * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. + * This sample demonstrates how to starts packet capture on virtual network gateway connection in the specified resource group. * - * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json + * @summary starts packet capture on virtual network gateway connection in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json */ -async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; +async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); + const result = await client.virtualNetworkGatewayConnections.startPacketCapture( + "rg1", + "vpngwcn1", + { + parameters: { + filterData: + "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", + }, + }, + ); console.log(result); } async function main(): Promise { - await startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter(); await startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter(); + await startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts index 68f5fa37bd3d..12833e950663 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts @@ -1,36 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnPacketCaptureStopParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Stops packet capture on virtual network gateway connection in the specified resource group. + * This sample demonstrates how to stops packet capture on virtual network gateway connection in the specified resource group. * - * @summary Stops packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json + * @summary stops packet capture on virtual network gateway connection in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionStopPacketCapture.json */ async function stopPacketCaptureOnVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const parameters: VpnPacketCaptureStopParameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginStopPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); + const result = await client.virtualNetworkGatewayConnections.stopPacketCapture( + "rg1", + "vpngwcn1", + { + sasUrl: + "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsUpdateTagsSample.ts index a0f693aa84b1..f0c63e019188 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsUpdateTagsSample.ts @@ -1,30 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a virtual network gateway connection tags. + * This sample demonstrates how to updates a virtual network gateway connection tags. * - * @summary Updates a virtual network gateway connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json + * @summary updates a virtual network gateway connection tags. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayConnectionUpdateTags.json */ async function updateVirtualNetworkGatewayConnectionTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "test"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginUpdateTagsAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); + const result = await client.virtualNetworkGatewayConnections.updateTags("rg1", "test", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts index 3dd03a503444..639133d473b3 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts @@ -1,44 +1,32 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualNetworkGatewayNatRule} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. + * This sample demonstrates how to creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. * - * @summary Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRulePut.json + * @summary creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayNatRulePut.json */ async function virtualNetworkGatewayNatRulePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const natRuleParameters: VirtualNetworkGatewayNatRule = { - typePropertiesType: "Static", - externalMappings: [ - { addressSpace: "192.168.21.0/24", portRange: "300-400" }, - ], - internalMappings: [{ addressSpace: "10.4.0.0/24", portRange: "200-300" }], - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/ipConfigurations/default", - mode: "EgressSnat", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayNatRules.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - natRuleParameters, - ); + const result = await client.virtualNetworkGatewayNatRules.createOrUpdate( + "rg1", + "gateway1", + "natRule1", + { + typePropertiesType: "Static", + externalMappings: [{ addressSpace: "192.168.21.0/24", portRange: "300-400" }], + internalMappings: [{ addressSpace: "10.4.0.0/24", portRange: "200-300" }], + ipConfigurationId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/ipConfigurations/default", + mode: "EgressSnat", + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesDeleteSample.ts index de0c553a2a89..1a5c4d681131 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a nat rule. + * This sample demonstrates how to deletes a nat rule. * - * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json + * @summary deletes a nat rule. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayNatRuleDelete.json */ async function virtualNetworkGatewayNatRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - ); - console.log(result); + await client.virtualNetworkGatewayNatRules.delete("rg1", "gateway1", "natRule1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesGetSample.ts index 117eaace62b1..536d3a3a421e 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a nat rule. + * This sample demonstrates how to retrieves the details of a nat rule. * - * @summary Retrieves the details of a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleGet.json + * @summary retrieves the details of a nat rule. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayNatRuleGet.json */ async function virtualNetworkGatewayNatRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.get( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - ); + const result = await client.virtualNetworkGatewayNatRules.get("rg1", "gateway1", "natRule1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts index 604f9c5cf1b4..a26cd4eedd12 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves all nat rules for a particular virtual network gateway. + * This sample demonstrates how to retrieves all nat rules for a particular virtual network gateway. * - * @summary Retrieves all nat rules for a particular virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleList.json + * @summary retrieves all nat rules for a particular virtual network gateway. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayNatRuleList.json */ async function virtualNetworkGatewayNatRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualNetworkGatewayNatRules.listByVirtualNetworkGateway( - resourceGroupName, - virtualNetworkGatewayName, + "rg1", + "gateway1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysCreateOrUpdateSample.ts index 8cb9797ab703..c4a2424e31c8 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysCreateOrUpdateSample.ts @@ -1,25 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualNetworkGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. + * This sample demonstrates how to creates or updates a virtual network gateway in the specified resource group. * - * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayUpdate.json + * @summary creates or updates a virtual network gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayUpdate.json */ async function updateVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VirtualNetworkGateway = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkGateways.createOrUpdate("rg1", "vpngw", { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": + {}, + }, + }, + location: "centralus", active: false, allowRemoteVnetTraffic: false, allowVirtualWanTraffic: false, @@ -31,41 +34,31 @@ async function updateVirtualNetworkGateway(): Promise { enableDnsForwarding: true, enableHighBandwidthVpnGateway: false, gatewayType: "Vpn", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, ipConfigurations: [ { name: "gwipconfig1", privateIPAllocationMethod: "Dynamic", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", }, }, ], - location: "centralus", natRules: [ { - name: "natRule1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", typePropertiesType: "Static", externalMappings: [{ addressSpace: "50.0.0.0/24" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", internalMappings: [{ addressSpace: "10.10.0.0/24" }], ipConfigurationId: "", mode: "EgressSnat", }, { - name: "natRule2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", typePropertiesType: "Static", externalMappings: [{ addressSpace: "30.0.0.0/24" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", internalMappings: [{ addressSpace: "20.10.0.0/24" }], ipConfigurationId: "", mode: "IngressSnat", @@ -85,34 +78,27 @@ async function updateVirtualNetworkGateway(): Promise { vpnClientRootCertificates: [], }, vpnType: "RouteBased", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. + * This sample demonstrates how to creates or updates a virtual network gateway in the specified resource group. * - * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkScalableGatewayUpdate.json + * @summary creates or updates a virtual network gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkScalableGatewayUpdate.json */ async function updateVirtualNetworkScalableGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const parameters: VirtualNetworkGateway = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkGateways.createOrUpdate("rg1", "ergw", { + location: "centralus", active: false, adminState: "Enabled", allowRemoteVnetTraffic: false, allowVirtualWanTraffic: false, autoScaleConfiguration: { bounds: { max: 3, min: 2 } }, - bgpSettings: {}, disableIPSecReplayProtection: false, enableBgp: false, enableBgpRouteTranslationForNat: false, @@ -122,27 +108,18 @@ async function updateVirtualNetworkScalableGateway(): Promise { name: "gwipconfig1", privateIPAllocationMethod: "Dynamic", publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", }, subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", }, }, ], - location: "centralus", natRules: [], sku: { name: "ErGwScale", tier: "ErGwScale" }, virtualNetworkGatewayPolicyGroups: [], - vpnClientConfiguration: {}, vpnType: "PolicyBased", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDeleteSample.ts index c980df0e72d9..106607fa7b79 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified virtual network gateway. + * This sample demonstrates how to deletes the specified virtual network gateway. * - * @summary Deletes the specified virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayDelete.json + * @summary deletes the specified virtual network gateway. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayDelete.json */ async function deleteVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); + await client.virtualNetworkGateways.delete("rg1", "vpngw"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts index 4355a82c1308..a72e225e3b91 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts @@ -1,37 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - P2SVpnConnectionRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Disconnect vpn connections of virtual network gateway in the specified resource group. + * This sample demonstrates how to disconnect vpn connections of virtual network gateway in the specified resource group. * - * @summary Disconnect vpn connections of virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json + * @summary disconnect vpn connections of virtual network gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json */ async function disconnectVpnConnectionsFromVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vpn-gateway-test"; - const virtualNetworkGatewayName = "vpngateway"; - const request: P2SVpnConnectionRequest = { - vpnConnectionIds: ["vpnconnId1", "vpnconnId2"], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginDisconnectVirtualNetworkGatewayVpnConnectionsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - request, - ); - console.log(result); + await client.virtualNetworkGateways.disconnectVirtualNetworkGatewayVpnConnections( + "vpn-gateway-test", + "vpngateway", + { vpnConnectionIds: ["vpnconnId1", "vpnconnId2"] }, + ); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGenerateVpnProfileSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGenerateVpnProfileSample.ts index 98d8b6328e3e..975cecd835ff 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGenerateVpnProfileSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGenerateVpnProfileSample.ts @@ -1,38 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnClientParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * This sample demonstrates how to generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * - * @summary Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json + * @summary generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGenerateVpnProfile.json */ -async function generateVirtualNetworkGatewayVpnProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnClientParameters = {}; +async function generateVirtualNetworkGatewayVPNProfile(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGenerateVpnProfileAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); + const result = await client.virtualNetworkGateways.generateVpnProfile("rg1", "vpngw", {}); console.log(result); } async function main(): Promise { - await generateVirtualNetworkGatewayVpnProfile(); + await generateVirtualNetworkGatewayVPNProfile(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts index 983ebb77e523..8e78db980e7b 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts @@ -1,38 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnClientParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * This sample demonstrates how to generates VPN client package for P2S client of the virtual network gateway in the specified resource group. * - * @summary Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json + * @summary generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGenerateVpnClientPackage.json */ -async function generateVpnClientPackage(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnClientParameters = {}; +async function generateVPNClientPackage(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGeneratevpnclientpackageAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); + const result = await client.virtualNetworkGateways.generatevpnclientpackage("rg1", "vpngw", {}); console.log(result); } async function main(): Promise { - await generateVpnClientPackage(); + await generateVPNClientPackage(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts index 8c6029c6eecc..3862d6f6f1f2 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * This sample demonstrates how to this operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * - * @summary This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json + * @summary this operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGetAdvertisedRoutes.json */ async function getVirtualNetworkGatewayAdvertisedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const peer = "test"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetAdvertisedRoutesAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peer, - ); + const result = await client.virtualNetworkGateways.getAdvertisedRoutes("rg1", "vpngw", "test"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetBgpPeerStatusSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetBgpPeerStatusSample.ts index 6e8e2d3b8d52..a41c3653c0f3 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetBgpPeerStatusSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetBgpPeerStatusSample.ts @@ -3,30 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * This sample demonstrates how to the GetBgpPeerStatus operation retrieves the status of all BGP peers. * - * @summary The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json + * @summary the GetBgpPeerStatus operation retrieves the status of all BGP peers. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGetBGPPeerStatus.json */ -async function getVirtualNetworkGatewayBgpPeerStatus(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; +async function getVirtualNetworkGatewayBGPPeerStatus(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetBgpPeerStatusAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); + const result = await client.virtualNetworkGateways.getBgpPeerStatus("rg1", "vpngw"); console.log(result); } async function main(): Promise { - await getVirtualNetworkGatewayBgpPeerStatus(); + await getVirtualNetworkGatewayBGPPeerStatus(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts index ba21b7450a29..283bc8ea6781 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts @@ -3,29 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to This operation retrieves the details of all the failover tests performed on the gateway for different peering locations + * This sample demonstrates how to this operation retrieves the details of all the failover tests performed on the gateway for different peering locations * - * @summary This operation retrieves the details of all the failover tests performed on the gateway for different peering locations - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json + * @summary this operation retrieves the details of all the failover tests performed on the gateway for different peering locations + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGetFailoverAllTestsDetails.json */ async function virtualNetworkGatewayGetFailoverAllTestsDetails(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const typeParam = "SingleSiteFailover"; - const fetchLatest = true; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetFailoverAllTestDetailsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - typeParam, - fetchLatest, - ); + const result = await client.virtualNetworkGateways.getFailoverAllTestDetails( + "rg1", + "ergw", + "SingleSiteFailover", + true, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts index 60856b9bf2dc..ad33f5b3df47 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts @@ -3,29 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid + * This sample demonstrates how to this operation retrieves the details of a particular failover test performed on the gateway based on the test Guid * - * @summary This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json + * @summary this operation retrieves the details of a particular failover test performed on the gateway based on the test Guid + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGetFailoverSingleTestDetails.json */ async function virtualNetworkGatewayGetFailoverSingleTestDetails(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const peeringLocation = "Vancouver"; - const failoverTestId = "fe458ae8-d2ae-4520-a104-44bc233bde7e"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetFailoverSingleTestDetailsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - failoverTestId, - ); + const result = await client.virtualNetworkGateways.getFailoverSingleTestDetails( + "rg1", + "ergw", + "Vancouver", + "fe458ae8-d2ae-4520-a104-44bc233bde7e", + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetLearnedRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetLearnedRoutesSample.ts index 0906fdea5e46..0864df35f83d 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetLearnedRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetLearnedRoutesSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * This sample demonstrates how to this operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * - * @summary This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json + * @summary this operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayLearnedRoutes.json */ async function getVirtualNetworkGatewayLearnedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetLearnedRoutesAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); + const result = await client.virtualNetworkGateways.getLearnedRoutes("rg1", "vpngw"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetResiliencyInformationSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetResiliencyInformationSample.ts index edd15d96b324..90b86c2c32ae 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetResiliencyInformationSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetResiliencyInformationSample.ts @@ -1,35 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualNetworkGatewaysGetResiliencyInformationOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score + * This sample demonstrates how to this operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score * - * @summary This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetResiliencyInformation.json + * @summary this operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGetResiliencyInformation.json */ async function getVirtualNetworkGatewayResiliencyInformation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const attemptRefresh = true; - const options: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams = - { attemptRefresh }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetResiliencyInformationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); + const result = await client.virtualNetworkGateways.getResiliencyInformation("rg1", "vpngw", { + attemptRefresh: true, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetRoutesInformationSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetRoutesInformationSample.ts index 4a345c7cf7ac..ef33d5301b34 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetRoutesInformationSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetRoutesInformationSample.ts @@ -1,36 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualNetworkGatewaysGetRoutesInformationOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to This operation retrieves the route set information for an Express Route Gateway based on their resiliency + * This sample demonstrates how to this operation retrieves the route set information for an Express Route Gateway based on their resiliency * - * @summary This operation retrieves the route set information for an Express Route Gateway based on their resiliency - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetRoutesInformation.json + * @summary this operation retrieves the route set information for an Express Route Gateway based on their resiliency + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGetRoutesInformation.json */ async function getVirtualNetworkGatewayRoutesInformation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const attemptRefresh = false; - const options: VirtualNetworkGatewaysGetRoutesInformationOptionalParams = { - attemptRefresh, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetRoutesInformationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); + const result = await client.virtualNetworkGateways.getRoutesInformation("rg1", "vpngw", { + attemptRefresh: false, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetSample.ts index 53113dc2910a..a4fb03d2b634 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetSample.ts @@ -3,43 +3,32 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified virtual network gateway by resource group. + * This sample demonstrates how to gets the specified virtual network gateway by resource group. * - * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGet.json + * @summary gets the specified virtual network gateway by resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGet.json */ async function getVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.get( - resourceGroupName, - virtualNetworkGatewayName, - ); + const result = await client.virtualNetworkGateways.get("rg1", "vpngw"); console.log(result); } /** - * This sample demonstrates how to Gets the specified virtual network gateway by resource group. + * This sample demonstrates how to gets the specified virtual network gateway by resource group. * - * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkScalableGatewayGet.json + * @summary gets the specified virtual network gateway by resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkScalableGatewayGet.json */ async function getVirtualNetworkScalableGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.get( - resourceGroupName, - virtualNetworkGatewayName, - ); + const result = await client.virtualNetworkGateways.get("rg1", "ergw"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts index eeafbc473538..b3266fc72f2a 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts @@ -3,30 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * This sample demonstrates how to gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. * - * @summary Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json + * @summary gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGetVpnProfilePackageUrl.json */ -async function getVirtualNetworkGatewayVpnProfilePackageUrl(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; +async function getVirtualNetworkGatewayVPNProfilePackageURL(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetVpnProfilePackageUrlAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); + const result = await client.virtualNetworkGateways.getVpnProfilePackageUrl("rg1", "vpngw"); console.log(result); } async function main(): Promise { - await getVirtualNetworkGatewayVpnProfilePackageUrl(); + await getVirtualNetworkGatewayVPNProfilePackageURL(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts index 7b5fcf0aae27..e585220bcdf5 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts @@ -3,26 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. + * This sample demonstrates how to get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. * - * @summary Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json + * @summary get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGetVpnclientConnectionHealth.json */ async function getVirtualNetworkGatewayVpnclientConnectionHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vnet-test"; - const virtualNetworkGatewayName = "vpnp2sgw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetVpnclientConnectionHealthAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); + const result = await client.virtualNetworkGateways.getVpnclientConnectionHealth( + "p2s-vnet-test", + "vpnp2sgw", + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts index 582b8d637a7e..81baf69223e5 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This sample demonstrates how to the Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. * - * @summary The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json + * @summary the Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayGetVpnClientIpsecParameters.json */ async function getVirtualNetworkGatewayVpnClientIpsecParameters(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetVpnclientIpsecParametersAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); + const result = await client.virtualNetworkGateways.getVpnclientIpsecParameters("rg1", "vpngw"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeAbortMigrationSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeAbortMigrationSample.ts index 5605af77d626..541042d9d1da 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeAbortMigrationSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeAbortMigrationSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Trigger abort migration for the virtual network gateway. + * This sample demonstrates how to trigger abort migration for the virtual network gateway. * - * @summary Trigger abort migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayAbortMigration.json + * @summary trigger abort migration for the virtual network gateway. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayAbortMigration.json */ async function virtualNetworkGatewayAbortMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokeAbortMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); + await client.virtualNetworkGateways.invokeAbortMigration("rg1", "vpngw"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeCommitMigrationSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeCommitMigrationSample.ts index b68ff5b14324..1fd043b9e785 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeCommitMigrationSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeCommitMigrationSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Trigger commit migration for the virtual network gateway. + * This sample demonstrates how to trigger commit migration for the virtual network gateway. * - * @summary Trigger commit migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayCommitMigration.json + * @summary trigger commit migration for the virtual network gateway. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayCommitMigration.json */ async function virtualNetworkGatewayCommitMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokeCommitMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); + await client.virtualNetworkGateways.invokeCommitMigration("rg1", "vpngw"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts index 2f63a07191dd..de7324204025 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Trigger execute migration for the virtual network gateway. + * This sample demonstrates how to trigger execute migration for the virtual network gateway. * - * @summary Trigger execute migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayExecuteMigration.json + * @summary trigger execute migration for the virtual network gateway. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayExecuteMigration.json */ async function virtualNetworkGatewayExecuteMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokeExecuteMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); + await client.virtualNetworkGateways.invokeExecuteMigration("rg1", "vpngw"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokePrepareMigrationSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokePrepareMigrationSample.ts index 4dc045e6d2bd..a14f2376da35 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokePrepareMigrationSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysInvokePrepareMigrationSample.ts @@ -1,37 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualNetworkGatewayMigrationParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Trigger prepare migration for the virtual network gateway. + * This sample demonstrates how to trigger prepare migration for the virtual network gateway. * - * @summary Trigger prepare migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayPrepareMigration.json + * @summary trigger prepare migration for the virtual network gateway. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayPrepareMigration.json */ async function virtualNetworkGatewayPrepareMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const migrationParams: VirtualNetworkGatewayMigrationParameters = { - migrationType: "UpgradeDeploymentToStandardIP", - resourceUrl: "testUrl", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokePrepareMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - migrationParams, - ); - console.log(result); + await client.virtualNetworkGateways.invokePrepareMigration("rg1", "vpngw", { + migrationType: "UpgradeDeploymentToStandardIP", + resourceUrl: "testUrl", + }); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListConnectionsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListConnectionsSample.ts index 6d13f79647b1..71f464c4ec77 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListConnectionsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListConnectionsSample.ts @@ -3,27 +3,25 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the connections in a virtual network gateway. + * This sample demonstrates how to gets all the connections in a virtual network gateway. * - * @summary Gets all the connections in a virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaysListConnections.json + * @summary gets all the connections in a virtual network gateway. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewaysListConnections.json */ async function virtualNetworkGatewaysListConnections(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const virtualNetworkGatewayName = "test-vpn-gateway-1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualNetworkGateways.listConnections( - resourceGroupName, - virtualNetworkGatewayName, + "testrg", + "test-vpn-gateway-1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListRadiusSecretsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListRadiusSecretsSample.ts index e45c0fb4d9cc..ba9727c76586 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListRadiusSecretsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListRadiusSecretsSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. + * This sample demonstrates how to list all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. * - * @summary List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AllVirtualNetworkGatewayRadiusServerSecretsList.json + * @summary list all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. + * x-ms-original-file: 2025-07-01/AllVirtualNetworkGatewayRadiusServerSecretsList.json */ async function listAllVirtualNetworkGatewayRadiusServerSecrets(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "72f988bf-86f1-41af-91ab-2d7cd011db47"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.listRadiusSecrets( - resourceGroupName, - virtualNetworkGatewayName, - ); + const result = await client.virtualNetworkGateways.listRadiusSecrets("rg1", "vpngw"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListSample.ts index 693c156aafbd..da3408788b1d 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all virtual network gateways by resource group. + * This sample demonstrates how to gets all virtual network gateways by resource group. * - * @summary Gets all virtual network gateways by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayList.json + * @summary gets all virtual network gateways by resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayList.json */ async function listVirtualNetworkGatewaysinResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualNetworkGateways.list( - resourceGroupName, - )) { + for await (const item of client.virtualNetworkGateways.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetSample.ts index 53baa0f1abca..c4a1b1fb1792 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Resets the primary of the virtual network gateway in the specified resource group. + * This sample demonstrates how to resets the primary of the virtual network gateway in the specified resource group. * - * @summary Resets the primary of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayReset.json + * @summary resets the primary of the virtual network gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayReset.json */ async function resetVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginResetAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); + const result = await client.virtualNetworkGateways.reset("rg1", "vpngw"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts index e0247d3831e6..fc3ff5679cf0 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * This sample demonstrates how to resets the VPN client shared key of the virtual network gateway in the specified resource group. * - * @summary Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json + * @summary resets the VPN client shared key of the virtual network gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayResetVpnClientSharedKey.json */ async function resetVpnClientSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginResetVpnClientSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); + await client.virtualNetworkGateways.resetVpnClientSharedKey("rg1", "vpngw"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts index 100473c7e61c..98069022683f 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts @@ -1,25 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnClientIPsecParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This sample demonstrates how to the Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. * - * @summary The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json + * @summary the Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewaySetVpnClientIpsecParameters.json */ async function setVirtualNetworkGatewayVpnClientIpsecParameters(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const vpnclientIpsecParams: VpnClientIPsecParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkGateways.setVpnclientIpsecParameters("rg1", "vpngw", { dhGroup: "DHGroup2", ikeEncryption: "AES256", ikeIntegrity: "SHA384", @@ -28,15 +23,7 @@ async function setVirtualNetworkGatewayVpnClientIpsecParameters(): Promise pfsGroup: "PFS2", saDataSizeKilobytes: 429497, saLifeTimeSeconds: 86473, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginSetVpnclientIpsecParametersAndWait( - resourceGroupName, - virtualNetworkGatewayName, - vpnclientIpsecParams, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts index a643c0101d37..9d8886e2614c 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to This operation starts failover simulation on the gateway for the specified peering location + * This sample demonstrates how to this operation starts failover simulation on the gateway for the specified peering location * - * @summary This operation starts failover simulation on the gateway for the specified peering location - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json + * @summary this operation starts failover simulation on the gateway for the specified peering location + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayStartSiteFailoverSimulation.json */ async function virtualNetworkGatewayStartSiteFailoverSimulation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const peeringLocation = "Vancouver"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - ); + const result = await client.virtualNetworkGateways.startExpressRouteSiteFailoverSimulation( + "rg1", + "ergw", + "Vancouver", + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartPacketCaptureSample.ts index 065d85933607..0d505cc49586 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartPacketCaptureSample.ts @@ -1,66 +1,45 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnPacketCaptureStartParameters, - VirtualNetworkGatewaysStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. + * This sample demonstrates how to starts packet capture on virtual network gateway in the specified resource group. * - * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json + * @summary starts packet capture on virtual network gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayStartPacketCapture.json */ -async function startPacketCaptureOnVirtualNetworkGatewayWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options: VirtualNetworkGatewaysStartPacketCaptureOptionalParams = { - parameters, - }; +async function startPacketCaptureOnVirtualNetworkGatewayWithoutFilter(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); + const result = await client.virtualNetworkGateways.startPacketCapture("rg1", "vpngw"); console.log(result); } /** - * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. + * This sample demonstrates how to starts packet capture on virtual network gateway in the specified resource group. * - * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartPacketCapture.json + * @summary starts packet capture on virtual network gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayStartPacketCaptureFilterData.json */ -async function startPacketCaptureOnVirtualNetworkGatewayWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; +async function startPacketCaptureOnVirtualNetworkGatewayWithFilter(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); + const result = await client.virtualNetworkGateways.startPacketCapture("rg1", "vpngw", { + parameters: { + filterData: + "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", + }, + }); console.log(result); } async function main(): Promise { - await startPacketCaptureOnVirtualNetworkGatewayWithFilter(); await startPacketCaptureOnVirtualNetworkGatewayWithoutFilter(); + await startPacketCaptureOnVirtualNetworkGatewayWithFilter(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts index 6ea59dcd0df2..93b8e937e27d 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts @@ -1,48 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ExpressRouteFailoverStopApiParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to This operation stops failover simulation on the gateway for the specified peering location + * This sample demonstrates how to this operation stops failover simulation on the gateway for the specified peering location * - * @summary This operation stops failover simulation on the gateway for the specified peering location - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json + * @summary this operation stops failover simulation on the gateway for the specified peering location + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayStopSiteFailoverSimulation.json */ async function virtualNetworkGatewayStopSiteFailoverSimulation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const stopParameters: ExpressRouteFailoverStopApiParameters = { - peeringLocation: "Vancouver", - wasSimulationSuccessful: true, - details: [ - { - failoverConnectionName: "conn1", - failoverLocation: "Denver", - isVerified: false, - }, - { - failoverConnectionName: "conn2", - failoverLocation: "Amsterdam", - isVerified: true, - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - stopParameters, - ); + const result = await client.virtualNetworkGateways.stopExpressRouteSiteFailoverSimulation( + "rg1", + "ergw", + { + peeringLocation: "Vancouver", + wasSimulationSuccessful: true, + details: [ + { failoverConnectionName: "conn1", failoverLocation: "Denver", isVerified: false }, + { failoverConnectionName: "conn2", failoverLocation: "Amsterdam", isVerified: true }, + ], + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopPacketCaptureSample.ts index 31644238be1a..9c3ee2139286 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopPacketCaptureSample.ts @@ -1,36 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnPacketCaptureStopParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Stops packet capture on virtual network gateway in the specified resource group. + * This sample demonstrates how to stops packet capture on virtual network gateway in the specified resource group. * - * @summary Stops packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json + * @summary stops packet capture on virtual network gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayStopPacketCapture.json */ async function stopPacketCaptureOnVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnPacketCaptureStopParameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStopPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); + const result = await client.virtualNetworkGateways.stopPacketCapture("rg1", "vpngw", { + sasUrl: + "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSupportedVpnDevicesSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSupportedVpnDevicesSample.ts index 00aead437fc5..354090b1e587 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSupportedVpnDevicesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSupportedVpnDevicesSample.ts @@ -3,29 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a xml format representation for supported vpn devices. + * This sample demonstrates how to gets a xml format representation for supported vpn devices. * - * @summary Gets a xml format representation for supported vpn devices. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json + * @summary gets a xml format representation for supported vpn devices. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewaySupportedVpnDevice.json */ -async function listVirtualNetworkGatewaySupportedVpnDevices(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; +async function listVirtualNetworkGatewaySupportedVPNDevices(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.supportedVpnDevices( - resourceGroupName, - virtualNetworkGatewayName, - ); + const result = await client.virtualNetworkGateways.supportedVpnDevices("rg1", "vpngw"); console.log(result); } async function main(): Promise { - await listVirtualNetworkGatewaySupportedVpnDevices(); + await listVirtualNetworkGatewaySupportedVPNDevices(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysUpdateTagsSample.ts index 8598423aebdd..abd6b63a97bf 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a virtual network gateway tags. + * This sample demonstrates how to updates a virtual network gateway tags. * - * @summary Updates a virtual network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayUpdateTags.json + * @summary updates a virtual network gateway tags. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayUpdateTags.json */ async function updateVirtualNetworkGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginUpdateTagsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); + const result = await client.virtualNetworkGateways.updateTags("rg1", "vpngw", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts index cad436b32352..297afb00a561 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts @@ -1,42 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnDeviceScriptParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets a xml format representation for vpn device configuration script. + * This sample demonstrates how to gets a xml format representation for vpn device configuration script. * - * @summary Gets a xml format representation for vpn device configuration script. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json + * @summary gets a xml format representation for vpn device configuration script. + * x-ms-original-file: 2025-07-01/VirtualNetworkGatewayVpnDeviceConfigurationScript.json */ -async function getVpnDeviceConfigurationScript(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngw"; - const parameters: VpnDeviceScriptParameters = { +async function getVPNDeviceConfigurationScript(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkGateways.vpnDeviceConfigurationScript("rg1", "vpngw", { deviceFamily: "ISR", firmwareVersion: "IOS 15.1 (Preview)", vendor: "Cisco", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.vpnDeviceConfigurationScript( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); + }); console.log(result); } async function main(): Promise { - await getVpnDeviceConfigurationScript(); + await getVPNDeviceConfigurationScript(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsCreateOrUpdateSample.ts index d0a77f5406b9..ccdc2c017551 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsCreateOrUpdateSample.ts @@ -1,124 +1,92 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualNetworkPeering, - VirtualNetworkPeeringsCreateOrUpdateOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. + * This sample demonstrates how to creates or updates a peering in the specified virtual network. * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringCreate.json + * @summary creates or updates a peering in the specified virtual network. + * x-ms-original-file: 2025-07-01/VirtualNetworkPeeringCreate.json */ -async function createV6SubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { +async function createPeering(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkPeerings.createOrUpdate("peerTest", "vnet1", "peer", { allowForwardedTraffic: true, allowGatewayTransit: false, allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: true, - localSubnetNames: ["Subnet1", "Subnet4"], - peerCompleteVnets: false, - remoteSubnetNames: ["Subnet2"], remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", }, useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. + * This sample demonstrates how to creates or updates a peering in the specified virtual network. * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringCreate.json + * @summary creates or updates a peering in the specified virtual network. + * x-ms-original-file: 2025-07-01/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json */ -async function createPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { +async function createPeeringWithRemoteVirtualNetworkEncryption(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkPeerings.createOrUpdate("peerTest", "vnet1", "peer", { allowForwardedTraffic: true, allowGatewayTransit: false, allowVirtualNetworkAccess: true, remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", }, useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. + * This sample demonstrates how to creates or updates a peering in the specified virtual network. * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json + * @summary creates or updates a peering in the specified virtual network. + * x-ms-original-file: 2025-07-01/VirtualNetworkPeeringSync.json */ -async function createPeeringWithRemoteVirtualNetworkEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; +async function syncPeering(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, + const result = await client.virtualNetworkPeerings.createOrUpdate( + "peerTest", + "vnet1", + "peer", + { + allowForwardedTraffic: true, + allowGatewayTransit: false, + allowVirtualNetworkAccess: true, + remoteVirtualNetwork: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", + }, + useRemoteGateways: false, + }, + { syncRemoteAddressSpace: "true" }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. + * This sample demonstrates how to creates or updates a peering in the specified virtual network. * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkSubnetPeeringCreate.json + * @summary creates or updates a peering in the specified virtual network. + * x-ms-original-file: 2025-07-01/VirtualNetworkSubnetPeeringCreate.json */ async function createSubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkPeerings.createOrUpdate("peerTest", "vnet1", "peer", { allowForwardedTraffic: true, allowGatewayTransit: false, allowVirtualNetworkAccess: true, @@ -127,141 +95,107 @@ async function createSubnetPeering(): Promise { peerCompleteVnets: false, remoteSubnetNames: ["Subnet2"], remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", }, useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. + * This sample demonstrates how to creates or updates a peering in the specified virtual network. * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringSync.json + * @summary creates or updates a peering in the specified virtual network. + * x-ms-original-file: 2025-07-01/VirtualNetworkSubnetPeeringSync.json */ -async function syncPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options: VirtualNetworkPeeringsCreateOrUpdateOptionalParams = { - syncRemoteAddressSpace, - }; +async function syncSubnetPeering(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, + const result = await client.virtualNetworkPeerings.createOrUpdate( + "peerTest", + "vnet1", + "peer", + { + allowForwardedTraffic: true, + allowGatewayTransit: false, + allowVirtualNetworkAccess: true, + enableOnlyIPv6Peering: false, + peerCompleteVnets: false, + remoteVirtualNetwork: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", + }, + useRemoteGateways: false, + }, + { syncRemoteAddressSpace: "true" }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. + * This sample demonstrates how to creates or updates a peering in the specified virtual network. * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringSync.json + * @summary creates or updates a peering in the specified virtual network. + * x-ms-original-file: 2025-07-01/VirtualNetworkV6SubnetPeeringCreate.json */ -async function syncV6SubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { +async function createV6SubnetPeering(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkPeerings.createOrUpdate("peerTest", "vnet1", "peer", { allowForwardedTraffic: true, allowGatewayTransit: false, allowVirtualNetworkAccess: true, enableOnlyIPv6Peering: true, + localSubnetNames: ["Subnet1", "Subnet4"], peerCompleteVnets: false, + remoteSubnetNames: ["Subnet2"], remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", }, useRemoteGateways: false, - }; - const options: VirtualNetworkPeeringsCreateOrUpdateOptionalParams = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. + * This sample demonstrates how to creates or updates a peering in the specified virtual network. * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkSubnetPeeringSync.json + * @summary creates or updates a peering in the specified virtual network. + * x-ms-original-file: 2025-07-01/VirtualNetworkV6SubnetPeeringSync.json */ -async function syncSubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: false, - peerCompleteVnets: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options: VirtualNetworkPeeringsCreateOrUpdateOptionalParams = { - syncRemoteAddressSpace, - }; +async function syncV6SubnetPeering(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, + const result = await client.virtualNetworkPeerings.createOrUpdate( + "peerTest", + "vnet1", + "peer", + { + allowForwardedTraffic: true, + allowGatewayTransit: false, + allowVirtualNetworkAccess: true, + enableOnlyIPv6Peering: true, + peerCompleteVnets: false, + remoteVirtualNetwork: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", + }, + useRemoteGateways: false, + }, + { syncRemoteAddressSpace: "true" }, ); console.log(result); } async function main(): Promise { - await createV6SubnetPeering(); await createPeering(); await createPeeringWithRemoteVirtualNetworkEncryption(); - await createSubnetPeering(); await syncPeering(); - await syncV6SubnetPeering(); + await createSubnetPeering(); await syncSubnetPeering(); + await createV6SubnetPeering(); + await syncV6SubnetPeering(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsDeleteSample.ts index 5897b68b59b4..87a8da3ce54f 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified virtual network peering. + * This sample demonstrates how to deletes the specified virtual network peering. * - * @summary Deletes the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringDelete.json + * @summary deletes the specified virtual network peering. + * x-ms-original-file: 2025-07-01/VirtualNetworkPeeringDelete.json */ async function deletePeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); + await client.virtualNetworkPeerings.delete("peerTest", "vnet1", "peer"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsGetSample.ts index 4727f25c5484..c1239b117ce3 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsGetSample.ts @@ -3,97 +3,68 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified virtual network peering. + * This sample demonstrates how to gets the specified virtual network peering. * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json + * @summary gets the specified virtual network peering. + * x-ms-original-file: 2025-07-01/VirtualNetworkPeeringGet.json */ -async function getV6SubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; +async function getPeering(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); + const result = await client.virtualNetworkPeerings.get("peerTest", "vnet1", "peer"); console.log(result); } /** - * This sample demonstrates how to Gets the specified virtual network peering. + * This sample demonstrates how to gets the specified virtual network peering. * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringGet.json + * @summary gets the specified virtual network peering. + * x-ms-original-file: 2025-07-01/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json */ -async function getPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; +async function getPeeringWithRemoteVirtualNetworkEncryption(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); + const result = await client.virtualNetworkPeerings.get("peerTest", "vnet1", "peer"); console.log(result); } /** - * This sample demonstrates how to Gets the specified virtual network peering. + * This sample demonstrates how to gets the specified virtual network peering. * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + * @summary gets the specified virtual network peering. + * x-ms-original-file: 2025-07-01/VirtualNetworkSubnetPeeringGet.json */ -async function getPeeringWithRemoteVirtualNetworkEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; +async function getSubnetPeering(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); + const result = await client.virtualNetworkPeerings.get("peerTest", "vnet1", "peer"); console.log(result); } /** - * This sample demonstrates how to Gets the specified virtual network peering. + * This sample demonstrates how to gets the specified virtual network peering. * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkSubnetPeeringGet.json + * @summary gets the specified virtual network peering. + * x-ms-original-file: 2025-07-01/VirtualNetworkV6SubnetPeeringGet.json */ -async function getSubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; +async function getV6SubnetPeering(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); + const result = await client.virtualNetworkPeerings.get("peerTest", "vnet1", "peer"); console.log(result); } async function main(): Promise { - await getV6SubnetPeering(); await getPeering(); await getPeeringWithRemoteVirtualNetworkEncryption(); await getSubnetPeering(); + await getV6SubnetPeering(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsListSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsListSample.ts index c45bfa2c317d..b21329782a4c 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsListSample.ts @@ -3,49 +3,40 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all virtual network peerings in a virtual network. + * This sample demonstrates how to gets all virtual network peerings in a virtual network. * - * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringList.json + * @summary gets all virtual network peerings in a virtual network. + * x-ms-original-file: 2025-07-01/VirtualNetworkPeeringList.json */ async function listPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualNetworkPeerings.list( - resourceGroupName, - virtualNetworkName, - )) { + for await (const item of client.virtualNetworkPeerings.list("peerTest", "vnet1")) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to Gets all virtual network peerings in a virtual network. + * This sample demonstrates how to gets all virtual network peerings in a virtual network. * - * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json + * @summary gets all virtual network peerings in a virtual network. + * x-ms-original-file: 2025-07-01/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json */ async function listPeeringsWithRemoteVirtualNetworkEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualNetworkPeerings.list( - resourceGroupName, - virtualNetworkName, - )) { + for await (const item of client.virtualNetworkPeerings.list("peerTest", "vnet1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsCreateOrUpdateSample.ts index b51877cafceb..eb55dd9d633c 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsCreateOrUpdateSample.ts @@ -1,34 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { VirtualNetworkTap} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a Virtual Network Tap. + * This sample demonstrates how to create a VirtualNetworkTap * - * @summary Creates or updates a Virtual Network Tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapCreate.json + * @summary create a VirtualNetworkTap + * x-ms-original-file: 2025-07-01/VirtualNetworkTapCreate.json */ async function createVirtualNetworkTap(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const parameters: VirtualNetworkTap = { - destinationNetworkInterfaceIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testNetworkInterface/ipConfigurations/ipconfig1", - }, - location: "centraluseuap", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.beginCreateOrUpdateAndWait( - resourceGroupName, - tapName, - parameters, - ); + const result = await client.virtualNetworkTaps.createOrUpdate("rg1", "test-vtap", { + location: "centraluseuap", + destinationNetworkInterfaceIPConfiguration: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testNetworkInterface/ipConfigurations/ipconfig1", + }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsDeleteSample.ts index 3ddef8c3d95e..a5fd0a760987 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified virtual network tap. + * This sample demonstrates how to delete a VirtualNetworkTap * - * @summary Deletes the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapDelete.json + * @summary delete a VirtualNetworkTap + * x-ms-original-file: 2025-07-01/VirtualNetworkTapDelete.json */ async function deleteVirtualNetworkTapResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.beginDeleteAndWait( - resourceGroupName, - tapName, - ); - console.log(result); + await client.virtualNetworkTaps.delete("rg1", "test-vtap"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsGetSample.ts index 0b04640eaca6..e007101d7a32 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets information about the specified virtual network tap. + * This sample demonstrates how to get a VirtualNetworkTap * - * @summary Gets information about the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapGet.json + * @summary get a VirtualNetworkTap + * x-ms-original-file: 2025-07-01/VirtualNetworkTapGet.json */ async function getVirtualNetworkTap(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "testvtap"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.get( - resourceGroupName, - tapName, - ); + const result = await client.virtualNetworkTaps.get("rg1", "testvtap"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsListAllSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsListAllSample.ts index 4a2184bfd5ea..d0abb67cb67c 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. + * This sample demonstrates how to gets all the VirtualNetworkTaps in a subscription. * - * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapListAll.json + * @summary gets all the VirtualNetworkTaps in a subscription. + * x-ms-original-file: 2025-07-01/VirtualNetworkTapListAll.json */ async function listAllVirtualNetworkTaps(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualNetworkTaps.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsListByResourceGroupSample.ts index 0767a53f022b..cad448255d9f 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. + * This sample demonstrates how to gets all the VirtualNetworkTaps in a subscription. * - * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapList.json + * @summary gets all the VirtualNetworkTaps in a subscription. + * x-ms-original-file: 2025-07-01/VirtualNetworkTapList.json */ async function listVirtualNetworkTapsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualNetworkTaps.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.virtualNetworkTaps.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsUpdateTagsSample.ts index 5c34e4b508dd..f5797e17c726 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsUpdateTagsSample.ts @@ -1,31 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates an VirtualNetworkTap tags. + * This sample demonstrates how to update a VirtualNetworkTap * - * @summary Updates an VirtualNetworkTap tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapUpdateTags.json + * @summary update a VirtualNetworkTap + * x-ms-original-file: 2025-07-01/VirtualNetworkTapUpdateTags.json */ async function updateVirtualNetworkTapTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const tapParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.updateTags( - resourceGroupName, - tapName, - tapParameters, - ); + const result = await client.virtualNetworkTaps.updateTags("rg1", "test-vtap", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksCheckIPAddressAvailabilitySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksCheckIPAddressAvailabilitySample.ts index 4f945245494e..5d81a8bff893 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksCheckIPAddressAvailabilitySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksCheckIPAddressAvailabilitySample.ts @@ -3,25 +3,21 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Checks whether a private IP address is available for use. + * This sample demonstrates how to checks whether a private IP address is available for use. * - * @summary Checks whether a private IP address is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json + * @summary checks whether a private IP address is available for use. + * x-ms-original-file: 2025-07-01/VirtualNetworkCheckIPAddressAvailability.json */ async function checkIPAddressAvailability(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const ipAddress = "10.0.1.4"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.virtualNetworks.checkIPAddressAvailability( - resourceGroupName, - virtualNetworkName, - ipAddress, + "rg1", + "test-vnet", + "10.0.1.4", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksCreateOrUpdateSample.ts index 7a5d3a6b02ab..2b16fb5e2edd 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksCreateOrUpdateSample.ts @@ -1,295 +1,216 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { VirtualNetwork} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. + * This sample demonstrates how to creates or updates a virtual network in the specified resource group. * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreate.json + * @summary creates or updates a virtual network in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkCreate.json */ async function createVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - flowTimeoutInMinutes: 10, - location: "eastus", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); + const result = await client.virtualNetworks.createOrUpdate("rg1", "test-vnet", { + location: "eastus", + addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, + flowTimeoutInMinutes: 10, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. + * This sample demonstrates how to creates or updates a virtual network in the specified resource group. * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateWithBgpCommunities.json + * @summary creates or updates a virtual network in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkCreateServiceEndpointPolicy.json */ -async function createVirtualNetworkWithBgpCommunities(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - bgpCommunities: { virtualNetworkCommunity: "12076:20000" }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; +async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateSubnetWithDelegation.json - */ -async function createVirtualNetworkWithDelegatedSubnets(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { + const result = await client.virtualNetworks.createOrUpdate("vnetTest", "vnet1", { + location: "eastus2euap", addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "westcentralus", subnets: [ { - name: "test-1", - addressPrefix: "10.0.0.0/24", - delegations: [ + addressPrefix: "10.0.0.0/16", + serviceEndpointPolicies: [ { - name: "myDelegation", - serviceName: "Microsoft.Sql/managedInstances", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/vnetTest/providers/Microsoft.Network/serviceEndpointPolicies/ServiceEndpointPolicy1", }, ], + serviceEndpoints: [{ service: "Microsoft.Storage" }], }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. + * This sample demonstrates how to creates or updates a virtual network in the specified resource group. * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateWithEncryption.json + * @summary creates or updates a virtual network in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkCreateServiceEndpoints.json */ -async function createVirtualNetworkWithEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - encryption: { enabled: true, enforcement: "AllowUnencrypted" }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; +async function createVirtualNetworkWithServiceEndpoints(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); + const result = await client.virtualNetworks.createOrUpdate("vnetTest", "vnet1", { + location: "eastus", + addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, + subnets: [ + { addressPrefix: "10.0.0.0/16", serviceEndpoints: [{ service: "Microsoft.Storage" }] }, + ], + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. + * This sample demonstrates how to creates or updates a virtual network in the specified resource group. * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateWithIpamPool.json + * @summary creates or updates a virtual network in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkCreateSubnet.json */ -async function createVirtualNetworkWithIpamPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { - ipamPoolPrefixAllocations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", - numberOfIpAddresses: "65536", - }, - ], - }, - location: "eastus", - subnets: [ - { - name: "test-1", - ipamPoolPrefixAllocations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", - numberOfIpAddresses: "80", - }, - ], - }, - ], - }; +async function createVirtualNetworkWithSubnet(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); + const result = await client.virtualNetworks.createOrUpdate("rg1", "test-vnet", { + location: "eastus", + addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, + subnets: [{ addressPrefix: "10.0.0.0/24" }], + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. + * This sample demonstrates how to creates or updates a virtual network in the specified resource group. * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateServiceEndpoints.json + * @summary creates or updates a virtual network in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkCreateSubnetWithAddressPrefixes.json */ -async function createVirtualNetworkWithServiceEndpoints(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vnetTest"; - const virtualNetworkName = "vnet1"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }, - ], - }; +async function createVirtualNetworkWithSubnetContainingAddressPrefixes(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); + const result = await client.virtualNetworks.createOrUpdate("rg1", "test-vnet", { + location: "eastus", + addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, + subnets: [{ addressPrefixes: ["10.0.0.0/28", "10.0.1.0/28"] }], + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. + * This sample demonstrates how to creates or updates a virtual network in the specified resource group. * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json + * @summary creates or updates a virtual network in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkCreateSubnetWithDelegation.json */ -async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vnetTest"; - const virtualNetworkName = "vnet1"; - const parameters: VirtualNetwork = { +async function createVirtualNetworkWithDelegatedSubnets(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworks.createOrUpdate("rg1", "test-vnet", { + location: "westcentralus", addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus2euap", subnets: [ { - name: "test-1", - addressPrefix: "10.0.0.0/16", - serviceEndpointPolicies: [ - { - id: "/subscriptions/subid/resourceGroups/vnetTest/providers/Microsoft.Network/serviceEndpointPolicies/ServiceEndpointPolicy1", - }, - ], - serviceEndpoints: [{ service: "Microsoft.Storage" }], + addressPrefix: "10.0.0.0/24", + delegations: [{ name: "myDelegation", serviceName: "Microsoft.Sql/managedInstances" }], }, ], - }; + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates a virtual network in the specified resource group. + * + * @summary creates or updates a virtual network in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkCreateWithBgpCommunities.json + */ +async function createVirtualNetworkWithBgpCommunities(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); + const result = await client.virtualNetworks.createOrUpdate("rg1", "test-vnet", { + location: "eastus", + addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, + bgpCommunities: { virtualNetworkCommunity: "12076:20000" }, + subnets: [{ addressPrefix: "10.0.0.0/24" }], + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. + * This sample demonstrates how to creates or updates a virtual network in the specified resource group. * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateSubnet.json + * @summary creates or updates a virtual network in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkCreateWithEncryption.json */ -async function createVirtualNetworkWithSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; +async function createVirtualNetworkWithEncryption(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); + const result = await client.virtualNetworks.createOrUpdate("rg1", "test-vnet", { + location: "eastus", + addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, + encryption: { enabled: true, enforcement: "AllowUnencrypted" }, + subnets: [{ addressPrefix: "10.0.0.0/24" }], + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. + * This sample demonstrates how to creates or updates a virtual network in the specified resource group. * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json + * @summary creates or updates a virtual network in the specified resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkCreateWithIpamPool.json */ -async function createVirtualNetworkWithSubnetContainingAddressPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, +async function createVirtualNetworkWithIpamPool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworks.createOrUpdate("rg1", "test-vnet", { location: "eastus", + addressSpace: { + ipamPoolPrefixAllocations: [ + { + numberOfIpAddresses: "65536", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", + }, + ], + }, subnets: [ - { name: "test-2", addressPrefixes: ["10.0.0.0/28", "10.0.1.0/28"] }, + { + ipamPoolPrefixAllocations: [ + { + numberOfIpAddresses: "80", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", + }, + ], + }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); + }); console.log(result); } async function main(): Promise { await createVirtualNetwork(); - await createVirtualNetworkWithBgpCommunities(); - await createVirtualNetworkWithDelegatedSubnets(); - await createVirtualNetworkWithEncryption(); - await createVirtualNetworkWithIpamPool(); - await createVirtualNetworkWithServiceEndpoints(); await createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(); + await createVirtualNetworkWithServiceEndpoints(); await createVirtualNetworkWithSubnet(); await createVirtualNetworkWithSubnetContainingAddressPrefixes(); + await createVirtualNetworkWithDelegatedSubnets(); + await createVirtualNetworkWithBgpCommunities(); + await createVirtualNetworkWithEncryption(); + await createVirtualNetworkWithIpamPool(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksDeleteSample.ts index 58fd2b4ae4b6..4fc6a5a876cb 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified virtual network. + * This sample demonstrates how to deletes the specified virtual network. * - * @summary Deletes the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkDelete.json + * @summary deletes the specified virtual network. + * x-ms-original-file: 2025-07-01/VirtualNetworkDelete.json */ async function deleteVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); + await client.virtualNetworks.delete("rg1", "test-vnet"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksGetSample.ts index 86027860c4e6..db06945ae49d 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksGetSample.ts @@ -3,69 +3,53 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified virtual network by resource group. + * This sample demonstrates how to gets the specified virtual network by resource group. * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGet.json + * @summary gets the specified virtual network by resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGet.json */ async function getVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get( - resourceGroupName, - virtualNetworkName, - ); + const result = await client.virtualNetworks.get("rg1", "test-vnet"); console.log(result); } /** - * This sample demonstrates how to Gets the specified virtual network by resource group. + * This sample demonstrates how to gets the specified virtual network by resource group. * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetWithSubnetDelegation.json + * @summary gets the specified virtual network by resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGetWithServiceAssociationLink.json */ -async function getVirtualNetworkWithADelegatedSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; +async function getVirtualNetworkWithServiceAssociationLinks(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get( - resourceGroupName, - virtualNetworkName, - ); + const result = await client.virtualNetworks.get("rg1", "test-vnet"); console.log(result); } /** - * This sample demonstrates how to Gets the specified virtual network by resource group. + * This sample demonstrates how to gets the specified virtual network by resource group. * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + * @summary gets the specified virtual network by resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkGetWithSubnetDelegation.json */ -async function getVirtualNetworkWithServiceAssociationLinks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; +async function getVirtualNetworkWithADelegatedSubnet(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get( - resourceGroupName, - virtualNetworkName, - ); + const result = await client.virtualNetworks.get("rg1", "test-vnet"); console.log(result); } async function main(): Promise { await getVirtualNetwork(); - await getVirtualNetworkWithADelegatedSubnet(); await getVirtualNetworkWithServiceAssociationLinks(); + await getVirtualNetworkWithADelegatedSubnet(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksListAllSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksListAllSample.ts index 3e7a81ee0061..22192f9b4e67 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksListAllSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all virtual networks in a subscription. + * This sample demonstrates how to gets all virtual networks in a subscription. * - * @summary Gets all virtual networks in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkListAll.json + * @summary gets all virtual networks in a subscription. + * x-ms-original-file: 2025-07-01/VirtualNetworkListAll.json */ async function listAllVirtualNetworks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualNetworks.listAll()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksListDdosProtectionStatusSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksListDdosProtectionStatusSample.ts index fc48c29cee65..cf3a6f83394c 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksListDdosProtectionStatusSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksListDdosProtectionStatusSample.ts @@ -1,39 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualNetworksListDdosProtectionStatusOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the Ddos Protection Status of all IP Addresses under the Virtual Network + * This sample demonstrates how to gets the Ddos Protection Status of all IP Addresses under the Virtual Network * - * @summary Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json + * @summary gets the Ddos Protection Status of all IP Addresses under the Virtual Network + * x-ms-original-file: 2025-07-01/VirtualNetworkGetDdosProtectionStatus.json */ async function getDdosProtectionStatusOfAVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const top = 75; - const options: VirtualNetworksListDdosProtectionStatusOptionalParams = { - top, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.beginListDdosProtectionStatusAndWait( - resourceGroupName, - virtualNetworkName, - options, - )) { - resArray.push(item); - } - console.log(resArray); + const result = await client.virtualNetworks.listDdosProtectionStatus("rg1", "test-vnet", { + top: 75, + }); + console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksListSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksListSample.ts index 72dfe879db13..625e7a34165b 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksListSample.ts @@ -3,23 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all virtual networks in a resource group. + * This sample demonstrates how to gets all virtual networks in a resource group. * - * @summary Gets all virtual networks in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkList.json + * @summary gets all virtual networks in a resource group. + * x-ms-original-file: 2025-07-01/VirtualNetworkList.json */ async function listVirtualNetworksInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualNetworks.list(resourceGroupName)) { + for await (const item of client.virtualNetworks.list("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksListUsageSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksListUsageSample.ts index 2b297a448bd4..3afb3b260f24 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksListUsageSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksListUsageSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists usage stats. + * This sample demonstrates how to lists usage stats. * - * @summary Lists usage stats. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkListUsage.json + * @summary lists usage stats. + * x-ms-original-file: 2025-07-01/VirtualNetworkListUsage.json */ async function vnetGetUsage(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnetName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualNetworks.listUsage( - resourceGroupName, - virtualNetworkName, - )) { + for await (const item of client.virtualNetworks.listUsage("rg1", "vnetName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksUpdateTagsSample.ts index 2d688f0c2179..831cd92a5da4 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksUpdateTagsSample.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a virtual network tags. + * This sample demonstrates how to updates a virtual network tags. * - * @summary Updates a virtual network tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkUpdateTags.json + * @summary updates a virtual network tags. + * x-ms-original-file: 2025-07-01/VirtualNetworkUpdateTags.json */ async function updateVirtualNetworkTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.updateTags( - resourceGroupName, - virtualNetworkName, - parameters, - ); + const result = await client.virtualNetworks.updateTags("rg1", "test-vnet", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsCreateOrUpdateSample.ts index 7ef486bcc360..14571083b5e1 100644 --- a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsCreateOrUpdateSample.ts @@ -1,36 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualRouterPeering} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified Virtual Router Peering. + * This sample demonstrates how to creates or updates the specified Virtual Router Peering. * - * @summary Creates or updates the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringPut.json + * @summary creates or updates the specified Virtual Router Peering. + * x-ms-original-file: 2025-07-01/VirtualRouterPeeringPut.json */ async function createVirtualRouterPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const parameters: VirtualRouterPeering = { - peerAsn: 20000, - peerIp: "192.168.1.5", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualRouterName, - peeringName, - parameters, + const result = await client.virtualRouterPeerings.createOrUpdate( + "rg1", + "virtualRouter", + "peering1", + { peerAsn: 20000, peerIp: "192.168.1.5" }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsDeleteSample.ts index 1cfbf872c4c4..999d12128701 100644 --- a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified peering from a Virtual Router. + * This sample demonstrates how to deletes the specified peering from a Virtual Router. * - * @summary Deletes the specified peering from a Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringDelete.json + * @summary deletes the specified peering from a Virtual Router. + * x-ms-original-file: 2025-07-01/VirtualRouterPeeringDelete.json */ async function deleteVirtualRouterPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.beginDeleteAndWait( - resourceGroupName, - virtualRouterName, - peeringName, - ); - console.log(result); + await client.virtualRouterPeerings.delete("rg1", "virtualRouter", "peering1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsGetSample.ts b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsGetSample.ts index 6a7ec460ae25..bea949c2eefb 100644 --- a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Virtual Router Peering. + * This sample demonstrates how to gets the specified Virtual Router Peering. * - * @summary Gets the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringGet.json + * @summary gets the specified Virtual Router Peering. + * x-ms-original-file: 2025-07-01/VirtualRouterPeeringGet.json */ async function getVirtualRouterPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.get( - resourceGroupName, - virtualRouterName, - peeringName, - ); + const result = await client.virtualRouterPeerings.get("rg1", "virtualRouter", "peering1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsListSample.ts b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsListSample.ts index 20d04c4a53f6..0e9032ee49ad 100644 --- a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsListSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all Virtual Router Peerings in a Virtual Router resource. + * This sample demonstrates how to lists all Virtual Router Peerings in a Virtual Router resource. * - * @summary Lists all Virtual Router Peerings in a Virtual Router resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringList.json + * @summary lists all Virtual Router Peerings in a Virtual Router resource. + * x-ms-original-file: 2025-07-01/VirtualRouterPeeringList.json */ async function listAllVirtualRouterPeeringsForAGivenVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualRouterPeerings.list( - resourceGroupName, - virtualRouterName, - )) { + for await (const item of client.virtualRouterPeerings.list("rg1", "virtualRouter")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualRoutersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualRoutersCreateOrUpdateSample.ts index c8033d2324a5..693d90f2ddaa 100644 --- a/sdk/network/arm-network/samples-dev/virtualRoutersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRoutersCreateOrUpdateSample.ts @@ -1,35 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { VirtualRouter} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or updates the specified Virtual Router. + * This sample demonstrates how to creates or updates the specified Virtual Router. * - * @summary Creates or updates the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPut.json + * @summary creates or updates the specified Virtual Router. + * x-ms-original-file: 2025-07-01/VirtualRouterPut.json */ async function createVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const parameters: VirtualRouter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualRouters.createOrUpdate("rg1", "virtualRouter", { + location: "West US", hostedGateway: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vnetGateway", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vnetGateway", }, - location: "West US", tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualRouterName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualRoutersDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualRoutersDeleteSample.ts index 8c67a6ffc916..2b2788f8945c 100644 --- a/sdk/network/arm-network/samples-dev/virtualRoutersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRoutersDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes the specified Virtual Router. + * This sample demonstrates how to deletes the specified Virtual Router. * - * @summary Deletes the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterDelete.json + * @summary deletes the specified Virtual Router. + * x-ms-original-file: 2025-07-01/VirtualRouterDelete.json */ async function deleteVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.beginDeleteAndWait( - resourceGroupName, - virtualRouterName, - ); - console.log(result); + await client.virtualRouters.delete("rg1", "virtualRouter"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/virtualRoutersGetSample.ts b/sdk/network/arm-network/samples-dev/virtualRoutersGetSample.ts index 5f0603227603..11d9d00f3446 100644 --- a/sdk/network/arm-network/samples-dev/virtualRoutersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRoutersGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Virtual Router. + * This sample demonstrates how to gets the specified Virtual Router. * - * @summary Gets the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterGet.json + * @summary gets the specified Virtual Router. + * x-ms-original-file: 2025-07-01/VirtualRouterGet.json */ async function getVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.get( - resourceGroupName, - virtualRouterName, - ); + const result = await client.virtualRouters.get("rg1", "virtualRouter"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/virtualRoutersListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/virtualRoutersListByResourceGroupSample.ts index ef702806bfc8..a51834e9c75b 100644 --- a/sdk/network/arm-network/samples-dev/virtualRoutersListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRoutersListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all Virtual Routers in a resource group. + * This sample demonstrates how to lists all Virtual Routers in a resource group. * - * @summary Lists all Virtual Routers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterListByResourceGroup.json + * @summary lists all Virtual Routers in a resource group. + * x-ms-original-file: 2025-07-01/VirtualRouterListByResourceGroup.json */ async function listAllVirtualRouterForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualRouters.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.virtualRouters.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualRoutersListSample.ts b/sdk/network/arm-network/samples-dev/virtualRoutersListSample.ts index f6a82bb83010..27cc77727f8c 100644 --- a/sdk/network/arm-network/samples-dev/virtualRoutersListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRoutersListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the Virtual Routers in a subscription. + * This sample demonstrates how to gets all the Virtual Routers in a subscription. * - * @summary Gets all the Virtual Routers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterListBySubscription.json + * @summary gets all the Virtual Routers in a subscription. + * x-ms-original-file: 2025-07-01/VirtualRouterListBySubscription.json */ async function listAllVirtualRoutersForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualRouters.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/virtualWansCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualWansCreateOrUpdateSample.ts index 59aafdf699d2..6176c37fd972 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansCreateOrUpdateSample.ts @@ -1,39 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { VirtualWAN} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + * This sample demonstrates how to creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. * - * @summary Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANPut.json + * @summary creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + * x-ms-original-file: 2025-07-01/VirtualWANPut.json */ -async function virtualWanCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const wANParameters: VirtualWAN = { +async function virtualWANCreate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualWans.createOrUpdate("rg1", "wan1", { + location: "West US", typePropertiesType: "Basic", disableVpnEncryption: false, - location: "West US", tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualWANName, - wANParameters, - ); + }); console.log(result); } async function main(): Promise { - await virtualWanCreate(); + await virtualWANCreate(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualWansDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualWansDeleteSample.ts index 67ff965c4afe..f5d1415b6729 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansDeleteSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a VirtualWAN. + * This sample demonstrates how to deletes a VirtualWAN. * - * @summary Deletes a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANDelete.json + * @summary deletes a VirtualWAN. + * x-ms-original-file: 2025-07-01/VirtualWANDelete.json */ -async function virtualWanDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "virtualWan1"; +async function virtualWANDelete(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.beginDeleteAndWait( - resourceGroupName, - virtualWANName, - ); - console.log(result); + await client.virtualWans.delete("rg1", "virtualWan1"); } async function main(): Promise { - await virtualWanDelete(); + await virtualWANDelete(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualWansGetSample.ts b/sdk/network/arm-network/samples-dev/virtualWansGetSample.ts index 6eb7c20bff90..f54039b6838b 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansGetSample.ts @@ -3,29 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a VirtualWAN. + * This sample demonstrates how to retrieves the details of a VirtualWAN. * - * @summary Retrieves the details of a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANGet.json + * @summary retrieves the details of a VirtualWAN. + * x-ms-original-file: 2025-07-01/VirtualWANGet.json */ -async function virtualWanGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; +async function virtualWANGet(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.get( - resourceGroupName, - virtualWANName, - ); + const result = await client.virtualWans.get("rg1", "wan1"); console.log(result); } async function main(): Promise { - await virtualWanGet(); + await virtualWANGet(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualWansListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/virtualWansListByResourceGroupSample.ts index 736fdfd993da..3a72923c05fe 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansListByResourceGroupSample.ts @@ -3,30 +3,27 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the VirtualWANs in a resource group. + * This sample demonstrates how to lists all the VirtualWANs in a resource group. * - * @summary Lists all the VirtualWANs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANListByResourceGroup.json + * @summary lists all the VirtualWANs in a resource group. + * x-ms-original-file: 2025-07-01/VirtualWANListByResourceGroup.json */ -async function virtualWanListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; +async function virtualWANListByResourceGroup(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualWans.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.virtualWans.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await virtualWanListByResourceGroup(); + await virtualWANListByResourceGroup(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualWansListSample.ts b/sdk/network/arm-network/samples-dev/virtualWansListSample.ts index 855525386f64..94b2ea6df4f9 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansListSample.ts @@ -3,27 +3,27 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the VirtualWANs in a subscription. + * This sample demonstrates how to lists all the VirtualWANs in a subscription. * - * @summary Lists all the VirtualWANs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANList.json + * @summary lists all the VirtualWANs in a subscription. + * x-ms-original-file: 2025-07-01/VirtualWANList.json */ -async function virtualWanList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; +async function virtualWANList(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualWans.list()) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await virtualWanList(); + await virtualWANList(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualWansUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualWansUpdateTagsSample.ts index f2d605c70d61..ef9e8d495870 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansUpdateTagsSample.ts @@ -1,36 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates a VirtualWAN tags. + * This sample demonstrates how to updates a VirtualWAN tags. * - * @summary Updates a VirtualWAN tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANUpdateTags.json + * @summary updates a VirtualWAN tags. + * x-ms-original-file: 2025-07-01/VirtualWANUpdateTags.json */ -async function virtualWanUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const wANParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; +async function virtualWANUpdate(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.updateTags( - resourceGroupName, - virtualWANName, - wANParameters, - ); + const result = await client.virtualWans.updateTags("rg1", "wan1", { + tags: { key1: "value1", key2: "value2" }, + }); console.log(result); } async function main(): Promise { - await virtualWanUpdate(); + await virtualWANUpdate(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsCreateOrUpdateSample.ts index 52d00d01b587..34243b397a1a 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsCreateOrUpdateSample.ts @@ -1,46 +1,43 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { VpnConnection} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. + * This sample demonstrates how to creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. * - * @summary Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionPut.json + * @summary creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. + * x-ms-original-file: 2025-07-01/VpnConnectionPut.json */ async function vpnConnectionPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const vpnConnectionParameters: VpnConnection = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.vpnConnections.createOrUpdate("rg1", "gateway1", "vpnConnection1", { remoteVpnSite: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", }, routingConfiguration: { associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", }, inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", }, outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", }, propagatedRouteTables: { ids: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", }, { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", }, { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", }, ], labels: ["label1", "label2"], @@ -49,26 +46,17 @@ async function vpnConnectionPut(): Promise { trafficSelectorPolicies: [], vpnLinkConnections: [ { - name: "Connection-Link1", connectionBandwidth: 200, sharedKey: "key", usePolicyBasedTrafficSelectors: false, vpnConnectionProtocolType: "IKEv2", vpnLinkConnectionMode: "Default", vpnSiteLink: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", }, }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - connectionName, - vpnConnectionParameters, - ); + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsDeleteSample.ts index cfe113a3eb20..64e8831fffa4 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a vpn connection. + * This sample demonstrates how to deletes a vpn connection. * - * @summary Deletes a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionDelete.json + * @summary deletes a vpn connection. + * x-ms-original-file: 2025-07-01/VpnConnectionDelete.json */ async function vpnConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginDeleteAndWait( - resourceGroupName, - gatewayName, - connectionName, - ); - console.log(result); + await client.vpnConnections.delete("rg1", "gateway1", "vpnConnection1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsGetSample.ts index ce7fed4b1ff2..28c3d9c76b51 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a vpn connection. + * This sample demonstrates how to retrieves the details of a vpn connection. * - * @summary Retrieves the details of a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionGet.json + * @summary retrieves the details of a vpn connection. + * x-ms-original-file: 2025-07-01/VpnConnectionGet.json */ async function vpnConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.get( - resourceGroupName, - gatewayName, - connectionName, - ); + const result = await client.vpnConnections.get("rg1", "gateway1", "vpnConnection1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsListByVpnGatewaySample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsListByVpnGatewaySample.ts index bc97223a7b1d..c7858653fc8d 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsListByVpnGatewaySample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsListByVpnGatewaySample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves all vpn connections for a particular virtual wan vpn gateway. + * This sample demonstrates how to retrieves all vpn connections for a particular virtual wan vpn gateway. * - * @summary Retrieves all vpn connections for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionList.json + * @summary retrieves all vpn connections for a particular virtual wan vpn gateway. + * x-ms-original-file: 2025-07-01/VpnConnectionList.json */ async function vpnConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.vpnConnections.listByVpnGateway( - resourceGroupName, - gatewayName, - )) { + for await (const item of client.vpnConnections.listByVpnGateway("rg1", "gateway1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsStartPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsStartPacketCaptureSample.ts index eff65c4a4f5f..ac7d7bff3d31 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsStartPacketCaptureSample.ts @@ -1,76 +1,56 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnConnectionPacketCaptureStartParameters, - VpnConnectionsStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. + * This sample demonstrates how to starts packet capture on Vpn connection in the specified resource group. * - * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json + * @summary starts packet capture on Vpn connection in the specified resource group. + * x-ms-original-file: 2025-07-01/VpnConnectionStartPacketCapture.json */ -async function startPacketCaptureOnVpnConnectionWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters: VpnConnectionPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - linkConnectionNames: ["siteLink1", "siteLink2"], - }; - const options: VpnConnectionsStartPacketCaptureOptionalParams = { - parameters, - }; +async function startPacketCaptureOnVpnConnectionWithoutFilter(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, + const result = await client.vpnConnections.startPacketCapture( + "rg1", + "gateway1", + "vpnConnection1", + { parameters: { linkConnectionNames: ["siteLink1", "siteLink2"] } }, ); console.log(result); } /** - * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. + * This sample demonstrates how to starts packet capture on Vpn connection in the specified resource group. * - * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStartPacketCapture.json + * @summary starts packet capture on Vpn connection in the specified resource group. + * x-ms-original-file: 2025-07-01/VpnConnectionStartPacketCaptureFilterData.json */ -async function startPacketCaptureOnVpnConnectionWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters: VpnConnectionPacketCaptureStartParameters = { - linkConnectionNames: ["siteLink1", "siteLink2"], - }; - const options: VpnConnectionsStartPacketCaptureOptionalParams = { - parameters, - }; +async function startPacketCaptureOnVpnConnectionWithFilter(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, + const result = await client.vpnConnections.startPacketCapture( + "rg1", + "gateway1", + "vpnConnection1", + { + parameters: { + filterData: + "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", + linkConnectionNames: ["siteLink1", "siteLink2"], + }, + }, ); console.log(result); } async function main(): Promise { - await startPacketCaptureOnVpnConnectionWithFilter(); await startPacketCaptureOnVpnConnectionWithoutFilter(); + await startPacketCaptureOnVpnConnectionWithFilter(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsStopPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsStopPacketCaptureSample.ts index 924d6a46646d..a805f9ff98c3 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsStopPacketCaptureSample.ts @@ -1,39 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnConnectionPacketCaptureStopParameters, - VpnConnectionsStopPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Stops packet capture on Vpn connection in the specified resource group. + * This sample demonstrates how to stops packet capture on Vpn connection in the specified resource group. * - * @summary Stops packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStopPacketCapture.json + * @summary stops packet capture on Vpn connection in the specified resource group. + * x-ms-original-file: 2025-07-01/VpnConnectionStopPacketCapture.json */ async function startPacketCaptureOnVpnConnectionWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters: VpnConnectionPacketCaptureStopParameters = { - linkConnectionNames: ["vpnSiteLink1", "vpnSiteLink2"], - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const options: VpnConnectionsStopPacketCaptureOptionalParams = { parameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStopPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, + const result = await client.vpnConnections.stopPacketCapture( + "rg1", + "gateway1", + "vpnConnection1", + { + parameters: { + linkConnectionNames: ["vpnSiteLink1", "vpnSiteLink2"], + sasUrl: + "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", + }, + }, ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysCreateOrUpdateSample.ts index a445bf8fc678..218e530b7f7f 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysCreateOrUpdateSample.ts @@ -1,33 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { VpnGateway} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + * This sample demonstrates how to creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. * - * @summary Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayPut.json + * @summary creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + * x-ms-original-file: 2025-07-01/VpnGatewayPut.json */ async function vpnGatewayPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnGatewayParameters: VpnGateway = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.vpnGateways.createOrUpdate("rg1", "gateway1", { + location: "westcentralus", bgpSettings: { asn: 65515, bgpPeeringAddresses: [ - { - customBgpIpAddresses: ["169.254.21.5"], - ipconfigurationId: "Instance0", - }, - { - customBgpIpAddresses: ["169.254.21.10"], - ipconfigurationId: "Instance1", - }, + { customBgpIpAddresses: ["169.254.21.5"], ipconfigurationId: "Instance0" }, + { customBgpIpAddresses: ["169.254.21.10"], ipconfigurationId: "Instance1" }, ], peerWeight: 0, }, @@ -35,21 +28,20 @@ async function vpnGatewayPut(): Promise { { name: "vpnConnection1", remoteVpnSite: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", }, vpnLinkConnections: [ { - name: "Connection-Link1", connectionBandwidth: 200, egressNatRules: [ { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03", }, ], sharedKey: "key", vpnConnectionProtocolType: "IKEv2", vpnSiteLink: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", }, }, ], @@ -57,10 +49,8 @@ async function vpnGatewayPut(): Promise { ], enableBgpRouteTranslationForNat: false, isRoutingPreferenceInternet: false, - location: "westcentralus", natRules: [ { - name: "nat03", typePropertiesType: "Static", externalMappings: [{ addressSpace: "192.168.0.0/26" }], internalMappings: [{ addressSpace: "0.0.0.0/26" }], @@ -68,18 +58,11 @@ async function vpnGatewayPut(): Promise { mode: "EgressSnat", }, ], - tags: { key1: "value1" }, virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - ); + tags: { key1: "value1" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysDeleteSample.ts index c16a9b253c33..586cba187c38 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a virtual wan vpn gateway. + * This sample demonstrates how to deletes a virtual wan vpn gateway. * - * @summary Deletes a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayDelete.json + * @summary deletes a virtual wan vpn gateway. + * x-ms-original-file: 2025-07-01/VpnGatewayDelete.json */ async function vpnGatewayDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginDeleteAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); + await client.vpnGateways.delete("rg1", "gateway1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysGetSample.ts index a644adaa78f5..0ac844858fcf 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysGetSample.ts @@ -3,21 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a virtual wan vpn gateway. + * This sample demonstrates how to retrieves the details of a virtual wan vpn gateway. * - * @summary Retrieves the details of a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayGet.json + * @summary retrieves the details of a virtual wan vpn gateway. + * x-ms-original-file: 2025-07-01/VpnGatewayGet.json */ async function vpnGatewayGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.get(resourceGroupName, gatewayName); + const result = await client.vpnGateways.get("rg1", "gateway1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysListByResourceGroupSample.ts index 69419cee57ba..8dd9b9311c5e 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the VpnGateways in a resource group. + * This sample demonstrates how to lists all the VpnGateways in a resource group. * - * @summary Lists all the VpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayListByResourceGroup.json + * @summary lists all the VpnGateways in a resource group. + * x-ms-original-file: 2025-07-01/VpnGatewayListByResourceGroup.json */ async function vpnGatewayListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.vpnGateways.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.vpnGateways.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysListSample.ts index a7daf5faefe6..d9a98b59e9d2 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the VpnGateways in a subscription. + * This sample demonstrates how to lists all the VpnGateways in a subscription. * - * @summary Lists all the VpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayList.json + * @summary lists all the VpnGateways in a subscription. + * x-ms-original-file: 2025-07-01/VpnGatewayList.json */ async function vpnGatewayListBySubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.vpnGateways.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysResetSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysResetSample.ts index 54ed44ab6124..5ef72ad425f0 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysResetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysResetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Resets the primary of the vpn gateway in the specified resource group. + * This sample demonstrates how to resets the primary of the vpn gateway in the specified resource group. * - * @summary Resets the primary of the vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayReset.json + * @summary resets the primary of the vpn gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VpnGatewayReset.json */ async function resetVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginResetAndWait( - resourceGroupName, - gatewayName, - ); + const result = await client.vpnGateways.reset("rg1", "vpngw"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysStartPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysStartPacketCaptureSample.ts index 5c96a0c3c9f0..467285b6ea61 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysStartPacketCaptureSample.ts @@ -1,62 +1,45 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnGatewayPacketCaptureStartParameters, - VpnGatewaysStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. + * This sample demonstrates how to starts packet capture on vpn gateway in the specified resource group. * - * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json + * @summary starts packet capture on vpn gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VpnGatewayStartPacketCapture.json */ -async function startPacketCaptureOnVpnGatewayWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const parameters: VpnGatewayPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options: VpnGatewaysStartPacketCaptureOptionalParams = { parameters }; +async function startPacketCaptureOnVpnGatewayWithoutFilter(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - options, - ); + const result = await client.vpnGateways.startPacketCapture("rg1", "vpngw"); console.log(result); } /** - * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. + * This sample demonstrates how to starts packet capture on vpn gateway in the specified resource group. * - * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStartPacketCapture.json + * @summary starts packet capture on vpn gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VpnGatewayStartPacketCaptureFilterData.json */ -async function startPacketCaptureOnVpnGatewayWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; +async function startPacketCaptureOnVpnGatewayWithFilter(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - ); + const result = await client.vpnGateways.startPacketCapture("rg1", "vpngw", { + parameters: { + filterData: + "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", + }, + }); console.log(result); } async function main(): Promise { - await startPacketCaptureOnVpnGatewayWithFilter(); await startPacketCaptureOnVpnGatewayWithoutFilter(); + await startPacketCaptureOnVpnGatewayWithFilter(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysStopPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysStopPacketCaptureSample.ts index 86d286f9d0dc..bd182e15b3cf 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysStopPacketCaptureSample.ts @@ -1,37 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnGatewayPacketCaptureStopParameters, - VpnGatewaysStopPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Stops packet capture on vpn gateway in the specified resource group. + * This sample demonstrates how to stops packet capture on vpn gateway in the specified resource group. * - * @summary Stops packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStopPacketCapture.json + * @summary stops packet capture on vpn gateway in the specified resource group. + * x-ms-original-file: 2025-07-01/VpnGatewayStopPacketCapture.json */ async function stopPacketCaptureOnVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const parameters: VpnGatewayPacketCaptureStopParameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const options: VpnGatewaysStopPacketCaptureOptionalParams = { parameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStopPacketCaptureAndWait( - resourceGroupName, - gatewayName, - options, - ); + const result = await client.vpnGateways.stopPacketCapture("rg1", "vpngw", { + parameters: { + sasUrl: + "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", + }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysUpdateTagsSample.ts index 5e0d6008b25c..6821610d3e55 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysUpdateTagsSample.ts @@ -1,31 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates virtual wan vpn gateway tags. + * This sample demonstrates how to updates virtual wan vpn gateway tags. * - * @summary Updates virtual wan vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayUpdateTags.json + * @summary updates virtual wan vpn gateway tags. + * x-ms-original-file: 2025-07-01/VpnGatewayUpdateTags.json */ async function vpnGatewayUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnGatewayParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginUpdateTagsAndWait( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - ); + const result = await client.vpnGateways.updateTags("rg1", "gateway1", { + tags: { tag1: "value1", tag2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetAllSharedKeysSample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetAllSharedKeysSample.ts deleted file mode 100644 index 8c90b8c7dd07..000000000000 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetAllSharedKeysSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all shared keys of VpnLink connection specified. - * - * @summary Lists all shared keys of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json - */ -async function vpnSiteLinkConnectionSharedKeysGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnLinkConnections.listAllSharedKeys( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnSiteLinkConnectionSharedKeysGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetDefaultSharedKeySample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetDefaultSharedKeySample.ts index e804c7203bf1..cffdcf5bf81d 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetDefaultSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetDefaultSharedKeySample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the shared key of VpnLink connection specified. + * This sample demonstrates how to gets the shared key of VpnLink connection specified. * - * @summary Gets the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json + * @summary gets the shared key of VpnLink connection specified. + * x-ms-original-file: 2025-07-01/VpnSiteLinkConnectionDefaultSharedKeyGet.json */ async function vpnSiteLinkConnectionDefaultSharedKeyGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.vpnLinkConnections.getDefaultSharedKey( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, + "rg1", + "gateway1", + "vpnConnection1", + "Connection-Link1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetIkeSasSample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetIkeSasSample.ts index 9272b1c6e09a..190ca99094e7 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetIkeSasSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetIkeSasSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. + * This sample demonstrates how to lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. * - * @summary Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json + * @summary lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. + * x-ms-original-file: 2025-07-01/VpnSiteLinkConnectionGetIkeSas.json */ async function getVpnLinkConnectionIkeSa(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginGetIkeSasAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, + const result = await client.vpnLinkConnections.getIkeSas( + "rg1", + "gateway1", + "vpnConnection1", + "Connection-Link1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListAllSharedKeysSample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListAllSharedKeysSample.ts new file mode 100644 index 000000000000..1e0ea31ba399 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListAllSharedKeysSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all shared keys of VpnLink connection specified. + * + * @summary lists all shared keys of VpnLink connection specified. + * x-ms-original-file: 2025-07-01/VpnSiteLinkConnectionSharedKeysGet.json + */ +async function vpnSiteLinkConnectionSharedKeysGet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.vpnLinkConnections.listAllSharedKeys( + "rg1", + "gateway1", + "vpnConnection1", + "Connection-Link1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await vpnSiteLinkConnectionSharedKeysGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListByVpnConnectionSample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListByVpnConnectionSample.ts index 7ab0ef9e5cda..9e6d0c38062c 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListByVpnConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListByVpnConnectionSample.ts @@ -3,29 +3,26 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * This sample demonstrates how to retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. * - * @summary Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionList.json + * @summary retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * x-ms-original-file: 2025-07-01/VpnSiteLinkConnectionList.json */ async function vpnSiteLinkConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.vpnLinkConnections.listByVpnConnection( - resourceGroupName, - gatewayName, - connectionName, + "rg1", + "gateway1", + "vpnConnection1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListDefaultSharedKeySample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListDefaultSharedKeySample.ts index 54b2c2521ec9..cf8a750f6c88 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListDefaultSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListDefaultSharedKeySample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the value of the shared key of VpnLink connection specified. + * This sample demonstrates how to gets the value of the shared key of VpnLink connection specified. * - * @summary Gets the value of the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json + * @summary gets the value of the shared key of VpnLink connection specified. + * x-ms-original-file: 2025-07-01/VpnSiteLinkConnectionDefaultSharedKeyList.json */ async function vpnSiteLinkConnectionDefaultSharedKeyList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.vpnLinkConnections.listDefaultSharedKey( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, + "rg1", + "gateway1", + "vpnConnection1", + "Connection-Link1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsResetConnectionSample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsResetConnectionSample.ts index 3273375cebab..df4ab16e88a0 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsResetConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsResetConnectionSample.ts @@ -3,29 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Resets the VpnLink connection specified. + * This sample demonstrates how to resets the VpnLink connection specified. * - * @summary Resets the VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionReset.json + * @summary resets the VpnLink connection specified. + * x-ms-original-file: 2025-07-01/VpnSiteLinkConnectionReset.json */ async function resetVpnLinkConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginResetConnectionAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, + await client.vpnLinkConnections.resetConnection( + "rg1", + "gateway1", + "vpnConnection1", + "Connection-Link1", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts index 906160d904c4..865d069c4bed 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts @@ -1,39 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ConnectionSharedKeyResult} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. + * This sample demonstrates how to sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. * - * @summary Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json + * @summary sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. + * x-ms-original-file: 2025-07-01/VpnSiteLinkConnectionDefaultSharedKeyPut.json */ async function vpnSiteLinkConnectionDefaultSharedKeyPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const connectionSharedKeyParameters: ConnectionSharedKeyResult = { - properties: { sharedKey: "ABCDEF123456" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.vpnLinkConnections.beginSetOrInitDefaultSharedKeyAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - connectionSharedKeyParameters, - ); + const result = await client.vpnLinkConnections.setOrInitDefaultSharedKey( + "rg1", + "gateway1", + "vpnConnection1", + "Connection-Link1", + { properties: { sharedKey: "ABCDEF123456" } }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts index f14c19df5d42..f6b127718acc 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + * This sample demonstrates how to gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. * - * @summary Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetVirtualWanVpnServerConfigurations.json + * @summary gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + * x-ms-original-file: 2025-07-01/GetVirtualWanVpnServerConfigurations.json */ async function getVirtualWanVpnServerConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.vpnServerConfigurationsAssociatedWithVirtualWan.beginListAndWait( - resourceGroupName, - virtualWANName, - ); + const result = await client.vpnServerConfigurationsAssociatedWithVirtualWan.list("rg1", "wan1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsCreateOrUpdateSample.ts index 6dcac82ff879..c6b1d3b42fa6 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsCreateOrUpdateSample.ts @@ -1,110 +1,91 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VpnServerConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. + * This sample demonstrates how to creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. * - * @summary Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationPut.json + * @summary creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. + * x-ms-original-file: 2025-07-01/VpnServerConfigurationPut.json */ async function vpnServerConfigurationCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const vpnServerConfigurationParameters: VpnServerConfiguration = { - configurationPolicyGroups: [ - { - name: "policyGroup1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup1", - isDefault: true, - policyMembers: [ - { - name: "policy1", - attributeType: "RadiusAzureGroupId", - attributeValue: "6ad1bd08", - }, - ], - priority: 0, - }, - { - name: "policyGroup2", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup2", - isDefault: true, - policyMembers: [ - { - name: "policy2", - attributeType: "CertificateGroupId", - attributeValue: "red.com", - }, - ], - priority: 0, - }, - ], - location: "West US", - radiusClientRootCertificates: [ - { - name: "vpnServerConfigRadiusClientRootCert1", - thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", - }, - ], - radiusServerRootCertificates: [ - { - name: "vpnServerConfigRadiusServerRootCer1", - publicCertData: - "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuM", - }, - ], - radiusServers: [ - { - radiusServerAddress: "10.0.0.0", - radiusServerScore: 25, - radiusServerSecret: "radiusServerSecret", - }, - ], - tags: { key1: "value1" }, - vpnClientIpsecPolicies: [ - { - dhGroup: "DHGroup14", - ikeEncryption: "AES256", - ikeIntegrity: "SHA384", - ipsecEncryption: "AES256", - ipsecIntegrity: "SHA256", - pfsGroup: "PFS14", - saDataSizeKilobytes: 429497, - saLifeTimeSeconds: 86472, - }, - ], - vpnClientRevokedCertificates: [ - { - name: "vpnServerConfigVpnClientRevokedCert1", - thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", - }, - ], - vpnClientRootCertificates: [ - { - name: "vpnServerConfigVpnClientRootCert1", - publicCertData: - "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuN", - }, - ], - vpnProtocols: ["IkeV2"], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.vpnServerConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - ); + const result = await client.vpnServerConfigurations.createOrUpdate( + "rg1", + "vpnServerConfiguration1", + { + location: "West US", + configurationPolicyGroups: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup1", + isDefault: true, + policyMembers: [ + { name: "policy1", attributeType: "RadiusAzureGroupId", attributeValue: "6ad1bd08" }, + ], + priority: 0, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup2", + isDefault: true, + policyMembers: [ + { name: "policy2", attributeType: "CertificateGroupId", attributeValue: "red.com" }, + ], + priority: 0, + }, + ], + radiusClientRootCertificates: [ + { + name: "vpnServerConfigRadiusClientRootCert1", + thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", + }, + ], + radiusServerRootCertificates: [ + { + name: "vpnServerConfigRadiusServerRootCer1", + publicCertData: + "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuM", + }, + ], + radiusServers: [ + { + radiusServerAddress: "10.0.0.0", + radiusServerScore: 25, + radiusServerSecret: "radiusServerSecret", + }, + ], + vpnClientIpsecPolicies: [ + { + dhGroup: "DHGroup14", + ikeEncryption: "AES256", + ikeIntegrity: "SHA384", + ipsecEncryption: "AES256", + ipsecIntegrity: "SHA256", + pfsGroup: "PFS14", + saDataSizeKilobytes: 429497, + saLifeTimeSeconds: 86472, + }, + ], + vpnClientRevokedCertificates: [ + { + name: "vpnServerConfigVpnClientRevokedCert1", + thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", + }, + ], + vpnClientRootCertificates: [ + { + name: "vpnServerConfigVpnClientRootCert1", + publicCertData: + "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuN", + }, + ], + vpnProtocols: ["IkeV2"], + tags: { key1: "value1" }, + }, + ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsDeleteSample.ts index afb20443ab29..8a0662d6f4ee 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a VpnServerConfiguration. + * This sample demonstrates how to deletes a VpnServerConfiguration. * - * @summary Deletes a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationDelete.json + * @summary deletes a VpnServerConfiguration. + * x-ms-original-file: 2025-07-01/VpnServerConfigurationDelete.json */ async function vpnServerConfigurationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.beginDeleteAndWait( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); + await client.vpnServerConfigurations.delete("rg1", "vpnServerConfiguration1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsGetSample.ts index da8b7d5cc693..b1aaacb25eae 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsGetSample.ts @@ -3,24 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a VpnServerConfiguration. + * This sample demonstrates how to retrieves the details of a VpnServerConfiguration. * - * @summary Retrieves the details of a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationGet.json + * @summary retrieves the details of a VpnServerConfiguration. + * x-ms-original-file: 2025-07-01/VpnServerConfigurationGet.json */ async function vpnServerConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.get( - resourceGroupName, - vpnServerConfigurationName, - ); + const result = await client.vpnServerConfigurations.get("rg1", "vpnServerConfiguration1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListByResourceGroupSample.ts index d9cb5087ad55..92c5142bbc5f 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the vpnServerConfigurations in a resource group. + * This sample demonstrates how to lists all the vpnServerConfigurations in a resource group. * - * @summary Lists all the vpnServerConfigurations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationListByResourceGroup.json + * @summary lists all the vpnServerConfigurations in a resource group. + * x-ms-original-file: 2025-07-01/VpnServerConfigurationListByResourceGroup.json */ async function vpnServerConfigurationListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.vpnServerConfigurations.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.vpnServerConfigurations.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListRadiusSecretsSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListRadiusSecretsSample.ts index e761584ff8a5..8845f466b05c 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListRadiusSecretsSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListRadiusSecretsSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List all Radius servers with respective radius secrets from VpnServerConfiguration. + * This sample demonstrates how to list all Radius servers with respective radius secrets from VpnServerConfiguration. * - * @summary List all Radius servers with respective radius secrets from VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AllVpnServerConfigurationRadiusServerSecretsList.json + * @summary list all Radius servers with respective radius secrets from VpnServerConfiguration. + * x-ms-original-file: 2025-07-01/AllVpnServerConfigurationRadiusServerSecretsList.json */ async function listAllVpnServerConfigurationRadiusServerSecrets(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnserverconfig"; const credential = new DefaultAzureCredential(); + const subscriptionId = "72f988bf-86f1-41af-91ab-2d7cd011db47"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.listRadiusSecrets( - resourceGroupName, - vpnServerConfigurationName, - ); + const result = await client.vpnServerConfigurations.listRadiusSecrets("rg1", "vpnserverconfig"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListSample.ts index 7d297bd65205..bfc69eb52996 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the VpnServerConfigurations in a subscription. + * This sample demonstrates how to lists all the VpnServerConfigurations in a subscription. * - * @summary Lists all the VpnServerConfigurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationList.json + * @summary lists all the VpnServerConfigurations in a subscription. + * x-ms-original-file: 2025-07-01/VpnServerConfigurationList.json */ async function vpnServerConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.vpnServerConfigurations.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsUpdateTagsSample.ts index 9456f3bd618c..9cdfb0d9dd10 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsUpdateTagsSample.ts @@ -1,31 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates VpnServerConfiguration tags. + * This sample demonstrates how to updates VpnServerConfiguration tags. * - * @summary Updates VpnServerConfiguration tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationUpdateTags.json + * @summary updates VpnServerConfiguration tags. + * x-ms-original-file: 2025-07-01/VpnServerConfigurationUpdateTags.json */ async function vpnServerConfigurationUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const vpnServerConfigurationParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.updateTags( - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - ); + const result = await client.vpnServerConfigurations.updateTags("rg1", "vpnServerConfiguration1", { + tags: { key1: "value1", key2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnSiteLinkConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/vpnSiteLinkConnectionsGetSample.ts index 4545c0aaa74d..3a68e7f44b2b 100644 --- a/sdk/network/arm-network/samples-dev/vpnSiteLinkConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSiteLinkConnectionsGetSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a vpn site link connection. + * This sample demonstrates how to retrieves the details of a vpn site link connection. * - * @summary Retrieves the details of a vpn site link connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionGet.json + * @summary retrieves the details of a vpn site link connection. + * x-ms-original-file: 2025-07-01/VpnSiteLinkConnectionGet.json */ async function vpnSiteLinkConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.vpnSiteLinkConnections.get( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, + "rg1", + "gateway1", + "vpnConnection1", + "Connection-Link1", ); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnSiteLinksGetSample.ts b/sdk/network/arm-network/samples-dev/vpnSiteLinksGetSample.ts index 403ce643e034..875755bcfe59 100644 --- a/sdk/network/arm-network/samples-dev/vpnSiteLinksGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSiteLinksGetSample.ts @@ -3,26 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a VPN site link. + * This sample demonstrates how to retrieves the details of a VPN site link. * - * @summary Retrieves the details of a VPN site link. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkGet.json + * @summary retrieves the details of a VPN site link. + * x-ms-original-file: 2025-07-01/VpnSiteLinkGet.json */ async function vpnSiteGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteLinkName = "vpnSiteLink1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSiteLinks.get( - resourceGroupName, - vpnSiteName, - vpnSiteLinkName, - ); + const result = await client.vpnSiteLinks.get("rg1", "vpnSite1", "vpnSiteLink1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnSiteLinksListByVpnSiteSample.ts b/sdk/network/arm-network/samples-dev/vpnSiteLinksListByVpnSiteSample.ts index 6f7258069907..681c1c64733f 100644 --- a/sdk/network/arm-network/samples-dev/vpnSiteLinksListByVpnSiteSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSiteLinksListByVpnSiteSample.ts @@ -3,27 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the vpnSiteLinks in a resource group for a vpn site. + * This sample demonstrates how to lists all the vpnSiteLinks in a resource group for a vpn site. * - * @summary Lists all the vpnSiteLinks in a resource group for a vpn site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkListByVpnSite.json + * @summary lists all the vpnSiteLinks in a resource group for a vpn site. + * x-ms-original-file: 2025-07-01/VpnSiteLinkListByVpnSite.json */ async function vpnSiteLinkListByVpnSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.vpnSiteLinks.listByVpnSite( - resourceGroupName, - vpnSiteName, - )) { + for await (const item of client.vpnSiteLinks.listByVpnSite("rg1", "vpnSite1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/vpnSitesConfigurationDownloadSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesConfigurationDownloadSample.ts index 4b149100326e..f228c31d643d 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesConfigurationDownloadSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesConfigurationDownloadSample.ts @@ -1,39 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - GetVpnSitesConfigurationRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gives the sas-url to download the configurations for vpn-sites in a resource group. + * This sample demonstrates how to gives the sas-url to download the configurations for vpn-sites in a resource group. * - * @summary Gives the sas-url to download the configurations for vpn-sites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSitesConfigurationDownload.json + * @summary gives the sas-url to download the configurations for vpn-sites in a resource group. + * x-ms-original-file: 2025-07-01/VpnSitesConfigurationDownload.json */ async function vpnSitesConfigurationDownload(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const request: GetVpnSitesConfigurationRequest = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + await client.vpnSitesConfiguration.download("rg1", "wan1", { outputBlobSasUrl: "https://blobcortextesturl.blob.core.windows.net/folderforconfig/vpnFile?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", vpnSites: [ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/abc", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/abc", ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSitesConfiguration.beginDownloadAndWait( - resourceGroupName, - virtualWANName, - request, - ); - console.log(result); + }); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/vpnSitesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesCreateOrUpdateSample.ts index 28f31e7f04e9..59e9f4a541d5 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesCreateOrUpdateSample.ts @@ -1,49 +1,37 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { VpnSite} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + * This sample demonstrates how to creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. * - * @summary Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSitePut.json + * @summary creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + * x-ms-original-file: 2025-07-01/VpnSitePut.json */ async function vpnSiteCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteParameters: VpnSite = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.vpnSites.createOrUpdate("rg1", "vpnSite1", { + location: "West US", addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, isSecuritySite: false, - location: "West US", - o365Policy: { - breakOutCategories: { default: false, allow: true, optimize: true }, - }, - tags: { key1: "value1" }, + o365Policy: { breakOutCategories: { default: false, allow: true, optimize: true } }, virtualWan: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1", + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1", }, vpnSiteLinks: [ { - name: "vpnSiteLink1", bgpProperties: { asn: 1234, bgpPeeringAddress: "192.168.0.0" }, fqdn: "link1.vpnsite1.contoso.com", ipAddress: "50.50.50.56", linkProperties: { linkProviderName: "vendor1", linkSpeedInMbps: 0 }, }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnSiteName, - vpnSiteParameters, - ); + tags: { key1: "value1" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnSitesDeleteSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesDeleteSample.ts index bd87bdb8b55a..46af9a987294 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesDeleteSample.ts @@ -3,25 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes a VpnSite. + * This sample demonstrates how to deletes a VpnSite. * - * @summary Deletes a VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteDelete.json + * @summary deletes a VpnSite. + * x-ms-original-file: 2025-07-01/VpnSiteDelete.json */ async function vpnSiteDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.beginDeleteAndWait( - resourceGroupName, - vpnSiteName, - ); - console.log(result); + await client.vpnSites.delete("rg1", "vpnSite1"); } async function main(): Promise { diff --git a/sdk/network/arm-network/samples-dev/vpnSitesGetSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesGetSample.ts index f8347c5b68f0..0036fd08662c 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesGetSample.ts @@ -3,21 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieves the details of a VPN site. + * This sample demonstrates how to retrieves the details of a VPN site. * - * @summary Retrieves the details of a VPN site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteGet.json + * @summary retrieves the details of a VPN site. + * x-ms-original-file: 2025-07-01/VpnSiteGet.json */ async function vpnSiteGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.get(resourceGroupName, vpnSiteName); + const result = await client.vpnSites.get("rg1", "vpnSite1"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/vpnSitesListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesListByResourceGroupSample.ts index 182c7cad2cfc..8922559304d4 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesListByResourceGroupSample.ts @@ -3,25 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the vpnSites in a resource group. + * This sample demonstrates how to lists all the vpnSites in a resource group. * - * @summary Lists all the vpnSites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteListByResourceGroup.json + * @summary lists all the vpnSites in a resource group. + * x-ms-original-file: 2025-07-01/VpnSiteListByResourceGroup.json */ async function vpnSiteListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.vpnSites.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.vpnSites.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/vpnSitesListSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesListSample.ts index 71d83b52eadc..4c94bce0d21c 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesListSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesListSample.ts @@ -3,22 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all the VpnSites in a subscription. + * This sample demonstrates how to lists all the VpnSites in a subscription. * - * @summary Lists all the VpnSites in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteList.json + * @summary lists all the VpnSites in a subscription. + * x-ms-original-file: 2025-07-01/VpnSiteList.json */ async function vpnSiteList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.vpnSites.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples-dev/vpnSitesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesUpdateTagsSample.ts index 1119152ff8a3..e01dfd1e3325 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesUpdateTagsSample.ts @@ -1,31 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TagsObject} from "@azure/arm-network"; import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Updates VpnSite tags. + * This sample demonstrates how to updates VpnSite tags. * - * @summary Updates VpnSite tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteUpdateTags.json + * @summary updates VpnSite tags. + * x-ms-original-file: 2025-07-01/VpnSiteUpdateTags.json */ async function vpnSiteUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.updateTags( - resourceGroupName, - vpnSiteName, - vpnSiteParameters, - ); + const result = await client.vpnSites.updateTags("rg1", "vpnSite1", { + tags: { key1: "value1", key2: "value2" }, + }); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesCreateOrUpdateSample.ts index 4f7fb2c953ae..28dfb52e79c5 100644 --- a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesCreateOrUpdateSample.ts @@ -1,25 +1,21 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - WebApplicationFirewallPolicy} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; +import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Creates or update policy with specified rule set name within a resource group. + * This sample demonstrates how to creates or update policy with specified rule set name within a resource group. * - * @summary Creates or update policy with specified rule set name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyCreateOrUpdate.json + * @summary creates or update policy with specified rule set name within a resource group. + * x-ms-original-file: 2025-07-01/WafPolicyCreateOrUpdate.json */ -async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const parameters: WebApplicationFirewallPolicy = { +async function createsOrUpdatesAWAFPolicyWithinAResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.webApplicationFirewallPolicies.createOrUpdate("rg1", "Policy1", { + location: "WestUs", customRules: [ { name: "Rule1", @@ -27,9 +23,7 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { matchConditions: [ { matchValues: ["192.168.1.0/24", "10.0.0.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], + matchVariables: [{ variableName: "RemoteAddr" }], operator: "IPMatch", }, ], @@ -42,16 +36,12 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { matchConditions: [ { matchValues: ["192.168.1.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], + matchVariables: [{ variableName: "RemoteAddr" }], operator: "IPMatch", }, { matchValues: ["Windows"], - matchVariables: [ - { selector: "UserAgent", variableName: "RequestHeaders" }, - ], + matchVariables: [{ selector: "UserAgent", variableName: "RequestHeaders" }], operator: "Contains", }, ], @@ -61,15 +51,11 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { { name: "RateLimitRule3", action: "Block", - groupByUserSession: [ - { groupByVariables: [{ variableName: "ClientAddr" }] }, - ], + groupByUserSession: [{ groupByVariables: [{ variableName: "ClientAddr" }] }], matchConditions: [ { matchValues: ["192.168.1.0/24", "10.0.0.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], + matchVariables: [{ variableName: "RemoteAddr" }], negationConditon: true, operator: "IPMatch", }, @@ -85,49 +71,19 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { matchConditions: [ { matchValues: ["192.168.1.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], + matchVariables: [{ variableName: "RemoteAddr" }], operator: "IPMatch", }, { matchValues: ["Bot"], - matchVariables: [ - { selector: "UserAgent", variableName: "RequestHeaders" }, - ], + matchVariables: [{ selector: "UserAgent", variableName: "RequestHeaders" }], operator: "Contains", }, ], priority: 4, ruleType: "MatchRule", }, - { - name: "Rule5", - action: "CAPTCHA", - matchConditions: [ - { - matchValues: ["192.168.2.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], - negationConditon: false, - operator: "IPMatch", - }, - { - matchValues: ["Bot"], - matchVariables: [ - { selector: "UserAgent", variableName: "RequestHeaders" }, - ], - negationConditon: false, - operator: "Contains", - }, - ], - priority: 5, - ruleType: "MatchRule", - state: "Enabled", - }, ], - location: "WestUs", managedRules: { exclusions: [ { @@ -156,11 +112,7 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { selector: "hello", selectorMatchOperator: "EndsWith", }, - { - matchVariable: "RequestArgNames", - selector: "test", - selectorMatchOperator: "StartsWith", - }, + { matchVariable: "RequestArgNames", selector: "test", selectorMatchOperator: "StartsWith" }, { matchVariable: "RequestArgValues", selector: "test", @@ -174,11 +126,7 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { ruleGroupName: "REQUEST-931-APPLICATION-ATTACK-RFI", rules: [ { action: "Log", ruleId: "931120", state: "Enabled" }, - { - action: "AnomalyScoring", - ruleId: "931130", - state: "Disabled", - }, + { action: "AnomalyScoring", ruleId: "931130", state: "Disabled" }, ], }, ], @@ -189,10 +137,7 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { ruleGroupOverrides: [ { ruleGroupName: "UnknownBots", - rules: [ - { action: "JSChallenge", ruleId: "300700", state: "Enabled" }, - { action: "CAPTCHA", ruleId: "300600", state: "Enabled" }, - ], + rules: [{ action: "JSChallenge", ruleId: "300700", state: "Enabled" }], }, ], ruleSetType: "Microsoft_BotManagerRuleSet", @@ -202,14 +147,7 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { ruleGroupOverrides: [ { ruleGroupName: "ExcessiveRequests", - rules: [ - { - action: "Block", - ruleId: "500100", - sensitivity: "High", - state: "Enabled", - }, - ], + rules: [{ action: "Block", ruleId: "500100", sensitivity: "High", state: "Enabled" }], }, ], ruleSetType: "Microsoft_HTTPDDoSRuleSet", @@ -218,9 +156,7 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { ], exceptions: [ { - exceptionManagedRuleSets: [ - { ruleSetType: "OWASP", ruleSetVersion: "3.2" }, - ], + exceptionManagedRuleSets: [{ ruleSetType: "OWASP", ruleSetVersion: "3.2" }], matchVariable: "RequestURI", valueMatchOperator: "Contains", values: ["health", "account/images", "default.aspx"], @@ -228,9 +164,7 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { { exceptionManagedRuleSets: [ { - ruleGroups: [ - { ruleGroupName: "REQUEST-932-APPLICATION-ATTACK-RCE" }, - ], + ruleGroups: [{ ruleGroupName: "REQUEST-932-APPLICATION-ATTACK-RCE" }], ruleSetType: "OWASP", ruleSetVersion: "3.2", }, @@ -244,9 +178,7 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { { exceptionManagedRuleSets: [ { - ruleGroups: [ - { ruleGroupName: "BadBots", rules: [{ ruleId: "100100" }] }, - ], + ruleGroups: [{ ruleGroupName: "BadBots", rules: [{ ruleId: "100100" }] }], ruleSetType: "Microsoft_BotManagerRuleSet", ruleSetVersion: "1.0", }, @@ -258,7 +190,6 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { ], }, policySettings: { - captchaCookieExpirationInMins: 100, jsChallengeCookieExpirationInMins: 100, logScrubbing: { scrubbingRules: [ @@ -277,19 +208,12 @@ async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { state: "Enabled", }, }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.createOrUpdate( - resourceGroupName, - policyName, - parameters, - ); + }); console.log(result); } async function main(): Promise { - await createsOrUpdatesAWafPolicyWithinAResourceGroup(); + await createsOrUpdatesAWAFPolicyWithinAResourceGroup(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesDeleteSample.ts b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesDeleteSample.ts index e35249672931..e72e15fef085 100644 --- a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesDeleteSample.ts @@ -3,29 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deletes Policy. + * This sample demonstrates how to deletes Policy. * - * @summary Deletes Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyDelete.json + * @summary deletes Policy. + * x-ms-original-file: 2025-07-01/WafPolicyDelete.json */ -async function deletesAWafPolicyWithinAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; +async function deletesAWAFPolicyWithinAResourceGroup(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.beginDeleteAndWait( - resourceGroupName, - policyName, - ); - console.log(result); + await client.webApplicationFirewallPolicies.delete("rg1", "Policy1"); } async function main(): Promise { - await deletesAWafPolicyWithinAResourceGroup(); + await deletesAWAFPolicyWithinAResourceGroup(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesGetSample.ts b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesGetSample.ts index 1c7a927883ed..5abe21ae4a32 100644 --- a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesGetSample.ts @@ -3,29 +3,23 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Retrieve protection policy with specified name within a resource group. + * This sample demonstrates how to retrieve protection policy with specified name within a resource group. * - * @summary Retrieve protection policy with specified name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyGet.json + * @summary retrieve protection policy with specified name within a resource group. + * x-ms-original-file: 2025-07-01/WafPolicyGet.json */ -async function getsAWafPolicyWithinAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; +async function getsAWAFPolicyWithinAResourceGroup(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.get( - resourceGroupName, - policyName, - ); + const result = await client.webApplicationFirewallPolicies.get("rg1", "Policy1"); console.log(result); } async function main(): Promise { - await getsAWafPolicyWithinAResourceGroup(); + await getsAWAFPolicyWithinAResourceGroup(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListAllSample.ts b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListAllSample.ts index 0f42e6fed32c..e096fc68d36d 100644 --- a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListAllSample.ts @@ -3,27 +3,27 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the WAF policies in a subscription. + * This sample demonstrates how to gets all the WAF policies in a subscription. * - * @summary Gets all the WAF policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafListAllPolicies.json + * @summary gets all the WAF policies in a subscription. + * x-ms-original-file: 2025-07-01/WafListAllPolicies.json */ -async function listsAllWafPoliciesInASubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; +async function listsAllWAFPoliciesInASubscription(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.webApplicationFirewallPolicies.listAll()) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await listsAllWafPoliciesInASubscription(); + await listsAllWAFPoliciesInASubscription(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListSample.ts b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListSample.ts index 248dc7dd51ec..63b4792eb35c 100644 --- a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListSample.ts +++ b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListSample.ts @@ -3,30 +3,27 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Lists all of the protection policies within a resource group. + * This sample demonstrates how to lists all of the protection policies within a resource group. * - * @summary Lists all of the protection policies within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafListPolicies.json + * @summary lists all of the protection policies within a resource group. + * x-ms-original-file: 2025-07-01/WafListPolicies.json */ -async function listsAllWafPoliciesInAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; +async function listsAllWAFPoliciesInAResourceGroup(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.webApplicationFirewallPolicies.list( - resourceGroupName, - )) { + for await (const item of client.webApplicationFirewallPolicies.list("rg1")) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await listsAllWafPoliciesInAResourceGroup(); + await listsAllWAFPoliciesInAResourceGroup(); } main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/webCategoriesGetSample.ts b/sdk/network/arm-network/samples-dev/webCategoriesGetSample.ts index 9d1cb381c2d9..8ea35be2504f 100644 --- a/sdk/network/arm-network/samples-dev/webCategoriesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/webCategoriesGetSample.ts @@ -3,22 +3,18 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets the specified Azure Web Category. + * This sample demonstrates how to gets the specified Azure Web Category. * - * @summary Gets the specified Azure Web Category. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureWebCategoryGet.json + * @summary gets the specified Azure Web Category. + * x-ms-original-file: 2025-07-01/AzureWebCategoryGet.json */ async function getAzureWebCategoryByName(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "4de8428a-4a92-4cea-90ff-b47128b8cab8"; - const name = "Arts"; const credential = new DefaultAzureCredential(); + const subscriptionId = "4de8428a-4a92-4cea-90ff-b47128b8cab8"; const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webCategories.get(name); + const result = await client.webCategories.get("Arts"); console.log(result); } diff --git a/sdk/network/arm-network/samples-dev/webCategoriesListBySubscriptionSample.ts b/sdk/network/arm-network/samples-dev/webCategoriesListBySubscriptionSample.ts index beec38269f13..2e2ffb784c0d 100644 --- a/sdk/network/arm-network/samples-dev/webCategoriesListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples-dev/webCategoriesListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Gets all the Azure Web Categories in a subscription. + * This sample demonstrates how to gets all the Azure Web Categories in a subscription. * - * @summary Gets all the Azure Web Categories in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureWebCategoriesListBySubscription.json + * @summary gets all the Azure Web Categories in a subscription. + * x-ms-original-file: 2025-07-01/AzureWebCategoriesListBySubscription.json */ async function listAllAzureWebCategoriesForAGivenSubscription(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "4de8428a-4a92-4cea-90ff-b47128b8cab8"; const credential = new DefaultAzureCredential(); + const subscriptionId = "4de8428a-4a92-4cea-90ff-b47128b8cab8"; const client = new NetworkManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.webCategories.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/network/arm-network/samples/v35/javascript/README.md b/sdk/network/arm-network/samples/v35/javascript/README.md deleted file mode 100644 index ed7d581273be..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/README.md +++ /dev/null @@ -1,1510 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [adminRuleCollectionsCreateOrUpdateSample.js][adminrulecollectionscreateorupdatesample] | Creates or updates an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionPut.json | -| [adminRuleCollectionsDeleteSample.js][adminrulecollectionsdeletesample] | Deletes an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionDelete.json | -| [adminRuleCollectionsGetSample.js][adminrulecollectionsgetsample] | Gets a network manager security admin configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionGet.json | -| [adminRuleCollectionsListSample.js][adminrulecollectionslistsample] | Lists all the rule collections in a security admin configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionList.json | -| [adminRulesCreateOrUpdateSample.js][adminrulescreateorupdatesample] | Creates or updates an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json | -| [adminRulesDeleteSample.js][adminrulesdeletesample] | Deletes an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleDelete.json | -| [adminRulesGetSample.js][adminrulesgetsample] | Gets a network manager security configuration admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleGet.json | -| [adminRulesListSample.js][adminruleslistsample] | List all network manager security configuration admin rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleList.json | -| [applicationGatewayPrivateEndpointConnectionsDeleteSample.js][applicationgatewayprivateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json | -| [applicationGatewayPrivateEndpointConnectionsGetSample.js][applicationgatewayprivateendpointconnectionsgetsample] | Gets the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json | -| [applicationGatewayPrivateEndpointConnectionsListSample.js][applicationgatewayprivateendpointconnectionslistsample] | Lists all private endpoint connections on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json | -| [applicationGatewayPrivateEndpointConnectionsUpdateSample.js][applicationgatewayprivateendpointconnectionsupdatesample] | Updates the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json | -| [applicationGatewayPrivateLinkResourcesListSample.js][applicationgatewayprivatelinkresourceslistsample] | Lists all private link resources on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateLinkResourceList.json | -| [applicationGatewayWafDynamicManifestsDefaultGetSample.js][applicationgatewaywafdynamicmanifestsdefaultgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json | -| [applicationGatewayWafDynamicManifestsGetSample.js][applicationgatewaywafdynamicmanifestsgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetApplicationGatewayWafDynamicManifests.json | -| [applicationGatewaysBackendHealthOnDemandSample.js][applicationgatewaysbackendhealthondemandsample] | Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayBackendHealthTest.json | -| [applicationGatewaysBackendHealthSample.js][applicationgatewaysbackendhealthsample] | Gets the backend health of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayBackendHealthGet.json | -| [applicationGatewaysCreateOrUpdateSample.js][applicationgatewayscreateorupdatesample] | Creates or updates the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayCreate.json | -| [applicationGatewaysDeleteSample.js][applicationgatewaysdeletesample] | Deletes the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayDelete.json | -| [applicationGatewaysGetSample.js][applicationgatewaysgetsample] | Gets the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayGet.json | -| [applicationGatewaysGetSslPredefinedPolicySample.js][applicationgatewaysgetsslpredefinedpolicysample] | Gets Ssl predefined policy with the specified policy name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json | -| [applicationGatewaysListAllSample.js][applicationgatewayslistallsample] | Gets all the application gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayListAll.json | -| [applicationGatewaysListAvailableRequestHeadersSample.js][applicationgatewayslistavailablerequestheaderssample] | Lists all available request headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json | -| [applicationGatewaysListAvailableResponseHeadersSample.js][applicationgatewayslistavailableresponseheaderssample] | Lists all available response headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json | -| [applicationGatewaysListAvailableServerVariablesSample.js][applicationgatewayslistavailableservervariablessample] | Lists all available server variables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableServerVariablesGet.json | -| [applicationGatewaysListAvailableSslOptionsSample.js][applicationgatewayslistavailablessloptionssample] | Lists available Ssl options for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsGet.json | -| [applicationGatewaysListAvailableSslPredefinedPoliciesSample.js][applicationgatewayslistavailablesslpredefinedpoliciessample] | Lists all SSL predefined policies for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json | -| [applicationGatewaysListAvailableWafRuleSetsSample.js][applicationgatewayslistavailablewafrulesetssample] | Lists all available web application firewall rule sets. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json | -| [applicationGatewaysListSample.js][applicationgatewayslistsample] | Lists all application gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayList.json | -| [applicationGatewaysStartSample.js][applicationgatewaysstartsample] | Starts the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayStart.json | -| [applicationGatewaysStopSample.js][applicationgatewaysstopsample] | Stops the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayStop.json | -| [applicationGatewaysUpdateTagsSample.js][applicationgatewaysupdatetagssample] | Updates the specified application gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayUpdateTags.json | -| [applicationSecurityGroupsCreateOrUpdateSample.js][applicationsecuritygroupscreateorupdatesample] | Creates or updates an application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupCreate.json | -| [applicationSecurityGroupsDeleteSample.js][applicationsecuritygroupsdeletesample] | Deletes the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupDelete.json | -| [applicationSecurityGroupsGetSample.js][applicationsecuritygroupsgetsample] | Gets information about the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupGet.json | -| [applicationSecurityGroupsListAllSample.js][applicationsecuritygroupslistallsample] | Gets all application security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupListAll.json | -| [applicationSecurityGroupsListSample.js][applicationsecuritygroupslistsample] | Gets all the application security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupList.json | -| [applicationSecurityGroupsUpdateTagsSample.js][applicationsecuritygroupsupdatetagssample] | Updates an application security group's tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupUpdateTags.json | -| [availableDelegationsListSample.js][availabledelegationslistsample] | Gets all of the available subnet delegations for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableDelegationsSubscriptionGet.json | -| [availableEndpointServicesListSample.js][availableendpointserviceslistsample] | List what values of endpoint services are available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EndpointServicesList.json | -| [availablePrivateEndpointTypesListByResourceGroupSample.js][availableprivateendpointtypeslistbyresourcegroupsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json | -| [availablePrivateEndpointTypesListSample.js][availableprivateendpointtypeslistsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailablePrivateEndpointTypesGet.json | -| [availableResourceGroupDelegationsListSample.js][availableresourcegroupdelegationslistsample] | Gets all of the available subnet delegations for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableDelegationsResourceGroupGet.json | -| [availableServiceAliasesListByResourceGroupSample.js][availableservicealiaseslistbyresourcegroupsample] | Gets all available service aliases for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableServiceAliasesListByResourceGroup.json | -| [availableServiceAliasesListSample.js][availableservicealiaseslistsample] | Gets all available service aliases for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableServiceAliasesList.json | -| [azureFirewallFqdnTagsListAllSample.js][azurefirewallfqdntagslistallsample] | Gets all the Azure Firewall FQDN Tags in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallFqdnTagsListBySubscription.json | -| [azureFirewallsCreateOrUpdateSample.js][azurefirewallscreateorupdatesample] | Creates or updates the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPut.json | -| [azureFirewallsDeleteSample.js][azurefirewallsdeletesample] | Deletes the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallDelete.json | -| [azureFirewallsGetSample.js][azurefirewallsgetsample] | Gets the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGet.json | -| [azureFirewallsListAllSample.js][azurefirewallslistallsample] | Gets all the Azure Firewalls in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListBySubscription.json | -| [azureFirewallsListLearnedPrefixesSample.js][azurefirewallslistlearnedprefixessample] | Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListLearnedIPPrefixes.json | -| [azureFirewallsListSample.js][azurefirewallslistsample] | Lists all Azure Firewalls in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListByResourceGroup.json | -| [azureFirewallsPacketCaptureOperationSample.js][azurefirewallspacketcaptureoperationsample] | Runs a packet capture operation on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPacketCaptureOperation.json | -| [azureFirewallsPacketCaptureSample.js][azurefirewallspacketcapturesample] | Runs a packet capture on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPacketCapture.json | -| [azureFirewallsUpdateTagsSample.js][azurefirewallsupdatetagssample] | Updates tags of an Azure Firewall resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallUpdateTags.json | -| [bastionHostsCreateOrUpdateSample.js][bastionhostscreateorupdatesample] | Creates or updates the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPut.json | -| [bastionHostsDeleteSample.js][bastionhostsdeletesample] | Deletes the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDelete.json | -| [bastionHostsGetSample.js][bastionhostsgetsample] | Gets the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostGet.json | -| [bastionHostsListByResourceGroupSample.js][bastionhostslistbyresourcegroupsample] | Lists all Bastion Hosts in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostListByResourceGroup.json | -| [bastionHostsListSample.js][bastionhostslistsample] | Lists all Bastion Hosts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostListBySubscription.json | -| [bastionHostsUpdateTagsSample.js][bastionhostsupdatetagssample] | Updates Tags for BastionHost resource x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPatch.json | -| [bgpServiceCommunitiesListSample.js][bgpservicecommunitieslistsample] | Gets all the available bgp service communities. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceCommunityList.json | -| [checkDnsNameAvailabilitySample.js][checkdnsnameavailabilitysample] | Checks whether a domain name in the cloudapp.azure.com zone is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckDnsNameAvailability.json | -| [configurationPolicyGroupsCreateOrUpdateSample.js][configurationpolicygroupscreateorupdatesample] | Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupPut.json | -| [configurationPolicyGroupsDeleteSample.js][configurationpolicygroupsdeletesample] | Deletes a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupDelete.json | -| [configurationPolicyGroupsGetSample.js][configurationpolicygroupsgetsample] | Retrieves the details of a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupGet.json | -| [configurationPolicyGroupsListByVpnServerConfigurationSample.js][configurationpolicygroupslistbyvpnserverconfigurationsample] | Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json | -| [connectionMonitorsCreateOrUpdateSample.js][connectionmonitorscreateorupdatesample] | Create or update a connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorCreate.json | -| [connectionMonitorsDeleteSample.js][connectionmonitorsdeletesample] | Deletes the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorDelete.json | -| [connectionMonitorsGetSample.js][connectionmonitorsgetsample] | Gets a connection monitor by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorGet.json | -| [connectionMonitorsListSample.js][connectionmonitorslistsample] | Lists all connection monitors for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorList.json | -| [connectionMonitorsStopSample.js][connectionmonitorsstopsample] | Stops the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorStop.json | -| [connectionMonitorsUpdateTagsSample.js][connectionmonitorsupdatetagssample] | Update tags of the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json | -| [connectivityConfigurationsCreateOrUpdateSample.js][connectivityconfigurationscreateorupdatesample] | Creates/Updates a new network manager connectivity configuration x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationPut.json | -| [connectivityConfigurationsDeleteSample.js][connectivityconfigurationsdeletesample] | Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationDelete.json | -| [connectivityConfigurationsGetSample.js][connectivityconfigurationsgetsample] | Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationGet.json | -| [connectivityConfigurationsListSample.js][connectivityconfigurationslistsample] | Lists all the network manager connectivity configuration in a specified network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationList.json | -| [customIPPrefixesCreateOrUpdateSample.js][customipprefixescreateorupdatesample] | Creates or updates a custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixCreateCustomizedValues.json | -| [customIPPrefixesDeleteSample.js][customipprefixesdeletesample] | Deletes the specified custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixDelete.json | -| [customIPPrefixesGetSample.js][customipprefixesgetsample] | Gets the specified custom IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixGet.json | -| [customIPPrefixesListAllSample.js][customipprefixeslistallsample] | Gets all the custom IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixListAll.json | -| [customIPPrefixesListSample.js][customipprefixeslistsample] | Gets all custom IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixList.json | -| [customIPPrefixesUpdateTagsSample.js][customipprefixesupdatetagssample] | Updates custom IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixUpdateTags.json | -| [ddosCustomPoliciesCreateOrUpdateSample.js][ddoscustompoliciescreateorupdatesample] | Creates or updates a DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyCreate.json | -| [ddosCustomPoliciesDeleteSample.js][ddoscustompoliciesdeletesample] | Deletes the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyDelete.json | -| [ddosCustomPoliciesGetSample.js][ddoscustompoliciesgetsample] | Gets information about the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyGet.json | -| [ddosCustomPoliciesUpdateTagsSample.js][ddoscustompoliciesupdatetagssample] | Update a DDoS custom policy tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyUpdateTags.json | -| [ddosProtectionPlansCreateOrUpdateSample.js][ddosprotectionplanscreateorupdatesample] | Creates or updates a DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanCreate.json | -| [ddosProtectionPlansDeleteSample.js][ddosprotectionplansdeletesample] | Deletes the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanDelete.json | -| [ddosProtectionPlansGetSample.js][ddosprotectionplansgetsample] | Gets information about the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanGet.json | -| [ddosProtectionPlansListByResourceGroupSample.js][ddosprotectionplanslistbyresourcegroupsample] | Gets all the DDoS protection plans in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanList.json | -| [ddosProtectionPlansListSample.js][ddosprotectionplanslistsample] | Gets all DDoS protection plans in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanListAll.json | -| [ddosProtectionPlansUpdateTagsSample.js][ddosprotectionplansupdatetagssample] | Update a DDoS protection plan tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanUpdateTags.json | -| [defaultSecurityRulesGetSample.js][defaultsecurityrulesgetsample] | Get the specified default network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DefaultSecurityRuleGet.json | -| [defaultSecurityRulesListSample.js][defaultsecurityruleslistsample] | Gets all default security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DefaultSecurityRuleList.json | -| [deleteBastionShareableLinkByTokenSample.js][deletebastionshareablelinkbytokensample] | Deletes the Bastion Shareable Links for all the tokens specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkDeleteByToken.json | -| [deleteBastionShareableLinkSample.js][deletebastionshareablelinksample] | Deletes the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkDelete.json | -| [disconnectActiveSessionsSample.js][disconnectactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionSessionDelete.json | -| [dscpConfigurationCreateOrUpdateSample.js][dscpconfigurationcreateorupdatesample] | Creates or updates a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationCreate.json | -| [dscpConfigurationDeleteSample.js][dscpconfigurationdeletesample] | Deletes a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationDelete.json | -| [dscpConfigurationGetSample.js][dscpconfigurationgetsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationGet.json | -| [dscpConfigurationListAllSample.js][dscpconfigurationlistallsample] | Gets all dscp configurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationListAll.json | -| [dscpConfigurationListSample.js][dscpconfigurationlistsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationList.json | -| [expressRouteCircuitAuthorizationsCreateOrUpdateSample.js][expressroutecircuitauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationCreate.json | -| [expressRouteCircuitAuthorizationsDeleteSample.js][expressroutecircuitauthorizationsdeletesample] | Deletes the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationDelete.json | -| [expressRouteCircuitAuthorizationsGetSample.js][expressroutecircuitauthorizationsgetsample] | Gets the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationGet.json | -| [expressRouteCircuitAuthorizationsListSample.js][expressroutecircuitauthorizationslistsample] | Gets all authorizations in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationList.json | -| [expressRouteCircuitConnectionsCreateOrUpdateSample.js][expressroutecircuitconnectionscreateorupdatesample] | Creates or updates a Express Route Circuit Connection in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionCreate.json | -| [expressRouteCircuitConnectionsDeleteSample.js][expressroutecircuitconnectionsdeletesample] | Deletes the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionDelete.json | -| [expressRouteCircuitConnectionsGetSample.js][expressroutecircuitconnectionsgetsample] | Gets the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionGet.json | -| [expressRouteCircuitConnectionsListSample.js][expressroutecircuitconnectionslistsample] | Gets all global reach connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionList.json | -| [expressRouteCircuitPeeringsCreateOrUpdateSample.js][expressroutecircuitpeeringscreateorupdatesample] | Creates or updates a peering in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringCreate.json | -| [expressRouteCircuitPeeringsDeleteSample.js][expressroutecircuitpeeringsdeletesample] | Deletes the specified peering from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringDelete.json | -| [expressRouteCircuitPeeringsGetSample.js][expressroutecircuitpeeringsgetsample] | Gets the specified peering for the express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringGet.json | -| [expressRouteCircuitPeeringsListSample.js][expressroutecircuitpeeringslistsample] | Gets all peerings in a specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringList.json | -| [expressRouteCircuitsCreateOrUpdateSample.js][expressroutecircuitscreateorupdatesample] | Creates or updates an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitCreate.json | -| [expressRouteCircuitsDeleteSample.js][expressroutecircuitsdeletesample] | Deletes the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitDelete.json | -| [expressRouteCircuitsGetPeeringStatsSample.js][expressroutecircuitsgetpeeringstatssample] | Gets all stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringStats.json | -| [expressRouteCircuitsGetSample.js][expressroutecircuitsgetsample] | Gets information about the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitGet.json | -| [expressRouteCircuitsGetStatsSample.js][expressroutecircuitsgetstatssample] | Gets all the stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitStats.json | -| [expressRouteCircuitsListAllSample.js][expressroutecircuitslistallsample] | Gets all the express route circuits in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitListBySubscription.json | -| [expressRouteCircuitsListArpTableSample.js][expressroutecircuitslistarptablesample] | Gets the currently advertised ARP table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitARPTableList.json | -| [expressRouteCircuitsListRoutesTableSample.js][expressroutecircuitslistroutestablesample] | Gets the currently advertised routes table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitRouteTableList.json | -| [expressRouteCircuitsListRoutesTableSummarySample.js][expressroutecircuitslistroutestablesummarysample] | Gets the currently advertised routes table summary associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitRouteTableSummaryList.json | -| [expressRouteCircuitsListSample.js][expressroutecircuitslistsample] | Gets all the express route circuits in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitListByResourceGroup.json | -| [expressRouteCircuitsUpdateTagsSample.js][expressroutecircuitsupdatetagssample] | Updates an express route circuit tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitUpdateTags.json | -| [expressRouteConnectionsCreateOrUpdateSample.js][expressrouteconnectionscreateorupdatesample] | Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionCreate.json | -| [expressRouteConnectionsDeleteSample.js][expressrouteconnectionsdeletesample] | Deletes a connection to a ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionDelete.json | -| [expressRouteConnectionsGetSample.js][expressrouteconnectionsgetsample] | Gets the specified ExpressRouteConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionGet.json | -| [expressRouteConnectionsListSample.js][expressrouteconnectionslistsample] | Lists ExpressRouteConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionList.json | -| [expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js][expressroutecrossconnectionpeeringscreateorupdatesample] | Creates or updates a peering in the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json | -| [expressRouteCrossConnectionPeeringsDeleteSample.js][expressroutecrossconnectionpeeringsdeletesample] | Deletes the specified peering from the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json | -| [expressRouteCrossConnectionPeeringsGetSample.js][expressroutecrossconnectionpeeringsgetsample] | Gets the specified peering for the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json | -| [expressRouteCrossConnectionPeeringsListSample.js][expressroutecrossconnectionpeeringslistsample] | Gets all peerings in a specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json | -| [expressRouteCrossConnectionsCreateOrUpdateSample.js][expressroutecrossconnectionscreateorupdatesample] | Update the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionUpdate.json | -| [expressRouteCrossConnectionsGetSample.js][expressroutecrossconnectionsgetsample] | Gets details about the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionGet.json | -| [expressRouteCrossConnectionsListArpTableSample.js][expressroutecrossconnectionslistarptablesample] | Gets the currently advertised ARP table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsArpTable.json | -| [expressRouteCrossConnectionsListByResourceGroupSample.js][expressroutecrossconnectionslistbyresourcegroupsample] | Retrieves all the ExpressRouteCrossConnections in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json | -| [expressRouteCrossConnectionsListRoutesTableSample.js][expressroutecrossconnectionslistroutestablesample] | Gets the currently advertised routes table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsRouteTable.json | -| [expressRouteCrossConnectionsListRoutesTableSummarySample.js][expressroutecrossconnectionslistroutestablesummarysample] | Gets the route table summary associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json | -| [expressRouteCrossConnectionsListSample.js][expressroutecrossconnectionslistsample] | Retrieves all the ExpressRouteCrossConnections in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionList.json | -| [expressRouteCrossConnectionsUpdateTagsSample.js][expressroutecrossconnectionsupdatetagssample] | Updates an express route cross connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionUpdateTags.json | -| [expressRouteGatewaysCreateOrUpdateSample.js][expressroutegatewayscreateorupdatesample] | Creates or updates a ExpressRoute gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayCreate.json | -| [expressRouteGatewaysDeleteSample.js][expressroutegatewaysdeletesample] | Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayDelete.json | -| [expressRouteGatewaysGetSample.js][expressroutegatewaysgetsample] | Fetches the details of a ExpressRoute gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayGet.json | -| [expressRouteGatewaysListByResourceGroupSample.js][expressroutegatewayslistbyresourcegroupsample] | Lists ExpressRoute gateways in a given resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayListByResourceGroup.json | -| [expressRouteGatewaysListBySubscriptionSample.js][expressroutegatewayslistbysubscriptionsample] | Lists ExpressRoute gateways under a given subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayListBySubscription.json | -| [expressRouteGatewaysUpdateTagsSample.js][expressroutegatewaysupdatetagssample] | Updates express route gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayUpdateTags.json | -| [expressRouteLinksGetSample.js][expressroutelinksgetsample] | Retrieves the specified ExpressRouteLink resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteLinkGet.json | -| [expressRouteLinksListSample.js][expressroutelinkslistsample] | Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteLinkList.json | -| [expressRoutePortAuthorizationsCreateOrUpdateSample.js][expressrouteportauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationCreate.json | -| [expressRoutePortAuthorizationsDeleteSample.js][expressrouteportauthorizationsdeletesample] | Deletes the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationDelete.json | -| [expressRoutePortAuthorizationsGetSample.js][expressrouteportauthorizationsgetsample] | Gets the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationGet.json | -| [expressRoutePortAuthorizationsListSample.js][expressrouteportauthorizationslistsample] | Gets all authorizations in an express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationList.json | -| [expressRoutePortsCreateOrUpdateSample.js][expressrouteportscreateorupdatesample] | Creates or updates the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortCreate.json | -| [expressRoutePortsDeleteSample.js][expressrouteportsdeletesample] | Deletes the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortDelete.json | -| [expressRoutePortsGenerateLoaSample.js][expressrouteportsgenerateloasample] | Generate a letter of authorization for the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GenerateExpressRoutePortsLOA.json | -| [expressRoutePortsGetSample.js][expressrouteportsgetsample] | Retrieves the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortGet.json | -| [expressRoutePortsListByResourceGroupSample.js][expressrouteportslistbyresourcegroupsample] | List all the ExpressRoutePort resources in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortListByResourceGroup.json | -| [expressRoutePortsListSample.js][expressrouteportslistsample] | List all the ExpressRoutePort resources in the specified subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortList.json | -| [expressRoutePortsLocationsGetSample.js][expressrouteportslocationsgetsample] | Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortsLocationGet.json | -| [expressRoutePortsLocationsListSample.js][expressrouteportslocationslistsample] | Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortsLocationList.json | -| [expressRoutePortsUpdateTagsSample.js][expressrouteportsupdatetagssample] | Update ExpressRoutePort tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortUpdateTags.json | -| [expressRouteProviderPortSample.js][expressrouteproviderportsample] | Retrieves detail of a provider port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/expressRouteProviderPort.json | -| [expressRouteProviderPortsLocationListSample.js][expressrouteproviderportslocationlistsample] | Retrieves all the ExpressRouteProviderPorts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/expressRouteProviderPortList.json | -| [expressRouteServiceProvidersListSample.js][expressrouteserviceproviderslistsample] | Gets all the available express route service providers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteProviderList.json | -| [firewallPoliciesCreateOrUpdateSample.js][firewallpoliciescreateorupdatesample] | Creates or updates the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyPut.json | -| [firewallPoliciesDeleteSample.js][firewallpoliciesdeletesample] | Deletes the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDelete.json | -| [firewallPoliciesGetSample.js][firewallpoliciesgetsample] | Gets the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyGet.json | -| [firewallPoliciesListAllSample.js][firewallpolicieslistallsample] | Gets all the Firewall Policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyListBySubscription.json | -| [firewallPoliciesListSample.js][firewallpolicieslistsample] | Lists all Firewall Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyListByResourceGroup.json | -| [firewallPoliciesUpdateTagsSample.js][firewallpoliciesupdatetagssample] | Updates tags of a Azure Firewall Policy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyPatch.json | -| [firewallPolicyDeploymentsDeploySample.js][firewallpolicydeploymentsdeploysample] | Deploys the firewall policy draft and child rule collection group drafts. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftDeploy.json | -| [firewallPolicyDraftsCreateOrUpdateSample.js][firewallpolicydraftscreateorupdatesample] | Create or update a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftPut.json | -| [firewallPolicyDraftsDeleteSample.js][firewallpolicydraftsdeletesample] | Delete a draft policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftDelete.json | -| [firewallPolicyDraftsGetSample.js][firewallpolicydraftsgetsample] | Get a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftGet.json | -| [firewallPolicyIdpsSignaturesFilterValuesListSample.js][firewallpolicyidpssignaturesfiltervalueslistsample] | Retrieves the current filter values for the signatures overrides x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json | -| [firewallPolicyIdpsSignaturesListSample.js][firewallpolicyidpssignatureslistsample] | Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyQuerySignatureOverrides.json | -| [firewallPolicyIdpsSignaturesOverridesGetSample.js][firewallpolicyidpssignaturesoverridesgetsample] | Returns all signatures overrides for a specific policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesGet.json | -| [firewallPolicyIdpsSignaturesOverridesListSample.js][firewallpolicyidpssignaturesoverrideslistsample] | Returns all signatures overrides objects for a specific policy as a list containing a single value. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesList.json | -| [firewallPolicyIdpsSignaturesOverridesPatchSample.js][firewallpolicyidpssignaturesoverridespatchsample] | Will update the status of policy's signature overrides for IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesPatch.json | -| [firewallPolicyIdpsSignaturesOverridesPutSample.js][firewallpolicyidpssignaturesoverridesputsample] | Will override/create a new signature overrides for the policy's IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesPut.json | -| [firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js][firewallpolicyrulecollectiongroupdraftscreateorupdatesample] | Create or Update Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json | -| [firewallPolicyRuleCollectionGroupDraftsDeleteSample.js][firewallpolicyrulecollectiongroupdraftsdeletesample] | Delete Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json | -| [firewallPolicyRuleCollectionGroupDraftsGetSample.js][firewallpolicyrulecollectiongroupdraftsgetsample] | Get Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json | -| [firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js][firewallpolicyrulecollectiongroupscreateorupdatesample] | Creates or updates the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json | -| [firewallPolicyRuleCollectionGroupsDeleteSample.js][firewallpolicyrulecollectiongroupsdeletesample] | Deletes the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDelete.json | -| [firewallPolicyRuleCollectionGroupsGetSample.js][firewallpolicyrulecollectiongroupsgetsample] | Gets the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json | -| [firewallPolicyRuleCollectionGroupsListSample.js][firewallpolicyrulecollectiongroupslistsample] | Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json | -| [flowLogsCreateOrUpdateSample.js][flowlogscreateorupdatesample] | Create or update a flow log for the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogCreate.json | -| [flowLogsDeleteSample.js][flowlogsdeletesample] | Deletes the specified flow log resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogDelete.json | -| [flowLogsGetSample.js][flowlogsgetsample] | Gets a flow log resource by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogGet.json | -| [flowLogsListSample.js][flowlogslistsample] | Lists all flow log resources for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogList.json | -| [flowLogsUpdateTagsSample.js][flowlogsupdatetagssample] | Update tags of the specified flow log. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogUpdateTags.json | -| [generatevirtualwanvpnserverconfigurationvpnprofileSample.js][generatevirtualwanvpnserverconfigurationvpnprofilesample] | Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json | -| [getActiveSessionsSample.js][getactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionSessionsList.json | -| [getBastionShareableLinkSample.js][getbastionshareablelinksample] | Return the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkGet.json | -| [hubRouteTablesCreateOrUpdateSample.js][hubroutetablescreateorupdatesample] | Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTablePut.json | -| [hubRouteTablesDeleteSample.js][hubroutetablesdeletesample] | Deletes a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableDelete.json | -| [hubRouteTablesGetSample.js][hubroutetablesgetsample] | Retrieves the details of a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableGet.json | -| [hubRouteTablesListSample.js][hubroutetableslistsample] | Retrieves the details of all RouteTables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableList.json | -| [hubVirtualNetworkConnectionsCreateOrUpdateSample.js][hubvirtualnetworkconnectionscreateorupdatesample] | Creates a hub virtual network connection if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionPut.json | -| [hubVirtualNetworkConnectionsDeleteSample.js][hubvirtualnetworkconnectionsdeletesample] | Deletes a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionDelete.json | -| [hubVirtualNetworkConnectionsGetSample.js][hubvirtualnetworkconnectionsgetsample] | Retrieves the details of a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionGet.json | -| [hubVirtualNetworkConnectionsListSample.js][hubvirtualnetworkconnectionslistsample] | Retrieves the details of all HubVirtualNetworkConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionList.json | -| [inboundNatRulesCreateOrUpdateSample.js][inboundnatrulescreateorupdatesample] | Creates or updates a load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleCreate.json | -| [inboundNatRulesDeleteSample.js][inboundnatrulesdeletesample] | Deletes the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleDelete.json | -| [inboundNatRulesGetSample.js][inboundnatrulesgetsample] | Gets the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleGet.json | -| [inboundNatRulesListSample.js][inboundnatruleslistsample] | Gets all the inbound NAT rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleList.json | -| [inboundSecurityRuleCreateOrUpdateSample.js][inboundsecurityrulecreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Inbound Security Rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundSecurityRulePut.json | -| [inboundSecurityRuleGetSample.js][inboundsecurityrulegetsample] | Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundSecurityRuleGet.json | -| [ipAllocationsCreateOrUpdateSample.js][ipallocationscreateorupdatesample] | Creates or updates an IpAllocation in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationCreate.json | -| [ipAllocationsDeleteSample.js][ipallocationsdeletesample] | Deletes the specified IpAllocation. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationDelete.json | -| [ipAllocationsGetSample.js][ipallocationsgetsample] | Gets the specified IpAllocation by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationGet.json | -| [ipAllocationsListByResourceGroupSample.js][ipallocationslistbyresourcegroupsample] | Gets all IpAllocations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationListByResourceGroup.json | -| [ipAllocationsListSample.js][ipallocationslistsample] | Gets all IpAllocations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationList.json | -| [ipAllocationsUpdateTagsSample.js][ipallocationsupdatetagssample] | Updates a IpAllocation tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationUpdateTags.json | -| [ipGroupsCreateOrUpdateSample.js][ipgroupscreateorupdatesample] | Creates or updates an ipGroups in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsCreate.json | -| [ipGroupsDeleteSample.js][ipgroupsdeletesample] | Deletes the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsDelete.json | -| [ipGroupsGetSample.js][ipgroupsgetsample] | Gets the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsGet.json | -| [ipGroupsListByResourceGroupSample.js][ipgroupslistbyresourcegroupsample] | Gets all IpGroups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsListByResourceGroup.json | -| [ipGroupsListSample.js][ipgroupslistsample] | Gets all IpGroups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsListBySubscription.json | -| [ipGroupsUpdateGroupsSample.js][ipgroupsupdategroupssample] | Updates tags of an IpGroups resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsUpdateTags.json | -| [ipamPoolsCreateSample.js][ipampoolscreatesample] | Creates/Updates the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Create.json | -| [ipamPoolsDeleteSample.js][ipampoolsdeletesample] | Delete the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Delete.json | -| [ipamPoolsGetPoolUsageSample.js][ipampoolsgetpoolusagesample] | Get the Pool Usage. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_GetPoolUsage.json | -| [ipamPoolsGetSample.js][ipampoolsgetsample] | Gets the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Get.json | -| [ipamPoolsListAssociatedResourcesSample.js][ipampoolslistassociatedresourcessample] | List Associated Resource in the Pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_ListAssociatedResources.json | -| [ipamPoolsListSample.js][ipampoolslistsample] | Gets list of Pool resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_List.json | -| [ipamPoolsUpdateSample.js][ipampoolsupdatesample] | Updates the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Update.json | -| [listActiveConnectivityConfigurationsSample.js][listactiveconnectivityconfigurationssample] | Lists active connectivity configurations in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json | -| [listActiveSecurityAdminRulesSample.js][listactivesecurityadminrulessample] | Lists active security admin rules in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerActiveSecurityAdminRulesList.json | -| [listNetworkManagerEffectiveConnectivityConfigurationsSample.js][listnetworkmanagereffectiveconnectivityconfigurationssample] | List all effective connectivity configurations applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json | -| [listNetworkManagerEffectiveSecurityAdminRulesSample.js][listnetworkmanagereffectivesecurityadminrulessample] | List all effective security admin rules applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json | -| [loadBalancerBackendAddressPoolsCreateOrUpdateSample.js][loadbalancerbackendaddresspoolscreateorupdatesample] | Creates or updates a load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json | -| [loadBalancerBackendAddressPoolsDeleteSample.js][loadbalancerbackendaddresspoolsdeletesample] | Deletes the specified load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerBackendAddressPoolDelete.json | -| [loadBalancerBackendAddressPoolsGetSample.js][loadbalancerbackendaddresspoolsgetsample] | Gets load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json | -| [loadBalancerBackendAddressPoolsListSample.js][loadbalancerbackendaddresspoolslistsample] | Gets all the load balancer backed address pools. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json | -| [loadBalancerFrontendIPConfigurationsGetSample.js][loadbalancerfrontendipconfigurationsgetsample] | Gets load balancer frontend IP configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerFrontendIPConfigurationGet.json | -| [loadBalancerFrontendIPConfigurationsListSample.js][loadbalancerfrontendipconfigurationslistsample] | Gets all the load balancer frontend IP configurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerFrontendIPConfigurationList.json | -| [loadBalancerLoadBalancingRulesGetSample.js][loadbalancerloadbalancingrulesgetsample] | Gets the specified load balancer load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerLoadBalancingRuleGet.json | -| [loadBalancerLoadBalancingRulesHealthSample.js][loadbalancerloadbalancingruleshealthsample] | Get health details of a load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerHealth.json | -| [loadBalancerLoadBalancingRulesListSample.js][loadbalancerloadbalancingruleslistsample] | Gets all the load balancing rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerLoadBalancingRuleList.json | -| [loadBalancerNetworkInterfacesListSample.js][loadbalancernetworkinterfaceslistsample] | Gets associated load balancer network interfaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerNetworkInterfaceListSimple.json | -| [loadBalancerOutboundRulesGetSample.js][loadbalanceroutboundrulesgetsample] | Gets the specified load balancer outbound rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerOutboundRuleGet.json | -| [loadBalancerOutboundRulesListSample.js][loadbalanceroutboundruleslistsample] | Gets all the outbound rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerOutboundRuleList.json | -| [loadBalancerProbesGetSample.js][loadbalancerprobesgetsample] | Gets load balancer probe. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerProbeGet.json | -| [loadBalancerProbesListSample.js][loadbalancerprobeslistsample] | Gets all the load balancer probes. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerProbeList.json | -| [loadBalancersCreateOrUpdateSample.js][loadbalancerscreateorupdatesample] | Creates or updates a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreate.json | -| [loadBalancersDeleteSample.js][loadbalancersdeletesample] | Deletes the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerDelete.json | -| [loadBalancersGetSample.js][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerGet.json | -| [loadBalancersListAllSample.js][loadbalancerslistallsample] | Gets all the load balancers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerListAll.json | -| [loadBalancersListInboundNatRulePortMappingsSample.js][loadbalancerslistinboundnatruleportmappingssample] | List of inbound NAT rule port mappings. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/QueryInboundNatRulePortMapping.json | -| [loadBalancersListSample.js][loadbalancerslistsample] | Gets all the load balancers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerList.json | -| [loadBalancersMigrateToIPBasedSample.js][loadbalancersmigratetoipbasedsample] | Migrate load balancer to IP Based x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/MigrateLoadBalancerToIPBased.json | -| [loadBalancersSwapPublicIPAddressesSample.js][loadbalancersswappublicipaddressessample] | Swaps VIPs between two load balancers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancersSwapPublicIpAddresses.json | -| [loadBalancersUpdateTagsSample.js][loadbalancersupdatetagssample] | Updates a load balancer tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerUpdateTags.json | -| [localNetworkGatewaysCreateOrUpdateSample.js][localnetworkgatewayscreateorupdatesample] | Creates or updates a local network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayCreate.json | -| [localNetworkGatewaysDeleteSample.js][localnetworkgatewaysdeletesample] | Deletes the specified local network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayDelete.json | -| [localNetworkGatewaysGetSample.js][localnetworkgatewaysgetsample] | Gets the specified local network gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayGet.json | -| [localNetworkGatewaysListSample.js][localnetworkgatewayslistsample] | Gets all the local network gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayList.json | -| [localNetworkGatewaysUpdateTagsSample.js][localnetworkgatewaysupdatetagssample] | Updates a local network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayUpdateTags.json | -| [managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js][managementgroupnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupPut.json | -| [managementGroupNetworkManagerConnectionsDeleteSample.js][managementgroupnetworkmanagerconnectionsdeletesample] | Delete specified pending connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupDelete.json | -| [managementGroupNetworkManagerConnectionsGetSample.js][managementgroupnetworkmanagerconnectionsgetsample] | Get a specified connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupGet.json | -| [managementGroupNetworkManagerConnectionsListSample.js][managementgroupnetworkmanagerconnectionslistsample] | List all network manager connections created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupList.json | -| [natGatewaysCreateOrUpdateSample.js][natgatewayscreateorupdatesample] | Creates or updates a nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayCreateOrUpdate.json | -| [natGatewaysDeleteSample.js][natgatewaysdeletesample] | Deletes the specified nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayDelete.json | -| [natGatewaysGetSample.js][natgatewaysgetsample] | Gets the specified nat gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayGet.json | -| [natGatewaysListAllSample.js][natgatewayslistallsample] | Gets all the Nat Gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayListAll.json | -| [natGatewaysListSample.js][natgatewayslistsample] | Gets all nat gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayList.json | -| [natGatewaysUpdateTagsSample.js][natgatewaysupdatetagssample] | Updates nat gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayUpdateTags.json | -| [natRulesCreateOrUpdateSample.js][natrulescreateorupdatesample] | Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRulePut.json | -| [natRulesDeleteSample.js][natrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleDelete.json | -| [natRulesGetSample.js][natrulesgetsample] | Retrieves the details of a nat ruleGet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleGet.json | -| [natRulesListByVpnGatewaySample.js][natruleslistbyvpngatewaysample] | Retrieves all nat rules for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleList.json | -| [networkGroupsCreateOrUpdateSample.js][networkgroupscreateorupdatesample] | Creates or updates a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupPut.json | -| [networkGroupsDeleteSample.js][networkgroupsdeletesample] | Deletes a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupDelete.json | -| [networkGroupsGetSample.js][networkgroupsgetsample] | Gets the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupGet.json | -| [networkGroupsListSample.js][networkgroupslistsample] | Lists the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupList.json | -| [networkInterfaceIPConfigurationsGetSample.js][networkinterfaceipconfigurationsgetsample] | Gets the specified network interface ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceIPConfigurationGet.json | -| [networkInterfaceIPConfigurationsListSample.js][networkinterfaceipconfigurationslistsample] | Get all ip configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceIPConfigurationList.json | -| [networkInterfaceLoadBalancersListSample.js][networkinterfaceloadbalancerslistsample] | List all load balancers in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceLoadBalancerList.json | -| [networkInterfaceTapConfigurationsCreateOrUpdateSample.js][networkinterfacetapconfigurationscreateorupdatesample] | Creates or updates a Tap configuration in the specified NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationCreate.json | -| [networkInterfaceTapConfigurationsDeleteSample.js][networkinterfacetapconfigurationsdeletesample] | Deletes the specified tap configuration from the NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationDelete.json | -| [networkInterfaceTapConfigurationsGetSample.js][networkinterfacetapconfigurationsgetsample] | Get the specified tap configuration on a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationGet.json | -| [networkInterfaceTapConfigurationsListSample.js][networkinterfacetapconfigurationslistsample] | Get all Tap configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationList.json | -| [networkInterfacesCreateOrUpdateSample.js][networkinterfacescreateorupdatesample] | Creates or updates a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceCreate.json | -| [networkInterfacesDeleteSample.js][networkinterfacesdeletesample] | Deletes the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceDelete.json | -| [networkInterfacesGetCloudServiceNetworkInterfaceSample.js][networkinterfacesgetcloudservicenetworkinterfacesample] | Get the specified network interface in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceNetworkInterfaceGet.json | -| [networkInterfacesGetEffectiveRouteTableSample.js][networkinterfacesgeteffectiveroutetablesample] | Gets all route tables applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceEffectiveRouteTableList.json | -| [networkInterfacesGetSample.js][networkinterfacesgetsample] | Gets information about the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceGet.json | -| [networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js][networkinterfacesgetvirtualmachinescalesetipconfigurationsample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceIpConfigGet.json | -| [networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js][networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample] | Get the specified network interface in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceGet.json | -| [networkInterfacesListAllSample.js][networkinterfaceslistallsample] | Gets all network interfaces in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceListAll.json | -| [networkInterfacesListCloudServiceNetworkInterfacesSample.js][networkinterfaceslistcloudservicenetworkinterfacessample] | Gets all network interfaces in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceNetworkInterfaceList.json | -| [networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js][networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample] | Gets information about all network interfaces in a role instance in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json | -| [networkInterfacesListEffectiveNetworkSecurityGroupsSample.js][networkinterfaceslisteffectivenetworksecuritygroupssample] | Gets all network security groups applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceEffectiveNSGList.json | -| [networkInterfacesListSample.js][networkinterfaceslistsample] | Gets all network interfaces in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js][networkinterfaceslistvirtualmachinescalesetipconfigurationssample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceIpConfigList.json | -| [networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js][networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample] | Gets all network interfaces in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js][networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample] | Gets information about all network interfaces in a virtual machine in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssVmNetworkInterfaceList.json | -| [networkInterfacesUpdateTagsSample.js][networkinterfacesupdatetagssample] | Updates a network interface tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceUpdateTags.json | -| [networkManagerCommitsPostSample.js][networkmanagercommitspostsample] | Post a Network Manager Commit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerCommitPost.json | -| [networkManagerDeploymentStatusListSample.js][networkmanagerdeploymentstatuslistsample] | Post to List of Network Manager Deployment Status. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerDeploymentStatusList.json | -| [networkManagerRoutingConfigurationsCreateOrUpdateSample.js][networkmanagerroutingconfigurationscreateorupdatesample] | Creates or updates a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationPut.json | -| [networkManagerRoutingConfigurationsDeleteSample.js][networkmanagerroutingconfigurationsdeletesample] | Deletes a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationDelete.json | -| [networkManagerRoutingConfigurationsGetSample.js][networkmanagerroutingconfigurationsgetsample] | Retrieves a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationGet.json | -| [networkManagerRoutingConfigurationsListSample.js][networkmanagerroutingconfigurationslistsample] | Lists all the network manager routing configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationList.json | -| [networkManagersCreateOrUpdateSample.js][networkmanagerscreateorupdatesample] | Creates or updates a Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerPut.json | -| [networkManagersDeleteSample.js][networkmanagersdeletesample] | Deletes a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerDelete.json | -| [networkManagersGetSample.js][networkmanagersgetsample] | Gets the specified Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGet.json | -| [networkManagersListBySubscriptionSample.js][networkmanagerslistbysubscriptionsample] | List all network managers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerListAll.json | -| [networkManagersListSample.js][networkmanagerslistsample] | List network managers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerList.json | -| [networkManagersPatchSample.js][networkmanagerspatchsample] | Patch NetworkManager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerPatch.json | -| [networkProfilesCreateOrUpdateSample.js][networkprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileCreateConfigOnly.json | -| [networkProfilesDeleteSample.js][networkprofilesdeletesample] | Deletes the specified network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileDelete.json | -| [networkProfilesGetSample.js][networkprofilesgetsample] | Gets the specified network profile in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileGetConfigOnly.json | -| [networkProfilesListAllSample.js][networkprofileslistallsample] | Gets all the network profiles in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileListAll.json | -| [networkProfilesListSample.js][networkprofileslistsample] | Gets all network profiles in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileList.json | -| [networkProfilesUpdateTagsSample.js][networkprofilesupdatetagssample] | Updates network profile tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileUpdateTags.json | -| [networkSecurityGroupsCreateOrUpdateSample.js][networksecuritygroupscreateorupdatesample] | Creates or updates a network security group in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupCreate.json | -| [networkSecurityGroupsDeleteSample.js][networksecuritygroupsdeletesample] | Deletes the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupDelete.json | -| [networkSecurityGroupsGetSample.js][networksecuritygroupsgetsample] | Gets the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupGet.json | -| [networkSecurityGroupsListAllSample.js][networksecuritygroupslistallsample] | Gets all network security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupListAll.json | -| [networkSecurityGroupsListSample.js][networksecuritygroupslistsample] | Gets all network security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupList.json | -| [networkSecurityGroupsUpdateTagsSample.js][networksecuritygroupsupdatetagssample] | Updates a network security group tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupUpdateTags.json | -| [networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js][networksecurityperimeteraccessrulescreateorupdatesample] | Creates or updates a network access rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRulePut.json | -| [networkSecurityPerimeterAccessRulesDeleteSample.js][networksecurityperimeteraccessrulesdeletesample] | Deletes an NSP access rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleDelete.json | -| [networkSecurityPerimeterAccessRulesGetSample.js][networksecurityperimeteraccessrulesgetsample] | Gets the specified NSP access rule by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleGet.json | -| [networkSecurityPerimeterAccessRulesListSample.js][networksecurityperimeteraccessruleslistsample] | Lists the NSP access rules in the specified NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleList.json | -| [networkSecurityPerimeterAccessRulesReconcileSample.js][networksecurityperimeteraccessrulesreconcilesample] | Reconcile NSP access rules x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleReconcile.json | -| [networkSecurityPerimeterAssociableResourceTypesListSample.js][networksecurityperimeterassociableresourcetypeslistsample] | Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PerimeterAssociableResourcesList.json | -| [networkSecurityPerimeterAssociationsCreateOrUpdateSample.js][networksecurityperimeterassociationscreateorupdatesample] | Creates or updates a NSP resource association. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationPut.json | -| [networkSecurityPerimeterAssociationsDeleteSample.js][networksecurityperimeterassociationsdeletesample] | Deletes an NSP association resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationDelete.json | -| [networkSecurityPerimeterAssociationsGetSample.js][networksecurityperimeterassociationsgetsample] | Gets the specified NSP association by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationGet.json | -| [networkSecurityPerimeterAssociationsListSample.js][networksecurityperimeterassociationslistsample] | Lists the NSP resource associations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationList.json | -| [networkSecurityPerimeterAssociationsReconcileSample.js][networksecurityperimeterassociationsreconcilesample] | Reconcile NSP association x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationReconcile.json | -| [networkSecurityPerimeterLinkReferencesDeleteSample.js][networksecurityperimeterlinkreferencesdeletesample] | Deletes an NSP LinkReference resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceDelete.json | -| [networkSecurityPerimeterLinkReferencesGetSample.js][networksecurityperimeterlinkreferencesgetsample] | Gets the specified NSP linkReference resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceGet.json | -| [networkSecurityPerimeterLinkReferencesListSample.js][networksecurityperimeterlinkreferenceslistsample] | Lists the NSP LinkReference resources in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceList.json | -| [networkSecurityPerimeterLinksCreateOrUpdateSample.js][networksecurityperimeterlinkscreateorupdatesample] | Creates or updates NSP link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkPut.json | -| [networkSecurityPerimeterLinksDeleteSample.js][networksecurityperimeterlinksdeletesample] | Deletes an NSP Link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkDelete.json | -| [networkSecurityPerimeterLinksGetSample.js][networksecurityperimeterlinksgetsample] | Gets the specified NSP link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkGet.json | -| [networkSecurityPerimeterLinksListSample.js][networksecurityperimeterlinkslistsample] | Lists the NSP Link resources in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkList.json | -| [networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js][networksecurityperimeterloggingconfigurationscreateorupdatesample] | Creates or updates NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationPut.json | -| [networkSecurityPerimeterLoggingConfigurationsDeleteSample.js][networksecurityperimeterloggingconfigurationsdeletesample] | Deletes an NSP Logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationDelete.json | -| [networkSecurityPerimeterLoggingConfigurationsGetSample.js][networksecurityperimeterloggingconfigurationsgetsample] | Gets the NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationGet.json | -| [networkSecurityPerimeterLoggingConfigurationsListSample.js][networksecurityperimeterloggingconfigurationslistsample] | Lists the NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationList.json | -| [networkSecurityPerimeterOperationStatusesGetSample.js][networksecurityperimeteroperationstatusesgetsample] | Gets the operation status for the given operation id. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspOperationStatusGet.json | -| [networkSecurityPerimeterProfilesCreateOrUpdateSample.js][networksecurityperimeterprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfilePut.json | -| [networkSecurityPerimeterProfilesDeleteSample.js][networksecurityperimeterprofilesdeletesample] | Deletes an NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileDelete.json | -| [networkSecurityPerimeterProfilesGetSample.js][networksecurityperimeterprofilesgetsample] | Gets the specified NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileGet.json | -| [networkSecurityPerimeterProfilesListSample.js][networksecurityperimeterprofileslistsample] | Lists the NSP profiles in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileList.json | -| [networkSecurityPerimeterServiceTagsListSample.js][networksecurityperimeterservicetagslistsample] | Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspServiceTagsList.json | -| [networkSecurityPerimetersCreateOrUpdateSample.js][networksecurityperimeterscreateorupdatesample] | Creates or updates a Network Security Perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterPut.json | -| [networkSecurityPerimetersDeleteSample.js][networksecurityperimetersdeletesample] | Deletes a network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterDelete.json | -| [networkSecurityPerimetersGetSample.js][networksecurityperimetersgetsample] | Gets the specified network security perimeter by the name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterGet.json | -| [networkSecurityPerimetersListBySubscriptionSample.js][networksecurityperimeterslistbysubscriptionsample] | List all network security perimeters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterListAll.json | -| [networkSecurityPerimetersListSample.js][networksecurityperimeterslistsample] | List network security perimeters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterList.json | -| [networkSecurityPerimetersPatchSample.js][networksecurityperimeterspatchsample] | Patch Tags for a Network Security Perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterPatch.json | -| [networkVirtualApplianceConnectionsCreateOrUpdateSample.js][networkvirtualapplianceconnectionscreateorupdatesample] | Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionPut.json | -| [networkVirtualApplianceConnectionsDeleteSample.js][networkvirtualapplianceconnectionsdeletesample] | Deletes a NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionDelete.json | -| [networkVirtualApplianceConnectionsGetSample.js][networkvirtualapplianceconnectionsgetsample] | Retrieves the details of specified NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionGet.json | -| [networkVirtualApplianceConnectionsListSample.js][networkvirtualapplianceconnectionslistsample] | Lists NetworkVirtualApplianceConnections under the NVA. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionList.json | -| [networkVirtualAppliancesCreateOrUpdateSample.js][networkvirtualappliancescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetBasicPut.json | -| [networkVirtualAppliancesDeleteSample.js][networkvirtualappliancesdeletesample] | Deletes the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceDelete.json | -| [networkVirtualAppliancesGetBootDiagnosticLogsSample.js][networkvirtualappliancesgetbootdiagnosticlogssample] | Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceBootDiagnostics.json | -| [networkVirtualAppliancesGetSample.js][networkvirtualappliancesgetsample] | Gets the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceGet.json | -| [networkVirtualAppliancesListByResourceGroupSample.js][networkvirtualapplianceslistbyresourcegroupsample] | Lists all Network Virtual Appliances in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceListByResourceGroup.json | -| [networkVirtualAppliancesListSample.js][networkvirtualapplianceslistsample] | Gets all Network Virtual Appliances in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceListBySubscription.json | -| [networkVirtualAppliancesReimageSample.js][networkvirtualappliancesreimagesample] | Reimages one VM belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSpecificReimage.json | -| [networkVirtualAppliancesRestartSample.js][networkvirtualappliancesrestartsample] | Restarts one or more VMs belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceEmptyRestart.json | -| [networkVirtualAppliancesUpdateTagsSample.js][networkvirtualappliancesupdatetagssample] | Updates a Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceUpdateTags.json | -| [networkWatchersCheckConnectivitySample.js][networkwatcherscheckconnectivitysample] | Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectivityCheck.json | -| [networkWatchersCreateOrUpdateSample.js][networkwatcherscreateorupdatesample] | Creates or updates a network watcher in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherCreate.json | -| [networkWatchersDeleteSample.js][networkwatchersdeletesample] | Deletes the specified network watcher resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherDelete.json | -| [networkWatchersGetAzureReachabilityReportSample.js][networkwatchersgetazurereachabilityreportsample] | NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherAzureReachabilityReportGet.json | -| [networkWatchersGetFlowLogStatusSample.js][networkwatchersgetflowlogstatussample] | Queries status of flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogStatusQuery.json | -| [networkWatchersGetNetworkConfigurationDiagnosticSample.js][networkwatchersgetnetworkconfigurationdiagnosticsample] | Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json | -| [networkWatchersGetNextHopSample.js][networkwatchersgetnexthopsample] | Gets the next hop from the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherNextHopGet.json | -| [networkWatchersGetSample.js][networkwatchersgetsample] | Gets the specified network watcher by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherGet.json | -| [networkWatchersGetTopologySample.js][networkwatchersgettopologysample] | Gets the current network topology by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTopologyGet.json | -| [networkWatchersGetTroubleshootingResultSample.js][networkwatchersgettroubleshootingresultsample] | Get the last completed troubleshooting result on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTroubleshootResultQuery.json | -| [networkWatchersGetTroubleshootingSample.js][networkwatchersgettroubleshootingsample] | Initiate troubleshooting on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTroubleshootGet.json | -| [networkWatchersGetVMSecurityRulesSample.js][networkwatchersgetvmsecurityrulessample] | Gets the configured and effective security group rules on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherSecurityGroupViewGet.json | -| [networkWatchersListAllSample.js][networkwatcherslistallsample] | Gets all network watchers by subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherListAll.json | -| [networkWatchersListAvailableProvidersSample.js][networkwatcherslistavailableproviderssample] | NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherAvailableProvidersListGet.json | -| [networkWatchersListSample.js][networkwatcherslistsample] | Gets all network watchers by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherList.json | -| [networkWatchersSetFlowLogConfigurationSample.js][networkwatcherssetflowlogconfigurationsample] | Configures flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogConfigure.json | -| [networkWatchersUpdateTagsSample.js][networkwatchersupdatetagssample] | Updates a network watcher tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherUpdateTags.json | -| [networkWatchersVerifyIPFlowSample.js][networkwatchersverifyipflowsample] | Verify IP flow from the specified VM to a location given the currently configured NSG rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherIpFlowVerify.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available Network Rest API operations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/OperationList.json | -| [p2SVpnGatewaysCreateOrUpdateSample.js][p2svpngatewayscreateorupdatesample] | Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayPut.json | -| [p2SVpnGatewaysDeleteSample.js][p2svpngatewaysdeletesample] | Deletes a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayDelete.json | -| [p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js][p2svpngatewaysdisconnectp2svpnconnectionssample] | Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json | -| [p2SVpnGatewaysGenerateVpnProfileSample.js][p2svpngatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGenerateVpnProfile.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js][p2svpngatewaysgetp2svpnconnectionhealthdetailedsample] | Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js][p2svpngatewaysgetp2svpnconnectionhealthsample] | Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGetConnectionHealth.json | -| [p2SVpnGatewaysGetSample.js][p2svpngatewaysgetsample] | Retrieves the details of a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGet.json | -| [p2SVpnGatewaysListByResourceGroupSample.js][p2svpngatewayslistbyresourcegroupsample] | Lists all the P2SVpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayListByResourceGroup.json | -| [p2SVpnGatewaysListSample.js][p2svpngatewayslistsample] | Lists all the P2SVpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayList.json | -| [p2SVpnGatewaysResetSample.js][p2svpngatewaysresetsample] | Resets the primary of the p2s vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayReset.json | -| [p2SVpnGatewaysUpdateTagsSample.js][p2svpngatewaysupdatetagssample] | Updates virtual wan p2s vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayUpdateTags.json | -| [packetCapturesCreateSample.js][packetcapturescreatesample] | Create and start a packet capture on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureCreate.json | -| [packetCapturesDeleteSample.js][packetcapturesdeletesample] | Deletes the specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureDelete.json | -| [packetCapturesGetSample.js][packetcapturesgetsample] | Gets a packet capture session by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureGet.json | -| [packetCapturesGetStatusSample.js][packetcapturesgetstatussample] | Query the status of a running packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureQueryStatus.json | -| [packetCapturesListSample.js][packetcaptureslistsample] | Lists all packet capture sessions within the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCapturesList.json | -| [packetCapturesStopSample.js][packetcapturesstopsample] | Stops a specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureStop.json | -| [peerExpressRouteCircuitConnectionsGetSample.js][peerexpressroutecircuitconnectionsgetsample] | Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PeerExpressRouteCircuitConnectionGet.json | -| [peerExpressRouteCircuitConnectionsListSample.js][peerexpressroutecircuitconnectionslistsample] | Gets all global reach peer connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PeerExpressRouteCircuitConnectionList.json | -| [privateDnsZoneGroupsCreateOrUpdateSample.js][privatednszonegroupscreateorupdatesample] | Creates or updates a private dns zone group in the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupCreate.json | -| [privateDnsZoneGroupsDeleteSample.js][privatednszonegroupsdeletesample] | Deletes the specified private dns zone group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupDelete.json | -| [privateDnsZoneGroupsGetSample.js][privatednszonegroupsgetsample] | Gets the private dns zone group resource by specified private dns zone group name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupGet.json | -| [privateDnsZoneGroupsListSample.js][privatednszonegroupslistsample] | Gets all private dns zone groups in a private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupList.json | -| [privateEndpointsCreateOrUpdateSample.js][privateendpointscreateorupdatesample] | Creates or updates an private endpoint in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointCreate.json | -| [privateEndpointsDeleteSample.js][privateendpointsdeletesample] | Deletes the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDelete.json | -| [privateEndpointsGetSample.js][privateendpointsgetsample] | Gets the specified private endpoint by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointGet.json | -| [privateEndpointsListBySubscriptionSample.js][privateendpointslistbysubscriptionsample] | Gets all private endpoints in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointListAll.json | -| [privateEndpointsListSample.js][privateendpointslistsample] | Gets all private endpoints in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointList.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js][privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample] | Checks whether the subscription is visible to private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js][privatelinkservicescheckprivatelinkservicevisibilitysample] | Checks whether the subscription is visible to private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckPrivateLinkServiceVisibility.json | -| [privateLinkServicesCreateOrUpdateSample.js][privatelinkservicescreateorupdatesample] | Creates or updates an private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceCreate.json | -| [privateLinkServicesDeletePrivateEndpointConnectionSample.js][privatelinkservicesdeleteprivateendpointconnectionsample] | Delete private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json | -| [privateLinkServicesDeleteSample.js][privatelinkservicesdeletesample] | Deletes the specified private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceDelete.json | -| [privateLinkServicesGetPrivateEndpointConnectionSample.js][privatelinkservicesgetprivateendpointconnectionsample] | Get the specific private end point connection by specific private link service in the resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json | -| [privateLinkServicesGetSample.js][privatelinkservicesgetsample] | Gets the specified private link service by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js][privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js][privatelinkserviceslistautoapprovedprivatelinkservicessample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AutoApprovedPrivateLinkServicesGet.json | -| [privateLinkServicesListBySubscriptionSample.js][privatelinkserviceslistbysubscriptionsample] | Gets all private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceListAll.json | -| [privateLinkServicesListPrivateEndpointConnectionsSample.js][privatelinkserviceslistprivateendpointconnectionssample] | Gets all private end point connections for a specific private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json | -| [privateLinkServicesListSample.js][privatelinkserviceslistsample] | Gets all private link services in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceList.json | -| [privateLinkServicesUpdatePrivateEndpointConnectionSample.js][privatelinkservicesupdateprivateendpointconnectionsample] | Approve or reject private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json | -| [publicIPAddressesCreateOrUpdateSample.js][publicipaddressescreateorupdatesample] | Creates or updates a static or dynamic public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDns.json | -| [publicIPAddressesDdosProtectionStatusSample.js][publicipaddressesddosprotectionstatussample] | Gets the Ddos Protection Status of a Public IP Address x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressGetDdosProtectionStatus.json | -| [publicIPAddressesDeleteSample.js][publicipaddressesdeletesample] | Deletes the specified public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressDelete.json | -| [publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js][publicipaddressesdisassociatecloudservicereservedpublicipsample] | Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressDisassociateCloudServiceReservedPublicIp.json | -| [publicIPAddressesGetCloudServicePublicIpaddressSample.js][publicipaddressesgetcloudservicepublicipaddresssample] | Get the specified public IP address in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServicePublicIpGet.json | -| [publicIPAddressesGetSample.js][publicipaddressesgetsample] | Gets the specified public IP address in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressGet.json | -| [publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js][publicipaddressesgetvirtualmachinescalesetpublicipaddresssample] | Get the specified public IP address in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssPublicIpGet.json | -| [publicIPAddressesListAllSample.js][publicipaddresseslistallsample] | Gets all the public IP addresses in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressListAll.json | -| [publicIPAddressesListCloudServicePublicIpaddressesSample.js][publicipaddresseslistcloudservicepublicipaddressessample] | Gets information about all public IP addresses on a cloud service level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServicePublicIpListAll.json | -| [publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js][publicipaddresseslistcloudserviceroleinstancepublicipaddressessample] | Gets information about all public IP addresses in a role instance IP configuration in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceRoleInstancePublicIpList.json | -| [publicIPAddressesListSample.js][publicipaddresseslistsample] | Gets all public IP addresses in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressList.json | -| [publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js][publicipaddresseslistvirtualmachinescalesetpublicipaddressessample] | Gets information about all public IP addresses on a virtual machine scale set level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssPublicIpListAll.json | -| [publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js][publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample] | Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssVmPublicIpList.json | -| [publicIPAddressesReserveCloudServicePublicIPAddressSample.js][publicipaddressesreservecloudservicepublicipaddresssample] | Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressReserve.json | -| [publicIPAddressesUpdateTagsSample.js][publicipaddressesupdatetagssample] | Updates public IP address tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressUpdateTags.json | -| [publicIPPrefixesCreateOrUpdateSample.js][publicipprefixescreateorupdatesample] | Creates or updates a static or dynamic public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixCreateCustomizedValues.json | -| [publicIPPrefixesDeleteSample.js][publicipprefixesdeletesample] | Deletes the specified public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixDelete.json | -| [publicIPPrefixesGetSample.js][publicipprefixesgetsample] | Gets the specified public IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixGet.json | -| [publicIPPrefixesListAllSample.js][publicipprefixeslistallsample] | Gets all the public IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixListAll.json | -| [publicIPPrefixesListSample.js][publicipprefixeslistsample] | Gets all public IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixList.json | -| [publicIPPrefixesUpdateTagsSample.js][publicipprefixesupdatetagssample] | Updates public IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixUpdateTags.json | -| [putBastionShareableLinkSample.js][putbastionshareablelinksample] | Creates a Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkCreate.json | -| [reachabilityAnalysisIntentsCreateSample.js][reachabilityanalysisintentscreatesample] | Creates Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentPut.json | -| [reachabilityAnalysisIntentsDeleteSample.js][reachabilityanalysisintentsdeletesample] | Deletes Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentDelete.json | -| [reachabilityAnalysisIntentsGetSample.js][reachabilityanalysisintentsgetsample] | Get the Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentGet.json | -| [reachabilityAnalysisIntentsListSample.js][reachabilityanalysisintentslistsample] | Gets list of Reachability Analysis Intents . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentList.json | -| [reachabilityAnalysisRunsCreateSample.js][reachabilityanalysisrunscreatesample] | Creates Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunPut.json | -| [reachabilityAnalysisRunsDeleteSample.js][reachabilityanalysisrunsdeletesample] | Deletes Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunDelete.json | -| [reachabilityAnalysisRunsGetSample.js][reachabilityanalysisrunsgetsample] | Gets Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunGet.json | -| [reachabilityAnalysisRunsListSample.js][reachabilityanalysisrunslistsample] | Gets list of Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunList.json | -| [resourceNavigationLinksListSample.js][resourcenavigationlinkslistsample] | Gets a list of resource navigation links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetResourceNavigationLinks.json | -| [routeFilterRulesCreateOrUpdateSample.js][routefilterrulescreateorupdatesample] | Creates or updates a route in the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleCreate.json | -| [routeFilterRulesDeleteSample.js][routefilterrulesdeletesample] | Deletes the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleDelete.json | -| [routeFilterRulesGetSample.js][routefilterrulesgetsample] | Gets the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleGet.json | -| [routeFilterRulesListByRouteFilterSample.js][routefilterruleslistbyroutefiltersample] | Gets all RouteFilterRules in a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleListByRouteFilter.json | -| [routeFiltersCreateOrUpdateSample.js][routefilterscreateorupdatesample] | Creates or updates a route filter in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterCreate.json | -| [routeFiltersDeleteSample.js][routefiltersdeletesample] | Deletes the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterDelete.json | -| [routeFiltersGetSample.js][routefiltersgetsample] | Gets the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterGet.json | -| [routeFiltersListByResourceGroupSample.js][routefilterslistbyresourcegroupsample] | Gets all route filters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterListByResourceGroup.json | -| [routeFiltersListSample.js][routefilterslistsample] | Gets all route filters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterList.json | -| [routeFiltersUpdateTagsSample.js][routefiltersupdatetagssample] | Updates tags of a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterUpdateTags.json | -| [routeMapsCreateOrUpdateSample.js][routemapscreateorupdatesample] | Creates a RouteMap if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapPut.json | -| [routeMapsDeleteSample.js][routemapsdeletesample] | Deletes a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapDelete.json | -| [routeMapsGetSample.js][routemapsgetsample] | Retrieves the details of a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapGet.json | -| [routeMapsListSample.js][routemapslistsample] | Retrieves the details of all RouteMaps. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapList.json | -| [routeTablesCreateOrUpdateSample.js][routetablescreateorupdatesample] | Create or updates a route table in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableCreate.json | -| [routeTablesDeleteSample.js][routetablesdeletesample] | Deletes the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableDelete.json | -| [routeTablesGetSample.js][routetablesgetsample] | Gets the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableGet.json | -| [routeTablesListAllSample.js][routetableslistallsample] | Gets all route tables in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableListAll.json | -| [routeTablesListSample.js][routetableslistsample] | Gets all route tables in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableList.json | -| [routeTablesUpdateTagsSample.js][routetablesupdatetagssample] | Updates a route table tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableUpdateTags.json | -| [routesCreateOrUpdateSample.js][routescreateorupdatesample] | Creates or updates a route in the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteCreate.json | -| [routesDeleteSample.js][routesdeletesample] | Deletes the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteDelete.json | -| [routesGetSample.js][routesgetsample] | Gets the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteGet.json | -| [routesListSample.js][routeslistsample] | Gets all routes in a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteList.json | -| [routingIntentCreateOrUpdateSample.js][routingintentcreateorupdatesample] | Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentPut.json | -| [routingIntentDeleteSample.js][routingintentdeletesample] | Deletes a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentDelete.json | -| [routingIntentGetSample.js][routingintentgetsample] | Retrieves the details of a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentGet.json | -| [routingIntentListSample.js][routingintentlistsample] | Retrieves the details of all RoutingIntent child resources of the VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentList.json | -| [routingRuleCollectionsCreateOrUpdateSample.js][routingrulecollectionscreateorupdatesample] | Creates or updates a routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionPut.json | -| [routingRuleCollectionsDeleteSample.js][routingrulecollectionsdeletesample] | Deletes an routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionDelete.json | -| [routingRuleCollectionsGetSample.js][routingrulecollectionsgetsample] | Gets a network manager routing configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionGet.json | -| [routingRuleCollectionsListSample.js][routingrulecollectionslistsample] | Lists all the rule collections in a routing configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionList.json | -| [routingRulesCreateOrUpdateSample.js][routingrulescreateorupdatesample] | Creates or updates an routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRulePut.json | -| [routingRulesDeleteSample.js][routingrulesdeletesample] | Deletes a routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleDelete.json | -| [routingRulesGetSample.js][routingrulesgetsample] | Gets a network manager routing configuration routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleGet.json | -| [routingRulesListSample.js][routingruleslistsample] | List all network manager routing configuration routing rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleList.json | -| [scopeConnectionsCreateOrUpdateSample.js][scopeconnectionscreateorupdatesample] | Creates or updates scope connection from Network Manager x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionPut.json | -| [scopeConnectionsDeleteSample.js][scopeconnectionsdeletesample] | Delete the pending scope connection created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionDelete.json | -| [scopeConnectionsGetSample.js][scopeconnectionsgetsample] | Get specified scope connection created by this Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionGet.json | -| [scopeConnectionsListSample.js][scopeconnectionslistsample] | List all scope connections created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionList.json | -| [securityAdminConfigurationsCreateOrUpdateSample.js][securityadminconfigurationscreateorupdatesample] | Creates or updates a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json | -| [securityAdminConfigurationsDeleteSample.js][securityadminconfigurationsdeletesample] | Deletes a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json | -| [securityAdminConfigurationsGetSample.js][securityadminconfigurationsgetsample] | Retrieves a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationGet.json | -| [securityAdminConfigurationsListSample.js][securityadminconfigurationslistsample] | Lists all the network manager security admin configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationList.json | -| [securityPartnerProvidersCreateOrUpdateSample.js][securitypartnerproviderscreateorupdatesample] | Creates or updates the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderPut.json | -| [securityPartnerProvidersDeleteSample.js][securitypartnerprovidersdeletesample] | Deletes the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderDelete.json | -| [securityPartnerProvidersGetSample.js][securitypartnerprovidersgetsample] | Gets the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderGet.json | -| [securityPartnerProvidersListByResourceGroupSample.js][securitypartnerproviderslistbyresourcegroupsample] | Lists all Security Partner Providers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderListByResourceGroup.json | -| [securityPartnerProvidersListSample.js][securitypartnerproviderslistsample] | Gets all the Security Partner Providers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderListBySubscription.json | -| [securityPartnerProvidersUpdateTagsSample.js][securitypartnerprovidersupdatetagssample] | Updates tags of a Security Partner Provider resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderUpdateTags.json | -| [securityRulesCreateOrUpdateSample.js][securityrulescreateorupdatesample] | Creates or updates a security rule in the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleCreate.json | -| [securityRulesDeleteSample.js][securityrulesdeletesample] | Deletes the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleDelete.json | -| [securityRulesGetSample.js][securityrulesgetsample] | Get the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleGet.json | -| [securityRulesListSample.js][securityruleslistsample] | Gets all security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleList.json | -| [securityUserConfigurationsCreateOrUpdateSample.js][securityuserconfigurationscreateorupdatesample] | Creates or updates a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationPut.json | -| [securityUserConfigurationsDeleteSample.js][securityuserconfigurationsdeletesample] | Deletes a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationDelete.json | -| [securityUserConfigurationsGetSample.js][securityuserconfigurationsgetsample] | Retrieves a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationGet.json | -| [securityUserConfigurationsListSample.js][securityuserconfigurationslistsample] | Lists all the network manager security user configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationList.json | -| [securityUserRuleCollectionsCreateOrUpdateSample.js][securityuserrulecollectionscreateorupdatesample] | Creates or updates a security user rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json | -| [securityUserRuleCollectionsDeleteSample.js][securityuserrulecollectionsdeletesample] | Deletes a Security User Rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json | -| [securityUserRuleCollectionsGetSample.js][securityuserrulecollectionsgetsample] | Gets a network manager security user configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json | -| [securityUserRuleCollectionsListSample.js][securityuserrulecollectionslistsample] | Lists all the security user rule collections in a security configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionList.json | -| [securityUserRulesCreateOrUpdateSample.js][securityuserrulescreateorupdatesample] | Creates or updates a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRulePut.json | -| [securityUserRulesDeleteSample.js][securityuserrulesdeletesample] | Deletes a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleDelete.json | -| [securityUserRulesGetSample.js][securityuserrulesgetsample] | Gets a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleGet.json | -| [securityUserRulesListSample.js][securityuserruleslistsample] | Lists all Security User Rules in a rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleList.json | -| [serviceAssociationLinksListSample.js][serviceassociationlinkslistsample] | Gets a list of service association links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetServiceAssociationLinks.json | -| [serviceEndpointPoliciesCreateOrUpdateSample.js][serviceendpointpoliciescreateorupdatesample] | Creates or updates a service Endpoint Policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyCreate.json | -| [serviceEndpointPoliciesDeleteSample.js][serviceendpointpoliciesdeletesample] | Deletes the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDelete.json | -| [serviceEndpointPoliciesGetSample.js][serviceendpointpoliciesgetsample] | Gets the specified service Endpoint Policies in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyGet.json | -| [serviceEndpointPoliciesListByResourceGroupSample.js][serviceendpointpolicieslistbyresourcegroupsample] | Gets all service endpoint Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyList.json | -| [serviceEndpointPoliciesListSample.js][serviceendpointpolicieslistsample] | Gets all the service endpoint policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyListAll.json | -| [serviceEndpointPoliciesUpdateTagsSample.js][serviceendpointpoliciesupdatetagssample] | Updates tags of a service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyUpdateTags.json | -| [serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js][serviceendpointpolicydefinitionscreateorupdatesample] | Creates or updates a service endpoint policy definition in the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionCreate.json | -| [serviceEndpointPolicyDefinitionsDeleteSample.js][serviceendpointpolicydefinitionsdeletesample] | Deletes the specified ServiceEndpoint policy definitions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionDelete.json | -| [serviceEndpointPolicyDefinitionsGetSample.js][serviceendpointpolicydefinitionsgetsample] | Get the specified service endpoint policy definitions from service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionGet.json | -| [serviceEndpointPolicyDefinitionsListByResourceGroupSample.js][serviceendpointpolicydefinitionslistbyresourcegroupsample] | Gets all service endpoint policy definitions in a service end point policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionList.json | -| [serviceTagInformationListSample.js][servicetaginformationlistsample] | Gets a list of service tag information resources with pagination. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagInformationListResult.json | -| [serviceTagsListSample.js][servicetagslistsample] | Gets a list of service tag information resources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagsList.json | -| [staticCidrsCreateSample.js][staticcidrscreatesample] | Creates/Updates the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Create.json | -| [staticCidrsDeleteSample.js][staticcidrsdeletesample] | Delete the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Delete.json | -| [staticCidrsGetSample.js][staticcidrsgetsample] | Gets the specific Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Get.json | -| [staticCidrsListSample.js][staticcidrslistsample] | Gets list of Static CIDR resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_List.json | -| [staticMembersCreateOrUpdateSample.js][staticmemberscreateorupdatesample] | Creates or updates a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberPut.json | -| [staticMembersDeleteSample.js][staticmembersdeletesample] | Deletes a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberDelete.json | -| [staticMembersGetSample.js][staticmembersgetsample] | Gets the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberGet.json | -| [staticMembersListSample.js][staticmemberslistsample] | Lists the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberList.json | -| [subnetsCreateOrUpdateSample.js][subnetscreateorupdatesample] | Creates or updates a subnet in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreate.json | -| [subnetsDeleteSample.js][subnetsdeletesample] | Deletes the specified subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetDelete.json | -| [subnetsGetSample.js][subnetsgetsample] | Gets the specified subnet by virtual network and resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetGet.json | -| [subnetsListSample.js][subnetslistsample] | Gets all subnets in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetList.json | -| [subnetsPrepareNetworkPoliciesSample.js][subnetspreparenetworkpoliciessample] | Prepares a subnet by applying network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetPrepareNetworkPolicies.json | -| [subnetsUnprepareNetworkPoliciesSample.js][subnetsunpreparenetworkpoliciessample] | Unprepares a subnet by removing network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetUnprepareNetworkPolicies.json | -| [subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js][subscriptionnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionPut.json | -| [subscriptionNetworkManagerConnectionsDeleteSample.js][subscriptionnetworkmanagerconnectionsdeletesample] | Delete specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionDelete.json | -| [subscriptionNetworkManagerConnectionsGetSample.js][subscriptionnetworkmanagerconnectionsgetsample] | Get a specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionGet.json | -| [subscriptionNetworkManagerConnectionsListSample.js][subscriptionnetworkmanagerconnectionslistsample] | List all network manager connections created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionList.json | -| [supportedSecurityProvidersSample.js][supportedsecurityproviderssample] | Gives the supported security providers for the virtual wan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWanSupportedSecurityProviders.json | -| [usagesListSample.js][usageslistsample] | List network usages for a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/UsageList.json | -| [verifierWorkspacesCreateSample.js][verifierworkspacescreatesample] | Creates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspacePut.json | -| [verifierWorkspacesDeleteSample.js][verifierworkspacesdeletesample] | Deletes Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceDelete.json | -| [verifierWorkspacesGetSample.js][verifierworkspacesgetsample] | Gets Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceGet.json | -| [verifierWorkspacesListSample.js][verifierworkspaceslistsample] | Gets list of Verifier Workspaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceList.json | -| [verifierWorkspacesUpdateSample.js][verifierworkspacesupdatesample] | Updates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspacePatch.json | -| [vipSwapCreateSample.js][vipswapcreatesample] | Performs vip swap operation on swappable cloud services. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapPut.json | -| [vipSwapGetSample.js][vipswapgetsample] | Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapGet.json | -| [vipSwapListSample.js][vipswaplistsample] | Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapList.json | -| [virtualApplianceSitesCreateOrUpdateSample.js][virtualappliancesitescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSitePut.json | -| [virtualApplianceSitesDeleteSample.js][virtualappliancesitesdeletesample] | Deletes the specified site from a Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteDelete.json | -| [virtualApplianceSitesGetSample.js][virtualappliancesitesgetsample] | Gets the specified Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteGet.json | -| [virtualApplianceSitesListSample.js][virtualappliancesiteslistsample] | Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteList.json | -| [virtualApplianceSkusGetSample.js][virtualapplianceskusgetsample] | Retrieves a single available sku for network virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSkuGet.json | -| [virtualApplianceSkusListSample.js][virtualapplianceskuslistsample] | List all SKUs available for a virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSkuList.json | -| [virtualHubBgpConnectionCreateOrUpdateSample.js][virtualhubbgpconnectioncreateorupdatesample] | Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionPut.json | -| [virtualHubBgpConnectionDeleteSample.js][virtualhubbgpconnectiondeletesample] | Deletes a VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionDelete.json | -| [virtualHubBgpConnectionGetSample.js][virtualhubbgpconnectiongetsample] | Retrieves the details of a Virtual Hub Bgp Connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionGet.json | -| [virtualHubBgpConnectionsListAdvertisedRoutesSample.js][virtualhubbgpconnectionslistadvertisedroutessample] | Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeerListAdvertisedRoute.json | -| [virtualHubBgpConnectionsListLearnedRoutesSample.js][virtualhubbgpconnectionslistlearnedroutessample] | Retrieves a list of routes the virtual hub bgp connection has learned. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeerListLearnedRoute.json | -| [virtualHubBgpConnectionsListSample.js][virtualhubbgpconnectionslistsample] | Retrieves the details of all VirtualHubBgpConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionList.json | -| [virtualHubIPConfigurationCreateOrUpdateSample.js][virtualhubipconfigurationcreateorupdatesample] | Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationPut.json | -| [virtualHubIPConfigurationDeleteSample.js][virtualhubipconfigurationdeletesample] | Deletes a VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationDelete.json | -| [virtualHubIPConfigurationGetSample.js][virtualhubipconfigurationgetsample] | Retrieves the details of a Virtual Hub Ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationGet.json | -| [virtualHubIPConfigurationListSample.js][virtualhubipconfigurationlistsample] | Retrieves the details of all VirtualHubIpConfigurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationList.json | -| [virtualHubRouteTableV2SCreateOrUpdateSample.js][virtualhubroutetablev2screateorupdatesample] | Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Put.json | -| [virtualHubRouteTableV2SDeleteSample.js][virtualhubroutetablev2sdeletesample] | Deletes a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Delete.json | -| [virtualHubRouteTableV2SGetSample.js][virtualhubroutetablev2sgetsample] | Retrieves the details of a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Get.json | -| [virtualHubRouteTableV2SListSample.js][virtualhubroutetablev2slistsample] | Retrieves the details of all VirtualHubRouteTableV2s. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2List.json | -| [virtualHubsCreateOrUpdateSample.js][virtualhubscreateorupdatesample] | Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubPut.json | -| [virtualHubsDeleteSample.js][virtualhubsdeletesample] | Deletes a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubDelete.json | -| [virtualHubsGetEffectiveVirtualHubRoutesSample.js][virtualhubsgeteffectivevirtualhubroutessample] | Gets the effective routes configured for the Virtual Hub resource or the specified resource . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EffectiveRoutesListForConnection.json | -| [virtualHubsGetInboundRoutesSample.js][virtualhubsgetinboundroutessample] | Gets the inbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetInboundRoutes.json | -| [virtualHubsGetOutboundRoutesSample.js][virtualhubsgetoutboundroutessample] | Gets the outbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetOutboundRoutes.json | -| [virtualHubsGetSample.js][virtualhubsgetsample] | Retrieves the details of a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubGet.json | -| [virtualHubsListByResourceGroupSample.js][virtualhubslistbyresourcegroupsample] | Lists all the VirtualHubs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubListByResourceGroup.json | -| [virtualHubsListSample.js][virtualhubslistsample] | Lists all the VirtualHubs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubList.json | -| [virtualHubsUpdateTagsSample.js][virtualhubsupdatetagssample] | Updates VirtualHub tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubUpdateTags.json | -| [virtualNetworkGatewayConnectionsCreateOrUpdateSample.js][virtualnetworkgatewayconnectionscreateorupdatesample] | Creates or updates a virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionCreate.json | -| [virtualNetworkGatewayConnectionsDeleteSample.js][virtualnetworkgatewayconnectionsdeletesample] | Deletes the specified virtual network Gateway connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionDelete.json | -| [virtualNetworkGatewayConnectionsGetIkeSasSample.js][virtualnetworkgatewayconnectionsgetikesassample] | Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json | -| [virtualNetworkGatewayConnectionsGetSample.js][virtualnetworkgatewayconnectionsgetsample] | Gets the specified virtual network gateway connection by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGet.json | -| [virtualNetworkGatewayConnectionsGetSharedKeySample.js][virtualnetworkgatewayconnectionsgetsharedkeysample] | The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json | -| [virtualNetworkGatewayConnectionsListSample.js][virtualnetworkgatewayconnectionslistsample] | The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionsList.json | -| [virtualNetworkGatewayConnectionsResetConnectionSample.js][virtualnetworkgatewayconnectionsresetconnectionsample] | Resets the virtual network gateway connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionReset.json | -| [virtualNetworkGatewayConnectionsResetSharedKeySample.js][virtualnetworkgatewayconnectionsresetsharedkeysample] | The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json | -| [virtualNetworkGatewayConnectionsSetSharedKeySample.js][virtualnetworkgatewayconnectionssetsharedkeysample] | The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json | -| [virtualNetworkGatewayConnectionsStartPacketCaptureSample.js][virtualnetworkgatewayconnectionsstartpacketcapturesample] | Starts packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json | -| [virtualNetworkGatewayConnectionsStopPacketCaptureSample.js][virtualnetworkgatewayconnectionsstoppacketcapturesample] | Stops packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json | -| [virtualNetworkGatewayConnectionsUpdateTagsSample.js][virtualnetworkgatewayconnectionsupdatetagssample] | Updates a virtual network gateway connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json | -| [virtualNetworkGatewayNatRulesCreateOrUpdateSample.js][virtualnetworkgatewaynatrulescreateorupdatesample] | Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRulePut.json | -| [virtualNetworkGatewayNatRulesDeleteSample.js][virtualnetworkgatewaynatrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleDelete.json | -| [virtualNetworkGatewayNatRulesGetSample.js][virtualnetworkgatewaynatrulesgetsample] | Retrieves the details of a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleGet.json | -| [virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js][virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample] | Retrieves all nat rules for a particular virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleList.json | -| [virtualNetworkGatewaysCreateOrUpdateSample.js][virtualnetworkgatewayscreateorupdatesample] | Creates or updates a virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayUpdate.json | -| [virtualNetworkGatewaysDeleteSample.js][virtualnetworkgatewaysdeletesample] | Deletes the specified virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayDelete.json | -| [virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js][virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample] | Disconnect vpn connections of virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json | -| [virtualNetworkGatewaysGenerateVpnProfileSample.js][virtualnetworkgatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json | -| [virtualNetworkGatewaysGeneratevpnclientpackageSample.js][virtualnetworkgatewaysgeneratevpnclientpackagesample] | Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json | -| [virtualNetworkGatewaysGetAdvertisedRoutesSample.js][virtualnetworkgatewaysgetadvertisedroutessample] | This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json | -| [virtualNetworkGatewaysGetBgpPeerStatusSample.js][virtualnetworkgatewaysgetbgppeerstatussample] | The GetBgpPeerStatus operation retrieves the status of all BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json | -| [virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js][virtualnetworkgatewaysgetfailoveralltestdetailssample] | This operation retrieves the details of all the failover tests performed on the gateway for different peering locations x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json | -| [virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js][virtualnetworkgatewaysgetfailoversingletestdetailssample] | This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json | -| [virtualNetworkGatewaysGetLearnedRoutesSample.js][virtualnetworkgatewaysgetlearnedroutessample] | This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayLearnedRoutes.json | -| [virtualNetworkGatewaysGetResiliencyInformationSample.js][virtualnetworkgatewaysgetresiliencyinformationsample] | This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetResiliencyInformation.json | -| [virtualNetworkGatewaysGetRoutesInformationSample.js][virtualnetworkgatewaysgetroutesinformationsample] | This operation retrieves the route set information for an Express Route Gateway based on their resiliency x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetRoutesInformation.json | -| [virtualNetworkGatewaysGetSample.js][virtualnetworkgatewaysgetsample] | Gets the specified virtual network gateway by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGet.json | -| [virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js][virtualnetworkgatewaysgetvpnprofilepackageurlsample] | Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json | -| [virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js][virtualnetworkgatewaysgetvpnclientconnectionhealthsample] | Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json | -| [virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js][virtualnetworkgatewaysgetvpnclientipsecparameterssample] | The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysInvokeAbortMigrationSample.js][virtualnetworkgatewaysinvokeabortmigrationsample] | Trigger abort migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayAbortMigration.json | -| [virtualNetworkGatewaysInvokeCommitMigrationSample.js][virtualnetworkgatewaysinvokecommitmigrationsample] | Trigger commit migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayCommitMigration.json | -| [virtualNetworkGatewaysInvokeExecuteMigrationSample.js][virtualnetworkgatewaysinvokeexecutemigrationsample] | Trigger execute migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayExecuteMigration.json | -| [virtualNetworkGatewaysInvokePrepareMigrationSample.js][virtualnetworkgatewaysinvokepreparemigrationsample] | Trigger prepare migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayPrepareMigration.json | -| [virtualNetworkGatewaysListConnectionsSample.js][virtualnetworkgatewayslistconnectionssample] | Gets all the connections in a virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaysListConnections.json | -| [virtualNetworkGatewaysListRadiusSecretsSample.js][virtualnetworkgatewayslistradiussecretssample] | List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AllVirtualNetworkGatewayRadiusServerSecretsList.json | -| [virtualNetworkGatewaysListSample.js][virtualnetworkgatewayslistsample] | Gets all virtual network gateways by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayList.json | -| [virtualNetworkGatewaysResetSample.js][virtualnetworkgatewaysresetsample] | Resets the primary of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayReset.json | -| [virtualNetworkGatewaysResetVpnClientSharedKeySample.js][virtualnetworkgatewaysresetvpnclientsharedkeysample] | Resets the VPN client shared key of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json | -| [virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js][virtualnetworkgatewayssetvpnclientipsecparameterssample] | The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js][virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample] | This operation starts failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json | -| [virtualNetworkGatewaysStartPacketCaptureSample.js][virtualnetworkgatewaysstartpacketcapturesample] | Starts packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json | -| [virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js][virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample] | This operation stops failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json | -| [virtualNetworkGatewaysStopPacketCaptureSample.js][virtualnetworkgatewaysstoppacketcapturesample] | Stops packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStopPacketCapture.json | -| [virtualNetworkGatewaysSupportedVpnDevicesSample.js][virtualnetworkgatewayssupportedvpndevicessample] | Gets a xml format representation for supported vpn devices. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json | -| [virtualNetworkGatewaysUpdateTagsSample.js][virtualnetworkgatewaysupdatetagssample] | Updates a virtual network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayUpdateTags.json | -| [virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js][virtualnetworkgatewaysvpndeviceconfigurationscriptsample] | Gets a xml format representation for vpn device configuration script. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json | -| [virtualNetworkPeeringsCreateOrUpdateSample.js][virtualnetworkpeeringscreateorupdatesample] | Creates or updates a peering in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkV6SubnetPeeringCreate.json | -| [virtualNetworkPeeringsDeleteSample.js][virtualnetworkpeeringsdeletesample] | Deletes the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringDelete.json | -| [virtualNetworkPeeringsGetSample.js][virtualnetworkpeeringsgetsample] | Gets the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkV6SubnetPeeringGet.json | -| [virtualNetworkPeeringsListSample.js][virtualnetworkpeeringslistsample] | Gets all virtual network peerings in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringList.json | -| [virtualNetworkTapsCreateOrUpdateSample.js][virtualnetworktapscreateorupdatesample] | Creates or updates a Virtual Network Tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapCreate.json | -| [virtualNetworkTapsDeleteSample.js][virtualnetworktapsdeletesample] | Deletes the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapDelete.json | -| [virtualNetworkTapsGetSample.js][virtualnetworktapsgetsample] | Gets information about the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapGet.json | -| [virtualNetworkTapsListAllSample.js][virtualnetworktapslistallsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapListAll.json | -| [virtualNetworkTapsListByResourceGroupSample.js][virtualnetworktapslistbyresourcegroupsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapList.json | -| [virtualNetworkTapsUpdateTagsSample.js][virtualnetworktapsupdatetagssample] | Updates an VirtualNetworkTap tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapUpdateTags.json | -| [virtualNetworksCheckIPAddressAvailabilitySample.js][virtualnetworkscheckipaddressavailabilitysample] | Checks whether a private IP address is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCheckIPAddressAvailability.json | -| [virtualNetworksCreateOrUpdateSample.js][virtualnetworkscreateorupdatesample] | Creates or updates a virtual network in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreate.json | -| [virtualNetworksDeleteSample.js][virtualnetworksdeletesample] | Deletes the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkDelete.json | -| [virtualNetworksGetSample.js][virtualnetworksgetsample] | Gets the specified virtual network by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGet.json | -| [virtualNetworksListAllSample.js][virtualnetworkslistallsample] | Gets all virtual networks in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkListAll.json | -| [virtualNetworksListDdosProtectionStatusSample.js][virtualnetworkslistddosprotectionstatussample] | Gets the Ddos Protection Status of all IP Addresses under the Virtual Network x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetDdosProtectionStatus.json | -| [virtualNetworksListSample.js][virtualnetworkslistsample] | Gets all virtual networks in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkList.json | -| [virtualNetworksListUsageSample.js][virtualnetworkslistusagesample] | Lists usage stats. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkListUsage.json | -| [virtualNetworksUpdateTagsSample.js][virtualnetworksupdatetagssample] | Updates a virtual network tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkUpdateTags.json | -| [virtualRouterPeeringsCreateOrUpdateSample.js][virtualrouterpeeringscreateorupdatesample] | Creates or updates the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringPut.json | -| [virtualRouterPeeringsDeleteSample.js][virtualrouterpeeringsdeletesample] | Deletes the specified peering from a Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringDelete.json | -| [virtualRouterPeeringsGetSample.js][virtualrouterpeeringsgetsample] | Gets the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringGet.json | -| [virtualRouterPeeringsListSample.js][virtualrouterpeeringslistsample] | Lists all Virtual Router Peerings in a Virtual Router resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringList.json | -| [virtualRoutersCreateOrUpdateSample.js][virtualrouterscreateorupdatesample] | Creates or updates the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPut.json | -| [virtualRoutersDeleteSample.js][virtualroutersdeletesample] | Deletes the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterDelete.json | -| [virtualRoutersGetSample.js][virtualroutersgetsample] | Gets the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterGet.json | -| [virtualRoutersListByResourceGroupSample.js][virtualrouterslistbyresourcegroupsample] | Lists all Virtual Routers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterListByResourceGroup.json | -| [virtualRoutersListSample.js][virtualrouterslistsample] | Gets all the Virtual Routers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterListBySubscription.json | -| [virtualWansCreateOrUpdateSample.js][virtualwanscreateorupdatesample] | Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANPut.json | -| [virtualWansDeleteSample.js][virtualwansdeletesample] | Deletes a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANDelete.json | -| [virtualWansGetSample.js][virtualwansgetsample] | Retrieves the details of a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANGet.json | -| [virtualWansListByResourceGroupSample.js][virtualwanslistbyresourcegroupsample] | Lists all the VirtualWANs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANListByResourceGroup.json | -| [virtualWansListSample.js][virtualwanslistsample] | Lists all the VirtualWANs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANList.json | -| [virtualWansUpdateTagsSample.js][virtualwansupdatetagssample] | Updates a VirtualWAN tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANUpdateTags.json | -| [vpnConnectionsCreateOrUpdateSample.js][vpnconnectionscreateorupdatesample] | Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionPut.json | -| [vpnConnectionsDeleteSample.js][vpnconnectionsdeletesample] | Deletes a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionDelete.json | -| [vpnConnectionsGetSample.js][vpnconnectionsgetsample] | Retrieves the details of a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionGet.json | -| [vpnConnectionsListByVpnGatewaySample.js][vpnconnectionslistbyvpngatewaysample] | Retrieves all vpn connections for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionList.json | -| [vpnConnectionsStartPacketCaptureSample.js][vpnconnectionsstartpacketcapturesample] | Starts packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionStartPacketCaptureFilterData.json | -| [vpnConnectionsStopPacketCaptureSample.js][vpnconnectionsstoppacketcapturesample] | Stops packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionStopPacketCapture.json | -| [vpnGatewaysCreateOrUpdateSample.js][vpngatewayscreateorupdatesample] | Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayPut.json | -| [vpnGatewaysDeleteSample.js][vpngatewaysdeletesample] | Deletes a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayDelete.json | -| [vpnGatewaysGetSample.js][vpngatewaysgetsample] | Retrieves the details of a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayGet.json | -| [vpnGatewaysListByResourceGroupSample.js][vpngatewayslistbyresourcegroupsample] | Lists all the VpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayListByResourceGroup.json | -| [vpnGatewaysListSample.js][vpngatewayslistsample] | Lists all the VpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayList.json | -| [vpnGatewaysResetSample.js][vpngatewaysresetsample] | Resets the primary of the vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayReset.json | -| [vpnGatewaysStartPacketCaptureSample.js][vpngatewaysstartpacketcapturesample] | Starts packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStartPacketCaptureFilterData.json | -| [vpnGatewaysStopPacketCaptureSample.js][vpngatewaysstoppacketcapturesample] | Stops packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStopPacketCapture.json | -| [vpnGatewaysUpdateTagsSample.js][vpngatewaysupdatetagssample] | Updates virtual wan vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayUpdateTags.json | -| [vpnLinkConnectionsGetAllSharedKeysSample.js][vpnlinkconnectionsgetallsharedkeyssample] | Lists all shared keys of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionSharedKeysGet.json | -| [vpnLinkConnectionsGetDefaultSharedKeySample.js][vpnlinkconnectionsgetdefaultsharedkeysample] | Gets the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json | -| [vpnLinkConnectionsGetIkeSasSample.js][vpnlinkconnectionsgetikesassample] | Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionGetIkeSas.json | -| [vpnLinkConnectionsListByVpnConnectionSample.js][vpnlinkconnectionslistbyvpnconnectionsample] | Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionList.json | -| [vpnLinkConnectionsListDefaultSharedKeySample.js][vpnlinkconnectionslistdefaultsharedkeysample] | Gets the value of the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json | -| [vpnLinkConnectionsResetConnectionSample.js][vpnlinkconnectionsresetconnectionsample] | Resets the VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionReset.json | -| [vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js][vpnlinkconnectionssetorinitdefaultsharedkeysample] | Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json | -| [vpnServerConfigurationsAssociatedWithVirtualWanListSample.js][vpnserverconfigurationsassociatedwithvirtualwanlistsample] | Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetVirtualWanVpnServerConfigurations.json | -| [vpnServerConfigurationsCreateOrUpdateSample.js][vpnserverconfigurationscreateorupdatesample] | Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationPut.json | -| [vpnServerConfigurationsDeleteSample.js][vpnserverconfigurationsdeletesample] | Deletes a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationDelete.json | -| [vpnServerConfigurationsGetSample.js][vpnserverconfigurationsgetsample] | Retrieves the details of a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationGet.json | -| [vpnServerConfigurationsListByResourceGroupSample.js][vpnserverconfigurationslistbyresourcegroupsample] | Lists all the vpnServerConfigurations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationListByResourceGroup.json | -| [vpnServerConfigurationsListRadiusSecretsSample.js][vpnserverconfigurationslistradiussecretssample] | List all Radius servers with respective radius secrets from VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AllVpnServerConfigurationRadiusServerSecretsList.json | -| [vpnServerConfigurationsListSample.js][vpnserverconfigurationslistsample] | Lists all the VpnServerConfigurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationList.json | -| [vpnServerConfigurationsUpdateTagsSample.js][vpnserverconfigurationsupdatetagssample] | Updates VpnServerConfiguration tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationUpdateTags.json | -| [vpnSiteLinkConnectionsGetSample.js][vpnsitelinkconnectionsgetsample] | Retrieves the details of a vpn site link connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionGet.json | -| [vpnSiteLinksGetSample.js][vpnsitelinksgetsample] | Retrieves the details of a VPN site link. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkGet.json | -| [vpnSiteLinksListByVpnSiteSample.js][vpnsitelinkslistbyvpnsitesample] | Lists all the vpnSiteLinks in a resource group for a vpn site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkListByVpnSite.json | -| [vpnSitesConfigurationDownloadSample.js][vpnsitesconfigurationdownloadsample] | Gives the sas-url to download the configurations for vpn-sites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSitesConfigurationDownload.json | -| [vpnSitesCreateOrUpdateSample.js][vpnsitescreateorupdatesample] | Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSitePut.json | -| [vpnSitesDeleteSample.js][vpnsitesdeletesample] | Deletes a VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteDelete.json | -| [vpnSitesGetSample.js][vpnsitesgetsample] | Retrieves the details of a VPN site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteGet.json | -| [vpnSitesListByResourceGroupSample.js][vpnsiteslistbyresourcegroupsample] | Lists all the vpnSites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteListByResourceGroup.json | -| [vpnSitesListSample.js][vpnsiteslistsample] | Lists all the VpnSites in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteList.json | -| [vpnSitesUpdateTagsSample.js][vpnsitesupdatetagssample] | Updates VpnSite tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteUpdateTags.json | -| [webApplicationFirewallPoliciesCreateOrUpdateSample.js][webapplicationfirewallpoliciescreateorupdatesample] | Creates or update policy with specified rule set name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyCreateOrUpdate.json | -| [webApplicationFirewallPoliciesDeleteSample.js][webapplicationfirewallpoliciesdeletesample] | Deletes Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyDelete.json | -| [webApplicationFirewallPoliciesGetSample.js][webapplicationfirewallpoliciesgetsample] | Retrieve protection policy with specified name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyGet.json | -| [webApplicationFirewallPoliciesListAllSample.js][webapplicationfirewallpolicieslistallsample] | Gets all the WAF policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListAllPolicies.json | -| [webApplicationFirewallPoliciesListSample.js][webapplicationfirewallpolicieslistsample] | Lists all of the protection policies within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListPolicies.json | -| [webCategoriesGetSample.js][webcategoriesgetsample] | Gets the specified Azure Web Category. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureWebCategoryGet.json | -| [webCategoriesListBySubscriptionSample.js][webcategorieslistbysubscriptionsample] | Gets all the Azure Web Categories in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureWebCategoriesListBySubscription.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node adminRuleCollectionsCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -cross-env NETWORK_SUBSCRIPTION_ID="" NETWORK_RESOURCE_GROUP="" node adminRuleCollectionsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[adminrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsCreateOrUpdateSample.js -[adminrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsDeleteSample.js -[adminrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsGetSample.js -[adminrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsListSample.js -[adminrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/adminRulesCreateOrUpdateSample.js -[adminrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/adminRulesDeleteSample.js -[adminrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/adminRulesGetSample.js -[adminruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/adminRulesListSample.js -[applicationgatewayprivateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js -[applicationgatewayprivateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js -[applicationgatewayprivateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js -[applicationgatewayprivateendpointconnectionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js -[applicationgatewayprivatelinkresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateLinkResourcesListSample.js -[applicationgatewaywafdynamicmanifestsdefaultgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js -[applicationgatewaywafdynamicmanifestsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewayWafDynamicManifestsGetSample.js -[applicationgatewaysbackendhealthondemandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysBackendHealthOnDemandSample.js -[applicationgatewaysbackendhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysBackendHealthSample.js -[applicationgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysCreateOrUpdateSample.js -[applicationgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysDeleteSample.js -[applicationgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysGetSample.js -[applicationgatewaysgetsslpredefinedpolicysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysGetSslPredefinedPolicySample.js -[applicationgatewayslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAllSample.js -[applicationgatewayslistavailablerequestheaderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableRequestHeadersSample.js -[applicationgatewayslistavailableresponseheaderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableResponseHeadersSample.js -[applicationgatewayslistavailableservervariablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableServerVariablesSample.js -[applicationgatewayslistavailablessloptionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableSslOptionsSample.js -[applicationgatewayslistavailablesslpredefinedpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js -[applicationgatewayslistavailablewafrulesetssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js -[applicationgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListSample.js -[applicationgatewaysstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysStartSample.js -[applicationgatewaysstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysStopSample.js -[applicationgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysUpdateTagsSample.js -[applicationsecuritygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsCreateOrUpdateSample.js -[applicationsecuritygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsDeleteSample.js -[applicationsecuritygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsGetSample.js -[applicationsecuritygroupslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsListAllSample.js -[applicationsecuritygroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsListSample.js -[applicationsecuritygroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsUpdateTagsSample.js -[availabledelegationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/availableDelegationsListSample.js -[availableendpointserviceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/availableEndpointServicesListSample.js -[availableprivateendpointtypeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js -[availableprivateendpointtypeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/availablePrivateEndpointTypesListSample.js -[availableresourcegroupdelegationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/availableResourceGroupDelegationsListSample.js -[availableservicealiaseslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/availableServiceAliasesListByResourceGroupSample.js -[availableservicealiaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/availableServiceAliasesListSample.js -[azurefirewallfqdntagslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/azureFirewallFqdnTagsListAllSample.js -[azurefirewallscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/azureFirewallsCreateOrUpdateSample.js -[azurefirewallsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/azureFirewallsDeleteSample.js -[azurefirewallsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/azureFirewallsGetSample.js -[azurefirewallslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListAllSample.js -[azurefirewallslistlearnedprefixessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListLearnedPrefixesSample.js -[azurefirewallslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListSample.js -[azurefirewallspacketcaptureoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/azureFirewallsPacketCaptureOperationSample.js -[azurefirewallspacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/azureFirewallsPacketCaptureSample.js -[azurefirewallsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/azureFirewallsUpdateTagsSample.js -[bastionhostscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/bastionHostsCreateOrUpdateSample.js -[bastionhostsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/bastionHostsDeleteSample.js -[bastionhostsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/bastionHostsGetSample.js -[bastionhostslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/bastionHostsListByResourceGroupSample.js -[bastionhostslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/bastionHostsListSample.js -[bastionhostsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/bastionHostsUpdateTagsSample.js -[bgpservicecommunitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/bgpServiceCommunitiesListSample.js -[checkdnsnameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/checkDnsNameAvailabilitySample.js -[configurationpolicygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsCreateOrUpdateSample.js -[configurationpolicygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsDeleteSample.js -[configurationpolicygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsGetSample.js -[configurationpolicygroupslistbyvpnserverconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js -[connectionmonitorscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsCreateOrUpdateSample.js -[connectionmonitorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsDeleteSample.js -[connectionmonitorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsGetSample.js -[connectionmonitorslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsListSample.js -[connectionmonitorsstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsStopSample.js -[connectionmonitorsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsUpdateTagsSample.js -[connectivityconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsCreateOrUpdateSample.js -[connectivityconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsDeleteSample.js -[connectivityconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsGetSample.js -[connectivityconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsListSample.js -[customipprefixescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesCreateOrUpdateSample.js -[customipprefixesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesDeleteSample.js -[customipprefixesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesGetSample.js -[customipprefixeslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesListAllSample.js -[customipprefixeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesListSample.js -[customipprefixesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesUpdateTagsSample.js -[ddoscustompoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesCreateOrUpdateSample.js -[ddoscustompoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesDeleteSample.js -[ddoscustompoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesGetSample.js -[ddoscustompoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesUpdateTagsSample.js -[ddosprotectionplanscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansCreateOrUpdateSample.js -[ddosprotectionplansdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansDeleteSample.js -[ddosprotectionplansgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansGetSample.js -[ddosprotectionplanslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansListByResourceGroupSample.js -[ddosprotectionplanslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansListSample.js -[ddosprotectionplansupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansUpdateTagsSample.js -[defaultsecurityrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/defaultSecurityRulesGetSample.js -[defaultsecurityruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/defaultSecurityRulesListSample.js -[deletebastionshareablelinkbytokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/deleteBastionShareableLinkByTokenSample.js -[deletebastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/deleteBastionShareableLinkSample.js -[disconnectactivesessionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/disconnectActiveSessionsSample.js -[dscpconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationCreateOrUpdateSample.js -[dscpconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationDeleteSample.js -[dscpconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationGetSample.js -[dscpconfigurationlistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationListAllSample.js -[dscpconfigurationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationListSample.js -[expressroutecircuitauthorizationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js -[expressroutecircuitauthorizationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsDeleteSample.js -[expressroutecircuitauthorizationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsGetSample.js -[expressroutecircuitauthorizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsListSample.js -[expressroutecircuitconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js -[expressroutecircuitconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsDeleteSample.js -[expressroutecircuitconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsGetSample.js -[expressroutecircuitconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsListSample.js -[expressroutecircuitpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js -[expressroutecircuitpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsDeleteSample.js -[expressroutecircuitpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsGetSample.js -[expressroutecircuitpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsListSample.js -[expressroutecircuitscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsCreateOrUpdateSample.js -[expressroutecircuitsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsDeleteSample.js -[expressroutecircuitsgetpeeringstatssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetPeeringStatsSample.js -[expressroutecircuitsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetSample.js -[expressroutecircuitsgetstatssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetStatsSample.js -[expressroutecircuitslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListAllSample.js -[expressroutecircuitslistarptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListArpTableSample.js -[expressroutecircuitslistroutestablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListRoutesTableSample.js -[expressroutecircuitslistroutestablesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListRoutesTableSummarySample.js -[expressroutecircuitslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListSample.js -[expressroutecircuitsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsUpdateTagsSample.js -[expressrouteconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsCreateOrUpdateSample.js -[expressrouteconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsDeleteSample.js -[expressrouteconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsGetSample.js -[expressrouteconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsListSample.js -[expressroutecrossconnectionpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js -[expressroutecrossconnectionpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js -[expressroutecrossconnectionpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsGetSample.js -[expressroutecrossconnectionpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsListSample.js -[expressroutecrossconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js -[expressroutecrossconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsGetSample.js -[expressroutecrossconnectionslistarptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListArpTableSample.js -[expressroutecrossconnectionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js -[expressroutecrossconnectionslistroutestablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListRoutesTableSample.js -[expressroutecrossconnectionslistroutestablesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js -[expressroutecrossconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListSample.js -[expressroutecrossconnectionsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsUpdateTagsSample.js -[expressroutegatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysCreateOrUpdateSample.js -[expressroutegatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysDeleteSample.js -[expressroutegatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysGetSample.js -[expressroutegatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysListByResourceGroupSample.js -[expressroutegatewayslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysListBySubscriptionSample.js -[expressroutegatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysUpdateTagsSample.js -[expressroutelinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteLinksGetSample.js -[expressroutelinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteLinksListSample.js -[expressrouteportauthorizationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js -[expressrouteportauthorizationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsDeleteSample.js -[expressrouteportauthorizationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsGetSample.js -[expressrouteportauthorizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsListSample.js -[expressrouteportscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsCreateOrUpdateSample.js -[expressrouteportsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsDeleteSample.js -[expressrouteportsgenerateloasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsGenerateLoaSample.js -[expressrouteportsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsGetSample.js -[expressrouteportslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsListByResourceGroupSample.js -[expressrouteportslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsListSample.js -[expressrouteportslocationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsLocationsGetSample.js -[expressrouteportslocationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsLocationsListSample.js -[expressrouteportsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsUpdateTagsSample.js -[expressrouteproviderportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteProviderPortSample.js -[expressrouteproviderportslocationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteProviderPortsLocationListSample.js -[expressrouteserviceproviderslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/expressRouteServiceProvidersListSample.js -[firewallpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesCreateOrUpdateSample.js -[firewallpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesDeleteSample.js -[firewallpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesGetSample.js -[firewallpolicieslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesListAllSample.js -[firewallpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesListSample.js -[firewallpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesUpdateTagsSample.js -[firewallpolicydeploymentsdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDeploymentsDeploySample.js -[firewallpolicydraftscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsCreateOrUpdateSample.js -[firewallpolicydraftsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsDeleteSample.js -[firewallpolicydraftsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsGetSample.js -[firewallpolicyidpssignaturesfiltervalueslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js -[firewallpolicyidpssignatureslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesListSample.js -[firewallpolicyidpssignaturesoverridesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js -[firewallpolicyidpssignaturesoverrideslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js -[firewallpolicyidpssignaturesoverridespatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js -[firewallpolicyidpssignaturesoverridesputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js -[firewallpolicyrulecollectiongroupdraftscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js -[firewallpolicyrulecollectiongroupdraftsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js -[firewallpolicyrulecollectiongroupdraftsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js -[firewallpolicyrulecollectiongroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js -[firewallpolicyrulecollectiongroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js -[firewallpolicyrulecollectiongroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsGetSample.js -[firewallpolicyrulecollectiongroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsListSample.js -[flowlogscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/flowLogsCreateOrUpdateSample.js -[flowlogsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/flowLogsDeleteSample.js -[flowlogsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/flowLogsGetSample.js -[flowlogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/flowLogsListSample.js -[flowlogsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/flowLogsUpdateTagsSample.js -[generatevirtualwanvpnserverconfigurationvpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js -[getactivesessionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/getActiveSessionsSample.js -[getbastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/getBastionShareableLinkSample.js -[hubroutetablescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesCreateOrUpdateSample.js -[hubroutetablesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesDeleteSample.js -[hubroutetablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesGetSample.js -[hubroutetableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesListSample.js -[hubvirtualnetworkconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js -[hubvirtualnetworkconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsDeleteSample.js -[hubvirtualnetworkconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsGetSample.js -[hubvirtualnetworkconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsListSample.js -[inboundnatrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesCreateOrUpdateSample.js -[inboundnatrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesDeleteSample.js -[inboundnatrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesGetSample.js -[inboundnatruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesListSample.js -[inboundsecurityrulecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/inboundSecurityRuleCreateOrUpdateSample.js -[inboundsecurityrulegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/inboundSecurityRuleGetSample.js -[ipallocationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipAllocationsCreateOrUpdateSample.js -[ipallocationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipAllocationsDeleteSample.js -[ipallocationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipAllocationsGetSample.js -[ipallocationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipAllocationsListByResourceGroupSample.js -[ipallocationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipAllocationsListSample.js -[ipallocationsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipAllocationsUpdateTagsSample.js -[ipgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipGroupsCreateOrUpdateSample.js -[ipgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipGroupsDeleteSample.js -[ipgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipGroupsGetSample.js -[ipgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipGroupsListByResourceGroupSample.js -[ipgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipGroupsListSample.js -[ipgroupsupdategroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipGroupsUpdateGroupsSample.js -[ipampoolscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipamPoolsCreateSample.js -[ipampoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipamPoolsDeleteSample.js -[ipampoolsgetpoolusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipamPoolsGetPoolUsageSample.js -[ipampoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipamPoolsGetSample.js -[ipampoolslistassociatedresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipamPoolsListAssociatedResourcesSample.js -[ipampoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipamPoolsListSample.js -[ipampoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/ipamPoolsUpdateSample.js -[listactiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/listActiveConnectivityConfigurationsSample.js -[listactivesecurityadminrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/listActiveSecurityAdminRulesSample.js -[listnetworkmanagereffectiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js -[listnetworkmanagereffectivesecurityadminrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js -[loadbalancerbackendaddresspoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js -[loadbalancerbackendaddresspoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsDeleteSample.js -[loadbalancerbackendaddresspoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsGetSample.js -[loadbalancerbackendaddresspoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsListSample.js -[loadbalancerfrontendipconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerFrontendIPConfigurationsGetSample.js -[loadbalancerfrontendipconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerFrontendIPConfigurationsListSample.js -[loadbalancerloadbalancingrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesGetSample.js -[loadbalancerloadbalancingruleshealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesHealthSample.js -[loadbalancerloadbalancingruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesListSample.js -[loadbalancernetworkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerNetworkInterfacesListSample.js -[loadbalanceroutboundrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerOutboundRulesGetSample.js -[loadbalanceroutboundruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerOutboundRulesListSample.js -[loadbalancerprobesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerProbesGetSample.js -[loadbalancerprobeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancerProbesListSample.js -[loadbalancerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancersCreateOrUpdateSample.js -[loadbalancersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancersDeleteSample.js -[loadbalancersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancersGetSample.js -[loadbalancerslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancersListAllSample.js -[loadbalancerslistinboundnatruleportmappingssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancersListInboundNatRulePortMappingsSample.js -[loadbalancerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancersListSample.js -[loadbalancersmigratetoipbasedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancersMigrateToIPBasedSample.js -[loadbalancersswappublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancersSwapPublicIPAddressesSample.js -[loadbalancersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/loadBalancersUpdateTagsSample.js -[localnetworkgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysCreateOrUpdateSample.js -[localnetworkgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysDeleteSample.js -[localnetworkgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysGetSample.js -[localnetworkgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysListSample.js -[localnetworkgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysUpdateTagsSample.js -[managementgroupnetworkmanagerconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js -[managementgroupnetworkmanagerconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js -[managementgroupnetworkmanagerconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsGetSample.js -[managementgroupnetworkmanagerconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsListSample.js -[natgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/natGatewaysCreateOrUpdateSample.js -[natgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/natGatewaysDeleteSample.js -[natgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/natGatewaysGetSample.js -[natgatewayslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/natGatewaysListAllSample.js -[natgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/natGatewaysListSample.js -[natgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/natGatewaysUpdateTagsSample.js -[natrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/natRulesCreateOrUpdateSample.js -[natrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/natRulesDeleteSample.js -[natrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/natRulesGetSample.js -[natruleslistbyvpngatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/natRulesListByVpnGatewaySample.js -[networkgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkGroupsCreateOrUpdateSample.js -[networkgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkGroupsDeleteSample.js -[networkgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkGroupsGetSample.js -[networkgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkGroupsListSample.js -[networkinterfaceipconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfaceIPConfigurationsGetSample.js -[networkinterfaceipconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfaceIPConfigurationsListSample.js -[networkinterfaceloadbalancerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfaceLoadBalancersListSample.js -[networkinterfacetapconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js -[networkinterfacetapconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsDeleteSample.js -[networkinterfacetapconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsGetSample.js -[networkinterfacetapconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsListSample.js -[networkinterfacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesCreateOrUpdateSample.js -[networkinterfacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesDeleteSample.js -[networkinterfacesgetcloudservicenetworkinterfacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js -[networkinterfacesgeteffectiveroutetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetEffectiveRouteTableSample.js -[networkinterfacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetSample.js -[networkinterfacesgetvirtualmachinescalesetipconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js -[networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js -[networkinterfaceslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListAllSample.js -[networkinterfaceslistcloudservicenetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js -[networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js -[networkinterfaceslisteffectivenetworksecuritygroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js -[networkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListSample.js -[networkinterfaceslistvirtualmachinescalesetipconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js -[networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js -[networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js -[networkinterfacesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkInterfacesUpdateTagsSample.js -[networkmanagercommitspostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagerCommitsPostSample.js -[networkmanagerdeploymentstatuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagerDeploymentStatusListSample.js -[networkmanagerroutingconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js -[networkmanagerroutingconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsDeleteSample.js -[networkmanagerroutingconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsGetSample.js -[networkmanagerroutingconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsListSample.js -[networkmanagerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagersCreateOrUpdateSample.js -[networkmanagersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagersDeleteSample.js -[networkmanagersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagersGetSample.js -[networkmanagerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagersListBySubscriptionSample.js -[networkmanagerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagersListSample.js -[networkmanagerspatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkManagersPatchSample.js -[networkprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkProfilesCreateOrUpdateSample.js -[networkprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkProfilesDeleteSample.js -[networkprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkProfilesGetSample.js -[networkprofileslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkProfilesListAllSample.js -[networkprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkProfilesListSample.js -[networkprofilesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkProfilesUpdateTagsSample.js -[networksecuritygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsCreateOrUpdateSample.js -[networksecuritygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsDeleteSample.js -[networksecuritygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsGetSample.js -[networksecuritygroupslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsListAllSample.js -[networksecuritygroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsListSample.js -[networksecuritygroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsUpdateTagsSample.js -[networksecurityperimeteraccessrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js -[networksecurityperimeteraccessrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesDeleteSample.js -[networksecurityperimeteraccessrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesGetSample.js -[networksecurityperimeteraccessruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesListSample.js -[networksecurityperimeteraccessrulesreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesReconcileSample.js -[networksecurityperimeterassociableresourcetypeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociableResourceTypesListSample.js -[networksecurityperimeterassociationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsCreateOrUpdateSample.js -[networksecurityperimeterassociationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsDeleteSample.js -[networksecurityperimeterassociationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsGetSample.js -[networksecurityperimeterassociationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsListSample.js -[networksecurityperimeterassociationsreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsReconcileSample.js -[networksecurityperimeterlinkreferencesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesDeleteSample.js -[networksecurityperimeterlinkreferencesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesGetSample.js -[networksecurityperimeterlinkreferenceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesListSample.js -[networksecurityperimeterlinkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksCreateOrUpdateSample.js -[networksecurityperimeterlinksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksDeleteSample.js -[networksecurityperimeterlinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksGetSample.js -[networksecurityperimeterlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksListSample.js -[networksecurityperimeterloggingconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js -[networksecurityperimeterloggingconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsDeleteSample.js -[networksecurityperimeterloggingconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsGetSample.js -[networksecurityperimeterloggingconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsListSample.js -[networksecurityperimeteroperationstatusesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterOperationStatusesGetSample.js -[networksecurityperimeterprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesCreateOrUpdateSample.js -[networksecurityperimeterprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesDeleteSample.js -[networksecurityperimeterprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesGetSample.js -[networksecurityperimeterprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesListSample.js -[networksecurityperimeterservicetagslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterServiceTagsListSample.js -[networksecurityperimeterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersCreateOrUpdateSample.js -[networksecurityperimetersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersDeleteSample.js -[networksecurityperimetersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersGetSample.js -[networksecurityperimeterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersListBySubscriptionSample.js -[networksecurityperimeterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersListSample.js -[networksecurityperimeterspatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersPatchSample.js -[networkvirtualapplianceconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js -[networkvirtualapplianceconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsDeleteSample.js -[networkvirtualapplianceconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsGetSample.js -[networkvirtualapplianceconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsListSample.js -[networkvirtualappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesCreateOrUpdateSample.js -[networkvirtualappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesDeleteSample.js -[networkvirtualappliancesgetbootdiagnosticlogssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesGetBootDiagnosticLogsSample.js -[networkvirtualappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesGetSample.js -[networkvirtualapplianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesListByResourceGroupSample.js -[networkvirtualapplianceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesListSample.js -[networkvirtualappliancesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesReimageSample.js -[networkvirtualappliancesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesRestartSample.js -[networkvirtualappliancesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesUpdateTagsSample.js -[networkwatcherscheckconnectivitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersCheckConnectivitySample.js -[networkwatcherscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersCreateOrUpdateSample.js -[networkwatchersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersDeleteSample.js -[networkwatchersgetazurereachabilityreportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetAzureReachabilityReportSample.js -[networkwatchersgetflowlogstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetFlowLogStatusSample.js -[networkwatchersgetnetworkconfigurationdiagnosticsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js -[networkwatchersgetnexthopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetNextHopSample.js -[networkwatchersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetSample.js -[networkwatchersgettopologysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTopologySample.js -[networkwatchersgettroubleshootingresultsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTroubleshootingResultSample.js -[networkwatchersgettroubleshootingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTroubleshootingSample.js -[networkwatchersgetvmsecurityrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetVMSecurityRulesSample.js -[networkwatcherslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersListAllSample.js -[networkwatcherslistavailableproviderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersListAvailableProvidersSample.js -[networkwatcherslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersListSample.js -[networkwatcherssetflowlogconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersSetFlowLogConfigurationSample.js -[networkwatchersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersUpdateTagsSample.js -[networkwatchersverifyipflowsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/networkWatchersVerifyIPFlowSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/operationsListSample.js -[p2svpngatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysCreateOrUpdateSample.js -[p2svpngatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysDeleteSample.js -[p2svpngatewaysdisconnectp2svpnconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js -[p2svpngatewaysgeneratevpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js -[p2svpngatewaysgetp2svpnconnectionhealthdetailedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js -[p2svpngatewaysgetp2svpnconnectionhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js -[p2svpngatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetSample.js -[p2svpngatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysListByResourceGroupSample.js -[p2svpngatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysListSample.js -[p2svpngatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysResetSample.js -[p2svpngatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysUpdateTagsSample.js -[packetcapturescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/packetCapturesCreateSample.js -[packetcapturesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/packetCapturesDeleteSample.js -[packetcapturesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/packetCapturesGetSample.js -[packetcapturesgetstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/packetCapturesGetStatusSample.js -[packetcaptureslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/packetCapturesListSample.js -[packetcapturesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/packetCapturesStopSample.js -[peerexpressroutecircuitconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/peerExpressRouteCircuitConnectionsGetSample.js -[peerexpressroutecircuitconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/peerExpressRouteCircuitConnectionsListSample.js -[privatednszonegroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js -[privatednszonegroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsDeleteSample.js -[privatednszonegroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsGetSample.js -[privatednszonegroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsListSample.js -[privateendpointscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateEndpointsCreateOrUpdateSample.js -[privateendpointsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateEndpointsDeleteSample.js -[privateendpointsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateEndpointsGetSample.js -[privateendpointslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateEndpointsListBySubscriptionSample.js -[privateendpointslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateEndpointsListSample.js -[privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js -[privatelinkservicescheckprivatelinkservicevisibilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js -[privatelinkservicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCreateOrUpdateSample.js -[privatelinkservicesdeleteprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js -[privatelinkservicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesDeleteSample.js -[privatelinkservicesgetprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js -[privatelinkservicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesGetSample.js -[privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js -[privatelinkserviceslistautoapprovedprivatelinkservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js -[privatelinkserviceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListBySubscriptionSample.js -[privatelinkserviceslistprivateendpointconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js -[privatelinkserviceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListSample.js -[privatelinkservicesupdateprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js -[publicipaddressescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesCreateOrUpdateSample.js -[publicipaddressesddosprotectionstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDdosProtectionStatusSample.js -[publicipaddressesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDeleteSample.js -[publicipaddressesdisassociatecloudservicereservedpublicipsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js -[publicipaddressesgetcloudservicepublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js -[publicipaddressesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetSample.js -[publicipaddressesgetvirtualmachinescalesetpublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js -[publicipaddresseslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListAllSample.js -[publicipaddresseslistcloudservicepublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js -[publicipaddresseslistcloudserviceroleinstancepublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js -[publicipaddresseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListSample.js -[publicipaddresseslistvirtualmachinescalesetpublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js -[publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js -[publicipaddressesreservecloudservicepublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesReserveCloudServicePublicIPAddressSample.js -[publicipaddressesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesUpdateTagsSample.js -[publicipprefixescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesCreateOrUpdateSample.js -[publicipprefixesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesDeleteSample.js -[publicipprefixesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesGetSample.js -[publicipprefixeslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesListAllSample.js -[publicipprefixeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesListSample.js -[publicipprefixesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesUpdateTagsSample.js -[putbastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/putBastionShareableLinkSample.js -[reachabilityanalysisintentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsCreateSample.js -[reachabilityanalysisintentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsDeleteSample.js -[reachabilityanalysisintentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsGetSample.js -[reachabilityanalysisintentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsListSample.js -[reachabilityanalysisrunscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsCreateSample.js -[reachabilityanalysisrunsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsDeleteSample.js -[reachabilityanalysisrunsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsGetSample.js -[reachabilityanalysisrunslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsListSample.js -[resourcenavigationlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/resourceNavigationLinksListSample.js -[routefilterrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesCreateOrUpdateSample.js -[routefilterrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesDeleteSample.js -[routefilterrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesGetSample.js -[routefilterruleslistbyroutefiltersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesListByRouteFilterSample.js -[routefilterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeFiltersCreateOrUpdateSample.js -[routefiltersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeFiltersDeleteSample.js -[routefiltersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeFiltersGetSample.js -[routefilterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeFiltersListByResourceGroupSample.js -[routefilterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeFiltersListSample.js -[routefiltersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeFiltersUpdateTagsSample.js -[routemapscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeMapsCreateOrUpdateSample.js -[routemapsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeMapsDeleteSample.js -[routemapsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeMapsGetSample.js -[routemapslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeMapsListSample.js -[routetablescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeTablesCreateOrUpdateSample.js -[routetablesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeTablesDeleteSample.js -[routetablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeTablesGetSample.js -[routetableslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeTablesListAllSample.js -[routetableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeTablesListSample.js -[routetablesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routeTablesUpdateTagsSample.js -[routescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routesCreateOrUpdateSample.js -[routesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routesDeleteSample.js -[routesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routesGetSample.js -[routeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routesListSample.js -[routingintentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingIntentCreateOrUpdateSample.js -[routingintentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingIntentDeleteSample.js -[routingintentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingIntentGetSample.js -[routingintentlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingIntentListSample.js -[routingrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsCreateOrUpdateSample.js -[routingrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsDeleteSample.js -[routingrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsGetSample.js -[routingrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsListSample.js -[routingrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingRulesCreateOrUpdateSample.js -[routingrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingRulesDeleteSample.js -[routingrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingRulesGetSample.js -[routingruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/routingRulesListSample.js -[scopeconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsCreateOrUpdateSample.js -[scopeconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsDeleteSample.js -[scopeconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsGetSample.js -[scopeconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsListSample.js -[securityadminconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsCreateOrUpdateSample.js -[securityadminconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsDeleteSample.js -[securityadminconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsGetSample.js -[securityadminconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsListSample.js -[securitypartnerproviderscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersCreateOrUpdateSample.js -[securitypartnerprovidersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersDeleteSample.js -[securitypartnerprovidersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersGetSample.js -[securitypartnerproviderslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersListByResourceGroupSample.js -[securitypartnerproviderslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersListSample.js -[securitypartnerprovidersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersUpdateTagsSample.js -[securityrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityRulesCreateOrUpdateSample.js -[securityrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityRulesDeleteSample.js -[securityrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityRulesGetSample.js -[securityruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityRulesListSample.js -[securityuserconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsCreateOrUpdateSample.js -[securityuserconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsDeleteSample.js -[securityuserconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsGetSample.js -[securityuserconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsListSample.js -[securityuserrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js -[securityuserrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsDeleteSample.js -[securityuserrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsGetSample.js -[securityuserrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsListSample.js -[securityuserrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserRulesCreateOrUpdateSample.js -[securityuserrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserRulesDeleteSample.js -[securityuserrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserRulesGetSample.js -[securityuserruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/securityUserRulesListSample.js -[serviceassociationlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceAssociationLinksListSample.js -[serviceendpointpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js -[serviceendpointpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesDeleteSample.js -[serviceendpointpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesGetSample.js -[serviceendpointpolicieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesListByResourceGroupSample.js -[serviceendpointpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesListSample.js -[serviceendpointpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesUpdateTagsSample.js -[serviceendpointpolicydefinitionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js -[serviceendpointpolicydefinitionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js -[serviceendpointpolicydefinitionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsGetSample.js -[serviceendpointpolicydefinitionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js -[servicetaginformationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceTagInformationListSample.js -[servicetagslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/serviceTagsListSample.js -[staticcidrscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/staticCidrsCreateSample.js -[staticcidrsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/staticCidrsDeleteSample.js -[staticcidrsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/staticCidrsGetSample.js -[staticcidrslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/staticCidrsListSample.js -[staticmemberscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/staticMembersCreateOrUpdateSample.js -[staticmembersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/staticMembersDeleteSample.js -[staticmembersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/staticMembersGetSample.js -[staticmemberslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/staticMembersListSample.js -[subnetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/subnetsCreateOrUpdateSample.js -[subnetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/subnetsDeleteSample.js -[subnetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/subnetsGetSample.js -[subnetslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/subnetsListSample.js -[subnetspreparenetworkpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/subnetsPrepareNetworkPoliciesSample.js -[subnetsunpreparenetworkpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/subnetsUnprepareNetworkPoliciesSample.js -[subscriptionnetworkmanagerconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js -[subscriptionnetworkmanagerconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js -[subscriptionnetworkmanagerconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsGetSample.js -[subscriptionnetworkmanagerconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsListSample.js -[supportedsecurityproviderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/supportedSecurityProvidersSample.js -[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/usagesListSample.js -[verifierworkspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesCreateSample.js -[verifierworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesDeleteSample.js -[verifierworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesGetSample.js -[verifierworkspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesListSample.js -[verifierworkspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesUpdateSample.js -[vipswapcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vipSwapCreateSample.js -[vipswapgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vipSwapGetSample.js -[vipswaplistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vipSwapListSample.js -[virtualappliancesitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesCreateOrUpdateSample.js -[virtualappliancesitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesDeleteSample.js -[virtualappliancesitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesGetSample.js -[virtualappliancesiteslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesListSample.js -[virtualapplianceskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSkusGetSample.js -[virtualapplianceskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSkusListSample.js -[virtualhubbgpconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js -[virtualhubbgpconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionDeleteSample.js -[virtualhubbgpconnectiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionGetSample.js -[virtualhubbgpconnectionslistadvertisedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js -[virtualhubbgpconnectionslistlearnedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js -[virtualhubbgpconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListSample.js -[virtualhubipconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js -[virtualhubipconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationDeleteSample.js -[virtualhubipconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationGetSample.js -[virtualhubipconfigurationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationListSample.js -[virtualhubroutetablev2screateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js -[virtualhubroutetablev2sdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SDeleteSample.js -[virtualhubroutetablev2sgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SGetSample.js -[virtualhubroutetablev2slistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SListSample.js -[virtualhubscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubsCreateOrUpdateSample.js -[virtualhubsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubsDeleteSample.js -[virtualhubsgeteffectivevirtualhubroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js -[virtualhubsgetinboundroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetInboundRoutesSample.js -[virtualhubsgetoutboundroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetOutboundRoutesSample.js -[virtualhubsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetSample.js -[virtualhubslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubsListByResourceGroupSample.js -[virtualhubslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubsListSample.js -[virtualhubsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualHubsUpdateTagsSample.js -[virtualnetworkgatewayconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js -[virtualnetworkgatewayconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsDeleteSample.js -[virtualnetworkgatewayconnectionsgetikesassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js -[virtualnetworkgatewayconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetSample.js -[virtualnetworkgatewayconnectionsgetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js -[virtualnetworkgatewayconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsListSample.js -[virtualnetworkgatewayconnectionsresetconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js -[virtualnetworkgatewayconnectionsresetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js -[virtualnetworkgatewayconnectionssetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js -[virtualnetworkgatewayconnectionsstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js -[virtualnetworkgatewayconnectionsstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js -[virtualnetworkgatewayconnectionsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js -[virtualnetworkgatewaynatrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js -[virtualnetworkgatewaynatrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesDeleteSample.js -[virtualnetworkgatewaynatrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesGetSample.js -[virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js -[virtualnetworkgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js -[virtualnetworkgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysDeleteSample.js -[virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js -[virtualnetworkgatewaysgeneratevpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js -[virtualnetworkgatewaysgeneratevpnclientpackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js -[virtualnetworkgatewaysgetadvertisedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js -[virtualnetworkgatewaysgetbgppeerstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js -[virtualnetworkgatewaysgetfailoveralltestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js -[virtualnetworkgatewaysgetfailoversingletestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js -[virtualnetworkgatewaysgetlearnedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js -[virtualnetworkgatewaysgetresiliencyinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetResiliencyInformationSample.js -[virtualnetworkgatewaysgetroutesinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetRoutesInformationSample.js -[virtualnetworkgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetSample.js -[virtualnetworkgatewaysgetvpnprofilepackageurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js -[virtualnetworkgatewaysgetvpnclientconnectionhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js -[virtualnetworkgatewaysgetvpnclientipsecparameterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js -[virtualnetworkgatewaysinvokeabortmigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeAbortMigrationSample.js -[virtualnetworkgatewaysinvokecommitmigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeCommitMigrationSample.js -[virtualnetworkgatewaysinvokeexecutemigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeExecuteMigrationSample.js -[virtualnetworkgatewaysinvokepreparemigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokePrepareMigrationSample.js -[virtualnetworkgatewayslistconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListConnectionsSample.js -[virtualnetworkgatewayslistradiussecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListRadiusSecretsSample.js -[virtualnetworkgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListSample.js -[virtualnetworkgatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysResetSample.js -[virtualnetworkgatewaysresetvpnclientsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js -[virtualnetworkgatewayssetvpnclientipsecparameterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js -[virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js -[virtualnetworkgatewaysstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js -[virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js -[virtualnetworkgatewaysstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js -[virtualnetworkgatewayssupportedvpndevicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js -[virtualnetworkgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysUpdateTagsSample.js -[virtualnetworkgatewaysvpndeviceconfigurationscriptsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js -[virtualnetworkpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js -[virtualnetworkpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsDeleteSample.js -[virtualnetworkpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsGetSample.js -[virtualnetworkpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsListSample.js -[virtualnetworktapscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsCreateOrUpdateSample.js -[virtualnetworktapsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsDeleteSample.js -[virtualnetworktapsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsGetSample.js -[virtualnetworktapslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsListAllSample.js -[virtualnetworktapslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsListByResourceGroupSample.js -[virtualnetworktapsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsUpdateTagsSample.js -[virtualnetworkscheckipaddressavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js -[virtualnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworksCreateOrUpdateSample.js -[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworksDeleteSample.js -[virtualnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworksGetSample.js -[virtualnetworkslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListAllSample.js -[virtualnetworkslistddosprotectionstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListDdosProtectionStatusSample.js -[virtualnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListSample.js -[virtualnetworkslistusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListUsageSample.js -[virtualnetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualNetworksUpdateTagsSample.js -[virtualrouterpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsCreateOrUpdateSample.js -[virtualrouterpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsDeleteSample.js -[virtualrouterpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsGetSample.js -[virtualrouterpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsListSample.js -[virtualrouterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualRoutersCreateOrUpdateSample.js -[virtualroutersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualRoutersDeleteSample.js -[virtualroutersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualRoutersGetSample.js -[virtualrouterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualRoutersListByResourceGroupSample.js -[virtualrouterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualRoutersListSample.js -[virtualwanscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualWansCreateOrUpdateSample.js -[virtualwansdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualWansDeleteSample.js -[virtualwansgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualWansGetSample.js -[virtualwanslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualWansListByResourceGroupSample.js -[virtualwanslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualWansListSample.js -[virtualwansupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/virtualWansUpdateTagsSample.js -[vpnconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsCreateOrUpdateSample.js -[vpnconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsDeleteSample.js -[vpnconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsGetSample.js -[vpnconnectionslistbyvpngatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsListByVpnGatewaySample.js -[vpnconnectionsstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsStartPacketCaptureSample.js -[vpnconnectionsstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsStopPacketCaptureSample.js -[vpngatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysCreateOrUpdateSample.js -[vpngatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysDeleteSample.js -[vpngatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysGetSample.js -[vpngatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysListByResourceGroupSample.js -[vpngatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysListSample.js -[vpngatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysResetSample.js -[vpngatewaysstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysStartPacketCaptureSample.js -[vpngatewaysstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysStopPacketCaptureSample.js -[vpngatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysUpdateTagsSample.js -[vpnlinkconnectionsgetallsharedkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js -[vpnlinkconnectionsgetdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js -[vpnlinkconnectionsgetikesassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetIkeSasSample.js -[vpnlinkconnectionslistbyvpnconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsListByVpnConnectionSample.js -[vpnlinkconnectionslistdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js -[vpnlinkconnectionsresetconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsResetConnectionSample.js -[vpnlinkconnectionssetorinitdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js -[vpnserverconfigurationsassociatedwithvirtualwanlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js -[vpnserverconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsCreateOrUpdateSample.js -[vpnserverconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsDeleteSample.js -[vpnserverconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsGetSample.js -[vpnserverconfigurationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListByResourceGroupSample.js -[vpnserverconfigurationslistradiussecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListRadiusSecretsSample.js -[vpnserverconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListSample.js -[vpnserverconfigurationsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsUpdateTagsSample.js -[vpnsitelinkconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinkConnectionsGetSample.js -[vpnsitelinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinksGetSample.js -[vpnsitelinkslistbyvpnsitesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinksListByVpnSiteSample.js -[vpnsitesconfigurationdownloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnSitesConfigurationDownloadSample.js -[vpnsitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnSitesCreateOrUpdateSample.js -[vpnsitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnSitesDeleteSample.js -[vpnsitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnSitesGetSample.js -[vpnsiteslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnSitesListByResourceGroupSample.js -[vpnsiteslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnSitesListSample.js -[vpnsitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/vpnSitesUpdateTagsSample.js -[webapplicationfirewallpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js -[webapplicationfirewallpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesDeleteSample.js -[webapplicationfirewallpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesGetSample.js -[webapplicationfirewallpolicieslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesListAllSample.js -[webapplicationfirewallpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesListSample.js -[webcategoriesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/webCategoriesGetSample.js -[webcategorieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/javascript/webCategoriesListBySubscriptionSample.js -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-network?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network/README.md diff --git a/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsCreateOrUpdateSample.js deleted file mode 100644 index 26e60024e9d4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an admin rule collection. - * - * @summary Creates or updates an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionPut.json - */ -async function createOrUpdateAnAdminRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleCollection = { - description: "A sample policy", - appliesToGroups: [ - { - networkGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, - ); - console.log(result); -} - -async function main() { - await createOrUpdateAnAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsDeleteSample.js deleted file mode 100644 index d6c1f022511b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsDeleteSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an admin rule collection. - * - * @summary Deletes an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionDelete.json - */ -async function deletesAnAdminRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - console.log(result); -} - -async function main() { - await deletesAnAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsGetSample.js deleted file mode 100644 index c724e4d2ce44..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a network manager security admin configuration rule collection. - * - * @summary Gets a network manager security admin configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionGet.json - */ -async function getsSecurityAdminRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main() { - await getsSecurityAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsListSample.js deleted file mode 100644 index 7d511b6d002d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/adminRuleCollectionsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the rule collections in a security admin configuration, in a paginated format. - * - * @summary Lists all the rule collections in a security admin configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionList.json - */ -async function listSecurityAdminRuleCollections() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.adminRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSecurityAdminRuleCollections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/adminRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/adminRulesCreateOrUpdateSample.js deleted file mode 100644 index 770ad7df42a6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/adminRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an admin rule. - * - * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json - */ -async function createAAdminRuleWithNetworkGroupAsSourceOrDestination() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const adminRule = { - description: "This is Sample Admin Rule", - access: "Deny", - destinationPortRanges: ["22"], - destinations: [ - { - addressPrefix: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1", - addressPrefixType: "NetworkGroup", - }, - ], - direction: "Inbound", - kind: "Custom", - priority: 1, - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - adminRule, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an admin rule. - * - * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRulePut.json - */ -async function createAnAdminRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const adminRule = { - description: "This is Sample Admin Rule", - access: "Deny", - destinationPortRanges: ["22"], - destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - direction: "Inbound", - kind: "Custom", - priority: 1, - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - adminRule, - ); - console.log(result); -} - -async function main() { - await createAAdminRuleWithNetworkGroupAsSourceOrDestination(); - await createAnAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/adminRulesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/adminRulesDeleteSample.js deleted file mode 100644 index c7db06c5ac5a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/adminRulesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an admin rule. - * - * @summary Deletes an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleDelete.json - */ -async function deletesAnAdminRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main() { - await deletesAnAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/adminRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/adminRulesGetSample.js deleted file mode 100644 index a6091fde46e0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/adminRulesGetSample.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a network manager security configuration admin rule. - * - * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleGet.json - */ -async function getsSecurityAdminRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets a network manager security configuration admin rule. - * - * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerDefaultAdminRuleGet.json - */ -async function getsSecurityDefaultAdminRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleDefaultAdminRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main() { - await getsSecurityAdminRule(); - await getsSecurityDefaultAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/adminRulesListSample.js b/sdk/network/arm-network/samples/v35/javascript/adminRulesListSample.js deleted file mode 100644 index 37067a3c9358..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/adminRulesListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network manager security configuration admin rules. - * - * @summary List all network manager security configuration admin rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleList.json - */ -async function listSecurityAdminRules() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.adminRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js deleted file mode 100644 index 3c9de6a495f0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified private endpoint connection on application gateway. - * - * @summary Deletes the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json - */ -async function deleteApplicationGatewayPrivateEndpointConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGatewayPrivateEndpointConnections.beginDeleteAndWait( - resourceGroupName, - applicationGatewayName, - connectionName, - ); - console.log(result); -} - -async function main() { - await deleteApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js deleted file mode 100644 index 8bd03bd794e6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified private endpoint connection on application gateway. - * - * @summary Gets the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json - */ -async function getApplicationGatewayPrivateEndpointConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGatewayPrivateEndpointConnections.get( - resourceGroupName, - applicationGatewayName, - connectionName, - ); - console.log(result); -} - -async function main() { - await getApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js deleted file mode 100644 index 77cdb514f461..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all private endpoint connections on an application gateway. - * - * @summary Lists all private endpoint connections on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json - */ -async function listsAllPrivateEndpointConnectionsOnApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayPrivateEndpointConnections.list( - resourceGroupName, - applicationGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllPrivateEndpointConnectionsOnApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js deleted file mode 100644 index 0a43d25908ad..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the specified private endpoint connection on application gateway. - * - * @summary Updates the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json - */ -async function updateApplicationGatewayPrivateEndpointConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const parameters = { - name: "connection1", - privateEndpoint: { - id: "/subscriptions/subId2/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe", - }, - privateLinkServiceConnectionState: { - description: "approved it for some reason.", - status: "Approved", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGatewayPrivateEndpointConnections.beginUpdateAndWait( - resourceGroupName, - applicationGatewayName, - connectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateLinkResourcesListSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateLinkResourcesListSample.js deleted file mode 100644 index 0ef5efd0ddbc..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayPrivateLinkResourcesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all private link resources on an application gateway. - * - * @summary Lists all private link resources on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateLinkResourceList.json - */ -async function listsAllPrivateLinkResourcesOnApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayPrivateLinkResources.list( - resourceGroupName, - applicationGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllPrivateLinkResourcesOnApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js deleted file mode 100644 index 628cb6659ca0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the regional application gateway waf manifest. - * - * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json - */ -async function getsWafDefaultManifest() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGatewayWafDynamicManifestsDefault.get(location); - console.log(result); -} - -async function main() { - await getsWafDefaultManifest(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayWafDynamicManifestsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewayWafDynamicManifestsGetSample.js deleted file mode 100644 index df877c135c19..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewayWafDynamicManifestsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the regional application gateway waf manifest. - * - * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetApplicationGatewayWafDynamicManifests.json - */ -async function getsWafManifests() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayWafDynamicManifests.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getsWafManifests(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysBackendHealthOnDemandSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysBackendHealthOnDemandSample.js deleted file mode 100644 index 9236c87fccee..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysBackendHealthOnDemandSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * - * @summary Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayBackendHealthTest.json - */ -async function testBackendHealth() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const probeRequest = { - path: "/", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendaddressPools/MFAnalyticsPool", - }, - backendHttpSettings: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/MFPoolSettings", - }, - pickHostNameFromBackendHttpSettings: true, - timeout: 30, - protocol: "Http", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginBackendHealthOnDemandAndWait( - resourceGroupName, - applicationGatewayName, - probeRequest, - ); - console.log(result); -} - -async function main() { - await testBackendHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysBackendHealthSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysBackendHealthSample.js deleted file mode 100644 index 20fdd4c3b897..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysBackendHealthSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the backend health of the specified application gateway in a resource group. - * - * @summary Gets the backend health of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayBackendHealthGet.json - */ -async function getBackendHealth() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "appgw"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginBackendHealthAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main() { - await getBackendHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysCreateOrUpdateSample.js deleted file mode 100644 index 57b8932f46d9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified application gateway. - * - * @summary Creates or updates the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayCreate.json - */ -async function createApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const parameters = { - backendAddressPools: [ - { - name: "appgwpool", - backendAddresses: [{ ipAddress: "10.0.1.1" }, { ipAddress: "10.0.1.2" }], - }, - { - name: "appgwpool1", - backendAddresses: [{ ipAddress: "10.0.0.1" }, { ipAddress: "10.0.0.2" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool1", - }, - ], - backendHttpSettingsCollection: [ - { - name: "appgwbhs", - cookieBasedAffinity: "Disabled", - port: 80, - requestTimeout: 30, - protocol: "Http", - }, - ], - entraJWTValidationConfigs: [ - { - name: "entraJWTValidationConfig1", - clientId: "37293f5a-97b3-451d-b786-f532d711c9ff", - tenantId: "70a036f6-8e4d-4615-bad6-149c02e7720d", - unAuthorizedRequestAction: "Deny", - }, - ], - frontendIPConfigurations: [ - { - name: "appgwfip", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/appgwpip", - }, - }, - ], - frontendPorts: [ - { name: "appgwfp", port: 443 }, - { name: "appgwfp80", port: 80 }, - ], - gatewayIPConfigurations: [ - { - name: "appgwipc", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet/subnets/appgwsubnet", - }, - }, - ], - globalConfiguration: { - enableRequestBuffering: true, - enableResponseBuffering: true, - }, - httpListeners: [ - { - name: "appgwhl", - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", - }, - frontendPort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp", - }, - requireServerNameIndication: false, - sslCertificate: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslCertificates/sslcert", - }, - sslProfile: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslProfiles/sslProfile1", - }, - protocol: "Https", - }, - { - name: "appgwhttplistener", - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", - }, - frontendPort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp80", - }, - protocol: "Http", - }, - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "eastus", - requestRoutingRules: [ - { - name: "appgwrule", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool", - }, - backendHttpSettings: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs", - }, - entraJWTValidationConfig: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/entraJWTValidationConfigs/entraJWTValidationConfig1", - }, - httpListener: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhl", - }, - priority: 10, - rewriteRuleSet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1", - }, - ruleType: "Basic", - }, - ], - rewriteRuleSets: [ - { - name: "rewriteRuleSet1", - rewriteRules: [ - { - name: "Set X-Forwarded-For", - actionSet: { - requestHeaderConfigurations: [ - { - headerName: "X-Forwarded-For", - headerValue: "{var_add_x_forwarded_for_proxy}", - }, - ], - responseHeaderConfigurations: [ - { - headerName: "Strict-Transport-Security", - headerValue: "max-age=31536000", - }, - ], - urlConfiguration: { modifiedPath: "/abc" }, - }, - conditions: [ - { - ignoreCase: true, - negate: false, - pattern: "^Bearer", - variable: "http_req_Authorization", - }, - ], - ruleSequence: 102, - }, - ], - }, - ], - sku: { name: "Standard_v2", capacity: 3, tier: "Standard_v2" }, - sslCertificates: [ - { name: "sslcert", data: "****", password: "****" }, - { name: "sslcert2", keyVaultSecretId: "https://kv/secret" }, - ], - sslProfiles: [ - { - name: "sslProfile1", - clientAuthConfiguration: { verifyClientCertIssuerDN: true }, - sslPolicy: { - cipherSuites: ["TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"], - minProtocolVersion: "TLSv1_1", - policyType: "Custom", - }, - trustedClientCertificates: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/trustedClientCertificates/clientcert", - }, - ], - }, - ], - trustedClientCertificates: [{ name: "clientcert", data: "****" }], - trustedRootCertificates: [ - { name: "rootcert", data: "****" }, - { name: "rootcert1", keyVaultSecretId: "https://kv/secret" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - applicationGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await createApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysDeleteSample.js deleted file mode 100644 index 4ece990a6c7b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified application gateway. - * - * @summary Deletes the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayDelete.json - */ -async function deleteApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginDeleteAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main() { - await deleteApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysGetSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysGetSample.js deleted file mode 100644 index 088b9a8b8fb3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified application gateway. - * - * @summary Gets the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayGet.json - */ -async function getApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.get(resourceGroupName, applicationGatewayName); - console.log(result); -} - -async function main() { - await getApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysGetSslPredefinedPolicySample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysGetSslPredefinedPolicySample.js deleted file mode 100644 index 48e3c5c1b411..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysGetSslPredefinedPolicySample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets Ssl predefined policy with the specified policy name. - * - * @summary Gets Ssl predefined policy with the specified policy name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json - */ -async function getAvailableSslPredefinedPolicyByName() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const predefinedPolicyName = "AppGwSslPolicy20150501"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.getSslPredefinedPolicy(predefinedPolicyName); - console.log(result); -} - -async function main() { - await getAvailableSslPredefinedPolicyByName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAllSample.js deleted file mode 100644 index aadefdf1d126..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the application gateways in a subscription. - * - * @summary Gets all the application gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayListAll.json - */ -async function listsAllApplicationGatewaysInASubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllApplicationGatewaysInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableRequestHeadersSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableRequestHeadersSample.js deleted file mode 100644 index a98c7db5a3aa..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableRequestHeadersSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all available request headers. - * - * @summary Lists all available request headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json - */ -async function getAvailableRequestHeaders() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableRequestHeaders(); - console.log(result); -} - -async function main() { - await getAvailableRequestHeaders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableResponseHeadersSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableResponseHeadersSample.js deleted file mode 100644 index 704b6008deb7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableResponseHeadersSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all available response headers. - * - * @summary Lists all available response headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json - */ -async function getAvailableResponseHeaders() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableResponseHeaders(); - console.log(result); -} - -async function main() { - await getAvailableResponseHeaders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableServerVariablesSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableServerVariablesSample.js deleted file mode 100644 index ef621e0a2d06..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableServerVariablesSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all available server variables. - * - * @summary Lists all available server variables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableServerVariablesGet.json - */ -async function getAvailableServerVariables() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableServerVariables(); - console.log(result); -} - -async function main() { - await getAvailableServerVariables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableSslOptionsSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableSslOptionsSample.js deleted file mode 100644 index 109138eb93f3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableSslOptionsSample.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists available Ssl options for configuring Ssl policy. - * - * @summary Lists available Ssl options for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsGet.json - */ -async function getAvailableSslOptions() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableSslOptions(); - console.log(result); -} - -async function main() { - await getAvailableSslOptions(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js deleted file mode 100644 index e9bc36f9170c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all SSL predefined policies for configuring Ssl policy. - * - * @summary Lists all SSL predefined policies for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json - */ -async function getAvailableSslPredefinedPolicies() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.listAvailableSslPredefinedPolicies()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailableSslPredefinedPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js deleted file mode 100644 index 3e69b0674689..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all available web application firewall rule sets. - * - * @summary Lists all available web application firewall rule sets. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json - */ -async function getAvailableWafRuleSets() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableWafRuleSets(); - console.log(result); -} - -async function main() { - await getAvailableWafRuleSets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListSample.js deleted file mode 100644 index 41ecb9d07391..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all application gateways in a resource group. - * - * @summary Lists all application gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayList.json - */ -async function listsAllApplicationGatewaysInAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllApplicationGatewaysInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysStartSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysStartSample.js deleted file mode 100644 index f3d3b3023223..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysStartSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Starts the specified application gateway. - * - * @summary Starts the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayStart.json - */ -async function startApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginStartAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main() { - await startApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysStopSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysStopSample.js deleted file mode 100644 index a61dff61b665..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysStopSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops the specified application gateway in a resource group. - * - * @summary Stops the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayStop.json - */ -async function stopApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginStopAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main() { - await stopApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysUpdateTagsSample.js deleted file mode 100644 index 19950e9acf27..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the specified application gateway tags. - * - * @summary Updates the specified application gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayUpdateTags.json - */ -async function updateApplicationGatewayTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "AppGw"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.updateTags( - resourceGroupName, - applicationGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateApplicationGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsCreateOrUpdateSample.js deleted file mode 100644 index 93e1d4e96ca4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an application security group. - * - * @summary Creates or updates an application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupCreate.json - */ -async function createApplicationSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const parameters = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - applicationSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await createApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsDeleteSample.js deleted file mode 100644 index a9d15771d5b0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified application security group. - * - * @summary Deletes the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupDelete.json - */ -async function deleteApplicationSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.beginDeleteAndWait( - resourceGroupName, - applicationSecurityGroupName, - ); - console.log(result); -} - -async function main() { - await deleteApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsGetSample.js deleted file mode 100644 index 9860732f2581..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified application security group. - * - * @summary Gets information about the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupGet.json - */ -async function getApplicationSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.get( - resourceGroupName, - applicationSecurityGroupName, - ); - console.log(result); -} - -async function main() { - await getApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsListAllSample.js deleted file mode 100644 index 8dd7bd89e08f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all application security groups in a subscription. - * - * @summary Gets all application security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupListAll.json - */ -async function listAllApplicationSecurityGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationSecurityGroups.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllApplicationSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsListSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsListSample.js deleted file mode 100644 index 052231263d1e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the application security groups in a resource group. - * - * @summary Gets all the application security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupList.json - */ -async function listLoadBalancersInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationSecurityGroups.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listLoadBalancersInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsUpdateTagsSample.js deleted file mode 100644 index ce095f57eb39..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/applicationSecurityGroupsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an application security group's tags. - * - * @summary Updates an application security group's tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupUpdateTags.json - */ -async function updateApplicationSecurityGroupTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.updateTags( - resourceGroupName, - applicationSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateApplicationSecurityGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/availableDelegationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/availableDelegationsListSample.js deleted file mode 100644 index 2e9213cc21e3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/availableDelegationsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all of the available subnet delegations for this subscription in this region. - * - * @summary Gets all of the available subnet delegations for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableDelegationsSubscriptionGet.json - */ -async function getAvailableDelegations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableDelegations.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailableDelegations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/availableEndpointServicesListSample.js b/sdk/network/arm-network/samples/v35/javascript/availableEndpointServicesListSample.js deleted file mode 100644 index a39a08e9a2c9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/availableEndpointServicesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List what values of endpoint services are available for use. - * - * @summary List what values of endpoint services are available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EndpointServicesList.json - */ -async function endpointServicesList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableEndpointServices.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await endpointServicesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js deleted file mode 100644 index 7bf235747edf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * - * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json - */ -async function getAvailablePrivateEndpointTypesInTheResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availablePrivateEndpointTypes.listByResourceGroup( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailablePrivateEndpointTypesInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/availablePrivateEndpointTypesListSample.js b/sdk/network/arm-network/samples/v35/javascript/availablePrivateEndpointTypesListSample.js deleted file mode 100644 index e457660f301e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/availablePrivateEndpointTypesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * - * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailablePrivateEndpointTypesGet.json - */ -async function getAvailablePrivateEndpointTypes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availablePrivateEndpointTypes.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailablePrivateEndpointTypes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/availableResourceGroupDelegationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/availableResourceGroupDelegationsListSample.js deleted file mode 100644 index cb05ae675d61..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/availableResourceGroupDelegationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all of the available subnet delegations for this resource group in this region. - * - * @summary Gets all of the available subnet delegations for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableDelegationsResourceGroupGet.json - */ -async function getAvailableDelegationsInTheResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableResourceGroupDelegations.list( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailableDelegationsInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/availableServiceAliasesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/availableServiceAliasesListByResourceGroupSample.js deleted file mode 100644 index d96dcafa1928..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/availableServiceAliasesListByResourceGroupSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all available service aliases for this resource group in this region. - * - * @summary Gets all available service aliases for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableServiceAliasesListByResourceGroup.json - */ -async function getAvailableServiceAliasesInTheResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableServiceAliases.listByResourceGroup( - resourceGroupName, - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailableServiceAliasesInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/availableServiceAliasesListSample.js b/sdk/network/arm-network/samples/v35/javascript/availableServiceAliasesListSample.js deleted file mode 100644 index 650d2d90db14..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/availableServiceAliasesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all available service aliases for this subscription in this region. - * - * @summary Gets all available service aliases for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableServiceAliasesList.json - */ -async function getAvailableServiceAliases() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableServiceAliases.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailableServiceAliases(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/azureFirewallFqdnTagsListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/azureFirewallFqdnTagsListAllSample.js deleted file mode 100644 index 6e9d0ea763ab..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/azureFirewallFqdnTagsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Azure Firewall FQDN Tags in a subscription. - * - * @summary Gets all the Azure Firewall FQDN Tags in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallFqdnTagsListBySubscription.json - */ -async function listAllAzureFirewallFqdnTagsForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewallFqdnTags.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllAzureFirewallFqdnTagsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/azureFirewallsCreateOrUpdateSample.js deleted file mode 100644 index c12ce63e8bf6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsCreateOrUpdateSample.js +++ /dev/null @@ -1,617 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPut.json - */ -async function createAzureFirewall() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - name: "L4-traffic-with-FQDN", - description: "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutWithAdditionalProperties.json - */ -async function createAzureFirewallWithAdditionalProperties() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - additionalProperties: { key1: "value1", key2: "value2" }, - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - ipGroups: [], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - name: "L4-traffic-with-FQDN", - description: "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutWithIpGroups.json - */ -async function createAzureFirewallWithIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - name: "L4-traffic-with-FQDN", - description: "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutWithZones.json - */ -async function createAzureFirewallWithZones() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US 2", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - name: "L4-traffic-with-FQDN", - description: "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: ["1", "2", "3"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutWithMgmtSubnet.json - */ -async function createAzureFirewallWithManagementSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - managementIpConfiguration: { - name: "azureFirewallMgmtIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/managementPipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallManagementSubnet", - }, - }, - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - name: "L4-traffic-with-FQDN", - description: "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutInHub.json - */ -async function createAzureFirewallInVirtualHub() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - firewallPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/policy1", - }, - hubIPAddresses: { publicIPs: { addresses: [], count: 1 } }, - location: "West US", - sku: { name: "AZFW_Hub", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main() { - await createAzureFirewall(); - await createAzureFirewallWithAdditionalProperties(); - await createAzureFirewallWithIPGroups(); - await createAzureFirewallWithZones(); - await createAzureFirewallWithManagementSubnet(); - await createAzureFirewallInVirtualHub(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/azureFirewallsDeleteSample.js deleted file mode 100644 index cd6c5e5867c8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Azure Firewall. - * - * @summary Deletes the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallDelete.json - */ -async function deleteAzureFirewall() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginDeleteAndWait( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -async function main() { - await deleteAzureFirewall(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/azureFirewallsGetSample.js deleted file mode 100644 index 069022907074..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsGetSample.js +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGet.json - */ -async function getAzureFirewall() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get(resourceGroupName, azureFirewallName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGetWithAdditionalProperties.json - */ -async function getAzureFirewallWithAdditionalProperties() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get(resourceGroupName, azureFirewallName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGetWithIpGroups.json - */ -async function getAzureFirewallWithIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get(resourceGroupName, azureFirewallName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGetWithZones.json - */ -async function getAzureFirewallWithZones() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get(resourceGroupName, azureFirewallName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGetWithMgmtSubnet.json - */ -async function getAzureFirewallWithManagementSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get(resourceGroupName, azureFirewallName); - console.log(result); -} - -async function main() { - await getAzureFirewall(); - await getAzureFirewallWithAdditionalProperties(); - await getAzureFirewallWithIPGroups(); - await getAzureFirewallWithZones(); - await getAzureFirewallWithManagementSubnet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListAllSample.js deleted file mode 100644 index 9e3bc76cd668..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Azure Firewalls in a subscription. - * - * @summary Gets all the Azure Firewalls in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListBySubscription.json - */ -async function listAllAzureFirewallsForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewalls.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllAzureFirewallsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListLearnedPrefixesSample.js b/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListLearnedPrefixesSample.js deleted file mode 100644 index 207dcaf6a932..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListLearnedPrefixesSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * - * @summary Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListLearnedIPPrefixes.json - */ -async function azureFirewallListLearnedPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginListLearnedPrefixesAndWait( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -async function main() { - await azureFirewallListLearnedPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListSample.js b/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListSample.js deleted file mode 100644 index a9faf6e20f1b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Azure Firewalls in a resource group. - * - * @summary Lists all Azure Firewalls in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListByResourceGroup.json - */ -async function listAllAzureFirewallsForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewalls.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllAzureFirewallsForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsPacketCaptureOperationSample.js b/sdk/network/arm-network/samples/v35/javascript/azureFirewallsPacketCaptureOperationSample.js deleted file mode 100644 index c92b2678832d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsPacketCaptureOperationSample.js +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Runs a packet capture operation on AzureFirewall. - * - * @summary Runs a packet capture operation on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPacketCaptureOperation.json - */ -async function azureFirewallPacketCaptureOperation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const parameters = { - durationInSeconds: 300, - fileName: "azureFirewallPacketCapture", - filters: [ - { - destinationPorts: ["4500"], - destinations: ["20.1.2.0"], - sources: ["20.1.1.0"], - }, - { - destinationPorts: ["123", "80"], - destinations: ["10.1.2.0"], - sources: ["10.1.1.0", "10.1.1.1"], - }, - ], - flags: [{ type: "syn" }, { type: "fin" }], - numberOfPacketsToCapture: 5000, - operation: "Status", - sasUrl: "someSASURL", - protocol: "Any", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginPacketCaptureOperationAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main() { - await azureFirewallPacketCaptureOperation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsPacketCaptureSample.js b/sdk/network/arm-network/samples/v35/javascript/azureFirewallsPacketCaptureSample.js deleted file mode 100644 index b6c41c791988..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsPacketCaptureSample.js +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Runs a packet capture on AzureFirewall. - * - * @summary Runs a packet capture on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPacketCapture.json - */ -async function azureFirewallPacketCapture() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const parameters = { - durationInSeconds: 300, - fileName: "azureFirewallPacketCapture", - filters: [ - { - destinationPorts: ["4500"], - destinations: ["20.1.2.0"], - sources: ["20.1.1.0"], - }, - { - destinationPorts: ["123", "80"], - destinations: ["10.1.2.0"], - sources: ["10.1.1.0", "10.1.1.1"], - }, - ], - flags: [{ type: "syn" }, { type: "fin" }], - numberOfPacketsToCapture: 5000, - sasUrl: "someSASURL", - protocol: "Any", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginPacketCaptureAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main() { - await azureFirewallPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/azureFirewallsUpdateTagsSample.js deleted file mode 100644 index 75af7ee10621..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/azureFirewallsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of an Azure Firewall resource. - * - * @summary Updates tags of an Azure Firewall resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallUpdateTags.json - */ -async function updateAzureFirewallTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "azfwtest"; - const azureFirewallName = "fw1"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginUpdateTagsAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateAzureFirewallTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/bastionHostsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/bastionHostsCreateOrUpdateSample.js deleted file mode 100644 index 200ab9f8b88a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/bastionHostsCreateOrUpdateSample.js +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPut.json - */ -async function createBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters = { - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPutWithPrivateOnly.json - */ -async function createBastionHostWithPrivateOnly() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters = { - enablePrivateOnlyBastion: true, - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPutWithZones.json - */ -async function createBastionHostWithZones() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters = { - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDeveloperPut.json - */ -async function createDeveloperBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg2"; - const bastionHostName = "bastionhostdeveloper"; - const parameters = { - ipConfigurations: [], - networkAcls: { ipRules: [{ addressPrefix: "1.1.1.1/16" }] }, - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -async function main() { - await createBastionHost(); - await createBastionHostWithPrivateOnly(); - await createBastionHostWithZones(); - await createDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/bastionHostsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/bastionHostsDeleteSample.js deleted file mode 100644 index ccd99d33692b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/bastionHostsDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Bastion Host. - * - * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDelete.json - */ -async function deleteBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginDeleteAndWait(resourceGroupName, bastionHostName); - console.log(result); -} - -/** - * This sample demonstrates how to Deletes the specified Bastion Host. - * - * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDeveloperDelete.json - */ -async function deleteDeveloperBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg2"; - const bastionHostName = "bastionhostdeveloper"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginDeleteAndWait(resourceGroupName, bastionHostName); - console.log(result); -} - -async function main() { - await deleteBastionHost(); - await deleteDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/bastionHostsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/bastionHostsGetSample.js deleted file mode 100644 index 7fb27c755b21..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/bastionHostsGetSample.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostGet.json - */ -async function getBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant'"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get(resourceGroupName, bastionHostName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostGetWithPrivateOnly.json - */ -async function getBastionHostWithPrivateOnly() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get(resourceGroupName, bastionHostName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostGetWithZones.json - */ -async function getBastionHostWithZones() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get(resourceGroupName, bastionHostName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDeveloperGet.json - */ -async function getDeveloperBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhostdeveloper'"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get(resourceGroupName, bastionHostName); - console.log(result); -} - -async function main() { - await getBastionHost(); - await getBastionHostWithPrivateOnly(); - await getBastionHostWithZones(); - await getDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/bastionHostsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/bastionHostsListByResourceGroupSample.js deleted file mode 100644 index 4796becf3e3c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/bastionHostsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Bastion Hosts in a resource group. - * - * @summary Lists all Bastion Hosts in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostListByResourceGroup.json - */ -async function listAllBastionHostsForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bastionHosts.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllBastionHostsForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/bastionHostsListSample.js b/sdk/network/arm-network/samples/v35/javascript/bastionHostsListSample.js deleted file mode 100644 index 9d560b7136ce..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/bastionHostsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Bastion Hosts in a subscription. - * - * @summary Lists all Bastion Hosts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostListBySubscription.json - */ -async function listAllBastionHostsForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bastionHosts.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllBastionHostsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/bastionHostsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/bastionHostsUpdateTagsSample.js deleted file mode 100644 index 4231206ed9df..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/bastionHostsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates Tags for BastionHost resource - * - * @summary Updates Tags for BastionHost resource - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPatch.json - */ -async function patchBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginUpdateTagsAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -async function main() { - await patchBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/bgpServiceCommunitiesListSample.js b/sdk/network/arm-network/samples/v35/javascript/bgpServiceCommunitiesListSample.js deleted file mode 100644 index 08e760b6d46e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/bgpServiceCommunitiesListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the available bgp service communities. - * - * @summary Gets all the available bgp service communities. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceCommunityList.json - */ -async function serviceCommunityList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bgpServiceCommunities.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await serviceCommunityList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/checkDnsNameAvailabilitySample.js b/sdk/network/arm-network/samples/v35/javascript/checkDnsNameAvailabilitySample.js deleted file mode 100644 index 66dec4fb13f5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/checkDnsNameAvailabilitySample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * - * @summary Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckDnsNameAvailability.json - */ -async function checkDnsNameAvailability() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const domainNameLabel = "testdns"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.checkDnsNameAvailability(location, domainNameLabel); - console.log(result); -} - -async function main() { - await checkDnsNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsCreateOrUpdateSample.js deleted file mode 100644 index 39188e199507..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * - * @summary Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupPut.json - */ -async function configurationPolicyGroupPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const vpnServerConfigurationPolicyGroupParameters = { - isDefault: true, - policyMembers: [ - { - name: "policy1", - attributeType: "RadiusAzureGroupId", - attributeValue: "6ad1bd08", - }, - { - name: "policy2", - attributeType: "CertificateGroupId", - attributeValue: "red.com", - }, - ], - priority: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.configurationPolicyGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - vpnServerConfigurationPolicyGroupParameters, - ); - console.log(result); -} - -async function main() { - await configurationPolicyGroupPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsDeleteSample.js deleted file mode 100644 index 0354a65283f6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a ConfigurationPolicyGroup. - * - * @summary Deletes a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupDelete.json - */ -async function configurationPolicyGroupDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.configurationPolicyGroups.beginDeleteAndWait( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - ); - console.log(result); -} - -async function main() { - await configurationPolicyGroupDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsGetSample.js deleted file mode 100644 index f1cff7381ff4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a ConfigurationPolicyGroup. - * - * @summary Retrieves the details of a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupGet.json - */ -async function configurationPolicyGroupGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.configurationPolicyGroups.get( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - ); - console.log(result); -} - -async function main() { - await configurationPolicyGroupGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js b/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js deleted file mode 100644 index c7b6b34f3b1d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * - * @summary Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json - */ -async function configurationPolicyGroupListByVpnServerConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.configurationPolicyGroups.listByVpnServerConfiguration( - resourceGroupName, - vpnServerConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await configurationPolicyGroupListByVpnServerConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsCreateOrUpdateSample.js deleted file mode 100644 index 54942f2646b3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsCreateOrUpdateSample.js +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorCreate.json - */ -async function createConnectionMonitorV1() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters = { - endpoints: [ - { - name: "source", - resourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/ct1", - }, - { name: "destination", address: "bing.com" }, - ], - location: "eastus", - testConfigurations: [ - { - name: "tcp", - tcpConfiguration: { port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "tg", - destinations: ["destination"], - sources: ["source"], - testConfigurations: ["tcp"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorV2Create.json - */ -async function createConnectionMonitorV2() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters = { - endpoints: [ - { - name: "vm1", - resourceId: - "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/NwRgIrinaCentralUSEUAP/providers/Microsoft.Compute/virtualMachines/vm1", - }, - { - name: "CanaryWorkspaceVamshi", - filter: { - type: "Include", - items: [{ type: "AgentAddress", address: "npmuser" }], - }, - resourceId: - "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/vasamudrRG/providers/Microsoft.OperationalInsights/workspaces/vasamudrWorkspace", - }, - { name: "bing", address: "bing.com" }, - { name: "google", address: "google.com" }, - ], - outputs: [], - testConfigurations: [ - { - name: "testConfig1", - tcpConfiguration: { disableTraceRoute: false, port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "test1", - destinations: ["bing", "google"], - disable: false, - sources: ["vm1", "CanaryWorkspaceVamshi"], - testConfigurations: ["testConfig1"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json - */ -async function createConnectionMonitorWithArcNetwork() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters = { - endpoints: [ - { - name: "vm1", - type: "AzureVM", - resourceId: - "/subscriptions/9cece3e3-0f7d-47ca-af0e-9772773f90b7/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/TESTVM", - }, - { name: "bing", type: "ExternalAddress", address: "bing.com" }, - { name: "google", type: "ExternalAddress", address: "google.com" }, - { - name: "ArcBasedNetwork", - type: "AzureArcNetwork", - locationDetails: { region: "eastus" }, - scope: { include: [{ address: "172.21.128.0/20" }] }, - subscriptionId: "9cece3e3-0f7d-47ca-af0e-9772773f90b7", - }, - ], - outputs: [], - testConfigurations: [ - { - name: "testConfig1", - tcpConfiguration: { disableTraceRoute: false, port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "test1", - destinations: ["bing", "google"], - disable: false, - sources: ["vm1", "ArcBasedNetwork"], - testConfigurations: ["testConfig1"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -async function main() { - await createConnectionMonitorV1(); - await createConnectionMonitorV2(); - await createConnectionMonitorWithArcNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsDeleteSample.js deleted file mode 100644 index 7721d7c54710..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified connection monitor. - * - * @summary Deletes the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorDelete.json - */ -async function deleteConnectionMonitor() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main() { - await deleteConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsGetSample.js deleted file mode 100644 index 7b119a83373d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a connection monitor by name. - * - * @summary Gets a connection monitor by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorGet.json - */ -async function getConnectionMonitor() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.get( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main() { - await getConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsListSample.js b/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsListSample.js deleted file mode 100644 index 26cf39318b4d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all connection monitors for the specified Network Watcher. - * - * @summary Lists all connection monitors for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorList.json - */ -async function listConnectionMonitors() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.connectionMonitors.list(resourceGroupName, networkWatcherName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listConnectionMonitors(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsStopSample.js b/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsStopSample.js deleted file mode 100644 index 4a10b1e066cd..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsStopSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops the specified connection monitor. - * - * @summary Stops the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorStop.json - */ -async function stopConnectionMonitor() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginStopAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main() { - await stopConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsUpdateTagsSample.js deleted file mode 100644 index 75c072dc4762..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/connectionMonitorsUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update tags of the specified connection monitor. - * - * @summary Update tags of the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json - */ -async function updateConnectionMonitorTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.updateTags( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateConnectionMonitorTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index 3a3ea07f15a3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates/Updates a new network manager connectivity configuration - * - * @summary Creates/Updates a new network manager connectivity configuration - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationPut.json - */ -async function connectivityConfigurationsPut() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const connectivityConfiguration = { - description: "Sample Configuration", - appliesToGroups: [ - { - groupConnectivity: "None", - isGlobal: "False", - networkGroupId: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/group1", - useHubGateway: "True", - }, - ], - connectivityCapabilities: { - connectedGroupAddressOverlap: "Allowed", - connectedGroupPrivateEndpointsScale: "Standard", - peeringEnforcement: "Unenforced", - }, - connectivityTopology: "HubAndSpoke", - deleteExistingPeering: "True", - hubs: [ - { - resourceId: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myTestConnectivityConfig", - resourceType: "Microsoft.Network/virtualNetworks", - }, - ], - isGlobal: "True", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - connectivityConfiguration, - ); - console.log(result); -} - -async function main() { - await connectivityConfigurationsPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsDeleteSample.js deleted file mode 100644 index 14ad63be3237..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * - * @summary Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationDelete.json - */ -async function connectivityConfigurationsDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main() { - await connectivityConfigurationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsGetSample.js deleted file mode 100644 index 0fc0d49c2111..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * - * @summary Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationGet.json - */ -async function connectivityConfigurationsGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main() { - await connectivityConfigurationsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsListSample.js deleted file mode 100644 index cf8cbb6d4fd7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/connectivityConfigurationsListSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the network manager connectivity configuration in a specified network manager. - * - * @summary Lists all the network manager connectivity configuration in a specified network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationList.json - */ -async function connectivityConfigurationsList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.connectivityConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await connectivityConfigurationsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesCreateOrUpdateSample.js deleted file mode 100644 index d0fd2937f1f1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesCreateOrUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a custom IP prefix. - * - * @summary Creates or updates a custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixCreateCustomizedValues.json - */ -async function createCustomIPPrefixAllocationMethod() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const parameters = { cidr: "0.0.0.0/24", location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - customIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main() { - await createCustomIPPrefixAllocationMethod(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesDeleteSample.js deleted file mode 100644 index 05ff672c695d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified custom IP prefix. - * - * @summary Deletes the specified custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixDelete.json - */ -async function deleteCustomIPPrefix() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.beginDeleteAndWait( - resourceGroupName, - customIpPrefixName, - ); - console.log(result); -} - -async function main() { - await deleteCustomIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesGetSample.js deleted file mode 100644 index cd1ed50e8072..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified custom IP prefix in a specified resource group. - * - * @summary Gets the specified custom IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixGet.json - */ -async function getCustomIPPrefix() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.get(resourceGroupName, customIpPrefixName); - console.log(result); -} - -async function main() { - await getCustomIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesListAllSample.js deleted file mode 100644 index d647f1bd0ef7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the custom IP prefixes in a subscription. - * - * @summary Gets all the custom IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixListAll.json - */ -async function listAllCustomIPPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.customIPPrefixes.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllCustomIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesListSample.js b/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesListSample.js deleted file mode 100644 index e714c3b3bae1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all custom IP prefixes in a resource group. - * - * @summary Gets all custom IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixList.json - */ -async function listResourceGroupCustomIPPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.customIPPrefixes.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listResourceGroupCustomIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesUpdateTagsSample.js deleted file mode 100644 index e0d6e7cfc1bd..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/customIPPrefixesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates custom IP prefix tags. - * - * @summary Updates custom IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixUpdateTags.json - */ -async function updatePublicIPAddressTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.updateTags( - resourceGroupName, - customIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main() { - await updatePublicIPAddressTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesCreateOrUpdateSample.js deleted file mode 100644 index 61d92d398e19..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a DDoS custom policy. - * - * @summary Creates or updates a DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyCreate.json - */ -async function createDDoSCustomPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const parameters = { - detectionRules: [ - { - name: "detectionRuleTcp", - detectionMode: "TrafficThreshold", - trafficDetectionRule: { packetsPerSecond: 1000000, trafficType: "Tcp" }, - }, - ], - location: "centraluseuap", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - ddosCustomPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await createDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesDeleteSample.js deleted file mode 100644 index 79aca61123cf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified DDoS custom policy. - * - * @summary Deletes the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyDelete.json - */ -async function deleteDDoSCustomPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.beginDeleteAndWait( - resourceGroupName, - ddosCustomPolicyName, - ); - console.log(result); -} - -async function main() { - await deleteDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesGetSample.js deleted file mode 100644 index d2409e78e8a8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified DDoS custom policy. - * - * @summary Gets information about the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyGet.json - */ -async function getDDoSCustomPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.get(resourceGroupName, ddosCustomPolicyName); - console.log(result); -} - -async function main() { - await getDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesUpdateTagsSample.js deleted file mode 100644 index c4f2e77293ee..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ddosCustomPoliciesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update a DDoS custom policy tags. - * - * @summary Update a DDoS custom policy tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyUpdateTags.json - */ -async function dDoSCustomPolicyUpdateTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.updateTags( - resourceGroupName, - ddosCustomPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await dDoSCustomPolicyUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansCreateOrUpdateSample.js deleted file mode 100644 index 9d4ba8143725..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansCreateOrUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a DDoS protection plan. - * - * @summary Creates or updates a DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanCreate.json - */ -async function createDDoSProtectionPlan() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const parameters = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.beginCreateOrUpdateAndWait( - resourceGroupName, - ddosProtectionPlanName, - parameters, - ); - console.log(result); -} - -async function main() { - await createDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansDeleteSample.js deleted file mode 100644 index 22cf8f297319..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified DDoS protection plan. - * - * @summary Deletes the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanDelete.json - */ -async function deleteDDoSProtectionPlan() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.beginDeleteAndWait( - resourceGroupName, - ddosProtectionPlanName, - ); - console.log(result); -} - -async function main() { - await deleteDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansGetSample.js b/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansGetSample.js deleted file mode 100644 index 600a39e873d8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified DDoS protection plan. - * - * @summary Gets information about the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanGet.json - */ -async function getDDoSProtectionPlan() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.get(resourceGroupName, ddosProtectionPlanName); - console.log(result); -} - -async function main() { - await getDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansListByResourceGroupSample.js deleted file mode 100644 index 0fc2c25e473f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the DDoS protection plans in a resource group. - * - * @summary Gets all the DDoS protection plans in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanList.json - */ -async function listDDoSProtectionPlansInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ddosProtectionPlans.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listDDoSProtectionPlansInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansListSample.js b/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansListSample.js deleted file mode 100644 index bba27de02e86..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all DDoS protection plans in a subscription. - * - * @summary Gets all DDoS protection plans in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanListAll.json - */ -async function listAllDDoSProtectionPlans() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ddosProtectionPlans.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllDDoSProtectionPlans(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansUpdateTagsSample.js deleted file mode 100644 index f9c190c7af96..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ddosProtectionPlansUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update a DDoS protection plan tags. - * - * @summary Update a DDoS protection plan tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanUpdateTags.json - */ -async function dDoSProtectionPlanUpdateTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.updateTags( - resourceGroupName, - ddosProtectionPlanName, - parameters, - ); - console.log(result); -} - -async function main() { - await dDoSProtectionPlanUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/defaultSecurityRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/defaultSecurityRulesGetSample.js deleted file mode 100644 index 91ccd4a084f4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/defaultSecurityRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified default network security rule. - * - * @summary Get the specified default network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DefaultSecurityRuleGet.json - */ -async function defaultSecurityRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkSecurityGroupName = "nsg1"; - const defaultSecurityRuleName = "AllowVnetInBound"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.defaultSecurityRules.get( - resourceGroupName, - networkSecurityGroupName, - defaultSecurityRuleName, - ); - console.log(result); -} - -async function main() { - await defaultSecurityRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/defaultSecurityRulesListSample.js b/sdk/network/arm-network/samples/v35/javascript/defaultSecurityRulesListSample.js deleted file mode 100644 index 57fc4165c6e5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/defaultSecurityRulesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all default security rules in a network security group. - * - * @summary Gets all default security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DefaultSecurityRuleList.json - */ -async function defaultSecurityRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkSecurityGroupName = "nsg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.defaultSecurityRules.list( - resourceGroupName, - networkSecurityGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await defaultSecurityRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/deleteBastionShareableLinkByTokenSample.js b/sdk/network/arm-network/samples/v35/javascript/deleteBastionShareableLinkByTokenSample.js deleted file mode 100644 index e42f097308ab..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/deleteBastionShareableLinkByTokenSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the Bastion Shareable Links for all the tokens specified in the request. - * - * @summary Deletes the Bastion Shareable Links for all the tokens specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkDeleteByToken.json - */ -async function deleteBastionShareableLinksForTheRequestVMS() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslTokenRequest = { - tokens: ["abcd1234-efgh-hijk-5678-abcdefgh1234", "dcba4321-hgfe-kjih-8765-hgfedcba4321"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginDeleteBastionShareableLinkByTokenAndWait( - resourceGroupName, - bastionHostName, - bslTokenRequest, - ); - console.log(result); -} - -async function main() { - await deleteBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/deleteBastionShareableLinkSample.js b/sdk/network/arm-network/samples/v35/javascript/deleteBastionShareableLinkSample.js deleted file mode 100644 index 33051569cde1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/deleteBastionShareableLinkSample.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Deletes the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkDelete.json - */ -async function deleteBastionShareableLinksForTheRequestVMS() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginDeleteBastionShareableLinkAndWait( - resourceGroupName, - bastionHostName, - bslRequest, - ); - console.log(result); -} - -async function main() { - await deleteBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/disconnectActiveSessionsSample.js b/sdk/network/arm-network/samples/v35/javascript/disconnectActiveSessionsSample.js deleted file mode 100644 index e6d500871937..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/disconnectActiveSessionsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. - * - * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionSessionDelete.json - */ -async function deletesTheSpecifiedActiveSession() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const sessionIds = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.listDisconnectActiveSessions( - resourceGroupName, - bastionHostName, - sessionIds, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await deletesTheSpecifiedActiveSession(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationCreateOrUpdateSample.js deleted file mode 100644 index 893fd3073321..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationCreateOrUpdateSample.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a DSCP Configuration. - * - * @summary Creates or updates a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationCreate.json - */ -async function createDscpConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpconfig"; - const parameters = { - location: "eastus", - qosDefinitionCollection: [ - { - destinationIpRanges: [{ endIP: "127.0.10.2", startIP: "127.0.10.1" }], - destinationPortRanges: [{ end: 15, start: 15 }], - markings: [1], - sourceIpRanges: [{ endIP: "127.0.0.2", startIP: "127.0.0.1" }], - sourcePortRanges: [ - { end: 11, start: 10 }, - { end: 21, start: 20 }, - ], - protocol: "Tcp", - }, - { - destinationIpRanges: [{ endIP: "12.0.10.2", startIP: "12.0.10.1" }], - destinationPortRanges: [{ end: 52, start: 51 }], - markings: [2], - sourceIpRanges: [{ endIP: "12.0.0.2", startIP: "12.0.0.1" }], - sourcePortRanges: [{ end: 12, start: 11 }], - protocol: "Udp", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - dscpConfigurationName, - parameters, - ); - console.log(result); -} - -async function main() { - await createDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationDeleteSample.js deleted file mode 100644 index 314da169f728..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a DSCP Configuration. - * - * @summary Deletes a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationDelete.json - */ -async function deleteDscpConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.beginDeleteAndWait( - resourceGroupName, - dscpConfigurationName, - ); - console.log(result); -} - -async function main() { - await deleteDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationGetSample.js b/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationGetSample.js deleted file mode 100644 index fbada9531451..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a DSCP Configuration. - * - * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationGet.json - */ -async function getDscpConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.get( - resourceGroupName, - dscpConfigurationName, - ); - console.log(result); -} - -async function main() { - await getDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationListAllSample.js deleted file mode 100644 index f5afd04a07de..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all dscp configurations in a subscription. - * - * @summary Gets all dscp configurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationListAll.json - */ -async function listAllNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.dscpConfigurationOperations.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationListSample.js b/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationListSample.js deleted file mode 100644 index 7bb5edecf3b4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/dscpConfigurationListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a DSCP Configuration. - * - * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationList.json - */ -async function getDscpConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.dscpConfigurationOperations.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js deleted file mode 100644 index 90f8568c5464..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an authorization in the specified express route circuit. - * - * @summary Creates or updates an authorization in the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationCreate.json - */ -async function createExpressRouteCircuitAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizatinName"; - const authorizationParameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitAuthorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - authorizationName, - authorizationParameters, - ); - console.log(result); -} - -async function main() { - await createExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsDeleteSample.js deleted file mode 100644 index 9eb9abfbdddf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified authorization from the specified express route circuit. - * - * @summary Deletes the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationDelete.json - */ -async function deleteExpressRouteCircuitAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitAuthorizations.beginDeleteAndWait( - resourceGroupName, - circuitName, - authorizationName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsGetSample.js deleted file mode 100644 index 0f84d9f6655c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified authorization from the specified express route circuit. - * - * @summary Gets the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationGet.json - */ -async function getExpressRouteCircuitAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitAuthorizations.get( - resourceGroupName, - circuitName, - authorizationName, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsListSample.js deleted file mode 100644 index 96e43e24b8af..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitAuthorizationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all authorizations in an express route circuit. - * - * @summary Gets all authorizations in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationList.json - */ -async function listExpressRouteCircuitAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitAuthorizations.list( - resourceGroupName, - circuitName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js deleted file mode 100644 index f9ab7fab8189..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @summary Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionCreate.json - */ -async function expressRouteCircuitConnectionCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const expressRouteCircuitConnectionParameters = { - addressPrefix: "10.0.0.0/29", - authorizationKey: "946a1918-b7a2-4917-b43c-8c4cdaee006a", - expressRouteCircuitPeering: { - id: "/subscriptions/subid1/resourceGroups/dedharcktinit/providers/Microsoft.Network/expressRouteCircuits/dedharcktlocal/peerings/AzurePrivatePeering", - }, - ipv6CircuitConnectionConfig: { addressPrefix: "aa:bb::/125" }, - peerExpressRouteCircuitPeering: { - id: "/subscriptions/subid2/resourceGroups/dedharcktpeer/providers/Microsoft.Network/expressRouteCircuits/dedharcktremote/peerings/AzurePrivatePeering", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - peeringName, - connectionName, - expressRouteCircuitConnectionParameters, - ); - console.log(result); -} - -async function main() { - await expressRouteCircuitConnectionCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsDeleteSample.js deleted file mode 100644 index b382c0141ff6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @summary Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionDelete.json - */ -async function deleteExpressRouteCircuit() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitConnections.beginDeleteAndWait( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsGetSample.js deleted file mode 100644 index e50e779f0860..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Express Route Circuit Connection from the specified express route circuit. - * - * @summary Gets the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionGet.json - */ -async function expressRouteCircuitConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitConnections.get( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main() { - await expressRouteCircuitConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsListSample.js deleted file mode 100644 index 4c7307736abd..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitConnectionsListSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all global reach connections associated with a private peering in an express route circuit. - * - * @summary Gets all global reach connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionList.json - */ -async function listExpressRouteCircuitConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitConnections.list( - resourceGroupName, - circuitName, - peeringName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteCircuitConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js deleted file mode 100644 index fd35833b7493..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a peering in the specified express route circuits. - * - * @summary Creates or updates a peering in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringCreate.json - */ -async function createExpressRouteCircuitPeerings() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "AzurePrivatePeering"; - const peeringParameters = { - peerASN: 200, - primaryPeerAddressPrefix: "192.168.16.252/30", - secondaryPeerAddressPrefix: "192.168.18.252/30", - vlanId: 200, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - peeringName, - peeringParameters, - ); - console.log(result); -} - -async function main() { - await createExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsDeleteSample.js deleted file mode 100644 index e10861fe9247..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified peering from the specified express route circuit. - * - * @summary Deletes the specified peering from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringDelete.json - */ -async function deleteExpressRouteCircuitPeerings() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitPeerings.beginDeleteAndWait( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsGetSample.js deleted file mode 100644 index b019e60a928c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified peering for the express route circuit. - * - * @summary Gets the specified peering for the express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringGet.json - */ -async function getExpressRouteCircuitPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "MicrosoftPeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitPeerings.get( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCircuitPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsListSample.js deleted file mode 100644 index e9daa46e4563..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitPeeringsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all peerings in a specified express route circuit. - * - * @summary Gets all peerings in a specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringList.json - */ -async function listExpressRouteCircuitPeerings() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitPeerings.list( - resourceGroupName, - circuitName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsCreateOrUpdateSample.js deleted file mode 100644 index a9356ea67cdf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsCreateOrUpdateSample.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an express route circuit. - * - * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitCreate.json - */ -async function createExpressRouteCircuit() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const parameters = { - allowClassicOperations: false, - authorizations: [], - location: "Brazil South", - peerings: [], - serviceProviderProperties: { - bandwidthInMbps: 200, - peeringLocation: "Silicon Valley", - serviceProviderName: "Equinix", - }, - sku: { - name: "Standard_MeteredData", - family: "MeteredData", - tier: "Standard", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an express route circuit. - * - * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json - */ -async function createExpressRouteCircuitOnExpressRoutePort() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "expressRouteCircuit1"; - const parameters = { - authorizationKey: "b0be57f5-1fba-463b-adec-ffe767354cdd", - bandwidthInGbps: 10, - enableDirectPortRateLimit: false, - expressRoutePort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRoutePorts/portName", - }, - location: "westus", - sku: { - name: "Premium_MeteredData", - family: "MeteredData", - tier: "Premium", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -async function main() { - await createExpressRouteCircuit(); - await createExpressRouteCircuitOnExpressRoutePort(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsDeleteSample.js deleted file mode 100644 index d004ae36cef1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified express route circuit. - * - * @summary Deletes the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitDelete.json - */ -async function deleteExpressRouteCircuit() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginDeleteAndWait( - resourceGroupName, - circuitName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetPeeringStatsSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetPeeringStatsSample.js deleted file mode 100644 index 8914fec911c7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetPeeringStatsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all stats from an express route circuit in a resource group. - * - * @summary Gets all stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringStats.json - */ -async function getExpressRouteCircuitPeeringTrafficStats() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.getPeeringStats( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCircuitPeeringTrafficStats(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetSample.js deleted file mode 100644 index 0f7155e21534..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified express route circuit. - * - * @summary Gets information about the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitGet.json - */ -async function getExpressRouteCircuit() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.get(resourceGroupName, circuitName); - console.log(result); -} - -async function main() { - await getExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetStatsSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetStatsSample.js deleted file mode 100644 index d8ee1e182bd3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsGetStatsSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the stats from an express route circuit in a resource group. - * - * @summary Gets all the stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitStats.json - */ -async function getExpressRouteCircuitTrafficStats() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.getStats(resourceGroupName, circuitName); - console.log(result); -} - -async function main() { - await getExpressRouteCircuitTrafficStats(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListAllSample.js deleted file mode 100644 index 37e606fd4dae..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the express route circuits in a subscription. - * - * @summary Gets all the express route circuits in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitListBySubscription.json - */ -async function listExpressRouteCircuitsInASubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuits.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteCircuitsInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListArpTableSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListArpTableSample.js deleted file mode 100644 index 58e88bb84c5a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListArpTableSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitARPTableList.json - */ -async function listArpTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListArpTableAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await listArpTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListRoutesTableSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListRoutesTableSample.js deleted file mode 100644 index 7b2e5638c177..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListRoutesTableSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the currently advertised routes table associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised routes table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitRouteTableList.json - */ -async function listRouteTables() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListRoutesTableAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await listRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListRoutesTableSummarySample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListRoutesTableSummarySample.js deleted file mode 100644 index e2b2daeb7f59..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListRoutesTableSummarySample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitRouteTableSummaryList.json - */ -async function listRouteTableSummary() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListRoutesTableSummaryAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await listRouteTableSummary(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListSample.js deleted file mode 100644 index f383a1b13682..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the express route circuits in a resource group. - * - * @summary Gets all the express route circuits in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitListByResourceGroup.json - */ -async function listExpressRouteCircuitsInAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuits.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteCircuitsInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsUpdateTagsSample.js deleted file mode 100644 index ac132362b79e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCircuitsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an express route circuit tags. - * - * @summary Updates an express route circuit tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitUpdateTags.json - */ -async function updateExpressRouteCircuitTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "ertest"; - const circuitName = "er1"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.updateTags( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateExpressRouteCircuitTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 5cb72555ebf4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * - * @summary Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionCreate.json - */ -async function expressRouteConnectionCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "gateway-2"; - const connectionName = "connectionName"; - const putExpressRouteConnectionParameters = { - name: "connectionName", - authorizationKey: "authorizationKey", - expressRouteCircuitPeering: { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering", - }, - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/gateway-2/expressRouteConnections/connectionName", - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - }, - routingWeight: 2, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRouteGatewayName, - connectionName, - putExpressRouteConnectionParameters, - ); - console.log(result); -} - -async function main() { - await expressRouteConnectionCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsDeleteSample.js deleted file mode 100644 index 073d8ef964f2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a connection to a ExpressRoute circuit. - * - * @summary Deletes a connection to a ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionDelete.json - */ -async function expressRouteConnectionDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const connectionName = "connectionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.beginDeleteAndWait( - resourceGroupName, - expressRouteGatewayName, - connectionName, - ); - console.log(result); -} - -async function main() { - await expressRouteConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsGetSample.js deleted file mode 100644 index a8973a7f6025..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified ExpressRouteConnection. - * - * @summary Gets the specified ExpressRouteConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionGet.json - */ -async function expressRouteConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const connectionName = "connectionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.get( - resourceGroupName, - expressRouteGatewayName, - connectionName, - ); - console.log(result); -} - -async function main() { - await expressRouteConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsListSample.js deleted file mode 100644 index 8e7bceea8d9e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteConnectionsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists ExpressRouteConnections. - * - * @summary Lists ExpressRouteConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionList.json - */ -async function expressRouteConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.list( - resourceGroupName, - expressRouteGatewayName, - ); - console.log(result); -} - -async function main() { - await expressRouteConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js deleted file mode 100644 index 2d26706b3a61..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @summary Creates or updates a peering in the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json - */ -async function expressRouteCrossConnectionBgpPeeringCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const peeringParameters = { - ipv6PeeringConfig: { - primaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::/126", - secondaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::4/126", - }, - peerASN: 200, - primaryPeerAddressPrefix: "192.168.16.252/30", - secondaryPeerAddressPrefix: "192.168.18.252/30", - vlanId: 200, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnectionPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - peeringParameters, - ); - console.log(result); -} - -async function main() { - await expressRouteCrossConnectionBgpPeeringCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js deleted file mode 100644 index ebe718c6dc5c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @summary Deletes the specified peering from the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json - */ -async function deleteExpressRouteCrossConnectionBgpPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnectionPeerings.beginDeleteAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRouteCrossConnectionBgpPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsGetSample.js deleted file mode 100644 index 101fd40ef991..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified peering for the ExpressRouteCrossConnection. - * - * @summary Gets the specified peering for the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json - */ -async function getExpressRouteCrossConnectionBgpPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnectionPeerings.get( - resourceGroupName, - crossConnectionName, - peeringName, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCrossConnectionBgpPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsListSample.js deleted file mode 100644 index 56805b9eeb1a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionPeeringsListSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @summary Gets all peerings in a specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json - */ -async function expressRouteCrossConnectionBgpPeeringList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnectionPeerings.list( - resourceGroupName, - crossConnectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRouteCrossConnectionBgpPeeringList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 0e7bd0835d3e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update the specified ExpressRouteCrossConnection. - * - * @summary Update the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionUpdate.json - */ -async function updateExpressRouteCrossConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const parameters = { - serviceProviderProvisioningState: "NotProvisioned", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - crossConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateExpressRouteCrossConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsGetSample.js deleted file mode 100644 index 9dcc9de4849f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsGetSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets details about the specified ExpressRouteCrossConnection. - * - * @summary Gets details about the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionGet.json - */ -async function getExpressRouteCrossConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.get( - resourceGroupName, - crossConnectionName, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCrossConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListArpTableSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListArpTableSample.js deleted file mode 100644 index 531c669aabd8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListArpTableSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @summary Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsArpTable.json - */ -async function getExpressRouteCrossConnectionsArpTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.beginListArpTableAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCrossConnectionsArpTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js deleted file mode 100644 index a4fd99bdc01d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @summary Retrieves all the ExpressRouteCrossConnections in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json - */ -async function expressRouteCrossConnectionListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnections.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRouteCrossConnectionListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListRoutesTableSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListRoutesTableSample.js deleted file mode 100644 index 2b898461c45f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListRoutesTableSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @summary Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsRouteTable.json - */ -async function getExpressRouteCrossConnectionsRouteTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.beginListRoutesTableAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCrossConnectionsRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js deleted file mode 100644 index 16c087b57545..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the route table summary associated with the express route cross connection in a resource group. - * - * @summary Gets the route table summary associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json - */ -async function getExpressRouteCrossConnectionsRouteTableSummary() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.beginListRoutesTableSummaryAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCrossConnectionsRouteTableSummary(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListSample.js deleted file mode 100644 index f86a3f6bbdc8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @summary Retrieves all the ExpressRouteCrossConnections in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionList.json - */ -async function expressRouteCrossConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnections.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRouteCrossConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsUpdateTagsSample.js deleted file mode 100644 index e36444d375c7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteCrossConnectionsUpdateTagsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an express route cross connection tags. - * - * @summary Updates an express route cross connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionUpdateTags.json - */ -async function updateExpressRouteCrossConnectionTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const crossConnectionParameters = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.updateTags( - resourceGroupName, - crossConnectionName, - crossConnectionParameters, - ); - console.log(result); -} - -async function main() { - await updateExpressRouteCrossConnectionTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysCreateOrUpdateSample.js deleted file mode 100644 index f5e213fe9946..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a ExpressRoute gateway in a specified resource group. - * - * @summary Creates or updates a ExpressRoute gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayCreate.json - */ -async function expressRouteGatewayCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "gateway-2"; - const putExpressRouteGatewayParameters = { - allowNonVirtualWanTraffic: false, - autoScaleConfiguration: { bounds: { min: 3 } }, - location: "westus", - virtualHub: { - id: "/subscriptions/subid/resourceGroups/resourceGroupId/providers/Microsoft.Network/virtualHubs/virtualHubName", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRouteGatewayName, - putExpressRouteGatewayParameters, - ); - console.log(result); -} - -async function main() { - await expressRouteGatewayCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysDeleteSample.js deleted file mode 100644 index 826477e7104d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * - * @summary Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayDelete.json - */ -async function expressRouteGatewayDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginDeleteAndWait( - resourceGroupName, - expressRouteGatewayName, - ); - console.log(result); -} - -async function main() { - await expressRouteGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysGetSample.js deleted file mode 100644 index 03cef793c49e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Fetches the details of a ExpressRoute gateway in a resource group. - * - * @summary Fetches the details of a ExpressRoute gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayGet.json - */ -async function expressRouteGatewayGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.get(resourceGroupName, expressRouteGatewayName); - console.log(result); -} - -async function main() { - await expressRouteGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysListByResourceGroupSample.js deleted file mode 100644 index 624e22ea28ee..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysListByResourceGroupSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists ExpressRoute gateways in a given resource group. - * - * @summary Lists ExpressRoute gateways in a given resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayListByResourceGroup.json - */ -async function expressRouteGatewayListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.listByResourceGroup(resourceGroupName); - console.log(result); -} - -async function main() { - await expressRouteGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysListBySubscriptionSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysListBySubscriptionSample.js deleted file mode 100644 index 33d8e04eb283..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysListBySubscriptionSample.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists ExpressRoute gateways under a given subscription. - * - * @summary Lists ExpressRoute gateways under a given subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayListBySubscription.json - */ -async function expressRouteGatewayListBySubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.listBySubscription(); - console.log(result); -} - -async function main() { - await expressRouteGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysUpdateTagsSample.js deleted file mode 100644 index a6f2f2415999..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates express route gateway tags. - * - * @summary Updates express route gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayUpdateTags.json - */ -async function expressRouteGatewayUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const expressRouteGatewayParameters = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginUpdateTagsAndWait( - resourceGroupName, - expressRouteGatewayName, - expressRouteGatewayParameters, - ); - console.log(result); -} - -async function main() { - await expressRouteGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteLinksGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteLinksGetSample.js deleted file mode 100644 index c4cd6d4e3be9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteLinksGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the specified ExpressRouteLink resource. - * - * @summary Retrieves the specified ExpressRouteLink resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteLinkGet.json - */ -async function expressRouteLinkGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const linkName = "linkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteLinks.get( - resourceGroupName, - expressRoutePortName, - linkName, - ); - console.log(result); -} - -async function main() { - await expressRouteLinkGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteLinksListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteLinksListSample.js deleted file mode 100644 index cca8839af18a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteLinksListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * - * @summary Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteLinkList.json - */ -async function expressRouteLinkGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteLinks.list(resourceGroupName, expressRoutePortName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRouteLinkGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js deleted file mode 100644 index a1db987e691c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an authorization in the specified express route port. - * - * @summary Creates or updates an authorization in the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationCreate.json - */ -async function createExpressRoutePortAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizatinName"; - const authorizationParameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortAuthorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - authorizationName, - authorizationParameters, - ); - console.log(result); -} - -async function main() { - await createExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsDeleteSample.js deleted file mode 100644 index 8dfb736614e6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified authorization from the specified express route port. - * - * @summary Deletes the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationDelete.json - */ -async function deleteExpressRoutePortAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortAuthorizations.beginDeleteAndWait( - resourceGroupName, - expressRoutePortName, - authorizationName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsGetSample.js deleted file mode 100644 index 61dae8c04309..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified authorization from the specified express route port. - * - * @summary Gets the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationGet.json - */ -async function getExpressRoutePortAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortAuthorizations.get( - resourceGroupName, - expressRoutePortName, - authorizationName, - ); - console.log(result); -} - -async function main() { - await getExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsListSample.js deleted file mode 100644 index 674cbd8e8020..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortAuthorizationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all authorizations in an express route port. - * - * @summary Gets all authorizations in an express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationList.json - */ -async function listExpressRoutePortAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePortAuthorizations.list( - resourceGroupName, - expressRoutePortName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsCreateOrUpdateSample.js deleted file mode 100644 index ee2d11587869..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsCreateOrUpdateSample.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. - * - * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortCreate.json - */ -async function expressRoutePortCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters = { - bandwidthInGbps: 100, - billingType: "UnlimitedData", - encapsulation: "QinQ", - location: "westus", - peeringLocation: "peeringLocationName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. - * - * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortUpdateLink.json - */ -async function expressRoutePortUpdateLink() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters = { - bandwidthInGbps: 100, - billingType: "UnlimitedData", - encapsulation: "QinQ", - links: [{ name: "link1", adminState: "Enabled" }], - location: "westus", - peeringLocation: "peeringLocationName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -async function main() { - await expressRoutePortCreate(); - await expressRoutePortUpdateLink(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsDeleteSample.js deleted file mode 100644 index df2df6a449f2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified ExpressRoutePort resource. - * - * @summary Deletes the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortDelete.json - */ -async function expressRoutePortDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginDeleteAndWait( - resourceGroupName, - expressRoutePortName, - ); - console.log(result); -} - -async function main() { - await expressRoutePortDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsGenerateLoaSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsGenerateLoaSample.js deleted file mode 100644 index c76765015984..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsGenerateLoaSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Generate a letter of authorization for the requested ExpressRoutePort resource. - * - * @summary Generate a letter of authorization for the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GenerateExpressRoutePortsLOA.json - */ -async function generateExpressRoutePortLoa() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const request = { - customerName: "customerName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.generateLOA( - resourceGroupName, - expressRoutePortName, - request, - ); - console.log(result); -} - -async function main() { - await generateExpressRoutePortLoa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsGetSample.js deleted file mode 100644 index c6d0a1e446e0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the requested ExpressRoutePort resource. - * - * @summary Retrieves the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortGet.json - */ -async function expressRoutePortGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.get(resourceGroupName, expressRoutePortName); - console.log(result); -} - -async function main() { - await expressRoutePortGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsListByResourceGroupSample.js deleted file mode 100644 index 0fb331402044..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all the ExpressRoutePort resources in the specified resource group. - * - * @summary List all the ExpressRoutePort resources in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortListByResourceGroup.json - */ -async function expressRoutePortListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePorts.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRoutePortListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsListSample.js deleted file mode 100644 index f48a0007d99a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all the ExpressRoutePort resources in the specified subscription. - * - * @summary List all the ExpressRoutePort resources in the specified subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortList.json - */ -async function expressRoutePortList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePorts.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRoutePortList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsLocationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsLocationsGetSample.js deleted file mode 100644 index b2e0abdfab0a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsLocationsGetSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * - * @summary Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortsLocationGet.json - */ -async function expressRoutePortsLocationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const locationName = "locationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortsLocations.get(locationName); - console.log(result); -} - -async function main() { - await expressRoutePortsLocationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsLocationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsLocationsListSample.js deleted file mode 100644 index f720738a839e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsLocationsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * - * @summary Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortsLocationList.json - */ -async function expressRoutePortsLocationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePortsLocations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRoutePortsLocationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsUpdateTagsSample.js deleted file mode 100644 index c34bf29ba283..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRoutePortsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update ExpressRoutePort tags. - * - * @summary Update ExpressRoutePort tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortUpdateTags.json - */ -async function expressRoutePortUpdateTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.updateTags( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -async function main() { - await expressRoutePortUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteProviderPortSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteProviderPortSample.js deleted file mode 100644 index be6c8a382d8f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteProviderPortSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves detail of a provider port. - * - * @summary Retrieves detail of a provider port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/expressRouteProviderPort.json - */ -async function expressRouteProviderPort() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const providerport = "abc"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteProviderPort(providerport); - console.log(result); -} - -async function main() { - await expressRouteProviderPort(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteProviderPortsLocationListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteProviderPortsLocationListSample.js deleted file mode 100644 index 03a12d1b6229..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteProviderPortsLocationListSample.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteProviderPorts in a subscription. - * - * @summary Retrieves all the ExpressRouteProviderPorts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/expressRouteProviderPortList.json - */ -async function expressRouteProviderPortList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteProviderPortsLocation.list(); - console.log(result); -} - -async function main() { - await expressRouteProviderPortList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/expressRouteServiceProvidersListSample.js b/sdk/network/arm-network/samples/v35/javascript/expressRouteServiceProvidersListSample.js deleted file mode 100644 index 0f034ff94cb0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/expressRouteServiceProvidersListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the available express route service providers. - * - * @summary Gets all the available express route service providers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteProviderList.json - */ -async function listExpressRouteProviders() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteServiceProviders.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteProviders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesCreateOrUpdateSample.js deleted file mode 100644 index c684d2359558..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Firewall Policy. - * - * @summary Creates or updates the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyPut.json - */ -async function createFirewallPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - dnsSettings: { - enableProxy: true, - requireProxyForNetworkRules: false, - servers: ["30.3.4.5"], - }, - explicitProxy: { - enableExplicitProxy: true, - enablePacFile: true, - httpPort: 8087, - httpsPort: 8087, - pacFile: - "https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D", - pacFilePort: 8087, - }, - insights: { - isEnabled: true, - logAnalyticsResources: { - defaultWorkspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", - }, - workspaces: [ - { - region: "westus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", - }, - }, - { - region: "eastus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", - }, - }, - ], - }, - retentionDays: 100, - }, - intrusionDetection: { - configuration: { - bypassTrafficSettings: [ - { - name: "bypassRule1", - description: "Rule 1", - destinationAddresses: ["5.6.7.8"], - destinationPorts: ["*"], - sourceAddresses: ["1.2.3.4"], - protocol: "TCP", - }, - ], - signatureOverrides: [{ id: "2525004", mode: "Deny" }], - }, - mode: "Alert", - profile: "Balanced", - }, - location: "West US", - sku: { tier: "Premium" }, - snat: { privateRanges: ["IANAPrivateRanges"] }, - sql: { allowSqlRedirect: true }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - threatIntelWhitelist: { - fqdns: ["*.microsoft.com"], - ipAddresses: ["20.3.4.5"], - }, - transportSecurity: { - certificateAuthority: { - name: "clientcert", - keyVaultSecretId: "https://kv/secret", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await createFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesDeleteSample.js deleted file mode 100644 index 833430e5af3f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Firewall Policy. - * - * @summary Deletes the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDelete.json - */ -async function deleteFirewallPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.beginDeleteAndWait( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main() { - await deleteFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesGetSample.js deleted file mode 100644 index c6c65c6d41ca..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Firewall Policy. - * - * @summary Gets the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyGet.json - */ -async function getFirewallPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.get(resourceGroupName, firewallPolicyName); - console.log(result); -} - -async function main() { - await getFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesListAllSample.js deleted file mode 100644 index 332f5d93aea7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Firewall Policies in a subscription. - * - * @summary Gets all the Firewall Policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyListBySubscription.json - */ -async function listAllFirewallPoliciesForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicies.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllFirewallPoliciesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesListSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesListSample.js deleted file mode 100644 index 488a095dae00..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Firewall Policies in a resource group. - * - * @summary Lists all Firewall Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyListByResourceGroup.json - */ -async function listAllFirewallPoliciesForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicies.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllFirewallPoliciesForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesUpdateTagsSample.js deleted file mode 100644 index 77342a79daca..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPoliciesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of a Azure Firewall Policy resource. - * - * @summary Updates tags of a Azure Firewall Policy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyPatch.json - */ -async function updateFirewallPolicyTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.updateTags( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateFirewallPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDeploymentsDeploySample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDeploymentsDeploySample.js deleted file mode 100644 index deb234504448..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDeploymentsDeploySample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deploys the firewall policy draft and child rule collection group drafts. - * - * @summary Deploys the firewall policy draft and child rule collection group drafts. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftDeploy.json - */ -async function deployFirewallPolicyDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDeployments.beginDeployAndWait( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main() { - await deployFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsCreateOrUpdateSample.js deleted file mode 100644 index d3444e0d700f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsCreateOrUpdateSample.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or update a draft Firewall Policy. - * - * @summary Create or update a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftPut.json - */ -async function createOrUpdateFirewallPolicyDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - dnsSettings: { - enableProxy: true, - requireProxyForNetworkRules: false, - servers: ["30.3.4.5"], - }, - explicitProxy: { - enableExplicitProxy: true, - enablePacFile: true, - httpPort: 8087, - httpsPort: 8087, - pacFile: - "https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D", - pacFilePort: 8087, - }, - insights: { - isEnabled: true, - logAnalyticsResources: { - defaultWorkspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", - }, - workspaces: [ - { - region: "westus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", - }, - }, - { - region: "eastus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", - }, - }, - ], - }, - retentionDays: 100, - }, - intrusionDetection: { - configuration: { - bypassTrafficSettings: [ - { - name: "bypassRule1", - description: "Rule 1", - destinationAddresses: ["5.6.7.8"], - destinationPorts: ["*"], - sourceAddresses: ["1.2.3.4"], - protocol: "TCP", - }, - ], - signatureOverrides: [{ id: "2525004", mode: "Deny" }], - }, - mode: "Alert", - profile: "Balanced", - }, - snat: { privateRanges: ["IANAPrivateRanges"] }, - sql: { allowSqlRedirect: true }, - threatIntelMode: "Alert", - threatIntelWhitelist: { - fqdns: ["*.microsoft.com"], - ipAddresses: ["20.3.4.5"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.createOrUpdate( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsDeleteSample.js deleted file mode 100644 index 193db7661da9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete a draft policy. - * - * @summary Delete a draft policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftDelete.json - */ -async function deleteFirewallPolicyDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.delete(resourceGroupName, firewallPolicyName); - console.log(result); -} - -async function main() { - await deleteFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsGetSample.js deleted file mode 100644 index 2c39afc4df07..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyDraftsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get a draft Firewall Policy. - * - * @summary Get a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftGet.json - */ -async function getFirewallPolicyDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.get(resourceGroupName, firewallPolicyName); - console.log(result); -} - -async function main() { - await getFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js deleted file mode 100644 index a22570728c3c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the current filter values for the signatures overrides - * - * @summary Retrieves the current filter values for the signatures overrides - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json - */ -async function querySignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - filterName: "severity", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesFilterValues.list( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await querySignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesListSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesListSample.js deleted file mode 100644 index 1732aee15074..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesListSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * - * @summary Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyQuerySignatureOverrides.json - */ -async function querySignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - filters: [{ field: "Mode", values: ["Deny"] }], - orderBy: { field: "severity", order: "Ascending" }, - resultsPerPage: 20, - search: "", - skip: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignatures.list( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await querySignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js deleted file mode 100644 index e63106cc9578..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all signatures overrides for a specific policy. - * - * @summary Returns all signatures overrides for a specific policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesGet.json - */ -async function getSignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.get( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main() { - await getSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js deleted file mode 100644 index 3d948b41e78b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all signatures overrides objects for a specific policy as a list containing a single value. - * - * @summary Returns all signatures overrides objects for a specific policy as a list containing a single value. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesList.json - */ -async function getSignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.list( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main() { - await getSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js deleted file mode 100644 index 9021a8ae4832..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Will update the status of policy's signature overrides for IDPS - * - * @summary Will update the status of policy's signature overrides for IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesPatch.json - */ -async function patchSignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - name: "default", - type: "Microsoft.Network/firewallPolicies/signatureOverrides", - id: "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", - properties: { signatures: { 2000105: "Off", 2000106: "Deny" } }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.patch( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await patchSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js deleted file mode 100644 index e7b516f9d8f7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Will override/create a new signature overrides for the policy's IDPS - * - * @summary Will override/create a new signature overrides for the policy's IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesPut.json - */ -async function putSignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - name: "default", - type: "Microsoft.Network/firewallPolicies/signatureOverrides", - id: "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", - properties: { signatures: { 2000105: "Off", 2000106: "Deny" } }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.put( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await putSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js deleted file mode 100644 index f505f888af27..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or Update Rule Collection Group Draft. - * - * @summary Create or Update Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json - */ -async function createOrUpdateRuleCollectionGroupDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 100, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - priority: 100, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-rule1", - destinationAddresses: ["*"], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceAddresses: ["10.1.25.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroupDrafts.createOrUpdate( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js deleted file mode 100644 index 0ef8ed6418a6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete Rule Collection Group Draft. - * - * @summary Delete Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json - */ -async function deleteFirewallRuleCollectionGroupDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroupDrafts.delete( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main() { - await deleteFirewallRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js deleted file mode 100644 index 790d46383a3f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get Rule Collection Group Draft. - * - * @summary Get Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json - */ -async function getRuleCollectionGroupDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroupDrafts.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main() { - await getRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js deleted file mode 100644 index 30d4f70499cf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json - */ -async function createFirewallPolicyNatRuleCollectionGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 100, - ruleCollections: [ - { - name: "Example-Nat-Rule-Collection", - action: { type: "DNAT" }, - priority: 100, - ruleCollectionType: "FirewallPolicyNatRuleCollection", - rules: [ - { - name: "nat-rule1", - destinationAddresses: ["152.23.32.23"], - destinationPorts: ["8080"], - ipProtocols: ["TCP", "UDP"], - ruleType: "NatRule", - sourceAddresses: ["2.2.2.2"], - sourceIpGroups: [], - translatedFqdn: "internalhttp.server.net", - translatedPort: "8080", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupPut.json - */ -async function createFirewallPolicyRuleCollectionGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 100, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - priority: 100, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-rule1", - destinationAddresses: ["*"], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceAddresses: ["10.1.25.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json - */ -async function createFirewallPolicyRuleCollectionGroupWithIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-1", - destinationIpGroups: [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups2", - ], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceIpGroups: [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups1", - ], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json - */ -async function createFirewallPolicyRuleCollectionGroupWithWebCategories() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - ruleType: "ApplicationRule", - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - webCategories: ["Hacking"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json - */ -async function createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Allow" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "rule1", - description: "Insert trusted tenants header", - fqdnTags: ["WindowsVirtualDesktop"], - httpHeadersToInsert: [ - { - headerName: "Restrict-Access-To-Tenants", - headerValue: "contoso.com,fabrikam.onmicrosoft.com", - }, - ], - protocols: [{ port: 80, protocolType: "Http" }], - ruleType: "ApplicationRule", - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await createFirewallPolicyNatRuleCollectionGroup(); - await createFirewallPolicyRuleCollectionGroup(); - await createFirewallPolicyRuleCollectionGroupWithIPGroups(); - await createFirewallPolicyRuleCollectionGroupWithWebCategories(); - await createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js deleted file mode 100644 index c6a9c2cb947a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Deletes the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDelete.json - */ -async function deleteFirewallPolicyRuleCollectionGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginDeleteAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main() { - await deleteFirewallPolicyRuleCollectionGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsGetSample.js deleted file mode 100644 index b2a5bd30e5f7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsGetSample.js +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json - */ -async function getFirewallPolicyNatRuleCollectionGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupGet.json - */ -async function getFirewallPolicyRuleCollectionGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json - */ -async function getFirewallPolicyRuleCollectionGroupWithIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json - */ -async function getFirewallPolicyRuleCollectionGroupWithWebCategories() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main() { - await getFirewallPolicyNatRuleCollectionGroup(); - await getFirewallPolicyRuleCollectionGroup(); - await getFirewallPolicyRuleCollectionGroupWithIPGroups(); - await getFirewallPolicyRuleCollectionGroupWithWebCategories(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsListSample.js b/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsListSample.js deleted file mode 100644 index a0a074cf6453..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/firewallPolicyRuleCollectionGroupsListSample.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllFirewallPolicyRuleCollectionGroupWithWebCategories(); - await listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy(); - await listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/flowLogsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/flowLogsCreateOrUpdateSample.js deleted file mode 100644 index 18fbfbb2b0b2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/flowLogsCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or update a flow log for the specified network security group. - * - * @summary Create or update a flow log for the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogCreate.json - */ -async function createOrUpdateFlowLog() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "fl"; - const parameters = { - format: { type: "JSON", version: 1 }, - enabled: true, - enabledFilteringCriteria: "srcIP=158.255.7.8 || dstPort=56891", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": - {}, - }, - }, - location: "centraluseuap", - recordTypes: "B,E", - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/flowLogsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/flowLogsDeleteSample.js deleted file mode 100644 index 49948661e5ec..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/flowLogsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified flow log resource. - * - * @summary Deletes the specified flow log resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogDelete.json - */ -async function deleteFlowLog() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "fl"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - flowLogName, - ); - console.log(result); -} - -async function main() { - await deleteFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/flowLogsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/flowLogsGetSample.js deleted file mode 100644 index 89fba01705bd..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/flowLogsGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a flow log resource by name. - * - * @summary Gets a flow log resource by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogGet.json - */ -async function getFlowLog() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "flowLog1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.get(resourceGroupName, networkWatcherName, flowLogName); - console.log(result); -} - -async function main() { - await getFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/flowLogsListSample.js b/sdk/network/arm-network/samples/v35/javascript/flowLogsListSample.js deleted file mode 100644 index b2299bfdfad9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/flowLogsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all flow log resources for the specified Network Watcher. - * - * @summary Lists all flow log resources for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogList.json - */ -async function listConnectionMonitors() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.flowLogs.list(resourceGroupName, networkWatcherName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listConnectionMonitors(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/flowLogsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/flowLogsUpdateTagsSample.js deleted file mode 100644 index 10983e5b52e7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/flowLogsUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update tags of the specified flow log. - * - * @summary Update tags of the specified flow log. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogUpdateTags.json - */ -async function updateFlowLogTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw"; - const flowLogName = "fl"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.updateTags( - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateFlowLogTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js b/sdk/network/arm-network/samples/v35/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js deleted file mode 100644 index 0508cca585e7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * - * @summary Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json - */ -async function generateVirtualWanVpnServerConfigurationVpnProfile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const vpnClientParams = { - authenticationMethod: "EAPTLS", - vpnServerConfigurationResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnconfig1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginGeneratevirtualwanvpnserverconfigurationvpnprofileAndWait( - resourceGroupName, - virtualWANName, - vpnClientParams, - ); - console.log(result); -} - -async function main() { - await generateVirtualWanVpnServerConfigurationVpnProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/getActiveSessionsSample.js b/sdk/network/arm-network/samples/v35/javascript/getActiveSessionsSample.js deleted file mode 100644 index 925e749f4ba7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/getActiveSessionsSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. - * - * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionSessionsList.json - */ -async function returnsAListOfCurrentlyActiveSessionsOnTheBastion() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.beginListActiveSessionsAndWait( - resourceGroupName, - bastionHostName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await returnsAListOfCurrentlyActiveSessionsOnTheBastion(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/getBastionShareableLinkSample.js b/sdk/network/arm-network/samples/v35/javascript/getBastionShareableLinkSample.js deleted file mode 100644 index 26cd81e998d9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/getBastionShareableLinkSample.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Return the Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Return the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkGet.json - */ -async function returnsTheBastionShareableLinksForTheRequestVMS() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.listBastionShareableLink( - resourceGroupName, - bastionHostName, - bslRequest, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await returnsTheBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesCreateOrUpdateSample.js deleted file mode 100644 index 7479806d2902..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * - * @summary Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTablePut.json - */ -async function routeTablePut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const routeTableParameters = { - labels: ["label1", "label2"], - routes: [ - { - name: "route1", - destinationType: "CIDR", - destinations: ["10.0.0.0/8", "20.0.0.0/8", "30.0.0.0/8"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1", - nextHopType: "ResourceId", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - routeTableParameters, - ); - console.log(result); -} - -async function main() { - await routeTablePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesDeleteSample.js deleted file mode 100644 index 46100634ee18..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a RouteTable. - * - * @summary Deletes a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableDelete.json - */ -async function routeTableDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main() { - await routeTableDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesGetSample.js deleted file mode 100644 index 4bd8302017c7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a RouteTable. - * - * @summary Retrieves the details of a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableGet.json - */ -async function routeTableGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.get(resourceGroupName, virtualHubName, routeTableName); - console.log(result); -} - -async function main() { - await routeTableGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesListSample.js b/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesListSample.js deleted file mode 100644 index e2ccfcaa0862..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/hubRouteTablesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all RouteTables. - * - * @summary Retrieves the details of all RouteTables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableList.json - */ -async function routeTableList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.hubRouteTables.list(resourceGroupName, virtualHubName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routeTableList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 45ca3fa8a185..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * - * @summary Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionPut.json - */ -async function hubVirtualNetworkConnectionPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const hubVirtualNetworkConnectionParameters = { - enableInternetSecurity: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/SpokeVnet1", - }, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - ], - labels: ["label1", "label2"], - }, - vnetRoutes: { - staticRoutes: [ - { - name: "route1", - addressPrefixes: ["10.1.0.0/16", "10.2.0.0/16"], - nextHopIpAddress: "10.0.0.68", - }, - { - name: "route2", - addressPrefixes: ["10.3.0.0/16", "10.4.0.0/16"], - nextHopIpAddress: "10.0.0.65", - }, - ], - staticRoutesConfig: { vnetLocalRouteOverrideCriteria: "Equal" }, - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - connectionName, - hubVirtualNetworkConnectionParameters, - ); - console.log(result); -} - -async function main() { - await hubVirtualNetworkConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsDeleteSample.js deleted file mode 100644 index ebe5b340e60b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a HubVirtualNetworkConnection. - * - * @summary Deletes a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionDelete.json - */ -async function hubVirtualNetworkConnectionDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await hubVirtualNetworkConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsGetSample.js deleted file mode 100644 index f6168f0185c6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a HubVirtualNetworkConnection. - * - * @summary Retrieves the details of a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionGet.json - */ -async function hubVirtualNetworkConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.get( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await hubVirtualNetworkConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsListSample.js deleted file mode 100644 index df6de66eb845..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/hubVirtualNetworkConnectionsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all HubVirtualNetworkConnections. - * - * @summary Retrieves the details of all HubVirtualNetworkConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionList.json - */ -async function hubVirtualNetworkConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.hubVirtualNetworkConnections.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await hubVirtualNetworkConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesCreateOrUpdateSample.js deleted file mode 100644 index d03b9140b965..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a load balancer inbound NAT rule. - * - * @summary Creates or updates a load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleCreate.json - */ -async function inboundNatRuleCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const inboundNatRuleParameters = { - backendPort: 3389, - enableFloatingIP: false, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/ip1", - }, - frontendPort: 3390, - idleTimeoutInMinutes: 4, - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - inboundNatRuleParameters, - ); - console.log(result); -} - -async function main() { - await inboundNatRuleCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesDeleteSample.js deleted file mode 100644 index 79d8403beb92..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified load balancer inbound NAT rule. - * - * @summary Deletes the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleDelete.json - */ -async function inboundNatRuleDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - ); - console.log(result); -} - -async function main() { - await inboundNatRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesGetSample.js deleted file mode 100644 index 507e5c0d6f23..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified load balancer inbound NAT rule. - * - * @summary Gets the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleGet.json - */ -async function inboundNatRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.get( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - ); - console.log(result); -} - -async function main() { - await inboundNatRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesListSample.js b/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesListSample.js deleted file mode 100644 index 29c6dd17052e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/inboundNatRulesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the inbound NAT rules in a load balancer. - * - * @summary Gets all the inbound NAT rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleList.json - */ -async function inboundNatRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.inboundNatRules.list(resourceGroupName, loadBalancerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await inboundNatRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/inboundSecurityRuleCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/inboundSecurityRuleCreateOrUpdateSample.js deleted file mode 100644 index 78c0716ff4e7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/inboundSecurityRuleCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * - * @summary Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundSecurityRulePut.json - */ -async function createNetworkVirtualApplianceInboundSecurityRules() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const ruleCollectionName = "rule1"; - const parameters = { - ruleType: "Permanent", - rules: [ - { - name: "inboundRule1", - appliesOn: ["slbip1"], - destinationPortRange: 22, - destinationPortRanges: ["80-100"], - sourceAddressPrefix: "50.20.121.5/32", - protocol: "TCP", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundSecurityRuleOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkVirtualApplianceInboundSecurityRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/inboundSecurityRuleGetSample.js b/sdk/network/arm-network/samples/v35/javascript/inboundSecurityRuleGetSample.js deleted file mode 100644 index 23c12870e1b1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/inboundSecurityRuleGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * - * @summary Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundSecurityRuleGet.json - */ -async function createNetworkVirtualApplianceInboundSecurityRules() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const ruleCollectionName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundSecurityRuleOperations.get( - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - ); - console.log(result); -} - -async function main() { - await createNetworkVirtualApplianceInboundSecurityRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/ipAllocationsCreateOrUpdateSample.js deleted file mode 100644 index e335603241d7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an IpAllocation in the specified resource group. - * - * @summary Creates or updates an IpAllocation in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationCreate.json - */ -async function createIPAllocation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const parameters = { - typePropertiesType: "Hypernet", - allocationTags: { - vNetID: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1", - }, - location: "centraluseuap", - prefix: "3.2.5.0/24", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.beginCreateOrUpdateAndWait( - resourceGroupName, - ipAllocationName, - parameters, - ); - console.log(result); -} - -async function main() { - await createIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/ipAllocationsDeleteSample.js deleted file mode 100644 index 3b1150464618..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified IpAllocation. - * - * @summary Deletes the specified IpAllocation. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationDelete.json - */ -async function deleteIPAllocation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.beginDeleteAndWait(resourceGroupName, ipAllocationName); - console.log(result); -} - -async function main() { - await deleteIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/ipAllocationsGetSample.js deleted file mode 100644 index 9b3c3eb5b034..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified IpAllocation by resource group. - * - * @summary Gets the specified IpAllocation by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationGet.json - */ -async function getIPAllocation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.get(resourceGroupName, ipAllocationName); - console.log(result); -} - -async function main() { - await getIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/ipAllocationsListByResourceGroupSample.js deleted file mode 100644 index 3294afab92de..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all IpAllocations in a resource group. - * - * @summary Gets all IpAllocations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationListByResourceGroup.json - */ -async function listIPAllocationsInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipAllocations.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listIPAllocationsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/ipAllocationsListSample.js deleted file mode 100644 index 058bffe1967d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all IpAllocations in a subscription. - * - * @summary Gets all IpAllocations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationList.json - */ -async function listAllIPAllocations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipAllocations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllIPAllocations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/ipAllocationsUpdateTagsSample.js deleted file mode 100644 index 45dfb08a68aa..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipAllocationsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a IpAllocation tags. - * - * @summary Updates a IpAllocation tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationUpdateTags.json - */ -async function updateVirtualNetworkTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.updateTags( - resourceGroupName, - ipAllocationName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/ipGroupsCreateOrUpdateSample.js deleted file mode 100644 index 33c0b632f090..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an ipGroups in a specified resource group. - * - * @summary Creates or updates an ipGroups in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsCreate.json - */ -async function createOrUpdateIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const parameters = { - ipAddresses: ["13.64.39.16/32", "40.74.146.80/31", "40.74.147.32/28"], - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - ipGroupsName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipGroupsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/ipGroupsDeleteSample.js deleted file mode 100644 index 6a04936eacfd..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipGroupsDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified ipGroups. - * - * @summary Deletes the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsDelete.json - */ -async function deleteIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.beginDeleteAndWait(resourceGroupName, ipGroupsName); - console.log(result); -} - -async function main() { - await deleteIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipGroupsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/ipGroupsGetSample.js deleted file mode 100644 index 6d1947c2c2e3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipGroupsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified ipGroups. - * - * @summary Gets the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsGet.json - */ -async function getIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.get(resourceGroupName, ipGroupsName); - console.log(result); -} - -async function main() { - await getIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipGroupsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/ipGroupsListByResourceGroupSample.js deleted file mode 100644 index b589c4aaf812..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipGroupsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all IpGroups in a resource group. - * - * @summary Gets all IpGroups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsListByResourceGroup.json - */ -async function listByResourceGroupIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipGroups.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listByResourceGroupIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipGroupsListSample.js b/sdk/network/arm-network/samples/v35/javascript/ipGroupsListSample.js deleted file mode 100644 index 8b2947f83419..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipGroupsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all IpGroups in a subscription. - * - * @summary Gets all IpGroups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsListBySubscription.json - */ -async function listIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipGroups.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipGroupsUpdateGroupsSample.js b/sdk/network/arm-network/samples/v35/javascript/ipGroupsUpdateGroupsSample.js deleted file mode 100644 index 9414f53deffd..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipGroupsUpdateGroupsSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of an IpGroups resource. - * - * @summary Updates tags of an IpGroups resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsUpdateTags.json - */ -async function updateIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const parameters = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.updateGroups(resourceGroupName, ipGroupsName, parameters); - console.log(result); -} - -async function main() { - await updateIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsCreateSample.js b/sdk/network/arm-network/samples/v35/javascript/ipamPoolsCreateSample.js deleted file mode 100644 index 37ebfc9b61e3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsCreateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates/Updates the Pool resource. - * - * @summary Creates/Updates the Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Create.json - */ -async function ipamPoolsCreate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const body = { - location: "eastus", - properties: { - description: "Test description.", - addressPrefixes: ["10.0.0.0/24"], - parentPoolName: "", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.beginCreateAndWait( - resourceGroupName, - networkManagerName, - poolName, - body, - ); - console.log(result); -} - -async function main() { - await ipamPoolsCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/ipamPoolsDeleteSample.js deleted file mode 100644 index fa6b412a2a05..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the Pool resource. - * - * @summary Delete the Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Delete.json - */ -async function ipamPoolsDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main() { - await ipamPoolsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsGetPoolUsageSample.js b/sdk/network/arm-network/samples/v35/javascript/ipamPoolsGetPoolUsageSample.js deleted file mode 100644 index 152cd2c0eada..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsGetPoolUsageSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the Pool Usage. - * - * @summary Get the Pool Usage. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_GetPoolUsage.json - */ -async function ipamPoolsGetPoolUsage() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.getPoolUsage( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main() { - await ipamPoolsGetPoolUsage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/ipamPoolsGetSample.js deleted file mode 100644 index f1469c18b438..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specific Pool resource. - * - * @summary Gets the specific Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Get.json - */ -async function ipamPoolsGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.get(resourceGroupName, networkManagerName, poolName); - console.log(result); -} - -async function main() { - await ipamPoolsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsListAssociatedResourcesSample.js b/sdk/network/arm-network/samples/v35/javascript/ipamPoolsListAssociatedResourcesSample.js deleted file mode 100644 index 28bf0cc25d5c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsListAssociatedResourcesSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List Associated Resource in the Pool. - * - * @summary List Associated Resource in the Pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_ListAssociatedResources.json - */ -async function ipamPoolsListAssociatedResources() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipamPools.listAssociatedResources( - resourceGroupName, - networkManagerName, - poolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await ipamPoolsListAssociatedResources(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsListSample.js b/sdk/network/arm-network/samples/v35/javascript/ipamPoolsListSample.js deleted file mode 100644 index 2faab15e2a2d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsListSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets list of Pool resources at Network Manager level. - * - * @summary Gets list of Pool resources at Network Manager level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_List.json - */ -async function ipamPoolsList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipamPools.list(resourceGroupName, networkManagerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await ipamPoolsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/ipamPoolsUpdateSample.js deleted file mode 100644 index b9d8f60337ee..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/ipamPoolsUpdateSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the specific Pool resource. - * - * @summary Updates the specific Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Update.json - */ -async function ipamPoolsUpdate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.update(resourceGroupName, networkManagerName, poolName); - console.log(result); -} - -async function main() { - await ipamPoolsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/listActiveConnectivityConfigurationsSample.js b/sdk/network/arm-network/samples/v35/javascript/listActiveConnectivityConfigurationsSample.js deleted file mode 100644 index a452c3962288..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/listActiveConnectivityConfigurationsSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists active connectivity configurations in a network manager. - * - * @summary Lists active connectivity configurations in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json - */ -async function listActiveConnectivityConfigurations() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const parameters = { - regions: ["westus"], - skipToken: "fakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listActiveConnectivityConfigurations( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await listActiveConnectivityConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/listActiveSecurityAdminRulesSample.js b/sdk/network/arm-network/samples/v35/javascript/listActiveSecurityAdminRulesSample.js deleted file mode 100644 index 8884399b199c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/listActiveSecurityAdminRulesSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists active security admin rules in a network manager. - * - * @summary Lists active security admin rules in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerActiveSecurityAdminRulesList.json - */ -async function listActiveSecurityAdminRules() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const parameters = { - regions: ["westus"], - skipToken: "fakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listActiveSecurityAdminRules( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await listActiveSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js b/sdk/network/arm-network/samples/v35/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js deleted file mode 100644 index 5efbd499dacc..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all effective connectivity configurations applied on a virtual network. - * - * @summary List all effective connectivity configurations applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json - */ -async function listEffectiveConnectivityConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const virtualNetworkName = "testVirtualNetwork"; - const parameters = { skipToken: "FakeSkipTokenCode" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listNetworkManagerEffectiveConnectivityConfigurations( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main() { - await listEffectiveConnectivityConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js b/sdk/network/arm-network/samples/v35/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js deleted file mode 100644 index 82453dfdb648..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all effective security admin rules applied on a virtual network. - * - * @summary List all effective security admin rules applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json - */ -async function listEffectiveSecurityAdminRules() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const virtualNetworkName = "testVirtualNetwork"; - const parameters = { skipToken: "FakeSkipTokenCode" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listNetworkManagerEffectiveSecurityAdminRules( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main() { - await listEffectiveSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js deleted file mode 100644 index 4323688251c5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a load balancer backend address pool. - * - * @summary Creates or updates a load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json - */ -async function updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const parameters = { - loadBalancerBackendAddresses: [ - { - name: "address1", - ipAddress: "10.0.0.4", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - { - name: "address2", - ipAddress: "10.0.0.5", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsDeleteSample.js deleted file mode 100644 index c2b846561ce2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified load balancer backend address pool. - * - * @summary Deletes the specified load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerBackendAddressPoolDelete.json - */ -async function backendAddressPoolDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -async function main() { - await backendAddressPoolDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsGetSample.js deleted file mode 100644 index df2062cc7654..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsGetSample.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets load balancer backend address pool. - * - * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json - */ -async function loadBalancerWithBackendAddressPoolWithBackendAddresses() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.get( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets load balancer backend address pool. - * - * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerBackendAddressPoolGet.json - */ -async function loadBalancerBackendAddressPoolGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.get( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -async function main() { - await loadBalancerWithBackendAddressPoolWithBackendAddresses(); - await loadBalancerBackendAddressPoolGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsListSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsListSample.js deleted file mode 100644 index 64b1763c2565..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerBackendAddressPoolsListSample.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancer backed address pools. - * - * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json - */ -async function loadBalancerWithBackendAddressPoolContainingBackendAddresses() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerBackendAddressPools.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets all the load balancer backed address pools. - * - * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerBackendAddressPoolList.json - */ -async function loadBalancerBackendAddressPoolList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerBackendAddressPools.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerWithBackendAddressPoolContainingBackendAddresses(); - await loadBalancerBackendAddressPoolList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerFrontendIPConfigurationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerFrontendIPConfigurationsGetSample.js deleted file mode 100644 index 5c7207c62ea3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerFrontendIPConfigurationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets load balancer frontend IP configuration. - * - * @summary Gets load balancer frontend IP configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerFrontendIPConfigurationGet.json - */ -async function loadBalancerFrontendIPConfigurationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const frontendIPConfigurationName = "frontend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerFrontendIPConfigurations.get( - resourceGroupName, - loadBalancerName, - frontendIPConfigurationName, - ); - console.log(result); -} - -async function main() { - await loadBalancerFrontendIPConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerFrontendIPConfigurationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerFrontendIPConfigurationsListSample.js deleted file mode 100644 index af468db9242e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerFrontendIPConfigurationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancer frontend IP configurations. - * - * @summary Gets all the load balancer frontend IP configurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerFrontendIPConfigurationList.json - */ -async function loadBalancerFrontendIPConfigurationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerFrontendIPConfigurations.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerFrontendIPConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesGetSample.js deleted file mode 100644 index 159e0af27b15..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified load balancer load balancing rule. - * - * @summary Gets the specified load balancer load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerLoadBalancingRuleGet.json - */ -async function loadBalancerLoadBalancingRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const loadBalancingRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerLoadBalancingRules.get( - resourceGroupName, - loadBalancerName, - loadBalancingRuleName, - ); - console.log(result); -} - -async function main() { - await loadBalancerLoadBalancingRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesHealthSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesHealthSample.js deleted file mode 100644 index 1fe73b81a620..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesHealthSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get health details of a load balancing rule. - * - * @summary Get health details of a load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerHealth.json - */ -async function queryLoadBalancingRuleHealth() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const loadBalancingRuleName = "rulelb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerLoadBalancingRules.beginHealthAndWait( - groupName, - loadBalancerName, - loadBalancingRuleName, - ); - console.log(result); -} - -async function main() { - await queryLoadBalancingRuleHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesListSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesListSample.js deleted file mode 100644 index 7fe5182c5605..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerLoadBalancingRulesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancing rules in a load balancer. - * - * @summary Gets all the load balancing rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerLoadBalancingRuleList.json - */ -async function loadBalancerLoadBalancingRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerLoadBalancingRules.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerLoadBalancingRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerNetworkInterfacesListSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerNetworkInterfacesListSample.js deleted file mode 100644 index 4cb5148f9522..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerNetworkInterfacesListSample.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets associated load balancer network interfaces. - * - * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerNetworkInterfaceListSimple.json - */ -async function loadBalancerNetworkInterfaceListSimple() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerNetworkInterfaces.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets associated load balancer network interfaces. - * - * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerNetworkInterfaceListVmss.json - */ -async function loadBalancerNetworkInterfaceListVmss() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerNetworkInterfaces.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerNetworkInterfaceListSimple(); - await loadBalancerNetworkInterfaceListVmss(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerOutboundRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerOutboundRulesGetSample.js deleted file mode 100644 index 1541e579c7ef..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerOutboundRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified load balancer outbound rule. - * - * @summary Gets the specified load balancer outbound rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerOutboundRuleGet.json - */ -async function loadBalancerOutboundRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const outboundRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerOutboundRules.get( - resourceGroupName, - loadBalancerName, - outboundRuleName, - ); - console.log(result); -} - -async function main() { - await loadBalancerOutboundRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerOutboundRulesListSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerOutboundRulesListSample.js deleted file mode 100644 index e7275ddde220..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerOutboundRulesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the outbound rules in a load balancer. - * - * @summary Gets all the outbound rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerOutboundRuleList.json - */ -async function loadBalancerOutboundRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerOutboundRules.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerOutboundRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerProbesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerProbesGetSample.js deleted file mode 100644 index b49158f96db1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerProbesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets load balancer probe. - * - * @summary Gets load balancer probe. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerProbeGet.json - */ -async function loadBalancerProbeGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const probeName = "probe1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerProbes.get( - resourceGroupName, - loadBalancerName, - probeName, - ); - console.log(result); -} - -async function main() { - await loadBalancerProbeGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancerProbesListSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancerProbesListSample.js deleted file mode 100644 index c1c3c38af39d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancerProbesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancer probes. - * - * @summary Gets all the load balancer probes. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerProbeList.json - */ -async function loadBalancerProbeList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerProbes.list(resourceGroupName, loadBalancerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerProbeList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancersCreateOrUpdateSample.js deleted file mode 100644 index dcfe754d0e5d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancersCreateOrUpdateSample.js +++ /dev/null @@ -1,802 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreate.json - */ -async function createLoadBalancer() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - scope: "Public", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateWithZones.json - */ -async function createLoadBalancerWithFrontendIPInZone1() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - zones: ["1"], - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json - */ -async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - gatewayLoadBalancer: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json - */ -async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [ - { - name: "be-lb", - tunnelInterfaces: [ - { type: "Internal", identifier: 900, port: 15000, protocol: "VXLAN" }, - { type: "Internal", identifier: 901, port: 15001, protocol: "VXLAN" }, - ], - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPools: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - ], - backendPort: 0, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 0, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "All", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Gateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json - */ -async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb1" }, { name: "be-lb2" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: {}, - backendAddressPools: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb2", - }, - ], - backendPort: 0, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 0, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "All", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Gateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateGlobalTier.json - */ -async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [ - { - name: "be-lb", - loadBalancerBackendAddresses: [ - { - name: "regional-lb1-address", - loadBalancerFrontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/regional-lb-rg1/providers/Microsoft.Network/loadBalancers/regional-lb/frontendIPConfigurations/fe-rlb", - }, - }, - ], - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard", tier: "Global" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateStandardSku.json - */ -async function createLoadBalancerWithStandardSku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json - */ -async function createLoadBalancerWithSyncModePropertyOnPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [ - { - name: "be-lb", - syncMode: "Automatic", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateWithInboundNatPool.json - */ -async function createLoadBalancerWithInboundNatPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [], - frontendIPConfigurations: [ - { - name: "test", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", - privateIPAllocationMethod: "Dynamic", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/lbvnet/subnets/lbsubnet", - }, - zones: [], - }, - ], - inboundNatPools: [ - { - name: "test", - backendPort: 8888, - enableFloatingIP: true, - enableTcpReset: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", - }, - frontendPortRangeEnd: 8085, - frontendPortRangeStart: 8080, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/inboundNatPools/test", - idleTimeoutInMinutes: 10, - protocol: "Tcp", - }, - ], - inboundNatRules: [], - loadBalancingRules: [], - location: "eastus", - outboundRules: [], - probes: [], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateWithOutboundRules.json - */ -async function createLoadBalancerWithOutboundRules() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - disableOutboundSnat: true, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [ - { - name: "rule1", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - frontendIPConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - ], - protocol: "All", - }, - ], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -async function main() { - await createLoadBalancer(); - await createLoadBalancerWithFrontendIPInZone1(); - await createLoadBalancerWithGatewayLoadBalancerConsumerConfigured(); - await createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool(); - await createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool(); - await createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool(); - await createLoadBalancerWithStandardSku(); - await createLoadBalancerWithSyncModePropertyOnPool(); - await createLoadBalancerWithInboundNatPool(); - await createLoadBalancerWithOutboundRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancersDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancersDeleteSample.js deleted file mode 100644 index 7cbf26009849..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancersDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified load balancer. - * - * @summary Deletes the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerDelete.json - */ -async function deleteLoadBalancer() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginDeleteAndWait(resourceGroupName, loadBalancerName); - console.log(result); -} - -async function main() { - await deleteLoadBalancer(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancersGetSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancersGetSample.js deleted file mode 100644 index e9547d34dbd1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancersGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified load balancer. - * - * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerGet.json - */ -async function getLoadBalancer() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.get(resourceGroupName, loadBalancerName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified load balancer. - * - * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerGetInboundNatRulePortMapping.json - */ -async function getLoadBalancerWithInboundNatRulePortMapping() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.get(resourceGroupName, loadBalancerName); - console.log(result); -} - -async function main() { - await getLoadBalancer(); - await getLoadBalancerWithInboundNatRulePortMapping(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancersListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancersListAllSample.js deleted file mode 100644 index 4a18c72f45e3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancersListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancers in a subscription. - * - * @summary Gets all the load balancers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerListAll.json - */ -async function listAllLoadBalancers() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancers.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllLoadBalancers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancersListInboundNatRulePortMappingsSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancersListInboundNatRulePortMappingsSample.js deleted file mode 100644 index a66d04aa06cc..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancersListInboundNatRulePortMappingsSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List of inbound NAT rule port mappings. - * - * @summary List of inbound NAT rule port mappings. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/QueryInboundNatRulePortMapping.json - */ -async function queryInboundNatRulePortMapping() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const backendPoolName = "bp1"; - const parameters = { - ipAddress: "10.0.0.4", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginListInboundNatRulePortMappingsAndWait( - groupName, - loadBalancerName, - backendPoolName, - parameters, - ); - console.log(result); -} - -async function main() { - await queryInboundNatRulePortMapping(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancersListSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancersListSample.js deleted file mode 100644 index 7f5b136c2501..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancersListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancers in a resource group. - * - * @summary Gets all the load balancers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerList.json - */ -async function listLoadBalancersInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listLoadBalancersInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancersMigrateToIPBasedSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancersMigrateToIPBasedSample.js deleted file mode 100644 index a7ad86be6a8d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancersMigrateToIPBasedSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Migrate load balancer to IP Based - * - * @summary Migrate load balancer to IP Based - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/MigrateLoadBalancerToIPBased.json - */ -async function migrateLoadBalancerToIPBased() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const parameters = { - pools: ["pool1", "pool2"], - }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.migrateToIpBased(groupName, loadBalancerName, options); - console.log(result); -} - -async function main() { - await migrateLoadBalancerToIPBased(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancersSwapPublicIPAddressesSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancersSwapPublicIPAddressesSample.js deleted file mode 100644 index a86de7aeada9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancersSwapPublicIPAddressesSample.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Swaps VIPs between two load balancers. - * - * @summary Swaps VIPs between two load balancers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancersSwapPublicIpAddresses.json - */ -async function swapViPsBetweenTwoLoadBalancers() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const parameters = { - frontendIPConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/lbfe1", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/pip2", - }, - }, - { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/loadBalancers/lb2/frontendIPConfigurations/lbfe2", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginSwapPublicIpAddressesAndWait(location, parameters); - console.log(result); -} - -async function main() { - await swapViPsBetweenTwoLoadBalancers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/loadBalancersUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/loadBalancersUpdateTagsSample.js deleted file mode 100644 index ce45ae2a08cf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/loadBalancersUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a load balancer tags. - * - * @summary Updates a load balancer tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerUpdateTags.json - */ -async function updateLoadBalancerTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.updateTags( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateLoadBalancerTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysCreateOrUpdateSample.js deleted file mode 100644 index 56eeb1da12da..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a local network gateway in the specified resource group. - * - * @summary Creates or updates a local network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayCreate.json - */ -async function createLocalNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const parameters = { - fqdn: "site1.contoso.com", - gatewayIpAddress: "11.12.13.14", - localNetworkAddressSpace: { addressPrefixes: ["10.1.0.0/16"] }, - location: "Central US", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - localNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await createLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysDeleteSample.js deleted file mode 100644 index ba59db3d1724..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified local network gateway. - * - * @summary Deletes the specified local network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayDelete.json - */ -async function deleteLocalNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.beginDeleteAndWait( - resourceGroupName, - localNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await deleteLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysGetSample.js b/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysGetSample.js deleted file mode 100644 index 80c77228da0a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified local network gateway in a resource group. - * - * @summary Gets the specified local network gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayGet.json - */ -async function getLocalNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.get(resourceGroupName, localNetworkGatewayName); - console.log(result); -} - -async function main() { - await getLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysListSample.js b/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysListSample.js deleted file mode 100644 index 1915ac2e3e04..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the local network gateways in a resource group. - * - * @summary Gets all the local network gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayList.json - */ -async function listLocalNetworkGateways() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.localNetworkGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listLocalNetworkGateways(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysUpdateTagsSample.js deleted file mode 100644 index 901331e3f345..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/localNetworkGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a local network gateway tags. - * - * @summary Updates a local network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayUpdateTags.json - */ -async function updateLocalNetworkGatewayTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "lgw"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.updateTags( - resourceGroupName, - localNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateLocalNetworkGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 68eb807145fb..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a network manager connection on this management group. - * - * @summary Create a network manager connection on this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupPut.json - */ -async function createOrUpdateManagementGroupNetworkManagerConnection() { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const parameters = { - networkManagerId: - "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = await client.managementGroupNetworkManagerConnections.createOrUpdate( - managementGroupId, - networkManagerConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js deleted file mode 100644 index a7c0d19f45e1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete specified pending connection created by this management group. - * - * @summary Delete specified pending connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupDelete.json - */ -async function deleteManagementGroupNetworkManagerConnection() { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = await client.managementGroupNetworkManagerConnections.delete( - managementGroupId, - networkManagerConnectionName, - ); - console.log(result); -} - -async function main() { - await deleteManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsGetSample.js deleted file mode 100644 index 977f6b4b5728..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get a specified connection created by this management group. - * - * @summary Get a specified connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupGet.json - */ -async function getManagementGroupNetworkManagerConnection() { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = await client.managementGroupNetworkManagerConnections.get( - managementGroupId, - networkManagerConnectionName, - ); - console.log(result); -} - -async function main() { - await getManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsListSample.js deleted file mode 100644 index dcb23b6ff36c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/managementGroupNetworkManagerConnectionsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network manager connections created by this management group. - * - * @summary List all network manager connections created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupList.json - */ -async function listManagementGroupNetworkManagerConnection() { - const managementGroupId = "managementGroupA"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const resArray = new Array(); - for await (const item of client.managementGroupNetworkManagerConnections.list( - managementGroupId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/natGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/natGatewaysCreateOrUpdateSample.js deleted file mode 100644 index e3356d473b44..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/natGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a nat gateway. - * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayCreateOrUpdate.json - */ -async function createNatGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters = { - location: "westus", - publicIpAddresses: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", - }, - ], - publicIpPrefixes: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a nat gateway. - * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayCreateOrUpdateStandardV2Sku.json - */ -async function createNatGatewayWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters = { - location: "westus", - publicIpAddresses: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", - }, - ], - publicIpPrefixes: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", - }, - ], - sku: { name: "StandardV2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNatGateway(); - await createNatGatewayWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/natGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/natGatewaysDeleteSample.js deleted file mode 100644 index d989d9365063..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/natGatewaysDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified nat gateway. - * - * @summary Deletes the specified nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayDelete.json - */ -async function deleteNatGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginDeleteAndWait(resourceGroupName, natGatewayName); - console.log(result); -} - -async function main() { - await deleteNatGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/natGatewaysGetSample.js b/sdk/network/arm-network/samples/v35/javascript/natGatewaysGetSample.js deleted file mode 100644 index 749aff83076a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/natGatewaysGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. - * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayGet.json - */ -async function getNatGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get(resourceGroupName, natGatewayName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. - * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayGetStandardV2Sku.json - */ -async function getNatGatewayWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get(resourceGroupName, natGatewayName); - console.log(result); -} - -async function main() { - await getNatGateway(); - await getNatGatewayWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/natGatewaysListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/natGatewaysListAllSample.js deleted file mode 100644 index 36f5fd835bb5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/natGatewaysListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Nat Gateways in a subscription. - * - * @summary Gets all the Nat Gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayListAll.json - */ -async function listAllNatGateways() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natGateways.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNatGateways(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/natGatewaysListSample.js b/sdk/network/arm-network/samples/v35/javascript/natGatewaysListSample.js deleted file mode 100644 index d248f784b925..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/natGatewaysListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all nat gateways in a resource group. - * - * @summary Gets all nat gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayList.json - */ -async function listNatGatewaysInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNatGatewaysInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/natGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/natGatewaysUpdateTagsSample.js deleted file mode 100644 index feac620d787c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/natGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates nat gateway tags. - * - * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayUpdateTags.json - */ -async function updateNatGatewayTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.updateTags(resourceGroupName, natGatewayName, parameters); - console.log(result); -} - -/** - * This sample demonstrates how to Updates nat gateway tags. - * - * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayUpdateTagsStandardV2Sku.json - */ -async function updateNatGatewayWithStandardV2SkuTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.updateTags(resourceGroupName, natGatewayName, parameters); - console.log(result); -} - -async function main() { - await updateNatGatewayTags(); - await updateNatGatewayWithStandardV2SkuTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/natRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/natRulesCreateOrUpdateSample.js deleted file mode 100644 index 52547f7f42ed..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/natRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * - * @summary Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRulePut.json - */ -async function natRulePut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const natRuleParameters = { - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "192.168.21.0/24" }], - internalMappings: [{ addressSpace: "10.4.0.0/24" }], - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default", - mode: "EgressSnat", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - natRuleName, - natRuleParameters, - ); - console.log(result); -} - -async function main() { - await natRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/natRulesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/natRulesDeleteSample.js deleted file mode 100644 index 0751c3f17a7a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/natRulesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a nat rule. - * - * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleDelete.json - */ -async function natRuleDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.beginDeleteAndWait( - resourceGroupName, - gatewayName, - natRuleName, - ); - console.log(result); -} - -async function main() { - await natRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/natRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/natRulesGetSample.js deleted file mode 100644 index 65d1b6c48c17..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/natRulesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a nat ruleGet. - * - * @summary Retrieves the details of a nat ruleGet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleGet.json - */ -async function natRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.get(resourceGroupName, gatewayName, natRuleName); - console.log(result); -} - -async function main() { - await natRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/natRulesListByVpnGatewaySample.js b/sdk/network/arm-network/samples/v35/javascript/natRulesListByVpnGatewaySample.js deleted file mode 100644 index 6317ac04c3ee..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/natRulesListByVpnGatewaySample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all nat rules for a particular virtual wan vpn gateway. - * - * @summary Retrieves all nat rules for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleList.json - */ -async function natRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natRules.listByVpnGateway(resourceGroupName, gatewayName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await natRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkGroupsCreateOrUpdateSample.js deleted file mode 100644 index 1ac87049e139..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network group. - * - * @summary Creates or updates a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupPut.json - */ -async function networkGroupsPut() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const parameters = { - description: "A sample group", - memberType: "VirtualNetwork", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.createOrUpdate( - resourceGroupName, - networkManagerName, - networkGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await networkGroupsPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkGroupsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkGroupsDeleteSample.js deleted file mode 100644 index 61b529c7245b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkGroupsDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network group. - * - * @summary Deletes a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupDelete.json - */ -async function networkGroupsDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - networkGroupName, - options, - ); - console.log(result); -} - -async function main() { - await networkGroupsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkGroupsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkGroupsGetSample.js deleted file mode 100644 index a90b4a4d888c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkGroupsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network group. - * - * @summary Gets the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupGet.json - */ -async function networkGroupsGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.get( - resourceGroupName, - networkManagerName, - networkGroupName, - ); - console.log(result); -} - -async function main() { - await networkGroupsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkGroupsListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkGroupsListSample.js deleted file mode 100644 index 2ff74ddcb342..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkGroupsListSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the specified network group. - * - * @summary Lists the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupList.json - */ -async function networkGroupsList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkGroups.list(resourceGroupName, networkManagerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkGroupsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceIPConfigurationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfaceIPConfigurationsGetSample.js deleted file mode 100644 index bbf07111d572..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceIPConfigurationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network interface ip configuration. - * - * @summary Gets the specified network interface ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceIPConfigurationGet.json - */ -async function networkInterfaceIPConfigurationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const ipConfigurationName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceIPConfigurations.get( - resourceGroupName, - networkInterfaceName, - ipConfigurationName, - ); - console.log(result); -} - -async function main() { - await networkInterfaceIPConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceIPConfigurationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfaceIPConfigurationsListSample.js deleted file mode 100644 index d2915e7bcc43..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceIPConfigurationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get all ip configurations in a network interface. - * - * @summary Get all ip configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceIPConfigurationList.json - */ -async function networkInterfaceIPConfigurationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceIPConfigurations.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkInterfaceIPConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceLoadBalancersListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfaceLoadBalancersListSample.js deleted file mode 100644 index 85d5b2222b72..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceLoadBalancersListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all load balancers in a network interface. - * - * @summary List all load balancers in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceLoadBalancerList.json - */ -async function networkInterfaceLoadBalancerList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceLoadBalancers.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkInterfaceLoadBalancerList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index 7c491a9a4b7e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a Tap configuration in the specified NetworkInterface. - * - * @summary Creates or updates a Tap configuration in the specified NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationCreate.json - */ -async function createNetworkInterfaceTapConfigurations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const tapConfigurationParameters = { - virtualNetworkTap: { - id: "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworkTaps/testvtap", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceTapConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - tapConfigurationParameters, - ); - console.log(result); -} - -async function main() { - await createNetworkInterfaceTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsDeleteSample.js deleted file mode 100644 index 21004f2987cf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified tap configuration from the NetworkInterface. - * - * @summary Deletes the specified tap configuration from the NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationDelete.json - */ -async function deleteTapConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceTapConfigurations.beginDeleteAndWait( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - ); - console.log(result); -} - -async function main() { - await deleteTapConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsGetSample.js deleted file mode 100644 index 5981093c3cb7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified tap configuration on a network interface. - * - * @summary Get the specified tap configuration on a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationGet.json - */ -async function getNetworkInterfaceTapConfigurations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceTapConfigurations.get( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - ); - console.log(result); -} - -async function main() { - await getNetworkInterfaceTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsListSample.js deleted file mode 100644 index 3c120ee92159..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfaceTapConfigurationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get all Tap configurations in a network interface. - * - * @summary Get all Tap configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationList.json - */ -async function listVirtualNetworkTapConfigurations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceTapConfigurations.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualNetworkTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesCreateOrUpdateSample.js deleted file mode 100644 index b2cafbdc3717..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesCreateOrUpdateSample.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network interface. - * - * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceCreate.json - */ -async function createNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters = { - disableTcpStateTracking: true, - enableAcceleratedNetworking: true, - ipConfigurations: [ - { - name: "ipconfig1", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", - }, - }, - { name: "ipconfig2", privateIPAddressPrefixLength: 28 }, - ], - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network interface. - * - * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json - */ -async function createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters = { - enableAcceleratedNetworking: true, - ipConfigurations: [ - { - name: "ipconfig1", - gatewayLoadBalancer: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", - }, - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", - }, - }, - ], - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkInterface(); - await createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesDeleteSample.js deleted file mode 100644 index b6ed5b21105f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified network interface. - * - * @summary Deletes the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceDelete.json - */ -async function deleteNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginDeleteAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js deleted file mode 100644 index 1f3e1983cb05..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified network interface in a cloud service. - * - * @summary Get the specified network interface in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceNetworkInterfaceGet.json - */ -async function getCloudServiceNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const roleInstanceName = "TestVMRole_IN_0"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.getCloudServiceNetworkInterface( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ); - console.log(result); -} - -async function main() { - await getCloudServiceNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetEffectiveRouteTableSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetEffectiveRouteTableSample.js deleted file mode 100644 index 15e6d74e840c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetEffectiveRouteTableSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all route tables applied to a network interface. - * - * @summary Gets all route tables applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceEffectiveRouteTableList.json - */ -async function showNetworkInterfaceEffectiveRouteTables() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginGetEffectiveRouteTableAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main() { - await showNetworkInterfaceEffectiveRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetSample.js deleted file mode 100644 index b806ade80ce1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified network interface. - * - * @summary Gets information about the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceGet.json - */ -async function getNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.get(resourceGroupName, networkInterfaceName); - console.log(result); -} - -async function main() { - await getNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js deleted file mode 100644 index 7a481287cd82..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. - * - * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceIpConfigGet.json - */ -async function getVirtualMachineScaleSetNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "2"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.getVirtualMachineScaleSetIpConfiguration( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - ); - console.log(result); -} - -async function main() { - await getVirtualMachineScaleSetNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js deleted file mode 100644 index 97a7dd109958..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified network interface in a virtual machine scale set. - * - * @summary Get the specified network interface in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceGet.json - */ -async function getVirtualMachineScaleSetNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.getVirtualMachineScaleSetNetworkInterface( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ); - console.log(result); -} - -async function main() { - await getVirtualMachineScaleSetNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListAllSample.js deleted file mode 100644 index 9fad408b8338..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network interfaces in a subscription. - * - * @summary Gets all network interfaces in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceListAll.json - */ -async function listAllNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js deleted file mode 100644 index 6355cd8d44f8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network interfaces in a cloud service. - * - * @summary Gets all network interfaces in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceNetworkInterfaceList.json - */ -async function listCloudServiceNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listCloudServiceNetworkInterfaces( - resourceGroupName, - cloudServiceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listCloudServiceNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js deleted file mode 100644 index 6971814bcd51..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all network interfaces in a role instance in a cloud service. - * - * @summary Gets information about all network interfaces in a role instance in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json - */ -async function listCloudServiceRoleInstanceNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const roleInstanceName = "TestVMRole_IN_0"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listCloudServiceRoleInstanceNetworkInterfaces( - resourceGroupName, - cloudServiceName, - roleInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listCloudServiceRoleInstanceNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js deleted file mode 100644 index d641ec4ced83..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network security groups applied to a network interface. - * - * @summary Gets all network security groups applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceEffectiveNSGList.json - */ -async function listNetworkInterfaceEffectiveNetworkSecurityGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginListEffectiveNetworkSecurityGroupsAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main() { - await listNetworkInterfaceEffectiveNetworkSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListSample.js deleted file mode 100644 index d3abeb2da192..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network interfaces in a resource group. - * - * @summary Gets all network interfaces in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceList.json - */ -async function listNetworkInterfacesInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkInterfacesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js deleted file mode 100644 index 4abdaddfa6b4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. - * - * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceIpConfigList.json - */ -async function listVirtualMachineScaleSetNetworkInterfaceIPConfigurations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "2"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetIpConfigurations( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualMachineScaleSetNetworkInterfaceIPConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js deleted file mode 100644 index e34b0122066e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network interfaces in a virtual machine scale set. - * - * @summary Gets all network interfaces in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceList.json - */ -async function listVirtualMachineScaleSetNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualMachineScaleSetNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js deleted file mode 100644 index e1f875271808..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * - * @summary Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssVmNetworkInterfaceList.json - */ -async function listVirtualMachineScaleSetVMNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetVMNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualMachineScaleSetVMNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/networkInterfacesUpdateTagsSample.js deleted file mode 100644 index 28e7dd3f9d0e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkInterfacesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a network interface tags. - * - * @summary Updates a network interface tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceUpdateTags.json - */ -async function updateNetworkInterfaceTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.updateTags( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateNetworkInterfaceTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagerCommitsPostSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagerCommitsPostSample.js deleted file mode 100644 index 29481322cd0d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagerCommitsPostSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Post a Network Manager Commit. - * - * @summary Post a Network Manager Commit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerCommitPost.json - */ -async function networkManageCommitPost() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resoureGroupSample"; - const networkManagerName = "testNetworkManager"; - const parameters = { - commitType: "SecurityAdmin", - configurationIds: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resoureGroupSample/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/SampleSecurityAdminConfig", - ], - targetLocations: ["useast"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerCommits.beginPostAndWait( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await networkManageCommitPost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagerDeploymentStatusListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagerDeploymentStatusListSample.js deleted file mode 100644 index a5e8ea2c0f0c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagerDeploymentStatusListSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Post to List of Network Manager Deployment Status. - * - * @summary Post to List of Network Manager Deployment Status. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerDeploymentStatusList.json - */ -async function networkManagerDeploymentStatusList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resoureGroupSample"; - const networkManagerName = "testNetworkManager"; - const parameters = { - deploymentTypes: ["Connectivity", "AdminPolicy"], - regions: ["eastus", "westus"], - skipToken: "FakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerDeploymentStatusOperations.list( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await networkManagerDeploymentStatusList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index 36e7d252d789..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network manager routing configuration. - * - * @summary Creates or updates a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationPut.json - */ -async function createNetworkManagerRoutingConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const routingConfiguration = { - description: "A sample policy", - routeTableUsageMode: "ManagedOnly", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerRoutingConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - routingConfiguration, - ); - console.log(result); -} - -async function main() { - await createNetworkManagerRoutingConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsDeleteSample.js deleted file mode 100644 index 713dd0e49915..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network manager routing configuration. - * - * @summary Deletes a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationDelete.json - */ -async function deleteNetworkManagerRoutingConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerRoutingConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkManagerRoutingConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsGetSample.js deleted file mode 100644 index 638c71074865..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a network manager routing configuration. - * - * @summary Retrieves a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationGet.json - */ -async function getRoutingConfigurations() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerRoutingConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main() { - await getRoutingConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsListSample.js deleted file mode 100644 index 913109092e01..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagerRoutingConfigurationsListSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the network manager routing configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager routing configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationList.json - */ -async function listRoutingConfigurationsInANetworkManager() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagerRoutingConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRoutingConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagersCreateOrUpdateSample.js deleted file mode 100644 index 40a310230391..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagersCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a Network Manager. - * - * @summary Creates or updates a Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerPut.json - */ -async function putNetworkManager() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const parameters = { - description: "My Test Network Manager", - networkManagerScopeAccesses: ["Connectivity"], - networkManagerScopes: { - managementGroups: ["/Microsoft.Management/testmg"], - subscriptions: ["/subscriptions/00000000-0000-0000-0000-000000000000"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.createOrUpdate( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await putNetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagersDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagersDeleteSample.js deleted file mode 100644 index cbc92d21ce70..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagersDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network manager. - * - * @summary Deletes a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerDelete.json - */ -async function networkManagersDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - options, - ); - console.log(result); -} - -async function main() { - await networkManagersDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagersGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagersGetSample.js deleted file mode 100644 index f9736b79134a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagersGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Network Manager. - * - * @summary Gets the specified Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGet.json - */ -async function networkManagersGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.get(resourceGroupName, networkManagerName); - console.log(result); -} - -async function main() { - await networkManagersGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagersListBySubscriptionSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagersListBySubscriptionSample.js deleted file mode 100644 index f0c2eb91aa74..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagersListBySubscriptionSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network managers in a subscription. - * - * @summary List all network managers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerListAll.json - */ -async function networkManagersList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkManagersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagersListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagersListSample.js deleted file mode 100644 index 9298de283cc0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagersListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List network managers in a resource group. - * - * @summary List network managers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerList.json - */ -async function listNetworkManager() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkManagersPatchSample.js b/sdk/network/arm-network/samples/v35/javascript/networkManagersPatchSample.js deleted file mode 100644 index 67e1973e7fd3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkManagersPatchSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Patch NetworkManager. - * - * @summary Patch NetworkManager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerPatch.json - */ -async function networkManagesPatch() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.patch( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await networkManagesPatch(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkProfilesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkProfilesCreateOrUpdateSample.js deleted file mode 100644 index e03acebca982..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkProfilesCreateOrUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network profile. - * - * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileCreateConfigOnly.json - */ -async function createNetworkProfileDefaults() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const parameters = { - containerNetworkInterfaceConfigurations: [ - { - name: "eth1", - ipConfigurations: [ - { - name: "ipconfig1", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/networkProfileVnet/subnets/networkProfileSubnet1", - }, - }, - ], - }, - ], - location: "westus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.createOrUpdate( - resourceGroupName, - networkProfileName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkProfileDefaults(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkProfilesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkProfilesDeleteSample.js deleted file mode 100644 index 2648cc1b6996..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkProfilesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified network profile. - * - * @summary Deletes the specified network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileDelete.json - */ -async function deleteNetworkProfile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.beginDeleteAndWait( - resourceGroupName, - networkProfileName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkProfilesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkProfilesGetSample.js deleted file mode 100644 index 47c332fdf393..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkProfilesGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network profile in a specified resource group. - * - * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileGetConfigOnly.json - */ -async function getNetworkProfile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.get(resourceGroupName, networkProfileName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified network profile in a specified resource group. - * - * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileGetWithContainerNic.json - */ -async function getNetworkProfileWithContainerNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.get(resourceGroupName, networkProfileName); - console.log(result); -} - -async function main() { - await getNetworkProfile(); - await getNetworkProfileWithContainerNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkProfilesListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/networkProfilesListAllSample.js deleted file mode 100644 index 5f5b0fc61fe3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkProfilesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the network profiles in a subscription. - * - * @summary Gets all the network profiles in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileListAll.json - */ -async function listAllNetworkProfiles() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkProfiles.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkProfiles(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkProfilesListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkProfilesListSample.js deleted file mode 100644 index a76338b45c1b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkProfilesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network profiles in a resource group. - * - * @summary Gets all network profiles in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileList.json - */ -async function listResourceGroupNetworkProfiles() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkProfiles.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listResourceGroupNetworkProfiles(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkProfilesUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/networkProfilesUpdateTagsSample.js deleted file mode 100644 index 56764e25733d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkProfilesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates network profile tags. - * - * @summary Updates network profile tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileUpdateTags.json - */ -async function updateNetworkProfileTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "test-np"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.updateTags( - resourceGroupName, - networkProfileName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateNetworkProfileTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsCreateOrUpdateSample.js deleted file mode 100644 index 4e265fdaa333..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network security group in the specified resource group. - * - * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupCreate.json - */ -async function createNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network security group in the specified resource group. - * - * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupCreateWithRule.json - */ -async function createNetworkSecurityGroupWithRule() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters = { - location: "eastus", - securityRules: [ - { - name: "rule1", - access: "Allow", - destinationAddressPrefix: "*", - destinationPortRange: "80", - direction: "Inbound", - priority: 130, - sourceAddressPrefix: "*", - sourcePortRange: "*", - protocol: "*", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkSecurityGroup(); - await createNetworkSecurityGroupWithRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsDeleteSample.js deleted file mode 100644 index ffbd04613c92..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified network security group. - * - * @summary Deletes the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupDelete.json - */ -async function deleteNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginDeleteAndWait( - resourceGroupName, - networkSecurityGroupName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsGetSample.js deleted file mode 100644 index 465492bf1772..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network security group. - * - * @summary Gets the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupGet.json - */ -async function getNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.get( - resourceGroupName, - networkSecurityGroupName, - ); - console.log(result); -} - -async function main() { - await getNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsListAllSample.js deleted file mode 100644 index b76ec4636b91..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network security groups in a subscription. - * - * @summary Gets all network security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupListAll.json - */ -async function listAllNetworkSecurityGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityGroups.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsListSample.js deleted file mode 100644 index e138d71f5c38..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network security groups in a resource group. - * - * @summary Gets all network security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupList.json - */ -async function listNetworkSecurityGroupsInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityGroups.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkSecurityGroupsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsUpdateTagsSample.js deleted file mode 100644 index 4af610ff3049..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityGroupsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a network security group tags. - * - * @summary Updates a network security group tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupUpdateTags.json - */ -async function updateNetworkSecurityGroupTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.updateTags( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateNetworkSecurityGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js deleted file mode 100644 index 4ae227256927..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network access rule. - * - * @summary Creates or updates a network access rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRulePut.json - */ -async function nspAccessRulePut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const parameters = { - addressPrefixes: ["10.11.0.0/16", "10.10.1.0/24"], - direction: "Inbound", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspAccessRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesDeleteSample.js deleted file mode 100644 index 7d8db8bf8c39..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP access rule. - * - * @summary Deletes an NSP access rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleDelete.json - */ -async function nspAccessRulesDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.delete( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - ); - console.log(result); -} - -async function main() { - await nspAccessRulesDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesGetSample.js deleted file mode 100644 index 50f79d404bb0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified NSP access rule by name. - * - * @summary Gets the specified NSP access rule by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleGet.json - */ -async function nspAccessRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.get( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - ); - console.log(result); -} - -async function main() { - await nspAccessRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesListSample.js deleted file mode 100644 index c4e5cfd93213..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesListSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP access rules in the specified NSP profile. - * - * @summary Lists the NSP access rules in the specified NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleList.json - */ -async function nspAccessRulesList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAccessRules.list( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspAccessRulesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesReconcileSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesReconcileSample.js deleted file mode 100644 index b2fbc508f321..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAccessRulesReconcileSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Reconcile NSP access rules - * - * @summary Reconcile NSP access rules - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleReconcile.json - */ -async function nspAccessRuleReconcile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRuleName1"; - const parameters = { properties: {} }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.reconcile( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspAccessRuleReconcile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociableResourceTypesListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociableResourceTypesListSample.js deleted file mode 100644 index ee60463b991b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociableResourceTypesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter - * - * @summary Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PerimeterAssociableResourcesList.json - */ -async function networkSecurityPerimeterAssociableResourceTypes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAssociableResourceTypes.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkSecurityPerimeterAssociableResourceTypes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsCreateOrUpdateSample.js deleted file mode 100644 index 6986a48ae2de..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a NSP resource association. - * - * @summary Creates or updates a NSP resource association. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationPut.json - */ -async function nspAssociationPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const parameters = { - accessMode: "Enforced", - privateLinkResource: { - id: "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}", - }, - profile: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspAssociationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsDeleteSample.js deleted file mode 100644 index f57c445530c9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP association resource. - * - * @summary Deletes an NSP association resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationDelete.json - */ -async function nspAssociationDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - ); - console.log(result); -} - -async function main() { - await nspAssociationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsGetSample.js deleted file mode 100644 index 9510b8cf517c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified NSP association by name. - * - * @summary Gets the specified NSP association by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationGet.json - */ -async function nspAssociationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.get( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - ); - console.log(result); -} - -async function main() { - await nspAssociationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsListSample.js deleted file mode 100644 index d57d3701ae94..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP resource associations. - * - * @summary Lists the NSP resource associations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationList.json - */ -async function nspAssociationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAssociations.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspAssociationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsReconcileSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsReconcileSample.js deleted file mode 100644 index 902dcb340bed..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterAssociationsReconcileSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Reconcile NSP association - * - * @summary Reconcile NSP association - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationReconcile.json - */ -async function nspAssociationReconcile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const parameters = { properties: {} }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.reconcile( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspAssociationReconcile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesDeleteSample.js deleted file mode 100644 index fd13579304da..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP LinkReference resource. - * - * @summary Deletes an NSP LinkReference resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceDelete.json - */ -async function nspLinkReferenceDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const linkReferenceName = "link1-guid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinkReferences.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - ); - console.log(result); -} - -async function main() { - await nspLinkReferenceDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesGetSample.js deleted file mode 100644 index 3a18d3933abb..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified NSP linkReference resource. - * - * @summary Gets the specified NSP linkReference resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceGet.json - */ -async function nspLinkReferencesGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const linkReferenceName = "link1-guid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinkReferences.get( - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - ); - console.log(result); -} - -async function main() { - await nspLinkReferencesGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesListSample.js deleted file mode 100644 index 19ce5ca2436b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinkReferencesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP LinkReference resources in the specified network security perimeter. - * - * @summary Lists the NSP LinkReference resources in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceList.json - */ -async function nspLinkReferenceList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLinkReferences.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspLinkReferenceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksCreateOrUpdateSample.js deleted file mode 100644 index 7f4455459c77..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates NSP link resource. - * - * @summary Creates or updates NSP link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkPut.json - */ -async function nspLinksPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const parameters = { - autoApprovedRemotePerimeterResourceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp2", - localInboundProfiles: ["*"], - remoteInboundProfiles: ["*"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspLinksPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksDeleteSample.js deleted file mode 100644 index 334145033738..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP Link resource. - * - * @summary Deletes an NSP Link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkDelete.json - */ -async function nspLinkDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - ); - console.log(result); -} - -async function main() { - await nspLinkDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksGetSample.js deleted file mode 100644 index 54fb61a83c78..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified NSP link resource. - * - * @summary Gets the specified NSP link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkGet.json - */ -async function nspLinksGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.get( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - ); - console.log(result); -} - -async function main() { - await nspLinksGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksListSample.js deleted file mode 100644 index d13d96f72e6a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLinksListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP Link resources in the specified network security perimeter. - * - * @summary Lists the NSP Link resources in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkList.json - */ -async function nspLinkList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLinks.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspLinkList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index fd0733fccf67..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates NSP logging configuration. - * - * @summary Creates or updates NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationPut.json - */ -async function nspLoggingConfigurationPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const parameters = { - enabledLogCategories: [ - "NspPublicInboundPerimeterRulesDenied", - "NspPublicOutboundPerimeterRulesDenied", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLoggingConfigurations.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspLoggingConfigurationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsDeleteSample.js deleted file mode 100644 index 4b92253c5d3f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP Logging configuration. - * - * @summary Deletes an NSP Logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationDelete.json - */ -async function nspLoggingConfigurationDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLoggingConfigurations.delete( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - ); - console.log(result); -} - -async function main() { - await nspLoggingConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsGetSample.js deleted file mode 100644 index 784076282842..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the NSP logging configuration. - * - * @summary Gets the NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationGet.json - */ -async function nspLoggingConfigurationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLoggingConfigurations.get( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - ); - console.log(result); -} - -async function main() { - await nspLoggingConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsListSample.js deleted file mode 100644 index f6d6e79bd218..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterLoggingConfigurationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP logging configuration. - * - * @summary Lists the NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationList.json - */ -async function nspLoggingConfigurationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLoggingConfigurations.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspLoggingConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterOperationStatusesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterOperationStatusesGetSample.js deleted file mode 100644 index 485904a8bc13..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterOperationStatusesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the operation status for the given operation id. - * - * @summary Gets the operation status for the given operation id. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspOperationStatusGet.json - */ -async function nspOperationStatusGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "location1"; - const operationId = "operationId1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterOperationStatuses.get(location, operationId); - console.log(result); -} - -async function main() { - await nspOperationStatusGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesCreateOrUpdateSample.js deleted file mode 100644 index f47d22c21bab..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesCreateOrUpdateSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network profile. - * - * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfilePut.json - */ -async function nspProfilesPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const parameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspProfilesPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesDeleteSample.js deleted file mode 100644 index ba5208e1399d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP profile. - * - * @summary Deletes an NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileDelete.json - */ -async function nspProfilesDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.delete( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - ); - console.log(result); -} - -async function main() { - await nspProfilesDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesGetSample.js deleted file mode 100644 index 2e46c32fff98..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified NSP profile. - * - * @summary Gets the specified NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileGet.json - */ -async function nspProfilesGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.get( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - ); - console.log(result); -} - -async function main() { - await nspProfilesGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesListSample.js deleted file mode 100644 index 5a589f9778e1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterProfilesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP profiles in the specified network security perimeter. - * - * @summary Lists the NSP profiles in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileList.json - */ -async function nspProfilesList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterProfiles.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspProfilesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterServiceTagsListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterServiceTagsListSample.js deleted file mode 100644 index d1c4d1e33317..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimeterServiceTagsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. - * - * @summary Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspServiceTagsList.json - */ -async function nspServiceTagsList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterServiceTags.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspServiceTagsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersCreateOrUpdateSample.js deleted file mode 100644 index 3c6472bc0272..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersCreateOrUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a Network Security Perimeter. - * - * @summary Creates or updates a Network Security Perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterPut.json - */ -async function putNetworkSecurityPerimeter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const parameters = { location: "location1" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - parameters, - ); - console.log(result); -} - -async function main() { - await putNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersDeleteSample.js deleted file mode 100644 index f4442fcd6aae..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network security perimeter. - * - * @summary Deletes a network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterDelete.json - */ -async function networkSecurityPerimeterDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "testNSP1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - ); - console.log(result); -} - -async function main() { - await networkSecurityPerimeterDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersGetSample.js deleted file mode 100644 index 3170a17ebc03..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network security perimeter by the name. - * - * @summary Gets the specified network security perimeter by the name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterGet.json - */ -async function networkSecurityPerimeterGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.get( - resourceGroupName, - networkSecurityPerimeterName, - ); - console.log(result); -} - -async function main() { - await networkSecurityPerimeterGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersListBySubscriptionSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersListBySubscriptionSample.js deleted file mode 100644 index e486b5fe77b7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersListBySubscriptionSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network security perimeters in a subscription. - * - * @summary List all network security perimeters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterListAll.json - */ -async function networkSecurityPerimetersList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkSecurityPerimetersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersListSample.js deleted file mode 100644 index bf14bcaefbeb..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List network security perimeters in a resource group. - * - * @summary List network security perimeters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterList.json - */ -async function listNetworkSecurityPerimeter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeters.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersPatchSample.js b/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersPatchSample.js deleted file mode 100644 index 1e15ab39ae6c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkSecurityPerimetersPatchSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Patch Tags for a Network Security Perimeter. - * - * @summary Patch Tags for a Network Security Perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterPatch.json - */ -async function patchNetworkSecurityPerimeter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const parameters = { tags: { description: "nsp1" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.patch( - resourceGroupName, - networkSecurityPerimeterName, - parameters, - ); - console.log(result); -} - -async function main() { - await patchNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 030f7a62ec8e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * - * @summary Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionPut.json - */ -async function networkVirtualApplianceConnectionPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const networkVirtualApplianceConnectionParameters = { - namePropertiesName: "connection1", - asn: 64512, - bgpPeerAddress: ["169.254.16.13", "169.254.16.14"], - enableInternetSecurity: false, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - ], - labels: ["label1"], - }, - }, - tunnelIdentifier: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualApplianceConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - networkVirtualApplianceConnectionParameters, - ); - console.log(result); -} - -async function main() { - await networkVirtualApplianceConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsDeleteSample.js deleted file mode 100644 index a954d5a97354..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a NVA connection. - * - * @summary Deletes a NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionDelete.json - */ -async function networkVirtualApplianceConnectionDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualApplianceConnections.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - ); - console.log(result); -} - -async function main() { - await networkVirtualApplianceConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsGetSample.js deleted file mode 100644 index b17ad32392ac..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of specified NVA connection. - * - * @summary Retrieves the details of specified NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionGet.json - */ -async function networkVirtualApplianceConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualApplianceConnections.get( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - ); - console.log(result); -} - -async function main() { - await networkVirtualApplianceConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsListSample.js deleted file mode 100644 index aca067ac2989..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualApplianceConnectionsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists NetworkVirtualApplianceConnections under the NVA. - * - * @summary Lists NetworkVirtualApplianceConnections under the NVA. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionList.json - */ -async function networkVirtualApplianceConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualApplianceConnections.list( - resourceGroupName, - networkVirtualApplianceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkVirtualApplianceConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesCreateOrUpdateSample.js deleted file mode 100644 index 86c6fb817707..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesCreateOrUpdateSample.js +++ /dev/null @@ -1,468 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetBasicPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNic() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetIngressPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicIncludingInternetIngress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - internetIngressPublicIps: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/slbip", - }, - ], - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetNetworkProfilePut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicIncludingNetworkProfile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - networkProfile: { - networkInterfaceConfigurations: [ - { - nicType: "PublicNic", - properties: { - ipConfigurations: [ - { - name: "myPrimaryPublicIpConfig", - properties: { primary: true }, - }, - { - name: "myNonPrimaryPublicIpConfig", - properties: { primary: false }, - }, - ], - }, - }, - { - nicType: "PrivateNic", - properties: { - ipConfigurations: [ - { - name: "myPrimaryPrivateIpConfig", - properties: { primary: true }, - }, - { - name: "myNonPrimaryPrivateIpConfig", - properties: { primary: false }, - }, - ], - }, - }, - ], - }, - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetAdditionalPrivatePut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicAdditionalPrivateNic() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - { - name: "myAdditionalInterface", - type: ["AdditionalPrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetAdditionalPublicPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicAdditionalPublicNic() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - { - name: "myAdditionalPublicInterface", - type: ["AdditionalPublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualAppliancePut.json - */ -async function createNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - additionalNics: [{ name: "exrsdwan", hasPublicIp: true }], - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - internetIngressPublicIps: [ - { - id: "/subscriptions/{{subscriptionId}}/resourceGroups/{{rg}}/providers/Microsoft.Network/publicIPAddresses/slbip", - }, - ], - location: "West US", - networkProfile: { - networkInterfaceConfigurations: [ - { - nicType: "PublicNic", - properties: { - ipConfigurations: [ - { name: "publicnicipconfig", properties: { primary: true } }, - { name: "publicnicipconfig-2", properties: { primary: false } }, - ], - }, - }, - { - nicType: "PrivateNic", - properties: { - ipConfigurations: [ - { name: "privatenicipconfig", properties: { primary: true } }, - { name: "privatenicipconfig-2", properties: { primary: false } }, - ], - }, - }, - ], - }, - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "12.1", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSaaSPut.json - */ -async function createSaaSNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - delegation: { serviceName: "PaloAltoNetworks.Cloudngfw/firewalls" }, - location: "West US", - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNvaInVNetWithPrivateNicPublicNic(); - await createNvaInVNetWithPrivateNicPublicNicIncludingInternetIngress(); - await createNvaInVNetWithPrivateNicPublicNicIncludingNetworkProfile(); - await createNvaInVNetWithPrivateNicPublicNicAdditionalPrivateNic(); - await createNvaInVNetWithPrivateNicPublicNicAdditionalPublicNic(); - await createNetworkVirtualAppliance(); - await createSaaSNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesDeleteSample.js deleted file mode 100644 index 4cfa05f83fd6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Network Virtual Appliance. - * - * @summary Deletes the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceDelete.json - */ -async function deleteNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesGetBootDiagnosticLogsSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesGetBootDiagnosticLogsSample.js deleted file mode 100644 index 5e7910a5171a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesGetBootDiagnosticLogsSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. - * - * @summary Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceBootDiagnostics.json - */ -async function retrieveBootDiagnosticLogsForAGivenNvaVmssInstance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const request = { - consoleScreenshotStorageSasUrl: - "https://blobcortextesturl.blob.core.windows.net/nvaBootDiagContainer/consoleScreenshot.png?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - instanceId: 0, - serialConsoleStorageSasUrl: - "https://blobcortextesturl.blob.core.windows.net/nvaBootDiagContainer/serialLogs.txt?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginGetBootDiagnosticLogsAndWait( - resourceGroupName, - networkVirtualApplianceName, - request, - ); - console.log(result); -} - -async function main() { - await retrieveBootDiagnosticLogsForAGivenNvaVmssInstance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesGetSample.js deleted file mode 100644 index 750974904d03..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Network Virtual Appliance. - * - * @summary Gets the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceGet.json - */ -async function getNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.get( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main() { - await getNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesListByResourceGroupSample.js deleted file mode 100644 index eaafbfae4208..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Network Virtual Appliances in a resource group. - * - * @summary Lists all Network Virtual Appliances in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceListByResourceGroup.json - */ -async function listAllNetworkVirtualApplianceForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualAppliances.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkVirtualApplianceForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesListSample.js deleted file mode 100644 index 1e27121b7ff8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all Network Virtual Appliances in a subscription. - * - * @summary Gets all Network Virtual Appliances in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceListBySubscription.json - */ -async function listAllNetworkVirtualAppliancesForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualAppliances.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkVirtualAppliancesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesReimageSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesReimageSample.js deleted file mode 100644 index d242e009e093..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesReimageSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Reimages one VM belonging to the specified Network Virtual Appliance. - * - * @summary Reimages one VM belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSpecificReimage.json - */ -async function reimagesSpecificNetworkVirtualApplianceVMSInVMScaleSet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginReimageAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main() { - await reimagesSpecificNetworkVirtualApplianceVMSInVMScaleSet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesRestartSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesRestartSample.js deleted file mode 100644 index d315f1861a0c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesRestartSample.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * - * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceEmptyRestart.json - */ -async function restartAllNetworkVirtualApplianceVMSInVMScaleSet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginRestartAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * - * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSpecificRestart.json - */ -async function restartSpecificNetworkVirtualApplianceVMSInVMScaleSet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginRestartAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main() { - await restartAllNetworkVirtualApplianceVMSInVMScaleSet(); - await restartSpecificNetworkVirtualApplianceVMSInVMScaleSet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesUpdateTagsSample.js deleted file mode 100644 index 5d96fd6f5119..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkVirtualAppliancesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a Network Virtual Appliance. - * - * @summary Updates a Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceUpdateTags.json - */ -async function updateNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.updateTags( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersCheckConnectivitySample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersCheckConnectivitySample.js deleted file mode 100644 index 94499cb6d9a4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersCheckConnectivitySample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * - * @summary Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectivityCheck.json - */ -async function checkConnectivity() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - destination: { address: "192.168.100.4", port: 3389 }, - preferredIPVersion: "IPv4", - source: { - resourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginCheckConnectivityAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await checkConnectivity(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersCreateOrUpdateSample.js deleted file mode 100644 index ae97be1c201f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersCreateOrUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network watcher in the specified resource group. - * - * @summary Creates or updates a network watcher in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherCreate.json - */ -async function createNetworkWatcher() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.createOrUpdate( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersDeleteSample.js deleted file mode 100644 index 1c215c4beed3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified network watcher resource. - * - * @summary Deletes the specified network watcher resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherDelete.json - */ -async function deleteNetworkWatcher() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetAzureReachabilityReportSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetAzureReachabilityReportSample.js deleted file mode 100644 index 4dd4da16fdc7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetAzureReachabilityReportSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @summary NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherAzureReachabilityReportGet.json - */ -async function getAzureReachabilityReport() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - azureLocations: ["West US"], - endTime: new Date("2017-09-10T00:00:00Z"), - providerLocation: { country: "United States", state: "washington" }, - providers: ["Frontier Communications of America, Inc. - ASN 5650"], - startTime: new Date("2017-09-07T00:00:00Z"), - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetAzureReachabilityReportAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getAzureReachabilityReport(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetFlowLogStatusSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetFlowLogStatusSample.js deleted file mode 100644 index 174ad3f36299..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetFlowLogStatusSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Queries status of flow log and traffic analytics (optional) on a specified resource. - * - * @summary Queries status of flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogStatusQuery.json - */ -async function getFlowLogStatus() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetFlowLogStatusAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getFlowLogStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js deleted file mode 100644 index 178d5ea4ec58..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * - * @summary Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json - */ -async function networkConfigurationDiagnostic() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - profiles: [ - { - destination: "12.11.12.14", - destinationPort: "12100", - direction: "Inbound", - source: "10.1.0.4", - protocol: "TCP", - }, - ], - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetNetworkConfigurationDiagnosticAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await networkConfigurationDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetNextHopSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetNextHopSample.js deleted file mode 100644 index 7d70bff4ead9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetNextHopSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the next hop from the specified VM. - * - * @summary Gets the next hop from the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherNextHopGet.json - */ -async function getNextHop() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - destinationIPAddress: "10.0.0.10", - sourceIPAddress: "10.0.0.5", - targetNicResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetNextHopAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getNextHop(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetSample.js deleted file mode 100644 index 60d64ac6d199..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network watcher by resource group. - * - * @summary Gets the specified network watcher by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherGet.json - */ -async function getNetworkWatcher() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.get(resourceGroupName, networkWatcherName); - console.log(result); -} - -async function main() { - await getNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTopologySample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTopologySample.js deleted file mode 100644 index eccc4b1ed3d5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTopologySample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the current network topology by resource group. - * - * @summary Gets the current network topology by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTopologyGet.json - */ -async function getTopology() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { targetResourceGroupName: "rg2" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.getTopology( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getTopology(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTroubleshootingResultSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTroubleshootingResultSample.js deleted file mode 100644 index f54231f44b65..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTroubleshootingResultSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the last completed troubleshooting result on a specified resource. - * - * @summary Get the last completed troubleshooting result on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTroubleshootResultQuery.json - */ -async function getTroubleshootResult() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetTroubleshootingResultAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getTroubleshootResult(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTroubleshootingSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTroubleshootingSample.js deleted file mode 100644 index fa4bc1c1462b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetTroubleshootingSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Initiate troubleshooting on a specified resource. - * - * @summary Initiate troubleshooting on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTroubleshootGet.json - */ -async function getTroubleshooting() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", - storagePath: "https://st1.blob.core.windows.net/cn1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetTroubleshootingAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getTroubleshooting(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetVMSecurityRulesSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetVMSecurityRulesSample.js deleted file mode 100644 index e2169a2360c7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersGetVMSecurityRulesSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the configured and effective security group rules on the specified VM. - * - * @summary Gets the configured and effective security group rules on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherSecurityGroupViewGet.json - */ -async function getSecurityGroupView() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetVMSecurityRulesAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getSecurityGroupView(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersListAllSample.js deleted file mode 100644 index b7972fa400df..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network watchers by subscription. - * - * @summary Gets all network watchers by subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherListAll.json - */ -async function listAllNetworkWatchers() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkWatchers.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkWatchers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersListAvailableProvidersSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersListAvailableProvidersSample.js deleted file mode 100644 index 8c2d7af1bc29..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersListAvailableProvidersSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * - * @summary NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherAvailableProvidersListGet.json - */ -async function getAvailableProvidersList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - azureLocations: ["West US"], - city: "seattle", - country: "United States", - state: "washington", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginListAvailableProvidersAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getAvailableProvidersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersListSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersListSample.js deleted file mode 100644 index b89e01d3e453..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network watchers by resource group. - * - * @summary Gets all network watchers by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherList.json - */ -async function listNetworkWatchers() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkWatchers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkWatchers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersSetFlowLogConfigurationSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersSetFlowLogConfigurationSample.js deleted file mode 100644 index e79d441869ea..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersSetFlowLogConfigurationSample.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Configures flow log and traffic analytics (optional) on a specified resource. - * - * @summary Configures flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogConfigure.json - */ -async function configureFlowLog() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - enabled: true, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": - {}, - }, - }, - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginSetFlowLogConfigurationAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await configureFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersUpdateTagsSample.js deleted file mode 100644 index c2b879a3270e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a network watcher tags. - * - * @summary Updates a network watcher tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherUpdateTags.json - */ -async function updateNetworkWatcherTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.updateTags( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateNetworkWatcherTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/networkWatchersVerifyIPFlowSample.js b/sdk/network/arm-network/samples/v35/javascript/networkWatchersVerifyIPFlowSample.js deleted file mode 100644 index 4fbb509d1ccd..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/networkWatchersVerifyIPFlowSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * - * @summary Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherIpFlowVerify.json - */ -async function ipFlowVerify() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - direction: "Outbound", - localIPAddress: "10.2.0.4", - localPort: "80", - remoteIPAddress: "121.10.1.1", - remotePort: "80", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - protocol: "TCP", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginVerifyIPFlowAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await ipFlowVerify(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/operationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/operationsListSample.js deleted file mode 100644 index c3a7a7721fe3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/operationsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all of the available Network Rest API operations. - * - * @summary Lists all of the available Network Rest API operations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/OperationList.json - */ -async function getAListOfOperationsForAResourceProvider() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAListOfOperationsForAResourceProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysCreateOrUpdateSample.js deleted file mode 100644 index 4ae7f4de094e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * - * @summary Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayPut.json - */ -async function p2SVpnGatewayPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const p2SVpnGatewayParameters = { - customDnsServers: ["1.1.1.1", "2.2.2.2"], - isRoutingPreferenceInternet: false, - location: "West US", - p2SConnectionConfigurations: [ - { - name: "P2SConnectionConfig1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/p2sVpnGateways/p2sVpnGateway1/p2sConnectionConfigurations/P2SConnectionConfig1", - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - vnetRoutes: { staticRoutes: [] }, - }, - vpnClientAddressPool: { addressPrefixes: ["101.3.0.0/16"] }, - }, - ], - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", - }, - vpnGatewayScaleUnit: 1, - vpnServerConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - ); - console.log(result); -} - -async function main() { - await p2SVpnGatewayPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysDeleteSample.js deleted file mode 100644 index 62e1c47af240..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a virtual wan p2s vpn gateway. - * - * @summary Deletes a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayDelete.json - */ -async function p2SVpnGatewayDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginDeleteAndWait(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await p2SVpnGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js b/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js deleted file mode 100644 index 7b7b9b3d4e0b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json - */ -async function disconnectVpnConnectionsFromP2SVpnGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vpn-gateway-test"; - const p2SVpnGatewayName = "p2svpngateway"; - const request = { - vpnConnectionIds: ["vpnconnId1", "vpnconnId2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginDisconnectP2SVpnConnectionsAndWait( - resourceGroupName, - p2SVpnGatewayName, - request, - ); - console.log(result); -} - -async function main() { - await disconnectVpnConnectionsFromP2SVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js b/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js deleted file mode 100644 index 359ed780d538..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * - * @summary Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGenerateVpnProfile.json - */ -async function generateP2SVpnGatewayVpnprofile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const parameters = { - authenticationMethod: "EAPTLS", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginGenerateVpnProfileAndWait( - resourceGroupName, - gatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await generateP2SVpnGatewayVpnprofile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js b/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js deleted file mode 100644 index aab016756041..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json - */ -async function p2SVpnGatewayGetConnectionHealthDetailed() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vpn-gateway-test"; - const gatewayName = "p2svpngateway"; - const request = { - outputBlobSasUrl: - "https://blobcortextesturl.blob.core.windows.net/folderforconfig/p2sconnectionhealths?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - vpnUserNamesFilter: ["vpnUser1", "vpnUser2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginGetP2SVpnConnectionHealthDetailedAndWait( - resourceGroupName, - gatewayName, - request, - ); - console.log(result); -} - -async function main() { - await p2SVpnGatewayGetConnectionHealthDetailed(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js b/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js deleted file mode 100644 index e487f0043c9e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGetConnectionHealth.json - */ -async function p2SVpnGatewayGetConnectionHealth() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginGetP2SVpnConnectionHealthAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main() { - await p2SVpnGatewayGetConnectionHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetSample.js b/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetSample.js deleted file mode 100644 index 8ba05828b2d4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a virtual wan p2s vpn gateway. - * - * @summary Retrieves the details of a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGet.json - */ -async function p2SVpnGatewayGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.get(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await p2SVpnGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysListByResourceGroupSample.js deleted file mode 100644 index 094cc791fb2d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the P2SVpnGateways in a resource group. - * - * @summary Lists all the P2SVpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayListByResourceGroup.json - */ -async function p2SVpnGatewayListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.p2SVpnGateways.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await p2SVpnGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysListSample.js b/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysListSample.js deleted file mode 100644 index 5b056a2952d1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the P2SVpnGateways in a subscription. - * - * @summary Lists all the P2SVpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayList.json - */ -async function p2SVpnGatewayListBySubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.p2SVpnGateways.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await p2SVpnGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysResetSample.js b/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysResetSample.js deleted file mode 100644 index dd17fc79c27f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysResetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the primary of the p2s vpn gateway in the specified resource group. - * - * @summary Resets the primary of the p2s vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayReset.json - */ -async function resetP2SVpnGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginResetAndWait(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await resetP2SVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysUpdateTagsSample.js deleted file mode 100644 index 0f2e469fc598..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/p2SVpnGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates virtual wan p2s vpn gateway tags. - * - * @summary Updates virtual wan p2s vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayUpdateTags.json - */ -async function p2SVpnGatewayUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const p2SVpnGatewayParameters = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginUpdateTagsAndWait( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - ); - console.log(result); -} - -async function main() { - await p2SVpnGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/package.json b/sdk/network/arm-network/samples/v35/javascript/package.json deleted file mode 100644 index 39e3b4d5a5b0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "@azure-samples/arm-network-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=20.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/network/arm-network" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic", - "cloud" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network", - "dependencies": { - "@azure/arm-network": "latest", - "dotenv": "latest", - "@azure/identity": "^4.11.1" - }, - "devDependencies": { - "cross-env": "latest" - } -} diff --git a/sdk/network/arm-network/samples/v35/javascript/packetCapturesCreateSample.js b/sdk/network/arm-network/samples/v35/javascript/packetCapturesCreateSample.js deleted file mode 100644 index 2e09658d026b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/packetCapturesCreateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create and start a packet capture on the specified VM. - * - * @summary Create and start a packet capture on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureCreate.json - */ -async function createPacketCapture() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const parameters = { - bytesToCapturePerPacket: 10000, - filters: [{ localIPAddress: "10.0.0.4", localPort: "80", protocol: "TCP" }], - storageLocation: { - filePath: "D:\\capture\\pc1.cap", - storageId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/pcstore", - storagePath: "https://mytestaccountname.blob.core.windows.net/capture/pc1.cap", - }, - target: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - timeLimitInSeconds: 100, - totalBytesPerSession: 100000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginCreateAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/packetCapturesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/packetCapturesDeleteSample.js deleted file mode 100644 index 8477cb9a56ad..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/packetCapturesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified packet capture session. - * - * @summary Deletes the specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureDelete.json - */ -async function deletePacketCapture() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main() { - await deletePacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/packetCapturesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/packetCapturesGetSample.js deleted file mode 100644 index 35151b02bd95..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/packetCapturesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a packet capture session by name. - * - * @summary Gets a packet capture session by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureGet.json - */ -async function getPacketCapture() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.get( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main() { - await getPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/packetCapturesGetStatusSample.js b/sdk/network/arm-network/samples/v35/javascript/packetCapturesGetStatusSample.js deleted file mode 100644 index d9de17d75523..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/packetCapturesGetStatusSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Query the status of a running packet capture session. - * - * @summary Query the status of a running packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureQueryStatus.json - */ -async function queryPacketCaptureStatus() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginGetStatusAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main() { - await queryPacketCaptureStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/packetCapturesListSample.js b/sdk/network/arm-network/samples/v35/javascript/packetCapturesListSample.js deleted file mode 100644 index bf80eae44b9c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/packetCapturesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all packet capture sessions within the specified resource group. - * - * @summary Lists all packet capture sessions within the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCapturesList.json - */ -async function listPacketCaptures() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.packetCaptures.list(resourceGroupName, networkWatcherName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPacketCaptures(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/packetCapturesStopSample.js b/sdk/network/arm-network/samples/v35/javascript/packetCapturesStopSample.js deleted file mode 100644 index ab4ee9c586eb..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/packetCapturesStopSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops a specified packet capture session. - * - * @summary Stops a specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureStop.json - */ -async function stopPacketCapture() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginStopAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main() { - await stopPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/peerExpressRouteCircuitConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/peerExpressRouteCircuitConnectionsGetSample.js deleted file mode 100644 index 3e75b9066512..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/peerExpressRouteCircuitConnectionsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * - * @summary Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PeerExpressRouteCircuitConnectionGet.json - */ -async function peerExpressRouteCircuitConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "60aee347-e889-4a42-8c1b-0aae8b1e4013"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.peerExpressRouteCircuitConnections.get( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main() { - await peerExpressRouteCircuitConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/peerExpressRouteCircuitConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/peerExpressRouteCircuitConnectionsListSample.js deleted file mode 100644 index 88a51fb7baba..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/peerExpressRouteCircuitConnectionsListSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all global reach peer connections associated with a private peering in an express route circuit. - * - * @summary Gets all global reach peer connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PeerExpressRouteCircuitConnectionList.json - */ -async function listPeerExpressRouteCircuitConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.peerExpressRouteCircuitConnections.list( - resourceGroupName, - circuitName, - peeringName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPeerExpressRouteCircuitConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js deleted file mode 100644 index 0f242f5110e6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a private dns zone group in the specified private endpoint. - * - * @summary Creates or updates a private dns zone group in the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupCreate.json - */ -async function createPrivateDnsZoneGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const parameters = { - privateDnsZoneConfigs: [ - { - privateDnsZoneId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/zone1.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsDeleteSample.js deleted file mode 100644 index 4bda33100a27..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified private dns zone group. - * - * @summary Deletes the specified private dns zone group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupDelete.json - */ -async function deletePrivateDnsZoneGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.beginDeleteAndWait( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - ); - console.log(result); -} - -async function main() { - await deletePrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsGetSample.js deleted file mode 100644 index fb22402647d5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the private dns zone group resource by specified private dns zone group name. - * - * @summary Gets the private dns zone group resource by specified private dns zone group name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupGet.json - */ -async function getPrivateDnsZoneGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.get( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - ); - console.log(result); -} - -async function main() { - await getPrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsListSample.js b/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsListSample.js deleted file mode 100644 index d273612b06d6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateDnsZoneGroupsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private dns zone groups in a private endpoint. - * - * @summary Gets all private dns zone groups in a private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupList.json - */ -async function listPrivateEndpointsInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const privateEndpointName = "testPe"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateDnsZoneGroups.list( - privateEndpointName, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPrivateEndpointsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateEndpointsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/privateEndpointsCreateOrUpdateSample.js deleted file mode 100644 index 347c173e3783..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateEndpointsCreateOrUpdateSample.js +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointCreate.json - */ -async function createPrivateEndpoint() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters = { - customNetworkInterfaceName: "testPeNic", - ipConfigurations: [ - { - name: "pestaticconfig", - groupId: "file", - memberName: "file", - privateIPAddress: "192.168.0.6", - }, - ], - ipVersionType: "IPv4", - location: "eastus2euap", - privateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointCreateWithASG.json - */ -async function createPrivateEndpointWithApplicationSecurityGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters = { - applicationSecurityGroups: [ - { - id: "/subscriptions/subId/resourceGroups/rg1/provders/Microsoft.Network/applicationSecurityGroup/asg1", - }, - ], - location: "eastus2euap", - privateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointCreateForManualApproval.json - */ -async function createPrivateEndpointWithManualApprovalConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters = { - customNetworkInterfaceName: "testPeNic", - ipConfigurations: [ - { - name: "pestaticconfig", - groupId: "file", - memberName: "file", - privateIPAddress: "192.168.0.5", - }, - ], - location: "eastus", - manualPrivateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please manually approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPrivateEndpoint(); - await createPrivateEndpointWithApplicationSecurityGroups(); - await createPrivateEndpointWithManualApprovalConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateEndpointsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/privateEndpointsDeleteSample.js deleted file mode 100644 index 7750c66d9281..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateEndpointsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified private endpoint. - * - * @summary Deletes the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDelete.json - */ -async function deletePrivateEndpoint() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginDeleteAndWait( - resourceGroupName, - privateEndpointName, - ); - console.log(result); -} - -async function main() { - await deletePrivateEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateEndpointsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/privateEndpointsGetSample.js deleted file mode 100644 index 9c437f283766..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateEndpointsGetSample.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointGet.json - */ -async function getPrivateEndpoint() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get(resourceGroupName, privateEndpointName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointGetWithASG.json - */ -async function getPrivateEndpointWithApplicationSecurityGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get(resourceGroupName, privateEndpointName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointGetForManualApproval.json - */ -async function getPrivateEndpointWithManualApprovalConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get(resourceGroupName, privateEndpointName); - console.log(result); -} - -async function main() { - await getPrivateEndpoint(); - await getPrivateEndpointWithApplicationSecurityGroups(); - await getPrivateEndpointWithManualApprovalConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateEndpointsListBySubscriptionSample.js b/sdk/network/arm-network/samples/v35/javascript/privateEndpointsListBySubscriptionSample.js deleted file mode 100644 index 5bc09f1742c0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateEndpointsListBySubscriptionSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private endpoints in a subscription. - * - * @summary Gets all private endpoints in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointListAll.json - */ -async function listAllPrivateEndpoints() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateEndpoints.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllPrivateEndpoints(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateEndpointsListSample.js b/sdk/network/arm-network/samples/v35/javascript/privateEndpointsListSample.js deleted file mode 100644 index 78089305e01d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateEndpointsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private endpoints in a resource group. - * - * @summary Gets all private endpoints in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointList.json - */ -async function listPrivateEndpointsInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateEndpoints.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPrivateEndpointsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js deleted file mode 100644 index 160cb98e20c0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks whether the subscription is visible to private link service in the specified resource group. - * - * @summary Checks whether the subscription is visible to private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json - */ -async function checkPrivateLinkServiceVisibility() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const parameters = { - privateLinkServiceAlias: "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.beginCheckPrivateLinkServiceVisibilityByResourceGroupAndWait( - location, - resourceGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await checkPrivateLinkServiceVisibility(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js deleted file mode 100644 index 97754cd067bb..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks whether the subscription is visible to private link service. - * - * @summary Checks whether the subscription is visible to private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckPrivateLinkServiceVisibility.json - */ -async function checkPrivateLinkServiceVisibility() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const parameters = { - privateLinkServiceAlias: "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginCheckPrivateLinkServiceVisibilityAndWait( - location, - parameters, - ); - console.log(result); -} - -async function main() { - await checkPrivateLinkServiceVisibility(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCreateOrUpdateSample.js deleted file mode 100644 index 2e478c5c8acc..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesCreateOrUpdateSample.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an private link service in the specified resource group. - * - * @summary Creates or updates an private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceCreate.json - */ -async function createPrivateLinkService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const parameters = { - autoApproval: { subscriptions: ["subscription1", "subscription2"] }, - fqdns: ["fqdn1", "fqdn2", "fqdn3"], - ipConfigurations: [ - { - name: "fe-lb", - privateIPAddress: "10.0.1.4", - privateIPAddressVersion: "IPv4", - privateIPAllocationMethod: "Static", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - loadBalancerFrontendIpConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - ], - location: "eastus", - visibility: { - subscriptions: ["subscription1", "subscription2", "subscription3"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js deleted file mode 100644 index cd54d95d03d1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete private end point connection for a private link service in a subscription. - * - * @summary Delete private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json - */ -async function deletePrivateEndPointConnectionForAPrivateLinkService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginDeletePrivateEndpointConnectionAndWait( - resourceGroupName, - serviceName, - peConnectionName, - ); - console.log(result); -} - -async function main() { - await deletePrivateEndPointConnectionForAPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesDeleteSample.js deleted file mode 100644 index 925f26bb3d30..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified private link service. - * - * @summary Deletes the specified private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceDelete.json - */ -async function deletePrivateLinkService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginDeleteAndWait( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main() { - await deletePrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js deleted file mode 100644 index f8e43f79b454..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specific private end point connection by specific private link service in the resource group. - * - * @summary Get the specific private end point connection by specific private link service in the resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json - */ -async function getPrivateEndPointConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.getPrivateEndpointConnection( - resourceGroupName, - serviceName, - peConnectionName, - ); - console.log(result); -} - -async function main() { - await getPrivateEndPointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesGetSample.js deleted file mode 100644 index 63ebcb23fa82..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified private link service by resource group. - * - * @summary Gets the specified private link service by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceGet.json - */ -async function getPrivateLinkService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.get(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await getPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js deleted file mode 100644 index e968224a67c4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * - * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json - */ -async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listAutoApprovedPrivateLinkServicesByResourceGroup( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js deleted file mode 100644 index 67d5efc6e488..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * - * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AutoApprovedPrivateLinkServicesGet.json - */ -async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listAutoApprovedPrivateLinkServices( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListBySubscriptionSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListBySubscriptionSample.js deleted file mode 100644 index 3043c61d46dc..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListBySubscriptionSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private link service in a subscription. - * - * @summary Gets all private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceListAll.json - */ -async function listAllPrivateListService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllPrivateListService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js deleted file mode 100644 index e7b099894ba3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private end point connections for a specific private link service. - * - * @summary Gets all private end point connections for a specific private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json - */ -async function listPrivateLinkServiceInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listPrivateEndpointConnections( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPrivateLinkServiceInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListSample.js deleted file mode 100644 index 6d495d4156d3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private link services in a resource group. - * - * @summary Gets all private link services in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceList.json - */ -async function listPrivateLinkServiceInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPrivateLinkServiceInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js b/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js deleted file mode 100644 index 93f87e367784..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Approve or reject private end point connection for a private link service in a subscription. - * - * @summary Approve or reject private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json - */ -async function approveOrRejectPrivateEndPointConnectionForAPrivateLinkService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const parameters = { - name: "testPlePeConnection", - privateEndpoint: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe", - }, - privateLinkServiceConnectionState: { - description: "approved it for some reason.", - status: "Approved", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.updatePrivateEndpointConnection( - resourceGroupName, - serviceName, - peConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await approveOrRejectPrivateEndPointConnectionForAPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesCreateOrUpdateSample.js deleted file mode 100644 index c852775d2fd2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesCreateOrUpdateSample.js +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDns.json - */ -async function createPublicIPAddressDns() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { - dnsSettings: { domainNameLabel: "dnslbl" }, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json - */ -async function createPublicIPAddressDnsWithDomainNameLabelScope() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { - dnsSettings: { - domainNameLabel: "dnslbl", - domainNameLabelScope: "TenantReuse", - }, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateCustomizedValues.json - */ -async function createPublicIPAddressAllocationMethod() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { - idleTimeoutInMinutes: 10, - location: "eastus", - publicIPAddressVersion: "IPv4", - publicIPAllocationMethod: "Static", - sku: { name: "Standard", tier: "Global" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDefaults.json - */ -async function createPublicIPAddressDefaults() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDefaultsStandardV2Sku.json - */ -async function createPublicIPAddressDefaultsWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPublicIPAddressDns(); - await createPublicIPAddressDnsWithDomainNameLabelScope(); - await createPublicIPAddressAllocationMethod(); - await createPublicIPAddressDefaults(); - await createPublicIPAddressDefaultsWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDdosProtectionStatusSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDdosProtectionStatusSample.js deleted file mode 100644 index aa2a663b3dcf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDdosProtectionStatusSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the Ddos Protection Status of a Public IP Address - * - * @summary Gets the Ddos Protection Status of a Public IP Address - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressGetDdosProtectionStatus.json - */ -async function getDdosProtectionStatusOfAPublicIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-pip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginDdosProtectionStatusAndWait( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -async function main() { - await getDdosProtectionStatusOfAPublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDeleteSample.js deleted file mode 100644 index 9a7068dc26aa..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified public IP address. - * - * @summary Deletes the specified public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressDelete.json - */ -async function deletePublicIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginDeleteAndWait( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -async function main() { - await deletePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js deleted file mode 100644 index e3c538f2013c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. - * - * @summary Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressDisassociateCloudServiceReservedPublicIp.json - */ -async function disassociatePublicIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "pip1"; - const parameters = { - publicIpArmId: - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/publicIpAddresses/pip2", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.beginDisassociateCloudServiceReservedPublicIpAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main() { - await disassociatePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js deleted file mode 100644 index 43e82e70a847..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified public IP address in a cloud service. - * - * @summary Get the specified public IP address in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServicePublicIpGet.json - */ -async function getVmssPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const roleInstanceName = "Test_VM_0"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const publicIpAddressName = "pub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.getCloudServicePublicIPAddress( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - ); - console.log(result); -} - -async function main() { - await getVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetSample.js deleted file mode 100644 index f09d1b0abcb1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified public IP address in a specified resource group. - * - * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressGet.json - */ -async function getPublicIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "testDNS-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.get(resourceGroupName, publicIpAddressName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified public IP address in a specified resource group. - * - * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressGetStandardV2Sku.json - */ -async function getPublicIPAddressWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "testDNS-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.get(resourceGroupName, publicIpAddressName); - console.log(result); -} - -async function main() { - await getPublicIPAddress(); - await getPublicIPAddressWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js deleted file mode 100644 index b155ee8ff5ae..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified public IP address in a virtual machine scale set. - * - * @summary Get the specified public IP address in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssPublicIpGet.json - */ -async function getVmssPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const publicIpAddressName = "pub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.getVirtualMachineScaleSetPublicIPAddress( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - ); - console.log(result); -} - -async function main() { - await getVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListAllSample.js deleted file mode 100644 index 30271ea8ae99..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the public IP addresses in a subscription. - * - * @summary Gets all the public IP addresses in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressListAll.json - */ -async function listAllPublicIPAddresses() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllPublicIPAddresses(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js deleted file mode 100644 index f7fbd19e3752..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all public IP addresses on a cloud service level. - * - * @summary Gets information about all public IP addresses on a cloud service level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServicePublicIpListAll.json - */ -async function listVmssPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listCloudServicePublicIPAddresses( - resourceGroupName, - cloudServiceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js deleted file mode 100644 index 955e77e8455d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * - * @summary Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceRoleInstancePublicIpList.json - */ -async function listVmssvmPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const roleInstanceName = "Test_VM_0"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listCloudServiceRoleInstancePublicIPAddresses( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVmssvmPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListSample.js deleted file mode 100644 index 47d551dadebf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all public IP addresses in a resource group. - * - * @summary Gets all public IP addresses in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressList.json - */ -async function listResourceGroupPublicIPAddresses() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listResourceGroupPublicIPAddresses(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js deleted file mode 100644 index fb93ab025d20..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all public IP addresses on a virtual machine scale set level. - * - * @summary Gets information about all public IP addresses on a virtual machine scale set level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssPublicIpListAll.json - */ -async function listVmssPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listVirtualMachineScaleSetPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js deleted file mode 100644 index de6f5c51e02c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * - * @summary Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssVmPublicIpList.json - */ -async function listVmssvmPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listVirtualMachineScaleSetVMPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVmssvmPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesReserveCloudServicePublicIPAddressSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesReserveCloudServicePublicIPAddressSample.js deleted file mode 100644 index b4c8b1b35a9d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesReserveCloudServicePublicIPAddressSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. - * - * @summary Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressReserve.json - */ -async function reservePublicIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { - isRollback: "false", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginReserveCloudServicePublicIpAddressAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main() { - await reservePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesUpdateTagsSample.js deleted file mode 100644 index 7a1223568997..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPAddressesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates public IP address tags. - * - * @summary Updates public IP address tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressUpdateTags.json - */ -async function updatePublicIPAddressTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.updateTags( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main() { - await updatePublicIPAddressTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesCreateOrUpdateSample.js deleted file mode 100644 index 0ed575cb50be..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesCreateOrUpdateSample.js +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixCreateCustomizedValues.json - */ -async function createPublicIPPrefixAllocationMethod() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters = { - location: "westus", - prefixLength: 30, - publicIPAddressVersion: "IPv4", - sku: { name: "Standard", tier: "Regional" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixCreateDefaults.json - */ -async function createPublicIPPrefixDefaults() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters = { - location: "westus", - prefixLength: 30, - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixCreateDefaultsStandardV2Sku.json - */ -async function createPublicIPPrefixDefaultsWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters = { - location: "westus", - prefixLength: 30, - sku: { name: "StandardV2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPublicIPPrefixAllocationMethod(); - await createPublicIPPrefixDefaults(); - await createPublicIPPrefixDefaultsWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesDeleteSample.js deleted file mode 100644 index 4f1ba662c53f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified public IP prefix. - * - * @summary Deletes the specified public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixDelete.json - */ -async function deletePublicIPPrefix() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginDeleteAndWait( - resourceGroupName, - publicIpPrefixName, - ); - console.log(result); -} - -async function main() { - await deletePublicIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesGetSample.js deleted file mode 100644 index af11e514f2ef..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. - * - * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixGet.json - */ -async function getPublicIPPrefix() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.get(resourceGroupName, publicIpPrefixName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. - * - * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixGetStandardV2Sku.json - */ -async function getPublicIPPrefixWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.get(resourceGroupName, publicIpPrefixName); - console.log(result); -} - -async function main() { - await getPublicIPPrefix(); - await getPublicIPPrefixWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesListAllSample.js deleted file mode 100644 index a2c7d501c91a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the public IP prefixes in a subscription. - * - * @summary Gets all the public IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixListAll.json - */ -async function listAllPublicIPPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPPrefixes.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllPublicIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesListSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesListSample.js deleted file mode 100644 index 0d49266158e8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all public IP prefixes in a resource group. - * - * @summary Gets all public IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixList.json - */ -async function listResourceGroupPublicIPPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPPrefixes.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listResourceGroupPublicIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesUpdateTagsSample.js deleted file mode 100644 index 2543e51dcba5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/publicIPPrefixesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates public IP prefix tags. - * - * @summary Updates public IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixUpdateTags.json - */ -async function updatePublicIPPrefixTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.updateTags( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main() { - await updatePublicIPPrefixTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/putBastionShareableLinkSample.js b/sdk/network/arm-network/samples/v35/javascript/putBastionShareableLinkSample.js deleted file mode 100644 index 5622543591c0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/putBastionShareableLinkSample.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Creates a Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkCreate.json - */ -async function createBastionShareableLinksForTheRequestVMS() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.beginListPutBastionShareableLinkAndWait( - resourceGroupName, - bastionHostName, - bslRequest, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await createBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsCreateSample.js b/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsCreateSample.js deleted file mode 100644 index 0cde23bf5245..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsCreateSample.js +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates Reachability Analysis Intent. - * - * @summary Creates Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentPut.json - */ -async function reachabilityAnalysisIntentCreate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntentName"; - const body = { - properties: { - description: "A sample reachability analysis intent", - destinationResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmDest", - ipTraffic: { - destinationIps: ["10.4.0.1"], - destinationPorts: ["0"], - protocols: ["Any"], - sourceIps: ["10.4.0.0"], - sourcePorts: ["0"], - }, - sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmSrc", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.create( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - body, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisIntentCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsDeleteSample.js deleted file mode 100644 index 6ace339ba86a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes Reachability Analysis Intent. - * - * @summary Deletes Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentDelete.json - */ -async function reachabilityAnalysisIntentDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntent"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.delete( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisIntentDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsGetSample.js deleted file mode 100644 index ecd6320828b5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the Reachability Analysis Intent. - * - * @summary Get the Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentGet.json - */ -async function reachabilityAnalysisIntentGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntentName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.get( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisIntentGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsListSample.js b/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsListSample.js deleted file mode 100644 index 40874f2d0cb2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisIntentsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets list of Reachability Analysis Intents . - * - * @summary Gets list of Reachability Analysis Intents . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentList.json - */ -async function reachabilityAnalysisIntentList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testVerifierWorkspace1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reachabilityAnalysisIntents.list( - resourceGroupName, - networkManagerName, - workspaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await reachabilityAnalysisIntentList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsCreateSample.js b/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsCreateSample.js deleted file mode 100644 index dc6e49d28f13..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsCreateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates Reachability Analysis Runs. - * - * @summary Creates Reachability Analysis Runs. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunPut.json - */ -async function reachabilityAnalysisRunCreate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRunName"; - const body = { - properties: { - description: "A sample reachability analysis run", - intentId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/verifierWorkspaces/testVerifierWorkspace1/reachabilityAnalysisIntents/testReachabilityAnalysisIntenant1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.create( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - body, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisRunCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsDeleteSample.js deleted file mode 100644 index 0ace8a28dbfe..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes Reachability Analysis Run. - * - * @summary Deletes Reachability Analysis Run. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunDelete.json - */ -async function reachabilityAnalysisRunDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRun"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisRunDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsGetSample.js deleted file mode 100644 index f39584632f14..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets Reachability Analysis Run. - * - * @summary Gets Reachability Analysis Run. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunGet.json - */ -async function reachabilityAnalysisRunGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRunName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.get( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisRunGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsListSample.js b/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsListSample.js deleted file mode 100644 index cf24799c46b0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/reachabilityAnalysisRunsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets list of Reachability Analysis Runs. - * - * @summary Gets list of Reachability Analysis Runs. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunList.json - */ -async function reachabilityAnalysisRunList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testVerifierWorkspace1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reachabilityAnalysisRuns.list( - resourceGroupName, - networkManagerName, - workspaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await reachabilityAnalysisRunList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/resourceNavigationLinksListSample.js b/sdk/network/arm-network/samples/v35/javascript/resourceNavigationLinksListSample.js deleted file mode 100644 index 0695312bbe38..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/resourceNavigationLinksListSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a list of resource navigation links for a subnet. - * - * @summary Gets a list of resource navigation links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetResourceNavigationLinks.json - */ -async function getResourceNavigationLinks() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnet"; - const subnetName = "subnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.resourceNavigationLinks.list( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main() { - await getResourceNavigationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesCreateOrUpdateSample.js deleted file mode 100644 index 66b81ff7058a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a route in the specified route filter. - * - * @summary Creates or updates a route in the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleCreate.json - */ -async function routeFilterRuleCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "ruleName"; - const routeFilterRuleParameters = { - access: "Allow", - communities: ["12076:5030", "12076:5040"], - routeFilterRuleType: "Community", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.beginCreateOrUpdateAndWait( - resourceGroupName, - routeFilterName, - ruleName, - routeFilterRuleParameters, - ); - console.log(result); -} - -async function main() { - await routeFilterRuleCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesDeleteSample.js deleted file mode 100644 index 8b53f13250a8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified rule from a route filter. - * - * @summary Deletes the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleDelete.json - */ -async function routeFilterRuleDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "ruleName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.beginDeleteAndWait( - resourceGroupName, - routeFilterName, - ruleName, - ); - console.log(result); -} - -async function main() { - await routeFilterRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesGetSample.js deleted file mode 100644 index abc7806e3e24..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified rule from a route filter. - * - * @summary Gets the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleGet.json - */ -async function routeFilterRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.get(resourceGroupName, routeFilterName, ruleName); - console.log(result); -} - -async function main() { - await routeFilterRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesListByRouteFilterSample.js b/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesListByRouteFilterSample.js deleted file mode 100644 index 66f8e797976d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeFilterRulesListByRouteFilterSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all RouteFilterRules in a route filter. - * - * @summary Gets all RouteFilterRules in a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleListByRouteFilter.json - */ -async function routeFilterRuleListByRouteFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilterRules.listByRouteFilter( - resourceGroupName, - routeFilterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routeFilterRuleListByRouteFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeFiltersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/routeFiltersCreateOrUpdateSample.js deleted file mode 100644 index ad53466edae6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeFiltersCreateOrUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a route filter in a specified resource group. - * - * @summary Creates or updates a route filter in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterCreate.json - */ -async function routeFilterCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const routeFilterParameters = { - location: "West US", - rules: [ - { - name: "ruleName", - access: "Allow", - communities: ["12076:5030", "12076:5040"], - routeFilterRuleType: "Community", - }, - ], - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.beginCreateOrUpdateAndWait( - resourceGroupName, - routeFilterName, - routeFilterParameters, - ); - console.log(result); -} - -async function main() { - await routeFilterCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeFiltersDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/routeFiltersDeleteSample.js deleted file mode 100644 index 18d143e37760..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeFiltersDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified route filter. - * - * @summary Deletes the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterDelete.json - */ -async function routeFilterDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.beginDeleteAndWait(resourceGroupName, routeFilterName); - console.log(result); -} - -async function main() { - await routeFilterDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeFiltersGetSample.js b/sdk/network/arm-network/samples/v35/javascript/routeFiltersGetSample.js deleted file mode 100644 index 6204410d8a29..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeFiltersGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified route filter. - * - * @summary Gets the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterGet.json - */ -async function routeFilterGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.get(resourceGroupName, routeFilterName); - console.log(result); -} - -async function main() { - await routeFilterGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeFiltersListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/routeFiltersListByResourceGroupSample.js deleted file mode 100644 index 682112ec87eb..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeFiltersListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all route filters in a resource group. - * - * @summary Gets all route filters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterListByResourceGroup.json - */ -async function routeFilterListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilters.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routeFilterListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeFiltersListSample.js b/sdk/network/arm-network/samples/v35/javascript/routeFiltersListSample.js deleted file mode 100644 index 6f6baef93caf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeFiltersListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all route filters in a subscription. - * - * @summary Gets all route filters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterList.json - */ -async function routeFilterList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilters.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routeFilterList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeFiltersUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/routeFiltersUpdateTagsSample.js deleted file mode 100644 index e4fc813619e4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeFiltersUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of a route filter. - * - * @summary Updates tags of a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterUpdateTags.json - */ -async function updateRouteFilterTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const parameters = { tags: { key1: "value1" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.updateTags( - resourceGroupName, - routeFilterName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateRouteFilterTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeMapsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/routeMapsCreateOrUpdateSample.js deleted file mode 100644 index 2a6e722bda52..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeMapsCreateOrUpdateSample.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a RouteMap if it doesn't exist else updates the existing one. - * - * @summary Creates a RouteMap if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapPut.json - */ -async function routeMapPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const routeMapParameters = { - associatedInboundConnections: [ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGateway1/expressRouteConnections/exrConn1", - ], - associatedOutboundConnections: [], - rules: [ - { - name: "rule1", - actions: [ - { - type: "Add", - parameters: [{ asPath: ["22334"], community: [], routePrefix: [] }], - }, - ], - matchCriteria: [ - { - asPath: [], - community: [], - matchCondition: "Contains", - routePrefix: ["10.0.0.0/8"], - }, - ], - nextStepIfMatched: "Continue", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeMapName, - routeMapParameters, - ); - console.log(result); -} - -async function main() { - await routeMapPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeMapsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/routeMapsDeleteSample.js deleted file mode 100644 index ba52b146f096..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeMapsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a RouteMap. - * - * @summary Deletes a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapDelete.json - */ -async function routeMapDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeMapName, - ); - console.log(result); -} - -async function main() { - await routeMapDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeMapsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/routeMapsGetSample.js deleted file mode 100644 index 933612ec183c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeMapsGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a RouteMap. - * - * @summary Retrieves the details of a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapGet.json - */ -async function routeMapGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.get(resourceGroupName, virtualHubName, routeMapName); - console.log(result); -} - -async function main() { - await routeMapGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeMapsListSample.js b/sdk/network/arm-network/samples/v35/javascript/routeMapsListSample.js deleted file mode 100644 index ede76514263b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeMapsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all RouteMaps. - * - * @summary Retrieves the details of all RouteMaps. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapList.json - */ -async function routeMapList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeMaps.list(resourceGroupName, virtualHubName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routeMapList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeTablesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/routeTablesCreateOrUpdateSample.js deleted file mode 100644 index 0a74d352797c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeTablesCreateOrUpdateSample.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or updates a route table in a specified resource group. - * - * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableCreate.json - */ -async function createRouteTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or updates a route table in a specified resource group. - * - * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableCreateWithRoute.json - */ -async function createRouteTableWithRoute() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters = { - disableBgpRoutePropagation: true, - location: "westus", - routes: [ - { - name: "route1", - addressPrefix: "10.0.3.0/24", - nextHopType: "VirtualNetworkGateway", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - parameters, - ); - console.log(result); -} - -async function main() { - await createRouteTable(); - await createRouteTableWithRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeTablesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/routeTablesDeleteSample.js deleted file mode 100644 index 87060feabd0d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeTablesDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified route table. - * - * @summary Deletes the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableDelete.json - */ -async function deleteRouteTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginDeleteAndWait(resourceGroupName, routeTableName); - console.log(result); -} - -async function main() { - await deleteRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeTablesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/routeTablesGetSample.js deleted file mode 100644 index 2fe80bfd9e53..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeTablesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified route table. - * - * @summary Gets the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableGet.json - */ -async function getRouteTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.get(resourceGroupName, routeTableName); - console.log(result); -} - -async function main() { - await getRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeTablesListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/routeTablesListAllSample.js deleted file mode 100644 index 0145bf1e96a2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeTablesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all route tables in a subscription. - * - * @summary Gets all route tables in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableListAll.json - */ -async function listAllRouteTables() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeTables.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeTablesListSample.js b/sdk/network/arm-network/samples/v35/javascript/routeTablesListSample.js deleted file mode 100644 index ac09e39f2732..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeTablesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all route tables in a resource group. - * - * @summary Gets all route tables in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableList.json - */ -async function listRouteTablesInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeTables.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRouteTablesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routeTablesUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/routeTablesUpdateTagsSample.js deleted file mode 100644 index 70afbbafbe53..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routeTablesUpdateTagsSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a route table tags. - * - * @summary Updates a route table tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableUpdateTags.json - */ -async function updateRouteTableTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.updateTags(resourceGroupName, routeTableName, parameters); - console.log(result); -} - -async function main() { - await updateRouteTableTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/routesCreateOrUpdateSample.js deleted file mode 100644 index f35b6f2218e1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routesCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a route in the specified route table. - * - * @summary Creates or updates a route in the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteCreate.json - */ -async function createRoute() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const routeParameters = { - addressPrefix: "10.0.3.0/24", - nextHopType: "VirtualNetworkGateway", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - routeName, - routeParameters, - ); - console.log(result); -} - -async function main() { - await createRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/routesDeleteSample.js deleted file mode 100644 index 8d48f9637734..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified route from a route table. - * - * @summary Deletes the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteDelete.json - */ -async function deleteRoute() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.beginDeleteAndWait( - resourceGroupName, - routeTableName, - routeName, - ); - console.log(result); -} - -async function main() { - await deleteRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/routesGetSample.js deleted file mode 100644 index 2f19689f1b2a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified route from a route table. - * - * @summary Gets the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteGet.json - */ -async function getRoute() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.get(resourceGroupName, routeTableName, routeName); - console.log(result); -} - -async function main() { - await getRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routesListSample.js b/sdk/network/arm-network/samples/v35/javascript/routesListSample.js deleted file mode 100644 index b202d5065e51..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all routes in a route table. - * - * @summary Gets all routes in a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteList.json - */ -async function listRoutes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routes.list(resourceGroupName, routeTableName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingIntentCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/routingIntentCreateOrUpdateSample.js deleted file mode 100644 index a84c75d26b8b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingIntentCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * - * @summary Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentPut.json - */ -async function routeTablePut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const routingIntentParameters = { - routingPolicies: [ - { - name: "InternetTraffic", - destinations: ["Internet"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", - }, - { - name: "PrivateTrafficPolicy", - destinations: ["PrivateTraffic"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routingIntentName, - routingIntentParameters, - ); - console.log(result); -} - -async function main() { - await routeTablePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingIntentDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/routingIntentDeleteSample.js deleted file mode 100644 index e6ee6de99b20..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingIntentDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a RoutingIntent. - * - * @summary Deletes a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentDelete.json - */ -async function routeTableDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routingIntentName, - ); - console.log(result); -} - -async function main() { - await routeTableDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingIntentGetSample.js b/sdk/network/arm-network/samples/v35/javascript/routingIntentGetSample.js deleted file mode 100644 index 60f8586fc352..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingIntentGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a RoutingIntent. - * - * @summary Retrieves the details of a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentGet.json - */ -async function routeTableGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.get( - resourceGroupName, - virtualHubName, - routingIntentName, - ); - console.log(result); -} - -async function main() { - await routeTableGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingIntentListSample.js b/sdk/network/arm-network/samples/v35/javascript/routingIntentListSample.js deleted file mode 100644 index 242af3ff3e4b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingIntentListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * - * @summary Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentList.json - */ -async function routingIntentList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingIntentOperations.list(resourceGroupName, virtualHubName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routingIntentList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsCreateOrUpdateSample.js deleted file mode 100644 index 654b55a74105..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a routing rule collection. - * - * @summary Creates or updates a routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionPut.json - */ -async function createOrUpdateARoutingRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleCollection = { - description: "A sample policy", - appliesTo: [ - { - networkGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, - ); - console.log(result); -} - -async function main() { - await createOrUpdateARoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsDeleteSample.js deleted file mode 100644 index 7c22299af01b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an routing rule collection. - * - * @summary Deletes an routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionDelete.json - */ -async function deletesAnRoutingRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main() { - await deletesAnRoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsGetSample.js deleted file mode 100644 index 0e5da4d6a246..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a network manager routing configuration rule collection. - * - * @summary Gets a network manager routing configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionGet.json - */ -async function getsRoutingRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main() { - await getsRoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsListSample.js deleted file mode 100644 index a9033eb0e3a9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingRuleCollectionsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the rule collections in a routing configuration, in a paginated format. - * - * @summary Lists all the rule collections in a routing configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionList.json - */ -async function listRoutingRuleCollections() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRoutingRuleCollections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/routingRulesCreateOrUpdateSample.js deleted file mode 100644 index f93af9002b87..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an routing rule. - * - * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRulePut.json - */ -async function createADefaultRoutingRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const routingRule = { - description: "This is Sample Routing Rule", - destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, - nextHop: { nextHopType: "VirtualNetworkGateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - routingRule, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an routing rule. - * - * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRulePut.json - */ -async function createAnRoutingRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const routingRule = { - description: "This is Sample Routing Rule", - destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, - nextHop: { nextHopType: "VirtualNetworkGateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - routingRule, - ); - console.log(result); -} - -async function main() { - await createADefaultRoutingRule(); - await createAnRoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingRulesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/routingRulesDeleteSample.js deleted file mode 100644 index 8140a4636a2a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingRulesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a routing rule. - * - * @summary Deletes a routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleDelete.json - */ -async function deletesARoutingRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "sampleRule"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main() { - await deletesARoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/routingRulesGetSample.js deleted file mode 100644 index de8ecac23511..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingRulesGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a network manager routing configuration routing rule. - * - * @summary Gets a network manager routing configuration routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleGet.json - */ -async function getsRoutingRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main() { - await getsRoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/routingRulesListSample.js b/sdk/network/arm-network/samples/v35/javascript/routingRulesListSample.js deleted file mode 100644 index d381030e32e8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/routingRulesListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network manager routing configuration routing rules. - * - * @summary List all network manager routing configuration routing rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleList.json - */ -async function listRoutingRules() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRoutingRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/sample.env b/sdk/network/arm-network/samples/v35/javascript/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 5ee8b3aacbe7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates scope connection from Network Manager - * - * @summary Creates or updates scope connection from Network Manager - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionPut.json - */ -async function createOrUpdateNetworkManagerScopeConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const parameters = { - description: "This is a scope connection to a cross tenant subscription.", - resourceId: "subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b", - tenantId: "6babcaad-604b-40ac-a9d7-9fd97c0b779f", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.createOrUpdate( - resourceGroupName, - networkManagerName, - scopeConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsDeleteSample.js deleted file mode 100644 index 16403116ccea..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the pending scope connection created by this network manager. - * - * @summary Delete the pending scope connection created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionDelete.json - */ -async function deleteNetworkManagerScopeConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.delete( - resourceGroupName, - networkManagerName, - scopeConnectionName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsGetSample.js deleted file mode 100644 index f547ed9b7a57..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get specified scope connection created by this Network Manager. - * - * @summary Get specified scope connection created by this Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionGet.json - */ -async function getNetworkManagerScopeConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.get( - resourceGroupName, - networkManagerName, - scopeConnectionName, - ); - console.log(result); -} - -async function main() { - await getNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsListSample.js deleted file mode 100644 index b1ba009a60ca..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/scopeConnectionsListSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all scope connections created by this network manager. - * - * @summary List all scope connections created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionList.json - */ -async function listNetworkManagerScopeConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.scopeConnections.list(resourceGroupName, networkManagerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index b8500c59a81a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network manager security admin configuration. - * - * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json - */ -async function createManualModeSecurityAdminConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityAdminConfiguration = { - description: - "A configuration which will update any network groups ip addresses at commit times.", - networkGroupAddressSpaceAggregationOption: "Manual", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityAdminConfiguration, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network manager security admin configuration. - * - * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationPut.json - */ -async function createNetworkManagerSecurityAdminConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityAdminConfiguration = { - description: "A sample policy", - applyOnNetworkIntentPolicyBasedServices: ["None"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityAdminConfiguration, - ); - console.log(result); -} - -async function main() { - await createManualModeSecurityAdminConfiguration(); - await createNetworkManagerSecurityAdminConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsDeleteSample.js deleted file mode 100644 index f1a0f1255da2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network manager security admin configuration. - * - * @summary Deletes a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json - */ -async function deleteNetworkManagerSecurityAdminConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main() { - await deleteNetworkManagerSecurityAdminConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsGetSample.js deleted file mode 100644 index d4df989898ee..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a network manager security admin configuration. - * - * @summary Retrieves a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationGet.json - */ -async function getSecurityAdminConfigurations() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main() { - await getSecurityAdminConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsListSample.js deleted file mode 100644 index 81b8e0cbebd8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityAdminConfigurationsListSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the network manager security admin configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager security admin configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationList.json - */ -async function listSecurityAdminConfigurationsInANetworkManager() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityAdminConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSecurityAdminConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersCreateOrUpdateSample.js deleted file mode 100644 index 9ddcb5894d91..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Security Partner Provider. - * - * @summary Creates or updates the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderPut.json - */ -async function createSecurityPartnerProvider() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const parameters = { - location: "West US", - securityProviderName: "ZScaler", - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.beginCreateOrUpdateAndWait( - resourceGroupName, - securityPartnerProviderName, - parameters, - ); - console.log(result); -} - -async function main() { - await createSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersDeleteSample.js deleted file mode 100644 index 931e05f0e3d3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Security Partner Provider. - * - * @summary Deletes the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderDelete.json - */ -async function deleteSecurityPartnerProvider() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.beginDeleteAndWait( - resourceGroupName, - securityPartnerProviderName, - ); - console.log(result); -} - -async function main() { - await deleteSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersGetSample.js b/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersGetSample.js deleted file mode 100644 index d34dc20380ee..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Security Partner Provider. - * - * @summary Gets the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderGet.json - */ -async function getSecurityPartnerProvider() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.get( - resourceGroupName, - securityPartnerProviderName, - ); - console.log(result); -} - -async function main() { - await getSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersListByResourceGroupSample.js deleted file mode 100644 index e7f40f8c013a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Security Partner Providers in a resource group. - * - * @summary Lists all Security Partner Providers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderListByResourceGroup.json - */ -async function listAllSecurityPartnerProvidersForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityPartnerProviders.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllSecurityPartnerProvidersForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersListSample.js b/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersListSample.js deleted file mode 100644 index 1fa95605f4b2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Security Partner Providers in a subscription. - * - * @summary Gets all the Security Partner Providers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderListBySubscription.json - */ -async function listAllSecurityPartnerProvidersForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityPartnerProviders.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllSecurityPartnerProvidersForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersUpdateTagsSample.js deleted file mode 100644 index 500aa9036607..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityPartnerProvidersUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of a Security Partner Provider resource. - * - * @summary Updates tags of a Security Partner Provider resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderUpdateTags.json - */ -async function updateSecurityPartnerProviderTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.updateTags( - resourceGroupName, - securityPartnerProviderName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateSecurityPartnerProviderTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/securityRulesCreateOrUpdateSample.js deleted file mode 100644 index 5aa5c0b053a3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a security rule in the specified network security group. - * - * @summary Creates or updates a security rule in the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleCreate.json - */ -async function createSecurityRule() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const securityRuleParameters = { - access: "Deny", - destinationAddressPrefix: "11.0.0.0/8", - destinationPortRange: "8080", - direction: "Outbound", - priority: 100, - sourceAddressPrefix: "10.0.0.0/8", - sourcePortRange: "*", - protocol: "*", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - securityRuleParameters, - ); - console.log(result); -} - -async function main() { - await createSecurityRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityRulesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/securityRulesDeleteSample.js deleted file mode 100644 index bd8d959ec0bb..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityRulesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified network security rule. - * - * @summary Deletes the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleDelete.json - */ -async function deleteNetworkSecurityRuleFromNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.beginDeleteAndWait( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkSecurityRuleFromNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/securityRulesGetSample.js deleted file mode 100644 index cc5a5f580606..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified network security rule. - * - * @summary Get the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleGet.json - */ -async function getNetworkSecurityRuleInNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.get( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - ); - console.log(result); -} - -async function main() { - await getNetworkSecurityRuleInNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityRulesListSample.js b/sdk/network/arm-network/samples/v35/javascript/securityRulesListSample.js deleted file mode 100644 index fe1355a18498..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityRulesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all security rules in a network security group. - * - * @summary Gets all security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleList.json - */ -async function listNetworkSecurityRulesInNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityRules.list(resourceGroupName, networkSecurityGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkSecurityRulesInNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index 8172a0c13815..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network manager security user configuration. - * - * @summary Creates or updates a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationPut.json - */ -async function createNetworkManagerSecurityUserConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityUserConfiguration = { - description: "A sample policy", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityUserConfiguration, - ); - console.log(result); -} - -async function main() { - await createNetworkManagerSecurityUserConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsDeleteSample.js deleted file mode 100644 index 9a7d5cff6e76..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network manager security user configuration. - * - * @summary Deletes a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationDelete.json - */ -async function deleteNetworkManagerSecurityUserConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main() { - await deleteNetworkManagerSecurityUserConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsGetSample.js deleted file mode 100644 index e963e01e5035..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a network manager security user configuration. - * - * @summary Retrieves a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationGet.json - */ -async function getSecurityUserConfigurations() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main() { - await getSecurityUserConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsListSample.js deleted file mode 100644 index 9d36717d616b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserConfigurationsListSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the network manager security user configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager security user configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationList.json - */ -async function listSecurityUserConfigurationsInANetworkManager() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSecurityUserConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js deleted file mode 100644 index 5d1c50808fb9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a security user rule collection. - * - * @summary Creates or updates a security user rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json - */ -async function createOrUpdateASecurityUserRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const securityUserRuleCollection = { - description: "A sample policy", - appliesToGroups: [ - { - networkGroupId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - securityUserRuleCollection, - ); - console.log(result); -} - -async function main() { - await createOrUpdateASecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsDeleteSample.js deleted file mode 100644 index ceb79378eb66..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsDeleteSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a Security User Rule collection. - * - * @summary Deletes a Security User Rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json - */ -async function deletesASecurityUserRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - console.log(result); -} - -async function main() { - await deletesASecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsGetSample.js deleted file mode 100644 index f829493bdbd9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a network manager security user configuration rule collection. - * - * @summary Gets a network manager security user configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json - */ -async function getsSecurityUserRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main() { - await getsSecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsListSample.js deleted file mode 100644 index 11e4d670c640..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserRuleCollectionsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the security user rule collections in a security configuration, in a paginated format. - * - * @summary Lists all the security user rule collections in a security configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionList.json - */ -async function listRuleCollectionsInASecurityConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRuleCollectionsInASecurityConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserRulesCreateOrUpdateSample.js deleted file mode 100644 index f1e2d7dc38fb..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a security user rule. - * - * @summary Creates or updates a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRulePut.json - */ -async function createASecurityUserRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const securityUserRule = { - description: "Sample User Rule", - destinationPortRanges: ["22"], - destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - direction: "Inbound", - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - securityUserRule, - ); - console.log(result); -} - -async function main() { - await createASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserRulesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserRulesDeleteSample.js deleted file mode 100644 index 90f74e6affec..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserRulesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a security user rule. - * - * @summary Deletes a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleDelete.json - */ -async function deleteASecurityUserRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main() { - await deleteASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserRulesGetSample.js deleted file mode 100644 index cf006e8b36bc..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserRulesGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a security user rule. - * - * @summary Gets a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleGet.json - */ -async function getsASecurityUserRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main() { - await getsASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/securityUserRulesListSample.js b/sdk/network/arm-network/samples/v35/javascript/securityUserRulesListSample.js deleted file mode 100644 index 20bd37421540..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/securityUserRulesListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Security User Rules in a rule collection. - * - * @summary Lists all Security User Rules in a rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleList.json - */ -async function listSecurityUserRules() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSecurityUserRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceAssociationLinksListSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceAssociationLinksListSample.js deleted file mode 100644 index a74a45ba9b4d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceAssociationLinksListSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a list of service association links for a subnet. - * - * @summary Gets a list of service association links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetServiceAssociationLinks.json - */ -async function getServiceAssociationLinks() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnet"; - const subnetName = "subnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceAssociationLinks.list( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main() { - await getServiceAssociationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js deleted file mode 100644 index dcbbaaeb0a24..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a service Endpoint Policies. - * - * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyCreate.json - */ -async function createServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const parameters = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a service Endpoint Policies. - * - * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyCreateWithDefinition.json - */ -async function createServiceEndpointPolicyWithDefinition() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const parameters = { - location: "westus", - serviceEndpointPolicyDefinitions: [ - { - name: "StorageServiceEndpointPolicyDefinition", - description: "Storage Service EndpointPolicy Definition", - service: "Microsoft.Storage", - serviceResources: [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await createServiceEndpointPolicy(); - await createServiceEndpointPolicyWithDefinition(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesDeleteSample.js deleted file mode 100644 index 03166401a820..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified service endpoint policy. - * - * @summary Deletes the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDelete.json - */ -async function deleteServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "serviceEndpointPolicy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.beginDeleteAndWait( - resourceGroupName, - serviceEndpointPolicyName, - ); - console.log(result); -} - -async function main() { - await deleteServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesGetSample.js deleted file mode 100644 index f54b904d4e95..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified service Endpoint Policies in a specified resource group. - * - * @summary Gets the specified service Endpoint Policies in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyGet.json - */ -async function getServiceEndPointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testServiceEndpointPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.get( - resourceGroupName, - serviceEndpointPolicyName, - ); - console.log(result); -} - -async function main() { - await getServiceEndPointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesListByResourceGroupSample.js deleted file mode 100644 index 9bf5acd382d7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all service endpoint Policies in a resource group. - * - * @summary Gets all service endpoint Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyList.json - */ -async function listResourceGroupServiceEndpointPolicies() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicies.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listResourceGroupServiceEndpointPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesListSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesListSample.js deleted file mode 100644 index 0af522aae644..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the service endpoint policies in a subscription. - * - * @summary Gets all the service endpoint policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyListAll.json - */ -async function listAllServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicies.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesUpdateTagsSample.js deleted file mode 100644 index 442ab2eee58a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPoliciesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of a service endpoint policy. - * - * @summary Updates tags of a service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyUpdateTags.json - */ -async function updateServiceEndpointPolicyTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testServiceEndpointPolicy"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.updateTags( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateServiceEndpointPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js deleted file mode 100644 index aef55c414c39..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * - * @summary Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionCreate.json - */ -async function createServiceEndpointPolicyDefinition() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const serviceEndpointPolicyDefinitions = { - description: "Storage Service EndpointPolicy Definition", - service: "Microsoft.Storage", - serviceResources: [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicyDefinitions.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - serviceEndpointPolicyDefinitions, - ); - console.log(result); -} - -async function main() { - await createServiceEndpointPolicyDefinition(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js deleted file mode 100644 index 0554a94c073d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified ServiceEndpoint policy definitions. - * - * @summary Deletes the specified ServiceEndpoint policy definitions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionDelete.json - */ -async function deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicyDefinitions.beginDeleteAndWait( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - ); - console.log(result); -} - -async function main() { - await deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsGetSample.js deleted file mode 100644 index fafb15ae3946..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified service endpoint policy definitions from service endpoint policy. - * - * @summary Get the specified service endpoint policy definitions from service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionGet.json - */ -async function getServiceEndpointDefinitionInServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicyDefinitions.get( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - ); - console.log(result); -} - -async function main() { - await getServiceEndpointDefinitionInServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js deleted file mode 100644 index 53a02f5cfe84..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all service endpoint policy definitions in a service end point policy. - * - * @summary Gets all service endpoint policy definitions in a service end point policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionList.json - */ -async function listServiceEndpointDefinitionsInServiceEndPointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicyDefinitions.listByResourceGroup( - resourceGroupName, - serviceEndpointPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listServiceEndpointDefinitionsInServiceEndPointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceTagInformationListSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceTagInformationListSample.js deleted file mode 100644 index 38599055c11a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceTagInformationListSample.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagInformationListResult.json - */ -async function getListOfServiceTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json - */ -async function getListOfServiceTagsWithNoAddressPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const noAddressPrefixes = true; - const options = { - noAddressPrefixes, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list(location, options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagInformationListResultWithTagname.json - */ -async function getListOfServiceTagsWithTagName() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const tagName = "ApiManagement"; - const options = { tagName }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list(location, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getListOfServiceTags(); - await getListOfServiceTagsWithNoAddressPrefixes(); - await getListOfServiceTagsWithTagName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/serviceTagsListSample.js b/sdk/network/arm-network/samples/v35/javascript/serviceTagsListSample.js deleted file mode 100644 index 63d7d119272a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/serviceTagsListSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a list of service tag information resources. - * - * @summary Gets a list of service tag information resources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagsList.json - */ -async function getListOfServiceTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceTags.list(location); - console.log(result); -} - -async function main() { - await getListOfServiceTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/staticCidrsCreateSample.js b/sdk/network/arm-network/samples/v35/javascript/staticCidrsCreateSample.js deleted file mode 100644 index 16cff8292177..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/staticCidrsCreateSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates/Updates the Static CIDR resource. - * - * @summary Creates/Updates the Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Create.json - */ -async function staticCidrsCreate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.create( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main() { - await staticCidrsCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/staticCidrsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/staticCidrsDeleteSample.js deleted file mode 100644 index 4673b8eb1ebc..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/staticCidrsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the Static CIDR resource. - * - * @summary Delete the Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Delete.json - */ -async function staticCidrsDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main() { - await staticCidrsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/staticCidrsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/staticCidrsGetSample.js deleted file mode 100644 index e345ec90f24e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/staticCidrsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specific Static CIDR resource. - * - * @summary Gets the specific Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Get.json - */ -async function staticCidrsGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.get( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main() { - await staticCidrsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/staticCidrsListSample.js b/sdk/network/arm-network/samples/v35/javascript/staticCidrsListSample.js deleted file mode 100644 index e1b11ae4e9bf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/staticCidrsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets list of Static CIDR resources at Network Manager level. - * - * @summary Gets list of Static CIDR resources at Network Manager level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_List.json - */ -async function staticCidrsList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.staticCidrs.list( - resourceGroupName, - networkManagerName, - poolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await staticCidrsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/staticMembersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/staticMembersCreateOrUpdateSample.js deleted file mode 100644 index 11c055be60f5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/staticMembersCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a static member. - * - * @summary Creates or updates a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberPut.json - */ -async function staticMemberPut() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const parameters = { - resourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroup/rg1/providers/Microsoft.Network/virtualnetworks/vnet1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.createOrUpdate( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - parameters, - ); - console.log(result); -} - -async function main() { - await staticMemberPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/staticMembersDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/staticMembersDeleteSample.js deleted file mode 100644 index 24ce516db859..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/staticMembersDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a static member. - * - * @summary Deletes a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberDelete.json - */ -async function staticMembersDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "SampleRG"; - const networkManagerName = "TestNM"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.delete( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - ); - console.log(result); -} - -async function main() { - await staticMembersDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/staticMembersGetSample.js b/sdk/network/arm-network/samples/v35/javascript/staticMembersGetSample.js deleted file mode 100644 index f804e86b6309..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/staticMembersGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified static member. - * - * @summary Gets the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberGet.json - */ -async function staticMembersGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.get( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - ); - console.log(result); -} - -async function main() { - await staticMembersGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/staticMembersListSample.js b/sdk/network/arm-network/samples/v35/javascript/staticMembersListSample.js deleted file mode 100644 index c0d579fe9571..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/staticMembersListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the specified static member. - * - * @summary Lists the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberList.json - */ -async function staticMembersList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.staticMembers.list( - resourceGroupName, - networkManagerName, - networkGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await staticMembersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/subnetsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/subnetsCreateOrUpdateSample.js deleted file mode 100644 index 7ff816121962..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/subnetsCreateOrUpdateSample.js +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreate.json - */ -async function createSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreateWithDelegation.json - */ -async function createSubnetWithADelegation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreateServiceEndpoint.json - */ -async function createSubnetWithServiceEndpoints() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters = { - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json - */ -async function createSubnetWithServiceEndpointsWithNetworkIdentifier() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters = { - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [ - { - networkIdentifier: { - id: "/subscriptions/subid/resourceGroups/subnet-test/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - service: "Microsoft.Storage", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreateWithSharingScope.json - */ -async function createSubnetWithSharingScope() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -async function main() { - await createSubnet(); - await createSubnetWithADelegation(); - await createSubnetWithServiceEndpoints(); - await createSubnetWithServiceEndpointsWithNetworkIdentifier(); - await createSubnetWithSharingScope(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/subnetsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/subnetsDeleteSample.js deleted file mode 100644 index beb1fa1f8714..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/subnetsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified subnet. - * - * @summary Deletes the specified subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetDelete.json - */ -async function deleteSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main() { - await deleteSubnet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/subnetsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/subnetsGetSample.js deleted file mode 100644 index 88319cd4dd25..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/subnetsGetSample.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetGet.json - */ -async function getSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get(resourceGroupName, virtualNetworkName, subnetName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetGetWithDelegation.json - */ -async function getSubnetWithADelegation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get(resourceGroupName, virtualNetworkName, subnetName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetGetWithSharingScope.json - */ -async function getSubnetWithSharingScope() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get(resourceGroupName, virtualNetworkName, subnetName); - console.log(result); -} - -async function main() { - await getSubnet(); - await getSubnetWithADelegation(); - await getSubnetWithSharingScope(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/subnetsListSample.js b/sdk/network/arm-network/samples/v35/javascript/subnetsListSample.js deleted file mode 100644 index 18c30853a98c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/subnetsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all subnets in a virtual network. - * - * @summary Gets all subnets in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetList.json - */ -async function listSubnets() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.subnets.list(resourceGroupName, virtualNetworkName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSubnets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/subnetsPrepareNetworkPoliciesSample.js b/sdk/network/arm-network/samples/v35/javascript/subnetsPrepareNetworkPoliciesSample.js deleted file mode 100644 index c468dcc88e00..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/subnetsPrepareNetworkPoliciesSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Prepares a subnet by applying network intent policies. - * - * @summary Prepares a subnet by applying network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetPrepareNetworkPolicies.json - */ -async function prepareNetworkPolicies() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const subnetName = "subnet1"; - const prepareNetworkPoliciesRequestParameters = { serviceName: "Microsoft.Sql/managedInstances" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginPrepareNetworkPoliciesAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - prepareNetworkPoliciesRequestParameters, - ); - console.log(result); -} - -async function main() { - await prepareNetworkPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/subnetsUnprepareNetworkPoliciesSample.js b/sdk/network/arm-network/samples/v35/javascript/subnetsUnprepareNetworkPoliciesSample.js deleted file mode 100644 index b8119c283337..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/subnetsUnprepareNetworkPoliciesSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Unprepares a subnet by removing network intent policies. - * - * @summary Unprepares a subnet by removing network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetUnprepareNetworkPolicies.json - */ -async function unprepareNetworkPolicies() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const subnetName = "subnet1"; - const unprepareNetworkPoliciesRequestParameters = { - serviceName: "Microsoft.Sql/managedInstances", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginUnprepareNetworkPoliciesAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - unprepareNetworkPoliciesRequestParameters, - ); - console.log(result); -} - -async function main() { - await unprepareNetworkPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 639c2996c918..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a network manager connection on this subscription. - * - * @summary Create a network manager connection on this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionPut.json - */ -async function createOrUpdateSubscriptionNetworkManagerConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const parameters = { - networkManagerId: - "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.createOrUpdate( - networkManagerConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js deleted file mode 100644 index 3a961e4d3d11..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete specified connection created by this subscription. - * - * @summary Delete specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionDelete.json - */ -async function deleteSubscriptionNetworkManagerConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.delete( - networkManagerConnectionName, - ); - console.log(result); -} - -async function main() { - await deleteSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsGetSample.js deleted file mode 100644 index d46489023ad1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get a specified connection created by this subscription. - * - * @summary Get a specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionGet.json - */ -async function getSubscriptionNetworkManagerConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.get( - networkManagerConnectionName, - ); - console.log(result); -} - -async function main() { - await getSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsListSample.js deleted file mode 100644 index 86dc91fa75ca..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/subscriptionNetworkManagerConnectionsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network manager connections created by this subscription. - * - * @summary List all network manager connections created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionList.json - */ -async function listSubscriptionNetworkManagerConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.subscriptionNetworkManagerConnections.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/supportedSecurityProvidersSample.js b/sdk/network/arm-network/samples/v35/javascript/supportedSecurityProvidersSample.js deleted file mode 100644 index 58e1b2cd4b28..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/supportedSecurityProvidersSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gives the supported security providers for the virtual wan. - * - * @summary Gives the supported security providers for the virtual wan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWanSupportedSecurityProviders.json - */ -async function supportedSecurityProviders() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.supportedSecurityProviders(resourceGroupName, virtualWANName); - console.log(result); -} - -async function main() { - await supportedSecurityProviders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/usagesListSample.js b/sdk/network/arm-network/samples/v35/javascript/usagesListSample.js deleted file mode 100644 index db999f123993..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/usagesListSample.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List network usages for a subscription. - * - * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/UsageList.json - */ -async function listUsages() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.usages.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List network usages for a subscription. - * - * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/UsageListSpacedLocation.json - */ -async function listUsagesSpacedLocation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "West US"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.usages.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listUsages(); - await listUsagesSpacedLocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesCreateSample.js b/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesCreateSample.js deleted file mode 100644 index 9c26fdf31ee8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesCreateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates Verifier Workspace. - * - * @summary Creates Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspacePut.json - */ -async function verifierWorkspaceCreate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const body = { - location: "eastus", - properties: { description: "A sample workspace" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.create( - resourceGroupName, - networkManagerName, - workspaceName, - body, - ); - console.log(result); -} - -async function main() { - await verifierWorkspaceCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesDeleteSample.js deleted file mode 100644 index 72e4d8cf84fe..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes Verifier Workspace. - * - * @summary Deletes Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceDelete.json - */ -async function verifierWorkspaceDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main() { - await verifierWorkspaceDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesGetSample.js deleted file mode 100644 index eedcf1f6b9c6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets Verifier Workspace. - * - * @summary Gets Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceGet.json - */ -async function verifierWorkspaceGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.get( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main() { - await verifierWorkspaceGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesListSample.js b/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesListSample.js deleted file mode 100644 index e8d5c8c336a6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesListSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets list of Verifier Workspaces. - * - * @summary Gets list of Verifier Workspaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceList.json - */ -async function verifierWorkspaceList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.verifierWorkspaces.list(resourceGroupName, networkManagerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await verifierWorkspaceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesUpdateSample.js deleted file mode 100644 index 359d45ac0e89..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/verifierWorkspacesUpdateSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates Verifier Workspace. - * - * @summary Updates Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspacePatch.json - */ -async function verifierWorkspacePatch() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.update( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main() { - await verifierWorkspacePatch(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vipSwapCreateSample.js b/sdk/network/arm-network/samples/v35/javascript/vipSwapCreateSample.js deleted file mode 100644 index fa006205f556..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vipSwapCreateSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Performs vip swap operation on swappable cloud services. - * - * @summary Performs vip swap operation on swappable cloud services. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapPut.json - */ -async function putVipSwapOperation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const parameters = { properties: { slotType: "Production" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.beginCreateAndWait(groupName, resourceName, parameters); - console.log(result); -} - -async function main() { - await putVipSwapOperation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vipSwapGetSample.js b/sdk/network/arm-network/samples/v35/javascript/vipSwapGetSample.js deleted file mode 100644 index 2dbbc859a81a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vipSwapGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * - * @summary Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapGet.json - */ -async function getSwapResource() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.get(groupName, resourceName); - console.log(result); -} - -async function main() { - await getSwapResource(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vipSwapListSample.js b/sdk/network/arm-network/samples/v35/javascript/vipSwapListSample.js deleted file mode 100644 index b31a2ce6c78c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vipSwapListSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * - * @summary Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapList.json - */ -async function getSwapResourceList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.list(groupName, resourceName); - console.log(result); -} - -async function main() { - await getSwapResourceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesCreateOrUpdateSample.js deleted file mode 100644 index 103c9cd2e462..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Site. - * - * @summary Creates or updates the specified Network Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSitePut.json - */ -async function createNetworkVirtualApplianceSite() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const parameters = { - addressPrefix: "192.168.1.0/24", - o365Policy: { - breakOutCategories: { default: true, allow: true, optimize: true }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - siteName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesDeleteSample.js deleted file mode 100644 index 52fe3ac5f621..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified site from a Virtual Appliance. - * - * @summary Deletes the specified site from a Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteDelete.json - */ -async function deleteNetworkVirtualApplianceSite() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - siteName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesGetSample.js deleted file mode 100644 index 74b941dd5359..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Virtual Appliance Site. - * - * @summary Gets the specified Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteGet.json - */ -async function getNetworkVirtualApplianceSite() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.get( - resourceGroupName, - networkVirtualApplianceName, - siteName, - ); - console.log(result); -} - -async function main() { - await getNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesListSample.js deleted file mode 100644 index 96aa92e46b28..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSitesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * - * @summary Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteList.json - */ -async function listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualApplianceSites.list( - resourceGroupName, - networkVirtualApplianceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSkusGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSkusGetSample.js deleted file mode 100644 index d26e2c45b2fa..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSkusGetSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a single available sku for network virtual appliance. - * - * @summary Retrieves a single available sku for network virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSkuGet.json - */ -async function networkVirtualApplianceSkuGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const skuName = "ciscoSdwan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSkus.get(skuName); - console.log(result); -} - -async function main() { - await networkVirtualApplianceSkuGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSkusListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSkusListSample.js deleted file mode 100644 index 924bcdea4c4b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualApplianceSkusListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all SKUs available for a virtual appliance. - * - * @summary List all SKUs available for a virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSkuList.json - */ -async function networkVirtualApplianceSkuListResult() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualApplianceSkus.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkVirtualApplianceSkuListResult(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js deleted file mode 100644 index 63a43b58a121..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * - * @summary Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionPut.json - */ -async function virtualHubRouteTableV2Put() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const parameters = { - hubVirtualNetworkConnection: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1", - }, - peerAsn: 20000, - peerIp: "192.168.1.5", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - connectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await virtualHubRouteTableV2Put(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionDeleteSample.js deleted file mode 100644 index be4860e2f12e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VirtualHubBgpConnection. - * - * @summary Deletes a VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionDelete.json - */ -async function virtualHubRouteTableV2Delete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await virtualHubRouteTableV2Delete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionGetSample.js deleted file mode 100644 index 613a9fd9e2e4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a Virtual Hub Bgp Connection. - * - * @summary Retrieves the details of a Virtual Hub Bgp Connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionGet.json - */ -async function virtualHubVirtualHubRouteTableV2Get() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.get( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js deleted file mode 100644 index fd9fcd229a23..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * - * @summary Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeerListAdvertisedRoute.json - */ -async function virtualRouterPeerListAdvertisedRoutes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const hubName = "virtualRouter1"; - const connectionName = "peer1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnections.beginListAdvertisedRoutesAndWait( - resourceGroupName, - hubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await virtualRouterPeerListAdvertisedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js deleted file mode 100644 index c39007e270eb..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection has learned. - * - * @summary Retrieves a list of routes the virtual hub bgp connection has learned. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeerListLearnedRoute.json - */ -async function virtualRouterPeerListLearnedRoutes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const hubName = "virtualRouter1"; - const connectionName = "peer1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnections.beginListLearnedRoutesAndWait( - resourceGroupName, - hubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await virtualRouterPeerListLearnedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListSample.js deleted file mode 100644 index 046e4c2bec80..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubBgpConnectionsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubBgpConnections. - * - * @summary Retrieves the details of all VirtualHubBgpConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionList.json - */ -async function virtualHubRouteTableV2List() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubBgpConnections.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js deleted file mode 100644 index 153d9ca625bf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * - * @summary Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationPut.json - */ -async function virtualHubIPConfigurationPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const parameters = { - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - ipConfigName, - parameters, - ); - console.log(result); -} - -async function main() { - await virtualHubIPConfigurationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationDeleteSample.js deleted file mode 100644 index d95284da4bd0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VirtualHubIpConfiguration. - * - * @summary Deletes a VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationDelete.json - */ -async function virtualHubIPConfigurationDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - ipConfigName, - ); - console.log(result); -} - -async function main() { - await virtualHubIPConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationGetSample.js deleted file mode 100644 index 7e16858221ee..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a Virtual Hub Ip configuration. - * - * @summary Retrieves the details of a Virtual Hub Ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationGet.json - */ -async function virtualHubVirtualHubRouteTableV2Get() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.get( - resourceGroupName, - virtualHubName, - ipConfigName, - ); - console.log(result); -} - -async function main() { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationListSample.js deleted file mode 100644 index ab7dd58098e1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubIPConfigurationListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubIpConfigurations. - * - * @summary Retrieves the details of all VirtualHubIpConfigurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationList.json - */ -async function virtualHubRouteTableV2List() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubIpConfiguration.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js deleted file mode 100644 index 3ef5165b6b23..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * - * @summary Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Put.json - */ -async function virtualHubRouteTableV2Put() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const virtualHubRouteTableV2Parameters = { - attachedConnections: ["All_Vnets"], - routes: [ - { - destinationType: "CIDR", - destinations: ["20.10.0.0/16", "20.20.0.0/16"], - nextHopType: "IPAddress", - nextHops: ["10.0.0.68"], - }, - { - destinationType: "CIDR", - destinations: ["0.0.0.0/0"], - nextHopType: "IPAddress", - nextHops: ["10.0.0.68"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubRouteTableV2S.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - virtualHubRouteTableV2Parameters, - ); - console.log(result); -} - -async function main() { - await virtualHubRouteTableV2Put(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SDeleteSample.js deleted file mode 100644 index 863cd0833c1c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VirtualHubRouteTableV2. - * - * @summary Deletes a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Delete.json - */ -async function virtualHubRouteTableV2Delete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubRouteTableV2S.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main() { - await virtualHubRouteTableV2Delete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SGetSample.js deleted file mode 100644 index 4dca49eadbca..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VirtualHubRouteTableV2. - * - * @summary Retrieves the details of a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Get.json - */ -async function virtualHubVirtualHubRouteTableV2Get() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubRouteTableV2S.get( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main() { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SListSample.js deleted file mode 100644 index 0a0cf02b67af..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubRouteTableV2SListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubRouteTableV2s. - * - * @summary Retrieves the details of all VirtualHubRouteTableV2s. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2List.json - */ -async function virtualHubRouteTableV2List() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubRouteTableV2S.list(resourceGroupName, virtualHubName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubsCreateOrUpdateSample.js deleted file mode 100644 index 3036e2dffdec..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubsCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * - * @summary Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubPut.json - */ -async function virtualHubPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub2"; - const virtualHubParameters = { - addressPrefix: "10.168.0.0/24", - location: "West US", - sku: "Basic", - tags: { key1: "value1" }, - virtualWan: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - virtualHubParameters, - ); - console.log(result); -} - -async function main() { - await virtualHubPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubsDeleteSample.js deleted file mode 100644 index b6fef6805a0f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubsDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VirtualHub. - * - * @summary Deletes a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubDelete.json - */ -async function virtualHubDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginDeleteAndWait(resourceGroupName, virtualHubName); - console.log(result); -} - -async function main() { - await virtualHubDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js deleted file mode 100644 index 5f22d13868d2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EffectiveRoutesListForConnection.json - */ -async function effectiveRoutesForAConnectionResource() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters = { - resourceId: - "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName", - virtualWanResourceType: "ExpressRouteConnection", - }; - const options = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EffectiveRoutesListForRouteTable.json - */ -async function effectiveRoutesForARouteTableResource() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters = { - resourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - virtualWanResourceType: "RouteTable", - }; - const options = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EffectiveRoutesListForVirtualHub.json - */ -async function effectiveRoutesForTheVirtualHub() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters = {}; - const options = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -async function main() { - await effectiveRoutesForAConnectionResource(); - await effectiveRoutesForARouteTableResource(); - await effectiveRoutesForTheVirtualHub(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetInboundRoutesSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetInboundRoutesSample.js deleted file mode 100644 index f589c21a06ca..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetInboundRoutesSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the inbound routes configured for the Virtual Hub on a particular connection. - * - * @summary Gets the inbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetInboundRoutes.json - */ -async function inboundRoutesForTheVirtualHubOnAParticularConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const getInboundRoutesParameters = { - connectionType: "ExpressRouteConnection", - resourceUri: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetInboundRoutesAndWait( - resourceGroupName, - virtualHubName, - getInboundRoutesParameters, - ); - console.log(result); -} - -async function main() { - await inboundRoutesForTheVirtualHubOnAParticularConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetOutboundRoutesSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetOutboundRoutesSample.js deleted file mode 100644 index 46ae70ef6f8f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetOutboundRoutesSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the outbound routes configured for the Virtual Hub on a particular connection. - * - * @summary Gets the outbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetOutboundRoutes.json - */ -async function outboundRoutesForTheVirtualHubOnAParticularConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const getOutboundRoutesParameters = { - connectionType: "ExpressRouteConnection", - resourceUri: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetOutboundRoutesAndWait( - resourceGroupName, - virtualHubName, - getOutboundRoutesParameters, - ); - console.log(result); -} - -async function main() { - await outboundRoutesForTheVirtualHubOnAParticularConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetSample.js deleted file mode 100644 index de6c38f2a19c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VirtualHub. - * - * @summary Retrieves the details of a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubGet.json - */ -async function virtualHubGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.get(resourceGroupName, virtualHubName); - console.log(result); -} - -async function main() { - await virtualHubGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubsListByResourceGroupSample.js deleted file mode 100644 index d0bb907f8ce7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VirtualHubs in a resource group. - * - * @summary Lists all the VirtualHubs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubListByResourceGroup.json - */ -async function virtualHubListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubs.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualHubListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubsListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubsListSample.js deleted file mode 100644 index 44b3f840ed5a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VirtualHubs in a subscription. - * - * @summary Lists all the VirtualHubs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubList.json - */ -async function virtualHubList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubs.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualHubList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualHubsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualHubsUpdateTagsSample.js deleted file mode 100644 index 07097932f9c4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualHubsUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates VirtualHub tags. - * - * @summary Updates VirtualHub tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubUpdateTags.json - */ -async function virtualHubUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub2"; - const virtualHubParameters = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.updateTags( - resourceGroupName, - virtualHubName, - virtualHubParameters, - ); - console.log(result); -} - -async function main() { - await virtualHubUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js deleted file mode 100644 index d466a27f9063..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway connection in the specified resource group. - * - * @summary Creates or updates a virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionCreate.json - */ -async function createVirtualNetworkGatewayConnectionS2S() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const parameters = { - authenticationType: "Certificate", - certificateAuthentication: { - inboundAuthCertificateChain: [ - "MIIC+TCCAeGgAwIBAgIQFOJUqDaxV5xJcKpTKO...", - "MIIC+TCCAeGgAwIBAgIQPJerInitNblK7yBgkqh...", - ], - inboundAuthCertificateSubjectName: "CN=rootCert.com", - outboundAuthCertificate: - "https://customerKv.vault.azure.net/Certificates/outBoundcert/Version", - }, - connectionMode: "Default", - connectionProtocol: "IKEv2", - connectionType: "IPsec", - dpdTimeoutSeconds: 30, - egressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", - }, - ], - enableBgp: false, - gatewayCustomBgpIpAddresses: [ - { - customBgpIpAddress: "169.254.21.1", - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/default", - }, - { - customBgpIpAddress: "169.254.21.3", - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/ActiveActive", - }, - ], - ingressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", - }, - ], - ipsecPolicies: [], - localNetworkGateway2: { - gatewayIpAddress: "x.x.x.x", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw", - localNetworkAddressSpace: { addressPrefixes: ["10.1.0.0/16"] }, - location: "centralus", - tags: {}, - }, - location: "centralus", - routingWeight: 0, - sharedKey: "Abc123", - trafficSelectorPolicies: [], - tunnelProperties: [ - { bgpPeeringAddress: "10.78.1.17", tunnelIpAddress: "10.78.1.5" }, - { bgpPeeringAddress: "10.78.1.20", tunnelIpAddress: "10.78.1.7" }, - ], - usePolicyBasedTrafficSelectors: false, - virtualNetworkGateway1: { - active: false, - bgpSettings: { - asn: 65514, - bgpPeeringAddress: "10.0.1.30", - peerWeight: 0, - }, - enableBgp: false, - gatewayType: "Vpn", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw", - ipConfigurations: [ - { - name: "gwipconfig1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - sku: { name: "VpnGw1", tier: "VpnGw1" }, - tags: {}, - vpnType: "RouteBased", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await createVirtualNetworkGatewayConnectionS2S(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsDeleteSample.js deleted file mode 100644 index 57402f9c5b1a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified virtual network Gateway connection. - * - * @summary Deletes the specified virtual network Gateway connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionDelete.json - */ -async function deleteVirtualNetworkGatewayConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js deleted file mode 100644 index c87174a2be7b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * - * @summary Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json - */ -async function getVirtualNetworkGatewayConnectionIkeSa() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginGetIkeSasAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayConnectionIkeSa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetSample.js deleted file mode 100644 index 982033eb73ae..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified virtual network gateway connection by resource group. - * - * @summary Gets the specified virtual network gateway connection by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGet.json - */ -async function getVirtualNetworkGatewayConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.get( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js deleted file mode 100644 index 6d65761f9c9c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * - * @summary The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json - */ -async function getVirtualNetworkGatewayConnectionSharedKey() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.getSharedKey( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsListSample.js deleted file mode 100644 index 10211e124c5c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * - * @summary The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionsList.json - */ -async function listVirtualNetworkGatewayConnectionsinResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGatewayConnections.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualNetworkGatewayConnectionsinResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js deleted file mode 100644 index 481bee9b84e4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the virtual network gateway connection specified. - * - * @summary Resets the virtual network gateway connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionReset.json - */ -async function resetVirtualNetworkGatewayConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginResetConnectionAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await resetVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js deleted file mode 100644 index a08c64d70b21..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * - * @summary The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json - */ -async function resetVirtualNetworkGatewayConnectionSharedKey() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const parameters = { keyLength: 128 }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginResetSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await resetVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js deleted file mode 100644 index 59aa5239fe25..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * - * @summary The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json - */ -async function setVirtualNetworkGatewayConnectionSharedKey() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const parameters = { value: "AzureAbc123" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginSetSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await setVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js deleted file mode 100644 index 25f92d882336..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const parameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter(); - await startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js deleted file mode 100644 index a0a2f84dff93..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Stops packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json - */ -async function stopPacketCaptureOnVirtualNetworkGatewayConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const parameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginStopPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await stopPacketCaptureOnVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js deleted file mode 100644 index 0b6fb4fc4629..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a virtual network gateway connection tags. - * - * @summary Updates a virtual network gateway connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json - */ -async function updateVirtualNetworkGatewayConnectionTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "test"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginUpdateTagsAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkGatewayConnectionTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js deleted file mode 100644 index 9d95f99ad2e8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * - * @summary Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRulePut.json - */ -async function virtualNetworkGatewayNatRulePut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const natRuleParameters = { - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "192.168.21.0/24", portRange: "300-400" }], - internalMappings: [{ addressSpace: "10.4.0.0/24", portRange: "200-300" }], - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/ipConfigurations/default", - mode: "EgressSnat", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - natRuleParameters, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayNatRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesDeleteSample.js deleted file mode 100644 index 1e4b53fe0215..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a nat rule. - * - * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleDelete.json - */ -async function virtualNetworkGatewayNatRuleDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayNatRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesGetSample.js deleted file mode 100644 index 16e093c4eb3c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a nat rule. - * - * @summary Retrieves the details of a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleGet.json - */ -async function virtualNetworkGatewayNatRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.get( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayNatRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js deleted file mode 100644 index ddacaa5711ca..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all nat rules for a particular virtual network gateway. - * - * @summary Retrieves all nat rules for a particular virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleList.json - */ -async function virtualNetworkGatewayNatRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGatewayNatRules.listByVirtualNetworkGateway( - resourceGroupName, - virtualNetworkGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualNetworkGatewayNatRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js deleted file mode 100644 index 098ef0f0ab41..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. - * - * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayUpdate.json - */ -async function updateVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = { - active: false, - allowRemoteVnetTraffic: false, - allowVirtualWanTraffic: false, - bgpSettings: { asn: 65515, bgpPeeringAddress: "10.0.1.30", peerWeight: 0 }, - customRoutes: { addressPrefixes: ["101.168.0.6/32"] }, - disableIPSecReplayProtection: false, - enableBgp: false, - enableBgpRouteTranslationForNat: false, - enableDnsForwarding: true, - enableHighBandwidthVpnGateway: false, - gatewayType: "Vpn", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - ipConfigurations: [ - { - name: "gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - natRules: [ - { - name: "natRule1", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "50.0.0.0/24" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", - internalMappings: [{ addressSpace: "10.10.0.0/24" }], - ipConfigurationId: "", - mode: "EgressSnat", - }, - { - name: "natRule2", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "30.0.0.0/24" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", - internalMappings: [{ addressSpace: "20.10.0.0/24" }], - ipConfigurationId: "", - mode: "IngressSnat", - }, - ], - sku: { name: "VpnGw1", tier: "VpnGw1" }, - vpnClientConfiguration: { - radiusServers: [ - { - radiusServerAddress: "10.2.0.0", - radiusServerScore: 20, - radiusServerSecret: "radiusServerSecret", - }, - ], - vpnClientProtocols: ["OpenVPN"], - vpnClientRevokedCertificates: [], - vpnClientRootCertificates: [], - }, - vpnType: "RouteBased", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. - * - * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkScalableGatewayUpdate.json - */ -async function updateVirtualNetworkScalableGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const parameters = { - active: false, - adminState: "Enabled", - allowRemoteVnetTraffic: false, - allowVirtualWanTraffic: false, - autoScaleConfiguration: { bounds: { max: 3, min: 2 } }, - bgpSettings: {}, - disableIPSecReplayProtection: false, - enableBgp: false, - enableBgpRouteTranslationForNat: false, - gatewayType: "ExpressRoute", - ipConfigurations: [ - { - name: "gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - natRules: [], - sku: { name: "ErGwScale", tier: "ErGwScale" }, - virtualNetworkGatewayPolicyGroups: [], - vpnClientConfiguration: {}, - vpnType: "PolicyBased", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkGateway(); - await updateVirtualNetworkScalableGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysDeleteSample.js deleted file mode 100644 index 5a735c22de54..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified virtual network gateway. - * - * @summary Deletes the specified virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayDelete.json - */ -async function deleteVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js deleted file mode 100644 index 04786273346e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Disconnect vpn connections of virtual network gateway in the specified resource group. - * - * @summary Disconnect vpn connections of virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json - */ -async function disconnectVpnConnectionsFromVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vpn-gateway-test"; - const virtualNetworkGatewayName = "vpngateway"; - const request = { - vpnConnectionIds: ["vpnconnId1", "vpnconnId2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginDisconnectVirtualNetworkGatewayVpnConnectionsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - request, - ); - console.log(result); -} - -async function main() { - await disconnectVpnConnectionsFromVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js deleted file mode 100644 index 783f43ce0f7a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * - * @summary Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json - */ -async function generateVirtualNetworkGatewayVpnProfile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGenerateVpnProfileAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await generateVirtualNetworkGatewayVpnProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js deleted file mode 100644 index 7574d8ec7482..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * - * @summary Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json - */ -async function generateVpnClientPackage() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGeneratevpnclientpackageAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await generateVpnClientPackage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js deleted file mode 100644 index c60e47740698..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * - * @summary This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json - */ -async function getVirtualNetworkGatewayAdvertisedRoutes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const peer = "test"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetAdvertisedRoutesAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peer, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayAdvertisedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js deleted file mode 100644 index 50b3d30ea1c4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * - * @summary The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json - */ -async function getVirtualNetworkGatewayBgpPeerStatus() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetBgpPeerStatusAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayBgpPeerStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js deleted file mode 100644 index 903d6a3493bd..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves the details of all the failover tests performed on the gateway for different peering locations - * - * @summary This operation retrieves the details of all the failover tests performed on the gateway for different peering locations - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json - */ -async function virtualNetworkGatewayGetFailoverAllTestsDetails() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const typeParam = "SingleSiteFailover"; - const fetchLatest = true; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetFailoverAllTestDetailsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - typeParam, - fetchLatest, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayGetFailoverAllTestsDetails(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js deleted file mode 100644 index 75d39c61dccf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid - * - * @summary This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json - */ -async function virtualNetworkGatewayGetFailoverSingleTestDetails() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const peeringLocation = "Vancouver"; - const failoverTestId = "fe458ae8-d2ae-4520-a104-44bc233bde7e"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetFailoverSingleTestDetailsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - failoverTestId, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayGetFailoverSingleTestDetails(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js deleted file mode 100644 index 963157a2afb4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * - * @summary This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayLearnedRoutes.json - */ -async function getVirtualNetworkGatewayLearnedRoutes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetLearnedRoutesAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayLearnedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetResiliencyInformationSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetResiliencyInformationSample.js deleted file mode 100644 index 82298a0a6385..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetResiliencyInformationSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score - * - * @summary This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetResiliencyInformation.json - */ -async function getVirtualNetworkGatewayResiliencyInformation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const attemptRefresh = true; - const options = { attemptRefresh }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetResiliencyInformationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayResiliencyInformation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetRoutesInformationSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetRoutesInformationSample.js deleted file mode 100644 index 8e7f78732bc8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetRoutesInformationSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves the route set information for an Express Route Gateway based on their resiliency - * - * @summary This operation retrieves the route set information for an Express Route Gateway based on their resiliency - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetRoutesInformation.json - */ -async function getVirtualNetworkGatewayRoutesInformation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const attemptRefresh = false; - const options = { - attemptRefresh, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetRoutesInformationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayRoutesInformation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetSample.js deleted file mode 100644 index e7b7ffa0ca8b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetSample.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified virtual network gateway by resource group. - * - * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGet.json - */ -async function getVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.get( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network gateway by resource group. - * - * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkScalableGatewayGet.json - */ -async function getVirtualNetworkScalableGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.get( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGateway(); - await getVirtualNetworkScalableGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js deleted file mode 100644 index 5f744c525185..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * - * @summary Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json - */ -async function getVirtualNetworkGatewayVpnProfilePackageUrl() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetVpnProfilePackageUrlAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayVpnProfilePackageUrl(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js deleted file mode 100644 index 86700c2a7af5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * - * @summary Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json - */ -async function getVirtualNetworkGatewayVpnclientConnectionHealth() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vnet-test"; - const virtualNetworkGatewayName = "vpnp2sgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetVpnclientConnectionHealthAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayVpnclientConnectionHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js deleted file mode 100644 index e557722c5f78..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * - * @summary The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json - */ -async function getVirtualNetworkGatewayVpnClientIpsecParameters() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetVpnclientIpsecParametersAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayVpnClientIpsecParameters(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeAbortMigrationSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeAbortMigrationSample.js deleted file mode 100644 index 8f1c5532c33c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeAbortMigrationSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Trigger abort migration for the virtual network gateway. - * - * @summary Trigger abort migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayAbortMigration.json - */ -async function virtualNetworkGatewayAbortMigration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginInvokeAbortMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayAbortMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeCommitMigrationSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeCommitMigrationSample.js deleted file mode 100644 index 64bdf71dde7d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeCommitMigrationSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Trigger commit migration for the virtual network gateway. - * - * @summary Trigger commit migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayCommitMigration.json - */ -async function virtualNetworkGatewayCommitMigration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginInvokeCommitMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayCommitMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeExecuteMigrationSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeExecuteMigrationSample.js deleted file mode 100644 index 7c7176fa544f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokeExecuteMigrationSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Trigger execute migration for the virtual network gateway. - * - * @summary Trigger execute migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayExecuteMigration.json - */ -async function virtualNetworkGatewayExecuteMigration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginInvokeExecuteMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayExecuteMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokePrepareMigrationSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokePrepareMigrationSample.js deleted file mode 100644 index c87c1bda42b1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysInvokePrepareMigrationSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Trigger prepare migration for the virtual network gateway. - * - * @summary Trigger prepare migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayPrepareMigration.json - */ -async function virtualNetworkGatewayPrepareMigration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const migrationParams = { - migrationType: "UpgradeDeploymentToStandardIP", - resourceUrl: "testUrl", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginInvokePrepareMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - migrationParams, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayPrepareMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListConnectionsSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListConnectionsSample.js deleted file mode 100644 index 2115a1b5b2c2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListConnectionsSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the connections in a virtual network gateway. - * - * @summary Gets all the connections in a virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaysListConnections.json - */ -async function virtualNetworkGatewaysListConnections() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const virtualNetworkGatewayName = "test-vpn-gateway-1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGateways.listConnections( - resourceGroupName, - virtualNetworkGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualNetworkGatewaysListConnections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListRadiusSecretsSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListRadiusSecretsSample.js deleted file mode 100644 index 0e59dbd2abda..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListRadiusSecretsSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. - * - * @summary List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AllVirtualNetworkGatewayRadiusServerSecretsList.json - */ -async function listAllVirtualNetworkGatewayRadiusServerSecrets() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.listRadiusSecrets( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await listAllVirtualNetworkGatewayRadiusServerSecrets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListSample.js deleted file mode 100644 index 2b1c1b982085..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all virtual network gateways by resource group. - * - * @summary Gets all virtual network gateways by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayList.json - */ -async function listVirtualNetworkGatewaysinResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualNetworkGatewaysinResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysResetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysResetSample.js deleted file mode 100644 index 9d551b88cdc0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysResetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the primary of the virtual network gateway in the specified resource group. - * - * @summary Resets the primary of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayReset.json - */ -async function resetVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginResetAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await resetVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js deleted file mode 100644 index a0fe83ff910b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * - * @summary Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json - */ -async function resetVpnClientSharedKey() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginResetVpnClientSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await resetVpnClientSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js deleted file mode 100644 index b6af5981ab56..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * - * @summary The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json - */ -async function setVirtualNetworkGatewayVpnClientIpsecParameters() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const vpnclientIpsecParams = { - dhGroup: "DHGroup2", - ikeEncryption: "AES256", - ikeIntegrity: "SHA384", - ipsecEncryption: "AES256", - ipsecIntegrity: "SHA256", - pfsGroup: "PFS2", - saDataSizeKilobytes: 429497, - saLifeTimeSeconds: 86473, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginSetVpnclientIpsecParametersAndWait( - resourceGroupName, - virtualNetworkGatewayName, - vpnclientIpsecParams, - ); - console.log(result); -} - -async function main() { - await setVirtualNetworkGatewayVpnClientIpsecParameters(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js deleted file mode 100644 index f71471e15afb..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation starts failover simulation on the gateway for the specified peering location - * - * @summary This operation starts failover simulation on the gateway for the specified peering location - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json - */ -async function virtualNetworkGatewayStartSiteFailoverSimulation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const peeringLocation = "Vancouver"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayStartSiteFailoverSimulation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js deleted file mode 100644 index 26ebe5ad7dec..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayWithFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStartPacketCapture.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayWithoutFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await startPacketCaptureOnVirtualNetworkGatewayWithFilter(); - await startPacketCaptureOnVirtualNetworkGatewayWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js deleted file mode 100644 index 3e9a214f087c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation stops failover simulation on the gateway for the specified peering location - * - * @summary This operation stops failover simulation on the gateway for the specified peering location - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json - */ -async function virtualNetworkGatewayStopSiteFailoverSimulation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const stopParameters = { - peeringLocation: "Vancouver", - wasSimulationSuccessful: true, - details: [ - { - failoverConnectionName: "conn1", - failoverLocation: "Denver", - isVerified: false, - }, - { - failoverConnectionName: "conn2", - failoverLocation: "Amsterdam", - isVerified: true, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - stopParameters, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayStopSiteFailoverSimulation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js deleted file mode 100644 index 47ff4c34e473..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops packet capture on virtual network gateway in the specified resource group. - * - * @summary Stops packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStopPacketCapture.json - */ -async function stopPacketCaptureOnVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginStopPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await stopPacketCaptureOnVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js deleted file mode 100644 index b1d30fa23894..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a xml format representation for supported vpn devices. - * - * @summary Gets a xml format representation for supported vpn devices. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json - */ -async function listVirtualNetworkGatewaySupportedVpnDevices() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.supportedVpnDevices( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await listVirtualNetworkGatewaySupportedVpnDevices(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysUpdateTagsSample.js deleted file mode 100644 index 847ae9b0d63b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a virtual network gateway tags. - * - * @summary Updates a virtual network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayUpdateTags.json - */ -async function updateVirtualNetworkGatewayTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginUpdateTagsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js deleted file mode 100644 index e36b98eefd39..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a xml format representation for vpn device configuration script. - * - * @summary Gets a xml format representation for vpn device configuration script. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json - */ -async function getVpnDeviceConfigurationScript() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngw"; - const parameters = { - deviceFamily: "ISR", - firmwareVersion: "IOS 15.1 (Preview)", - vendor: "Cisco", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.vpnDeviceConfigurationScript( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await getVpnDeviceConfigurationScript(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js deleted file mode 100644 index b97f90a056f9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkV6SubnetPeeringCreate.json - */ -async function createV6SubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: true, - localSubnetNames: ["Subnet1", "Subnet4"], - peerCompleteVnets: false, - remoteSubnetNames: ["Subnet2"], - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringCreate.json - */ -async function createPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json - */ -async function createPeeringWithRemoteVirtualNetworkEncryption() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkSubnetPeeringCreate.json - */ -async function createSubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: false, - localSubnetNames: ["Subnet1", "Subnet4"], - peerCompleteVnets: false, - remoteSubnetNames: ["Subnet2"], - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringSync.json - */ -async function syncPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkV6SubnetPeeringSync.json - */ -async function syncV6SubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: true, - peerCompleteVnets: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkSubnetPeeringSync.json - */ -async function syncSubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: false, - peerCompleteVnets: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -async function main() { - await createV6SubnetPeering(); - await createPeering(); - await createPeeringWithRemoteVirtualNetworkEncryption(); - await createSubnetPeering(); - await syncPeering(); - await syncV6SubnetPeering(); - await syncSubnetPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsDeleteSample.js deleted file mode 100644 index f44b4bd624e5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified virtual network peering. - * - * @summary Deletes the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringDelete.json - */ -async function deletePeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -async function main() { - await deletePeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsGetSample.js deleted file mode 100644 index 0dc88559af97..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsGetSample.js +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkV6SubnetPeeringGet.json - */ -async function getV6SubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringGet.json - */ -async function getPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json - */ -async function getPeeringWithRemoteVirtualNetworkEncryption() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkSubnetPeeringGet.json - */ -async function getSubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -async function main() { - await getV6SubnetPeering(); - await getPeering(); - await getPeeringWithRemoteVirtualNetworkEncryption(); - await getSubnetPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsListSample.js deleted file mode 100644 index 62b8a6de31a5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkPeeringsListSample.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all virtual network peerings in a virtual network. - * - * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringList.json - */ -async function listPeerings() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkPeerings.list( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets all virtual network peerings in a virtual network. - * - * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json - */ -async function listPeeringsWithRemoteVirtualNetworkEncryption() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkPeerings.list( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPeerings(); - await listPeeringsWithRemoteVirtualNetworkEncryption(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsCreateOrUpdateSample.js deleted file mode 100644 index a688c3a6e1f1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a Virtual Network Tap. - * - * @summary Creates or updates a Virtual Network Tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapCreate.json - */ -async function createVirtualNetworkTap() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const parameters = { - destinationNetworkInterfaceIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testNetworkInterface/ipConfigurations/ipconfig1", - }, - location: "centraluseuap", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.beginCreateOrUpdateAndWait( - resourceGroupName, - tapName, - parameters, - ); - console.log(result); -} - -async function main() { - await createVirtualNetworkTap(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsDeleteSample.js deleted file mode 100644 index ed72b41c355c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified virtual network tap. - * - * @summary Deletes the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapDelete.json - */ -async function deleteVirtualNetworkTapResource() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.beginDeleteAndWait(resourceGroupName, tapName); - console.log(result); -} - -async function main() { - await deleteVirtualNetworkTapResource(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsGetSample.js deleted file mode 100644 index c392cf0887d4..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified virtual network tap. - * - * @summary Gets information about the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapGet.json - */ -async function getVirtualNetworkTap() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "testvtap"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.get(resourceGroupName, tapName); - console.log(result); -} - -async function main() { - await getVirtualNetworkTap(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsListAllSample.js deleted file mode 100644 index 4a9f80de69fa..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. - * - * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapListAll.json - */ -async function listAllVirtualNetworkTaps() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkTaps.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllVirtualNetworkTaps(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsListByResourceGroupSample.js deleted file mode 100644 index 2881d8f99f7c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. - * - * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapList.json - */ -async function listVirtualNetworkTapsInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkTaps.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualNetworkTapsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsUpdateTagsSample.js deleted file mode 100644 index 284da08cca05..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworkTapsUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an VirtualNetworkTap tags. - * - * @summary Updates an VirtualNetworkTap tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapUpdateTags.json - */ -async function updateVirtualNetworkTapTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const tapParameters = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.updateTags( - resourceGroupName, - tapName, - tapParameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkTapTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js deleted file mode 100644 index a5d56b9dee7d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks whether a private IP address is available for use. - * - * @summary Checks whether a private IP address is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCheckIPAddressAvailability.json - */ -async function checkIPAddressAvailability() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const ipAddress = "10.0.1.4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.checkIPAddressAvailability( - resourceGroupName, - virtualNetworkName, - ipAddress, - ); - console.log(result); -} - -async function main() { - await checkIPAddressAvailability(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworksCreateOrUpdateSample.js deleted file mode 100644 index 58a574ebf74b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreate.json - */ -async function createVirtualNetwork() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - flowTimeoutInMinutes: 10, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateWithBgpCommunities.json - */ -async function createVirtualNetworkWithBgpCommunities() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - bgpCommunities: { virtualNetworkCommunity: "12076:20000" }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateSubnetWithDelegation.json - */ -async function createVirtualNetworkWithDelegatedSubnets() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "westcentralus", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/24", - delegations: [ - { - name: "myDelegation", - serviceName: "Microsoft.Sql/managedInstances", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateWithEncryption.json - */ -async function createVirtualNetworkWithEncryption() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - encryption: { enabled: true, enforcement: "AllowUnencrypted" }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateWithIpamPool.json - */ -async function createVirtualNetworkWithIpamPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { - ipamPoolPrefixAllocations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", - numberOfIpAddresses: "65536", - }, - ], - }, - location: "eastus", - subnets: [ - { - name: "test-1", - ipamPoolPrefixAllocations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", - numberOfIpAddresses: "80", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateServiceEndpoints.json - */ -async function createVirtualNetworkWithServiceEndpoints() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vnetTest"; - const virtualNetworkName = "vnet1"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json - */ -async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vnetTest"; - const virtualNetworkName = "vnet1"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus2euap", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/16", - serviceEndpointPolicies: [ - { - id: "/subscriptions/subid/resourceGroups/vnetTest/providers/Microsoft.Network/serviceEndpointPolicies/ServiceEndpointPolicy1", - }, - ], - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateSubnet.json - */ -async function createVirtualNetworkWithSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json - */ -async function createVirtualNetworkWithSubnetContainingAddressPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [{ name: "test-2", addressPrefixes: ["10.0.0.0/28", "10.0.1.0/28"] }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main() { - await createVirtualNetwork(); - await createVirtualNetworkWithBgpCommunities(); - await createVirtualNetworkWithDelegatedSubnets(); - await createVirtualNetworkWithEncryption(); - await createVirtualNetworkWithIpamPool(); - await createVirtualNetworkWithServiceEndpoints(); - await createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(); - await createVirtualNetworkWithSubnet(); - await createVirtualNetworkWithSubnetContainingAddressPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworksDeleteSample.js deleted file mode 100644 index f9c525ae61ba..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified virtual network. - * - * @summary Deletes the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkDelete.json - */ -async function deleteVirtualNetwork() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworksGetSample.js deleted file mode 100644 index b64941743292..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksGetSample.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGet.json - */ -async function getVirtualNetwork() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get(resourceGroupName, virtualNetworkName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetWithSubnetDelegation.json - */ -async function getVirtualNetworkWithADelegatedSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get(resourceGroupName, virtualNetworkName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetWithServiceAssociationLink.json - */ -async function getVirtualNetworkWithServiceAssociationLinks() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get(resourceGroupName, virtualNetworkName); - console.log(result); -} - -async function main() { - await getVirtualNetwork(); - await getVirtualNetworkWithADelegatedSubnet(); - await getVirtualNetworkWithServiceAssociationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListAllSample.js deleted file mode 100644 index e06ed7a32af8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all virtual networks in a subscription. - * - * @summary Gets all virtual networks in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkListAll.json - */ -async function listAllVirtualNetworks() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllVirtualNetworks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListDdosProtectionStatusSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListDdosProtectionStatusSample.js deleted file mode 100644 index 6d04969ab764..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListDdosProtectionStatusSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * - * @summary Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetDdosProtectionStatus.json - */ -async function getDdosProtectionStatusOfAVirtualNetwork() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const top = 75; - const options = { - top, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.beginListDdosProtectionStatusAndWait( - resourceGroupName, - virtualNetworkName, - options, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getDdosProtectionStatusOfAVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListSample.js deleted file mode 100644 index 0083b57cb139..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all virtual networks in a resource group. - * - * @summary Gets all virtual networks in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkList.json - */ -async function listVirtualNetworksInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualNetworksInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListUsageSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListUsageSample.js deleted file mode 100644 index 06e2ce9678a7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksListUsageSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists usage stats. - * - * @summary Lists usage stats. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkListUsage.json - */ -async function vnetGetUsage() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listUsage( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vnetGetUsage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualNetworksUpdateTagsSample.js deleted file mode 100644 index 42e39980d6b8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualNetworksUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a virtual network tags. - * - * @summary Updates a virtual network tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkUpdateTags.json - */ -async function updateVirtualNetworkTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.updateTags( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsCreateOrUpdateSample.js deleted file mode 100644 index a8830a4ce545..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Virtual Router Peering. - * - * @summary Creates or updates the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringPut.json - */ -async function createVirtualRouterPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const parameters = { - peerAsn: 20000, - peerIp: "192.168.1.5", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualRouterName, - peeringName, - parameters, - ); - console.log(result); -} - -async function main() { - await createVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsDeleteSample.js deleted file mode 100644 index de2d213b2c3a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified peering from a Virtual Router. - * - * @summary Deletes the specified peering from a Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringDelete.json - */ -async function deleteVirtualRouterPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.beginDeleteAndWait( - resourceGroupName, - virtualRouterName, - peeringName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsGetSample.js deleted file mode 100644 index 34548f1bc2f1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Virtual Router Peering. - * - * @summary Gets the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringGet.json - */ -async function getVirtualRouterPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.get( - resourceGroupName, - virtualRouterName, - peeringName, - ); - console.log(result); -} - -async function main() { - await getVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsListSample.js deleted file mode 100644 index 64c4390df218..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualRouterPeeringsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Virtual Router Peerings in a Virtual Router resource. - * - * @summary Lists all Virtual Router Peerings in a Virtual Router resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringList.json - */ -async function listAllVirtualRouterPeeringsForAGivenVirtualRouter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouterPeerings.list( - resourceGroupName, - virtualRouterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllVirtualRouterPeeringsForAGivenVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualRoutersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualRoutersCreateOrUpdateSample.js deleted file mode 100644 index 4c6b5974ad25..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualRoutersCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Virtual Router. - * - * @summary Creates or updates the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPut.json - */ -async function createVirtualRouter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const parameters = { - hostedGateway: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vnetGateway", - }, - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualRouterName, - parameters, - ); - console.log(result); -} - -async function main() { - await createVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualRoutersDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualRoutersDeleteSample.js deleted file mode 100644 index 635fbea7cb0f..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualRoutersDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Virtual Router. - * - * @summary Deletes the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterDelete.json - */ -async function deleteVirtualRouter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.beginDeleteAndWait( - resourceGroupName, - virtualRouterName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualRoutersGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualRoutersGetSample.js deleted file mode 100644 index 8e809e5f9b07..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualRoutersGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Virtual Router. - * - * @summary Gets the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterGet.json - */ -async function getVirtualRouter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.get(resourceGroupName, virtualRouterName); - console.log(result); -} - -async function main() { - await getVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualRoutersListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualRoutersListByResourceGroupSample.js deleted file mode 100644 index cf9cf5aa6a50..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualRoutersListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Virtual Routers in a resource group. - * - * @summary Lists all Virtual Routers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterListByResourceGroup.json - */ -async function listAllVirtualRouterForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouters.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllVirtualRouterForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualRoutersListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualRoutersListSample.js deleted file mode 100644 index 4b1154e997ae..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualRoutersListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Virtual Routers in a subscription. - * - * @summary Gets all the Virtual Routers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterListBySubscription.json - */ -async function listAllVirtualRoutersForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouters.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllVirtualRoutersForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualWansCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualWansCreateOrUpdateSample.js deleted file mode 100644 index 5f7c01777969..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualWansCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * - * @summary Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANPut.json - */ -async function virtualWanCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const wANParameters = { - typePropertiesType: "Basic", - disableVpnEncryption: false, - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualWANName, - wANParameters, - ); - console.log(result); -} - -async function main() { - await virtualWanCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualWansDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualWansDeleteSample.js deleted file mode 100644 index 1e0d748fcf64..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualWansDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VirtualWAN. - * - * @summary Deletes a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANDelete.json - */ -async function virtualWanDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "virtualWan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.beginDeleteAndWait(resourceGroupName, virtualWANName); - console.log(result); -} - -async function main() { - await virtualWanDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualWansGetSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualWansGetSample.js deleted file mode 100644 index 447e6d8591b2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualWansGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VirtualWAN. - * - * @summary Retrieves the details of a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANGet.json - */ -async function virtualWanGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.get(resourceGroupName, virtualWANName); - console.log(result); -} - -async function main() { - await virtualWanGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualWansListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualWansListByResourceGroupSample.js deleted file mode 100644 index 71ff9410561b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualWansListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VirtualWANs in a resource group. - * - * @summary Lists all the VirtualWANs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANListByResourceGroup.json - */ -async function virtualWanListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualWans.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualWanListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualWansListSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualWansListSample.js deleted file mode 100644 index 2020d81040a2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualWansListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VirtualWANs in a subscription. - * - * @summary Lists all the VirtualWANs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANList.json - */ -async function virtualWanList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualWans.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualWanList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/virtualWansUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/virtualWansUpdateTagsSample.js deleted file mode 100644 index e0650f2ec7f1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/virtualWansUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a VirtualWAN tags. - * - * @summary Updates a VirtualWAN tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANUpdateTags.json - */ -async function virtualWanUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const wANParameters = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.updateTags( - resourceGroupName, - virtualWANName, - wANParameters, - ); - console.log(result); -} - -async function main() { - await virtualWanUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsCreateOrUpdateSample.js deleted file mode 100644 index fbe45e263c91..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * - * @summary Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionPut.json - */ -async function vpnConnectionPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const vpnConnectionParameters = { - remoteVpnSite: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", - }, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - }, - trafficSelectorPolicies: [], - vpnLinkConnections: [ - { - name: "Connection-Link1", - connectionBandwidth: 200, - sharedKey: "key", - usePolicyBasedTrafficSelectors: false, - vpnConnectionProtocolType: "IKEv2", - vpnLinkConnectionMode: "Default", - vpnSiteLink: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - connectionName, - vpnConnectionParameters, - ); - console.log(result); -} - -async function main() { - await vpnConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsDeleteSample.js deleted file mode 100644 index 0016cc3f9960..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a vpn connection. - * - * @summary Deletes a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionDelete.json - */ -async function vpnConnectionDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginDeleteAndWait( - resourceGroupName, - gatewayName, - connectionName, - ); - console.log(result); -} - -async function main() { - await vpnConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsGetSample.js deleted file mode 100644 index 5e71b985bac5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a vpn connection. - * - * @summary Retrieves the details of a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionGet.json - */ -async function vpnConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.get(resourceGroupName, gatewayName, connectionName); - console.log(result); -} - -async function main() { - await vpnConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsListByVpnGatewaySample.js b/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsListByVpnGatewaySample.js deleted file mode 100644 index f0cecff3b42d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsListByVpnGatewaySample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all vpn connections for a particular virtual wan vpn gateway. - * - * @summary Retrieves all vpn connections for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionList.json - */ -async function vpnConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnConnections.listByVpnGateway(resourceGroupName, gatewayName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsStartPacketCaptureSample.js deleted file mode 100644 index 8758904ce4d5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsStartPacketCaptureSample.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. - * - * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVpnConnectionWithFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - linkConnectionNames: ["siteLink1", "siteLink2"], - }; - const options = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. - * - * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionStartPacketCapture.json - */ -async function startPacketCaptureOnVpnConnectionWithoutFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters = { - linkConnectionNames: ["siteLink1", "siteLink2"], - }; - const options = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -async function main() { - await startPacketCaptureOnVpnConnectionWithFilter(); - await startPacketCaptureOnVpnConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsStopPacketCaptureSample.js deleted file mode 100644 index b6aaca3be8b3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnConnectionsStopPacketCaptureSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops packet capture on Vpn connection in the specified resource group. - * - * @summary Stops packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionStopPacketCapture.json - */ -async function startPacketCaptureOnVpnConnectionWithoutFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters = { - linkConnectionNames: ["vpnSiteLink1", "vpnSiteLink2"], - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStopPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -async function main() { - await startPacketCaptureOnVpnConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysCreateOrUpdateSample.js deleted file mode 100644 index a8278c3dc999..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * - * @summary Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayPut.json - */ -async function vpnGatewayPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnGatewayParameters = { - bgpSettings: { - asn: 65515, - bgpPeeringAddresses: [ - { - customBgpIpAddresses: ["169.254.21.5"], - ipconfigurationId: "Instance0", - }, - { - customBgpIpAddresses: ["169.254.21.10"], - ipconfigurationId: "Instance1", - }, - ], - peerWeight: 0, - }, - connections: [ - { - name: "vpnConnection1", - remoteVpnSite: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", - }, - vpnLinkConnections: [ - { - name: "Connection-Link1", - connectionBandwidth: 200, - egressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03", - }, - ], - sharedKey: "key", - vpnConnectionProtocolType: "IKEv2", - vpnSiteLink: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", - }, - }, - ], - }, - ], - enableBgpRouteTranslationForNat: false, - isRoutingPreferenceInternet: false, - location: "westcentralus", - natRules: [ - { - name: "nat03", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "192.168.0.0/26" }], - internalMappings: [{ addressSpace: "0.0.0.0/26" }], - ipConfigurationId: "", - mode: "EgressSnat", - }, - ], - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - ); - console.log(result); -} - -async function main() { - await vpnGatewayPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysDeleteSample.js deleted file mode 100644 index a61d7aef47d5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a virtual wan vpn gateway. - * - * @summary Deletes a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayDelete.json - */ -async function vpnGatewayDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginDeleteAndWait(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await vpnGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysGetSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysGetSample.js deleted file mode 100644 index e18f499ef519..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a virtual wan vpn gateway. - * - * @summary Retrieves the details of a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayGet.json - */ -async function vpnGatewayGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.get(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await vpnGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysListByResourceGroupSample.js deleted file mode 100644 index ac10db3042b7..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VpnGateways in a resource group. - * - * @summary Lists all the VpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayListByResourceGroup.json - */ -async function vpnGatewayListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnGateways.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysListSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysListSample.js deleted file mode 100644 index 85ff0730cfc2..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VpnGateways in a subscription. - * - * @summary Lists all the VpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayList.json - */ -async function vpnGatewayListBySubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnGateways.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysResetSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysResetSample.js deleted file mode 100644 index 4bfa95f0b2c6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysResetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the primary of the vpn gateway in the specified resource group. - * - * @summary Resets the primary of the vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayReset.json - */ -async function resetVpnGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginResetAndWait(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await resetVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysStartPacketCaptureSample.js deleted file mode 100644 index 0755d48b25fc..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysStartPacketCaptureSample.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. - * - * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVpnGatewayWithFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const parameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. - * - * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStartPacketCapture.json - */ -async function startPacketCaptureOnVpnGatewayWithoutFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main() { - await startPacketCaptureOnVpnGatewayWithFilter(); - await startPacketCaptureOnVpnGatewayWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysStopPacketCaptureSample.js deleted file mode 100644 index 680fc31a81df..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysStopPacketCaptureSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops packet capture on vpn gateway in the specified resource group. - * - * @summary Stops packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStopPacketCapture.json - */ -async function stopPacketCaptureOnVpnGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const parameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStopPacketCaptureAndWait( - resourceGroupName, - gatewayName, - options, - ); - console.log(result); -} - -async function main() { - await stopPacketCaptureOnVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysUpdateTagsSample.js deleted file mode 100644 index edfad769cb2b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates virtual wan vpn gateway tags. - * - * @summary Updates virtual wan vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayUpdateTags.json - */ -async function vpnGatewayUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnGatewayParameters = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginUpdateTagsAndWait( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - ); - console.log(result); -} - -async function main() { - await vpnGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js deleted file mode 100644 index 065943a25c3c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all shared keys of VpnLink connection specified. - * - * @summary Lists all shared keys of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionSharedKeysGet.json - */ -async function vpnSiteLinkConnectionSharedKeysGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnLinkConnections.listAllSharedKeys( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnSiteLinkConnectionSharedKeysGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js b/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js deleted file mode 100644 index 1c922c1c410d..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the shared key of VpnLink connection specified. - * - * @summary Gets the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.getDefaultSharedKey( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main() { - await vpnSiteLinkConnectionDefaultSharedKeyGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetIkeSasSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetIkeSasSample.js deleted file mode 100644 index 418e6986338e..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsGetIkeSasSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * - * @summary Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionGetIkeSas.json - */ -async function getVpnLinkConnectionIkeSa() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginGetIkeSasAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main() { - await getVpnLinkConnectionIkeSa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsListByVpnConnectionSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsListByVpnConnectionSample.js deleted file mode 100644 index ffd6f9d1cf37..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsListByVpnConnectionSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * - * @summary Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionList.json - */ -async function vpnSiteLinkConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnLinkConnections.listByVpnConnection( - resourceGroupName, - gatewayName, - connectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnSiteLinkConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js b/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js deleted file mode 100644 index c0d33e92991b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the value of the shared key of VpnLink connection specified. - * - * @summary Gets the value of the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.listDefaultSharedKey( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main() { - await vpnSiteLinkConnectionDefaultSharedKeyList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsResetConnectionSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsResetConnectionSample.js deleted file mode 100644 index b56b141dc11b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsResetConnectionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the VpnLink connection specified. - * - * @summary Resets the VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionReset.json - */ -async function resetVpnLinkConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginResetConnectionAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main() { - await resetVpnLinkConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js b/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js deleted file mode 100644 index 89e25aac34cf..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * - * @summary Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const connectionSharedKeyParameters = { - properties: { sharedKey: "ABCDEF123456" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginSetOrInitDefaultSharedKeyAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - connectionSharedKeyParameters, - ); - console.log(result); -} - -async function main() { - await vpnSiteLinkConnectionDefaultSharedKeyPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js deleted file mode 100644 index fe6227e2991c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * - * @summary Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetVirtualWanVpnServerConfigurations.json - */ -async function getVirtualWanVpnServerConfigurations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurationsAssociatedWithVirtualWan.beginListAndWait( - resourceGroupName, - virtualWANName, - ); - console.log(result); -} - -async function main() { - await getVirtualWanVpnServerConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index 4c822df9c16b..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * - * @summary Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationPut.json - */ -async function vpnServerConfigurationCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const vpnServerConfigurationParameters = { - configurationPolicyGroups: [ - { - name: "policyGroup1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup1", - isDefault: true, - policyMembers: [ - { - name: "policy1", - attributeType: "RadiusAzureGroupId", - attributeValue: "6ad1bd08", - }, - ], - priority: 0, - }, - { - name: "policyGroup2", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup2", - isDefault: true, - policyMembers: [ - { - name: "policy2", - attributeType: "CertificateGroupId", - attributeValue: "red.com", - }, - ], - priority: 0, - }, - ], - location: "West US", - radiusClientRootCertificates: [ - { - name: "vpnServerConfigRadiusClientRootCert1", - thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", - }, - ], - radiusServerRootCertificates: [ - { - name: "vpnServerConfigRadiusServerRootCer1", - publicCertData: - "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuM", - }, - ], - radiusServers: [ - { - radiusServerAddress: "10.0.0.0", - radiusServerScore: 25, - radiusServerSecret: "radiusServerSecret", - }, - ], - tags: { key1: "value1" }, - vpnClientIpsecPolicies: [ - { - dhGroup: "DHGroup14", - ikeEncryption: "AES256", - ikeIntegrity: "SHA384", - ipsecEncryption: "AES256", - ipsecIntegrity: "SHA256", - pfsGroup: "PFS14", - saDataSizeKilobytes: 429497, - saLifeTimeSeconds: 86472, - }, - ], - vpnClientRevokedCertificates: [ - { - name: "vpnServerConfigVpnClientRevokedCert1", - thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", - }, - ], - vpnClientRootCertificates: [ - { - name: "vpnServerConfigVpnClientRootCert1", - publicCertData: - "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuN", - }, - ], - vpnProtocols: ["IkeV2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - ); - console.log(result); -} - -async function main() { - await vpnServerConfigurationCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsDeleteSample.js deleted file mode 100644 index 54d9f0dbf792..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VpnServerConfiguration. - * - * @summary Deletes a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationDelete.json - */ -async function vpnServerConfigurationDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.beginDeleteAndWait( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main() { - await vpnServerConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsGetSample.js deleted file mode 100644 index 4ad6d663e937..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VpnServerConfiguration. - * - * @summary Retrieves the details of a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationGet.json - */ -async function vpnServerConfigurationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.get( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main() { - await vpnServerConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListByResourceGroupSample.js deleted file mode 100644 index de1e792ee7e8..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the vpnServerConfigurations in a resource group. - * - * @summary Lists all the vpnServerConfigurations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationListByResourceGroup.json - */ -async function vpnServerConfigurationListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnServerConfigurations.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnServerConfigurationListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListRadiusSecretsSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListRadiusSecretsSample.js deleted file mode 100644 index f65c82486527..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListRadiusSecretsSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all Radius servers with respective radius secrets from VpnServerConfiguration. - * - * @summary List all Radius servers with respective radius secrets from VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AllVpnServerConfigurationRadiusServerSecretsList.json - */ -async function listAllVpnServerConfigurationRadiusServerSecrets() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnserverconfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.listRadiusSecrets( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main() { - await listAllVpnServerConfigurationRadiusServerSecrets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListSample.js deleted file mode 100644 index 6c19b8f08ac0..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VpnServerConfigurations in a subscription. - * - * @summary Lists all the VpnServerConfigurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationList.json - */ -async function vpnServerConfigurationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnServerConfigurations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnServerConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsUpdateTagsSample.js deleted file mode 100644 index c83af19f9260..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnServerConfigurationsUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates VpnServerConfiguration tags. - * - * @summary Updates VpnServerConfiguration tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationUpdateTags.json - */ -async function vpnServerConfigurationUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const vpnServerConfigurationParameters = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.updateTags( - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - ); - console.log(result); -} - -async function main() { - await vpnServerConfigurationUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinkConnectionsGetSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinkConnectionsGetSample.js deleted file mode 100644 index c9d7ee3398b9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinkConnectionsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a vpn site link connection. - * - * @summary Retrieves the details of a vpn site link connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionGet.json - */ -async function vpnSiteLinkConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSiteLinkConnections.get( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main() { - await vpnSiteLinkConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinksGetSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinksGetSample.js deleted file mode 100644 index 98da5674a2c6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinksGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VPN site link. - * - * @summary Retrieves the details of a VPN site link. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkGet.json - */ -async function vpnSiteGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteLinkName = "vpnSiteLink1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSiteLinks.get(resourceGroupName, vpnSiteName, vpnSiteLinkName); - console.log(result); -} - -async function main() { - await vpnSiteGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinksListByVpnSiteSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinksListByVpnSiteSample.js deleted file mode 100644 index 427f5a3d143c..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnSiteLinksListByVpnSiteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the vpnSiteLinks in a resource group for a vpn site. - * - * @summary Lists all the vpnSiteLinks in a resource group for a vpn site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkListByVpnSite.json - */ -async function vpnSiteLinkListByVpnSite() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSiteLinks.listByVpnSite(resourceGroupName, vpnSiteName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnSiteLinkListByVpnSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnSitesConfigurationDownloadSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnSitesConfigurationDownloadSample.js deleted file mode 100644 index 586e1485cea3..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnSitesConfigurationDownloadSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gives the sas-url to download the configurations for vpn-sites in a resource group. - * - * @summary Gives the sas-url to download the configurations for vpn-sites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSitesConfigurationDownload.json - */ -async function vpnSitesConfigurationDownload() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const request = { - outputBlobSasUrl: - "https://blobcortextesturl.blob.core.windows.net/folderforconfig/vpnFile?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - vpnSites: ["/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/abc"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSitesConfiguration.beginDownloadAndWait( - resourceGroupName, - virtualWANName, - request, - ); - console.log(result); -} - -async function main() { - await vpnSitesConfigurationDownload(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnSitesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnSitesCreateOrUpdateSample.js deleted file mode 100644 index a6ad2f23be04..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnSitesCreateOrUpdateSample.js +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * - * @summary Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSitePut.json - */ -async function vpnSiteCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteParameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - isSecuritySite: false, - location: "West US", - o365Policy: { - breakOutCategories: { default: false, allow: true, optimize: true }, - }, - tags: { key1: "value1" }, - virtualWan: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1", - }, - vpnSiteLinks: [ - { - name: "vpnSiteLink1", - bgpProperties: { asn: 1234, bgpPeeringAddress: "192.168.0.0" }, - fqdn: "link1.vpnsite1.contoso.com", - ipAddress: "50.50.50.56", - linkProperties: { linkProviderName: "vendor1", linkSpeedInMbps: 0 }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnSiteName, - vpnSiteParameters, - ); - console.log(result); -} - -async function main() { - await vpnSiteCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnSitesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnSitesDeleteSample.js deleted file mode 100644 index ecbc34f8a560..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnSitesDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VpnSite. - * - * @summary Deletes a VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteDelete.json - */ -async function vpnSiteDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.beginDeleteAndWait(resourceGroupName, vpnSiteName); - console.log(result); -} - -async function main() { - await vpnSiteDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnSitesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnSitesGetSample.js deleted file mode 100644 index e65882ee1ac1..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnSitesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VPN site. - * - * @summary Retrieves the details of a VPN site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteGet.json - */ -async function vpnSiteGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.get(resourceGroupName, vpnSiteName); - console.log(result); -} - -async function main() { - await vpnSiteGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnSitesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnSitesListByResourceGroupSample.js deleted file mode 100644 index ce1c87e5228a..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnSitesListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the vpnSites in a resource group. - * - * @summary Lists all the vpnSites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteListByResourceGroup.json - */ -async function vpnSiteListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSites.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnSiteListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnSitesListSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnSitesListSample.js deleted file mode 100644 index 4f4ab7427fd5..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnSitesListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VpnSites in a subscription. - * - * @summary Lists all the VpnSites in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteList.json - */ -async function vpnSiteList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSites.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnSiteList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/vpnSitesUpdateTagsSample.js b/sdk/network/arm-network/samples/v35/javascript/vpnSitesUpdateTagsSample.js deleted file mode 100644 index 20c83b50b6f6..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/vpnSitesUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates VpnSite tags. - * - * @summary Updates VpnSite tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteUpdateTags.json - */ -async function vpnSiteUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteParameters = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.updateTags( - resourceGroupName, - vpnSiteName, - vpnSiteParameters, - ); - console.log(result); -} - -async function main() { - await vpnSiteUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js deleted file mode 100644 index 641faa0e2891..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or update policy with specified rule set name within a resource group. - * - * @summary Creates or update policy with specified rule set name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyCreateOrUpdate.json - */ -async function createsOrUpdatesAWafPolicyWithinAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const parameters = { - customRules: [ - { - name: "Rule1", - action: "Block", - matchConditions: [ - { - matchValues: ["192.168.1.0/24", "10.0.0.0/24"], - matchVariables: [{ selector: undefined, variableName: "RemoteAddr" }], - operator: "IPMatch", - }, - ], - priority: 1, - ruleType: "MatchRule", - }, - { - name: "Rule2", - action: "Block", - matchConditions: [ - { - matchValues: ["192.168.1.0/24"], - matchVariables: [{ selector: undefined, variableName: "RemoteAddr" }], - operator: "IPMatch", - }, - { - matchValues: ["Windows"], - matchVariables: [{ selector: "UserAgent", variableName: "RequestHeaders" }], - operator: "Contains", - }, - ], - priority: 2, - ruleType: "MatchRule", - }, - { - name: "RateLimitRule3", - action: "Block", - groupByUserSession: [{ groupByVariables: [{ variableName: "ClientAddr" }] }], - matchConditions: [ - { - matchValues: ["192.168.1.0/24", "10.0.0.0/24"], - matchVariables: [{ selector: undefined, variableName: "RemoteAddr" }], - negationConditon: true, - operator: "IPMatch", - }, - ], - priority: 3, - rateLimitDuration: "OneMin", - rateLimitThreshold: 10, - ruleType: "RateLimitRule", - }, - { - name: "Rule4", - action: "JSChallenge", - matchConditions: [ - { - matchValues: ["192.168.1.0/24"], - matchVariables: [{ selector: undefined, variableName: "RemoteAddr" }], - operator: "IPMatch", - }, - { - matchValues: ["Bot"], - matchVariables: [{ selector: "UserAgent", variableName: "RequestHeaders" }], - operator: "Contains", - }, - ], - priority: 4, - ruleType: "MatchRule", - }, - ], - location: "WestUs", - managedRules: { - exclusions: [ - { - exclusionManagedRuleSets: [ - { - ruleGroups: [ - { - ruleGroupName: "REQUEST-930-APPLICATION-ATTACK-LFI", - rules: [{ ruleId: "930120" }], - }, - { ruleGroupName: "REQUEST-932-APPLICATION-ATTACK-RCE" }, - ], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - ], - matchVariable: "RequestArgNames", - selector: "hello", - selectorMatchOperator: "StartsWith", - }, - { - exclusionManagedRuleSets: [ - { ruleGroups: [], ruleSetType: "OWASP", ruleSetVersion: "3.1" }, - ], - matchVariable: "RequestArgNames", - selector: "hello", - selectorMatchOperator: "EndsWith", - }, - { - matchVariable: "RequestArgNames", - selector: "test", - selectorMatchOperator: "StartsWith", - }, - { - matchVariable: "RequestArgValues", - selector: "test", - selectorMatchOperator: "StartsWith", - }, - ], - managedRuleSets: [ - { - ruleGroupOverrides: [ - { - ruleGroupName: "REQUEST-931-APPLICATION-ATTACK-RFI", - rules: [ - { action: "Log", ruleId: "931120", state: "Enabled" }, - { - action: "AnomalyScoring", - ruleId: "931130", - state: "Disabled", - }, - ], - }, - ], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - { - ruleGroupOverrides: [ - { - ruleGroupName: "UnknownBots", - rules: [{ action: "JSChallenge", ruleId: "300700", state: "Enabled" }], - }, - ], - ruleSetType: "Microsoft_BotManagerRuleSet", - ruleSetVersion: "1.0", - }, - { - ruleGroupOverrides: [ - { - ruleGroupName: "ExcessiveRequests", - rules: [ - { - action: "Block", - ruleId: "500100", - sensitivity: "High", - state: "Enabled", - }, - ], - }, - ], - ruleSetType: "Microsoft_HTTPDDoSRuleSet", - ruleSetVersion: "1.0", - }, - ], - exceptions: [ - { - exceptionManagedRuleSets: [{ ruleSetType: "OWASP", ruleSetVersion: "3.2" }], - matchVariable: "RequestURI", - valueMatchOperator: "Contains", - values: ["health", "account/images", "default.aspx"], - }, - { - exceptionManagedRuleSets: [ - { - ruleGroups: [{ ruleGroupName: "REQUEST-932-APPLICATION-ATTACK-RCE" }], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - ], - matchVariable: "RequestHeader", - selector: "User-Agent", - selectorMatchOperator: "StartsWith", - valueMatchOperator: "Contains", - values: ["Mozilla/5.0", "Chrome/122.0.0.0"], - }, - { - exceptionManagedRuleSets: [ - { - ruleGroups: [{ ruleGroupName: "BadBots", rules: [{ ruleId: "100100" }] }], - ruleSetType: "Microsoft_BotManagerRuleSet", - ruleSetVersion: "1.0", - }, - ], - matchVariable: "RemoteAddr", - valueMatchOperator: "IPMatch", - values: ["1.2.3.4", "10.0.0.1/6"], - }, - ], - }, - policySettings: { - jsChallengeCookieExpirationInMins: 100, - logScrubbing: { - scrubbingRules: [ - { - matchVariable: "RequestArgNames", - selector: "test", - selectorMatchOperator: "Equals", - state: "Enabled", - }, - { - matchVariable: "RequestIPAddress", - selectorMatchOperator: "EqualsAny", - state: "Enabled", - }, - ], - state: "Enabled", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.createOrUpdate( - resourceGroupName, - policyName, - parameters, - ); - console.log(result); -} - -async function main() { - await createsOrUpdatesAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesDeleteSample.js deleted file mode 100644 index 79d2b417cdec..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes Policy. - * - * @summary Deletes Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyDelete.json - */ -async function deletesAWafPolicyWithinAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.beginDeleteAndWait( - resourceGroupName, - policyName, - ); - console.log(result); -} - -async function main() { - await deletesAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesGetSample.js deleted file mode 100644 index 6c6f528674a9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieve protection policy with specified name within a resource group. - * - * @summary Retrieve protection policy with specified name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyGet.json - */ -async function getsAWafPolicyWithinAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.get(resourceGroupName, policyName); - console.log(result); -} - -async function main() { - await getsAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesListAllSample.js b/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesListAllSample.js deleted file mode 100644 index 7e30357b1803..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the WAF policies in a subscription. - * - * @summary Gets all the WAF policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListAllPolicies.json - */ -async function listsAllWafPoliciesInASubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webApplicationFirewallPolicies.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllWafPoliciesInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesListSample.js b/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesListSample.js deleted file mode 100644 index 9d2e8b8898da..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/webApplicationFirewallPoliciesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all of the protection policies within a resource group. - * - * @summary Lists all of the protection policies within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListPolicies.json - */ -async function listsAllWafPoliciesInAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webApplicationFirewallPolicies.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllWafPoliciesInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/webCategoriesGetSample.js b/sdk/network/arm-network/samples/v35/javascript/webCategoriesGetSample.js deleted file mode 100644 index 088b01c512f9..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/webCategoriesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Azure Web Category. - * - * @summary Gets the specified Azure Web Category. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureWebCategoryGet.json - */ -async function getAzureWebCategoryByName() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "4de8428a-4a92-4cea-90ff-b47128b8cab8"; - const name = "Arts"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webCategories.get(name); - console.log(result); -} - -async function main() { - await getAzureWebCategoryByName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/javascript/webCategoriesListBySubscriptionSample.js b/sdk/network/arm-network/samples/v35/javascript/webCategoriesListBySubscriptionSample.js deleted file mode 100644 index 3425b79b3c62..000000000000 --- a/sdk/network/arm-network/samples/v35/javascript/webCategoriesListBySubscriptionSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Azure Web Categories in a subscription. - * - * @summary Gets all the Azure Web Categories in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureWebCategoriesListBySubscription.json - */ -async function listAllAzureWebCategoriesForAGivenSubscription() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "4de8428a-4a92-4cea-90ff-b47128b8cab8"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webCategories.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllAzureWebCategoriesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/README.md b/sdk/network/arm-network/samples/v35/typescript/README.md deleted file mode 100644 index 69a4755414c5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/README.md +++ /dev/null @@ -1,1523 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [adminRuleCollectionsCreateOrUpdateSample.ts][adminrulecollectionscreateorupdatesample] | Creates or updates an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionPut.json | -| [adminRuleCollectionsDeleteSample.ts][adminrulecollectionsdeletesample] | Deletes an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionDelete.json | -| [adminRuleCollectionsGetSample.ts][adminrulecollectionsgetsample] | Gets a network manager security admin configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionGet.json | -| [adminRuleCollectionsListSample.ts][adminrulecollectionslistsample] | Lists all the rule collections in a security admin configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionList.json | -| [adminRulesCreateOrUpdateSample.ts][adminrulescreateorupdatesample] | Creates or updates an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json | -| [adminRulesDeleteSample.ts][adminrulesdeletesample] | Deletes an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleDelete.json | -| [adminRulesGetSample.ts][adminrulesgetsample] | Gets a network manager security configuration admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleGet.json | -| [adminRulesListSample.ts][adminruleslistsample] | List all network manager security configuration admin rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleList.json | -| [applicationGatewayPrivateEndpointConnectionsDeleteSample.ts][applicationgatewayprivateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json | -| [applicationGatewayPrivateEndpointConnectionsGetSample.ts][applicationgatewayprivateendpointconnectionsgetsample] | Gets the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json | -| [applicationGatewayPrivateEndpointConnectionsListSample.ts][applicationgatewayprivateendpointconnectionslistsample] | Lists all private endpoint connections on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json | -| [applicationGatewayPrivateEndpointConnectionsUpdateSample.ts][applicationgatewayprivateendpointconnectionsupdatesample] | Updates the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json | -| [applicationGatewayPrivateLinkResourcesListSample.ts][applicationgatewayprivatelinkresourceslistsample] | Lists all private link resources on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateLinkResourceList.json | -| [applicationGatewayWafDynamicManifestsDefaultGetSample.ts][applicationgatewaywafdynamicmanifestsdefaultgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json | -| [applicationGatewayWafDynamicManifestsGetSample.ts][applicationgatewaywafdynamicmanifestsgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetApplicationGatewayWafDynamicManifests.json | -| [applicationGatewaysBackendHealthOnDemandSample.ts][applicationgatewaysbackendhealthondemandsample] | Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayBackendHealthTest.json | -| [applicationGatewaysBackendHealthSample.ts][applicationgatewaysbackendhealthsample] | Gets the backend health of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayBackendHealthGet.json | -| [applicationGatewaysCreateOrUpdateSample.ts][applicationgatewayscreateorupdatesample] | Creates or updates the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayCreate.json | -| [applicationGatewaysDeleteSample.ts][applicationgatewaysdeletesample] | Deletes the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayDelete.json | -| [applicationGatewaysGetSample.ts][applicationgatewaysgetsample] | Gets the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayGet.json | -| [applicationGatewaysGetSslPredefinedPolicySample.ts][applicationgatewaysgetsslpredefinedpolicysample] | Gets Ssl predefined policy with the specified policy name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json | -| [applicationGatewaysListAllSample.ts][applicationgatewayslistallsample] | Gets all the application gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayListAll.json | -| [applicationGatewaysListAvailableRequestHeadersSample.ts][applicationgatewayslistavailablerequestheaderssample] | Lists all available request headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json | -| [applicationGatewaysListAvailableResponseHeadersSample.ts][applicationgatewayslistavailableresponseheaderssample] | Lists all available response headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json | -| [applicationGatewaysListAvailableServerVariablesSample.ts][applicationgatewayslistavailableservervariablessample] | Lists all available server variables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableServerVariablesGet.json | -| [applicationGatewaysListAvailableSslOptionsSample.ts][applicationgatewayslistavailablessloptionssample] | Lists available Ssl options for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsGet.json | -| [applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts][applicationgatewayslistavailablesslpredefinedpoliciessample] | Lists all SSL predefined policies for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json | -| [applicationGatewaysListAvailableWafRuleSetsSample.ts][applicationgatewayslistavailablewafrulesetssample] | Lists all available web application firewall rule sets. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json | -| [applicationGatewaysListSample.ts][applicationgatewayslistsample] | Lists all application gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayList.json | -| [applicationGatewaysStartSample.ts][applicationgatewaysstartsample] | Starts the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayStart.json | -| [applicationGatewaysStopSample.ts][applicationgatewaysstopsample] | Stops the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayStop.json | -| [applicationGatewaysUpdateTagsSample.ts][applicationgatewaysupdatetagssample] | Updates the specified application gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayUpdateTags.json | -| [applicationSecurityGroupsCreateOrUpdateSample.ts][applicationsecuritygroupscreateorupdatesample] | Creates or updates an application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupCreate.json | -| [applicationSecurityGroupsDeleteSample.ts][applicationsecuritygroupsdeletesample] | Deletes the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupDelete.json | -| [applicationSecurityGroupsGetSample.ts][applicationsecuritygroupsgetsample] | Gets information about the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupGet.json | -| [applicationSecurityGroupsListAllSample.ts][applicationsecuritygroupslistallsample] | Gets all application security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupListAll.json | -| [applicationSecurityGroupsListSample.ts][applicationsecuritygroupslistsample] | Gets all the application security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupList.json | -| [applicationSecurityGroupsUpdateTagsSample.ts][applicationsecuritygroupsupdatetagssample] | Updates an application security group's tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupUpdateTags.json | -| [availableDelegationsListSample.ts][availabledelegationslistsample] | Gets all of the available subnet delegations for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableDelegationsSubscriptionGet.json | -| [availableEndpointServicesListSample.ts][availableendpointserviceslistsample] | List what values of endpoint services are available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EndpointServicesList.json | -| [availablePrivateEndpointTypesListByResourceGroupSample.ts][availableprivateendpointtypeslistbyresourcegroupsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json | -| [availablePrivateEndpointTypesListSample.ts][availableprivateendpointtypeslistsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailablePrivateEndpointTypesGet.json | -| [availableResourceGroupDelegationsListSample.ts][availableresourcegroupdelegationslistsample] | Gets all of the available subnet delegations for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableDelegationsResourceGroupGet.json | -| [availableServiceAliasesListByResourceGroupSample.ts][availableservicealiaseslistbyresourcegroupsample] | Gets all available service aliases for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableServiceAliasesListByResourceGroup.json | -| [availableServiceAliasesListSample.ts][availableservicealiaseslistsample] | Gets all available service aliases for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableServiceAliasesList.json | -| [azureFirewallFqdnTagsListAllSample.ts][azurefirewallfqdntagslistallsample] | Gets all the Azure Firewall FQDN Tags in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallFqdnTagsListBySubscription.json | -| [azureFirewallsCreateOrUpdateSample.ts][azurefirewallscreateorupdatesample] | Creates or updates the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPut.json | -| [azureFirewallsDeleteSample.ts][azurefirewallsdeletesample] | Deletes the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallDelete.json | -| [azureFirewallsGetSample.ts][azurefirewallsgetsample] | Gets the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGet.json | -| [azureFirewallsListAllSample.ts][azurefirewallslistallsample] | Gets all the Azure Firewalls in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListBySubscription.json | -| [azureFirewallsListLearnedPrefixesSample.ts][azurefirewallslistlearnedprefixessample] | Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListLearnedIPPrefixes.json | -| [azureFirewallsListSample.ts][azurefirewallslistsample] | Lists all Azure Firewalls in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListByResourceGroup.json | -| [azureFirewallsPacketCaptureOperationSample.ts][azurefirewallspacketcaptureoperationsample] | Runs a packet capture operation on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPacketCaptureOperation.json | -| [azureFirewallsPacketCaptureSample.ts][azurefirewallspacketcapturesample] | Runs a packet capture on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPacketCapture.json | -| [azureFirewallsUpdateTagsSample.ts][azurefirewallsupdatetagssample] | Updates tags of an Azure Firewall resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallUpdateTags.json | -| [bastionHostsCreateOrUpdateSample.ts][bastionhostscreateorupdatesample] | Creates or updates the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPut.json | -| [bastionHostsDeleteSample.ts][bastionhostsdeletesample] | Deletes the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDelete.json | -| [bastionHostsGetSample.ts][bastionhostsgetsample] | Gets the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostGet.json | -| [bastionHostsListByResourceGroupSample.ts][bastionhostslistbyresourcegroupsample] | Lists all Bastion Hosts in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostListByResourceGroup.json | -| [bastionHostsListSample.ts][bastionhostslistsample] | Lists all Bastion Hosts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostListBySubscription.json | -| [bastionHostsUpdateTagsSample.ts][bastionhostsupdatetagssample] | Updates Tags for BastionHost resource x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPatch.json | -| [bgpServiceCommunitiesListSample.ts][bgpservicecommunitieslistsample] | Gets all the available bgp service communities. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceCommunityList.json | -| [checkDnsNameAvailabilitySample.ts][checkdnsnameavailabilitysample] | Checks whether a domain name in the cloudapp.azure.com zone is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckDnsNameAvailability.json | -| [configurationPolicyGroupsCreateOrUpdateSample.ts][configurationpolicygroupscreateorupdatesample] | Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupPut.json | -| [configurationPolicyGroupsDeleteSample.ts][configurationpolicygroupsdeletesample] | Deletes a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupDelete.json | -| [configurationPolicyGroupsGetSample.ts][configurationpolicygroupsgetsample] | Retrieves the details of a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupGet.json | -| [configurationPolicyGroupsListByVpnServerConfigurationSample.ts][configurationpolicygroupslistbyvpnserverconfigurationsample] | Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json | -| [connectionMonitorsCreateOrUpdateSample.ts][connectionmonitorscreateorupdatesample] | Create or update a connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorCreate.json | -| [connectionMonitorsDeleteSample.ts][connectionmonitorsdeletesample] | Deletes the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorDelete.json | -| [connectionMonitorsGetSample.ts][connectionmonitorsgetsample] | Gets a connection monitor by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorGet.json | -| [connectionMonitorsListSample.ts][connectionmonitorslistsample] | Lists all connection monitors for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorList.json | -| [connectionMonitorsStopSample.ts][connectionmonitorsstopsample] | Stops the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorStop.json | -| [connectionMonitorsUpdateTagsSample.ts][connectionmonitorsupdatetagssample] | Update tags of the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json | -| [connectivityConfigurationsCreateOrUpdateSample.ts][connectivityconfigurationscreateorupdatesample] | Creates/Updates a new network manager connectivity configuration x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationPut.json | -| [connectivityConfigurationsDeleteSample.ts][connectivityconfigurationsdeletesample] | Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationDelete.json | -| [connectivityConfigurationsGetSample.ts][connectivityconfigurationsgetsample] | Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationGet.json | -| [connectivityConfigurationsListSample.ts][connectivityconfigurationslistsample] | Lists all the network manager connectivity configuration in a specified network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationList.json | -| [customIPPrefixesCreateOrUpdateSample.ts][customipprefixescreateorupdatesample] | Creates or updates a custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixCreateCustomizedValues.json | -| [customIPPrefixesDeleteSample.ts][customipprefixesdeletesample] | Deletes the specified custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixDelete.json | -| [customIPPrefixesGetSample.ts][customipprefixesgetsample] | Gets the specified custom IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixGet.json | -| [customIPPrefixesListAllSample.ts][customipprefixeslistallsample] | Gets all the custom IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixListAll.json | -| [customIPPrefixesListSample.ts][customipprefixeslistsample] | Gets all custom IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixList.json | -| [customIPPrefixesUpdateTagsSample.ts][customipprefixesupdatetagssample] | Updates custom IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixUpdateTags.json | -| [ddosCustomPoliciesCreateOrUpdateSample.ts][ddoscustompoliciescreateorupdatesample] | Creates or updates a DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyCreate.json | -| [ddosCustomPoliciesDeleteSample.ts][ddoscustompoliciesdeletesample] | Deletes the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyDelete.json | -| [ddosCustomPoliciesGetSample.ts][ddoscustompoliciesgetsample] | Gets information about the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyGet.json | -| [ddosCustomPoliciesUpdateTagsSample.ts][ddoscustompoliciesupdatetagssample] | Update a DDoS custom policy tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyUpdateTags.json | -| [ddosProtectionPlansCreateOrUpdateSample.ts][ddosprotectionplanscreateorupdatesample] | Creates or updates a DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanCreate.json | -| [ddosProtectionPlansDeleteSample.ts][ddosprotectionplansdeletesample] | Deletes the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanDelete.json | -| [ddosProtectionPlansGetSample.ts][ddosprotectionplansgetsample] | Gets information about the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanGet.json | -| [ddosProtectionPlansListByResourceGroupSample.ts][ddosprotectionplanslistbyresourcegroupsample] | Gets all the DDoS protection plans in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanList.json | -| [ddosProtectionPlansListSample.ts][ddosprotectionplanslistsample] | Gets all DDoS protection plans in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanListAll.json | -| [ddosProtectionPlansUpdateTagsSample.ts][ddosprotectionplansupdatetagssample] | Update a DDoS protection plan tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanUpdateTags.json | -| [defaultSecurityRulesGetSample.ts][defaultsecurityrulesgetsample] | Get the specified default network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DefaultSecurityRuleGet.json | -| [defaultSecurityRulesListSample.ts][defaultsecurityruleslistsample] | Gets all default security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DefaultSecurityRuleList.json | -| [deleteBastionShareableLinkByTokenSample.ts][deletebastionshareablelinkbytokensample] | Deletes the Bastion Shareable Links for all the tokens specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkDeleteByToken.json | -| [deleteBastionShareableLinkSample.ts][deletebastionshareablelinksample] | Deletes the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkDelete.json | -| [disconnectActiveSessionsSample.ts][disconnectactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionSessionDelete.json | -| [dscpConfigurationCreateOrUpdateSample.ts][dscpconfigurationcreateorupdatesample] | Creates or updates a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationCreate.json | -| [dscpConfigurationDeleteSample.ts][dscpconfigurationdeletesample] | Deletes a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationDelete.json | -| [dscpConfigurationGetSample.ts][dscpconfigurationgetsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationGet.json | -| [dscpConfigurationListAllSample.ts][dscpconfigurationlistallsample] | Gets all dscp configurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationListAll.json | -| [dscpConfigurationListSample.ts][dscpconfigurationlistsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationList.json | -| [expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts][expressroutecircuitauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationCreate.json | -| [expressRouteCircuitAuthorizationsDeleteSample.ts][expressroutecircuitauthorizationsdeletesample] | Deletes the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationDelete.json | -| [expressRouteCircuitAuthorizationsGetSample.ts][expressroutecircuitauthorizationsgetsample] | Gets the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationGet.json | -| [expressRouteCircuitAuthorizationsListSample.ts][expressroutecircuitauthorizationslistsample] | Gets all authorizations in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationList.json | -| [expressRouteCircuitConnectionsCreateOrUpdateSample.ts][expressroutecircuitconnectionscreateorupdatesample] | Creates or updates a Express Route Circuit Connection in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionCreate.json | -| [expressRouteCircuitConnectionsDeleteSample.ts][expressroutecircuitconnectionsdeletesample] | Deletes the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionDelete.json | -| [expressRouteCircuitConnectionsGetSample.ts][expressroutecircuitconnectionsgetsample] | Gets the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionGet.json | -| [expressRouteCircuitConnectionsListSample.ts][expressroutecircuitconnectionslistsample] | Gets all global reach connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionList.json | -| [expressRouteCircuitPeeringsCreateOrUpdateSample.ts][expressroutecircuitpeeringscreateorupdatesample] | Creates or updates a peering in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringCreate.json | -| [expressRouteCircuitPeeringsDeleteSample.ts][expressroutecircuitpeeringsdeletesample] | Deletes the specified peering from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringDelete.json | -| [expressRouteCircuitPeeringsGetSample.ts][expressroutecircuitpeeringsgetsample] | Gets the specified peering for the express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringGet.json | -| [expressRouteCircuitPeeringsListSample.ts][expressroutecircuitpeeringslistsample] | Gets all peerings in a specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringList.json | -| [expressRouteCircuitsCreateOrUpdateSample.ts][expressroutecircuitscreateorupdatesample] | Creates or updates an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitCreate.json | -| [expressRouteCircuitsDeleteSample.ts][expressroutecircuitsdeletesample] | Deletes the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitDelete.json | -| [expressRouteCircuitsGetPeeringStatsSample.ts][expressroutecircuitsgetpeeringstatssample] | Gets all stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringStats.json | -| [expressRouteCircuitsGetSample.ts][expressroutecircuitsgetsample] | Gets information about the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitGet.json | -| [expressRouteCircuitsGetStatsSample.ts][expressroutecircuitsgetstatssample] | Gets all the stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitStats.json | -| [expressRouteCircuitsListAllSample.ts][expressroutecircuitslistallsample] | Gets all the express route circuits in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitListBySubscription.json | -| [expressRouteCircuitsListArpTableSample.ts][expressroutecircuitslistarptablesample] | Gets the currently advertised ARP table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitARPTableList.json | -| [expressRouteCircuitsListRoutesTableSample.ts][expressroutecircuitslistroutestablesample] | Gets the currently advertised routes table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitRouteTableList.json | -| [expressRouteCircuitsListRoutesTableSummarySample.ts][expressroutecircuitslistroutestablesummarysample] | Gets the currently advertised routes table summary associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitRouteTableSummaryList.json | -| [expressRouteCircuitsListSample.ts][expressroutecircuitslistsample] | Gets all the express route circuits in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitListByResourceGroup.json | -| [expressRouteCircuitsUpdateTagsSample.ts][expressroutecircuitsupdatetagssample] | Updates an express route circuit tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitUpdateTags.json | -| [expressRouteConnectionsCreateOrUpdateSample.ts][expressrouteconnectionscreateorupdatesample] | Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionCreate.json | -| [expressRouteConnectionsDeleteSample.ts][expressrouteconnectionsdeletesample] | Deletes a connection to a ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionDelete.json | -| [expressRouteConnectionsGetSample.ts][expressrouteconnectionsgetsample] | Gets the specified ExpressRouteConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionGet.json | -| [expressRouteConnectionsListSample.ts][expressrouteconnectionslistsample] | Lists ExpressRouteConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionList.json | -| [expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts][expressroutecrossconnectionpeeringscreateorupdatesample] | Creates or updates a peering in the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json | -| [expressRouteCrossConnectionPeeringsDeleteSample.ts][expressroutecrossconnectionpeeringsdeletesample] | Deletes the specified peering from the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json | -| [expressRouteCrossConnectionPeeringsGetSample.ts][expressroutecrossconnectionpeeringsgetsample] | Gets the specified peering for the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json | -| [expressRouteCrossConnectionPeeringsListSample.ts][expressroutecrossconnectionpeeringslistsample] | Gets all peerings in a specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json | -| [expressRouteCrossConnectionsCreateOrUpdateSample.ts][expressroutecrossconnectionscreateorupdatesample] | Update the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionUpdate.json | -| [expressRouteCrossConnectionsGetSample.ts][expressroutecrossconnectionsgetsample] | Gets details about the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionGet.json | -| [expressRouteCrossConnectionsListArpTableSample.ts][expressroutecrossconnectionslistarptablesample] | Gets the currently advertised ARP table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsArpTable.json | -| [expressRouteCrossConnectionsListByResourceGroupSample.ts][expressroutecrossconnectionslistbyresourcegroupsample] | Retrieves all the ExpressRouteCrossConnections in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json | -| [expressRouteCrossConnectionsListRoutesTableSample.ts][expressroutecrossconnectionslistroutestablesample] | Gets the currently advertised routes table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsRouteTable.json | -| [expressRouteCrossConnectionsListRoutesTableSummarySample.ts][expressroutecrossconnectionslistroutestablesummarysample] | Gets the route table summary associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json | -| [expressRouteCrossConnectionsListSample.ts][expressroutecrossconnectionslistsample] | Retrieves all the ExpressRouteCrossConnections in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionList.json | -| [expressRouteCrossConnectionsUpdateTagsSample.ts][expressroutecrossconnectionsupdatetagssample] | Updates an express route cross connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionUpdateTags.json | -| [expressRouteGatewaysCreateOrUpdateSample.ts][expressroutegatewayscreateorupdatesample] | Creates or updates a ExpressRoute gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayCreate.json | -| [expressRouteGatewaysDeleteSample.ts][expressroutegatewaysdeletesample] | Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayDelete.json | -| [expressRouteGatewaysGetSample.ts][expressroutegatewaysgetsample] | Fetches the details of a ExpressRoute gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayGet.json | -| [expressRouteGatewaysListByResourceGroupSample.ts][expressroutegatewayslistbyresourcegroupsample] | Lists ExpressRoute gateways in a given resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayListByResourceGroup.json | -| [expressRouteGatewaysListBySubscriptionSample.ts][expressroutegatewayslistbysubscriptionsample] | Lists ExpressRoute gateways under a given subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayListBySubscription.json | -| [expressRouteGatewaysUpdateTagsSample.ts][expressroutegatewaysupdatetagssample] | Updates express route gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayUpdateTags.json | -| [expressRouteLinksGetSample.ts][expressroutelinksgetsample] | Retrieves the specified ExpressRouteLink resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteLinkGet.json | -| [expressRouteLinksListSample.ts][expressroutelinkslistsample] | Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteLinkList.json | -| [expressRoutePortAuthorizationsCreateOrUpdateSample.ts][expressrouteportauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationCreate.json | -| [expressRoutePortAuthorizationsDeleteSample.ts][expressrouteportauthorizationsdeletesample] | Deletes the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationDelete.json | -| [expressRoutePortAuthorizationsGetSample.ts][expressrouteportauthorizationsgetsample] | Gets the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationGet.json | -| [expressRoutePortAuthorizationsListSample.ts][expressrouteportauthorizationslistsample] | Gets all authorizations in an express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationList.json | -| [expressRoutePortsCreateOrUpdateSample.ts][expressrouteportscreateorupdatesample] | Creates or updates the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortCreate.json | -| [expressRoutePortsDeleteSample.ts][expressrouteportsdeletesample] | Deletes the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortDelete.json | -| [expressRoutePortsGenerateLoaSample.ts][expressrouteportsgenerateloasample] | Generate a letter of authorization for the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GenerateExpressRoutePortsLOA.json | -| [expressRoutePortsGetSample.ts][expressrouteportsgetsample] | Retrieves the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortGet.json | -| [expressRoutePortsListByResourceGroupSample.ts][expressrouteportslistbyresourcegroupsample] | List all the ExpressRoutePort resources in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortListByResourceGroup.json | -| [expressRoutePortsListSample.ts][expressrouteportslistsample] | List all the ExpressRoutePort resources in the specified subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortList.json | -| [expressRoutePortsLocationsGetSample.ts][expressrouteportslocationsgetsample] | Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortsLocationGet.json | -| [expressRoutePortsLocationsListSample.ts][expressrouteportslocationslistsample] | Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortsLocationList.json | -| [expressRoutePortsUpdateTagsSample.ts][expressrouteportsupdatetagssample] | Update ExpressRoutePort tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortUpdateTags.json | -| [expressRouteProviderPortSample.ts][expressrouteproviderportsample] | Retrieves detail of a provider port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/expressRouteProviderPort.json | -| [expressRouteProviderPortsLocationListSample.ts][expressrouteproviderportslocationlistsample] | Retrieves all the ExpressRouteProviderPorts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/expressRouteProviderPortList.json | -| [expressRouteServiceProvidersListSample.ts][expressrouteserviceproviderslistsample] | Gets all the available express route service providers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteProviderList.json | -| [firewallPoliciesCreateOrUpdateSample.ts][firewallpoliciescreateorupdatesample] | Creates or updates the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyPut.json | -| [firewallPoliciesDeleteSample.ts][firewallpoliciesdeletesample] | Deletes the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDelete.json | -| [firewallPoliciesGetSample.ts][firewallpoliciesgetsample] | Gets the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyGet.json | -| [firewallPoliciesListAllSample.ts][firewallpolicieslistallsample] | Gets all the Firewall Policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyListBySubscription.json | -| [firewallPoliciesListSample.ts][firewallpolicieslistsample] | Lists all Firewall Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyListByResourceGroup.json | -| [firewallPoliciesUpdateTagsSample.ts][firewallpoliciesupdatetagssample] | Updates tags of a Azure Firewall Policy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyPatch.json | -| [firewallPolicyDeploymentsDeploySample.ts][firewallpolicydeploymentsdeploysample] | Deploys the firewall policy draft and child rule collection group drafts. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftDeploy.json | -| [firewallPolicyDraftsCreateOrUpdateSample.ts][firewallpolicydraftscreateorupdatesample] | Create or update a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftPut.json | -| [firewallPolicyDraftsDeleteSample.ts][firewallpolicydraftsdeletesample] | Delete a draft policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftDelete.json | -| [firewallPolicyDraftsGetSample.ts][firewallpolicydraftsgetsample] | Get a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftGet.json | -| [firewallPolicyIdpsSignaturesFilterValuesListSample.ts][firewallpolicyidpssignaturesfiltervalueslistsample] | Retrieves the current filter values for the signatures overrides x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json | -| [firewallPolicyIdpsSignaturesListSample.ts][firewallpolicyidpssignatureslistsample] | Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyQuerySignatureOverrides.json | -| [firewallPolicyIdpsSignaturesOverridesGetSample.ts][firewallpolicyidpssignaturesoverridesgetsample] | Returns all signatures overrides for a specific policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesGet.json | -| [firewallPolicyIdpsSignaturesOverridesListSample.ts][firewallpolicyidpssignaturesoverrideslistsample] | Returns all signatures overrides objects for a specific policy as a list containing a single value. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesList.json | -| [firewallPolicyIdpsSignaturesOverridesPatchSample.ts][firewallpolicyidpssignaturesoverridespatchsample] | Will update the status of policy's signature overrides for IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesPatch.json | -| [firewallPolicyIdpsSignaturesOverridesPutSample.ts][firewallpolicyidpssignaturesoverridesputsample] | Will override/create a new signature overrides for the policy's IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesPut.json | -| [firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts][firewallpolicyrulecollectiongroupdraftscreateorupdatesample] | Create or Update Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json | -| [firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts][firewallpolicyrulecollectiongroupdraftsdeletesample] | Delete Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json | -| [firewallPolicyRuleCollectionGroupDraftsGetSample.ts][firewallpolicyrulecollectiongroupdraftsgetsample] | Get Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json | -| [firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts][firewallpolicyrulecollectiongroupscreateorupdatesample] | Creates or updates the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json | -| [firewallPolicyRuleCollectionGroupsDeleteSample.ts][firewallpolicyrulecollectiongroupsdeletesample] | Deletes the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDelete.json | -| [firewallPolicyRuleCollectionGroupsGetSample.ts][firewallpolicyrulecollectiongroupsgetsample] | Gets the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json | -| [firewallPolicyRuleCollectionGroupsListSample.ts][firewallpolicyrulecollectiongroupslistsample] | Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json | -| [flowLogsCreateOrUpdateSample.ts][flowlogscreateorupdatesample] | Create or update a flow log for the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogCreate.json | -| [flowLogsDeleteSample.ts][flowlogsdeletesample] | Deletes the specified flow log resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogDelete.json | -| [flowLogsGetSample.ts][flowlogsgetsample] | Gets a flow log resource by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogGet.json | -| [flowLogsListSample.ts][flowlogslistsample] | Lists all flow log resources for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogList.json | -| [flowLogsUpdateTagsSample.ts][flowlogsupdatetagssample] | Update tags of the specified flow log. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogUpdateTags.json | -| [generatevirtualwanvpnserverconfigurationvpnprofileSample.ts][generatevirtualwanvpnserverconfigurationvpnprofilesample] | Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json | -| [getActiveSessionsSample.ts][getactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionSessionsList.json | -| [getBastionShareableLinkSample.ts][getbastionshareablelinksample] | Return the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkGet.json | -| [hubRouteTablesCreateOrUpdateSample.ts][hubroutetablescreateorupdatesample] | Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTablePut.json | -| [hubRouteTablesDeleteSample.ts][hubroutetablesdeletesample] | Deletes a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableDelete.json | -| [hubRouteTablesGetSample.ts][hubroutetablesgetsample] | Retrieves the details of a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableGet.json | -| [hubRouteTablesListSample.ts][hubroutetableslistsample] | Retrieves the details of all RouteTables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableList.json | -| [hubVirtualNetworkConnectionsCreateOrUpdateSample.ts][hubvirtualnetworkconnectionscreateorupdatesample] | Creates a hub virtual network connection if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionPut.json | -| [hubVirtualNetworkConnectionsDeleteSample.ts][hubvirtualnetworkconnectionsdeletesample] | Deletes a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionDelete.json | -| [hubVirtualNetworkConnectionsGetSample.ts][hubvirtualnetworkconnectionsgetsample] | Retrieves the details of a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionGet.json | -| [hubVirtualNetworkConnectionsListSample.ts][hubvirtualnetworkconnectionslistsample] | Retrieves the details of all HubVirtualNetworkConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionList.json | -| [inboundNatRulesCreateOrUpdateSample.ts][inboundnatrulescreateorupdatesample] | Creates or updates a load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleCreate.json | -| [inboundNatRulesDeleteSample.ts][inboundnatrulesdeletesample] | Deletes the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleDelete.json | -| [inboundNatRulesGetSample.ts][inboundnatrulesgetsample] | Gets the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleGet.json | -| [inboundNatRulesListSample.ts][inboundnatruleslistsample] | Gets all the inbound NAT rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleList.json | -| [inboundSecurityRuleCreateOrUpdateSample.ts][inboundsecurityrulecreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Inbound Security Rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundSecurityRulePut.json | -| [inboundSecurityRuleGetSample.ts][inboundsecurityrulegetsample] | Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundSecurityRuleGet.json | -| [ipAllocationsCreateOrUpdateSample.ts][ipallocationscreateorupdatesample] | Creates or updates an IpAllocation in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationCreate.json | -| [ipAllocationsDeleteSample.ts][ipallocationsdeletesample] | Deletes the specified IpAllocation. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationDelete.json | -| [ipAllocationsGetSample.ts][ipallocationsgetsample] | Gets the specified IpAllocation by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationGet.json | -| [ipAllocationsListByResourceGroupSample.ts][ipallocationslistbyresourcegroupsample] | Gets all IpAllocations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationListByResourceGroup.json | -| [ipAllocationsListSample.ts][ipallocationslistsample] | Gets all IpAllocations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationList.json | -| [ipAllocationsUpdateTagsSample.ts][ipallocationsupdatetagssample] | Updates a IpAllocation tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationUpdateTags.json | -| [ipGroupsCreateOrUpdateSample.ts][ipgroupscreateorupdatesample] | Creates or updates an ipGroups in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsCreate.json | -| [ipGroupsDeleteSample.ts][ipgroupsdeletesample] | Deletes the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsDelete.json | -| [ipGroupsGetSample.ts][ipgroupsgetsample] | Gets the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsGet.json | -| [ipGroupsListByResourceGroupSample.ts][ipgroupslistbyresourcegroupsample] | Gets all IpGroups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsListByResourceGroup.json | -| [ipGroupsListSample.ts][ipgroupslistsample] | Gets all IpGroups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsListBySubscription.json | -| [ipGroupsUpdateGroupsSample.ts][ipgroupsupdategroupssample] | Updates tags of an IpGroups resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsUpdateTags.json | -| [ipamPoolsCreateSample.ts][ipampoolscreatesample] | Creates/Updates the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Create.json | -| [ipamPoolsDeleteSample.ts][ipampoolsdeletesample] | Delete the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Delete.json | -| [ipamPoolsGetPoolUsageSample.ts][ipampoolsgetpoolusagesample] | Get the Pool Usage. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_GetPoolUsage.json | -| [ipamPoolsGetSample.ts][ipampoolsgetsample] | Gets the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Get.json | -| [ipamPoolsListAssociatedResourcesSample.ts][ipampoolslistassociatedresourcessample] | List Associated Resource in the Pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_ListAssociatedResources.json | -| [ipamPoolsListSample.ts][ipampoolslistsample] | Gets list of Pool resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_List.json | -| [ipamPoolsUpdateSample.ts][ipampoolsupdatesample] | Updates the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Update.json | -| [listActiveConnectivityConfigurationsSample.ts][listactiveconnectivityconfigurationssample] | Lists active connectivity configurations in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json | -| [listActiveSecurityAdminRulesSample.ts][listactivesecurityadminrulessample] | Lists active security admin rules in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerActiveSecurityAdminRulesList.json | -| [listNetworkManagerEffectiveConnectivityConfigurationsSample.ts][listnetworkmanagereffectiveconnectivityconfigurationssample] | List all effective connectivity configurations applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json | -| [listNetworkManagerEffectiveSecurityAdminRulesSample.ts][listnetworkmanagereffectivesecurityadminrulessample] | List all effective security admin rules applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json | -| [loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts][loadbalancerbackendaddresspoolscreateorupdatesample] | Creates or updates a load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json | -| [loadBalancerBackendAddressPoolsDeleteSample.ts][loadbalancerbackendaddresspoolsdeletesample] | Deletes the specified load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerBackendAddressPoolDelete.json | -| [loadBalancerBackendAddressPoolsGetSample.ts][loadbalancerbackendaddresspoolsgetsample] | Gets load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json | -| [loadBalancerBackendAddressPoolsListSample.ts][loadbalancerbackendaddresspoolslistsample] | Gets all the load balancer backed address pools. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json | -| [loadBalancerFrontendIPConfigurationsGetSample.ts][loadbalancerfrontendipconfigurationsgetsample] | Gets load balancer frontend IP configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerFrontendIPConfigurationGet.json | -| [loadBalancerFrontendIPConfigurationsListSample.ts][loadbalancerfrontendipconfigurationslistsample] | Gets all the load balancer frontend IP configurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerFrontendIPConfigurationList.json | -| [loadBalancerLoadBalancingRulesGetSample.ts][loadbalancerloadbalancingrulesgetsample] | Gets the specified load balancer load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerLoadBalancingRuleGet.json | -| [loadBalancerLoadBalancingRulesHealthSample.ts][loadbalancerloadbalancingruleshealthsample] | Get health details of a load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerHealth.json | -| [loadBalancerLoadBalancingRulesListSample.ts][loadbalancerloadbalancingruleslistsample] | Gets all the load balancing rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerLoadBalancingRuleList.json | -| [loadBalancerNetworkInterfacesListSample.ts][loadbalancernetworkinterfaceslistsample] | Gets associated load balancer network interfaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerNetworkInterfaceListSimple.json | -| [loadBalancerOutboundRulesGetSample.ts][loadbalanceroutboundrulesgetsample] | Gets the specified load balancer outbound rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerOutboundRuleGet.json | -| [loadBalancerOutboundRulesListSample.ts][loadbalanceroutboundruleslistsample] | Gets all the outbound rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerOutboundRuleList.json | -| [loadBalancerProbesGetSample.ts][loadbalancerprobesgetsample] | Gets load balancer probe. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerProbeGet.json | -| [loadBalancerProbesListSample.ts][loadbalancerprobeslistsample] | Gets all the load balancer probes. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerProbeList.json | -| [loadBalancersCreateOrUpdateSample.ts][loadbalancerscreateorupdatesample] | Creates or updates a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreate.json | -| [loadBalancersDeleteSample.ts][loadbalancersdeletesample] | Deletes the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerDelete.json | -| [loadBalancersGetSample.ts][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerGet.json | -| [loadBalancersListAllSample.ts][loadbalancerslistallsample] | Gets all the load balancers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerListAll.json | -| [loadBalancersListInboundNatRulePortMappingsSample.ts][loadbalancerslistinboundnatruleportmappingssample] | List of inbound NAT rule port mappings. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/QueryInboundNatRulePortMapping.json | -| [loadBalancersListSample.ts][loadbalancerslistsample] | Gets all the load balancers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerList.json | -| [loadBalancersMigrateToIPBasedSample.ts][loadbalancersmigratetoipbasedsample] | Migrate load balancer to IP Based x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/MigrateLoadBalancerToIPBased.json | -| [loadBalancersSwapPublicIPAddressesSample.ts][loadbalancersswappublicipaddressessample] | Swaps VIPs between two load balancers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancersSwapPublicIpAddresses.json | -| [loadBalancersUpdateTagsSample.ts][loadbalancersupdatetagssample] | Updates a load balancer tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerUpdateTags.json | -| [localNetworkGatewaysCreateOrUpdateSample.ts][localnetworkgatewayscreateorupdatesample] | Creates or updates a local network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayCreate.json | -| [localNetworkGatewaysDeleteSample.ts][localnetworkgatewaysdeletesample] | Deletes the specified local network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayDelete.json | -| [localNetworkGatewaysGetSample.ts][localnetworkgatewaysgetsample] | Gets the specified local network gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayGet.json | -| [localNetworkGatewaysListSample.ts][localnetworkgatewayslistsample] | Gets all the local network gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayList.json | -| [localNetworkGatewaysUpdateTagsSample.ts][localnetworkgatewaysupdatetagssample] | Updates a local network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayUpdateTags.json | -| [managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts][managementgroupnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupPut.json | -| [managementGroupNetworkManagerConnectionsDeleteSample.ts][managementgroupnetworkmanagerconnectionsdeletesample] | Delete specified pending connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupDelete.json | -| [managementGroupNetworkManagerConnectionsGetSample.ts][managementgroupnetworkmanagerconnectionsgetsample] | Get a specified connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupGet.json | -| [managementGroupNetworkManagerConnectionsListSample.ts][managementgroupnetworkmanagerconnectionslistsample] | List all network manager connections created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupList.json | -| [natGatewaysCreateOrUpdateSample.ts][natgatewayscreateorupdatesample] | Creates or updates a nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayCreateOrUpdate.json | -| [natGatewaysDeleteSample.ts][natgatewaysdeletesample] | Deletes the specified nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayDelete.json | -| [natGatewaysGetSample.ts][natgatewaysgetsample] | Gets the specified nat gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayGet.json | -| [natGatewaysListAllSample.ts][natgatewayslistallsample] | Gets all the Nat Gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayListAll.json | -| [natGatewaysListSample.ts][natgatewayslistsample] | Gets all nat gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayList.json | -| [natGatewaysUpdateTagsSample.ts][natgatewaysupdatetagssample] | Updates nat gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayUpdateTags.json | -| [natRulesCreateOrUpdateSample.ts][natrulescreateorupdatesample] | Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRulePut.json | -| [natRulesDeleteSample.ts][natrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleDelete.json | -| [natRulesGetSample.ts][natrulesgetsample] | Retrieves the details of a nat ruleGet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleGet.json | -| [natRulesListByVpnGatewaySample.ts][natruleslistbyvpngatewaysample] | Retrieves all nat rules for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleList.json | -| [networkGroupsCreateOrUpdateSample.ts][networkgroupscreateorupdatesample] | Creates or updates a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupPut.json | -| [networkGroupsDeleteSample.ts][networkgroupsdeletesample] | Deletes a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupDelete.json | -| [networkGroupsGetSample.ts][networkgroupsgetsample] | Gets the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupGet.json | -| [networkGroupsListSample.ts][networkgroupslistsample] | Lists the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupList.json | -| [networkInterfaceIPConfigurationsGetSample.ts][networkinterfaceipconfigurationsgetsample] | Gets the specified network interface ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceIPConfigurationGet.json | -| [networkInterfaceIPConfigurationsListSample.ts][networkinterfaceipconfigurationslistsample] | Get all ip configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceIPConfigurationList.json | -| [networkInterfaceLoadBalancersListSample.ts][networkinterfaceloadbalancerslistsample] | List all load balancers in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceLoadBalancerList.json | -| [networkInterfaceTapConfigurationsCreateOrUpdateSample.ts][networkinterfacetapconfigurationscreateorupdatesample] | Creates or updates a Tap configuration in the specified NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationCreate.json | -| [networkInterfaceTapConfigurationsDeleteSample.ts][networkinterfacetapconfigurationsdeletesample] | Deletes the specified tap configuration from the NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationDelete.json | -| [networkInterfaceTapConfigurationsGetSample.ts][networkinterfacetapconfigurationsgetsample] | Get the specified tap configuration on a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationGet.json | -| [networkInterfaceTapConfigurationsListSample.ts][networkinterfacetapconfigurationslistsample] | Get all Tap configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationList.json | -| [networkInterfacesCreateOrUpdateSample.ts][networkinterfacescreateorupdatesample] | Creates or updates a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceCreate.json | -| [networkInterfacesDeleteSample.ts][networkinterfacesdeletesample] | Deletes the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceDelete.json | -| [networkInterfacesGetCloudServiceNetworkInterfaceSample.ts][networkinterfacesgetcloudservicenetworkinterfacesample] | Get the specified network interface in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceNetworkInterfaceGet.json | -| [networkInterfacesGetEffectiveRouteTableSample.ts][networkinterfacesgeteffectiveroutetablesample] | Gets all route tables applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceEffectiveRouteTableList.json | -| [networkInterfacesGetSample.ts][networkinterfacesgetsample] | Gets information about the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceGet.json | -| [networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts][networkinterfacesgetvirtualmachinescalesetipconfigurationsample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceIpConfigGet.json | -| [networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts][networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample] | Get the specified network interface in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceGet.json | -| [networkInterfacesListAllSample.ts][networkinterfaceslistallsample] | Gets all network interfaces in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceListAll.json | -| [networkInterfacesListCloudServiceNetworkInterfacesSample.ts][networkinterfaceslistcloudservicenetworkinterfacessample] | Gets all network interfaces in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceNetworkInterfaceList.json | -| [networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts][networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample] | Gets information about all network interfaces in a role instance in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json | -| [networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts][networkinterfaceslisteffectivenetworksecuritygroupssample] | Gets all network security groups applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceEffectiveNSGList.json | -| [networkInterfacesListSample.ts][networkinterfaceslistsample] | Gets all network interfaces in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts][networkinterfaceslistvirtualmachinescalesetipconfigurationssample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceIpConfigList.json | -| [networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts][networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample] | Gets all network interfaces in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts][networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample] | Gets information about all network interfaces in a virtual machine in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssVmNetworkInterfaceList.json | -| [networkInterfacesUpdateTagsSample.ts][networkinterfacesupdatetagssample] | Updates a network interface tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceUpdateTags.json | -| [networkManagerCommitsPostSample.ts][networkmanagercommitspostsample] | Post a Network Manager Commit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerCommitPost.json | -| [networkManagerDeploymentStatusListSample.ts][networkmanagerdeploymentstatuslistsample] | Post to List of Network Manager Deployment Status. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerDeploymentStatusList.json | -| [networkManagerRoutingConfigurationsCreateOrUpdateSample.ts][networkmanagerroutingconfigurationscreateorupdatesample] | Creates or updates a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationPut.json | -| [networkManagerRoutingConfigurationsDeleteSample.ts][networkmanagerroutingconfigurationsdeletesample] | Deletes a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationDelete.json | -| [networkManagerRoutingConfigurationsGetSample.ts][networkmanagerroutingconfigurationsgetsample] | Retrieves a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationGet.json | -| [networkManagerRoutingConfigurationsListSample.ts][networkmanagerroutingconfigurationslistsample] | Lists all the network manager routing configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationList.json | -| [networkManagersCreateOrUpdateSample.ts][networkmanagerscreateorupdatesample] | Creates or updates a Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerPut.json | -| [networkManagersDeleteSample.ts][networkmanagersdeletesample] | Deletes a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerDelete.json | -| [networkManagersGetSample.ts][networkmanagersgetsample] | Gets the specified Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGet.json | -| [networkManagersListBySubscriptionSample.ts][networkmanagerslistbysubscriptionsample] | List all network managers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerListAll.json | -| [networkManagersListSample.ts][networkmanagerslistsample] | List network managers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerList.json | -| [networkManagersPatchSample.ts][networkmanagerspatchsample] | Patch NetworkManager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerPatch.json | -| [networkProfilesCreateOrUpdateSample.ts][networkprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileCreateConfigOnly.json | -| [networkProfilesDeleteSample.ts][networkprofilesdeletesample] | Deletes the specified network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileDelete.json | -| [networkProfilesGetSample.ts][networkprofilesgetsample] | Gets the specified network profile in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileGetConfigOnly.json | -| [networkProfilesListAllSample.ts][networkprofileslistallsample] | Gets all the network profiles in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileListAll.json | -| [networkProfilesListSample.ts][networkprofileslistsample] | Gets all network profiles in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileList.json | -| [networkProfilesUpdateTagsSample.ts][networkprofilesupdatetagssample] | Updates network profile tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileUpdateTags.json | -| [networkSecurityGroupsCreateOrUpdateSample.ts][networksecuritygroupscreateorupdatesample] | Creates or updates a network security group in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupCreate.json | -| [networkSecurityGroupsDeleteSample.ts][networksecuritygroupsdeletesample] | Deletes the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupDelete.json | -| [networkSecurityGroupsGetSample.ts][networksecuritygroupsgetsample] | Gets the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupGet.json | -| [networkSecurityGroupsListAllSample.ts][networksecuritygroupslistallsample] | Gets all network security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupListAll.json | -| [networkSecurityGroupsListSample.ts][networksecuritygroupslistsample] | Gets all network security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupList.json | -| [networkSecurityGroupsUpdateTagsSample.ts][networksecuritygroupsupdatetagssample] | Updates a network security group tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupUpdateTags.json | -| [networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts][networksecurityperimeteraccessrulescreateorupdatesample] | Creates or updates a network access rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRulePut.json | -| [networkSecurityPerimeterAccessRulesDeleteSample.ts][networksecurityperimeteraccessrulesdeletesample] | Deletes an NSP access rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleDelete.json | -| [networkSecurityPerimeterAccessRulesGetSample.ts][networksecurityperimeteraccessrulesgetsample] | Gets the specified NSP access rule by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleGet.json | -| [networkSecurityPerimeterAccessRulesListSample.ts][networksecurityperimeteraccessruleslistsample] | Lists the NSP access rules in the specified NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleList.json | -| [networkSecurityPerimeterAccessRulesReconcileSample.ts][networksecurityperimeteraccessrulesreconcilesample] | Reconcile NSP access rules x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleReconcile.json | -| [networkSecurityPerimeterAssociableResourceTypesListSample.ts][networksecurityperimeterassociableresourcetypeslistsample] | Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PerimeterAssociableResourcesList.json | -| [networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts][networksecurityperimeterassociationscreateorupdatesample] | Creates or updates a NSP resource association. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationPut.json | -| [networkSecurityPerimeterAssociationsDeleteSample.ts][networksecurityperimeterassociationsdeletesample] | Deletes an NSP association resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationDelete.json | -| [networkSecurityPerimeterAssociationsGetSample.ts][networksecurityperimeterassociationsgetsample] | Gets the specified NSP association by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationGet.json | -| [networkSecurityPerimeterAssociationsListSample.ts][networksecurityperimeterassociationslistsample] | Lists the NSP resource associations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationList.json | -| [networkSecurityPerimeterAssociationsReconcileSample.ts][networksecurityperimeterassociationsreconcilesample] | Reconcile NSP association x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationReconcile.json | -| [networkSecurityPerimeterLinkReferencesDeleteSample.ts][networksecurityperimeterlinkreferencesdeletesample] | Deletes an NSP LinkReference resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceDelete.json | -| [networkSecurityPerimeterLinkReferencesGetSample.ts][networksecurityperimeterlinkreferencesgetsample] | Gets the specified NSP linkReference resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceGet.json | -| [networkSecurityPerimeterLinkReferencesListSample.ts][networksecurityperimeterlinkreferenceslistsample] | Lists the NSP LinkReference resources in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceList.json | -| [networkSecurityPerimeterLinksCreateOrUpdateSample.ts][networksecurityperimeterlinkscreateorupdatesample] | Creates or updates NSP link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkPut.json | -| [networkSecurityPerimeterLinksDeleteSample.ts][networksecurityperimeterlinksdeletesample] | Deletes an NSP Link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkDelete.json | -| [networkSecurityPerimeterLinksGetSample.ts][networksecurityperimeterlinksgetsample] | Gets the specified NSP link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkGet.json | -| [networkSecurityPerimeterLinksListSample.ts][networksecurityperimeterlinkslistsample] | Lists the NSP Link resources in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkList.json | -| [networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts][networksecurityperimeterloggingconfigurationscreateorupdatesample] | Creates or updates NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationPut.json | -| [networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts][networksecurityperimeterloggingconfigurationsdeletesample] | Deletes an NSP Logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationDelete.json | -| [networkSecurityPerimeterLoggingConfigurationsGetSample.ts][networksecurityperimeterloggingconfigurationsgetsample] | Gets the NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationGet.json | -| [networkSecurityPerimeterLoggingConfigurationsListSample.ts][networksecurityperimeterloggingconfigurationslistsample] | Lists the NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationList.json | -| [networkSecurityPerimeterOperationStatusesGetSample.ts][networksecurityperimeteroperationstatusesgetsample] | Gets the operation status for the given operation id. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspOperationStatusGet.json | -| [networkSecurityPerimeterProfilesCreateOrUpdateSample.ts][networksecurityperimeterprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfilePut.json | -| [networkSecurityPerimeterProfilesDeleteSample.ts][networksecurityperimeterprofilesdeletesample] | Deletes an NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileDelete.json | -| [networkSecurityPerimeterProfilesGetSample.ts][networksecurityperimeterprofilesgetsample] | Gets the specified NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileGet.json | -| [networkSecurityPerimeterProfilesListSample.ts][networksecurityperimeterprofileslistsample] | Lists the NSP profiles in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileList.json | -| [networkSecurityPerimeterServiceTagsListSample.ts][networksecurityperimeterservicetagslistsample] | Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspServiceTagsList.json | -| [networkSecurityPerimetersCreateOrUpdateSample.ts][networksecurityperimeterscreateorupdatesample] | Creates or updates a Network Security Perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterPut.json | -| [networkSecurityPerimetersDeleteSample.ts][networksecurityperimetersdeletesample] | Deletes a network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterDelete.json | -| [networkSecurityPerimetersGetSample.ts][networksecurityperimetersgetsample] | Gets the specified network security perimeter by the name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterGet.json | -| [networkSecurityPerimetersListBySubscriptionSample.ts][networksecurityperimeterslistbysubscriptionsample] | List all network security perimeters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterListAll.json | -| [networkSecurityPerimetersListSample.ts][networksecurityperimeterslistsample] | List network security perimeters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterList.json | -| [networkSecurityPerimetersPatchSample.ts][networksecurityperimeterspatchsample] | Patch Tags for a Network Security Perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterPatch.json | -| [networkVirtualApplianceConnectionsCreateOrUpdateSample.ts][networkvirtualapplianceconnectionscreateorupdatesample] | Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionPut.json | -| [networkVirtualApplianceConnectionsDeleteSample.ts][networkvirtualapplianceconnectionsdeletesample] | Deletes a NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionDelete.json | -| [networkVirtualApplianceConnectionsGetSample.ts][networkvirtualapplianceconnectionsgetsample] | Retrieves the details of specified NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionGet.json | -| [networkVirtualApplianceConnectionsListSample.ts][networkvirtualapplianceconnectionslistsample] | Lists NetworkVirtualApplianceConnections under the NVA. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionList.json | -| [networkVirtualAppliancesCreateOrUpdateSample.ts][networkvirtualappliancescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetBasicPut.json | -| [networkVirtualAppliancesDeleteSample.ts][networkvirtualappliancesdeletesample] | Deletes the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceDelete.json | -| [networkVirtualAppliancesGetBootDiagnosticLogsSample.ts][networkvirtualappliancesgetbootdiagnosticlogssample] | Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceBootDiagnostics.json | -| [networkVirtualAppliancesGetSample.ts][networkvirtualappliancesgetsample] | Gets the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceGet.json | -| [networkVirtualAppliancesListByResourceGroupSample.ts][networkvirtualapplianceslistbyresourcegroupsample] | Lists all Network Virtual Appliances in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceListByResourceGroup.json | -| [networkVirtualAppliancesListSample.ts][networkvirtualapplianceslistsample] | Gets all Network Virtual Appliances in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceListBySubscription.json | -| [networkVirtualAppliancesReimageSample.ts][networkvirtualappliancesreimagesample] | Reimages one VM belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSpecificReimage.json | -| [networkVirtualAppliancesRestartSample.ts][networkvirtualappliancesrestartsample] | Restarts one or more VMs belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceEmptyRestart.json | -| [networkVirtualAppliancesUpdateTagsSample.ts][networkvirtualappliancesupdatetagssample] | Updates a Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceUpdateTags.json | -| [networkWatchersCheckConnectivitySample.ts][networkwatcherscheckconnectivitysample] | Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectivityCheck.json | -| [networkWatchersCreateOrUpdateSample.ts][networkwatcherscreateorupdatesample] | Creates or updates a network watcher in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherCreate.json | -| [networkWatchersDeleteSample.ts][networkwatchersdeletesample] | Deletes the specified network watcher resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherDelete.json | -| [networkWatchersGetAzureReachabilityReportSample.ts][networkwatchersgetazurereachabilityreportsample] | NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherAzureReachabilityReportGet.json | -| [networkWatchersGetFlowLogStatusSample.ts][networkwatchersgetflowlogstatussample] | Queries status of flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogStatusQuery.json | -| [networkWatchersGetNetworkConfigurationDiagnosticSample.ts][networkwatchersgetnetworkconfigurationdiagnosticsample] | Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json | -| [networkWatchersGetNextHopSample.ts][networkwatchersgetnexthopsample] | Gets the next hop from the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherNextHopGet.json | -| [networkWatchersGetSample.ts][networkwatchersgetsample] | Gets the specified network watcher by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherGet.json | -| [networkWatchersGetTopologySample.ts][networkwatchersgettopologysample] | Gets the current network topology by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTopologyGet.json | -| [networkWatchersGetTroubleshootingResultSample.ts][networkwatchersgettroubleshootingresultsample] | Get the last completed troubleshooting result on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTroubleshootResultQuery.json | -| [networkWatchersGetTroubleshootingSample.ts][networkwatchersgettroubleshootingsample] | Initiate troubleshooting on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTroubleshootGet.json | -| [networkWatchersGetVMSecurityRulesSample.ts][networkwatchersgetvmsecurityrulessample] | Gets the configured and effective security group rules on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherSecurityGroupViewGet.json | -| [networkWatchersListAllSample.ts][networkwatcherslistallsample] | Gets all network watchers by subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherListAll.json | -| [networkWatchersListAvailableProvidersSample.ts][networkwatcherslistavailableproviderssample] | NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherAvailableProvidersListGet.json | -| [networkWatchersListSample.ts][networkwatcherslistsample] | Gets all network watchers by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherList.json | -| [networkWatchersSetFlowLogConfigurationSample.ts][networkwatcherssetflowlogconfigurationsample] | Configures flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogConfigure.json | -| [networkWatchersUpdateTagsSample.ts][networkwatchersupdatetagssample] | Updates a network watcher tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherUpdateTags.json | -| [networkWatchersVerifyIPFlowSample.ts][networkwatchersverifyipflowsample] | Verify IP flow from the specified VM to a location given the currently configured NSG rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherIpFlowVerify.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available Network Rest API operations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/OperationList.json | -| [p2SVpnGatewaysCreateOrUpdateSample.ts][p2svpngatewayscreateorupdatesample] | Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayPut.json | -| [p2SVpnGatewaysDeleteSample.ts][p2svpngatewaysdeletesample] | Deletes a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayDelete.json | -| [p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts][p2svpngatewaysdisconnectp2svpnconnectionssample] | Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json | -| [p2SVpnGatewaysGenerateVpnProfileSample.ts][p2svpngatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGenerateVpnProfile.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts][p2svpngatewaysgetp2svpnconnectionhealthdetailedsample] | Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts][p2svpngatewaysgetp2svpnconnectionhealthsample] | Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGetConnectionHealth.json | -| [p2SVpnGatewaysGetSample.ts][p2svpngatewaysgetsample] | Retrieves the details of a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGet.json | -| [p2SVpnGatewaysListByResourceGroupSample.ts][p2svpngatewayslistbyresourcegroupsample] | Lists all the P2SVpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayListByResourceGroup.json | -| [p2SVpnGatewaysListSample.ts][p2svpngatewayslistsample] | Lists all the P2SVpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayList.json | -| [p2SVpnGatewaysResetSample.ts][p2svpngatewaysresetsample] | Resets the primary of the p2s vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayReset.json | -| [p2SVpnGatewaysUpdateTagsSample.ts][p2svpngatewaysupdatetagssample] | Updates virtual wan p2s vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayUpdateTags.json | -| [packetCapturesCreateSample.ts][packetcapturescreatesample] | Create and start a packet capture on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureCreate.json | -| [packetCapturesDeleteSample.ts][packetcapturesdeletesample] | Deletes the specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureDelete.json | -| [packetCapturesGetSample.ts][packetcapturesgetsample] | Gets a packet capture session by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureGet.json | -| [packetCapturesGetStatusSample.ts][packetcapturesgetstatussample] | Query the status of a running packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureQueryStatus.json | -| [packetCapturesListSample.ts][packetcaptureslistsample] | Lists all packet capture sessions within the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCapturesList.json | -| [packetCapturesStopSample.ts][packetcapturesstopsample] | Stops a specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureStop.json | -| [peerExpressRouteCircuitConnectionsGetSample.ts][peerexpressroutecircuitconnectionsgetsample] | Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PeerExpressRouteCircuitConnectionGet.json | -| [peerExpressRouteCircuitConnectionsListSample.ts][peerexpressroutecircuitconnectionslistsample] | Gets all global reach peer connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PeerExpressRouteCircuitConnectionList.json | -| [privateDnsZoneGroupsCreateOrUpdateSample.ts][privatednszonegroupscreateorupdatesample] | Creates or updates a private dns zone group in the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupCreate.json | -| [privateDnsZoneGroupsDeleteSample.ts][privatednszonegroupsdeletesample] | Deletes the specified private dns zone group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupDelete.json | -| [privateDnsZoneGroupsGetSample.ts][privatednszonegroupsgetsample] | Gets the private dns zone group resource by specified private dns zone group name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupGet.json | -| [privateDnsZoneGroupsListSample.ts][privatednszonegroupslistsample] | Gets all private dns zone groups in a private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupList.json | -| [privateEndpointsCreateOrUpdateSample.ts][privateendpointscreateorupdatesample] | Creates or updates an private endpoint in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointCreate.json | -| [privateEndpointsDeleteSample.ts][privateendpointsdeletesample] | Deletes the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDelete.json | -| [privateEndpointsGetSample.ts][privateendpointsgetsample] | Gets the specified private endpoint by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointGet.json | -| [privateEndpointsListBySubscriptionSample.ts][privateendpointslistbysubscriptionsample] | Gets all private endpoints in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointListAll.json | -| [privateEndpointsListSample.ts][privateendpointslistsample] | Gets all private endpoints in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointList.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts][privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample] | Checks whether the subscription is visible to private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts][privatelinkservicescheckprivatelinkservicevisibilitysample] | Checks whether the subscription is visible to private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckPrivateLinkServiceVisibility.json | -| [privateLinkServicesCreateOrUpdateSample.ts][privatelinkservicescreateorupdatesample] | Creates or updates an private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceCreate.json | -| [privateLinkServicesDeletePrivateEndpointConnectionSample.ts][privatelinkservicesdeleteprivateendpointconnectionsample] | Delete private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json | -| [privateLinkServicesDeleteSample.ts][privatelinkservicesdeletesample] | Deletes the specified private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceDelete.json | -| [privateLinkServicesGetPrivateEndpointConnectionSample.ts][privatelinkservicesgetprivateendpointconnectionsample] | Get the specific private end point connection by specific private link service in the resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json | -| [privateLinkServicesGetSample.ts][privatelinkservicesgetsample] | Gets the specified private link service by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts][privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts][privatelinkserviceslistautoapprovedprivatelinkservicessample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AutoApprovedPrivateLinkServicesGet.json | -| [privateLinkServicesListBySubscriptionSample.ts][privatelinkserviceslistbysubscriptionsample] | Gets all private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceListAll.json | -| [privateLinkServicesListPrivateEndpointConnectionsSample.ts][privatelinkserviceslistprivateendpointconnectionssample] | Gets all private end point connections for a specific private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json | -| [privateLinkServicesListSample.ts][privatelinkserviceslistsample] | Gets all private link services in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceList.json | -| [privateLinkServicesUpdatePrivateEndpointConnectionSample.ts][privatelinkservicesupdateprivateendpointconnectionsample] | Approve or reject private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json | -| [publicIPAddressesCreateOrUpdateSample.ts][publicipaddressescreateorupdatesample] | Creates or updates a static or dynamic public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDns.json | -| [publicIPAddressesDdosProtectionStatusSample.ts][publicipaddressesddosprotectionstatussample] | Gets the Ddos Protection Status of a Public IP Address x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressGetDdosProtectionStatus.json | -| [publicIPAddressesDeleteSample.ts][publicipaddressesdeletesample] | Deletes the specified public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressDelete.json | -| [publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts][publicipaddressesdisassociatecloudservicereservedpublicipsample] | Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressDisassociateCloudServiceReservedPublicIp.json | -| [publicIPAddressesGetCloudServicePublicIpaddressSample.ts][publicipaddressesgetcloudservicepublicipaddresssample] | Get the specified public IP address in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServicePublicIpGet.json | -| [publicIPAddressesGetSample.ts][publicipaddressesgetsample] | Gets the specified public IP address in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressGet.json | -| [publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts][publicipaddressesgetvirtualmachinescalesetpublicipaddresssample] | Get the specified public IP address in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssPublicIpGet.json | -| [publicIPAddressesListAllSample.ts][publicipaddresseslistallsample] | Gets all the public IP addresses in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressListAll.json | -| [publicIPAddressesListCloudServicePublicIpaddressesSample.ts][publicipaddresseslistcloudservicepublicipaddressessample] | Gets information about all public IP addresses on a cloud service level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServicePublicIpListAll.json | -| [publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts][publicipaddresseslistcloudserviceroleinstancepublicipaddressessample] | Gets information about all public IP addresses in a role instance IP configuration in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceRoleInstancePublicIpList.json | -| [publicIPAddressesListSample.ts][publicipaddresseslistsample] | Gets all public IP addresses in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressList.json | -| [publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts][publicipaddresseslistvirtualmachinescalesetpublicipaddressessample] | Gets information about all public IP addresses on a virtual machine scale set level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssPublicIpListAll.json | -| [publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts][publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample] | Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssVmPublicIpList.json | -| [publicIPAddressesReserveCloudServicePublicIPAddressSample.ts][publicipaddressesreservecloudservicepublicipaddresssample] | Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressReserve.json | -| [publicIPAddressesUpdateTagsSample.ts][publicipaddressesupdatetagssample] | Updates public IP address tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressUpdateTags.json | -| [publicIPPrefixesCreateOrUpdateSample.ts][publicipprefixescreateorupdatesample] | Creates or updates a static or dynamic public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixCreateCustomizedValues.json | -| [publicIPPrefixesDeleteSample.ts][publicipprefixesdeletesample] | Deletes the specified public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixDelete.json | -| [publicIPPrefixesGetSample.ts][publicipprefixesgetsample] | Gets the specified public IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixGet.json | -| [publicIPPrefixesListAllSample.ts][publicipprefixeslistallsample] | Gets all the public IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixListAll.json | -| [publicIPPrefixesListSample.ts][publicipprefixeslistsample] | Gets all public IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixList.json | -| [publicIPPrefixesUpdateTagsSample.ts][publicipprefixesupdatetagssample] | Updates public IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixUpdateTags.json | -| [putBastionShareableLinkSample.ts][putbastionshareablelinksample] | Creates a Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkCreate.json | -| [reachabilityAnalysisIntentsCreateSample.ts][reachabilityanalysisintentscreatesample] | Creates Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentPut.json | -| [reachabilityAnalysisIntentsDeleteSample.ts][reachabilityanalysisintentsdeletesample] | Deletes Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentDelete.json | -| [reachabilityAnalysisIntentsGetSample.ts][reachabilityanalysisintentsgetsample] | Get the Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentGet.json | -| [reachabilityAnalysisIntentsListSample.ts][reachabilityanalysisintentslistsample] | Gets list of Reachability Analysis Intents . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentList.json | -| [reachabilityAnalysisRunsCreateSample.ts][reachabilityanalysisrunscreatesample] | Creates Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunPut.json | -| [reachabilityAnalysisRunsDeleteSample.ts][reachabilityanalysisrunsdeletesample] | Deletes Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunDelete.json | -| [reachabilityAnalysisRunsGetSample.ts][reachabilityanalysisrunsgetsample] | Gets Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunGet.json | -| [reachabilityAnalysisRunsListSample.ts][reachabilityanalysisrunslistsample] | Gets list of Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunList.json | -| [resourceNavigationLinksListSample.ts][resourcenavigationlinkslistsample] | Gets a list of resource navigation links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetResourceNavigationLinks.json | -| [routeFilterRulesCreateOrUpdateSample.ts][routefilterrulescreateorupdatesample] | Creates or updates a route in the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleCreate.json | -| [routeFilterRulesDeleteSample.ts][routefilterrulesdeletesample] | Deletes the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleDelete.json | -| [routeFilterRulesGetSample.ts][routefilterrulesgetsample] | Gets the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleGet.json | -| [routeFilterRulesListByRouteFilterSample.ts][routefilterruleslistbyroutefiltersample] | Gets all RouteFilterRules in a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleListByRouteFilter.json | -| [routeFiltersCreateOrUpdateSample.ts][routefilterscreateorupdatesample] | Creates or updates a route filter in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterCreate.json | -| [routeFiltersDeleteSample.ts][routefiltersdeletesample] | Deletes the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterDelete.json | -| [routeFiltersGetSample.ts][routefiltersgetsample] | Gets the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterGet.json | -| [routeFiltersListByResourceGroupSample.ts][routefilterslistbyresourcegroupsample] | Gets all route filters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterListByResourceGroup.json | -| [routeFiltersListSample.ts][routefilterslistsample] | Gets all route filters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterList.json | -| [routeFiltersUpdateTagsSample.ts][routefiltersupdatetagssample] | Updates tags of a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterUpdateTags.json | -| [routeMapsCreateOrUpdateSample.ts][routemapscreateorupdatesample] | Creates a RouteMap if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapPut.json | -| [routeMapsDeleteSample.ts][routemapsdeletesample] | Deletes a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapDelete.json | -| [routeMapsGetSample.ts][routemapsgetsample] | Retrieves the details of a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapGet.json | -| [routeMapsListSample.ts][routemapslistsample] | Retrieves the details of all RouteMaps. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapList.json | -| [routeTablesCreateOrUpdateSample.ts][routetablescreateorupdatesample] | Create or updates a route table in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableCreate.json | -| [routeTablesDeleteSample.ts][routetablesdeletesample] | Deletes the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableDelete.json | -| [routeTablesGetSample.ts][routetablesgetsample] | Gets the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableGet.json | -| [routeTablesListAllSample.ts][routetableslistallsample] | Gets all route tables in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableListAll.json | -| [routeTablesListSample.ts][routetableslistsample] | Gets all route tables in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableList.json | -| [routeTablesUpdateTagsSample.ts][routetablesupdatetagssample] | Updates a route table tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableUpdateTags.json | -| [routesCreateOrUpdateSample.ts][routescreateorupdatesample] | Creates or updates a route in the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteCreate.json | -| [routesDeleteSample.ts][routesdeletesample] | Deletes the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteDelete.json | -| [routesGetSample.ts][routesgetsample] | Gets the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteGet.json | -| [routesListSample.ts][routeslistsample] | Gets all routes in a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteList.json | -| [routingIntentCreateOrUpdateSample.ts][routingintentcreateorupdatesample] | Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentPut.json | -| [routingIntentDeleteSample.ts][routingintentdeletesample] | Deletes a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentDelete.json | -| [routingIntentGetSample.ts][routingintentgetsample] | Retrieves the details of a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentGet.json | -| [routingIntentListSample.ts][routingintentlistsample] | Retrieves the details of all RoutingIntent child resources of the VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentList.json | -| [routingRuleCollectionsCreateOrUpdateSample.ts][routingrulecollectionscreateorupdatesample] | Creates or updates a routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionPut.json | -| [routingRuleCollectionsDeleteSample.ts][routingrulecollectionsdeletesample] | Deletes an routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionDelete.json | -| [routingRuleCollectionsGetSample.ts][routingrulecollectionsgetsample] | Gets a network manager routing configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionGet.json | -| [routingRuleCollectionsListSample.ts][routingrulecollectionslistsample] | Lists all the rule collections in a routing configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionList.json | -| [routingRulesCreateOrUpdateSample.ts][routingrulescreateorupdatesample] | Creates or updates an routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRulePut.json | -| [routingRulesDeleteSample.ts][routingrulesdeletesample] | Deletes a routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleDelete.json | -| [routingRulesGetSample.ts][routingrulesgetsample] | Gets a network manager routing configuration routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleGet.json | -| [routingRulesListSample.ts][routingruleslistsample] | List all network manager routing configuration routing rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleList.json | -| [scopeConnectionsCreateOrUpdateSample.ts][scopeconnectionscreateorupdatesample] | Creates or updates scope connection from Network Manager x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionPut.json | -| [scopeConnectionsDeleteSample.ts][scopeconnectionsdeletesample] | Delete the pending scope connection created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionDelete.json | -| [scopeConnectionsGetSample.ts][scopeconnectionsgetsample] | Get specified scope connection created by this Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionGet.json | -| [scopeConnectionsListSample.ts][scopeconnectionslistsample] | List all scope connections created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionList.json | -| [securityAdminConfigurationsCreateOrUpdateSample.ts][securityadminconfigurationscreateorupdatesample] | Creates or updates a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json | -| [securityAdminConfigurationsDeleteSample.ts][securityadminconfigurationsdeletesample] | Deletes a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json | -| [securityAdminConfigurationsGetSample.ts][securityadminconfigurationsgetsample] | Retrieves a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationGet.json | -| [securityAdminConfigurationsListSample.ts][securityadminconfigurationslistsample] | Lists all the network manager security admin configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationList.json | -| [securityPartnerProvidersCreateOrUpdateSample.ts][securitypartnerproviderscreateorupdatesample] | Creates or updates the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderPut.json | -| [securityPartnerProvidersDeleteSample.ts][securitypartnerprovidersdeletesample] | Deletes the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderDelete.json | -| [securityPartnerProvidersGetSample.ts][securitypartnerprovidersgetsample] | Gets the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderGet.json | -| [securityPartnerProvidersListByResourceGroupSample.ts][securitypartnerproviderslistbyresourcegroupsample] | Lists all Security Partner Providers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderListByResourceGroup.json | -| [securityPartnerProvidersListSample.ts][securitypartnerproviderslistsample] | Gets all the Security Partner Providers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderListBySubscription.json | -| [securityPartnerProvidersUpdateTagsSample.ts][securitypartnerprovidersupdatetagssample] | Updates tags of a Security Partner Provider resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderUpdateTags.json | -| [securityRulesCreateOrUpdateSample.ts][securityrulescreateorupdatesample] | Creates or updates a security rule in the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleCreate.json | -| [securityRulesDeleteSample.ts][securityrulesdeletesample] | Deletes the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleDelete.json | -| [securityRulesGetSample.ts][securityrulesgetsample] | Get the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleGet.json | -| [securityRulesListSample.ts][securityruleslistsample] | Gets all security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleList.json | -| [securityUserConfigurationsCreateOrUpdateSample.ts][securityuserconfigurationscreateorupdatesample] | Creates or updates a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationPut.json | -| [securityUserConfigurationsDeleteSample.ts][securityuserconfigurationsdeletesample] | Deletes a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationDelete.json | -| [securityUserConfigurationsGetSample.ts][securityuserconfigurationsgetsample] | Retrieves a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationGet.json | -| [securityUserConfigurationsListSample.ts][securityuserconfigurationslistsample] | Lists all the network manager security user configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationList.json | -| [securityUserRuleCollectionsCreateOrUpdateSample.ts][securityuserrulecollectionscreateorupdatesample] | Creates or updates a security user rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json | -| [securityUserRuleCollectionsDeleteSample.ts][securityuserrulecollectionsdeletesample] | Deletes a Security User Rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json | -| [securityUserRuleCollectionsGetSample.ts][securityuserrulecollectionsgetsample] | Gets a network manager security user configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json | -| [securityUserRuleCollectionsListSample.ts][securityuserrulecollectionslistsample] | Lists all the security user rule collections in a security configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionList.json | -| [securityUserRulesCreateOrUpdateSample.ts][securityuserrulescreateorupdatesample] | Creates or updates a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRulePut.json | -| [securityUserRulesDeleteSample.ts][securityuserrulesdeletesample] | Deletes a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleDelete.json | -| [securityUserRulesGetSample.ts][securityuserrulesgetsample] | Gets a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleGet.json | -| [securityUserRulesListSample.ts][securityuserruleslistsample] | Lists all Security User Rules in a rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleList.json | -| [serviceAssociationLinksListSample.ts][serviceassociationlinkslistsample] | Gets a list of service association links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetServiceAssociationLinks.json | -| [serviceEndpointPoliciesCreateOrUpdateSample.ts][serviceendpointpoliciescreateorupdatesample] | Creates or updates a service Endpoint Policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyCreate.json | -| [serviceEndpointPoliciesDeleteSample.ts][serviceendpointpoliciesdeletesample] | Deletes the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDelete.json | -| [serviceEndpointPoliciesGetSample.ts][serviceendpointpoliciesgetsample] | Gets the specified service Endpoint Policies in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyGet.json | -| [serviceEndpointPoliciesListByResourceGroupSample.ts][serviceendpointpolicieslistbyresourcegroupsample] | Gets all service endpoint Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyList.json | -| [serviceEndpointPoliciesListSample.ts][serviceendpointpolicieslistsample] | Gets all the service endpoint policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyListAll.json | -| [serviceEndpointPoliciesUpdateTagsSample.ts][serviceendpointpoliciesupdatetagssample] | Updates tags of a service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyUpdateTags.json | -| [serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts][serviceendpointpolicydefinitionscreateorupdatesample] | Creates or updates a service endpoint policy definition in the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionCreate.json | -| [serviceEndpointPolicyDefinitionsDeleteSample.ts][serviceendpointpolicydefinitionsdeletesample] | Deletes the specified ServiceEndpoint policy definitions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionDelete.json | -| [serviceEndpointPolicyDefinitionsGetSample.ts][serviceendpointpolicydefinitionsgetsample] | Get the specified service endpoint policy definitions from service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionGet.json | -| [serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts][serviceendpointpolicydefinitionslistbyresourcegroupsample] | Gets all service endpoint policy definitions in a service end point policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionList.json | -| [serviceTagInformationListSample.ts][servicetaginformationlistsample] | Gets a list of service tag information resources with pagination. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagInformationListResult.json | -| [serviceTagsListSample.ts][servicetagslistsample] | Gets a list of service tag information resources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagsList.json | -| [staticCidrsCreateSample.ts][staticcidrscreatesample] | Creates/Updates the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Create.json | -| [staticCidrsDeleteSample.ts][staticcidrsdeletesample] | Delete the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Delete.json | -| [staticCidrsGetSample.ts][staticcidrsgetsample] | Gets the specific Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Get.json | -| [staticCidrsListSample.ts][staticcidrslistsample] | Gets list of Static CIDR resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_List.json | -| [staticMembersCreateOrUpdateSample.ts][staticmemberscreateorupdatesample] | Creates or updates a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberPut.json | -| [staticMembersDeleteSample.ts][staticmembersdeletesample] | Deletes a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberDelete.json | -| [staticMembersGetSample.ts][staticmembersgetsample] | Gets the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberGet.json | -| [staticMembersListSample.ts][staticmemberslistsample] | Lists the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberList.json | -| [subnetsCreateOrUpdateSample.ts][subnetscreateorupdatesample] | Creates or updates a subnet in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreate.json | -| [subnetsDeleteSample.ts][subnetsdeletesample] | Deletes the specified subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetDelete.json | -| [subnetsGetSample.ts][subnetsgetsample] | Gets the specified subnet by virtual network and resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetGet.json | -| [subnetsListSample.ts][subnetslistsample] | Gets all subnets in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetList.json | -| [subnetsPrepareNetworkPoliciesSample.ts][subnetspreparenetworkpoliciessample] | Prepares a subnet by applying network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetPrepareNetworkPolicies.json | -| [subnetsUnprepareNetworkPoliciesSample.ts][subnetsunpreparenetworkpoliciessample] | Unprepares a subnet by removing network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetUnprepareNetworkPolicies.json | -| [subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts][subscriptionnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionPut.json | -| [subscriptionNetworkManagerConnectionsDeleteSample.ts][subscriptionnetworkmanagerconnectionsdeletesample] | Delete specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionDelete.json | -| [subscriptionNetworkManagerConnectionsGetSample.ts][subscriptionnetworkmanagerconnectionsgetsample] | Get a specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionGet.json | -| [subscriptionNetworkManagerConnectionsListSample.ts][subscriptionnetworkmanagerconnectionslistsample] | List all network manager connections created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionList.json | -| [supportedSecurityProvidersSample.ts][supportedsecurityproviderssample] | Gives the supported security providers for the virtual wan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWanSupportedSecurityProviders.json | -| [usagesListSample.ts][usageslistsample] | List network usages for a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/UsageList.json | -| [verifierWorkspacesCreateSample.ts][verifierworkspacescreatesample] | Creates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspacePut.json | -| [verifierWorkspacesDeleteSample.ts][verifierworkspacesdeletesample] | Deletes Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceDelete.json | -| [verifierWorkspacesGetSample.ts][verifierworkspacesgetsample] | Gets Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceGet.json | -| [verifierWorkspacesListSample.ts][verifierworkspaceslistsample] | Gets list of Verifier Workspaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceList.json | -| [verifierWorkspacesUpdateSample.ts][verifierworkspacesupdatesample] | Updates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspacePatch.json | -| [vipSwapCreateSample.ts][vipswapcreatesample] | Performs vip swap operation on swappable cloud services. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapPut.json | -| [vipSwapGetSample.ts][vipswapgetsample] | Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapGet.json | -| [vipSwapListSample.ts][vipswaplistsample] | Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapList.json | -| [virtualApplianceSitesCreateOrUpdateSample.ts][virtualappliancesitescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSitePut.json | -| [virtualApplianceSitesDeleteSample.ts][virtualappliancesitesdeletesample] | Deletes the specified site from a Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteDelete.json | -| [virtualApplianceSitesGetSample.ts][virtualappliancesitesgetsample] | Gets the specified Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteGet.json | -| [virtualApplianceSitesListSample.ts][virtualappliancesiteslistsample] | Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteList.json | -| [virtualApplianceSkusGetSample.ts][virtualapplianceskusgetsample] | Retrieves a single available sku for network virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSkuGet.json | -| [virtualApplianceSkusListSample.ts][virtualapplianceskuslistsample] | List all SKUs available for a virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSkuList.json | -| [virtualHubBgpConnectionCreateOrUpdateSample.ts][virtualhubbgpconnectioncreateorupdatesample] | Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionPut.json | -| [virtualHubBgpConnectionDeleteSample.ts][virtualhubbgpconnectiondeletesample] | Deletes a VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionDelete.json | -| [virtualHubBgpConnectionGetSample.ts][virtualhubbgpconnectiongetsample] | Retrieves the details of a Virtual Hub Bgp Connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionGet.json | -| [virtualHubBgpConnectionsListAdvertisedRoutesSample.ts][virtualhubbgpconnectionslistadvertisedroutessample] | Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeerListAdvertisedRoute.json | -| [virtualHubBgpConnectionsListLearnedRoutesSample.ts][virtualhubbgpconnectionslistlearnedroutessample] | Retrieves a list of routes the virtual hub bgp connection has learned. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeerListLearnedRoute.json | -| [virtualHubBgpConnectionsListSample.ts][virtualhubbgpconnectionslistsample] | Retrieves the details of all VirtualHubBgpConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionList.json | -| [virtualHubIPConfigurationCreateOrUpdateSample.ts][virtualhubipconfigurationcreateorupdatesample] | Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationPut.json | -| [virtualHubIPConfigurationDeleteSample.ts][virtualhubipconfigurationdeletesample] | Deletes a VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationDelete.json | -| [virtualHubIPConfigurationGetSample.ts][virtualhubipconfigurationgetsample] | Retrieves the details of a Virtual Hub Ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationGet.json | -| [virtualHubIPConfigurationListSample.ts][virtualhubipconfigurationlistsample] | Retrieves the details of all VirtualHubIpConfigurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationList.json | -| [virtualHubRouteTableV2SCreateOrUpdateSample.ts][virtualhubroutetablev2screateorupdatesample] | Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Put.json | -| [virtualHubRouteTableV2SDeleteSample.ts][virtualhubroutetablev2sdeletesample] | Deletes a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Delete.json | -| [virtualHubRouteTableV2SGetSample.ts][virtualhubroutetablev2sgetsample] | Retrieves the details of a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Get.json | -| [virtualHubRouteTableV2SListSample.ts][virtualhubroutetablev2slistsample] | Retrieves the details of all VirtualHubRouteTableV2s. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2List.json | -| [virtualHubsCreateOrUpdateSample.ts][virtualhubscreateorupdatesample] | Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubPut.json | -| [virtualHubsDeleteSample.ts][virtualhubsdeletesample] | Deletes a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubDelete.json | -| [virtualHubsGetEffectiveVirtualHubRoutesSample.ts][virtualhubsgeteffectivevirtualhubroutessample] | Gets the effective routes configured for the Virtual Hub resource or the specified resource . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EffectiveRoutesListForConnection.json | -| [virtualHubsGetInboundRoutesSample.ts][virtualhubsgetinboundroutessample] | Gets the inbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetInboundRoutes.json | -| [virtualHubsGetOutboundRoutesSample.ts][virtualhubsgetoutboundroutessample] | Gets the outbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetOutboundRoutes.json | -| [virtualHubsGetSample.ts][virtualhubsgetsample] | Retrieves the details of a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubGet.json | -| [virtualHubsListByResourceGroupSample.ts][virtualhubslistbyresourcegroupsample] | Lists all the VirtualHubs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubListByResourceGroup.json | -| [virtualHubsListSample.ts][virtualhubslistsample] | Lists all the VirtualHubs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubList.json | -| [virtualHubsUpdateTagsSample.ts][virtualhubsupdatetagssample] | Updates VirtualHub tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubUpdateTags.json | -| [virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts][virtualnetworkgatewayconnectionscreateorupdatesample] | Creates or updates a virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionCreate.json | -| [virtualNetworkGatewayConnectionsDeleteSample.ts][virtualnetworkgatewayconnectionsdeletesample] | Deletes the specified virtual network Gateway connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionDelete.json | -| [virtualNetworkGatewayConnectionsGetIkeSasSample.ts][virtualnetworkgatewayconnectionsgetikesassample] | Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json | -| [virtualNetworkGatewayConnectionsGetSample.ts][virtualnetworkgatewayconnectionsgetsample] | Gets the specified virtual network gateway connection by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGet.json | -| [virtualNetworkGatewayConnectionsGetSharedKeySample.ts][virtualnetworkgatewayconnectionsgetsharedkeysample] | The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json | -| [virtualNetworkGatewayConnectionsListSample.ts][virtualnetworkgatewayconnectionslistsample] | The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionsList.json | -| [virtualNetworkGatewayConnectionsResetConnectionSample.ts][virtualnetworkgatewayconnectionsresetconnectionsample] | Resets the virtual network gateway connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionReset.json | -| [virtualNetworkGatewayConnectionsResetSharedKeySample.ts][virtualnetworkgatewayconnectionsresetsharedkeysample] | The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json | -| [virtualNetworkGatewayConnectionsSetSharedKeySample.ts][virtualnetworkgatewayconnectionssetsharedkeysample] | The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json | -| [virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts][virtualnetworkgatewayconnectionsstartpacketcapturesample] | Starts packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json | -| [virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts][virtualnetworkgatewayconnectionsstoppacketcapturesample] | Stops packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json | -| [virtualNetworkGatewayConnectionsUpdateTagsSample.ts][virtualnetworkgatewayconnectionsupdatetagssample] | Updates a virtual network gateway connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json | -| [virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts][virtualnetworkgatewaynatrulescreateorupdatesample] | Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRulePut.json | -| [virtualNetworkGatewayNatRulesDeleteSample.ts][virtualnetworkgatewaynatrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleDelete.json | -| [virtualNetworkGatewayNatRulesGetSample.ts][virtualnetworkgatewaynatrulesgetsample] | Retrieves the details of a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleGet.json | -| [virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts][virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample] | Retrieves all nat rules for a particular virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleList.json | -| [virtualNetworkGatewaysCreateOrUpdateSample.ts][virtualnetworkgatewayscreateorupdatesample] | Creates or updates a virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayUpdate.json | -| [virtualNetworkGatewaysDeleteSample.ts][virtualnetworkgatewaysdeletesample] | Deletes the specified virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayDelete.json | -| [virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts][virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample] | Disconnect vpn connections of virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json | -| [virtualNetworkGatewaysGenerateVpnProfileSample.ts][virtualnetworkgatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json | -| [virtualNetworkGatewaysGeneratevpnclientpackageSample.ts][virtualnetworkgatewaysgeneratevpnclientpackagesample] | Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json | -| [virtualNetworkGatewaysGetAdvertisedRoutesSample.ts][virtualnetworkgatewaysgetadvertisedroutessample] | This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json | -| [virtualNetworkGatewaysGetBgpPeerStatusSample.ts][virtualnetworkgatewaysgetbgppeerstatussample] | The GetBgpPeerStatus operation retrieves the status of all BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json | -| [virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts][virtualnetworkgatewaysgetfailoveralltestdetailssample] | This operation retrieves the details of all the failover tests performed on the gateway for different peering locations x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json | -| [virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts][virtualnetworkgatewaysgetfailoversingletestdetailssample] | This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json | -| [virtualNetworkGatewaysGetLearnedRoutesSample.ts][virtualnetworkgatewaysgetlearnedroutessample] | This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayLearnedRoutes.json | -| [virtualNetworkGatewaysGetResiliencyInformationSample.ts][virtualnetworkgatewaysgetresiliencyinformationsample] | This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetResiliencyInformation.json | -| [virtualNetworkGatewaysGetRoutesInformationSample.ts][virtualnetworkgatewaysgetroutesinformationsample] | This operation retrieves the route set information for an Express Route Gateway based on their resiliency x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetRoutesInformation.json | -| [virtualNetworkGatewaysGetSample.ts][virtualnetworkgatewaysgetsample] | Gets the specified virtual network gateway by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGet.json | -| [virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts][virtualnetworkgatewaysgetvpnprofilepackageurlsample] | Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json | -| [virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts][virtualnetworkgatewaysgetvpnclientconnectionhealthsample] | Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json | -| [virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts][virtualnetworkgatewaysgetvpnclientipsecparameterssample] | The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysInvokeAbortMigrationSample.ts][virtualnetworkgatewaysinvokeabortmigrationsample] | Trigger abort migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayAbortMigration.json | -| [virtualNetworkGatewaysInvokeCommitMigrationSample.ts][virtualnetworkgatewaysinvokecommitmigrationsample] | Trigger commit migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayCommitMigration.json | -| [virtualNetworkGatewaysInvokeExecuteMigrationSample.ts][virtualnetworkgatewaysinvokeexecutemigrationsample] | Trigger execute migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayExecuteMigration.json | -| [virtualNetworkGatewaysInvokePrepareMigrationSample.ts][virtualnetworkgatewaysinvokepreparemigrationsample] | Trigger prepare migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayPrepareMigration.json | -| [virtualNetworkGatewaysListConnectionsSample.ts][virtualnetworkgatewayslistconnectionssample] | Gets all the connections in a virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaysListConnections.json | -| [virtualNetworkGatewaysListRadiusSecretsSample.ts][virtualnetworkgatewayslistradiussecretssample] | List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AllVirtualNetworkGatewayRadiusServerSecretsList.json | -| [virtualNetworkGatewaysListSample.ts][virtualnetworkgatewayslistsample] | Gets all virtual network gateways by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayList.json | -| [virtualNetworkGatewaysResetSample.ts][virtualnetworkgatewaysresetsample] | Resets the primary of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayReset.json | -| [virtualNetworkGatewaysResetVpnClientSharedKeySample.ts][virtualnetworkgatewaysresetvpnclientsharedkeysample] | Resets the VPN client shared key of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json | -| [virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts][virtualnetworkgatewayssetvpnclientipsecparameterssample] | The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts][virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample] | This operation starts failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json | -| [virtualNetworkGatewaysStartPacketCaptureSample.ts][virtualnetworkgatewaysstartpacketcapturesample] | Starts packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json | -| [virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts][virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample] | This operation stops failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json | -| [virtualNetworkGatewaysStopPacketCaptureSample.ts][virtualnetworkgatewaysstoppacketcapturesample] | Stops packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStopPacketCapture.json | -| [virtualNetworkGatewaysSupportedVpnDevicesSample.ts][virtualnetworkgatewayssupportedvpndevicessample] | Gets a xml format representation for supported vpn devices. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json | -| [virtualNetworkGatewaysUpdateTagsSample.ts][virtualnetworkgatewaysupdatetagssample] | Updates a virtual network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayUpdateTags.json | -| [virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts][virtualnetworkgatewaysvpndeviceconfigurationscriptsample] | Gets a xml format representation for vpn device configuration script. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json | -| [virtualNetworkPeeringsCreateOrUpdateSample.ts][virtualnetworkpeeringscreateorupdatesample] | Creates or updates a peering in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkV6SubnetPeeringCreate.json | -| [virtualNetworkPeeringsDeleteSample.ts][virtualnetworkpeeringsdeletesample] | Deletes the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringDelete.json | -| [virtualNetworkPeeringsGetSample.ts][virtualnetworkpeeringsgetsample] | Gets the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkV6SubnetPeeringGet.json | -| [virtualNetworkPeeringsListSample.ts][virtualnetworkpeeringslistsample] | Gets all virtual network peerings in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringList.json | -| [virtualNetworkTapsCreateOrUpdateSample.ts][virtualnetworktapscreateorupdatesample] | Creates or updates a Virtual Network Tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapCreate.json | -| [virtualNetworkTapsDeleteSample.ts][virtualnetworktapsdeletesample] | Deletes the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapDelete.json | -| [virtualNetworkTapsGetSample.ts][virtualnetworktapsgetsample] | Gets information about the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapGet.json | -| [virtualNetworkTapsListAllSample.ts][virtualnetworktapslistallsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapListAll.json | -| [virtualNetworkTapsListByResourceGroupSample.ts][virtualnetworktapslistbyresourcegroupsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapList.json | -| [virtualNetworkTapsUpdateTagsSample.ts][virtualnetworktapsupdatetagssample] | Updates an VirtualNetworkTap tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapUpdateTags.json | -| [virtualNetworksCheckIPAddressAvailabilitySample.ts][virtualnetworkscheckipaddressavailabilitysample] | Checks whether a private IP address is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCheckIPAddressAvailability.json | -| [virtualNetworksCreateOrUpdateSample.ts][virtualnetworkscreateorupdatesample] | Creates or updates a virtual network in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreate.json | -| [virtualNetworksDeleteSample.ts][virtualnetworksdeletesample] | Deletes the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkDelete.json | -| [virtualNetworksGetSample.ts][virtualnetworksgetsample] | Gets the specified virtual network by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGet.json | -| [virtualNetworksListAllSample.ts][virtualnetworkslistallsample] | Gets all virtual networks in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkListAll.json | -| [virtualNetworksListDdosProtectionStatusSample.ts][virtualnetworkslistddosprotectionstatussample] | Gets the Ddos Protection Status of all IP Addresses under the Virtual Network x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetDdosProtectionStatus.json | -| [virtualNetworksListSample.ts][virtualnetworkslistsample] | Gets all virtual networks in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkList.json | -| [virtualNetworksListUsageSample.ts][virtualnetworkslistusagesample] | Lists usage stats. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkListUsage.json | -| [virtualNetworksUpdateTagsSample.ts][virtualnetworksupdatetagssample] | Updates a virtual network tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkUpdateTags.json | -| [virtualRouterPeeringsCreateOrUpdateSample.ts][virtualrouterpeeringscreateorupdatesample] | Creates or updates the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringPut.json | -| [virtualRouterPeeringsDeleteSample.ts][virtualrouterpeeringsdeletesample] | Deletes the specified peering from a Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringDelete.json | -| [virtualRouterPeeringsGetSample.ts][virtualrouterpeeringsgetsample] | Gets the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringGet.json | -| [virtualRouterPeeringsListSample.ts][virtualrouterpeeringslistsample] | Lists all Virtual Router Peerings in a Virtual Router resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringList.json | -| [virtualRoutersCreateOrUpdateSample.ts][virtualrouterscreateorupdatesample] | Creates or updates the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPut.json | -| [virtualRoutersDeleteSample.ts][virtualroutersdeletesample] | Deletes the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterDelete.json | -| [virtualRoutersGetSample.ts][virtualroutersgetsample] | Gets the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterGet.json | -| [virtualRoutersListByResourceGroupSample.ts][virtualrouterslistbyresourcegroupsample] | Lists all Virtual Routers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterListByResourceGroup.json | -| [virtualRoutersListSample.ts][virtualrouterslistsample] | Gets all the Virtual Routers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterListBySubscription.json | -| [virtualWansCreateOrUpdateSample.ts][virtualwanscreateorupdatesample] | Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANPut.json | -| [virtualWansDeleteSample.ts][virtualwansdeletesample] | Deletes a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANDelete.json | -| [virtualWansGetSample.ts][virtualwansgetsample] | Retrieves the details of a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANGet.json | -| [virtualWansListByResourceGroupSample.ts][virtualwanslistbyresourcegroupsample] | Lists all the VirtualWANs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANListByResourceGroup.json | -| [virtualWansListSample.ts][virtualwanslistsample] | Lists all the VirtualWANs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANList.json | -| [virtualWansUpdateTagsSample.ts][virtualwansupdatetagssample] | Updates a VirtualWAN tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANUpdateTags.json | -| [vpnConnectionsCreateOrUpdateSample.ts][vpnconnectionscreateorupdatesample] | Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionPut.json | -| [vpnConnectionsDeleteSample.ts][vpnconnectionsdeletesample] | Deletes a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionDelete.json | -| [vpnConnectionsGetSample.ts][vpnconnectionsgetsample] | Retrieves the details of a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionGet.json | -| [vpnConnectionsListByVpnGatewaySample.ts][vpnconnectionslistbyvpngatewaysample] | Retrieves all vpn connections for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionList.json | -| [vpnConnectionsStartPacketCaptureSample.ts][vpnconnectionsstartpacketcapturesample] | Starts packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionStartPacketCaptureFilterData.json | -| [vpnConnectionsStopPacketCaptureSample.ts][vpnconnectionsstoppacketcapturesample] | Stops packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionStopPacketCapture.json | -| [vpnGatewaysCreateOrUpdateSample.ts][vpngatewayscreateorupdatesample] | Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayPut.json | -| [vpnGatewaysDeleteSample.ts][vpngatewaysdeletesample] | Deletes a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayDelete.json | -| [vpnGatewaysGetSample.ts][vpngatewaysgetsample] | Retrieves the details of a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayGet.json | -| [vpnGatewaysListByResourceGroupSample.ts][vpngatewayslistbyresourcegroupsample] | Lists all the VpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayListByResourceGroup.json | -| [vpnGatewaysListSample.ts][vpngatewayslistsample] | Lists all the VpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayList.json | -| [vpnGatewaysResetSample.ts][vpngatewaysresetsample] | Resets the primary of the vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayReset.json | -| [vpnGatewaysStartPacketCaptureSample.ts][vpngatewaysstartpacketcapturesample] | Starts packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStartPacketCaptureFilterData.json | -| [vpnGatewaysStopPacketCaptureSample.ts][vpngatewaysstoppacketcapturesample] | Stops packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStopPacketCapture.json | -| [vpnGatewaysUpdateTagsSample.ts][vpngatewaysupdatetagssample] | Updates virtual wan vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayUpdateTags.json | -| [vpnLinkConnectionsGetAllSharedKeysSample.ts][vpnlinkconnectionsgetallsharedkeyssample] | Lists all shared keys of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionSharedKeysGet.json | -| [vpnLinkConnectionsGetDefaultSharedKeySample.ts][vpnlinkconnectionsgetdefaultsharedkeysample] | Gets the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json | -| [vpnLinkConnectionsGetIkeSasSample.ts][vpnlinkconnectionsgetikesassample] | Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionGetIkeSas.json | -| [vpnLinkConnectionsListByVpnConnectionSample.ts][vpnlinkconnectionslistbyvpnconnectionsample] | Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionList.json | -| [vpnLinkConnectionsListDefaultSharedKeySample.ts][vpnlinkconnectionslistdefaultsharedkeysample] | Gets the value of the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json | -| [vpnLinkConnectionsResetConnectionSample.ts][vpnlinkconnectionsresetconnectionsample] | Resets the VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionReset.json | -| [vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts][vpnlinkconnectionssetorinitdefaultsharedkeysample] | Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json | -| [vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts][vpnserverconfigurationsassociatedwithvirtualwanlistsample] | Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetVirtualWanVpnServerConfigurations.json | -| [vpnServerConfigurationsCreateOrUpdateSample.ts][vpnserverconfigurationscreateorupdatesample] | Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationPut.json | -| [vpnServerConfigurationsDeleteSample.ts][vpnserverconfigurationsdeletesample] | Deletes a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationDelete.json | -| [vpnServerConfigurationsGetSample.ts][vpnserverconfigurationsgetsample] | Retrieves the details of a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationGet.json | -| [vpnServerConfigurationsListByResourceGroupSample.ts][vpnserverconfigurationslistbyresourcegroupsample] | Lists all the vpnServerConfigurations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationListByResourceGroup.json | -| [vpnServerConfigurationsListRadiusSecretsSample.ts][vpnserverconfigurationslistradiussecretssample] | List all Radius servers with respective radius secrets from VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AllVpnServerConfigurationRadiusServerSecretsList.json | -| [vpnServerConfigurationsListSample.ts][vpnserverconfigurationslistsample] | Lists all the VpnServerConfigurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationList.json | -| [vpnServerConfigurationsUpdateTagsSample.ts][vpnserverconfigurationsupdatetagssample] | Updates VpnServerConfiguration tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationUpdateTags.json | -| [vpnSiteLinkConnectionsGetSample.ts][vpnsitelinkconnectionsgetsample] | Retrieves the details of a vpn site link connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionGet.json | -| [vpnSiteLinksGetSample.ts][vpnsitelinksgetsample] | Retrieves the details of a VPN site link. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkGet.json | -| [vpnSiteLinksListByVpnSiteSample.ts][vpnsitelinkslistbyvpnsitesample] | Lists all the vpnSiteLinks in a resource group for a vpn site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkListByVpnSite.json | -| [vpnSitesConfigurationDownloadSample.ts][vpnsitesconfigurationdownloadsample] | Gives the sas-url to download the configurations for vpn-sites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSitesConfigurationDownload.json | -| [vpnSitesCreateOrUpdateSample.ts][vpnsitescreateorupdatesample] | Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSitePut.json | -| [vpnSitesDeleteSample.ts][vpnsitesdeletesample] | Deletes a VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteDelete.json | -| [vpnSitesGetSample.ts][vpnsitesgetsample] | Retrieves the details of a VPN site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteGet.json | -| [vpnSitesListByResourceGroupSample.ts][vpnsiteslistbyresourcegroupsample] | Lists all the vpnSites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteListByResourceGroup.json | -| [vpnSitesListSample.ts][vpnsiteslistsample] | Lists all the VpnSites in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteList.json | -| [vpnSitesUpdateTagsSample.ts][vpnsitesupdatetagssample] | Updates VpnSite tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteUpdateTags.json | -| [webApplicationFirewallPoliciesCreateOrUpdateSample.ts][webapplicationfirewallpoliciescreateorupdatesample] | Creates or update policy with specified rule set name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyCreateOrUpdate.json | -| [webApplicationFirewallPoliciesDeleteSample.ts][webapplicationfirewallpoliciesdeletesample] | Deletes Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyDelete.json | -| [webApplicationFirewallPoliciesGetSample.ts][webapplicationfirewallpoliciesgetsample] | Retrieve protection policy with specified name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyGet.json | -| [webApplicationFirewallPoliciesListAllSample.ts][webapplicationfirewallpolicieslistallsample] | Gets all the WAF policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListAllPolicies.json | -| [webApplicationFirewallPoliciesListSample.ts][webapplicationfirewallpolicieslistsample] | Lists all of the protection policies within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListPolicies.json | -| [webCategoriesGetSample.ts][webcategoriesgetsample] | Gets the specified Azure Web Category. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureWebCategoryGet.json | -| [webCategoriesListBySubscriptionSample.ts][webcategorieslistbysubscriptionsample] | Gets all the Azure Web Categories in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureWebCategoriesListBySubscription.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/adminRuleCollectionsCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -cross-env NETWORK_SUBSCRIPTION_ID="" NETWORK_RESOURCE_GROUP="" node dist/adminRuleCollectionsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[adminrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts -[adminrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsDeleteSample.ts -[adminrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsGetSample.ts -[adminrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsListSample.ts -[adminrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/adminRulesCreateOrUpdateSample.ts -[adminrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/adminRulesDeleteSample.ts -[adminrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/adminRulesGetSample.ts -[adminruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/adminRulesListSample.ts -[applicationgatewayprivateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts -[applicationgatewayprivateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts -[applicationgatewayprivateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts -[applicationgatewayprivateendpointconnectionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts -[applicationgatewayprivatelinkresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts -[applicationgatewaywafdynamicmanifestsdefaultgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts -[applicationgatewaywafdynamicmanifestsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts -[applicationgatewaysbackendhealthondemandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts -[applicationgatewaysbackendhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysBackendHealthSample.ts -[applicationgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysCreateOrUpdateSample.ts -[applicationgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysDeleteSample.ts -[applicationgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysGetSample.ts -[applicationgatewaysgetsslpredefinedpolicysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts -[applicationgatewayslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAllSample.ts -[applicationgatewayslistavailablerequestheaderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts -[applicationgatewayslistavailableresponseheaderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts -[applicationgatewayslistavailableservervariablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts -[applicationgatewayslistavailablessloptionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts -[applicationgatewayslistavailablesslpredefinedpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts -[applicationgatewayslistavailablewafrulesetssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts -[applicationgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListSample.ts -[applicationgatewaysstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysStartSample.ts -[applicationgatewaysstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysStopSample.ts -[applicationgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysUpdateTagsSample.ts -[applicationsecuritygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts -[applicationsecuritygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsDeleteSample.ts -[applicationsecuritygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsGetSample.ts -[applicationsecuritygroupslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsListAllSample.ts -[applicationsecuritygroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsListSample.ts -[applicationsecuritygroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts -[availabledelegationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/availableDelegationsListSample.ts -[availableendpointserviceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/availableEndpointServicesListSample.ts -[availableprivateendpointtypeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts -[availableprivateendpointtypeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/availablePrivateEndpointTypesListSample.ts -[availableresourcegroupdelegationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/availableResourceGroupDelegationsListSample.ts -[availableservicealiaseslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/availableServiceAliasesListByResourceGroupSample.ts -[availableservicealiaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/availableServiceAliasesListSample.ts -[azurefirewallfqdntagslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallFqdnTagsListAllSample.ts -[azurefirewallscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsCreateOrUpdateSample.ts -[azurefirewallsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsDeleteSample.ts -[azurefirewallsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsGetSample.ts -[azurefirewallslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListAllSample.ts -[azurefirewallslistlearnedprefixessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListLearnedPrefixesSample.ts -[azurefirewallslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListSample.ts -[azurefirewallspacketcaptureoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsPacketCaptureOperationSample.ts -[azurefirewallspacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsPacketCaptureSample.ts -[azurefirewallsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsUpdateTagsSample.ts -[bastionhostscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsCreateOrUpdateSample.ts -[bastionhostsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsDeleteSample.ts -[bastionhostsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsGetSample.ts -[bastionhostslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsListByResourceGroupSample.ts -[bastionhostslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsListSample.ts -[bastionhostsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsUpdateTagsSample.ts -[bgpservicecommunitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/bgpServiceCommunitiesListSample.ts -[checkdnsnameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/checkDnsNameAvailabilitySample.ts -[configurationpolicygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts -[configurationpolicygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsDeleteSample.ts -[configurationpolicygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsGetSample.ts -[configurationpolicygroupslistbyvpnserverconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts -[connectionmonitorscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsCreateOrUpdateSample.ts -[connectionmonitorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsDeleteSample.ts -[connectionmonitorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsGetSample.ts -[connectionmonitorslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsListSample.ts -[connectionmonitorsstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsStopSample.ts -[connectionmonitorsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsUpdateTagsSample.ts -[connectivityconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts -[connectivityconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsDeleteSample.ts -[connectivityconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsGetSample.ts -[connectivityconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsListSample.ts -[customipprefixescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesCreateOrUpdateSample.ts -[customipprefixesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesDeleteSample.ts -[customipprefixesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesGetSample.ts -[customipprefixeslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesListAllSample.ts -[customipprefixeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesListSample.ts -[customipprefixesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesUpdateTagsSample.ts -[ddoscustompoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts -[ddoscustompoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesDeleteSample.ts -[ddoscustompoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesGetSample.ts -[ddoscustompoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts -[ddosprotectionplanscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts -[ddosprotectionplansdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansDeleteSample.ts -[ddosprotectionplansgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansGetSample.ts -[ddosprotectionplanslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts -[ddosprotectionplanslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansListSample.ts -[ddosprotectionplansupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansUpdateTagsSample.ts -[defaultsecurityrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/defaultSecurityRulesGetSample.ts -[defaultsecurityruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/defaultSecurityRulesListSample.ts -[deletebastionshareablelinkbytokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/deleteBastionShareableLinkByTokenSample.ts -[deletebastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/deleteBastionShareableLinkSample.ts -[disconnectactivesessionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/disconnectActiveSessionsSample.ts -[dscpconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationCreateOrUpdateSample.ts -[dscpconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationDeleteSample.ts -[dscpconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationGetSample.ts -[dscpconfigurationlistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationListAllSample.ts -[dscpconfigurationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationListSample.ts -[expressroutecircuitauthorizationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts -[expressroutecircuitauthorizationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts -[expressroutecircuitauthorizationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts -[expressroutecircuitauthorizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsListSample.ts -[expressroutecircuitconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts -[expressroutecircuitconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts -[expressroutecircuitconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsGetSample.ts -[expressroutecircuitconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsListSample.ts -[expressroutecircuitpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts -[expressroutecircuitpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts -[expressroutecircuitpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsGetSample.ts -[expressroutecircuitpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsListSample.ts -[expressroutecircuitscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts -[expressroutecircuitsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsDeleteSample.ts -[expressroutecircuitsgetpeeringstatssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts -[expressroutecircuitsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetSample.ts -[expressroutecircuitsgetstatssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetStatsSample.ts -[expressroutecircuitslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListAllSample.ts -[expressroutecircuitslistarptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListArpTableSample.ts -[expressroutecircuitslistroutestablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListRoutesTableSample.ts -[expressroutecircuitslistroutestablesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts -[expressroutecircuitslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListSample.ts -[expressroutecircuitsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsUpdateTagsSample.ts -[expressrouteconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts -[expressrouteconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsDeleteSample.ts -[expressrouteconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsGetSample.ts -[expressrouteconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsListSample.ts -[expressroutecrossconnectionpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts -[expressroutecrossconnectionpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts -[expressroutecrossconnectionpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts -[expressroutecrossconnectionpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts -[expressroutecrossconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts -[expressroutecrossconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsGetSample.ts -[expressroutecrossconnectionslistarptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts -[expressroutecrossconnectionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts -[expressroutecrossconnectionslistroutestablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts -[expressroutecrossconnectionslistroutestablesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts -[expressroutecrossconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListSample.ts -[expressroutecrossconnectionsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts -[expressroutegatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts -[expressroutegatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysDeleteSample.ts -[expressroutegatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysGetSample.ts -[expressroutegatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts -[expressroutegatewayslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts -[expressroutegatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysUpdateTagsSample.ts -[expressroutelinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteLinksGetSample.ts -[expressroutelinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteLinksListSample.ts -[expressrouteportauthorizationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts -[expressrouteportauthorizationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts -[expressrouteportauthorizationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsGetSample.ts -[expressrouteportauthorizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsListSample.ts -[expressrouteportscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsCreateOrUpdateSample.ts -[expressrouteportsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsDeleteSample.ts -[expressrouteportsgenerateloasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsGenerateLoaSample.ts -[expressrouteportsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsGetSample.ts -[expressrouteportslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsListByResourceGroupSample.ts -[expressrouteportslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsListSample.ts -[expressrouteportslocationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsLocationsGetSample.ts -[expressrouteportslocationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsLocationsListSample.ts -[expressrouteportsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsUpdateTagsSample.ts -[expressrouteproviderportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteProviderPortSample.ts -[expressrouteproviderportslocationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteProviderPortsLocationListSample.ts -[expressrouteserviceproviderslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/expressRouteServiceProvidersListSample.ts -[firewallpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesCreateOrUpdateSample.ts -[firewallpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesDeleteSample.ts -[firewallpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesGetSample.ts -[firewallpolicieslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesListAllSample.ts -[firewallpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesListSample.ts -[firewallpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesUpdateTagsSample.ts -[firewallpolicydeploymentsdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDeploymentsDeploySample.ts -[firewallpolicydraftscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts -[firewallpolicydraftsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsDeleteSample.ts -[firewallpolicydraftsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsGetSample.ts -[firewallpolicyidpssignaturesfiltervalueslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts -[firewallpolicyidpssignatureslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesListSample.ts -[firewallpolicyidpssignaturesoverridesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts -[firewallpolicyidpssignaturesoverrideslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts -[firewallpolicyidpssignaturesoverridespatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts -[firewallpolicyidpssignaturesoverridesputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts -[firewallpolicyrulecollectiongroupdraftscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts -[firewallpolicyrulecollectiongroupdraftsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts -[firewallpolicyrulecollectiongroupdraftsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts -[firewallpolicyrulecollectiongroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts -[firewallpolicyrulecollectiongroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts -[firewallpolicyrulecollectiongroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts -[firewallpolicyrulecollectiongroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts -[flowlogscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/flowLogsCreateOrUpdateSample.ts -[flowlogsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/flowLogsDeleteSample.ts -[flowlogsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/flowLogsGetSample.ts -[flowlogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/flowLogsListSample.ts -[flowlogsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/flowLogsUpdateTagsSample.ts -[generatevirtualwanvpnserverconfigurationvpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts -[getactivesessionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/getActiveSessionsSample.ts -[getbastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/getBastionShareableLinkSample.ts -[hubroutetablescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesCreateOrUpdateSample.ts -[hubroutetablesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesDeleteSample.ts -[hubroutetablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesGetSample.ts -[hubroutetableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesListSample.ts -[hubvirtualnetworkconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts -[hubvirtualnetworkconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts -[hubvirtualnetworkconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsGetSample.ts -[hubvirtualnetworkconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsListSample.ts -[inboundnatrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesCreateOrUpdateSample.ts -[inboundnatrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesDeleteSample.ts -[inboundnatrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesGetSample.ts -[inboundnatruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesListSample.ts -[inboundsecurityrulecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts -[inboundsecurityrulegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/inboundSecurityRuleGetSample.ts -[ipallocationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsCreateOrUpdateSample.ts -[ipallocationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsDeleteSample.ts -[ipallocationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsGetSample.ts -[ipallocationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsListByResourceGroupSample.ts -[ipallocationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsListSample.ts -[ipallocationsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsUpdateTagsSample.ts -[ipgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsCreateOrUpdateSample.ts -[ipgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsDeleteSample.ts -[ipgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsGetSample.ts -[ipgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsListByResourceGroupSample.ts -[ipgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsListSample.ts -[ipgroupsupdategroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsUpdateGroupsSample.ts -[ipampoolscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsCreateSample.ts -[ipampoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsDeleteSample.ts -[ipampoolsgetpoolusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsGetPoolUsageSample.ts -[ipampoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsGetSample.ts -[ipampoolslistassociatedresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsListAssociatedResourcesSample.ts -[ipampoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsListSample.ts -[ipampoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsUpdateSample.ts -[listactiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/listActiveConnectivityConfigurationsSample.ts -[listactivesecurityadminrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/listActiveSecurityAdminRulesSample.ts -[listnetworkmanagereffectiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts -[listnetworkmanagereffectivesecurityadminrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts -[loadbalancerbackendaddresspoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts -[loadbalancerbackendaddresspoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts -[loadbalancerbackendaddresspoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts -[loadbalancerbackendaddresspoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsListSample.ts -[loadbalancerfrontendipconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts -[loadbalancerfrontendipconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts -[loadbalancerloadbalancingrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts -[loadbalancerloadbalancingruleshealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts -[loadbalancerloadbalancingruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesListSample.ts -[loadbalancernetworkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerNetworkInterfacesListSample.ts -[loadbalanceroutboundrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerOutboundRulesGetSample.ts -[loadbalanceroutboundruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerOutboundRulesListSample.ts -[loadbalancerprobesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerProbesGetSample.ts -[loadbalancerprobeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerProbesListSample.ts -[loadbalancerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersCreateOrUpdateSample.ts -[loadbalancersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersDeleteSample.ts -[loadbalancersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersGetSample.ts -[loadbalancerslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListAllSample.ts -[loadbalancerslistinboundnatruleportmappingssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts -[loadbalancerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListSample.ts -[loadbalancersmigratetoipbasedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersMigrateToIPBasedSample.ts -[loadbalancersswappublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts -[loadbalancersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersUpdateTagsSample.ts -[localnetworkgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts -[localnetworkgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysDeleteSample.ts -[localnetworkgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysGetSample.ts -[localnetworkgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysListSample.ts -[localnetworkgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysUpdateTagsSample.ts -[managementgroupnetworkmanagerconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts -[managementgroupnetworkmanagerconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts -[managementgroupnetworkmanagerconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts -[managementgroupnetworkmanagerconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts -[natgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysCreateOrUpdateSample.ts -[natgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysDeleteSample.ts -[natgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysGetSample.ts -[natgatewayslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysListAllSample.ts -[natgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysListSample.ts -[natgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysUpdateTagsSample.ts -[natrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/natRulesCreateOrUpdateSample.ts -[natrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/natRulesDeleteSample.ts -[natrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/natRulesGetSample.ts -[natruleslistbyvpngatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/natRulesListByVpnGatewaySample.ts -[networkgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsCreateOrUpdateSample.ts -[networkgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsDeleteSample.ts -[networkgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsGetSample.ts -[networkgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsListSample.ts -[networkinterfaceipconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceIPConfigurationsGetSample.ts -[networkinterfaceipconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceIPConfigurationsListSample.ts -[networkinterfaceloadbalancerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceLoadBalancersListSample.ts -[networkinterfacetapconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts -[networkinterfacetapconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts -[networkinterfacetapconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsGetSample.ts -[networkinterfacetapconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsListSample.ts -[networkinterfacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesCreateOrUpdateSample.ts -[networkinterfacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesDeleteSample.ts -[networkinterfacesgetcloudservicenetworkinterfacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts -[networkinterfacesgeteffectiveroutetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts -[networkinterfacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetSample.ts -[networkinterfacesgetvirtualmachinescalesetipconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts -[networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts -[networkinterfaceslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListAllSample.ts -[networkinterfaceslistcloudservicenetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts -[networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts -[networkinterfaceslisteffectivenetworksecuritygroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts -[networkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListSample.ts -[networkinterfaceslistvirtualmachinescalesetipconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts -[networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts -[networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts -[networkinterfacesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesUpdateTagsSample.ts -[networkmanagercommitspostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagerCommitsPostSample.ts -[networkmanagerdeploymentstatuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagerDeploymentStatusListSample.ts -[networkmanagerroutingconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts -[networkmanagerroutingconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts -[networkmanagerroutingconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsGetSample.ts -[networkmanagerroutingconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsListSample.ts -[networkmanagerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagersCreateOrUpdateSample.ts -[networkmanagersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagersDeleteSample.ts -[networkmanagersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagersGetSample.ts -[networkmanagerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagersListBySubscriptionSample.ts -[networkmanagerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagersListSample.ts -[networkmanagerspatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkManagersPatchSample.ts -[networkprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesCreateOrUpdateSample.ts -[networkprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesDeleteSample.ts -[networkprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesGetSample.ts -[networkprofileslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesListAllSample.ts -[networkprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesListSample.ts -[networkprofilesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesUpdateTagsSample.ts -[networksecuritygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts -[networksecuritygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsDeleteSample.ts -[networksecuritygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsGetSample.ts -[networksecuritygroupslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsListAllSample.ts -[networksecuritygroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsListSample.ts -[networksecuritygroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsUpdateTagsSample.ts -[networksecurityperimeteraccessrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts -[networksecurityperimeteraccessrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesDeleteSample.ts -[networksecurityperimeteraccessrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesGetSample.ts -[networksecurityperimeteraccessruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesListSample.ts -[networksecurityperimeteraccessrulesreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesReconcileSample.ts -[networksecurityperimeterassociableresourcetypeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociableResourceTypesListSample.ts -[networksecurityperimeterassociationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts -[networksecurityperimeterassociationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsDeleteSample.ts -[networksecurityperimeterassociationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsGetSample.ts -[networksecurityperimeterassociationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsListSample.ts -[networksecurityperimeterassociationsreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsReconcileSample.ts -[networksecurityperimeterlinkreferencesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesDeleteSample.ts -[networksecurityperimeterlinkreferencesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesGetSample.ts -[networksecurityperimeterlinkreferenceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesListSample.ts -[networksecurityperimeterlinkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksCreateOrUpdateSample.ts -[networksecurityperimeterlinksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksDeleteSample.ts -[networksecurityperimeterlinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksGetSample.ts -[networksecurityperimeterlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksListSample.ts -[networksecurityperimeterloggingconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts -[networksecurityperimeterloggingconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts -[networksecurityperimeterloggingconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsGetSample.ts -[networksecurityperimeterloggingconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsListSample.ts -[networksecurityperimeteroperationstatusesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterOperationStatusesGetSample.ts -[networksecurityperimeterprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts -[networksecurityperimeterprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesDeleteSample.ts -[networksecurityperimeterprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesGetSample.ts -[networksecurityperimeterprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesListSample.ts -[networksecurityperimeterservicetagslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterServiceTagsListSample.ts -[networksecurityperimeterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersCreateOrUpdateSample.ts -[networksecurityperimetersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersDeleteSample.ts -[networksecurityperimetersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersGetSample.ts -[networksecurityperimeterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersListBySubscriptionSample.ts -[networksecurityperimeterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersListSample.ts -[networksecurityperimeterspatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersPatchSample.ts -[networkvirtualapplianceconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts -[networkvirtualapplianceconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts -[networkvirtualapplianceconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsGetSample.ts -[networkvirtualapplianceconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsListSample.ts -[networkvirtualappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts -[networkvirtualappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesDeleteSample.ts -[networkvirtualappliancesgetbootdiagnosticlogssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts -[networkvirtualappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesGetSample.ts -[networkvirtualapplianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts -[networkvirtualapplianceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesListSample.ts -[networkvirtualappliancesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesReimageSample.ts -[networkvirtualappliancesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesRestartSample.ts -[networkvirtualappliancesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts -[networkwatcherscheckconnectivitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersCheckConnectivitySample.ts -[networkwatcherscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersCreateOrUpdateSample.ts -[networkwatchersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersDeleteSample.ts -[networkwatchersgetazurereachabilityreportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts -[networkwatchersgetflowlogstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetFlowLogStatusSample.ts -[networkwatchersgetnetworkconfigurationdiagnosticsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts -[networkwatchersgetnexthopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetNextHopSample.ts -[networkwatchersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetSample.ts -[networkwatchersgettopologysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTopologySample.ts -[networkwatchersgettroubleshootingresultsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTroubleshootingResultSample.ts -[networkwatchersgettroubleshootingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTroubleshootingSample.ts -[networkwatchersgetvmsecurityrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetVMSecurityRulesSample.ts -[networkwatcherslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListAllSample.ts -[networkwatcherslistavailableproviderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListAvailableProvidersSample.ts -[networkwatcherslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListSample.ts -[networkwatcherssetflowlogconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts -[networkwatchersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersUpdateTagsSample.ts -[networkwatchersverifyipflowsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersVerifyIPFlowSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/operationsListSample.ts -[p2svpngatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts -[p2svpngatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysDeleteSample.ts -[p2svpngatewaysdisconnectp2svpnconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts -[p2svpngatewaysgeneratevpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts -[p2svpngatewaysgetp2svpnconnectionhealthdetailedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts -[p2svpngatewaysgetp2svpnconnectionhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts -[p2svpngatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetSample.ts -[p2svpngatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts -[p2svpngatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysListSample.ts -[p2svpngatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysResetSample.ts -[p2svpngatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts -[packetcapturescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesCreateSample.ts -[packetcapturesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesDeleteSample.ts -[packetcapturesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesGetSample.ts -[packetcapturesgetstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesGetStatusSample.ts -[packetcaptureslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesListSample.ts -[packetcapturesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesStopSample.ts -[peerexpressroutecircuitconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts -[peerexpressroutecircuitconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts -[privatednszonegroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts -[privatednszonegroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsDeleteSample.ts -[privatednszonegroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsGetSample.ts -[privatednszonegroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsListSample.ts -[privateendpointscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsCreateOrUpdateSample.ts -[privateendpointsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsDeleteSample.ts -[privateendpointsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsGetSample.ts -[privateendpointslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsListBySubscriptionSample.ts -[privateendpointslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsListSample.ts -[privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts -[privatelinkservicescheckprivatelinkservicevisibilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts -[privatelinkservicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCreateOrUpdateSample.ts -[privatelinkservicesdeleteprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts -[privatelinkservicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesDeleteSample.ts -[privatelinkservicesgetprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts -[privatelinkservicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesGetSample.ts -[privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts -[privatelinkserviceslistautoapprovedprivatelinkservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts -[privatelinkserviceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListBySubscriptionSample.ts -[privatelinkserviceslistprivateendpointconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts -[privatelinkserviceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListSample.ts -[privatelinkservicesupdateprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts -[publicipaddressescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesCreateOrUpdateSample.ts -[publicipaddressesddosprotectionstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts -[publicipaddressesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDeleteSample.ts -[publicipaddressesdisassociatecloudservicereservedpublicipsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts -[publicipaddressesgetcloudservicepublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts -[publicipaddressesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetSample.ts -[publicipaddressesgetvirtualmachinescalesetpublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts -[publicipaddresseslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListAllSample.ts -[publicipaddresseslistcloudservicepublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts -[publicipaddresseslistcloudserviceroleinstancepublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts -[publicipaddresseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListSample.ts -[publicipaddresseslistvirtualmachinescalesetpublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts -[publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts -[publicipaddressesreservecloudservicepublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts -[publicipaddressesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesUpdateTagsSample.ts -[publicipprefixescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts -[publicipprefixesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesDeleteSample.ts -[publicipprefixesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesGetSample.ts -[publicipprefixeslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesListAllSample.ts -[publicipprefixeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesListSample.ts -[publicipprefixesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesUpdateTagsSample.ts -[putbastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/putBastionShareableLinkSample.ts -[reachabilityanalysisintentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsCreateSample.ts -[reachabilityanalysisintentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts -[reachabilityanalysisintentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsGetSample.ts -[reachabilityanalysisintentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsListSample.ts -[reachabilityanalysisrunscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsCreateSample.ts -[reachabilityanalysisrunsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsDeleteSample.ts -[reachabilityanalysisrunsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsGetSample.ts -[reachabilityanalysisrunslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsListSample.ts -[resourcenavigationlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/resourceNavigationLinksListSample.ts -[routefilterrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesCreateOrUpdateSample.ts -[routefilterrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesDeleteSample.ts -[routefilterrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesGetSample.ts -[routefilterruleslistbyroutefiltersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesListByRouteFilterSample.ts -[routefilterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersCreateOrUpdateSample.ts -[routefiltersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersDeleteSample.ts -[routefiltersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersGetSample.ts -[routefilterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersListByResourceGroupSample.ts -[routefilterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersListSample.ts -[routefiltersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersUpdateTagsSample.ts -[routemapscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeMapsCreateOrUpdateSample.ts -[routemapsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeMapsDeleteSample.ts -[routemapsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeMapsGetSample.ts -[routemapslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeMapsListSample.ts -[routetablescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeTablesCreateOrUpdateSample.ts -[routetablesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeTablesDeleteSample.ts -[routetablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeTablesGetSample.ts -[routetableslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeTablesListAllSample.ts -[routetableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeTablesListSample.ts -[routetablesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routeTablesUpdateTagsSample.ts -[routescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routesCreateOrUpdateSample.ts -[routesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routesDeleteSample.ts -[routesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routesGetSample.ts -[routeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routesListSample.ts -[routingintentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingIntentCreateOrUpdateSample.ts -[routingintentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingIntentDeleteSample.ts -[routingintentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingIntentGetSample.ts -[routingintentlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingIntentListSample.ts -[routingrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts -[routingrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsDeleteSample.ts -[routingrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsGetSample.ts -[routingrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsListSample.ts -[routingrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingRulesCreateOrUpdateSample.ts -[routingrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingRulesDeleteSample.ts -[routingrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingRulesGetSample.ts -[routingruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/routingRulesListSample.ts -[scopeconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsCreateOrUpdateSample.ts -[scopeconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsDeleteSample.ts -[scopeconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsGetSample.ts -[scopeconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsListSample.ts -[securityadminconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts -[securityadminconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsDeleteSample.ts -[securityadminconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsGetSample.ts -[securityadminconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsListSample.ts -[securitypartnerproviderscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts -[securitypartnerprovidersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersDeleteSample.ts -[securitypartnerprovidersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersGetSample.ts -[securitypartnerproviderslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts -[securitypartnerproviderslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersListSample.ts -[securitypartnerprovidersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersUpdateTagsSample.ts -[securityrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityRulesCreateOrUpdateSample.ts -[securityrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityRulesDeleteSample.ts -[securityrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityRulesGetSample.ts -[securityruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityRulesListSample.ts -[securityuserconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts -[securityuserconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsDeleteSample.ts -[securityuserconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsGetSample.ts -[securityuserconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsListSample.ts -[securityuserrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts -[securityuserrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsDeleteSample.ts -[securityuserrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsGetSample.ts -[securityuserrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsListSample.ts -[securityuserrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesCreateOrUpdateSample.ts -[securityuserrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesDeleteSample.ts -[securityuserrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesGetSample.ts -[securityuserruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesListSample.ts -[serviceassociationlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceAssociationLinksListSample.ts -[serviceendpointpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts -[serviceendpointpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesDeleteSample.ts -[serviceendpointpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesGetSample.ts -[serviceendpointpolicieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts -[serviceendpointpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesListSample.ts -[serviceendpointpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts -[serviceendpointpolicydefinitionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts -[serviceendpointpolicydefinitionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts -[serviceendpointpolicydefinitionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts -[serviceendpointpolicydefinitionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts -[servicetaginformationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceTagInformationListSample.ts -[servicetagslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/serviceTagsListSample.ts -[staticcidrscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsCreateSample.ts -[staticcidrsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsDeleteSample.ts -[staticcidrsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsGetSample.ts -[staticcidrslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsListSample.ts -[staticmemberscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/staticMembersCreateOrUpdateSample.ts -[staticmembersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/staticMembersDeleteSample.ts -[staticmembersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/staticMembersGetSample.ts -[staticmemberslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/staticMembersListSample.ts -[subnetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/subnetsCreateOrUpdateSample.ts -[subnetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/subnetsDeleteSample.ts -[subnetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/subnetsGetSample.ts -[subnetslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/subnetsListSample.ts -[subnetspreparenetworkpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/subnetsPrepareNetworkPoliciesSample.ts -[subnetsunpreparenetworkpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts -[subscriptionnetworkmanagerconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts -[subscriptionnetworkmanagerconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts -[subscriptionnetworkmanagerconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts -[subscriptionnetworkmanagerconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts -[supportedsecurityproviderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/supportedSecurityProvidersSample.ts -[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/usagesListSample.ts -[verifierworkspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesCreateSample.ts -[verifierworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesDeleteSample.ts -[verifierworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesGetSample.ts -[verifierworkspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesListSample.ts -[verifierworkspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesUpdateSample.ts -[vipswapcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vipSwapCreateSample.ts -[vipswapgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vipSwapGetSample.ts -[vipswaplistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vipSwapListSample.ts -[virtualappliancesitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts -[virtualappliancesitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesDeleteSample.ts -[virtualappliancesitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesGetSample.ts -[virtualappliancesiteslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesListSample.ts -[virtualapplianceskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSkusGetSample.ts -[virtualapplianceskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSkusListSample.ts -[virtualhubbgpconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts -[virtualhubbgpconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionDeleteSample.ts -[virtualhubbgpconnectiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionGetSample.ts -[virtualhubbgpconnectionslistadvertisedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts -[virtualhubbgpconnectionslistlearnedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts -[virtualhubbgpconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListSample.ts -[virtualhubipconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts -[virtualhubipconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationDeleteSample.ts -[virtualhubipconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationGetSample.ts -[virtualhubipconfigurationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationListSample.ts -[virtualhubroutetablev2screateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts -[virtualhubroutetablev2sdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SDeleteSample.ts -[virtualhubroutetablev2sgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SGetSample.ts -[virtualhubroutetablev2slistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SListSample.ts -[virtualhubscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsCreateOrUpdateSample.ts -[virtualhubsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsDeleteSample.ts -[virtualhubsgeteffectivevirtualhubroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts -[virtualhubsgetinboundroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetInboundRoutesSample.ts -[virtualhubsgetoutboundroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetOutboundRoutesSample.ts -[virtualhubsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetSample.ts -[virtualhubslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsListByResourceGroupSample.ts -[virtualhubslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsListSample.ts -[virtualhubsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsUpdateTagsSample.ts -[virtualnetworkgatewayconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts -[virtualnetworkgatewayconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts -[virtualnetworkgatewayconnectionsgetikesassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts -[virtualnetworkgatewayconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts -[virtualnetworkgatewayconnectionsgetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts -[virtualnetworkgatewayconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsListSample.ts -[virtualnetworkgatewayconnectionsresetconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts -[virtualnetworkgatewayconnectionsresetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts -[virtualnetworkgatewayconnectionssetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts -[virtualnetworkgatewayconnectionsstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts -[virtualnetworkgatewayconnectionsstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts -[virtualnetworkgatewayconnectionsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts -[virtualnetworkgatewaynatrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts -[virtualnetworkgatewaynatrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts -[virtualnetworkgatewaynatrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts -[virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts -[virtualnetworkgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts -[virtualnetworkgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysDeleteSample.ts -[virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts -[virtualnetworkgatewaysgeneratevpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts -[virtualnetworkgatewaysgeneratevpnclientpackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts -[virtualnetworkgatewaysgetadvertisedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts -[virtualnetworkgatewaysgetbgppeerstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts -[virtualnetworkgatewaysgetfailoveralltestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts -[virtualnetworkgatewaysgetfailoversingletestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts -[virtualnetworkgatewaysgetlearnedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts -[virtualnetworkgatewaysgetresiliencyinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetResiliencyInformationSample.ts -[virtualnetworkgatewaysgetroutesinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetRoutesInformationSample.ts -[virtualnetworkgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetSample.ts -[virtualnetworkgatewaysgetvpnprofilepackageurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts -[virtualnetworkgatewaysgetvpnclientconnectionhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts -[virtualnetworkgatewaysgetvpnclientipsecparameterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts -[virtualnetworkgatewaysinvokeabortmigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeAbortMigrationSample.ts -[virtualnetworkgatewaysinvokecommitmigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeCommitMigrationSample.ts -[virtualnetworkgatewaysinvokeexecutemigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts -[virtualnetworkgatewaysinvokepreparemigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokePrepareMigrationSample.ts -[virtualnetworkgatewayslistconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts -[virtualnetworkgatewayslistradiussecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListRadiusSecretsSample.ts -[virtualnetworkgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListSample.ts -[virtualnetworkgatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysResetSample.ts -[virtualnetworkgatewaysresetvpnclientsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts -[virtualnetworkgatewayssetvpnclientipsecparameterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts -[virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts -[virtualnetworkgatewaysstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts -[virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts -[virtualnetworkgatewaysstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts -[virtualnetworkgatewayssupportedvpndevicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts -[virtualnetworkgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts -[virtualnetworkgatewaysvpndeviceconfigurationscriptsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts -[virtualnetworkpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts -[virtualnetworkpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsDeleteSample.ts -[virtualnetworkpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsGetSample.ts -[virtualnetworkpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsListSample.ts -[virtualnetworktapscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts -[virtualnetworktapsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsDeleteSample.ts -[virtualnetworktapsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsGetSample.ts -[virtualnetworktapslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsListAllSample.ts -[virtualnetworktapslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts -[virtualnetworktapsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsUpdateTagsSample.ts -[virtualnetworkscheckipaddressavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts -[virtualnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksCreateOrUpdateSample.ts -[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksDeleteSample.ts -[virtualnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksGetSample.ts -[virtualnetworkslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListAllSample.ts -[virtualnetworkslistddosprotectionstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts -[virtualnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListSample.ts -[virtualnetworkslistusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListUsageSample.ts -[virtualnetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksUpdateTagsSample.ts -[virtualrouterpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts -[virtualrouterpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsDeleteSample.ts -[virtualrouterpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsGetSample.ts -[virtualrouterpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsListSample.ts -[virtualrouterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersCreateOrUpdateSample.ts -[virtualroutersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersDeleteSample.ts -[virtualroutersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersGetSample.ts -[virtualrouterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersListByResourceGroupSample.ts -[virtualrouterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersListSample.ts -[virtualwanscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualWansCreateOrUpdateSample.ts -[virtualwansdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualWansDeleteSample.ts -[virtualwansgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualWansGetSample.ts -[virtualwanslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualWansListByResourceGroupSample.ts -[virtualwanslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualWansListSample.ts -[virtualwansupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/virtualWansUpdateTagsSample.ts -[vpnconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsCreateOrUpdateSample.ts -[vpnconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsDeleteSample.ts -[vpnconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsGetSample.ts -[vpnconnectionslistbyvpngatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsListByVpnGatewaySample.ts -[vpnconnectionsstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsStartPacketCaptureSample.ts -[vpnconnectionsstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsStopPacketCaptureSample.ts -[vpngatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysCreateOrUpdateSample.ts -[vpngatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysDeleteSample.ts -[vpngatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysGetSample.ts -[vpngatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysListByResourceGroupSample.ts -[vpngatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysListSample.ts -[vpngatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysResetSample.ts -[vpngatewaysstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysStartPacketCaptureSample.ts -[vpngatewaysstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysStopPacketCaptureSample.ts -[vpngatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysUpdateTagsSample.ts -[vpnlinkconnectionsgetallsharedkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts -[vpnlinkconnectionsgetdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts -[vpnlinkconnectionsgetikesassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts -[vpnlinkconnectionslistbyvpnconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts -[vpnlinkconnectionslistdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts -[vpnlinkconnectionsresetconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsResetConnectionSample.ts -[vpnlinkconnectionssetorinitdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts -[vpnserverconfigurationsassociatedwithvirtualwanlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts -[vpnserverconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts -[vpnserverconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsDeleteSample.ts -[vpnserverconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsGetSample.ts -[vpnserverconfigurationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts -[vpnserverconfigurationslistradiussecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListRadiusSecretsSample.ts -[vpnserverconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListSample.ts -[vpnserverconfigurationsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts -[vpnsitelinkconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinkConnectionsGetSample.ts -[vpnsitelinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinksGetSample.ts -[vpnsitelinkslistbyvpnsitesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinksListByVpnSiteSample.ts -[vpnsitesconfigurationdownloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesConfigurationDownloadSample.ts -[vpnsitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesCreateOrUpdateSample.ts -[vpnsitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesDeleteSample.ts -[vpnsitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesGetSample.ts -[vpnsiteslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesListByResourceGroupSample.ts -[vpnsiteslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesListSample.ts -[vpnsitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesUpdateTagsSample.ts -[webapplicationfirewallpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts -[webapplicationfirewallpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts -[webapplicationfirewallpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesGetSample.ts -[webapplicationfirewallpolicieslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesListAllSample.ts -[webapplicationfirewallpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesListSample.ts -[webcategoriesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/webCategoriesGetSample.ts -[webcategorieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v35/typescript/src/webCategoriesListBySubscriptionSample.ts -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-network?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/network/arm-network/samples/v35/typescript/package.json b/sdk/network/arm-network/samples/v35/typescript/package.json deleted file mode 100644 index fbfd7f977576..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "@azure-samples/arm-network-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=20.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/network/arm-network" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic", - "cloud" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network", - "dependencies": { - "@azure/arm-network": "latest", - "dotenv": "latest", - "@azure/identity": "^4.11.1" - }, - "devDependencies": { - "@types/node": "^20.0.0", - "cross-env": "latest", - "rimraf": "latest", - "typescript": "~5.9.3" - } -} diff --git a/sdk/network/arm-network/samples/v35/typescript/sample.env b/sdk/network/arm-network/samples/v35/typescript/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts deleted file mode 100644 index 09568bc7bed9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - AdminRuleCollection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an admin rule collection. - * - * @summary Creates or updates an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionPut.json - */ -async function createOrUpdateAnAdminRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleCollection: AdminRuleCollection = { - description: "A sample policy", - appliesToGroups: [ - { - networkGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateAnAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsDeleteSample.ts deleted file mode 100644 index 0529c1c9a46f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - AdminRuleCollectionsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an admin rule collection. - * - * @summary Deletes an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionDelete.json - */ -async function deletesAnAdminRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const force = false; - const options: AdminRuleCollectionsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deletesAnAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsGetSample.ts deleted file mode 100644 index ce6770a65977..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a network manager security admin configuration rule collection. - * - * @summary Gets a network manager security admin configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionGet.json - */ -async function getsSecurityAdminRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getsSecurityAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsListSample.ts deleted file mode 100644 index 40b32257d9aa..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/adminRuleCollectionsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the rule collections in a security admin configuration, in a paginated format. - * - * @summary Lists all the rule collections in a security admin configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleCollectionList.json - */ -async function listSecurityAdminRuleCollections(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.adminRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSecurityAdminRuleCollections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/adminRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/adminRulesCreateOrUpdateSample.ts deleted file mode 100644 index c469591d8ad8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/adminRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { AdminRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an admin rule. - * - * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json - */ -async function createAAdminRuleWithNetworkGroupAsSourceOrDestination(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const adminRule: AdminRule = { - description: "This is Sample Admin Rule", - access: "Deny", - destinationPortRanges: ["22"], - destinations: [ - { - addressPrefix: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1", - addressPrefixType: "NetworkGroup", - }, - ], - direction: "Inbound", - kind: "Custom", - priority: 1, - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - adminRule, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an admin rule. - * - * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRulePut.json - */ -async function createAnAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const adminRule: AdminRule = { - description: "This is Sample Admin Rule", - access: "Deny", - destinationPortRanges: ["22"], - destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - direction: "Inbound", - kind: "Custom", - priority: 1, - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - adminRule, - ); - console.log(result); -} - -async function main(): Promise { - await createAAdminRuleWithNetworkGroupAsSourceOrDestination(); - await createAnAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/adminRulesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/adminRulesDeleteSample.ts deleted file mode 100644 index d99efacffe0d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/adminRulesDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - AdminRulesDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an admin rule. - * - * @summary Deletes an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleDelete.json - */ -async function deletesAnAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const force = false; - const options: AdminRulesDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deletesAnAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/adminRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/adminRulesGetSample.ts deleted file mode 100644 index 0adb592eef61..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/adminRulesGetSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a network manager security configuration admin rule. - * - * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleGet.json - */ -async function getsSecurityAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets a network manager security configuration admin rule. - * - * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerDefaultAdminRuleGet.json - */ -async function getsSecurityDefaultAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleDefaultAdminRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main(): Promise { - await getsSecurityAdminRule(); - await getsSecurityDefaultAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/adminRulesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/adminRulesListSample.ts deleted file mode 100644 index 97e64b24891e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/adminRulesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network manager security configuration admin rules. - * - * @summary List all network manager security configuration admin rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleList.json - */ -async function listSecurityAdminRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.adminRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts deleted file mode 100644 index 9c0779e0572a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified private endpoint connection on application gateway. - * - * @summary Deletes the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json - */ -async function deleteApplicationGatewayPrivateEndpointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGatewayPrivateEndpointConnections.beginDeleteAndWait( - resourceGroupName, - applicationGatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts deleted file mode 100644 index a43f42354893..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified private endpoint connection on application gateway. - * - * @summary Gets the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json - */ -async function getApplicationGatewayPrivateEndpointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGatewayPrivateEndpointConnections.get( - resourceGroupName, - applicationGatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts deleted file mode 100644 index fc1449b871ce..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all private endpoint connections on an application gateway. - * - * @summary Lists all private endpoint connections on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json - */ -async function listsAllPrivateEndpointConnectionsOnApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayPrivateEndpointConnections.list( - resourceGroupName, - applicationGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllPrivateEndpointConnectionsOnApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts deleted file mode 100644 index 9f6dc91b7b47..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ApplicationGatewayPrivateEndpointConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the specified private endpoint connection on application gateway. - * - * @summary Updates the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json - */ -async function updateApplicationGatewayPrivateEndpointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const parameters: ApplicationGatewayPrivateEndpointConnection = { - name: "connection1", - privateEndpoint: { - id: "/subscriptions/subId2/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe", - }, - privateLinkServiceConnectionState: { - description: "approved it for some reason.", - status: "Approved", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGatewayPrivateEndpointConnections.beginUpdateAndWait( - resourceGroupName, - applicationGatewayName, - connectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts deleted file mode 100644 index de088787f599..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all private link resources on an application gateway. - * - * @summary Lists all private link resources on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayPrivateLinkResourceList.json - */ -async function listsAllPrivateLinkResourcesOnApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayPrivateLinkResources.list( - resourceGroupName, - applicationGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllPrivateLinkResourcesOnApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts deleted file mode 100644 index 71e846413cff..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the regional application gateway waf manifest. - * - * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json - */ -async function getsWafDefaultManifest(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGatewayWafDynamicManifestsDefault.get(location); - console.log(result); -} - -async function main(): Promise { - await getsWafDefaultManifest(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts deleted file mode 100644 index da9b0df00d6c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the regional application gateway waf manifest. - * - * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetApplicationGatewayWafDynamicManifests.json - */ -async function getsWafManifests(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayWafDynamicManifests.list( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getsWafManifests(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts deleted file mode 100644 index 0845ba5dd21f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ApplicationGatewayOnDemandProbe} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * - * @summary Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayBackendHealthTest.json - */ -async function testBackendHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const probeRequest: ApplicationGatewayOnDemandProbe = { - path: "/", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendaddressPools/MFAnalyticsPool", - }, - backendHttpSettings: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/MFPoolSettings", - }, - pickHostNameFromBackendHttpSettings: true, - timeout: 30, - protocol: "Http", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.beginBackendHealthOnDemandAndWait( - resourceGroupName, - applicationGatewayName, - probeRequest, - ); - console.log(result); -} - -async function main(): Promise { - await testBackendHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysBackendHealthSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysBackendHealthSample.ts deleted file mode 100644 index b5e0ebc369bf..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysBackendHealthSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the backend health of the specified application gateway in a resource group. - * - * @summary Gets the backend health of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayBackendHealthGet.json - */ -async function getBackendHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "appgw"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginBackendHealthAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getBackendHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 43c92889777a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ApplicationGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified application gateway. - * - * @summary Creates or updates the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayCreate.json - */ -async function createApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const parameters: ApplicationGateway = { - backendAddressPools: [ - { - name: "appgwpool", - backendAddresses: [ - { ipAddress: "10.0.1.1" }, - { ipAddress: "10.0.1.2" }, - ], - }, - { - name: "appgwpool1", - backendAddresses: [ - { ipAddress: "10.0.0.1" }, - { ipAddress: "10.0.0.2" }, - ], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool1", - }, - ], - backendHttpSettingsCollection: [ - { - name: "appgwbhs", - cookieBasedAffinity: "Disabled", - port: 80, - requestTimeout: 30, - protocol: "Http", - }, - ], - entraJWTValidationConfigs: [ - { - name: "entraJWTValidationConfig1", - clientId: "37293f5a-97b3-451d-b786-f532d711c9ff", - tenantId: "70a036f6-8e4d-4615-bad6-149c02e7720d", - unAuthorizedRequestAction: "Deny", - }, - ], - frontendIPConfigurations: [ - { - name: "appgwfip", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/appgwpip", - }, - }, - ], - frontendPorts: [ - { name: "appgwfp", port: 443 }, - { name: "appgwfp80", port: 80 }, - ], - gatewayIPConfigurations: [ - { - name: "appgwipc", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet/subnets/appgwsubnet", - }, - }, - ], - globalConfiguration: { - enableRequestBuffering: true, - enableResponseBuffering: true, - }, - httpListeners: [ - { - name: "appgwhl", - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", - }, - frontendPort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp", - }, - requireServerNameIndication: false, - sslCertificate: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslCertificates/sslcert", - }, - sslProfile: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslProfiles/sslProfile1", - }, - protocol: "Https", - }, - { - name: "appgwhttplistener", - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", - }, - frontendPort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp80", - }, - protocol: "Http", - }, - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "eastus", - requestRoutingRules: [ - { - name: "appgwrule", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool", - }, - backendHttpSettings: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs", - }, - entraJWTValidationConfig: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/entraJWTValidationConfigs/entraJWTValidationConfig1", - }, - httpListener: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhl", - }, - priority: 10, - rewriteRuleSet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1", - }, - ruleType: "Basic", - }, - ], - rewriteRuleSets: [ - { - name: "rewriteRuleSet1", - rewriteRules: [ - { - name: "Set X-Forwarded-For", - actionSet: { - requestHeaderConfigurations: [ - { - headerName: "X-Forwarded-For", - headerValue: "{var_add_x_forwarded_for_proxy}", - }, - ], - responseHeaderConfigurations: [ - { - headerName: "Strict-Transport-Security", - headerValue: "max-age=31536000", - }, - ], - urlConfiguration: { modifiedPath: "/abc" }, - }, - conditions: [ - { - ignoreCase: true, - negate: false, - pattern: "^Bearer", - variable: "http_req_Authorization", - }, - ], - ruleSequence: 102, - }, - ], - }, - ], - sku: { name: "Standard_v2", capacity: 3, tier: "Standard_v2" }, - sslCertificates: [ - { name: "sslcert", data: "****", password: "****" }, - { name: "sslcert2", keyVaultSecretId: "https://kv/secret" }, - ], - sslProfiles: [ - { - name: "sslProfile1", - clientAuthConfiguration: { verifyClientCertIssuerDN: true }, - sslPolicy: { - cipherSuites: ["TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"], - minProtocolVersion: "TLSv1_1", - policyType: "Custom", - }, - trustedClientCertificates: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/trustedClientCertificates/clientcert", - }, - ], - }, - ], - trustedClientCertificates: [{ name: "clientcert", data: "****" }], - trustedRootCertificates: [ - { name: "rootcert", data: "****" }, - { name: "rootcert1", keyVaultSecretId: "https://kv/secret" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - applicationGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysDeleteSample.ts deleted file mode 100644 index 0b39e213f29e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified application gateway. - * - * @summary Deletes the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayDelete.json - */ -async function deleteApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginDeleteAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysGetSample.ts deleted file mode 100644 index 802fd563e1c7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified application gateway. - * - * @summary Gets the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayGet.json - */ -async function getApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.get( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts deleted file mode 100644 index cb3f5b6460d6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets Ssl predefined policy with the specified policy name. - * - * @summary Gets Ssl predefined policy with the specified policy name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json - */ -async function getAvailableSslPredefinedPolicyByName(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const predefinedPolicyName = "AppGwSslPolicy20150501"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.getSslPredefinedPolicy( - predefinedPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getAvailableSslPredefinedPolicyByName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAllSample.ts deleted file mode 100644 index 230f6a2860d7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the application gateways in a subscription. - * - * @summary Gets all the application gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayListAll.json - */ -async function listsAllApplicationGatewaysInASubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllApplicationGatewaysInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts deleted file mode 100644 index 39f2fc1be28f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all available request headers. - * - * @summary Lists all available request headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json - */ -async function getAvailableRequestHeaders(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableRequestHeaders(); - console.log(result); -} - -async function main(): Promise { - await getAvailableRequestHeaders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts deleted file mode 100644 index 6d207c27c3de..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all available response headers. - * - * @summary Lists all available response headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json - */ -async function getAvailableResponseHeaders(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.listAvailableResponseHeaders(); - console.log(result); -} - -async function main(): Promise { - await getAvailableResponseHeaders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts deleted file mode 100644 index f476e70239c4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all available server variables. - * - * @summary Lists all available server variables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableServerVariablesGet.json - */ -async function getAvailableServerVariables(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.listAvailableServerVariables(); - console.log(result); -} - -async function main(): Promise { - await getAvailableServerVariables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts deleted file mode 100644 index 7337c972185a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists available Ssl options for configuring Ssl policy. - * - * @summary Lists available Ssl options for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsGet.json - */ -async function getAvailableSslOptions(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableSslOptions(); - console.log(result); -} - -async function main(): Promise { - await getAvailableSslOptions(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts deleted file mode 100644 index a7d7c7af9df3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all SSL predefined policies for configuring Ssl policy. - * - * @summary Lists all SSL predefined policies for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json - */ -async function getAvailableSslPredefinedPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.listAvailableSslPredefinedPolicies()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailableSslPredefinedPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts deleted file mode 100644 index 496889d50229..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all available web application firewall rule sets. - * - * @summary Lists all available web application firewall rule sets. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json - */ -async function getAvailableWafRuleSets(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableWafRuleSets(); - console.log(result); -} - -async function main(): Promise { - await getAvailableWafRuleSets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListSample.ts deleted file mode 100644 index 827fb50b659d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all application gateways in a resource group. - * - * @summary Lists all application gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayList.json - */ -async function listsAllApplicationGatewaysInAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllApplicationGatewaysInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysStartSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysStartSample.ts deleted file mode 100644 index ce1b9f44c71a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysStartSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts the specified application gateway. - * - * @summary Starts the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayStart.json - */ -async function startApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginStartAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await startApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysStopSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysStopSample.ts deleted file mode 100644 index d395aef26a51..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysStopSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the specified application gateway in a resource group. - * - * @summary Stops the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayStop.json - */ -async function stopApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginStopAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await stopApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysUpdateTagsSample.ts deleted file mode 100644 index 7c72c1d1d985..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the specified application gateway tags. - * - * @summary Updates the specified application gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayUpdateTags.json - */ -async function updateApplicationGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "AppGw"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.updateTags( - resourceGroupName, - applicationGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateApplicationGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 20eaf38e37d3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ApplicationSecurityGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an application security group. - * - * @summary Creates or updates an application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupCreate.json - */ -async function createApplicationSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const parameters: ApplicationSecurityGroup = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - applicationSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsDeleteSample.ts deleted file mode 100644 index 9796c33e581a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified application security group. - * - * @summary Deletes the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupDelete.json - */ -async function deleteApplicationSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.beginDeleteAndWait( - resourceGroupName, - applicationSecurityGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsGetSample.ts deleted file mode 100644 index a62290d9d8f5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified application security group. - * - * @summary Gets information about the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupGet.json - */ -async function getApplicationSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.get( - resourceGroupName, - applicationSecurityGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await getApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsListAllSample.ts deleted file mode 100644 index bf08ca9fbffd..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all application security groups in a subscription. - * - * @summary Gets all application security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupListAll.json - */ -async function listAllApplicationSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationSecurityGroups.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllApplicationSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsListSample.ts deleted file mode 100644 index c5dbda58d0a4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the application security groups in a resource group. - * - * @summary Gets all the application security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupList.json - */ -async function listLoadBalancersInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationSecurityGroups.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listLoadBalancersInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts deleted file mode 100644 index a920bc9502ee..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an application security group's tags. - * - * @summary Updates an application security group's tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupUpdateTags.json - */ -async function updateApplicationSecurityGroupTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.updateTags( - resourceGroupName, - applicationSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateApplicationSecurityGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/availableDelegationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/availableDelegationsListSample.ts deleted file mode 100644 index b6721c4fac39..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/availableDelegationsListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all of the available subnet delegations for this subscription in this region. - * - * @summary Gets all of the available subnet delegations for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableDelegationsSubscriptionGet.json - */ -async function getAvailableDelegations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableDelegations.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailableDelegations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/availableEndpointServicesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/availableEndpointServicesListSample.ts deleted file mode 100644 index 8e937f0613ce..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/availableEndpointServicesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List what values of endpoint services are available for use. - * - * @summary List what values of endpoint services are available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EndpointServicesList.json - */ -async function endpointServicesList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableEndpointServices.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await endpointServicesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts deleted file mode 100644 index 89c85c61eacc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * - * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json - */ -async function getAvailablePrivateEndpointTypesInTheResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availablePrivateEndpointTypes.listByResourceGroup( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailablePrivateEndpointTypesInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/availablePrivateEndpointTypesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/availablePrivateEndpointTypesListSample.ts deleted file mode 100644 index adcefee3500c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/availablePrivateEndpointTypesListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * - * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailablePrivateEndpointTypesGet.json - */ -async function getAvailablePrivateEndpointTypes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availablePrivateEndpointTypes.list( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailablePrivateEndpointTypes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/availableResourceGroupDelegationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/availableResourceGroupDelegationsListSample.ts deleted file mode 100644 index 3a44c85605a2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/availableResourceGroupDelegationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all of the available subnet delegations for this resource group in this region. - * - * @summary Gets all of the available subnet delegations for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableDelegationsResourceGroupGet.json - */ -async function getAvailableDelegationsInTheResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableResourceGroupDelegations.list( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailableDelegationsInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/availableServiceAliasesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/availableServiceAliasesListByResourceGroupSample.ts deleted file mode 100644 index 3281dd01fa6a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/availableServiceAliasesListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all available service aliases for this resource group in this region. - * - * @summary Gets all available service aliases for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableServiceAliasesListByResourceGroup.json - */ -async function getAvailableServiceAliasesInTheResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableServiceAliases.listByResourceGroup( - resourceGroupName, - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailableServiceAliasesInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/availableServiceAliasesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/availableServiceAliasesListSample.ts deleted file mode 100644 index 52fa20ed41c4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/availableServiceAliasesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all available service aliases for this subscription in this region. - * - * @summary Gets all available service aliases for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableServiceAliasesList.json - */ -async function getAvailableServiceAliases(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableServiceAliases.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailableServiceAliases(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallFqdnTagsListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallFqdnTagsListAllSample.ts deleted file mode 100644 index 1dec87dcf889..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallFqdnTagsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Azure Firewall FQDN Tags in a subscription. - * - * @summary Gets all the Azure Firewall FQDN Tags in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallFqdnTagsListBySubscription.json - */ -async function listAllAzureFirewallFqdnTagsForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewallFqdnTags.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllAzureFirewallFqdnTagsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsCreateOrUpdateSample.ts deleted file mode 100644 index 79988665b936..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsCreateOrUpdateSample.ts +++ /dev/null @@ -1,638 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { AzureFirewall} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPut.json - */ -async function createAzureFirewall(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], - }, - { - name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutWithAdditionalProperties.json - */ -async function createAzureFirewallWithAdditionalProperties(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - additionalProperties: { key1: "value1", key2: "value2" }, - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - ipGroups: [], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], - }, - { - name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutWithIpGroups.json - */ -async function createAzureFirewallWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], - }, - { - name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutWithZones.json - */ -async function createAzureFirewallWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US 2", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], - }, - { - name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: ["1", "2", "3"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutWithMgmtSubnet.json - */ -async function createAzureFirewallWithManagementSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - managementIpConfiguration: { - name: "azureFirewallMgmtIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/managementPipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallManagementSubnet", - }, - }, - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], - }, - { - name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutInHub.json - */ -async function createAzureFirewallInVirtualHub(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - firewallPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/policy1", - }, - hubIPAddresses: { publicIPs: { addresses: [], count: 1 } }, - location: "West US", - sku: { name: "AZFW_Hub", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createAzureFirewall(); - await createAzureFirewallWithAdditionalProperties(); - await createAzureFirewallWithIPGroups(); - await createAzureFirewallWithZones(); - await createAzureFirewallWithManagementSubnet(); - await createAzureFirewallInVirtualHub(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsDeleteSample.ts deleted file mode 100644 index cd9f8778bacf..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Azure Firewall. - * - * @summary Deletes the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallDelete.json - */ -async function deleteAzureFirewall(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginDeleteAndWait( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteAzureFirewall(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsGetSample.ts deleted file mode 100644 index 1ff5ad5a7751..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsGetSample.ts +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGet.json - */ -async function getAzureFirewall(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGetWithAdditionalProperties.json - */ -async function getAzureFirewallWithAdditionalProperties(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGetWithIpGroups.json - */ -async function getAzureFirewallWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGetWithZones.json - */ -async function getAzureFirewallWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGetWithMgmtSubnet.json - */ -async function getAzureFirewallWithManagementSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -async function main(): Promise { - await getAzureFirewall(); - await getAzureFirewallWithAdditionalProperties(); - await getAzureFirewallWithIPGroups(); - await getAzureFirewallWithZones(); - await getAzureFirewallWithManagementSubnet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListAllSample.ts deleted file mode 100644 index d3fe8d54ca88..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Azure Firewalls in a subscription. - * - * @summary Gets all the Azure Firewalls in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListBySubscription.json - */ -async function listAllAzureFirewallsForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewalls.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllAzureFirewallsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListLearnedPrefixesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListLearnedPrefixesSample.ts deleted file mode 100644 index 5f174ece59b9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListLearnedPrefixesSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * - * @summary Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListLearnedIPPrefixes.json - */ -async function azureFirewallListLearnedPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginListLearnedPrefixesAndWait( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -async function main(): Promise { - await azureFirewallListLearnedPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListSample.ts deleted file mode 100644 index 7047d0bf6fd2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Azure Firewalls in a resource group. - * - * @summary Lists all Azure Firewalls in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallListByResourceGroup.json - */ -async function listAllAzureFirewallsForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewalls.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllAzureFirewallsForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsPacketCaptureOperationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsPacketCaptureOperationSample.ts deleted file mode 100644 index 948d69b6e1db..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsPacketCaptureOperationSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FirewallPacketCaptureParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Runs a packet capture operation on AzureFirewall. - * - * @summary Runs a packet capture operation on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPacketCaptureOperation.json - */ -async function azureFirewallPacketCaptureOperation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const parameters: FirewallPacketCaptureParameters = { - durationInSeconds: 300, - fileName: "azureFirewallPacketCapture", - filters: [ - { - destinationPorts: ["4500"], - destinations: ["20.1.2.0"], - sources: ["20.1.1.0"], - }, - { - destinationPorts: ["123", "80"], - destinations: ["10.1.2.0"], - sources: ["10.1.1.0", "10.1.1.1"], - }, - ], - flags: [{ type: "syn" }, { type: "fin" }], - numberOfPacketsToCapture: 5000, - operation: "Status", - sasUrl: "someSASURL", - protocol: "Any", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginPacketCaptureOperationAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await azureFirewallPacketCaptureOperation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsPacketCaptureSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsPacketCaptureSample.ts deleted file mode 100644 index c861248e2ccc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsPacketCaptureSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FirewallPacketCaptureParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Runs a packet capture on AzureFirewall. - * - * @summary Runs a packet capture on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPacketCapture.json - */ -async function azureFirewallPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const parameters: FirewallPacketCaptureParameters = { - durationInSeconds: 300, - fileName: "azureFirewallPacketCapture", - filters: [ - { - destinationPorts: ["4500"], - destinations: ["20.1.2.0"], - sources: ["20.1.1.0"], - }, - { - destinationPorts: ["123", "80"], - destinations: ["10.1.2.0"], - sources: ["10.1.1.0", "10.1.1.1"], - }, - ], - flags: [{ type: "syn" }, { type: "fin" }], - numberOfPacketsToCapture: 5000, - sasUrl: "someSASURL", - protocol: "Any", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginPacketCaptureAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await azureFirewallPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsUpdateTagsSample.ts deleted file mode 100644 index 431fee63a83a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/azureFirewallsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of an Azure Firewall resource. - * - * @summary Updates tags of an Azure Firewall resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallUpdateTags.json - */ -async function updateAzureFirewallTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "azfwtest"; - const azureFirewallName = "fw1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginUpdateTagsAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateAzureFirewallTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsCreateOrUpdateSample.ts deleted file mode 100644 index 2d42cdd0544e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsCreateOrUpdateSample.ts +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { BastionHost} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPut.json - */ -async function createBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: BastionHost = { - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPutWithPrivateOnly.json - */ -async function createBastionHostWithPrivateOnly(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: BastionHost = { - enablePrivateOnlyBastion: true, - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPutWithZones.json - */ -async function createBastionHostWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: BastionHost = { - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDeveloperPut.json - */ -async function createDeveloperBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg2"; - const bastionHostName = "bastionhostdeveloper"; - const parameters: BastionHost = { - ipConfigurations: [], - networkAcls: { ipRules: [{ addressPrefix: "1.1.1.1/16" }] }, - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createBastionHost(); - await createBastionHostWithPrivateOnly(); - await createBastionHostWithZones(); - await createDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsDeleteSample.ts deleted file mode 100644 index 81236cbb198e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsDeleteSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Bastion Host. - * - * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDelete.json - */ -async function deleteBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginDeleteAndWait( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deletes the specified Bastion Host. - * - * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDeveloperDelete.json - */ -async function deleteDeveloperBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg2"; - const bastionHostName = "bastionhostdeveloper"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginDeleteAndWait( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteBastionHost(); - await deleteDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsGetSample.ts deleted file mode 100644 index d8607d9f165a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsGetSample.ts +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostGet.json - */ -async function getBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant'"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostGetWithPrivateOnly.json - */ -async function getBastionHostWithPrivateOnly(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostGetWithZones.json - */ -async function getBastionHostWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDeveloperGet.json - */ -async function getDeveloperBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhostdeveloper'"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -async function main(): Promise { - await getBastionHost(); - await getBastionHostWithPrivateOnly(); - await getBastionHostWithZones(); - await getDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsListByResourceGroupSample.ts deleted file mode 100644 index 4bddffd3c12f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Bastion Hosts in a resource group. - * - * @summary Lists all Bastion Hosts in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostListByResourceGroup.json - */ -async function listAllBastionHostsForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bastionHosts.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllBastionHostsForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsListSample.ts deleted file mode 100644 index 21c6e1936ea9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Bastion Hosts in a subscription. - * - * @summary Lists all Bastion Hosts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostListBySubscription.json - */ -async function listAllBastionHostsForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bastionHosts.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllBastionHostsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsUpdateTagsSample.ts deleted file mode 100644 index df3f23cb9100..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/bastionHostsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates Tags for BastionHost resource - * - * @summary Updates Tags for BastionHost resource - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPatch.json - */ -async function patchBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginUpdateTagsAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await patchBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/bgpServiceCommunitiesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/bgpServiceCommunitiesListSample.ts deleted file mode 100644 index 0cbfb9f6f867..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/bgpServiceCommunitiesListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the available bgp service communities. - * - * @summary Gets all the available bgp service communities. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceCommunityList.json - */ -async function serviceCommunityList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bgpServiceCommunities.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await serviceCommunityList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/checkDnsNameAvailabilitySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/checkDnsNameAvailabilitySample.ts deleted file mode 100644 index b6829a77d01c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/checkDnsNameAvailabilitySample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * - * @summary Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckDnsNameAvailability.json - */ -async function checkDnsNameAvailability(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const domainNameLabel = "testdns"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.checkDnsNameAvailability( - location, - domainNameLabel, - ); - console.log(result); -} - -async function main(): Promise { - await checkDnsNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 55b4924e2ce7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnServerConfigurationPolicyGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * - * @summary Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupPut.json - */ -async function configurationPolicyGroupPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup = - { - isDefault: true, - policyMembers: [ - { - name: "policy1", - attributeType: "RadiusAzureGroupId", - attributeValue: "6ad1bd08", - }, - { - name: "policy2", - attributeType: "CertificateGroupId", - attributeValue: "red.com", - }, - ], - priority: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.configurationPolicyGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - vpnServerConfigurationPolicyGroupParameters, - ); - console.log(result); -} - -async function main(): Promise { - await configurationPolicyGroupPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsDeleteSample.ts deleted file mode 100644 index 32d636dc873a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a ConfigurationPolicyGroup. - * - * @summary Deletes a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupDelete.json - */ -async function configurationPolicyGroupDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.configurationPolicyGroups.beginDeleteAndWait( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await configurationPolicyGroupDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsGetSample.ts deleted file mode 100644 index 2590400c4407..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a ConfigurationPolicyGroup. - * - * @summary Retrieves the details of a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupGet.json - */ -async function configurationPolicyGroupGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.configurationPolicyGroups.get( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await configurationPolicyGroupGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts deleted file mode 100644 index 0d2576f4f1c5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * - * @summary Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json - */ -async function configurationPolicyGroupListByVpnServerConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.configurationPolicyGroups.listByVpnServerConfiguration( - resourceGroupName, - vpnServerConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await configurationPolicyGroupListByVpnServerConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsCreateOrUpdateSample.ts deleted file mode 100644 index 72a54087832e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsCreateOrUpdateSample.ts +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { ConnectionMonitor} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorCreate.json - */ -async function createConnectionMonitorV1(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: ConnectionMonitor = { - endpoints: [ - { - name: "source", - resourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/ct1", - }, - { name: "destination", address: "bing.com" }, - ], - location: "eastus", - testConfigurations: [ - { - name: "tcp", - tcpConfiguration: { port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "tg", - destinations: ["destination"], - sources: ["source"], - testConfigurations: ["tcp"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorV2Create.json - */ -async function createConnectionMonitorV2(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: ConnectionMonitor = { - endpoints: [ - { - name: "vm1", - resourceId: - "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/NwRgIrinaCentralUSEUAP/providers/Microsoft.Compute/virtualMachines/vm1", - }, - { - name: "CanaryWorkspaceVamshi", - filter: { - type: "Include", - items: [{ type: "AgentAddress", address: "npmuser" }], - }, - resourceId: - "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/vasamudrRG/providers/Microsoft.OperationalInsights/workspaces/vasamudrWorkspace", - }, - { name: "bing", address: "bing.com" }, - { name: "google", address: "google.com" }, - ], - outputs: [], - testConfigurations: [ - { - name: "testConfig1", - tcpConfiguration: { disableTraceRoute: false, port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "test1", - destinations: ["bing", "google"], - disable: false, - sources: ["vm1", "CanaryWorkspaceVamshi"], - testConfigurations: ["testConfig1"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json - */ -async function createConnectionMonitorWithArcNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: ConnectionMonitor = { - endpoints: [ - { - name: "vm1", - type: "AzureVM", - resourceId: - "/subscriptions/9cece3e3-0f7d-47ca-af0e-9772773f90b7/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/TESTVM", - }, - { name: "bing", type: "ExternalAddress", address: "bing.com" }, - { name: "google", type: "ExternalAddress", address: "google.com" }, - { - name: "ArcBasedNetwork", - type: "AzureArcNetwork", - locationDetails: { region: "eastus" }, - scope: { include: [{ address: "172.21.128.0/20" }] }, - subscriptionId: "9cece3e3-0f7d-47ca-af0e-9772773f90b7", - }, - ], - outputs: [], - testConfigurations: [ - { - name: "testConfig1", - tcpConfiguration: { disableTraceRoute: false, port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "test1", - destinations: ["bing", "google"], - disable: false, - sources: ["vm1", "ArcBasedNetwork"], - testConfigurations: ["testConfig1"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createConnectionMonitorV1(); - await createConnectionMonitorV2(); - await createConnectionMonitorWithArcNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsDeleteSample.ts deleted file mode 100644 index 734700a99472..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified connection monitor. - * - * @summary Deletes the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorDelete.json - */ -async function deleteConnectionMonitor(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsGetSample.ts deleted file mode 100644 index 23318f96d155..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a connection monitor by name. - * - * @summary Gets a connection monitor by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorGet.json - */ -async function getConnectionMonitor(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.get( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main(): Promise { - await getConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsListSample.ts deleted file mode 100644 index 35fca7bd13a0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all connection monitors for the specified Network Watcher. - * - * @summary Lists all connection monitors for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorList.json - */ -async function listConnectionMonitors(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.connectionMonitors.list( - resourceGroupName, - networkWatcherName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listConnectionMonitors(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsStopSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsStopSample.ts deleted file mode 100644 index 2544eb5cde46..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsStopSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the specified connection monitor. - * - * @summary Stops the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorStop.json - */ -async function stopConnectionMonitor(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginStopAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main(): Promise { - await stopConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsUpdateTagsSample.ts deleted file mode 100644 index 11b0e5c141b1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/connectionMonitorsUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update tags of the specified connection monitor. - * - * @summary Update tags of the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json - */ -async function updateConnectionMonitorTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.updateTags( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateConnectionMonitorTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 4ac3c490cc8a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectivityConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates/Updates a new network manager connectivity configuration - * - * @summary Creates/Updates a new network manager connectivity configuration - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationPut.json - */ -async function connectivityConfigurationsPut(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const connectivityConfiguration: ConnectivityConfiguration = { - description: "Sample Configuration", - appliesToGroups: [ - { - groupConnectivity: "None", - isGlobal: "False", - networkGroupId: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/group1", - useHubGateway: "True", - }, - ], - connectivityCapabilities: { - connectedGroupAddressOverlap: "Allowed", - connectedGroupPrivateEndpointsScale: "Standard", - peeringEnforcement: "Unenforced", - }, - connectivityTopology: "HubAndSpoke", - deleteExistingPeering: "True", - hubs: [ - { - resourceId: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myTestConnectivityConfig", - resourceType: "Microsoft.Network/virtualNetworks", - }, - ], - isGlobal: "True", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - connectivityConfiguration, - ); - console.log(result); -} - -async function main(): Promise { - await connectivityConfigurationsPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsDeleteSample.ts deleted file mode 100644 index 079afe9f56e4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectivityConfigurationsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * - * @summary Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationDelete.json - */ -async function connectivityConfigurationsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const force = false; - const options: ConnectivityConfigurationsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await connectivityConfigurationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsGetSample.ts deleted file mode 100644 index d308554d5485..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * - * @summary Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationGet.json - */ -async function connectivityConfigurationsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main(): Promise { - await connectivityConfigurationsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsListSample.ts deleted file mode 100644 index b20a33e3fc68..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/connectivityConfigurationsListSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the network manager connectivity configuration in a specified network manager. - * - * @summary Lists all the network manager connectivity configuration in a specified network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectivityConfigurationList.json - */ -async function connectivityConfigurationsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.connectivityConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await connectivityConfigurationsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesCreateOrUpdateSample.ts deleted file mode 100644 index f3fcdbe92d0a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesCreateOrUpdateSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { CustomIpPrefix} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a custom IP prefix. - * - * @summary Creates or updates a custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixCreateCustomizedValues.json - */ -async function createCustomIPPrefixAllocationMethod(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const parameters: CustomIpPrefix = { cidr: "0.0.0.0/24", location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - customIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createCustomIPPrefixAllocationMethod(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesDeleteSample.ts deleted file mode 100644 index 8460f354f858..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified custom IP prefix. - * - * @summary Deletes the specified custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixDelete.json - */ -async function deleteCustomIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.beginDeleteAndWait( - resourceGroupName, - customIpPrefixName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteCustomIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesGetSample.ts deleted file mode 100644 index 1787de1f8c9c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified custom IP prefix in a specified resource group. - * - * @summary Gets the specified custom IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixGet.json - */ -async function getCustomIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.get( - resourceGroupName, - customIpPrefixName, - ); - console.log(result); -} - -async function main(): Promise { - await getCustomIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesListAllSample.ts deleted file mode 100644 index aa45f544f24c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the custom IP prefixes in a subscription. - * - * @summary Gets all the custom IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixListAll.json - */ -async function listAllCustomIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.customIPPrefixes.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllCustomIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesListSample.ts deleted file mode 100644 index 2853c9d33f71..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all custom IP prefixes in a resource group. - * - * @summary Gets all custom IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixList.json - */ -async function listResourceGroupCustomIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.customIPPrefixes.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listResourceGroupCustomIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesUpdateTagsSample.ts deleted file mode 100644 index aa86f50d0591..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/customIPPrefixesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates custom IP prefix tags. - * - * @summary Updates custom IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixUpdateTags.json - */ -async function updatePublicIPAddressTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.updateTags( - resourceGroupName, - customIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updatePublicIPAddressTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index 00a1afee4628..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { DdosCustomPolicy} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a DDoS custom policy. - * - * @summary Creates or updates a DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyCreate.json - */ -async function createDDoSCustomPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const parameters: DdosCustomPolicy = { - detectionRules: [ - { - name: "detectionRuleTcp", - detectionMode: "TrafficThreshold", - trafficDetectionRule: { packetsPerSecond: 1000000, trafficType: "Tcp" }, - }, - ], - location: "centraluseuap", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - ddosCustomPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesDeleteSample.ts deleted file mode 100644 index bf9b1e505313..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified DDoS custom policy. - * - * @summary Deletes the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyDelete.json - */ -async function deleteDDoSCustomPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.beginDeleteAndWait( - resourceGroupName, - ddosCustomPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesGetSample.ts deleted file mode 100644 index a49a87dea3da..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified DDoS custom policy. - * - * @summary Gets information about the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyGet.json - */ -async function getDDoSCustomPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.get( - resourceGroupName, - ddosCustomPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts deleted file mode 100644 index 3eebe86e6408..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update a DDoS custom policy tags. - * - * @summary Update a DDoS custom policy tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyUpdateTags.json - */ -async function dDoSCustomPolicyUpdateTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.updateTags( - resourceGroupName, - ddosCustomPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await dDoSCustomPolicyUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts deleted file mode 100644 index e6f97b67b109..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - DdosProtectionPlan} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a DDoS protection plan. - * - * @summary Creates or updates a DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanCreate.json - */ -async function createDDoSProtectionPlan(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const parameters: DdosProtectionPlan = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.beginCreateOrUpdateAndWait( - resourceGroupName, - ddosProtectionPlanName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansDeleteSample.ts deleted file mode 100644 index c71945c85b4b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified DDoS protection plan. - * - * @summary Deletes the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanDelete.json - */ -async function deleteDDoSProtectionPlan(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.beginDeleteAndWait( - resourceGroupName, - ddosProtectionPlanName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansGetSample.ts deleted file mode 100644 index 64a6a50c1476..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified DDoS protection plan. - * - * @summary Gets information about the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanGet.json - */ -async function getDDoSProtectionPlan(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.get( - resourceGroupName, - ddosProtectionPlanName, - ); - console.log(result); -} - -async function main(): Promise { - await getDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts deleted file mode 100644 index d3bcdd260572..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the DDoS protection plans in a resource group. - * - * @summary Gets all the DDoS protection plans in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanList.json - */ -async function listDDoSProtectionPlansInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ddosProtectionPlans.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listDDoSProtectionPlansInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansListSample.ts deleted file mode 100644 index 31f5e1400a2a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all DDoS protection plans in a subscription. - * - * @summary Gets all DDoS protection plans in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanListAll.json - */ -async function listAllDDoSProtectionPlans(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ddosProtectionPlans.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllDDoSProtectionPlans(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansUpdateTagsSample.ts deleted file mode 100644 index b968f4da73a6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ddosProtectionPlansUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update a DDoS protection plan tags. - * - * @summary Update a DDoS protection plan tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanUpdateTags.json - */ -async function dDoSProtectionPlanUpdateTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.updateTags( - resourceGroupName, - ddosProtectionPlanName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await dDoSProtectionPlanUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/defaultSecurityRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/defaultSecurityRulesGetSample.ts deleted file mode 100644 index f051cfb502b5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/defaultSecurityRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified default network security rule. - * - * @summary Get the specified default network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DefaultSecurityRuleGet.json - */ -async function defaultSecurityRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkSecurityGroupName = "nsg1"; - const defaultSecurityRuleName = "AllowVnetInBound"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.defaultSecurityRules.get( - resourceGroupName, - networkSecurityGroupName, - defaultSecurityRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await defaultSecurityRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/defaultSecurityRulesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/defaultSecurityRulesListSample.ts deleted file mode 100644 index de0503b33c68..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/defaultSecurityRulesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all default security rules in a network security group. - * - * @summary Gets all default security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DefaultSecurityRuleList.json - */ -async function defaultSecurityRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkSecurityGroupName = "nsg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.defaultSecurityRules.list( - resourceGroupName, - networkSecurityGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await defaultSecurityRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/deleteBastionShareableLinkByTokenSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/deleteBastionShareableLinkByTokenSample.ts deleted file mode 100644 index 8a4c8ea8c6d6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/deleteBastionShareableLinkByTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BastionShareableLinkTokenListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the Bastion Shareable Links for all the tokens specified in the request. - * - * @summary Deletes the Bastion Shareable Links for all the tokens specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkDeleteByToken.json - */ -async function deleteBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslTokenRequest: BastionShareableLinkTokenListRequest = { - tokens: [ - "abcd1234-efgh-hijk-5678-abcdefgh1234", - "dcba4321-hgfe-kjih-8765-hgfedcba4321", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginDeleteBastionShareableLinkByTokenAndWait( - resourceGroupName, - bastionHostName, - bslTokenRequest, - ); - console.log(result); -} - -async function main(): Promise { - await deleteBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/deleteBastionShareableLinkSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/deleteBastionShareableLinkSample.ts deleted file mode 100644 index 844f8d905b85..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/deleteBastionShareableLinkSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BastionShareableLinkListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Deletes the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkDelete.json - */ -async function deleteBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest: BastionShareableLinkListRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginDeleteBastionShareableLinkAndWait( - resourceGroupName, - bastionHostName, - bslRequest, - ); - console.log(result); -} - -async function main(): Promise { - await deleteBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/disconnectActiveSessionsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/disconnectActiveSessionsSample.ts deleted file mode 100644 index 96c8000d62ca..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/disconnectActiveSessionsSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { SessionIds} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. - * - * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionSessionDelete.json - */ -async function deletesTheSpecifiedActiveSession(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const sessionIds: SessionIds = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.listDisconnectActiveSessions( - resourceGroupName, - bastionHostName, - sessionIds, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await deletesTheSpecifiedActiveSession(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationCreateOrUpdateSample.ts deleted file mode 100644 index d82d763aff55..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationCreateOrUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { DscpConfiguration} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a DSCP Configuration. - * - * @summary Creates or updates a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationCreate.json - */ -async function createDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpconfig"; - const parameters: DscpConfiguration = { - location: "eastus", - qosDefinitionCollection: [ - { - destinationIpRanges: [{ endIP: "127.0.10.2", startIP: "127.0.10.1" }], - destinationPortRanges: [{ end: 15, start: 15 }], - markings: [1], - sourceIpRanges: [{ endIP: "127.0.0.2", startIP: "127.0.0.1" }], - sourcePortRanges: [ - { end: 11, start: 10 }, - { end: 21, start: 20 }, - ], - protocol: "Tcp", - }, - { - destinationIpRanges: [{ endIP: "12.0.10.2", startIP: "12.0.10.1" }], - destinationPortRanges: [{ end: 52, start: 51 }], - markings: [2], - sourceIpRanges: [{ endIP: "12.0.0.2", startIP: "12.0.0.1" }], - sourcePortRanges: [{ end: 12, start: 11 }], - protocol: "Udp", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.dscpConfigurationOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - dscpConfigurationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationDeleteSample.ts deleted file mode 100644 index 09120014297b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a DSCP Configuration. - * - * @summary Deletes a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationDelete.json - */ -async function deleteDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.beginDeleteAndWait( - resourceGroupName, - dscpConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationGetSample.ts deleted file mode 100644 index b8bfe377e3ac..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a DSCP Configuration. - * - * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationGet.json - */ -async function getDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.get( - resourceGroupName, - dscpConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationListAllSample.ts deleted file mode 100644 index 2947e8c48830..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all dscp configurations in a subscription. - * - * @summary Gets all dscp configurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationListAll.json - */ -async function listAllNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.dscpConfigurationOperations.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationListSample.ts deleted file mode 100644 index cb053d4fa962..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/dscpConfigurationListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a DSCP Configuration. - * - * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationList.json - */ -async function getDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.dscpConfigurationOperations.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts deleted file mode 100644 index 2b7cb2037cbf..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCircuitAuthorization} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an authorization in the specified express route circuit. - * - * @summary Creates or updates an authorization in the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationCreate.json - */ -async function createExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizatinName"; - const authorizationParameters: ExpressRouteCircuitAuthorization = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitAuthorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - authorizationName, - authorizationParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts deleted file mode 100644 index 1eb8134fc1b4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified authorization from the specified express route circuit. - * - * @summary Deletes the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationDelete.json - */ -async function deleteExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitAuthorizations.beginDeleteAndWait( - resourceGroupName, - circuitName, - authorizationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts deleted file mode 100644 index 4bc5d56ca00d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified authorization from the specified express route circuit. - * - * @summary Gets the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationGet.json - */ -async function getExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitAuthorizations.get( - resourceGroupName, - circuitName, - authorizationName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsListSample.ts deleted file mode 100644 index 6708ea98fda1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitAuthorizationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all authorizations in an express route circuit. - * - * @summary Gets all authorizations in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitAuthorizationList.json - */ -async function listExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitAuthorizations.list( - resourceGroupName, - circuitName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 08e54fb49426..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCircuitConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @summary Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionCreate.json - */ -async function expressRouteCircuitConnectionCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection = - { - addressPrefix: "10.0.0.0/29", - authorizationKey: "946a1918-b7a2-4917-b43c-8c4cdaee006a", - expressRouteCircuitPeering: { - id: "/subscriptions/subid1/resourceGroups/dedharcktinit/providers/Microsoft.Network/expressRouteCircuits/dedharcktlocal/peerings/AzurePrivatePeering", - }, - ipv6CircuitConnectionConfig: { addressPrefix: "aa:bb::/125" }, - peerExpressRouteCircuitPeering: { - id: "/subscriptions/subid2/resourceGroups/dedharcktpeer/providers/Microsoft.Network/expressRouteCircuits/dedharcktremote/peerings/AzurePrivatePeering", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - peeringName, - connectionName, - expressRouteCircuitConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteCircuitConnectionCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts deleted file mode 100644 index d2f367cb507a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @summary Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionDelete.json - */ -async function deleteExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitConnections.beginDeleteAndWait( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsGetSample.ts deleted file mode 100644 index 73b10cb2889e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Express Route Circuit Connection from the specified express route circuit. - * - * @summary Gets the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionGet.json - */ -async function expressRouteCircuitConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitConnections.get( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteCircuitConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsListSample.ts deleted file mode 100644 index 81d912c5d854..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitConnectionsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all global reach connections associated with a private peering in an express route circuit. - * - * @summary Gets all global reach connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitConnectionList.json - */ -async function listExpressRouteCircuitConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitConnections.list( - resourceGroupName, - circuitName, - peeringName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteCircuitConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts deleted file mode 100644 index 590bb8db1d5b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCircuitPeering} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a peering in the specified express route circuits. - * - * @summary Creates or updates a peering in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringCreate.json - */ -async function createExpressRouteCircuitPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "AzurePrivatePeering"; - const peeringParameters: ExpressRouteCircuitPeering = { - peerASN: 200, - primaryPeerAddressPrefix: "192.168.16.252/30", - secondaryPeerAddressPrefix: "192.168.18.252/30", - vlanId: 200, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - peeringName, - peeringParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts deleted file mode 100644 index 24c6c64a4348..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified peering from the specified express route circuit. - * - * @summary Deletes the specified peering from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringDelete.json - */ -async function deleteExpressRouteCircuitPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitPeerings.beginDeleteAndWait( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsGetSample.ts deleted file mode 100644 index 13e4facc0790..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified peering for the express route circuit. - * - * @summary Gets the specified peering for the express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringGet.json - */ -async function getExpressRouteCircuitPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "MicrosoftPeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitPeerings.get( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCircuitPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsListSample.ts deleted file mode 100644 index d64166cc7de3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitPeeringsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all peerings in a specified express route circuit. - * - * @summary Gets all peerings in a specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringList.json - */ -async function listExpressRouteCircuitPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitPeerings.list( - resourceGroupName, - circuitName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts deleted file mode 100644 index 3621402bf7aa..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCircuit} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an express route circuit. - * - * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitCreate.json - */ -async function createExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const parameters: ExpressRouteCircuit = { - allowClassicOperations: false, - authorizations: [], - location: "Brazil South", - peerings: [], - serviceProviderProperties: { - bandwidthInMbps: 200, - peeringLocation: "Silicon Valley", - serviceProviderName: "Equinix", - }, - sku: { - name: "Standard_MeteredData", - family: "MeteredData", - tier: "Standard", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an express route circuit. - * - * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json - */ -async function createExpressRouteCircuitOnExpressRoutePort(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "expressRouteCircuit1"; - const parameters: ExpressRouteCircuit = { - authorizationKey: "b0be57f5-1fba-463b-adec-ffe767354cdd", - bandwidthInGbps: 10, - enableDirectPortRateLimit: false, - expressRoutePort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRoutePorts/portName", - }, - location: "westus", - sku: { - name: "Premium_MeteredData", - family: "MeteredData", - tier: "Premium", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createExpressRouteCircuit(); - await createExpressRouteCircuitOnExpressRoutePort(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsDeleteSample.ts deleted file mode 100644 index c83154524091..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified express route circuit. - * - * @summary Deletes the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitDelete.json - */ -async function deleteExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginDeleteAndWait( - resourceGroupName, - circuitName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts deleted file mode 100644 index 18676018ae81..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all stats from an express route circuit in a resource group. - * - * @summary Gets all stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringStats.json - */ -async function getExpressRouteCircuitPeeringTrafficStats(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.getPeeringStats( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCircuitPeeringTrafficStats(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetSample.ts deleted file mode 100644 index 189182ce72ac..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified express route circuit. - * - * @summary Gets information about the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitGet.json - */ -async function getExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.get( - resourceGroupName, - circuitName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetStatsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetStatsSample.ts deleted file mode 100644 index 9b5964c6ffd1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsGetStatsSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the stats from an express route circuit in a resource group. - * - * @summary Gets all the stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitStats.json - */ -async function getExpressRouteCircuitTrafficStats(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.getStats( - resourceGroupName, - circuitName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCircuitTrafficStats(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListAllSample.ts deleted file mode 100644 index 15a9cc7f6310..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the express route circuits in a subscription. - * - * @summary Gets all the express route circuits in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitListBySubscription.json - */ -async function listExpressRouteCircuitsInASubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuits.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteCircuitsInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListArpTableSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListArpTableSample.ts deleted file mode 100644 index 9b187d8de971..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListArpTableSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitARPTableList.json - */ -async function listArpTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListArpTableAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await listArpTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListRoutesTableSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListRoutesTableSample.ts deleted file mode 100644 index 0494c9c3fa4d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListRoutesTableSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the currently advertised routes table associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised routes table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitRouteTableList.json - */ -async function listRouteTables(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListRoutesTableAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await listRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts deleted file mode 100644 index 5645765cd435..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitRouteTableSummaryList.json - */ -async function listRouteTableSummary(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuits.beginListRoutesTableSummaryAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await listRouteTableSummary(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListSample.ts deleted file mode 100644 index ef5a4bff4a1a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the express route circuits in a resource group. - * - * @summary Gets all the express route circuits in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitListByResourceGroup.json - */ -async function listExpressRouteCircuitsInAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuits.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteCircuitsInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsUpdateTagsSample.ts deleted file mode 100644 index c3a7cb75de00..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCircuitsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an express route circuit tags. - * - * @summary Updates an express route circuit tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitUpdateTags.json - */ -async function updateExpressRouteCircuitTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "ertest"; - const circuitName = "er1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.updateTags( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateExpressRouteCircuitTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 2f36a6b22bf2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * - * @summary Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionCreate.json - */ -async function expressRouteConnectionCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "gateway-2"; - const connectionName = "connectionName"; - const putExpressRouteConnectionParameters: ExpressRouteConnection = { - name: "connectionName", - authorizationKey: "authorizationKey", - expressRouteCircuitPeering: { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering", - }, - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/gateway-2/expressRouteConnections/connectionName", - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - }, - routingWeight: 2, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRouteGatewayName, - connectionName, - putExpressRouteConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteConnectionCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsDeleteSample.ts deleted file mode 100644 index 2e3f6a72c817..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a connection to a ExpressRoute circuit. - * - * @summary Deletes a connection to a ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionDelete.json - */ -async function expressRouteConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const connectionName = "connectionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.beginDeleteAndWait( - resourceGroupName, - expressRouteGatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsGetSample.ts deleted file mode 100644 index 4398c5f80dea..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsGetSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified ExpressRouteConnection. - * - * @summary Gets the specified ExpressRouteConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionGet.json - */ -async function expressRouteConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const connectionName = "connectionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.get( - resourceGroupName, - expressRouteGatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsListSample.ts deleted file mode 100644 index 0452b848a454..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteConnectionsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists ExpressRouteConnections. - * - * @summary Lists ExpressRouteConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionList.json - */ -async function expressRouteConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.list( - resourceGroupName, - expressRouteGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts deleted file mode 100644 index 9345c4c0b348..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCrossConnectionPeering} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @summary Creates or updates a peering in the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json - */ -async function expressRouteCrossConnectionBgpPeeringCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const peeringParameters: ExpressRouteCrossConnectionPeering = { - ipv6PeeringConfig: { - primaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::/126", - secondaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::4/126", - }, - peerASN: 200, - primaryPeerAddressPrefix: "192.168.16.252/30", - secondaryPeerAddressPrefix: "192.168.18.252/30", - vlanId: 200, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnectionPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - peeringParameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteCrossConnectionBgpPeeringCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts deleted file mode 100644 index b4f2df43ddc8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @summary Deletes the specified peering from the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json - */ -async function deleteExpressRouteCrossConnectionBgpPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnectionPeerings.beginDeleteAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRouteCrossConnectionBgpPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts deleted file mode 100644 index ff089163b2f4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified peering for the ExpressRouteCrossConnection. - * - * @summary Gets the specified peering for the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json - */ -async function getExpressRouteCrossConnectionBgpPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnectionPeerings.get( - resourceGroupName, - crossConnectionName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCrossConnectionBgpPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts deleted file mode 100644 index 3f492820fc69..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @summary Gets all peerings in a specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json - */ -async function expressRouteCrossConnectionBgpPeeringList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnectionPeerings.list( - resourceGroupName, - crossConnectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRouteCrossConnectionBgpPeeringList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 636347917cfa..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCrossConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update the specified ExpressRouteCrossConnection. - * - * @summary Update the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionUpdate.json - */ -async function updateExpressRouteCrossConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const parameters: ExpressRouteCrossConnection = { - serviceProviderProvisioningState: "NotProvisioned", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - crossConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateExpressRouteCrossConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsGetSample.ts deleted file mode 100644 index a7b1a43058f8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsGetSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets details about the specified ExpressRouteCrossConnection. - * - * @summary Gets details about the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionGet.json - */ -async function getExpressRouteCrossConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.get( - resourceGroupName, - crossConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCrossConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts deleted file mode 100644 index 29849afa96b7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @summary Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsArpTable.json - */ -async function getExpressRouteCrossConnectionsArpTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginListArpTableAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCrossConnectionsArpTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts deleted file mode 100644 index 438cccc1e9ec..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @summary Retrieves all the ExpressRouteCrossConnections in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json - */ -async function expressRouteCrossConnectionListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnections.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRouteCrossConnectionListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts deleted file mode 100644 index 93839ebedaf9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @summary Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsRouteTable.json - */ -async function getExpressRouteCrossConnectionsRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginListRoutesTableAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCrossConnectionsRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts deleted file mode 100644 index e3ea1a31b7a5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the route table summary associated with the express route cross connection in a resource group. - * - * @summary Gets the route table summary associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json - */ -async function getExpressRouteCrossConnectionsRouteTableSummary(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginListRoutesTableSummaryAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCrossConnectionsRouteTableSummary(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListSample.ts deleted file mode 100644 index e9ebac3b499e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @summary Retrieves all the ExpressRouteCrossConnections in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionList.json - */ -async function expressRouteCrossConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnections.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRouteCrossConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts deleted file mode 100644 index 31f0dba69a0a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an express route cross connection tags. - * - * @summary Updates an express route cross connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCrossConnectionUpdateTags.json - */ -async function updateExpressRouteCrossConnectionTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const crossConnectionParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.updateTags( - resourceGroupName, - crossConnectionName, - crossConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateExpressRouteCrossConnectionTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 3737fd118769..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a ExpressRoute gateway in a specified resource group. - * - * @summary Creates or updates a ExpressRoute gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayCreate.json - */ -async function expressRouteGatewayCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "gateway-2"; - const putExpressRouteGatewayParameters: ExpressRouteGateway = { - allowNonVirtualWanTraffic: false, - autoScaleConfiguration: { bounds: { min: 3 } }, - location: "westus", - virtualHub: { - id: "/subscriptions/subid/resourceGroups/resourceGroupId/providers/Microsoft.Network/virtualHubs/virtualHubName", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRouteGatewayName, - putExpressRouteGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysDeleteSample.ts deleted file mode 100644 index 482b795dc80f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysDeleteSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * - * @summary Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayDelete.json - */ -async function expressRouteGatewayDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginDeleteAndWait( - resourceGroupName, - expressRouteGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysGetSample.ts deleted file mode 100644 index 28f5e8182a03..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysGetSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Fetches the details of a ExpressRoute gateway in a resource group. - * - * @summary Fetches the details of a ExpressRoute gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayGet.json - */ -async function expressRouteGatewayGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.get( - resourceGroupName, - expressRouteGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts deleted file mode 100644 index 9aae2b37b5a5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists ExpressRoute gateways in a given resource group. - * - * @summary Lists ExpressRoute gateways in a given resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayListByResourceGroup.json - */ -async function expressRouteGatewayListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteGateways.listByResourceGroup(resourceGroupName); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts deleted file mode 100644 index f2b19e79f6fd..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists ExpressRoute gateways under a given subscription. - * - * @summary Lists ExpressRoute gateways under a given subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayListBySubscription.json - */ -async function expressRouteGatewayListBySubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.listBySubscription(); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysUpdateTagsSample.ts deleted file mode 100644 index c52457ab60f3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates express route gateway tags. - * - * @summary Updates express route gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayUpdateTags.json - */ -async function expressRouteGatewayUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const expressRouteGatewayParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginUpdateTagsAndWait( - resourceGroupName, - expressRouteGatewayName, - expressRouteGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteLinksGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteLinksGetSample.ts deleted file mode 100644 index 7b42cecd8e6a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteLinksGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the specified ExpressRouteLink resource. - * - * @summary Retrieves the specified ExpressRouteLink resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteLinkGet.json - */ -async function expressRouteLinkGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const linkName = "linkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteLinks.get( - resourceGroupName, - expressRoutePortName, - linkName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteLinkGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteLinksListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteLinksListSample.ts deleted file mode 100644 index d8344d04c009..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteLinksListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * - * @summary Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteLinkList.json - */ -async function expressRouteLinkGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteLinks.list( - resourceGroupName, - expressRoutePortName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRouteLinkGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts deleted file mode 100644 index 3b1d935ed6f5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRoutePortAuthorization} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an authorization in the specified express route port. - * - * @summary Creates or updates an authorization in the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationCreate.json - */ -async function createExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizatinName"; - const authorizationParameters: ExpressRoutePortAuthorization = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRoutePortAuthorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - authorizationName, - authorizationParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts deleted file mode 100644 index 4a90cf132ba2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified authorization from the specified express route port. - * - * @summary Deletes the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationDelete.json - */ -async function deleteExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortAuthorizations.beginDeleteAndWait( - resourceGroupName, - expressRoutePortName, - authorizationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsGetSample.ts deleted file mode 100644 index b388ea2f1f0c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified authorization from the specified express route port. - * - * @summary Gets the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationGet.json - */ -async function getExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortAuthorizations.get( - resourceGroupName, - expressRoutePortName, - authorizationName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsListSample.ts deleted file mode 100644 index 04ac2dd70de1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortAuthorizationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all authorizations in an express route port. - * - * @summary Gets all authorizations in an express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortAuthorizationList.json - */ -async function listExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePortAuthorizations.list( - resourceGroupName, - expressRoutePortName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsCreateOrUpdateSample.ts deleted file mode 100644 index 23cf5c57aed2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsCreateOrUpdateSample.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { ExpressRoutePort} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. - * - * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortCreate.json - */ -async function expressRoutePortCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters: ExpressRoutePort = { - bandwidthInGbps: 100, - billingType: "UnlimitedData", - encapsulation: "QinQ", - location: "westus", - peeringLocation: "peeringLocationName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. - * - * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortUpdateLink.json - */ -async function expressRoutePortUpdateLink(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters: ExpressRoutePort = { - bandwidthInGbps: 100, - billingType: "UnlimitedData", - encapsulation: "QinQ", - links: [{ name: "link1", adminState: "Enabled" }], - location: "westus", - peeringLocation: "peeringLocationName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRoutePortCreate(); - await expressRoutePortUpdateLink(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsDeleteSample.ts deleted file mode 100644 index 9a05065b93fa..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified ExpressRoutePort resource. - * - * @summary Deletes the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortDelete.json - */ -async function expressRoutePortDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginDeleteAndWait( - resourceGroupName, - expressRoutePortName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRoutePortDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsGenerateLoaSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsGenerateLoaSample.ts deleted file mode 100644 index 4d1940dcb197..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsGenerateLoaSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - GenerateExpressRoutePortsLOARequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Generate a letter of authorization for the requested ExpressRoutePort resource. - * - * @summary Generate a letter of authorization for the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GenerateExpressRoutePortsLOA.json - */ -async function generateExpressRoutePortLoa(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const request: GenerateExpressRoutePortsLOARequest = { - customerName: "customerName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.generateLOA( - resourceGroupName, - expressRoutePortName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await generateExpressRoutePortLoa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsGetSample.ts deleted file mode 100644 index 5622a814cbd0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the requested ExpressRoutePort resource. - * - * @summary Retrieves the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortGet.json - */ -async function expressRoutePortGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.get( - resourceGroupName, - expressRoutePortName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRoutePortGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsListByResourceGroupSample.ts deleted file mode 100644 index 2317ebd5287c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all the ExpressRoutePort resources in the specified resource group. - * - * @summary List all the ExpressRoutePort resources in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortListByResourceGroup.json - */ -async function expressRoutePortListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePorts.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRoutePortListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsListSample.ts deleted file mode 100644 index 965b41583df2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all the ExpressRoutePort resources in the specified subscription. - * - * @summary List all the ExpressRoutePort resources in the specified subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortList.json - */ -async function expressRoutePortList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePorts.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRoutePortList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsLocationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsLocationsGetSample.ts deleted file mode 100644 index 3e719336fba9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsLocationsGetSample.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * - * @summary Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortsLocationGet.json - */ -async function expressRoutePortsLocationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const locationName = "locationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortsLocations.get(locationName); - console.log(result); -} - -async function main(): Promise { - await expressRoutePortsLocationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsLocationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsLocationsListSample.ts deleted file mode 100644 index c2bac2cc175c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsLocationsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * - * @summary Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortsLocationList.json - */ -async function expressRoutePortsLocationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePortsLocations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRoutePortsLocationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsUpdateTagsSample.ts deleted file mode 100644 index 60a4e13a1365..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRoutePortsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update ExpressRoutePort tags. - * - * @summary Update ExpressRoutePort tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortUpdateTags.json - */ -async function expressRoutePortUpdateTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.updateTags( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRoutePortUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteProviderPortSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteProviderPortSample.ts deleted file mode 100644 index 51a8fd077ee0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteProviderPortSample.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves detail of a provider port. - * - * @summary Retrieves detail of a provider port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/expressRouteProviderPort.json - */ -async function expressRouteProviderPort(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const providerport = "abc"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteProviderPort(providerport); - console.log(result); -} - -async function main(): Promise { - await expressRouteProviderPort(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteProviderPortsLocationListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteProviderPortsLocationListSample.ts deleted file mode 100644 index f7b088eb354f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteProviderPortsLocationListSample.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteProviderPorts in a subscription. - * - * @summary Retrieves all the ExpressRouteProviderPorts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/expressRouteProviderPortList.json - */ -async function expressRouteProviderPortList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteProviderPortsLocation.list(); - console.log(result); -} - -async function main(): Promise { - await expressRouteProviderPortList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteServiceProvidersListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/expressRouteServiceProvidersListSample.ts deleted file mode 100644 index b912795d8a9e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/expressRouteServiceProvidersListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the available express route service providers. - * - * @summary Gets all the available express route service providers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteProviderList.json - */ -async function listExpressRouteProviders(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteServiceProviders.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteProviders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index d17c3fb0de31..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { FirewallPolicy} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Firewall Policy. - * - * @summary Creates or updates the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyPut.json - */ -async function createFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: FirewallPolicy = { - dnsSettings: { - enableProxy: true, - requireProxyForNetworkRules: false, - servers: ["30.3.4.5"], - }, - explicitProxy: { - enableExplicitProxy: true, - enablePacFile: true, - httpPort: 8087, - httpsPort: 8087, - pacFile: - "https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D", - pacFilePort: 8087, - }, - insights: { - isEnabled: true, - logAnalyticsResources: { - defaultWorkspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", - }, - workspaces: [ - { - region: "westus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", - }, - }, - { - region: "eastus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", - }, - }, - ], - }, - retentionDays: 100, - }, - intrusionDetection: { - configuration: { - bypassTrafficSettings: [ - { - name: "bypassRule1", - description: "Rule 1", - destinationAddresses: ["5.6.7.8"], - destinationPorts: ["*"], - sourceAddresses: ["1.2.3.4"], - protocol: "TCP", - }, - ], - signatureOverrides: [{ id: "2525004", mode: "Deny" }], - }, - mode: "Alert", - profile: "Balanced", - }, - location: "West US", - sku: { tier: "Premium" }, - snat: { privateRanges: ["IANAPrivateRanges"] }, - sql: { allowSqlRedirect: true }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - threatIntelWhitelist: { - fqdns: ["*.microsoft.com"], - ipAddresses: ["20.3.4.5"], - }, - transportSecurity: { - certificateAuthority: { - name: "clientcert", - keyVaultSecretId: "https://kv/secret", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesDeleteSample.ts deleted file mode 100644 index f4f7663379a0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Firewall Policy. - * - * @summary Deletes the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDelete.json - */ -async function deleteFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.beginDeleteAndWait( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesGetSample.ts deleted file mode 100644 index 4153d78caee1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Firewall Policy. - * - * @summary Gets the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyGet.json - */ -async function getFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.get( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesListAllSample.ts deleted file mode 100644 index d59921122199..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Firewall Policies in a subscription. - * - * @summary Gets all the Firewall Policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyListBySubscription.json - */ -async function listAllFirewallPoliciesForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicies.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllFirewallPoliciesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesListSample.ts deleted file mode 100644 index c5ac32dfbb9c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Firewall Policies in a resource group. - * - * @summary Lists all Firewall Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyListByResourceGroup.json - */ -async function listAllFirewallPoliciesForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicies.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllFirewallPoliciesForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesUpdateTagsSample.ts deleted file mode 100644 index 4afd0973ecbf..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPoliciesUpdateTagsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of a Azure Firewall Policy resource. - * - * @summary Updates tags of a Azure Firewall Policy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyPatch.json - */ -async function updateFirewallPolicyTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const firewallPolicyName = "firewallPolicy"; - const parameters: TagsObject = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.updateTags( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateFirewallPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDeploymentsDeploySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDeploymentsDeploySample.ts deleted file mode 100644 index b2de0e6232f0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDeploymentsDeploySample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deploys the firewall policy draft and child rule collection group drafts. - * - * @summary Deploys the firewall policy draft and child rule collection group drafts. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftDeploy.json - */ -async function deployFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDeployments.beginDeployAndWait( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await deployFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts deleted file mode 100644 index 03cce8d10503..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FirewallPolicyDraft} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a draft Firewall Policy. - * - * @summary Create or update a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftPut.json - */ -async function createOrUpdateFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: FirewallPolicyDraft = { - dnsSettings: { - enableProxy: true, - requireProxyForNetworkRules: false, - servers: ["30.3.4.5"], - }, - explicitProxy: { - enableExplicitProxy: true, - enablePacFile: true, - httpPort: 8087, - httpsPort: 8087, - pacFile: - "https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D", - pacFilePort: 8087, - }, - insights: { - isEnabled: true, - logAnalyticsResources: { - defaultWorkspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", - }, - workspaces: [ - { - region: "westus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", - }, - }, - { - region: "eastus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", - }, - }, - ], - }, - retentionDays: 100, - }, - intrusionDetection: { - configuration: { - bypassTrafficSettings: [ - { - name: "bypassRule1", - description: "Rule 1", - destinationAddresses: ["5.6.7.8"], - destinationPorts: ["*"], - sourceAddresses: ["1.2.3.4"], - protocol: "TCP", - }, - ], - signatureOverrides: [{ id: "2525004", mode: "Deny" }], - }, - mode: "Alert", - profile: "Balanced", - }, - snat: { privateRanges: ["IANAPrivateRanges"] }, - sql: { allowSqlRedirect: true }, - threatIntelMode: "Alert", - threatIntelWhitelist: { - fqdns: ["*.microsoft.com"], - ipAddresses: ["20.3.4.5"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.createOrUpdate( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsDeleteSample.ts deleted file mode 100644 index c26ef5a36f38..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a draft policy. - * - * @summary Delete a draft policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftDelete.json - */ -async function deleteFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.delete( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsGetSample.ts deleted file mode 100644 index 17333d64f162..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyDraftsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a draft Firewall Policy. - * - * @summary Get a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftGet.json - */ -async function getFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.get( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts deleted file mode 100644 index 0f3ae1dd607d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SignatureOverridesFilterValuesQuery} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the current filter values for the signatures overrides - * - * @summary Retrieves the current filter values for the signatures overrides - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json - */ -async function querySignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: SignatureOverridesFilterValuesQuery = { - filterName: "severity", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesFilterValues.list( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await querySignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesListSample.ts deleted file mode 100644 index 45a139408d42..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesListSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { IdpsQueryObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * - * @summary Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyQuerySignatureOverrides.json - */ -async function querySignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: IdpsQueryObject = { - filters: [{ field: "Mode", values: ["Deny"] }], - orderBy: { field: "severity", order: "Ascending" }, - resultsPerPage: 20, - search: "", - skip: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignatures.list( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await querySignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts deleted file mode 100644 index 132ba5c89227..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all signatures overrides for a specific policy. - * - * @summary Returns all signatures overrides for a specific policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesGet.json - */ -async function getSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.get( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts deleted file mode 100644 index 9cb47fa43ba0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all signatures overrides objects for a specific policy as a list containing a single value. - * - * @summary Returns all signatures overrides objects for a specific policy as a list containing a single value. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesList.json - */ -async function getSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.list( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts deleted file mode 100644 index 5a06c0394cab..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SignaturesOverrides} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Will update the status of policy's signature overrides for IDPS - * - * @summary Will update the status of policy's signature overrides for IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesPatch.json - */ -async function patchSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: SignaturesOverrides = { - name: "default", - type: "Microsoft.Network/firewallPolicies/signatureOverrides", - id: "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", - properties: { signatures: { "2000105": "Off", "2000106": "Deny" } }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.patch( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await patchSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts deleted file mode 100644 index c80254fd5776..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SignaturesOverrides} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Will override/create a new signature overrides for the policy's IDPS - * - * @summary Will override/create a new signature overrides for the policy's IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicySignatureOverridesPut.json - */ -async function putSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: SignaturesOverrides = { - name: "default", - type: "Microsoft.Network/firewallPolicies/signatureOverrides", - id: "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", - properties: { signatures: { "2000105": "Off", "2000106": "Deny" } }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.put( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts deleted file mode 100644 index bac63a81dd3b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FirewallPolicyRuleCollectionGroupDraft} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update Rule Collection Group Draft. - * - * @summary Create or Update Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json - */ -async function createOrUpdateRuleCollectionGroupDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroupDraft = { - priority: 100, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - priority: 100, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-rule1", - destinationAddresses: ["*"], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceAddresses: ["10.1.25.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroupDrafts.createOrUpdate( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts deleted file mode 100644 index 8f37ddd98974..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete Rule Collection Group Draft. - * - * @summary Delete Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json - */ -async function deleteFirewallRuleCollectionGroupDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroupDrafts.delete( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteFirewallRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts deleted file mode 100644 index 0bf29483918b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get Rule Collection Group Draft. - * - * @summary Get Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json - */ -async function getRuleCollectionGroupDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroupDrafts.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await getRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 2c51ef4e1f3f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FirewallPolicyRuleCollectionGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json - */ -async function createFirewallPolicyNatRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 100, - ruleCollections: [ - { - name: "Example-Nat-Rule-Collection", - action: { type: "DNAT" }, - priority: 100, - ruleCollectionType: "FirewallPolicyNatRuleCollection", - rules: [ - { - name: "nat-rule1", - destinationAddresses: ["152.23.32.23"], - destinationPorts: ["8080"], - ipProtocols: ["TCP", "UDP"], - ruleType: "NatRule", - sourceAddresses: ["2.2.2.2"], - sourceIpGroups: [], - translatedFqdn: "internalhttp.server.net", - translatedPort: "8080", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupPut.json - */ -async function createFirewallPolicyRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 100, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - priority: 100, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-rule1", - destinationAddresses: ["*"], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceAddresses: ["10.1.25.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json - */ -async function createFirewallPolicyRuleCollectionGroupWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-1", - destinationIpGroups: [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups2", - ], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceIpGroups: [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups1", - ], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json - */ -async function createFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - ruleType: "ApplicationRule", - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - webCategories: ["Hacking"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json - */ -async function createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Allow" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "rule1", - description: "Insert trusted tenants header", - fqdnTags: ["WindowsVirtualDesktop"], - httpHeadersToInsert: [ - { - headerName: "Restrict-Access-To-Tenants", - headerValue: "contoso.com,fabrikam.onmicrosoft.com", - }, - ], - protocols: [{ port: 80, protocolType: "Http" }], - ruleType: "ApplicationRule", - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createFirewallPolicyNatRuleCollectionGroup(); - await createFirewallPolicyRuleCollectionGroup(); - await createFirewallPolicyRuleCollectionGroupWithIPGroups(); - await createFirewallPolicyRuleCollectionGroupWithWebCategories(); - await createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts deleted file mode 100644 index 0015076f8cf3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Deletes the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupDelete.json - */ -async function deleteFirewallPolicyRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginDeleteAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteFirewallPolicyRuleCollectionGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts deleted file mode 100644 index 2c61d959649c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json - */ -async function getFirewallPolicyNatRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupGet.json - */ -async function getFirewallPolicyRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json - */ -async function getFirewallPolicyRuleCollectionGroupWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json - */ -async function getFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await getFirewallPolicyNatRuleCollectionGroup(); - await getFirewallPolicyRuleCollectionGroup(); - await getFirewallPolicyRuleCollectionGroupWithIPGroups(); - await getFirewallPolicyRuleCollectionGroupWithWebCategories(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts deleted file mode 100644 index 93d96cefb310..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllFirewallPolicyRuleCollectionGroupWithWebCategories(); - await listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy(); - await listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/flowLogsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/flowLogsCreateOrUpdateSample.ts deleted file mode 100644 index 57a023fdee0d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/flowLogsCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { FlowLog} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a flow log for the specified network security group. - * - * @summary Create or update a flow log for the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogCreate.json - */ -async function createOrUpdateFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "fl"; - const parameters: FlowLog = { - format: { type: "JSON", version: 1 }, - enabled: true, - enabledFilteringCriteria: "srcIP=158.255.7.8 || dstPort=56891", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": - {}, - }, - }, - location: "centraluseuap", - recordTypes: "B,E", - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/flowLogsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/flowLogsDeleteSample.ts deleted file mode 100644 index 12fb72fc6e05..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/flowLogsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified flow log resource. - * - * @summary Deletes the specified flow log resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogDelete.json - */ -async function deleteFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "fl"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - flowLogName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/flowLogsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/flowLogsGetSample.ts deleted file mode 100644 index 6c583aa97daa..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/flowLogsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a flow log resource by name. - * - * @summary Gets a flow log resource by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogGet.json - */ -async function getFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "flowLog1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.get( - resourceGroupName, - networkWatcherName, - flowLogName, - ); - console.log(result); -} - -async function main(): Promise { - await getFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/flowLogsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/flowLogsListSample.ts deleted file mode 100644 index 33d56a78262f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/flowLogsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all flow log resources for the specified Network Watcher. - * - * @summary Lists all flow log resources for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogList.json - */ -async function listConnectionMonitors(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.flowLogs.list( - resourceGroupName, - networkWatcherName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listConnectionMonitors(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/flowLogsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/flowLogsUpdateTagsSample.ts deleted file mode 100644 index cd7074414dbb..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/flowLogsUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update tags of the specified flow log. - * - * @summary Update tags of the specified flow log. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogUpdateTags.json - */ -async function updateFlowLogTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw"; - const flowLogName = "fl"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.updateTags( - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateFlowLogTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts deleted file mode 100644 index 635ea9130f87..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualWanVpnProfileParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * - * @summary Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json - */ -async function generateVirtualWanVpnServerConfigurationVpnProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const vpnClientParams: VirtualWanVpnProfileParameters = { - authenticationMethod: "EAPTLS", - vpnServerConfigurationResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnconfig1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.beginGeneratevirtualwanvpnserverconfigurationvpnprofileAndWait( - resourceGroupName, - virtualWANName, - vpnClientParams, - ); - console.log(result); -} - -async function main(): Promise { - await generateVirtualWanVpnServerConfigurationVpnProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/getActiveSessionsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/getActiveSessionsSample.ts deleted file mode 100644 index 07d9621f3ac1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/getActiveSessionsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. - * - * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionSessionsList.json - */ -async function returnsAListOfCurrentlyActiveSessionsOnTheBastion(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.beginListActiveSessionsAndWait( - resourceGroupName, - bastionHostName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await returnsAListOfCurrentlyActiveSessionsOnTheBastion(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/getBastionShareableLinkSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/getBastionShareableLinkSample.ts deleted file mode 100644 index 791d11a6468e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/getBastionShareableLinkSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BastionShareableLinkListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Return the Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Return the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkGet.json - */ -async function returnsTheBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest: BastionShareableLinkListRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.listBastionShareableLink( - resourceGroupName, - bastionHostName, - bslRequest, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await returnsTheBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesCreateOrUpdateSample.ts deleted file mode 100644 index e27d43c79e5b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { HubRouteTable} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * - * @summary Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTablePut.json - */ -async function routeTablePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const routeTableParameters: HubRouteTable = { - labels: ["label1", "label2"], - routes: [ - { - name: "route1", - destinationType: "CIDR", - destinations: ["10.0.0.0/8", "20.0.0.0/8", "30.0.0.0/8"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1", - nextHopType: "ResourceId", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - routeTableParameters, - ); - console.log(result); -} - -async function main(): Promise { - await routeTablePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesDeleteSample.ts deleted file mode 100644 index 67355ad76316..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a RouteTable. - * - * @summary Deletes a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableDelete.json - */ -async function routeTableDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await routeTableDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesGetSample.ts deleted file mode 100644 index 4cabedbbafb7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a RouteTable. - * - * @summary Retrieves the details of a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableGet.json - */ -async function routeTableGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.get( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await routeTableGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesListSample.ts deleted file mode 100644 index 46ce63300d6a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/hubRouteTablesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all RouteTables. - * - * @summary Retrieves the details of all RouteTables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableList.json - */ -async function routeTableList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.hubRouteTables.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routeTableList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 0c271a980fd2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - HubVirtualNetworkConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * - * @summary Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionPut.json - */ -async function hubVirtualNetworkConnectionPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection = { - enableInternetSecurity: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/SpokeVnet1", - }, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - ], - labels: ["label1", "label2"], - }, - vnetRoutes: { - staticRoutes: [ - { - name: "route1", - addressPrefixes: ["10.1.0.0/16", "10.2.0.0/16"], - nextHopIpAddress: "10.0.0.68", - }, - { - name: "route2", - addressPrefixes: ["10.3.0.0/16", "10.4.0.0/16"], - nextHopIpAddress: "10.0.0.65", - }, - ], - staticRoutesConfig: { vnetLocalRouteOverrideCriteria: "Equal" }, - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.hubVirtualNetworkConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - connectionName, - hubVirtualNetworkConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await hubVirtualNetworkConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts deleted file mode 100644 index 4025672734a9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a HubVirtualNetworkConnection. - * - * @summary Deletes a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionDelete.json - */ -async function hubVirtualNetworkConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await hubVirtualNetworkConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsGetSample.ts deleted file mode 100644 index 02e6abb74f59..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a HubVirtualNetworkConnection. - * - * @summary Retrieves the details of a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionGet.json - */ -async function hubVirtualNetworkConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.get( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await hubVirtualNetworkConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsListSample.ts deleted file mode 100644 index 719bebe91893..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/hubVirtualNetworkConnectionsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all HubVirtualNetworkConnections. - * - * @summary Retrieves the details of all HubVirtualNetworkConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubVirtualNetworkConnectionList.json - */ -async function hubVirtualNetworkConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.hubVirtualNetworkConnections.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await hubVirtualNetworkConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesCreateOrUpdateSample.ts deleted file mode 100644 index d16d7f501835..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { InboundNatRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a load balancer inbound NAT rule. - * - * @summary Creates or updates a load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleCreate.json - */ -async function inboundNatRuleCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const inboundNatRuleParameters: InboundNatRule = { - backendPort: 3389, - enableFloatingIP: false, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/ip1", - }, - frontendPort: 3390, - idleTimeoutInMinutes: 4, - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - inboundNatRuleParameters, - ); - console.log(result); -} - -async function main(): Promise { - await inboundNatRuleCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesDeleteSample.ts deleted file mode 100644 index 4bec9e2738c7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified load balancer inbound NAT rule. - * - * @summary Deletes the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleDelete.json - */ -async function inboundNatRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await inboundNatRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesGetSample.ts deleted file mode 100644 index 1f7b5aa3f2dd..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified load balancer inbound NAT rule. - * - * @summary Gets the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleGet.json - */ -async function inboundNatRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.get( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await inboundNatRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesListSample.ts deleted file mode 100644 index ff77b1f4d88c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/inboundNatRulesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the inbound NAT rules in a load balancer. - * - * @summary Gets all the inbound NAT rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleList.json - */ -async function inboundNatRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.inboundNatRules.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await inboundNatRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts deleted file mode 100644 index cb91eb2cab13..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - InboundSecurityRule} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * - * @summary Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundSecurityRulePut.json - */ -async function createNetworkVirtualApplianceInboundSecurityRules(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const ruleCollectionName = "rule1"; - const parameters: InboundSecurityRule = { - ruleType: "Permanent", - rules: [ - { - name: "inboundRule1", - appliesOn: ["slbip1"], - destinationPortRange: 22, - destinationPortRanges: ["80-100"], - sourceAddressPrefix: "50.20.121.5/32", - protocol: "TCP", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.inboundSecurityRuleOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkVirtualApplianceInboundSecurityRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/inboundSecurityRuleGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/inboundSecurityRuleGetSample.ts deleted file mode 100644 index c6069786de45..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/inboundSecurityRuleGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * - * @summary Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundSecurityRuleGet.json - */ -async function createNetworkVirtualApplianceInboundSecurityRules(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const ruleCollectionName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundSecurityRuleOperations.get( - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkVirtualApplianceInboundSecurityRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsCreateOrUpdateSample.ts deleted file mode 100644 index bbe0042e31b2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { IpAllocation} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an IpAllocation in the specified resource group. - * - * @summary Creates or updates an IpAllocation in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationCreate.json - */ -async function createIPAllocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const parameters: IpAllocation = { - typePropertiesType: "Hypernet", - allocationTags: { - vNetID: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1", - }, - location: "centraluseuap", - prefix: "3.2.5.0/24", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.beginCreateOrUpdateAndWait( - resourceGroupName, - ipAllocationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsDeleteSample.ts deleted file mode 100644 index 61b81ddf1a33..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified IpAllocation. - * - * @summary Deletes the specified IpAllocation. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationDelete.json - */ -async function deleteIPAllocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.beginDeleteAndWait( - resourceGroupName, - ipAllocationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsGetSample.ts deleted file mode 100644 index 2651fbb841cf..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified IpAllocation by resource group. - * - * @summary Gets the specified IpAllocation by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationGet.json - */ -async function getIPAllocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.get( - resourceGroupName, - ipAllocationName, - ); - console.log(result); -} - -async function main(): Promise { - await getIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsListByResourceGroupSample.ts deleted file mode 100644 index afc0c06c8510..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all IpAllocations in a resource group. - * - * @summary Gets all IpAllocations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationListByResourceGroup.json - */ -async function listIPAllocationsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipAllocations.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listIPAllocationsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsListSample.ts deleted file mode 100644 index 76ece81a3d65..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all IpAllocations in a subscription. - * - * @summary Gets all IpAllocations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationList.json - */ -async function listAllIPAllocations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipAllocations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllIPAllocations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsUpdateTagsSample.ts deleted file mode 100644 index 007a0cc69e3b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipAllocationsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a IpAllocation tags. - * - * @summary Updates a IpAllocation tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationUpdateTags.json - */ -async function updateVirtualNetworkTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.updateTags( - resourceGroupName, - ipAllocationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 5003fc1c944b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { IpGroup} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an ipGroups in a specified resource group. - * - * @summary Creates or updates an ipGroups in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsCreate.json - */ -async function createOrUpdateIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const parameters: IpGroup = { - ipAddresses: ["13.64.39.16/32", "40.74.146.80/31", "40.74.147.32/28"], - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - ipGroupsName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsDeleteSample.ts deleted file mode 100644 index 54f224f46c15..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsDeleteSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified ipGroups. - * - * @summary Deletes the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsDelete.json - */ -async function deleteIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.beginDeleteAndWait( - resourceGroupName, - ipGroupsName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsGetSample.ts deleted file mode 100644 index 9ec4dc4117a7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified ipGroups. - * - * @summary Gets the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsGet.json - */ -async function getIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.get(resourceGroupName, ipGroupsName); - console.log(result); -} - -async function main(): Promise { - await getIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsListByResourceGroupSample.ts deleted file mode 100644 index a0ab556fef47..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all IpGroups in a resource group. - * - * @summary Gets all IpGroups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsListByResourceGroup.json - */ -async function listByResourceGroupIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipGroups.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listByResourceGroupIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsListSample.ts deleted file mode 100644 index 8df063011349..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all IpGroups in a subscription. - * - * @summary Gets all IpGroups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsListBySubscription.json - */ -async function listIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipGroups.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsUpdateGroupsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsUpdateGroupsSample.ts deleted file mode 100644 index 7672d20d46fd..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipGroupsUpdateGroupsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of an IpGroups resource. - * - * @summary Updates tags of an IpGroups resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsUpdateTags.json - */ -async function updateIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const parameters: TagsObject = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.updateGroups( - resourceGroupName, - ipGroupsName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsCreateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsCreateSample.ts deleted file mode 100644 index b25f8f01e5cc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsCreateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { IpamPool} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates/Updates the Pool resource. - * - * @summary Creates/Updates the Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Create.json - */ -async function ipamPoolsCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const body: IpamPool = { - location: "eastus", - properties: { - description: "Test description.", - addressPrefixes: ["10.0.0.0/24"], - parentPoolName: "", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.beginCreateAndWait( - resourceGroupName, - networkManagerName, - poolName, - body, - ); - console.log(result); -} - -async function main(): Promise { - await ipamPoolsCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsDeleteSample.ts deleted file mode 100644 index 3ce1cef055d6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the Pool resource. - * - * @summary Delete the Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Delete.json - */ -async function ipamPoolsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main(): Promise { - await ipamPoolsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsGetPoolUsageSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsGetPoolUsageSample.ts deleted file mode 100644 index f14ee2508eaa..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsGetPoolUsageSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the Pool Usage. - * - * @summary Get the Pool Usage. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_GetPoolUsage.json - */ -async function ipamPoolsGetPoolUsage(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.getPoolUsage( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main(): Promise { - await ipamPoolsGetPoolUsage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsGetSample.ts deleted file mode 100644 index 822d68896849..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specific Pool resource. - * - * @summary Gets the specific Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Get.json - */ -async function ipamPoolsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.get( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main(): Promise { - await ipamPoolsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsListAssociatedResourcesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsListAssociatedResourcesSample.ts deleted file mode 100644 index 2c44c85b1e4c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsListAssociatedResourcesSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List Associated Resource in the Pool. - * - * @summary List Associated Resource in the Pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_ListAssociatedResources.json - */ -async function ipamPoolsListAssociatedResources(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipamPools.listAssociatedResources( - resourceGroupName, - networkManagerName, - poolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await ipamPoolsListAssociatedResources(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsListSample.ts deleted file mode 100644 index 67dfc4d14c1e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of Pool resources at Network Manager level. - * - * @summary Gets list of Pool resources at Network Manager level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_List.json - */ -async function ipamPoolsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipamPools.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await ipamPoolsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsUpdateSample.ts deleted file mode 100644 index 4deacb605332..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/ipamPoolsUpdateSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the specific Pool resource. - * - * @summary Updates the specific Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Update.json - */ -async function ipamPoolsUpdate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.update( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main(): Promise { - await ipamPoolsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/listActiveConnectivityConfigurationsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/listActiveConnectivityConfigurationsSample.ts deleted file mode 100644 index 82579734d4f1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/listActiveConnectivityConfigurationsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ActiveConfigurationParameter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists active connectivity configurations in a network manager. - * - * @summary Lists active connectivity configurations in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json - */ -async function listActiveConnectivityConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const parameters: ActiveConfigurationParameter = { - regions: ["westus"], - skipToken: "fakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listActiveConnectivityConfigurations( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await listActiveConnectivityConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/listActiveSecurityAdminRulesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/listActiveSecurityAdminRulesSample.ts deleted file mode 100644 index bcefc1f10e2f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/listActiveSecurityAdminRulesSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ActiveConfigurationParameter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists active security admin rules in a network manager. - * - * @summary Lists active security admin rules in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerActiveSecurityAdminRulesList.json - */ -async function listActiveSecurityAdminRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const parameters: ActiveConfigurationParameter = { - regions: ["westus"], - skipToken: "fakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listActiveSecurityAdminRules( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await listActiveSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts deleted file mode 100644 index 60cd5793b74a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - QueryRequestOptions} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all effective connectivity configurations applied on a virtual network. - * - * @summary List all effective connectivity configurations applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json - */ -async function listEffectiveConnectivityConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const virtualNetworkName = "testVirtualNetwork"; - const parameters: QueryRequestOptions = { skipToken: "FakeSkipTokenCode" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.listNetworkManagerEffectiveConnectivityConfigurations( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await listEffectiveConnectivityConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts deleted file mode 100644 index d1dfa24527bd..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - QueryRequestOptions} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all effective security admin rules applied on a virtual network. - * - * @summary List all effective security admin rules applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json - */ -async function listEffectiveSecurityAdminRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const virtualNetworkName = "testVirtualNetwork"; - const parameters: QueryRequestOptions = { skipToken: "FakeSkipTokenCode" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listNetworkManagerEffectiveSecurityAdminRules( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await listEffectiveSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts deleted file mode 100644 index a3baca7c2592..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BackendAddressPool} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a load balancer backend address pool. - * - * @summary Creates or updates a load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json - */ -async function updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const parameters: BackendAddressPool = { - loadBalancerBackendAddresses: [ - { - name: "address1", - ipAddress: "10.0.0.4", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - { - name: "address2", - ipAddress: "10.0.0.5", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.loadBalancerBackendAddressPools.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts deleted file mode 100644 index ccafde037f0a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified load balancer backend address pool. - * - * @summary Deletes the specified load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerBackendAddressPoolDelete.json - */ -async function backendAddressPoolDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.loadBalancerBackendAddressPools.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -async function main(): Promise { - await backendAddressPoolDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts deleted file mode 100644 index ebc4353c271b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets load balancer backend address pool. - * - * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json - */ -async function loadBalancerWithBackendAddressPoolWithBackendAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.get( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets load balancer backend address pool. - * - * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerBackendAddressPoolGet.json - */ -async function loadBalancerBackendAddressPoolGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.get( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -async function main(): Promise { - await loadBalancerWithBackendAddressPoolWithBackendAddresses(); - await loadBalancerBackendAddressPoolGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsListSample.ts deleted file mode 100644 index 9734401c4037..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerBackendAddressPoolsListSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancer backed address pools. - * - * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json - */ -async function loadBalancerWithBackendAddressPoolContainingBackendAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerBackendAddressPools.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets all the load balancer backed address pools. - * - * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerBackendAddressPoolList.json - */ -async function loadBalancerBackendAddressPoolList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerBackendAddressPools.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerWithBackendAddressPoolContainingBackendAddresses(); - await loadBalancerBackendAddressPoolList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts deleted file mode 100644 index 25c7beff111d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets load balancer frontend IP configuration. - * - * @summary Gets load balancer frontend IP configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerFrontendIPConfigurationGet.json - */ -async function loadBalancerFrontendIPConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const frontendIPConfigurationName = "frontend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerFrontendIPConfigurations.get( - resourceGroupName, - loadBalancerName, - frontendIPConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await loadBalancerFrontendIPConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts deleted file mode 100644 index 68820dbf7c4a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancer frontend IP configurations. - * - * @summary Gets all the load balancer frontend IP configurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerFrontendIPConfigurationList.json - */ -async function loadBalancerFrontendIPConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerFrontendIPConfigurations.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerFrontendIPConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts deleted file mode 100644 index f653e187fbec..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified load balancer load balancing rule. - * - * @summary Gets the specified load balancer load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerLoadBalancingRuleGet.json - */ -async function loadBalancerLoadBalancingRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const loadBalancingRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerLoadBalancingRules.get( - resourceGroupName, - loadBalancerName, - loadBalancingRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await loadBalancerLoadBalancingRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts deleted file mode 100644 index af2bf8349970..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get health details of a load balancing rule. - * - * @summary Get health details of a load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerHealth.json - */ -async function queryLoadBalancingRuleHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const loadBalancingRuleName = "rulelb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerLoadBalancingRules.beginHealthAndWait( - groupName, - loadBalancerName, - loadBalancingRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await queryLoadBalancingRuleHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesListSample.ts deleted file mode 100644 index eba046dc9397..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerLoadBalancingRulesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancing rules in a load balancer. - * - * @summary Gets all the load balancing rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerLoadBalancingRuleList.json - */ -async function loadBalancerLoadBalancingRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerLoadBalancingRules.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerLoadBalancingRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerNetworkInterfacesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerNetworkInterfacesListSample.ts deleted file mode 100644 index 64180175dae0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerNetworkInterfacesListSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets associated load balancer network interfaces. - * - * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerNetworkInterfaceListSimple.json - */ -async function loadBalancerNetworkInterfaceListSimple(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerNetworkInterfaces.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets associated load balancer network interfaces. - * - * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerNetworkInterfaceListVmss.json - */ -async function loadBalancerNetworkInterfaceListVmss(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerNetworkInterfaces.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerNetworkInterfaceListSimple(); - await loadBalancerNetworkInterfaceListVmss(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerOutboundRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerOutboundRulesGetSample.ts deleted file mode 100644 index 16a0bb6fa4c0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerOutboundRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified load balancer outbound rule. - * - * @summary Gets the specified load balancer outbound rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerOutboundRuleGet.json - */ -async function loadBalancerOutboundRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const outboundRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerOutboundRules.get( - resourceGroupName, - loadBalancerName, - outboundRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await loadBalancerOutboundRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerOutboundRulesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerOutboundRulesListSample.ts deleted file mode 100644 index 1483a9fa3067..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerOutboundRulesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the outbound rules in a load balancer. - * - * @summary Gets all the outbound rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerOutboundRuleList.json - */ -async function loadBalancerOutboundRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerOutboundRules.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerOutboundRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerProbesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerProbesGetSample.ts deleted file mode 100644 index b70182f7814e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerProbesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets load balancer probe. - * - * @summary Gets load balancer probe. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerProbeGet.json - */ -async function loadBalancerProbeGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const probeName = "probe1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerProbes.get( - resourceGroupName, - loadBalancerName, - probeName, - ); - console.log(result); -} - -async function main(): Promise { - await loadBalancerProbeGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerProbesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerProbesListSample.ts deleted file mode 100644 index 3ad753091d12..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancerProbesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancer probes. - * - * @summary Gets all the load balancer probes. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerProbeList.json - */ -async function loadBalancerProbeList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerProbes.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerProbeList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersCreateOrUpdateSample.ts deleted file mode 100644 index 114343c378d5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersCreateOrUpdateSample.ts +++ /dev/null @@ -1,803 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { LoadBalancer} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreate.json - */ -async function createLoadBalancer(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - scope: "Public", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateWithZones.json - */ -async function createLoadBalancerWithFrontendIPInZone1(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - zones: ["1"], - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json - */ -async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - gatewayLoadBalancer: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json - */ -async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [ - { - name: "be-lb", - tunnelInterfaces: [ - { type: "Internal", identifier: 900, port: 15000, protocol: "VXLAN" }, - { type: "Internal", identifier: 901, port: 15001, protocol: "VXLAN" }, - ], - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPools: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - ], - backendPort: 0, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 0, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "All", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Gateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json - */ -async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb1" }, { name: "be-lb2" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: {}, - backendAddressPools: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb2", - }, - ], - backendPort: 0, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 0, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "All", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Gateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateGlobalTier.json - */ -async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [ - { - name: "be-lb", - loadBalancerBackendAddresses: [ - { - name: "regional-lb1-address", - loadBalancerFrontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/regional-lb-rg1/providers/Microsoft.Network/loadBalancers/regional-lb/frontendIPConfigurations/fe-rlb", - }, - }, - ], - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard", tier: "Global" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateStandardSku.json - */ -async function createLoadBalancerWithStandardSku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json - */ -async function createLoadBalancerWithSyncModePropertyOnPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [ - { - name: "be-lb", - syncMode: "Automatic", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateWithInboundNatPool.json - */ -async function createLoadBalancerWithInboundNatPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [], - frontendIPConfigurations: [ - { - name: "test", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", - privateIPAllocationMethod: "Dynamic", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/lbvnet/subnets/lbsubnet", - }, - zones: [], - }, - ], - inboundNatPools: [ - { - name: "test", - backendPort: 8888, - enableFloatingIP: true, - enableTcpReset: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", - }, - frontendPortRangeEnd: 8085, - frontendPortRangeStart: 8080, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/inboundNatPools/test", - idleTimeoutInMinutes: 10, - protocol: "Tcp", - }, - ], - inboundNatRules: [], - loadBalancingRules: [], - location: "eastus", - outboundRules: [], - probes: [], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateWithOutboundRules.json - */ -async function createLoadBalancerWithOutboundRules(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - disableOutboundSnat: true, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [ - { - name: "rule1", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - frontendIPConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - ], - protocol: "All", - }, - ], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createLoadBalancer(); - await createLoadBalancerWithFrontendIPInZone1(); - await createLoadBalancerWithGatewayLoadBalancerConsumerConfigured(); - await createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool(); - await createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool(); - await createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool(); - await createLoadBalancerWithStandardSku(); - await createLoadBalancerWithSyncModePropertyOnPool(); - await createLoadBalancerWithInboundNatPool(); - await createLoadBalancerWithOutboundRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersDeleteSample.ts deleted file mode 100644 index 4f389700d5c9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified load balancer. - * - * @summary Deletes the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerDelete.json - */ -async function deleteLoadBalancer(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteLoadBalancer(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersGetSample.ts deleted file mode 100644 index 6276752da652..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified load balancer. - * - * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerGet.json - */ -async function getLoadBalancer(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.get( - resourceGroupName, - loadBalancerName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified load balancer. - * - * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerGetInboundNatRulePortMapping.json - */ -async function getLoadBalancerWithInboundNatRulePortMapping(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.get( - resourceGroupName, - loadBalancerName, - ); - console.log(result); -} - -async function main(): Promise { - await getLoadBalancer(); - await getLoadBalancerWithInboundNatRulePortMapping(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListAllSample.ts deleted file mode 100644 index 67a237c812e7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancers in a subscription. - * - * @summary Gets all the load balancers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerListAll.json - */ -async function listAllLoadBalancers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancers.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllLoadBalancers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts deleted file mode 100644 index 8ffae741b798..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - QueryInboundNatRulePortMappingRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of inbound NAT rule port mappings. - * - * @summary List of inbound NAT rule port mappings. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/QueryInboundNatRulePortMapping.json - */ -async function queryInboundNatRulePortMapping(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const backendPoolName = "bp1"; - const parameters: QueryInboundNatRulePortMappingRequest = { - ipAddress: "10.0.0.4", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.loadBalancers.beginListInboundNatRulePortMappingsAndWait( - groupName, - loadBalancerName, - backendPoolName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await queryInboundNatRulePortMapping(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListSample.ts deleted file mode 100644 index 719a3310defb..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancers in a resource group. - * - * @summary Gets all the load balancers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerList.json - */ -async function listLoadBalancersInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listLoadBalancersInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersMigrateToIPBasedSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersMigrateToIPBasedSample.ts deleted file mode 100644 index 63123a3df5f0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersMigrateToIPBasedSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - MigrateLoadBalancerToIpBasedRequest, - LoadBalancersMigrateToIpBasedOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Migrate load balancer to IP Based - * - * @summary Migrate load balancer to IP Based - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/MigrateLoadBalancerToIPBased.json - */ -async function migrateLoadBalancerToIPBased(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const parameters: MigrateLoadBalancerToIpBasedRequest = { - pools: ["pool1", "pool2"], - }; - const options: LoadBalancersMigrateToIpBasedOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.migrateToIpBased( - groupName, - loadBalancerName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await migrateLoadBalancerToIPBased(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts deleted file mode 100644 index 80b0cb11340d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - LoadBalancerVipSwapRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Swaps VIPs between two load balancers. - * - * @summary Swaps VIPs between two load balancers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancersSwapPublicIpAddresses.json - */ -async function swapViPsBetweenTwoLoadBalancers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const parameters: LoadBalancerVipSwapRequest = { - frontendIPConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/lbfe1", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/pip2", - }, - }, - { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/loadBalancers/lb2/frontendIPConfigurations/lbfe2", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginSwapPublicIpAddressesAndWait( - location, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await swapViPsBetweenTwoLoadBalancers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersUpdateTagsSample.ts deleted file mode 100644 index 113b81d15601..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/loadBalancersUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a load balancer tags. - * - * @summary Updates a load balancer tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerUpdateTags.json - */ -async function updateLoadBalancerTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.updateTags( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateLoadBalancerTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index b7494e7037d1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - LocalNetworkGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a local network gateway in the specified resource group. - * - * @summary Creates or updates a local network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayCreate.json - */ -async function createLocalNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const parameters: LocalNetworkGateway = { - fqdn: "site1.contoso.com", - gatewayIpAddress: "11.12.13.14", - localNetworkAddressSpace: { addressPrefixes: ["10.1.0.0/16"] }, - location: "Central US", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - localNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysDeleteSample.ts deleted file mode 100644 index 4c094562814b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified local network gateway. - * - * @summary Deletes the specified local network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayDelete.json - */ -async function deleteLocalNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.beginDeleteAndWait( - resourceGroupName, - localNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysGetSample.ts deleted file mode 100644 index 2cba56f38be8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified local network gateway in a resource group. - * - * @summary Gets the specified local network gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayGet.json - */ -async function getLocalNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.get( - resourceGroupName, - localNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysListSample.ts deleted file mode 100644 index f76ea94719f1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the local network gateways in a resource group. - * - * @summary Gets all the local network gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayList.json - */ -async function listLocalNetworkGateways(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.localNetworkGateways.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listLocalNetworkGateways(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysUpdateTagsSample.ts deleted file mode 100644 index b91f838e8a56..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/localNetworkGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a local network gateway tags. - * - * @summary Updates a local network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayUpdateTags.json - */ -async function updateLocalNetworkGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "lgw"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.updateTags( - resourceGroupName, - localNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateLocalNetworkGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 6b3b16ce8617..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagerConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a network manager connection on this management group. - * - * @summary Create a network manager connection on this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupPut.json - */ -async function createOrUpdateManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const parameters: NetworkManagerConnection = { - networkManagerId: - "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = - await client.managementGroupNetworkManagerConnections.createOrUpdate( - managementGroupId, - networkManagerConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts deleted file mode 100644 index dd436095b8aa..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete specified pending connection created by this management group. - * - * @summary Delete specified pending connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupDelete.json - */ -async function deleteManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = await client.managementGroupNetworkManagerConnections.delete( - managementGroupId, - networkManagerConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts deleted file mode 100644 index 6f8b5449fe19..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a specified connection created by this management group. - * - * @summary Get a specified connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupGet.json - */ -async function getManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = await client.managementGroupNetworkManagerConnections.get( - managementGroupId, - networkManagerConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts deleted file mode 100644 index 12b302c795a8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network manager connections created by this management group. - * - * @summary List all network manager connections created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionManagementGroupList.json - */ -async function listManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const resArray = new Array(); - for await (const item of client.managementGroupNetworkManagerConnections.list( - managementGroupId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 3c6bc9961b12..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NatGateway} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a nat gateway. - * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayCreateOrUpdate.json - */ -async function createNatGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters: NatGateway = { - location: "westus", - publicIpAddresses: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", - }, - ], - publicIpPrefixes: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a nat gateway. - * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayCreateOrUpdateStandardV2Sku.json - */ -async function createNatGatewayWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters: NatGateway = { - location: "westus", - publicIpAddresses: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", - }, - ], - publicIpPrefixes: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", - }, - ], - sku: { name: "StandardV2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNatGateway(); - await createNatGatewayWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysDeleteSample.ts deleted file mode 100644 index 07df024122f4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified nat gateway. - * - * @summary Deletes the specified nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayDelete.json - */ -async function deleteNatGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginDeleteAndWait( - resourceGroupName, - natGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNatGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysGetSample.ts deleted file mode 100644 index 6c02d64af8fe..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. - * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayGet.json - */ -async function getNatGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get( - resourceGroupName, - natGatewayName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. - * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayGetStandardV2Sku.json - */ -async function getNatGatewayWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get( - resourceGroupName, - natGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getNatGateway(); - await getNatGatewayWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysListAllSample.ts deleted file mode 100644 index 33d42c65160d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Nat Gateways in a subscription. - * - * @summary Gets all the Nat Gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayListAll.json - */ -async function listAllNatGateways(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natGateways.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNatGateways(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysListSample.ts deleted file mode 100644 index dfae17787328..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all nat gateways in a resource group. - * - * @summary Gets all nat gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayList.json - */ -async function listNatGatewaysInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNatGatewaysInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysUpdateTagsSample.ts deleted file mode 100644 index e439984e38b5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/natGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates nat gateway tags. - * - * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayUpdateTags.json - */ -async function updateNatGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.updateTags( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates nat gateway tags. - * - * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayUpdateTagsStandardV2Sku.json - */ -async function updateNatGatewayWithStandardV2SkuTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.updateTags( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNatGatewayTags(); - await updateNatGatewayWithStandardV2SkuTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/natRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/natRulesCreateOrUpdateSample.ts deleted file mode 100644 index 0d33d281d986..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/natRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VpnGatewayNatRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * - * @summary Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRulePut.json - */ -async function natRulePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const natRuleParameters: VpnGatewayNatRule = { - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "192.168.21.0/24" }], - internalMappings: [{ addressSpace: "10.4.0.0/24" }], - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default", - mode: "EgressSnat", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - natRuleName, - natRuleParameters, - ); - console.log(result); -} - -async function main(): Promise { - await natRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/natRulesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/natRulesDeleteSample.ts deleted file mode 100644 index 8f32d423571a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/natRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a nat rule. - * - * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleDelete.json - */ -async function natRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.beginDeleteAndWait( - resourceGroupName, - gatewayName, - natRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await natRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/natRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/natRulesGetSample.ts deleted file mode 100644 index 8a1ca6c5b494..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/natRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a nat ruleGet. - * - * @summary Retrieves the details of a nat ruleGet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleGet.json - */ -async function natRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.get( - resourceGroupName, - gatewayName, - natRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await natRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/natRulesListByVpnGatewaySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/natRulesListByVpnGatewaySample.ts deleted file mode 100644 index 5c0572b590c1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/natRulesListByVpnGatewaySample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all nat rules for a particular virtual wan vpn gateway. - * - * @summary Retrieves all nat rules for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleList.json - */ -async function natRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natRules.listByVpnGateway( - resourceGroupName, - gatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await natRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 57b60964a36b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NetworkGroup} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network group. - * - * @summary Creates or updates a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupPut.json - */ -async function networkGroupsPut(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const parameters: NetworkGroup = { - description: "A sample group", - memberType: "VirtualNetwork", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.createOrUpdate( - resourceGroupName, - networkManagerName, - networkGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkGroupsPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsDeleteSample.ts deleted file mode 100644 index 59f2455b42a7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkGroupsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network group. - * - * @summary Deletes a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupDelete.json - */ -async function networkGroupsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const force = false; - const options: NetworkGroupsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - networkGroupName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await networkGroupsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsGetSample.ts deleted file mode 100644 index 82b7eb09902c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network group. - * - * @summary Gets the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupGet.json - */ -async function networkGroupsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.get( - resourceGroupName, - networkManagerName, - networkGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await networkGroupsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsListSample.ts deleted file mode 100644 index 8f80ca24cbbb..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkGroupsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the specified network group. - * - * @summary Lists the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupList.json - */ -async function networkGroupsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkGroups.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkGroupsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceIPConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceIPConfigurationsGetSample.ts deleted file mode 100644 index c82e5a9066e9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceIPConfigurationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network interface ip configuration. - * - * @summary Gets the specified network interface ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceIPConfigurationGet.json - */ -async function networkInterfaceIPConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const ipConfigurationName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceIPConfigurations.get( - resourceGroupName, - networkInterfaceName, - ipConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await networkInterfaceIPConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceIPConfigurationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceIPConfigurationsListSample.ts deleted file mode 100644 index c5b1767f9e08..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceIPConfigurationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all ip configurations in a network interface. - * - * @summary Get all ip configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceIPConfigurationList.json - */ -async function networkInterfaceIPConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceIPConfigurations.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkInterfaceIPConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceLoadBalancersListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceLoadBalancersListSample.ts deleted file mode 100644 index 2fefbd51b810..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceLoadBalancersListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all load balancers in a network interface. - * - * @summary List all load balancers in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceLoadBalancerList.json - */ -async function networkInterfaceLoadBalancerList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceLoadBalancers.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkInterfaceLoadBalancerList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 9f007957c747..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkInterfaceTapConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a Tap configuration in the specified NetworkInterface. - * - * @summary Creates or updates a Tap configuration in the specified NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationCreate.json - */ -async function createNetworkInterfaceTapConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const tapConfigurationParameters: NetworkInterfaceTapConfiguration = { - virtualNetworkTap: { - id: "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworkTaps/testvtap", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaceTapConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - tapConfigurationParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkInterfaceTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts deleted file mode 100644 index 64e5f1327de2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified tap configuration from the NetworkInterface. - * - * @summary Deletes the specified tap configuration from the NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationDelete.json - */ -async function deleteTapConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaceTapConfigurations.beginDeleteAndWait( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteTapConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsGetSample.ts deleted file mode 100644 index bdc2c2a53220..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified tap configuration on a network interface. - * - * @summary Get the specified tap configuration on a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationGet.json - */ -async function getNetworkInterfaceTapConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceTapConfigurations.get( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkInterfaceTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsListSample.ts deleted file mode 100644 index ac216110d995..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfaceTapConfigurationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all Tap configurations in a network interface. - * - * @summary Get all Tap configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceTapConfigurationList.json - */ -async function listVirtualNetworkTapConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceTapConfigurations.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualNetworkTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesCreateOrUpdateSample.ts deleted file mode 100644 index 6cde07e7f60e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesCreateOrUpdateSample.ts +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NetworkInterface} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network interface. - * - * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceCreate.json - */ -async function createNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters: NetworkInterface = { - disableTcpStateTracking: true, - enableAcceleratedNetworking: true, - ipConfigurations: [ - { - name: "ipconfig1", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", - }, - }, - { name: "ipconfig2", privateIPAddressPrefixLength: 28 }, - ], - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network interface. - * - * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json - */ -async function createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters: NetworkInterface = { - enableAcceleratedNetworking: true, - ipConfigurations: [ - { - name: "ipconfig1", - gatewayLoadBalancer: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", - }, - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", - }, - }, - ], - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkInterface(); - await createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesDeleteSample.ts deleted file mode 100644 index c5a960d1c89a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified network interface. - * - * @summary Deletes the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceDelete.json - */ -async function deleteNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginDeleteAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts deleted file mode 100644 index 4d37c1f9c7d7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network interface in a cloud service. - * - * @summary Get the specified network interface in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceNetworkInterfaceGet.json - */ -async function getCloudServiceNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const roleInstanceName = "TestVMRole_IN_0"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.getCloudServiceNetworkInterface( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await getCloudServiceNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts deleted file mode 100644 index c4189054284f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all route tables applied to a network interface. - * - * @summary Gets all route tables applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceEffectiveRouteTableList.json - */ -async function showNetworkInterfaceEffectiveRouteTables(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.beginGetEffectiveRouteTableAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await showNetworkInterfaceEffectiveRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetSample.ts deleted file mode 100644 index 4c323d6cb9bc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified network interface. - * - * @summary Gets information about the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceGet.json - */ -async function getNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.get( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts deleted file mode 100644 index 26a419d8ca34..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. - * - * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceIpConfigGet.json - */ -async function getVirtualMachineScaleSetNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "2"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.getVirtualMachineScaleSetIpConfiguration( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualMachineScaleSetNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts deleted file mode 100644 index d025d2e98c8d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network interface in a virtual machine scale set. - * - * @summary Get the specified network interface in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceGet.json - */ -async function getVirtualMachineScaleSetNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.getVirtualMachineScaleSetNetworkInterface( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualMachineScaleSetNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListAllSample.ts deleted file mode 100644 index 52901c22ac96..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network interfaces in a subscription. - * - * @summary Gets all network interfaces in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceListAll.json - */ -async function listAllNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts deleted file mode 100644 index bf44b036caae..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network interfaces in a cloud service. - * - * @summary Gets all network interfaces in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceNetworkInterfaceList.json - */ -async function listCloudServiceNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listCloudServiceNetworkInterfaces( - resourceGroupName, - cloudServiceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listCloudServiceNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts deleted file mode 100644 index 518de3cd0bee..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all network interfaces in a role instance in a cloud service. - * - * @summary Gets information about all network interfaces in a role instance in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json - */ -async function listCloudServiceRoleInstanceNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const roleInstanceName = "TestVMRole_IN_0"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listCloudServiceRoleInstanceNetworkInterfaces( - resourceGroupName, - cloudServiceName, - roleInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listCloudServiceRoleInstanceNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts deleted file mode 100644 index 0f6d1f3354ee..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network security groups applied to a network interface. - * - * @summary Gets all network security groups applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceEffectiveNSGList.json - */ -async function listNetworkInterfaceEffectiveNetworkSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.beginListEffectiveNetworkSecurityGroupsAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await listNetworkInterfaceEffectiveNetworkSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListSample.ts deleted file mode 100644 index 9688602c722f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network interfaces in a resource group. - * - * @summary Gets all network interfaces in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceList.json - */ -async function listNetworkInterfacesInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkInterfacesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts deleted file mode 100644 index f347021d5b99..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. - * - * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceIpConfigList.json - */ -async function listVirtualMachineScaleSetNetworkInterfaceIPConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "2"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetIpConfigurations( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualMachineScaleSetNetworkInterfaceIPConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts deleted file mode 100644 index 9d15f7a5b9e8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network interfaces in a virtual machine scale set. - * - * @summary Gets all network interfaces in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceList.json - */ -async function listVirtualMachineScaleSetNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualMachineScaleSetNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts deleted file mode 100644 index f3bc0155f9f0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * - * @summary Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssVmNetworkInterfaceList.json - */ -async function listVirtualMachineScaleSetVMNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetVMNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualMachineScaleSetVMNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesUpdateTagsSample.ts deleted file mode 100644 index f186e1198940..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkInterfacesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a network interface tags. - * - * @summary Updates a network interface tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceUpdateTags.json - */ -async function updateNetworkInterfaceTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.updateTags( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNetworkInterfaceTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerCommitsPostSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagerCommitsPostSample.ts deleted file mode 100644 index da9f3ad79fbb..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerCommitsPostSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagerCommit} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Post a Network Manager Commit. - * - * @summary Post a Network Manager Commit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerCommitPost.json - */ -async function networkManageCommitPost(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resoureGroupSample"; - const networkManagerName = "testNetworkManager"; - const parameters: NetworkManagerCommit = { - commitType: "SecurityAdmin", - configurationIds: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resoureGroupSample/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/SampleSecurityAdminConfig", - ], - targetLocations: ["useast"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerCommits.beginPostAndWait( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkManageCommitPost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerDeploymentStatusListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagerDeploymentStatusListSample.ts deleted file mode 100644 index 25ee7aac5fbd..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerDeploymentStatusListSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagerDeploymentStatusParameter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Post to List of Network Manager Deployment Status. - * - * @summary Post to List of Network Manager Deployment Status. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerDeploymentStatusList.json - */ -async function networkManagerDeploymentStatusList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resoureGroupSample"; - const networkManagerName = "testNetworkManager"; - const parameters: NetworkManagerDeploymentStatusParameter = { - deploymentTypes: ["Connectivity", "AdminPolicy"], - regions: ["eastus", "westus"], - skipToken: "FakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerDeploymentStatusOperations.list( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkManagerDeploymentStatusList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index ac5b82b1bd3e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagerRoutingConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network manager routing configuration. - * - * @summary Creates or updates a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationPut.json - */ -async function createNetworkManagerRoutingConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const routingConfiguration: NetworkManagerRoutingConfiguration = { - description: "A sample policy", - routeTableUsageMode: "ManagedOnly", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkManagerRoutingConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - routingConfiguration, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkManagerRoutingConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts deleted file mode 100644 index dcae57fbca5d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network manager routing configuration. - * - * @summary Deletes a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationDelete.json - */ -async function deleteNetworkManagerRoutingConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkManagerRoutingConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkManagerRoutingConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsGetSample.ts deleted file mode 100644 index b23fea317e3a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a network manager routing configuration. - * - * @summary Retrieves a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationGet.json - */ -async function getRoutingConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerRoutingConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getRoutingConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsListSample.ts deleted file mode 100644 index 0aaaac933f64..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagerRoutingConfigurationsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the network manager routing configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager routing configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingConfigurationList.json - */ -async function listRoutingConfigurationsInANetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagerRoutingConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRoutingConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagersCreateOrUpdateSample.ts deleted file mode 100644 index 1054311ce45e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NetworkManager} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a Network Manager. - * - * @summary Creates or updates a Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerPut.json - */ -async function putNetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const parameters: NetworkManager = { - description: "My Test Network Manager", - networkManagerScopeAccesses: ["Connectivity"], - networkManagerScopes: { - managementGroups: ["/Microsoft.Management/testmg"], - subscriptions: ["/subscriptions/00000000-0000-0000-0000-000000000000"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.createOrUpdate( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putNetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagersDeleteSample.ts deleted file mode 100644 index 69129683d015..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersDeleteSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagersDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network manager. - * - * @summary Deletes a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerDelete.json - */ -async function networkManagersDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const force = false; - const options: NetworkManagersDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await networkManagersDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagersGetSample.ts deleted file mode 100644 index 68d601d3ebb1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Network Manager. - * - * @summary Gets the specified Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGet.json - */ -async function networkManagersGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.get( - resourceGroupName, - networkManagerName, - ); - console.log(result); -} - -async function main(): Promise { - await networkManagersGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagersListBySubscriptionSample.ts deleted file mode 100644 index f6dd8464acfc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network managers in a subscription. - * - * @summary List all network managers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerListAll.json - */ -async function networkManagersList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkManagersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagersListSample.ts deleted file mode 100644 index da00f33999fe..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List network managers in a resource group. - * - * @summary List network managers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerList.json - */ -async function listNetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersPatchSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkManagersPatchSample.ts deleted file mode 100644 index 02d28fb97cd9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkManagersPatchSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { PatchObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Patch NetworkManager. - * - * @summary Patch NetworkManager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerPatch.json - */ -async function networkManagesPatch(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const parameters: PatchObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.patch( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkManagesPatch(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesCreateOrUpdateSample.ts deleted file mode 100644 index f5e884d2bd4c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NetworkProfile} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network profile. - * - * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileCreateConfigOnly.json - */ -async function createNetworkProfileDefaults(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const parameters: NetworkProfile = { - containerNetworkInterfaceConfigurations: [ - { - name: "eth1", - ipConfigurations: [ - { - name: "ipconfig1", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/networkProfileVnet/subnets/networkProfileSubnet1", - }, - }, - ], - }, - ], - location: "westus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.createOrUpdate( - resourceGroupName, - networkProfileName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkProfileDefaults(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesDeleteSample.ts deleted file mode 100644 index b83722e2f459..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified network profile. - * - * @summary Deletes the specified network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileDelete.json - */ -async function deleteNetworkProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.beginDeleteAndWait( - resourceGroupName, - networkProfileName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesGetSample.ts deleted file mode 100644 index 44f2c941a501..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network profile in a specified resource group. - * - * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileGetConfigOnly.json - */ -async function getNetworkProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.get( - resourceGroupName, - networkProfileName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified network profile in a specified resource group. - * - * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileGetWithContainerNic.json - */ -async function getNetworkProfileWithContainerNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.get( - resourceGroupName, - networkProfileName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkProfile(); - await getNetworkProfileWithContainerNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesListAllSample.ts deleted file mode 100644 index f79c0a5c15fc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the network profiles in a subscription. - * - * @summary Gets all the network profiles in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileListAll.json - */ -async function listAllNetworkProfiles(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkProfiles.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkProfiles(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesListSample.ts deleted file mode 100644 index f63237a8a7cf..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network profiles in a resource group. - * - * @summary Gets all network profiles in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileList.json - */ -async function listResourceGroupNetworkProfiles(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkProfiles.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listResourceGroupNetworkProfiles(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesUpdateTagsSample.ts deleted file mode 100644 index 20dc7024ef1c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkProfilesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates network profile tags. - * - * @summary Updates network profile tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileUpdateTags.json - */ -async function updateNetworkProfileTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "test-np"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.updateTags( - resourceGroupName, - networkProfileName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNetworkProfileTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 2b01720cef1f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkSecurityGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network security group in the specified resource group. - * - * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupCreate.json - */ -async function createNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters: NetworkSecurityGroup = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network security group in the specified resource group. - * - * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupCreateWithRule.json - */ -async function createNetworkSecurityGroupWithRule(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters: NetworkSecurityGroup = { - location: "eastus", - securityRules: [ - { - name: "rule1", - access: "Allow", - destinationAddressPrefix: "*", - destinationPortRange: "80", - direction: "Inbound", - priority: 130, - sourceAddressPrefix: "*", - sourcePortRange: "*", - protocol: "*", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkSecurityGroup(); - await createNetworkSecurityGroupWithRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsDeleteSample.ts deleted file mode 100644 index 15cad0e4b030..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified network security group. - * - * @summary Deletes the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupDelete.json - */ -async function deleteNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginDeleteAndWait( - resourceGroupName, - networkSecurityGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsGetSample.ts deleted file mode 100644 index 5df91a74793e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network security group. - * - * @summary Gets the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupGet.json - */ -async function getNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.get( - resourceGroupName, - networkSecurityGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsListAllSample.ts deleted file mode 100644 index 3d03bd5b347f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network security groups in a subscription. - * - * @summary Gets all network security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupListAll.json - */ -async function listAllNetworkSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityGroups.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsListSample.ts deleted file mode 100644 index dcf633892fe5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network security groups in a resource group. - * - * @summary Gets all network security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupList.json - */ -async function listNetworkSecurityGroupsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityGroups.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkSecurityGroupsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsUpdateTagsSample.ts deleted file mode 100644 index 72a322d88b70..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityGroupsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a network security group tags. - * - * @summary Updates a network security group tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupUpdateTags.json - */ -async function updateNetworkSecurityGroupTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.updateTags( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNetworkSecurityGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts deleted file mode 100644 index 44070aac701a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NspAccessRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network access rule. - * - * @summary Creates or updates a network access rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRulePut.json - */ -async function nspAccessRulePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const parameters: NspAccessRule = { - addressPrefixes: ["10.11.0.0/16", "10.10.1.0/24"], - direction: "Inbound", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterAccessRules.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspAccessRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesDeleteSample.ts deleted file mode 100644 index 95c37074f668..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP access rule. - * - * @summary Deletes an NSP access rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleDelete.json - */ -async function nspAccessRulesDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.delete( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await nspAccessRulesDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesGetSample.ts deleted file mode 100644 index c17558567841..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified NSP access rule by name. - * - * @summary Gets the specified NSP access rule by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleGet.json - */ -async function nspAccessRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.get( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await nspAccessRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesListSample.ts deleted file mode 100644 index 9324871c50a7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP access rules in the specified NSP profile. - * - * @summary Lists the NSP access rules in the specified NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleList.json - */ -async function nspAccessRulesList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAccessRules.list( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspAccessRulesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesReconcileSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesReconcileSample.ts deleted file mode 100644 index bca2a3b2f5d8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAccessRulesReconcileSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reconcile NSP access rules - * - * @summary Reconcile NSP access rules - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleReconcile.json - */ -async function nspAccessRuleReconcile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRuleName1"; - const parameters: Record = { properties: {} }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.reconcile( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspAccessRuleReconcile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociableResourceTypesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociableResourceTypesListSample.ts deleted file mode 100644 index 2e844b168daa..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociableResourceTypesListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter - * - * @summary Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PerimeterAssociableResourcesList.json - */ -async function networkSecurityPerimeterAssociableResourceTypes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAssociableResourceTypes.list( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkSecurityPerimeterAssociableResourceTypes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts deleted file mode 100644 index c8a17de526f0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NspAssociation} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a NSP resource association. - * - * @summary Creates or updates a NSP resource association. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationPut.json - */ -async function nspAssociationPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const parameters: NspAssociation = { - accessMode: "Enforced", - privateLinkResource: { - id: "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}", - }, - profile: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterAssociations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspAssociationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsDeleteSample.ts deleted file mode 100644 index badf4d1013fa..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP association resource. - * - * @summary Deletes an NSP association resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationDelete.json - */ -async function nspAssociationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterAssociations.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - ); - console.log(result); -} - -async function main(): Promise { - await nspAssociationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsGetSample.ts deleted file mode 100644 index 9f361ce1603d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified NSP association by name. - * - * @summary Gets the specified NSP association by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationGet.json - */ -async function nspAssociationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.get( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - ); - console.log(result); -} - -async function main(): Promise { - await nspAssociationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsListSample.ts deleted file mode 100644 index 7a4a679565d8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP resource associations. - * - * @summary Lists the NSP resource associations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationList.json - */ -async function nspAssociationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAssociations.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspAssociationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsReconcileSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsReconcileSample.ts deleted file mode 100644 index 986750a95369..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterAssociationsReconcileSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reconcile NSP association - * - * @summary Reconcile NSP association - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationReconcile.json - */ -async function nspAssociationReconcile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const parameters: Record = { properties: {} }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.reconcile( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspAssociationReconcile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesDeleteSample.ts deleted file mode 100644 index 3d48d556d876..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP LinkReference resource. - * - * @summary Deletes an NSP LinkReference resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceDelete.json - */ -async function nspLinkReferenceDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const linkReferenceName = "link1-guid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterLinkReferences.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLinkReferenceDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesGetSample.ts deleted file mode 100644 index ea2189ae8c76..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified NSP linkReference resource. - * - * @summary Gets the specified NSP linkReference resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceGet.json - */ -async function nspLinkReferencesGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const linkReferenceName = "link1-guid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinkReferences.get( - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLinkReferencesGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesListSample.ts deleted file mode 100644 index ae6802ab0fcf..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinkReferencesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP LinkReference resources in the specified network security perimeter. - * - * @summary Lists the NSP LinkReference resources in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceList.json - */ -async function nspLinkReferenceList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLinkReferences.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspLinkReferenceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksCreateOrUpdateSample.ts deleted file mode 100644 index 71de0d2efb07..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksCreateOrUpdateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NspLink} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates NSP link resource. - * - * @summary Creates or updates NSP link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkPut.json - */ -async function nspLinksPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const parameters: NspLink = { - autoApprovedRemotePerimeterResourceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp2", - localInboundProfiles: ["*"], - remoteInboundProfiles: ["*"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspLinksPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksDeleteSample.ts deleted file mode 100644 index 404215e04f19..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP Link resource. - * - * @summary Deletes an NSP Link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkDelete.json - */ -async function nspLinkDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLinkDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksGetSample.ts deleted file mode 100644 index ccf691efe828..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified NSP link resource. - * - * @summary Gets the specified NSP link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkGet.json - */ -async function nspLinksGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.get( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLinksGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksListSample.ts deleted file mode 100644 index b8d3a329ee50..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLinksListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP Link resources in the specified network security perimeter. - * - * @summary Lists the NSP Link resources in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkList.json - */ -async function nspLinkList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLinks.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspLinkList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 1585219dcf0b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NspLoggingConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates NSP logging configuration. - * - * @summary Creates or updates NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationPut.json - */ -async function nspLoggingConfigurationPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const parameters: NspLoggingConfiguration = { - enabledLogCategories: [ - "NspPublicInboundPerimeterRulesDenied", - "NspPublicOutboundPerimeterRulesDenied", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterLoggingConfigurations.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspLoggingConfigurationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts deleted file mode 100644 index f48d78e401c5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP Logging configuration. - * - * @summary Deletes an NSP Logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationDelete.json - */ -async function nspLoggingConfigurationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterLoggingConfigurations.delete( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLoggingConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsGetSample.ts deleted file mode 100644 index 83258a81666c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the NSP logging configuration. - * - * @summary Gets the NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationGet.json - */ -async function nspLoggingConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLoggingConfigurations.get( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLoggingConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsListSample.ts deleted file mode 100644 index d2cb29fe19d4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterLoggingConfigurationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP logging configuration. - * - * @summary Lists the NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationList.json - */ -async function nspLoggingConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLoggingConfigurations.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspLoggingConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterOperationStatusesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterOperationStatusesGetSample.ts deleted file mode 100644 index 9189b149f01c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterOperationStatusesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the operation status for the given operation id. - * - * @summary Gets the operation status for the given operation id. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspOperationStatusGet.json - */ -async function nspOperationStatusGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "location1"; - const operationId = "operationId1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterOperationStatuses.get( - location, - operationId, - ); - console.log(result); -} - -async function main(): Promise { - await nspOperationStatusGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts deleted file mode 100644 index 0eba0be8fce4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NspProfile} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network profile. - * - * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfilePut.json - */ -async function nspProfilesPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const parameters: NspProfile = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspProfilesPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesDeleteSample.ts deleted file mode 100644 index d91897ee7d44..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP profile. - * - * @summary Deletes an NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileDelete.json - */ -async function nspProfilesDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.delete( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - ); - console.log(result); -} - -async function main(): Promise { - await nspProfilesDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesGetSample.ts deleted file mode 100644 index cee1955e4d47..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified NSP profile. - * - * @summary Gets the specified NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileGet.json - */ -async function nspProfilesGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.get( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - ); - console.log(result); -} - -async function main(): Promise { - await nspProfilesGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesListSample.ts deleted file mode 100644 index 48b78ed8fff2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterProfilesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP profiles in the specified network security perimeter. - * - * @summary Lists the NSP profiles in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileList.json - */ -async function nspProfilesList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterProfiles.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspProfilesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterServiceTagsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterServiceTagsListSample.ts deleted file mode 100644 index 87ffdf382c72..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimeterServiceTagsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. - * - * @summary Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspServiceTagsList.json - */ -async function nspServiceTagsList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterServiceTags.list( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspServiceTagsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersCreateOrUpdateSample.ts deleted file mode 100644 index 7e1cea222a13..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersCreateOrUpdateSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkSecurityPerimeter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a Network Security Perimeter. - * - * @summary Creates or updates a Network Security Perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterPut.json - */ -async function putNetworkSecurityPerimeter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const parameters: NetworkSecurityPerimeter = { location: "location1" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersDeleteSample.ts deleted file mode 100644 index 9b9739166011..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network security perimeter. - * - * @summary Deletes a network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterDelete.json - */ -async function networkSecurityPerimeterDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "testNSP1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - ); - console.log(result); -} - -async function main(): Promise { - await networkSecurityPerimeterDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersGetSample.ts deleted file mode 100644 index c4370ee9dc3d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network security perimeter by the name. - * - * @summary Gets the specified network security perimeter by the name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterGet.json - */ -async function networkSecurityPerimeterGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.get( - resourceGroupName, - networkSecurityPerimeterName, - ); - console.log(result); -} - -async function main(): Promise { - await networkSecurityPerimeterGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersListBySubscriptionSample.ts deleted file mode 100644 index ce38ff80151c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network security perimeters in a subscription. - * - * @summary List all network security perimeters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterListAll.json - */ -async function networkSecurityPerimetersList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkSecurityPerimetersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersListSample.ts deleted file mode 100644 index e78aea18ab32..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List network security perimeters in a resource group. - * - * @summary List network security perimeters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterList.json - */ -async function listNetworkSecurityPerimeter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeters.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersPatchSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersPatchSample.ts deleted file mode 100644 index 673d838c3c1a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkSecurityPerimetersPatchSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { UpdateTagsRequest} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Patch Tags for a Network Security Perimeter. - * - * @summary Patch Tags for a Network Security Perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterPatch.json - */ -async function patchNetworkSecurityPerimeter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const parameters: UpdateTagsRequest = { tags: { description: "nsp1" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.patch( - resourceGroupName, - networkSecurityPerimeterName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await patchNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 0c35a6035cac..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkVirtualApplianceConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * - * @summary Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionPut.json - */ -async function networkVirtualApplianceConnectionPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection = - { - namePropertiesName: "connection1", - asn: 64512, - bgpPeerAddress: ["169.254.16.13", "169.254.16.14"], - enableInternetSecurity: false, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - ], - labels: ["label1"], - }, - }, - tunnelIdentifier: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualApplianceConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - networkVirtualApplianceConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkVirtualApplianceConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts deleted file mode 100644 index 1b3748e0342e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a NVA connection. - * - * @summary Deletes a NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionDelete.json - */ -async function networkVirtualApplianceConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualApplianceConnections.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await networkVirtualApplianceConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsGetSample.ts deleted file mode 100644 index 8602dce0c806..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of specified NVA connection. - * - * @summary Retrieves the details of specified NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionGet.json - */ -async function networkVirtualApplianceConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualApplianceConnections.get( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await networkVirtualApplianceConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsListSample.ts deleted file mode 100644 index e984cd531b70..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualApplianceConnectionsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists NetworkVirtualApplianceConnections under the NVA. - * - * @summary Lists NetworkVirtualApplianceConnections under the NVA. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceConnectionList.json - */ -async function networkVirtualApplianceConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualApplianceConnections.list( - resourceGroupName, - networkVirtualApplianceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkVirtualApplianceConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts deleted file mode 100644 index ce4bc8550290..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts +++ /dev/null @@ -1,479 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkVirtualAppliance} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetBasicPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetIngressPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicIncludingInternetIngress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - internetIngressPublicIps: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/slbip", - }, - ], - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetNetworkProfilePut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicIncludingNetworkProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - networkProfile: { - networkInterfaceConfigurations: [ - { - nicType: "PublicNic", - properties: { - ipConfigurations: [ - { - name: "myPrimaryPublicIpConfig", - properties: { primary: true }, - }, - { - name: "myNonPrimaryPublicIpConfig", - properties: { primary: false }, - }, - ], - }, - }, - { - nicType: "PrivateNic", - properties: { - ipConfigurations: [ - { - name: "myPrimaryPrivateIpConfig", - properties: { primary: true }, - }, - { - name: "myNonPrimaryPrivateIpConfig", - properties: { primary: false }, - }, - ], - }, - }, - ], - }, - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetAdditionalPrivatePut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicAdditionalPrivateNic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - { - name: "myAdditionalInterface", - type: ["AdditionalPrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceVnetAdditionalPublicPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicAdditionalPublicNic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - { - name: "myAdditionalPublicInterface", - type: ["AdditionalPublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualAppliancePut.json - */ -async function createNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - additionalNics: [{ name: "exrsdwan", hasPublicIp: true }], - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - internetIngressPublicIps: [ - { - id: "/subscriptions/{{subscriptionId}}/resourceGroups/{{rg}}/providers/Microsoft.Network/publicIPAddresses/slbip", - }, - ], - location: "West US", - networkProfile: { - networkInterfaceConfigurations: [ - { - nicType: "PublicNic", - properties: { - ipConfigurations: [ - { name: "publicnicipconfig", properties: { primary: true } }, - { name: "publicnicipconfig-2", properties: { primary: false } }, - ], - }, - }, - { - nicType: "PrivateNic", - properties: { - ipConfigurations: [ - { name: "privatenicipconfig", properties: { primary: true } }, - { name: "privatenicipconfig-2", properties: { primary: false } }, - ], - }, - }, - ], - }, - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "12.1", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSaaSPut.json - */ -async function createSaaSNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - delegation: { serviceName: "PaloAltoNetworks.Cloudngfw/firewalls" }, - location: "West US", - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNvaInVNetWithPrivateNicPublicNic(); - await createNvaInVNetWithPrivateNicPublicNicIncludingInternetIngress(); - await createNvaInVNetWithPrivateNicPublicNicIncludingNetworkProfile(); - await createNvaInVNetWithPrivateNicPublicNicAdditionalPrivateNic(); - await createNvaInVNetWithPrivateNicPublicNicAdditionalPublicNic(); - await createNetworkVirtualAppliance(); - await createSaaSNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesDeleteSample.ts deleted file mode 100644 index cf4998286f5d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Network Virtual Appliance. - * - * @summary Deletes the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceDelete.json - */ -async function deleteNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts deleted file mode 100644 index 469a8cdcaefc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkVirtualApplianceBootDiagnosticParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. - * - * @summary Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceBootDiagnostics.json - */ -async function retrieveBootDiagnosticLogsForAGivenNvaVmssInstance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const request: NetworkVirtualApplianceBootDiagnosticParameters = { - consoleScreenshotStorageSasUrl: - "https://blobcortextesturl.blob.core.windows.net/nvaBootDiagContainer/consoleScreenshot.png?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - instanceId: 0, - serialConsoleStorageSasUrl: - "https://blobcortextesturl.blob.core.windows.net/nvaBootDiagContainer/serialLogs.txt?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginGetBootDiagnosticLogsAndWait( - resourceGroupName, - networkVirtualApplianceName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await retrieveBootDiagnosticLogsForAGivenNvaVmssInstance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesGetSample.ts deleted file mode 100644 index 6a772ee3d9f0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Network Virtual Appliance. - * - * @summary Gets the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceGet.json - */ -async function getNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.get( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts deleted file mode 100644 index 33c192264d60..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Network Virtual Appliances in a resource group. - * - * @summary Lists all Network Virtual Appliances in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceListByResourceGroup.json - */ -async function listAllNetworkVirtualApplianceForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualAppliances.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkVirtualApplianceForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesListSample.ts deleted file mode 100644 index 98d67144c25b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Network Virtual Appliances in a subscription. - * - * @summary Gets all Network Virtual Appliances in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceListBySubscription.json - */ -async function listAllNetworkVirtualAppliancesForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualAppliances.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkVirtualAppliancesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesReimageSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesReimageSample.ts deleted file mode 100644 index b1c7e2f655d9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesReimageSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reimages one VM belonging to the specified Network Virtual Appliance. - * - * @summary Reimages one VM belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSpecificReimage.json - */ -async function reimagesSpecificNetworkVirtualApplianceVMSInVMScaleSet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginReimageAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await reimagesSpecificNetworkVirtualApplianceVMSInVMScaleSet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesRestartSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesRestartSample.ts deleted file mode 100644 index e9592be8005a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesRestartSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * - * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceEmptyRestart.json - */ -async function restartAllNetworkVirtualApplianceVMSInVMScaleSet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginRestartAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * - * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSpecificRestart.json - */ -async function restartSpecificNetworkVirtualApplianceVMSInVMScaleSet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginRestartAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await restartAllNetworkVirtualApplianceVMSInVMScaleSet(); - await restartSpecificNetworkVirtualApplianceVMSInVMScaleSet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts deleted file mode 100644 index e708f0ad9e2c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a Network Virtual Appliance. - * - * @summary Updates a Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceUpdateTags.json - */ -async function updateNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: TagsObject = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.updateTags( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersCheckConnectivitySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersCheckConnectivitySample.ts deleted file mode 100644 index fc9c240b84be..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersCheckConnectivitySample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectivityParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * - * @summary Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherConnectivityCheck.json - */ -async function checkConnectivity(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: ConnectivityParameters = { - destination: { address: "192.168.100.4", port: 3389 }, - preferredIPVersion: "IPv4", - source: { - resourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginCheckConnectivityAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await checkConnectivity(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersCreateOrUpdateSample.ts deleted file mode 100644 index 229ec48be350..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersCreateOrUpdateSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NetworkWatcher} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network watcher in the specified resource group. - * - * @summary Creates or updates a network watcher in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherCreate.json - */ -async function createNetworkWatcher(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: NetworkWatcher = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.createOrUpdate( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersDeleteSample.ts deleted file mode 100644 index 57653463debe..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified network watcher resource. - * - * @summary Deletes the specified network watcher resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherDelete.json - */ -async function deleteNetworkWatcher(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts deleted file mode 100644 index 9a8514f7d607..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - AzureReachabilityReportParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @summary NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherAzureReachabilityReportGet.json - */ -async function getAzureReachabilityReport(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: AzureReachabilityReportParameters = { - azureLocations: ["West US"], - endTime: new Date("2017-09-10T00:00:00Z"), - providerLocation: { country: "United States", state: "washington" }, - providers: ["Frontier Communications of America, Inc. - ASN 5650"], - startTime: new Date("2017-09-07T00:00:00Z"), - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginGetAzureReachabilityReportAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getAzureReachabilityReport(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetFlowLogStatusSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetFlowLogStatusSample.ts deleted file mode 100644 index 22663a5857f6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetFlowLogStatusSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FlowLogStatusParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Queries status of flow log and traffic analytics (optional) on a specified resource. - * - * @summary Queries status of flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogStatusQuery.json - */ -async function getFlowLogStatus(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: FlowLogStatusParameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetFlowLogStatusAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getFlowLogStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts deleted file mode 100644 index b24e9368d6e2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkConfigurationDiagnosticParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * - * @summary Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json - */ -async function networkConfigurationDiagnostic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: NetworkConfigurationDiagnosticParameters = { - profiles: [ - { - destination: "12.11.12.14", - destinationPort: "12100", - direction: "Inbound", - source: "10.1.0.4", - protocol: "TCP", - }, - ], - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginGetNetworkConfigurationDiagnosticAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkConfigurationDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetNextHopSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetNextHopSample.ts deleted file mode 100644 index c768896509bb..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetNextHopSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NextHopParameters} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the next hop from the specified VM. - * - * @summary Gets the next hop from the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherNextHopGet.json - */ -async function getNextHop(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: NextHopParameters = { - destinationIPAddress: "10.0.0.10", - sourceIPAddress: "10.0.0.5", - targetNicResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetNextHopAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getNextHop(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetSample.ts deleted file mode 100644 index 496592bbb4d8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network watcher by resource group. - * - * @summary Gets the specified network watcher by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherGet.json - */ -async function getNetworkWatcher(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.get( - resourceGroupName, - networkWatcherName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTopologySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTopologySample.ts deleted file mode 100644 index 2fb43c47ce2c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTopologySample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - TopologyParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the current network topology by resource group. - * - * @summary Gets the current network topology by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTopologyGet.json - */ -async function getTopology(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: TopologyParameters = { targetResourceGroupName: "rg2" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.getTopology( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getTopology(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTroubleshootingResultSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTroubleshootingResultSample.ts deleted file mode 100644 index 43ddf0154b47..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTroubleshootingResultSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - QueryTroubleshootingParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the last completed troubleshooting result on a specified resource. - * - * @summary Get the last completed troubleshooting result on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTroubleshootResultQuery.json - */ -async function getTroubleshootResult(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: QueryTroubleshootingParameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginGetTroubleshootingResultAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getTroubleshootResult(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTroubleshootingSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTroubleshootingSample.ts deleted file mode 100644 index d9432a43e2b1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetTroubleshootingSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - TroubleshootingParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Initiate troubleshooting on a specified resource. - * - * @summary Initiate troubleshooting on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTroubleshootGet.json - */ -async function getTroubleshooting(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: TroubleshootingParameters = { - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", - storagePath: "https://st1.blob.core.windows.net/cn1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetTroubleshootingAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getTroubleshooting(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetVMSecurityRulesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetVMSecurityRulesSample.ts deleted file mode 100644 index 7d445d5b2724..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersGetVMSecurityRulesSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityGroupViewParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the configured and effective security group rules on the specified VM. - * - * @summary Gets the configured and effective security group rules on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherSecurityGroupViewGet.json - */ -async function getSecurityGroupView(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: SecurityGroupViewParameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetVMSecurityRulesAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getSecurityGroupView(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListAllSample.ts deleted file mode 100644 index f05967e45285..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network watchers by subscription. - * - * @summary Gets all network watchers by subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherListAll.json - */ -async function listAllNetworkWatchers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkWatchers.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkWatchers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListAvailableProvidersSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListAvailableProvidersSample.ts deleted file mode 100644 index abf655b05a29..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListAvailableProvidersSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - AvailableProvidersListParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * - * @summary NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherAvailableProvidersListGet.json - */ -async function getAvailableProvidersList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: AvailableProvidersListParameters = { - azureLocations: ["West US"], - city: "seattle", - country: "United States", - state: "washington", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginListAvailableProvidersAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getAvailableProvidersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListSample.ts deleted file mode 100644 index 5f4fe85901e4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network watchers by resource group. - * - * @summary Gets all network watchers by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherList.json - */ -async function listNetworkWatchers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkWatchers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkWatchers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts deleted file mode 100644 index 8bef9ad5e528..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FlowLogInformation} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Configures flow log and traffic analytics (optional) on a specified resource. - * - * @summary Configures flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogConfigure.json - */ -async function configureFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: FlowLogInformation = { - enabled: true, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": - {}, - }, - }, - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginSetFlowLogConfigurationAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await configureFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersUpdateTagsSample.ts deleted file mode 100644 index 54c7e4c32552..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a network watcher tags. - * - * @summary Updates a network watcher tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherUpdateTags.json - */ -async function updateNetworkWatcherTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.updateTags( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNetworkWatcherTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersVerifyIPFlowSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersVerifyIPFlowSample.ts deleted file mode 100644 index c39bc1db05ae..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/networkWatchersVerifyIPFlowSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VerificationIPFlowParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * - * @summary Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherIpFlowVerify.json - */ -async function ipFlowVerify(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: VerificationIPFlowParameters = { - direction: "Outbound", - localIPAddress: "10.2.0.4", - localPort: "80", - remoteIPAddress: "121.10.1.1", - remotePort: "80", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - protocol: "TCP", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginVerifyIPFlowAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await ipFlowVerify(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/operationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/operationsListSample.ts deleted file mode 100644 index eb55fc3d6e1b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all of the available Network Rest API operations. - * - * @summary Lists all of the available Network Rest API operations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/OperationList.json - */ -async function getAListOfOperationsForAResourceProvider(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAListOfOperationsForAResourceProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 2a66d03ecead..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { P2SVpnGateway} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * - * @summary Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayPut.json - */ -async function p2SVpnGatewayPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const p2SVpnGatewayParameters: P2SVpnGateway = { - customDnsServers: ["1.1.1.1", "2.2.2.2"], - isRoutingPreferenceInternet: false, - location: "West US", - p2SConnectionConfigurations: [ - { - name: "P2SConnectionConfig1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/p2sVpnGateways/p2sVpnGateway1/p2sConnectionConfigurations/P2SConnectionConfig1", - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - vnetRoutes: { staticRoutes: [] }, - }, - vpnClientAddressPool: { addressPrefixes: ["101.3.0.0/16"] }, - }, - ], - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", - }, - vpnGatewayScaleUnit: 1, - vpnServerConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysDeleteSample.ts deleted file mode 100644 index a7b7bbe5698a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a virtual wan p2s vpn gateway. - * - * @summary Deletes a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayDelete.json - */ -async function p2SVpnGatewayDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginDeleteAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts deleted file mode 100644 index 84764e688c08..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - P2SVpnConnectionRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json - */ -async function disconnectVpnConnectionsFromP2SVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vpn-gateway-test"; - const p2SVpnGatewayName = "p2svpngateway"; - const request: P2SVpnConnectionRequest = { - vpnConnectionIds: ["vpnconnId1", "vpnconnId2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.p2SVpnGateways.beginDisconnectP2SVpnConnectionsAndWait( - resourceGroupName, - p2SVpnGatewayName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await disconnectVpnConnectionsFromP2SVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts deleted file mode 100644 index ab3004aa5a7e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - P2SVpnProfileParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * - * @summary Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGenerateVpnProfile.json - */ -async function generateP2SVpnGatewayVpnprofile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const parameters: P2SVpnProfileParameters = { - authenticationMethod: "EAPTLS", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginGenerateVpnProfileAndWait( - resourceGroupName, - gatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await generateP2SVpnGatewayVpnprofile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts deleted file mode 100644 index cc52b5b5b54c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - P2SVpnConnectionHealthRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json - */ -async function p2SVpnGatewayGetConnectionHealthDetailed(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vpn-gateway-test"; - const gatewayName = "p2svpngateway"; - const request: P2SVpnConnectionHealthRequest = { - outputBlobSasUrl: - "https://blobcortextesturl.blob.core.windows.net/folderforconfig/p2sconnectionhealths?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - vpnUserNamesFilter: ["vpnUser1", "vpnUser2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.p2SVpnGateways.beginGetP2SVpnConnectionHealthDetailedAndWait( - resourceGroupName, - gatewayName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayGetConnectionHealthDetailed(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts deleted file mode 100644 index 1d4187d00e67..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGetConnectionHealth.json - */ -async function p2SVpnGatewayGetConnectionHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.p2SVpnGateways.beginGetP2SVpnConnectionHealthAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayGetConnectionHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetSample.ts deleted file mode 100644 index 9e139cbbdb8b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a virtual wan p2s vpn gateway. - * - * @summary Retrieves the details of a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGet.json - */ -async function p2SVpnGatewayGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.get( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts deleted file mode 100644 index 8f9bd860c5a4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the P2SVpnGateways in a resource group. - * - * @summary Lists all the P2SVpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayListByResourceGroup.json - */ -async function p2SVpnGatewayListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.p2SVpnGateways.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await p2SVpnGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysListSample.ts deleted file mode 100644 index da1ab1b2a436..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the P2SVpnGateways in a subscription. - * - * @summary Lists all the P2SVpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayList.json - */ -async function p2SVpnGatewayListBySubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.p2SVpnGateways.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await p2SVpnGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysResetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysResetSample.ts deleted file mode 100644 index 350856fdfa19..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysResetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the primary of the p2s vpn gateway in the specified resource group. - * - * @summary Resets the primary of the p2s vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayReset.json - */ -async function resetP2SVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginResetAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await resetP2SVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts deleted file mode 100644 index def85c023944..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates virtual wan p2s vpn gateway tags. - * - * @summary Updates virtual wan p2s vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayUpdateTags.json - */ -async function p2SVpnGatewayUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const p2SVpnGatewayParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginUpdateTagsAndWait( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesCreateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesCreateSample.ts deleted file mode 100644 index 0ed32d492ee6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesCreateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { PacketCapture} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create and start a packet capture on the specified VM. - * - * @summary Create and start a packet capture on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureCreate.json - */ -async function createPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const parameters: PacketCapture = { - bytesToCapturePerPacket: 10000, - filters: [{ localIPAddress: "10.0.0.4", localPort: "80", protocol: "TCP" }], - storageLocation: { - filePath: "D:\\capture\\pc1.cap", - storageId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/pcstore", - storagePath: - "https://mytestaccountname.blob.core.windows.net/capture/pc1.cap", - }, - target: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - timeLimitInSeconds: 100, - totalBytesPerSession: 100000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginCreateAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesDeleteSample.ts deleted file mode 100644 index 5de488798f92..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified packet capture session. - * - * @summary Deletes the specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureDelete.json - */ -async function deletePacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesGetSample.ts deleted file mode 100644 index e69fededc0df..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a packet capture session by name. - * - * @summary Gets a packet capture session by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureGet.json - */ -async function getPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.get( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main(): Promise { - await getPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesGetStatusSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesGetStatusSample.ts deleted file mode 100644 index 652f975c9d70..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesGetStatusSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Query the status of a running packet capture session. - * - * @summary Query the status of a running packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureQueryStatus.json - */ -async function queryPacketCaptureStatus(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginGetStatusAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main(): Promise { - await queryPacketCaptureStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesListSample.ts deleted file mode 100644 index b4764c1e76f7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all packet capture sessions within the specified resource group. - * - * @summary Lists all packet capture sessions within the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCapturesList.json - */ -async function listPacketCaptures(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.packetCaptures.list( - resourceGroupName, - networkWatcherName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPacketCaptures(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesStopSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesStopSample.ts deleted file mode 100644 index f7bf25b3e83c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/packetCapturesStopSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops a specified packet capture session. - * - * @summary Stops a specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherPacketCaptureStop.json - */ -async function stopPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginStopAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main(): Promise { - await stopPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts deleted file mode 100644 index 1213a672918d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * - * @summary Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PeerExpressRouteCircuitConnectionGet.json - */ -async function peerExpressRouteCircuitConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "60aee347-e889-4a42-8c1b-0aae8b1e4013"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.peerExpressRouteCircuitConnections.get( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await peerExpressRouteCircuitConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts deleted file mode 100644 index 81c4f671378c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all global reach peer connections associated with a private peering in an express route circuit. - * - * @summary Gets all global reach peer connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PeerExpressRouteCircuitConnectionList.json - */ -async function listPeerExpressRouteCircuitConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.peerExpressRouteCircuitConnections.list( - resourceGroupName, - circuitName, - peeringName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPeerExpressRouteCircuitConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 8022f88311d4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - PrivateDnsZoneGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a private dns zone group in the specified private endpoint. - * - * @summary Creates or updates a private dns zone group in the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupCreate.json - */ -async function createPrivateDnsZoneGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const parameters: PrivateDnsZoneGroup = { - privateDnsZoneConfigs: [ - { - privateDnsZoneId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/zone1.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsDeleteSample.ts deleted file mode 100644 index f0c4526ad520..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified private dns zone group. - * - * @summary Deletes the specified private dns zone group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupDelete.json - */ -async function deletePrivateDnsZoneGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.beginDeleteAndWait( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsGetSample.ts deleted file mode 100644 index 48255b68e9ef..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the private dns zone group resource by specified private dns zone group name. - * - * @summary Gets the private dns zone group resource by specified private dns zone group name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupGet.json - */ -async function getPrivateDnsZoneGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.get( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await getPrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsListSample.ts deleted file mode 100644 index c2b287dd78a9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateDnsZoneGroupsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private dns zone groups in a private endpoint. - * - * @summary Gets all private dns zone groups in a private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDnsZoneGroupList.json - */ -async function listPrivateEndpointsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const privateEndpointName = "testPe"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateDnsZoneGroups.list( - privateEndpointName, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPrivateEndpointsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsCreateOrUpdateSample.ts deleted file mode 100644 index ed6b2fd5eaed..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsCreateOrUpdateSample.ts +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { PrivateEndpoint} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointCreate.json - */ -async function createPrivateEndpoint(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters: PrivateEndpoint = { - customNetworkInterfaceName: "testPeNic", - ipConfigurations: [ - { - name: "pestaticconfig", - groupId: "file", - memberName: "file", - privateIPAddress: "192.168.0.6", - }, - ], - ipVersionType: "IPv4", - location: "eastus2euap", - privateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointCreateWithASG.json - */ -async function createPrivateEndpointWithApplicationSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters: PrivateEndpoint = { - applicationSecurityGroups: [ - { - id: "/subscriptions/subId/resourceGroups/rg1/provders/Microsoft.Network/applicationSecurityGroup/asg1", - }, - ], - location: "eastus2euap", - privateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointCreateForManualApproval.json - */ -async function createPrivateEndpointWithManualApprovalConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters: PrivateEndpoint = { - customNetworkInterfaceName: "testPeNic", - ipConfigurations: [ - { - name: "pestaticconfig", - groupId: "file", - memberName: "file", - privateIPAddress: "192.168.0.5", - }, - ], - location: "eastus", - manualPrivateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please manually approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPrivateEndpoint(); - await createPrivateEndpointWithApplicationSecurityGroups(); - await createPrivateEndpointWithManualApprovalConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsDeleteSample.ts deleted file mode 100644 index e5dc49a0391b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified private endpoint. - * - * @summary Deletes the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDelete.json - */ -async function deletePrivateEndpoint(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginDeleteAndWait( - resourceGroupName, - privateEndpointName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePrivateEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsGetSample.ts deleted file mode 100644 index 4c77552b4699..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsGetSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointGet.json - */ -async function getPrivateEndpoint(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get( - resourceGroupName, - privateEndpointName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointGetWithASG.json - */ -async function getPrivateEndpointWithApplicationSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get( - resourceGroupName, - privateEndpointName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointGetForManualApproval.json - */ -async function getPrivateEndpointWithManualApprovalConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get( - resourceGroupName, - privateEndpointName, - ); - console.log(result); -} - -async function main(): Promise { - await getPrivateEndpoint(); - await getPrivateEndpointWithApplicationSecurityGroups(); - await getPrivateEndpointWithManualApprovalConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsListBySubscriptionSample.ts deleted file mode 100644 index 44c78cc83beb..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private endpoints in a subscription. - * - * @summary Gets all private endpoints in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointListAll.json - */ -async function listAllPrivateEndpoints(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateEndpoints.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllPrivateEndpoints(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsListSample.ts deleted file mode 100644 index db1457b95a8f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateEndpointsListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private endpoints in a resource group. - * - * @summary Gets all private endpoints in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointList.json - */ -async function listPrivateEndpointsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateEndpoints.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPrivateEndpointsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts deleted file mode 100644 index c3a3547ecfda..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - CheckPrivateLinkServiceVisibilityRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks whether the subscription is visible to private link service in the specified resource group. - * - * @summary Checks whether the subscription is visible to private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json - */ -async function checkPrivateLinkServiceVisibility(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const parameters: CheckPrivateLinkServiceVisibilityRequest = { - privateLinkServiceAlias: - "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.beginCheckPrivateLinkServiceVisibilityByResourceGroupAndWait( - location, - resourceGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await checkPrivateLinkServiceVisibility(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts deleted file mode 100644 index 068d8f176aa5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - CheckPrivateLinkServiceVisibilityRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks whether the subscription is visible to private link service. - * - * @summary Checks whether the subscription is visible to private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CheckPrivateLinkServiceVisibility.json - */ -async function checkPrivateLinkServiceVisibility(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const parameters: CheckPrivateLinkServiceVisibilityRequest = { - privateLinkServiceAlias: - "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.beginCheckPrivateLinkServiceVisibilityAndWait( - location, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await checkPrivateLinkServiceVisibility(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCreateOrUpdateSample.ts deleted file mode 100644 index 900c47b90b02..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - PrivateLinkService} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an private link service in the specified resource group. - * - * @summary Creates or updates an private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceCreate.json - */ -async function createPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const parameters: PrivateLinkService = { - autoApproval: { subscriptions: ["subscription1", "subscription2"] }, - fqdns: ["fqdn1", "fqdn2", "fqdn3"], - ipConfigurations: [ - { - name: "fe-lb", - privateIPAddress: "10.0.1.4", - privateIPAddressVersion: "IPv4", - privateIPAllocationMethod: "Static", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - loadBalancerFrontendIpConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - ], - location: "eastus", - visibility: { - subscriptions: ["subscription1", "subscription2", "subscription3"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts deleted file mode 100644 index 0dc18a4636fc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete private end point connection for a private link service in a subscription. - * - * @summary Delete private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json - */ -async function deletePrivateEndPointConnectionForAPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.beginDeletePrivateEndpointConnectionAndWait( - resourceGroupName, - serviceName, - peConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePrivateEndPointConnectionForAPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesDeleteSample.ts deleted file mode 100644 index d31e17acb237..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified private link service. - * - * @summary Deletes the specified private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceDelete.json - */ -async function deletePrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginDeleteAndWait( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts deleted file mode 100644 index ca16a8857e19..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specific private end point connection by specific private link service in the resource group. - * - * @summary Get the specific private end point connection by specific private link service in the resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json - */ -async function getPrivateEndPointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.getPrivateEndpointConnection( - resourceGroupName, - serviceName, - peConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getPrivateEndPointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesGetSample.ts deleted file mode 100644 index ac85deaf1006..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified private link service by resource group. - * - * @summary Gets the specified private link service by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceGet.json - */ -async function getPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.get( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await getPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts deleted file mode 100644 index 89c361cb6ad4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * - * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json - */ -async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listAutoApprovedPrivateLinkServicesByResourceGroup( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts deleted file mode 100644 index 168bd1c80b70..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * - * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AutoApprovedPrivateLinkServicesGet.json - */ -async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listAutoApprovedPrivateLinkServices( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListBySubscriptionSample.ts deleted file mode 100644 index 6b33ed56f540..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private link service in a subscription. - * - * @summary Gets all private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceListAll.json - */ -async function listAllPrivateListService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllPrivateListService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts deleted file mode 100644 index 97321f267188..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private end point connections for a specific private link service. - * - * @summary Gets all private end point connections for a specific private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json - */ -async function listPrivateLinkServiceInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listPrivateEndpointConnections( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPrivateLinkServiceInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListSample.ts deleted file mode 100644 index 2bf66b43c277..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private link services in a resource group. - * - * @summary Gets all private link services in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceList.json - */ -async function listPrivateLinkServiceInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPrivateLinkServiceInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts deleted file mode 100644 index e643fb93a194..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - PrivateEndpointConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Approve or reject private end point connection for a private link service in a subscription. - * - * @summary Approve or reject private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json - */ -async function approveOrRejectPrivateEndPointConnectionForAPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const parameters: PrivateEndpointConnection = { - name: "testPlePeConnection", - privateEndpoint: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe", - }, - privateLinkServiceConnectionState: { - description: "approved it for some reason.", - status: "Approved", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.updatePrivateEndpointConnection( - resourceGroupName, - serviceName, - peConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await approveOrRejectPrivateEndPointConnectionForAPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesCreateOrUpdateSample.ts deleted file mode 100644 index fe8aa858f962..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesCreateOrUpdateSample.ts +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { PublicIPAddress} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDns.json - */ -async function createPublicIPAddressDns(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { - dnsSettings: { domainNameLabel: "dnslbl" }, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json - */ -async function createPublicIPAddressDnsWithDomainNameLabelScope(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { - dnsSettings: { - domainNameLabel: "dnslbl", - domainNameLabelScope: "TenantReuse", - }, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateCustomizedValues.json - */ -async function createPublicIPAddressAllocationMethod(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { - idleTimeoutInMinutes: 10, - location: "eastus", - publicIPAddressVersion: "IPv4", - publicIPAllocationMethod: "Static", - sku: { name: "Standard", tier: "Global" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDefaults.json - */ -async function createPublicIPAddressDefaults(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDefaultsStandardV2Sku.json - */ -async function createPublicIPAddressDefaultsWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPublicIPAddressDns(); - await createPublicIPAddressDnsWithDomainNameLabelScope(); - await createPublicIPAddressAllocationMethod(); - await createPublicIPAddressDefaults(); - await createPublicIPAddressDefaultsWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts deleted file mode 100644 index 559ca44d2c75..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the Ddos Protection Status of a Public IP Address - * - * @summary Gets the Ddos Protection Status of a Public IP Address - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressGetDdosProtectionStatus.json - */ -async function getDdosProtectionStatusOfAPublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-pip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.beginDdosProtectionStatusAndWait( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await getDdosProtectionStatusOfAPublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDeleteSample.ts deleted file mode 100644 index a839348dbbb4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified public IP address. - * - * @summary Deletes the specified public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressDelete.json - */ -async function deletePublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginDeleteAndWait( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts deleted file mode 100644 index d8704964ec7e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - DisassociateCloudServicePublicIpRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. - * - * @summary Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressDisassociateCloudServiceReservedPublicIp.json - */ -async function disassociatePublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "pip1"; - const parameters: DisassociateCloudServicePublicIpRequest = { - publicIpArmId: - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/publicIpAddresses/pip2", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.beginDisassociateCloudServiceReservedPublicIpAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await disassociatePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts deleted file mode 100644 index 42edaf72aa44..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified public IP address in a cloud service. - * - * @summary Get the specified public IP address in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServicePublicIpGet.json - */ -async function getVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const roleInstanceName = "Test_VM_0"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const publicIpAddressName = "pub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.getCloudServicePublicIPAddress( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await getVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetSample.ts deleted file mode 100644 index 2d3521efad95..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified public IP address in a specified resource group. - * - * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressGet.json - */ -async function getPublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "testDNS-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.get( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified public IP address in a specified resource group. - * - * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressGetStandardV2Sku.json - */ -async function getPublicIPAddressWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "testDNS-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.get( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await getPublicIPAddress(); - await getPublicIPAddressWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts deleted file mode 100644 index 552f86373dd2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified public IP address in a virtual machine scale set. - * - * @summary Get the specified public IP address in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssPublicIpGet.json - */ -async function getVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const publicIpAddressName = "pub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.getVirtualMachineScaleSetPublicIPAddress( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await getVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListAllSample.ts deleted file mode 100644 index 95780b95f0e0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the public IP addresses in a subscription. - * - * @summary Gets all the public IP addresses in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressListAll.json - */ -async function listAllPublicIPAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllPublicIPAddresses(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts deleted file mode 100644 index ae3786bf4310..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses on a cloud service level. - * - * @summary Gets information about all public IP addresses on a cloud service level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServicePublicIpListAll.json - */ -async function listVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listCloudServicePublicIPAddresses( - resourceGroupName, - cloudServiceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts deleted file mode 100644 index c2a39157e0b4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * - * @summary Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceRoleInstancePublicIpList.json - */ -async function listVmssvmPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const roleInstanceName = "Test_VM_0"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listCloudServiceRoleInstancePublicIPAddresses( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssvmPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListSample.ts deleted file mode 100644 index 18986e81d4f9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all public IP addresses in a resource group. - * - * @summary Gets all public IP addresses in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressList.json - */ -async function listResourceGroupPublicIPAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listResourceGroupPublicIPAddresses(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts deleted file mode 100644 index 075982105536..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses on a virtual machine scale set level. - * - * @summary Gets information about all public IP addresses on a virtual machine scale set level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssPublicIpListAll.json - */ -async function listVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listVirtualMachineScaleSetPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts deleted file mode 100644 index b2d62ce05e74..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * - * @summary Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssVmPublicIpList.json - */ -async function listVmssvmPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listVirtualMachineScaleSetVMPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssvmPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts deleted file mode 100644 index 50eab4d73794..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ReserveCloudServicePublicIpAddressRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. - * - * @summary Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressReserve.json - */ -async function reservePublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: ReserveCloudServicePublicIpAddressRequest = { - isRollback: "false", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.beginReserveCloudServicePublicIpAddressAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await reservePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesUpdateTagsSample.ts deleted file mode 100644 index 26a50ad9c65b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPAddressesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates public IP address tags. - * - * @summary Updates public IP address tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressUpdateTags.json - */ -async function updatePublicIPAddressTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.updateTags( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updatePublicIPAddressTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts deleted file mode 100644 index 8d016da86f07..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { PublicIPPrefix} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixCreateCustomizedValues.json - */ -async function createPublicIPPrefixAllocationMethod(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: PublicIPPrefix = { - location: "westus", - prefixLength: 30, - publicIPAddressVersion: "IPv4", - sku: { name: "Standard", tier: "Regional" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixCreateDefaults.json - */ -async function createPublicIPPrefixDefaults(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: PublicIPPrefix = { - location: "westus", - prefixLength: 30, - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixCreateDefaultsStandardV2Sku.json - */ -async function createPublicIPPrefixDefaultsWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: PublicIPPrefix = { - location: "westus", - prefixLength: 30, - sku: { name: "StandardV2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPublicIPPrefixAllocationMethod(); - await createPublicIPPrefixDefaults(); - await createPublicIPPrefixDefaultsWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesDeleteSample.ts deleted file mode 100644 index 806ac3c1bfa3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified public IP prefix. - * - * @summary Deletes the specified public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixDelete.json - */ -async function deletePublicIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginDeleteAndWait( - resourceGroupName, - publicIpPrefixName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePublicIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesGetSample.ts deleted file mode 100644 index 13b826e253ea..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. - * - * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixGet.json - */ -async function getPublicIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.get( - resourceGroupName, - publicIpPrefixName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. - * - * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixGetStandardV2Sku.json - */ -async function getPublicIPPrefixWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.get( - resourceGroupName, - publicIpPrefixName, - ); - console.log(result); -} - -async function main(): Promise { - await getPublicIPPrefix(); - await getPublicIPPrefixWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesListAllSample.ts deleted file mode 100644 index fd67c4f3535a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the public IP prefixes in a subscription. - * - * @summary Gets all the public IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixListAll.json - */ -async function listAllPublicIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPPrefixes.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllPublicIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesListSample.ts deleted file mode 100644 index d1f4698ca4d6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all public IP prefixes in a resource group. - * - * @summary Gets all public IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixList.json - */ -async function listResourceGroupPublicIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPPrefixes.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listResourceGroupPublicIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesUpdateTagsSample.ts deleted file mode 100644 index 69fec42645c2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/publicIPPrefixesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates public IP prefix tags. - * - * @summary Updates public IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixUpdateTags.json - */ -async function updatePublicIPPrefixTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.updateTags( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updatePublicIPPrefixTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/putBastionShareableLinkSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/putBastionShareableLinkSample.ts deleted file mode 100644 index 486e3c6eb7a1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/putBastionShareableLinkSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BastionShareableLinkListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Creates a Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionShareableLinkCreate.json - */ -async function createBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest: BastionShareableLinkListRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.beginListPutBastionShareableLinkAndWait( - resourceGroupName, - bastionHostName, - bslRequest, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await createBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsCreateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsCreateSample.ts deleted file mode 100644 index e08c0e7e4b4d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsCreateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ReachabilityAnalysisIntent} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates Reachability Analysis Intent. - * - * @summary Creates Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentPut.json - */ -async function reachabilityAnalysisIntentCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntentName"; - const body: ReachabilityAnalysisIntent = { - properties: { - description: "A sample reachability analysis intent", - destinationResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmDest", - ipTraffic: { - destinationIps: ["10.4.0.1"], - destinationPorts: ["0"], - protocols: ["Any"], - sourceIps: ["10.4.0.0"], - sourcePorts: ["0"], - }, - sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmSrc", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.create( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - body, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisIntentCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts deleted file mode 100644 index 32427473619c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes Reachability Analysis Intent. - * - * @summary Deletes Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentDelete.json - */ -async function reachabilityAnalysisIntentDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntent"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.delete( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisIntentDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsGetSample.ts deleted file mode 100644 index e24b80ac8a54..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the Reachability Analysis Intent. - * - * @summary Get the Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentGet.json - */ -async function reachabilityAnalysisIntentGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntentName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.get( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisIntentGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsListSample.ts deleted file mode 100644 index 781617e7f48e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisIntentsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of Reachability Analysis Intents . - * - * @summary Gets list of Reachability Analysis Intents . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentList.json - */ -async function reachabilityAnalysisIntentList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testVerifierWorkspace1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reachabilityAnalysisIntents.list( - resourceGroupName, - networkManagerName, - workspaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await reachabilityAnalysisIntentList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsCreateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsCreateSample.ts deleted file mode 100644 index 5dbfc9933e4b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsCreateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ReachabilityAnalysisRun} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates Reachability Analysis Runs. - * - * @summary Creates Reachability Analysis Runs. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunPut.json - */ -async function reachabilityAnalysisRunCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRunName"; - const body: ReachabilityAnalysisRun = { - properties: { - description: "A sample reachability analysis run", - intentId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/verifierWorkspaces/testVerifierWorkspace1/reachabilityAnalysisIntents/testReachabilityAnalysisIntenant1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.create( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - body, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisRunCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsDeleteSample.ts deleted file mode 100644 index 05482d59a8a6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsDeleteSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes Reachability Analysis Run. - * - * @summary Deletes Reachability Analysis Run. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunDelete.json - */ -async function reachabilityAnalysisRunDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRun"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisRunDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsGetSample.ts deleted file mode 100644 index 94a2887f91d4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets Reachability Analysis Run. - * - * @summary Gets Reachability Analysis Run. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunGet.json - */ -async function reachabilityAnalysisRunGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRunName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.get( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisRunGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsListSample.ts deleted file mode 100644 index d7253cd1e42b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/reachabilityAnalysisRunsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of Reachability Analysis Runs. - * - * @summary Gets list of Reachability Analysis Runs. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunList.json - */ -async function reachabilityAnalysisRunList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testVerifierWorkspace1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reachabilityAnalysisRuns.list( - resourceGroupName, - networkManagerName, - workspaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await reachabilityAnalysisRunList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/resourceNavigationLinksListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/resourceNavigationLinksListSample.ts deleted file mode 100644 index ed6c884de809..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/resourceNavigationLinksListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a list of resource navigation links for a subnet. - * - * @summary Gets a list of resource navigation links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetResourceNavigationLinks.json - */ -async function getResourceNavigationLinks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnet"; - const subnetName = "subnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.resourceNavigationLinks.list( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main(): Promise { - await getResourceNavigationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesCreateOrUpdateSample.ts deleted file mode 100644 index 48ac02e3e738..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RouteFilterRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a route in the specified route filter. - * - * @summary Creates or updates a route in the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleCreate.json - */ -async function routeFilterRuleCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "ruleName"; - const routeFilterRuleParameters: RouteFilterRule = { - access: "Allow", - communities: ["12076:5030", "12076:5040"], - routeFilterRuleType: "Community", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.beginCreateOrUpdateAndWait( - resourceGroupName, - routeFilterName, - ruleName, - routeFilterRuleParameters, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterRuleCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesDeleteSample.ts deleted file mode 100644 index b2a94ec48527..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified rule from a route filter. - * - * @summary Deletes the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleDelete.json - */ -async function routeFilterRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "ruleName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.beginDeleteAndWait( - resourceGroupName, - routeFilterName, - ruleName, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesGetSample.ts deleted file mode 100644 index 23e5fdd04624..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified rule from a route filter. - * - * @summary Gets the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleGet.json - */ -async function routeFilterRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.get( - resourceGroupName, - routeFilterName, - ruleName, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesListByRouteFilterSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesListByRouteFilterSample.ts deleted file mode 100644 index 03d299d01867..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeFilterRulesListByRouteFilterSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all RouteFilterRules in a route filter. - * - * @summary Gets all RouteFilterRules in a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleListByRouteFilter.json - */ -async function routeFilterRuleListByRouteFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilterRules.listByRouteFilter( - resourceGroupName, - routeFilterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routeFilterRuleListByRouteFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersCreateOrUpdateSample.ts deleted file mode 100644 index 997816588691..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RouteFilter} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a route filter in a specified resource group. - * - * @summary Creates or updates a route filter in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterCreate.json - */ -async function routeFilterCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const routeFilterParameters: RouteFilter = { - location: "West US", - rules: [ - { - name: "ruleName", - access: "Allow", - communities: ["12076:5030", "12076:5040"], - routeFilterRuleType: "Community", - }, - ], - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.beginCreateOrUpdateAndWait( - resourceGroupName, - routeFilterName, - routeFilterParameters, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersDeleteSample.ts deleted file mode 100644 index c485ea3798b1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified route filter. - * - * @summary Deletes the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterDelete.json - */ -async function routeFilterDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.beginDeleteAndWait( - resourceGroupName, - routeFilterName, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersGetSample.ts deleted file mode 100644 index 2a2f67c28be5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified route filter. - * - * @summary Gets the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterGet.json - */ -async function routeFilterGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.get( - resourceGroupName, - routeFilterName, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersListByResourceGroupSample.ts deleted file mode 100644 index 3f5a7520139a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all route filters in a resource group. - * - * @summary Gets all route filters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterListByResourceGroup.json - */ -async function routeFilterListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilters.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routeFilterListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersListSample.ts deleted file mode 100644 index 9168cac8180c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all route filters in a subscription. - * - * @summary Gets all route filters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterList.json - */ -async function routeFilterList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilters.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routeFilterList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersUpdateTagsSample.ts deleted file mode 100644 index 08e28d8f6439..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeFiltersUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of a route filter. - * - * @summary Updates tags of a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterUpdateTags.json - */ -async function updateRouteFilterTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const parameters: TagsObject = { tags: { key1: "value1" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.updateTags( - resourceGroupName, - routeFilterName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateRouteFilterTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeMapsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeMapsCreateOrUpdateSample.ts deleted file mode 100644 index 9a3d3587f467..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeMapsCreateOrUpdateSample.ts +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RouteMap} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a RouteMap if it doesn't exist else updates the existing one. - * - * @summary Creates a RouteMap if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapPut.json - */ -async function routeMapPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const routeMapParameters: RouteMap = { - associatedInboundConnections: [ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGateway1/expressRouteConnections/exrConn1", - ], - associatedOutboundConnections: [], - rules: [ - { - name: "rule1", - actions: [ - { - type: "Add", - parameters: [{ asPath: ["22334"], community: [], routePrefix: [] }], - }, - ], - matchCriteria: [ - { - asPath: [], - community: [], - matchCondition: "Contains", - routePrefix: ["10.0.0.0/8"], - }, - ], - nextStepIfMatched: "Continue", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeMapName, - routeMapParameters, - ); - console.log(result); -} - -async function main(): Promise { - await routeMapPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeMapsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeMapsDeleteSample.ts deleted file mode 100644 index 100036a95631..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeMapsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a RouteMap. - * - * @summary Deletes a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapDelete.json - */ -async function routeMapDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeMapName, - ); - console.log(result); -} - -async function main(): Promise { - await routeMapDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeMapsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeMapsGetSample.ts deleted file mode 100644 index 4f0efa33774a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeMapsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a RouteMap. - * - * @summary Retrieves the details of a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapGet.json - */ -async function routeMapGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.get( - resourceGroupName, - virtualHubName, - routeMapName, - ); - console.log(result); -} - -async function main(): Promise { - await routeMapGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeMapsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeMapsListSample.ts deleted file mode 100644 index 3fd6756fc08e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeMapsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all RouteMaps. - * - * @summary Retrieves the details of all RouteMaps. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapList.json - */ -async function routeMapList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeMaps.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routeMapList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeTablesCreateOrUpdateSample.ts deleted file mode 100644 index 706cfe564b94..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesCreateOrUpdateSample.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RouteTable} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or updates a route table in a specified resource group. - * - * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableCreate.json - */ -async function createRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters: RouteTable = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or updates a route table in a specified resource group. - * - * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableCreateWithRoute.json - */ -async function createRouteTableWithRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters: RouteTable = { - disableBgpRoutePropagation: true, - location: "westus", - routes: [ - { - name: "route1", - addressPrefix: "10.0.3.0/24", - nextHopType: "VirtualNetworkGateway", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createRouteTable(); - await createRouteTableWithRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeTablesDeleteSample.ts deleted file mode 100644 index 1b1f8723c8a7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified route table. - * - * @summary Deletes the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableDelete.json - */ -async function deleteRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginDeleteAndWait( - resourceGroupName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeTablesGetSample.ts deleted file mode 100644 index 8bfe1bf52809..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified route table. - * - * @summary Gets the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableGet.json - */ -async function getRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.get( - resourceGroupName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await getRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeTablesListAllSample.ts deleted file mode 100644 index c4b74cae7992..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all route tables in a subscription. - * - * @summary Gets all route tables in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableListAll.json - */ -async function listAllRouteTables(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeTables.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeTablesListSample.ts deleted file mode 100644 index 5bed0ba70ea0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all route tables in a resource group. - * - * @summary Gets all route tables in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableList.json - */ -async function listRouteTablesInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeTables.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRouteTablesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routeTablesUpdateTagsSample.ts deleted file mode 100644 index 724e34286c3a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routeTablesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a route table tags. - * - * @summary Updates a route table tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableUpdateTags.json - */ -async function updateRouteTableTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.updateTags( - resourceGroupName, - routeTableName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateRouteTableTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routesCreateOrUpdateSample.ts deleted file mode 100644 index f90c839a0634..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routesCreateOrUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Route} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a route in the specified route table. - * - * @summary Creates or updates a route in the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteCreate.json - */ -async function createRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const routeParameters: Route = { - addressPrefix: "10.0.3.0/24", - nextHopType: "VirtualNetworkGateway", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - routeName, - routeParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routesDeleteSample.ts deleted file mode 100644 index 1ef275d5143f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified route from a route table. - * - * @summary Deletes the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteDelete.json - */ -async function deleteRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.beginDeleteAndWait( - resourceGroupName, - routeTableName, - routeName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routesGetSample.ts deleted file mode 100644 index 7ca4e7622df6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified route from a route table. - * - * @summary Gets the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteGet.json - */ -async function getRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.get( - resourceGroupName, - routeTableName, - routeName, - ); - console.log(result); -} - -async function main(): Promise { - await getRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routesListSample.ts deleted file mode 100644 index 72aa45d2afe3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all routes in a route table. - * - * @summary Gets all routes in a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteList.json - */ -async function listRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routes.list( - resourceGroupName, - routeTableName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingIntentCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingIntentCreateOrUpdateSample.ts deleted file mode 100644 index b94f18fd5b57..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingIntentCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RoutingIntent} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * - * @summary Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentPut.json - */ -async function routeTablePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const routingIntentParameters: RoutingIntent = { - routingPolicies: [ - { - name: "InternetTraffic", - destinations: ["Internet"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", - }, - { - name: "PrivateTrafficPolicy", - destinations: ["PrivateTraffic"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.routingIntentOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routingIntentName, - routingIntentParameters, - ); - console.log(result); -} - -async function main(): Promise { - await routeTablePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingIntentDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingIntentDeleteSample.ts deleted file mode 100644 index 581b8b29259e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingIntentDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a RoutingIntent. - * - * @summary Deletes a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentDelete.json - */ -async function routeTableDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routingIntentName, - ); - console.log(result); -} - -async function main(): Promise { - await routeTableDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingIntentGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingIntentGetSample.ts deleted file mode 100644 index c0944e0597e4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingIntentGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a RoutingIntent. - * - * @summary Retrieves the details of a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentGet.json - */ -async function routeTableGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.get( - resourceGroupName, - virtualHubName, - routingIntentName, - ); - console.log(result); -} - -async function main(): Promise { - await routeTableGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingIntentListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingIntentListSample.ts deleted file mode 100644 index b7aef9642ec4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingIntentListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * - * @summary Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentList.json - */ -async function routingIntentList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingIntentOperations.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routingIntentList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts deleted file mode 100644 index bbbe86dd562c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - RoutingRuleCollection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a routing rule collection. - * - * @summary Creates or updates a routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionPut.json - */ -async function createOrUpdateARoutingRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleCollection: RoutingRuleCollection = { - description: "A sample policy", - appliesTo: [ - { - networkGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateARoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsDeleteSample.ts deleted file mode 100644 index 2e20f2669750..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsDeleteSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an routing rule collection. - * - * @summary Deletes an routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionDelete.json - */ -async function deletesAnRoutingRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deletesAnRoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsGetSample.ts deleted file mode 100644 index 52fe86ea52d9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a network manager routing configuration rule collection. - * - * @summary Gets a network manager routing configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionGet.json - */ -async function getsRoutingRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getsRoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsListSample.ts deleted file mode 100644 index 637981311469..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingRuleCollectionsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the rule collections in a routing configuration, in a paginated format. - * - * @summary Lists all the rule collections in a routing configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleCollectionList.json - */ -async function listRoutingRuleCollections(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRoutingRuleCollections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingRulesCreateOrUpdateSample.ts deleted file mode 100644 index c5e24ad9c875..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RoutingRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an routing rule. - * - * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRulePut.json - */ -async function createADefaultRoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const routingRule: RoutingRule = { - description: "This is Sample Routing Rule", - destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, - nextHop: { nextHopType: "VirtualNetworkGateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - routingRule, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an routing rule. - * - * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRulePut.json - */ -async function createAnRoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const routingRule: RoutingRule = { - description: "This is Sample Routing Rule", - destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, - nextHop: { nextHopType: "VirtualNetworkGateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - routingRule, - ); - console.log(result); -} - -async function main(): Promise { - await createADefaultRoutingRule(); - await createAnRoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingRulesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingRulesDeleteSample.ts deleted file mode 100644 index 5ebf94a2edd5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingRulesDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - RoutingRulesDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a routing rule. - * - * @summary Deletes a routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleDelete.json - */ -async function deletesARoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "sampleRule"; - const force = false; - const options: RoutingRulesDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deletesARoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingRulesGetSample.ts deleted file mode 100644 index ae35d951b39b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingRulesGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a network manager routing configuration routing rule. - * - * @summary Gets a network manager routing configuration routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleGet.json - */ -async function getsRoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main(): Promise { - await getsRoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/routingRulesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/routingRulesListSample.ts deleted file mode 100644 index 7f93efd3ccb4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/routingRulesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network manager routing configuration routing rules. - * - * @summary List all network manager routing configuration routing rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleList.json - */ -async function listRoutingRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRoutingRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 1320c5af6495..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { ScopeConnection} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates scope connection from Network Manager - * - * @summary Creates or updates scope connection from Network Manager - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionPut.json - */ -async function createOrUpdateNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const parameters: ScopeConnection = { - description: "This is a scope connection to a cross tenant subscription.", - resourceId: "subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b", - tenantId: "6babcaad-604b-40ac-a9d7-9fd97c0b779f", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.createOrUpdate( - resourceGroupName, - networkManagerName, - scopeConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsDeleteSample.ts deleted file mode 100644 index 83a8de0227e0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the pending scope connection created by this network manager. - * - * @summary Delete the pending scope connection created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionDelete.json - */ -async function deleteNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.delete( - resourceGroupName, - networkManagerName, - scopeConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsGetSample.ts deleted file mode 100644 index 309ca374bf78..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get specified scope connection created by this Network Manager. - * - * @summary Get specified scope connection created by this Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionGet.json - */ -async function getNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.get( - resourceGroupName, - networkManagerName, - scopeConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsListSample.ts deleted file mode 100644 index 9d6d1d0a44ec..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/scopeConnectionsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all scope connections created by this network manager. - * - * @summary List all scope connections created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerScopeConnectionList.json - */ -async function listNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.scopeConnections.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 3b7b90a207d1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityAdminConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network manager security admin configuration. - * - * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json - */ -async function createManualModeSecurityAdminConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityAdminConfiguration: SecurityAdminConfiguration = { - description: - "A configuration which will update any network groups ip addresses at commit times.", - networkGroupAddressSpaceAggregationOption: "Manual", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityAdminConfiguration, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network manager security admin configuration. - * - * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationPut.json - */ -async function createNetworkManagerSecurityAdminConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityAdminConfiguration: SecurityAdminConfiguration = { - description: "A sample policy", - applyOnNetworkIntentPolicyBasedServices: ["None"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityAdminConfiguration, - ); - console.log(result); -} - -async function main(): Promise { - await createManualModeSecurityAdminConfiguration(); - await createNetworkManagerSecurityAdminConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsDeleteSample.ts deleted file mode 100644 index 4aa1aee1f75c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityAdminConfigurationsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network manager security admin configuration. - * - * @summary Deletes a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json - */ -async function deleteNetworkManagerSecurityAdminConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const force = false; - const options: SecurityAdminConfigurationsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkManagerSecurityAdminConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsGetSample.ts deleted file mode 100644 index 1dfc45699b59..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a network manager security admin configuration. - * - * @summary Retrieves a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationGet.json - */ -async function getSecurityAdminConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getSecurityAdminConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsListSample.ts deleted file mode 100644 index e4d94cdf1281..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityAdminConfigurationsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the network manager security admin configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager security admin configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityAdminConfigurationList.json - */ -async function listSecurityAdminConfigurationsInANetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityAdminConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSecurityAdminConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts deleted file mode 100644 index 51da53374106..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityPartnerProvider} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Security Partner Provider. - * - * @summary Creates or updates the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderPut.json - */ -async function createSecurityPartnerProvider(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const parameters: SecurityPartnerProvider = { - location: "West US", - securityProviderName: "ZScaler", - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.securityPartnerProviders.beginCreateOrUpdateAndWait( - resourceGroupName, - securityPartnerProviderName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersDeleteSample.ts deleted file mode 100644 index 2f155f4199a3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Security Partner Provider. - * - * @summary Deletes the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderDelete.json - */ -async function deleteSecurityPartnerProvider(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.beginDeleteAndWait( - resourceGroupName, - securityPartnerProviderName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersGetSample.ts deleted file mode 100644 index 1e7544f46078..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Security Partner Provider. - * - * @summary Gets the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderGet.json - */ -async function getSecurityPartnerProvider(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.get( - resourceGroupName, - securityPartnerProviderName, - ); - console.log(result); -} - -async function main(): Promise { - await getSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts deleted file mode 100644 index f570a595ff06..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Security Partner Providers in a resource group. - * - * @summary Lists all Security Partner Providers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderListByResourceGroup.json - */ -async function listAllSecurityPartnerProvidersForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityPartnerProviders.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllSecurityPartnerProvidersForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersListSample.ts deleted file mode 100644 index 1d0ae8a50ffc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Security Partner Providers in a subscription. - * - * @summary Gets all the Security Partner Providers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderListBySubscription.json - */ -async function listAllSecurityPartnerProvidersForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityPartnerProviders.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllSecurityPartnerProvidersForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersUpdateTagsSample.ts deleted file mode 100644 index d11befcf074b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityPartnerProvidersUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of a Security Partner Provider resource. - * - * @summary Updates tags of a Security Partner Provider resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderUpdateTags.json - */ -async function updateSecurityPartnerProviderTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.updateTags( - resourceGroupName, - securityPartnerProviderName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateSecurityPartnerProviderTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityRulesCreateOrUpdateSample.ts deleted file mode 100644 index be65c07f8e2e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { SecurityRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a security rule in the specified network security group. - * - * @summary Creates or updates a security rule in the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleCreate.json - */ -async function createSecurityRule(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const securityRuleParameters: SecurityRule = { - access: "Deny", - destinationAddressPrefix: "11.0.0.0/8", - destinationPortRange: "8080", - direction: "Outbound", - priority: 100, - sourceAddressPrefix: "10.0.0.0/8", - sourcePortRange: "*", - protocol: "*", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - securityRuleParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createSecurityRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityRulesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityRulesDeleteSample.ts deleted file mode 100644 index 235ea177dd25..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified network security rule. - * - * @summary Deletes the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleDelete.json - */ -async function deleteNetworkSecurityRuleFromNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.beginDeleteAndWait( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkSecurityRuleFromNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityRulesGetSample.ts deleted file mode 100644 index 812e4f64b279..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network security rule. - * - * @summary Get the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleGet.json - */ -async function getNetworkSecurityRuleInNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.get( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkSecurityRuleInNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityRulesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityRulesListSample.ts deleted file mode 100644 index ed4632c59fb5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityRulesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all security rules in a network security group. - * - * @summary Gets all security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleList.json - */ -async function listNetworkSecurityRulesInNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityRules.list( - resourceGroupName, - networkSecurityGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkSecurityRulesInNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index aa2da849fa10..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityUserConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network manager security user configuration. - * - * @summary Creates or updates a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationPut.json - */ -async function createNetworkManagerSecurityUserConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityUserConfiguration: SecurityUserConfiguration = { - description: "A sample policy", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityUserConfiguration, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkManagerSecurityUserConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsDeleteSample.ts deleted file mode 100644 index aad50a19a3f4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityUserConfigurationsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network manager security user configuration. - * - * @summary Deletes a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationDelete.json - */ -async function deleteNetworkManagerSecurityUserConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const force = false; - const options: SecurityUserConfigurationsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkManagerSecurityUserConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsGetSample.ts deleted file mode 100644 index 1fd7328f425b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a network manager security user configuration. - * - * @summary Retrieves a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationGet.json - */ -async function getSecurityUserConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getSecurityUserConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsListSample.ts deleted file mode 100644 index 4cb7b057690b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserConfigurationsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the network manager security user configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager security user configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserConfigurationList.json - */ -async function listSecurityUserConfigurationsInANetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSecurityUserConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts deleted file mode 100644 index d332b225acd6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityUserRuleCollection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a security user rule collection. - * - * @summary Creates or updates a security user rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json - */ -async function createOrUpdateASecurityUserRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const securityUserRuleCollection: SecurityUserRuleCollection = { - description: "A sample policy", - appliesToGroups: [ - { - networkGroupId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - securityUserRuleCollection, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateASecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsDeleteSample.ts deleted file mode 100644 index c448d02690c6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityUserRuleCollectionsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a Security User Rule collection. - * - * @summary Deletes a Security User Rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json - */ -async function deletesASecurityUserRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const force = false; - const options: SecurityUserRuleCollectionsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deletesASecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsGetSample.ts deleted file mode 100644 index 8cacf722d392..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a network manager security user configuration rule collection. - * - * @summary Gets a network manager security user configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json - */ -async function getsSecurityUserRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getsSecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsListSample.ts deleted file mode 100644 index ba470b19a6c8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRuleCollectionsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the security user rule collections in a security configuration, in a paginated format. - * - * @summary Lists all the security user rule collections in a security configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleCollectionList.json - */ -async function listRuleCollectionsInASecurityConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRuleCollectionsInASecurityConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesCreateOrUpdateSample.ts deleted file mode 100644 index 069d84d6ffb2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { SecurityUserRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a security user rule. - * - * @summary Creates or updates a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRulePut.json - */ -async function createASecurityUserRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const securityUserRule: SecurityUserRule = { - description: "Sample User Rule", - destinationPortRanges: ["22"], - destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - direction: "Inbound", - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - securityUserRule, - ); - console.log(result); -} - -async function main(): Promise { - await createASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesDeleteSample.ts deleted file mode 100644 index 4e6f70737f3a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityUserRulesDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a security user rule. - * - * @summary Deletes a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleDelete.json - */ -async function deleteASecurityUserRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const force = false; - const options: SecurityUserRulesDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deleteASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesGetSample.ts deleted file mode 100644 index 559c92ab2360..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a security user rule. - * - * @summary Gets a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleGet.json - */ -async function getsASecurityUserRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main(): Promise { - await getsASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesListSample.ts deleted file mode 100644 index 362ffd707757..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/securityUserRulesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Security User Rules in a rule collection. - * - * @summary Lists all Security User Rules in a rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerSecurityUserRuleList.json - */ -async function listSecurityUserRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSecurityUserRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceAssociationLinksListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceAssociationLinksListSample.ts deleted file mode 100644 index 1f375c00a042..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceAssociationLinksListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a list of service association links for a subnet. - * - * @summary Gets a list of service association links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetServiceAssociationLinks.json - */ -async function getServiceAssociationLinks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnet"; - const subnetName = "subnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceAssociationLinks.list( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main(): Promise { - await getServiceAssociationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index 74f6a893fcb8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ServiceEndpointPolicy} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a service Endpoint Policies. - * - * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyCreate.json - */ -async function createServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const parameters: ServiceEndpointPolicy = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a service Endpoint Policies. - * - * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyCreateWithDefinition.json - */ -async function createServiceEndpointPolicyWithDefinition(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const parameters: ServiceEndpointPolicy = { - location: "westus", - serviceEndpointPolicyDefinitions: [ - { - name: "StorageServiceEndpointPolicyDefinition", - description: "Storage Service EndpointPolicy Definition", - service: "Microsoft.Storage", - serviceResources: [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createServiceEndpointPolicy(); - await createServiceEndpointPolicyWithDefinition(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesDeleteSample.ts deleted file mode 100644 index 1c44282d191e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified service endpoint policy. - * - * @summary Deletes the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDelete.json - */ -async function deleteServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "serviceEndpointPolicy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.beginDeleteAndWait( - resourceGroupName, - serviceEndpointPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesGetSample.ts deleted file mode 100644 index 50a7e6b3c14c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified service Endpoint Policies in a specified resource group. - * - * @summary Gets the specified service Endpoint Policies in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyGet.json - */ -async function getServiceEndPointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testServiceEndpointPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.get( - resourceGroupName, - serviceEndpointPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getServiceEndPointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts deleted file mode 100644 index 7fdefff7e411..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all service endpoint Policies in a resource group. - * - * @summary Gets all service endpoint Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyList.json - */ -async function listResourceGroupServiceEndpointPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicies.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listResourceGroupServiceEndpointPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesListSample.ts deleted file mode 100644 index 625e2c9cc70b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the service endpoint policies in a subscription. - * - * @summary Gets all the service endpoint policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyListAll.json - */ -async function listAllServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicies.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts deleted file mode 100644 index d8308cf94b8e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of a service endpoint policy. - * - * @summary Updates tags of a service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyUpdateTags.json - */ -async function updateServiceEndpointPolicyTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testServiceEndpointPolicy"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.updateTags( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateServiceEndpointPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts deleted file mode 100644 index fc894e52fe94..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ServiceEndpointPolicyDefinition} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * - * @summary Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionCreate.json - */ -async function createServiceEndpointPolicyDefinition(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition = { - description: "Storage Service EndpointPolicy Definition", - service: "Microsoft.Storage", - serviceResources: [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicyDefinitions.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - serviceEndpointPolicyDefinitions, - ); - console.log(result); -} - -async function main(): Promise { - await createServiceEndpointPolicyDefinition(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts deleted file mode 100644 index 8bd179ecdabb..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified ServiceEndpoint policy definitions. - * - * @summary Deletes the specified ServiceEndpoint policy definitions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionDelete.json - */ -async function deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicyDefinitions.beginDeleteAndWait( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts deleted file mode 100644 index dcc933867645..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified service endpoint policy definitions from service endpoint policy. - * - * @summary Get the specified service endpoint policy definitions from service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionGet.json - */ -async function getServiceEndpointDefinitionInServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicyDefinitions.get( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - ); - console.log(result); -} - -async function main(): Promise { - await getServiceEndpointDefinitionInServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts deleted file mode 100644 index 8818c96523e1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all service endpoint policy definitions in a service end point policy. - * - * @summary Gets all service endpoint policy definitions in a service end point policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDefinitionList.json - */ -async function listServiceEndpointDefinitionsInServiceEndPointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicyDefinitions.listByResourceGroup( - resourceGroupName, - serviceEndpointPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listServiceEndpointDefinitionsInServiceEndPointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceTagInformationListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceTagInformationListSample.ts deleted file mode 100644 index b648143779b5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceTagInformationListSample.ts +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ServiceTagInformationListOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagInformationListResult.json - */ -async function getListOfServiceTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json - */ -async function getListOfServiceTagsWithNoAddressPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const noAddressPrefixes = true; - const options: ServiceTagInformationListOptionalParams = { - noAddressPrefixes, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list( - location, - options, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagInformationListResultWithTagname.json - */ -async function getListOfServiceTagsWithTagName(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const tagName = "ApiManagement"; - const options: ServiceTagInformationListOptionalParams = { tagName }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list( - location, - options, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getListOfServiceTags(); - await getListOfServiceTagsWithNoAddressPrefixes(); - await getListOfServiceTagsWithTagName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/serviceTagsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/serviceTagsListSample.ts deleted file mode 100644 index 8deb8bc0d2d1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/serviceTagsListSample.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a list of service tag information resources. - * - * @summary Gets a list of service tag information resources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagsList.json - */ -async function getListOfServiceTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceTags.list(location); - console.log(result); -} - -async function main(): Promise { - await getListOfServiceTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsCreateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsCreateSample.ts deleted file mode 100644 index e25d96ab09d5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsCreateSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates/Updates the Static CIDR resource. - * - * @summary Creates/Updates the Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Create.json - */ -async function staticCidrsCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.create( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main(): Promise { - await staticCidrsCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsDeleteSample.ts deleted file mode 100644 index 8fdcedb20e14..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsDeleteSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the Static CIDR resource. - * - * @summary Delete the Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Delete.json - */ -async function staticCidrsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main(): Promise { - await staticCidrsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsGetSample.ts deleted file mode 100644 index cd550f6d3e6f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specific Static CIDR resource. - * - * @summary Gets the specific Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Get.json - */ -async function staticCidrsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.get( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main(): Promise { - await staticCidrsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsListSample.ts deleted file mode 100644 index 2b3ae9b9f5c3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/staticCidrsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of Static CIDR resources at Network Manager level. - * - * @summary Gets list of Static CIDR resources at Network Manager level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_List.json - */ -async function staticCidrsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.staticCidrs.list( - resourceGroupName, - networkManagerName, - poolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await staticCidrsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/staticMembersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/staticMembersCreateOrUpdateSample.ts deleted file mode 100644 index b782a2c66e63..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/staticMembersCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { StaticMember} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a static member. - * - * @summary Creates or updates a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberPut.json - */ -async function staticMemberPut(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const parameters: StaticMember = { - resourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroup/rg1/providers/Microsoft.Network/virtualnetworks/vnet1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.createOrUpdate( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await staticMemberPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/staticMembersDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/staticMembersDeleteSample.ts deleted file mode 100644 index 6d1a0d232100..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/staticMembersDeleteSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a static member. - * - * @summary Deletes a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberDelete.json - */ -async function staticMembersDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "SampleRG"; - const networkManagerName = "TestNM"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.delete( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - ); - console.log(result); -} - -async function main(): Promise { - await staticMembersDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/staticMembersGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/staticMembersGetSample.ts deleted file mode 100644 index 74e246b09d44..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/staticMembersGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified static member. - * - * @summary Gets the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberGet.json - */ -async function staticMembersGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.get( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - ); - console.log(result); -} - -async function main(): Promise { - await staticMembersGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/staticMembersListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/staticMembersListSample.ts deleted file mode 100644 index fd0ef7bc224e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/staticMembersListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the specified static member. - * - * @summary Lists the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberList.json - */ -async function staticMembersList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.staticMembers.list( - resourceGroupName, - networkManagerName, - networkGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await staticMembersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/subnetsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/subnetsCreateOrUpdateSample.ts deleted file mode 100644 index 97c7e842e7d4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/subnetsCreateOrUpdateSample.ts +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Subnet} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreate.json - */ -async function createSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreateWithDelegation.json - */ -async function createSubnetWithADelegation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreateServiceEndpoint.json - */ -async function createSubnetWithServiceEndpoints(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json - */ -async function createSubnetWithServiceEndpointsWithNetworkIdentifier(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [ - { - networkIdentifier: { - id: "/subscriptions/subid/resourceGroups/subnet-test/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - service: "Microsoft.Storage", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreateWithSharingScope.json - */ -async function createSubnetWithSharingScope(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createSubnet(); - await createSubnetWithADelegation(); - await createSubnetWithServiceEndpoints(); - await createSubnetWithServiceEndpointsWithNetworkIdentifier(); - await createSubnetWithSharingScope(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/subnetsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/subnetsDeleteSample.ts deleted file mode 100644 index fb0711b3d7fc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/subnetsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified subnet. - * - * @summary Deletes the specified subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetDelete.json - */ -async function deleteSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteSubnet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/subnetsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/subnetsGetSample.ts deleted file mode 100644 index c2bd15cd66f3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/subnetsGetSample.ts +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetGet.json - */ -async function getSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetGetWithDelegation.json - */ -async function getSubnetWithADelegation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetGetWithSharingScope.json - */ -async function getSubnetWithSharingScope(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main(): Promise { - await getSubnet(); - await getSubnetWithADelegation(); - await getSubnetWithSharingScope(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/subnetsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/subnetsListSample.ts deleted file mode 100644 index 477b8dd9ae11..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/subnetsListSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all subnets in a virtual network. - * - * @summary Gets all subnets in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetList.json - */ -async function listSubnets(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.subnets.list( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSubnets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/subnetsPrepareNetworkPoliciesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/subnetsPrepareNetworkPoliciesSample.ts deleted file mode 100644 index 715683b37df0..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/subnetsPrepareNetworkPoliciesSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - PrepareNetworkPoliciesRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Prepares a subnet by applying network intent policies. - * - * @summary Prepares a subnet by applying network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetPrepareNetworkPolicies.json - */ -async function prepareNetworkPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const subnetName = "subnet1"; - const prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest = - { serviceName: "Microsoft.Sql/managedInstances" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginPrepareNetworkPoliciesAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - prepareNetworkPoliciesRequestParameters, - ); - console.log(result); -} - -async function main(): Promise { - await prepareNetworkPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts deleted file mode 100644 index c852c10f8f2e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - UnprepareNetworkPoliciesRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Unprepares a subnet by removing network intent policies. - * - * @summary Unprepares a subnet by removing network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetUnprepareNetworkPolicies.json - */ -async function unprepareNetworkPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const subnetName = "subnet1"; - const unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest = - { serviceName: "Microsoft.Sql/managedInstances" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginUnprepareNetworkPoliciesAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - unprepareNetworkPoliciesRequestParameters, - ); - console.log(result); -} - -async function main(): Promise { - await unprepareNetworkPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index d5732d45eee7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagerConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a network manager connection on this subscription. - * - * @summary Create a network manager connection on this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionPut.json - */ -async function createOrUpdateSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const parameters: NetworkManagerConnection = { - networkManagerId: - "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.subscriptionNetworkManagerConnections.createOrUpdate( - networkManagerConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts deleted file mode 100644 index e40175d90764..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete specified connection created by this subscription. - * - * @summary Delete specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionDelete.json - */ -async function deleteSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.delete( - networkManagerConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts deleted file mode 100644 index 5eeed664805d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a specified connection created by this subscription. - * - * @summary Get a specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionGet.json - */ -async function getSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.get( - networkManagerConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts deleted file mode 100644 index ec410a9353e2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network manager connections created by this subscription. - * - * @summary List all network manager connections created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerConnectionSubscriptionList.json - */ -async function listSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.subscriptionNetworkManagerConnections.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/supportedSecurityProvidersSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/supportedSecurityProvidersSample.ts deleted file mode 100644 index 8ead0ebd7f86..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/supportedSecurityProvidersSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gives the supported security providers for the virtual wan. - * - * @summary Gives the supported security providers for the virtual wan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWanSupportedSecurityProviders.json - */ -async function supportedSecurityProviders(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.supportedSecurityProviders( - resourceGroupName, - virtualWANName, - ); - console.log(result); -} - -async function main(): Promise { - await supportedSecurityProviders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/usagesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/usagesListSample.ts deleted file mode 100644 index 85c60b4ac293..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/usagesListSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List network usages for a subscription. - * - * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/UsageList.json - */ -async function listUsages(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.usages.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List network usages for a subscription. - * - * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/UsageListSpacedLocation.json - */ -async function listUsagesSpacedLocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "West US"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.usages.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listUsages(); - await listUsagesSpacedLocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesCreateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesCreateSample.ts deleted file mode 100644 index 4ac2d9642ea4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesCreateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VerifierWorkspace} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates Verifier Workspace. - * - * @summary Creates Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspacePut.json - */ -async function verifierWorkspaceCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const body: VerifierWorkspace = { - location: "eastus", - properties: { description: "A sample workspace" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.create( - resourceGroupName, - networkManagerName, - workspaceName, - body, - ); - console.log(result); -} - -async function main(): Promise { - await verifierWorkspaceCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesDeleteSample.ts deleted file mode 100644 index 77d03c5677e1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes Verifier Workspace. - * - * @summary Deletes Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceDelete.json - */ -async function verifierWorkspaceDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main(): Promise { - await verifierWorkspaceDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesGetSample.ts deleted file mode 100644 index 39e653a135e5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets Verifier Workspace. - * - * @summary Gets Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceGet.json - */ -async function verifierWorkspaceGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.get( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main(): Promise { - await verifierWorkspaceGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesListSample.ts deleted file mode 100644 index a40c3d9a137c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of Verifier Workspaces. - * - * @summary Gets list of Verifier Workspaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceList.json - */ -async function verifierWorkspaceList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.verifierWorkspaces.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await verifierWorkspaceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesUpdateSample.ts deleted file mode 100644 index 6ec43f196065..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/verifierWorkspacesUpdateSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates Verifier Workspace. - * - * @summary Updates Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspacePatch.json - */ -async function verifierWorkspacePatch(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.update( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main(): Promise { - await verifierWorkspacePatch(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vipSwapCreateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vipSwapCreateSample.ts deleted file mode 100644 index 06b0846c3405..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vipSwapCreateSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { SwapResource} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Performs vip swap operation on swappable cloud services. - * - * @summary Performs vip swap operation on swappable cloud services. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapPut.json - */ -async function putVipSwapOperation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const parameters: SwapResource = { properties: { slotType: "Production" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.beginCreateAndWait( - groupName, - resourceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putVipSwapOperation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vipSwapGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vipSwapGetSample.ts deleted file mode 100644 index a29609b89144..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vipSwapGetSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * - * @summary Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapGet.json - */ -async function getSwapResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.get(groupName, resourceName); - console.log(result); -} - -async function main(): Promise { - await getSwapResource(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vipSwapListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vipSwapListSample.ts deleted file mode 100644 index 70271f682b4a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vipSwapListSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * - * @summary Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapList.json - */ -async function getSwapResourceList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.list(groupName, resourceName); - console.log(result); -} - -async function main(): Promise { - await getSwapResourceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts deleted file mode 100644 index b0fc0dd20a02..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualApplianceSite} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Site. - * - * @summary Creates or updates the specified Network Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSitePut.json - */ -async function createNetworkVirtualApplianceSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const parameters: VirtualApplianceSite = { - addressPrefix: "192.168.1.0/24", - o365Policy: { - breakOutCategories: { default: true, allow: true, optimize: true }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - siteName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesDeleteSample.ts deleted file mode 100644 index 87644960ed32..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified site from a Virtual Appliance. - * - * @summary Deletes the specified site from a Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteDelete.json - */ -async function deleteNetworkVirtualApplianceSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - siteName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesGetSample.ts deleted file mode 100644 index 9f16c611c5f8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Virtual Appliance Site. - * - * @summary Gets the specified Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteGet.json - */ -async function getNetworkVirtualApplianceSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.get( - resourceGroupName, - networkVirtualApplianceName, - siteName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesListSample.ts deleted file mode 100644 index 502a9c32b06b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSitesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * - * @summary Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSiteList.json - */ -async function listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualApplianceSites.list( - resourceGroupName, - networkVirtualApplianceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSkusGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSkusGetSample.ts deleted file mode 100644 index a61a7aa7fd07..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSkusGetSample.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a single available sku for network virtual appliance. - * - * @summary Retrieves a single available sku for network virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSkuGet.json - */ -async function networkVirtualApplianceSkuGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const skuName = "ciscoSdwan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSkus.get(skuName); - console.log(result); -} - -async function main(): Promise { - await networkVirtualApplianceSkuGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSkusListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSkusListSample.ts deleted file mode 100644 index 7a3ea43fb50f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualApplianceSkusListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all SKUs available for a virtual appliance. - * - * @summary List all SKUs available for a virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSkuList.json - */ -async function networkVirtualApplianceSkuListResult(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualApplianceSkus.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkVirtualApplianceSkuListResult(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts deleted file mode 100644 index 7d7545c350c1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { BgpConnection} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * - * @summary Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionPut.json - */ -async function virtualHubRouteTableV2Put(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const parameters: BgpConnection = { - hubVirtualNetworkConnection: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1", - }, - peerAsn: 20000, - peerIp: "192.168.1.5", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubBgpConnection.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - connectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubRouteTableV2Put(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionDeleteSample.ts deleted file mode 100644 index 70e8b44aff61..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VirtualHubBgpConnection. - * - * @summary Deletes a VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionDelete.json - */ -async function virtualHubRouteTableV2Delete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubRouteTableV2Delete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionGetSample.ts deleted file mode 100644 index 25c1f9db52d3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a Virtual Hub Bgp Connection. - * - * @summary Retrieves the details of a Virtual Hub Bgp Connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionGet.json - */ -async function virtualHubVirtualHubRouteTableV2Get(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.get( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts deleted file mode 100644 index 55fb57ff7428..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * - * @summary Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeerListAdvertisedRoute.json - */ -async function virtualRouterPeerListAdvertisedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const hubName = "virtualRouter1"; - const connectionName = "peer1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubBgpConnections.beginListAdvertisedRoutesAndWait( - resourceGroupName, - hubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualRouterPeerListAdvertisedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts deleted file mode 100644 index 561bd91c24b2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection has learned. - * - * @summary Retrieves a list of routes the virtual hub bgp connection has learned. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeerListLearnedRoute.json - */ -async function virtualRouterPeerListLearnedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const hubName = "virtualRouter1"; - const connectionName = "peer1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubBgpConnections.beginListLearnedRoutesAndWait( - resourceGroupName, - hubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualRouterPeerListLearnedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListSample.ts deleted file mode 100644 index 80b96c9e6ecd..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubBgpConnectionsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubBgpConnections. - * - * @summary Retrieves the details of all VirtualHubBgpConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionList.json - */ -async function virtualHubRouteTableV2List(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubBgpConnections.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts deleted file mode 100644 index bdd14acb6776..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - HubIpConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * - * @summary Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationPut.json - */ -async function virtualHubIPConfigurationPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const parameters: HubIpConfiguration = { - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubIpConfiguration.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - ipConfigName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubIPConfigurationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationDeleteSample.ts deleted file mode 100644 index 12d72bf5be48..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VirtualHubIpConfiguration. - * - * @summary Deletes a VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationDelete.json - */ -async function virtualHubIPConfigurationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - ipConfigName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubIPConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationGetSample.ts deleted file mode 100644 index d043a7477b52..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a Virtual Hub Ip configuration. - * - * @summary Retrieves the details of a Virtual Hub Ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationGet.json - */ -async function virtualHubVirtualHubRouteTableV2Get(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.get( - resourceGroupName, - virtualHubName, - ipConfigName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationListSample.ts deleted file mode 100644 index 7d0043dc49aa..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubIPConfigurationListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubIpConfigurations. - * - * @summary Retrieves the details of all VirtualHubIpConfigurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationList.json - */ -async function virtualHubRouteTableV2List(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubIpConfiguration.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts deleted file mode 100644 index 855d118d7b05..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualHubRouteTableV2} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * - * @summary Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Put.json - */ -async function virtualHubRouteTableV2Put(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2 = { - attachedConnections: ["All_Vnets"], - routes: [ - { - destinationType: "CIDR", - destinations: ["20.10.0.0/16", "20.20.0.0/16"], - nextHopType: "IPAddress", - nextHops: ["10.0.0.68"], - }, - { - destinationType: "CIDR", - destinations: ["0.0.0.0/0"], - nextHopType: "IPAddress", - nextHops: ["10.0.0.68"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubRouteTableV2S.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - virtualHubRouteTableV2Parameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubRouteTableV2Put(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SDeleteSample.ts deleted file mode 100644 index 630587f3b0e1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VirtualHubRouteTableV2. - * - * @summary Deletes a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Delete.json - */ -async function virtualHubRouteTableV2Delete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubRouteTableV2S.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubRouteTableV2Delete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SGetSample.ts deleted file mode 100644 index 6e64fc95f34d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VirtualHubRouteTableV2. - * - * @summary Retrieves the details of a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Get.json - */ -async function virtualHubVirtualHubRouteTableV2Get(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubRouteTableV2S.get( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SListSample.ts deleted file mode 100644 index 705badd915ba..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubRouteTableV2SListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubRouteTableV2s. - * - * @summary Retrieves the details of all VirtualHubRouteTableV2s. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2List.json - */ -async function virtualHubRouteTableV2List(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubRouteTableV2S.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsCreateOrUpdateSample.ts deleted file mode 100644 index 8365b0fb268e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VirtualHub} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * - * @summary Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubPut.json - */ -async function virtualHubPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub2"; - const virtualHubParameters: VirtualHub = { - addressPrefix: "10.168.0.0/24", - location: "West US", - sku: "Basic", - tags: { key1: "value1" }, - virtualWan: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - virtualHubParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsDeleteSample.ts deleted file mode 100644 index b7ef41a77021..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VirtualHub. - * - * @summary Deletes a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubDelete.json - */ -async function virtualHubDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts deleted file mode 100644 index b3b323a73365..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - EffectiveRoutesParameters, - VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EffectiveRoutesListForConnection.json - */ -async function effectiveRoutesForAConnectionResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters: EffectiveRoutesParameters = { - resourceId: - "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName", - virtualWanResourceType: "ExpressRouteConnection", - }; - const options: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EffectiveRoutesListForRouteTable.json - */ -async function effectiveRoutesForARouteTableResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters: EffectiveRoutesParameters = { - resourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - virtualWanResourceType: "RouteTable", - }; - const options: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EffectiveRoutesListForVirtualHub.json - */ -async function effectiveRoutesForTheVirtualHub(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters: EffectiveRoutesParameters = {}; - const options: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await effectiveRoutesForAConnectionResource(); - await effectiveRoutesForARouteTableResource(); - await effectiveRoutesForTheVirtualHub(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetInboundRoutesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetInboundRoutesSample.ts deleted file mode 100644 index 405cd25262da..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetInboundRoutesSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - GetInboundRoutesParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the inbound routes configured for the Virtual Hub on a particular connection. - * - * @summary Gets the inbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetInboundRoutes.json - */ -async function inboundRoutesForTheVirtualHubOnAParticularConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const getInboundRoutesParameters: GetInboundRoutesParameters = { - connectionType: "ExpressRouteConnection", - resourceUri: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetInboundRoutesAndWait( - resourceGroupName, - virtualHubName, - getInboundRoutesParameters, - ); - console.log(result); -} - -async function main(): Promise { - await inboundRoutesForTheVirtualHubOnAParticularConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetOutboundRoutesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetOutboundRoutesSample.ts deleted file mode 100644 index 1573562c17b5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetOutboundRoutesSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - GetOutboundRoutesParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the outbound routes configured for the Virtual Hub on a particular connection. - * - * @summary Gets the outbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetOutboundRoutes.json - */ -async function outboundRoutesForTheVirtualHubOnAParticularConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const getOutboundRoutesParameters: GetOutboundRoutesParameters = { - connectionType: "ExpressRouteConnection", - resourceUri: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetOutboundRoutesAndWait( - resourceGroupName, - virtualHubName, - getOutboundRoutesParameters, - ); - console.log(result); -} - -async function main(): Promise { - await outboundRoutesForTheVirtualHubOnAParticularConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetSample.ts deleted file mode 100644 index 3f714fb2bef5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VirtualHub. - * - * @summary Retrieves the details of a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubGet.json - */ -async function virtualHubGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.get( - resourceGroupName, - virtualHubName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsListByResourceGroupSample.ts deleted file mode 100644 index 79fbf6fd2659..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VirtualHubs in a resource group. - * - * @summary Lists all the VirtualHubs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubListByResourceGroup.json - */ -async function virtualHubListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubs.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualHubListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsListSample.ts deleted file mode 100644 index 4b24004d5952..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VirtualHubs in a subscription. - * - * @summary Lists all the VirtualHubs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubList.json - */ -async function virtualHubList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubs.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualHubList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsUpdateTagsSample.ts deleted file mode 100644 index 2a105056e662..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualHubsUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates VirtualHub tags. - * - * @summary Updates VirtualHub tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubUpdateTags.json - */ -async function virtualHubUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub2"; - const virtualHubParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.updateTags( - resourceGroupName, - virtualHubName, - virtualHubParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 7c1c7f36686c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGatewayConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway connection in the specified resource group. - * - * @summary Creates or updates a virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionCreate.json - */ -async function createVirtualNetworkGatewayConnectionS2S(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const parameters: VirtualNetworkGatewayConnection = { - authenticationType: "Certificate", - certificateAuthentication: { - inboundAuthCertificateChain: [ - "MIIC+TCCAeGgAwIBAgIQFOJUqDaxV5xJcKpTKO...", - "MIIC+TCCAeGgAwIBAgIQPJerInitNblK7yBgkqh...", - ], - inboundAuthCertificateSubjectName: "CN=rootCert.com", - outboundAuthCertificate: - "https://customerKv.vault.azure.net/Certificates/outBoundcert/Version", - }, - connectionMode: "Default", - connectionProtocol: "IKEv2", - connectionType: "IPsec", - dpdTimeoutSeconds: 30, - egressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", - }, - ], - enableBgp: false, - gatewayCustomBgpIpAddresses: [ - { - customBgpIpAddress: "169.254.21.1", - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/default", - }, - { - customBgpIpAddress: "169.254.21.3", - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/ActiveActive", - }, - ], - ingressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", - }, - ], - ipsecPolicies: [], - localNetworkGateway2: { - gatewayIpAddress: "x.x.x.x", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw", - localNetworkAddressSpace: { addressPrefixes: ["10.1.0.0/16"] }, - location: "centralus", - tags: {}, - }, - location: "centralus", - routingWeight: 0, - sharedKey: "Abc123", - trafficSelectorPolicies: [], - tunnelProperties: [ - { bgpPeeringAddress: "10.78.1.17", tunnelIpAddress: "10.78.1.5" }, - { bgpPeeringAddress: "10.78.1.20", tunnelIpAddress: "10.78.1.7" }, - ], - usePolicyBasedTrafficSelectors: false, - virtualNetworkGateway1: { - active: false, - bgpSettings: { - asn: 65514, - bgpPeeringAddress: "10.0.1.30", - peerWeight: 0, - }, - enableBgp: false, - gatewayType: "Vpn", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw", - ipConfigurations: [ - { - name: "gwipconfig1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - sku: { name: "VpnGw1", tier: "VpnGw1" }, - tags: {}, - vpnType: "RouteBased", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createVirtualNetworkGatewayConnectionS2S(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts deleted file mode 100644 index 0a60f05ccf04..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified virtual network Gateway connection. - * - * @summary Deletes the specified virtual network Gateway connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionDelete.json - */ -async function deleteVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts deleted file mode 100644 index 1ee2214f8ae7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * - * @summary Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json - */ -async function getVirtualNetworkGatewayConnectionIkeSa(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginGetIkeSasAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayConnectionIkeSa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts deleted file mode 100644 index 9367387c1d4e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified virtual network gateway connection by resource group. - * - * @summary Gets the specified virtual network gateway connection by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGet.json - */ -async function getVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.get( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts deleted file mode 100644 index f8f6d21c3889..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * - * @summary The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json - */ -async function getVirtualNetworkGatewayConnectionSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.getSharedKey( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsListSample.ts deleted file mode 100644 index 0ed75d2730f8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * - * @summary The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionsList.json - */ -async function listVirtualNetworkGatewayConnectionsinResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGatewayConnections.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualNetworkGatewayConnectionsinResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts deleted file mode 100644 index 8d40bb271faf..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the virtual network gateway connection specified. - * - * @summary Resets the virtual network gateway connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionReset.json - */ -async function resetVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginResetConnectionAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await resetVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts deleted file mode 100644 index ff307a6ef23d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectionResetSharedKey} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * - * @summary The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json - */ -async function resetVirtualNetworkGatewayConnectionSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const parameters: ConnectionResetSharedKey = { keyLength: 128 }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginResetSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await resetVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts deleted file mode 100644 index f821d6efb0ba..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectionSharedKey} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * - * @summary The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json - */ -async function setVirtualNetworkGatewayConnectionSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const parameters: ConnectionSharedKey = { value: "AzureAbc123" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginSetSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await setVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts deleted file mode 100644 index 0650c436873d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnPacketCaptureStartParameters, - VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const parameters: VpnPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams = - { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter(); - await startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts deleted file mode 100644 index 8b19fb98c0d4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnPacketCaptureStopParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Stops packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json - */ -async function stopPacketCaptureOnVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const parameters: VpnPacketCaptureStopParameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginStopPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await stopPacketCaptureOnVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts deleted file mode 100644 index 131662d1f007..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a virtual network gateway connection tags. - * - * @summary Updates a virtual network gateway connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json - */ -async function updateVirtualNetworkGatewayConnectionTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "test"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginUpdateTagsAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkGatewayConnectionTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts deleted file mode 100644 index df632faa675b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGatewayNatRule} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * - * @summary Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRulePut.json - */ -async function virtualNetworkGatewayNatRulePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const natRuleParameters: VirtualNetworkGatewayNatRule = { - typePropertiesType: "Static", - externalMappings: [ - { addressSpace: "192.168.21.0/24", portRange: "300-400" }, - ], - internalMappings: [{ addressSpace: "10.4.0.0/24", portRange: "200-300" }], - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/ipConfigurations/default", - mode: "EgressSnat", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayNatRules.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - natRuleParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayNatRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts deleted file mode 100644 index a1fdb4df0e2c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a nat rule. - * - * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleDelete.json - */ -async function virtualNetworkGatewayNatRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayNatRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts deleted file mode 100644 index 790aa2124274..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a nat rule. - * - * @summary Retrieves the details of a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleGet.json - */ -async function virtualNetworkGatewayNatRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.get( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayNatRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts deleted file mode 100644 index 31125adbb35c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all nat rules for a particular virtual network gateway. - * - * @summary Retrieves all nat rules for a particular virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayNatRuleList.json - */ -async function virtualNetworkGatewayNatRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGatewayNatRules.listByVirtualNetworkGateway( - resourceGroupName, - virtualNetworkGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualNetworkGatewayNatRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 555aa74c4ecb..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. - * - * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayUpdate.json - */ -async function updateVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VirtualNetworkGateway = { - active: false, - allowRemoteVnetTraffic: false, - allowVirtualWanTraffic: false, - bgpSettings: { asn: 65515, bgpPeeringAddress: "10.0.1.30", peerWeight: 0 }, - customRoutes: { addressPrefixes: ["101.168.0.6/32"] }, - disableIPSecReplayProtection: false, - enableBgp: false, - enableBgpRouteTranslationForNat: false, - enableDnsForwarding: true, - enableHighBandwidthVpnGateway: false, - gatewayType: "Vpn", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - ipConfigurations: [ - { - name: "gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - natRules: [ - { - name: "natRule1", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "50.0.0.0/24" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", - internalMappings: [{ addressSpace: "10.10.0.0/24" }], - ipConfigurationId: "", - mode: "EgressSnat", - }, - { - name: "natRule2", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "30.0.0.0/24" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", - internalMappings: [{ addressSpace: "20.10.0.0/24" }], - ipConfigurationId: "", - mode: "IngressSnat", - }, - ], - sku: { name: "VpnGw1", tier: "VpnGw1" }, - vpnClientConfiguration: { - radiusServers: [ - { - radiusServerAddress: "10.2.0.0", - radiusServerScore: 20, - radiusServerSecret: "radiusServerSecret", - }, - ], - vpnClientProtocols: ["OpenVPN"], - vpnClientRevokedCertificates: [], - vpnClientRootCertificates: [], - }, - vpnType: "RouteBased", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. - * - * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkScalableGatewayUpdate.json - */ -async function updateVirtualNetworkScalableGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const parameters: VirtualNetworkGateway = { - active: false, - adminState: "Enabled", - allowRemoteVnetTraffic: false, - allowVirtualWanTraffic: false, - autoScaleConfiguration: { bounds: { max: 3, min: 2 } }, - bgpSettings: {}, - disableIPSecReplayProtection: false, - enableBgp: false, - enableBgpRouteTranslationForNat: false, - gatewayType: "ExpressRoute", - ipConfigurations: [ - { - name: "gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - natRules: [], - sku: { name: "ErGwScale", tier: "ErGwScale" }, - virtualNetworkGatewayPolicyGroups: [], - vpnClientConfiguration: {}, - vpnType: "PolicyBased", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkGateway(); - await updateVirtualNetworkScalableGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysDeleteSample.ts deleted file mode 100644 index db9127dbd377..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified virtual network gateway. - * - * @summary Deletes the specified virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayDelete.json - */ -async function deleteVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts deleted file mode 100644 index 452e364f4f87..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - P2SVpnConnectionRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Disconnect vpn connections of virtual network gateway in the specified resource group. - * - * @summary Disconnect vpn connections of virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json - */ -async function disconnectVpnConnectionsFromVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vpn-gateway-test"; - const virtualNetworkGatewayName = "vpngateway"; - const request: P2SVpnConnectionRequest = { - vpnConnectionIds: ["vpnconnId1", "vpnconnId2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginDisconnectVirtualNetworkGatewayVpnConnectionsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await disconnectVpnConnectionsFromVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts deleted file mode 100644 index d1746039b4fd..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnClientParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * - * @summary Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json - */ -async function generateVirtualNetworkGatewayVpnProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnClientParameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGenerateVpnProfileAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await generateVirtualNetworkGatewayVpnProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts deleted file mode 100644 index 1b6857fbba09..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnClientParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * - * @summary Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json - */ -async function generateVpnClientPackage(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnClientParameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGeneratevpnclientpackageAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await generateVpnClientPackage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts deleted file mode 100644 index 785a803ed8e9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * - * @summary This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json - */ -async function getVirtualNetworkGatewayAdvertisedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const peer = "test"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetAdvertisedRoutesAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peer, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayAdvertisedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts deleted file mode 100644 index 697b8ebf293f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * - * @summary The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json - */ -async function getVirtualNetworkGatewayBgpPeerStatus(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetBgpPeerStatusAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayBgpPeerStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts deleted file mode 100644 index 875c621b98c1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves the details of all the failover tests performed on the gateway for different peering locations - * - * @summary This operation retrieves the details of all the failover tests performed on the gateway for different peering locations - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json - */ -async function virtualNetworkGatewayGetFailoverAllTestsDetails(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const typeParam = "SingleSiteFailover"; - const fetchLatest = true; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetFailoverAllTestDetailsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - typeParam, - fetchLatest, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayGetFailoverAllTestsDetails(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts deleted file mode 100644 index 050e3a5d0355..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid - * - * @summary This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json - */ -async function virtualNetworkGatewayGetFailoverSingleTestDetails(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const peeringLocation = "Vancouver"; - const failoverTestId = "fe458ae8-d2ae-4520-a104-44bc233bde7e"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetFailoverSingleTestDetailsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - failoverTestId, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayGetFailoverSingleTestDetails(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts deleted file mode 100644 index 22b61d3affb5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * - * @summary This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayLearnedRoutes.json - */ -async function getVirtualNetworkGatewayLearnedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetLearnedRoutesAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayLearnedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetResiliencyInformationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetResiliencyInformationSample.ts deleted file mode 100644 index 19d7d13af716..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetResiliencyInformationSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGatewaysGetResiliencyInformationOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score - * - * @summary This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetResiliencyInformation.json - */ -async function getVirtualNetworkGatewayResiliencyInformation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const attemptRefresh = true; - const options: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams = - { attemptRefresh }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetResiliencyInformationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayResiliencyInformation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetRoutesInformationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetRoutesInformationSample.ts deleted file mode 100644 index c22739fdc331..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetRoutesInformationSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGatewaysGetRoutesInformationOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves the route set information for an Express Route Gateway based on their resiliency - * - * @summary This operation retrieves the route set information for an Express Route Gateway based on their resiliency - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetRoutesInformation.json - */ -async function getVirtualNetworkGatewayRoutesInformation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const attemptRefresh = false; - const options: VirtualNetworkGatewaysGetRoutesInformationOptionalParams = { - attemptRefresh, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetRoutesInformationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayRoutesInformation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetSample.ts deleted file mode 100644 index 415c51277935..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified virtual network gateway by resource group. - * - * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGet.json - */ -async function getVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.get( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network gateway by resource group. - * - * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkScalableGatewayGet.json - */ -async function getVirtualNetworkScalableGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.get( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGateway(); - await getVirtualNetworkScalableGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts deleted file mode 100644 index ada2bf2334fe..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * - * @summary Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json - */ -async function getVirtualNetworkGatewayVpnProfilePackageUrl(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetVpnProfilePackageUrlAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayVpnProfilePackageUrl(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts deleted file mode 100644 index 43755546e891..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * - * @summary Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json - */ -async function getVirtualNetworkGatewayVpnclientConnectionHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vnet-test"; - const virtualNetworkGatewayName = "vpnp2sgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetVpnclientConnectionHealthAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayVpnclientConnectionHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts deleted file mode 100644 index f33b2cc3cf1c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * - * @summary The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json - */ -async function getVirtualNetworkGatewayVpnClientIpsecParameters(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetVpnclientIpsecParametersAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayVpnClientIpsecParameters(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeAbortMigrationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeAbortMigrationSample.ts deleted file mode 100644 index 288557da2c94..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeAbortMigrationSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Trigger abort migration for the virtual network gateway. - * - * @summary Trigger abort migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayAbortMigration.json - */ -async function virtualNetworkGatewayAbortMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokeAbortMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayAbortMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeCommitMigrationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeCommitMigrationSample.ts deleted file mode 100644 index 3de693e56c6e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeCommitMigrationSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Trigger commit migration for the virtual network gateway. - * - * @summary Trigger commit migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayCommitMigration.json - */ -async function virtualNetworkGatewayCommitMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokeCommitMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayCommitMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts deleted file mode 100644 index bf3434a12ece..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Trigger execute migration for the virtual network gateway. - * - * @summary Trigger execute migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayExecuteMigration.json - */ -async function virtualNetworkGatewayExecuteMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokeExecuteMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayExecuteMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokePrepareMigrationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokePrepareMigrationSample.ts deleted file mode 100644 index e63e242701f8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysInvokePrepareMigrationSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGatewayMigrationParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Trigger prepare migration for the virtual network gateway. - * - * @summary Trigger prepare migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayPrepareMigration.json - */ -async function virtualNetworkGatewayPrepareMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const migrationParams: VirtualNetworkGatewayMigrationParameters = { - migrationType: "UpgradeDeploymentToStandardIP", - resourceUrl: "testUrl", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokePrepareMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - migrationParams, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayPrepareMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts deleted file mode 100644 index 2463a3a9f4c8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the connections in a virtual network gateway. - * - * @summary Gets all the connections in a virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaysListConnections.json - */ -async function virtualNetworkGatewaysListConnections(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const virtualNetworkGatewayName = "test-vpn-gateway-1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGateways.listConnections( - resourceGroupName, - virtualNetworkGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualNetworkGatewaysListConnections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListRadiusSecretsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListRadiusSecretsSample.ts deleted file mode 100644 index b153e70dd5dc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListRadiusSecretsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. - * - * @summary List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AllVirtualNetworkGatewayRadiusServerSecretsList.json - */ -async function listAllVirtualNetworkGatewayRadiusServerSecrets(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.listRadiusSecrets( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await listAllVirtualNetworkGatewayRadiusServerSecrets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListSample.ts deleted file mode 100644 index 499eadf93eb2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all virtual network gateways by resource group. - * - * @summary Gets all virtual network gateways by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayList.json - */ -async function listVirtualNetworkGatewaysinResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGateways.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualNetworkGatewaysinResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysResetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysResetSample.ts deleted file mode 100644 index 2969ab127044..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysResetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the primary of the virtual network gateway in the specified resource group. - * - * @summary Resets the primary of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayReset.json - */ -async function resetVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginResetAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await resetVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts deleted file mode 100644 index 57bdbb8a5511..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * - * @summary Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json - */ -async function resetVpnClientSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginResetVpnClientSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await resetVpnClientSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts deleted file mode 100644 index 78c1fb12a0ed..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnClientIPsecParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * - * @summary The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json - */ -async function setVirtualNetworkGatewayVpnClientIpsecParameters(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const vpnclientIpsecParams: VpnClientIPsecParameters = { - dhGroup: "DHGroup2", - ikeEncryption: "AES256", - ikeIntegrity: "SHA384", - ipsecEncryption: "AES256", - ipsecIntegrity: "SHA256", - pfsGroup: "PFS2", - saDataSizeKilobytes: 429497, - saLifeTimeSeconds: 86473, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginSetVpnclientIpsecParametersAndWait( - resourceGroupName, - virtualNetworkGatewayName, - vpnclientIpsecParams, - ); - console.log(result); -} - -async function main(): Promise { - await setVirtualNetworkGatewayVpnClientIpsecParameters(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts deleted file mode 100644 index 9232b85b70e3..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation starts failover simulation on the gateway for the specified peering location - * - * @summary This operation starts failover simulation on the gateway for the specified peering location - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json - */ -async function virtualNetworkGatewayStartSiteFailoverSimulation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const peeringLocation = "Vancouver"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayStartSiteFailoverSimulation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts deleted file mode 100644 index 4ffbad474c0f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnPacketCaptureStartParameters, - VirtualNetworkGatewaysStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options: VirtualNetworkGatewaysStartPacketCaptureOptionalParams = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStartPacketCapture.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await startPacketCaptureOnVirtualNetworkGatewayWithFilter(); - await startPacketCaptureOnVirtualNetworkGatewayWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts deleted file mode 100644 index e28265d80678..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteFailoverStopApiParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation stops failover simulation on the gateway for the specified peering location - * - * @summary This operation stops failover simulation on the gateway for the specified peering location - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json - */ -async function virtualNetworkGatewayStopSiteFailoverSimulation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const stopParameters: ExpressRouteFailoverStopApiParameters = { - peeringLocation: "Vancouver", - wasSimulationSuccessful: true, - details: [ - { - failoverConnectionName: "conn1", - failoverLocation: "Denver", - isVerified: false, - }, - { - failoverConnectionName: "conn2", - failoverLocation: "Amsterdam", - isVerified: true, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - stopParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayStopSiteFailoverSimulation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts deleted file mode 100644 index 08544d77252c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnPacketCaptureStopParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops packet capture on virtual network gateway in the specified resource group. - * - * @summary Stops packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayStopPacketCapture.json - */ -async function stopPacketCaptureOnVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnPacketCaptureStopParameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStopPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await stopPacketCaptureOnVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts deleted file mode 100644 index f21764937b36..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a xml format representation for supported vpn devices. - * - * @summary Gets a xml format representation for supported vpn devices. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json - */ -async function listVirtualNetworkGatewaySupportedVpnDevices(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.supportedVpnDevices( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await listVirtualNetworkGatewaySupportedVpnDevices(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts deleted file mode 100644 index 2295e7af04fe..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a virtual network gateway tags. - * - * @summary Updates a virtual network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayUpdateTags.json - */ -async function updateVirtualNetworkGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginUpdateTagsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts deleted file mode 100644 index 1d4eb051e929..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnDeviceScriptParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a xml format representation for vpn device configuration script. - * - * @summary Gets a xml format representation for vpn device configuration script. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json - */ -async function getVpnDeviceConfigurationScript(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngw"; - const parameters: VpnDeviceScriptParameters = { - deviceFamily: "ISR", - firmwareVersion: "IOS 15.1 (Preview)", - vendor: "Cisco", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.vpnDeviceConfigurationScript( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getVpnDeviceConfigurationScript(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts deleted file mode 100644 index 66aacdff1d3b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkPeering, - VirtualNetworkPeeringsCreateOrUpdateOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkV6SubnetPeeringCreate.json - */ -async function createV6SubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: true, - localSubnetNames: ["Subnet1", "Subnet4"], - peerCompleteVnets: false, - remoteSubnetNames: ["Subnet2"], - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringCreate.json - */ -async function createPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json - */ -async function createPeeringWithRemoteVirtualNetworkEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkSubnetPeeringCreate.json - */ -async function createSubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: false, - localSubnetNames: ["Subnet1", "Subnet4"], - peerCompleteVnets: false, - remoteSubnetNames: ["Subnet2"], - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringSync.json - */ -async function syncPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options: VirtualNetworkPeeringsCreateOrUpdateOptionalParams = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkV6SubnetPeeringSync.json - */ -async function syncV6SubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: true, - peerCompleteVnets: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options: VirtualNetworkPeeringsCreateOrUpdateOptionalParams = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkSubnetPeeringSync.json - */ -async function syncSubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: false, - peerCompleteVnets: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options: VirtualNetworkPeeringsCreateOrUpdateOptionalParams = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await createV6SubnetPeering(); - await createPeering(); - await createPeeringWithRemoteVirtualNetworkEncryption(); - await createSubnetPeering(); - await syncPeering(); - await syncV6SubnetPeering(); - await syncSubnetPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsDeleteSample.ts deleted file mode 100644 index 890c2b540d97..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified virtual network peering. - * - * @summary Deletes the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringDelete.json - */ -async function deletePeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsGetSample.ts deleted file mode 100644 index 3b795facee8f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsGetSample.ts +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkV6SubnetPeeringGet.json - */ -async function getV6SubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringGet.json - */ -async function getPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json - */ -async function getPeeringWithRemoteVirtualNetworkEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkSubnetPeeringGet.json - */ -async function getSubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -async function main(): Promise { - await getV6SubnetPeering(); - await getPeering(); - await getPeeringWithRemoteVirtualNetworkEncryption(); - await getSubnetPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsListSample.ts deleted file mode 100644 index 0d89fdbd8c9e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkPeeringsListSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all virtual network peerings in a virtual network. - * - * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringList.json - */ -async function listPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkPeerings.list( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets all virtual network peerings in a virtual network. - * - * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json - */ -async function listPeeringsWithRemoteVirtualNetworkEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkPeerings.list( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPeerings(); - await listPeeringsWithRemoteVirtualNetworkEncryption(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts deleted file mode 100644 index 61fb6dfa1dec..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VirtualNetworkTap} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a Virtual Network Tap. - * - * @summary Creates or updates a Virtual Network Tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapCreate.json - */ -async function createVirtualNetworkTap(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const parameters: VirtualNetworkTap = { - destinationNetworkInterfaceIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testNetworkInterface/ipConfigurations/ipconfig1", - }, - location: "centraluseuap", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.beginCreateOrUpdateAndWait( - resourceGroupName, - tapName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createVirtualNetworkTap(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsDeleteSample.ts deleted file mode 100644 index 0bce16450a24..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified virtual network tap. - * - * @summary Deletes the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapDelete.json - */ -async function deleteVirtualNetworkTapResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.beginDeleteAndWait( - resourceGroupName, - tapName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualNetworkTapResource(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsGetSample.ts deleted file mode 100644 index dad128877c42..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified virtual network tap. - * - * @summary Gets information about the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapGet.json - */ -async function getVirtualNetworkTap(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "testvtap"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.get( - resourceGroupName, - tapName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkTap(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsListAllSample.ts deleted file mode 100644 index bc3581aca60c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. - * - * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapListAll.json - */ -async function listAllVirtualNetworkTaps(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkTaps.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllVirtualNetworkTaps(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts deleted file mode 100644 index f337f2115b0d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. - * - * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapList.json - */ -async function listVirtualNetworkTapsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkTaps.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualNetworkTapsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsUpdateTagsSample.ts deleted file mode 100644 index ad38daba664f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworkTapsUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an VirtualNetworkTap tags. - * - * @summary Updates an VirtualNetworkTap tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapUpdateTags.json - */ -async function updateVirtualNetworkTapTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const tapParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.updateTags( - resourceGroupName, - tapName, - tapParameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkTapTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts deleted file mode 100644 index b2e4b80185cd..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks whether a private IP address is available for use. - * - * @summary Checks whether a private IP address is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCheckIPAddressAvailability.json - */ -async function checkIPAddressAvailability(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const ipAddress = "10.0.1.4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.checkIPAddressAvailability( - resourceGroupName, - virtualNetworkName, - ipAddress, - ); - console.log(result); -} - -async function main(): Promise { - await checkIPAddressAvailability(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 09510eb92297..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VirtualNetwork} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreate.json - */ -async function createVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - flowTimeoutInMinutes: 10, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateWithBgpCommunities.json - */ -async function createVirtualNetworkWithBgpCommunities(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - bgpCommunities: { virtualNetworkCommunity: "12076:20000" }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateSubnetWithDelegation.json - */ -async function createVirtualNetworkWithDelegatedSubnets(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "westcentralus", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/24", - delegations: [ - { - name: "myDelegation", - serviceName: "Microsoft.Sql/managedInstances", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateWithEncryption.json - */ -async function createVirtualNetworkWithEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - encryption: { enabled: true, enforcement: "AllowUnencrypted" }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateWithIpamPool.json - */ -async function createVirtualNetworkWithIpamPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { - ipamPoolPrefixAllocations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", - numberOfIpAddresses: "65536", - }, - ], - }, - location: "eastus", - subnets: [ - { - name: "test-1", - ipamPoolPrefixAllocations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", - numberOfIpAddresses: "80", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateServiceEndpoints.json - */ -async function createVirtualNetworkWithServiceEndpoints(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vnetTest"; - const virtualNetworkName = "vnet1"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json - */ -async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vnetTest"; - const virtualNetworkName = "vnet1"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus2euap", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/16", - serviceEndpointPolicies: [ - { - id: "/subscriptions/subid/resourceGroups/vnetTest/providers/Microsoft.Network/serviceEndpointPolicies/ServiceEndpointPolicy1", - }, - ], - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateSubnet.json - */ -async function createVirtualNetworkWithSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json - */ -async function createVirtualNetworkWithSubnetContainingAddressPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [ - { name: "test-2", addressPrefixes: ["10.0.0.0/28", "10.0.1.0/28"] }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createVirtualNetwork(); - await createVirtualNetworkWithBgpCommunities(); - await createVirtualNetworkWithDelegatedSubnets(); - await createVirtualNetworkWithEncryption(); - await createVirtualNetworkWithIpamPool(); - await createVirtualNetworkWithServiceEndpoints(); - await createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(); - await createVirtualNetworkWithSubnet(); - await createVirtualNetworkWithSubnetContainingAddressPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksDeleteSample.ts deleted file mode 100644 index 1674d586e25a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified virtual network. - * - * @summary Deletes the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkDelete.json - */ -async function deleteVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksGetSample.ts deleted file mode 100644 index ae401672a114..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksGetSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGet.json - */ -async function getVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetWithSubnetDelegation.json - */ -async function getVirtualNetworkWithADelegatedSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetWithServiceAssociationLink.json - */ -async function getVirtualNetworkWithServiceAssociationLinks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetwork(); - await getVirtualNetworkWithADelegatedSubnet(); - await getVirtualNetworkWithServiceAssociationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListAllSample.ts deleted file mode 100644 index 1c9d24ccc7c8..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all virtual networks in a subscription. - * - * @summary Gets all virtual networks in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkListAll.json - */ -async function listAllVirtualNetworks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllVirtualNetworks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts deleted file mode 100644 index 416d124dffdc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworksListDdosProtectionStatusOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * - * @summary Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGetDdosProtectionStatus.json - */ -async function getDdosProtectionStatusOfAVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const top = 75; - const options: VirtualNetworksListDdosProtectionStatusOptionalParams = { - top, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.beginListDdosProtectionStatusAndWait( - resourceGroupName, - virtualNetworkName, - options, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getDdosProtectionStatusOfAVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListSample.ts deleted file mode 100644 index 8f25ed6df69d..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all virtual networks in a resource group. - * - * @summary Gets all virtual networks in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkList.json - */ -async function listVirtualNetworksInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualNetworksInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListUsageSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListUsageSample.ts deleted file mode 100644 index 6cdd8ef2d472..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksListUsageSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists usage stats. - * - * @summary Lists usage stats. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkListUsage.json - */ -async function vnetGetUsage(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listUsage( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vnetGetUsage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksUpdateTagsSample.ts deleted file mode 100644 index 5de47cf264b4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a virtual network tags. - * - * @summary Updates a virtual network tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkUpdateTags.json - */ -async function updateVirtualNetworkTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.updateTags( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts deleted file mode 100644 index 8727af412c65..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualRouterPeering} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Virtual Router Peering. - * - * @summary Creates or updates the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringPut.json - */ -async function createVirtualRouterPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const parameters: VirtualRouterPeering = { - peerAsn: 20000, - peerIp: "192.168.1.5", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualRouterName, - peeringName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsDeleteSample.ts deleted file mode 100644 index 3d1bcf2392bb..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified peering from a Virtual Router. - * - * @summary Deletes the specified peering from a Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringDelete.json - */ -async function deleteVirtualRouterPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.beginDeleteAndWait( - resourceGroupName, - virtualRouterName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsGetSample.ts deleted file mode 100644 index 2fd5db227b03..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Virtual Router Peering. - * - * @summary Gets the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringGet.json - */ -async function getVirtualRouterPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.get( - resourceGroupName, - virtualRouterName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsListSample.ts deleted file mode 100644 index cccb0a16c238..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualRouterPeeringsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Virtual Router Peerings in a Virtual Router resource. - * - * @summary Lists all Virtual Router Peerings in a Virtual Router resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringList.json - */ -async function listAllVirtualRouterPeeringsForAGivenVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouterPeerings.list( - resourceGroupName, - virtualRouterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllVirtualRouterPeeringsForAGivenVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersCreateOrUpdateSample.ts deleted file mode 100644 index a228897449ae..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VirtualRouter} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Virtual Router. - * - * @summary Creates or updates the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPut.json - */ -async function createVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const parameters: VirtualRouter = { - hostedGateway: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vnetGateway", - }, - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualRouterName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersDeleteSample.ts deleted file mode 100644 index 3059ea27eaab..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Virtual Router. - * - * @summary Deletes the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterDelete.json - */ -async function deleteVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.beginDeleteAndWait( - resourceGroupName, - virtualRouterName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersGetSample.ts deleted file mode 100644 index 5868452dd80f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Virtual Router. - * - * @summary Gets the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterGet.json - */ -async function getVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.get( - resourceGroupName, - virtualRouterName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersListByResourceGroupSample.ts deleted file mode 100644 index 631fbb45b8a5..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Virtual Routers in a resource group. - * - * @summary Lists all Virtual Routers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterListByResourceGroup.json - */ -async function listAllVirtualRouterForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouters.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllVirtualRouterForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersListSample.ts deleted file mode 100644 index 193f09b9665e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualRoutersListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Virtual Routers in a subscription. - * - * @summary Gets all the Virtual Routers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterListBySubscription.json - */ -async function listAllVirtualRoutersForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouters.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllVirtualRoutersForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualWansCreateOrUpdateSample.ts deleted file mode 100644 index 552e47af4648..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansCreateOrUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VirtualWAN} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * - * @summary Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANPut.json - */ -async function virtualWanCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const wANParameters: VirtualWAN = { - typePropertiesType: "Basic", - disableVpnEncryption: false, - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualWANName, - wANParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualWanCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualWansDeleteSample.ts deleted file mode 100644 index 58bf9e58e67c..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VirtualWAN. - * - * @summary Deletes a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANDelete.json - */ -async function virtualWanDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "virtualWan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.beginDeleteAndWait( - resourceGroupName, - virtualWANName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualWanDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualWansGetSample.ts deleted file mode 100644 index 2cbfa7803739..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VirtualWAN. - * - * @summary Retrieves the details of a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANGet.json - */ -async function virtualWanGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.get( - resourceGroupName, - virtualWANName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualWanGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualWansListByResourceGroupSample.ts deleted file mode 100644 index 456d8aaf8954..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VirtualWANs in a resource group. - * - * @summary Lists all the VirtualWANs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANListByResourceGroup.json - */ -async function virtualWanListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualWans.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualWanListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualWansListSample.ts deleted file mode 100644 index cc1c1c53dcfe..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VirtualWANs in a subscription. - * - * @summary Lists all the VirtualWANs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANList.json - */ -async function virtualWanList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualWans.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualWanList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/virtualWansUpdateTagsSample.ts deleted file mode 100644 index 3681b32d2b59..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/virtualWansUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a VirtualWAN tags. - * - * @summary Updates a VirtualWAN tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANUpdateTags.json - */ -async function virtualWanUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const wANParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.updateTags( - resourceGroupName, - virtualWANName, - wANParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualWanUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index e2dd146c5904..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VpnConnection} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * - * @summary Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionPut.json - */ -async function vpnConnectionPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const vpnConnectionParameters: VpnConnection = { - remoteVpnSite: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", - }, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - }, - trafficSelectorPolicies: [], - vpnLinkConnections: [ - { - name: "Connection-Link1", - connectionBandwidth: 200, - sharedKey: "key", - usePolicyBasedTrafficSelectors: false, - vpnConnectionProtocolType: "IKEv2", - vpnLinkConnectionMode: "Default", - vpnSiteLink: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - connectionName, - vpnConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsDeleteSample.ts deleted file mode 100644 index e657fa41888b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a vpn connection. - * - * @summary Deletes a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionDelete.json - */ -async function vpnConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginDeleteAndWait( - resourceGroupName, - gatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsGetSample.ts deleted file mode 100644 index aedcf4780cb9..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a vpn connection. - * - * @summary Retrieves the details of a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionGet.json - */ -async function vpnConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.get( - resourceGroupName, - gatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsListByVpnGatewaySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsListByVpnGatewaySample.ts deleted file mode 100644 index c83228dc6984..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsListByVpnGatewaySample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all vpn connections for a particular virtual wan vpn gateway. - * - * @summary Retrieves all vpn connections for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionList.json - */ -async function vpnConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnConnections.listByVpnGateway( - resourceGroupName, - gatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsStartPacketCaptureSample.ts deleted file mode 100644 index 7ad5179ba71e..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsStartPacketCaptureSample.ts +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnConnectionPacketCaptureStartParameters, - VpnConnectionsStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. - * - * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVpnConnectionWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters: VpnConnectionPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - linkConnectionNames: ["siteLink1", "siteLink2"], - }; - const options: VpnConnectionsStartPacketCaptureOptionalParams = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. - * - * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionStartPacketCapture.json - */ -async function startPacketCaptureOnVpnConnectionWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters: VpnConnectionPacketCaptureStartParameters = { - linkConnectionNames: ["siteLink1", "siteLink2"], - }; - const options: VpnConnectionsStartPacketCaptureOptionalParams = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await startPacketCaptureOnVpnConnectionWithFilter(); - await startPacketCaptureOnVpnConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsStopPacketCaptureSample.ts deleted file mode 100644 index 09fbee3a65ae..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnConnectionsStopPacketCaptureSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnConnectionPacketCaptureStopParameters, - VpnConnectionsStopPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops packet capture on Vpn connection in the specified resource group. - * - * @summary Stops packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionStopPacketCapture.json - */ -async function startPacketCaptureOnVpnConnectionWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters: VpnConnectionPacketCaptureStopParameters = { - linkConnectionNames: ["vpnSiteLink1", "vpnSiteLink2"], - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const options: VpnConnectionsStopPacketCaptureOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStopPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await startPacketCaptureOnVpnConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 508db1f0f13f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VpnGateway} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * - * @summary Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayPut.json - */ -async function vpnGatewayPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnGatewayParameters: VpnGateway = { - bgpSettings: { - asn: 65515, - bgpPeeringAddresses: [ - { - customBgpIpAddresses: ["169.254.21.5"], - ipconfigurationId: "Instance0", - }, - { - customBgpIpAddresses: ["169.254.21.10"], - ipconfigurationId: "Instance1", - }, - ], - peerWeight: 0, - }, - connections: [ - { - name: "vpnConnection1", - remoteVpnSite: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", - }, - vpnLinkConnections: [ - { - name: "Connection-Link1", - connectionBandwidth: 200, - egressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03", - }, - ], - sharedKey: "key", - vpnConnectionProtocolType: "IKEv2", - vpnSiteLink: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", - }, - }, - ], - }, - ], - enableBgpRouteTranslationForNat: false, - isRoutingPreferenceInternet: false, - location: "westcentralus", - natRules: [ - { - name: "nat03", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "192.168.0.0/26" }], - internalMappings: [{ addressSpace: "0.0.0.0/26" }], - ipConfigurationId: "", - mode: "EgressSnat", - }, - ], - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnGatewayPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysDeleteSample.ts deleted file mode 100644 index ce4690a2b1f4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a virtual wan vpn gateway. - * - * @summary Deletes a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayDelete.json - */ -async function vpnGatewayDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginDeleteAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysGetSample.ts deleted file mode 100644 index ebc4243e311a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysGetSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a virtual wan vpn gateway. - * - * @summary Retrieves the details of a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayGet.json - */ -async function vpnGatewayGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.get(resourceGroupName, gatewayName); - console.log(result); -} - -async function main(): Promise { - await vpnGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysListByResourceGroupSample.ts deleted file mode 100644 index 5da00f7caa47..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VpnGateways in a resource group. - * - * @summary Lists all the VpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayListByResourceGroup.json - */ -async function vpnGatewayListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnGateways.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysListSample.ts deleted file mode 100644 index c913f33d1b7f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VpnGateways in a subscription. - * - * @summary Lists all the VpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayList.json - */ -async function vpnGatewayListBySubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnGateways.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysResetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysResetSample.ts deleted file mode 100644 index 63fc85426c85..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysResetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the primary of the vpn gateway in the specified resource group. - * - * @summary Resets the primary of the vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayReset.json - */ -async function resetVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginResetAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await resetVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysStartPacketCaptureSample.ts deleted file mode 100644 index d360b14ad511..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysStartPacketCaptureSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnGatewayPacketCaptureStartParameters, - VpnGatewaysStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. - * - * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVpnGatewayWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const parameters: VpnGatewayPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options: VpnGatewaysStartPacketCaptureOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. - * - * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStartPacketCapture.json - */ -async function startPacketCaptureOnVpnGatewayWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await startPacketCaptureOnVpnGatewayWithFilter(); - await startPacketCaptureOnVpnGatewayWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysStopPacketCaptureSample.ts deleted file mode 100644 index dd0cb19751a1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysStopPacketCaptureSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnGatewayPacketCaptureStopParameters, - VpnGatewaysStopPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops packet capture on vpn gateway in the specified resource group. - * - * @summary Stops packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStopPacketCapture.json - */ -async function stopPacketCaptureOnVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const parameters: VpnGatewayPacketCaptureStopParameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const options: VpnGatewaysStopPacketCaptureOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStopPacketCaptureAndWait( - resourceGroupName, - gatewayName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await stopPacketCaptureOnVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysUpdateTagsSample.ts deleted file mode 100644 index 364a716a0b63..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates virtual wan vpn gateway tags. - * - * @summary Updates virtual wan vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayUpdateTags.json - */ -async function vpnGatewayUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnGatewayParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginUpdateTagsAndWait( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts deleted file mode 100644 index 15327c4f158f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all shared keys of VpnLink connection specified. - * - * @summary Lists all shared keys of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionSharedKeysGet.json - */ -async function vpnSiteLinkConnectionSharedKeysGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnLinkConnections.listAllSharedKeys( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnSiteLinkConnectionSharedKeysGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts deleted file mode 100644 index dabaa75e1243..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the shared key of VpnLink connection specified. - * - * @summary Gets the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.getDefaultSharedKey( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteLinkConnectionDefaultSharedKeyGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts deleted file mode 100644 index d4b3fda318fd..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * - * @summary Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionGetIkeSas.json - */ -async function getVpnLinkConnectionIkeSa(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginGetIkeSasAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getVpnLinkConnectionIkeSa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts deleted file mode 100644 index ce440c725cd1..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * - * @summary Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionList.json - */ -async function vpnSiteLinkConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnLinkConnections.listByVpnConnection( - resourceGroupName, - gatewayName, - connectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnSiteLinkConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts deleted file mode 100644 index cb6f1c90af23..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the value of the shared key of VpnLink connection specified. - * - * @summary Gets the value of the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.listDefaultSharedKey( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteLinkConnectionDefaultSharedKeyList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsResetConnectionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsResetConnectionSample.ts deleted file mode 100644 index 55345368085f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsResetConnectionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the VpnLink connection specified. - * - * @summary Resets the VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionReset.json - */ -async function resetVpnLinkConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginResetConnectionAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await resetVpnLinkConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts deleted file mode 100644 index 0a01efbb1365..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectionSharedKeyResult} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * - * @summary Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const connectionSharedKeyParameters: ConnectionSharedKeyResult = { - properties: { sharedKey: "ABCDEF123456" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.vpnLinkConnections.beginSetOrInitDefaultSharedKeyAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - connectionSharedKeyParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteLinkConnectionDefaultSharedKeyPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts deleted file mode 100644 index 648e8b7c03b7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * - * @summary Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetVirtualWanVpnServerConfigurations.json - */ -async function getVirtualWanVpnServerConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.vpnServerConfigurationsAssociatedWithVirtualWan.beginListAndWait( - resourceGroupName, - virtualWANName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualWanVpnServerConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 3e60f7cec8bc..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnServerConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * - * @summary Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationPut.json - */ -async function vpnServerConfigurationCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const vpnServerConfigurationParameters: VpnServerConfiguration = { - configurationPolicyGroups: [ - { - name: "policyGroup1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup1", - isDefault: true, - policyMembers: [ - { - name: "policy1", - attributeType: "RadiusAzureGroupId", - attributeValue: "6ad1bd08", - }, - ], - priority: 0, - }, - { - name: "policyGroup2", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup2", - isDefault: true, - policyMembers: [ - { - name: "policy2", - attributeType: "CertificateGroupId", - attributeValue: "red.com", - }, - ], - priority: 0, - }, - ], - location: "West US", - radiusClientRootCertificates: [ - { - name: "vpnServerConfigRadiusClientRootCert1", - thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", - }, - ], - radiusServerRootCertificates: [ - { - name: "vpnServerConfigRadiusServerRootCer1", - publicCertData: - "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuM", - }, - ], - radiusServers: [ - { - radiusServerAddress: "10.0.0.0", - radiusServerScore: 25, - radiusServerSecret: "radiusServerSecret", - }, - ], - tags: { key1: "value1" }, - vpnClientIpsecPolicies: [ - { - dhGroup: "DHGroup14", - ikeEncryption: "AES256", - ikeIntegrity: "SHA384", - ipsecEncryption: "AES256", - ipsecIntegrity: "SHA256", - pfsGroup: "PFS14", - saDataSizeKilobytes: 429497, - saLifeTimeSeconds: 86472, - }, - ], - vpnClientRevokedCertificates: [ - { - name: "vpnServerConfigVpnClientRevokedCert1", - thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", - }, - ], - vpnClientRootCertificates: [ - { - name: "vpnServerConfigVpnClientRootCert1", - publicCertData: - "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuN", - }, - ], - vpnProtocols: ["IkeV2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.vpnServerConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnServerConfigurationCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsDeleteSample.ts deleted file mode 100644 index a1fe1952a639..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VpnServerConfiguration. - * - * @summary Deletes a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationDelete.json - */ -async function vpnServerConfigurationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.beginDeleteAndWait( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnServerConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsGetSample.ts deleted file mode 100644 index 00a6919f0f18..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VpnServerConfiguration. - * - * @summary Retrieves the details of a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationGet.json - */ -async function vpnServerConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.get( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnServerConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts deleted file mode 100644 index 96e15a3649c4..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the vpnServerConfigurations in a resource group. - * - * @summary Lists all the vpnServerConfigurations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationListByResourceGroup.json - */ -async function vpnServerConfigurationListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnServerConfigurations.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnServerConfigurationListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListRadiusSecretsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListRadiusSecretsSample.ts deleted file mode 100644 index 5581fb18b635..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListRadiusSecretsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all Radius servers with respective radius secrets from VpnServerConfiguration. - * - * @summary List all Radius servers with respective radius secrets from VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AllVpnServerConfigurationRadiusServerSecretsList.json - */ -async function listAllVpnServerConfigurationRadiusServerSecrets(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnserverconfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.listRadiusSecrets( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await listAllVpnServerConfigurationRadiusServerSecrets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListSample.ts deleted file mode 100644 index a659770c8602..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VpnServerConfigurations in a subscription. - * - * @summary Lists all the VpnServerConfigurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationList.json - */ -async function vpnServerConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnServerConfigurations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnServerConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts deleted file mode 100644 index 9acbd1b5e607..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates VpnServerConfiguration tags. - * - * @summary Updates VpnServerConfiguration tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationUpdateTags.json - */ -async function vpnServerConfigurationUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const vpnServerConfigurationParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.updateTags( - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnServerConfigurationUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinkConnectionsGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinkConnectionsGetSample.ts deleted file mode 100644 index 0a45850671fa..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinkConnectionsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a vpn site link connection. - * - * @summary Retrieves the details of a vpn site link connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionGet.json - */ -async function vpnSiteLinkConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSiteLinkConnections.get( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteLinkConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinksGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinksGetSample.ts deleted file mode 100644 index 4489e6f3c993..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinksGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VPN site link. - * - * @summary Retrieves the details of a VPN site link. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkGet.json - */ -async function vpnSiteGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteLinkName = "vpnSiteLink1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSiteLinks.get( - resourceGroupName, - vpnSiteName, - vpnSiteLinkName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinksListByVpnSiteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinksListByVpnSiteSample.ts deleted file mode 100644 index fd910c281b4f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnSiteLinksListByVpnSiteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the vpnSiteLinks in a resource group for a vpn site. - * - * @summary Lists all the vpnSiteLinks in a resource group for a vpn site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkListByVpnSite.json - */ -async function vpnSiteLinkListByVpnSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSiteLinks.listByVpnSite( - resourceGroupName, - vpnSiteName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnSiteLinkListByVpnSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesConfigurationDownloadSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesConfigurationDownloadSample.ts deleted file mode 100644 index a55fe19938e6..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesConfigurationDownloadSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - GetVpnSitesConfigurationRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gives the sas-url to download the configurations for vpn-sites in a resource group. - * - * @summary Gives the sas-url to download the configurations for vpn-sites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSitesConfigurationDownload.json - */ -async function vpnSitesConfigurationDownload(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const request: GetVpnSitesConfigurationRequest = { - outputBlobSasUrl: - "https://blobcortextesturl.blob.core.windows.net/folderforconfig/vpnFile?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - vpnSites: [ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/abc", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSitesConfiguration.beginDownloadAndWait( - resourceGroupName, - virtualWANName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSitesConfigurationDownload(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesCreateOrUpdateSample.ts deleted file mode 100644 index 2122207becd7..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesCreateOrUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VpnSite} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * - * @summary Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSitePut.json - */ -async function vpnSiteCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteParameters: VpnSite = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - isSecuritySite: false, - location: "West US", - o365Policy: { - breakOutCategories: { default: false, allow: true, optimize: true }, - }, - tags: { key1: "value1" }, - virtualWan: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1", - }, - vpnSiteLinks: [ - { - name: "vpnSiteLink1", - bgpProperties: { asn: 1234, bgpPeeringAddress: "192.168.0.0" }, - fqdn: "link1.vpnsite1.contoso.com", - ipAddress: "50.50.50.56", - linkProperties: { linkProviderName: "vendor1", linkSpeedInMbps: 0 }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnSiteName, - vpnSiteParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesDeleteSample.ts deleted file mode 100644 index e4a6e3646b65..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VpnSite. - * - * @summary Deletes a VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteDelete.json - */ -async function vpnSiteDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.beginDeleteAndWait( - resourceGroupName, - vpnSiteName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesGetSample.ts deleted file mode 100644 index 171ceb07f38a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesGetSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VPN site. - * - * @summary Retrieves the details of a VPN site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteGet.json - */ -async function vpnSiteGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.get(resourceGroupName, vpnSiteName); - console.log(result); -} - -async function main(): Promise { - await vpnSiteGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesListByResourceGroupSample.ts deleted file mode 100644 index 2fb0abeb4906..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the vpnSites in a resource group. - * - * @summary Lists all the vpnSites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteListByResourceGroup.json - */ -async function vpnSiteListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSites.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnSiteListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesListSample.ts deleted file mode 100644 index d1250ce36a1a..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VpnSites in a subscription. - * - * @summary Lists all the VpnSites in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteList.json - */ -async function vpnSiteList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSites.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnSiteList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesUpdateTagsSample.ts deleted file mode 100644 index 2f6961b46469..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/vpnSitesUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates VpnSite tags. - * - * @summary Updates VpnSite tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteUpdateTags.json - */ -async function vpnSiteUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.updateTags( - resourceGroupName, - vpnSiteName, - vpnSiteParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index a4dce89dd2ca..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - WebApplicationFirewallPolicy} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or update policy with specified rule set name within a resource group. - * - * @summary Creates or update policy with specified rule set name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyCreateOrUpdate.json - */ -async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const parameters: WebApplicationFirewallPolicy = { - customRules: [ - { - name: "Rule1", - action: "Block", - matchConditions: [ - { - matchValues: ["192.168.1.0/24", "10.0.0.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], - operator: "IPMatch", - }, - ], - priority: 1, - ruleType: "MatchRule", - }, - { - name: "Rule2", - action: "Block", - matchConditions: [ - { - matchValues: ["192.168.1.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], - operator: "IPMatch", - }, - { - matchValues: ["Windows"], - matchVariables: [ - { selector: "UserAgent", variableName: "RequestHeaders" }, - ], - operator: "Contains", - }, - ], - priority: 2, - ruleType: "MatchRule", - }, - { - name: "RateLimitRule3", - action: "Block", - groupByUserSession: [ - { groupByVariables: [{ variableName: "ClientAddr" }] }, - ], - matchConditions: [ - { - matchValues: ["192.168.1.0/24", "10.0.0.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], - negationConditon: true, - operator: "IPMatch", - }, - ], - priority: 3, - rateLimitDuration: "OneMin", - rateLimitThreshold: 10, - ruleType: "RateLimitRule", - }, - { - name: "Rule4", - action: "JSChallenge", - matchConditions: [ - { - matchValues: ["192.168.1.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], - operator: "IPMatch", - }, - { - matchValues: ["Bot"], - matchVariables: [ - { selector: "UserAgent", variableName: "RequestHeaders" }, - ], - operator: "Contains", - }, - ], - priority: 4, - ruleType: "MatchRule", - }, - ], - location: "WestUs", - managedRules: { - exclusions: [ - { - exclusionManagedRuleSets: [ - { - ruleGroups: [ - { - ruleGroupName: "REQUEST-930-APPLICATION-ATTACK-LFI", - rules: [{ ruleId: "930120" }], - }, - { ruleGroupName: "REQUEST-932-APPLICATION-ATTACK-RCE" }, - ], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - ], - matchVariable: "RequestArgNames", - selector: "hello", - selectorMatchOperator: "StartsWith", - }, - { - exclusionManagedRuleSets: [ - { ruleGroups: [], ruleSetType: "OWASP", ruleSetVersion: "3.1" }, - ], - matchVariable: "RequestArgNames", - selector: "hello", - selectorMatchOperator: "EndsWith", - }, - { - matchVariable: "RequestArgNames", - selector: "test", - selectorMatchOperator: "StartsWith", - }, - { - matchVariable: "RequestArgValues", - selector: "test", - selectorMatchOperator: "StartsWith", - }, - ], - managedRuleSets: [ - { - ruleGroupOverrides: [ - { - ruleGroupName: "REQUEST-931-APPLICATION-ATTACK-RFI", - rules: [ - { action: "Log", ruleId: "931120", state: "Enabled" }, - { - action: "AnomalyScoring", - ruleId: "931130", - state: "Disabled", - }, - ], - }, - ], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - { - ruleGroupOverrides: [ - { - ruleGroupName: "UnknownBots", - rules: [ - { action: "JSChallenge", ruleId: "300700", state: "Enabled" }, - ], - }, - ], - ruleSetType: "Microsoft_BotManagerRuleSet", - ruleSetVersion: "1.0", - }, - { - ruleGroupOverrides: [ - { - ruleGroupName: "ExcessiveRequests", - rules: [ - { - action: "Block", - ruleId: "500100", - sensitivity: "High", - state: "Enabled", - }, - ], - }, - ], - ruleSetType: "Microsoft_HTTPDDoSRuleSet", - ruleSetVersion: "1.0", - }, - ], - exceptions: [ - { - exceptionManagedRuleSets: [ - { ruleSetType: "OWASP", ruleSetVersion: "3.2" }, - ], - matchVariable: "RequestURI", - valueMatchOperator: "Contains", - values: ["health", "account/images", "default.aspx"], - }, - { - exceptionManagedRuleSets: [ - { - ruleGroups: [ - { ruleGroupName: "REQUEST-932-APPLICATION-ATTACK-RCE" }, - ], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - ], - matchVariable: "RequestHeader", - selector: "User-Agent", - selectorMatchOperator: "StartsWith", - valueMatchOperator: "Contains", - values: ["Mozilla/5.0", "Chrome/122.0.0.0"], - }, - { - exceptionManagedRuleSets: [ - { - ruleGroups: [ - { ruleGroupName: "BadBots", rules: [{ ruleId: "100100" }] }, - ], - ruleSetType: "Microsoft_BotManagerRuleSet", - ruleSetVersion: "1.0", - }, - ], - matchVariable: "RemoteAddr", - valueMatchOperator: "IPMatch", - values: ["1.2.3.4", "10.0.0.1/6"], - }, - ], - }, - policySettings: { - jsChallengeCookieExpirationInMins: 100, - logScrubbing: { - scrubbingRules: [ - { - matchVariable: "RequestArgNames", - selector: "test", - selectorMatchOperator: "Equals", - state: "Enabled", - }, - { - matchVariable: "RequestIPAddress", - selectorMatchOperator: "EqualsAny", - state: "Enabled", - }, - ], - state: "Enabled", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.createOrUpdate( - resourceGroupName, - policyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createsOrUpdatesAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts deleted file mode 100644 index 7e5d696ffb07..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes Policy. - * - * @summary Deletes Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyDelete.json - */ -async function deletesAWafPolicyWithinAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.beginDeleteAndWait( - resourceGroupName, - policyName, - ); - console.log(result); -} - -async function main(): Promise { - await deletesAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesGetSample.ts deleted file mode 100644 index 27669d5b329b..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieve protection policy with specified name within a resource group. - * - * @summary Retrieve protection policy with specified name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyGet.json - */ -async function getsAWafPolicyWithinAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.get( - resourceGroupName, - policyName, - ); - console.log(result); -} - -async function main(): Promise { - await getsAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesListAllSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesListAllSample.ts deleted file mode 100644 index bdb23a7677ef..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the WAF policies in a subscription. - * - * @summary Gets all the WAF policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListAllPolicies.json - */ -async function listsAllWafPoliciesInASubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webApplicationFirewallPolicies.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllWafPoliciesInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesListSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesListSample.ts deleted file mode 100644 index c730f4bf4afe..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/webApplicationFirewallPoliciesListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all of the protection policies within a resource group. - * - * @summary Lists all of the protection policies within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListPolicies.json - */ -async function listsAllWafPoliciesInAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webApplicationFirewallPolicies.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllWafPoliciesInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/webCategoriesGetSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/webCategoriesGetSample.ts deleted file mode 100644 index a3a8c6ce44c2..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/webCategoriesGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Azure Web Category. - * - * @summary Gets the specified Azure Web Category. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureWebCategoryGet.json - */ -async function getAzureWebCategoryByName(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "4de8428a-4a92-4cea-90ff-b47128b8cab8"; - const name = "Arts"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webCategories.get(name); - console.log(result); -} - -async function main(): Promise { - await getAzureWebCategoryByName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/src/webCategoriesListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v35/typescript/src/webCategoriesListBySubscriptionSample.ts deleted file mode 100644 index 0d227d31cd9f..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/src/webCategoriesListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Azure Web Categories in a subscription. - * - * @summary Gets all the Azure Web Categories in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureWebCategoriesListBySubscription.json - */ -async function listAllAzureWebCategoriesForAGivenSubscription(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "4de8428a-4a92-4cea-90ff-b47128b8cab8"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webCategories.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllAzureWebCategoriesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v35/typescript/tsconfig.json b/sdk/network/arm-network/samples/v35/typescript/tsconfig.json deleted file mode 100644 index 400db87cf648..000000000000 --- a/sdk/network/arm-network/samples/v35/typescript/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2023", - "module": "commonjs", - "lib": [], - "importHelpers": true, - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "node10", - "esModuleInterop": true, - "outDir": "./dist", - "resolveJsonModule": true - }, - "include": [ - "./src" - ] -} diff --git a/sdk/network/arm-network/samples/v36/javascript/README.md b/sdk/network/arm-network/samples/v36/javascript/README.md deleted file mode 100644 index 035b36d6d9ab..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/README.md +++ /dev/null @@ -1,1542 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [adminRuleCollectionsCreateOrUpdateSample.js][adminrulecollectionscreateorupdatesample] | Creates or updates an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionPut.json | -| [adminRuleCollectionsDeleteSample.js][adminrulecollectionsdeletesample] | Deletes an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json | -| [adminRuleCollectionsGetSample.js][adminrulecollectionsgetsample] | Gets a network manager security admin configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionGet.json | -| [adminRuleCollectionsListSample.js][adminrulecollectionslistsample] | Lists all the rule collections in a security admin configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionList.json | -| [adminRulesCreateOrUpdateSample.js][adminrulescreateorupdatesample] | Creates or updates an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json | -| [adminRulesDeleteSample.js][adminrulesdeletesample] | Deletes an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleDelete.json | -| [adminRulesGetSample.js][adminrulesgetsample] | Gets a network manager security configuration admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleGet.json | -| [adminRulesListSample.js][adminruleslistsample] | List all network manager security configuration admin rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleList.json | -| [applicationGatewayPrivateEndpointConnectionsDeleteSample.js][applicationgatewayprivateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json | -| [applicationGatewayPrivateEndpointConnectionsGetSample.js][applicationgatewayprivateendpointconnectionsgetsample] | Gets the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json | -| [applicationGatewayPrivateEndpointConnectionsListSample.js][applicationgatewayprivateendpointconnectionslistsample] | Lists all private endpoint connections on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json | -| [applicationGatewayPrivateEndpointConnectionsUpdateSample.js][applicationgatewayprivateendpointconnectionsupdatesample] | Updates the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json | -| [applicationGatewayPrivateLinkResourcesListSample.js][applicationgatewayprivatelinkresourceslistsample] | Lists all private link resources on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json | -| [applicationGatewayWafDynamicManifestsDefaultGetSample.js][applicationgatewaywafdynamicmanifestsdefaultgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json | -| [applicationGatewayWafDynamicManifestsGetSample.js][applicationgatewaywafdynamicmanifestsgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetApplicationGatewayWafDynamicManifests.json | -| [applicationGatewaysBackendHealthOnDemandSample.js][applicationgatewaysbackendhealthondemandsample] | Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayBackendHealthTest.json | -| [applicationGatewaysBackendHealthSample.js][applicationgatewaysbackendhealthsample] | Gets the backend health of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayBackendHealthGet.json | -| [applicationGatewaysCreateOrUpdateSample.js][applicationgatewayscreateorupdatesample] | Creates or updates the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayCreate.json | -| [applicationGatewaysDeleteSample.js][applicationgatewaysdeletesample] | Deletes the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayDelete.json | -| [applicationGatewaysGetSample.js][applicationgatewaysgetsample] | Gets the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayGet.json | -| [applicationGatewaysGetSslPredefinedPolicySample.js][applicationgatewaysgetsslpredefinedpolicysample] | Gets Ssl predefined policy with the specified policy name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json | -| [applicationGatewaysListAllSample.js][applicationgatewayslistallsample] | Gets all the application gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayListAll.json | -| [applicationGatewaysListAvailableRequestHeadersSample.js][applicationgatewayslistavailablerequestheaderssample] | Lists all available request headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json | -| [applicationGatewaysListAvailableResponseHeadersSample.js][applicationgatewayslistavailableresponseheaderssample] | Lists all available response headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json | -| [applicationGatewaysListAvailableServerVariablesSample.js][applicationgatewayslistavailableservervariablessample] | Lists all available server variables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json | -| [applicationGatewaysListAvailableSslOptionsSample.js][applicationgatewayslistavailablessloptionssample] | Lists available Ssl options for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json | -| [applicationGatewaysListAvailableSslPredefinedPoliciesSample.js][applicationgatewayslistavailablesslpredefinedpoliciessample] | Lists all SSL predefined policies for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json | -| [applicationGatewaysListAvailableWafRuleSetsSample.js][applicationgatewayslistavailablewafrulesetssample] | Lists all available web application firewall rule sets. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json | -| [applicationGatewaysListSample.js][applicationgatewayslistsample] | Lists all application gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayList.json | -| [applicationGatewaysStartSample.js][applicationgatewaysstartsample] | Starts the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayStart.json | -| [applicationGatewaysStopSample.js][applicationgatewaysstopsample] | Stops the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayStop.json | -| [applicationGatewaysUpdateTagsSample.js][applicationgatewaysupdatetagssample] | Updates the specified application gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayUpdateTags.json | -| [applicationSecurityGroupsCreateOrUpdateSample.js][applicationsecuritygroupscreateorupdatesample] | Creates or updates an application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupCreate.json | -| [applicationSecurityGroupsDeleteSample.js][applicationsecuritygroupsdeletesample] | Deletes the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupDelete.json | -| [applicationSecurityGroupsGetSample.js][applicationsecuritygroupsgetsample] | Gets information about the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupGet.json | -| [applicationSecurityGroupsListAllSample.js][applicationsecuritygroupslistallsample] | Gets all application security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupListAll.json | -| [applicationSecurityGroupsListSample.js][applicationsecuritygroupslistsample] | Gets all the application security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupList.json | -| [applicationSecurityGroupsUpdateTagsSample.js][applicationsecuritygroupsupdatetagssample] | Updates an application security group's tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupUpdateTags.json | -| [availableDelegationsListSample.js][availabledelegationslistsample] | Gets all of the available subnet delegations for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableDelegationsSubscriptionGet.json | -| [availableEndpointServicesListSample.js][availableendpointserviceslistsample] | List what values of endpoint services are available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EndpointServicesList.json | -| [availablePrivateEndpointTypesListByResourceGroupSample.js][availableprivateendpointtypeslistbyresourcegroupsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json | -| [availablePrivateEndpointTypesListSample.js][availableprivateendpointtypeslistsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailablePrivateEndpointTypesGet.json | -| [availableResourceGroupDelegationsListSample.js][availableresourcegroupdelegationslistsample] | Gets all of the available subnet delegations for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableDelegationsResourceGroupGet.json | -| [availableServiceAliasesListByResourceGroupSample.js][availableservicealiaseslistbyresourcegroupsample] | Gets all available service aliases for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableServiceAliasesListByResourceGroup.json | -| [availableServiceAliasesListSample.js][availableservicealiaseslistsample] | Gets all available service aliases for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableServiceAliasesList.json | -| [azureFirewallFqdnTagsListAllSample.js][azurefirewallfqdntagslistallsample] | Gets all the Azure Firewall FQDN Tags in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json | -| [azureFirewallsCreateOrUpdateSample.js][azurefirewallscreateorupdatesample] | Creates or updates the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPut.json | -| [azureFirewallsDeleteSample.js][azurefirewallsdeletesample] | Deletes the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallDelete.json | -| [azureFirewallsGetSample.js][azurefirewallsgetsample] | Gets the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGet.json | -| [azureFirewallsListAllSample.js][azurefirewallslistallsample] | Gets all the Azure Firewalls in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListBySubscription.json | -| [azureFirewallsListLearnedPrefixesSample.js][azurefirewallslistlearnedprefixessample] | Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListLearnedIPPrefixes.json | -| [azureFirewallsListSample.js][azurefirewallslistsample] | Lists all Azure Firewalls in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListByResourceGroup.json | -| [azureFirewallsPacketCaptureOperationSample.js][azurefirewallspacketcaptureoperationsample] | Runs a packet capture operation on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPacketCaptureOperation.json | -| [azureFirewallsPacketCaptureSample.js][azurefirewallspacketcapturesample] | Runs a packet capture on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPacketCapture.json | -| [azureFirewallsUpdateTagsSample.js][azurefirewallsupdatetagssample] | Updates tags of an Azure Firewall resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallUpdateTags.json | -| [bastionHostsCreateOrUpdateSample.js][bastionhostscreateorupdatesample] | Creates or updates the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPut.json | -| [bastionHostsDeleteSample.js][bastionhostsdeletesample] | Deletes the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDelete.json | -| [bastionHostsGetSample.js][bastionhostsgetsample] | Gets the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostGet.json | -| [bastionHostsListByResourceGroupSample.js][bastionhostslistbyresourcegroupsample] | Lists all Bastion Hosts in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostListByResourceGroup.json | -| [bastionHostsListSample.js][bastionhostslistsample] | Lists all Bastion Hosts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostListBySubscription.json | -| [bastionHostsUpdateTagsSample.js][bastionhostsupdatetagssample] | Updates Tags for BastionHost resource x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPatch.json | -| [bgpServiceCommunitiesListSample.js][bgpservicecommunitieslistsample] | Gets all the available bgp service communities. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceCommunityList.json | -| [checkDnsNameAvailabilitySample.js][checkdnsnameavailabilitysample] | Checks whether a domain name in the cloudapp.azure.com zone is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckDnsNameAvailability.json | -| [configurationPolicyGroupsCreateOrUpdateSample.js][configurationpolicygroupscreateorupdatesample] | Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupPut.json | -| [configurationPolicyGroupsDeleteSample.js][configurationpolicygroupsdeletesample] | Deletes a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupDelete.json | -| [configurationPolicyGroupsGetSample.js][configurationpolicygroupsgetsample] | Retrieves the details of a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupGet.json | -| [configurationPolicyGroupsListByVpnServerConfigurationSample.js][configurationpolicygroupslistbyvpnserverconfigurationsample] | Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json | -| [connectionMonitorsCreateOrUpdateSample.js][connectionmonitorscreateorupdatesample] | Create or update a connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorCreate.json | -| [connectionMonitorsDeleteSample.js][connectionmonitorsdeletesample] | Deletes the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorDelete.json | -| [connectionMonitorsGetSample.js][connectionmonitorsgetsample] | Gets a connection monitor by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorGet.json | -| [connectionMonitorsListSample.js][connectionmonitorslistsample] | Lists all connection monitors for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorList.json | -| [connectionMonitorsStopSample.js][connectionmonitorsstopsample] | Stops the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorStop.json | -| [connectionMonitorsUpdateTagsSample.js][connectionmonitorsupdatetagssample] | Update tags of the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json | -| [connectivityConfigurationsCreateOrUpdateSample.js][connectivityconfigurationscreateorupdatesample] | Creates/Updates a new network manager connectivity configuration x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationPut.json | -| [connectivityConfigurationsDeleteSample.js][connectivityconfigurationsdeletesample] | Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json | -| [connectivityConfigurationsGetSample.js][connectivityconfigurationsgetsample] | Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationGet.json | -| [connectivityConfigurationsListSample.js][connectivityconfigurationslistsample] | Lists all the network manager connectivity configuration in a specified network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationList.json | -| [customIPPrefixesCreateOrUpdateSample.js][customipprefixescreateorupdatesample] | Creates or updates a custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixCreateCustomizedValues.json | -| [customIPPrefixesDeleteSample.js][customipprefixesdeletesample] | Deletes the specified custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixDelete.json | -| [customIPPrefixesGetSample.js][customipprefixesgetsample] | Gets the specified custom IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixGet.json | -| [customIPPrefixesListAllSample.js][customipprefixeslistallsample] | Gets all the custom IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixListAll.json | -| [customIPPrefixesListSample.js][customipprefixeslistsample] | Gets all custom IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixList.json | -| [customIPPrefixesUpdateTagsSample.js][customipprefixesupdatetagssample] | Updates custom IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixUpdateTags.json | -| [ddosCustomPoliciesCreateOrUpdateSample.js][ddoscustompoliciescreateorupdatesample] | Creates or updates a DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyCreate.json | -| [ddosCustomPoliciesDeleteSample.js][ddoscustompoliciesdeletesample] | Deletes the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyDelete.json | -| [ddosCustomPoliciesGetSample.js][ddoscustompoliciesgetsample] | Gets information about the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyGet.json | -| [ddosCustomPoliciesUpdateTagsSample.js][ddoscustompoliciesupdatetagssample] | Update a DDoS custom policy tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyUpdateTags.json | -| [ddosProtectionPlansCreateOrUpdateSample.js][ddosprotectionplanscreateorupdatesample] | Creates or updates a DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanCreate.json | -| [ddosProtectionPlansDeleteSample.js][ddosprotectionplansdeletesample] | Deletes the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanDelete.json | -| [ddosProtectionPlansGetSample.js][ddosprotectionplansgetsample] | Gets information about the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanGet.json | -| [ddosProtectionPlansListByResourceGroupSample.js][ddosprotectionplanslistbyresourcegroupsample] | Gets all the DDoS protection plans in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanList.json | -| [ddosProtectionPlansListSample.js][ddosprotectionplanslistsample] | Gets all DDoS protection plans in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanListAll.json | -| [ddosProtectionPlansUpdateTagsSample.js][ddosprotectionplansupdatetagssample] | Update a DDoS protection plan tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanUpdateTags.json | -| [defaultSecurityRulesGetSample.js][defaultsecurityrulesgetsample] | Get the specified default network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DefaultSecurityRuleGet.json | -| [defaultSecurityRulesListSample.js][defaultsecurityruleslistsample] | Gets all default security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DefaultSecurityRuleList.json | -| [deleteBastionShareableLinkByTokenSample.js][deletebastionshareablelinkbytokensample] | Deletes the Bastion Shareable Links for all the tokens specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkDeleteByToken.json | -| [deleteBastionShareableLinkSample.js][deletebastionshareablelinksample] | Deletes the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkDelete.json | -| [disconnectActiveSessionsSample.js][disconnectactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionSessionDelete.json | -| [dscpConfigurationCreateOrUpdateSample.js][dscpconfigurationcreateorupdatesample] | Creates or updates a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationCreate.json | -| [dscpConfigurationDeleteSample.js][dscpconfigurationdeletesample] | Deletes a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationDelete.json | -| [dscpConfigurationGetSample.js][dscpconfigurationgetsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationGet.json | -| [dscpConfigurationListAllSample.js][dscpconfigurationlistallsample] | Gets all dscp configurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationListAll.json | -| [dscpConfigurationListSample.js][dscpconfigurationlistsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationList.json | -| [expressRouteCircuitAuthorizationsCreateOrUpdateSample.js][expressroutecircuitauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json | -| [expressRouteCircuitAuthorizationsDeleteSample.js][expressroutecircuitauthorizationsdeletesample] | Deletes the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json | -| [expressRouteCircuitAuthorizationsGetSample.js][expressroutecircuitauthorizationsgetsample] | Gets the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationGet.json | -| [expressRouteCircuitAuthorizationsListSample.js][expressroutecircuitauthorizationslistsample] | Gets all authorizations in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationList.json | -| [expressRouteCircuitConnectionsCreateOrUpdateSample.js][expressroutecircuitconnectionscreateorupdatesample] | Creates or updates a Express Route Circuit Connection in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionCreate.json | -| [expressRouteCircuitConnectionsDeleteSample.js][expressroutecircuitconnectionsdeletesample] | Deletes the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionDelete.json | -| [expressRouteCircuitConnectionsGetSample.js][expressroutecircuitconnectionsgetsample] | Gets the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionGet.json | -| [expressRouteCircuitConnectionsListSample.js][expressroutecircuitconnectionslistsample] | Gets all global reach connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionList.json | -| [expressRouteCircuitPeeringsCreateOrUpdateSample.js][expressroutecircuitpeeringscreateorupdatesample] | Creates or updates a peering in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringCreate.json | -| [expressRouteCircuitPeeringsDeleteSample.js][expressroutecircuitpeeringsdeletesample] | Deletes the specified peering from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringDelete.json | -| [expressRouteCircuitPeeringsGetSample.js][expressroutecircuitpeeringsgetsample] | Gets the specified peering for the express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringGet.json | -| [expressRouteCircuitPeeringsListSample.js][expressroutecircuitpeeringslistsample] | Gets all peerings in a specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringList.json | -| [expressRouteCircuitsCreateOrUpdateSample.js][expressroutecircuitscreateorupdatesample] | Creates or updates an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitCreate.json | -| [expressRouteCircuitsDeleteSample.js][expressroutecircuitsdeletesample] | Deletes the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitDelete.json | -| [expressRouteCircuitsGetPeeringStatsSample.js][expressroutecircuitsgetpeeringstatssample] | Gets all stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringStats.json | -| [expressRouteCircuitsGetSample.js][expressroutecircuitsgetsample] | Gets information about the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitGet.json | -| [expressRouteCircuitsGetStatsSample.js][expressroutecircuitsgetstatssample] | Gets all the stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitStats.json | -| [expressRouteCircuitsListAllSample.js][expressroutecircuitslistallsample] | Gets all the express route circuits in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitListBySubscription.json | -| [expressRouteCircuitsListArpTableSample.js][expressroutecircuitslistarptablesample] | Gets the currently advertised ARP table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitARPTableList.json | -| [expressRouteCircuitsListRoutesTableSample.js][expressroutecircuitslistroutestablesample] | Gets the currently advertised routes table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitRouteTableList.json | -| [expressRouteCircuitsListRoutesTableSummarySample.js][expressroutecircuitslistroutestablesummarysample] | Gets the currently advertised routes table summary associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json | -| [expressRouteCircuitsListSample.js][expressroutecircuitslistsample] | Gets all the express route circuits in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitListByResourceGroup.json | -| [expressRouteCircuitsUpdateTagsSample.js][expressroutecircuitsupdatetagssample] | Updates an express route circuit tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitUpdateTags.json | -| [expressRouteConnectionsCreateOrUpdateSample.js][expressrouteconnectionscreateorupdatesample] | Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionCreate.json | -| [expressRouteConnectionsDeleteSample.js][expressrouteconnectionsdeletesample] | Deletes a connection to a ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionDelete.json | -| [expressRouteConnectionsGetSample.js][expressrouteconnectionsgetsample] | Gets the specified ExpressRouteConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionGet.json | -| [expressRouteConnectionsListSample.js][expressrouteconnectionslistsample] | Lists ExpressRouteConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionList.json | -| [expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js][expressroutecrossconnectionpeeringscreateorupdatesample] | Creates or updates a peering in the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json | -| [expressRouteCrossConnectionPeeringsDeleteSample.js][expressroutecrossconnectionpeeringsdeletesample] | Deletes the specified peering from the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json | -| [expressRouteCrossConnectionPeeringsGetSample.js][expressroutecrossconnectionpeeringsgetsample] | Gets the specified peering for the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json | -| [expressRouteCrossConnectionPeeringsListSample.js][expressroutecrossconnectionpeeringslistsample] | Gets all peerings in a specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json | -| [expressRouteCrossConnectionsCreateOrUpdateSample.js][expressroutecrossconnectionscreateorupdatesample] | Update the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionUpdate.json | -| [expressRouteCrossConnectionsGetSample.js][expressroutecrossconnectionsgetsample] | Gets details about the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionGet.json | -| [expressRouteCrossConnectionsListArpTableSample.js][expressroutecrossconnectionslistarptablesample] | Gets the currently advertised ARP table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsArpTable.json | -| [expressRouteCrossConnectionsListByResourceGroupSample.js][expressroutecrossconnectionslistbyresourcegroupsample] | Retrieves all the ExpressRouteCrossConnections in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json | -| [expressRouteCrossConnectionsListRoutesTableSample.js][expressroutecrossconnectionslistroutestablesample] | Gets the currently advertised routes table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json | -| [expressRouteCrossConnectionsListRoutesTableSummarySample.js][expressroutecrossconnectionslistroutestablesummarysample] | Gets the route table summary associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json | -| [expressRouteCrossConnectionsListSample.js][expressroutecrossconnectionslistsample] | Retrieves all the ExpressRouteCrossConnections in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionList.json | -| [expressRouteCrossConnectionsUpdateTagsSample.js][expressroutecrossconnectionsupdatetagssample] | Updates an express route cross connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json | -| [expressRouteGatewaysCreateOrUpdateSample.js][expressroutegatewayscreateorupdatesample] | Creates or updates a ExpressRoute gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayCreate.json | -| [expressRouteGatewaysDeleteSample.js][expressroutegatewaysdeletesample] | Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayDelete.json | -| [expressRouteGatewaysGetSample.js][expressroutegatewaysgetsample] | Fetches the details of a ExpressRoute gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayGet.json | -| [expressRouteGatewaysListByResourceGroupSample.js][expressroutegatewayslistbyresourcegroupsample] | Lists ExpressRoute gateways in a given resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayListByResourceGroup.json | -| [expressRouteGatewaysListBySubscriptionSample.js][expressroutegatewayslistbysubscriptionsample] | Lists ExpressRoute gateways under a given subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayListBySubscription.json | -| [expressRouteGatewaysUpdateTagsSample.js][expressroutegatewaysupdatetagssample] | Updates express route gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayUpdateTags.json | -| [expressRouteLinksGetSample.js][expressroutelinksgetsample] | Retrieves the specified ExpressRouteLink resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteLinkGet.json | -| [expressRouteLinksListSample.js][expressroutelinkslistsample] | Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteLinkList.json | -| [expressRoutePortAuthorizationsCreateOrUpdateSample.js][expressrouteportauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationCreate.json | -| [expressRoutePortAuthorizationsDeleteSample.js][expressrouteportauthorizationsdeletesample] | Deletes the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationDelete.json | -| [expressRoutePortAuthorizationsGetSample.js][expressrouteportauthorizationsgetsample] | Gets the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationGet.json | -| [expressRoutePortAuthorizationsListSample.js][expressrouteportauthorizationslistsample] | Gets all authorizations in an express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationList.json | -| [expressRoutePortsCreateOrUpdateSample.js][expressrouteportscreateorupdatesample] | Creates or updates the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortCreate.json | -| [expressRoutePortsDeleteSample.js][expressrouteportsdeletesample] | Deletes the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortDelete.json | -| [expressRoutePortsGenerateLoaSample.js][expressrouteportsgenerateloasample] | Generate a letter of authorization for the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GenerateExpressRoutePortsLOA.json | -| [expressRoutePortsGetSample.js][expressrouteportsgetsample] | Retrieves the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortGet.json | -| [expressRoutePortsListByResourceGroupSample.js][expressrouteportslistbyresourcegroupsample] | List all the ExpressRoutePort resources in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortListByResourceGroup.json | -| [expressRoutePortsListSample.js][expressrouteportslistsample] | List all the ExpressRoutePort resources in the specified subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortList.json | -| [expressRoutePortsLocationsGetSample.js][expressrouteportslocationsgetsample] | Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortsLocationGet.json | -| [expressRoutePortsLocationsListSample.js][expressrouteportslocationslistsample] | Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortsLocationList.json | -| [expressRoutePortsUpdateTagsSample.js][expressrouteportsupdatetagssample] | Update ExpressRoutePort tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortUpdateTags.json | -| [expressRouteProviderPortSample.js][expressrouteproviderportsample] | Retrieves detail of a provider port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/expressRouteProviderPort.json | -| [expressRouteProviderPortsLocationListSample.js][expressrouteproviderportslocationlistsample] | Retrieves all the ExpressRouteProviderPorts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/expressRouteProviderPortList.json | -| [expressRouteServiceProvidersListSample.js][expressrouteserviceproviderslistsample] | Gets all the available express route service providers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteProviderList.json | -| [firewallPoliciesCreateOrUpdateSample.js][firewallpoliciescreateorupdatesample] | Creates or updates the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyPut.json | -| [firewallPoliciesDeleteSample.js][firewallpoliciesdeletesample] | Deletes the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDelete.json | -| [firewallPoliciesGetSample.js][firewallpoliciesgetsample] | Gets the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyGet.json | -| [firewallPoliciesListAllSample.js][firewallpolicieslistallsample] | Gets all the Firewall Policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyListBySubscription.json | -| [firewallPoliciesListSample.js][firewallpolicieslistsample] | Lists all Firewall Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyListByResourceGroup.json | -| [firewallPoliciesUpdateTagsSample.js][firewallpoliciesupdatetagssample] | Updates tags of a Azure Firewall Policy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyPatch.json | -| [firewallPolicyDeploymentsDeploySample.js][firewallpolicydeploymentsdeploysample] | Deploys the firewall policy draft and child rule collection group drafts. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftDeploy.json | -| [firewallPolicyDraftsCreateOrUpdateSample.js][firewallpolicydraftscreateorupdatesample] | Create or update a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftPut.json | -| [firewallPolicyDraftsDeleteSample.js][firewallpolicydraftsdeletesample] | Delete a draft policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftDelete.json | -| [firewallPolicyDraftsGetSample.js][firewallpolicydraftsgetsample] | Get a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftGet.json | -| [firewallPolicyIdpsSignaturesFilterValuesListSample.js][firewallpolicyidpssignaturesfiltervalueslistsample] | Retrieves the current filter values for the signatures overrides x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json | -| [firewallPolicyIdpsSignaturesListSample.js][firewallpolicyidpssignatureslistsample] | Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyQuerySignatureOverrides.json | -| [firewallPolicyIdpsSignaturesOverridesGetSample.js][firewallpolicyidpssignaturesoverridesgetsample] | Returns all signatures overrides for a specific policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesGet.json | -| [firewallPolicyIdpsSignaturesOverridesListSample.js][firewallpolicyidpssignaturesoverrideslistsample] | Returns all signatures overrides objects for a specific policy as a list containing a single value. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesList.json | -| [firewallPolicyIdpsSignaturesOverridesPatchSample.js][firewallpolicyidpssignaturesoverridespatchsample] | Will update the status of policy's signature overrides for IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesPatch.json | -| [firewallPolicyIdpsSignaturesOverridesPutSample.js][firewallpolicyidpssignaturesoverridesputsample] | Will override/create a new signature overrides for the policy's IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesPut.json | -| [firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js][firewallpolicyrulecollectiongroupdraftscreateorupdatesample] | Create or Update Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json | -| [firewallPolicyRuleCollectionGroupDraftsDeleteSample.js][firewallpolicyrulecollectiongroupdraftsdeletesample] | Delete Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json | -| [firewallPolicyRuleCollectionGroupDraftsGetSample.js][firewallpolicyrulecollectiongroupdraftsgetsample] | Get Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json | -| [firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js][firewallpolicyrulecollectiongroupscreateorupdatesample] | Creates or updates the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json | -| [firewallPolicyRuleCollectionGroupsDeleteSample.js][firewallpolicyrulecollectiongroupsdeletesample] | Deletes the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json | -| [firewallPolicyRuleCollectionGroupsGetSample.js][firewallpolicyrulecollectiongroupsgetsample] | Gets the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json | -| [firewallPolicyRuleCollectionGroupsListSample.js][firewallpolicyrulecollectiongroupslistsample] | Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json | -| [flowLogsCreateOrUpdateSample.js][flowlogscreateorupdatesample] | Create or update a flow log for the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogCreate.json | -| [flowLogsDeleteSample.js][flowlogsdeletesample] | Deletes the specified flow log resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogDelete.json | -| [flowLogsGetSample.js][flowlogsgetsample] | Gets a flow log resource by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogGet.json | -| [flowLogsListSample.js][flowlogslistsample] | Lists all flow log resources for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogList.json | -| [flowLogsUpdateTagsSample.js][flowlogsupdatetagssample] | Update tags of the specified flow log. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogUpdateTags.json | -| [generatevirtualwanvpnserverconfigurationvpnprofileSample.js][generatevirtualwanvpnserverconfigurationvpnprofilesample] | Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json | -| [getActiveSessionsSample.js][getactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionSessionsList.json | -| [getBastionShareableLinkSample.js][getbastionshareablelinksample] | Return the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkGet.json | -| [hubRouteTablesCreateOrUpdateSample.js][hubroutetablescreateorupdatesample] | Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTablePut.json | -| [hubRouteTablesDeleteSample.js][hubroutetablesdeletesample] | Deletes a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableDelete.json | -| [hubRouteTablesGetSample.js][hubroutetablesgetsample] | Retrieves the details of a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableGet.json | -| [hubRouteTablesListSample.js][hubroutetableslistsample] | Retrieves the details of all RouteTables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableList.json | -| [hubVirtualNetworkConnectionsCreateOrUpdateSample.js][hubvirtualnetworkconnectionscreateorupdatesample] | Creates a hub virtual network connection if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionPut.json | -| [hubVirtualNetworkConnectionsDeleteSample.js][hubvirtualnetworkconnectionsdeletesample] | Deletes a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionDelete.json | -| [hubVirtualNetworkConnectionsGetSample.js][hubvirtualnetworkconnectionsgetsample] | Retrieves the details of a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionGet.json | -| [hubVirtualNetworkConnectionsListSample.js][hubvirtualnetworkconnectionslistsample] | Retrieves the details of all HubVirtualNetworkConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionList.json | -| [inboundNatRulesCreateOrUpdateSample.js][inboundnatrulescreateorupdatesample] | Creates or updates a load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleCreate.json | -| [inboundNatRulesDeleteSample.js][inboundnatrulesdeletesample] | Deletes the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleDelete.json | -| [inboundNatRulesGetSample.js][inboundnatrulesgetsample] | Gets the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleGet.json | -| [inboundNatRulesListSample.js][inboundnatruleslistsample] | Gets all the inbound NAT rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleList.json | -| [inboundSecurityRuleCreateOrUpdateSample.js][inboundsecurityrulecreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Inbound Security Rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundSecurityRulePut.json | -| [inboundSecurityRuleGetSample.js][inboundsecurityrulegetsample] | Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundSecurityRuleGet.json | -| [ipAllocationsCreateOrUpdateSample.js][ipallocationscreateorupdatesample] | Creates or updates an IpAllocation in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationCreate.json | -| [ipAllocationsDeleteSample.js][ipallocationsdeletesample] | Deletes the specified IpAllocation. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationDelete.json | -| [ipAllocationsGetSample.js][ipallocationsgetsample] | Gets the specified IpAllocation by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationGet.json | -| [ipAllocationsListByResourceGroupSample.js][ipallocationslistbyresourcegroupsample] | Gets all IpAllocations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationListByResourceGroup.json | -| [ipAllocationsListSample.js][ipallocationslistsample] | Gets all IpAllocations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationList.json | -| [ipAllocationsUpdateTagsSample.js][ipallocationsupdatetagssample] | Updates a IpAllocation tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationUpdateTags.json | -| [ipGroupsCreateOrUpdateSample.js][ipgroupscreateorupdatesample] | Creates or updates an ipGroups in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsCreate.json | -| [ipGroupsDeleteSample.js][ipgroupsdeletesample] | Deletes the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsDelete.json | -| [ipGroupsGetSample.js][ipgroupsgetsample] | Gets the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsGet.json | -| [ipGroupsListByResourceGroupSample.js][ipgroupslistbyresourcegroupsample] | Gets all IpGroups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsListByResourceGroup.json | -| [ipGroupsListSample.js][ipgroupslistsample] | Gets all IpGroups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsListBySubscription.json | -| [ipGroupsUpdateGroupsSample.js][ipgroupsupdategroupssample] | Updates tags of an IpGroups resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsUpdateTags.json | -| [ipamPoolsCreateSample.js][ipampoolscreatesample] | Creates/Updates the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Create.json | -| [ipamPoolsDeleteSample.js][ipampoolsdeletesample] | Delete the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Delete.json | -| [ipamPoolsGetPoolUsageSample.js][ipampoolsgetpoolusagesample] | Get the Pool Usage. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_GetPoolUsage.json | -| [ipamPoolsGetSample.js][ipampoolsgetsample] | Gets the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Get.json | -| [ipamPoolsListAssociatedResourcesSample.js][ipampoolslistassociatedresourcessample] | List Associated Resource in the Pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_ListAssociatedResources.json | -| [ipamPoolsListSample.js][ipampoolslistsample] | Gets list of Pool resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_List.json | -| [ipamPoolsUpdateSample.js][ipampoolsupdatesample] | Updates the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Update.json | -| [listActiveConnectivityConfigurationsSample.js][listactiveconnectivityconfigurationssample] | Lists active connectivity configurations in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json | -| [listActiveSecurityAdminRulesSample.js][listactivesecurityadminrulessample] | Lists active security admin rules in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json | -| [listNetworkManagerEffectiveConnectivityConfigurationsSample.js][listnetworkmanagereffectiveconnectivityconfigurationssample] | List all effective connectivity configurations applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json | -| [listNetworkManagerEffectiveSecurityAdminRulesSample.js][listnetworkmanagereffectivesecurityadminrulessample] | List all effective security admin rules applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json | -| [loadBalancerBackendAddressPoolsCreateOrUpdateSample.js][loadbalancerbackendaddresspoolscreateorupdatesample] | Creates or updates a load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json | -| [loadBalancerBackendAddressPoolsDeleteSample.js][loadbalancerbackendaddresspoolsdeletesample] | Deletes the specified load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerBackendAddressPoolDelete.json | -| [loadBalancerBackendAddressPoolsGetSample.js][loadbalancerbackendaddresspoolsgetsample] | Gets load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json | -| [loadBalancerBackendAddressPoolsListSample.js][loadbalancerbackendaddresspoolslistsample] | Gets all the load balancer backed address pools. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json | -| [loadBalancerFrontendIPConfigurationsGetSample.js][loadbalancerfrontendipconfigurationsgetsample] | Gets load balancer frontend IP configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json | -| [loadBalancerFrontendIPConfigurationsListSample.js][loadbalancerfrontendipconfigurationslistsample] | Gets all the load balancer frontend IP configurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerFrontendIPConfigurationList.json | -| [loadBalancerLoadBalancingRulesGetSample.js][loadbalancerloadbalancingrulesgetsample] | Gets the specified load balancer load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerLoadBalancingRuleGet.json | -| [loadBalancerLoadBalancingRulesHealthSample.js][loadbalancerloadbalancingruleshealthsample] | Get health details of a load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerHealth.json | -| [loadBalancerLoadBalancingRulesListSample.js][loadbalancerloadbalancingruleslistsample] | Gets all the load balancing rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerLoadBalancingRuleList.json | -| [loadBalancerNetworkInterfacesListSample.js][loadbalancernetworkinterfaceslistsample] | Gets associated load balancer network interfaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json | -| [loadBalancerOutboundRulesGetSample.js][loadbalanceroutboundrulesgetsample] | Gets the specified load balancer outbound rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerOutboundRuleGet.json | -| [loadBalancerOutboundRulesListSample.js][loadbalanceroutboundruleslistsample] | Gets all the outbound rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerOutboundRuleList.json | -| [loadBalancerProbesGetSample.js][loadbalancerprobesgetsample] | Gets load balancer probe. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerProbeGet.json | -| [loadBalancerProbesListSample.js][loadbalancerprobeslistsample] | Gets all the load balancer probes. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerProbeList.json | -| [loadBalancersCreateOrUpdateSample.js][loadbalancerscreateorupdatesample] | Creates or updates a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreate.json | -| [loadBalancersDeleteSample.js][loadbalancersdeletesample] | Deletes the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerDelete.json | -| [loadBalancersGetSample.js][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerGet.json | -| [loadBalancersListAllSample.js][loadbalancerslistallsample] | Gets all the load balancers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerListAll.json | -| [loadBalancersListInboundNatRulePortMappingsSample.js][loadbalancerslistinboundnatruleportmappingssample] | List of inbound NAT rule port mappings. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/QueryInboundNatRulePortMapping.json | -| [loadBalancersListSample.js][loadbalancerslistsample] | Gets all the load balancers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerList.json | -| [loadBalancersMigrateToIPBasedSample.js][loadbalancersmigratetoipbasedsample] | Migrate load balancer to IP Based x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/MigrateLoadBalancerToIPBased.json | -| [loadBalancersSwapPublicIPAddressesSample.js][loadbalancersswappublicipaddressessample] | Swaps VIPs between two load balancers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancersSwapPublicIpAddresses.json | -| [loadBalancersUpdateTagsSample.js][loadbalancersupdatetagssample] | Updates a load balancer tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerUpdateTags.json | -| [localNetworkGatewaysCreateOrUpdateSample.js][localnetworkgatewayscreateorupdatesample] | Creates or updates a local network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayCreate.json | -| [localNetworkGatewaysDeleteSample.js][localnetworkgatewaysdeletesample] | Deletes the specified local network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayDelete.json | -| [localNetworkGatewaysGetSample.js][localnetworkgatewaysgetsample] | Gets the specified local network gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayGet.json | -| [localNetworkGatewaysListSample.js][localnetworkgatewayslistsample] | Gets all the local network gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayList.json | -| [localNetworkGatewaysUpdateTagsSample.js][localnetworkgatewaysupdatetagssample] | Updates a local network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayUpdateTags.json | -| [managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js][managementgroupnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupPut.json | -| [managementGroupNetworkManagerConnectionsDeleteSample.js][managementgroupnetworkmanagerconnectionsdeletesample] | Delete specified pending connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json | -| [managementGroupNetworkManagerConnectionsGetSample.js][managementgroupnetworkmanagerconnectionsgetsample] | Get a specified connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupGet.json | -| [managementGroupNetworkManagerConnectionsListSample.js][managementgroupnetworkmanagerconnectionslistsample] | List all network manager connections created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupList.json | -| [natGatewaysCreateOrUpdateSample.js][natgatewayscreateorupdatesample] | Creates or updates a nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayCreateOrUpdate.json | -| [natGatewaysDeleteSample.js][natgatewaysdeletesample] | Deletes the specified nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayDelete.json | -| [natGatewaysGetSample.js][natgatewaysgetsample] | Gets the specified nat gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayGet.json | -| [natGatewaysListAllSample.js][natgatewayslistallsample] | Gets all the Nat Gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayListAll.json | -| [natGatewaysListSample.js][natgatewayslistsample] | Gets all nat gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayList.json | -| [natGatewaysUpdateTagsSample.js][natgatewaysupdatetagssample] | Updates nat gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayUpdateTags.json | -| [natRulesCreateOrUpdateSample.js][natrulescreateorupdatesample] | Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRulePut.json | -| [natRulesDeleteSample.js][natrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleDelete.json | -| [natRulesGetSample.js][natrulesgetsample] | Retrieves the details of a nat ruleGet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleGet.json | -| [natRulesListByVpnGatewaySample.js][natruleslistbyvpngatewaysample] | Retrieves all nat rules for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleList.json | -| [networkGroupsCreateOrUpdateSample.js][networkgroupscreateorupdatesample] | Creates or updates a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupPut.json | -| [networkGroupsDeleteSample.js][networkgroupsdeletesample] | Deletes a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupDelete.json | -| [networkGroupsGetSample.js][networkgroupsgetsample] | Gets the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupGet.json | -| [networkGroupsListSample.js][networkgroupslistsample] | Lists the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupList.json | -| [networkInterfaceIPConfigurationsGetSample.js][networkinterfaceipconfigurationsgetsample] | Gets the specified network interface ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceIPConfigurationGet.json | -| [networkInterfaceIPConfigurationsListSample.js][networkinterfaceipconfigurationslistsample] | Get all ip configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceIPConfigurationList.json | -| [networkInterfaceLoadBalancersListSample.js][networkinterfaceloadbalancerslistsample] | List all load balancers in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceLoadBalancerList.json | -| [networkInterfaceTapConfigurationsCreateOrUpdateSample.js][networkinterfacetapconfigurationscreateorupdatesample] | Creates or updates a Tap configuration in the specified NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationCreate.json | -| [networkInterfaceTapConfigurationsDeleteSample.js][networkinterfacetapconfigurationsdeletesample] | Deletes the specified tap configuration from the NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationDelete.json | -| [networkInterfaceTapConfigurationsGetSample.js][networkinterfacetapconfigurationsgetsample] | Get the specified tap configuration on a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationGet.json | -| [networkInterfaceTapConfigurationsListSample.js][networkinterfacetapconfigurationslistsample] | Get all Tap configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationList.json | -| [networkInterfacesCreateOrUpdateSample.js][networkinterfacescreateorupdatesample] | Creates or updates a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceCreate.json | -| [networkInterfacesDeleteSample.js][networkinterfacesdeletesample] | Deletes the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceDelete.json | -| [networkInterfacesGetCloudServiceNetworkInterfaceSample.js][networkinterfacesgetcloudservicenetworkinterfacesample] | Get the specified network interface in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceNetworkInterfaceGet.json | -| [networkInterfacesGetEffectiveRouteTableSample.js][networkinterfacesgeteffectiveroutetablesample] | Gets all route tables applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json | -| [networkInterfacesGetSample.js][networkinterfacesgetsample] | Gets information about the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceGet.json | -| [networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js][networkinterfacesgetvirtualmachinescalesetipconfigurationsample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceIpConfigGet.json | -| [networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js][networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample] | Get the specified network interface in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceGet.json | -| [networkInterfacesListAllSample.js][networkinterfaceslistallsample] | Gets all network interfaces in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceListAll.json | -| [networkInterfacesListCloudServiceNetworkInterfacesSample.js][networkinterfaceslistcloudservicenetworkinterfacessample] | Gets all network interfaces in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceNetworkInterfaceList.json | -| [networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js][networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample] | Gets information about all network interfaces in a role instance in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json | -| [networkInterfacesListEffectiveNetworkSecurityGroupsSample.js][networkinterfaceslisteffectivenetworksecuritygroupssample] | Gets all network security groups applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceEffectiveNSGList.json | -| [networkInterfacesListSample.js][networkinterfaceslistsample] | Gets all network interfaces in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js][networkinterfaceslistvirtualmachinescalesetipconfigurationssample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceIpConfigList.json | -| [networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js][networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample] | Gets all network interfaces in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js][networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample] | Gets information about all network interfaces in a virtual machine in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssVmNetworkInterfaceList.json | -| [networkInterfacesUpdateTagsSample.js][networkinterfacesupdatetagssample] | Updates a network interface tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceUpdateTags.json | -| [networkManagerCommitsPostSample.js][networkmanagercommitspostsample] | Post a Network Manager Commit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerCommitPost.json | -| [networkManagerDeploymentStatusListSample.js][networkmanagerdeploymentstatuslistsample] | Post to List of Network Manager Deployment Status. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDeploymentStatusList.json | -| [networkManagerRoutingConfigurationsCreateOrUpdateSample.js][networkmanagerroutingconfigurationscreateorupdatesample] | Creates or updates a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationPut.json | -| [networkManagerRoutingConfigurationsDeleteSample.js][networkmanagerroutingconfigurationsdeletesample] | Deletes a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationDelete.json | -| [networkManagerRoutingConfigurationsGetSample.js][networkmanagerroutingconfigurationsgetsample] | Retrieves a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationGet.json | -| [networkManagerRoutingConfigurationsListSample.js][networkmanagerroutingconfigurationslistsample] | Lists all the network manager routing configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationList.json | -| [networkManagersCreateOrUpdateSample.js][networkmanagerscreateorupdatesample] | Creates or updates a Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerPut.json | -| [networkManagersDeleteSample.js][networkmanagersdeletesample] | Deletes a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDelete.json | -| [networkManagersGetSample.js][networkmanagersgetsample] | Gets the specified Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGet.json | -| [networkManagersListBySubscriptionSample.js][networkmanagerslistbysubscriptionsample] | List all network managers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerListAll.json | -| [networkManagersListSample.js][networkmanagerslistsample] | List network managers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerList.json | -| [networkManagersPatchSample.js][networkmanagerspatchsample] | Patch NetworkManager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerPatch.json | -| [networkProfilesCreateOrUpdateSample.js][networkprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileCreateConfigOnly.json | -| [networkProfilesDeleteSample.js][networkprofilesdeletesample] | Deletes the specified network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileDelete.json | -| [networkProfilesGetSample.js][networkprofilesgetsample] | Gets the specified network profile in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileGetConfigOnly.json | -| [networkProfilesListAllSample.js][networkprofileslistallsample] | Gets all the network profiles in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileListAll.json | -| [networkProfilesListSample.js][networkprofileslistsample] | Gets all network profiles in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileList.json | -| [networkProfilesUpdateTagsSample.js][networkprofilesupdatetagssample] | Updates network profile tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileUpdateTags.json | -| [networkSecurityGroupsCreateOrUpdateSample.js][networksecuritygroupscreateorupdatesample] | Creates or updates a network security group in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupCreate.json | -| [networkSecurityGroupsDeleteSample.js][networksecuritygroupsdeletesample] | Deletes the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupDelete.json | -| [networkSecurityGroupsGetSample.js][networksecuritygroupsgetsample] | Gets the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupGet.json | -| [networkSecurityGroupsListAllSample.js][networksecuritygroupslistallsample] | Gets all network security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupListAll.json | -| [networkSecurityGroupsListSample.js][networksecuritygroupslistsample] | Gets all network security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupList.json | -| [networkSecurityGroupsUpdateTagsSample.js][networksecuritygroupsupdatetagssample] | Updates a network security group tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupUpdateTags.json | -| [networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js][networksecurityperimeteraccessrulescreateorupdatesample] | Creates or updates a network access rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRulePut.json | -| [networkSecurityPerimeterAccessRulesDeleteSample.js][networksecurityperimeteraccessrulesdeletesample] | Deletes an NSP access rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleDelete.json | -| [networkSecurityPerimeterAccessRulesGetSample.js][networksecurityperimeteraccessrulesgetsample] | Gets the specified NSP access rule by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleGet.json | -| [networkSecurityPerimeterAccessRulesListSample.js][networksecurityperimeteraccessruleslistsample] | Lists the NSP access rules in the specified NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleList.json | -| [networkSecurityPerimeterAccessRulesReconcileSample.js][networksecurityperimeteraccessrulesreconcilesample] | Reconcile NSP access rules x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleReconcile.json | -| [networkSecurityPerimeterAssociableResourceTypesListSample.js][networksecurityperimeterassociableresourcetypeslistsample] | Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PerimeterAssociableResourcesList.json | -| [networkSecurityPerimeterAssociationsCreateOrUpdateSample.js][networksecurityperimeterassociationscreateorupdatesample] | Creates or updates a NSP resource association. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationPut.json | -| [networkSecurityPerimeterAssociationsDeleteSample.js][networksecurityperimeterassociationsdeletesample] | Deletes an NSP association resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationDelete.json | -| [networkSecurityPerimeterAssociationsGetSample.js][networksecurityperimeterassociationsgetsample] | Gets the specified NSP association by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationGet.json | -| [networkSecurityPerimeterAssociationsListSample.js][networksecurityperimeterassociationslistsample] | Lists the NSP resource associations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationList.json | -| [networkSecurityPerimeterAssociationsReconcileSample.js][networksecurityperimeterassociationsreconcilesample] | Reconcile NSP association x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationReconcile.json | -| [networkSecurityPerimeterLinkReferencesDeleteSample.js][networksecurityperimeterlinkreferencesdeletesample] | Deletes an NSP LinkReference resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceDelete.json | -| [networkSecurityPerimeterLinkReferencesGetSample.js][networksecurityperimeterlinkreferencesgetsample] | Gets the specified NSP linkReference resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceGet.json | -| [networkSecurityPerimeterLinkReferencesListSample.js][networksecurityperimeterlinkreferenceslistsample] | Lists the NSP LinkReference resources in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceList.json | -| [networkSecurityPerimeterLinksCreateOrUpdateSample.js][networksecurityperimeterlinkscreateorupdatesample] | Creates or updates NSP link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkPut.json | -| [networkSecurityPerimeterLinksDeleteSample.js][networksecurityperimeterlinksdeletesample] | Deletes an NSP Link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkDelete.json | -| [networkSecurityPerimeterLinksGetSample.js][networksecurityperimeterlinksgetsample] | Gets the specified NSP link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkGet.json | -| [networkSecurityPerimeterLinksListSample.js][networksecurityperimeterlinkslistsample] | Lists the NSP Link resources in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkList.json | -| [networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js][networksecurityperimeterloggingconfigurationscreateorupdatesample] | Creates or updates NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationPut.json | -| [networkSecurityPerimeterLoggingConfigurationsDeleteSample.js][networksecurityperimeterloggingconfigurationsdeletesample] | Deletes an NSP Logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationDelete.json | -| [networkSecurityPerimeterLoggingConfigurationsGetSample.js][networksecurityperimeterloggingconfigurationsgetsample] | Gets the NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationGet.json | -| [networkSecurityPerimeterLoggingConfigurationsListSample.js][networksecurityperimeterloggingconfigurationslistsample] | Lists the NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationList.json | -| [networkSecurityPerimeterOperationStatusesGetSample.js][networksecurityperimeteroperationstatusesgetsample] | Gets the operation status for the given operation id. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspOperationStatusGet.json | -| [networkSecurityPerimeterProfilesCreateOrUpdateSample.js][networksecurityperimeterprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfilePut.json | -| [networkSecurityPerimeterProfilesDeleteSample.js][networksecurityperimeterprofilesdeletesample] | Deletes an NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileDelete.json | -| [networkSecurityPerimeterProfilesGetSample.js][networksecurityperimeterprofilesgetsample] | Gets the specified NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileGet.json | -| [networkSecurityPerimeterProfilesListSample.js][networksecurityperimeterprofileslistsample] | Lists the NSP profiles in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileList.json | -| [networkSecurityPerimeterServiceTagsListSample.js][networksecurityperimeterservicetagslistsample] | Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspServiceTagsList.json | -| [networkSecurityPerimetersCreateOrUpdateSample.js][networksecurityperimeterscreateorupdatesample] | Creates or updates a Network Security Perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterPut.json | -| [networkSecurityPerimetersDeleteSample.js][networksecurityperimetersdeletesample] | Deletes a network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterDelete.json | -| [networkSecurityPerimetersGetSample.js][networksecurityperimetersgetsample] | Gets the specified network security perimeter by the name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterGet.json | -| [networkSecurityPerimetersListBySubscriptionSample.js][networksecurityperimeterslistbysubscriptionsample] | List all network security perimeters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterListAll.json | -| [networkSecurityPerimetersListSample.js][networksecurityperimeterslistsample] | List network security perimeters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterList.json | -| [networkSecurityPerimetersPatchSample.js][networksecurityperimeterspatchsample] | Patch Tags for a Network Security Perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterPatch.json | -| [networkVirtualApplianceConnectionsCreateOrUpdateSample.js][networkvirtualapplianceconnectionscreateorupdatesample] | Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionPut.json | -| [networkVirtualApplianceConnectionsDeleteSample.js][networkvirtualapplianceconnectionsdeletesample] | Deletes a NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionDelete.json | -| [networkVirtualApplianceConnectionsGetSample.js][networkvirtualapplianceconnectionsgetsample] | Retrieves the details of specified NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionGet.json | -| [networkVirtualApplianceConnectionsListSample.js][networkvirtualapplianceconnectionslistsample] | Lists NetworkVirtualApplianceConnections under the NVA. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionList.json | -| [networkVirtualAppliancesCreateOrUpdateSample.js][networkvirtualappliancescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetBasicPut.json | -| [networkVirtualAppliancesDeleteSample.js][networkvirtualappliancesdeletesample] | Deletes the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceDelete.json | -| [networkVirtualAppliancesGetBootDiagnosticLogsSample.js][networkvirtualappliancesgetbootdiagnosticlogssample] | Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceBootDiagnostics.json | -| [networkVirtualAppliancesGetSample.js][networkvirtualappliancesgetsample] | Gets the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceGet.json | -| [networkVirtualAppliancesListByResourceGroupSample.js][networkvirtualapplianceslistbyresourcegroupsample] | Lists all Network Virtual Appliances in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json | -| [networkVirtualAppliancesListSample.js][networkvirtualapplianceslistsample] | Gets all Network Virtual Appliances in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceListBySubscription.json | -| [networkVirtualAppliancesReimageSample.js][networkvirtualappliancesreimagesample] | Reimages one VM belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSpecificReimage.json | -| [networkVirtualAppliancesRestartSample.js][networkvirtualappliancesrestartsample] | Restarts one or more VMs belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceEmptyRestart.json | -| [networkVirtualAppliancesUpdateTagsSample.js][networkvirtualappliancesupdatetagssample] | Updates a Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceUpdateTags.json | -| [networkWatchersCheckConnectivitySample.js][networkwatcherscheckconnectivitysample] | Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectivityCheck.json | -| [networkWatchersCreateOrUpdateSample.js][networkwatcherscreateorupdatesample] | Creates or updates a network watcher in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherCreate.json | -| [networkWatchersDeleteSample.js][networkwatchersdeletesample] | Deletes the specified network watcher resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherDelete.json | -| [networkWatchersGetAzureReachabilityReportSample.js][networkwatchersgetazurereachabilityreportsample] | NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json | -| [networkWatchersGetFlowLogStatusSample.js][networkwatchersgetflowlogstatussample] | Queries status of flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogStatusQuery.json | -| [networkWatchersGetNetworkConfigurationDiagnosticSample.js][networkwatchersgetnetworkconfigurationdiagnosticsample] | Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json | -| [networkWatchersGetNextHopSample.js][networkwatchersgetnexthopsample] | Gets the next hop from the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherNextHopGet.json | -| [networkWatchersGetSample.js][networkwatchersgetsample] | Gets the specified network watcher by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherGet.json | -| [networkWatchersGetTopologySample.js][networkwatchersgettopologysample] | Gets the current network topology by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTopologyGet.json | -| [networkWatchersGetTroubleshootingResultSample.js][networkwatchersgettroubleshootingresultsample] | Get the last completed troubleshooting result on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTroubleshootResultQuery.json | -| [networkWatchersGetTroubleshootingSample.js][networkwatchersgettroubleshootingsample] | Initiate troubleshooting on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTroubleshootGet.json | -| [networkWatchersGetVMSecurityRulesSample.js][networkwatchersgetvmsecurityrulessample] | Gets the configured and effective security group rules on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherSecurityGroupViewGet.json | -| [networkWatchersListAllSample.js][networkwatcherslistallsample] | Gets all network watchers by subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherListAll.json | -| [networkWatchersListAvailableProvidersSample.js][networkwatcherslistavailableproviderssample] | NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherAvailableProvidersListGet.json | -| [networkWatchersListSample.js][networkwatcherslistsample] | Gets all network watchers by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherList.json | -| [networkWatchersSetFlowLogConfigurationSample.js][networkwatcherssetflowlogconfigurationsample] | Configures flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogConfigure.json | -| [networkWatchersUpdateTagsSample.js][networkwatchersupdatetagssample] | Updates a network watcher tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherUpdateTags.json | -| [networkWatchersVerifyIPFlowSample.js][networkwatchersverifyipflowsample] | Verify IP flow from the specified VM to a location given the currently configured NSG rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherIpFlowVerify.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available Network Rest API operations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/OperationList.json | -| [p2SVpnGatewaysCreateOrUpdateSample.js][p2svpngatewayscreateorupdatesample] | Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayPut.json | -| [p2SVpnGatewaysDeleteSample.js][p2svpngatewaysdeletesample] | Deletes a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayDelete.json | -| [p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js][p2svpngatewaysdisconnectp2svpnconnectionssample] | Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json | -| [p2SVpnGatewaysGenerateVpnProfileSample.js][p2svpngatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js][p2svpngatewaysgetp2svpnconnectionhealthdetailedsample] | Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js][p2svpngatewaysgetp2svpnconnectionhealthsample] | Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGetConnectionHealth.json | -| [p2SVpnGatewaysGetSample.js][p2svpngatewaysgetsample] | Retrieves the details of a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGet.json | -| [p2SVpnGatewaysListByResourceGroupSample.js][p2svpngatewayslistbyresourcegroupsample] | Lists all the P2SVpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayListByResourceGroup.json | -| [p2SVpnGatewaysListSample.js][p2svpngatewayslistsample] | Lists all the P2SVpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayList.json | -| [p2SVpnGatewaysResetSample.js][p2svpngatewaysresetsample] | Resets the primary of the p2s vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayReset.json | -| [p2SVpnGatewaysUpdateTagsSample.js][p2svpngatewaysupdatetagssample] | Updates virtual wan p2s vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayUpdateTags.json | -| [packetCapturesCreateSample.js][packetcapturescreatesample] | Create and start a packet capture on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureCreate.json | -| [packetCapturesDeleteSample.js][packetcapturesdeletesample] | Deletes the specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureDelete.json | -| [packetCapturesGetSample.js][packetcapturesgetsample] | Gets a packet capture session by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureGet.json | -| [packetCapturesGetStatusSample.js][packetcapturesgetstatussample] | Query the status of a running packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json | -| [packetCapturesListSample.js][packetcaptureslistsample] | Lists all packet capture sessions within the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCapturesList.json | -| [packetCapturesStopSample.js][packetcapturesstopsample] | Stops a specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureStop.json | -| [peerExpressRouteCircuitConnectionsGetSample.js][peerexpressroutecircuitconnectionsgetsample] | Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PeerExpressRouteCircuitConnectionGet.json | -| [peerExpressRouteCircuitConnectionsListSample.js][peerexpressroutecircuitconnectionslistsample] | Gets all global reach peer connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PeerExpressRouteCircuitConnectionList.json | -| [privateDnsZoneGroupsCreateOrUpdateSample.js][privatednszonegroupscreateorupdatesample] | Creates or updates a private dns zone group in the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json | -| [privateDnsZoneGroupsDeleteSample.js][privatednszonegroupsdeletesample] | Deletes the specified private dns zone group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json | -| [privateDnsZoneGroupsGetSample.js][privatednszonegroupsgetsample] | Gets the private dns zone group resource by specified private dns zone group name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupGet.json | -| [privateDnsZoneGroupsListSample.js][privatednszonegroupslistsample] | Gets all private dns zone groups in a private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupList.json | -| [privateEndpointsCreateOrUpdateSample.js][privateendpointscreateorupdatesample] | Creates or updates an private endpoint in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointCreate.json | -| [privateEndpointsDeleteSample.js][privateendpointsdeletesample] | Deletes the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDelete.json | -| [privateEndpointsGetSample.js][privateendpointsgetsample] | Gets the specified private endpoint by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointGet.json | -| [privateEndpointsListBySubscriptionSample.js][privateendpointslistbysubscriptionsample] | Gets all private endpoints in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointListAll.json | -| [privateEndpointsListSample.js][privateendpointslistsample] | Gets all private endpoints in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointList.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js][privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample] | Checks whether the subscription is visible to private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js][privatelinkservicescheckprivatelinkservicevisibilitysample] | Checks whether the subscription is visible to private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckPrivateLinkServiceVisibility.json | -| [privateLinkServicesCreateOrUpdateSample.js][privatelinkservicescreateorupdatesample] | Creates or updates an private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceCreate.json | -| [privateLinkServicesDeletePrivateEndpointConnectionSample.js][privatelinkservicesdeleteprivateendpointconnectionsample] | Delete private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json | -| [privateLinkServicesDeleteSample.js][privatelinkservicesdeletesample] | Deletes the specified private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceDelete.json | -| [privateLinkServicesGetPrivateEndpointConnectionSample.js][privatelinkservicesgetprivateendpointconnectionsample] | Get the specific private end point connection by specific private link service in the resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json | -| [privateLinkServicesGetSample.js][privatelinkservicesgetsample] | Gets the specified private link service by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js][privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js][privatelinkserviceslistautoapprovedprivatelinkservicessample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AutoApprovedPrivateLinkServicesGet.json | -| [privateLinkServicesListBySubscriptionSample.js][privatelinkserviceslistbysubscriptionsample] | Gets all private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceListAll.json | -| [privateLinkServicesListPrivateEndpointConnectionsSample.js][privatelinkserviceslistprivateendpointconnectionssample] | Gets all private end point connections for a specific private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json | -| [privateLinkServicesListSample.js][privatelinkserviceslistsample] | Gets all private link services in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceList.json | -| [privateLinkServicesUpdatePrivateEndpointConnectionSample.js][privatelinkservicesupdateprivateendpointconnectionsample] | Approve or reject private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json | -| [publicIPAddressesCreateOrUpdateSample.js][publicipaddressescreateorupdatesample] | Creates or updates a static or dynamic public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDns.json | -| [publicIPAddressesDdosProtectionStatusSample.js][publicipaddressesddosprotectionstatussample] | Gets the Ddos Protection Status of a Public IP Address x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json | -| [publicIPAddressesDeleteSample.js][publicipaddressesdeletesample] | Deletes the specified public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressDelete.json | -| [publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js][publicipaddressesdisassociatecloudservicereservedpublicipsample] | Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressDisassociateCloudServiceReservedPublicIp.json | -| [publicIPAddressesGetCloudServicePublicIpaddressSample.js][publicipaddressesgetcloudservicepublicipaddresssample] | Get the specified public IP address in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServicePublicIpGet.json | -| [publicIPAddressesGetSample.js][publicipaddressesgetsample] | Gets the specified public IP address in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGet.json | -| [publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js][publicipaddressesgetvirtualmachinescalesetpublicipaddresssample] | Get the specified public IP address in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssPublicIpGet.json | -| [publicIPAddressesListAllSample.js][publicipaddresseslistallsample] | Gets all the public IP addresses in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressListAll.json | -| [publicIPAddressesListCloudServicePublicIpaddressesSample.js][publicipaddresseslistcloudservicepublicipaddressessample] | Gets information about all public IP addresses on a cloud service level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServicePublicIpListAll.json | -| [publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js][publicipaddresseslistcloudserviceroleinstancepublicipaddressessample] | Gets information about all public IP addresses in a role instance IP configuration in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceRoleInstancePublicIpList.json | -| [publicIPAddressesListSample.js][publicipaddresseslistsample] | Gets all public IP addresses in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressList.json | -| [publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js][publicipaddresseslistvirtualmachinescalesetpublicipaddressessample] | Gets information about all public IP addresses on a virtual machine scale set level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssPublicIpListAll.json | -| [publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js][publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample] | Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssVmPublicIpList.json | -| [publicIPAddressesReserveCloudServicePublicIPAddressSample.js][publicipaddressesreservecloudservicepublicipaddresssample] | Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressReserve.json | -| [publicIPAddressesUpdateTagsSample.js][publicipaddressesupdatetagssample] | Updates public IP address tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressUpdateTags.json | -| [publicIPPrefixesCreateOrUpdateSample.js][publicipprefixescreateorupdatesample] | Creates or updates a static or dynamic public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixCreateCustomizedValues.json | -| [publicIPPrefixesDeleteSample.js][publicipprefixesdeletesample] | Deletes the specified public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixDelete.json | -| [publicIPPrefixesGetSample.js][publicipprefixesgetsample] | Gets the specified public IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixGet.json | -| [publicIPPrefixesListAllSample.js][publicipprefixeslistallsample] | Gets all the public IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixListAll.json | -| [publicIPPrefixesListSample.js][publicipprefixeslistsample] | Gets all public IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixList.json | -| [publicIPPrefixesUpdateTagsSample.js][publicipprefixesupdatetagssample] | Updates public IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixUpdateTags.json | -| [putBastionShareableLinkSample.js][putbastionshareablelinksample] | Creates a Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkCreate.json | -| [reachabilityAnalysisIntentsCreateSample.js][reachabilityanalysisintentscreatesample] | Creates Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentPut.json | -| [reachabilityAnalysisIntentsDeleteSample.js][reachabilityanalysisintentsdeletesample] | Deletes Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentDelete.json | -| [reachabilityAnalysisIntentsGetSample.js][reachabilityanalysisintentsgetsample] | Get the Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentGet.json | -| [reachabilityAnalysisIntentsListSample.js][reachabilityanalysisintentslistsample] | Gets list of Reachability Analysis Intents . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentList.json | -| [reachabilityAnalysisRunsCreateSample.js][reachabilityanalysisrunscreatesample] | Creates Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunPut.json | -| [reachabilityAnalysisRunsDeleteSample.js][reachabilityanalysisrunsdeletesample] | Deletes Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunDelete.json | -| [reachabilityAnalysisRunsGetSample.js][reachabilityanalysisrunsgetsample] | Gets Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunGet.json | -| [reachabilityAnalysisRunsListSample.js][reachabilityanalysisrunslistsample] | Gets list of Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunList.json | -| [resourceNavigationLinksListSample.js][resourcenavigationlinkslistsample] | Gets a list of resource navigation links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json | -| [routeFilterRulesCreateOrUpdateSample.js][routefilterrulescreateorupdatesample] | Creates or updates a route in the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleCreate.json | -| [routeFilterRulesDeleteSample.js][routefilterrulesdeletesample] | Deletes the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleDelete.json | -| [routeFilterRulesGetSample.js][routefilterrulesgetsample] | Gets the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleGet.json | -| [routeFilterRulesListByRouteFilterSample.js][routefilterruleslistbyroutefiltersample] | Gets all RouteFilterRules in a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleListByRouteFilter.json | -| [routeFiltersCreateOrUpdateSample.js][routefilterscreateorupdatesample] | Creates or updates a route filter in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterCreate.json | -| [routeFiltersDeleteSample.js][routefiltersdeletesample] | Deletes the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterDelete.json | -| [routeFiltersGetSample.js][routefiltersgetsample] | Gets the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterGet.json | -| [routeFiltersListByResourceGroupSample.js][routefilterslistbyresourcegroupsample] | Gets all route filters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterListByResourceGroup.json | -| [routeFiltersListSample.js][routefilterslistsample] | Gets all route filters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterList.json | -| [routeFiltersUpdateTagsSample.js][routefiltersupdatetagssample] | Updates tags of a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterUpdateTags.json | -| [routeMapsCreateOrUpdateSample.js][routemapscreateorupdatesample] | Creates a RouteMap if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapPut.json | -| [routeMapsDeleteSample.js][routemapsdeletesample] | Deletes a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapDelete.json | -| [routeMapsGetSample.js][routemapsgetsample] | Retrieves the details of a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapGet.json | -| [routeMapsListSample.js][routemapslistsample] | Retrieves the details of all RouteMaps. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapList.json | -| [routeTablesCreateOrUpdateSample.js][routetablescreateorupdatesample] | Create or updates a route table in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableCreate.json | -| [routeTablesDeleteSample.js][routetablesdeletesample] | Deletes the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableDelete.json | -| [routeTablesGetSample.js][routetablesgetsample] | Gets the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableGet.json | -| [routeTablesListAllSample.js][routetableslistallsample] | Gets all route tables in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableListAll.json | -| [routeTablesListSample.js][routetableslistsample] | Gets all route tables in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableList.json | -| [routeTablesUpdateTagsSample.js][routetablesupdatetagssample] | Updates a route table tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableUpdateTags.json | -| [routesCreateOrUpdateSample.js][routescreateorupdatesample] | Creates or updates a route in the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteCreate.json | -| [routesDeleteSample.js][routesdeletesample] | Deletes the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteDelete.json | -| [routesGetSample.js][routesgetsample] | Gets the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteGet.json | -| [routesListSample.js][routeslistsample] | Gets all routes in a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteList.json | -| [routingIntentCreateOrUpdateSample.js][routingintentcreateorupdatesample] | Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentPut.json | -| [routingIntentDeleteSample.js][routingintentdeletesample] | Deletes a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentDelete.json | -| [routingIntentGetSample.js][routingintentgetsample] | Retrieves the details of a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentGet.json | -| [routingIntentListSample.js][routingintentlistsample] | Retrieves the details of all RoutingIntent child resources of the VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentList.json | -| [routingRuleCollectionsCreateOrUpdateSample.js][routingrulecollectionscreateorupdatesample] | Creates or updates a routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json | -| [routingRuleCollectionsDeleteSample.js][routingrulecollectionsdeletesample] | Deletes an routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json | -| [routingRuleCollectionsGetSample.js][routingrulecollectionsgetsample] | Gets a network manager routing configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json | -| [routingRuleCollectionsListSample.js][routingrulecollectionslistsample] | Lists all the rule collections in a routing configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionList.json | -| [routingRulesCreateOrUpdateSample.js][routingrulescreateorupdatesample] | Creates or updates an routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRulePut.json | -| [routingRulesDeleteSample.js][routingrulesdeletesample] | Deletes a routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleDelete.json | -| [routingRulesGetSample.js][routingrulesgetsample] | Gets a network manager routing configuration routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleGet.json | -| [routingRulesListSample.js][routingruleslistsample] | List all network manager routing configuration routing rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleList.json | -| [scopeConnectionsCreateOrUpdateSample.js][scopeconnectionscreateorupdatesample] | Creates or updates scope connection from Network Manager x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionPut.json | -| [scopeConnectionsDeleteSample.js][scopeconnectionsdeletesample] | Delete the pending scope connection created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionDelete.json | -| [scopeConnectionsGetSample.js][scopeconnectionsgetsample] | Get specified scope connection created by this Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionGet.json | -| [scopeConnectionsListSample.js][scopeconnectionslistsample] | List all scope connections created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionList.json | -| [securityAdminConfigurationsCreateOrUpdateSample.js][securityadminconfigurationscreateorupdatesample] | Creates or updates a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json | -| [securityAdminConfigurationsDeleteSample.js][securityadminconfigurationsdeletesample] | Deletes a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json | -| [securityAdminConfigurationsGetSample.js][securityadminconfigurationsgetsample] | Retrieves a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json | -| [securityAdminConfigurationsListSample.js][securityadminconfigurationslistsample] | Lists all the network manager security admin configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json | -| [securityPartnerProvidersCreateOrUpdateSample.js][securitypartnerproviderscreateorupdatesample] | Creates or updates the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderPut.json | -| [securityPartnerProvidersDeleteSample.js][securitypartnerprovidersdeletesample] | Deletes the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderDelete.json | -| [securityPartnerProvidersGetSample.js][securitypartnerprovidersgetsample] | Gets the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderGet.json | -| [securityPartnerProvidersListByResourceGroupSample.js][securitypartnerproviderslistbyresourcegroupsample] | Lists all Security Partner Providers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderListByResourceGroup.json | -| [securityPartnerProvidersListSample.js][securitypartnerproviderslistsample] | Gets all the Security Partner Providers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderListBySubscription.json | -| [securityPartnerProvidersUpdateTagsSample.js][securitypartnerprovidersupdatetagssample] | Updates tags of a Security Partner Provider resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderUpdateTags.json | -| [securityRulesCreateOrUpdateSample.js][securityrulescreateorupdatesample] | Creates or updates a security rule in the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleCreate.json | -| [securityRulesDeleteSample.js][securityrulesdeletesample] | Deletes the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleDelete.json | -| [securityRulesGetSample.js][securityrulesgetsample] | Get the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleGet.json | -| [securityRulesListSample.js][securityruleslistsample] | Gets all security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleList.json | -| [securityUserConfigurationsCreateOrUpdateSample.js][securityuserconfigurationscreateorupdatesample] | Creates or updates a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json | -| [securityUserConfigurationsDeleteSample.js][securityuserconfigurationsdeletesample] | Deletes a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json | -| [securityUserConfigurationsGetSample.js][securityuserconfigurationsgetsample] | Retrieves a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json | -| [securityUserConfigurationsListSample.js][securityuserconfigurationslistsample] | Lists all the network manager security user configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationList.json | -| [securityUserRuleCollectionsCreateOrUpdateSample.js][securityuserrulecollectionscreateorupdatesample] | Creates or updates a security user rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json | -| [securityUserRuleCollectionsDeleteSample.js][securityuserrulecollectionsdeletesample] | Deletes a Security User Rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json | -| [securityUserRuleCollectionsGetSample.js][securityuserrulecollectionsgetsample] | Gets a network manager security user configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json | -| [securityUserRuleCollectionsListSample.js][securityuserrulecollectionslistsample] | Lists all the security user rule collections in a security configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json | -| [securityUserRulesCreateOrUpdateSample.js][securityuserrulescreateorupdatesample] | Creates or updates a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRulePut.json | -| [securityUserRulesDeleteSample.js][securityuserrulesdeletesample] | Deletes a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleDelete.json | -| [securityUserRulesGetSample.js][securityuserrulesgetsample] | Gets a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleGet.json | -| [securityUserRulesListSample.js][securityuserruleslistsample] | Lists all Security User Rules in a rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleList.json | -| [serviceAssociationLinksListSample.js][serviceassociationlinkslistsample] | Gets a list of service association links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json | -| [serviceEndpointPoliciesCreateOrUpdateSample.js][serviceendpointpoliciescreateorupdatesample] | Creates or updates a service Endpoint Policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyCreate.json | -| [serviceEndpointPoliciesDeleteSample.js][serviceendpointpoliciesdeletesample] | Deletes the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDelete.json | -| [serviceEndpointPoliciesGetSample.js][serviceendpointpoliciesgetsample] | Gets the specified service Endpoint Policies in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyGet.json | -| [serviceEndpointPoliciesListByResourceGroupSample.js][serviceendpointpolicieslistbyresourcegroupsample] | Gets all service endpoint Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyList.json | -| [serviceEndpointPoliciesListSample.js][serviceendpointpolicieslistsample] | Gets all the service endpoint policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyListAll.json | -| [serviceEndpointPoliciesUpdateTagsSample.js][serviceendpointpoliciesupdatetagssample] | Updates tags of a service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyUpdateTags.json | -| [serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js][serviceendpointpolicydefinitionscreateorupdatesample] | Creates or updates a service endpoint policy definition in the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionCreate.json | -| [serviceEndpointPolicyDefinitionsDeleteSample.js][serviceendpointpolicydefinitionsdeletesample] | Deletes the specified ServiceEndpoint policy definitions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json | -| [serviceEndpointPolicyDefinitionsGetSample.js][serviceendpointpolicydefinitionsgetsample] | Get the specified service endpoint policy definitions from service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionGet.json | -| [serviceEndpointPolicyDefinitionsListByResourceGroupSample.js][serviceendpointpolicydefinitionslistbyresourcegroupsample] | Gets all service endpoint policy definitions in a service end point policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionList.json | -| [serviceGatewaysCreateOrUpdateSample.js][servicegatewayscreateorupdatesample] | Creates or updates a service gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayCreate.json | -| [serviceGatewaysDeleteSample.js][servicegatewaysdeletesample] | Deletes the specified service gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayDelete.json | -| [serviceGatewaysGetAddressLocationsSample.js][servicegatewaysgetaddresslocationssample] | Get address locations in service gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGetAddressLocationsResponse.json | -| [serviceGatewaysGetSample.js][servicegatewaysgetsample] | Gets the specified service gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGet.json | -| [serviceGatewaysGetServicesSample.js][servicegatewaysgetservicessample] | Get Services in service gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGetServicesResponse.json | -| [serviceGatewaysListAllSample.js][servicegatewayslistallsample] | Gets all the service gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayListAll.json | -| [serviceGatewaysListSample.js][servicegatewayslistsample] | Gets all the service gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayList.json | -| [serviceGatewaysUpdateAddressLocationsSample.js][servicegatewaysupdateaddresslocationssample] | Creates or updates address locations within the service gateway. //@@TS-MAGIC-NEWLINE@@ The request supports both full and partial update modes at two levels: location and address. //@@TS-MAGIC-NEWLINE@@ Full update replaces all existing data. //@@TS-MAGIC-NEWLINE@@ Partial update modifies only the specified entries: //@@TS-MAGIC-NEWLINE@@ For location-level partial updates, if no address is provided, the existing address will be deleted. //@@TS-MAGIC-NEWLINE@@ For address-level partial updates, if no services are provided, the existing services will be considered for deletion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayFullUpdateAddressLocationsRequest.json | -| [serviceGatewaysUpdateServicesSample.js][servicegatewaysupdateservicessample] | Creates, updates, or deletes services within the service gateway. The request supports both full and partial update modes at the service level. //@@TS-MAGIC-NEWLINE@@ Full update replaces all existing services with the new list provided in the request. Partial update modifies only the specified services. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayUpdateServicesRequest.json | -| [serviceGatewaysUpdateTagsSample.js][servicegatewaysupdatetagssample] | Updates a service gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayUpdateTags.json | -| [serviceTagInformationListSample.js][servicetaginformationlistsample] | Gets a list of service tag information resources with pagination. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagInformationListResult.json | -| [serviceTagsListSample.js][servicetagslistsample] | Gets a list of service tag information resources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagsList.json | -| [staticCidrsCreateSample.js][staticcidrscreatesample] | Creates/Updates the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Create.json | -| [staticCidrsDeleteSample.js][staticcidrsdeletesample] | Delete the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Delete.json | -| [staticCidrsGetSample.js][staticcidrsgetsample] | Gets the specific Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Get.json | -| [staticCidrsListSample.js][staticcidrslistsample] | Gets list of Static CIDR resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_List.json | -| [staticMembersCreateOrUpdateSample.js][staticmemberscreateorupdatesample] | Creates or updates a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberPut.json | -| [staticMembersDeleteSample.js][staticmembersdeletesample] | Deletes a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberDelete.json | -| [staticMembersGetSample.js][staticmembersgetsample] | Gets the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberGet.json | -| [staticMembersListSample.js][staticmemberslistsample] | Lists the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberList.json | -| [subnetsCreateOrUpdateSample.js][subnetscreateorupdatesample] | Creates or updates a subnet in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateWithServiceGateway.json | -| [subnetsDeleteSample.js][subnetsdeletesample] | Deletes the specified subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetDelete.json | -| [subnetsGetSample.js][subnetsgetsample] | Gets the specified subnet by virtual network and resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetGet.json | -| [subnetsListSample.js][subnetslistsample] | Gets all subnets in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetList.json | -| [subnetsPrepareNetworkPoliciesSample.js][subnetspreparenetworkpoliciessample] | Prepares a subnet by applying network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetPrepareNetworkPolicies.json | -| [subnetsUnprepareNetworkPoliciesSample.js][subnetsunpreparenetworkpoliciessample] | Unprepares a subnet by removing network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetUnprepareNetworkPolicies.json | -| [subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js][subscriptionnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionPut.json | -| [subscriptionNetworkManagerConnectionsDeleteSample.js][subscriptionnetworkmanagerconnectionsdeletesample] | Delete specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json | -| [subscriptionNetworkManagerConnectionsGetSample.js][subscriptionnetworkmanagerconnectionsgetsample] | Get a specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionGet.json | -| [subscriptionNetworkManagerConnectionsListSample.js][subscriptionnetworkmanagerconnectionslistsample] | List all network manager connections created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionList.json | -| [supportedSecurityProvidersSample.js][supportedsecurityproviderssample] | Gives the supported security providers for the virtual wan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWanSupportedSecurityProviders.json | -| [usagesListSample.js][usageslistsample] | List network usages for a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/UsageList.json | -| [verifierWorkspacesCreateSample.js][verifierworkspacescreatesample] | Creates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspacePut.json | -| [verifierWorkspacesDeleteSample.js][verifierworkspacesdeletesample] | Deletes Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceDelete.json | -| [verifierWorkspacesGetSample.js][verifierworkspacesgetsample] | Gets Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceGet.json | -| [verifierWorkspacesListSample.js][verifierworkspaceslistsample] | Gets list of Verifier Workspaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceList.json | -| [verifierWorkspacesUpdateSample.js][verifierworkspacesupdatesample] | Updates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspacePatch.json | -| [vipSwapCreateSample.js][vipswapcreatesample] | Performs vip swap operation on swappable cloud services. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapPut.json | -| [vipSwapGetSample.js][vipswapgetsample] | Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapGet.json | -| [vipSwapListSample.js][vipswaplistsample] | Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapList.json | -| [virtualApplianceSitesCreateOrUpdateSample.js][virtualappliancesitescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSitePut.json | -| [virtualApplianceSitesDeleteSample.js][virtualappliancesitesdeletesample] | Deletes the specified site from a Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteDelete.json | -| [virtualApplianceSitesGetSample.js][virtualappliancesitesgetsample] | Gets the specified Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteGet.json | -| [virtualApplianceSitesListSample.js][virtualappliancesiteslistsample] | Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteList.json | -| [virtualApplianceSkusGetSample.js][virtualapplianceskusgetsample] | Retrieves a single available sku for network virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSkuGet.json | -| [virtualApplianceSkusListSample.js][virtualapplianceskuslistsample] | List all SKUs available for a virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSkuList.json | -| [virtualHubBgpConnectionCreateOrUpdateSample.js][virtualhubbgpconnectioncreateorupdatesample] | Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionPut.json | -| [virtualHubBgpConnectionDeleteSample.js][virtualhubbgpconnectiondeletesample] | Deletes a VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionDelete.json | -| [virtualHubBgpConnectionGetSample.js][virtualhubbgpconnectiongetsample] | Retrieves the details of a Virtual Hub Bgp Connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionGet.json | -| [virtualHubBgpConnectionsListAdvertisedRoutesSample.js][virtualhubbgpconnectionslistadvertisedroutessample] | Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json | -| [virtualHubBgpConnectionsListLearnedRoutesSample.js][virtualhubbgpconnectionslistlearnedroutessample] | Retrieves a list of routes the virtual hub bgp connection has learned. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeerListLearnedRoute.json | -| [virtualHubBgpConnectionsListSample.js][virtualhubbgpconnectionslistsample] | Retrieves the details of all VirtualHubBgpConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionList.json | -| [virtualHubIPConfigurationCreateOrUpdateSample.js][virtualhubipconfigurationcreateorupdatesample] | Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationPut.json | -| [virtualHubIPConfigurationDeleteSample.js][virtualhubipconfigurationdeletesample] | Deletes a VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationDelete.json | -| [virtualHubIPConfigurationGetSample.js][virtualhubipconfigurationgetsample] | Retrieves the details of a Virtual Hub Ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationGet.json | -| [virtualHubIPConfigurationListSample.js][virtualhubipconfigurationlistsample] | Retrieves the details of all VirtualHubIpConfigurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationList.json | -| [virtualHubRouteTableV2SCreateOrUpdateSample.js][virtualhubroutetablev2screateorupdatesample] | Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Put.json | -| [virtualHubRouteTableV2SDeleteSample.js][virtualhubroutetablev2sdeletesample] | Deletes a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Delete.json | -| [virtualHubRouteTableV2SGetSample.js][virtualhubroutetablev2sgetsample] | Retrieves the details of a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Get.json | -| [virtualHubRouteTableV2SListSample.js][virtualhubroutetablev2slistsample] | Retrieves the details of all VirtualHubRouteTableV2s. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2List.json | -| [virtualHubsCreateOrUpdateSample.js][virtualhubscreateorupdatesample] | Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubPut.json | -| [virtualHubsDeleteSample.js][virtualhubsdeletesample] | Deletes a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubDelete.json | -| [virtualHubsGetEffectiveVirtualHubRoutesSample.js][virtualhubsgeteffectivevirtualhubroutessample] | Gets the effective routes configured for the Virtual Hub resource or the specified resource . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EffectiveRoutesListForConnection.json | -| [virtualHubsGetInboundRoutesSample.js][virtualhubsgetinboundroutessample] | Gets the inbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetInboundRoutes.json | -| [virtualHubsGetOutboundRoutesSample.js][virtualhubsgetoutboundroutessample] | Gets the outbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetOutboundRoutes.json | -| [virtualHubsGetSample.js][virtualhubsgetsample] | Retrieves the details of a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubGet.json | -| [virtualHubsListByResourceGroupSample.js][virtualhubslistbyresourcegroupsample] | Lists all the VirtualHubs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubListByResourceGroup.json | -| [virtualHubsListSample.js][virtualhubslistsample] | Lists all the VirtualHubs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubList.json | -| [virtualHubsUpdateTagsSample.js][virtualhubsupdatetagssample] | Updates VirtualHub tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubUpdateTags.json | -| [virtualNetworkAppliancesCreateOrUpdateSample.js][virtualnetworkappliancescreateorupdatesample] | Creates or updates a virtual network appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_CreateOrUpdate.json | -| [virtualNetworkAppliancesDeleteSample.js][virtualnetworkappliancesdeletesample] | Deletes the specified virtual network appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_Delete.json | -| [virtualNetworkAppliancesGetSample.js][virtualnetworkappliancesgetsample] | Gets information about the specified virtual network appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_Get.json | -| [virtualNetworkAppliancesListAllSample.js][virtualnetworkapplianceslistallsample] | Gets all virtual network appliances in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_ListBySubscription.json | -| [virtualNetworkAppliancesListSample.js][virtualnetworkapplianceslistsample] | Gets all virtual network appliances in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_List.json | -| [virtualNetworkAppliancesUpdateTagsSample.js][virtualnetworkappliancesupdatetagssample] | Updates a virtual network appliance tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_UpdateTags.json | -| [virtualNetworkGatewayConnectionsCreateOrUpdateSample.js][virtualnetworkgatewayconnectionscreateorupdatesample] | Creates or updates a virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionCreate.json | -| [virtualNetworkGatewayConnectionsDeleteSample.js][virtualnetworkgatewayconnectionsdeletesample] | Deletes the specified virtual network Gateway connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionDelete.json | -| [virtualNetworkGatewayConnectionsGetIkeSasSample.js][virtualnetworkgatewayconnectionsgetikesassample] | Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json | -| [virtualNetworkGatewayConnectionsGetSample.js][virtualnetworkgatewayconnectionsgetsample] | Gets the specified virtual network gateway connection by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGet.json | -| [virtualNetworkGatewayConnectionsGetSharedKeySample.js][virtualnetworkgatewayconnectionsgetsharedkeysample] | The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json | -| [virtualNetworkGatewayConnectionsListSample.js][virtualnetworkgatewayconnectionslistsample] | The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionsList.json | -| [virtualNetworkGatewayConnectionsResetConnectionSample.js][virtualnetworkgatewayconnectionsresetconnectionsample] | Resets the virtual network gateway connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionReset.json | -| [virtualNetworkGatewayConnectionsResetSharedKeySample.js][virtualnetworkgatewayconnectionsresetsharedkeysample] | The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json | -| [virtualNetworkGatewayConnectionsSetSharedKeySample.js][virtualnetworkgatewayconnectionssetsharedkeysample] | The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json | -| [virtualNetworkGatewayConnectionsStartPacketCaptureSample.js][virtualnetworkgatewayconnectionsstartpacketcapturesample] | Starts packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json | -| [virtualNetworkGatewayConnectionsStopPacketCaptureSample.js][virtualnetworkgatewayconnectionsstoppacketcapturesample] | Stops packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json | -| [virtualNetworkGatewayConnectionsUpdateTagsSample.js][virtualnetworkgatewayconnectionsupdatetagssample] | Updates a virtual network gateway connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json | -| [virtualNetworkGatewayNatRulesCreateOrUpdateSample.js][virtualnetworkgatewaynatrulescreateorupdatesample] | Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRulePut.json | -| [virtualNetworkGatewayNatRulesDeleteSample.js][virtualnetworkgatewaynatrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json | -| [virtualNetworkGatewayNatRulesGetSample.js][virtualnetworkgatewaynatrulesgetsample] | Retrieves the details of a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleGet.json | -| [virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js][virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample] | Retrieves all nat rules for a particular virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleList.json | -| [virtualNetworkGatewaysCreateOrUpdateSample.js][virtualnetworkgatewayscreateorupdatesample] | Creates or updates a virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayUpdate.json | -| [virtualNetworkGatewaysDeleteSample.js][virtualnetworkgatewaysdeletesample] | Deletes the specified virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayDelete.json | -| [virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js][virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample] | Disconnect vpn connections of virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json | -| [virtualNetworkGatewaysGenerateVpnProfileSample.js][virtualnetworkgatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json | -| [virtualNetworkGatewaysGeneratevpnclientpackageSample.js][virtualnetworkgatewaysgeneratevpnclientpackagesample] | Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json | -| [virtualNetworkGatewaysGetAdvertisedRoutesSample.js][virtualnetworkgatewaysgetadvertisedroutessample] | This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json | -| [virtualNetworkGatewaysGetBgpPeerStatusSample.js][virtualnetworkgatewaysgetbgppeerstatussample] | The GetBgpPeerStatus operation retrieves the status of all BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json | -| [virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js][virtualnetworkgatewaysgetfailoveralltestdetailssample] | This operation retrieves the details of all the failover tests performed on the gateway for different peering locations x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json | -| [virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js][virtualnetworkgatewaysgetfailoversingletestdetailssample] | This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json | -| [virtualNetworkGatewaysGetLearnedRoutesSample.js][virtualnetworkgatewaysgetlearnedroutessample] | This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json | -| [virtualNetworkGatewaysGetResiliencyInformationSample.js][virtualnetworkgatewaysgetresiliencyinformationsample] | This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetResiliencyInformation.json | -| [virtualNetworkGatewaysGetRoutesInformationSample.js][virtualnetworkgatewaysgetroutesinformationsample] | This operation retrieves the route set information for an Express Route Gateway based on their resiliency x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetRoutesInformation.json | -| [virtualNetworkGatewaysGetSample.js][virtualnetworkgatewaysgetsample] | Gets the specified virtual network gateway by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGet.json | -| [virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js][virtualnetworkgatewaysgetvpnprofilepackageurlsample] | Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json | -| [virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js][virtualnetworkgatewaysgetvpnclientconnectionhealthsample] | Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json | -| [virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js][virtualnetworkgatewaysgetvpnclientipsecparameterssample] | The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysInvokeAbortMigrationSample.js][virtualnetworkgatewaysinvokeabortmigrationsample] | Trigger abort migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayAbortMigration.json | -| [virtualNetworkGatewaysInvokeCommitMigrationSample.js][virtualnetworkgatewaysinvokecommitmigrationsample] | Trigger commit migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayCommitMigration.json | -| [virtualNetworkGatewaysInvokeExecuteMigrationSample.js][virtualnetworkgatewaysinvokeexecutemigrationsample] | Trigger execute migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayExecuteMigration.json | -| [virtualNetworkGatewaysInvokePrepareMigrationSample.js][virtualnetworkgatewaysinvokepreparemigrationsample] | Trigger prepare migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayPrepareMigration.json | -| [virtualNetworkGatewaysListConnectionsSample.js][virtualnetworkgatewayslistconnectionssample] | Gets all the connections in a virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaysListConnections.json | -| [virtualNetworkGatewaysListRadiusSecretsSample.js][virtualnetworkgatewayslistradiussecretssample] | List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AllVirtualNetworkGatewayRadiusServerSecretsList.json | -| [virtualNetworkGatewaysListSample.js][virtualnetworkgatewayslistsample] | Gets all virtual network gateways by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayList.json | -| [virtualNetworkGatewaysResetSample.js][virtualnetworkgatewaysresetsample] | Resets the primary of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayReset.json | -| [virtualNetworkGatewaysResetVpnClientSharedKeySample.js][virtualnetworkgatewaysresetvpnclientsharedkeysample] | Resets the VPN client shared key of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json | -| [virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js][virtualnetworkgatewayssetvpnclientipsecparameterssample] | The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js][virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample] | This operation starts failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json | -| [virtualNetworkGatewaysStartPacketCaptureSample.js][virtualnetworkgatewaysstartpacketcapturesample] | Starts packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json | -| [virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js][virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample] | This operation stops failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json | -| [virtualNetworkGatewaysStopPacketCaptureSample.js][virtualnetworkgatewaysstoppacketcapturesample] | Stops packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json | -| [virtualNetworkGatewaysSupportedVpnDevicesSample.js][virtualnetworkgatewayssupportedvpndevicessample] | Gets a xml format representation for supported vpn devices. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json | -| [virtualNetworkGatewaysUpdateTagsSample.js][virtualnetworkgatewaysupdatetagssample] | Updates a virtual network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayUpdateTags.json | -| [virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js][virtualnetworkgatewaysvpndeviceconfigurationscriptsample] | Gets a xml format representation for vpn device configuration script. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json | -| [virtualNetworkPeeringsCreateOrUpdateSample.js][virtualnetworkpeeringscreateorupdatesample] | Creates or updates a peering in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringCreate.json | -| [virtualNetworkPeeringsDeleteSample.js][virtualnetworkpeeringsdeletesample] | Deletes the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringDelete.json | -| [virtualNetworkPeeringsGetSample.js][virtualnetworkpeeringsgetsample] | Gets the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json | -| [virtualNetworkPeeringsListSample.js][virtualnetworkpeeringslistsample] | Gets all virtual network peerings in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringList.json | -| [virtualNetworkTapsCreateOrUpdateSample.js][virtualnetworktapscreateorupdatesample] | Creates or updates a Virtual Network Tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapCreate.json | -| [virtualNetworkTapsDeleteSample.js][virtualnetworktapsdeletesample] | Deletes the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapDelete.json | -| [virtualNetworkTapsGetSample.js][virtualnetworktapsgetsample] | Gets information about the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapGet.json | -| [virtualNetworkTapsListAllSample.js][virtualnetworktapslistallsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapListAll.json | -| [virtualNetworkTapsListByResourceGroupSample.js][virtualnetworktapslistbyresourcegroupsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapList.json | -| [virtualNetworkTapsUpdateTagsSample.js][virtualnetworktapsupdatetagssample] | Updates an VirtualNetworkTap tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapUpdateTags.json | -| [virtualNetworksCheckIPAddressAvailabilitySample.js][virtualnetworkscheckipaddressavailabilitysample] | Checks whether a private IP address is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json | -| [virtualNetworksCreateOrUpdateSample.js][virtualnetworkscreateorupdatesample] | Creates or updates a virtual network in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreate.json | -| [virtualNetworksDeleteSample.js][virtualnetworksdeletesample] | Deletes the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkDelete.json | -| [virtualNetworksGetSample.js][virtualnetworksgetsample] | Gets the specified virtual network by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGet.json | -| [virtualNetworksListAllSample.js][virtualnetworkslistallsample] | Gets all virtual networks in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkListAll.json | -| [virtualNetworksListDdosProtectionStatusSample.js][virtualnetworkslistddosprotectionstatussample] | Gets the Ddos Protection Status of all IP Addresses under the Virtual Network x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json | -| [virtualNetworksListSample.js][virtualnetworkslistsample] | Gets all virtual networks in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkList.json | -| [virtualNetworksListUsageSample.js][virtualnetworkslistusagesample] | Lists usage stats. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkListUsage.json | -| [virtualNetworksUpdateTagsSample.js][virtualnetworksupdatetagssample] | Updates a virtual network tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkUpdateTags.json | -| [virtualRouterPeeringsCreateOrUpdateSample.js][virtualrouterpeeringscreateorupdatesample] | Creates or updates the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringPut.json | -| [virtualRouterPeeringsDeleteSample.js][virtualrouterpeeringsdeletesample] | Deletes the specified peering from a Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringDelete.json | -| [virtualRouterPeeringsGetSample.js][virtualrouterpeeringsgetsample] | Gets the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringGet.json | -| [virtualRouterPeeringsListSample.js][virtualrouterpeeringslistsample] | Lists all Virtual Router Peerings in a Virtual Router resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringList.json | -| [virtualRoutersCreateOrUpdateSample.js][virtualrouterscreateorupdatesample] | Creates or updates the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPut.json | -| [virtualRoutersDeleteSample.js][virtualroutersdeletesample] | Deletes the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterDelete.json | -| [virtualRoutersGetSample.js][virtualroutersgetsample] | Gets the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterGet.json | -| [virtualRoutersListByResourceGroupSample.js][virtualrouterslistbyresourcegroupsample] | Lists all Virtual Routers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterListByResourceGroup.json | -| [virtualRoutersListSample.js][virtualrouterslistsample] | Gets all the Virtual Routers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterListBySubscription.json | -| [virtualWansCreateOrUpdateSample.js][virtualwanscreateorupdatesample] | Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANPut.json | -| [virtualWansDeleteSample.js][virtualwansdeletesample] | Deletes a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANDelete.json | -| [virtualWansGetSample.js][virtualwansgetsample] | Retrieves the details of a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANGet.json | -| [virtualWansListByResourceGroupSample.js][virtualwanslistbyresourcegroupsample] | Lists all the VirtualWANs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANListByResourceGroup.json | -| [virtualWansListSample.js][virtualwanslistsample] | Lists all the VirtualWANs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANList.json | -| [virtualWansUpdateTagsSample.js][virtualwansupdatetagssample] | Updates a VirtualWAN tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANUpdateTags.json | -| [vpnConnectionsCreateOrUpdateSample.js][vpnconnectionscreateorupdatesample] | Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionPut.json | -| [vpnConnectionsDeleteSample.js][vpnconnectionsdeletesample] | Deletes a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionDelete.json | -| [vpnConnectionsGetSample.js][vpnconnectionsgetsample] | Retrieves the details of a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionGet.json | -| [vpnConnectionsListByVpnGatewaySample.js][vpnconnectionslistbyvpngatewaysample] | Retrieves all vpn connections for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionList.json | -| [vpnConnectionsStartPacketCaptureSample.js][vpnconnectionsstartpacketcapturesample] | Starts packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json | -| [vpnConnectionsStopPacketCaptureSample.js][vpnconnectionsstoppacketcapturesample] | Stops packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStopPacketCapture.json | -| [vpnGatewaysCreateOrUpdateSample.js][vpngatewayscreateorupdatesample] | Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayPut.json | -| [vpnGatewaysDeleteSample.js][vpngatewaysdeletesample] | Deletes a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayDelete.json | -| [vpnGatewaysGetSample.js][vpngatewaysgetsample] | Retrieves the details of a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayGet.json | -| [vpnGatewaysListByResourceGroupSample.js][vpngatewayslistbyresourcegroupsample] | Lists all the VpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayListByResourceGroup.json | -| [vpnGatewaysListSample.js][vpngatewayslistsample] | Lists all the VpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayList.json | -| [vpnGatewaysResetSample.js][vpngatewaysresetsample] | Resets the primary of the vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayReset.json | -| [vpnGatewaysStartPacketCaptureSample.js][vpngatewaysstartpacketcapturesample] | Starts packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json | -| [vpnGatewaysStopPacketCaptureSample.js][vpngatewaysstoppacketcapturesample] | Stops packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStopPacketCapture.json | -| [vpnGatewaysUpdateTagsSample.js][vpngatewaysupdatetagssample] | Updates virtual wan vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayUpdateTags.json | -| [vpnLinkConnectionsGetAllSharedKeysSample.js][vpnlinkconnectionsgetallsharedkeyssample] | Lists all shared keys of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json | -| [vpnLinkConnectionsGetDefaultSharedKeySample.js][vpnlinkconnectionsgetdefaultsharedkeysample] | Gets the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json | -| [vpnLinkConnectionsGetIkeSasSample.js][vpnlinkconnectionsgetikesassample] | Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json | -| [vpnLinkConnectionsListByVpnConnectionSample.js][vpnlinkconnectionslistbyvpnconnectionsample] | Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionList.json | -| [vpnLinkConnectionsListDefaultSharedKeySample.js][vpnlinkconnectionslistdefaultsharedkeysample] | Gets the value of the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json | -| [vpnLinkConnectionsResetConnectionSample.js][vpnlinkconnectionsresetconnectionsample] | Resets the VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionReset.json | -| [vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js][vpnlinkconnectionssetorinitdefaultsharedkeysample] | Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json | -| [vpnServerConfigurationsAssociatedWithVirtualWanListSample.js][vpnserverconfigurationsassociatedwithvirtualwanlistsample] | Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetVirtualWanVpnServerConfigurations.json | -| [vpnServerConfigurationsCreateOrUpdateSample.js][vpnserverconfigurationscreateorupdatesample] | Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationPut.json | -| [vpnServerConfigurationsDeleteSample.js][vpnserverconfigurationsdeletesample] | Deletes a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationDelete.json | -| [vpnServerConfigurationsGetSample.js][vpnserverconfigurationsgetsample] | Retrieves the details of a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationGet.json | -| [vpnServerConfigurationsListByResourceGroupSample.js][vpnserverconfigurationslistbyresourcegroupsample] | Lists all the vpnServerConfigurations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationListByResourceGroup.json | -| [vpnServerConfigurationsListRadiusSecretsSample.js][vpnserverconfigurationslistradiussecretssample] | List all Radius servers with respective radius secrets from VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AllVpnServerConfigurationRadiusServerSecretsList.json | -| [vpnServerConfigurationsListSample.js][vpnserverconfigurationslistsample] | Lists all the VpnServerConfigurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationList.json | -| [vpnServerConfigurationsUpdateTagsSample.js][vpnserverconfigurationsupdatetagssample] | Updates VpnServerConfiguration tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationUpdateTags.json | -| [vpnSiteLinkConnectionsGetSample.js][vpnsitelinkconnectionsgetsample] | Retrieves the details of a vpn site link connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionGet.json | -| [vpnSiteLinksGetSample.js][vpnsitelinksgetsample] | Retrieves the details of a VPN site link. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkGet.json | -| [vpnSiteLinksListByVpnSiteSample.js][vpnsitelinkslistbyvpnsitesample] | Lists all the vpnSiteLinks in a resource group for a vpn site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkListByVpnSite.json | -| [vpnSitesConfigurationDownloadSample.js][vpnsitesconfigurationdownloadsample] | Gives the sas-url to download the configurations for vpn-sites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSitesConfigurationDownload.json | -| [vpnSitesCreateOrUpdateSample.js][vpnsitescreateorupdatesample] | Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSitePut.json | -| [vpnSitesDeleteSample.js][vpnsitesdeletesample] | Deletes a VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteDelete.json | -| [vpnSitesGetSample.js][vpnsitesgetsample] | Retrieves the details of a VPN site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteGet.json | -| [vpnSitesListByResourceGroupSample.js][vpnsiteslistbyresourcegroupsample] | Lists all the vpnSites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteListByResourceGroup.json | -| [vpnSitesListSample.js][vpnsiteslistsample] | Lists all the VpnSites in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteList.json | -| [vpnSitesUpdateTagsSample.js][vpnsitesupdatetagssample] | Updates VpnSite tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteUpdateTags.json | -| [webApplicationFirewallPoliciesCreateOrUpdateSample.js][webapplicationfirewallpoliciescreateorupdatesample] | Creates or update policy with specified rule set name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyCreateOrUpdate.json | -| [webApplicationFirewallPoliciesDeleteSample.js][webapplicationfirewallpoliciesdeletesample] | Deletes Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyDelete.json | -| [webApplicationFirewallPoliciesGetSample.js][webapplicationfirewallpoliciesgetsample] | Retrieve protection policy with specified name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyGet.json | -| [webApplicationFirewallPoliciesListAllSample.js][webapplicationfirewallpolicieslistallsample] | Gets all the WAF policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafListAllPolicies.json | -| [webApplicationFirewallPoliciesListSample.js][webapplicationfirewallpolicieslistsample] | Lists all of the protection policies within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafListPolicies.json | -| [webCategoriesGetSample.js][webcategoriesgetsample] | Gets the specified Azure Web Category. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureWebCategoryGet.json | -| [webCategoriesListBySubscriptionSample.js][webcategorieslistbysubscriptionsample] | Gets all the Azure Web Categories in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureWebCategoriesListBySubscription.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node adminRuleCollectionsCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the required environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env NETWORK_SUBSCRIPTION_ID="" NETWORK_RESOURCE_GROUP="" node adminRuleCollectionsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[adminrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsCreateOrUpdateSample.js -[adminrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsDeleteSample.js -[adminrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsGetSample.js -[adminrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsListSample.js -[adminrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/adminRulesCreateOrUpdateSample.js -[adminrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/adminRulesDeleteSample.js -[adminrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/adminRulesGetSample.js -[adminruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/adminRulesListSample.js -[applicationgatewayprivateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js -[applicationgatewayprivateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js -[applicationgatewayprivateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js -[applicationgatewayprivateendpointconnectionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js -[applicationgatewayprivatelinkresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateLinkResourcesListSample.js -[applicationgatewaywafdynamicmanifestsdefaultgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js -[applicationgatewaywafdynamicmanifestsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewayWafDynamicManifestsGetSample.js -[applicationgatewaysbackendhealthondemandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysBackendHealthOnDemandSample.js -[applicationgatewaysbackendhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysBackendHealthSample.js -[applicationgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysCreateOrUpdateSample.js -[applicationgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysDeleteSample.js -[applicationgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysGetSample.js -[applicationgatewaysgetsslpredefinedpolicysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysGetSslPredefinedPolicySample.js -[applicationgatewayslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAllSample.js -[applicationgatewayslistavailablerequestheaderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableRequestHeadersSample.js -[applicationgatewayslistavailableresponseheaderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableResponseHeadersSample.js -[applicationgatewayslistavailableservervariablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableServerVariablesSample.js -[applicationgatewayslistavailablessloptionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableSslOptionsSample.js -[applicationgatewayslistavailablesslpredefinedpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js -[applicationgatewayslistavailablewafrulesetssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js -[applicationgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListSample.js -[applicationgatewaysstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysStartSample.js -[applicationgatewaysstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysStopSample.js -[applicationgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysUpdateTagsSample.js -[applicationsecuritygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsCreateOrUpdateSample.js -[applicationsecuritygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsDeleteSample.js -[applicationsecuritygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsGetSample.js -[applicationsecuritygroupslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsListAllSample.js -[applicationsecuritygroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsListSample.js -[applicationsecuritygroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsUpdateTagsSample.js -[availabledelegationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/availableDelegationsListSample.js -[availableendpointserviceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/availableEndpointServicesListSample.js -[availableprivateendpointtypeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js -[availableprivateendpointtypeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/availablePrivateEndpointTypesListSample.js -[availableresourcegroupdelegationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/availableResourceGroupDelegationsListSample.js -[availableservicealiaseslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/availableServiceAliasesListByResourceGroupSample.js -[availableservicealiaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/availableServiceAliasesListSample.js -[azurefirewallfqdntagslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/azureFirewallFqdnTagsListAllSample.js -[azurefirewallscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/azureFirewallsCreateOrUpdateSample.js -[azurefirewallsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/azureFirewallsDeleteSample.js -[azurefirewallsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/azureFirewallsGetSample.js -[azurefirewallslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListAllSample.js -[azurefirewallslistlearnedprefixessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListLearnedPrefixesSample.js -[azurefirewallslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListSample.js -[azurefirewallspacketcaptureoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/azureFirewallsPacketCaptureOperationSample.js -[azurefirewallspacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/azureFirewallsPacketCaptureSample.js -[azurefirewallsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/azureFirewallsUpdateTagsSample.js -[bastionhostscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/bastionHostsCreateOrUpdateSample.js -[bastionhostsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/bastionHostsDeleteSample.js -[bastionhostsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/bastionHostsGetSample.js -[bastionhostslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/bastionHostsListByResourceGroupSample.js -[bastionhostslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/bastionHostsListSample.js -[bastionhostsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/bastionHostsUpdateTagsSample.js -[bgpservicecommunitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/bgpServiceCommunitiesListSample.js -[checkdnsnameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/checkDnsNameAvailabilitySample.js -[configurationpolicygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsCreateOrUpdateSample.js -[configurationpolicygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsDeleteSample.js -[configurationpolicygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsGetSample.js -[configurationpolicygroupslistbyvpnserverconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js -[connectionmonitorscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsCreateOrUpdateSample.js -[connectionmonitorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsDeleteSample.js -[connectionmonitorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsGetSample.js -[connectionmonitorslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsListSample.js -[connectionmonitorsstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsStopSample.js -[connectionmonitorsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsUpdateTagsSample.js -[connectivityconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsCreateOrUpdateSample.js -[connectivityconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsDeleteSample.js -[connectivityconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsGetSample.js -[connectivityconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsListSample.js -[customipprefixescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesCreateOrUpdateSample.js -[customipprefixesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesDeleteSample.js -[customipprefixesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesGetSample.js -[customipprefixeslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesListAllSample.js -[customipprefixeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesListSample.js -[customipprefixesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesUpdateTagsSample.js -[ddoscustompoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesCreateOrUpdateSample.js -[ddoscustompoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesDeleteSample.js -[ddoscustompoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesGetSample.js -[ddoscustompoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesUpdateTagsSample.js -[ddosprotectionplanscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansCreateOrUpdateSample.js -[ddosprotectionplansdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansDeleteSample.js -[ddosprotectionplansgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansGetSample.js -[ddosprotectionplanslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansListByResourceGroupSample.js -[ddosprotectionplanslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansListSample.js -[ddosprotectionplansupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansUpdateTagsSample.js -[defaultsecurityrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/defaultSecurityRulesGetSample.js -[defaultsecurityruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/defaultSecurityRulesListSample.js -[deletebastionshareablelinkbytokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/deleteBastionShareableLinkByTokenSample.js -[deletebastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/deleteBastionShareableLinkSample.js -[disconnectactivesessionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/disconnectActiveSessionsSample.js -[dscpconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationCreateOrUpdateSample.js -[dscpconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationDeleteSample.js -[dscpconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationGetSample.js -[dscpconfigurationlistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationListAllSample.js -[dscpconfigurationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationListSample.js -[expressroutecircuitauthorizationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js -[expressroutecircuitauthorizationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsDeleteSample.js -[expressroutecircuitauthorizationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsGetSample.js -[expressroutecircuitauthorizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsListSample.js -[expressroutecircuitconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js -[expressroutecircuitconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsDeleteSample.js -[expressroutecircuitconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsGetSample.js -[expressroutecircuitconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsListSample.js -[expressroutecircuitpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js -[expressroutecircuitpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsDeleteSample.js -[expressroutecircuitpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsGetSample.js -[expressroutecircuitpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsListSample.js -[expressroutecircuitscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsCreateOrUpdateSample.js -[expressroutecircuitsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsDeleteSample.js -[expressroutecircuitsgetpeeringstatssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetPeeringStatsSample.js -[expressroutecircuitsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetSample.js -[expressroutecircuitsgetstatssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetStatsSample.js -[expressroutecircuitslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListAllSample.js -[expressroutecircuitslistarptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListArpTableSample.js -[expressroutecircuitslistroutestablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListRoutesTableSample.js -[expressroutecircuitslistroutestablesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListRoutesTableSummarySample.js -[expressroutecircuitslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListSample.js -[expressroutecircuitsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsUpdateTagsSample.js -[expressrouteconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsCreateOrUpdateSample.js -[expressrouteconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsDeleteSample.js -[expressrouteconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsGetSample.js -[expressrouteconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsListSample.js -[expressroutecrossconnectionpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js -[expressroutecrossconnectionpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js -[expressroutecrossconnectionpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsGetSample.js -[expressroutecrossconnectionpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsListSample.js -[expressroutecrossconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js -[expressroutecrossconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsGetSample.js -[expressroutecrossconnectionslistarptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListArpTableSample.js -[expressroutecrossconnectionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js -[expressroutecrossconnectionslistroutestablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListRoutesTableSample.js -[expressroutecrossconnectionslistroutestablesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js -[expressroutecrossconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListSample.js -[expressroutecrossconnectionsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsUpdateTagsSample.js -[expressroutegatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysCreateOrUpdateSample.js -[expressroutegatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysDeleteSample.js -[expressroutegatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysGetSample.js -[expressroutegatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysListByResourceGroupSample.js -[expressroutegatewayslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysListBySubscriptionSample.js -[expressroutegatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysUpdateTagsSample.js -[expressroutelinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteLinksGetSample.js -[expressroutelinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteLinksListSample.js -[expressrouteportauthorizationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js -[expressrouteportauthorizationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsDeleteSample.js -[expressrouteportauthorizationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsGetSample.js -[expressrouteportauthorizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsListSample.js -[expressrouteportscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsCreateOrUpdateSample.js -[expressrouteportsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsDeleteSample.js -[expressrouteportsgenerateloasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsGenerateLoaSample.js -[expressrouteportsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsGetSample.js -[expressrouteportslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsListByResourceGroupSample.js -[expressrouteportslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsListSample.js -[expressrouteportslocationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsLocationsGetSample.js -[expressrouteportslocationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsLocationsListSample.js -[expressrouteportsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsUpdateTagsSample.js -[expressrouteproviderportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteProviderPortSample.js -[expressrouteproviderportslocationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteProviderPortsLocationListSample.js -[expressrouteserviceproviderslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/expressRouteServiceProvidersListSample.js -[firewallpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesCreateOrUpdateSample.js -[firewallpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesDeleteSample.js -[firewallpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesGetSample.js -[firewallpolicieslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesListAllSample.js -[firewallpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesListSample.js -[firewallpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesUpdateTagsSample.js -[firewallpolicydeploymentsdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDeploymentsDeploySample.js -[firewallpolicydraftscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsCreateOrUpdateSample.js -[firewallpolicydraftsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsDeleteSample.js -[firewallpolicydraftsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsGetSample.js -[firewallpolicyidpssignaturesfiltervalueslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js -[firewallpolicyidpssignatureslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesListSample.js -[firewallpolicyidpssignaturesoverridesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js -[firewallpolicyidpssignaturesoverrideslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js -[firewallpolicyidpssignaturesoverridespatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js -[firewallpolicyidpssignaturesoverridesputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js -[firewallpolicyrulecollectiongroupdraftscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js -[firewallpolicyrulecollectiongroupdraftsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js -[firewallpolicyrulecollectiongroupdraftsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js -[firewallpolicyrulecollectiongroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js -[firewallpolicyrulecollectiongroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js -[firewallpolicyrulecollectiongroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsGetSample.js -[firewallpolicyrulecollectiongroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsListSample.js -[flowlogscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/flowLogsCreateOrUpdateSample.js -[flowlogsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/flowLogsDeleteSample.js -[flowlogsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/flowLogsGetSample.js -[flowlogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/flowLogsListSample.js -[flowlogsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/flowLogsUpdateTagsSample.js -[generatevirtualwanvpnserverconfigurationvpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js -[getactivesessionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/getActiveSessionsSample.js -[getbastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/getBastionShareableLinkSample.js -[hubroutetablescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesCreateOrUpdateSample.js -[hubroutetablesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesDeleteSample.js -[hubroutetablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesGetSample.js -[hubroutetableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesListSample.js -[hubvirtualnetworkconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js -[hubvirtualnetworkconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsDeleteSample.js -[hubvirtualnetworkconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsGetSample.js -[hubvirtualnetworkconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsListSample.js -[inboundnatrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesCreateOrUpdateSample.js -[inboundnatrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesDeleteSample.js -[inboundnatrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesGetSample.js -[inboundnatruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesListSample.js -[inboundsecurityrulecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/inboundSecurityRuleCreateOrUpdateSample.js -[inboundsecurityrulegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/inboundSecurityRuleGetSample.js -[ipallocationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipAllocationsCreateOrUpdateSample.js -[ipallocationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipAllocationsDeleteSample.js -[ipallocationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipAllocationsGetSample.js -[ipallocationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipAllocationsListByResourceGroupSample.js -[ipallocationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipAllocationsListSample.js -[ipallocationsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipAllocationsUpdateTagsSample.js -[ipgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipGroupsCreateOrUpdateSample.js -[ipgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipGroupsDeleteSample.js -[ipgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipGroupsGetSample.js -[ipgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipGroupsListByResourceGroupSample.js -[ipgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipGroupsListSample.js -[ipgroupsupdategroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipGroupsUpdateGroupsSample.js -[ipampoolscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipamPoolsCreateSample.js -[ipampoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipamPoolsDeleteSample.js -[ipampoolsgetpoolusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipamPoolsGetPoolUsageSample.js -[ipampoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipamPoolsGetSample.js -[ipampoolslistassociatedresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipamPoolsListAssociatedResourcesSample.js -[ipampoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipamPoolsListSample.js -[ipampoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/ipamPoolsUpdateSample.js -[listactiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/listActiveConnectivityConfigurationsSample.js -[listactivesecurityadminrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/listActiveSecurityAdminRulesSample.js -[listnetworkmanagereffectiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js -[listnetworkmanagereffectivesecurityadminrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js -[loadbalancerbackendaddresspoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js -[loadbalancerbackendaddresspoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsDeleteSample.js -[loadbalancerbackendaddresspoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsGetSample.js -[loadbalancerbackendaddresspoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsListSample.js -[loadbalancerfrontendipconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerFrontendIPConfigurationsGetSample.js -[loadbalancerfrontendipconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerFrontendIPConfigurationsListSample.js -[loadbalancerloadbalancingrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesGetSample.js -[loadbalancerloadbalancingruleshealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesHealthSample.js -[loadbalancerloadbalancingruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesListSample.js -[loadbalancernetworkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerNetworkInterfacesListSample.js -[loadbalanceroutboundrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerOutboundRulesGetSample.js -[loadbalanceroutboundruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerOutboundRulesListSample.js -[loadbalancerprobesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerProbesGetSample.js -[loadbalancerprobeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancerProbesListSample.js -[loadbalancerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancersCreateOrUpdateSample.js -[loadbalancersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancersDeleteSample.js -[loadbalancersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancersGetSample.js -[loadbalancerslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancersListAllSample.js -[loadbalancerslistinboundnatruleportmappingssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancersListInboundNatRulePortMappingsSample.js -[loadbalancerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancersListSample.js -[loadbalancersmigratetoipbasedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancersMigrateToIPBasedSample.js -[loadbalancersswappublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancersSwapPublicIPAddressesSample.js -[loadbalancersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/loadBalancersUpdateTagsSample.js -[localnetworkgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysCreateOrUpdateSample.js -[localnetworkgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysDeleteSample.js -[localnetworkgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysGetSample.js -[localnetworkgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysListSample.js -[localnetworkgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysUpdateTagsSample.js -[managementgroupnetworkmanagerconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js -[managementgroupnetworkmanagerconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js -[managementgroupnetworkmanagerconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsGetSample.js -[managementgroupnetworkmanagerconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsListSample.js -[natgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/natGatewaysCreateOrUpdateSample.js -[natgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/natGatewaysDeleteSample.js -[natgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/natGatewaysGetSample.js -[natgatewayslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/natGatewaysListAllSample.js -[natgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/natGatewaysListSample.js -[natgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/natGatewaysUpdateTagsSample.js -[natrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/natRulesCreateOrUpdateSample.js -[natrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/natRulesDeleteSample.js -[natrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/natRulesGetSample.js -[natruleslistbyvpngatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/natRulesListByVpnGatewaySample.js -[networkgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkGroupsCreateOrUpdateSample.js -[networkgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkGroupsDeleteSample.js -[networkgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkGroupsGetSample.js -[networkgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkGroupsListSample.js -[networkinterfaceipconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfaceIPConfigurationsGetSample.js -[networkinterfaceipconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfaceIPConfigurationsListSample.js -[networkinterfaceloadbalancerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfaceLoadBalancersListSample.js -[networkinterfacetapconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js -[networkinterfacetapconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsDeleteSample.js -[networkinterfacetapconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsGetSample.js -[networkinterfacetapconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsListSample.js -[networkinterfacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesCreateOrUpdateSample.js -[networkinterfacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesDeleteSample.js -[networkinterfacesgetcloudservicenetworkinterfacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js -[networkinterfacesgeteffectiveroutetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetEffectiveRouteTableSample.js -[networkinterfacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetSample.js -[networkinterfacesgetvirtualmachinescalesetipconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js -[networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js -[networkinterfaceslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListAllSample.js -[networkinterfaceslistcloudservicenetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js -[networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js -[networkinterfaceslisteffectivenetworksecuritygroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js -[networkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListSample.js -[networkinterfaceslistvirtualmachinescalesetipconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js -[networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js -[networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js -[networkinterfacesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkInterfacesUpdateTagsSample.js -[networkmanagercommitspostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagerCommitsPostSample.js -[networkmanagerdeploymentstatuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagerDeploymentStatusListSample.js -[networkmanagerroutingconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js -[networkmanagerroutingconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsDeleteSample.js -[networkmanagerroutingconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsGetSample.js -[networkmanagerroutingconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsListSample.js -[networkmanagerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagersCreateOrUpdateSample.js -[networkmanagersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagersDeleteSample.js -[networkmanagersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagersGetSample.js -[networkmanagerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagersListBySubscriptionSample.js -[networkmanagerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagersListSample.js -[networkmanagerspatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkManagersPatchSample.js -[networkprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkProfilesCreateOrUpdateSample.js -[networkprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkProfilesDeleteSample.js -[networkprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkProfilesGetSample.js -[networkprofileslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkProfilesListAllSample.js -[networkprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkProfilesListSample.js -[networkprofilesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkProfilesUpdateTagsSample.js -[networksecuritygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsCreateOrUpdateSample.js -[networksecuritygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsDeleteSample.js -[networksecuritygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsGetSample.js -[networksecuritygroupslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsListAllSample.js -[networksecuritygroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsListSample.js -[networksecuritygroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsUpdateTagsSample.js -[networksecurityperimeteraccessrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js -[networksecurityperimeteraccessrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesDeleteSample.js -[networksecurityperimeteraccessrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesGetSample.js -[networksecurityperimeteraccessruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesListSample.js -[networksecurityperimeteraccessrulesreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesReconcileSample.js -[networksecurityperimeterassociableresourcetypeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociableResourceTypesListSample.js -[networksecurityperimeterassociationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsCreateOrUpdateSample.js -[networksecurityperimeterassociationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsDeleteSample.js -[networksecurityperimeterassociationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsGetSample.js -[networksecurityperimeterassociationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsListSample.js -[networksecurityperimeterassociationsreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsReconcileSample.js -[networksecurityperimeterlinkreferencesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesDeleteSample.js -[networksecurityperimeterlinkreferencesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesGetSample.js -[networksecurityperimeterlinkreferenceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesListSample.js -[networksecurityperimeterlinkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksCreateOrUpdateSample.js -[networksecurityperimeterlinksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksDeleteSample.js -[networksecurityperimeterlinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksGetSample.js -[networksecurityperimeterlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksListSample.js -[networksecurityperimeterloggingconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js -[networksecurityperimeterloggingconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsDeleteSample.js -[networksecurityperimeterloggingconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsGetSample.js -[networksecurityperimeterloggingconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsListSample.js -[networksecurityperimeteroperationstatusesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterOperationStatusesGetSample.js -[networksecurityperimeterprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesCreateOrUpdateSample.js -[networksecurityperimeterprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesDeleteSample.js -[networksecurityperimeterprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesGetSample.js -[networksecurityperimeterprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesListSample.js -[networksecurityperimeterservicetagslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterServiceTagsListSample.js -[networksecurityperimeterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersCreateOrUpdateSample.js -[networksecurityperimetersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersDeleteSample.js -[networksecurityperimetersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersGetSample.js -[networksecurityperimeterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersListBySubscriptionSample.js -[networksecurityperimeterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersListSample.js -[networksecurityperimeterspatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersPatchSample.js -[networkvirtualapplianceconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js -[networkvirtualapplianceconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsDeleteSample.js -[networkvirtualapplianceconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsGetSample.js -[networkvirtualapplianceconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsListSample.js -[networkvirtualappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesCreateOrUpdateSample.js -[networkvirtualappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesDeleteSample.js -[networkvirtualappliancesgetbootdiagnosticlogssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesGetBootDiagnosticLogsSample.js -[networkvirtualappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesGetSample.js -[networkvirtualapplianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesListByResourceGroupSample.js -[networkvirtualapplianceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesListSample.js -[networkvirtualappliancesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesReimageSample.js -[networkvirtualappliancesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesRestartSample.js -[networkvirtualappliancesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesUpdateTagsSample.js -[networkwatcherscheckconnectivitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersCheckConnectivitySample.js -[networkwatcherscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersCreateOrUpdateSample.js -[networkwatchersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersDeleteSample.js -[networkwatchersgetazurereachabilityreportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetAzureReachabilityReportSample.js -[networkwatchersgetflowlogstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetFlowLogStatusSample.js -[networkwatchersgetnetworkconfigurationdiagnosticsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js -[networkwatchersgetnexthopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetNextHopSample.js -[networkwatchersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetSample.js -[networkwatchersgettopologysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTopologySample.js -[networkwatchersgettroubleshootingresultsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTroubleshootingResultSample.js -[networkwatchersgettroubleshootingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTroubleshootingSample.js -[networkwatchersgetvmsecurityrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetVMSecurityRulesSample.js -[networkwatcherslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersListAllSample.js -[networkwatcherslistavailableproviderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersListAvailableProvidersSample.js -[networkwatcherslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersListSample.js -[networkwatcherssetflowlogconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersSetFlowLogConfigurationSample.js -[networkwatchersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersUpdateTagsSample.js -[networkwatchersverifyipflowsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/networkWatchersVerifyIPFlowSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/operationsListSample.js -[p2svpngatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysCreateOrUpdateSample.js -[p2svpngatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysDeleteSample.js -[p2svpngatewaysdisconnectp2svpnconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js -[p2svpngatewaysgeneratevpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js -[p2svpngatewaysgetp2svpnconnectionhealthdetailedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js -[p2svpngatewaysgetp2svpnconnectionhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js -[p2svpngatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetSample.js -[p2svpngatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysListByResourceGroupSample.js -[p2svpngatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysListSample.js -[p2svpngatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysResetSample.js -[p2svpngatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysUpdateTagsSample.js -[packetcapturescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/packetCapturesCreateSample.js -[packetcapturesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/packetCapturesDeleteSample.js -[packetcapturesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/packetCapturesGetSample.js -[packetcapturesgetstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/packetCapturesGetStatusSample.js -[packetcaptureslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/packetCapturesListSample.js -[packetcapturesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/packetCapturesStopSample.js -[peerexpressroutecircuitconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/peerExpressRouteCircuitConnectionsGetSample.js -[peerexpressroutecircuitconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/peerExpressRouteCircuitConnectionsListSample.js -[privatednszonegroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js -[privatednszonegroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsDeleteSample.js -[privatednszonegroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsGetSample.js -[privatednszonegroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsListSample.js -[privateendpointscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateEndpointsCreateOrUpdateSample.js -[privateendpointsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateEndpointsDeleteSample.js -[privateendpointsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateEndpointsGetSample.js -[privateendpointslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateEndpointsListBySubscriptionSample.js -[privateendpointslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateEndpointsListSample.js -[privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js -[privatelinkservicescheckprivatelinkservicevisibilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js -[privatelinkservicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCreateOrUpdateSample.js -[privatelinkservicesdeleteprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js -[privatelinkservicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesDeleteSample.js -[privatelinkservicesgetprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js -[privatelinkservicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesGetSample.js -[privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js -[privatelinkserviceslistautoapprovedprivatelinkservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js -[privatelinkserviceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListBySubscriptionSample.js -[privatelinkserviceslistprivateendpointconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js -[privatelinkserviceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListSample.js -[privatelinkservicesupdateprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js -[publicipaddressescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesCreateOrUpdateSample.js -[publicipaddressesddosprotectionstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDdosProtectionStatusSample.js -[publicipaddressesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDeleteSample.js -[publicipaddressesdisassociatecloudservicereservedpublicipsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js -[publicipaddressesgetcloudservicepublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js -[publicipaddressesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetSample.js -[publicipaddressesgetvirtualmachinescalesetpublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js -[publicipaddresseslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListAllSample.js -[publicipaddresseslistcloudservicepublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js -[publicipaddresseslistcloudserviceroleinstancepublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js -[publicipaddresseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListSample.js -[publicipaddresseslistvirtualmachinescalesetpublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js -[publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js -[publicipaddressesreservecloudservicepublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesReserveCloudServicePublicIPAddressSample.js -[publicipaddressesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesUpdateTagsSample.js -[publicipprefixescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesCreateOrUpdateSample.js -[publicipprefixesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesDeleteSample.js -[publicipprefixesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesGetSample.js -[publicipprefixeslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesListAllSample.js -[publicipprefixeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesListSample.js -[publicipprefixesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesUpdateTagsSample.js -[putbastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/putBastionShareableLinkSample.js -[reachabilityanalysisintentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsCreateSample.js -[reachabilityanalysisintentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsDeleteSample.js -[reachabilityanalysisintentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsGetSample.js -[reachabilityanalysisintentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsListSample.js -[reachabilityanalysisrunscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsCreateSample.js -[reachabilityanalysisrunsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsDeleteSample.js -[reachabilityanalysisrunsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsGetSample.js -[reachabilityanalysisrunslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsListSample.js -[resourcenavigationlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/resourceNavigationLinksListSample.js -[routefilterrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesCreateOrUpdateSample.js -[routefilterrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesDeleteSample.js -[routefilterrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesGetSample.js -[routefilterruleslistbyroutefiltersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesListByRouteFilterSample.js -[routefilterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeFiltersCreateOrUpdateSample.js -[routefiltersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeFiltersDeleteSample.js -[routefiltersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeFiltersGetSample.js -[routefilterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeFiltersListByResourceGroupSample.js -[routefilterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeFiltersListSample.js -[routefiltersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeFiltersUpdateTagsSample.js -[routemapscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeMapsCreateOrUpdateSample.js -[routemapsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeMapsDeleteSample.js -[routemapsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeMapsGetSample.js -[routemapslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeMapsListSample.js -[routetablescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeTablesCreateOrUpdateSample.js -[routetablesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeTablesDeleteSample.js -[routetablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeTablesGetSample.js -[routetableslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeTablesListAllSample.js -[routetableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeTablesListSample.js -[routetablesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routeTablesUpdateTagsSample.js -[routescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routesCreateOrUpdateSample.js -[routesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routesDeleteSample.js -[routesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routesGetSample.js -[routeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routesListSample.js -[routingintentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingIntentCreateOrUpdateSample.js -[routingintentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingIntentDeleteSample.js -[routingintentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingIntentGetSample.js -[routingintentlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingIntentListSample.js -[routingrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsCreateOrUpdateSample.js -[routingrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsDeleteSample.js -[routingrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsGetSample.js -[routingrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsListSample.js -[routingrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingRulesCreateOrUpdateSample.js -[routingrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingRulesDeleteSample.js -[routingrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingRulesGetSample.js -[routingruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/routingRulesListSample.js -[scopeconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsCreateOrUpdateSample.js -[scopeconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsDeleteSample.js -[scopeconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsGetSample.js -[scopeconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsListSample.js -[securityadminconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsCreateOrUpdateSample.js -[securityadminconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsDeleteSample.js -[securityadminconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsGetSample.js -[securityadminconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsListSample.js -[securitypartnerproviderscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersCreateOrUpdateSample.js -[securitypartnerprovidersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersDeleteSample.js -[securitypartnerprovidersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersGetSample.js -[securitypartnerproviderslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersListByResourceGroupSample.js -[securitypartnerproviderslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersListSample.js -[securitypartnerprovidersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersUpdateTagsSample.js -[securityrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityRulesCreateOrUpdateSample.js -[securityrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityRulesDeleteSample.js -[securityrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityRulesGetSample.js -[securityruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityRulesListSample.js -[securityuserconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsCreateOrUpdateSample.js -[securityuserconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsDeleteSample.js -[securityuserconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsGetSample.js -[securityuserconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsListSample.js -[securityuserrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js -[securityuserrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsDeleteSample.js -[securityuserrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsGetSample.js -[securityuserrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsListSample.js -[securityuserrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserRulesCreateOrUpdateSample.js -[securityuserrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserRulesDeleteSample.js -[securityuserrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserRulesGetSample.js -[securityuserruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/securityUserRulesListSample.js -[serviceassociationlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceAssociationLinksListSample.js -[serviceendpointpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js -[serviceendpointpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesDeleteSample.js -[serviceendpointpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesGetSample.js -[serviceendpointpolicieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesListByResourceGroupSample.js -[serviceendpointpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesListSample.js -[serviceendpointpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesUpdateTagsSample.js -[serviceendpointpolicydefinitionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js -[serviceendpointpolicydefinitionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js -[serviceendpointpolicydefinitionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsGetSample.js -[serviceendpointpolicydefinitionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js -[servicegatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysCreateOrUpdateSample.js -[servicegatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysDeleteSample.js -[servicegatewaysgetaddresslocationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetAddressLocationsSample.js -[servicegatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetSample.js -[servicegatewaysgetservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetServicesSample.js -[servicegatewayslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysListAllSample.js -[servicegatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysListSample.js -[servicegatewaysupdateaddresslocationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateAddressLocationsSample.js -[servicegatewaysupdateservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateServicesSample.js -[servicegatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateTagsSample.js -[servicetaginformationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceTagInformationListSample.js -[servicetagslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/serviceTagsListSample.js -[staticcidrscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/staticCidrsCreateSample.js -[staticcidrsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/staticCidrsDeleteSample.js -[staticcidrsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/staticCidrsGetSample.js -[staticcidrslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/staticCidrsListSample.js -[staticmemberscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/staticMembersCreateOrUpdateSample.js -[staticmembersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/staticMembersDeleteSample.js -[staticmembersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/staticMembersGetSample.js -[staticmemberslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/staticMembersListSample.js -[subnetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/subnetsCreateOrUpdateSample.js -[subnetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/subnetsDeleteSample.js -[subnetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/subnetsGetSample.js -[subnetslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/subnetsListSample.js -[subnetspreparenetworkpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/subnetsPrepareNetworkPoliciesSample.js -[subnetsunpreparenetworkpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/subnetsUnprepareNetworkPoliciesSample.js -[subscriptionnetworkmanagerconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js -[subscriptionnetworkmanagerconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js -[subscriptionnetworkmanagerconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsGetSample.js -[subscriptionnetworkmanagerconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsListSample.js -[supportedsecurityproviderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/supportedSecurityProvidersSample.js -[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/usagesListSample.js -[verifierworkspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesCreateSample.js -[verifierworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesDeleteSample.js -[verifierworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesGetSample.js -[verifierworkspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesListSample.js -[verifierworkspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesUpdateSample.js -[vipswapcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vipSwapCreateSample.js -[vipswapgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vipSwapGetSample.js -[vipswaplistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vipSwapListSample.js -[virtualappliancesitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesCreateOrUpdateSample.js -[virtualappliancesitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesDeleteSample.js -[virtualappliancesitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesGetSample.js -[virtualappliancesiteslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesListSample.js -[virtualapplianceskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSkusGetSample.js -[virtualapplianceskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSkusListSample.js -[virtualhubbgpconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js -[virtualhubbgpconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionDeleteSample.js -[virtualhubbgpconnectiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionGetSample.js -[virtualhubbgpconnectionslistadvertisedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js -[virtualhubbgpconnectionslistlearnedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js -[virtualhubbgpconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListSample.js -[virtualhubipconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js -[virtualhubipconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationDeleteSample.js -[virtualhubipconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationGetSample.js -[virtualhubipconfigurationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationListSample.js -[virtualhubroutetablev2screateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js -[virtualhubroutetablev2sdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SDeleteSample.js -[virtualhubroutetablev2sgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SGetSample.js -[virtualhubroutetablev2slistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SListSample.js -[virtualhubscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubsCreateOrUpdateSample.js -[virtualhubsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubsDeleteSample.js -[virtualhubsgeteffectivevirtualhubroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js -[virtualhubsgetinboundroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetInboundRoutesSample.js -[virtualhubsgetoutboundroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetOutboundRoutesSample.js -[virtualhubsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetSample.js -[virtualhubslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubsListByResourceGroupSample.js -[virtualhubslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubsListSample.js -[virtualhubsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualHubsUpdateTagsSample.js -[virtualnetworkappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesCreateOrUpdateSample.js -[virtualnetworkappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesDeleteSample.js -[virtualnetworkappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesGetSample.js -[virtualnetworkapplianceslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesListAllSample.js -[virtualnetworkapplianceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesListSample.js -[virtualnetworkappliancesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesUpdateTagsSample.js -[virtualnetworkgatewayconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js -[virtualnetworkgatewayconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsDeleteSample.js -[virtualnetworkgatewayconnectionsgetikesassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js -[virtualnetworkgatewayconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetSample.js -[virtualnetworkgatewayconnectionsgetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js -[virtualnetworkgatewayconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsListSample.js -[virtualnetworkgatewayconnectionsresetconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js -[virtualnetworkgatewayconnectionsresetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js -[virtualnetworkgatewayconnectionssetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js -[virtualnetworkgatewayconnectionsstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js -[virtualnetworkgatewayconnectionsstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js -[virtualnetworkgatewayconnectionsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js -[virtualnetworkgatewaynatrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js -[virtualnetworkgatewaynatrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesDeleteSample.js -[virtualnetworkgatewaynatrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesGetSample.js -[virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js -[virtualnetworkgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js -[virtualnetworkgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysDeleteSample.js -[virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js -[virtualnetworkgatewaysgeneratevpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js -[virtualnetworkgatewaysgeneratevpnclientpackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js -[virtualnetworkgatewaysgetadvertisedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js -[virtualnetworkgatewaysgetbgppeerstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js -[virtualnetworkgatewaysgetfailoveralltestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js -[virtualnetworkgatewaysgetfailoversingletestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js -[virtualnetworkgatewaysgetlearnedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js -[virtualnetworkgatewaysgetresiliencyinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetResiliencyInformationSample.js -[virtualnetworkgatewaysgetroutesinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetRoutesInformationSample.js -[virtualnetworkgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetSample.js -[virtualnetworkgatewaysgetvpnprofilepackageurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js -[virtualnetworkgatewaysgetvpnclientconnectionhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js -[virtualnetworkgatewaysgetvpnclientipsecparameterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js -[virtualnetworkgatewaysinvokeabortmigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeAbortMigrationSample.js -[virtualnetworkgatewaysinvokecommitmigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeCommitMigrationSample.js -[virtualnetworkgatewaysinvokeexecutemigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeExecuteMigrationSample.js -[virtualnetworkgatewaysinvokepreparemigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokePrepareMigrationSample.js -[virtualnetworkgatewayslistconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListConnectionsSample.js -[virtualnetworkgatewayslistradiussecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListRadiusSecretsSample.js -[virtualnetworkgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListSample.js -[virtualnetworkgatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysResetSample.js -[virtualnetworkgatewaysresetvpnclientsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js -[virtualnetworkgatewayssetvpnclientipsecparameterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js -[virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js -[virtualnetworkgatewaysstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js -[virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js -[virtualnetworkgatewaysstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js -[virtualnetworkgatewayssupportedvpndevicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js -[virtualnetworkgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysUpdateTagsSample.js -[virtualnetworkgatewaysvpndeviceconfigurationscriptsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js -[virtualnetworkpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js -[virtualnetworkpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsDeleteSample.js -[virtualnetworkpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsGetSample.js -[virtualnetworkpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsListSample.js -[virtualnetworktapscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsCreateOrUpdateSample.js -[virtualnetworktapsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsDeleteSample.js -[virtualnetworktapsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsGetSample.js -[virtualnetworktapslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsListAllSample.js -[virtualnetworktapslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsListByResourceGroupSample.js -[virtualnetworktapsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsUpdateTagsSample.js -[virtualnetworkscheckipaddressavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js -[virtualnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworksCreateOrUpdateSample.js -[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworksDeleteSample.js -[virtualnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworksGetSample.js -[virtualnetworkslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListAllSample.js -[virtualnetworkslistddosprotectionstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListDdosProtectionStatusSample.js -[virtualnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListSample.js -[virtualnetworkslistusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListUsageSample.js -[virtualnetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualNetworksUpdateTagsSample.js -[virtualrouterpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsCreateOrUpdateSample.js -[virtualrouterpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsDeleteSample.js -[virtualrouterpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsGetSample.js -[virtualrouterpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsListSample.js -[virtualrouterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualRoutersCreateOrUpdateSample.js -[virtualroutersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualRoutersDeleteSample.js -[virtualroutersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualRoutersGetSample.js -[virtualrouterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualRoutersListByResourceGroupSample.js -[virtualrouterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualRoutersListSample.js -[virtualwanscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualWansCreateOrUpdateSample.js -[virtualwansdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualWansDeleteSample.js -[virtualwansgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualWansGetSample.js -[virtualwanslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualWansListByResourceGroupSample.js -[virtualwanslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualWansListSample.js -[virtualwansupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/virtualWansUpdateTagsSample.js -[vpnconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsCreateOrUpdateSample.js -[vpnconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsDeleteSample.js -[vpnconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsGetSample.js -[vpnconnectionslistbyvpngatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsListByVpnGatewaySample.js -[vpnconnectionsstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsStartPacketCaptureSample.js -[vpnconnectionsstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsStopPacketCaptureSample.js -[vpngatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysCreateOrUpdateSample.js -[vpngatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysDeleteSample.js -[vpngatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysGetSample.js -[vpngatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysListByResourceGroupSample.js -[vpngatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysListSample.js -[vpngatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysResetSample.js -[vpngatewaysstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysStartPacketCaptureSample.js -[vpngatewaysstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysStopPacketCaptureSample.js -[vpngatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysUpdateTagsSample.js -[vpnlinkconnectionsgetallsharedkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js -[vpnlinkconnectionsgetdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js -[vpnlinkconnectionsgetikesassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetIkeSasSample.js -[vpnlinkconnectionslistbyvpnconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsListByVpnConnectionSample.js -[vpnlinkconnectionslistdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js -[vpnlinkconnectionsresetconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsResetConnectionSample.js -[vpnlinkconnectionssetorinitdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js -[vpnserverconfigurationsassociatedwithvirtualwanlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js -[vpnserverconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsCreateOrUpdateSample.js -[vpnserverconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsDeleteSample.js -[vpnserverconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsGetSample.js -[vpnserverconfigurationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListByResourceGroupSample.js -[vpnserverconfigurationslistradiussecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListRadiusSecretsSample.js -[vpnserverconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListSample.js -[vpnserverconfigurationsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsUpdateTagsSample.js -[vpnsitelinkconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinkConnectionsGetSample.js -[vpnsitelinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinksGetSample.js -[vpnsitelinkslistbyvpnsitesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinksListByVpnSiteSample.js -[vpnsitesconfigurationdownloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnSitesConfigurationDownloadSample.js -[vpnsitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnSitesCreateOrUpdateSample.js -[vpnsitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnSitesDeleteSample.js -[vpnsitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnSitesGetSample.js -[vpnsiteslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnSitesListByResourceGroupSample.js -[vpnsiteslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnSitesListSample.js -[vpnsitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/vpnSitesUpdateTagsSample.js -[webapplicationfirewallpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js -[webapplicationfirewallpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesDeleteSample.js -[webapplicationfirewallpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesGetSample.js -[webapplicationfirewallpolicieslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesListAllSample.js -[webapplicationfirewallpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesListSample.js -[webcategoriesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/webCategoriesGetSample.js -[webcategorieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/javascript/webCategoriesListBySubscriptionSample.js -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-network?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network/README.md diff --git a/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsCreateOrUpdateSample.js deleted file mode 100644 index 78ef938c9bf4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an admin rule collection. - * - * @summary Creates or updates an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionPut.json - */ -async function createOrUpdateAnAdminRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleCollection = { - description: "A sample policy", - appliesToGroups: [ - { - networkGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, - ); - console.log(result); -} - -async function main() { - await createOrUpdateAnAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsDeleteSample.js deleted file mode 100644 index 3cbd28df01e9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsDeleteSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an admin rule collection. - * - * @summary Deletes an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json - */ -async function deletesAnAdminRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - console.log(result); -} - -async function main() { - await deletesAnAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsGetSample.js deleted file mode 100644 index 59c281fd0699..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a network manager security admin configuration rule collection. - * - * @summary Gets a network manager security admin configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionGet.json - */ -async function getsSecurityAdminRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main() { - await getsSecurityAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsListSample.js deleted file mode 100644 index aaedf6158fe2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/adminRuleCollectionsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the rule collections in a security admin configuration, in a paginated format. - * - * @summary Lists all the rule collections in a security admin configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionList.json - */ -async function listSecurityAdminRuleCollections() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.adminRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSecurityAdminRuleCollections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/adminRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/adminRulesCreateOrUpdateSample.js deleted file mode 100644 index d661c0a13cc5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/adminRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an admin rule. - * - * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json - */ -async function createAAdminRuleWithNetworkGroupAsSourceOrDestination() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const adminRule = { - description: "This is Sample Admin Rule", - access: "Deny", - destinationPortRanges: ["22"], - destinations: [ - { - addressPrefix: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1", - addressPrefixType: "NetworkGroup", - }, - ], - direction: "Inbound", - kind: "Custom", - priority: 1, - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - adminRule, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an admin rule. - * - * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRulePut.json - */ -async function createAnAdminRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const adminRule = { - description: "This is Sample Admin Rule", - access: "Deny", - destinationPortRanges: ["22"], - destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - direction: "Inbound", - kind: "Custom", - priority: 1, - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - adminRule, - ); - console.log(result); -} - -async function main() { - await createAAdminRuleWithNetworkGroupAsSourceOrDestination(); - await createAnAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/adminRulesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/adminRulesDeleteSample.js deleted file mode 100644 index 5a9f4d4c7a0e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/adminRulesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an admin rule. - * - * @summary Deletes an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleDelete.json - */ -async function deletesAnAdminRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main() { - await deletesAnAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/adminRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/adminRulesGetSample.js deleted file mode 100644 index 579159da3f79..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/adminRulesGetSample.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a network manager security configuration admin rule. - * - * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleGet.json - */ -async function getsSecurityAdminRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets a network manager security configuration admin rule. - * - * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDefaultAdminRuleGet.json - */ -async function getsSecurityDefaultAdminRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleDefaultAdminRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main() { - await getsSecurityAdminRule(); - await getsSecurityDefaultAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/adminRulesListSample.js b/sdk/network/arm-network/samples/v36/javascript/adminRulesListSample.js deleted file mode 100644 index 1fb3643549e2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/adminRulesListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network manager security configuration admin rules. - * - * @summary List all network manager security configuration admin rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleList.json - */ -async function listSecurityAdminRules() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.adminRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js deleted file mode 100644 index adb9b836054c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified private endpoint connection on application gateway. - * - * @summary Deletes the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json - */ -async function deleteApplicationGatewayPrivateEndpointConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGatewayPrivateEndpointConnections.beginDeleteAndWait( - resourceGroupName, - applicationGatewayName, - connectionName, - ); - console.log(result); -} - -async function main() { - await deleteApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js deleted file mode 100644 index c88f9ab85756..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified private endpoint connection on application gateway. - * - * @summary Gets the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json - */ -async function getApplicationGatewayPrivateEndpointConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGatewayPrivateEndpointConnections.get( - resourceGroupName, - applicationGatewayName, - connectionName, - ); - console.log(result); -} - -async function main() { - await getApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js deleted file mode 100644 index 84e2c804313d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all private endpoint connections on an application gateway. - * - * @summary Lists all private endpoint connections on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json - */ -async function listsAllPrivateEndpointConnectionsOnApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayPrivateEndpointConnections.list( - resourceGroupName, - applicationGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllPrivateEndpointConnectionsOnApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js deleted file mode 100644 index 44b786a13ccc..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the specified private endpoint connection on application gateway. - * - * @summary Updates the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json - */ -async function updateApplicationGatewayPrivateEndpointConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const parameters = { - name: "connection1", - privateEndpoint: { - id: "/subscriptions/subId2/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe", - }, - privateLinkServiceConnectionState: { - description: "approved it for some reason.", - status: "Approved", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGatewayPrivateEndpointConnections.beginUpdateAndWait( - resourceGroupName, - applicationGatewayName, - connectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateLinkResourcesListSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateLinkResourcesListSample.js deleted file mode 100644 index 8f0c464a7066..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayPrivateLinkResourcesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all private link resources on an application gateway. - * - * @summary Lists all private link resources on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json - */ -async function listsAllPrivateLinkResourcesOnApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayPrivateLinkResources.list( - resourceGroupName, - applicationGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllPrivateLinkResourcesOnApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js deleted file mode 100644 index 4f7f225b5c10..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the regional application gateway waf manifest. - * - * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json - */ -async function getsWafDefaultManifest() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGatewayWafDynamicManifestsDefault.get(location); - console.log(result); -} - -async function main() { - await getsWafDefaultManifest(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayWafDynamicManifestsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewayWafDynamicManifestsGetSample.js deleted file mode 100644 index 9ad78cca310e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewayWafDynamicManifestsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the regional application gateway waf manifest. - * - * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetApplicationGatewayWafDynamicManifests.json - */ -async function getsWafManifests() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayWafDynamicManifests.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getsWafManifests(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysBackendHealthOnDemandSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysBackendHealthOnDemandSample.js deleted file mode 100644 index 512a71c97359..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysBackendHealthOnDemandSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * - * @summary Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayBackendHealthTest.json - */ -async function testBackendHealth() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const probeRequest = { - path: "/", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendaddressPools/MFAnalyticsPool", - }, - backendHttpSettings: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/MFPoolSettings", - }, - pickHostNameFromBackendHttpSettings: true, - timeout: 30, - protocol: "Http", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginBackendHealthOnDemandAndWait( - resourceGroupName, - applicationGatewayName, - probeRequest, - ); - console.log(result); -} - -async function main() { - await testBackendHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysBackendHealthSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysBackendHealthSample.js deleted file mode 100644 index eb8d06c559f0..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysBackendHealthSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the backend health of the specified application gateway in a resource group. - * - * @summary Gets the backend health of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayBackendHealthGet.json - */ -async function getBackendHealth() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "appgw"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginBackendHealthAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main() { - await getBackendHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysCreateOrUpdateSample.js deleted file mode 100644 index 50f58a12f5af..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified application gateway. - * - * @summary Creates or updates the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayCreate.json - */ -async function createApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const parameters = { - backendAddressPools: [ - { - name: "appgwpool", - backendAddresses: [{ ipAddress: "10.0.1.1" }, { ipAddress: "10.0.1.2" }], - }, - { - name: "appgwpool1", - backendAddresses: [{ ipAddress: "10.0.0.1" }, { ipAddress: "10.0.0.2" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool1", - }, - ], - backendHttpSettingsCollection: [ - { - name: "appgwbhs", - cookieBasedAffinity: "Disabled", - port: 80, - requestTimeout: 30, - protocol: "Http", - }, - ], - entraJWTValidationConfigs: [ - { - name: "entraJWTValidationConfig1", - clientId: "37293f5a-97b3-451d-b786-f532d711c9ff", - tenantId: "70a036f6-8e4d-4615-bad6-149c02e7720d", - unAuthorizedRequestAction: "Deny", - }, - ], - frontendIPConfigurations: [ - { - name: "appgwfip", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/appgwpip", - }, - }, - ], - frontendPorts: [ - { name: "appgwfp", port: 443 }, - { name: "appgwfp80", port: 80 }, - ], - gatewayIPConfigurations: [ - { - name: "appgwipc", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet/subnets/appgwsubnet", - }, - }, - ], - globalConfiguration: { - enableRequestBuffering: true, - enableResponseBuffering: true, - }, - httpListeners: [ - { - name: "appgwhl", - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", - }, - frontendPort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp", - }, - requireServerNameIndication: false, - sslCertificate: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslCertificates/sslcert", - }, - sslProfile: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslProfiles/sslProfile1", - }, - protocol: "Https", - }, - { - name: "appgwhttplistener", - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", - }, - frontendPort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp80", - }, - protocol: "Http", - }, - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "eastus", - requestRoutingRules: [ - { - name: "appgwrule", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool", - }, - backendHttpSettings: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs", - }, - entraJWTValidationConfig: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/entraJWTValidationConfigs/entraJWTValidationConfig1", - }, - httpListener: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhl", - }, - priority: 10, - rewriteRuleSet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1", - }, - ruleType: "Basic", - }, - ], - rewriteRuleSets: [ - { - name: "rewriteRuleSet1", - rewriteRules: [ - { - name: "Set X-Forwarded-For", - actionSet: { - requestHeaderConfigurations: [ - { - headerName: "X-Forwarded-For", - headerValue: "{var_add_x_forwarded_for_proxy}", - }, - ], - responseHeaderConfigurations: [ - { - headerName: "Strict-Transport-Security", - headerValue: "max-age=31536000", - }, - ], - urlConfiguration: { modifiedPath: "/abc" }, - }, - conditions: [ - { - ignoreCase: true, - negate: false, - pattern: "^Bearer", - variable: "http_req_Authorization", - }, - ], - ruleSequence: 102, - }, - ], - }, - ], - sku: { name: "Standard_v2", capacity: 3, tier: "Standard_v2" }, - sslCertificates: [ - { name: "sslcert", data: "****", password: "****" }, - { name: "sslcert2", keyVaultSecretId: "https://kv/secret" }, - ], - sslProfiles: [ - { - name: "sslProfile1", - clientAuthConfiguration: { verifyClientCertIssuerDN: true }, - sslPolicy: { - cipherSuites: ["TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"], - minProtocolVersion: "TLSv1_1", - policyType: "Custom", - }, - trustedClientCertificates: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/trustedClientCertificates/clientcert", - }, - ], - }, - ], - trustedClientCertificates: [{ name: "clientcert", data: "****" }], - trustedRootCertificates: [ - { name: "rootcert", data: "****" }, - { name: "rootcert1", keyVaultSecretId: "https://kv/secret" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - applicationGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await createApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysDeleteSample.js deleted file mode 100644 index bb6155927e11..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified application gateway. - * - * @summary Deletes the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayDelete.json - */ -async function deleteApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginDeleteAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main() { - await deleteApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysGetSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysGetSample.js deleted file mode 100644 index 104fce732c15..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified application gateway. - * - * @summary Gets the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayGet.json - */ -async function getApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.get(resourceGroupName, applicationGatewayName); - console.log(result); -} - -async function main() { - await getApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysGetSslPredefinedPolicySample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysGetSslPredefinedPolicySample.js deleted file mode 100644 index cf453120ef02..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysGetSslPredefinedPolicySample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets Ssl predefined policy with the specified policy name. - * - * @summary Gets Ssl predefined policy with the specified policy name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json - */ -async function getAvailableSslPredefinedPolicyByName() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const predefinedPolicyName = "AppGwSslPolicy20150501"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.getSslPredefinedPolicy(predefinedPolicyName); - console.log(result); -} - -async function main() { - await getAvailableSslPredefinedPolicyByName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAllSample.js deleted file mode 100644 index 9ca894f18bd5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the application gateways in a subscription. - * - * @summary Gets all the application gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayListAll.json - */ -async function listsAllApplicationGatewaysInASubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllApplicationGatewaysInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableRequestHeadersSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableRequestHeadersSample.js deleted file mode 100644 index 4c53f029529a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableRequestHeadersSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all available request headers. - * - * @summary Lists all available request headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json - */ -async function getAvailableRequestHeaders() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableRequestHeaders(); - console.log(result); -} - -async function main() { - await getAvailableRequestHeaders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableResponseHeadersSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableResponseHeadersSample.js deleted file mode 100644 index bb5163b48d6b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableResponseHeadersSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all available response headers. - * - * @summary Lists all available response headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json - */ -async function getAvailableResponseHeaders() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableResponseHeaders(); - console.log(result); -} - -async function main() { - await getAvailableResponseHeaders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableServerVariablesSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableServerVariablesSample.js deleted file mode 100644 index 4c136024db2a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableServerVariablesSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all available server variables. - * - * @summary Lists all available server variables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json - */ -async function getAvailableServerVariables() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableServerVariables(); - console.log(result); -} - -async function main() { - await getAvailableServerVariables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableSslOptionsSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableSslOptionsSample.js deleted file mode 100644 index fb9abc2ac397..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableSslOptionsSample.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists available Ssl options for configuring Ssl policy. - * - * @summary Lists available Ssl options for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json - */ -async function getAvailableSslOptions() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableSslOptions(); - console.log(result); -} - -async function main() { - await getAvailableSslOptions(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js deleted file mode 100644 index 7c872245741f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all SSL predefined policies for configuring Ssl policy. - * - * @summary Lists all SSL predefined policies for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json - */ -async function getAvailableSslPredefinedPolicies() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.listAvailableSslPredefinedPolicies()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailableSslPredefinedPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js deleted file mode 100644 index fd22e84189cf..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all available web application firewall rule sets. - * - * @summary Lists all available web application firewall rule sets. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json - */ -async function getAvailableWafRuleSets() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableWafRuleSets(); - console.log(result); -} - -async function main() { - await getAvailableWafRuleSets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListSample.js deleted file mode 100644 index c0843612055a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all application gateways in a resource group. - * - * @summary Lists all application gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayList.json - */ -async function listsAllApplicationGatewaysInAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllApplicationGatewaysInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysStartSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysStartSample.js deleted file mode 100644 index b19046a9db1b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysStartSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Starts the specified application gateway. - * - * @summary Starts the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayStart.json - */ -async function startApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginStartAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main() { - await startApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysStopSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysStopSample.js deleted file mode 100644 index 58a728c277c3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysStopSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops the specified application gateway in a resource group. - * - * @summary Stops the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayStop.json - */ -async function stopApplicationGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginStopAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main() { - await stopApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysUpdateTagsSample.js deleted file mode 100644 index 0ea5bf26554a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the specified application gateway tags. - * - * @summary Updates the specified application gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayUpdateTags.json - */ -async function updateApplicationGatewayTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "AppGw"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.updateTags( - resourceGroupName, - applicationGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateApplicationGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsCreateOrUpdateSample.js deleted file mode 100644 index de1ad7d47dcc..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an application security group. - * - * @summary Creates or updates an application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupCreate.json - */ -async function createApplicationSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const parameters = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - applicationSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await createApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsDeleteSample.js deleted file mode 100644 index 1cc2c013cdc7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified application security group. - * - * @summary Deletes the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupDelete.json - */ -async function deleteApplicationSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.beginDeleteAndWait( - resourceGroupName, - applicationSecurityGroupName, - ); - console.log(result); -} - -async function main() { - await deleteApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsGetSample.js deleted file mode 100644 index 2168f642fb9a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified application security group. - * - * @summary Gets information about the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupGet.json - */ -async function getApplicationSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.get( - resourceGroupName, - applicationSecurityGroupName, - ); - console.log(result); -} - -async function main() { - await getApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsListAllSample.js deleted file mode 100644 index 465728fbcb3f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all application security groups in a subscription. - * - * @summary Gets all application security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupListAll.json - */ -async function listAllApplicationSecurityGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationSecurityGroups.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllApplicationSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsListSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsListSample.js deleted file mode 100644 index 960f332688ca..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the application security groups in a resource group. - * - * @summary Gets all the application security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupList.json - */ -async function listLoadBalancersInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationSecurityGroups.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listLoadBalancersInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsUpdateTagsSample.js deleted file mode 100644 index c64c092c654b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/applicationSecurityGroupsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an application security group's tags. - * - * @summary Updates an application security group's tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupUpdateTags.json - */ -async function updateApplicationSecurityGroupTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.updateTags( - resourceGroupName, - applicationSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateApplicationSecurityGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/availableDelegationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/availableDelegationsListSample.js deleted file mode 100644 index c908df5386d3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/availableDelegationsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all of the available subnet delegations for this subscription in this region. - * - * @summary Gets all of the available subnet delegations for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableDelegationsSubscriptionGet.json - */ -async function getAvailableDelegations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableDelegations.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailableDelegations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/availableEndpointServicesListSample.js b/sdk/network/arm-network/samples/v36/javascript/availableEndpointServicesListSample.js deleted file mode 100644 index 27c0539536ab..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/availableEndpointServicesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List what values of endpoint services are available for use. - * - * @summary List what values of endpoint services are available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EndpointServicesList.json - */ -async function endpointServicesList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableEndpointServices.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await endpointServicesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js deleted file mode 100644 index d8cc8ebd4b95..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * - * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json - */ -async function getAvailablePrivateEndpointTypesInTheResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availablePrivateEndpointTypes.listByResourceGroup( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailablePrivateEndpointTypesInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/availablePrivateEndpointTypesListSample.js b/sdk/network/arm-network/samples/v36/javascript/availablePrivateEndpointTypesListSample.js deleted file mode 100644 index 7b4d3fbad024..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/availablePrivateEndpointTypesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * - * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailablePrivateEndpointTypesGet.json - */ -async function getAvailablePrivateEndpointTypes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availablePrivateEndpointTypes.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailablePrivateEndpointTypes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/availableResourceGroupDelegationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/availableResourceGroupDelegationsListSample.js deleted file mode 100644 index 61535ca98fc2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/availableResourceGroupDelegationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all of the available subnet delegations for this resource group in this region. - * - * @summary Gets all of the available subnet delegations for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableDelegationsResourceGroupGet.json - */ -async function getAvailableDelegationsInTheResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableResourceGroupDelegations.list( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailableDelegationsInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/availableServiceAliasesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/availableServiceAliasesListByResourceGroupSample.js deleted file mode 100644 index 339b29068011..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/availableServiceAliasesListByResourceGroupSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all available service aliases for this resource group in this region. - * - * @summary Gets all available service aliases for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableServiceAliasesListByResourceGroup.json - */ -async function getAvailableServiceAliasesInTheResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableServiceAliases.listByResourceGroup( - resourceGroupName, - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailableServiceAliasesInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/availableServiceAliasesListSample.js b/sdk/network/arm-network/samples/v36/javascript/availableServiceAliasesListSample.js deleted file mode 100644 index 213dac306fb6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/availableServiceAliasesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all available service aliases for this subscription in this region. - * - * @summary Gets all available service aliases for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableServiceAliasesList.json - */ -async function getAvailableServiceAliases() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableServiceAliases.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAvailableServiceAliases(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/azureFirewallFqdnTagsListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/azureFirewallFqdnTagsListAllSample.js deleted file mode 100644 index d71b8c0612f2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/azureFirewallFqdnTagsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Azure Firewall FQDN Tags in a subscription. - * - * @summary Gets all the Azure Firewall FQDN Tags in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json - */ -async function listAllAzureFirewallFqdnTagsForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewallFqdnTags.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllAzureFirewallFqdnTagsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/azureFirewallsCreateOrUpdateSample.js deleted file mode 100644 index f5d66f82e6a1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsCreateOrUpdateSample.js +++ /dev/null @@ -1,617 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPut.json - */ -async function createAzureFirewall() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - name: "L4-traffic-with-FQDN", - description: "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithAdditionalProperties.json - */ -async function createAzureFirewallWithAdditionalProperties() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - additionalProperties: { key1: "value1", key2: "value2" }, - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - ipGroups: [], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - name: "L4-traffic-with-FQDN", - description: "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithIpGroups.json - */ -async function createAzureFirewallWithIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - name: "L4-traffic-with-FQDN", - description: "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithZones.json - */ -async function createAzureFirewallWithZones() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US 2", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - name: "L4-traffic-with-FQDN", - description: "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: ["1", "2", "3"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithMgmtSubnet.json - */ -async function createAzureFirewallWithManagementSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - managementIpConfiguration: { - name: "azureFirewallMgmtIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/managementPipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallManagementSubnet", - }, - }, - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - name: "L4-traffic-with-FQDN", - description: "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutInHub.json - */ -async function createAzureFirewallInVirtualHub() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters = { - firewallPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/policy1", - }, - hubIPAddresses: { publicIPs: { addresses: [], count: 1 } }, - location: "West US", - sku: { name: "AZFW_Hub", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main() { - await createAzureFirewall(); - await createAzureFirewallWithAdditionalProperties(); - await createAzureFirewallWithIPGroups(); - await createAzureFirewallWithZones(); - await createAzureFirewallWithManagementSubnet(); - await createAzureFirewallInVirtualHub(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/azureFirewallsDeleteSample.js deleted file mode 100644 index 53a09620eb70..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Azure Firewall. - * - * @summary Deletes the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallDelete.json - */ -async function deleteAzureFirewall() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginDeleteAndWait( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -async function main() { - await deleteAzureFirewall(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/azureFirewallsGetSample.js deleted file mode 100644 index a0d830736e55..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsGetSample.js +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGet.json - */ -async function getAzureFirewall() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get(resourceGroupName, azureFirewallName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithAdditionalProperties.json - */ -async function getAzureFirewallWithAdditionalProperties() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get(resourceGroupName, azureFirewallName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithIpGroups.json - */ -async function getAzureFirewallWithIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get(resourceGroupName, azureFirewallName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithZones.json - */ -async function getAzureFirewallWithZones() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get(resourceGroupName, azureFirewallName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithMgmtSubnet.json - */ -async function getAzureFirewallWithManagementSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get(resourceGroupName, azureFirewallName); - console.log(result); -} - -async function main() { - await getAzureFirewall(); - await getAzureFirewallWithAdditionalProperties(); - await getAzureFirewallWithIPGroups(); - await getAzureFirewallWithZones(); - await getAzureFirewallWithManagementSubnet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListAllSample.js deleted file mode 100644 index 02032885b0f9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Azure Firewalls in a subscription. - * - * @summary Gets all the Azure Firewalls in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListBySubscription.json - */ -async function listAllAzureFirewallsForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewalls.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllAzureFirewallsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListLearnedPrefixesSample.js b/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListLearnedPrefixesSample.js deleted file mode 100644 index 69bbaec658f2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListLearnedPrefixesSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * - * @summary Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListLearnedIPPrefixes.json - */ -async function azureFirewallListLearnedPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginListLearnedPrefixesAndWait( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -async function main() { - await azureFirewallListLearnedPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListSample.js b/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListSample.js deleted file mode 100644 index 76c1c21d5e9b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Azure Firewalls in a resource group. - * - * @summary Lists all Azure Firewalls in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListByResourceGroup.json - */ -async function listAllAzureFirewallsForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewalls.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllAzureFirewallsForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsPacketCaptureOperationSample.js b/sdk/network/arm-network/samples/v36/javascript/azureFirewallsPacketCaptureOperationSample.js deleted file mode 100644 index 20918cfa7f74..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsPacketCaptureOperationSample.js +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Runs a packet capture operation on AzureFirewall. - * - * @summary Runs a packet capture operation on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPacketCaptureOperation.json - */ -async function azureFirewallPacketCaptureOperation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const parameters = { - durationInSeconds: 300, - fileName: "azureFirewallPacketCapture", - filters: [ - { - destinationPorts: ["4500"], - destinations: ["20.1.2.0"], - sources: ["20.1.1.0"], - }, - { - destinationPorts: ["123", "80"], - destinations: ["10.1.2.0"], - sources: ["10.1.1.0", "10.1.1.1"], - }, - ], - flags: [{ type: "syn" }, { type: "fin" }], - numberOfPacketsToCapture: 5000, - operation: "Status", - sasUrl: "someSASURL", - protocol: "Any", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginPacketCaptureOperationAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main() { - await azureFirewallPacketCaptureOperation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsPacketCaptureSample.js b/sdk/network/arm-network/samples/v36/javascript/azureFirewallsPacketCaptureSample.js deleted file mode 100644 index 15d418ca8ccb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsPacketCaptureSample.js +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Runs a packet capture on AzureFirewall. - * - * @summary Runs a packet capture on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPacketCapture.json - */ -async function azureFirewallPacketCapture() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const parameters = { - durationInSeconds: 300, - fileName: "azureFirewallPacketCapture", - filters: [ - { - destinationPorts: ["4500"], - destinations: ["20.1.2.0"], - sources: ["20.1.1.0"], - }, - { - destinationPorts: ["123", "80"], - destinations: ["10.1.2.0"], - sources: ["10.1.1.0", "10.1.1.1"], - }, - ], - flags: [{ type: "syn" }, { type: "fin" }], - numberOfPacketsToCapture: 5000, - sasUrl: "someSASURL", - protocol: "Any", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginPacketCaptureAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main() { - await azureFirewallPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/azureFirewallsUpdateTagsSample.js deleted file mode 100644 index b8b216cf85db..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/azureFirewallsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of an Azure Firewall resource. - * - * @summary Updates tags of an Azure Firewall resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallUpdateTags.json - */ -async function updateAzureFirewallTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "azfwtest"; - const azureFirewallName = "fw1"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginUpdateTagsAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateAzureFirewallTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/bastionHostsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/bastionHostsCreateOrUpdateSample.js deleted file mode 100644 index 719dc09e8070..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/bastionHostsCreateOrUpdateSample.js +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPut.json - */ -async function createBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters = { - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPutWithPrivateOnly.json - */ -async function createBastionHostWithPrivateOnly() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters = { - enablePrivateOnlyBastion: true, - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPutWithZones.json - */ -async function createBastionHostWithZones() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters = { - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDeveloperPut.json - */ -async function createDeveloperBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg2"; - const bastionHostName = "bastionhostdeveloper"; - const parameters = { - ipConfigurations: [], - networkAcls: { ipRules: [{ addressPrefix: "1.1.1.1/16" }] }, - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -async function main() { - await createBastionHost(); - await createBastionHostWithPrivateOnly(); - await createBastionHostWithZones(); - await createDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/bastionHostsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/bastionHostsDeleteSample.js deleted file mode 100644 index 5a32cdc077b3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/bastionHostsDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Bastion Host. - * - * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDelete.json - */ -async function deleteBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginDeleteAndWait(resourceGroupName, bastionHostName); - console.log(result); -} - -/** - * This sample demonstrates how to Deletes the specified Bastion Host. - * - * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDeveloperDelete.json - */ -async function deleteDeveloperBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg2"; - const bastionHostName = "bastionhostdeveloper"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginDeleteAndWait(resourceGroupName, bastionHostName); - console.log(result); -} - -async function main() { - await deleteBastionHost(); - await deleteDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/bastionHostsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/bastionHostsGetSample.js deleted file mode 100644 index 45b925748e21..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/bastionHostsGetSample.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostGet.json - */ -async function getBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant'"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get(resourceGroupName, bastionHostName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostGetWithPrivateOnly.json - */ -async function getBastionHostWithPrivateOnly() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get(resourceGroupName, bastionHostName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostGetWithZones.json - */ -async function getBastionHostWithZones() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get(resourceGroupName, bastionHostName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDeveloperGet.json - */ -async function getDeveloperBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhostdeveloper'"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get(resourceGroupName, bastionHostName); - console.log(result); -} - -async function main() { - await getBastionHost(); - await getBastionHostWithPrivateOnly(); - await getBastionHostWithZones(); - await getDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/bastionHostsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/bastionHostsListByResourceGroupSample.js deleted file mode 100644 index 2c1727e43879..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/bastionHostsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Bastion Hosts in a resource group. - * - * @summary Lists all Bastion Hosts in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostListByResourceGroup.json - */ -async function listAllBastionHostsForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bastionHosts.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllBastionHostsForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/bastionHostsListSample.js b/sdk/network/arm-network/samples/v36/javascript/bastionHostsListSample.js deleted file mode 100644 index 6daed42238b8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/bastionHostsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Bastion Hosts in a subscription. - * - * @summary Lists all Bastion Hosts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostListBySubscription.json - */ -async function listAllBastionHostsForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bastionHosts.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllBastionHostsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/bastionHostsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/bastionHostsUpdateTagsSample.js deleted file mode 100644 index 2b607242b9d7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/bastionHostsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates Tags for BastionHost resource - * - * @summary Updates Tags for BastionHost resource - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPatch.json - */ -async function patchBastionHost() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginUpdateTagsAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -async function main() { - await patchBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/bgpServiceCommunitiesListSample.js b/sdk/network/arm-network/samples/v36/javascript/bgpServiceCommunitiesListSample.js deleted file mode 100644 index f5e18f8f74c9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/bgpServiceCommunitiesListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the available bgp service communities. - * - * @summary Gets all the available bgp service communities. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceCommunityList.json - */ -async function serviceCommunityList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bgpServiceCommunities.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await serviceCommunityList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/checkDnsNameAvailabilitySample.js b/sdk/network/arm-network/samples/v36/javascript/checkDnsNameAvailabilitySample.js deleted file mode 100644 index 2071e7e3c4ab..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/checkDnsNameAvailabilitySample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * - * @summary Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckDnsNameAvailability.json - */ -async function checkDnsNameAvailability() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const domainNameLabel = "testdns"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.checkDnsNameAvailability(location, domainNameLabel); - console.log(result); -} - -async function main() { - await checkDnsNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsCreateOrUpdateSample.js deleted file mode 100644 index 347595d7c2c6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * - * @summary Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupPut.json - */ -async function configurationPolicyGroupPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const vpnServerConfigurationPolicyGroupParameters = { - isDefault: true, - policyMembers: [ - { - name: "policy1", - attributeType: "RadiusAzureGroupId", - attributeValue: "6ad1bd08", - }, - { - name: "policy2", - attributeType: "CertificateGroupId", - attributeValue: "red.com", - }, - ], - priority: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.configurationPolicyGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - vpnServerConfigurationPolicyGroupParameters, - ); - console.log(result); -} - -async function main() { - await configurationPolicyGroupPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsDeleteSample.js deleted file mode 100644 index dd1ffb1a6108..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a ConfigurationPolicyGroup. - * - * @summary Deletes a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupDelete.json - */ -async function configurationPolicyGroupDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.configurationPolicyGroups.beginDeleteAndWait( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - ); - console.log(result); -} - -async function main() { - await configurationPolicyGroupDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsGetSample.js deleted file mode 100644 index 888d6348cd57..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a ConfigurationPolicyGroup. - * - * @summary Retrieves the details of a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupGet.json - */ -async function configurationPolicyGroupGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.configurationPolicyGroups.get( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - ); - console.log(result); -} - -async function main() { - await configurationPolicyGroupGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js b/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js deleted file mode 100644 index ca24a9ad123a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * - * @summary Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json - */ -async function configurationPolicyGroupListByVpnServerConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.configurationPolicyGroups.listByVpnServerConfiguration( - resourceGroupName, - vpnServerConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await configurationPolicyGroupListByVpnServerConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsCreateOrUpdateSample.js deleted file mode 100644 index ea4fad4f01a7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsCreateOrUpdateSample.js +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorCreate.json - */ -async function createConnectionMonitorV1() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters = { - endpoints: [ - { - name: "source", - resourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/ct1", - }, - { name: "destination", address: "bing.com" }, - ], - location: "eastus", - testConfigurations: [ - { - name: "tcp", - tcpConfiguration: { port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "tg", - destinations: ["destination"], - sources: ["source"], - testConfigurations: ["tcp"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorV2Create.json - */ -async function createConnectionMonitorV2() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters = { - endpoints: [ - { - name: "vm1", - resourceId: - "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/NwRgIrinaCentralUSEUAP/providers/Microsoft.Compute/virtualMachines/vm1", - }, - { - name: "CanaryWorkspaceVamshi", - filter: { - type: "Include", - items: [{ type: "AgentAddress", address: "npmuser" }], - }, - resourceId: - "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/vasamudrRG/providers/Microsoft.OperationalInsights/workspaces/vasamudrWorkspace", - }, - { name: "bing", address: "bing.com" }, - { name: "google", address: "google.com" }, - ], - outputs: [], - testConfigurations: [ - { - name: "testConfig1", - tcpConfiguration: { disableTraceRoute: false, port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "test1", - destinations: ["bing", "google"], - disable: false, - sources: ["vm1", "CanaryWorkspaceVamshi"], - testConfigurations: ["testConfig1"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json - */ -async function createConnectionMonitorWithArcNetwork() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters = { - endpoints: [ - { - name: "vm1", - type: "AzureVM", - resourceId: - "/subscriptions/9cece3e3-0f7d-47ca-af0e-9772773f90b7/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/TESTVM", - }, - { name: "bing", type: "ExternalAddress", address: "bing.com" }, - { name: "google", type: "ExternalAddress", address: "google.com" }, - { - name: "ArcBasedNetwork", - type: "AzureArcNetwork", - locationDetails: { region: "eastus" }, - scope: { include: [{ address: "172.21.128.0/20" }] }, - subscriptionId: "9cece3e3-0f7d-47ca-af0e-9772773f90b7", - }, - ], - outputs: [], - testConfigurations: [ - { - name: "testConfig1", - tcpConfiguration: { disableTraceRoute: false, port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "test1", - destinations: ["bing", "google"], - disable: false, - sources: ["vm1", "ArcBasedNetwork"], - testConfigurations: ["testConfig1"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -async function main() { - await createConnectionMonitorV1(); - await createConnectionMonitorV2(); - await createConnectionMonitorWithArcNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsDeleteSample.js deleted file mode 100644 index 48656b24dcbb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified connection monitor. - * - * @summary Deletes the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorDelete.json - */ -async function deleteConnectionMonitor() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main() { - await deleteConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsGetSample.js deleted file mode 100644 index 99a8fc8163eb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a connection monitor by name. - * - * @summary Gets a connection monitor by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorGet.json - */ -async function getConnectionMonitor() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.get( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main() { - await getConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsListSample.js b/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsListSample.js deleted file mode 100644 index 7a609a98886d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all connection monitors for the specified Network Watcher. - * - * @summary Lists all connection monitors for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorList.json - */ -async function listConnectionMonitors() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.connectionMonitors.list(resourceGroupName, networkWatcherName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listConnectionMonitors(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsStopSample.js b/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsStopSample.js deleted file mode 100644 index 2c33ec2b4f90..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsStopSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops the specified connection monitor. - * - * @summary Stops the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorStop.json - */ -async function stopConnectionMonitor() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginStopAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main() { - await stopConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsUpdateTagsSample.js deleted file mode 100644 index 8ec6fb09f1e2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/connectionMonitorsUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update tags of the specified connection monitor. - * - * @summary Update tags of the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json - */ -async function updateConnectionMonitorTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.updateTags( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateConnectionMonitorTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index 23539e780cfb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates/Updates a new network manager connectivity configuration - * - * @summary Creates/Updates a new network manager connectivity configuration - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationPut.json - */ -async function connectivityConfigurationsPut() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const connectivityConfiguration = { - description: "Sample Configuration", - appliesToGroups: [ - { - groupConnectivity: "None", - isGlobal: "False", - networkGroupId: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/group1", - useHubGateway: "True", - }, - ], - connectivityCapabilities: { - connectedGroupAddressOverlap: "Allowed", - connectedGroupPrivateEndpointsScale: "Standard", - peeringEnforcement: "Unenforced", - }, - connectivityTopology: "HubAndSpoke", - deleteExistingPeering: "True", - hubs: [ - { - resourceId: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myTestConnectivityConfig", - resourceType: "Microsoft.Network/virtualNetworks", - }, - ], - isGlobal: "True", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - connectivityConfiguration, - ); - console.log(result); -} - -async function main() { - await connectivityConfigurationsPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsDeleteSample.js deleted file mode 100644 index 948df8fb2714..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * - * @summary Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json - */ -async function connectivityConfigurationsDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main() { - await connectivityConfigurationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsGetSample.js deleted file mode 100644 index 92bbd5feeb7c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * - * @summary Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationGet.json - */ -async function connectivityConfigurationsGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main() { - await connectivityConfigurationsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsListSample.js deleted file mode 100644 index 1fbdaad0ab15..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/connectivityConfigurationsListSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the network manager connectivity configuration in a specified network manager. - * - * @summary Lists all the network manager connectivity configuration in a specified network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationList.json - */ -async function connectivityConfigurationsList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.connectivityConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await connectivityConfigurationsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesCreateOrUpdateSample.js deleted file mode 100644 index 238952c642ae..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesCreateOrUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a custom IP prefix. - * - * @summary Creates or updates a custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixCreateCustomizedValues.json - */ -async function createCustomIPPrefixAllocationMethod() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const parameters = { cidr: "0.0.0.0/24", location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - customIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main() { - await createCustomIPPrefixAllocationMethod(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesDeleteSample.js deleted file mode 100644 index d7382fa71f29..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified custom IP prefix. - * - * @summary Deletes the specified custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixDelete.json - */ -async function deleteCustomIPPrefix() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.beginDeleteAndWait( - resourceGroupName, - customIpPrefixName, - ); - console.log(result); -} - -async function main() { - await deleteCustomIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesGetSample.js deleted file mode 100644 index c89333eb313a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified custom IP prefix in a specified resource group. - * - * @summary Gets the specified custom IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixGet.json - */ -async function getCustomIPPrefix() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.get(resourceGroupName, customIpPrefixName); - console.log(result); -} - -async function main() { - await getCustomIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesListAllSample.js deleted file mode 100644 index 32011f993b93..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the custom IP prefixes in a subscription. - * - * @summary Gets all the custom IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixListAll.json - */ -async function listAllCustomIPPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.customIPPrefixes.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllCustomIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesListSample.js b/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesListSample.js deleted file mode 100644 index bf99adefc79f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all custom IP prefixes in a resource group. - * - * @summary Gets all custom IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixList.json - */ -async function listResourceGroupCustomIPPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.customIPPrefixes.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listResourceGroupCustomIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesUpdateTagsSample.js deleted file mode 100644 index b628f9e36fa3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/customIPPrefixesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates custom IP prefix tags. - * - * @summary Updates custom IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixUpdateTags.json - */ -async function updatePublicIPAddressTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.updateTags( - resourceGroupName, - customIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main() { - await updatePublicIPAddressTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesCreateOrUpdateSample.js deleted file mode 100644 index 691ab43672fa..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a DDoS custom policy. - * - * @summary Creates or updates a DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyCreate.json - */ -async function createDDoSCustomPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const parameters = { - detectionRules: [ - { - name: "detectionRuleTcp", - detectionMode: "TrafficThreshold", - trafficDetectionRule: { packetsPerSecond: 1000000, trafficType: "Tcp" }, - }, - ], - location: "centraluseuap", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - ddosCustomPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await createDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesDeleteSample.js deleted file mode 100644 index 67351a71c0cf..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified DDoS custom policy. - * - * @summary Deletes the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyDelete.json - */ -async function deleteDDoSCustomPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.beginDeleteAndWait( - resourceGroupName, - ddosCustomPolicyName, - ); - console.log(result); -} - -async function main() { - await deleteDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesGetSample.js deleted file mode 100644 index c39b2def0b08..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified DDoS custom policy. - * - * @summary Gets information about the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyGet.json - */ -async function getDDoSCustomPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.get(resourceGroupName, ddosCustomPolicyName); - console.log(result); -} - -async function main() { - await getDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesUpdateTagsSample.js deleted file mode 100644 index 5a6f1844eddc..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ddosCustomPoliciesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update a DDoS custom policy tags. - * - * @summary Update a DDoS custom policy tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyUpdateTags.json - */ -async function dDoSCustomPolicyUpdateTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.updateTags( - resourceGroupName, - ddosCustomPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await dDoSCustomPolicyUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansCreateOrUpdateSample.js deleted file mode 100644 index 1d8988ee4b09..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansCreateOrUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a DDoS protection plan. - * - * @summary Creates or updates a DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanCreate.json - */ -async function createDDoSProtectionPlan() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const parameters = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.beginCreateOrUpdateAndWait( - resourceGroupName, - ddosProtectionPlanName, - parameters, - ); - console.log(result); -} - -async function main() { - await createDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansDeleteSample.js deleted file mode 100644 index edd0122eaa26..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified DDoS protection plan. - * - * @summary Deletes the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanDelete.json - */ -async function deleteDDoSProtectionPlan() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.beginDeleteAndWait( - resourceGroupName, - ddosProtectionPlanName, - ); - console.log(result); -} - -async function main() { - await deleteDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansGetSample.js b/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansGetSample.js deleted file mode 100644 index 58cd38d7dc78..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified DDoS protection plan. - * - * @summary Gets information about the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanGet.json - */ -async function getDDoSProtectionPlan() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.get(resourceGroupName, ddosProtectionPlanName); - console.log(result); -} - -async function main() { - await getDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansListByResourceGroupSample.js deleted file mode 100644 index 57cca8935b8d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the DDoS protection plans in a resource group. - * - * @summary Gets all the DDoS protection plans in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanList.json - */ -async function listDDoSProtectionPlansInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ddosProtectionPlans.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listDDoSProtectionPlansInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansListSample.js b/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansListSample.js deleted file mode 100644 index 8ca7f5642771..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all DDoS protection plans in a subscription. - * - * @summary Gets all DDoS protection plans in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanListAll.json - */ -async function listAllDDoSProtectionPlans() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ddosProtectionPlans.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllDDoSProtectionPlans(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansUpdateTagsSample.js deleted file mode 100644 index 7b6d2a752d6e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ddosProtectionPlansUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update a DDoS protection plan tags. - * - * @summary Update a DDoS protection plan tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanUpdateTags.json - */ -async function dDoSProtectionPlanUpdateTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.updateTags( - resourceGroupName, - ddosProtectionPlanName, - parameters, - ); - console.log(result); -} - -async function main() { - await dDoSProtectionPlanUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/defaultSecurityRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/defaultSecurityRulesGetSample.js deleted file mode 100644 index ca6407646ca9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/defaultSecurityRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified default network security rule. - * - * @summary Get the specified default network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DefaultSecurityRuleGet.json - */ -async function defaultSecurityRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkSecurityGroupName = "nsg1"; - const defaultSecurityRuleName = "AllowVnetInBound"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.defaultSecurityRules.get( - resourceGroupName, - networkSecurityGroupName, - defaultSecurityRuleName, - ); - console.log(result); -} - -async function main() { - await defaultSecurityRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/defaultSecurityRulesListSample.js b/sdk/network/arm-network/samples/v36/javascript/defaultSecurityRulesListSample.js deleted file mode 100644 index 6b6c2ea00e1e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/defaultSecurityRulesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all default security rules in a network security group. - * - * @summary Gets all default security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DefaultSecurityRuleList.json - */ -async function defaultSecurityRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkSecurityGroupName = "nsg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.defaultSecurityRules.list( - resourceGroupName, - networkSecurityGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await defaultSecurityRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/deleteBastionShareableLinkByTokenSample.js b/sdk/network/arm-network/samples/v36/javascript/deleteBastionShareableLinkByTokenSample.js deleted file mode 100644 index 02631124ad5b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/deleteBastionShareableLinkByTokenSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the Bastion Shareable Links for all the tokens specified in the request. - * - * @summary Deletes the Bastion Shareable Links for all the tokens specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkDeleteByToken.json - */ -async function deleteBastionShareableLinksForTheRequestVMS() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslTokenRequest = { - tokens: ["abcd1234-efgh-hijk-5678-abcdefgh1234", "dcba4321-hgfe-kjih-8765-hgfedcba4321"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginDeleteBastionShareableLinkByTokenAndWait( - resourceGroupName, - bastionHostName, - bslTokenRequest, - ); - console.log(result); -} - -async function main() { - await deleteBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/deleteBastionShareableLinkSample.js b/sdk/network/arm-network/samples/v36/javascript/deleteBastionShareableLinkSample.js deleted file mode 100644 index 1c90a5d71872..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/deleteBastionShareableLinkSample.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Deletes the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkDelete.json - */ -async function deleteBastionShareableLinksForTheRequestVMS() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginDeleteBastionShareableLinkAndWait( - resourceGroupName, - bastionHostName, - bslRequest, - ); - console.log(result); -} - -async function main() { - await deleteBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/disconnectActiveSessionsSample.js b/sdk/network/arm-network/samples/v36/javascript/disconnectActiveSessionsSample.js deleted file mode 100644 index ae002fced78f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/disconnectActiveSessionsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. - * - * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionSessionDelete.json - */ -async function deletesTheSpecifiedActiveSession() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const sessionIds = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.listDisconnectActiveSessions( - resourceGroupName, - bastionHostName, - sessionIds, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await deletesTheSpecifiedActiveSession(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationCreateOrUpdateSample.js deleted file mode 100644 index 6de1a57d1349..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationCreateOrUpdateSample.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a DSCP Configuration. - * - * @summary Creates or updates a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationCreate.json - */ -async function createDscpConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpconfig"; - const parameters = { - location: "eastus", - qosDefinitionCollection: [ - { - destinationIpRanges: [{ endIP: "127.0.10.2", startIP: "127.0.10.1" }], - destinationPortRanges: [{ end: 15, start: 15 }], - markings: [1], - sourceIpRanges: [{ endIP: "127.0.0.2", startIP: "127.0.0.1" }], - sourcePortRanges: [ - { end: 11, start: 10 }, - { end: 21, start: 20 }, - ], - protocol: "Tcp", - }, - { - destinationIpRanges: [{ endIP: "12.0.10.2", startIP: "12.0.10.1" }], - destinationPortRanges: [{ end: 52, start: 51 }], - markings: [2], - sourceIpRanges: [{ endIP: "12.0.0.2", startIP: "12.0.0.1" }], - sourcePortRanges: [{ end: 12, start: 11 }], - protocol: "Udp", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - dscpConfigurationName, - parameters, - ); - console.log(result); -} - -async function main() { - await createDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationDeleteSample.js deleted file mode 100644 index 3de6bea3f929..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a DSCP Configuration. - * - * @summary Deletes a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationDelete.json - */ -async function deleteDscpConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.beginDeleteAndWait( - resourceGroupName, - dscpConfigurationName, - ); - console.log(result); -} - -async function main() { - await deleteDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationGetSample.js b/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationGetSample.js deleted file mode 100644 index 9529e308b437..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a DSCP Configuration. - * - * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationGet.json - */ -async function getDscpConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.get( - resourceGroupName, - dscpConfigurationName, - ); - console.log(result); -} - -async function main() { - await getDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationListAllSample.js deleted file mode 100644 index 4b51ed38cd27..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all dscp configurations in a subscription. - * - * @summary Gets all dscp configurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationListAll.json - */ -async function listAllNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.dscpConfigurationOperations.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationListSample.js b/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationListSample.js deleted file mode 100644 index 76651ed0e717..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/dscpConfigurationListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a DSCP Configuration. - * - * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationList.json - */ -async function getDscpConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.dscpConfigurationOperations.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js deleted file mode 100644 index ac15e0dd3048..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an authorization in the specified express route circuit. - * - * @summary Creates or updates an authorization in the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json - */ -async function createExpressRouteCircuitAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizatinName"; - const authorizationParameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitAuthorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - authorizationName, - authorizationParameters, - ); - console.log(result); -} - -async function main() { - await createExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsDeleteSample.js deleted file mode 100644 index 6baa5a8fd5c1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified authorization from the specified express route circuit. - * - * @summary Deletes the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json - */ -async function deleteExpressRouteCircuitAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitAuthorizations.beginDeleteAndWait( - resourceGroupName, - circuitName, - authorizationName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsGetSample.js deleted file mode 100644 index db55ff9c0def..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified authorization from the specified express route circuit. - * - * @summary Gets the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationGet.json - */ -async function getExpressRouteCircuitAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitAuthorizations.get( - resourceGroupName, - circuitName, - authorizationName, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsListSample.js deleted file mode 100644 index 970431fdbfaf..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitAuthorizationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all authorizations in an express route circuit. - * - * @summary Gets all authorizations in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationList.json - */ -async function listExpressRouteCircuitAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitAuthorizations.list( - resourceGroupName, - circuitName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js deleted file mode 100644 index be638b45e4e4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @summary Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionCreate.json - */ -async function expressRouteCircuitConnectionCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const expressRouteCircuitConnectionParameters = { - addressPrefix: "10.0.0.0/29", - authorizationKey: "946a1918-b7a2-4917-b43c-8c4cdaee006a", - expressRouteCircuitPeering: { - id: "/subscriptions/subid1/resourceGroups/dedharcktinit/providers/Microsoft.Network/expressRouteCircuits/dedharcktlocal/peerings/AzurePrivatePeering", - }, - ipv6CircuitConnectionConfig: { addressPrefix: "aa:bb::/125" }, - peerExpressRouteCircuitPeering: { - id: "/subscriptions/subid2/resourceGroups/dedharcktpeer/providers/Microsoft.Network/expressRouteCircuits/dedharcktremote/peerings/AzurePrivatePeering", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - peeringName, - connectionName, - expressRouteCircuitConnectionParameters, - ); - console.log(result); -} - -async function main() { - await expressRouteCircuitConnectionCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsDeleteSample.js deleted file mode 100644 index e4d39a36fbb2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @summary Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionDelete.json - */ -async function deleteExpressRouteCircuit() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitConnections.beginDeleteAndWait( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsGetSample.js deleted file mode 100644 index aa86a2587e8b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Express Route Circuit Connection from the specified express route circuit. - * - * @summary Gets the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionGet.json - */ -async function expressRouteCircuitConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitConnections.get( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main() { - await expressRouteCircuitConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsListSample.js deleted file mode 100644 index a640464da9aa..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitConnectionsListSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all global reach connections associated with a private peering in an express route circuit. - * - * @summary Gets all global reach connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionList.json - */ -async function listExpressRouteCircuitConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitConnections.list( - resourceGroupName, - circuitName, - peeringName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteCircuitConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js deleted file mode 100644 index d75582826e91..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a peering in the specified express route circuits. - * - * @summary Creates or updates a peering in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringCreate.json - */ -async function createExpressRouteCircuitPeerings() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "AzurePrivatePeering"; - const peeringParameters = { - peerASN: 200, - primaryPeerAddressPrefix: "192.168.16.252/30", - secondaryPeerAddressPrefix: "192.168.18.252/30", - vlanId: 200, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - peeringName, - peeringParameters, - ); - console.log(result); -} - -async function main() { - await createExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsDeleteSample.js deleted file mode 100644 index 2ab3e3eb79fc..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified peering from the specified express route circuit. - * - * @summary Deletes the specified peering from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringDelete.json - */ -async function deleteExpressRouteCircuitPeerings() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitPeerings.beginDeleteAndWait( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsGetSample.js deleted file mode 100644 index fd6107a2db6a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified peering for the express route circuit. - * - * @summary Gets the specified peering for the express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringGet.json - */ -async function getExpressRouteCircuitPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "MicrosoftPeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitPeerings.get( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCircuitPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsListSample.js deleted file mode 100644 index d0bef0f10bea..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitPeeringsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all peerings in a specified express route circuit. - * - * @summary Gets all peerings in a specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringList.json - */ -async function listExpressRouteCircuitPeerings() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitPeerings.list( - resourceGroupName, - circuitName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsCreateOrUpdateSample.js deleted file mode 100644 index b757a6d80eb1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsCreateOrUpdateSample.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an express route circuit. - * - * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitCreate.json - */ -async function createExpressRouteCircuit() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const parameters = { - allowClassicOperations: false, - authorizations: [], - location: "Brazil South", - peerings: [], - serviceProviderProperties: { - bandwidthInMbps: 200, - peeringLocation: "Silicon Valley", - serviceProviderName: "Equinix", - }, - sku: { - name: "Standard_MeteredData", - family: "MeteredData", - tier: "Standard", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an express route circuit. - * - * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json - */ -async function createExpressRouteCircuitOnExpressRoutePort() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "expressRouteCircuit1"; - const parameters = { - authorizationKey: "b0be57f5-1fba-463b-adec-ffe767354cdd", - bandwidthInGbps: 10, - enableDirectPortRateLimit: false, - expressRoutePort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRoutePorts/portName", - }, - location: "westus", - sku: { - name: "Premium_MeteredData", - family: "MeteredData", - tier: "Premium", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -async function main() { - await createExpressRouteCircuit(); - await createExpressRouteCircuitOnExpressRoutePort(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsDeleteSample.js deleted file mode 100644 index b280a3cbcc9a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified express route circuit. - * - * @summary Deletes the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitDelete.json - */ -async function deleteExpressRouteCircuit() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginDeleteAndWait( - resourceGroupName, - circuitName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetPeeringStatsSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetPeeringStatsSample.js deleted file mode 100644 index 8d2dc6972e1e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetPeeringStatsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all stats from an express route circuit in a resource group. - * - * @summary Gets all stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringStats.json - */ -async function getExpressRouteCircuitPeeringTrafficStats() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.getPeeringStats( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCircuitPeeringTrafficStats(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetSample.js deleted file mode 100644 index 7179e596ccb4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified express route circuit. - * - * @summary Gets information about the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitGet.json - */ -async function getExpressRouteCircuit() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.get(resourceGroupName, circuitName); - console.log(result); -} - -async function main() { - await getExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetStatsSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetStatsSample.js deleted file mode 100644 index 8f7841772bad..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsGetStatsSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the stats from an express route circuit in a resource group. - * - * @summary Gets all the stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitStats.json - */ -async function getExpressRouteCircuitTrafficStats() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.getStats(resourceGroupName, circuitName); - console.log(result); -} - -async function main() { - await getExpressRouteCircuitTrafficStats(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListAllSample.js deleted file mode 100644 index 31c0631d3e87..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the express route circuits in a subscription. - * - * @summary Gets all the express route circuits in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitListBySubscription.json - */ -async function listExpressRouteCircuitsInASubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuits.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteCircuitsInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListArpTableSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListArpTableSample.js deleted file mode 100644 index 743ee7a9dc59..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListArpTableSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitARPTableList.json - */ -async function listArpTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListArpTableAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await listArpTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListRoutesTableSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListRoutesTableSample.js deleted file mode 100644 index 28caba9764d0..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListRoutesTableSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the currently advertised routes table associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised routes table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitRouteTableList.json - */ -async function listRouteTables() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListRoutesTableAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await listRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListRoutesTableSummarySample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListRoutesTableSummarySample.js deleted file mode 100644 index fdb9b8005cf1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListRoutesTableSummarySample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json - */ -async function listRouteTableSummary() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListRoutesTableSummaryAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await listRouteTableSummary(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListSample.js deleted file mode 100644 index 63ed96843a2c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the express route circuits in a resource group. - * - * @summary Gets all the express route circuits in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitListByResourceGroup.json - */ -async function listExpressRouteCircuitsInAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuits.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteCircuitsInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsUpdateTagsSample.js deleted file mode 100644 index 550bc556eff8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCircuitsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an express route circuit tags. - * - * @summary Updates an express route circuit tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitUpdateTags.json - */ -async function updateExpressRouteCircuitTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "ertest"; - const circuitName = "er1"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.updateTags( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateExpressRouteCircuitTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsCreateOrUpdateSample.js deleted file mode 100644 index f0bc7108d23f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * - * @summary Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionCreate.json - */ -async function expressRouteConnectionCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "gateway-2"; - const connectionName = "connectionName"; - const putExpressRouteConnectionParameters = { - name: "connectionName", - authorizationKey: "authorizationKey", - expressRouteCircuitPeering: { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering", - }, - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/gateway-2/expressRouteConnections/connectionName", - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - }, - routingWeight: 2, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRouteGatewayName, - connectionName, - putExpressRouteConnectionParameters, - ); - console.log(result); -} - -async function main() { - await expressRouteConnectionCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsDeleteSample.js deleted file mode 100644 index f32e40866013..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a connection to a ExpressRoute circuit. - * - * @summary Deletes a connection to a ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionDelete.json - */ -async function expressRouteConnectionDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const connectionName = "connectionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.beginDeleteAndWait( - resourceGroupName, - expressRouteGatewayName, - connectionName, - ); - console.log(result); -} - -async function main() { - await expressRouteConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsGetSample.js deleted file mode 100644 index dd19c09cdcfe..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified ExpressRouteConnection. - * - * @summary Gets the specified ExpressRouteConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionGet.json - */ -async function expressRouteConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const connectionName = "connectionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.get( - resourceGroupName, - expressRouteGatewayName, - connectionName, - ); - console.log(result); -} - -async function main() { - await expressRouteConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsListSample.js deleted file mode 100644 index 3e4b8cc45cc3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteConnectionsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists ExpressRouteConnections. - * - * @summary Lists ExpressRouteConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionList.json - */ -async function expressRouteConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.list( - resourceGroupName, - expressRouteGatewayName, - ); - console.log(result); -} - -async function main() { - await expressRouteConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js deleted file mode 100644 index 4000686dbbc7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @summary Creates or updates a peering in the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json - */ -async function expressRouteCrossConnectionBgpPeeringCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const peeringParameters = { - ipv6PeeringConfig: { - primaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::/126", - secondaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::4/126", - }, - peerASN: 200, - primaryPeerAddressPrefix: "192.168.16.252/30", - secondaryPeerAddressPrefix: "192.168.18.252/30", - vlanId: 200, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnectionPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - peeringParameters, - ); - console.log(result); -} - -async function main() { - await expressRouteCrossConnectionBgpPeeringCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js deleted file mode 100644 index 23230666105a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @summary Deletes the specified peering from the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json - */ -async function deleteExpressRouteCrossConnectionBgpPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnectionPeerings.beginDeleteAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRouteCrossConnectionBgpPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsGetSample.js deleted file mode 100644 index 2d191783fc14..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified peering for the ExpressRouteCrossConnection. - * - * @summary Gets the specified peering for the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json - */ -async function getExpressRouteCrossConnectionBgpPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnectionPeerings.get( - resourceGroupName, - crossConnectionName, - peeringName, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCrossConnectionBgpPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsListSample.js deleted file mode 100644 index 63e8983da2d0..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionPeeringsListSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @summary Gets all peerings in a specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json - */ -async function expressRouteCrossConnectionBgpPeeringList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnectionPeerings.list( - resourceGroupName, - crossConnectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRouteCrossConnectionBgpPeeringList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 2fe0714e600d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update the specified ExpressRouteCrossConnection. - * - * @summary Update the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionUpdate.json - */ -async function updateExpressRouteCrossConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const parameters = { - serviceProviderProvisioningState: "NotProvisioned", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - crossConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateExpressRouteCrossConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsGetSample.js deleted file mode 100644 index 154676c0088e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsGetSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets details about the specified ExpressRouteCrossConnection. - * - * @summary Gets details about the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionGet.json - */ -async function getExpressRouteCrossConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.get( - resourceGroupName, - crossConnectionName, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCrossConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListArpTableSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListArpTableSample.js deleted file mode 100644 index 004db974d397..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListArpTableSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @summary Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsArpTable.json - */ -async function getExpressRouteCrossConnectionsArpTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.beginListArpTableAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCrossConnectionsArpTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js deleted file mode 100644 index 9e04bf903e0f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @summary Retrieves all the ExpressRouteCrossConnections in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json - */ -async function expressRouteCrossConnectionListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnections.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRouteCrossConnectionListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListRoutesTableSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListRoutesTableSample.js deleted file mode 100644 index 2818f6d8b843..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListRoutesTableSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @summary Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json - */ -async function getExpressRouteCrossConnectionsRouteTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.beginListRoutesTableAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCrossConnectionsRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js deleted file mode 100644 index 4d72f67df178..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the route table summary associated with the express route cross connection in a resource group. - * - * @summary Gets the route table summary associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json - */ -async function getExpressRouteCrossConnectionsRouteTableSummary() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.beginListRoutesTableSummaryAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main() { - await getExpressRouteCrossConnectionsRouteTableSummary(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListSample.js deleted file mode 100644 index 0e44faf1d74d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @summary Retrieves all the ExpressRouteCrossConnections in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionList.json - */ -async function expressRouteCrossConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnections.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRouteCrossConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsUpdateTagsSample.js deleted file mode 100644 index 3d70681e6818..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteCrossConnectionsUpdateTagsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an express route cross connection tags. - * - * @summary Updates an express route cross connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json - */ -async function updateExpressRouteCrossConnectionTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const crossConnectionParameters = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.updateTags( - resourceGroupName, - crossConnectionName, - crossConnectionParameters, - ); - console.log(result); -} - -async function main() { - await updateExpressRouteCrossConnectionTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysCreateOrUpdateSample.js deleted file mode 100644 index e4c695d710af..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a ExpressRoute gateway in a specified resource group. - * - * @summary Creates or updates a ExpressRoute gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayCreate.json - */ -async function expressRouteGatewayCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "gateway-2"; - const putExpressRouteGatewayParameters = { - allowNonVirtualWanTraffic: false, - autoScaleConfiguration: { bounds: { min: 3 } }, - location: "westus", - virtualHub: { - id: "/subscriptions/subid/resourceGroups/resourceGroupId/providers/Microsoft.Network/virtualHubs/virtualHubName", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRouteGatewayName, - putExpressRouteGatewayParameters, - ); - console.log(result); -} - -async function main() { - await expressRouteGatewayCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysDeleteSample.js deleted file mode 100644 index 3cef67f1f17c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * - * @summary Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayDelete.json - */ -async function expressRouteGatewayDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginDeleteAndWait( - resourceGroupName, - expressRouteGatewayName, - ); - console.log(result); -} - -async function main() { - await expressRouteGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysGetSample.js deleted file mode 100644 index d5543040e759..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Fetches the details of a ExpressRoute gateway in a resource group. - * - * @summary Fetches the details of a ExpressRoute gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayGet.json - */ -async function expressRouteGatewayGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.get(resourceGroupName, expressRouteGatewayName); - console.log(result); -} - -async function main() { - await expressRouteGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysListByResourceGroupSample.js deleted file mode 100644 index 8abe3b55f1c4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysListByResourceGroupSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists ExpressRoute gateways in a given resource group. - * - * @summary Lists ExpressRoute gateways in a given resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayListByResourceGroup.json - */ -async function expressRouteGatewayListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.listByResourceGroup(resourceGroupName); - console.log(result); -} - -async function main() { - await expressRouteGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysListBySubscriptionSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysListBySubscriptionSample.js deleted file mode 100644 index 9637944ce30f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysListBySubscriptionSample.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists ExpressRoute gateways under a given subscription. - * - * @summary Lists ExpressRoute gateways under a given subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayListBySubscription.json - */ -async function expressRouteGatewayListBySubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.listBySubscription(); - console.log(result); -} - -async function main() { - await expressRouteGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysUpdateTagsSample.js deleted file mode 100644 index a077dad9ac19..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates express route gateway tags. - * - * @summary Updates express route gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayUpdateTags.json - */ -async function expressRouteGatewayUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const expressRouteGatewayParameters = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginUpdateTagsAndWait( - resourceGroupName, - expressRouteGatewayName, - expressRouteGatewayParameters, - ); - console.log(result); -} - -async function main() { - await expressRouteGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteLinksGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteLinksGetSample.js deleted file mode 100644 index 36f83fabc330..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteLinksGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the specified ExpressRouteLink resource. - * - * @summary Retrieves the specified ExpressRouteLink resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteLinkGet.json - */ -async function expressRouteLinkGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const linkName = "linkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteLinks.get( - resourceGroupName, - expressRoutePortName, - linkName, - ); - console.log(result); -} - -async function main() { - await expressRouteLinkGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteLinksListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteLinksListSample.js deleted file mode 100644 index 1d76b5e76c96..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteLinksListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * - * @summary Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteLinkList.json - */ -async function expressRouteLinkGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteLinks.list(resourceGroupName, expressRoutePortName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRouteLinkGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js deleted file mode 100644 index e9129eb1e755..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an authorization in the specified express route port. - * - * @summary Creates or updates an authorization in the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationCreate.json - */ -async function createExpressRoutePortAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizatinName"; - const authorizationParameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortAuthorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - authorizationName, - authorizationParameters, - ); - console.log(result); -} - -async function main() { - await createExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsDeleteSample.js deleted file mode 100644 index cea80a74c910..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified authorization from the specified express route port. - * - * @summary Deletes the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationDelete.json - */ -async function deleteExpressRoutePortAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortAuthorizations.beginDeleteAndWait( - resourceGroupName, - expressRoutePortName, - authorizationName, - ); - console.log(result); -} - -async function main() { - await deleteExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsGetSample.js deleted file mode 100644 index 0c3af24e0417..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified authorization from the specified express route port. - * - * @summary Gets the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationGet.json - */ -async function getExpressRoutePortAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortAuthorizations.get( - resourceGroupName, - expressRoutePortName, - authorizationName, - ); - console.log(result); -} - -async function main() { - await getExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsListSample.js deleted file mode 100644 index bb44aaa3cc82..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortAuthorizationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all authorizations in an express route port. - * - * @summary Gets all authorizations in an express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationList.json - */ -async function listExpressRoutePortAuthorization() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePortAuthorizations.list( - resourceGroupName, - expressRoutePortName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsCreateOrUpdateSample.js deleted file mode 100644 index 263f339657a9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsCreateOrUpdateSample.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. - * - * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortCreate.json - */ -async function expressRoutePortCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters = { - bandwidthInGbps: 100, - billingType: "UnlimitedData", - encapsulation: "QinQ", - location: "westus", - peeringLocation: "peeringLocationName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. - * - * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortUpdateLink.json - */ -async function expressRoutePortUpdateLink() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters = { - bandwidthInGbps: 100, - billingType: "UnlimitedData", - encapsulation: "QinQ", - links: [{ name: "link1", adminState: "Enabled" }], - location: "westus", - peeringLocation: "peeringLocationName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -async function main() { - await expressRoutePortCreate(); - await expressRoutePortUpdateLink(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsDeleteSample.js deleted file mode 100644 index beb4d152c916..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified ExpressRoutePort resource. - * - * @summary Deletes the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortDelete.json - */ -async function expressRoutePortDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginDeleteAndWait( - resourceGroupName, - expressRoutePortName, - ); - console.log(result); -} - -async function main() { - await expressRoutePortDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsGenerateLoaSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsGenerateLoaSample.js deleted file mode 100644 index 36ec844ded92..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsGenerateLoaSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Generate a letter of authorization for the requested ExpressRoutePort resource. - * - * @summary Generate a letter of authorization for the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GenerateExpressRoutePortsLOA.json - */ -async function generateExpressRoutePortLoa() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const request = { - customerName: "customerName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.generateLOA( - resourceGroupName, - expressRoutePortName, - request, - ); - console.log(result); -} - -async function main() { - await generateExpressRoutePortLoa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsGetSample.js deleted file mode 100644 index d3646c266f94..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the requested ExpressRoutePort resource. - * - * @summary Retrieves the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortGet.json - */ -async function expressRoutePortGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.get(resourceGroupName, expressRoutePortName); - console.log(result); -} - -async function main() { - await expressRoutePortGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsListByResourceGroupSample.js deleted file mode 100644 index a48f3f7be2eb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all the ExpressRoutePort resources in the specified resource group. - * - * @summary List all the ExpressRoutePort resources in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortListByResourceGroup.json - */ -async function expressRoutePortListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePorts.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRoutePortListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsListSample.js deleted file mode 100644 index b37ac523bf37..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all the ExpressRoutePort resources in the specified subscription. - * - * @summary List all the ExpressRoutePort resources in the specified subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortList.json - */ -async function expressRoutePortList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePorts.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRoutePortList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsLocationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsLocationsGetSample.js deleted file mode 100644 index a62be6357208..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsLocationsGetSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * - * @summary Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortsLocationGet.json - */ -async function expressRoutePortsLocationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const locationName = "locationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortsLocations.get(locationName); - console.log(result); -} - -async function main() { - await expressRoutePortsLocationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsLocationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsLocationsListSample.js deleted file mode 100644 index 6501b317056e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsLocationsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * - * @summary Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortsLocationList.json - */ -async function expressRoutePortsLocationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePortsLocations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await expressRoutePortsLocationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsUpdateTagsSample.js deleted file mode 100644 index 7a2faf74bfc9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRoutePortsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update ExpressRoutePort tags. - * - * @summary Update ExpressRoutePort tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortUpdateTags.json - */ -async function expressRoutePortUpdateTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.updateTags( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -async function main() { - await expressRoutePortUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteProviderPortSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteProviderPortSample.js deleted file mode 100644 index d3427c6a1d68..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteProviderPortSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves detail of a provider port. - * - * @summary Retrieves detail of a provider port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/expressRouteProviderPort.json - */ -async function expressRouteProviderPort() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const providerport = "abc"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteProviderPort(providerport); - console.log(result); -} - -async function main() { - await expressRouteProviderPort(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteProviderPortsLocationListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteProviderPortsLocationListSample.js deleted file mode 100644 index 45a274c66611..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteProviderPortsLocationListSample.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteProviderPorts in a subscription. - * - * @summary Retrieves all the ExpressRouteProviderPorts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/expressRouteProviderPortList.json - */ -async function expressRouteProviderPortList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteProviderPortsLocation.list(); - console.log(result); -} - -async function main() { - await expressRouteProviderPortList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/expressRouteServiceProvidersListSample.js b/sdk/network/arm-network/samples/v36/javascript/expressRouteServiceProvidersListSample.js deleted file mode 100644 index fd42f1401143..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/expressRouteServiceProvidersListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the available express route service providers. - * - * @summary Gets all the available express route service providers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteProviderList.json - */ -async function listExpressRouteProviders() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteServiceProviders.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listExpressRouteProviders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesCreateOrUpdateSample.js deleted file mode 100644 index 7933b2489f16..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Firewall Policy. - * - * @summary Creates or updates the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyPut.json - */ -async function createFirewallPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - dnsSettings: { - enableProxy: true, - requireProxyForNetworkRules: false, - servers: ["30.3.4.5"], - }, - explicitProxy: { - enableExplicitProxy: true, - enablePacFile: true, - httpPort: 8087, - httpsPort: 8087, - pacFile: - "https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D", - pacFilePort: 8087, - }, - insights: { - isEnabled: true, - logAnalyticsResources: { - defaultWorkspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", - }, - workspaces: [ - { - region: "westus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", - }, - }, - { - region: "eastus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", - }, - }, - ], - }, - retentionDays: 100, - }, - intrusionDetection: { - configuration: { - bypassTrafficSettings: [ - { - name: "bypassRule1", - description: "Rule 1", - destinationAddresses: ["5.6.7.8"], - destinationPorts: ["*"], - sourceAddresses: ["1.2.3.4"], - protocol: "TCP", - }, - ], - signatureOverrides: [{ id: "2525004", mode: "Deny" }], - }, - mode: "Alert", - profile: "Core", - }, - location: "West US", - sku: { tier: "Premium" }, - snat: { privateRanges: ["IANAPrivateRanges"] }, - sql: { allowSqlRedirect: true }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - threatIntelWhitelist: { - fqdns: ["*.microsoft.com"], - ipAddresses: ["20.3.4.5"], - }, - transportSecurity: { - certificateAuthority: { - name: "clientcert", - keyVaultSecretId: "https://kv/secret", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await createFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesDeleteSample.js deleted file mode 100644 index e97f29f524e1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Firewall Policy. - * - * @summary Deletes the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDelete.json - */ -async function deleteFirewallPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.beginDeleteAndWait( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main() { - await deleteFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesGetSample.js deleted file mode 100644 index 48fe7459034f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Firewall Policy. - * - * @summary Gets the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyGet.json - */ -async function getFirewallPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.get(resourceGroupName, firewallPolicyName); - console.log(result); -} - -async function main() { - await getFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesListAllSample.js deleted file mode 100644 index e9609726c945..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Firewall Policies in a subscription. - * - * @summary Gets all the Firewall Policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyListBySubscription.json - */ -async function listAllFirewallPoliciesForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicies.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllFirewallPoliciesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesListSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesListSample.js deleted file mode 100644 index ba7cae6261d6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Firewall Policies in a resource group. - * - * @summary Lists all Firewall Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyListByResourceGroup.json - */ -async function listAllFirewallPoliciesForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicies.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllFirewallPoliciesForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesUpdateTagsSample.js deleted file mode 100644 index 8102a7ce9924..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPoliciesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of a Azure Firewall Policy resource. - * - * @summary Updates tags of a Azure Firewall Policy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyPatch.json - */ -async function updateFirewallPolicyTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.updateTags( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateFirewallPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDeploymentsDeploySample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDeploymentsDeploySample.js deleted file mode 100644 index c3405d32421a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDeploymentsDeploySample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deploys the firewall policy draft and child rule collection group drafts. - * - * @summary Deploys the firewall policy draft and child rule collection group drafts. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftDeploy.json - */ -async function deployFirewallPolicyDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDeployments.beginDeployAndWait( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main() { - await deployFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsCreateOrUpdateSample.js deleted file mode 100644 index 82e498f6e82a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsCreateOrUpdateSample.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or update a draft Firewall Policy. - * - * @summary Create or update a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftPut.json - */ -async function createOrUpdateFirewallPolicyDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - dnsSettings: { - enableProxy: true, - requireProxyForNetworkRules: false, - servers: ["30.3.4.5"], - }, - explicitProxy: { - enableExplicitProxy: true, - enablePacFile: true, - httpPort: 8087, - httpsPort: 8087, - pacFile: - "https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D", - pacFilePort: 8087, - }, - insights: { - isEnabled: true, - logAnalyticsResources: { - defaultWorkspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", - }, - workspaces: [ - { - region: "westus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", - }, - }, - { - region: "eastus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", - }, - }, - ], - }, - retentionDays: 100, - }, - intrusionDetection: { - configuration: { - bypassTrafficSettings: [ - { - name: "bypassRule1", - description: "Rule 1", - destinationAddresses: ["5.6.7.8"], - destinationPorts: ["*"], - sourceAddresses: ["1.2.3.4"], - protocol: "TCP", - }, - ], - signatureOverrides: [{ id: "2525004", mode: "Deny" }], - }, - mode: "Alert", - profile: "Balanced", - }, - snat: { privateRanges: ["IANAPrivateRanges"] }, - sql: { allowSqlRedirect: true }, - threatIntelMode: "Alert", - threatIntelWhitelist: { - fqdns: ["*.microsoft.com"], - ipAddresses: ["20.3.4.5"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.createOrUpdate( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsDeleteSample.js deleted file mode 100644 index 2317116f3a82..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete a draft policy. - * - * @summary Delete a draft policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftDelete.json - */ -async function deleteFirewallPolicyDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.delete(resourceGroupName, firewallPolicyName); - console.log(result); -} - -async function main() { - await deleteFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsGetSample.js deleted file mode 100644 index 86962f41ce49..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyDraftsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get a draft Firewall Policy. - * - * @summary Get a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftGet.json - */ -async function getFirewallPolicyDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.get(resourceGroupName, firewallPolicyName); - console.log(result); -} - -async function main() { - await getFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js deleted file mode 100644 index 622cfcb1f5c6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the current filter values for the signatures overrides - * - * @summary Retrieves the current filter values for the signatures overrides - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json - */ -async function querySignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - filterName: "severity", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesFilterValues.list( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await querySignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesListSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesListSample.js deleted file mode 100644 index 639f0060c2ed..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesListSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * - * @summary Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyQuerySignatureOverrides.json - */ -async function querySignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - filters: [{ field: "Mode", values: ["Deny"] }], - orderBy: { field: "severity", order: "Ascending" }, - resultsPerPage: 20, - search: "", - skip: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignatures.list( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await querySignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js deleted file mode 100644 index 1fbc284fc25c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all signatures overrides for a specific policy. - * - * @summary Returns all signatures overrides for a specific policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesGet.json - */ -async function getSignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.get( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main() { - await getSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js deleted file mode 100644 index 7d2aa320accd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all signatures overrides objects for a specific policy as a list containing a single value. - * - * @summary Returns all signatures overrides objects for a specific policy as a list containing a single value. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesList.json - */ -async function getSignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.list( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main() { - await getSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js deleted file mode 100644 index 059f92f65027..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Will update the status of policy's signature overrides for IDPS - * - * @summary Will update the status of policy's signature overrides for IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesPatch.json - */ -async function patchSignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - name: "default", - type: "Microsoft.Network/firewallPolicies/signatureOverrides", - id: "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", - properties: { signatures: { 2000105: "Off", 2000106: "Deny" } }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.patch( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await patchSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js deleted file mode 100644 index f65010aa57a5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Will override/create a new signature overrides for the policy's IDPS - * - * @summary Will override/create a new signature overrides for the policy's IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesPut.json - */ -async function putSignatureOverrides() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters = { - name: "default", - type: "Microsoft.Network/firewallPolicies/signatureOverrides", - id: "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", - properties: { signatures: { 2000105: "Off", 2000106: "Deny" } }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.put( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await putSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js deleted file mode 100644 index c9f4027e7976..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or Update Rule Collection Group Draft. - * - * @summary Create or Update Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json - */ -async function createOrUpdateRuleCollectionGroupDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 100, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - priority: 100, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-rule1", - destinationAddresses: ["*"], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceAddresses: ["10.1.25.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroupDrafts.createOrUpdate( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js deleted file mode 100644 index e66c952b15a4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete Rule Collection Group Draft. - * - * @summary Delete Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json - */ -async function deleteFirewallRuleCollectionGroupDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroupDrafts.delete( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main() { - await deleteFirewallRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js deleted file mode 100644 index 380f36d6a2cd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get Rule Collection Group Draft. - * - * @summary Get Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json - */ -async function getRuleCollectionGroupDraft() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroupDrafts.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main() { - await getRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js deleted file mode 100644 index e91f05ad9e94..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json - */ -async function createFirewallPolicyNatRuleCollectionGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 100, - ruleCollections: [ - { - name: "Example-Nat-Rule-Collection", - action: { type: "DNAT" }, - priority: 100, - ruleCollectionType: "FirewallPolicyNatRuleCollection", - rules: [ - { - name: "nat-rule1", - destinationAddresses: ["152.23.32.23"], - destinationPorts: ["8080"], - ipProtocols: ["TCP", "UDP"], - ruleType: "NatRule", - sourceAddresses: ["2.2.2.2"], - sourceIpGroups: [], - translatedFqdn: "internalhttp.server.net", - translatedPort: "8080", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupPut.json - */ -async function createFirewallPolicyRuleCollectionGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 100, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - priority: 100, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-rule1", - destinationAddresses: ["*"], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceAddresses: ["10.1.25.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json - */ -async function createFirewallPolicyRuleCollectionGroupWithIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-1", - destinationIpGroups: [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups2", - ], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceIpGroups: [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups1", - ], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json - */ -async function createFirewallPolicyRuleCollectionGroupWithWebCategories() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - ruleType: "ApplicationRule", - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - webCategories: ["Hacking"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json - */ -async function createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Allow" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "rule1", - description: "Insert trusted tenants header", - fqdnTags: ["WindowsVirtualDesktop"], - httpHeadersToInsert: [ - { - headerName: "Restrict-Access-To-Tenants", - headerValue: "contoso.com,fabrikam.onmicrosoft.com", - }, - ], - protocols: [{ port: 80, protocolType: "Http" }], - ruleType: "ApplicationRule", - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await createFirewallPolicyNatRuleCollectionGroup(); - await createFirewallPolicyRuleCollectionGroup(); - await createFirewallPolicyRuleCollectionGroupWithIPGroups(); - await createFirewallPolicyRuleCollectionGroupWithWebCategories(); - await createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js deleted file mode 100644 index 311df80ae31e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Deletes the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json - */ -async function deleteFirewallPolicyRuleCollectionGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.beginDeleteAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main() { - await deleteFirewallPolicyRuleCollectionGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsGetSample.js deleted file mode 100644 index a18c1441dcb7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsGetSample.js +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json - */ -async function getFirewallPolicyNatRuleCollectionGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupGet.json - */ -async function getFirewallPolicyRuleCollectionGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json - */ -async function getFirewallPolicyRuleCollectionGroupWithIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json - */ -async function getFirewallPolicyRuleCollectionGroupWithWebCategories() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main() { - await getFirewallPolicyNatRuleCollectionGroup(); - await getFirewallPolicyRuleCollectionGroup(); - await getFirewallPolicyRuleCollectionGroupWithIPGroups(); - await getFirewallPolicyRuleCollectionGroupWithWebCategories(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsListSample.js b/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsListSample.js deleted file mode 100644 index d3b79837131a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/firewallPolicyRuleCollectionGroupsListSample.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllFirewallPolicyRuleCollectionGroupWithWebCategories(); - await listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy(); - await listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/flowLogsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/flowLogsCreateOrUpdateSample.js deleted file mode 100644 index ea5cc6145fe2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/flowLogsCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or update a flow log for the specified network security group. - * - * @summary Create or update a flow log for the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogCreate.json - */ -async function createOrUpdateFlowLog() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "fl"; - const parameters = { - format: { type: "JSON", version: 1 }, - enabled: true, - enabledFilteringCriteria: "srcIP=158.255.7.8 || dstPort=56891", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": - {}, - }, - }, - location: "centraluseuap", - recordTypes: "B,E", - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/flowLogsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/flowLogsDeleteSample.js deleted file mode 100644 index d50bb6799b1e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/flowLogsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified flow log resource. - * - * @summary Deletes the specified flow log resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogDelete.json - */ -async function deleteFlowLog() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "fl"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - flowLogName, - ); - console.log(result); -} - -async function main() { - await deleteFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/flowLogsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/flowLogsGetSample.js deleted file mode 100644 index 2d9de37fd454..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/flowLogsGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a flow log resource by name. - * - * @summary Gets a flow log resource by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogGet.json - */ -async function getFlowLog() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "flowLog1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.get(resourceGroupName, networkWatcherName, flowLogName); - console.log(result); -} - -async function main() { - await getFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/flowLogsListSample.js b/sdk/network/arm-network/samples/v36/javascript/flowLogsListSample.js deleted file mode 100644 index 45def6a36abd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/flowLogsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all flow log resources for the specified Network Watcher. - * - * @summary Lists all flow log resources for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogList.json - */ -async function listConnectionMonitors() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.flowLogs.list(resourceGroupName, networkWatcherName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listConnectionMonitors(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/flowLogsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/flowLogsUpdateTagsSample.js deleted file mode 100644 index 01c770659830..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/flowLogsUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update tags of the specified flow log. - * - * @summary Update tags of the specified flow log. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogUpdateTags.json - */ -async function updateFlowLogTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw"; - const flowLogName = "fl"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.updateTags( - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateFlowLogTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js b/sdk/network/arm-network/samples/v36/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js deleted file mode 100644 index 8662141e531b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * - * @summary Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json - */ -async function generateVirtualWanVpnServerConfigurationVpnProfile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const vpnClientParams = { - authenticationMethod: "EAPTLS", - vpnServerConfigurationResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnconfig1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginGeneratevirtualwanvpnserverconfigurationvpnprofileAndWait( - resourceGroupName, - virtualWANName, - vpnClientParams, - ); - console.log(result); -} - -async function main() { - await generateVirtualWanVpnServerConfigurationVpnProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/getActiveSessionsSample.js b/sdk/network/arm-network/samples/v36/javascript/getActiveSessionsSample.js deleted file mode 100644 index 8afcdfb8f748..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/getActiveSessionsSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. - * - * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionSessionsList.json - */ -async function returnsAListOfCurrentlyActiveSessionsOnTheBastion() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.beginListActiveSessionsAndWait( - resourceGroupName, - bastionHostName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await returnsAListOfCurrentlyActiveSessionsOnTheBastion(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/getBastionShareableLinkSample.js b/sdk/network/arm-network/samples/v36/javascript/getBastionShareableLinkSample.js deleted file mode 100644 index 28d1fc5a8f7d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/getBastionShareableLinkSample.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Return the Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Return the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkGet.json - */ -async function returnsTheBastionShareableLinksForTheRequestVMS() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.listBastionShareableLink( - resourceGroupName, - bastionHostName, - bslRequest, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await returnsTheBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesCreateOrUpdateSample.js deleted file mode 100644 index 211f2cd295dd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * - * @summary Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTablePut.json - */ -async function routeTablePut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const routeTableParameters = { - labels: ["label1", "label2"], - routes: [ - { - name: "route1", - destinationType: "CIDR", - destinations: ["10.0.0.0/8", "20.0.0.0/8", "30.0.0.0/8"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1", - nextHopType: "ResourceId", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - routeTableParameters, - ); - console.log(result); -} - -async function main() { - await routeTablePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesDeleteSample.js deleted file mode 100644 index ffd54cd6198b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a RouteTable. - * - * @summary Deletes a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableDelete.json - */ -async function routeTableDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main() { - await routeTableDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesGetSample.js deleted file mode 100644 index ed2dd38baa07..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a RouteTable. - * - * @summary Retrieves the details of a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableGet.json - */ -async function routeTableGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.get(resourceGroupName, virtualHubName, routeTableName); - console.log(result); -} - -async function main() { - await routeTableGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesListSample.js b/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesListSample.js deleted file mode 100644 index ece2e2f7f9eb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/hubRouteTablesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all RouteTables. - * - * @summary Retrieves the details of all RouteTables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableList.json - */ -async function routeTableList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.hubRouteTables.list(resourceGroupName, virtualHubName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routeTableList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js deleted file mode 100644 index e9f1f8a0b0b5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * - * @summary Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionPut.json - */ -async function hubVirtualNetworkConnectionPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const hubVirtualNetworkConnectionParameters = { - enableInternetSecurity: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/SpokeVnet1", - }, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - ], - labels: ["label1", "label2"], - }, - vnetRoutes: { - staticRoutes: [ - { - name: "route1", - addressPrefixes: ["10.1.0.0/16", "10.2.0.0/16"], - nextHopIpAddress: "10.0.0.68", - }, - { - name: "route2", - addressPrefixes: ["10.3.0.0/16", "10.4.0.0/16"], - nextHopIpAddress: "10.0.0.65", - }, - ], - staticRoutesConfig: { vnetLocalRouteOverrideCriteria: "Equal" }, - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - connectionName, - hubVirtualNetworkConnectionParameters, - ); - console.log(result); -} - -async function main() { - await hubVirtualNetworkConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsDeleteSample.js deleted file mode 100644 index 81f96d2f58e2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a HubVirtualNetworkConnection. - * - * @summary Deletes a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionDelete.json - */ -async function hubVirtualNetworkConnectionDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await hubVirtualNetworkConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsGetSample.js deleted file mode 100644 index 87d4e0c7ab19..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a HubVirtualNetworkConnection. - * - * @summary Retrieves the details of a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionGet.json - */ -async function hubVirtualNetworkConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.get( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await hubVirtualNetworkConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsListSample.js deleted file mode 100644 index 49e0799e0fa7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/hubVirtualNetworkConnectionsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all HubVirtualNetworkConnections. - * - * @summary Retrieves the details of all HubVirtualNetworkConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionList.json - */ -async function hubVirtualNetworkConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.hubVirtualNetworkConnections.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await hubVirtualNetworkConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesCreateOrUpdateSample.js deleted file mode 100644 index 805fda8538eb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a load balancer inbound NAT rule. - * - * @summary Creates or updates a load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleCreate.json - */ -async function inboundNatRuleCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const inboundNatRuleParameters = { - backendPort: 3389, - enableFloatingIP: false, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/ip1", - }, - frontendPort: 3390, - idleTimeoutInMinutes: 4, - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - inboundNatRuleParameters, - ); - console.log(result); -} - -async function main() { - await inboundNatRuleCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesDeleteSample.js deleted file mode 100644 index d698783edaea..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified load balancer inbound NAT rule. - * - * @summary Deletes the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleDelete.json - */ -async function inboundNatRuleDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - ); - console.log(result); -} - -async function main() { - await inboundNatRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesGetSample.js deleted file mode 100644 index 08b08ea9b457..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified load balancer inbound NAT rule. - * - * @summary Gets the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleGet.json - */ -async function inboundNatRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.get( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - ); - console.log(result); -} - -async function main() { - await inboundNatRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesListSample.js b/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesListSample.js deleted file mode 100644 index 25425199a867..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/inboundNatRulesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the inbound NAT rules in a load balancer. - * - * @summary Gets all the inbound NAT rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleList.json - */ -async function inboundNatRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.inboundNatRules.list(resourceGroupName, loadBalancerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await inboundNatRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/inboundSecurityRuleCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/inboundSecurityRuleCreateOrUpdateSample.js deleted file mode 100644 index b78ea260c90b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/inboundSecurityRuleCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * - * @summary Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundSecurityRulePut.json - */ -async function createNetworkVirtualApplianceInboundSecurityRules() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const ruleCollectionName = "rule1"; - const parameters = { - ruleType: "Permanent", - rules: [ - { - name: "inboundRule1", - appliesOn: ["slbip1"], - destinationPortRange: 22, - destinationPortRanges: ["80-100"], - sourceAddressPrefix: "50.20.121.5/32", - protocol: "TCP", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundSecurityRuleOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkVirtualApplianceInboundSecurityRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/inboundSecurityRuleGetSample.js b/sdk/network/arm-network/samples/v36/javascript/inboundSecurityRuleGetSample.js deleted file mode 100644 index 8aec47a7a899..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/inboundSecurityRuleGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * - * @summary Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundSecurityRuleGet.json - */ -async function createNetworkVirtualApplianceInboundSecurityRules() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const ruleCollectionName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundSecurityRuleOperations.get( - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - ); - console.log(result); -} - -async function main() { - await createNetworkVirtualApplianceInboundSecurityRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/ipAllocationsCreateOrUpdateSample.js deleted file mode 100644 index b48e91c1a032..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an IpAllocation in the specified resource group. - * - * @summary Creates or updates an IpAllocation in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationCreate.json - */ -async function createIPAllocation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const parameters = { - typePropertiesType: "Hypernet", - allocationTags: { - vNetID: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1", - }, - location: "centraluseuap", - prefix: "3.2.5.0/24", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.beginCreateOrUpdateAndWait( - resourceGroupName, - ipAllocationName, - parameters, - ); - console.log(result); -} - -async function main() { - await createIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/ipAllocationsDeleteSample.js deleted file mode 100644 index 70897367dc74..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified IpAllocation. - * - * @summary Deletes the specified IpAllocation. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationDelete.json - */ -async function deleteIPAllocation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.beginDeleteAndWait(resourceGroupName, ipAllocationName); - console.log(result); -} - -async function main() { - await deleteIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/ipAllocationsGetSample.js deleted file mode 100644 index 1710403ce45b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified IpAllocation by resource group. - * - * @summary Gets the specified IpAllocation by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationGet.json - */ -async function getIPAllocation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.get(resourceGroupName, ipAllocationName); - console.log(result); -} - -async function main() { - await getIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/ipAllocationsListByResourceGroupSample.js deleted file mode 100644 index 64c24614ae7c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all IpAllocations in a resource group. - * - * @summary Gets all IpAllocations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationListByResourceGroup.json - */ -async function listIPAllocationsInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipAllocations.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listIPAllocationsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/ipAllocationsListSample.js deleted file mode 100644 index 2e430175b59e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all IpAllocations in a subscription. - * - * @summary Gets all IpAllocations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationList.json - */ -async function listAllIPAllocations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipAllocations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllIPAllocations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/ipAllocationsUpdateTagsSample.js deleted file mode 100644 index 5f3e504be61d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipAllocationsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a IpAllocation tags. - * - * @summary Updates a IpAllocation tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationUpdateTags.json - */ -async function updateVirtualNetworkTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.updateTags( - resourceGroupName, - ipAllocationName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/ipGroupsCreateOrUpdateSample.js deleted file mode 100644 index 38cacfa2eeea..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an ipGroups in a specified resource group. - * - * @summary Creates or updates an ipGroups in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsCreate.json - */ -async function createOrUpdateIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const parameters = { - ipAddresses: ["13.64.39.16/32", "40.74.146.80/31", "40.74.147.32/28"], - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - ipGroupsName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipGroupsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/ipGroupsDeleteSample.js deleted file mode 100644 index a92af156c4f6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipGroupsDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified ipGroups. - * - * @summary Deletes the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsDelete.json - */ -async function deleteIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.beginDeleteAndWait(resourceGroupName, ipGroupsName); - console.log(result); -} - -async function main() { - await deleteIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipGroupsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/ipGroupsGetSample.js deleted file mode 100644 index ad50068e2d7e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipGroupsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified ipGroups. - * - * @summary Gets the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsGet.json - */ -async function getIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.get(resourceGroupName, ipGroupsName); - console.log(result); -} - -async function main() { - await getIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipGroupsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/ipGroupsListByResourceGroupSample.js deleted file mode 100644 index 293986e59a51..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipGroupsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all IpGroups in a resource group. - * - * @summary Gets all IpGroups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsListByResourceGroup.json - */ -async function listByResourceGroupIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipGroups.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listByResourceGroupIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipGroupsListSample.js b/sdk/network/arm-network/samples/v36/javascript/ipGroupsListSample.js deleted file mode 100644 index 15bbcb53f1f6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipGroupsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all IpGroups in a subscription. - * - * @summary Gets all IpGroups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsListBySubscription.json - */ -async function listIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipGroups.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipGroupsUpdateGroupsSample.js b/sdk/network/arm-network/samples/v36/javascript/ipGroupsUpdateGroupsSample.js deleted file mode 100644 index b215da7b4cd8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipGroupsUpdateGroupsSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of an IpGroups resource. - * - * @summary Updates tags of an IpGroups resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsUpdateTags.json - */ -async function updateIPGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const parameters = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.updateGroups(resourceGroupName, ipGroupsName, parameters); - console.log(result); -} - -async function main() { - await updateIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsCreateSample.js b/sdk/network/arm-network/samples/v36/javascript/ipamPoolsCreateSample.js deleted file mode 100644 index 668e604d21e9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsCreateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates/Updates the Pool resource. - * - * @summary Creates/Updates the Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Create.json - */ -async function ipamPoolsCreate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const body = { - location: "eastus", - properties: { - description: "Test description.", - addressPrefixes: ["10.0.0.0/24"], - parentPoolName: "", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.beginCreateAndWait( - resourceGroupName, - networkManagerName, - poolName, - body, - ); - console.log(result); -} - -async function main() { - await ipamPoolsCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/ipamPoolsDeleteSample.js deleted file mode 100644 index 5b454db4fecb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the Pool resource. - * - * @summary Delete the Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Delete.json - */ -async function ipamPoolsDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main() { - await ipamPoolsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsGetPoolUsageSample.js b/sdk/network/arm-network/samples/v36/javascript/ipamPoolsGetPoolUsageSample.js deleted file mode 100644 index 8ccb605875be..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsGetPoolUsageSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the Pool Usage. - * - * @summary Get the Pool Usage. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_GetPoolUsage.json - */ -async function ipamPoolsGetPoolUsage() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.getPoolUsage( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main() { - await ipamPoolsGetPoolUsage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/ipamPoolsGetSample.js deleted file mode 100644 index 4c11895709d5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specific Pool resource. - * - * @summary Gets the specific Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Get.json - */ -async function ipamPoolsGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.get(resourceGroupName, networkManagerName, poolName); - console.log(result); -} - -async function main() { - await ipamPoolsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsListAssociatedResourcesSample.js b/sdk/network/arm-network/samples/v36/javascript/ipamPoolsListAssociatedResourcesSample.js deleted file mode 100644 index 80d8692116c1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsListAssociatedResourcesSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List Associated Resource in the Pool. - * - * @summary List Associated Resource in the Pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_ListAssociatedResources.json - */ -async function ipamPoolsListAssociatedResources() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipamPools.listAssociatedResources( - resourceGroupName, - networkManagerName, - poolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await ipamPoolsListAssociatedResources(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsListSample.js b/sdk/network/arm-network/samples/v36/javascript/ipamPoolsListSample.js deleted file mode 100644 index f2115f78e768..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsListSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets list of Pool resources at Network Manager level. - * - * @summary Gets list of Pool resources at Network Manager level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_List.json - */ -async function ipamPoolsList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipamPools.list(resourceGroupName, networkManagerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await ipamPoolsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/ipamPoolsUpdateSample.js deleted file mode 100644 index c546bcb1377a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/ipamPoolsUpdateSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the specific Pool resource. - * - * @summary Updates the specific Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Update.json - */ -async function ipamPoolsUpdate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.update(resourceGroupName, networkManagerName, poolName); - console.log(result); -} - -async function main() { - await ipamPoolsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/listActiveConnectivityConfigurationsSample.js b/sdk/network/arm-network/samples/v36/javascript/listActiveConnectivityConfigurationsSample.js deleted file mode 100644 index 0aa7023e52f1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/listActiveConnectivityConfigurationsSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists active connectivity configurations in a network manager. - * - * @summary Lists active connectivity configurations in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json - */ -async function listActiveConnectivityConfigurations() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const parameters = { - regions: ["westus"], - skipToken: "fakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listActiveConnectivityConfigurations( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await listActiveConnectivityConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/listActiveSecurityAdminRulesSample.js b/sdk/network/arm-network/samples/v36/javascript/listActiveSecurityAdminRulesSample.js deleted file mode 100644 index cd446446d1ee..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/listActiveSecurityAdminRulesSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists active security admin rules in a network manager. - * - * @summary Lists active security admin rules in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json - */ -async function listActiveSecurityAdminRules() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const parameters = { - regions: ["westus"], - skipToken: "fakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listActiveSecurityAdminRules( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await listActiveSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js b/sdk/network/arm-network/samples/v36/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js deleted file mode 100644 index d4336ae495bc..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all effective connectivity configurations applied on a virtual network. - * - * @summary List all effective connectivity configurations applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json - */ -async function listEffectiveConnectivityConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const virtualNetworkName = "testVirtualNetwork"; - const parameters = { skipToken: "FakeSkipTokenCode" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listNetworkManagerEffectiveConnectivityConfigurations( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main() { - await listEffectiveConnectivityConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js b/sdk/network/arm-network/samples/v36/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js deleted file mode 100644 index 495c7e089302..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all effective security admin rules applied on a virtual network. - * - * @summary List all effective security admin rules applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json - */ -async function listEffectiveSecurityAdminRules() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const virtualNetworkName = "testVirtualNetwork"; - const parameters = { skipToken: "FakeSkipTokenCode" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listNetworkManagerEffectiveSecurityAdminRules( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main() { - await listEffectiveSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js deleted file mode 100644 index bbba0e9b5d1c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a load balancer backend address pool. - * - * @summary Creates or updates a load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json - */ -async function updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const parameters = { - loadBalancerBackendAddresses: [ - { - name: "address1", - ipAddress: "10.0.0.4", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - { - name: "address2", - ipAddress: "10.0.0.5", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsDeleteSample.js deleted file mode 100644 index 3538ca4955e7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified load balancer backend address pool. - * - * @summary Deletes the specified load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerBackendAddressPoolDelete.json - */ -async function backendAddressPoolDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -async function main() { - await backendAddressPoolDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsGetSample.js deleted file mode 100644 index c15b05833618..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsGetSample.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets load balancer backend address pool. - * - * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json - */ -async function loadBalancerWithBackendAddressPoolWithBackendAddresses() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.get( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets load balancer backend address pool. - * - * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerBackendAddressPoolGet.json - */ -async function loadBalancerBackendAddressPoolGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.get( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -async function main() { - await loadBalancerWithBackendAddressPoolWithBackendAddresses(); - await loadBalancerBackendAddressPoolGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsListSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsListSample.js deleted file mode 100644 index 2aa64c440bce..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerBackendAddressPoolsListSample.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancer backed address pools. - * - * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json - */ -async function loadBalancerWithBackendAddressPoolContainingBackendAddresses() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerBackendAddressPools.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets all the load balancer backed address pools. - * - * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerBackendAddressPoolList.json - */ -async function loadBalancerBackendAddressPoolList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerBackendAddressPools.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerWithBackendAddressPoolContainingBackendAddresses(); - await loadBalancerBackendAddressPoolList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerFrontendIPConfigurationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerFrontendIPConfigurationsGetSample.js deleted file mode 100644 index caa19814eaa3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerFrontendIPConfigurationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets load balancer frontend IP configuration. - * - * @summary Gets load balancer frontend IP configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json - */ -async function loadBalancerFrontendIPConfigurationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const frontendIPConfigurationName = "frontend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerFrontendIPConfigurations.get( - resourceGroupName, - loadBalancerName, - frontendIPConfigurationName, - ); - console.log(result); -} - -async function main() { - await loadBalancerFrontendIPConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerFrontendIPConfigurationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerFrontendIPConfigurationsListSample.js deleted file mode 100644 index ba49f6faaa61..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerFrontendIPConfigurationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancer frontend IP configurations. - * - * @summary Gets all the load balancer frontend IP configurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerFrontendIPConfigurationList.json - */ -async function loadBalancerFrontendIPConfigurationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerFrontendIPConfigurations.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerFrontendIPConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesGetSample.js deleted file mode 100644 index ddb6acae7553..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified load balancer load balancing rule. - * - * @summary Gets the specified load balancer load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerLoadBalancingRuleGet.json - */ -async function loadBalancerLoadBalancingRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const loadBalancingRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerLoadBalancingRules.get( - resourceGroupName, - loadBalancerName, - loadBalancingRuleName, - ); - console.log(result); -} - -async function main() { - await loadBalancerLoadBalancingRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesHealthSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesHealthSample.js deleted file mode 100644 index 205b269b58e7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesHealthSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get health details of a load balancing rule. - * - * @summary Get health details of a load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerHealth.json - */ -async function queryLoadBalancingRuleHealth() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const loadBalancingRuleName = "rulelb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerLoadBalancingRules.beginHealthAndWait( - groupName, - loadBalancerName, - loadBalancingRuleName, - ); - console.log(result); -} - -async function main() { - await queryLoadBalancingRuleHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesListSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesListSample.js deleted file mode 100644 index 5813577bddbf..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerLoadBalancingRulesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancing rules in a load balancer. - * - * @summary Gets all the load balancing rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerLoadBalancingRuleList.json - */ -async function loadBalancerLoadBalancingRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerLoadBalancingRules.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerLoadBalancingRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerNetworkInterfacesListSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerNetworkInterfacesListSample.js deleted file mode 100644 index 693b17574fd5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerNetworkInterfacesListSample.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets associated load balancer network interfaces. - * - * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json - */ -async function loadBalancerNetworkInterfaceListSimple() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerNetworkInterfaces.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets associated load balancer network interfaces. - * - * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerNetworkInterfaceListVmss.json - */ -async function loadBalancerNetworkInterfaceListVmss() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerNetworkInterfaces.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerNetworkInterfaceListSimple(); - await loadBalancerNetworkInterfaceListVmss(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerOutboundRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerOutboundRulesGetSample.js deleted file mode 100644 index 8dab3cb291e4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerOutboundRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified load balancer outbound rule. - * - * @summary Gets the specified load balancer outbound rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerOutboundRuleGet.json - */ -async function loadBalancerOutboundRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const outboundRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerOutboundRules.get( - resourceGroupName, - loadBalancerName, - outboundRuleName, - ); - console.log(result); -} - -async function main() { - await loadBalancerOutboundRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerOutboundRulesListSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerOutboundRulesListSample.js deleted file mode 100644 index 9ff596a5c38b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerOutboundRulesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the outbound rules in a load balancer. - * - * @summary Gets all the outbound rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerOutboundRuleList.json - */ -async function loadBalancerOutboundRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerOutboundRules.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerOutboundRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerProbesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerProbesGetSample.js deleted file mode 100644 index 06475cfd9c7f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerProbesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets load balancer probe. - * - * @summary Gets load balancer probe. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerProbeGet.json - */ -async function loadBalancerProbeGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const probeName = "probe1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerProbes.get( - resourceGroupName, - loadBalancerName, - probeName, - ); - console.log(result); -} - -async function main() { - await loadBalancerProbeGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancerProbesListSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancerProbesListSample.js deleted file mode 100644 index afab4b1a3c83..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancerProbesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancer probes. - * - * @summary Gets all the load balancer probes. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerProbeList.json - */ -async function loadBalancerProbeList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerProbes.list(resourceGroupName, loadBalancerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await loadBalancerProbeList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancersCreateOrUpdateSample.js deleted file mode 100644 index b9cb279ae346..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancersCreateOrUpdateSample.js +++ /dev/null @@ -1,802 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreate.json - */ -async function createLoadBalancer() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - scope: "Public", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithZones.json - */ -async function createLoadBalancerWithFrontendIPInZone1() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - zones: ["1"], - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json - */ -async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - gatewayLoadBalancer: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json - */ -async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [ - { - name: "be-lb", - tunnelInterfaces: [ - { type: "Internal", identifier: 900, port: 15000, protocol: "VXLAN" }, - { type: "Internal", identifier: 901, port: 15001, protocol: "VXLAN" }, - ], - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPools: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - ], - backendPort: 0, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 0, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "All", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Gateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json - */ -async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb1" }, { name: "be-lb2" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: {}, - backendAddressPools: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb2", - }, - ], - backendPort: 0, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 0, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "All", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Gateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGlobalTier.json - */ -async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [ - { - name: "be-lb", - loadBalancerBackendAddresses: [ - { - name: "regional-lb1-address", - loadBalancerFrontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/regional-lb-rg1/providers/Microsoft.Network/loadBalancers/regional-lb/frontendIPConfigurations/fe-rlb", - }, - }, - ], - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard", tier: "Global" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateStandardSku.json - */ -async function createLoadBalancerWithStandardSku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json - */ -async function createLoadBalancerWithSyncModePropertyOnPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [ - { - name: "be-lb", - syncMode: "Automatic", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithInboundNatPool.json - */ -async function createLoadBalancerWithInboundNatPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [], - frontendIPConfigurations: [ - { - name: "test", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", - privateIPAllocationMethod: "Dynamic", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/lbvnet/subnets/lbsubnet", - }, - zones: [], - }, - ], - inboundNatPools: [ - { - name: "test", - backendPort: 8888, - enableFloatingIP: true, - enableTcpReset: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", - }, - frontendPortRangeEnd: 8085, - frontendPortRangeStart: 8080, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/inboundNatPools/test", - idleTimeoutInMinutes: 10, - protocol: "Tcp", - }, - ], - inboundNatRules: [], - loadBalancingRules: [], - location: "eastus", - outboundRules: [], - probes: [], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithOutboundRules.json - */ -async function createLoadBalancerWithOutboundRules() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - disableOutboundSnat: true, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [ - { - name: "rule1", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - frontendIPConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - ], - protocol: "All", - }, - ], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -async function main() { - await createLoadBalancer(); - await createLoadBalancerWithFrontendIPInZone1(); - await createLoadBalancerWithGatewayLoadBalancerConsumerConfigured(); - await createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool(); - await createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool(); - await createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool(); - await createLoadBalancerWithStandardSku(); - await createLoadBalancerWithSyncModePropertyOnPool(); - await createLoadBalancerWithInboundNatPool(); - await createLoadBalancerWithOutboundRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancersDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancersDeleteSample.js deleted file mode 100644 index 21c95c63c734..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancersDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified load balancer. - * - * @summary Deletes the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerDelete.json - */ -async function deleteLoadBalancer() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginDeleteAndWait(resourceGroupName, loadBalancerName); - console.log(result); -} - -async function main() { - await deleteLoadBalancer(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancersGetSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancersGetSample.js deleted file mode 100644 index 3dd2f3ec5a71..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancersGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified load balancer. - * - * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerGet.json - */ -async function getLoadBalancer() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.get(resourceGroupName, loadBalancerName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified load balancer. - * - * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerGetInboundNatRulePortMapping.json - */ -async function getLoadBalancerWithInboundNatRulePortMapping() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.get(resourceGroupName, loadBalancerName); - console.log(result); -} - -async function main() { - await getLoadBalancer(); - await getLoadBalancerWithInboundNatRulePortMapping(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancersListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancersListAllSample.js deleted file mode 100644 index b5d272ea7721..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancersListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancers in a subscription. - * - * @summary Gets all the load balancers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerListAll.json - */ -async function listAllLoadBalancers() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancers.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllLoadBalancers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancersListInboundNatRulePortMappingsSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancersListInboundNatRulePortMappingsSample.js deleted file mode 100644 index da1c229e95ce..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancersListInboundNatRulePortMappingsSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List of inbound NAT rule port mappings. - * - * @summary List of inbound NAT rule port mappings. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/QueryInboundNatRulePortMapping.json - */ -async function queryInboundNatRulePortMapping() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const backendPoolName = "bp1"; - const parameters = { - ipAddress: "10.0.0.4", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginListInboundNatRulePortMappingsAndWait( - groupName, - loadBalancerName, - backendPoolName, - parameters, - ); - console.log(result); -} - -async function main() { - await queryInboundNatRulePortMapping(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancersListSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancersListSample.js deleted file mode 100644 index c6cec5984c19..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancersListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the load balancers in a resource group. - * - * @summary Gets all the load balancers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerList.json - */ -async function listLoadBalancersInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listLoadBalancersInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancersMigrateToIPBasedSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancersMigrateToIPBasedSample.js deleted file mode 100644 index 08fb8ed93d06..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancersMigrateToIPBasedSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Migrate load balancer to IP Based - * - * @summary Migrate load balancer to IP Based - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/MigrateLoadBalancerToIPBased.json - */ -async function migrateLoadBalancerToIPBased() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const parameters = { - pools: ["pool1", "pool2"], - }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.migrateToIpBased(groupName, loadBalancerName, options); - console.log(result); -} - -async function main() { - await migrateLoadBalancerToIPBased(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancersSwapPublicIPAddressesSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancersSwapPublicIPAddressesSample.js deleted file mode 100644 index 9a533321ba89..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancersSwapPublicIPAddressesSample.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Swaps VIPs between two load balancers. - * - * @summary Swaps VIPs between two load balancers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancersSwapPublicIpAddresses.json - */ -async function swapViPsBetweenTwoLoadBalancers() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const parameters = { - frontendIPConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/lbfe1", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/pip2", - }, - }, - { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/loadBalancers/lb2/frontendIPConfigurations/lbfe2", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginSwapPublicIpAddressesAndWait(location, parameters); - console.log(result); -} - -async function main() { - await swapViPsBetweenTwoLoadBalancers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/loadBalancersUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/loadBalancersUpdateTagsSample.js deleted file mode 100644 index 4653984e22ab..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/loadBalancersUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a load balancer tags. - * - * @summary Updates a load balancer tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerUpdateTags.json - */ -async function updateLoadBalancerTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.updateTags( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateLoadBalancerTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysCreateOrUpdateSample.js deleted file mode 100644 index a8bc5b6c9d3f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a local network gateway in the specified resource group. - * - * @summary Creates or updates a local network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayCreate.json - */ -async function createLocalNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const parameters = { - fqdn: "site1.contoso.com", - gatewayIpAddress: "11.12.13.14", - localNetworkAddressSpace: { addressPrefixes: ["10.1.0.0/16"] }, - location: "Central US", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - localNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await createLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysDeleteSample.js deleted file mode 100644 index 6f6e52554de3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified local network gateway. - * - * @summary Deletes the specified local network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayDelete.json - */ -async function deleteLocalNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.beginDeleteAndWait( - resourceGroupName, - localNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await deleteLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysGetSample.js b/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysGetSample.js deleted file mode 100644 index 06be66226535..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified local network gateway in a resource group. - * - * @summary Gets the specified local network gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayGet.json - */ -async function getLocalNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.get(resourceGroupName, localNetworkGatewayName); - console.log(result); -} - -async function main() { - await getLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysListSample.js b/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysListSample.js deleted file mode 100644 index fcb5ab9c4cd5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the local network gateways in a resource group. - * - * @summary Gets all the local network gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayList.json - */ -async function listLocalNetworkGateways() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.localNetworkGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listLocalNetworkGateways(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysUpdateTagsSample.js deleted file mode 100644 index 748de572bd4f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/localNetworkGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a local network gateway tags. - * - * @summary Updates a local network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayUpdateTags.json - */ -async function updateLocalNetworkGatewayTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "lgw"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.updateTags( - resourceGroupName, - localNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateLocalNetworkGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 95c059909473..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a network manager connection on this management group. - * - * @summary Create a network manager connection on this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupPut.json - */ -async function createOrUpdateManagementGroupNetworkManagerConnection() { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const parameters = { - networkManagerId: - "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = await client.managementGroupNetworkManagerConnections.createOrUpdate( - managementGroupId, - networkManagerConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js deleted file mode 100644 index 90073e46081f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete specified pending connection created by this management group. - * - * @summary Delete specified pending connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json - */ -async function deleteManagementGroupNetworkManagerConnection() { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = await client.managementGroupNetworkManagerConnections.delete( - managementGroupId, - networkManagerConnectionName, - ); - console.log(result); -} - -async function main() { - await deleteManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsGetSample.js deleted file mode 100644 index 011f6aaf9ed7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get a specified connection created by this management group. - * - * @summary Get a specified connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupGet.json - */ -async function getManagementGroupNetworkManagerConnection() { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = await client.managementGroupNetworkManagerConnections.get( - managementGroupId, - networkManagerConnectionName, - ); - console.log(result); -} - -async function main() { - await getManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsListSample.js deleted file mode 100644 index cb83d04ad4a5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/managementGroupNetworkManagerConnectionsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network manager connections created by this management group. - * - * @summary List all network manager connections created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupList.json - */ -async function listManagementGroupNetworkManagerConnection() { - const managementGroupId = "managementGroupA"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const resArray = new Array(); - for await (const item of client.managementGroupNetworkManagerConnections.list( - managementGroupId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/natGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/natGatewaysCreateOrUpdateSample.js deleted file mode 100644 index 6ca7fddd8508..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/natGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a nat gateway. - * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayCreateOrUpdate.json - */ -async function createNatGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters = { - location: "westus", - publicIpAddresses: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", - }, - ], - publicIpPrefixes: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a nat gateway. - * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayCreateOrUpdateStandardV2Sku.json - */ -async function createNatGatewayWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters = { - location: "westus", - publicIpAddresses: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", - }, - ], - publicIpPrefixes: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", - }, - ], - sku: { name: "StandardV2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a nat gateway. - * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayWithServiceGatewayCreateOrUpdate.json - */ -async function createNatGatewayWithServiceGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters = { - location: "westus", - publicIpAddresses: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", - }, - ], - publicIpPrefixes: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", - }, - ], - serviceGateway: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/serviceGateways/SG1", - }, - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNatGateway(); - await createNatGatewayWithStandardV2Sku(); - await createNatGatewayWithServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/natGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/natGatewaysDeleteSample.js deleted file mode 100644 index 33d6255738b1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/natGatewaysDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified nat gateway. - * - * @summary Deletes the specified nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayDelete.json - */ -async function deleteNatGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginDeleteAndWait(resourceGroupName, natGatewayName); - console.log(result); -} - -async function main() { - await deleteNatGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/natGatewaysGetSample.js b/sdk/network/arm-network/samples/v36/javascript/natGatewaysGetSample.js deleted file mode 100644 index e6259b614975..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/natGatewaysGetSample.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. - * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayGet.json - */ -async function getNatGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get(resourceGroupName, natGatewayName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. - * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayGetStandardV2Sku.json - */ -async function getNatGatewayWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get(resourceGroupName, natGatewayName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. - * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayWithServiceGatewayGet.json - */ -async function getNatGatewayWithServiceGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get(resourceGroupName, natGatewayName); - console.log(result); -} - -async function main() { - await getNatGateway(); - await getNatGatewayWithStandardV2Sku(); - await getNatGatewayWithServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/natGatewaysListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/natGatewaysListAllSample.js deleted file mode 100644 index c8c80ccc8653..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/natGatewaysListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Nat Gateways in a subscription. - * - * @summary Gets all the Nat Gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayListAll.json - */ -async function listAllNatGateways() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natGateways.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNatGateways(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/natGatewaysListSample.js b/sdk/network/arm-network/samples/v36/javascript/natGatewaysListSample.js deleted file mode 100644 index ba7aaa2b6acc..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/natGatewaysListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all nat gateways in a resource group. - * - * @summary Gets all nat gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayList.json - */ -async function listNatGatewaysInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNatGatewaysInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/natGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/natGatewaysUpdateTagsSample.js deleted file mode 100644 index 1c4a59c363ab..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/natGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates nat gateway tags. - * - * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayUpdateTags.json - */ -async function updateNatGatewayTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.updateTags(resourceGroupName, natGatewayName, parameters); - console.log(result); -} - -/** - * This sample demonstrates how to Updates nat gateway tags. - * - * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayUpdateTagsStandardV2Sku.json - */ -async function updateNatGatewayWithStandardV2SkuTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.updateTags(resourceGroupName, natGatewayName, parameters); - console.log(result); -} - -async function main() { - await updateNatGatewayTags(); - await updateNatGatewayWithStandardV2SkuTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/natRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/natRulesCreateOrUpdateSample.js deleted file mode 100644 index 37221b19a1d2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/natRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * - * @summary Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRulePut.json - */ -async function natRulePut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const natRuleParameters = { - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "192.168.21.0/24" }], - internalMappings: [{ addressSpace: "10.4.0.0/24" }], - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default", - mode: "EgressSnat", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - natRuleName, - natRuleParameters, - ); - console.log(result); -} - -async function main() { - await natRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/natRulesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/natRulesDeleteSample.js deleted file mode 100644 index 67f02748dd1f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/natRulesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a nat rule. - * - * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleDelete.json - */ -async function natRuleDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.beginDeleteAndWait( - resourceGroupName, - gatewayName, - natRuleName, - ); - console.log(result); -} - -async function main() { - await natRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/natRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/natRulesGetSample.js deleted file mode 100644 index b66c4740ba77..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/natRulesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a nat ruleGet. - * - * @summary Retrieves the details of a nat ruleGet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleGet.json - */ -async function natRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.get(resourceGroupName, gatewayName, natRuleName); - console.log(result); -} - -async function main() { - await natRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/natRulesListByVpnGatewaySample.js b/sdk/network/arm-network/samples/v36/javascript/natRulesListByVpnGatewaySample.js deleted file mode 100644 index f4c10aa6867e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/natRulesListByVpnGatewaySample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all nat rules for a particular virtual wan vpn gateway. - * - * @summary Retrieves all nat rules for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleList.json - */ -async function natRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natRules.listByVpnGateway(resourceGroupName, gatewayName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await natRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkGroupsCreateOrUpdateSample.js deleted file mode 100644 index 6990b6266d15..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network group. - * - * @summary Creates or updates a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupPut.json - */ -async function networkGroupsPut() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const parameters = { - description: "A sample group", - memberType: "VirtualNetwork", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.createOrUpdate( - resourceGroupName, - networkManagerName, - networkGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await networkGroupsPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkGroupsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkGroupsDeleteSample.js deleted file mode 100644 index 90a16ce02cb9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkGroupsDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network group. - * - * @summary Deletes a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupDelete.json - */ -async function networkGroupsDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - networkGroupName, - options, - ); - console.log(result); -} - -async function main() { - await networkGroupsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkGroupsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkGroupsGetSample.js deleted file mode 100644 index e03426716876..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkGroupsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network group. - * - * @summary Gets the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupGet.json - */ -async function networkGroupsGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.get( - resourceGroupName, - networkManagerName, - networkGroupName, - ); - console.log(result); -} - -async function main() { - await networkGroupsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkGroupsListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkGroupsListSample.js deleted file mode 100644 index 8807f15b45db..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkGroupsListSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the specified network group. - * - * @summary Lists the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupList.json - */ -async function networkGroupsList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkGroups.list(resourceGroupName, networkManagerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkGroupsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceIPConfigurationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfaceIPConfigurationsGetSample.js deleted file mode 100644 index a1912061760f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceIPConfigurationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network interface ip configuration. - * - * @summary Gets the specified network interface ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceIPConfigurationGet.json - */ -async function networkInterfaceIPConfigurationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const ipConfigurationName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceIPConfigurations.get( - resourceGroupName, - networkInterfaceName, - ipConfigurationName, - ); - console.log(result); -} - -async function main() { - await networkInterfaceIPConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceIPConfigurationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfaceIPConfigurationsListSample.js deleted file mode 100644 index 74bdc44419a4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceIPConfigurationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get all ip configurations in a network interface. - * - * @summary Get all ip configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceIPConfigurationList.json - */ -async function networkInterfaceIPConfigurationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceIPConfigurations.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkInterfaceIPConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceLoadBalancersListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfaceLoadBalancersListSample.js deleted file mode 100644 index b5a41538d0e9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceLoadBalancersListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all load balancers in a network interface. - * - * @summary List all load balancers in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceLoadBalancerList.json - */ -async function networkInterfaceLoadBalancerList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceLoadBalancers.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkInterfaceLoadBalancerList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index 24218b0f92e9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a Tap configuration in the specified NetworkInterface. - * - * @summary Creates or updates a Tap configuration in the specified NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationCreate.json - */ -async function createNetworkInterfaceTapConfigurations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const tapConfigurationParameters = { - virtualNetworkTap: { - id: "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworkTaps/testvtap", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceTapConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - tapConfigurationParameters, - ); - console.log(result); -} - -async function main() { - await createNetworkInterfaceTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsDeleteSample.js deleted file mode 100644 index ef79297366a2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified tap configuration from the NetworkInterface. - * - * @summary Deletes the specified tap configuration from the NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationDelete.json - */ -async function deleteTapConfiguration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceTapConfigurations.beginDeleteAndWait( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - ); - console.log(result); -} - -async function main() { - await deleteTapConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsGetSample.js deleted file mode 100644 index 336fc943e0e3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified tap configuration on a network interface. - * - * @summary Get the specified tap configuration on a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationGet.json - */ -async function getNetworkInterfaceTapConfigurations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceTapConfigurations.get( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - ); - console.log(result); -} - -async function main() { - await getNetworkInterfaceTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsListSample.js deleted file mode 100644 index a6b9e61c2dec..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfaceTapConfigurationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get all Tap configurations in a network interface. - * - * @summary Get all Tap configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationList.json - */ -async function listVirtualNetworkTapConfigurations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceTapConfigurations.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualNetworkTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesCreateOrUpdateSample.js deleted file mode 100644 index 1c7389b50485..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesCreateOrUpdateSample.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network interface. - * - * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceCreate.json - */ -async function createNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters = { - disableTcpStateTracking: true, - enableAcceleratedNetworking: true, - ipConfigurations: [ - { - name: "ipconfig1", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", - }, - }, - { name: "ipconfig2", privateIPAddressPrefixLength: 28 }, - ], - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network interface. - * - * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json - */ -async function createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters = { - enableAcceleratedNetworking: true, - ipConfigurations: [ - { - name: "ipconfig1", - gatewayLoadBalancer: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", - }, - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", - }, - }, - ], - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkInterface(); - await createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesDeleteSample.js deleted file mode 100644 index ee85ea13d552..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified network interface. - * - * @summary Deletes the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceDelete.json - */ -async function deleteNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginDeleteAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js deleted file mode 100644 index 07cd51c20e6f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified network interface in a cloud service. - * - * @summary Get the specified network interface in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceNetworkInterfaceGet.json - */ -async function getCloudServiceNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const roleInstanceName = "TestVMRole_IN_0"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.getCloudServiceNetworkInterface( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ); - console.log(result); -} - -async function main() { - await getCloudServiceNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetEffectiveRouteTableSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetEffectiveRouteTableSample.js deleted file mode 100644 index db9a4712341f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetEffectiveRouteTableSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all route tables applied to a network interface. - * - * @summary Gets all route tables applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json - */ -async function showNetworkInterfaceEffectiveRouteTables() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginGetEffectiveRouteTableAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main() { - await showNetworkInterfaceEffectiveRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetSample.js deleted file mode 100644 index c626975b9d49..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified network interface. - * - * @summary Gets information about the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceGet.json - */ -async function getNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.get(resourceGroupName, networkInterfaceName); - console.log(result); -} - -async function main() { - await getNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js deleted file mode 100644 index 038abeb66505..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. - * - * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceIpConfigGet.json - */ -async function getVirtualMachineScaleSetNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "2"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.getVirtualMachineScaleSetIpConfiguration( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - ); - console.log(result); -} - -async function main() { - await getVirtualMachineScaleSetNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js deleted file mode 100644 index b4cf587a8bec..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified network interface in a virtual machine scale set. - * - * @summary Get the specified network interface in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceGet.json - */ -async function getVirtualMachineScaleSetNetworkInterface() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.getVirtualMachineScaleSetNetworkInterface( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ); - console.log(result); -} - -async function main() { - await getVirtualMachineScaleSetNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListAllSample.js deleted file mode 100644 index ef74a77d9c07..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network interfaces in a subscription. - * - * @summary Gets all network interfaces in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceListAll.json - */ -async function listAllNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js deleted file mode 100644 index 86eb701f7ff8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network interfaces in a cloud service. - * - * @summary Gets all network interfaces in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceNetworkInterfaceList.json - */ -async function listCloudServiceNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listCloudServiceNetworkInterfaces( - resourceGroupName, - cloudServiceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listCloudServiceNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js deleted file mode 100644 index 058a860b2131..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all network interfaces in a role instance in a cloud service. - * - * @summary Gets information about all network interfaces in a role instance in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json - */ -async function listCloudServiceRoleInstanceNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const roleInstanceName = "TestVMRole_IN_0"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listCloudServiceRoleInstanceNetworkInterfaces( - resourceGroupName, - cloudServiceName, - roleInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listCloudServiceRoleInstanceNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js deleted file mode 100644 index 0f9f5db9976e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network security groups applied to a network interface. - * - * @summary Gets all network security groups applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceEffectiveNSGList.json - */ -async function listNetworkInterfaceEffectiveNetworkSecurityGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginListEffectiveNetworkSecurityGroupsAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main() { - await listNetworkInterfaceEffectiveNetworkSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListSample.js deleted file mode 100644 index bd9a38b5930d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network interfaces in a resource group. - * - * @summary Gets all network interfaces in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceList.json - */ -async function listNetworkInterfacesInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkInterfacesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js deleted file mode 100644 index 32b97f1e1d7b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. - * - * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceIpConfigList.json - */ -async function listVirtualMachineScaleSetNetworkInterfaceIPConfigurations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "2"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetIpConfigurations( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualMachineScaleSetNetworkInterfaceIPConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js deleted file mode 100644 index 994704626692..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network interfaces in a virtual machine scale set. - * - * @summary Gets all network interfaces in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceList.json - */ -async function listVirtualMachineScaleSetNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualMachineScaleSetNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js deleted file mode 100644 index 9c8df82099ce..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * - * @summary Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssVmNetworkInterfaceList.json - */ -async function listVirtualMachineScaleSetVMNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetVMNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualMachineScaleSetVMNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/networkInterfacesUpdateTagsSample.js deleted file mode 100644 index 1d9dbe2eb790..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkInterfacesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a network interface tags. - * - * @summary Updates a network interface tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceUpdateTags.json - */ -async function updateNetworkInterfaceTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.updateTags( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateNetworkInterfaceTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagerCommitsPostSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagerCommitsPostSample.js deleted file mode 100644 index 383723a3d456..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagerCommitsPostSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Post a Network Manager Commit. - * - * @summary Post a Network Manager Commit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerCommitPost.json - */ -async function networkManageCommitPost() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resoureGroupSample"; - const networkManagerName = "testNetworkManager"; - const parameters = { - commitType: "SecurityAdmin", - configurationIds: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resoureGroupSample/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/SampleSecurityAdminConfig", - ], - targetLocations: ["useast"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerCommits.beginPostAndWait( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await networkManageCommitPost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagerDeploymentStatusListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagerDeploymentStatusListSample.js deleted file mode 100644 index 1b4582ca0d65..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagerDeploymentStatusListSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Post to List of Network Manager Deployment Status. - * - * @summary Post to List of Network Manager Deployment Status. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDeploymentStatusList.json - */ -async function networkManagerDeploymentStatusList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "resoureGroupSample"; - const networkManagerName = "testNetworkManager"; - const parameters = { - deploymentTypes: ["Connectivity", "AdminPolicy"], - regions: ["eastus", "westus"], - skipToken: "FakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerDeploymentStatusOperations.list( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await networkManagerDeploymentStatusList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index 5b5f832c4ae9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network manager routing configuration. - * - * @summary Creates or updates a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationPut.json - */ -async function createNetworkManagerRoutingConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const routingConfiguration = { - description: "A sample policy", - routeTableUsageMode: "ManagedOnly", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerRoutingConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - routingConfiguration, - ); - console.log(result); -} - -async function main() { - await createNetworkManagerRoutingConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsDeleteSample.js deleted file mode 100644 index 663daa6b0884..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network manager routing configuration. - * - * @summary Deletes a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationDelete.json - */ -async function deleteNetworkManagerRoutingConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerRoutingConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkManagerRoutingConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsGetSample.js deleted file mode 100644 index b6e18c4d6973..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a network manager routing configuration. - * - * @summary Retrieves a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationGet.json - */ -async function getRoutingConfigurations() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerRoutingConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main() { - await getRoutingConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsListSample.js deleted file mode 100644 index d41878753ec7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagerRoutingConfigurationsListSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the network manager routing configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager routing configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationList.json - */ -async function listRoutingConfigurationsInANetworkManager() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagerRoutingConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRoutingConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagersCreateOrUpdateSample.js deleted file mode 100644 index 44696635f202..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagersCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a Network Manager. - * - * @summary Creates or updates a Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerPut.json - */ -async function putNetworkManager() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const parameters = { - description: "My Test Network Manager", - networkManagerScopeAccesses: ["Connectivity"], - networkManagerScopes: { - managementGroups: ["/Microsoft.Management/testmg"], - subscriptions: ["/subscriptions/00000000-0000-0000-0000-000000000000"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.createOrUpdate( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await putNetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagersDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagersDeleteSample.js deleted file mode 100644 index 22beb761f7d5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagersDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network manager. - * - * @summary Deletes a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDelete.json - */ -async function networkManagersDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - options, - ); - console.log(result); -} - -async function main() { - await networkManagersDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagersGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagersGetSample.js deleted file mode 100644 index 455a753a0440..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagersGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Network Manager. - * - * @summary Gets the specified Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGet.json - */ -async function networkManagersGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.get(resourceGroupName, networkManagerName); - console.log(result); -} - -async function main() { - await networkManagersGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagersListBySubscriptionSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagersListBySubscriptionSample.js deleted file mode 100644 index fa881e91c85d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagersListBySubscriptionSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network managers in a subscription. - * - * @summary List all network managers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerListAll.json - */ -async function networkManagersList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkManagersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagersListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagersListSample.js deleted file mode 100644 index 8fe89d2e94e2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagersListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List network managers in a resource group. - * - * @summary List network managers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerList.json - */ -async function listNetworkManager() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkManagersPatchSample.js b/sdk/network/arm-network/samples/v36/javascript/networkManagersPatchSample.js deleted file mode 100644 index 0095939b13a7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkManagersPatchSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Patch NetworkManager. - * - * @summary Patch NetworkManager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerPatch.json - */ -async function networkManagesPatch() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.patch( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main() { - await networkManagesPatch(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkProfilesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkProfilesCreateOrUpdateSample.js deleted file mode 100644 index 5d461c3bf8a5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkProfilesCreateOrUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network profile. - * - * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileCreateConfigOnly.json - */ -async function createNetworkProfileDefaults() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const parameters = { - containerNetworkInterfaceConfigurations: [ - { - name: "eth1", - ipConfigurations: [ - { - name: "ipconfig1", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/networkProfileVnet/subnets/networkProfileSubnet1", - }, - }, - ], - }, - ], - location: "westus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.createOrUpdate( - resourceGroupName, - networkProfileName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkProfileDefaults(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkProfilesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkProfilesDeleteSample.js deleted file mode 100644 index 6a8b1eac7ffd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkProfilesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified network profile. - * - * @summary Deletes the specified network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileDelete.json - */ -async function deleteNetworkProfile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.beginDeleteAndWait( - resourceGroupName, - networkProfileName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkProfilesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkProfilesGetSample.js deleted file mode 100644 index 3c0494b58a9c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkProfilesGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network profile in a specified resource group. - * - * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileGetConfigOnly.json - */ -async function getNetworkProfile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.get(resourceGroupName, networkProfileName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified network profile in a specified resource group. - * - * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileGetWithContainerNic.json - */ -async function getNetworkProfileWithContainerNetworkInterfaces() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.get(resourceGroupName, networkProfileName); - console.log(result); -} - -async function main() { - await getNetworkProfile(); - await getNetworkProfileWithContainerNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkProfilesListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/networkProfilesListAllSample.js deleted file mode 100644 index 31dacc15149a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkProfilesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the network profiles in a subscription. - * - * @summary Gets all the network profiles in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileListAll.json - */ -async function listAllNetworkProfiles() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkProfiles.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkProfiles(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkProfilesListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkProfilesListSample.js deleted file mode 100644 index 9a536b91458e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkProfilesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network profiles in a resource group. - * - * @summary Gets all network profiles in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileList.json - */ -async function listResourceGroupNetworkProfiles() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkProfiles.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listResourceGroupNetworkProfiles(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkProfilesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/networkProfilesUpdateTagsSample.js deleted file mode 100644 index d68fa827da9b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkProfilesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates network profile tags. - * - * @summary Updates network profile tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileUpdateTags.json - */ -async function updateNetworkProfileTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "test-np"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.updateTags( - resourceGroupName, - networkProfileName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateNetworkProfileTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsCreateOrUpdateSample.js deleted file mode 100644 index 24ce459438e1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network security group in the specified resource group. - * - * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupCreate.json - */ -async function createNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network security group in the specified resource group. - * - * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupCreateWithRule.json - */ -async function createNetworkSecurityGroupWithRule() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters = { - location: "eastus", - securityRules: [ - { - name: "rule1", - access: "Allow", - destinationAddressPrefix: "*", - destinationPortRange: "80", - direction: "Inbound", - priority: 130, - sourceAddressPrefix: "*", - sourcePortRange: "*", - protocol: "*", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkSecurityGroup(); - await createNetworkSecurityGroupWithRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsDeleteSample.js deleted file mode 100644 index 4e644ce7379d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified network security group. - * - * @summary Deletes the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupDelete.json - */ -async function deleteNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginDeleteAndWait( - resourceGroupName, - networkSecurityGroupName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsGetSample.js deleted file mode 100644 index 1d4affdf5f17..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network security group. - * - * @summary Gets the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupGet.json - */ -async function getNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.get( - resourceGroupName, - networkSecurityGroupName, - ); - console.log(result); -} - -async function main() { - await getNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsListAllSample.js deleted file mode 100644 index f8222304e995..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network security groups in a subscription. - * - * @summary Gets all network security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupListAll.json - */ -async function listAllNetworkSecurityGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityGroups.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsListSample.js deleted file mode 100644 index ca45d6262fcf..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network security groups in a resource group. - * - * @summary Gets all network security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupList.json - */ -async function listNetworkSecurityGroupsInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityGroups.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkSecurityGroupsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsUpdateTagsSample.js deleted file mode 100644 index 217541b52520..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityGroupsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a network security group tags. - * - * @summary Updates a network security group tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupUpdateTags.json - */ -async function updateNetworkSecurityGroupTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.updateTags( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateNetworkSecurityGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js deleted file mode 100644 index 4822ae54189c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network access rule. - * - * @summary Creates or updates a network access rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRulePut.json - */ -async function nspAccessRulePut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const parameters = { - addressPrefixes: ["10.11.0.0/16", "10.10.1.0/24"], - direction: "Inbound", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspAccessRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesDeleteSample.js deleted file mode 100644 index 435ea88f9511..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP access rule. - * - * @summary Deletes an NSP access rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleDelete.json - */ -async function nspAccessRulesDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.delete( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - ); - console.log(result); -} - -async function main() { - await nspAccessRulesDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesGetSample.js deleted file mode 100644 index 537c227b9ee8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified NSP access rule by name. - * - * @summary Gets the specified NSP access rule by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleGet.json - */ -async function nspAccessRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.get( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - ); - console.log(result); -} - -async function main() { - await nspAccessRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesListSample.js deleted file mode 100644 index 9cc301a34916..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesListSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP access rules in the specified NSP profile. - * - * @summary Lists the NSP access rules in the specified NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleList.json - */ -async function nspAccessRulesList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAccessRules.list( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspAccessRulesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesReconcileSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesReconcileSample.js deleted file mode 100644 index ebafdc0fbb4b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAccessRulesReconcileSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Reconcile NSP access rules - * - * @summary Reconcile NSP access rules - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleReconcile.json - */ -async function nspAccessRuleReconcile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRuleName1"; - const parameters = { properties: {} }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.reconcile( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspAccessRuleReconcile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociableResourceTypesListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociableResourceTypesListSample.js deleted file mode 100644 index c1fe6a3b0ece..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociableResourceTypesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter - * - * @summary Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PerimeterAssociableResourcesList.json - */ -async function networkSecurityPerimeterAssociableResourceTypes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAssociableResourceTypes.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkSecurityPerimeterAssociableResourceTypes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsCreateOrUpdateSample.js deleted file mode 100644 index a81e71f73a18..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a NSP resource association. - * - * @summary Creates or updates a NSP resource association. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationPut.json - */ -async function nspAssociationPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const parameters = { - accessMode: "Enforced", - privateLinkResource: { - id: "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}", - }, - profile: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspAssociationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsDeleteSample.js deleted file mode 100644 index afc801a9df81..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP association resource. - * - * @summary Deletes an NSP association resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationDelete.json - */ -async function nspAssociationDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - ); - console.log(result); -} - -async function main() { - await nspAssociationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsGetSample.js deleted file mode 100644 index d106c733a6e8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified NSP association by name. - * - * @summary Gets the specified NSP association by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationGet.json - */ -async function nspAssociationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.get( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - ); - console.log(result); -} - -async function main() { - await nspAssociationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsListSample.js deleted file mode 100644 index 481c55cd3265..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP resource associations. - * - * @summary Lists the NSP resource associations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationList.json - */ -async function nspAssociationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAssociations.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspAssociationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsReconcileSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsReconcileSample.js deleted file mode 100644 index e58185c04e2a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterAssociationsReconcileSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Reconcile NSP association - * - * @summary Reconcile NSP association - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationReconcile.json - */ -async function nspAssociationReconcile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const parameters = { properties: {} }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.reconcile( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspAssociationReconcile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesDeleteSample.js deleted file mode 100644 index 4d0f6fa5dc8f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP LinkReference resource. - * - * @summary Deletes an NSP LinkReference resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceDelete.json - */ -async function nspLinkReferenceDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const linkReferenceName = "link1-guid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinkReferences.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - ); - console.log(result); -} - -async function main() { - await nspLinkReferenceDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesGetSample.js deleted file mode 100644 index 571abfe8ba42..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified NSP linkReference resource. - * - * @summary Gets the specified NSP linkReference resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceGet.json - */ -async function nspLinkReferencesGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const linkReferenceName = "link1-guid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinkReferences.get( - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - ); - console.log(result); -} - -async function main() { - await nspLinkReferencesGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesListSample.js deleted file mode 100644 index d4e044a5b3e2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinkReferencesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP LinkReference resources in the specified network security perimeter. - * - * @summary Lists the NSP LinkReference resources in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceList.json - */ -async function nspLinkReferenceList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLinkReferences.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspLinkReferenceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksCreateOrUpdateSample.js deleted file mode 100644 index b95f5a967524..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates NSP link resource. - * - * @summary Creates or updates NSP link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkPut.json - */ -async function nspLinksPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const parameters = { - autoApprovedRemotePerimeterResourceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp2", - localInboundProfiles: ["*"], - remoteInboundProfiles: ["*"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspLinksPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksDeleteSample.js deleted file mode 100644 index 031c2bf08d69..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP Link resource. - * - * @summary Deletes an NSP Link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkDelete.json - */ -async function nspLinkDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - ); - console.log(result); -} - -async function main() { - await nspLinkDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksGetSample.js deleted file mode 100644 index 5b672e2b7ad1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified NSP link resource. - * - * @summary Gets the specified NSP link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkGet.json - */ -async function nspLinksGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.get( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - ); - console.log(result); -} - -async function main() { - await nspLinksGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksListSample.js deleted file mode 100644 index 3c81cd9fc229..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLinksListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP Link resources in the specified network security perimeter. - * - * @summary Lists the NSP Link resources in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkList.json - */ -async function nspLinkList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLinks.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspLinkList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index b5ac81c57a87..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates NSP logging configuration. - * - * @summary Creates or updates NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationPut.json - */ -async function nspLoggingConfigurationPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const parameters = { - enabledLogCategories: [ - "NspPublicInboundPerimeterRulesDenied", - "NspPublicOutboundPerimeterRulesDenied", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLoggingConfigurations.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspLoggingConfigurationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsDeleteSample.js deleted file mode 100644 index 49fda39deb04..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP Logging configuration. - * - * @summary Deletes an NSP Logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationDelete.json - */ -async function nspLoggingConfigurationDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLoggingConfigurations.delete( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - ); - console.log(result); -} - -async function main() { - await nspLoggingConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsGetSample.js deleted file mode 100644 index f47b75879f61..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the NSP logging configuration. - * - * @summary Gets the NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationGet.json - */ -async function nspLoggingConfigurationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLoggingConfigurations.get( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - ); - console.log(result); -} - -async function main() { - await nspLoggingConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsListSample.js deleted file mode 100644 index 4a18e19bf8ea..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterLoggingConfigurationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP logging configuration. - * - * @summary Lists the NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationList.json - */ -async function nspLoggingConfigurationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLoggingConfigurations.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspLoggingConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterOperationStatusesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterOperationStatusesGetSample.js deleted file mode 100644 index 5db970a0bed3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterOperationStatusesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the operation status for the given operation id. - * - * @summary Gets the operation status for the given operation id. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspOperationStatusGet.json - */ -async function nspOperationStatusGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "location1"; - const operationId = "operationId1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterOperationStatuses.get(location, operationId); - console.log(result); -} - -async function main() { - await nspOperationStatusGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesCreateOrUpdateSample.js deleted file mode 100644 index 9e3fe098e2eb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesCreateOrUpdateSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network profile. - * - * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfilePut.json - */ -async function nspProfilesPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const parameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - parameters, - ); - console.log(result); -} - -async function main() { - await nspProfilesPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesDeleteSample.js deleted file mode 100644 index 6a4c6653664b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an NSP profile. - * - * @summary Deletes an NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileDelete.json - */ -async function nspProfilesDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.delete( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - ); - console.log(result); -} - -async function main() { - await nspProfilesDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesGetSample.js deleted file mode 100644 index aa85394dfffa..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified NSP profile. - * - * @summary Gets the specified NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileGet.json - */ -async function nspProfilesGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.get( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - ); - console.log(result); -} - -async function main() { - await nspProfilesGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesListSample.js deleted file mode 100644 index d1066baf034e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterProfilesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the NSP profiles in the specified network security perimeter. - * - * @summary Lists the NSP profiles in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileList.json - */ -async function nspProfilesList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterProfiles.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspProfilesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterServiceTagsListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterServiceTagsListSample.js deleted file mode 100644 index 5aa4191e0c3e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimeterServiceTagsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. - * - * @summary Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspServiceTagsList.json - */ -async function nspServiceTagsList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterServiceTags.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await nspServiceTagsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersCreateOrUpdateSample.js deleted file mode 100644 index 7af56fe255a4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersCreateOrUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a Network Security Perimeter. - * - * @summary Creates or updates a Network Security Perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterPut.json - */ -async function putNetworkSecurityPerimeter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const parameters = { location: "location1" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - parameters, - ); - console.log(result); -} - -async function main() { - await putNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersDeleteSample.js deleted file mode 100644 index c2df4d73b743..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network security perimeter. - * - * @summary Deletes a network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterDelete.json - */ -async function networkSecurityPerimeterDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "testNSP1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - ); - console.log(result); -} - -async function main() { - await networkSecurityPerimeterDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersGetSample.js deleted file mode 100644 index 13c8f0fabf15..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network security perimeter by the name. - * - * @summary Gets the specified network security perimeter by the name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterGet.json - */ -async function networkSecurityPerimeterGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.get( - resourceGroupName, - networkSecurityPerimeterName, - ); - console.log(result); -} - -async function main() { - await networkSecurityPerimeterGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersListBySubscriptionSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersListBySubscriptionSample.js deleted file mode 100644 index 990115dd2edf..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersListBySubscriptionSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network security perimeters in a subscription. - * - * @summary List all network security perimeters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterListAll.json - */ -async function networkSecurityPerimetersList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkSecurityPerimetersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersListSample.js deleted file mode 100644 index 6574254f4f77..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List network security perimeters in a resource group. - * - * @summary List network security perimeters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterList.json - */ -async function listNetworkSecurityPerimeter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeters.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersPatchSample.js b/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersPatchSample.js deleted file mode 100644 index af0e9f2bd111..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkSecurityPerimetersPatchSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Patch Tags for a Network Security Perimeter. - * - * @summary Patch Tags for a Network Security Perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterPatch.json - */ -async function patchNetworkSecurityPerimeter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const parameters = { tags: { description: "nsp1" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.patch( - resourceGroupName, - networkSecurityPerimeterName, - parameters, - ); - console.log(result); -} - -async function main() { - await patchNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 7de572df5b0e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * - * @summary Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionPut.json - */ -async function networkVirtualApplianceConnectionPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const networkVirtualApplianceConnectionParameters = { - namePropertiesName: "connection1", - asn: 64512, - bgpPeerAddress: ["169.254.16.13", "169.254.16.14"], - enableInternetSecurity: false, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - ], - labels: ["label1"], - }, - }, - tunnelIdentifier: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualApplianceConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - networkVirtualApplianceConnectionParameters, - ); - console.log(result); -} - -async function main() { - await networkVirtualApplianceConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsDeleteSample.js deleted file mode 100644 index ef5505df63e4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a NVA connection. - * - * @summary Deletes a NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionDelete.json - */ -async function networkVirtualApplianceConnectionDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualApplianceConnections.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - ); - console.log(result); -} - -async function main() { - await networkVirtualApplianceConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsGetSample.js deleted file mode 100644 index 30134fa6786a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of specified NVA connection. - * - * @summary Retrieves the details of specified NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionGet.json - */ -async function networkVirtualApplianceConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualApplianceConnections.get( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - ); - console.log(result); -} - -async function main() { - await networkVirtualApplianceConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsListSample.js deleted file mode 100644 index bbab727f24a4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualApplianceConnectionsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists NetworkVirtualApplianceConnections under the NVA. - * - * @summary Lists NetworkVirtualApplianceConnections under the NVA. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionList.json - */ -async function networkVirtualApplianceConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualApplianceConnections.list( - resourceGroupName, - networkVirtualApplianceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkVirtualApplianceConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesCreateOrUpdateSample.js deleted file mode 100644 index bba8bb880b9d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesCreateOrUpdateSample.js +++ /dev/null @@ -1,468 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetBasicPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNic() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetIngressPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicIncludingInternetIngress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - internetIngressPublicIps: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/slbip", - }, - ], - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetNetworkProfilePut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicIncludingNetworkProfile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - networkProfile: { - networkInterfaceConfigurations: [ - { - nicType: "PublicNic", - properties: { - ipConfigurations: [ - { - name: "myPrimaryPublicIpConfig", - properties: { primary: true }, - }, - { - name: "myNonPrimaryPublicIpConfig", - properties: { primary: false }, - }, - ], - }, - }, - { - nicType: "PrivateNic", - properties: { - ipConfigurations: [ - { - name: "myPrimaryPrivateIpConfig", - properties: { primary: true }, - }, - { - name: "myNonPrimaryPrivateIpConfig", - properties: { primary: false }, - }, - ], - }, - }, - ], - }, - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetAdditionalPrivatePut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicAdditionalPrivateNic() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - { - name: "myAdditionalInterface", - type: ["AdditionalPrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetAdditionalPublicPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicAdditionalPublicNic() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - { - name: "myAdditionalPublicInterface", - type: ["AdditionalPublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualAppliancePut.json - */ -async function createNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - additionalNics: [{ name: "exrsdwan", hasPublicIp: true }], - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - internetIngressPublicIps: [ - { - id: "/subscriptions/{{subscriptionId}}/resourceGroups/{{rg}}/providers/Microsoft.Network/publicIPAddresses/slbip", - }, - ], - location: "West US", - networkProfile: { - networkInterfaceConfigurations: [ - { - nicType: "PublicNic", - properties: { - ipConfigurations: [ - { name: "publicnicipconfig", properties: { primary: true } }, - { name: "publicnicipconfig-2", properties: { primary: false } }, - ], - }, - }, - { - nicType: "PrivateNic", - properties: { - ipConfigurations: [ - { name: "privatenicipconfig", properties: { primary: true } }, - { name: "privatenicipconfig-2", properties: { primary: false } }, - ], - }, - }, - ], - }, - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "12.1", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSaaSPut.json - */ -async function createSaaSNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { - delegation: { serviceName: "PaloAltoNetworks.Cloudngfw/firewalls" }, - location: "West US", - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNvaInVNetWithPrivateNicPublicNic(); - await createNvaInVNetWithPrivateNicPublicNicIncludingInternetIngress(); - await createNvaInVNetWithPrivateNicPublicNicIncludingNetworkProfile(); - await createNvaInVNetWithPrivateNicPublicNicAdditionalPrivateNic(); - await createNvaInVNetWithPrivateNicPublicNicAdditionalPublicNic(); - await createNetworkVirtualAppliance(); - await createSaaSNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesDeleteSample.js deleted file mode 100644 index 172f2f9329c7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Network Virtual Appliance. - * - * @summary Deletes the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceDelete.json - */ -async function deleteNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesGetBootDiagnosticLogsSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesGetBootDiagnosticLogsSample.js deleted file mode 100644 index 58001c128696..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesGetBootDiagnosticLogsSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. - * - * @summary Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceBootDiagnostics.json - */ -async function retrieveBootDiagnosticLogsForAGivenNvaVmssInstance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const request = { - consoleScreenshotStorageSasUrl: - "https://blobcortextesturl.blob.core.windows.net/nvaBootDiagContainer/consoleScreenshot.png?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - instanceId: 0, - serialConsoleStorageSasUrl: - "https://blobcortextesturl.blob.core.windows.net/nvaBootDiagContainer/serialLogs.txt?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginGetBootDiagnosticLogsAndWait( - resourceGroupName, - networkVirtualApplianceName, - request, - ); - console.log(result); -} - -async function main() { - await retrieveBootDiagnosticLogsForAGivenNvaVmssInstance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesGetSample.js deleted file mode 100644 index 59b25efd2125..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Network Virtual Appliance. - * - * @summary Gets the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceGet.json - */ -async function getNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.get( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main() { - await getNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesListByResourceGroupSample.js deleted file mode 100644 index e34a16e301cd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Network Virtual Appliances in a resource group. - * - * @summary Lists all Network Virtual Appliances in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json - */ -async function listAllNetworkVirtualApplianceForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualAppliances.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkVirtualApplianceForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesListSample.js deleted file mode 100644 index a1a24d1161bb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all Network Virtual Appliances in a subscription. - * - * @summary Gets all Network Virtual Appliances in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceListBySubscription.json - */ -async function listAllNetworkVirtualAppliancesForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualAppliances.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkVirtualAppliancesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesReimageSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesReimageSample.js deleted file mode 100644 index 29bdd8a4cfac..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesReimageSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Reimages one VM belonging to the specified Network Virtual Appliance. - * - * @summary Reimages one VM belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSpecificReimage.json - */ -async function reimagesSpecificNetworkVirtualApplianceVMSInVMScaleSet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginReimageAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main() { - await reimagesSpecificNetworkVirtualApplianceVMSInVMScaleSet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesRestartSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesRestartSample.js deleted file mode 100644 index 764d816652e4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesRestartSample.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * - * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceEmptyRestart.json - */ -async function restartAllNetworkVirtualApplianceVMSInVMScaleSet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginRestartAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * - * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSpecificRestart.json - */ -async function restartSpecificNetworkVirtualApplianceVMSInVMScaleSet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginRestartAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main() { - await restartAllNetworkVirtualApplianceVMSInVMScaleSet(); - await restartSpecificNetworkVirtualApplianceVMSInVMScaleSet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesUpdateTagsSample.js deleted file mode 100644 index 97bf8aaf1c09..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkVirtualAppliancesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a Network Virtual Appliance. - * - * @summary Updates a Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceUpdateTags.json - */ -async function updateNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.updateTags( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersCheckConnectivitySample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersCheckConnectivitySample.js deleted file mode 100644 index ef8d604ab177..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersCheckConnectivitySample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * - * @summary Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectivityCheck.json - */ -async function checkConnectivity() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - destination: { address: "192.168.100.4", port: 3389 }, - preferredIPVersion: "IPv4", - source: { - resourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginCheckConnectivityAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await checkConnectivity(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersCreateOrUpdateSample.js deleted file mode 100644 index eedb3087dc97..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersCreateOrUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network watcher in the specified resource group. - * - * @summary Creates or updates a network watcher in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherCreate.json - */ -async function createNetworkWatcher() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.createOrUpdate( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersDeleteSample.js deleted file mode 100644 index d5d184e07b2b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified network watcher resource. - * - * @summary Deletes the specified network watcher resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherDelete.json - */ -async function deleteNetworkWatcher() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetAzureReachabilityReportSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetAzureReachabilityReportSample.js deleted file mode 100644 index adbb4ea165d4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetAzureReachabilityReportSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @summary NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json - */ -async function getAzureReachabilityReport() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - azureLocations: ["West US"], - endTime: new Date("2017-09-10T00:00:00Z"), - providerLocation: { country: "United States", state: "washington" }, - providers: ["Frontier Communications of America, Inc. - ASN 5650"], - startTime: new Date("2017-09-07T00:00:00Z"), - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetAzureReachabilityReportAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getAzureReachabilityReport(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetFlowLogStatusSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetFlowLogStatusSample.js deleted file mode 100644 index cef021f83a1a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetFlowLogStatusSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Queries status of flow log and traffic analytics (optional) on a specified resource. - * - * @summary Queries status of flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogStatusQuery.json - */ -async function getFlowLogStatus() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetFlowLogStatusAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getFlowLogStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js deleted file mode 100644 index db10cb250ae5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * - * @summary Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json - */ -async function networkConfigurationDiagnostic() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - profiles: [ - { - destination: "12.11.12.14", - destinationPort: "12100", - direction: "Inbound", - source: "10.1.0.4", - protocol: "TCP", - }, - ], - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetNetworkConfigurationDiagnosticAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await networkConfigurationDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetNextHopSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetNextHopSample.js deleted file mode 100644 index 1522ee6a0e78..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetNextHopSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the next hop from the specified VM. - * - * @summary Gets the next hop from the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherNextHopGet.json - */ -async function getNextHop() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - destinationIPAddress: "10.0.0.10", - sourceIPAddress: "10.0.0.5", - targetNicResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetNextHopAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getNextHop(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetSample.js deleted file mode 100644 index 84f374d19d3b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified network watcher by resource group. - * - * @summary Gets the specified network watcher by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherGet.json - */ -async function getNetworkWatcher() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.get(resourceGroupName, networkWatcherName); - console.log(result); -} - -async function main() { - await getNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTopologySample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTopologySample.js deleted file mode 100644 index bb835853fb12..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTopologySample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the current network topology by resource group. - * - * @summary Gets the current network topology by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTopologyGet.json - */ -async function getTopology() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { targetResourceGroupName: "rg2" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.getTopology( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getTopology(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTroubleshootingResultSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTroubleshootingResultSample.js deleted file mode 100644 index 1af6becfb4d9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTroubleshootingResultSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the last completed troubleshooting result on a specified resource. - * - * @summary Get the last completed troubleshooting result on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTroubleshootResultQuery.json - */ -async function getTroubleshootResult() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetTroubleshootingResultAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getTroubleshootResult(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTroubleshootingSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTroubleshootingSample.js deleted file mode 100644 index 0a5ddedfb06e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetTroubleshootingSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Initiate troubleshooting on a specified resource. - * - * @summary Initiate troubleshooting on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTroubleshootGet.json - */ -async function getTroubleshooting() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", - storagePath: "https://st1.blob.core.windows.net/cn1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetTroubleshootingAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getTroubleshooting(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetVMSecurityRulesSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetVMSecurityRulesSample.js deleted file mode 100644 index eca224e11207..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersGetVMSecurityRulesSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the configured and effective security group rules on the specified VM. - * - * @summary Gets the configured and effective security group rules on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherSecurityGroupViewGet.json - */ -async function getSecurityGroupView() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetVMSecurityRulesAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getSecurityGroupView(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersListAllSample.js deleted file mode 100644 index 711dcd587e3f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network watchers by subscription. - * - * @summary Gets all network watchers by subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherListAll.json - */ -async function listAllNetworkWatchers() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkWatchers.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkWatchers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersListAvailableProvidersSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersListAvailableProvidersSample.js deleted file mode 100644 index 3768923d25a3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersListAvailableProvidersSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * - * @summary NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherAvailableProvidersListGet.json - */ -async function getAvailableProvidersList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - azureLocations: ["West US"], - city: "seattle", - country: "United States", - state: "washington", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginListAvailableProvidersAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await getAvailableProvidersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersListSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersListSample.js deleted file mode 100644 index 571d35b3fdea..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all network watchers by resource group. - * - * @summary Gets all network watchers by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherList.json - */ -async function listNetworkWatchers() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkWatchers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkWatchers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersSetFlowLogConfigurationSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersSetFlowLogConfigurationSample.js deleted file mode 100644 index bb37157d7021..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersSetFlowLogConfigurationSample.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Configures flow log and traffic analytics (optional) on a specified resource. - * - * @summary Configures flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogConfigure.json - */ -async function configureFlowLog() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - enabled: true, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": - {}, - }, - }, - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginSetFlowLogConfigurationAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await configureFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersUpdateTagsSample.js deleted file mode 100644 index 9bf72ce45878..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a network watcher tags. - * - * @summary Updates a network watcher tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherUpdateTags.json - */ -async function updateNetworkWatcherTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.updateTags( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateNetworkWatcherTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/networkWatchersVerifyIPFlowSample.js b/sdk/network/arm-network/samples/v36/javascript/networkWatchersVerifyIPFlowSample.js deleted file mode 100644 index 95ecb254bd73..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/networkWatchersVerifyIPFlowSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * - * @summary Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherIpFlowVerify.json - */ -async function ipFlowVerify() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters = { - direction: "Outbound", - localIPAddress: "10.2.0.4", - localPort: "80", - remoteIPAddress: "121.10.1.1", - remotePort: "80", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - protocol: "TCP", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginVerifyIPFlowAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main() { - await ipFlowVerify(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/operationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/operationsListSample.js deleted file mode 100644 index cf0a9ddf5f76..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/operationsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all of the available Network Rest API operations. - * - * @summary Lists all of the available Network Rest API operations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/OperationList.json - */ -async function getAListOfOperationsForAResourceProvider() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAListOfOperationsForAResourceProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysCreateOrUpdateSample.js deleted file mode 100644 index 0c7ab86492fa..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * - * @summary Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayPut.json - */ -async function p2SVpnGatewayPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const p2SVpnGatewayParameters = { - customDnsServers: ["1.1.1.1", "2.2.2.2"], - isRoutingPreferenceInternet: false, - location: "West US", - p2SConnectionConfigurations: [ - { - name: "P2SConnectionConfig1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/p2sVpnGateways/p2sVpnGateway1/p2sConnectionConfigurations/P2SConnectionConfig1", - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - vnetRoutes: { staticRoutes: [] }, - }, - vpnClientAddressPool: { addressPrefixes: ["101.3.0.0/16"] }, - }, - ], - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", - }, - vpnGatewayScaleUnit: 1, - vpnServerConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - ); - console.log(result); -} - -async function main() { - await p2SVpnGatewayPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysDeleteSample.js deleted file mode 100644 index fdf0f1756d2d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a virtual wan p2s vpn gateway. - * - * @summary Deletes a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayDelete.json - */ -async function p2SVpnGatewayDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginDeleteAndWait(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await p2SVpnGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js b/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js deleted file mode 100644 index fed09c3a64b3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json - */ -async function disconnectVpnConnectionsFromP2SVpnGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vpn-gateway-test"; - const p2SVpnGatewayName = "p2svpngateway"; - const request = { - vpnConnectionIds: ["vpnconnId1", "vpnconnId2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginDisconnectP2SVpnConnectionsAndWait( - resourceGroupName, - p2SVpnGatewayName, - request, - ); - console.log(result); -} - -async function main() { - await disconnectVpnConnectionsFromP2SVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js b/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js deleted file mode 100644 index 88530e2a4515..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * - * @summary Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json - */ -async function generateP2SVpnGatewayVpnprofile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const parameters = { - authenticationMethod: "EAPTLS", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginGenerateVpnProfileAndWait( - resourceGroupName, - gatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await generateP2SVpnGatewayVpnprofile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js b/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js deleted file mode 100644 index f73946d56f17..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json - */ -async function p2SVpnGatewayGetConnectionHealthDetailed() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vpn-gateway-test"; - const gatewayName = "p2svpngateway"; - const request = { - outputBlobSasUrl: - "https://blobcortextesturl.blob.core.windows.net/folderforconfig/p2sconnectionhealths?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - vpnUserNamesFilter: ["vpnUser1", "vpnUser2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginGetP2SVpnConnectionHealthDetailedAndWait( - resourceGroupName, - gatewayName, - request, - ); - console.log(result); -} - -async function main() { - await p2SVpnGatewayGetConnectionHealthDetailed(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js b/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js deleted file mode 100644 index 95ff883a5470..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGetConnectionHealth.json - */ -async function p2SVpnGatewayGetConnectionHealth() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginGetP2SVpnConnectionHealthAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main() { - await p2SVpnGatewayGetConnectionHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetSample.js b/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetSample.js deleted file mode 100644 index 0055c0ef0ab6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a virtual wan p2s vpn gateway. - * - * @summary Retrieves the details of a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGet.json - */ -async function p2SVpnGatewayGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.get(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await p2SVpnGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysListByResourceGroupSample.js deleted file mode 100644 index 75a0ce254f83..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the P2SVpnGateways in a resource group. - * - * @summary Lists all the P2SVpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayListByResourceGroup.json - */ -async function p2SVpnGatewayListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.p2SVpnGateways.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await p2SVpnGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysListSample.js b/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysListSample.js deleted file mode 100644 index 981f57795f93..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the P2SVpnGateways in a subscription. - * - * @summary Lists all the P2SVpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayList.json - */ -async function p2SVpnGatewayListBySubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.p2SVpnGateways.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await p2SVpnGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysResetSample.js b/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysResetSample.js deleted file mode 100644 index 3df8083bd86d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysResetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the primary of the p2s vpn gateway in the specified resource group. - * - * @summary Resets the primary of the p2s vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayReset.json - */ -async function resetP2SVpnGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginResetAndWait(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await resetP2SVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysUpdateTagsSample.js deleted file mode 100644 index c443835f5ce9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/p2SVpnGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates virtual wan p2s vpn gateway tags. - * - * @summary Updates virtual wan p2s vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayUpdateTags.json - */ -async function p2SVpnGatewayUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const p2SVpnGatewayParameters = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginUpdateTagsAndWait( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - ); - console.log(result); -} - -async function main() { - await p2SVpnGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/package.json b/sdk/network/arm-network/samples/v36/javascript/package.json deleted file mode 100644 index b6cab7768aa2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "@azure-samples/arm-network-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=20.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/network/arm-network" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic", - "cloud" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network", - "dependencies": { - "@azure/arm-network": "latest", - "dotenv": "latest", - "@azure/identity": "^4.13.0" - }, - "devDependencies": { - "cross-env": "latest" - } -} diff --git a/sdk/network/arm-network/samples/v36/javascript/packetCapturesCreateSample.js b/sdk/network/arm-network/samples/v36/javascript/packetCapturesCreateSample.js deleted file mode 100644 index 0e9d2850b563..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/packetCapturesCreateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create and start a packet capture on the specified VM. - * - * @summary Create and start a packet capture on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureCreate.json - */ -async function createPacketCapture() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const parameters = { - bytesToCapturePerPacket: 10000, - filters: [{ localIPAddress: "10.0.0.4", localPort: "80", protocol: "TCP" }], - storageLocation: { - filePath: "D:\\capture\\pc1.cap", - storageId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/pcstore", - storagePath: "https://mytestaccountname.blob.core.windows.net/capture/pc1.cap", - }, - target: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - timeLimitInSeconds: 100, - totalBytesPerSession: 100000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginCreateAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/packetCapturesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/packetCapturesDeleteSample.js deleted file mode 100644 index c8022862f0e8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/packetCapturesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified packet capture session. - * - * @summary Deletes the specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureDelete.json - */ -async function deletePacketCapture() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main() { - await deletePacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/packetCapturesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/packetCapturesGetSample.js deleted file mode 100644 index 24433b9131d7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/packetCapturesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a packet capture session by name. - * - * @summary Gets a packet capture session by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureGet.json - */ -async function getPacketCapture() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.get( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main() { - await getPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/packetCapturesGetStatusSample.js b/sdk/network/arm-network/samples/v36/javascript/packetCapturesGetStatusSample.js deleted file mode 100644 index 3759faf1c1ce..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/packetCapturesGetStatusSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Query the status of a running packet capture session. - * - * @summary Query the status of a running packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json - */ -async function queryPacketCaptureStatus() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginGetStatusAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main() { - await queryPacketCaptureStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/packetCapturesListSample.js b/sdk/network/arm-network/samples/v36/javascript/packetCapturesListSample.js deleted file mode 100644 index 9dcdefa24203..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/packetCapturesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all packet capture sessions within the specified resource group. - * - * @summary Lists all packet capture sessions within the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCapturesList.json - */ -async function listPacketCaptures() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.packetCaptures.list(resourceGroupName, networkWatcherName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPacketCaptures(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/packetCapturesStopSample.js b/sdk/network/arm-network/samples/v36/javascript/packetCapturesStopSample.js deleted file mode 100644 index 3765e187cc38..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/packetCapturesStopSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops a specified packet capture session. - * - * @summary Stops a specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureStop.json - */ -async function stopPacketCapture() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginStopAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main() { - await stopPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/peerExpressRouteCircuitConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/peerExpressRouteCircuitConnectionsGetSample.js deleted file mode 100644 index d501a7760def..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/peerExpressRouteCircuitConnectionsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * - * @summary Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PeerExpressRouteCircuitConnectionGet.json - */ -async function peerExpressRouteCircuitConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "60aee347-e889-4a42-8c1b-0aae8b1e4013"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.peerExpressRouteCircuitConnections.get( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main() { - await peerExpressRouteCircuitConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/peerExpressRouteCircuitConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/peerExpressRouteCircuitConnectionsListSample.js deleted file mode 100644 index f7e7b70444ce..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/peerExpressRouteCircuitConnectionsListSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all global reach peer connections associated with a private peering in an express route circuit. - * - * @summary Gets all global reach peer connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PeerExpressRouteCircuitConnectionList.json - */ -async function listPeerExpressRouteCircuitConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.peerExpressRouteCircuitConnections.list( - resourceGroupName, - circuitName, - peeringName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPeerExpressRouteCircuitConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js deleted file mode 100644 index 22e810886b7b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a private dns zone group in the specified private endpoint. - * - * @summary Creates or updates a private dns zone group in the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json - */ -async function createPrivateDnsZoneGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const parameters = { - privateDnsZoneConfigs: [ - { - privateDnsZoneId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/zone1.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsDeleteSample.js deleted file mode 100644 index 7feaf7173466..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified private dns zone group. - * - * @summary Deletes the specified private dns zone group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json - */ -async function deletePrivateDnsZoneGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.beginDeleteAndWait( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - ); - console.log(result); -} - -async function main() { - await deletePrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsGetSample.js deleted file mode 100644 index 154912384232..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the private dns zone group resource by specified private dns zone group name. - * - * @summary Gets the private dns zone group resource by specified private dns zone group name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupGet.json - */ -async function getPrivateDnsZoneGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.get( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - ); - console.log(result); -} - -async function main() { - await getPrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsListSample.js b/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsListSample.js deleted file mode 100644 index f9abe5529d08..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateDnsZoneGroupsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private dns zone groups in a private endpoint. - * - * @summary Gets all private dns zone groups in a private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupList.json - */ -async function listPrivateEndpointsInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const privateEndpointName = "testPe"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateDnsZoneGroups.list( - privateEndpointName, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPrivateEndpointsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateEndpointsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/privateEndpointsCreateOrUpdateSample.js deleted file mode 100644 index c192860622f8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateEndpointsCreateOrUpdateSample.js +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointCreate.json - */ -async function createPrivateEndpoint() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters = { - customNetworkInterfaceName: "testPeNic", - ipConfigurations: [ - { - name: "pestaticconfig", - groupId: "file", - memberName: "file", - privateIPAddress: "192.168.0.6", - }, - ], - ipVersionType: "IPv4", - location: "eastus2euap", - privateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointCreateWithASG.json - */ -async function createPrivateEndpointWithApplicationSecurityGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters = { - applicationSecurityGroups: [ - { - id: "/subscriptions/subId/resourceGroups/rg1/provders/Microsoft.Network/applicationSecurityGroup/asg1", - }, - ], - location: "eastus2euap", - privateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointCreateForManualApproval.json - */ -async function createPrivateEndpointWithManualApprovalConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters = { - customNetworkInterfaceName: "testPeNic", - ipConfigurations: [ - { - name: "pestaticconfig", - groupId: "file", - memberName: "file", - privateIPAddress: "192.168.0.5", - }, - ], - location: "eastus", - manualPrivateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please manually approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPrivateEndpoint(); - await createPrivateEndpointWithApplicationSecurityGroups(); - await createPrivateEndpointWithManualApprovalConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateEndpointsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/privateEndpointsDeleteSample.js deleted file mode 100644 index 035fc80ad579..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateEndpointsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified private endpoint. - * - * @summary Deletes the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDelete.json - */ -async function deletePrivateEndpoint() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginDeleteAndWait( - resourceGroupName, - privateEndpointName, - ); - console.log(result); -} - -async function main() { - await deletePrivateEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateEndpointsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/privateEndpointsGetSample.js deleted file mode 100644 index 87e7803ee94a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateEndpointsGetSample.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointGet.json - */ -async function getPrivateEndpoint() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get(resourceGroupName, privateEndpointName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointGetWithASG.json - */ -async function getPrivateEndpointWithApplicationSecurityGroups() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get(resourceGroupName, privateEndpointName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointGetForManualApproval.json - */ -async function getPrivateEndpointWithManualApprovalConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get(resourceGroupName, privateEndpointName); - console.log(result); -} - -async function main() { - await getPrivateEndpoint(); - await getPrivateEndpointWithApplicationSecurityGroups(); - await getPrivateEndpointWithManualApprovalConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateEndpointsListBySubscriptionSample.js b/sdk/network/arm-network/samples/v36/javascript/privateEndpointsListBySubscriptionSample.js deleted file mode 100644 index fb49bcf143e0..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateEndpointsListBySubscriptionSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private endpoints in a subscription. - * - * @summary Gets all private endpoints in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointListAll.json - */ -async function listAllPrivateEndpoints() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateEndpoints.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllPrivateEndpoints(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateEndpointsListSample.js b/sdk/network/arm-network/samples/v36/javascript/privateEndpointsListSample.js deleted file mode 100644 index cb20c38b27ea..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateEndpointsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private endpoints in a resource group. - * - * @summary Gets all private endpoints in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointList.json - */ -async function listPrivateEndpointsInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateEndpoints.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPrivateEndpointsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js deleted file mode 100644 index 0536953491b6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks whether the subscription is visible to private link service in the specified resource group. - * - * @summary Checks whether the subscription is visible to private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json - */ -async function checkPrivateLinkServiceVisibility() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const parameters = { - privateLinkServiceAlias: "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.beginCheckPrivateLinkServiceVisibilityByResourceGroupAndWait( - location, - resourceGroupName, - parameters, - ); - console.log(result); -} - -async function main() { - await checkPrivateLinkServiceVisibility(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js deleted file mode 100644 index 3036daa500ed..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks whether the subscription is visible to private link service. - * - * @summary Checks whether the subscription is visible to private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckPrivateLinkServiceVisibility.json - */ -async function checkPrivateLinkServiceVisibility() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const parameters = { - privateLinkServiceAlias: "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginCheckPrivateLinkServiceVisibilityAndWait( - location, - parameters, - ); - console.log(result); -} - -async function main() { - await checkPrivateLinkServiceVisibility(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCreateOrUpdateSample.js deleted file mode 100644 index 039e0c15e05b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesCreateOrUpdateSample.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an private link service in the specified resource group. - * - * @summary Creates or updates an private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceCreate.json - */ -async function createPrivateLinkService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const parameters = { - autoApproval: { subscriptions: ["subscription1", "subscription2"] }, - fqdns: ["fqdn1", "fqdn2", "fqdn3"], - ipConfigurations: [ - { - name: "fe-lb", - privateIPAddress: "10.0.1.4", - privateIPAddressVersion: "IPv4", - privateIPAllocationMethod: "Static", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - loadBalancerFrontendIpConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - ], - location: "eastus", - visibility: { - subscriptions: ["subscription1", "subscription2", "subscription3"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js deleted file mode 100644 index 1ef392f5f3fb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete private end point connection for a private link service in a subscription. - * - * @summary Delete private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json - */ -async function deletePrivateEndPointConnectionForAPrivateLinkService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginDeletePrivateEndpointConnectionAndWait( - resourceGroupName, - serviceName, - peConnectionName, - ); - console.log(result); -} - -async function main() { - await deletePrivateEndPointConnectionForAPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesDeleteSample.js deleted file mode 100644 index 1e88048484a3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified private link service. - * - * @summary Deletes the specified private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceDelete.json - */ -async function deletePrivateLinkService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginDeleteAndWait( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main() { - await deletePrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js deleted file mode 100644 index 801946267d91..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specific private end point connection by specific private link service in the resource group. - * - * @summary Get the specific private end point connection by specific private link service in the resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json - */ -async function getPrivateEndPointConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.getPrivateEndpointConnection( - resourceGroupName, - serviceName, - peConnectionName, - ); - console.log(result); -} - -async function main() { - await getPrivateEndPointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesGetSample.js deleted file mode 100644 index 171f84d7b773..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified private link service by resource group. - * - * @summary Gets the specified private link service by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceGet.json - */ -async function getPrivateLinkService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.get(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await getPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js deleted file mode 100644 index f7ca4240571b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * - * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json - */ -async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listAutoApprovedPrivateLinkServicesByResourceGroup( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js deleted file mode 100644 index 1913cf1820c9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * - * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AutoApprovedPrivateLinkServicesGet.json - */ -async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listAutoApprovedPrivateLinkServices( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListBySubscriptionSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListBySubscriptionSample.js deleted file mode 100644 index a2c05b5caaae..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListBySubscriptionSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private link service in a subscription. - * - * @summary Gets all private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceListAll.json - */ -async function listAllPrivateListService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllPrivateListService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js deleted file mode 100644 index 44490b632671..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private end point connections for a specific private link service. - * - * @summary Gets all private end point connections for a specific private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json - */ -async function listPrivateLinkServiceInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listPrivateEndpointConnections( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPrivateLinkServiceInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListSample.js deleted file mode 100644 index 0a9e322c2cc4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all private link services in a resource group. - * - * @summary Gets all private link services in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceList.json - */ -async function listPrivateLinkServiceInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPrivateLinkServiceInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js b/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js deleted file mode 100644 index 7e338fab7156..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Approve or reject private end point connection for a private link service in a subscription. - * - * @summary Approve or reject private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json - */ -async function approveOrRejectPrivateEndPointConnectionForAPrivateLinkService() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const parameters = { - name: "testPlePeConnection", - privateEndpoint: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe", - }, - privateLinkServiceConnectionState: { - description: "approved it for some reason.", - status: "Approved", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.updatePrivateEndpointConnection( - resourceGroupName, - serviceName, - peConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await approveOrRejectPrivateEndPointConnectionForAPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesCreateOrUpdateSample.js deleted file mode 100644 index 69e6d9027b0d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesCreateOrUpdateSample.js +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDns.json - */ -async function createPublicIPAddressDns() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { - dnsSettings: { domainNameLabel: "dnslbl" }, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json - */ -async function createPublicIPAddressDnsWithDomainNameLabelScope() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { - dnsSettings: { - domainNameLabel: "dnslbl", - domainNameLabelScope: "TenantReuse", - }, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateCustomizedValues.json - */ -async function createPublicIPAddressAllocationMethod() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { - idleTimeoutInMinutes: 10, - location: "eastus", - publicIPAddressVersion: "IPv4", - publicIPAllocationMethod: "Static", - sku: { name: "Standard", tier: "Global" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDefaults.json - */ -async function createPublicIPAddressDefaults() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDefaultsStandardV2Sku.json - */ -async function createPublicIPAddressDefaultsWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPublicIPAddressDns(); - await createPublicIPAddressDnsWithDomainNameLabelScope(); - await createPublicIPAddressAllocationMethod(); - await createPublicIPAddressDefaults(); - await createPublicIPAddressDefaultsWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDdosProtectionStatusSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDdosProtectionStatusSample.js deleted file mode 100644 index b7f68b54a6ec..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDdosProtectionStatusSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the Ddos Protection Status of a Public IP Address - * - * @summary Gets the Ddos Protection Status of a Public IP Address - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json - */ -async function getDdosProtectionStatusOfAPublicIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-pip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginDdosProtectionStatusAndWait( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -async function main() { - await getDdosProtectionStatusOfAPublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDeleteSample.js deleted file mode 100644 index 8d1f6fa9727d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified public IP address. - * - * @summary Deletes the specified public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressDelete.json - */ -async function deletePublicIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginDeleteAndWait( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -async function main() { - await deletePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js deleted file mode 100644 index 415c617f5879..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. - * - * @summary Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressDisassociateCloudServiceReservedPublicIp.json - */ -async function disassociatePublicIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "pip1"; - const parameters = { - publicIpArmId: - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/publicIpAddresses/pip2", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.beginDisassociateCloudServiceReservedPublicIpAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main() { - await disassociatePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js deleted file mode 100644 index cf28f7497351..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified public IP address in a cloud service. - * - * @summary Get the specified public IP address in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServicePublicIpGet.json - */ -async function getVmssPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const roleInstanceName = "Test_VM_0"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const publicIpAddressName = "pub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.getCloudServicePublicIPAddress( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - ); - console.log(result); -} - -async function main() { - await getVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetSample.js deleted file mode 100644 index 76a24f8c8fc0..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified public IP address in a specified resource group. - * - * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGet.json - */ -async function getPublicIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "testDNS-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.get(resourceGroupName, publicIpAddressName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified public IP address in a specified resource group. - * - * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGetStandardV2Sku.json - */ -async function getPublicIPAddressWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "testDNS-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.get(resourceGroupName, publicIpAddressName); - console.log(result); -} - -async function main() { - await getPublicIPAddress(); - await getPublicIPAddressWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js deleted file mode 100644 index 5605824fec9b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified public IP address in a virtual machine scale set. - * - * @summary Get the specified public IP address in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssPublicIpGet.json - */ -async function getVmssPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const publicIpAddressName = "pub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.getVirtualMachineScaleSetPublicIPAddress( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - ); - console.log(result); -} - -async function main() { - await getVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListAllSample.js deleted file mode 100644 index 81da2611df83..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the public IP addresses in a subscription. - * - * @summary Gets all the public IP addresses in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressListAll.json - */ -async function listAllPublicIPAddresses() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllPublicIPAddresses(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js deleted file mode 100644 index bdc89610047f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all public IP addresses on a cloud service level. - * - * @summary Gets information about all public IP addresses on a cloud service level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServicePublicIpListAll.json - */ -async function listVmssPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listCloudServicePublicIPAddresses( - resourceGroupName, - cloudServiceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js deleted file mode 100644 index 658ab1a42534..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * - * @summary Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceRoleInstancePublicIpList.json - */ -async function listVmssvmPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const roleInstanceName = "Test_VM_0"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listCloudServiceRoleInstancePublicIPAddresses( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVmssvmPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListSample.js deleted file mode 100644 index d84205e22221..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all public IP addresses in a resource group. - * - * @summary Gets all public IP addresses in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressList.json - */ -async function listResourceGroupPublicIPAddresses() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listResourceGroupPublicIPAddresses(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js deleted file mode 100644 index 8eaf96d1b68b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all public IP addresses on a virtual machine scale set level. - * - * @summary Gets information about all public IP addresses on a virtual machine scale set level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssPublicIpListAll.json - */ -async function listVmssPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listVirtualMachineScaleSetPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js deleted file mode 100644 index 91fff2863ac5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * - * @summary Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssVmPublicIpList.json - */ -async function listVmssvmPublicIP() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listVirtualMachineScaleSetVMPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVmssvmPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesReserveCloudServicePublicIPAddressSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesReserveCloudServicePublicIPAddressSample.js deleted file mode 100644 index e7e0dc2ad636..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesReserveCloudServicePublicIPAddressSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. - * - * @summary Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressReserve.json - */ -async function reservePublicIPAddress() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { - isRollback: "false", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginReserveCloudServicePublicIpAddressAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main() { - await reservePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesUpdateTagsSample.js deleted file mode 100644 index 81c4e3281ea1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPAddressesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates public IP address tags. - * - * @summary Updates public IP address tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressUpdateTags.json - */ -async function updatePublicIPAddressTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.updateTags( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main() { - await updatePublicIPAddressTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesCreateOrUpdateSample.js deleted file mode 100644 index 51630a83694f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesCreateOrUpdateSample.js +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixCreateCustomizedValues.json - */ -async function createPublicIPPrefixAllocationMethod() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters = { - location: "westus", - prefixLength: 30, - publicIPAddressVersion: "IPv4", - sku: { name: "Standard", tier: "Regional" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixCreateDefaults.json - */ -async function createPublicIPPrefixDefaults() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters = { - location: "westus", - prefixLength: 30, - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixCreateDefaultsStandardV2Sku.json - */ -async function createPublicIPPrefixDefaultsWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters = { - location: "westus", - prefixLength: 30, - sku: { name: "StandardV2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main() { - await createPublicIPPrefixAllocationMethod(); - await createPublicIPPrefixDefaults(); - await createPublicIPPrefixDefaultsWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesDeleteSample.js deleted file mode 100644 index b07c8b35324f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified public IP prefix. - * - * @summary Deletes the specified public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixDelete.json - */ -async function deletePublicIPPrefix() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginDeleteAndWait( - resourceGroupName, - publicIpPrefixName, - ); - console.log(result); -} - -async function main() { - await deletePublicIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesGetSample.js deleted file mode 100644 index 3c7a3385e91a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. - * - * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixGet.json - */ -async function getPublicIPPrefix() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.get(resourceGroupName, publicIpPrefixName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. - * - * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixGetStandardV2Sku.json - */ -async function getPublicIPPrefixWithStandardV2Sku() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.get(resourceGroupName, publicIpPrefixName); - console.log(result); -} - -async function main() { - await getPublicIPPrefix(); - await getPublicIPPrefixWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesListAllSample.js deleted file mode 100644 index bc6fd1ca75d7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the public IP prefixes in a subscription. - * - * @summary Gets all the public IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixListAll.json - */ -async function listAllPublicIPPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPPrefixes.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllPublicIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesListSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesListSample.js deleted file mode 100644 index 4c5f60580364..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all public IP prefixes in a resource group. - * - * @summary Gets all public IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixList.json - */ -async function listResourceGroupPublicIPPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPPrefixes.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listResourceGroupPublicIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesUpdateTagsSample.js deleted file mode 100644 index 41d959075d67..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/publicIPPrefixesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates public IP prefix tags. - * - * @summary Updates public IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixUpdateTags.json - */ -async function updatePublicIPPrefixTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.updateTags( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main() { - await updatePublicIPPrefixTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/putBastionShareableLinkSample.js b/sdk/network/arm-network/samples/v36/javascript/putBastionShareableLinkSample.js deleted file mode 100644 index 393344ff1310..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/putBastionShareableLinkSample.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Creates a Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkCreate.json - */ -async function createBastionShareableLinksForTheRequestVMS() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.beginListPutBastionShareableLinkAndWait( - resourceGroupName, - bastionHostName, - bslRequest, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await createBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsCreateSample.js b/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsCreateSample.js deleted file mode 100644 index 9a7d6aca7cc5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsCreateSample.js +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates Reachability Analysis Intent. - * - * @summary Creates Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentPut.json - */ -async function reachabilityAnalysisIntentCreate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntentName"; - const body = { - properties: { - description: "A sample reachability analysis intent", - destinationResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmDest", - ipTraffic: { - destinationIps: ["10.4.0.1"], - destinationPorts: ["0"], - protocols: ["Any"], - sourceIps: ["10.4.0.0"], - sourcePorts: ["0"], - }, - sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmSrc", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.create( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - body, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisIntentCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsDeleteSample.js deleted file mode 100644 index 7fcef68384ca..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes Reachability Analysis Intent. - * - * @summary Deletes Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentDelete.json - */ -async function reachabilityAnalysisIntentDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntent"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.delete( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisIntentDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsGetSample.js deleted file mode 100644 index fb1cf01d31b0..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the Reachability Analysis Intent. - * - * @summary Get the Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentGet.json - */ -async function reachabilityAnalysisIntentGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntentName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.get( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisIntentGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsListSample.js b/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsListSample.js deleted file mode 100644 index 2a16fa0aebee..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisIntentsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets list of Reachability Analysis Intents . - * - * @summary Gets list of Reachability Analysis Intents . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentList.json - */ -async function reachabilityAnalysisIntentList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testVerifierWorkspace1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reachabilityAnalysisIntents.list( - resourceGroupName, - networkManagerName, - workspaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await reachabilityAnalysisIntentList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsCreateSample.js b/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsCreateSample.js deleted file mode 100644 index c881df8c97ab..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsCreateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates Reachability Analysis Runs. - * - * @summary Creates Reachability Analysis Runs. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunPut.json - */ -async function reachabilityAnalysisRunCreate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRunName"; - const body = { - properties: { - description: "A sample reachability analysis run", - intentId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/verifierWorkspaces/testVerifierWorkspace1/reachabilityAnalysisIntents/testReachabilityAnalysisIntenant1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.create( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - body, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisRunCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsDeleteSample.js deleted file mode 100644 index e42c3f7589d4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes Reachability Analysis Run. - * - * @summary Deletes Reachability Analysis Run. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunDelete.json - */ -async function reachabilityAnalysisRunDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRun"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisRunDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsGetSample.js deleted file mode 100644 index 21743d7e72ec..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets Reachability Analysis Run. - * - * @summary Gets Reachability Analysis Run. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunGet.json - */ -async function reachabilityAnalysisRunGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRunName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.get( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - ); - console.log(result); -} - -async function main() { - await reachabilityAnalysisRunGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsListSample.js b/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsListSample.js deleted file mode 100644 index 8d75a519a3c2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/reachabilityAnalysisRunsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets list of Reachability Analysis Runs. - * - * @summary Gets list of Reachability Analysis Runs. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunList.json - */ -async function reachabilityAnalysisRunList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testVerifierWorkspace1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reachabilityAnalysisRuns.list( - resourceGroupName, - networkManagerName, - workspaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await reachabilityAnalysisRunList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/resourceNavigationLinksListSample.js b/sdk/network/arm-network/samples/v36/javascript/resourceNavigationLinksListSample.js deleted file mode 100644 index a41efae0e2b8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/resourceNavigationLinksListSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a list of resource navigation links for a subnet. - * - * @summary Gets a list of resource navigation links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json - */ -async function getResourceNavigationLinks() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnet"; - const subnetName = "subnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.resourceNavigationLinks.list( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main() { - await getResourceNavigationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesCreateOrUpdateSample.js deleted file mode 100644 index c13fe8b9ec94..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a route in the specified route filter. - * - * @summary Creates or updates a route in the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleCreate.json - */ -async function routeFilterRuleCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "ruleName"; - const routeFilterRuleParameters = { - access: "Allow", - communities: ["12076:5030", "12076:5040"], - routeFilterRuleType: "Community", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.beginCreateOrUpdateAndWait( - resourceGroupName, - routeFilterName, - ruleName, - routeFilterRuleParameters, - ); - console.log(result); -} - -async function main() { - await routeFilterRuleCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesDeleteSample.js deleted file mode 100644 index bf01d3fc379b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified rule from a route filter. - * - * @summary Deletes the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleDelete.json - */ -async function routeFilterRuleDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "ruleName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.beginDeleteAndWait( - resourceGroupName, - routeFilterName, - ruleName, - ); - console.log(result); -} - -async function main() { - await routeFilterRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesGetSample.js deleted file mode 100644 index 9f640f13bec0..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified rule from a route filter. - * - * @summary Gets the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleGet.json - */ -async function routeFilterRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.get(resourceGroupName, routeFilterName, ruleName); - console.log(result); -} - -async function main() { - await routeFilterRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesListByRouteFilterSample.js b/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesListByRouteFilterSample.js deleted file mode 100644 index c8ce4c5b7dad..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeFilterRulesListByRouteFilterSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all RouteFilterRules in a route filter. - * - * @summary Gets all RouteFilterRules in a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleListByRouteFilter.json - */ -async function routeFilterRuleListByRouteFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilterRules.listByRouteFilter( - resourceGroupName, - routeFilterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routeFilterRuleListByRouteFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeFiltersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/routeFiltersCreateOrUpdateSample.js deleted file mode 100644 index 6533cda11006..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeFiltersCreateOrUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a route filter in a specified resource group. - * - * @summary Creates or updates a route filter in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterCreate.json - */ -async function routeFilterCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const routeFilterParameters = { - location: "West US", - rules: [ - { - name: "ruleName", - access: "Allow", - communities: ["12076:5030", "12076:5040"], - routeFilterRuleType: "Community", - }, - ], - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.beginCreateOrUpdateAndWait( - resourceGroupName, - routeFilterName, - routeFilterParameters, - ); - console.log(result); -} - -async function main() { - await routeFilterCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeFiltersDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/routeFiltersDeleteSample.js deleted file mode 100644 index 1d8d151ad8c4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeFiltersDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified route filter. - * - * @summary Deletes the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterDelete.json - */ -async function routeFilterDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.beginDeleteAndWait(resourceGroupName, routeFilterName); - console.log(result); -} - -async function main() { - await routeFilterDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeFiltersGetSample.js b/sdk/network/arm-network/samples/v36/javascript/routeFiltersGetSample.js deleted file mode 100644 index daa6c03d3147..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeFiltersGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified route filter. - * - * @summary Gets the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterGet.json - */ -async function routeFilterGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.get(resourceGroupName, routeFilterName); - console.log(result); -} - -async function main() { - await routeFilterGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeFiltersListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/routeFiltersListByResourceGroupSample.js deleted file mode 100644 index 5c35a2bf9044..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeFiltersListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all route filters in a resource group. - * - * @summary Gets all route filters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterListByResourceGroup.json - */ -async function routeFilterListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilters.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routeFilterListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeFiltersListSample.js b/sdk/network/arm-network/samples/v36/javascript/routeFiltersListSample.js deleted file mode 100644 index bb9af9ec77a6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeFiltersListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all route filters in a subscription. - * - * @summary Gets all route filters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterList.json - */ -async function routeFilterList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilters.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routeFilterList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeFiltersUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/routeFiltersUpdateTagsSample.js deleted file mode 100644 index f1ebee260f95..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeFiltersUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of a route filter. - * - * @summary Updates tags of a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterUpdateTags.json - */ -async function updateRouteFilterTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const parameters = { tags: { key1: "value1" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.updateTags( - resourceGroupName, - routeFilterName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateRouteFilterTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeMapsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/routeMapsCreateOrUpdateSample.js deleted file mode 100644 index aafab8fb1650..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeMapsCreateOrUpdateSample.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a RouteMap if it doesn't exist else updates the existing one. - * - * @summary Creates a RouteMap if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapPut.json - */ -async function routeMapPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const routeMapParameters = { - associatedInboundConnections: [ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGateway1/expressRouteConnections/exrConn1", - ], - associatedOutboundConnections: [], - rules: [ - { - name: "rule1", - actions: [ - { - type: "Add", - parameters: [{ asPath: ["22334"], community: [], routePrefix: [] }], - }, - ], - matchCriteria: [ - { - asPath: [], - community: [], - matchCondition: "Contains", - routePrefix: ["10.0.0.0/8"], - }, - ], - nextStepIfMatched: "Continue", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeMapName, - routeMapParameters, - ); - console.log(result); -} - -async function main() { - await routeMapPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeMapsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/routeMapsDeleteSample.js deleted file mode 100644 index 12ac74cc1c79..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeMapsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a RouteMap. - * - * @summary Deletes a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapDelete.json - */ -async function routeMapDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeMapName, - ); - console.log(result); -} - -async function main() { - await routeMapDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeMapsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/routeMapsGetSample.js deleted file mode 100644 index 61595b15d021..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeMapsGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a RouteMap. - * - * @summary Retrieves the details of a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapGet.json - */ -async function routeMapGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.get(resourceGroupName, virtualHubName, routeMapName); - console.log(result); -} - -async function main() { - await routeMapGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeMapsListSample.js b/sdk/network/arm-network/samples/v36/javascript/routeMapsListSample.js deleted file mode 100644 index a77b5f7bdf61..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeMapsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all RouteMaps. - * - * @summary Retrieves the details of all RouteMaps. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapList.json - */ -async function routeMapList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeMaps.list(resourceGroupName, virtualHubName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routeMapList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeTablesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/routeTablesCreateOrUpdateSample.js deleted file mode 100644 index 250af6321a5e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeTablesCreateOrUpdateSample.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or updates a route table in a specified resource group. - * - * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableCreate.json - */ -async function createRouteTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or updates a route table in a specified resource group. - * - * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableCreateWithRoute.json - */ -async function createRouteTableWithRoute() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters = { - disableBgpRoutePropagation: true, - location: "westus", - routes: [ - { - name: "route1", - addressPrefix: "10.0.3.0/24", - nextHopType: "VirtualNetworkGateway", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - parameters, - ); - console.log(result); -} - -async function main() { - await createRouteTable(); - await createRouteTableWithRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeTablesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/routeTablesDeleteSample.js deleted file mode 100644 index 1c630f84e6e3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeTablesDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified route table. - * - * @summary Deletes the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableDelete.json - */ -async function deleteRouteTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginDeleteAndWait(resourceGroupName, routeTableName); - console.log(result); -} - -async function main() { - await deleteRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeTablesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/routeTablesGetSample.js deleted file mode 100644 index 8143df4cb511..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeTablesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified route table. - * - * @summary Gets the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableGet.json - */ -async function getRouteTable() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.get(resourceGroupName, routeTableName); - console.log(result); -} - -async function main() { - await getRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeTablesListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/routeTablesListAllSample.js deleted file mode 100644 index cd97088e62a8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeTablesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all route tables in a subscription. - * - * @summary Gets all route tables in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableListAll.json - */ -async function listAllRouteTables() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeTables.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeTablesListSample.js b/sdk/network/arm-network/samples/v36/javascript/routeTablesListSample.js deleted file mode 100644 index 087ceeadb52e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeTablesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all route tables in a resource group. - * - * @summary Gets all route tables in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableList.json - */ -async function listRouteTablesInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeTables.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRouteTablesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routeTablesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/routeTablesUpdateTagsSample.js deleted file mode 100644 index 53fc13ada48c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routeTablesUpdateTagsSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a route table tags. - * - * @summary Updates a route table tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableUpdateTags.json - */ -async function updateRouteTableTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.updateTags(resourceGroupName, routeTableName, parameters); - console.log(result); -} - -async function main() { - await updateRouteTableTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/routesCreateOrUpdateSample.js deleted file mode 100644 index fbaac62ef357..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routesCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a route in the specified route table. - * - * @summary Creates or updates a route in the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteCreate.json - */ -async function createRoute() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const routeParameters = { - addressPrefix: "10.0.3.0/24", - nextHopType: "VirtualNetworkGateway", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - routeName, - routeParameters, - ); - console.log(result); -} - -async function main() { - await createRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/routesDeleteSample.js deleted file mode 100644 index b2915344e968..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified route from a route table. - * - * @summary Deletes the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteDelete.json - */ -async function deleteRoute() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.beginDeleteAndWait( - resourceGroupName, - routeTableName, - routeName, - ); - console.log(result); -} - -async function main() { - await deleteRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/routesGetSample.js deleted file mode 100644 index 022b35df06dd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified route from a route table. - * - * @summary Gets the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteGet.json - */ -async function getRoute() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.get(resourceGroupName, routeTableName, routeName); - console.log(result); -} - -async function main() { - await getRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routesListSample.js b/sdk/network/arm-network/samples/v36/javascript/routesListSample.js deleted file mode 100644 index b0645fe0ac36..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all routes in a route table. - * - * @summary Gets all routes in a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteList.json - */ -async function listRoutes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routes.list(resourceGroupName, routeTableName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingIntentCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/routingIntentCreateOrUpdateSample.js deleted file mode 100644 index 58e8f75454e8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingIntentCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * - * @summary Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentPut.json - */ -async function routeTablePut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const routingIntentParameters = { - routingPolicies: [ - { - name: "InternetTraffic", - destinations: ["Internet"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", - }, - { - name: "PrivateTrafficPolicy", - destinations: ["PrivateTraffic"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routingIntentName, - routingIntentParameters, - ); - console.log(result); -} - -async function main() { - await routeTablePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingIntentDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/routingIntentDeleteSample.js deleted file mode 100644 index b8fc6f694681..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingIntentDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a RoutingIntent. - * - * @summary Deletes a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentDelete.json - */ -async function routeTableDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routingIntentName, - ); - console.log(result); -} - -async function main() { - await routeTableDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingIntentGetSample.js b/sdk/network/arm-network/samples/v36/javascript/routingIntentGetSample.js deleted file mode 100644 index 52ab85bfdfd5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingIntentGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a RoutingIntent. - * - * @summary Retrieves the details of a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentGet.json - */ -async function routeTableGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.get( - resourceGroupName, - virtualHubName, - routingIntentName, - ); - console.log(result); -} - -async function main() { - await routeTableGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingIntentListSample.js b/sdk/network/arm-network/samples/v36/javascript/routingIntentListSample.js deleted file mode 100644 index 7d482f7fd523..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingIntentListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * - * @summary Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentList.json - */ -async function routingIntentList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingIntentOperations.list(resourceGroupName, virtualHubName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await routingIntentList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsCreateOrUpdateSample.js deleted file mode 100644 index 5435d2c81648..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a routing rule collection. - * - * @summary Creates or updates a routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json - */ -async function createOrUpdateARoutingRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleCollection = { - description: "A sample policy", - appliesTo: [ - { - networkGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, - ); - console.log(result); -} - -async function main() { - await createOrUpdateARoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsDeleteSample.js deleted file mode 100644 index a48a31a3349d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an routing rule collection. - * - * @summary Deletes an routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json - */ -async function deletesAnRoutingRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main() { - await deletesAnRoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsGetSample.js deleted file mode 100644 index 07e34de42283..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a network manager routing configuration rule collection. - * - * @summary Gets a network manager routing configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json - */ -async function getsRoutingRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main() { - await getsRoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsListSample.js deleted file mode 100644 index bf485ef35243..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingRuleCollectionsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the rule collections in a routing configuration, in a paginated format. - * - * @summary Lists all the rule collections in a routing configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionList.json - */ -async function listRoutingRuleCollections() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRoutingRuleCollections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/routingRulesCreateOrUpdateSample.js deleted file mode 100644 index da7b23e44365..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an routing rule. - * - * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRulePut.json - */ -async function createADefaultRoutingRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const routingRule = { - description: "This is Sample Routing Rule", - destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, - nextHop: { nextHopType: "VirtualNetworkGateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - routingRule, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an routing rule. - * - * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRulePut.json - */ -async function createAnRoutingRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const routingRule = { - description: "This is Sample Routing Rule", - destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, - nextHop: { nextHopType: "VirtualNetworkGateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - routingRule, - ); - console.log(result); -} - -async function main() { - await createADefaultRoutingRule(); - await createAnRoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingRulesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/routingRulesDeleteSample.js deleted file mode 100644 index aaef6ff56718..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingRulesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a routing rule. - * - * @summary Deletes a routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleDelete.json - */ -async function deletesARoutingRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "sampleRule"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main() { - await deletesARoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/routingRulesGetSample.js deleted file mode 100644 index d49e9fddb11a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingRulesGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a network manager routing configuration routing rule. - * - * @summary Gets a network manager routing configuration routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleGet.json - */ -async function getsRoutingRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main() { - await getsRoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/routingRulesListSample.js b/sdk/network/arm-network/samples/v36/javascript/routingRulesListSample.js deleted file mode 100644 index ce008ac606ae..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/routingRulesListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network manager routing configuration routing rules. - * - * @summary List all network manager routing configuration routing rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleList.json - */ -async function listRoutingRules() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRoutingRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/sample.env b/sdk/network/arm-network/samples/v36/javascript/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 30233d6267fd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates scope connection from Network Manager - * - * @summary Creates or updates scope connection from Network Manager - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionPut.json - */ -async function createOrUpdateNetworkManagerScopeConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const parameters = { - description: "This is a scope connection to a cross tenant subscription.", - resourceId: "subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b", - tenantId: "6babcaad-604b-40ac-a9d7-9fd97c0b779f", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.createOrUpdate( - resourceGroupName, - networkManagerName, - scopeConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsDeleteSample.js deleted file mode 100644 index 58fc66bebd9c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the pending scope connection created by this network manager. - * - * @summary Delete the pending scope connection created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionDelete.json - */ -async function deleteNetworkManagerScopeConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.delete( - resourceGroupName, - networkManagerName, - scopeConnectionName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsGetSample.js deleted file mode 100644 index 49206b055b85..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get specified scope connection created by this Network Manager. - * - * @summary Get specified scope connection created by this Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionGet.json - */ -async function getNetworkManagerScopeConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.get( - resourceGroupName, - networkManagerName, - scopeConnectionName, - ); - console.log(result); -} - -async function main() { - await getNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsListSample.js deleted file mode 100644 index 141bc4370b82..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/scopeConnectionsListSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all scope connections created by this network manager. - * - * @summary List all scope connections created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionList.json - */ -async function listNetworkManagerScopeConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.scopeConnections.list(resourceGroupName, networkManagerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index adaaa68c95d8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network manager security admin configuration. - * - * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json - */ -async function createManualModeSecurityAdminConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityAdminConfiguration = { - description: - "A configuration which will update any network groups ip addresses at commit times.", - networkGroupAddressSpaceAggregationOption: "Manual", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityAdminConfiguration, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network manager security admin configuration. - * - * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationPut.json - */ -async function createNetworkManagerSecurityAdminConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityAdminConfiguration = { - description: "A sample policy", - applyOnNetworkIntentPolicyBasedServices: ["None"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityAdminConfiguration, - ); - console.log(result); -} - -async function main() { - await createManualModeSecurityAdminConfiguration(); - await createNetworkManagerSecurityAdminConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsDeleteSample.js deleted file mode 100644 index cc579716cce1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network manager security admin configuration. - * - * @summary Deletes a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json - */ -async function deleteNetworkManagerSecurityAdminConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main() { - await deleteNetworkManagerSecurityAdminConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsGetSample.js deleted file mode 100644 index acb2284d0175..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a network manager security admin configuration. - * - * @summary Retrieves a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json - */ -async function getSecurityAdminConfigurations() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main() { - await getSecurityAdminConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsListSample.js deleted file mode 100644 index 79c4334963e9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityAdminConfigurationsListSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the network manager security admin configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager security admin configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json - */ -async function listSecurityAdminConfigurationsInANetworkManager() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityAdminConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSecurityAdminConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersCreateOrUpdateSample.js deleted file mode 100644 index 0b576534b3a8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Security Partner Provider. - * - * @summary Creates or updates the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderPut.json - */ -async function createSecurityPartnerProvider() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const parameters = { - location: "West US", - securityProviderName: "ZScaler", - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.beginCreateOrUpdateAndWait( - resourceGroupName, - securityPartnerProviderName, - parameters, - ); - console.log(result); -} - -async function main() { - await createSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersDeleteSample.js deleted file mode 100644 index f00eeabbd05a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Security Partner Provider. - * - * @summary Deletes the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderDelete.json - */ -async function deleteSecurityPartnerProvider() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.beginDeleteAndWait( - resourceGroupName, - securityPartnerProviderName, - ); - console.log(result); -} - -async function main() { - await deleteSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersGetSample.js b/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersGetSample.js deleted file mode 100644 index e64632c64025..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Security Partner Provider. - * - * @summary Gets the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderGet.json - */ -async function getSecurityPartnerProvider() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.get( - resourceGroupName, - securityPartnerProviderName, - ); - console.log(result); -} - -async function main() { - await getSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersListByResourceGroupSample.js deleted file mode 100644 index 3773f6b3a727..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Security Partner Providers in a resource group. - * - * @summary Lists all Security Partner Providers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderListByResourceGroup.json - */ -async function listAllSecurityPartnerProvidersForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityPartnerProviders.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllSecurityPartnerProvidersForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersListSample.js b/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersListSample.js deleted file mode 100644 index f668992b2e9a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Security Partner Providers in a subscription. - * - * @summary Gets all the Security Partner Providers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderListBySubscription.json - */ -async function listAllSecurityPartnerProvidersForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityPartnerProviders.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllSecurityPartnerProvidersForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersUpdateTagsSample.js deleted file mode 100644 index 11614f115cc9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityPartnerProvidersUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of a Security Partner Provider resource. - * - * @summary Updates tags of a Security Partner Provider resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderUpdateTags.json - */ -async function updateSecurityPartnerProviderTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.updateTags( - resourceGroupName, - securityPartnerProviderName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateSecurityPartnerProviderTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/securityRulesCreateOrUpdateSample.js deleted file mode 100644 index 11c973a5730b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a security rule in the specified network security group. - * - * @summary Creates or updates a security rule in the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleCreate.json - */ -async function createSecurityRule() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const securityRuleParameters = { - access: "Deny", - destinationAddressPrefix: "11.0.0.0/8", - destinationPortRange: "8080", - direction: "Outbound", - priority: 100, - sourceAddressPrefix: "10.0.0.0/8", - sourcePortRange: "*", - protocol: "*", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - securityRuleParameters, - ); - console.log(result); -} - -async function main() { - await createSecurityRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityRulesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/securityRulesDeleteSample.js deleted file mode 100644 index ab6b44edb88f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityRulesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified network security rule. - * - * @summary Deletes the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleDelete.json - */ -async function deleteNetworkSecurityRuleFromNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.beginDeleteAndWait( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkSecurityRuleFromNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/securityRulesGetSample.js deleted file mode 100644 index b402c6078545..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified network security rule. - * - * @summary Get the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleGet.json - */ -async function getNetworkSecurityRuleInNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.get( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - ); - console.log(result); -} - -async function main() { - await getNetworkSecurityRuleInNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityRulesListSample.js b/sdk/network/arm-network/samples/v36/javascript/securityRulesListSample.js deleted file mode 100644 index 8996f6d8cfba..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityRulesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all security rules in a network security group. - * - * @summary Gets all security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleList.json - */ -async function listNetworkSecurityRulesInNetworkSecurityGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityRules.list(resourceGroupName, networkSecurityGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listNetworkSecurityRulesInNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index b99e4c33bffd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a network manager security user configuration. - * - * @summary Creates or updates a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json - */ -async function createNetworkManagerSecurityUserConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityUserConfiguration = { - description: "A sample policy", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityUserConfiguration, - ); - console.log(result); -} - -async function main() { - await createNetworkManagerSecurityUserConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsDeleteSample.js deleted file mode 100644 index 4e71eb8d089d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a network manager security user configuration. - * - * @summary Deletes a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json - */ -async function deleteNetworkManagerSecurityUserConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main() { - await deleteNetworkManagerSecurityUserConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsGetSample.js deleted file mode 100644 index 80f4311cc74f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a network manager security user configuration. - * - * @summary Retrieves a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json - */ -async function getSecurityUserConfigurations() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main() { - await getSecurityUserConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsListSample.js deleted file mode 100644 index 71d5ee849fdf..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserConfigurationsListSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the network manager security user configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager security user configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationList.json - */ -async function listSecurityUserConfigurationsInANetworkManager() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSecurityUserConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js deleted file mode 100644 index 058d07144510..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a security user rule collection. - * - * @summary Creates or updates a security user rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json - */ -async function createOrUpdateASecurityUserRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const securityUserRuleCollection = { - description: "A sample policy", - appliesToGroups: [ - { - networkGroupId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - securityUserRuleCollection, - ); - console.log(result); -} - -async function main() { - await createOrUpdateASecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsDeleteSample.js deleted file mode 100644 index f31175c86f32..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsDeleteSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a Security User Rule collection. - * - * @summary Deletes a Security User Rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json - */ -async function deletesASecurityUserRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - console.log(result); -} - -async function main() { - await deletesASecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsGetSample.js deleted file mode 100644 index c2d977004b93..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a network manager security user configuration rule collection. - * - * @summary Gets a network manager security user configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json - */ -async function getsSecurityUserRuleCollection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main() { - await getsSecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsListSample.js deleted file mode 100644 index a68af8d6b768..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserRuleCollectionsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the security user rule collections in a security configuration, in a paginated format. - * - * @summary Lists all the security user rule collections in a security configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json - */ -async function listRuleCollectionsInASecurityConfiguration() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRuleCollectionsInASecurityConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserRulesCreateOrUpdateSample.js deleted file mode 100644 index 96378ef6a1cd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a security user rule. - * - * @summary Creates or updates a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRulePut.json - */ -async function createASecurityUserRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const securityUserRule = { - description: "Sample User Rule", - destinationPortRanges: ["22"], - destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - direction: "Inbound", - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - securityUserRule, - ); - console.log(result); -} - -async function main() { - await createASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserRulesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserRulesDeleteSample.js deleted file mode 100644 index fd59954f2294..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserRulesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a security user rule. - * - * @summary Deletes a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleDelete.json - */ -async function deleteASecurityUserRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const force = false; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main() { - await deleteASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserRulesGetSample.js deleted file mode 100644 index 72bcffe2f190..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserRulesGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a security user rule. - * - * @summary Gets a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleGet.json - */ -async function getsASecurityUserRule() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main() { - await getsASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/securityUserRulesListSample.js b/sdk/network/arm-network/samples/v36/javascript/securityUserRulesListSample.js deleted file mode 100644 index 86fa2c238639..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/securityUserRulesListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Security User Rules in a rule collection. - * - * @summary Lists all Security User Rules in a rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleList.json - */ -async function listSecurityUserRules() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSecurityUserRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceAssociationLinksListSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceAssociationLinksListSample.js deleted file mode 100644 index 73b4bda97029..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceAssociationLinksListSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a list of service association links for a subnet. - * - * @summary Gets a list of service association links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json - */ -async function getServiceAssociationLinks() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnet"; - const subnetName = "subnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceAssociationLinks.list( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main() { - await getServiceAssociationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js deleted file mode 100644 index f9f9ce2d96b8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a service Endpoint Policies. - * - * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyCreate.json - */ -async function createServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const parameters = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a service Endpoint Policies. - * - * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyCreateWithDefinition.json - */ -async function createServiceEndpointPolicyWithDefinition() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const parameters = { - location: "westus", - serviceEndpointPolicyDefinitions: [ - { - name: "StorageServiceEndpointPolicyDefinition", - description: "Storage Service EndpointPolicy Definition", - service: "Microsoft.Storage", - serviceResources: [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await createServiceEndpointPolicy(); - await createServiceEndpointPolicyWithDefinition(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesDeleteSample.js deleted file mode 100644 index 058d1c0297d1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified service endpoint policy. - * - * @summary Deletes the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDelete.json - */ -async function deleteServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "serviceEndpointPolicy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.beginDeleteAndWait( - resourceGroupName, - serviceEndpointPolicyName, - ); - console.log(result); -} - -async function main() { - await deleteServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesGetSample.js deleted file mode 100644 index 7be2c68f6c3b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified service Endpoint Policies in a specified resource group. - * - * @summary Gets the specified service Endpoint Policies in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyGet.json - */ -async function getServiceEndPointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testServiceEndpointPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.get( - resourceGroupName, - serviceEndpointPolicyName, - ); - console.log(result); -} - -async function main() { - await getServiceEndPointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesListByResourceGroupSample.js deleted file mode 100644 index 909e43c05413..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all service endpoint Policies in a resource group. - * - * @summary Gets all service endpoint Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyList.json - */ -async function listResourceGroupServiceEndpointPolicies() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicies.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listResourceGroupServiceEndpointPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesListSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesListSample.js deleted file mode 100644 index 84365189f46b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the service endpoint policies in a subscription. - * - * @summary Gets all the service endpoint policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyListAll.json - */ -async function listAllServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicies.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesUpdateTagsSample.js deleted file mode 100644 index 7c5861a93d3c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPoliciesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates tags of a service endpoint policy. - * - * @summary Updates tags of a service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyUpdateTags.json - */ -async function updateServiceEndpointPolicyTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testServiceEndpointPolicy"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.updateTags( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateServiceEndpointPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js deleted file mode 100644 index 01298fbecee1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * - * @summary Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionCreate.json - */ -async function createServiceEndpointPolicyDefinition() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const serviceEndpointPolicyDefinitions = { - description: "Storage Service EndpointPolicy Definition", - service: "Microsoft.Storage", - serviceResources: [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicyDefinitions.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - serviceEndpointPolicyDefinitions, - ); - console.log(result); -} - -async function main() { - await createServiceEndpointPolicyDefinition(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js deleted file mode 100644 index 5c11dfebd2b1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified ServiceEndpoint policy definitions. - * - * @summary Deletes the specified ServiceEndpoint policy definitions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json - */ -async function deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicyDefinitions.beginDeleteAndWait( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - ); - console.log(result); -} - -async function main() { - await deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsGetSample.js deleted file mode 100644 index 845b1787bbf2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the specified service endpoint policy definitions from service endpoint policy. - * - * @summary Get the specified service endpoint policy definitions from service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionGet.json - */ -async function getServiceEndpointDefinitionInServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicyDefinitions.get( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - ); - console.log(result); -} - -async function main() { - await getServiceEndpointDefinitionInServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js deleted file mode 100644 index e4559e412285..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all service endpoint policy definitions in a service end point policy. - * - * @summary Gets all service endpoint policy definitions in a service end point policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionList.json - */ -async function listServiceEndpointDefinitionsInServiceEndPointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicyDefinitions.listByResourceGroup( - resourceGroupName, - serviceEndpointPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listServiceEndpointDefinitionsInServiceEndPointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysCreateOrUpdateSample.js deleted file mode 100644 index c5cb0dd37ef1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a service gateway. - * - * @summary Creates or updates a service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayCreate.json - */ -async function createServiceGateway() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters = { - location: "eastus", - routeTargetAddress: { - privateIPAddress: "10.0.1.4", - privateIPAllocationMethod: "Static", - subnet: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet", - }, - }, - virtualNetwork: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await createServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysDeleteSample.js deleted file mode 100644 index 9656a5f26c87..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysDeleteSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified service gateway. - * - * @summary Deletes the specified service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayDelete.json - */ -async function deleteServiceGateway() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.beginDeleteAndWait( - resourceGroupName, - serviceGatewayName, - ); - console.log(result); -} - -async function main() { - await deleteServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetAddressLocationsSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetAddressLocationsSample.js deleted file mode 100644 index 2e71a9999706..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetAddressLocationsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get address locations in service gateway. - * - * @summary Get address locations in service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGetAddressLocationsResponse.json - */ -async function getAddressLocationsInServiceGateway() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceGateways.listAddressLocations( - resourceGroupName, - serviceGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getAddressLocationsInServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetSample.js deleted file mode 100644 index e2fe1532a065..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified service gateway. - * - * @summary Gets the specified service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGet.json - */ -async function getLoadBalancer() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.get(resourceGroupName, serviceGatewayName); - console.log(result); -} - -async function main() { - await getLoadBalancer(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetServicesSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetServicesSample.js deleted file mode 100644 index 98474140b291..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysGetServicesSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get Services in service gateway. - * - * @summary Get Services in service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGetServicesResponse.json - */ -async function getServicesInServiceGateway() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceGateways.listServices( - resourceGroupName, - serviceGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getServicesInServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysListAllSample.js deleted file mode 100644 index a2d522753e89..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysListAllSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the service gateways in a subscription. - * - * @summary Gets all the service gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayListAll.json - */ -async function listAllLoadBalancers() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceGateways.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllLoadBalancers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysListSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysListSample.js deleted file mode 100644 index d54e8d33eaac..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the service gateways in a resource group. - * - * @summary Gets all the service gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayList.json - */ -async function listServiceGatewayInResourceGroup() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listServiceGatewayInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateAddressLocationsSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateAddressLocationsSample.js deleted file mode 100644 index 7a7ab37b86b5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateAddressLocationsSample.js +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates address locations within the service gateway. - - - - -The request supports both full and partial update modes at two levels: location and address. - - - - -Full update replaces all existing data. - - - - -Partial update modifies only the specified entries: - - - - -For location-level partial updates, if no address is provided, the existing address will be deleted. - - - - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. - * - * @summary Creates or updates address locations within the service gateway. - - - - -The request supports both full and partial update modes at two levels: location and address. - - - - -Full update replaces all existing data. - - - - -Partial update modifies only the specified entries: - - - - -For location-level partial updates, if no address is provided, the existing address will be deleted. - - - - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayFullUpdateAddressLocationsRequest.json - */ -async function fullUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGateway() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters = { - action: "FullUpdate", - addressLocations: [ - { - addressLocation: "192.0.0.1", - addressUpdateAction: "FullUpdate", - addresses: [{ address: "10.0.0.4", services: ["Service1"] }], - }, - { - addressLocation: "192.0.0.2", - addressUpdateAction: "PartialUpdate", - addresses: [{ address: "10.0.0.5", services: ["Service2"] }, { address: "10.0.0.6" }], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.beginUpdateAddressLocationsAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates address locations within the service gateway. - - - - -The request supports both full and partial update modes at two levels: location and address. - - - - -Full update replaces all existing data. - - - - -Partial update modifies only the specified entries: - - - - -For location-level partial updates, if no address is provided, the existing address will be deleted. - - - - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. - * - * @summary Creates or updates address locations within the service gateway. - - - - -The request supports both full and partial update modes at two levels: location and address. - - - - -Full update replaces all existing data. - - - - -Partial update modifies only the specified entries: - - - - -For location-level partial updates, if no address is provided, the existing address will be deleted. - - - - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayPartialUpdateAddressLocationsRequest.json - */ -async function partialUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGateway() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters = { - action: "PartialUpdate", - addressLocations: [ - { - addressLocation: "192.0.0.1", - addressUpdateAction: "FullUpdate", - addresses: [{ address: "10.0.0.4", services: ["Service1"] }], - }, - { - addressLocation: "192.0.0.2", - addressUpdateAction: "PartialUpdate", - addresses: [{ address: "10.0.0.5", services: ["Service2"] }, { address: "10.0.0.6" }], - }, - { addressLocation: "192.0.0.3" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.beginUpdateAddressLocationsAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await fullUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGateway(); - await partialUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateServicesSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateServicesSample.js deleted file mode 100644 index 87afb84b71e7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateServicesSample.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates, updates, or deletes services within the service gateway. -The request supports both full and partial update modes at the service level. - - - - -Full update replaces all existing services with the new list provided in the request. -Partial update modifies only the specified services. - * - * @summary Creates, updates, or deletes services within the service gateway. -The request supports both full and partial update modes at the service level. - - - - -Full update replaces all existing services with the new list provided in the request. -Partial update modifies only the specified services. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayUpdateServicesRequest.json - */ -async function createOrFullUpdateServicesInServiceGateway() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters = { - action: "FullUpdate", - serviceRequests: [ - { - service: { - name: "Service1", - isDefault: true, - loadBalancerBackendPools: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/be1", - }, - ], - publicNatGatewayId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/natGateways/test-natGateway", - serviceType: "Inbound", - }, - }, - { - isDelete: true, - service: { - name: "Service2", - isDefault: false, - serviceType: "Outbound", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.beginUpdateServicesAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrFullUpdateServicesInServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateTagsSample.js deleted file mode 100644 index 21bcad5329e8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a service gateway tags. - * - * @summary Updates a service gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayUpdateTags.json - */ -async function updateServiceGatewayTags() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.updateTags( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateServiceGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceTagInformationListSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceTagInformationListSample.js deleted file mode 100644 index e7949b7c61cb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceTagInformationListSample.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagInformationListResult.json - */ -async function getListOfServiceTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json - */ -async function getListOfServiceTagsWithNoAddressPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const noAddressPrefixes = true; - const options = { - noAddressPrefixes, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list(location, options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagInformationListResultWithTagname.json - */ -async function getListOfServiceTagsWithTagName() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const tagName = "ApiManagement"; - const options = { tagName }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list(location, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getListOfServiceTags(); - await getListOfServiceTagsWithNoAddressPrefixes(); - await getListOfServiceTagsWithTagName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/serviceTagsListSample.js b/sdk/network/arm-network/samples/v36/javascript/serviceTagsListSample.js deleted file mode 100644 index dba2c31b1df8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/serviceTagsListSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a list of service tag information resources. - * - * @summary Gets a list of service tag information resources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagsList.json - */ -async function getListOfServiceTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceTags.list(location); - console.log(result); -} - -async function main() { - await getListOfServiceTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/staticCidrsCreateSample.js b/sdk/network/arm-network/samples/v36/javascript/staticCidrsCreateSample.js deleted file mode 100644 index 7c598d75404a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/staticCidrsCreateSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates/Updates the Static CIDR resource. - * - * @summary Creates/Updates the Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Create.json - */ -async function staticCidrsCreate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.create( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main() { - await staticCidrsCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/staticCidrsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/staticCidrsDeleteSample.js deleted file mode 100644 index 9908e4e07f86..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/staticCidrsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the Static CIDR resource. - * - * @summary Delete the Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Delete.json - */ -async function staticCidrsDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main() { - await staticCidrsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/staticCidrsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/staticCidrsGetSample.js deleted file mode 100644 index 580005eb68ed..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/staticCidrsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specific Static CIDR resource. - * - * @summary Gets the specific Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Get.json - */ -async function staticCidrsGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.get( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main() { - await staticCidrsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/staticCidrsListSample.js b/sdk/network/arm-network/samples/v36/javascript/staticCidrsListSample.js deleted file mode 100644 index 22babdff6dbe..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/staticCidrsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets list of Static CIDR resources at Network Manager level. - * - * @summary Gets list of Static CIDR resources at Network Manager level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_List.json - */ -async function staticCidrsList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.staticCidrs.list( - resourceGroupName, - networkManagerName, - poolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await staticCidrsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/staticMembersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/staticMembersCreateOrUpdateSample.js deleted file mode 100644 index 391007f07695..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/staticMembersCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a static member. - * - * @summary Creates or updates a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberPut.json - */ -async function staticMemberPut() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const parameters = { - resourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroup/rg1/providers/Microsoft.Network/virtualnetworks/vnet1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.createOrUpdate( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - parameters, - ); - console.log(result); -} - -async function main() { - await staticMemberPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/staticMembersDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/staticMembersDeleteSample.js deleted file mode 100644 index 315b722ab417..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/staticMembersDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a static member. - * - * @summary Deletes a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberDelete.json - */ -async function staticMembersDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "SampleRG"; - const networkManagerName = "TestNM"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.delete( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - ); - console.log(result); -} - -async function main() { - await staticMembersDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/staticMembersGetSample.js b/sdk/network/arm-network/samples/v36/javascript/staticMembersGetSample.js deleted file mode 100644 index 53f794a274b2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/staticMembersGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified static member. - * - * @summary Gets the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberGet.json - */ -async function staticMembersGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.get( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - ); - console.log(result); -} - -async function main() { - await staticMembersGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/staticMembersListSample.js b/sdk/network/arm-network/samples/v36/javascript/staticMembersListSample.js deleted file mode 100644 index cbfa6107ca3e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/staticMembersListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the specified static member. - * - * @summary Lists the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberList.json - */ -async function staticMembersList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.staticMembers.list( - resourceGroupName, - networkManagerName, - networkGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await staticMembersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/subnetsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/subnetsCreateOrUpdateSample.js deleted file mode 100644 index 90ab2bf1de6b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/subnetsCreateOrUpdateSample.js +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateWithServiceGateway.json - */ -async function createSubnetWithServiceGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters = { - addressPrefix: "10.0.0.0/16", - serviceGateway: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/serviceGateways/SG1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreate.json - */ -async function createSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateWithDelegation.json - */ -async function createSubnetWithADelegation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateServiceEndpoint.json - */ -async function createSubnetWithServiceEndpoints() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters = { - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json - */ -async function createSubnetWithServiceEndpointsWithNetworkIdentifier() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters = { - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [ - { - networkIdentifier: { - id: "/subscriptions/subid/resourceGroups/subnet-test/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - service: "Microsoft.Storage", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateWithSharingScope.json - */ -async function createSubnetWithSharingScope() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -async function main() { - await createSubnetWithServiceGateway(); - await createSubnet(); - await createSubnetWithADelegation(); - await createSubnetWithServiceEndpoints(); - await createSubnetWithServiceEndpointsWithNetworkIdentifier(); - await createSubnetWithSharingScope(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/subnetsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/subnetsDeleteSample.js deleted file mode 100644 index 2749dbdfed85..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/subnetsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified subnet. - * - * @summary Deletes the specified subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetDelete.json - */ -async function deleteSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main() { - await deleteSubnet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/subnetsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/subnetsGetSample.js deleted file mode 100644 index 9b1860a86518..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/subnetsGetSample.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetGet.json - */ -async function getSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get(resourceGroupName, virtualNetworkName, subnetName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetGetWithDelegation.json - */ -async function getSubnetWithADelegation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get(resourceGroupName, virtualNetworkName, subnetName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetGetWithSharingScope.json - */ -async function getSubnetWithSharingScope() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get(resourceGroupName, virtualNetworkName, subnetName); - console.log(result); -} - -async function main() { - await getSubnet(); - await getSubnetWithADelegation(); - await getSubnetWithSharingScope(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/subnetsListSample.js b/sdk/network/arm-network/samples/v36/javascript/subnetsListSample.js deleted file mode 100644 index 61c4e3fe55ff..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/subnetsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all subnets in a virtual network. - * - * @summary Gets all subnets in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetList.json - */ -async function listSubnets() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.subnets.list(resourceGroupName, virtualNetworkName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSubnets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/subnetsPrepareNetworkPoliciesSample.js b/sdk/network/arm-network/samples/v36/javascript/subnetsPrepareNetworkPoliciesSample.js deleted file mode 100644 index 418810fbdec3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/subnetsPrepareNetworkPoliciesSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Prepares a subnet by applying network intent policies. - * - * @summary Prepares a subnet by applying network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetPrepareNetworkPolicies.json - */ -async function prepareNetworkPolicies() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const subnetName = "subnet1"; - const prepareNetworkPoliciesRequestParameters = { serviceName: "Microsoft.Sql/managedInstances" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginPrepareNetworkPoliciesAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - prepareNetworkPoliciesRequestParameters, - ); - console.log(result); -} - -async function main() { - await prepareNetworkPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/subnetsUnprepareNetworkPoliciesSample.js b/sdk/network/arm-network/samples/v36/javascript/subnetsUnprepareNetworkPoliciesSample.js deleted file mode 100644 index 218781474d32..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/subnetsUnprepareNetworkPoliciesSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Unprepares a subnet by removing network intent policies. - * - * @summary Unprepares a subnet by removing network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetUnprepareNetworkPolicies.json - */ -async function unprepareNetworkPolicies() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const subnetName = "subnet1"; - const unprepareNetworkPoliciesRequestParameters = { - serviceName: "Microsoft.Sql/managedInstances", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginUnprepareNetworkPoliciesAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - unprepareNetworkPoliciesRequestParameters, - ); - console.log(result); -} - -async function main() { - await unprepareNetworkPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js deleted file mode 100644 index fabcd9ccb87f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a network manager connection on this subscription. - * - * @summary Create a network manager connection on this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionPut.json - */ -async function createOrUpdateSubscriptionNetworkManagerConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const parameters = { - networkManagerId: - "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.createOrUpdate( - networkManagerConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js deleted file mode 100644 index 3d6f8a44e4c8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete specified connection created by this subscription. - * - * @summary Delete specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json - */ -async function deleteSubscriptionNetworkManagerConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.delete( - networkManagerConnectionName, - ); - console.log(result); -} - -async function main() { - await deleteSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsGetSample.js deleted file mode 100644 index d71935e2fbeb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get a specified connection created by this subscription. - * - * @summary Get a specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionGet.json - */ -async function getSubscriptionNetworkManagerConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.get( - networkManagerConnectionName, - ); - console.log(result); -} - -async function main() { - await getSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsListSample.js deleted file mode 100644 index f7771e2db693..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/subscriptionNetworkManagerConnectionsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all network manager connections created by this subscription. - * - * @summary List all network manager connections created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionList.json - */ -async function listSubscriptionNetworkManagerConnection() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.subscriptionNetworkManagerConnections.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/supportedSecurityProvidersSample.js b/sdk/network/arm-network/samples/v36/javascript/supportedSecurityProvidersSample.js deleted file mode 100644 index c801c5d9f180..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/supportedSecurityProvidersSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gives the supported security providers for the virtual wan. - * - * @summary Gives the supported security providers for the virtual wan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWanSupportedSecurityProviders.json - */ -async function supportedSecurityProviders() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.supportedSecurityProviders(resourceGroupName, virtualWANName); - console.log(result); -} - -async function main() { - await supportedSecurityProviders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/usagesListSample.js b/sdk/network/arm-network/samples/v36/javascript/usagesListSample.js deleted file mode 100644 index faf9a366676c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/usagesListSample.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List network usages for a subscription. - * - * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/UsageList.json - */ -async function listUsages() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.usages.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List network usages for a subscription. - * - * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/UsageListSpacedLocation.json - */ -async function listUsagesSpacedLocation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "West US"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.usages.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listUsages(); - await listUsagesSpacedLocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesCreateSample.js b/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesCreateSample.js deleted file mode 100644 index bdd79c0589a5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesCreateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates Verifier Workspace. - * - * @summary Creates Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspacePut.json - */ -async function verifierWorkspaceCreate() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const body = { - location: "eastus", - properties: { description: "A sample workspace" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.create( - resourceGroupName, - networkManagerName, - workspaceName, - body, - ); - console.log(result); -} - -async function main() { - await verifierWorkspaceCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesDeleteSample.js deleted file mode 100644 index ccfb6f16ac09..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes Verifier Workspace. - * - * @summary Deletes Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceDelete.json - */ -async function verifierWorkspaceDelete() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main() { - await verifierWorkspaceDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesGetSample.js deleted file mode 100644 index 8b714d25ba1f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets Verifier Workspace. - * - * @summary Gets Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceGet.json - */ -async function verifierWorkspaceGet() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.get( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main() { - await verifierWorkspaceGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesListSample.js b/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesListSample.js deleted file mode 100644 index a25f40e8f3e2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesListSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets list of Verifier Workspaces. - * - * @summary Gets list of Verifier Workspaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceList.json - */ -async function verifierWorkspaceList() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.verifierWorkspaces.list(resourceGroupName, networkManagerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await verifierWorkspaceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesUpdateSample.js deleted file mode 100644 index 534cf92d8cd8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/verifierWorkspacesUpdateSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates Verifier Workspace. - * - * @summary Updates Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspacePatch.json - */ -async function verifierWorkspacePatch() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.update( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main() { - await verifierWorkspacePatch(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vipSwapCreateSample.js b/sdk/network/arm-network/samples/v36/javascript/vipSwapCreateSample.js deleted file mode 100644 index a7578a506663..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vipSwapCreateSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Performs vip swap operation on swappable cloud services. - * - * @summary Performs vip swap operation on swappable cloud services. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapPut.json - */ -async function putVipSwapOperation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const parameters = { properties: { slotType: "Production" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.beginCreateAndWait(groupName, resourceName, parameters); - console.log(result); -} - -async function main() { - await putVipSwapOperation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vipSwapGetSample.js b/sdk/network/arm-network/samples/v36/javascript/vipSwapGetSample.js deleted file mode 100644 index 749bc67c7407..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vipSwapGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * - * @summary Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapGet.json - */ -async function getSwapResource() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.get(groupName, resourceName); - console.log(result); -} - -async function main() { - await getSwapResource(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vipSwapListSample.js b/sdk/network/arm-network/samples/v36/javascript/vipSwapListSample.js deleted file mode 100644 index 1cc0198f5662..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vipSwapListSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * - * @summary Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapList.json - */ -async function getSwapResourceList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.list(groupName, resourceName); - console.log(result); -} - -async function main() { - await getSwapResourceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesCreateOrUpdateSample.js deleted file mode 100644 index 6883a0f55ada..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Site. - * - * @summary Creates or updates the specified Network Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSitePut.json - */ -async function createNetworkVirtualApplianceSite() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const parameters = { - addressPrefix: "192.168.1.0/24", - o365Policy: { - breakOutCategories: { default: true, allow: true, optimize: true }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - siteName, - parameters, - ); - console.log(result); -} - -async function main() { - await createNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesDeleteSample.js deleted file mode 100644 index f593e0ba1c24..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified site from a Virtual Appliance. - * - * @summary Deletes the specified site from a Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteDelete.json - */ -async function deleteNetworkVirtualApplianceSite() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - siteName, - ); - console.log(result); -} - -async function main() { - await deleteNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesGetSample.js deleted file mode 100644 index e2a283bca963..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Virtual Appliance Site. - * - * @summary Gets the specified Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteGet.json - */ -async function getNetworkVirtualApplianceSite() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.get( - resourceGroupName, - networkVirtualApplianceName, - siteName, - ); - console.log(result); -} - -async function main() { - await getNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesListSample.js deleted file mode 100644 index 3af13610d05e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSitesListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * - * @summary Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteList.json - */ -async function listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualApplianceSites.list( - resourceGroupName, - networkVirtualApplianceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSkusGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSkusGetSample.js deleted file mode 100644 index 4de0ae24e5d3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSkusGetSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a single available sku for network virtual appliance. - * - * @summary Retrieves a single available sku for network virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSkuGet.json - */ -async function networkVirtualApplianceSkuGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const skuName = "ciscoSdwan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSkus.get(skuName); - console.log(result); -} - -async function main() { - await networkVirtualApplianceSkuGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSkusListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSkusListSample.js deleted file mode 100644 index d67ab676000d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualApplianceSkusListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all SKUs available for a virtual appliance. - * - * @summary List all SKUs available for a virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSkuList.json - */ -async function networkVirtualApplianceSkuListResult() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualApplianceSkus.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await networkVirtualApplianceSkuListResult(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js deleted file mode 100644 index 7a9b1246e28e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * - * @summary Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionPut.json - */ -async function virtualHubRouteTableV2Put() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const parameters = { - hubVirtualNetworkConnection: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1", - }, - peerAsn: 20000, - peerIp: "192.168.1.5", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - connectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await virtualHubRouteTableV2Put(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionDeleteSample.js deleted file mode 100644 index cb7aae0bc813..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VirtualHubBgpConnection. - * - * @summary Deletes a VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionDelete.json - */ -async function virtualHubRouteTableV2Delete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await virtualHubRouteTableV2Delete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionGetSample.js deleted file mode 100644 index 63235cf7b026..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a Virtual Hub Bgp Connection. - * - * @summary Retrieves the details of a Virtual Hub Bgp Connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionGet.json - */ -async function virtualHubVirtualHubRouteTableV2Get() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.get( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js deleted file mode 100644 index fa2d8d02bb8a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * - * @summary Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json - */ -async function virtualRouterPeerListAdvertisedRoutes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const hubName = "virtualRouter1"; - const connectionName = "peer1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnections.beginListAdvertisedRoutesAndWait( - resourceGroupName, - hubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await virtualRouterPeerListAdvertisedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js deleted file mode 100644 index 7d5d70412a9d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection has learned. - * - * @summary Retrieves a list of routes the virtual hub bgp connection has learned. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeerListLearnedRoute.json - */ -async function virtualRouterPeerListLearnedRoutes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const hubName = "virtualRouter1"; - const connectionName = "peer1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnections.beginListLearnedRoutesAndWait( - resourceGroupName, - hubName, - connectionName, - ); - console.log(result); -} - -async function main() { - await virtualRouterPeerListLearnedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListSample.js deleted file mode 100644 index 84807aa5557a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubBgpConnectionsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubBgpConnections. - * - * @summary Retrieves the details of all VirtualHubBgpConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionList.json - */ -async function virtualHubRouteTableV2List() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubBgpConnections.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js deleted file mode 100644 index e699ff8dc1e4..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * - * @summary Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationPut.json - */ -async function virtualHubIPConfigurationPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const parameters = { - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - ipConfigName, - parameters, - ); - console.log(result); -} - -async function main() { - await virtualHubIPConfigurationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationDeleteSample.js deleted file mode 100644 index ae9a620b2397..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VirtualHubIpConfiguration. - * - * @summary Deletes a VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationDelete.json - */ -async function virtualHubIPConfigurationDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - ipConfigName, - ); - console.log(result); -} - -async function main() { - await virtualHubIPConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationGetSample.js deleted file mode 100644 index d4b836ae1cc2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a Virtual Hub Ip configuration. - * - * @summary Retrieves the details of a Virtual Hub Ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationGet.json - */ -async function virtualHubVirtualHubRouteTableV2Get() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.get( - resourceGroupName, - virtualHubName, - ipConfigName, - ); - console.log(result); -} - -async function main() { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationListSample.js deleted file mode 100644 index 90366d2ef56c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubIPConfigurationListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubIpConfigurations. - * - * @summary Retrieves the details of all VirtualHubIpConfigurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationList.json - */ -async function virtualHubRouteTableV2List() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubIpConfiguration.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js deleted file mode 100644 index 025575dacce8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * - * @summary Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Put.json - */ -async function virtualHubRouteTableV2Put() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const virtualHubRouteTableV2Parameters = { - attachedConnections: ["All_Vnets"], - routes: [ - { - destinationType: "CIDR", - destinations: ["20.10.0.0/16", "20.20.0.0/16"], - nextHopType: "IPAddress", - nextHops: ["10.0.0.68"], - }, - { - destinationType: "CIDR", - destinations: ["0.0.0.0/0"], - nextHopType: "IPAddress", - nextHops: ["10.0.0.68"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubRouteTableV2S.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - virtualHubRouteTableV2Parameters, - ); - console.log(result); -} - -async function main() { - await virtualHubRouteTableV2Put(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SDeleteSample.js deleted file mode 100644 index 360a12c0ae02..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VirtualHubRouteTableV2. - * - * @summary Deletes a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Delete.json - */ -async function virtualHubRouteTableV2Delete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubRouteTableV2S.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main() { - await virtualHubRouteTableV2Delete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SGetSample.js deleted file mode 100644 index d67c45a4f68b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VirtualHubRouteTableV2. - * - * @summary Retrieves the details of a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Get.json - */ -async function virtualHubVirtualHubRouteTableV2Get() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubRouteTableV2S.get( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main() { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SListSample.js deleted file mode 100644 index d4398edfce8c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubRouteTableV2SListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubRouteTableV2s. - * - * @summary Retrieves the details of all VirtualHubRouteTableV2s. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2List.json - */ -async function virtualHubRouteTableV2List() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubRouteTableV2S.list(resourceGroupName, virtualHubName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubsCreateOrUpdateSample.js deleted file mode 100644 index 07737cf806fd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubsCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * - * @summary Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubPut.json - */ -async function virtualHubPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub2"; - const virtualHubParameters = { - addressPrefix: "10.168.0.0/24", - location: "West US", - sku: "Basic", - tags: { key1: "value1" }, - virtualWan: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - virtualHubParameters, - ); - console.log(result); -} - -async function main() { - await virtualHubPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubsDeleteSample.js deleted file mode 100644 index 9700313e1d8a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubsDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VirtualHub. - * - * @summary Deletes a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubDelete.json - */ -async function virtualHubDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginDeleteAndWait(resourceGroupName, virtualHubName); - console.log(result); -} - -async function main() { - await virtualHubDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js deleted file mode 100644 index fee3b743c3b7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EffectiveRoutesListForConnection.json - */ -async function effectiveRoutesForAConnectionResource() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters = { - resourceId: - "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName", - virtualWanResourceType: "ExpressRouteConnection", - }; - const options = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EffectiveRoutesListForRouteTable.json - */ -async function effectiveRoutesForARouteTableResource() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters = { - resourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - virtualWanResourceType: "RouteTable", - }; - const options = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EffectiveRoutesListForVirtualHub.json - */ -async function effectiveRoutesForTheVirtualHub() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters = {}; - const options = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -async function main() { - await effectiveRoutesForAConnectionResource(); - await effectiveRoutesForARouteTableResource(); - await effectiveRoutesForTheVirtualHub(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetInboundRoutesSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetInboundRoutesSample.js deleted file mode 100644 index b6c6f127dd3e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetInboundRoutesSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the inbound routes configured for the Virtual Hub on a particular connection. - * - * @summary Gets the inbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetInboundRoutes.json - */ -async function inboundRoutesForTheVirtualHubOnAParticularConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const getInboundRoutesParameters = { - connectionType: "ExpressRouteConnection", - resourceUri: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetInboundRoutesAndWait( - resourceGroupName, - virtualHubName, - getInboundRoutesParameters, - ); - console.log(result); -} - -async function main() { - await inboundRoutesForTheVirtualHubOnAParticularConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetOutboundRoutesSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetOutboundRoutesSample.js deleted file mode 100644 index 0d9f8a86a53f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetOutboundRoutesSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the outbound routes configured for the Virtual Hub on a particular connection. - * - * @summary Gets the outbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetOutboundRoutes.json - */ -async function outboundRoutesForTheVirtualHubOnAParticularConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const getOutboundRoutesParameters = { - connectionType: "ExpressRouteConnection", - resourceUri: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetOutboundRoutesAndWait( - resourceGroupName, - virtualHubName, - getOutboundRoutesParameters, - ); - console.log(result); -} - -async function main() { - await outboundRoutesForTheVirtualHubOnAParticularConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetSample.js deleted file mode 100644 index e0fdbd06daa5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VirtualHub. - * - * @summary Retrieves the details of a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubGet.json - */ -async function virtualHubGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.get(resourceGroupName, virtualHubName); - console.log(result); -} - -async function main() { - await virtualHubGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubsListByResourceGroupSample.js deleted file mode 100644 index 5d58cda825fb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VirtualHubs in a resource group. - * - * @summary Lists all the VirtualHubs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubListByResourceGroup.json - */ -async function virtualHubListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubs.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualHubListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubsListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubsListSample.js deleted file mode 100644 index 0c1ccd09b44c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VirtualHubs in a subscription. - * - * @summary Lists all the VirtualHubs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubList.json - */ -async function virtualHubList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubs.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualHubList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualHubsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualHubsUpdateTagsSample.js deleted file mode 100644 index 2c6b4a37d0a6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualHubsUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates VirtualHub tags. - * - * @summary Updates VirtualHub tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubUpdateTags.json - */ -async function virtualHubUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub2"; - const virtualHubParameters = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.updateTags( - resourceGroupName, - virtualHubName, - virtualHubParameters, - ); - console.log(result); -} - -async function main() { - await virtualHubUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesCreateOrUpdateSample.js deleted file mode 100644 index 38f65d223c95..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a virtual network appliance. - * - * @summary Creates or updates a virtual network appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_CreateOrUpdate.json - */ -async function createVirtualNetworkAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; - const parameters = { - bandwidthInGbps: "100", - location: "eastus", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkApplianceName, - parameters, - ); - console.log(result); -} - -async function main() { - await createVirtualNetworkAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesDeleteSample.js deleted file mode 100644 index c07e86ba53e6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified virtual network appliance. - * - * @summary Deletes the specified virtual network appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_Delete.json - */ -async function deleteVirtualNetworkAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkAppliances.beginDeleteAndWait( - resourceGroupName, - virtualNetworkApplianceName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualNetworkAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesGetSample.js deleted file mode 100644 index 29a5b5766b67..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified virtual network appliance. - * - * @summary Gets information about the specified virtual network appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_Get.json - */ -async function getVirtualNetworkAppliance() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkAppliances.get( - resourceGroupName, - virtualNetworkApplianceName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesListAllSample.js deleted file mode 100644 index 84eb7bc62e93..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all virtual network appliances in a subscription. - * - * @summary Gets all virtual network appliances in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_ListBySubscription.json - */ -async function listAllVirtualNetworkAppliances() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkAppliances.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllVirtualNetworkAppliances(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesListSample.js deleted file mode 100644 index 9861f7906f36..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all virtual network appliances in a resource group. - * - * @summary Gets all virtual network appliances in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_List.json - */ -async function listVirtualNetworkAppliancesInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkAppliances.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualNetworkAppliancesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesUpdateTagsSample.js deleted file mode 100644 index c5287ea8f98d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkAppliancesUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a virtual network appliance tags. - * - * @summary Updates a virtual network appliance tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_UpdateTags.json - */ -async function updateVirtualNetworkApplianceTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkAppliances.updateTags( - resourceGroupName, - virtualNetworkApplianceName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkApplianceTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 23d4d33e4b22..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway connection in the specified resource group. - * - * @summary Creates or updates a virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionCreate.json - */ -async function createVirtualNetworkGatewayConnectionS2S() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const parameters = { - authenticationType: "Certificate", - certificateAuthentication: { - inboundAuthCertificateChain: [ - "MIIC+TCCAeGgAwIBAgIQFOJUqDaxV5xJcKpTKO...", - "MIIC+TCCAeGgAwIBAgIQPJerInitNblK7yBgkqh...", - ], - inboundAuthCertificateSubjectName: "CN=rootCert.com", - outboundAuthCertificate: - "https://customerKv.vault.azure.net/Certificates/outBoundcert/Version", - }, - connectionMode: "Default", - connectionProtocol: "IKEv2", - connectionType: "IPsec", - dpdTimeoutSeconds: 30, - egressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", - }, - ], - enableBgp: false, - gatewayCustomBgpIpAddresses: [ - { - customBgpIpAddress: "169.254.21.1", - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/default", - }, - { - customBgpIpAddress: "169.254.21.3", - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/ActiveActive", - }, - ], - ingressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", - }, - ], - ipsecPolicies: [], - localNetworkGateway2: { - gatewayIpAddress: "x.x.x.x", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw", - localNetworkAddressSpace: { addressPrefixes: ["10.1.0.0/16"] }, - location: "centralus", - tags: {}, - }, - location: "centralus", - routingWeight: 0, - sharedKey: "Abc123", - trafficSelectorPolicies: [], - tunnelProperties: [ - { bgpPeeringAddress: "10.78.1.17", tunnelIpAddress: "10.78.1.5" }, - { bgpPeeringAddress: "10.78.1.20", tunnelIpAddress: "10.78.1.7" }, - ], - usePolicyBasedTrafficSelectors: false, - virtualNetworkGateway1: { - active: false, - bgpSettings: { - asn: 65514, - bgpPeeringAddress: "10.0.1.30", - peerWeight: 0, - }, - enableBgp: false, - gatewayType: "Vpn", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw", - ipConfigurations: [ - { - name: "gwipconfig1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - sku: { name: "VpnGw1", tier: "VpnGw1" }, - tags: {}, - vpnType: "RouteBased", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await createVirtualNetworkGatewayConnectionS2S(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsDeleteSample.js deleted file mode 100644 index f54965d6771c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified virtual network Gateway connection. - * - * @summary Deletes the specified virtual network Gateway connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionDelete.json - */ -async function deleteVirtualNetworkGatewayConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js deleted file mode 100644 index 153e0df07fed..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * - * @summary Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json - */ -async function getVirtualNetworkGatewayConnectionIkeSa() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginGetIkeSasAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayConnectionIkeSa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetSample.js deleted file mode 100644 index 163df04ba026..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified virtual network gateway connection by resource group. - * - * @summary Gets the specified virtual network gateway connection by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGet.json - */ -async function getVirtualNetworkGatewayConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.get( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js deleted file mode 100644 index 0de72832d2e6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * - * @summary The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json - */ -async function getVirtualNetworkGatewayConnectionSharedKey() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.getSharedKey( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsListSample.js deleted file mode 100644 index 68513e7ff2c1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * - * @summary The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionsList.json - */ -async function listVirtualNetworkGatewayConnectionsinResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGatewayConnections.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualNetworkGatewayConnectionsinResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js deleted file mode 100644 index 4cd67ad0359c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the virtual network gateway connection specified. - * - * @summary Resets the virtual network gateway connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionReset.json - */ -async function resetVirtualNetworkGatewayConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginResetConnectionAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await resetVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js deleted file mode 100644 index c997067726cc..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * - * @summary The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json - */ -async function resetVirtualNetworkGatewayConnectionSharedKey() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const parameters = { keyLength: 128 }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginResetSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await resetVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js deleted file mode 100644 index 8eff9e4b570f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * - * @summary The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json - */ -async function setVirtualNetworkGatewayConnectionSharedKey() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const parameters = { value: "AzureAbc123" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginSetSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await setVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js deleted file mode 100644 index f4fd9a262ad5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const parameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main() { - await startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter(); - await startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js deleted file mode 100644 index 65048a690d81..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Stops packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json - */ -async function stopPacketCaptureOnVirtualNetworkGatewayConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const parameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginStopPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await stopPacketCaptureOnVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js deleted file mode 100644 index e55c282a1726..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a virtual network gateway connection tags. - * - * @summary Updates a virtual network gateway connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json - */ -async function updateVirtualNetworkGatewayConnectionTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "test"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.beginUpdateTagsAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkGatewayConnectionTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js deleted file mode 100644 index 84d35575885a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * - * @summary Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRulePut.json - */ -async function virtualNetworkGatewayNatRulePut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const natRuleParameters = { - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "192.168.21.0/24", portRange: "300-400" }], - internalMappings: [{ addressSpace: "10.4.0.0/24", portRange: "200-300" }], - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/ipConfigurations/default", - mode: "EgressSnat", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - natRuleParameters, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayNatRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesDeleteSample.js deleted file mode 100644 index 7c36cd91f22b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a nat rule. - * - * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json - */ -async function virtualNetworkGatewayNatRuleDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayNatRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesGetSample.js deleted file mode 100644 index 4f0193e7f926..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a nat rule. - * - * @summary Retrieves the details of a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleGet.json - */ -async function virtualNetworkGatewayNatRuleGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.get( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayNatRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js deleted file mode 100644 index f403931ea7ef..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all nat rules for a particular virtual network gateway. - * - * @summary Retrieves all nat rules for a particular virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleList.json - */ -async function virtualNetworkGatewayNatRuleList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGatewayNatRules.listByVirtualNetworkGateway( - resourceGroupName, - virtualNetworkGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualNetworkGatewayNatRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js deleted file mode 100644 index 3d869a03466c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. - * - * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayUpdate.json - */ -async function updateVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = { - active: false, - allowRemoteVnetTraffic: false, - allowVirtualWanTraffic: false, - bgpSettings: { asn: 65515, bgpPeeringAddress: "10.0.1.30", peerWeight: 0 }, - customRoutes: { addressPrefixes: ["101.168.0.6/32"] }, - disableIPSecReplayProtection: false, - enableBgp: false, - enableBgpRouteTranslationForNat: false, - enableDnsForwarding: true, - enableHighBandwidthVpnGateway: false, - gatewayType: "Vpn", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - ipConfigurations: [ - { - name: "gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - natRules: [ - { - name: "natRule1", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "50.0.0.0/24" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", - internalMappings: [{ addressSpace: "10.10.0.0/24" }], - ipConfigurationId: "", - mode: "EgressSnat", - }, - { - name: "natRule2", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "30.0.0.0/24" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", - internalMappings: [{ addressSpace: "20.10.0.0/24" }], - ipConfigurationId: "", - mode: "IngressSnat", - }, - ], - sku: { name: "VpnGw1", tier: "VpnGw1" }, - vpnClientConfiguration: { - radiusServers: [ - { - radiusServerAddress: "10.2.0.0", - radiusServerScore: 20, - radiusServerSecret: "radiusServerSecret", - }, - ], - vpnClientProtocols: ["OpenVPN"], - vpnClientRevokedCertificates: [], - vpnClientRootCertificates: [], - }, - vpnType: "RouteBased", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. - * - * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkScalableGatewayUpdate.json - */ -async function updateVirtualNetworkScalableGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const parameters = { - active: false, - adminState: "Enabled", - allowRemoteVnetTraffic: false, - allowVirtualWanTraffic: false, - autoScaleConfiguration: { bounds: { max: 3, min: 2 } }, - bgpSettings: {}, - disableIPSecReplayProtection: false, - enableBgp: false, - enableBgpRouteTranslationForNat: false, - gatewayType: "ExpressRoute", - ipConfigurations: [ - { - name: "gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - natRules: [], - sku: { name: "ErGwScale", tier: "ErGwScale" }, - virtualNetworkGatewayPolicyGroups: [], - vpnClientConfiguration: {}, - vpnType: "PolicyBased", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkGateway(); - await updateVirtualNetworkScalableGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysDeleteSample.js deleted file mode 100644 index bf1978fec222..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified virtual network gateway. - * - * @summary Deletes the specified virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayDelete.json - */ -async function deleteVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js deleted file mode 100644 index 0bc659529043..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Disconnect vpn connections of virtual network gateway in the specified resource group. - * - * @summary Disconnect vpn connections of virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json - */ -async function disconnectVpnConnectionsFromVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vpn-gateway-test"; - const virtualNetworkGatewayName = "vpngateway"; - const request = { - vpnConnectionIds: ["vpnconnId1", "vpnconnId2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginDisconnectVirtualNetworkGatewayVpnConnectionsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - request, - ); - console.log(result); -} - -async function main() { - await disconnectVpnConnectionsFromVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js deleted file mode 100644 index 29c906ccea8a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * - * @summary Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json - */ -async function generateVirtualNetworkGatewayVpnProfile() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGenerateVpnProfileAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await generateVirtualNetworkGatewayVpnProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js deleted file mode 100644 index 3530d61e8dad..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * - * @summary Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json - */ -async function generateVpnClientPackage() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGeneratevpnclientpackageAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await generateVpnClientPackage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js deleted file mode 100644 index 7392fc015905..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * - * @summary This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json - */ -async function getVirtualNetworkGatewayAdvertisedRoutes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const peer = "test"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetAdvertisedRoutesAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peer, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayAdvertisedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js deleted file mode 100644 index cfa6c8f51186..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * - * @summary The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json - */ -async function getVirtualNetworkGatewayBgpPeerStatus() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetBgpPeerStatusAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayBgpPeerStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js deleted file mode 100644 index 534a91f8c6f1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves the details of all the failover tests performed on the gateway for different peering locations - * - * @summary This operation retrieves the details of all the failover tests performed on the gateway for different peering locations - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json - */ -async function virtualNetworkGatewayGetFailoverAllTestsDetails() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const typeParam = "SingleSiteFailover"; - const fetchLatest = true; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetFailoverAllTestDetailsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - typeParam, - fetchLatest, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayGetFailoverAllTestsDetails(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js deleted file mode 100644 index 14663afe65cf..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid - * - * @summary This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json - */ -async function virtualNetworkGatewayGetFailoverSingleTestDetails() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const peeringLocation = "Vancouver"; - const failoverTestId = "fe458ae8-d2ae-4520-a104-44bc233bde7e"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetFailoverSingleTestDetailsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - failoverTestId, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayGetFailoverSingleTestDetails(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js deleted file mode 100644 index 94c4217a57af..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * - * @summary This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json - */ -async function getVirtualNetworkGatewayLearnedRoutes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetLearnedRoutesAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayLearnedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetResiliencyInformationSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetResiliencyInformationSample.js deleted file mode 100644 index 9d3276f6515f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetResiliencyInformationSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score - * - * @summary This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetResiliencyInformation.json - */ -async function getVirtualNetworkGatewayResiliencyInformation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const attemptRefresh = true; - const options = { attemptRefresh }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetResiliencyInformationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayResiliencyInformation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetRoutesInformationSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetRoutesInformationSample.js deleted file mode 100644 index a1201cb9924e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetRoutesInformationSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation retrieves the route set information for an Express Route Gateway based on their resiliency - * - * @summary This operation retrieves the route set information for an Express Route Gateway based on their resiliency - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetRoutesInformation.json - */ -async function getVirtualNetworkGatewayRoutesInformation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const attemptRefresh = false; - const options = { - attemptRefresh, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetRoutesInformationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayRoutesInformation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetSample.js deleted file mode 100644 index 8c28c1440b7d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetSample.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified virtual network gateway by resource group. - * - * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGet.json - */ -async function getVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.get( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network gateway by resource group. - * - * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkScalableGatewayGet.json - */ -async function getVirtualNetworkScalableGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.get( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGateway(); - await getVirtualNetworkScalableGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js deleted file mode 100644 index 8b84bba7a867..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * - * @summary Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json - */ -async function getVirtualNetworkGatewayVpnProfilePackageUrl() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetVpnProfilePackageUrlAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayVpnProfilePackageUrl(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js deleted file mode 100644 index f85960e8b031..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * - * @summary Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json - */ -async function getVirtualNetworkGatewayVpnclientConnectionHealth() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vnet-test"; - const virtualNetworkGatewayName = "vpnp2sgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetVpnclientConnectionHealthAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayVpnclientConnectionHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js deleted file mode 100644 index be94eb1826f2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * - * @summary The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json - */ -async function getVirtualNetworkGatewayVpnClientIpsecParameters() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginGetVpnclientIpsecParametersAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await getVirtualNetworkGatewayVpnClientIpsecParameters(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeAbortMigrationSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeAbortMigrationSample.js deleted file mode 100644 index 7f6f2151ace7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeAbortMigrationSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Trigger abort migration for the virtual network gateway. - * - * @summary Trigger abort migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayAbortMigration.json - */ -async function virtualNetworkGatewayAbortMigration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginInvokeAbortMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayAbortMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeCommitMigrationSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeCommitMigrationSample.js deleted file mode 100644 index c9ecd7364d85..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeCommitMigrationSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Trigger commit migration for the virtual network gateway. - * - * @summary Trigger commit migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayCommitMigration.json - */ -async function virtualNetworkGatewayCommitMigration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginInvokeCommitMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayCommitMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeExecuteMigrationSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeExecuteMigrationSample.js deleted file mode 100644 index b447311cd103..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokeExecuteMigrationSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Trigger execute migration for the virtual network gateway. - * - * @summary Trigger execute migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayExecuteMigration.json - */ -async function virtualNetworkGatewayExecuteMigration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginInvokeExecuteMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayExecuteMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokePrepareMigrationSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokePrepareMigrationSample.js deleted file mode 100644 index 2c34fc9eff28..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysInvokePrepareMigrationSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Trigger prepare migration for the virtual network gateway. - * - * @summary Trigger prepare migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayPrepareMigration.json - */ -async function virtualNetworkGatewayPrepareMigration() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const migrationParams = { - migrationType: "UpgradeDeploymentToStandardIP", - resourceUrl: "testUrl", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginInvokePrepareMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - migrationParams, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayPrepareMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListConnectionsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListConnectionsSample.js deleted file mode 100644 index b77b085d562d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListConnectionsSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the connections in a virtual network gateway. - * - * @summary Gets all the connections in a virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaysListConnections.json - */ -async function virtualNetworkGatewaysListConnections() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const virtualNetworkGatewayName = "test-vpn-gateway-1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGateways.listConnections( - resourceGroupName, - virtualNetworkGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualNetworkGatewaysListConnections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListRadiusSecretsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListRadiusSecretsSample.js deleted file mode 100644 index 0bc9dc9fc969..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListRadiusSecretsSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. - * - * @summary List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AllVirtualNetworkGatewayRadiusServerSecretsList.json - */ -async function listAllVirtualNetworkGatewayRadiusServerSecrets() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.listRadiusSecrets( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await listAllVirtualNetworkGatewayRadiusServerSecrets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListSample.js deleted file mode 100644 index 4a3d447d717c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all virtual network gateways by resource group. - * - * @summary Gets all virtual network gateways by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayList.json - */ -async function listVirtualNetworkGatewaysinResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualNetworkGatewaysinResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysResetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysResetSample.js deleted file mode 100644 index c2129e7523a0..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysResetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the primary of the virtual network gateway in the specified resource group. - * - * @summary Resets the primary of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayReset.json - */ -async function resetVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginResetAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await resetVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js deleted file mode 100644 index 54272cad5480..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * - * @summary Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json - */ -async function resetVpnClientSharedKey() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginResetVpnClientSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await resetVpnClientSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js deleted file mode 100644 index 862834370e9d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * - * @summary The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json - */ -async function setVirtualNetworkGatewayVpnClientIpsecParameters() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const vpnclientIpsecParams = { - dhGroup: "DHGroup2", - ikeEncryption: "AES256", - ikeIntegrity: "SHA384", - ipsecEncryption: "AES256", - ipsecIntegrity: "SHA256", - pfsGroup: "PFS2", - saDataSizeKilobytes: 429497, - saLifeTimeSeconds: 86473, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginSetVpnclientIpsecParametersAndWait( - resourceGroupName, - virtualNetworkGatewayName, - vpnclientIpsecParams, - ); - console.log(result); -} - -async function main() { - await setVirtualNetworkGatewayVpnClientIpsecParameters(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js deleted file mode 100644 index 7b5979587e9c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation starts failover simulation on the gateway for the specified peering location - * - * @summary This operation starts failover simulation on the gateway for the specified peering location - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json - */ -async function virtualNetworkGatewayStartSiteFailoverSimulation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const peeringLocation = "Vancouver"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayStartSiteFailoverSimulation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js deleted file mode 100644 index 83eb3f7e70e5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayWithFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartPacketCapture.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayWithoutFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await startPacketCaptureOnVirtualNetworkGatewayWithFilter(); - await startPacketCaptureOnVirtualNetworkGatewayWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js deleted file mode 100644 index dfe7ddedfad5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation stops failover simulation on the gateway for the specified peering location - * - * @summary This operation stops failover simulation on the gateway for the specified peering location - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json - */ -async function virtualNetworkGatewayStopSiteFailoverSimulation() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const stopParameters = { - peeringLocation: "Vancouver", - wasSimulationSuccessful: true, - details: [ - { - failoverConnectionName: "conn1", - failoverLocation: "Denver", - isVerified: false, - }, - { - failoverConnectionName: "conn2", - failoverLocation: "Amsterdam", - isVerified: true, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - stopParameters, - ); - console.log(result); -} - -async function main() { - await virtualNetworkGatewayStopSiteFailoverSimulation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js deleted file mode 100644 index 0b6d786eca12..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops packet capture on virtual network gateway in the specified resource group. - * - * @summary Stops packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json - */ -async function stopPacketCaptureOnVirtualNetworkGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginStopPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await stopPacketCaptureOnVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js deleted file mode 100644 index 3e757102d68e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a xml format representation for supported vpn devices. - * - * @summary Gets a xml format representation for supported vpn devices. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json - */ -async function listVirtualNetworkGatewaySupportedVpnDevices() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.supportedVpnDevices( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main() { - await listVirtualNetworkGatewaySupportedVpnDevices(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysUpdateTagsSample.js deleted file mode 100644 index 6ff5aa7956f3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a virtual network gateway tags. - * - * @summary Updates a virtual network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayUpdateTags.json - */ -async function updateVirtualNetworkGatewayTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginUpdateTagsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js deleted file mode 100644 index 87365efca1fd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a xml format representation for vpn device configuration script. - * - * @summary Gets a xml format representation for vpn device configuration script. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json - */ -async function getVpnDeviceConfigurationScript() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngw"; - const parameters = { - deviceFamily: "ISR", - firmwareVersion: "IOS 15.1 (Preview)", - vendor: "Cisco", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.vpnDeviceConfigurationScript( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await getVpnDeviceConfigurationScript(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js deleted file mode 100644 index b98a80c776f5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringCreate.json - */ -async function createV6SubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: true, - localSubnetNames: ["Subnet1", "Subnet4"], - peerCompleteVnets: false, - remoteSubnetNames: ["Subnet2"], - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringCreate.json - */ -async function createPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json - */ -async function createPeeringWithRemoteVirtualNetworkEncryption() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkSubnetPeeringCreate.json - */ -async function createSubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: false, - localSubnetNames: ["Subnet1", "Subnet4"], - peerCompleteVnets: false, - remoteSubnetNames: ["Subnet2"], - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringSync.json - */ -async function syncPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringSync.json - */ -async function syncV6SubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: true, - peerCompleteVnets: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkSubnetPeeringSync.json - */ -async function syncSubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: false, - peerCompleteVnets: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -async function main() { - await createV6SubnetPeering(); - await createPeering(); - await createPeeringWithRemoteVirtualNetworkEncryption(); - await createSubnetPeering(); - await syncPeering(); - await syncV6SubnetPeering(); - await syncSubnetPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsDeleteSample.js deleted file mode 100644 index 3140d6e44a0b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified virtual network peering. - * - * @summary Deletes the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringDelete.json - */ -async function deletePeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -async function main() { - await deletePeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsGetSample.js deleted file mode 100644 index d95fa943a11b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsGetSample.js +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json - */ -async function getV6SubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringGet.json - */ -async function getPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json - */ -async function getPeeringWithRemoteVirtualNetworkEncryption() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkSubnetPeeringGet.json - */ -async function getSubnetPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -async function main() { - await getV6SubnetPeering(); - await getPeering(); - await getPeeringWithRemoteVirtualNetworkEncryption(); - await getSubnetPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsListSample.js deleted file mode 100644 index 5c1d47d30ccb..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkPeeringsListSample.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all virtual network peerings in a virtual network. - * - * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringList.json - */ -async function listPeerings() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkPeerings.list( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets all virtual network peerings in a virtual network. - * - * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json - */ -async function listPeeringsWithRemoteVirtualNetworkEncryption() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkPeerings.list( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listPeerings(); - await listPeeringsWithRemoteVirtualNetworkEncryption(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsCreateOrUpdateSample.js deleted file mode 100644 index 64d83858ef6f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a Virtual Network Tap. - * - * @summary Creates or updates a Virtual Network Tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapCreate.json - */ -async function createVirtualNetworkTap() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const parameters = { - destinationNetworkInterfaceIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testNetworkInterface/ipConfigurations/ipconfig1", - }, - location: "centraluseuap", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.beginCreateOrUpdateAndWait( - resourceGroupName, - tapName, - parameters, - ); - console.log(result); -} - -async function main() { - await createVirtualNetworkTap(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsDeleteSample.js deleted file mode 100644 index 367c473530ce..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified virtual network tap. - * - * @summary Deletes the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapDelete.json - */ -async function deleteVirtualNetworkTapResource() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.beginDeleteAndWait(resourceGroupName, tapName); - console.log(result); -} - -async function main() { - await deleteVirtualNetworkTapResource(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsGetSample.js deleted file mode 100644 index 9d6ac04f3d4b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets information about the specified virtual network tap. - * - * @summary Gets information about the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapGet.json - */ -async function getVirtualNetworkTap() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "testvtap"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.get(resourceGroupName, tapName); - console.log(result); -} - -async function main() { - await getVirtualNetworkTap(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsListAllSample.js deleted file mode 100644 index 23f936a72934..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. - * - * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapListAll.json - */ -async function listAllVirtualNetworkTaps() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkTaps.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllVirtualNetworkTaps(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsListByResourceGroupSample.js deleted file mode 100644 index 2ed4d3d65973..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. - * - * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapList.json - */ -async function listVirtualNetworkTapsInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkTaps.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualNetworkTapsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsUpdateTagsSample.js deleted file mode 100644 index 8d88fc91f161..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworkTapsUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an VirtualNetworkTap tags. - * - * @summary Updates an VirtualNetworkTap tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapUpdateTags.json - */ -async function updateVirtualNetworkTapTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const tapParameters = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.updateTags( - resourceGroupName, - tapName, - tapParameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkTapTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js deleted file mode 100644 index 6f71a65e4356..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks whether a private IP address is available for use. - * - * @summary Checks whether a private IP address is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json - */ -async function checkIPAddressAvailability() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const ipAddress = "10.0.1.4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.checkIPAddressAvailability( - resourceGroupName, - virtualNetworkName, - ipAddress, - ); - console.log(result); -} - -async function main() { - await checkIPAddressAvailability(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworksCreateOrUpdateSample.js deleted file mode 100644 index a7d6656ba59e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreate.json - */ -async function createVirtualNetwork() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - flowTimeoutInMinutes: 10, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateWithBgpCommunities.json - */ -async function createVirtualNetworkWithBgpCommunities() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - bgpCommunities: { virtualNetworkCommunity: "12076:20000" }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateSubnetWithDelegation.json - */ -async function createVirtualNetworkWithDelegatedSubnets() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "westcentralus", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/24", - delegations: [ - { - name: "myDelegation", - serviceName: "Microsoft.Sql/managedInstances", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateWithEncryption.json - */ -async function createVirtualNetworkWithEncryption() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - encryption: { enabled: true, enforcement: "AllowUnencrypted" }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateWithIpamPool.json - */ -async function createVirtualNetworkWithIpamPool() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { - ipamPoolPrefixAllocations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", - numberOfIpAddresses: "65536", - }, - ], - }, - location: "eastus", - subnets: [ - { - name: "test-1", - ipamPoolPrefixAllocations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", - numberOfIpAddresses: "80", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateServiceEndpoints.json - */ -async function createVirtualNetworkWithServiceEndpoints() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vnetTest"; - const virtualNetworkName = "vnet1"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json - */ -async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vnetTest"; - const virtualNetworkName = "vnet1"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus2euap", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/16", - serviceEndpointPolicies: [ - { - id: "/subscriptions/subid/resourceGroups/vnetTest/providers/Microsoft.Network/serviceEndpointPolicies/ServiceEndpointPolicy1", - }, - ], - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateSubnet.json - */ -async function createVirtualNetworkWithSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json - */ -async function createVirtualNetworkWithSubnetContainingAddressPrefixes() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [{ name: "test-2", addressPrefixes: ["10.0.0.0/28", "10.0.1.0/28"] }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main() { - await createVirtualNetwork(); - await createVirtualNetworkWithBgpCommunities(); - await createVirtualNetworkWithDelegatedSubnets(); - await createVirtualNetworkWithEncryption(); - await createVirtualNetworkWithIpamPool(); - await createVirtualNetworkWithServiceEndpoints(); - await createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(); - await createVirtualNetworkWithSubnet(); - await createVirtualNetworkWithSubnetContainingAddressPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworksDeleteSample.js deleted file mode 100644 index ab1db77779c6..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified virtual network. - * - * @summary Deletes the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkDelete.json - */ -async function deleteVirtualNetwork() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworksGetSample.js deleted file mode 100644 index 225595f9cd47..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksGetSample.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGet.json - */ -async function getVirtualNetwork() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get(resourceGroupName, virtualNetworkName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetWithSubnetDelegation.json - */ -async function getVirtualNetworkWithADelegatedSubnet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get(resourceGroupName, virtualNetworkName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetWithServiceAssociationLink.json - */ -async function getVirtualNetworkWithServiceAssociationLinks() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get(resourceGroupName, virtualNetworkName); - console.log(result); -} - -async function main() { - await getVirtualNetwork(); - await getVirtualNetworkWithADelegatedSubnet(); - await getVirtualNetworkWithServiceAssociationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListAllSample.js deleted file mode 100644 index b5d00d143cc2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all virtual networks in a subscription. - * - * @summary Gets all virtual networks in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkListAll.json - */ -async function listAllVirtualNetworks() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllVirtualNetworks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListDdosProtectionStatusSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListDdosProtectionStatusSample.js deleted file mode 100644 index f4fb300e55db..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListDdosProtectionStatusSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * - * @summary Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json - */ -async function getDdosProtectionStatusOfAVirtualNetwork() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const top = 75; - const options = { - top, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.beginListDdosProtectionStatusAndWait( - resourceGroupName, - virtualNetworkName, - options, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await getDdosProtectionStatusOfAVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListSample.js deleted file mode 100644 index 884e26617c95..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all virtual networks in a resource group. - * - * @summary Gets all virtual networks in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkList.json - */ -async function listVirtualNetworksInResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVirtualNetworksInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListUsageSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListUsageSample.js deleted file mode 100644 index a85cd846ca58..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksListUsageSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists usage stats. - * - * @summary Lists usage stats. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkListUsage.json - */ -async function vnetGetUsage() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listUsage( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vnetGetUsage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualNetworksUpdateTagsSample.js deleted file mode 100644 index ecd67f0846ca..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualNetworksUpdateTagsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a virtual network tags. - * - * @summary Updates a virtual network tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkUpdateTags.json - */ -async function updateVirtualNetworkTags() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.updateTags( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main() { - await updateVirtualNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsCreateOrUpdateSample.js deleted file mode 100644 index 497e25e63baf..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Virtual Router Peering. - * - * @summary Creates or updates the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringPut.json - */ -async function createVirtualRouterPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const parameters = { - peerAsn: 20000, - peerIp: "192.168.1.5", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualRouterName, - peeringName, - parameters, - ); - console.log(result); -} - -async function main() { - await createVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsDeleteSample.js deleted file mode 100644 index 47ce95fd74d8..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified peering from a Virtual Router. - * - * @summary Deletes the specified peering from a Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringDelete.json - */ -async function deleteVirtualRouterPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.beginDeleteAndWait( - resourceGroupName, - virtualRouterName, - peeringName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsGetSample.js deleted file mode 100644 index b35707170916..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Virtual Router Peering. - * - * @summary Gets the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringGet.json - */ -async function getVirtualRouterPeering() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.get( - resourceGroupName, - virtualRouterName, - peeringName, - ); - console.log(result); -} - -async function main() { - await getVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsListSample.js deleted file mode 100644 index b79e1697226a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualRouterPeeringsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Virtual Router Peerings in a Virtual Router resource. - * - * @summary Lists all Virtual Router Peerings in a Virtual Router resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringList.json - */ -async function listAllVirtualRouterPeeringsForAGivenVirtualRouter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouterPeerings.list( - resourceGroupName, - virtualRouterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllVirtualRouterPeeringsForAGivenVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualRoutersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualRoutersCreateOrUpdateSample.js deleted file mode 100644 index 6a3b13161336..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualRoutersCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the specified Virtual Router. - * - * @summary Creates or updates the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPut.json - */ -async function createVirtualRouter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const parameters = { - hostedGateway: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vnetGateway", - }, - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualRouterName, - parameters, - ); - console.log(result); -} - -async function main() { - await createVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualRoutersDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualRoutersDeleteSample.js deleted file mode 100644 index 9bbe94c53007..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualRoutersDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Virtual Router. - * - * @summary Deletes the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterDelete.json - */ -async function deleteVirtualRouter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.beginDeleteAndWait( - resourceGroupName, - virtualRouterName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualRoutersGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualRoutersGetSample.js deleted file mode 100644 index 9a78fcfa74a7..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualRoutersGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Virtual Router. - * - * @summary Gets the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterGet.json - */ -async function getVirtualRouter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.get(resourceGroupName, virtualRouterName); - console.log(result); -} - -async function main() { - await getVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualRoutersListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualRoutersListByResourceGroupSample.js deleted file mode 100644 index 8e9de195c301..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualRoutersListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Virtual Routers in a resource group. - * - * @summary Lists all Virtual Routers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterListByResourceGroup.json - */ -async function listAllVirtualRouterForAGivenResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouters.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllVirtualRouterForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualRoutersListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualRoutersListSample.js deleted file mode 100644 index c3c8be98c63e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualRoutersListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Virtual Routers in a subscription. - * - * @summary Gets all the Virtual Routers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterListBySubscription.json - */ -async function listAllVirtualRoutersForAGivenSubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouters.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllVirtualRoutersForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualWansCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualWansCreateOrUpdateSample.js deleted file mode 100644 index 1f66634e4119..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualWansCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * - * @summary Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANPut.json - */ -async function virtualWanCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const wANParameters = { - typePropertiesType: "Basic", - disableVpnEncryption: false, - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualWANName, - wANParameters, - ); - console.log(result); -} - -async function main() { - await virtualWanCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualWansDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualWansDeleteSample.js deleted file mode 100644 index f70f70d73623..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualWansDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VirtualWAN. - * - * @summary Deletes a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANDelete.json - */ -async function virtualWanDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "virtualWan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.beginDeleteAndWait(resourceGroupName, virtualWANName); - console.log(result); -} - -async function main() { - await virtualWanDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualWansGetSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualWansGetSample.js deleted file mode 100644 index 24c0bd921167..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualWansGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VirtualWAN. - * - * @summary Retrieves the details of a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANGet.json - */ -async function virtualWanGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.get(resourceGroupName, virtualWANName); - console.log(result); -} - -async function main() { - await virtualWanGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualWansListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualWansListByResourceGroupSample.js deleted file mode 100644 index 8b0a39095f16..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualWansListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VirtualWANs in a resource group. - * - * @summary Lists all the VirtualWANs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANListByResourceGroup.json - */ -async function virtualWanListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualWans.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualWanListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualWansListSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualWansListSample.js deleted file mode 100644 index b6bd1f95260d..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualWansListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VirtualWANs in a subscription. - * - * @summary Lists all the VirtualWANs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANList.json - */ -async function virtualWanList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualWans.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await virtualWanList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/virtualWansUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/virtualWansUpdateTagsSample.js deleted file mode 100644 index 1df744f4949c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/virtualWansUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates a VirtualWAN tags. - * - * @summary Updates a VirtualWAN tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANUpdateTags.json - */ -async function virtualWanUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const wANParameters = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.updateTags( - resourceGroupName, - virtualWANName, - wANParameters, - ); - console.log(result); -} - -async function main() { - await virtualWanUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 56736060e879..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * - * @summary Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionPut.json - */ -async function vpnConnectionPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const vpnConnectionParameters = { - remoteVpnSite: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", - }, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - }, - trafficSelectorPolicies: [], - vpnLinkConnections: [ - { - name: "Connection-Link1", - connectionBandwidth: 200, - sharedKey: "key", - usePolicyBasedTrafficSelectors: false, - vpnConnectionProtocolType: "IKEv2", - vpnLinkConnectionMode: "Default", - vpnSiteLink: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - connectionName, - vpnConnectionParameters, - ); - console.log(result); -} - -async function main() { - await vpnConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsDeleteSample.js deleted file mode 100644 index c81e39b3843f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a vpn connection. - * - * @summary Deletes a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionDelete.json - */ -async function vpnConnectionDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginDeleteAndWait( - resourceGroupName, - gatewayName, - connectionName, - ); - console.log(result); -} - -async function main() { - await vpnConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsGetSample.js deleted file mode 100644 index 60eedb6580a1..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a vpn connection. - * - * @summary Retrieves the details of a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionGet.json - */ -async function vpnConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.get(resourceGroupName, gatewayName, connectionName); - console.log(result); -} - -async function main() { - await vpnConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsListByVpnGatewaySample.js b/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsListByVpnGatewaySample.js deleted file mode 100644 index ff6ade03b547..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsListByVpnGatewaySample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all vpn connections for a particular virtual wan vpn gateway. - * - * @summary Retrieves all vpn connections for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionList.json - */ -async function vpnConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnConnections.listByVpnGateway(resourceGroupName, gatewayName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsStartPacketCaptureSample.js deleted file mode 100644 index c9b791145fb5..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsStartPacketCaptureSample.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. - * - * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVpnConnectionWithFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - linkConnectionNames: ["siteLink1", "siteLink2"], - }; - const options = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. - * - * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStartPacketCapture.json - */ -async function startPacketCaptureOnVpnConnectionWithoutFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters = { - linkConnectionNames: ["siteLink1", "siteLink2"], - }; - const options = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -async function main() { - await startPacketCaptureOnVpnConnectionWithFilter(); - await startPacketCaptureOnVpnConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsStopPacketCaptureSample.js deleted file mode 100644 index 9f7f7785c284..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnConnectionsStopPacketCaptureSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops packet capture on Vpn connection in the specified resource group. - * - * @summary Stops packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStopPacketCapture.json - */ -async function startPacketCaptureOnVpnConnectionWithoutFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters = { - linkConnectionNames: ["vpnSiteLink1", "vpnSiteLink2"], - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStopPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -async function main() { - await startPacketCaptureOnVpnConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysCreateOrUpdateSample.js deleted file mode 100644 index 66f1e724ee69..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysCreateOrUpdateSample.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * - * @summary Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayPut.json - */ -async function vpnGatewayPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnGatewayParameters = { - bgpSettings: { - asn: 65515, - bgpPeeringAddresses: [ - { - customBgpIpAddresses: ["169.254.21.5"], - ipconfigurationId: "Instance0", - }, - { - customBgpIpAddresses: ["169.254.21.10"], - ipconfigurationId: "Instance1", - }, - ], - peerWeight: 0, - }, - connections: [ - { - name: "vpnConnection1", - remoteVpnSite: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", - }, - vpnLinkConnections: [ - { - name: "Connection-Link1", - connectionBandwidth: 200, - egressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03", - }, - ], - sharedKey: "key", - vpnConnectionProtocolType: "IKEv2", - vpnSiteLink: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", - }, - }, - ], - }, - ], - enableBgpRouteTranslationForNat: false, - isRoutingPreferenceInternet: false, - location: "westcentralus", - natRules: [ - { - name: "nat03", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "192.168.0.0/26" }], - internalMappings: [{ addressSpace: "0.0.0.0/26" }], - ipConfigurationId: "", - mode: "EgressSnat", - }, - ], - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - ); - console.log(result); -} - -async function main() { - await vpnGatewayPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysDeleteSample.js deleted file mode 100644 index c8cec162e2c9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a virtual wan vpn gateway. - * - * @summary Deletes a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayDelete.json - */ -async function vpnGatewayDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginDeleteAndWait(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await vpnGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysGetSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysGetSample.js deleted file mode 100644 index 84393ecf7554..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a virtual wan vpn gateway. - * - * @summary Retrieves the details of a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayGet.json - */ -async function vpnGatewayGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.get(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await vpnGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysListByResourceGroupSample.js deleted file mode 100644 index a00eb3351cfd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VpnGateways in a resource group. - * - * @summary Lists all the VpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayListByResourceGroup.json - */ -async function vpnGatewayListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnGateways.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysListSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysListSample.js deleted file mode 100644 index bd111610744f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VpnGateways in a subscription. - * - * @summary Lists all the VpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayList.json - */ -async function vpnGatewayListBySubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnGateways.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysResetSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysResetSample.js deleted file mode 100644 index 356073925c46..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysResetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the primary of the vpn gateway in the specified resource group. - * - * @summary Resets the primary of the vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayReset.json - */ -async function resetVpnGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginResetAndWait(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await resetVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysStartPacketCaptureSample.js deleted file mode 100644 index 81c11c554429..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysStartPacketCaptureSample.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. - * - * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVpnGatewayWithFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const parameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. - * - * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStartPacketCapture.json - */ -async function startPacketCaptureOnVpnGatewayWithoutFilter() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main() { - await startPacketCaptureOnVpnGatewayWithFilter(); - await startPacketCaptureOnVpnGatewayWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysStopPacketCaptureSample.js deleted file mode 100644 index a971982f0a5b..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysStopPacketCaptureSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Stops packet capture on vpn gateway in the specified resource group. - * - * @summary Stops packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStopPacketCapture.json - */ -async function stopPacketCaptureOnVpnGateway() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const parameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStopPacketCaptureAndWait( - resourceGroupName, - gatewayName, - options, - ); - console.log(result); -} - -async function main() { - await stopPacketCaptureOnVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysUpdateTagsSample.js deleted file mode 100644 index d4370226e33f..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnGatewaysUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates virtual wan vpn gateway tags. - * - * @summary Updates virtual wan vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayUpdateTags.json - */ -async function vpnGatewayUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnGatewayParameters = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginUpdateTagsAndWait( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - ); - console.log(result); -} - -async function main() { - await vpnGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js deleted file mode 100644 index 18bf74252f26..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all shared keys of VpnLink connection specified. - * - * @summary Lists all shared keys of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json - */ -async function vpnSiteLinkConnectionSharedKeysGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnLinkConnections.listAllSharedKeys( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnSiteLinkConnectionSharedKeysGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js b/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js deleted file mode 100644 index 9507c7c41661..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the shared key of VpnLink connection specified. - * - * @summary Gets the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.getDefaultSharedKey( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main() { - await vpnSiteLinkConnectionDefaultSharedKeyGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetIkeSasSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetIkeSasSample.js deleted file mode 100644 index 9075a0b00700..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsGetIkeSasSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * - * @summary Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json - */ -async function getVpnLinkConnectionIkeSa() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginGetIkeSasAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main() { - await getVpnLinkConnectionIkeSa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsListByVpnConnectionSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsListByVpnConnectionSample.js deleted file mode 100644 index 9e98d3aa2133..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsListByVpnConnectionSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * - * @summary Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionList.json - */ -async function vpnSiteLinkConnectionList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnLinkConnections.listByVpnConnection( - resourceGroupName, - gatewayName, - connectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnSiteLinkConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js b/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js deleted file mode 100644 index 29c975106d66..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the value of the shared key of VpnLink connection specified. - * - * @summary Gets the value of the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.listDefaultSharedKey( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main() { - await vpnSiteLinkConnectionDefaultSharedKeyList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsResetConnectionSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsResetConnectionSample.js deleted file mode 100644 index a4162d15213a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsResetConnectionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Resets the VpnLink connection specified. - * - * @summary Resets the VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionReset.json - */ -async function resetVpnLinkConnection() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginResetConnectionAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main() { - await resetVpnLinkConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js b/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js deleted file mode 100644 index bcada3f2be9a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * - * @summary Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyPut() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const connectionSharedKeyParameters = { - properties: { sharedKey: "ABCDEF123456" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginSetOrInitDefaultSharedKeyAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - connectionSharedKeyParameters, - ); - console.log(result); -} - -async function main() { - await vpnSiteLinkConnectionDefaultSharedKeyPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js deleted file mode 100644 index fa17e04fdb25..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * - * @summary Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetVirtualWanVpnServerConfigurations.json - */ -async function getVirtualWanVpnServerConfigurations() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurationsAssociatedWithVirtualWan.beginListAndWait( - resourceGroupName, - virtualWANName, - ); - console.log(result); -} - -async function main() { - await getVirtualWanVpnServerConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index d8cc39ff8da9..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * - * @summary Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationPut.json - */ -async function vpnServerConfigurationCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const vpnServerConfigurationParameters = { - configurationPolicyGroups: [ - { - name: "policyGroup1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup1", - isDefault: true, - policyMembers: [ - { - name: "policy1", - attributeType: "RadiusAzureGroupId", - attributeValue: "6ad1bd08", - }, - ], - priority: 0, - }, - { - name: "policyGroup2", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup2", - isDefault: true, - policyMembers: [ - { - name: "policy2", - attributeType: "CertificateGroupId", - attributeValue: "red.com", - }, - ], - priority: 0, - }, - ], - location: "West US", - radiusClientRootCertificates: [ - { - name: "vpnServerConfigRadiusClientRootCert1", - thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", - }, - ], - radiusServerRootCertificates: [ - { - name: "vpnServerConfigRadiusServerRootCer1", - publicCertData: - "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuM", - }, - ], - radiusServers: [ - { - radiusServerAddress: "10.0.0.0", - radiusServerScore: 25, - radiusServerSecret: "radiusServerSecret", - }, - ], - tags: { key1: "value1" }, - vpnClientIpsecPolicies: [ - { - dhGroup: "DHGroup14", - ikeEncryption: "AES256", - ikeIntegrity: "SHA384", - ipsecEncryption: "AES256", - ipsecIntegrity: "SHA256", - pfsGroup: "PFS14", - saDataSizeKilobytes: 429497, - saLifeTimeSeconds: 86472, - }, - ], - vpnClientRevokedCertificates: [ - { - name: "vpnServerConfigVpnClientRevokedCert1", - thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", - }, - ], - vpnClientRootCertificates: [ - { - name: "vpnServerConfigVpnClientRootCert1", - publicCertData: - "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuN", - }, - ], - vpnProtocols: ["IkeV2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - ); - console.log(result); -} - -async function main() { - await vpnServerConfigurationCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsDeleteSample.js deleted file mode 100644 index b1fb1a4f2963..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VpnServerConfiguration. - * - * @summary Deletes a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationDelete.json - */ -async function vpnServerConfigurationDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.beginDeleteAndWait( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main() { - await vpnServerConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsGetSample.js deleted file mode 100644 index a5361dd132bd..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VpnServerConfiguration. - * - * @summary Retrieves the details of a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationGet.json - */ -async function vpnServerConfigurationGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.get( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main() { - await vpnServerConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListByResourceGroupSample.js deleted file mode 100644 index c3c920088503..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the vpnServerConfigurations in a resource group. - * - * @summary Lists all the vpnServerConfigurations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationListByResourceGroup.json - */ -async function vpnServerConfigurationListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnServerConfigurations.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnServerConfigurationListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListRadiusSecretsSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListRadiusSecretsSample.js deleted file mode 100644 index 043a1637cf03..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListRadiusSecretsSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all Radius servers with respective radius secrets from VpnServerConfiguration. - * - * @summary List all Radius servers with respective radius secrets from VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AllVpnServerConfigurationRadiusServerSecretsList.json - */ -async function listAllVpnServerConfigurationRadiusServerSecrets() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnserverconfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.listRadiusSecrets( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main() { - await listAllVpnServerConfigurationRadiusServerSecrets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListSample.js deleted file mode 100644 index f378fed7d941..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VpnServerConfigurations in a subscription. - * - * @summary Lists all the VpnServerConfigurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationList.json - */ -async function vpnServerConfigurationList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnServerConfigurations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnServerConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsUpdateTagsSample.js deleted file mode 100644 index a06909b8f151..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnServerConfigurationsUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates VpnServerConfiguration tags. - * - * @summary Updates VpnServerConfiguration tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationUpdateTags.json - */ -async function vpnServerConfigurationUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const vpnServerConfigurationParameters = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.updateTags( - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - ); - console.log(result); -} - -async function main() { - await vpnServerConfigurationUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinkConnectionsGetSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinkConnectionsGetSample.js deleted file mode 100644 index ad1643c66fee..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinkConnectionsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a vpn site link connection. - * - * @summary Retrieves the details of a vpn site link connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionGet.json - */ -async function vpnSiteLinkConnectionGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSiteLinkConnections.get( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main() { - await vpnSiteLinkConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinksGetSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinksGetSample.js deleted file mode 100644 index 5577f5bbc76e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinksGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VPN site link. - * - * @summary Retrieves the details of a VPN site link. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkGet.json - */ -async function vpnSiteGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteLinkName = "vpnSiteLink1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSiteLinks.get(resourceGroupName, vpnSiteName, vpnSiteLinkName); - console.log(result); -} - -async function main() { - await vpnSiteGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinksListByVpnSiteSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinksListByVpnSiteSample.js deleted file mode 100644 index 79adc9802e2e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnSiteLinksListByVpnSiteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the vpnSiteLinks in a resource group for a vpn site. - * - * @summary Lists all the vpnSiteLinks in a resource group for a vpn site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkListByVpnSite.json - */ -async function vpnSiteLinkListByVpnSite() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSiteLinks.listByVpnSite(resourceGroupName, vpnSiteName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnSiteLinkListByVpnSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnSitesConfigurationDownloadSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnSitesConfigurationDownloadSample.js deleted file mode 100644 index 80525b9b4c33..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnSitesConfigurationDownloadSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gives the sas-url to download the configurations for vpn-sites in a resource group. - * - * @summary Gives the sas-url to download the configurations for vpn-sites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSitesConfigurationDownload.json - */ -async function vpnSitesConfigurationDownload() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const request = { - outputBlobSasUrl: - "https://blobcortextesturl.blob.core.windows.net/folderforconfig/vpnFile?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - vpnSites: ["/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/abc"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSitesConfiguration.beginDownloadAndWait( - resourceGroupName, - virtualWANName, - request, - ); - console.log(result); -} - -async function main() { - await vpnSitesConfigurationDownload(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnSitesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnSitesCreateOrUpdateSample.js deleted file mode 100644 index 7c412220a13c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnSitesCreateOrUpdateSample.js +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * - * @summary Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSitePut.json - */ -async function vpnSiteCreate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteParameters = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - isSecuritySite: false, - location: "West US", - o365Policy: { - breakOutCategories: { default: false, allow: true, optimize: true }, - }, - tags: { key1: "value1" }, - virtualWan: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1", - }, - vpnSiteLinks: [ - { - name: "vpnSiteLink1", - bgpProperties: { asn: 1234, bgpPeeringAddress: "192.168.0.0" }, - fqdn: "link1.vpnsite1.contoso.com", - ipAddress: "50.50.50.56", - linkProperties: { linkProviderName: "vendor1", linkSpeedInMbps: 0 }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnSiteName, - vpnSiteParameters, - ); - console.log(result); -} - -async function main() { - await vpnSiteCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnSitesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnSitesDeleteSample.js deleted file mode 100644 index fe69db747849..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnSitesDeleteSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a VpnSite. - * - * @summary Deletes a VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteDelete.json - */ -async function vpnSiteDelete() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.beginDeleteAndWait(resourceGroupName, vpnSiteName); - console.log(result); -} - -async function main() { - await vpnSiteDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnSitesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnSitesGetSample.js deleted file mode 100644 index 2ad9084fde76..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnSitesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves the details of a VPN site. - * - * @summary Retrieves the details of a VPN site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteGet.json - */ -async function vpnSiteGet() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.get(resourceGroupName, vpnSiteName); - console.log(result); -} - -async function main() { - await vpnSiteGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnSitesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnSitesListByResourceGroupSample.js deleted file mode 100644 index 57875f9c2a19..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnSitesListByResourceGroupSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the vpnSites in a resource group. - * - * @summary Lists all the vpnSites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteListByResourceGroup.json - */ -async function vpnSiteListByResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSites.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnSiteListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnSitesListSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnSitesListSample.js deleted file mode 100644 index 5c0544ec1aca..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnSitesListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the VpnSites in a subscription. - * - * @summary Lists all the VpnSites in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteList.json - */ -async function vpnSiteList() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSites.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await vpnSiteList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/vpnSitesUpdateTagsSample.js b/sdk/network/arm-network/samples/v36/javascript/vpnSitesUpdateTagsSample.js deleted file mode 100644 index 424487ae7cb2..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/vpnSitesUpdateTagsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates VpnSite tags. - * - * @summary Updates VpnSite tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteUpdateTags.json - */ -async function vpnSiteUpdate() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteParameters = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.updateTags( - resourceGroupName, - vpnSiteName, - vpnSiteParameters, - ); - console.log(result); -} - -async function main() { - await vpnSiteUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js deleted file mode 100644 index 667f9f4c3c8c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or update policy with specified rule set name within a resource group. - * - * @summary Creates or update policy with specified rule set name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyCreateOrUpdate.json - */ -async function createsOrUpdatesAWafPolicyWithinAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const parameters = { - customRules: [ - { - name: "Rule1", - action: "Block", - matchConditions: [ - { - matchValues: ["192.168.1.0/24", "10.0.0.0/24"], - matchVariables: [{ selector: undefined, variableName: "RemoteAddr" }], - operator: "IPMatch", - }, - ], - priority: 1, - ruleType: "MatchRule", - }, - { - name: "Rule2", - action: "Block", - matchConditions: [ - { - matchValues: ["192.168.1.0/24"], - matchVariables: [{ selector: undefined, variableName: "RemoteAddr" }], - operator: "IPMatch", - }, - { - matchValues: ["Windows"], - matchVariables: [{ selector: "UserAgent", variableName: "RequestHeaders" }], - operator: "Contains", - }, - ], - priority: 2, - ruleType: "MatchRule", - }, - { - name: "RateLimitRule3", - action: "Block", - groupByUserSession: [{ groupByVariables: [{ variableName: "ClientAddr" }] }], - matchConditions: [ - { - matchValues: ["192.168.1.0/24", "10.0.0.0/24"], - matchVariables: [{ selector: undefined, variableName: "RemoteAddr" }], - negationConditon: true, - operator: "IPMatch", - }, - ], - priority: 3, - rateLimitDuration: "OneMin", - rateLimitThreshold: 10, - ruleType: "RateLimitRule", - }, - { - name: "Rule4", - action: "JSChallenge", - matchConditions: [ - { - matchValues: ["192.168.1.0/24"], - matchVariables: [{ selector: undefined, variableName: "RemoteAddr" }], - operator: "IPMatch", - }, - { - matchValues: ["Bot"], - matchVariables: [{ selector: "UserAgent", variableName: "RequestHeaders" }], - operator: "Contains", - }, - ], - priority: 4, - ruleType: "MatchRule", - }, - { - name: "Rule5", - action: "CAPTCHA", - matchConditions: [ - { - matchValues: ["192.168.2.0/24"], - matchVariables: [{ selector: undefined, variableName: "RemoteAddr" }], - negationConditon: false, - operator: "IPMatch", - }, - { - matchValues: ["Bot"], - matchVariables: [{ selector: "UserAgent", variableName: "RequestHeaders" }], - negationConditon: false, - operator: "Contains", - }, - ], - priority: 5, - ruleType: "MatchRule", - state: "Enabled", - }, - ], - location: "WestUs", - managedRules: { - exclusions: [ - { - exclusionManagedRuleSets: [ - { - ruleGroups: [ - { - ruleGroupName: "REQUEST-930-APPLICATION-ATTACK-LFI", - rules: [{ ruleId: "930120" }], - }, - { ruleGroupName: "REQUEST-932-APPLICATION-ATTACK-RCE" }, - ], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - ], - matchVariable: "RequestArgNames", - selector: "hello", - selectorMatchOperator: "StartsWith", - }, - { - exclusionManagedRuleSets: [ - { ruleGroups: [], ruleSetType: "OWASP", ruleSetVersion: "3.1" }, - ], - matchVariable: "RequestArgNames", - selector: "hello", - selectorMatchOperator: "EndsWith", - }, - { - matchVariable: "RequestArgNames", - selector: "test", - selectorMatchOperator: "StartsWith", - }, - { - matchVariable: "RequestArgValues", - selector: "test", - selectorMatchOperator: "StartsWith", - }, - ], - managedRuleSets: [ - { - ruleGroupOverrides: [ - { - ruleGroupName: "REQUEST-931-APPLICATION-ATTACK-RFI", - rules: [ - { action: "Log", ruleId: "931120", state: "Enabled" }, - { - action: "AnomalyScoring", - ruleId: "931130", - state: "Disabled", - }, - ], - }, - ], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - { - ruleGroupOverrides: [ - { - ruleGroupName: "UnknownBots", - rules: [ - { action: "JSChallenge", ruleId: "300700", state: "Enabled" }, - { action: "CAPTCHA", ruleId: "300600", state: "Enabled" }, - ], - }, - ], - ruleSetType: "Microsoft_BotManagerRuleSet", - ruleSetVersion: "1.0", - }, - { - ruleGroupOverrides: [ - { - ruleGroupName: "ExcessiveRequests", - rules: [ - { - action: "Block", - ruleId: "500100", - sensitivity: "High", - state: "Enabled", - }, - ], - }, - ], - ruleSetType: "Microsoft_HTTPDDoSRuleSet", - ruleSetVersion: "1.0", - }, - ], - exceptions: [ - { - exceptionManagedRuleSets: [{ ruleSetType: "OWASP", ruleSetVersion: "3.2" }], - matchVariable: "RequestURI", - valueMatchOperator: "Contains", - values: ["health", "account/images", "default.aspx"], - }, - { - exceptionManagedRuleSets: [ - { - ruleGroups: [{ ruleGroupName: "REQUEST-932-APPLICATION-ATTACK-RCE" }], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - ], - matchVariable: "RequestHeader", - selector: "User-Agent", - selectorMatchOperator: "StartsWith", - valueMatchOperator: "Contains", - values: ["Mozilla/5.0", "Chrome/122.0.0.0"], - }, - { - exceptionManagedRuleSets: [ - { - ruleGroups: [{ ruleGroupName: "BadBots", rules: [{ ruleId: "100100" }] }], - ruleSetType: "Microsoft_BotManagerRuleSet", - ruleSetVersion: "1.0", - }, - ], - matchVariable: "RemoteAddr", - valueMatchOperator: "IPMatch", - values: ["1.2.3.4", "10.0.0.1/6"], - }, - ], - }, - policySettings: { - captchaCookieExpirationInMins: 100, - jsChallengeCookieExpirationInMins: 100, - logScrubbing: { - scrubbingRules: [ - { - matchVariable: "RequestArgNames", - selector: "test", - selectorMatchOperator: "Equals", - state: "Enabled", - }, - { - matchVariable: "RequestIPAddress", - selectorMatchOperator: "EqualsAny", - state: "Enabled", - }, - ], - state: "Enabled", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.createOrUpdate( - resourceGroupName, - policyName, - parameters, - ); - console.log(result); -} - -async function main() { - await createsOrUpdatesAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesDeleteSample.js deleted file mode 100644 index 9fc6a739d70e..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes Policy. - * - * @summary Deletes Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyDelete.json - */ -async function deletesAWafPolicyWithinAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.beginDeleteAndWait( - resourceGroupName, - policyName, - ); - console.log(result); -} - -async function main() { - await deletesAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesGetSample.js deleted file mode 100644 index f14cf6a1bde3..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieve protection policy with specified name within a resource group. - * - * @summary Retrieve protection policy with specified name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyGet.json - */ -async function getsAWafPolicyWithinAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.get(resourceGroupName, policyName); - console.log(result); -} - -async function main() { - await getsAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesListAllSample.js b/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesListAllSample.js deleted file mode 100644 index bac06cd99989..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesListAllSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the WAF policies in a subscription. - * - * @summary Gets all the WAF policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafListAllPolicies.json - */ -async function listsAllWafPoliciesInASubscription() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webApplicationFirewallPolicies.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllWafPoliciesInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesListSample.js b/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesListSample.js deleted file mode 100644 index 546be206b18c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/webApplicationFirewallPoliciesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all of the protection policies within a resource group. - * - * @summary Lists all of the protection policies within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafListPolicies.json - */ -async function listsAllWafPoliciesInAResourceGroup() { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webApplicationFirewallPolicies.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllWafPoliciesInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/webCategoriesGetSample.js b/sdk/network/arm-network/samples/v36/javascript/webCategoriesGetSample.js deleted file mode 100644 index d9cac2abb17a..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/webCategoriesGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Azure Web Category. - * - * @summary Gets the specified Azure Web Category. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureWebCategoryGet.json - */ -async function getAzureWebCategoryByName() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "4de8428a-4a92-4cea-90ff-b47128b8cab8"; - const name = "Arts"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webCategories.get(name); - console.log(result); -} - -async function main() { - await getAzureWebCategoryByName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/javascript/webCategoriesListBySubscriptionSample.js b/sdk/network/arm-network/samples/v36/javascript/webCategoriesListBySubscriptionSample.js deleted file mode 100644 index cc8cdcf0e37c..000000000000 --- a/sdk/network/arm-network/samples/v36/javascript/webCategoriesListBySubscriptionSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkManagementClient } = require("@azure/arm-network"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all the Azure Web Categories in a subscription. - * - * @summary Gets all the Azure Web Categories in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureWebCategoriesListBySubscription.json - */ -async function listAllAzureWebCategoriesForAGivenSubscription() { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || "4de8428a-4a92-4cea-90ff-b47128b8cab8"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webCategories.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listAllAzureWebCategoriesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/README.md b/sdk/network/arm-network/samples/v36/typescript/README.md deleted file mode 100644 index 6cc6b1657e98..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/README.md +++ /dev/null @@ -1,1555 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [adminRuleCollectionsCreateOrUpdateSample.ts][adminrulecollectionscreateorupdatesample] | Creates or updates an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionPut.json | -| [adminRuleCollectionsDeleteSample.ts][adminrulecollectionsdeletesample] | Deletes an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json | -| [adminRuleCollectionsGetSample.ts][adminrulecollectionsgetsample] | Gets a network manager security admin configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionGet.json | -| [adminRuleCollectionsListSample.ts][adminrulecollectionslistsample] | Lists all the rule collections in a security admin configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionList.json | -| [adminRulesCreateOrUpdateSample.ts][adminrulescreateorupdatesample] | Creates or updates an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json | -| [adminRulesDeleteSample.ts][adminrulesdeletesample] | Deletes an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleDelete.json | -| [adminRulesGetSample.ts][adminrulesgetsample] | Gets a network manager security configuration admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleGet.json | -| [adminRulesListSample.ts][adminruleslistsample] | List all network manager security configuration admin rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleList.json | -| [applicationGatewayPrivateEndpointConnectionsDeleteSample.ts][applicationgatewayprivateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json | -| [applicationGatewayPrivateEndpointConnectionsGetSample.ts][applicationgatewayprivateendpointconnectionsgetsample] | Gets the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json | -| [applicationGatewayPrivateEndpointConnectionsListSample.ts][applicationgatewayprivateendpointconnectionslistsample] | Lists all private endpoint connections on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json | -| [applicationGatewayPrivateEndpointConnectionsUpdateSample.ts][applicationgatewayprivateendpointconnectionsupdatesample] | Updates the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json | -| [applicationGatewayPrivateLinkResourcesListSample.ts][applicationgatewayprivatelinkresourceslistsample] | Lists all private link resources on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json | -| [applicationGatewayWafDynamicManifestsDefaultGetSample.ts][applicationgatewaywafdynamicmanifestsdefaultgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json | -| [applicationGatewayWafDynamicManifestsGetSample.ts][applicationgatewaywafdynamicmanifestsgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetApplicationGatewayWafDynamicManifests.json | -| [applicationGatewaysBackendHealthOnDemandSample.ts][applicationgatewaysbackendhealthondemandsample] | Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayBackendHealthTest.json | -| [applicationGatewaysBackendHealthSample.ts][applicationgatewaysbackendhealthsample] | Gets the backend health of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayBackendHealthGet.json | -| [applicationGatewaysCreateOrUpdateSample.ts][applicationgatewayscreateorupdatesample] | Creates or updates the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayCreate.json | -| [applicationGatewaysDeleteSample.ts][applicationgatewaysdeletesample] | Deletes the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayDelete.json | -| [applicationGatewaysGetSample.ts][applicationgatewaysgetsample] | Gets the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayGet.json | -| [applicationGatewaysGetSslPredefinedPolicySample.ts][applicationgatewaysgetsslpredefinedpolicysample] | Gets Ssl predefined policy with the specified policy name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json | -| [applicationGatewaysListAllSample.ts][applicationgatewayslistallsample] | Gets all the application gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayListAll.json | -| [applicationGatewaysListAvailableRequestHeadersSample.ts][applicationgatewayslistavailablerequestheaderssample] | Lists all available request headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json | -| [applicationGatewaysListAvailableResponseHeadersSample.ts][applicationgatewayslistavailableresponseheaderssample] | Lists all available response headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json | -| [applicationGatewaysListAvailableServerVariablesSample.ts][applicationgatewayslistavailableservervariablessample] | Lists all available server variables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json | -| [applicationGatewaysListAvailableSslOptionsSample.ts][applicationgatewayslistavailablessloptionssample] | Lists available Ssl options for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json | -| [applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts][applicationgatewayslistavailablesslpredefinedpoliciessample] | Lists all SSL predefined policies for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json | -| [applicationGatewaysListAvailableWafRuleSetsSample.ts][applicationgatewayslistavailablewafrulesetssample] | Lists all available web application firewall rule sets. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json | -| [applicationGatewaysListSample.ts][applicationgatewayslistsample] | Lists all application gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayList.json | -| [applicationGatewaysStartSample.ts][applicationgatewaysstartsample] | Starts the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayStart.json | -| [applicationGatewaysStopSample.ts][applicationgatewaysstopsample] | Stops the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayStop.json | -| [applicationGatewaysUpdateTagsSample.ts][applicationgatewaysupdatetagssample] | Updates the specified application gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayUpdateTags.json | -| [applicationSecurityGroupsCreateOrUpdateSample.ts][applicationsecuritygroupscreateorupdatesample] | Creates or updates an application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupCreate.json | -| [applicationSecurityGroupsDeleteSample.ts][applicationsecuritygroupsdeletesample] | Deletes the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupDelete.json | -| [applicationSecurityGroupsGetSample.ts][applicationsecuritygroupsgetsample] | Gets information about the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupGet.json | -| [applicationSecurityGroupsListAllSample.ts][applicationsecuritygroupslistallsample] | Gets all application security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupListAll.json | -| [applicationSecurityGroupsListSample.ts][applicationsecuritygroupslistsample] | Gets all the application security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupList.json | -| [applicationSecurityGroupsUpdateTagsSample.ts][applicationsecuritygroupsupdatetagssample] | Updates an application security group's tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupUpdateTags.json | -| [availableDelegationsListSample.ts][availabledelegationslistsample] | Gets all of the available subnet delegations for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableDelegationsSubscriptionGet.json | -| [availableEndpointServicesListSample.ts][availableendpointserviceslistsample] | List what values of endpoint services are available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EndpointServicesList.json | -| [availablePrivateEndpointTypesListByResourceGroupSample.ts][availableprivateendpointtypeslistbyresourcegroupsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json | -| [availablePrivateEndpointTypesListSample.ts][availableprivateendpointtypeslistsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailablePrivateEndpointTypesGet.json | -| [availableResourceGroupDelegationsListSample.ts][availableresourcegroupdelegationslistsample] | Gets all of the available subnet delegations for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableDelegationsResourceGroupGet.json | -| [availableServiceAliasesListByResourceGroupSample.ts][availableservicealiaseslistbyresourcegroupsample] | Gets all available service aliases for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableServiceAliasesListByResourceGroup.json | -| [availableServiceAliasesListSample.ts][availableservicealiaseslistsample] | Gets all available service aliases for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableServiceAliasesList.json | -| [azureFirewallFqdnTagsListAllSample.ts][azurefirewallfqdntagslistallsample] | Gets all the Azure Firewall FQDN Tags in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json | -| [azureFirewallsCreateOrUpdateSample.ts][azurefirewallscreateorupdatesample] | Creates or updates the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPut.json | -| [azureFirewallsDeleteSample.ts][azurefirewallsdeletesample] | Deletes the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallDelete.json | -| [azureFirewallsGetSample.ts][azurefirewallsgetsample] | Gets the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGet.json | -| [azureFirewallsListAllSample.ts][azurefirewallslistallsample] | Gets all the Azure Firewalls in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListBySubscription.json | -| [azureFirewallsListLearnedPrefixesSample.ts][azurefirewallslistlearnedprefixessample] | Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListLearnedIPPrefixes.json | -| [azureFirewallsListSample.ts][azurefirewallslistsample] | Lists all Azure Firewalls in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListByResourceGroup.json | -| [azureFirewallsPacketCaptureOperationSample.ts][azurefirewallspacketcaptureoperationsample] | Runs a packet capture operation on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPacketCaptureOperation.json | -| [azureFirewallsPacketCaptureSample.ts][azurefirewallspacketcapturesample] | Runs a packet capture on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPacketCapture.json | -| [azureFirewallsUpdateTagsSample.ts][azurefirewallsupdatetagssample] | Updates tags of an Azure Firewall resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallUpdateTags.json | -| [bastionHostsCreateOrUpdateSample.ts][bastionhostscreateorupdatesample] | Creates or updates the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPut.json | -| [bastionHostsDeleteSample.ts][bastionhostsdeletesample] | Deletes the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDelete.json | -| [bastionHostsGetSample.ts][bastionhostsgetsample] | Gets the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostGet.json | -| [bastionHostsListByResourceGroupSample.ts][bastionhostslistbyresourcegroupsample] | Lists all Bastion Hosts in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostListByResourceGroup.json | -| [bastionHostsListSample.ts][bastionhostslistsample] | Lists all Bastion Hosts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostListBySubscription.json | -| [bastionHostsUpdateTagsSample.ts][bastionhostsupdatetagssample] | Updates Tags for BastionHost resource x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPatch.json | -| [bgpServiceCommunitiesListSample.ts][bgpservicecommunitieslistsample] | Gets all the available bgp service communities. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceCommunityList.json | -| [checkDnsNameAvailabilitySample.ts][checkdnsnameavailabilitysample] | Checks whether a domain name in the cloudapp.azure.com zone is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckDnsNameAvailability.json | -| [configurationPolicyGroupsCreateOrUpdateSample.ts][configurationpolicygroupscreateorupdatesample] | Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupPut.json | -| [configurationPolicyGroupsDeleteSample.ts][configurationpolicygroupsdeletesample] | Deletes a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupDelete.json | -| [configurationPolicyGroupsGetSample.ts][configurationpolicygroupsgetsample] | Retrieves the details of a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupGet.json | -| [configurationPolicyGroupsListByVpnServerConfigurationSample.ts][configurationpolicygroupslistbyvpnserverconfigurationsample] | Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json | -| [connectionMonitorsCreateOrUpdateSample.ts][connectionmonitorscreateorupdatesample] | Create or update a connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorCreate.json | -| [connectionMonitorsDeleteSample.ts][connectionmonitorsdeletesample] | Deletes the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorDelete.json | -| [connectionMonitorsGetSample.ts][connectionmonitorsgetsample] | Gets a connection monitor by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorGet.json | -| [connectionMonitorsListSample.ts][connectionmonitorslistsample] | Lists all connection monitors for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorList.json | -| [connectionMonitorsStopSample.ts][connectionmonitorsstopsample] | Stops the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorStop.json | -| [connectionMonitorsUpdateTagsSample.ts][connectionmonitorsupdatetagssample] | Update tags of the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json | -| [connectivityConfigurationsCreateOrUpdateSample.ts][connectivityconfigurationscreateorupdatesample] | Creates/Updates a new network manager connectivity configuration x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationPut.json | -| [connectivityConfigurationsDeleteSample.ts][connectivityconfigurationsdeletesample] | Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json | -| [connectivityConfigurationsGetSample.ts][connectivityconfigurationsgetsample] | Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationGet.json | -| [connectivityConfigurationsListSample.ts][connectivityconfigurationslistsample] | Lists all the network manager connectivity configuration in a specified network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationList.json | -| [customIPPrefixesCreateOrUpdateSample.ts][customipprefixescreateorupdatesample] | Creates or updates a custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixCreateCustomizedValues.json | -| [customIPPrefixesDeleteSample.ts][customipprefixesdeletesample] | Deletes the specified custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixDelete.json | -| [customIPPrefixesGetSample.ts][customipprefixesgetsample] | Gets the specified custom IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixGet.json | -| [customIPPrefixesListAllSample.ts][customipprefixeslistallsample] | Gets all the custom IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixListAll.json | -| [customIPPrefixesListSample.ts][customipprefixeslistsample] | Gets all custom IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixList.json | -| [customIPPrefixesUpdateTagsSample.ts][customipprefixesupdatetagssample] | Updates custom IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixUpdateTags.json | -| [ddosCustomPoliciesCreateOrUpdateSample.ts][ddoscustompoliciescreateorupdatesample] | Creates or updates a DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyCreate.json | -| [ddosCustomPoliciesDeleteSample.ts][ddoscustompoliciesdeletesample] | Deletes the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyDelete.json | -| [ddosCustomPoliciesGetSample.ts][ddoscustompoliciesgetsample] | Gets information about the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyGet.json | -| [ddosCustomPoliciesUpdateTagsSample.ts][ddoscustompoliciesupdatetagssample] | Update a DDoS custom policy tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyUpdateTags.json | -| [ddosProtectionPlansCreateOrUpdateSample.ts][ddosprotectionplanscreateorupdatesample] | Creates or updates a DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanCreate.json | -| [ddosProtectionPlansDeleteSample.ts][ddosprotectionplansdeletesample] | Deletes the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanDelete.json | -| [ddosProtectionPlansGetSample.ts][ddosprotectionplansgetsample] | Gets information about the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanGet.json | -| [ddosProtectionPlansListByResourceGroupSample.ts][ddosprotectionplanslistbyresourcegroupsample] | Gets all the DDoS protection plans in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanList.json | -| [ddosProtectionPlansListSample.ts][ddosprotectionplanslistsample] | Gets all DDoS protection plans in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanListAll.json | -| [ddosProtectionPlansUpdateTagsSample.ts][ddosprotectionplansupdatetagssample] | Update a DDoS protection plan tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanUpdateTags.json | -| [defaultSecurityRulesGetSample.ts][defaultsecurityrulesgetsample] | Get the specified default network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DefaultSecurityRuleGet.json | -| [defaultSecurityRulesListSample.ts][defaultsecurityruleslistsample] | Gets all default security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DefaultSecurityRuleList.json | -| [deleteBastionShareableLinkByTokenSample.ts][deletebastionshareablelinkbytokensample] | Deletes the Bastion Shareable Links for all the tokens specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkDeleteByToken.json | -| [deleteBastionShareableLinkSample.ts][deletebastionshareablelinksample] | Deletes the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkDelete.json | -| [disconnectActiveSessionsSample.ts][disconnectactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionSessionDelete.json | -| [dscpConfigurationCreateOrUpdateSample.ts][dscpconfigurationcreateorupdatesample] | Creates or updates a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationCreate.json | -| [dscpConfigurationDeleteSample.ts][dscpconfigurationdeletesample] | Deletes a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationDelete.json | -| [dscpConfigurationGetSample.ts][dscpconfigurationgetsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationGet.json | -| [dscpConfigurationListAllSample.ts][dscpconfigurationlistallsample] | Gets all dscp configurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationListAll.json | -| [dscpConfigurationListSample.ts][dscpconfigurationlistsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationList.json | -| [expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts][expressroutecircuitauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json | -| [expressRouteCircuitAuthorizationsDeleteSample.ts][expressroutecircuitauthorizationsdeletesample] | Deletes the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json | -| [expressRouteCircuitAuthorizationsGetSample.ts][expressroutecircuitauthorizationsgetsample] | Gets the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationGet.json | -| [expressRouteCircuitAuthorizationsListSample.ts][expressroutecircuitauthorizationslistsample] | Gets all authorizations in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationList.json | -| [expressRouteCircuitConnectionsCreateOrUpdateSample.ts][expressroutecircuitconnectionscreateorupdatesample] | Creates or updates a Express Route Circuit Connection in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionCreate.json | -| [expressRouteCircuitConnectionsDeleteSample.ts][expressroutecircuitconnectionsdeletesample] | Deletes the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionDelete.json | -| [expressRouteCircuitConnectionsGetSample.ts][expressroutecircuitconnectionsgetsample] | Gets the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionGet.json | -| [expressRouteCircuitConnectionsListSample.ts][expressroutecircuitconnectionslistsample] | Gets all global reach connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionList.json | -| [expressRouteCircuitPeeringsCreateOrUpdateSample.ts][expressroutecircuitpeeringscreateorupdatesample] | Creates or updates a peering in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringCreate.json | -| [expressRouteCircuitPeeringsDeleteSample.ts][expressroutecircuitpeeringsdeletesample] | Deletes the specified peering from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringDelete.json | -| [expressRouteCircuitPeeringsGetSample.ts][expressroutecircuitpeeringsgetsample] | Gets the specified peering for the express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringGet.json | -| [expressRouteCircuitPeeringsListSample.ts][expressroutecircuitpeeringslistsample] | Gets all peerings in a specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringList.json | -| [expressRouteCircuitsCreateOrUpdateSample.ts][expressroutecircuitscreateorupdatesample] | Creates or updates an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitCreate.json | -| [expressRouteCircuitsDeleteSample.ts][expressroutecircuitsdeletesample] | Deletes the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitDelete.json | -| [expressRouteCircuitsGetPeeringStatsSample.ts][expressroutecircuitsgetpeeringstatssample] | Gets all stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringStats.json | -| [expressRouteCircuitsGetSample.ts][expressroutecircuitsgetsample] | Gets information about the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitGet.json | -| [expressRouteCircuitsGetStatsSample.ts][expressroutecircuitsgetstatssample] | Gets all the stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitStats.json | -| [expressRouteCircuitsListAllSample.ts][expressroutecircuitslistallsample] | Gets all the express route circuits in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitListBySubscription.json | -| [expressRouteCircuitsListArpTableSample.ts][expressroutecircuitslistarptablesample] | Gets the currently advertised ARP table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitARPTableList.json | -| [expressRouteCircuitsListRoutesTableSample.ts][expressroutecircuitslistroutestablesample] | Gets the currently advertised routes table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitRouteTableList.json | -| [expressRouteCircuitsListRoutesTableSummarySample.ts][expressroutecircuitslistroutestablesummarysample] | Gets the currently advertised routes table summary associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json | -| [expressRouteCircuitsListSample.ts][expressroutecircuitslistsample] | Gets all the express route circuits in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitListByResourceGroup.json | -| [expressRouteCircuitsUpdateTagsSample.ts][expressroutecircuitsupdatetagssample] | Updates an express route circuit tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitUpdateTags.json | -| [expressRouteConnectionsCreateOrUpdateSample.ts][expressrouteconnectionscreateorupdatesample] | Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionCreate.json | -| [expressRouteConnectionsDeleteSample.ts][expressrouteconnectionsdeletesample] | Deletes a connection to a ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionDelete.json | -| [expressRouteConnectionsGetSample.ts][expressrouteconnectionsgetsample] | Gets the specified ExpressRouteConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionGet.json | -| [expressRouteConnectionsListSample.ts][expressrouteconnectionslistsample] | Lists ExpressRouteConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionList.json | -| [expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts][expressroutecrossconnectionpeeringscreateorupdatesample] | Creates or updates a peering in the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json | -| [expressRouteCrossConnectionPeeringsDeleteSample.ts][expressroutecrossconnectionpeeringsdeletesample] | Deletes the specified peering from the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json | -| [expressRouteCrossConnectionPeeringsGetSample.ts][expressroutecrossconnectionpeeringsgetsample] | Gets the specified peering for the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json | -| [expressRouteCrossConnectionPeeringsListSample.ts][expressroutecrossconnectionpeeringslistsample] | Gets all peerings in a specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json | -| [expressRouteCrossConnectionsCreateOrUpdateSample.ts][expressroutecrossconnectionscreateorupdatesample] | Update the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionUpdate.json | -| [expressRouteCrossConnectionsGetSample.ts][expressroutecrossconnectionsgetsample] | Gets details about the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionGet.json | -| [expressRouteCrossConnectionsListArpTableSample.ts][expressroutecrossconnectionslistarptablesample] | Gets the currently advertised ARP table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsArpTable.json | -| [expressRouteCrossConnectionsListByResourceGroupSample.ts][expressroutecrossconnectionslistbyresourcegroupsample] | Retrieves all the ExpressRouteCrossConnections in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json | -| [expressRouteCrossConnectionsListRoutesTableSample.ts][expressroutecrossconnectionslistroutestablesample] | Gets the currently advertised routes table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json | -| [expressRouteCrossConnectionsListRoutesTableSummarySample.ts][expressroutecrossconnectionslistroutestablesummarysample] | Gets the route table summary associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json | -| [expressRouteCrossConnectionsListSample.ts][expressroutecrossconnectionslistsample] | Retrieves all the ExpressRouteCrossConnections in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionList.json | -| [expressRouteCrossConnectionsUpdateTagsSample.ts][expressroutecrossconnectionsupdatetagssample] | Updates an express route cross connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json | -| [expressRouteGatewaysCreateOrUpdateSample.ts][expressroutegatewayscreateorupdatesample] | Creates or updates a ExpressRoute gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayCreate.json | -| [expressRouteGatewaysDeleteSample.ts][expressroutegatewaysdeletesample] | Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayDelete.json | -| [expressRouteGatewaysGetSample.ts][expressroutegatewaysgetsample] | Fetches the details of a ExpressRoute gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayGet.json | -| [expressRouteGatewaysListByResourceGroupSample.ts][expressroutegatewayslistbyresourcegroupsample] | Lists ExpressRoute gateways in a given resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayListByResourceGroup.json | -| [expressRouteGatewaysListBySubscriptionSample.ts][expressroutegatewayslistbysubscriptionsample] | Lists ExpressRoute gateways under a given subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayListBySubscription.json | -| [expressRouteGatewaysUpdateTagsSample.ts][expressroutegatewaysupdatetagssample] | Updates express route gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayUpdateTags.json | -| [expressRouteLinksGetSample.ts][expressroutelinksgetsample] | Retrieves the specified ExpressRouteLink resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteLinkGet.json | -| [expressRouteLinksListSample.ts][expressroutelinkslistsample] | Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteLinkList.json | -| [expressRoutePortAuthorizationsCreateOrUpdateSample.ts][expressrouteportauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationCreate.json | -| [expressRoutePortAuthorizationsDeleteSample.ts][expressrouteportauthorizationsdeletesample] | Deletes the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationDelete.json | -| [expressRoutePortAuthorizationsGetSample.ts][expressrouteportauthorizationsgetsample] | Gets the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationGet.json | -| [expressRoutePortAuthorizationsListSample.ts][expressrouteportauthorizationslistsample] | Gets all authorizations in an express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationList.json | -| [expressRoutePortsCreateOrUpdateSample.ts][expressrouteportscreateorupdatesample] | Creates or updates the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortCreate.json | -| [expressRoutePortsDeleteSample.ts][expressrouteportsdeletesample] | Deletes the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortDelete.json | -| [expressRoutePortsGenerateLoaSample.ts][expressrouteportsgenerateloasample] | Generate a letter of authorization for the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GenerateExpressRoutePortsLOA.json | -| [expressRoutePortsGetSample.ts][expressrouteportsgetsample] | Retrieves the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortGet.json | -| [expressRoutePortsListByResourceGroupSample.ts][expressrouteportslistbyresourcegroupsample] | List all the ExpressRoutePort resources in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortListByResourceGroup.json | -| [expressRoutePortsListSample.ts][expressrouteportslistsample] | List all the ExpressRoutePort resources in the specified subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortList.json | -| [expressRoutePortsLocationsGetSample.ts][expressrouteportslocationsgetsample] | Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortsLocationGet.json | -| [expressRoutePortsLocationsListSample.ts][expressrouteportslocationslistsample] | Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortsLocationList.json | -| [expressRoutePortsUpdateTagsSample.ts][expressrouteportsupdatetagssample] | Update ExpressRoutePort tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortUpdateTags.json | -| [expressRouteProviderPortSample.ts][expressrouteproviderportsample] | Retrieves detail of a provider port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/expressRouteProviderPort.json | -| [expressRouteProviderPortsLocationListSample.ts][expressrouteproviderportslocationlistsample] | Retrieves all the ExpressRouteProviderPorts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/expressRouteProviderPortList.json | -| [expressRouteServiceProvidersListSample.ts][expressrouteserviceproviderslistsample] | Gets all the available express route service providers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteProviderList.json | -| [firewallPoliciesCreateOrUpdateSample.ts][firewallpoliciescreateorupdatesample] | Creates or updates the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyPut.json | -| [firewallPoliciesDeleteSample.ts][firewallpoliciesdeletesample] | Deletes the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDelete.json | -| [firewallPoliciesGetSample.ts][firewallpoliciesgetsample] | Gets the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyGet.json | -| [firewallPoliciesListAllSample.ts][firewallpolicieslistallsample] | Gets all the Firewall Policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyListBySubscription.json | -| [firewallPoliciesListSample.ts][firewallpolicieslistsample] | Lists all Firewall Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyListByResourceGroup.json | -| [firewallPoliciesUpdateTagsSample.ts][firewallpoliciesupdatetagssample] | Updates tags of a Azure Firewall Policy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyPatch.json | -| [firewallPolicyDeploymentsDeploySample.ts][firewallpolicydeploymentsdeploysample] | Deploys the firewall policy draft and child rule collection group drafts. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftDeploy.json | -| [firewallPolicyDraftsCreateOrUpdateSample.ts][firewallpolicydraftscreateorupdatesample] | Create or update a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftPut.json | -| [firewallPolicyDraftsDeleteSample.ts][firewallpolicydraftsdeletesample] | Delete a draft policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftDelete.json | -| [firewallPolicyDraftsGetSample.ts][firewallpolicydraftsgetsample] | Get a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftGet.json | -| [firewallPolicyIdpsSignaturesFilterValuesListSample.ts][firewallpolicyidpssignaturesfiltervalueslistsample] | Retrieves the current filter values for the signatures overrides x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json | -| [firewallPolicyIdpsSignaturesListSample.ts][firewallpolicyidpssignatureslistsample] | Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyQuerySignatureOverrides.json | -| [firewallPolicyIdpsSignaturesOverridesGetSample.ts][firewallpolicyidpssignaturesoverridesgetsample] | Returns all signatures overrides for a specific policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesGet.json | -| [firewallPolicyIdpsSignaturesOverridesListSample.ts][firewallpolicyidpssignaturesoverrideslistsample] | Returns all signatures overrides objects for a specific policy as a list containing a single value. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesList.json | -| [firewallPolicyIdpsSignaturesOverridesPatchSample.ts][firewallpolicyidpssignaturesoverridespatchsample] | Will update the status of policy's signature overrides for IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesPatch.json | -| [firewallPolicyIdpsSignaturesOverridesPutSample.ts][firewallpolicyidpssignaturesoverridesputsample] | Will override/create a new signature overrides for the policy's IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesPut.json | -| [firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts][firewallpolicyrulecollectiongroupdraftscreateorupdatesample] | Create or Update Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json | -| [firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts][firewallpolicyrulecollectiongroupdraftsdeletesample] | Delete Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json | -| [firewallPolicyRuleCollectionGroupDraftsGetSample.ts][firewallpolicyrulecollectiongroupdraftsgetsample] | Get Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json | -| [firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts][firewallpolicyrulecollectiongroupscreateorupdatesample] | Creates or updates the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json | -| [firewallPolicyRuleCollectionGroupsDeleteSample.ts][firewallpolicyrulecollectiongroupsdeletesample] | Deletes the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json | -| [firewallPolicyRuleCollectionGroupsGetSample.ts][firewallpolicyrulecollectiongroupsgetsample] | Gets the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json | -| [firewallPolicyRuleCollectionGroupsListSample.ts][firewallpolicyrulecollectiongroupslistsample] | Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json | -| [flowLogsCreateOrUpdateSample.ts][flowlogscreateorupdatesample] | Create or update a flow log for the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogCreate.json | -| [flowLogsDeleteSample.ts][flowlogsdeletesample] | Deletes the specified flow log resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogDelete.json | -| [flowLogsGetSample.ts][flowlogsgetsample] | Gets a flow log resource by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogGet.json | -| [flowLogsListSample.ts][flowlogslistsample] | Lists all flow log resources for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogList.json | -| [flowLogsUpdateTagsSample.ts][flowlogsupdatetagssample] | Update tags of the specified flow log. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogUpdateTags.json | -| [generatevirtualwanvpnserverconfigurationvpnprofileSample.ts][generatevirtualwanvpnserverconfigurationvpnprofilesample] | Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json | -| [getActiveSessionsSample.ts][getactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionSessionsList.json | -| [getBastionShareableLinkSample.ts][getbastionshareablelinksample] | Return the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkGet.json | -| [hubRouteTablesCreateOrUpdateSample.ts][hubroutetablescreateorupdatesample] | Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTablePut.json | -| [hubRouteTablesDeleteSample.ts][hubroutetablesdeletesample] | Deletes a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableDelete.json | -| [hubRouteTablesGetSample.ts][hubroutetablesgetsample] | Retrieves the details of a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableGet.json | -| [hubRouteTablesListSample.ts][hubroutetableslistsample] | Retrieves the details of all RouteTables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableList.json | -| [hubVirtualNetworkConnectionsCreateOrUpdateSample.ts][hubvirtualnetworkconnectionscreateorupdatesample] | Creates a hub virtual network connection if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionPut.json | -| [hubVirtualNetworkConnectionsDeleteSample.ts][hubvirtualnetworkconnectionsdeletesample] | Deletes a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionDelete.json | -| [hubVirtualNetworkConnectionsGetSample.ts][hubvirtualnetworkconnectionsgetsample] | Retrieves the details of a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionGet.json | -| [hubVirtualNetworkConnectionsListSample.ts][hubvirtualnetworkconnectionslistsample] | Retrieves the details of all HubVirtualNetworkConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionList.json | -| [inboundNatRulesCreateOrUpdateSample.ts][inboundnatrulescreateorupdatesample] | Creates or updates a load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleCreate.json | -| [inboundNatRulesDeleteSample.ts][inboundnatrulesdeletesample] | Deletes the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleDelete.json | -| [inboundNatRulesGetSample.ts][inboundnatrulesgetsample] | Gets the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleGet.json | -| [inboundNatRulesListSample.ts][inboundnatruleslistsample] | Gets all the inbound NAT rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleList.json | -| [inboundSecurityRuleCreateOrUpdateSample.ts][inboundsecurityrulecreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Inbound Security Rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundSecurityRulePut.json | -| [inboundSecurityRuleGetSample.ts][inboundsecurityrulegetsample] | Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundSecurityRuleGet.json | -| [ipAllocationsCreateOrUpdateSample.ts][ipallocationscreateorupdatesample] | Creates or updates an IpAllocation in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationCreate.json | -| [ipAllocationsDeleteSample.ts][ipallocationsdeletesample] | Deletes the specified IpAllocation. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationDelete.json | -| [ipAllocationsGetSample.ts][ipallocationsgetsample] | Gets the specified IpAllocation by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationGet.json | -| [ipAllocationsListByResourceGroupSample.ts][ipallocationslistbyresourcegroupsample] | Gets all IpAllocations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationListByResourceGroup.json | -| [ipAllocationsListSample.ts][ipallocationslistsample] | Gets all IpAllocations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationList.json | -| [ipAllocationsUpdateTagsSample.ts][ipallocationsupdatetagssample] | Updates a IpAllocation tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationUpdateTags.json | -| [ipGroupsCreateOrUpdateSample.ts][ipgroupscreateorupdatesample] | Creates or updates an ipGroups in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsCreate.json | -| [ipGroupsDeleteSample.ts][ipgroupsdeletesample] | Deletes the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsDelete.json | -| [ipGroupsGetSample.ts][ipgroupsgetsample] | Gets the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsGet.json | -| [ipGroupsListByResourceGroupSample.ts][ipgroupslistbyresourcegroupsample] | Gets all IpGroups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsListByResourceGroup.json | -| [ipGroupsListSample.ts][ipgroupslistsample] | Gets all IpGroups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsListBySubscription.json | -| [ipGroupsUpdateGroupsSample.ts][ipgroupsupdategroupssample] | Updates tags of an IpGroups resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsUpdateTags.json | -| [ipamPoolsCreateSample.ts][ipampoolscreatesample] | Creates/Updates the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Create.json | -| [ipamPoolsDeleteSample.ts][ipampoolsdeletesample] | Delete the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Delete.json | -| [ipamPoolsGetPoolUsageSample.ts][ipampoolsgetpoolusagesample] | Get the Pool Usage. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_GetPoolUsage.json | -| [ipamPoolsGetSample.ts][ipampoolsgetsample] | Gets the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Get.json | -| [ipamPoolsListAssociatedResourcesSample.ts][ipampoolslistassociatedresourcessample] | List Associated Resource in the Pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_ListAssociatedResources.json | -| [ipamPoolsListSample.ts][ipampoolslistsample] | Gets list of Pool resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_List.json | -| [ipamPoolsUpdateSample.ts][ipampoolsupdatesample] | Updates the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Update.json | -| [listActiveConnectivityConfigurationsSample.ts][listactiveconnectivityconfigurationssample] | Lists active connectivity configurations in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json | -| [listActiveSecurityAdminRulesSample.ts][listactivesecurityadminrulessample] | Lists active security admin rules in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json | -| [listNetworkManagerEffectiveConnectivityConfigurationsSample.ts][listnetworkmanagereffectiveconnectivityconfigurationssample] | List all effective connectivity configurations applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json | -| [listNetworkManagerEffectiveSecurityAdminRulesSample.ts][listnetworkmanagereffectivesecurityadminrulessample] | List all effective security admin rules applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json | -| [loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts][loadbalancerbackendaddresspoolscreateorupdatesample] | Creates or updates a load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json | -| [loadBalancerBackendAddressPoolsDeleteSample.ts][loadbalancerbackendaddresspoolsdeletesample] | Deletes the specified load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerBackendAddressPoolDelete.json | -| [loadBalancerBackendAddressPoolsGetSample.ts][loadbalancerbackendaddresspoolsgetsample] | Gets load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json | -| [loadBalancerBackendAddressPoolsListSample.ts][loadbalancerbackendaddresspoolslistsample] | Gets all the load balancer backed address pools. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json | -| [loadBalancerFrontendIPConfigurationsGetSample.ts][loadbalancerfrontendipconfigurationsgetsample] | Gets load balancer frontend IP configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json | -| [loadBalancerFrontendIPConfigurationsListSample.ts][loadbalancerfrontendipconfigurationslistsample] | Gets all the load balancer frontend IP configurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerFrontendIPConfigurationList.json | -| [loadBalancerLoadBalancingRulesGetSample.ts][loadbalancerloadbalancingrulesgetsample] | Gets the specified load balancer load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerLoadBalancingRuleGet.json | -| [loadBalancerLoadBalancingRulesHealthSample.ts][loadbalancerloadbalancingruleshealthsample] | Get health details of a load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerHealth.json | -| [loadBalancerLoadBalancingRulesListSample.ts][loadbalancerloadbalancingruleslistsample] | Gets all the load balancing rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerLoadBalancingRuleList.json | -| [loadBalancerNetworkInterfacesListSample.ts][loadbalancernetworkinterfaceslistsample] | Gets associated load balancer network interfaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json | -| [loadBalancerOutboundRulesGetSample.ts][loadbalanceroutboundrulesgetsample] | Gets the specified load balancer outbound rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerOutboundRuleGet.json | -| [loadBalancerOutboundRulesListSample.ts][loadbalanceroutboundruleslistsample] | Gets all the outbound rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerOutboundRuleList.json | -| [loadBalancerProbesGetSample.ts][loadbalancerprobesgetsample] | Gets load balancer probe. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerProbeGet.json | -| [loadBalancerProbesListSample.ts][loadbalancerprobeslistsample] | Gets all the load balancer probes. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerProbeList.json | -| [loadBalancersCreateOrUpdateSample.ts][loadbalancerscreateorupdatesample] | Creates or updates a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreate.json | -| [loadBalancersDeleteSample.ts][loadbalancersdeletesample] | Deletes the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerDelete.json | -| [loadBalancersGetSample.ts][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerGet.json | -| [loadBalancersListAllSample.ts][loadbalancerslistallsample] | Gets all the load balancers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerListAll.json | -| [loadBalancersListInboundNatRulePortMappingsSample.ts][loadbalancerslistinboundnatruleportmappingssample] | List of inbound NAT rule port mappings. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/QueryInboundNatRulePortMapping.json | -| [loadBalancersListSample.ts][loadbalancerslistsample] | Gets all the load balancers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerList.json | -| [loadBalancersMigrateToIPBasedSample.ts][loadbalancersmigratetoipbasedsample] | Migrate load balancer to IP Based x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/MigrateLoadBalancerToIPBased.json | -| [loadBalancersSwapPublicIPAddressesSample.ts][loadbalancersswappublicipaddressessample] | Swaps VIPs between two load balancers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancersSwapPublicIpAddresses.json | -| [loadBalancersUpdateTagsSample.ts][loadbalancersupdatetagssample] | Updates a load balancer tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerUpdateTags.json | -| [localNetworkGatewaysCreateOrUpdateSample.ts][localnetworkgatewayscreateorupdatesample] | Creates or updates a local network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayCreate.json | -| [localNetworkGatewaysDeleteSample.ts][localnetworkgatewaysdeletesample] | Deletes the specified local network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayDelete.json | -| [localNetworkGatewaysGetSample.ts][localnetworkgatewaysgetsample] | Gets the specified local network gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayGet.json | -| [localNetworkGatewaysListSample.ts][localnetworkgatewayslistsample] | Gets all the local network gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayList.json | -| [localNetworkGatewaysUpdateTagsSample.ts][localnetworkgatewaysupdatetagssample] | Updates a local network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayUpdateTags.json | -| [managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts][managementgroupnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupPut.json | -| [managementGroupNetworkManagerConnectionsDeleteSample.ts][managementgroupnetworkmanagerconnectionsdeletesample] | Delete specified pending connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json | -| [managementGroupNetworkManagerConnectionsGetSample.ts][managementgroupnetworkmanagerconnectionsgetsample] | Get a specified connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupGet.json | -| [managementGroupNetworkManagerConnectionsListSample.ts][managementgroupnetworkmanagerconnectionslistsample] | List all network manager connections created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupList.json | -| [natGatewaysCreateOrUpdateSample.ts][natgatewayscreateorupdatesample] | Creates or updates a nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayCreateOrUpdate.json | -| [natGatewaysDeleteSample.ts][natgatewaysdeletesample] | Deletes the specified nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayDelete.json | -| [natGatewaysGetSample.ts][natgatewaysgetsample] | Gets the specified nat gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayGet.json | -| [natGatewaysListAllSample.ts][natgatewayslistallsample] | Gets all the Nat Gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayListAll.json | -| [natGatewaysListSample.ts][natgatewayslistsample] | Gets all nat gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayList.json | -| [natGatewaysUpdateTagsSample.ts][natgatewaysupdatetagssample] | Updates nat gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayUpdateTags.json | -| [natRulesCreateOrUpdateSample.ts][natrulescreateorupdatesample] | Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRulePut.json | -| [natRulesDeleteSample.ts][natrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleDelete.json | -| [natRulesGetSample.ts][natrulesgetsample] | Retrieves the details of a nat ruleGet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleGet.json | -| [natRulesListByVpnGatewaySample.ts][natruleslistbyvpngatewaysample] | Retrieves all nat rules for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleList.json | -| [networkGroupsCreateOrUpdateSample.ts][networkgroupscreateorupdatesample] | Creates or updates a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupPut.json | -| [networkGroupsDeleteSample.ts][networkgroupsdeletesample] | Deletes a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupDelete.json | -| [networkGroupsGetSample.ts][networkgroupsgetsample] | Gets the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupGet.json | -| [networkGroupsListSample.ts][networkgroupslistsample] | Lists the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupList.json | -| [networkInterfaceIPConfigurationsGetSample.ts][networkinterfaceipconfigurationsgetsample] | Gets the specified network interface ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceIPConfigurationGet.json | -| [networkInterfaceIPConfigurationsListSample.ts][networkinterfaceipconfigurationslistsample] | Get all ip configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceIPConfigurationList.json | -| [networkInterfaceLoadBalancersListSample.ts][networkinterfaceloadbalancerslistsample] | List all load balancers in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceLoadBalancerList.json | -| [networkInterfaceTapConfigurationsCreateOrUpdateSample.ts][networkinterfacetapconfigurationscreateorupdatesample] | Creates or updates a Tap configuration in the specified NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationCreate.json | -| [networkInterfaceTapConfigurationsDeleteSample.ts][networkinterfacetapconfigurationsdeletesample] | Deletes the specified tap configuration from the NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationDelete.json | -| [networkInterfaceTapConfigurationsGetSample.ts][networkinterfacetapconfigurationsgetsample] | Get the specified tap configuration on a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationGet.json | -| [networkInterfaceTapConfigurationsListSample.ts][networkinterfacetapconfigurationslistsample] | Get all Tap configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationList.json | -| [networkInterfacesCreateOrUpdateSample.ts][networkinterfacescreateorupdatesample] | Creates or updates a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceCreate.json | -| [networkInterfacesDeleteSample.ts][networkinterfacesdeletesample] | Deletes the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceDelete.json | -| [networkInterfacesGetCloudServiceNetworkInterfaceSample.ts][networkinterfacesgetcloudservicenetworkinterfacesample] | Get the specified network interface in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceNetworkInterfaceGet.json | -| [networkInterfacesGetEffectiveRouteTableSample.ts][networkinterfacesgeteffectiveroutetablesample] | Gets all route tables applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json | -| [networkInterfacesGetSample.ts][networkinterfacesgetsample] | Gets information about the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceGet.json | -| [networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts][networkinterfacesgetvirtualmachinescalesetipconfigurationsample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceIpConfigGet.json | -| [networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts][networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample] | Get the specified network interface in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceGet.json | -| [networkInterfacesListAllSample.ts][networkinterfaceslistallsample] | Gets all network interfaces in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceListAll.json | -| [networkInterfacesListCloudServiceNetworkInterfacesSample.ts][networkinterfaceslistcloudservicenetworkinterfacessample] | Gets all network interfaces in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceNetworkInterfaceList.json | -| [networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts][networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample] | Gets information about all network interfaces in a role instance in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json | -| [networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts][networkinterfaceslisteffectivenetworksecuritygroupssample] | Gets all network security groups applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceEffectiveNSGList.json | -| [networkInterfacesListSample.ts][networkinterfaceslistsample] | Gets all network interfaces in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts][networkinterfaceslistvirtualmachinescalesetipconfigurationssample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceIpConfigList.json | -| [networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts][networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample] | Gets all network interfaces in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts][networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample] | Gets information about all network interfaces in a virtual machine in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssVmNetworkInterfaceList.json | -| [networkInterfacesUpdateTagsSample.ts][networkinterfacesupdatetagssample] | Updates a network interface tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceUpdateTags.json | -| [networkManagerCommitsPostSample.ts][networkmanagercommitspostsample] | Post a Network Manager Commit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerCommitPost.json | -| [networkManagerDeploymentStatusListSample.ts][networkmanagerdeploymentstatuslistsample] | Post to List of Network Manager Deployment Status. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDeploymentStatusList.json | -| [networkManagerRoutingConfigurationsCreateOrUpdateSample.ts][networkmanagerroutingconfigurationscreateorupdatesample] | Creates or updates a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationPut.json | -| [networkManagerRoutingConfigurationsDeleteSample.ts][networkmanagerroutingconfigurationsdeletesample] | Deletes a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationDelete.json | -| [networkManagerRoutingConfigurationsGetSample.ts][networkmanagerroutingconfigurationsgetsample] | Retrieves a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationGet.json | -| [networkManagerRoutingConfigurationsListSample.ts][networkmanagerroutingconfigurationslistsample] | Lists all the network manager routing configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationList.json | -| [networkManagersCreateOrUpdateSample.ts][networkmanagerscreateorupdatesample] | Creates or updates a Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerPut.json | -| [networkManagersDeleteSample.ts][networkmanagersdeletesample] | Deletes a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDelete.json | -| [networkManagersGetSample.ts][networkmanagersgetsample] | Gets the specified Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGet.json | -| [networkManagersListBySubscriptionSample.ts][networkmanagerslistbysubscriptionsample] | List all network managers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerListAll.json | -| [networkManagersListSample.ts][networkmanagerslistsample] | List network managers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerList.json | -| [networkManagersPatchSample.ts][networkmanagerspatchsample] | Patch NetworkManager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerPatch.json | -| [networkProfilesCreateOrUpdateSample.ts][networkprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileCreateConfigOnly.json | -| [networkProfilesDeleteSample.ts][networkprofilesdeletesample] | Deletes the specified network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileDelete.json | -| [networkProfilesGetSample.ts][networkprofilesgetsample] | Gets the specified network profile in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileGetConfigOnly.json | -| [networkProfilesListAllSample.ts][networkprofileslistallsample] | Gets all the network profiles in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileListAll.json | -| [networkProfilesListSample.ts][networkprofileslistsample] | Gets all network profiles in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileList.json | -| [networkProfilesUpdateTagsSample.ts][networkprofilesupdatetagssample] | Updates network profile tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileUpdateTags.json | -| [networkSecurityGroupsCreateOrUpdateSample.ts][networksecuritygroupscreateorupdatesample] | Creates or updates a network security group in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupCreate.json | -| [networkSecurityGroupsDeleteSample.ts][networksecuritygroupsdeletesample] | Deletes the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupDelete.json | -| [networkSecurityGroupsGetSample.ts][networksecuritygroupsgetsample] | Gets the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupGet.json | -| [networkSecurityGroupsListAllSample.ts][networksecuritygroupslistallsample] | Gets all network security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupListAll.json | -| [networkSecurityGroupsListSample.ts][networksecuritygroupslistsample] | Gets all network security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupList.json | -| [networkSecurityGroupsUpdateTagsSample.ts][networksecuritygroupsupdatetagssample] | Updates a network security group tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupUpdateTags.json | -| [networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts][networksecurityperimeteraccessrulescreateorupdatesample] | Creates or updates a network access rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRulePut.json | -| [networkSecurityPerimeterAccessRulesDeleteSample.ts][networksecurityperimeteraccessrulesdeletesample] | Deletes an NSP access rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleDelete.json | -| [networkSecurityPerimeterAccessRulesGetSample.ts][networksecurityperimeteraccessrulesgetsample] | Gets the specified NSP access rule by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleGet.json | -| [networkSecurityPerimeterAccessRulesListSample.ts][networksecurityperimeteraccessruleslistsample] | Lists the NSP access rules in the specified NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleList.json | -| [networkSecurityPerimeterAccessRulesReconcileSample.ts][networksecurityperimeteraccessrulesreconcilesample] | Reconcile NSP access rules x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleReconcile.json | -| [networkSecurityPerimeterAssociableResourceTypesListSample.ts][networksecurityperimeterassociableresourcetypeslistsample] | Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PerimeterAssociableResourcesList.json | -| [networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts][networksecurityperimeterassociationscreateorupdatesample] | Creates or updates a NSP resource association. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationPut.json | -| [networkSecurityPerimeterAssociationsDeleteSample.ts][networksecurityperimeterassociationsdeletesample] | Deletes an NSP association resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationDelete.json | -| [networkSecurityPerimeterAssociationsGetSample.ts][networksecurityperimeterassociationsgetsample] | Gets the specified NSP association by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationGet.json | -| [networkSecurityPerimeterAssociationsListSample.ts][networksecurityperimeterassociationslistsample] | Lists the NSP resource associations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationList.json | -| [networkSecurityPerimeterAssociationsReconcileSample.ts][networksecurityperimeterassociationsreconcilesample] | Reconcile NSP association x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationReconcile.json | -| [networkSecurityPerimeterLinkReferencesDeleteSample.ts][networksecurityperimeterlinkreferencesdeletesample] | Deletes an NSP LinkReference resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceDelete.json | -| [networkSecurityPerimeterLinkReferencesGetSample.ts][networksecurityperimeterlinkreferencesgetsample] | Gets the specified NSP linkReference resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceGet.json | -| [networkSecurityPerimeterLinkReferencesListSample.ts][networksecurityperimeterlinkreferenceslistsample] | Lists the NSP LinkReference resources in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceList.json | -| [networkSecurityPerimeterLinksCreateOrUpdateSample.ts][networksecurityperimeterlinkscreateorupdatesample] | Creates or updates NSP link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkPut.json | -| [networkSecurityPerimeterLinksDeleteSample.ts][networksecurityperimeterlinksdeletesample] | Deletes an NSP Link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkDelete.json | -| [networkSecurityPerimeterLinksGetSample.ts][networksecurityperimeterlinksgetsample] | Gets the specified NSP link resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkGet.json | -| [networkSecurityPerimeterLinksListSample.ts][networksecurityperimeterlinkslistsample] | Lists the NSP Link resources in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkList.json | -| [networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts][networksecurityperimeterloggingconfigurationscreateorupdatesample] | Creates or updates NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationPut.json | -| [networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts][networksecurityperimeterloggingconfigurationsdeletesample] | Deletes an NSP Logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationDelete.json | -| [networkSecurityPerimeterLoggingConfigurationsGetSample.ts][networksecurityperimeterloggingconfigurationsgetsample] | Gets the NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationGet.json | -| [networkSecurityPerimeterLoggingConfigurationsListSample.ts][networksecurityperimeterloggingconfigurationslistsample] | Lists the NSP logging configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationList.json | -| [networkSecurityPerimeterOperationStatusesGetSample.ts][networksecurityperimeteroperationstatusesgetsample] | Gets the operation status for the given operation id. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspOperationStatusGet.json | -| [networkSecurityPerimeterProfilesCreateOrUpdateSample.ts][networksecurityperimeterprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfilePut.json | -| [networkSecurityPerimeterProfilesDeleteSample.ts][networksecurityperimeterprofilesdeletesample] | Deletes an NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileDelete.json | -| [networkSecurityPerimeterProfilesGetSample.ts][networksecurityperimeterprofilesgetsample] | Gets the specified NSP profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileGet.json | -| [networkSecurityPerimeterProfilesListSample.ts][networksecurityperimeterprofileslistsample] | Lists the NSP profiles in the specified network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileList.json | -| [networkSecurityPerimeterServiceTagsListSample.ts][networksecurityperimeterservicetagslistsample] | Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspServiceTagsList.json | -| [networkSecurityPerimetersCreateOrUpdateSample.ts][networksecurityperimeterscreateorupdatesample] | Creates or updates a Network Security Perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterPut.json | -| [networkSecurityPerimetersDeleteSample.ts][networksecurityperimetersdeletesample] | Deletes a network security perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterDelete.json | -| [networkSecurityPerimetersGetSample.ts][networksecurityperimetersgetsample] | Gets the specified network security perimeter by the name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterGet.json | -| [networkSecurityPerimetersListBySubscriptionSample.ts][networksecurityperimeterslistbysubscriptionsample] | List all network security perimeters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterListAll.json | -| [networkSecurityPerimetersListSample.ts][networksecurityperimeterslistsample] | List network security perimeters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterList.json | -| [networkSecurityPerimetersPatchSample.ts][networksecurityperimeterspatchsample] | Patch Tags for a Network Security Perimeter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterPatch.json | -| [networkVirtualApplianceConnectionsCreateOrUpdateSample.ts][networkvirtualapplianceconnectionscreateorupdatesample] | Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionPut.json | -| [networkVirtualApplianceConnectionsDeleteSample.ts][networkvirtualapplianceconnectionsdeletesample] | Deletes a NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionDelete.json | -| [networkVirtualApplianceConnectionsGetSample.ts][networkvirtualapplianceconnectionsgetsample] | Retrieves the details of specified NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionGet.json | -| [networkVirtualApplianceConnectionsListSample.ts][networkvirtualapplianceconnectionslistsample] | Lists NetworkVirtualApplianceConnections under the NVA. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionList.json | -| [networkVirtualAppliancesCreateOrUpdateSample.ts][networkvirtualappliancescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetBasicPut.json | -| [networkVirtualAppliancesDeleteSample.ts][networkvirtualappliancesdeletesample] | Deletes the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceDelete.json | -| [networkVirtualAppliancesGetBootDiagnosticLogsSample.ts][networkvirtualappliancesgetbootdiagnosticlogssample] | Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceBootDiagnostics.json | -| [networkVirtualAppliancesGetSample.ts][networkvirtualappliancesgetsample] | Gets the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceGet.json | -| [networkVirtualAppliancesListByResourceGroupSample.ts][networkvirtualapplianceslistbyresourcegroupsample] | Lists all Network Virtual Appliances in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json | -| [networkVirtualAppliancesListSample.ts][networkvirtualapplianceslistsample] | Gets all Network Virtual Appliances in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceListBySubscription.json | -| [networkVirtualAppliancesReimageSample.ts][networkvirtualappliancesreimagesample] | Reimages one VM belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSpecificReimage.json | -| [networkVirtualAppliancesRestartSample.ts][networkvirtualappliancesrestartsample] | Restarts one or more VMs belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceEmptyRestart.json | -| [networkVirtualAppliancesUpdateTagsSample.ts][networkvirtualappliancesupdatetagssample] | Updates a Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceUpdateTags.json | -| [networkWatchersCheckConnectivitySample.ts][networkwatcherscheckconnectivitysample] | Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectivityCheck.json | -| [networkWatchersCreateOrUpdateSample.ts][networkwatcherscreateorupdatesample] | Creates or updates a network watcher in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherCreate.json | -| [networkWatchersDeleteSample.ts][networkwatchersdeletesample] | Deletes the specified network watcher resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherDelete.json | -| [networkWatchersGetAzureReachabilityReportSample.ts][networkwatchersgetazurereachabilityreportsample] | NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json | -| [networkWatchersGetFlowLogStatusSample.ts][networkwatchersgetflowlogstatussample] | Queries status of flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogStatusQuery.json | -| [networkWatchersGetNetworkConfigurationDiagnosticSample.ts][networkwatchersgetnetworkconfigurationdiagnosticsample] | Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json | -| [networkWatchersGetNextHopSample.ts][networkwatchersgetnexthopsample] | Gets the next hop from the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherNextHopGet.json | -| [networkWatchersGetSample.ts][networkwatchersgetsample] | Gets the specified network watcher by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherGet.json | -| [networkWatchersGetTopologySample.ts][networkwatchersgettopologysample] | Gets the current network topology by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTopologyGet.json | -| [networkWatchersGetTroubleshootingResultSample.ts][networkwatchersgettroubleshootingresultsample] | Get the last completed troubleshooting result on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTroubleshootResultQuery.json | -| [networkWatchersGetTroubleshootingSample.ts][networkwatchersgettroubleshootingsample] | Initiate troubleshooting on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTroubleshootGet.json | -| [networkWatchersGetVMSecurityRulesSample.ts][networkwatchersgetvmsecurityrulessample] | Gets the configured and effective security group rules on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherSecurityGroupViewGet.json | -| [networkWatchersListAllSample.ts][networkwatcherslistallsample] | Gets all network watchers by subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherListAll.json | -| [networkWatchersListAvailableProvidersSample.ts][networkwatcherslistavailableproviderssample] | NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherAvailableProvidersListGet.json | -| [networkWatchersListSample.ts][networkwatcherslistsample] | Gets all network watchers by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherList.json | -| [networkWatchersSetFlowLogConfigurationSample.ts][networkwatcherssetflowlogconfigurationsample] | Configures flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogConfigure.json | -| [networkWatchersUpdateTagsSample.ts][networkwatchersupdatetagssample] | Updates a network watcher tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherUpdateTags.json | -| [networkWatchersVerifyIPFlowSample.ts][networkwatchersverifyipflowsample] | Verify IP flow from the specified VM to a location given the currently configured NSG rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherIpFlowVerify.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available Network Rest API operations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/OperationList.json | -| [p2SVpnGatewaysCreateOrUpdateSample.ts][p2svpngatewayscreateorupdatesample] | Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayPut.json | -| [p2SVpnGatewaysDeleteSample.ts][p2svpngatewaysdeletesample] | Deletes a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayDelete.json | -| [p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts][p2svpngatewaysdisconnectp2svpnconnectionssample] | Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json | -| [p2SVpnGatewaysGenerateVpnProfileSample.ts][p2svpngatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts][p2svpngatewaysgetp2svpnconnectionhealthdetailedsample] | Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts][p2svpngatewaysgetp2svpnconnectionhealthsample] | Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGetConnectionHealth.json | -| [p2SVpnGatewaysGetSample.ts][p2svpngatewaysgetsample] | Retrieves the details of a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGet.json | -| [p2SVpnGatewaysListByResourceGroupSample.ts][p2svpngatewayslistbyresourcegroupsample] | Lists all the P2SVpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayListByResourceGroup.json | -| [p2SVpnGatewaysListSample.ts][p2svpngatewayslistsample] | Lists all the P2SVpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayList.json | -| [p2SVpnGatewaysResetSample.ts][p2svpngatewaysresetsample] | Resets the primary of the p2s vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayReset.json | -| [p2SVpnGatewaysUpdateTagsSample.ts][p2svpngatewaysupdatetagssample] | Updates virtual wan p2s vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayUpdateTags.json | -| [packetCapturesCreateSample.ts][packetcapturescreatesample] | Create and start a packet capture on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureCreate.json | -| [packetCapturesDeleteSample.ts][packetcapturesdeletesample] | Deletes the specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureDelete.json | -| [packetCapturesGetSample.ts][packetcapturesgetsample] | Gets a packet capture session by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureGet.json | -| [packetCapturesGetStatusSample.ts][packetcapturesgetstatussample] | Query the status of a running packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json | -| [packetCapturesListSample.ts][packetcaptureslistsample] | Lists all packet capture sessions within the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCapturesList.json | -| [packetCapturesStopSample.ts][packetcapturesstopsample] | Stops a specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureStop.json | -| [peerExpressRouteCircuitConnectionsGetSample.ts][peerexpressroutecircuitconnectionsgetsample] | Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PeerExpressRouteCircuitConnectionGet.json | -| [peerExpressRouteCircuitConnectionsListSample.ts][peerexpressroutecircuitconnectionslistsample] | Gets all global reach peer connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PeerExpressRouteCircuitConnectionList.json | -| [privateDnsZoneGroupsCreateOrUpdateSample.ts][privatednszonegroupscreateorupdatesample] | Creates or updates a private dns zone group in the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json | -| [privateDnsZoneGroupsDeleteSample.ts][privatednszonegroupsdeletesample] | Deletes the specified private dns zone group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json | -| [privateDnsZoneGroupsGetSample.ts][privatednszonegroupsgetsample] | Gets the private dns zone group resource by specified private dns zone group name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupGet.json | -| [privateDnsZoneGroupsListSample.ts][privatednszonegroupslistsample] | Gets all private dns zone groups in a private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupList.json | -| [privateEndpointsCreateOrUpdateSample.ts][privateendpointscreateorupdatesample] | Creates or updates an private endpoint in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointCreate.json | -| [privateEndpointsDeleteSample.ts][privateendpointsdeletesample] | Deletes the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDelete.json | -| [privateEndpointsGetSample.ts][privateendpointsgetsample] | Gets the specified private endpoint by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointGet.json | -| [privateEndpointsListBySubscriptionSample.ts][privateendpointslistbysubscriptionsample] | Gets all private endpoints in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointListAll.json | -| [privateEndpointsListSample.ts][privateendpointslistsample] | Gets all private endpoints in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointList.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts][privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample] | Checks whether the subscription is visible to private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts][privatelinkservicescheckprivatelinkservicevisibilitysample] | Checks whether the subscription is visible to private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckPrivateLinkServiceVisibility.json | -| [privateLinkServicesCreateOrUpdateSample.ts][privatelinkservicescreateorupdatesample] | Creates or updates an private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceCreate.json | -| [privateLinkServicesDeletePrivateEndpointConnectionSample.ts][privatelinkservicesdeleteprivateendpointconnectionsample] | Delete private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json | -| [privateLinkServicesDeleteSample.ts][privatelinkservicesdeletesample] | Deletes the specified private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceDelete.json | -| [privateLinkServicesGetPrivateEndpointConnectionSample.ts][privatelinkservicesgetprivateendpointconnectionsample] | Get the specific private end point connection by specific private link service in the resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json | -| [privateLinkServicesGetSample.ts][privatelinkservicesgetsample] | Gets the specified private link service by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts][privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts][privatelinkserviceslistautoapprovedprivatelinkservicessample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AutoApprovedPrivateLinkServicesGet.json | -| [privateLinkServicesListBySubscriptionSample.ts][privatelinkserviceslistbysubscriptionsample] | Gets all private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceListAll.json | -| [privateLinkServicesListPrivateEndpointConnectionsSample.ts][privatelinkserviceslistprivateendpointconnectionssample] | Gets all private end point connections for a specific private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json | -| [privateLinkServicesListSample.ts][privatelinkserviceslistsample] | Gets all private link services in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceList.json | -| [privateLinkServicesUpdatePrivateEndpointConnectionSample.ts][privatelinkservicesupdateprivateendpointconnectionsample] | Approve or reject private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json | -| [publicIPAddressesCreateOrUpdateSample.ts][publicipaddressescreateorupdatesample] | Creates or updates a static or dynamic public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDns.json | -| [publicIPAddressesDdosProtectionStatusSample.ts][publicipaddressesddosprotectionstatussample] | Gets the Ddos Protection Status of a Public IP Address x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json | -| [publicIPAddressesDeleteSample.ts][publicipaddressesdeletesample] | Deletes the specified public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressDelete.json | -| [publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts][publicipaddressesdisassociatecloudservicereservedpublicipsample] | Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressDisassociateCloudServiceReservedPublicIp.json | -| [publicIPAddressesGetCloudServicePublicIpaddressSample.ts][publicipaddressesgetcloudservicepublicipaddresssample] | Get the specified public IP address in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServicePublicIpGet.json | -| [publicIPAddressesGetSample.ts][publicipaddressesgetsample] | Gets the specified public IP address in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGet.json | -| [publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts][publicipaddressesgetvirtualmachinescalesetpublicipaddresssample] | Get the specified public IP address in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssPublicIpGet.json | -| [publicIPAddressesListAllSample.ts][publicipaddresseslistallsample] | Gets all the public IP addresses in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressListAll.json | -| [publicIPAddressesListCloudServicePublicIpaddressesSample.ts][publicipaddresseslistcloudservicepublicipaddressessample] | Gets information about all public IP addresses on a cloud service level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServicePublicIpListAll.json | -| [publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts][publicipaddresseslistcloudserviceroleinstancepublicipaddressessample] | Gets information about all public IP addresses in a role instance IP configuration in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceRoleInstancePublicIpList.json | -| [publicIPAddressesListSample.ts][publicipaddresseslistsample] | Gets all public IP addresses in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressList.json | -| [publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts][publicipaddresseslistvirtualmachinescalesetpublicipaddressessample] | Gets information about all public IP addresses on a virtual machine scale set level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssPublicIpListAll.json | -| [publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts][publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample] | Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssVmPublicIpList.json | -| [publicIPAddressesReserveCloudServicePublicIPAddressSample.ts][publicipaddressesreservecloudservicepublicipaddresssample] | Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressReserve.json | -| [publicIPAddressesUpdateTagsSample.ts][publicipaddressesupdatetagssample] | Updates public IP address tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressUpdateTags.json | -| [publicIPPrefixesCreateOrUpdateSample.ts][publicipprefixescreateorupdatesample] | Creates or updates a static or dynamic public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixCreateCustomizedValues.json | -| [publicIPPrefixesDeleteSample.ts][publicipprefixesdeletesample] | Deletes the specified public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixDelete.json | -| [publicIPPrefixesGetSample.ts][publicipprefixesgetsample] | Gets the specified public IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixGet.json | -| [publicIPPrefixesListAllSample.ts][publicipprefixeslistallsample] | Gets all the public IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixListAll.json | -| [publicIPPrefixesListSample.ts][publicipprefixeslistsample] | Gets all public IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixList.json | -| [publicIPPrefixesUpdateTagsSample.ts][publicipprefixesupdatetagssample] | Updates public IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixUpdateTags.json | -| [putBastionShareableLinkSample.ts][putbastionshareablelinksample] | Creates a Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkCreate.json | -| [reachabilityAnalysisIntentsCreateSample.ts][reachabilityanalysisintentscreatesample] | Creates Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentPut.json | -| [reachabilityAnalysisIntentsDeleteSample.ts][reachabilityanalysisintentsdeletesample] | Deletes Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentDelete.json | -| [reachabilityAnalysisIntentsGetSample.ts][reachabilityanalysisintentsgetsample] | Get the Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentGet.json | -| [reachabilityAnalysisIntentsListSample.ts][reachabilityanalysisintentslistsample] | Gets list of Reachability Analysis Intents . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentList.json | -| [reachabilityAnalysisRunsCreateSample.ts][reachabilityanalysisrunscreatesample] | Creates Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunPut.json | -| [reachabilityAnalysisRunsDeleteSample.ts][reachabilityanalysisrunsdeletesample] | Deletes Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunDelete.json | -| [reachabilityAnalysisRunsGetSample.ts][reachabilityanalysisrunsgetsample] | Gets Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunGet.json | -| [reachabilityAnalysisRunsListSample.ts][reachabilityanalysisrunslistsample] | Gets list of Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunList.json | -| [resourceNavigationLinksListSample.ts][resourcenavigationlinkslistsample] | Gets a list of resource navigation links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json | -| [routeFilterRulesCreateOrUpdateSample.ts][routefilterrulescreateorupdatesample] | Creates or updates a route in the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleCreate.json | -| [routeFilterRulesDeleteSample.ts][routefilterrulesdeletesample] | Deletes the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleDelete.json | -| [routeFilterRulesGetSample.ts][routefilterrulesgetsample] | Gets the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleGet.json | -| [routeFilterRulesListByRouteFilterSample.ts][routefilterruleslistbyroutefiltersample] | Gets all RouteFilterRules in a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleListByRouteFilter.json | -| [routeFiltersCreateOrUpdateSample.ts][routefilterscreateorupdatesample] | Creates or updates a route filter in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterCreate.json | -| [routeFiltersDeleteSample.ts][routefiltersdeletesample] | Deletes the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterDelete.json | -| [routeFiltersGetSample.ts][routefiltersgetsample] | Gets the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterGet.json | -| [routeFiltersListByResourceGroupSample.ts][routefilterslistbyresourcegroupsample] | Gets all route filters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterListByResourceGroup.json | -| [routeFiltersListSample.ts][routefilterslistsample] | Gets all route filters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterList.json | -| [routeFiltersUpdateTagsSample.ts][routefiltersupdatetagssample] | Updates tags of a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterUpdateTags.json | -| [routeMapsCreateOrUpdateSample.ts][routemapscreateorupdatesample] | Creates a RouteMap if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapPut.json | -| [routeMapsDeleteSample.ts][routemapsdeletesample] | Deletes a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapDelete.json | -| [routeMapsGetSample.ts][routemapsgetsample] | Retrieves the details of a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapGet.json | -| [routeMapsListSample.ts][routemapslistsample] | Retrieves the details of all RouteMaps. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapList.json | -| [routeTablesCreateOrUpdateSample.ts][routetablescreateorupdatesample] | Create or updates a route table in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableCreate.json | -| [routeTablesDeleteSample.ts][routetablesdeletesample] | Deletes the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableDelete.json | -| [routeTablesGetSample.ts][routetablesgetsample] | Gets the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableGet.json | -| [routeTablesListAllSample.ts][routetableslistallsample] | Gets all route tables in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableListAll.json | -| [routeTablesListSample.ts][routetableslistsample] | Gets all route tables in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableList.json | -| [routeTablesUpdateTagsSample.ts][routetablesupdatetagssample] | Updates a route table tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableUpdateTags.json | -| [routesCreateOrUpdateSample.ts][routescreateorupdatesample] | Creates or updates a route in the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteCreate.json | -| [routesDeleteSample.ts][routesdeletesample] | Deletes the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteDelete.json | -| [routesGetSample.ts][routesgetsample] | Gets the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteGet.json | -| [routesListSample.ts][routeslistsample] | Gets all routes in a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteList.json | -| [routingIntentCreateOrUpdateSample.ts][routingintentcreateorupdatesample] | Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentPut.json | -| [routingIntentDeleteSample.ts][routingintentdeletesample] | Deletes a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentDelete.json | -| [routingIntentGetSample.ts][routingintentgetsample] | Retrieves the details of a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentGet.json | -| [routingIntentListSample.ts][routingintentlistsample] | Retrieves the details of all RoutingIntent child resources of the VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentList.json | -| [routingRuleCollectionsCreateOrUpdateSample.ts][routingrulecollectionscreateorupdatesample] | Creates or updates a routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json | -| [routingRuleCollectionsDeleteSample.ts][routingrulecollectionsdeletesample] | Deletes an routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json | -| [routingRuleCollectionsGetSample.ts][routingrulecollectionsgetsample] | Gets a network manager routing configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json | -| [routingRuleCollectionsListSample.ts][routingrulecollectionslistsample] | Lists all the rule collections in a routing configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionList.json | -| [routingRulesCreateOrUpdateSample.ts][routingrulescreateorupdatesample] | Creates or updates an routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRulePut.json | -| [routingRulesDeleteSample.ts][routingrulesdeletesample] | Deletes a routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleDelete.json | -| [routingRulesGetSample.ts][routingrulesgetsample] | Gets a network manager routing configuration routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleGet.json | -| [routingRulesListSample.ts][routingruleslistsample] | List all network manager routing configuration routing rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleList.json | -| [scopeConnectionsCreateOrUpdateSample.ts][scopeconnectionscreateorupdatesample] | Creates or updates scope connection from Network Manager x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionPut.json | -| [scopeConnectionsDeleteSample.ts][scopeconnectionsdeletesample] | Delete the pending scope connection created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionDelete.json | -| [scopeConnectionsGetSample.ts][scopeconnectionsgetsample] | Get specified scope connection created by this Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionGet.json | -| [scopeConnectionsListSample.ts][scopeconnectionslistsample] | List all scope connections created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionList.json | -| [securityAdminConfigurationsCreateOrUpdateSample.ts][securityadminconfigurationscreateorupdatesample] | Creates or updates a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json | -| [securityAdminConfigurationsDeleteSample.ts][securityadminconfigurationsdeletesample] | Deletes a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json | -| [securityAdminConfigurationsGetSample.ts][securityadminconfigurationsgetsample] | Retrieves a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json | -| [securityAdminConfigurationsListSample.ts][securityadminconfigurationslistsample] | Lists all the network manager security admin configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json | -| [securityPartnerProvidersCreateOrUpdateSample.ts][securitypartnerproviderscreateorupdatesample] | Creates or updates the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderPut.json | -| [securityPartnerProvidersDeleteSample.ts][securitypartnerprovidersdeletesample] | Deletes the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderDelete.json | -| [securityPartnerProvidersGetSample.ts][securitypartnerprovidersgetsample] | Gets the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderGet.json | -| [securityPartnerProvidersListByResourceGroupSample.ts][securitypartnerproviderslistbyresourcegroupsample] | Lists all Security Partner Providers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderListByResourceGroup.json | -| [securityPartnerProvidersListSample.ts][securitypartnerproviderslistsample] | Gets all the Security Partner Providers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderListBySubscription.json | -| [securityPartnerProvidersUpdateTagsSample.ts][securitypartnerprovidersupdatetagssample] | Updates tags of a Security Partner Provider resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderUpdateTags.json | -| [securityRulesCreateOrUpdateSample.ts][securityrulescreateorupdatesample] | Creates or updates a security rule in the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleCreate.json | -| [securityRulesDeleteSample.ts][securityrulesdeletesample] | Deletes the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleDelete.json | -| [securityRulesGetSample.ts][securityrulesgetsample] | Get the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleGet.json | -| [securityRulesListSample.ts][securityruleslistsample] | Gets all security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleList.json | -| [securityUserConfigurationsCreateOrUpdateSample.ts][securityuserconfigurationscreateorupdatesample] | Creates or updates a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json | -| [securityUserConfigurationsDeleteSample.ts][securityuserconfigurationsdeletesample] | Deletes a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json | -| [securityUserConfigurationsGetSample.ts][securityuserconfigurationsgetsample] | Retrieves a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json | -| [securityUserConfigurationsListSample.ts][securityuserconfigurationslistsample] | Lists all the network manager security user configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationList.json | -| [securityUserRuleCollectionsCreateOrUpdateSample.ts][securityuserrulecollectionscreateorupdatesample] | Creates or updates a security user rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json | -| [securityUserRuleCollectionsDeleteSample.ts][securityuserrulecollectionsdeletesample] | Deletes a Security User Rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json | -| [securityUserRuleCollectionsGetSample.ts][securityuserrulecollectionsgetsample] | Gets a network manager security user configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json | -| [securityUserRuleCollectionsListSample.ts][securityuserrulecollectionslistsample] | Lists all the security user rule collections in a security configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json | -| [securityUserRulesCreateOrUpdateSample.ts][securityuserrulescreateorupdatesample] | Creates or updates a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRulePut.json | -| [securityUserRulesDeleteSample.ts][securityuserrulesdeletesample] | Deletes a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleDelete.json | -| [securityUserRulesGetSample.ts][securityuserrulesgetsample] | Gets a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleGet.json | -| [securityUserRulesListSample.ts][securityuserruleslistsample] | Lists all Security User Rules in a rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleList.json | -| [serviceAssociationLinksListSample.ts][serviceassociationlinkslistsample] | Gets a list of service association links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json | -| [serviceEndpointPoliciesCreateOrUpdateSample.ts][serviceendpointpoliciescreateorupdatesample] | Creates or updates a service Endpoint Policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyCreate.json | -| [serviceEndpointPoliciesDeleteSample.ts][serviceendpointpoliciesdeletesample] | Deletes the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDelete.json | -| [serviceEndpointPoliciesGetSample.ts][serviceendpointpoliciesgetsample] | Gets the specified service Endpoint Policies in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyGet.json | -| [serviceEndpointPoliciesListByResourceGroupSample.ts][serviceendpointpolicieslistbyresourcegroupsample] | Gets all service endpoint Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyList.json | -| [serviceEndpointPoliciesListSample.ts][serviceendpointpolicieslistsample] | Gets all the service endpoint policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyListAll.json | -| [serviceEndpointPoliciesUpdateTagsSample.ts][serviceendpointpoliciesupdatetagssample] | Updates tags of a service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyUpdateTags.json | -| [serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts][serviceendpointpolicydefinitionscreateorupdatesample] | Creates or updates a service endpoint policy definition in the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionCreate.json | -| [serviceEndpointPolicyDefinitionsDeleteSample.ts][serviceendpointpolicydefinitionsdeletesample] | Deletes the specified ServiceEndpoint policy definitions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json | -| [serviceEndpointPolicyDefinitionsGetSample.ts][serviceendpointpolicydefinitionsgetsample] | Get the specified service endpoint policy definitions from service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionGet.json | -| [serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts][serviceendpointpolicydefinitionslistbyresourcegroupsample] | Gets all service endpoint policy definitions in a service end point policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionList.json | -| [serviceGatewaysCreateOrUpdateSample.ts][servicegatewayscreateorupdatesample] | Creates or updates a service gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayCreate.json | -| [serviceGatewaysDeleteSample.ts][servicegatewaysdeletesample] | Deletes the specified service gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayDelete.json | -| [serviceGatewaysGetAddressLocationsSample.ts][servicegatewaysgetaddresslocationssample] | Get address locations in service gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGetAddressLocationsResponse.json | -| [serviceGatewaysGetSample.ts][servicegatewaysgetsample] | Gets the specified service gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGet.json | -| [serviceGatewaysGetServicesSample.ts][servicegatewaysgetservicessample] | Get Services in service gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGetServicesResponse.json | -| [serviceGatewaysListAllSample.ts][servicegatewayslistallsample] | Gets all the service gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayListAll.json | -| [serviceGatewaysListSample.ts][servicegatewayslistsample] | Gets all the service gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayList.json | -| [serviceGatewaysUpdateAddressLocationsSample.ts][servicegatewaysupdateaddresslocationssample] | Creates or updates address locations within the service gateway. //@@TS-MAGIC-NEWLINE@@ The request supports both full and partial update modes at two levels: location and address. //@@TS-MAGIC-NEWLINE@@ Full update replaces all existing data. //@@TS-MAGIC-NEWLINE@@ Partial update modifies only the specified entries: //@@TS-MAGIC-NEWLINE@@ For location-level partial updates, if no address is provided, the existing address will be deleted. //@@TS-MAGIC-NEWLINE@@ For address-level partial updates, if no services are provided, the existing services will be considered for deletion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayFullUpdateAddressLocationsRequest.json | -| [serviceGatewaysUpdateServicesSample.ts][servicegatewaysupdateservicessample] | Creates, updates, or deletes services within the service gateway. The request supports both full and partial update modes at the service level. //@@TS-MAGIC-NEWLINE@@ Full update replaces all existing services with the new list provided in the request. Partial update modifies only the specified services. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayUpdateServicesRequest.json | -| [serviceGatewaysUpdateTagsSample.ts][servicegatewaysupdatetagssample] | Updates a service gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayUpdateTags.json | -| [serviceTagInformationListSample.ts][servicetaginformationlistsample] | Gets a list of service tag information resources with pagination. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagInformationListResult.json | -| [serviceTagsListSample.ts][servicetagslistsample] | Gets a list of service tag information resources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagsList.json | -| [staticCidrsCreateSample.ts][staticcidrscreatesample] | Creates/Updates the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Create.json | -| [staticCidrsDeleteSample.ts][staticcidrsdeletesample] | Delete the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Delete.json | -| [staticCidrsGetSample.ts][staticcidrsgetsample] | Gets the specific Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Get.json | -| [staticCidrsListSample.ts][staticcidrslistsample] | Gets list of Static CIDR resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_List.json | -| [staticMembersCreateOrUpdateSample.ts][staticmemberscreateorupdatesample] | Creates or updates a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberPut.json | -| [staticMembersDeleteSample.ts][staticmembersdeletesample] | Deletes a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberDelete.json | -| [staticMembersGetSample.ts][staticmembersgetsample] | Gets the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberGet.json | -| [staticMembersListSample.ts][staticmemberslistsample] | Lists the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberList.json | -| [subnetsCreateOrUpdateSample.ts][subnetscreateorupdatesample] | Creates or updates a subnet in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateWithServiceGateway.json | -| [subnetsDeleteSample.ts][subnetsdeletesample] | Deletes the specified subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetDelete.json | -| [subnetsGetSample.ts][subnetsgetsample] | Gets the specified subnet by virtual network and resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetGet.json | -| [subnetsListSample.ts][subnetslistsample] | Gets all subnets in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetList.json | -| [subnetsPrepareNetworkPoliciesSample.ts][subnetspreparenetworkpoliciessample] | Prepares a subnet by applying network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetPrepareNetworkPolicies.json | -| [subnetsUnprepareNetworkPoliciesSample.ts][subnetsunpreparenetworkpoliciessample] | Unprepares a subnet by removing network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetUnprepareNetworkPolicies.json | -| [subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts][subscriptionnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionPut.json | -| [subscriptionNetworkManagerConnectionsDeleteSample.ts][subscriptionnetworkmanagerconnectionsdeletesample] | Delete specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json | -| [subscriptionNetworkManagerConnectionsGetSample.ts][subscriptionnetworkmanagerconnectionsgetsample] | Get a specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionGet.json | -| [subscriptionNetworkManagerConnectionsListSample.ts][subscriptionnetworkmanagerconnectionslistsample] | List all network manager connections created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionList.json | -| [supportedSecurityProvidersSample.ts][supportedsecurityproviderssample] | Gives the supported security providers for the virtual wan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWanSupportedSecurityProviders.json | -| [usagesListSample.ts][usageslistsample] | List network usages for a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/UsageList.json | -| [verifierWorkspacesCreateSample.ts][verifierworkspacescreatesample] | Creates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspacePut.json | -| [verifierWorkspacesDeleteSample.ts][verifierworkspacesdeletesample] | Deletes Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceDelete.json | -| [verifierWorkspacesGetSample.ts][verifierworkspacesgetsample] | Gets Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceGet.json | -| [verifierWorkspacesListSample.ts][verifierworkspaceslistsample] | Gets list of Verifier Workspaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceList.json | -| [verifierWorkspacesUpdateSample.ts][verifierworkspacesupdatesample] | Updates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspacePatch.json | -| [vipSwapCreateSample.ts][vipswapcreatesample] | Performs vip swap operation on swappable cloud services. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapPut.json | -| [vipSwapGetSample.ts][vipswapgetsample] | Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapGet.json | -| [vipSwapListSample.ts][vipswaplistsample] | Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapList.json | -| [virtualApplianceSitesCreateOrUpdateSample.ts][virtualappliancesitescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSitePut.json | -| [virtualApplianceSitesDeleteSample.ts][virtualappliancesitesdeletesample] | Deletes the specified site from a Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteDelete.json | -| [virtualApplianceSitesGetSample.ts][virtualappliancesitesgetsample] | Gets the specified Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteGet.json | -| [virtualApplianceSitesListSample.ts][virtualappliancesiteslistsample] | Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteList.json | -| [virtualApplianceSkusGetSample.ts][virtualapplianceskusgetsample] | Retrieves a single available sku for network virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSkuGet.json | -| [virtualApplianceSkusListSample.ts][virtualapplianceskuslistsample] | List all SKUs available for a virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSkuList.json | -| [virtualHubBgpConnectionCreateOrUpdateSample.ts][virtualhubbgpconnectioncreateorupdatesample] | Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionPut.json | -| [virtualHubBgpConnectionDeleteSample.ts][virtualhubbgpconnectiondeletesample] | Deletes a VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionDelete.json | -| [virtualHubBgpConnectionGetSample.ts][virtualhubbgpconnectiongetsample] | Retrieves the details of a Virtual Hub Bgp Connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionGet.json | -| [virtualHubBgpConnectionsListAdvertisedRoutesSample.ts][virtualhubbgpconnectionslistadvertisedroutessample] | Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json | -| [virtualHubBgpConnectionsListLearnedRoutesSample.ts][virtualhubbgpconnectionslistlearnedroutessample] | Retrieves a list of routes the virtual hub bgp connection has learned. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeerListLearnedRoute.json | -| [virtualHubBgpConnectionsListSample.ts][virtualhubbgpconnectionslistsample] | Retrieves the details of all VirtualHubBgpConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionList.json | -| [virtualHubIPConfigurationCreateOrUpdateSample.ts][virtualhubipconfigurationcreateorupdatesample] | Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationPut.json | -| [virtualHubIPConfigurationDeleteSample.ts][virtualhubipconfigurationdeletesample] | Deletes a VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationDelete.json | -| [virtualHubIPConfigurationGetSample.ts][virtualhubipconfigurationgetsample] | Retrieves the details of a Virtual Hub Ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationGet.json | -| [virtualHubIPConfigurationListSample.ts][virtualhubipconfigurationlistsample] | Retrieves the details of all VirtualHubIpConfigurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationList.json | -| [virtualHubRouteTableV2SCreateOrUpdateSample.ts][virtualhubroutetablev2screateorupdatesample] | Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Put.json | -| [virtualHubRouteTableV2SDeleteSample.ts][virtualhubroutetablev2sdeletesample] | Deletes a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Delete.json | -| [virtualHubRouteTableV2SGetSample.ts][virtualhubroutetablev2sgetsample] | Retrieves the details of a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Get.json | -| [virtualHubRouteTableV2SListSample.ts][virtualhubroutetablev2slistsample] | Retrieves the details of all VirtualHubRouteTableV2s. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2List.json | -| [virtualHubsCreateOrUpdateSample.ts][virtualhubscreateorupdatesample] | Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubPut.json | -| [virtualHubsDeleteSample.ts][virtualhubsdeletesample] | Deletes a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubDelete.json | -| [virtualHubsGetEffectiveVirtualHubRoutesSample.ts][virtualhubsgeteffectivevirtualhubroutessample] | Gets the effective routes configured for the Virtual Hub resource or the specified resource . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EffectiveRoutesListForConnection.json | -| [virtualHubsGetInboundRoutesSample.ts][virtualhubsgetinboundroutessample] | Gets the inbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetInboundRoutes.json | -| [virtualHubsGetOutboundRoutesSample.ts][virtualhubsgetoutboundroutessample] | Gets the outbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetOutboundRoutes.json | -| [virtualHubsGetSample.ts][virtualhubsgetsample] | Retrieves the details of a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubGet.json | -| [virtualHubsListByResourceGroupSample.ts][virtualhubslistbyresourcegroupsample] | Lists all the VirtualHubs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubListByResourceGroup.json | -| [virtualHubsListSample.ts][virtualhubslistsample] | Lists all the VirtualHubs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubList.json | -| [virtualHubsUpdateTagsSample.ts][virtualhubsupdatetagssample] | Updates VirtualHub tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubUpdateTags.json | -| [virtualNetworkAppliancesCreateOrUpdateSample.ts][virtualnetworkappliancescreateorupdatesample] | Creates or updates a virtual network appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_CreateOrUpdate.json | -| [virtualNetworkAppliancesDeleteSample.ts][virtualnetworkappliancesdeletesample] | Deletes the specified virtual network appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_Delete.json | -| [virtualNetworkAppliancesGetSample.ts][virtualnetworkappliancesgetsample] | Gets information about the specified virtual network appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_Get.json | -| [virtualNetworkAppliancesListAllSample.ts][virtualnetworkapplianceslistallsample] | Gets all virtual network appliances in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_ListBySubscription.json | -| [virtualNetworkAppliancesListSample.ts][virtualnetworkapplianceslistsample] | Gets all virtual network appliances in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_List.json | -| [virtualNetworkAppliancesUpdateTagsSample.ts][virtualnetworkappliancesupdatetagssample] | Updates a virtual network appliance tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_UpdateTags.json | -| [virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts][virtualnetworkgatewayconnectionscreateorupdatesample] | Creates or updates a virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionCreate.json | -| [virtualNetworkGatewayConnectionsDeleteSample.ts][virtualnetworkgatewayconnectionsdeletesample] | Deletes the specified virtual network Gateway connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionDelete.json | -| [virtualNetworkGatewayConnectionsGetIkeSasSample.ts][virtualnetworkgatewayconnectionsgetikesassample] | Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json | -| [virtualNetworkGatewayConnectionsGetSample.ts][virtualnetworkgatewayconnectionsgetsample] | Gets the specified virtual network gateway connection by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGet.json | -| [virtualNetworkGatewayConnectionsGetSharedKeySample.ts][virtualnetworkgatewayconnectionsgetsharedkeysample] | The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json | -| [virtualNetworkGatewayConnectionsListSample.ts][virtualnetworkgatewayconnectionslistsample] | The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionsList.json | -| [virtualNetworkGatewayConnectionsResetConnectionSample.ts][virtualnetworkgatewayconnectionsresetconnectionsample] | Resets the virtual network gateway connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionReset.json | -| [virtualNetworkGatewayConnectionsResetSharedKeySample.ts][virtualnetworkgatewayconnectionsresetsharedkeysample] | The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json | -| [virtualNetworkGatewayConnectionsSetSharedKeySample.ts][virtualnetworkgatewayconnectionssetsharedkeysample] | The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json | -| [virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts][virtualnetworkgatewayconnectionsstartpacketcapturesample] | Starts packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json | -| [virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts][virtualnetworkgatewayconnectionsstoppacketcapturesample] | Stops packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json | -| [virtualNetworkGatewayConnectionsUpdateTagsSample.ts][virtualnetworkgatewayconnectionsupdatetagssample] | Updates a virtual network gateway connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json | -| [virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts][virtualnetworkgatewaynatrulescreateorupdatesample] | Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRulePut.json | -| [virtualNetworkGatewayNatRulesDeleteSample.ts][virtualnetworkgatewaynatrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json | -| [virtualNetworkGatewayNatRulesGetSample.ts][virtualnetworkgatewaynatrulesgetsample] | Retrieves the details of a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleGet.json | -| [virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts][virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample] | Retrieves all nat rules for a particular virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleList.json | -| [virtualNetworkGatewaysCreateOrUpdateSample.ts][virtualnetworkgatewayscreateorupdatesample] | Creates or updates a virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayUpdate.json | -| [virtualNetworkGatewaysDeleteSample.ts][virtualnetworkgatewaysdeletesample] | Deletes the specified virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayDelete.json | -| [virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts][virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample] | Disconnect vpn connections of virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json | -| [virtualNetworkGatewaysGenerateVpnProfileSample.ts][virtualnetworkgatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json | -| [virtualNetworkGatewaysGeneratevpnclientpackageSample.ts][virtualnetworkgatewaysgeneratevpnclientpackagesample] | Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json | -| [virtualNetworkGatewaysGetAdvertisedRoutesSample.ts][virtualnetworkgatewaysgetadvertisedroutessample] | This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json | -| [virtualNetworkGatewaysGetBgpPeerStatusSample.ts][virtualnetworkgatewaysgetbgppeerstatussample] | The GetBgpPeerStatus operation retrieves the status of all BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json | -| [virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts][virtualnetworkgatewaysgetfailoveralltestdetailssample] | This operation retrieves the details of all the failover tests performed on the gateway for different peering locations x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json | -| [virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts][virtualnetworkgatewaysgetfailoversingletestdetailssample] | This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json | -| [virtualNetworkGatewaysGetLearnedRoutesSample.ts][virtualnetworkgatewaysgetlearnedroutessample] | This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json | -| [virtualNetworkGatewaysGetResiliencyInformationSample.ts][virtualnetworkgatewaysgetresiliencyinformationsample] | This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetResiliencyInformation.json | -| [virtualNetworkGatewaysGetRoutesInformationSample.ts][virtualnetworkgatewaysgetroutesinformationsample] | This operation retrieves the route set information for an Express Route Gateway based on their resiliency x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetRoutesInformation.json | -| [virtualNetworkGatewaysGetSample.ts][virtualnetworkgatewaysgetsample] | Gets the specified virtual network gateway by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGet.json | -| [virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts][virtualnetworkgatewaysgetvpnprofilepackageurlsample] | Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json | -| [virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts][virtualnetworkgatewaysgetvpnclientconnectionhealthsample] | Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json | -| [virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts][virtualnetworkgatewaysgetvpnclientipsecparameterssample] | The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysInvokeAbortMigrationSample.ts][virtualnetworkgatewaysinvokeabortmigrationsample] | Trigger abort migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayAbortMigration.json | -| [virtualNetworkGatewaysInvokeCommitMigrationSample.ts][virtualnetworkgatewaysinvokecommitmigrationsample] | Trigger commit migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayCommitMigration.json | -| [virtualNetworkGatewaysInvokeExecuteMigrationSample.ts][virtualnetworkgatewaysinvokeexecutemigrationsample] | Trigger execute migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayExecuteMigration.json | -| [virtualNetworkGatewaysInvokePrepareMigrationSample.ts][virtualnetworkgatewaysinvokepreparemigrationsample] | Trigger prepare migration for the virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayPrepareMigration.json | -| [virtualNetworkGatewaysListConnectionsSample.ts][virtualnetworkgatewayslistconnectionssample] | Gets all the connections in a virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaysListConnections.json | -| [virtualNetworkGatewaysListRadiusSecretsSample.ts][virtualnetworkgatewayslistradiussecretssample] | List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AllVirtualNetworkGatewayRadiusServerSecretsList.json | -| [virtualNetworkGatewaysListSample.ts][virtualnetworkgatewayslistsample] | Gets all virtual network gateways by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayList.json | -| [virtualNetworkGatewaysResetSample.ts][virtualnetworkgatewaysresetsample] | Resets the primary of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayReset.json | -| [virtualNetworkGatewaysResetVpnClientSharedKeySample.ts][virtualnetworkgatewaysresetvpnclientsharedkeysample] | Resets the VPN client shared key of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json | -| [virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts][virtualnetworkgatewayssetvpnclientipsecparameterssample] | The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts][virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample] | This operation starts failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json | -| [virtualNetworkGatewaysStartPacketCaptureSample.ts][virtualnetworkgatewaysstartpacketcapturesample] | Starts packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json | -| [virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts][virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample] | This operation stops failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json | -| [virtualNetworkGatewaysStopPacketCaptureSample.ts][virtualnetworkgatewaysstoppacketcapturesample] | Stops packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json | -| [virtualNetworkGatewaysSupportedVpnDevicesSample.ts][virtualnetworkgatewayssupportedvpndevicessample] | Gets a xml format representation for supported vpn devices. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json | -| [virtualNetworkGatewaysUpdateTagsSample.ts][virtualnetworkgatewaysupdatetagssample] | Updates a virtual network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayUpdateTags.json | -| [virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts][virtualnetworkgatewaysvpndeviceconfigurationscriptsample] | Gets a xml format representation for vpn device configuration script. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json | -| [virtualNetworkPeeringsCreateOrUpdateSample.ts][virtualnetworkpeeringscreateorupdatesample] | Creates or updates a peering in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringCreate.json | -| [virtualNetworkPeeringsDeleteSample.ts][virtualnetworkpeeringsdeletesample] | Deletes the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringDelete.json | -| [virtualNetworkPeeringsGetSample.ts][virtualnetworkpeeringsgetsample] | Gets the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json | -| [virtualNetworkPeeringsListSample.ts][virtualnetworkpeeringslistsample] | Gets all virtual network peerings in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringList.json | -| [virtualNetworkTapsCreateOrUpdateSample.ts][virtualnetworktapscreateorupdatesample] | Creates or updates a Virtual Network Tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapCreate.json | -| [virtualNetworkTapsDeleteSample.ts][virtualnetworktapsdeletesample] | Deletes the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapDelete.json | -| [virtualNetworkTapsGetSample.ts][virtualnetworktapsgetsample] | Gets information about the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapGet.json | -| [virtualNetworkTapsListAllSample.ts][virtualnetworktapslistallsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapListAll.json | -| [virtualNetworkTapsListByResourceGroupSample.ts][virtualnetworktapslistbyresourcegroupsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapList.json | -| [virtualNetworkTapsUpdateTagsSample.ts][virtualnetworktapsupdatetagssample] | Updates an VirtualNetworkTap tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapUpdateTags.json | -| [virtualNetworksCheckIPAddressAvailabilitySample.ts][virtualnetworkscheckipaddressavailabilitysample] | Checks whether a private IP address is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json | -| [virtualNetworksCreateOrUpdateSample.ts][virtualnetworkscreateorupdatesample] | Creates or updates a virtual network in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreate.json | -| [virtualNetworksDeleteSample.ts][virtualnetworksdeletesample] | Deletes the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkDelete.json | -| [virtualNetworksGetSample.ts][virtualnetworksgetsample] | Gets the specified virtual network by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGet.json | -| [virtualNetworksListAllSample.ts][virtualnetworkslistallsample] | Gets all virtual networks in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkListAll.json | -| [virtualNetworksListDdosProtectionStatusSample.ts][virtualnetworkslistddosprotectionstatussample] | Gets the Ddos Protection Status of all IP Addresses under the Virtual Network x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json | -| [virtualNetworksListSample.ts][virtualnetworkslistsample] | Gets all virtual networks in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkList.json | -| [virtualNetworksListUsageSample.ts][virtualnetworkslistusagesample] | Lists usage stats. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkListUsage.json | -| [virtualNetworksUpdateTagsSample.ts][virtualnetworksupdatetagssample] | Updates a virtual network tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkUpdateTags.json | -| [virtualRouterPeeringsCreateOrUpdateSample.ts][virtualrouterpeeringscreateorupdatesample] | Creates or updates the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringPut.json | -| [virtualRouterPeeringsDeleteSample.ts][virtualrouterpeeringsdeletesample] | Deletes the specified peering from a Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringDelete.json | -| [virtualRouterPeeringsGetSample.ts][virtualrouterpeeringsgetsample] | Gets the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringGet.json | -| [virtualRouterPeeringsListSample.ts][virtualrouterpeeringslistsample] | Lists all Virtual Router Peerings in a Virtual Router resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringList.json | -| [virtualRoutersCreateOrUpdateSample.ts][virtualrouterscreateorupdatesample] | Creates or updates the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPut.json | -| [virtualRoutersDeleteSample.ts][virtualroutersdeletesample] | Deletes the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterDelete.json | -| [virtualRoutersGetSample.ts][virtualroutersgetsample] | Gets the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterGet.json | -| [virtualRoutersListByResourceGroupSample.ts][virtualrouterslistbyresourcegroupsample] | Lists all Virtual Routers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterListByResourceGroup.json | -| [virtualRoutersListSample.ts][virtualrouterslistsample] | Gets all the Virtual Routers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterListBySubscription.json | -| [virtualWansCreateOrUpdateSample.ts][virtualwanscreateorupdatesample] | Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANPut.json | -| [virtualWansDeleteSample.ts][virtualwansdeletesample] | Deletes a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANDelete.json | -| [virtualWansGetSample.ts][virtualwansgetsample] | Retrieves the details of a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANGet.json | -| [virtualWansListByResourceGroupSample.ts][virtualwanslistbyresourcegroupsample] | Lists all the VirtualWANs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANListByResourceGroup.json | -| [virtualWansListSample.ts][virtualwanslistsample] | Lists all the VirtualWANs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANList.json | -| [virtualWansUpdateTagsSample.ts][virtualwansupdatetagssample] | Updates a VirtualWAN tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANUpdateTags.json | -| [vpnConnectionsCreateOrUpdateSample.ts][vpnconnectionscreateorupdatesample] | Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionPut.json | -| [vpnConnectionsDeleteSample.ts][vpnconnectionsdeletesample] | Deletes a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionDelete.json | -| [vpnConnectionsGetSample.ts][vpnconnectionsgetsample] | Retrieves the details of a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionGet.json | -| [vpnConnectionsListByVpnGatewaySample.ts][vpnconnectionslistbyvpngatewaysample] | Retrieves all vpn connections for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionList.json | -| [vpnConnectionsStartPacketCaptureSample.ts][vpnconnectionsstartpacketcapturesample] | Starts packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json | -| [vpnConnectionsStopPacketCaptureSample.ts][vpnconnectionsstoppacketcapturesample] | Stops packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStopPacketCapture.json | -| [vpnGatewaysCreateOrUpdateSample.ts][vpngatewayscreateorupdatesample] | Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayPut.json | -| [vpnGatewaysDeleteSample.ts][vpngatewaysdeletesample] | Deletes a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayDelete.json | -| [vpnGatewaysGetSample.ts][vpngatewaysgetsample] | Retrieves the details of a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayGet.json | -| [vpnGatewaysListByResourceGroupSample.ts][vpngatewayslistbyresourcegroupsample] | Lists all the VpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayListByResourceGroup.json | -| [vpnGatewaysListSample.ts][vpngatewayslistsample] | Lists all the VpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayList.json | -| [vpnGatewaysResetSample.ts][vpngatewaysresetsample] | Resets the primary of the vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayReset.json | -| [vpnGatewaysStartPacketCaptureSample.ts][vpngatewaysstartpacketcapturesample] | Starts packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json | -| [vpnGatewaysStopPacketCaptureSample.ts][vpngatewaysstoppacketcapturesample] | Stops packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStopPacketCapture.json | -| [vpnGatewaysUpdateTagsSample.ts][vpngatewaysupdatetagssample] | Updates virtual wan vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayUpdateTags.json | -| [vpnLinkConnectionsGetAllSharedKeysSample.ts][vpnlinkconnectionsgetallsharedkeyssample] | Lists all shared keys of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json | -| [vpnLinkConnectionsGetDefaultSharedKeySample.ts][vpnlinkconnectionsgetdefaultsharedkeysample] | Gets the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json | -| [vpnLinkConnectionsGetIkeSasSample.ts][vpnlinkconnectionsgetikesassample] | Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json | -| [vpnLinkConnectionsListByVpnConnectionSample.ts][vpnlinkconnectionslistbyvpnconnectionsample] | Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionList.json | -| [vpnLinkConnectionsListDefaultSharedKeySample.ts][vpnlinkconnectionslistdefaultsharedkeysample] | Gets the value of the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json | -| [vpnLinkConnectionsResetConnectionSample.ts][vpnlinkconnectionsresetconnectionsample] | Resets the VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionReset.json | -| [vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts][vpnlinkconnectionssetorinitdefaultsharedkeysample] | Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json | -| [vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts][vpnserverconfigurationsassociatedwithvirtualwanlistsample] | Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetVirtualWanVpnServerConfigurations.json | -| [vpnServerConfigurationsCreateOrUpdateSample.ts][vpnserverconfigurationscreateorupdatesample] | Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationPut.json | -| [vpnServerConfigurationsDeleteSample.ts][vpnserverconfigurationsdeletesample] | Deletes a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationDelete.json | -| [vpnServerConfigurationsGetSample.ts][vpnserverconfigurationsgetsample] | Retrieves the details of a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationGet.json | -| [vpnServerConfigurationsListByResourceGroupSample.ts][vpnserverconfigurationslistbyresourcegroupsample] | Lists all the vpnServerConfigurations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationListByResourceGroup.json | -| [vpnServerConfigurationsListRadiusSecretsSample.ts][vpnserverconfigurationslistradiussecretssample] | List all Radius servers with respective radius secrets from VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AllVpnServerConfigurationRadiusServerSecretsList.json | -| [vpnServerConfigurationsListSample.ts][vpnserverconfigurationslistsample] | Lists all the VpnServerConfigurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationList.json | -| [vpnServerConfigurationsUpdateTagsSample.ts][vpnserverconfigurationsupdatetagssample] | Updates VpnServerConfiguration tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationUpdateTags.json | -| [vpnSiteLinkConnectionsGetSample.ts][vpnsitelinkconnectionsgetsample] | Retrieves the details of a vpn site link connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionGet.json | -| [vpnSiteLinksGetSample.ts][vpnsitelinksgetsample] | Retrieves the details of a VPN site link. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkGet.json | -| [vpnSiteLinksListByVpnSiteSample.ts][vpnsitelinkslistbyvpnsitesample] | Lists all the vpnSiteLinks in a resource group for a vpn site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkListByVpnSite.json | -| [vpnSitesConfigurationDownloadSample.ts][vpnsitesconfigurationdownloadsample] | Gives the sas-url to download the configurations for vpn-sites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSitesConfigurationDownload.json | -| [vpnSitesCreateOrUpdateSample.ts][vpnsitescreateorupdatesample] | Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSitePut.json | -| [vpnSitesDeleteSample.ts][vpnsitesdeletesample] | Deletes a VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteDelete.json | -| [vpnSitesGetSample.ts][vpnsitesgetsample] | Retrieves the details of a VPN site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteGet.json | -| [vpnSitesListByResourceGroupSample.ts][vpnsiteslistbyresourcegroupsample] | Lists all the vpnSites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteListByResourceGroup.json | -| [vpnSitesListSample.ts][vpnsiteslistsample] | Lists all the VpnSites in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteList.json | -| [vpnSitesUpdateTagsSample.ts][vpnsitesupdatetagssample] | Updates VpnSite tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteUpdateTags.json | -| [webApplicationFirewallPoliciesCreateOrUpdateSample.ts][webapplicationfirewallpoliciescreateorupdatesample] | Creates or update policy with specified rule set name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyCreateOrUpdate.json | -| [webApplicationFirewallPoliciesDeleteSample.ts][webapplicationfirewallpoliciesdeletesample] | Deletes Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyDelete.json | -| [webApplicationFirewallPoliciesGetSample.ts][webapplicationfirewallpoliciesgetsample] | Retrieve protection policy with specified name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyGet.json | -| [webApplicationFirewallPoliciesListAllSample.ts][webapplicationfirewallpolicieslistallsample] | Gets all the WAF policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafListAllPolicies.json | -| [webApplicationFirewallPoliciesListSample.ts][webapplicationfirewallpolicieslistsample] | Lists all of the protection policies within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafListPolicies.json | -| [webCategoriesGetSample.ts][webcategoriesgetsample] | Gets the specified Azure Web Category. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureWebCategoryGet.json | -| [webCategoriesListBySubscriptionSample.ts][webcategorieslistbysubscriptionsample] | Gets all the Azure Web Categories in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureWebCategoriesListBySubscription.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/adminRuleCollectionsCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the required environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env NETWORK_SUBSCRIPTION_ID="" NETWORK_RESOURCE_GROUP="" node dist/adminRuleCollectionsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[adminrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts -[adminrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsDeleteSample.ts -[adminrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsGetSample.ts -[adminrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsListSample.ts -[adminrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/adminRulesCreateOrUpdateSample.ts -[adminrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/adminRulesDeleteSample.ts -[adminrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/adminRulesGetSample.ts -[adminruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/adminRulesListSample.ts -[applicationgatewayprivateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts -[applicationgatewayprivateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts -[applicationgatewayprivateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts -[applicationgatewayprivateendpointconnectionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts -[applicationgatewayprivatelinkresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts -[applicationgatewaywafdynamicmanifestsdefaultgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts -[applicationgatewaywafdynamicmanifestsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts -[applicationgatewaysbackendhealthondemandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts -[applicationgatewaysbackendhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysBackendHealthSample.ts -[applicationgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysCreateOrUpdateSample.ts -[applicationgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysDeleteSample.ts -[applicationgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysGetSample.ts -[applicationgatewaysgetsslpredefinedpolicysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts -[applicationgatewayslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAllSample.ts -[applicationgatewayslistavailablerequestheaderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts -[applicationgatewayslistavailableresponseheaderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts -[applicationgatewayslistavailableservervariablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts -[applicationgatewayslistavailablessloptionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts -[applicationgatewayslistavailablesslpredefinedpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts -[applicationgatewayslistavailablewafrulesetssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts -[applicationgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListSample.ts -[applicationgatewaysstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysStartSample.ts -[applicationgatewaysstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysStopSample.ts -[applicationgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysUpdateTagsSample.ts -[applicationsecuritygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts -[applicationsecuritygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsDeleteSample.ts -[applicationsecuritygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsGetSample.ts -[applicationsecuritygroupslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsListAllSample.ts -[applicationsecuritygroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsListSample.ts -[applicationsecuritygroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts -[availabledelegationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/availableDelegationsListSample.ts -[availableendpointserviceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/availableEndpointServicesListSample.ts -[availableprivateendpointtypeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts -[availableprivateendpointtypeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/availablePrivateEndpointTypesListSample.ts -[availableresourcegroupdelegationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/availableResourceGroupDelegationsListSample.ts -[availableservicealiaseslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/availableServiceAliasesListByResourceGroupSample.ts -[availableservicealiaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/availableServiceAliasesListSample.ts -[azurefirewallfqdntagslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallFqdnTagsListAllSample.ts -[azurefirewallscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsCreateOrUpdateSample.ts -[azurefirewallsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsDeleteSample.ts -[azurefirewallsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsGetSample.ts -[azurefirewallslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListAllSample.ts -[azurefirewallslistlearnedprefixessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListLearnedPrefixesSample.ts -[azurefirewallslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListSample.ts -[azurefirewallspacketcaptureoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsPacketCaptureOperationSample.ts -[azurefirewallspacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsPacketCaptureSample.ts -[azurefirewallsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsUpdateTagsSample.ts -[bastionhostscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsCreateOrUpdateSample.ts -[bastionhostsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsDeleteSample.ts -[bastionhostsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsGetSample.ts -[bastionhostslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsListByResourceGroupSample.ts -[bastionhostslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsListSample.ts -[bastionhostsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsUpdateTagsSample.ts -[bgpservicecommunitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/bgpServiceCommunitiesListSample.ts -[checkdnsnameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/checkDnsNameAvailabilitySample.ts -[configurationpolicygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts -[configurationpolicygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsDeleteSample.ts -[configurationpolicygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsGetSample.ts -[configurationpolicygroupslistbyvpnserverconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts -[connectionmonitorscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsCreateOrUpdateSample.ts -[connectionmonitorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsDeleteSample.ts -[connectionmonitorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsGetSample.ts -[connectionmonitorslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsListSample.ts -[connectionmonitorsstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsStopSample.ts -[connectionmonitorsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsUpdateTagsSample.ts -[connectivityconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts -[connectivityconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsDeleteSample.ts -[connectivityconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsGetSample.ts -[connectivityconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsListSample.ts -[customipprefixescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesCreateOrUpdateSample.ts -[customipprefixesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesDeleteSample.ts -[customipprefixesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesGetSample.ts -[customipprefixeslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesListAllSample.ts -[customipprefixeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesListSample.ts -[customipprefixesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesUpdateTagsSample.ts -[ddoscustompoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts -[ddoscustompoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesDeleteSample.ts -[ddoscustompoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesGetSample.ts -[ddoscustompoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts -[ddosprotectionplanscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts -[ddosprotectionplansdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansDeleteSample.ts -[ddosprotectionplansgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansGetSample.ts -[ddosprotectionplanslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts -[ddosprotectionplanslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansListSample.ts -[ddosprotectionplansupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansUpdateTagsSample.ts -[defaultsecurityrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/defaultSecurityRulesGetSample.ts -[defaultsecurityruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/defaultSecurityRulesListSample.ts -[deletebastionshareablelinkbytokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/deleteBastionShareableLinkByTokenSample.ts -[deletebastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/deleteBastionShareableLinkSample.ts -[disconnectactivesessionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/disconnectActiveSessionsSample.ts -[dscpconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationCreateOrUpdateSample.ts -[dscpconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationDeleteSample.ts -[dscpconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationGetSample.ts -[dscpconfigurationlistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationListAllSample.ts -[dscpconfigurationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationListSample.ts -[expressroutecircuitauthorizationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts -[expressroutecircuitauthorizationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts -[expressroutecircuitauthorizationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts -[expressroutecircuitauthorizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsListSample.ts -[expressroutecircuitconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts -[expressroutecircuitconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts -[expressroutecircuitconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsGetSample.ts -[expressroutecircuitconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsListSample.ts -[expressroutecircuitpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts -[expressroutecircuitpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts -[expressroutecircuitpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsGetSample.ts -[expressroutecircuitpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsListSample.ts -[expressroutecircuitscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts -[expressroutecircuitsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsDeleteSample.ts -[expressroutecircuitsgetpeeringstatssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts -[expressroutecircuitsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetSample.ts -[expressroutecircuitsgetstatssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetStatsSample.ts -[expressroutecircuitslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListAllSample.ts -[expressroutecircuitslistarptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListArpTableSample.ts -[expressroutecircuitslistroutestablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListRoutesTableSample.ts -[expressroutecircuitslistroutestablesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts -[expressroutecircuitslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListSample.ts -[expressroutecircuitsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsUpdateTagsSample.ts -[expressrouteconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts -[expressrouteconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsDeleteSample.ts -[expressrouteconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsGetSample.ts -[expressrouteconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsListSample.ts -[expressroutecrossconnectionpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts -[expressroutecrossconnectionpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts -[expressroutecrossconnectionpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts -[expressroutecrossconnectionpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts -[expressroutecrossconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts -[expressroutecrossconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsGetSample.ts -[expressroutecrossconnectionslistarptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts -[expressroutecrossconnectionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts -[expressroutecrossconnectionslistroutestablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts -[expressroutecrossconnectionslistroutestablesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts -[expressroutecrossconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListSample.ts -[expressroutecrossconnectionsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts -[expressroutegatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts -[expressroutegatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysDeleteSample.ts -[expressroutegatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysGetSample.ts -[expressroutegatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts -[expressroutegatewayslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts -[expressroutegatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysUpdateTagsSample.ts -[expressroutelinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteLinksGetSample.ts -[expressroutelinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteLinksListSample.ts -[expressrouteportauthorizationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts -[expressrouteportauthorizationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts -[expressrouteportauthorizationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsGetSample.ts -[expressrouteportauthorizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsListSample.ts -[expressrouteportscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsCreateOrUpdateSample.ts -[expressrouteportsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsDeleteSample.ts -[expressrouteportsgenerateloasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsGenerateLoaSample.ts -[expressrouteportsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsGetSample.ts -[expressrouteportslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsListByResourceGroupSample.ts -[expressrouteportslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsListSample.ts -[expressrouteportslocationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsLocationsGetSample.ts -[expressrouteportslocationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsLocationsListSample.ts -[expressrouteportsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsUpdateTagsSample.ts -[expressrouteproviderportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteProviderPortSample.ts -[expressrouteproviderportslocationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteProviderPortsLocationListSample.ts -[expressrouteserviceproviderslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/expressRouteServiceProvidersListSample.ts -[firewallpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesCreateOrUpdateSample.ts -[firewallpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesDeleteSample.ts -[firewallpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesGetSample.ts -[firewallpolicieslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesListAllSample.ts -[firewallpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesListSample.ts -[firewallpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesUpdateTagsSample.ts -[firewallpolicydeploymentsdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDeploymentsDeploySample.ts -[firewallpolicydraftscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts -[firewallpolicydraftsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsDeleteSample.ts -[firewallpolicydraftsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsGetSample.ts -[firewallpolicyidpssignaturesfiltervalueslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts -[firewallpolicyidpssignatureslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesListSample.ts -[firewallpolicyidpssignaturesoverridesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts -[firewallpolicyidpssignaturesoverrideslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts -[firewallpolicyidpssignaturesoverridespatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts -[firewallpolicyidpssignaturesoverridesputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts -[firewallpolicyrulecollectiongroupdraftscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts -[firewallpolicyrulecollectiongroupdraftsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts -[firewallpolicyrulecollectiongroupdraftsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts -[firewallpolicyrulecollectiongroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts -[firewallpolicyrulecollectiongroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts -[firewallpolicyrulecollectiongroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts -[firewallpolicyrulecollectiongroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts -[flowlogscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/flowLogsCreateOrUpdateSample.ts -[flowlogsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/flowLogsDeleteSample.ts -[flowlogsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/flowLogsGetSample.ts -[flowlogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/flowLogsListSample.ts -[flowlogsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/flowLogsUpdateTagsSample.ts -[generatevirtualwanvpnserverconfigurationvpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts -[getactivesessionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/getActiveSessionsSample.ts -[getbastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/getBastionShareableLinkSample.ts -[hubroutetablescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesCreateOrUpdateSample.ts -[hubroutetablesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesDeleteSample.ts -[hubroutetablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesGetSample.ts -[hubroutetableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesListSample.ts -[hubvirtualnetworkconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts -[hubvirtualnetworkconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts -[hubvirtualnetworkconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsGetSample.ts -[hubvirtualnetworkconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsListSample.ts -[inboundnatrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesCreateOrUpdateSample.ts -[inboundnatrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesDeleteSample.ts -[inboundnatrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesGetSample.ts -[inboundnatruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesListSample.ts -[inboundsecurityrulecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts -[inboundsecurityrulegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/inboundSecurityRuleGetSample.ts -[ipallocationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsCreateOrUpdateSample.ts -[ipallocationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsDeleteSample.ts -[ipallocationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsGetSample.ts -[ipallocationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsListByResourceGroupSample.ts -[ipallocationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsListSample.ts -[ipallocationsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsUpdateTagsSample.ts -[ipgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsCreateOrUpdateSample.ts -[ipgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsDeleteSample.ts -[ipgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsGetSample.ts -[ipgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsListByResourceGroupSample.ts -[ipgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsListSample.ts -[ipgroupsupdategroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsUpdateGroupsSample.ts -[ipampoolscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsCreateSample.ts -[ipampoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsDeleteSample.ts -[ipampoolsgetpoolusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsGetPoolUsageSample.ts -[ipampoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsGetSample.ts -[ipampoolslistassociatedresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsListAssociatedResourcesSample.ts -[ipampoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsListSample.ts -[ipampoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsUpdateSample.ts -[listactiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/listActiveConnectivityConfigurationsSample.ts -[listactivesecurityadminrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/listActiveSecurityAdminRulesSample.ts -[listnetworkmanagereffectiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts -[listnetworkmanagereffectivesecurityadminrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts -[loadbalancerbackendaddresspoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts -[loadbalancerbackendaddresspoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts -[loadbalancerbackendaddresspoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts -[loadbalancerbackendaddresspoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsListSample.ts -[loadbalancerfrontendipconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts -[loadbalancerfrontendipconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts -[loadbalancerloadbalancingrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts -[loadbalancerloadbalancingruleshealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts -[loadbalancerloadbalancingruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesListSample.ts -[loadbalancernetworkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerNetworkInterfacesListSample.ts -[loadbalanceroutboundrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerOutboundRulesGetSample.ts -[loadbalanceroutboundruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerOutboundRulesListSample.ts -[loadbalancerprobesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerProbesGetSample.ts -[loadbalancerprobeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerProbesListSample.ts -[loadbalancerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersCreateOrUpdateSample.ts -[loadbalancersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersDeleteSample.ts -[loadbalancersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersGetSample.ts -[loadbalancerslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListAllSample.ts -[loadbalancerslistinboundnatruleportmappingssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts -[loadbalancerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListSample.ts -[loadbalancersmigratetoipbasedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersMigrateToIPBasedSample.ts -[loadbalancersswappublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts -[loadbalancersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersUpdateTagsSample.ts -[localnetworkgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts -[localnetworkgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysDeleteSample.ts -[localnetworkgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysGetSample.ts -[localnetworkgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysListSample.ts -[localnetworkgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysUpdateTagsSample.ts -[managementgroupnetworkmanagerconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts -[managementgroupnetworkmanagerconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts -[managementgroupnetworkmanagerconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts -[managementgroupnetworkmanagerconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts -[natgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysCreateOrUpdateSample.ts -[natgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysDeleteSample.ts -[natgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysGetSample.ts -[natgatewayslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysListAllSample.ts -[natgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysListSample.ts -[natgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysUpdateTagsSample.ts -[natrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/natRulesCreateOrUpdateSample.ts -[natrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/natRulesDeleteSample.ts -[natrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/natRulesGetSample.ts -[natruleslistbyvpngatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/natRulesListByVpnGatewaySample.ts -[networkgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsCreateOrUpdateSample.ts -[networkgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsDeleteSample.ts -[networkgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsGetSample.ts -[networkgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsListSample.ts -[networkinterfaceipconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceIPConfigurationsGetSample.ts -[networkinterfaceipconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceIPConfigurationsListSample.ts -[networkinterfaceloadbalancerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceLoadBalancersListSample.ts -[networkinterfacetapconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts -[networkinterfacetapconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts -[networkinterfacetapconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsGetSample.ts -[networkinterfacetapconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsListSample.ts -[networkinterfacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesCreateOrUpdateSample.ts -[networkinterfacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesDeleteSample.ts -[networkinterfacesgetcloudservicenetworkinterfacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts -[networkinterfacesgeteffectiveroutetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts -[networkinterfacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetSample.ts -[networkinterfacesgetvirtualmachinescalesetipconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts -[networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts -[networkinterfaceslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListAllSample.ts -[networkinterfaceslistcloudservicenetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts -[networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts -[networkinterfaceslisteffectivenetworksecuritygroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts -[networkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListSample.ts -[networkinterfaceslistvirtualmachinescalesetipconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts -[networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts -[networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts -[networkinterfacesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesUpdateTagsSample.ts -[networkmanagercommitspostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagerCommitsPostSample.ts -[networkmanagerdeploymentstatuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagerDeploymentStatusListSample.ts -[networkmanagerroutingconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts -[networkmanagerroutingconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts -[networkmanagerroutingconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsGetSample.ts -[networkmanagerroutingconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsListSample.ts -[networkmanagerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagersCreateOrUpdateSample.ts -[networkmanagersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagersDeleteSample.ts -[networkmanagersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagersGetSample.ts -[networkmanagerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagersListBySubscriptionSample.ts -[networkmanagerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagersListSample.ts -[networkmanagerspatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkManagersPatchSample.ts -[networkprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesCreateOrUpdateSample.ts -[networkprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesDeleteSample.ts -[networkprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesGetSample.ts -[networkprofileslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesListAllSample.ts -[networkprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesListSample.ts -[networkprofilesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesUpdateTagsSample.ts -[networksecuritygroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts -[networksecuritygroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsDeleteSample.ts -[networksecuritygroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsGetSample.ts -[networksecuritygroupslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsListAllSample.ts -[networksecuritygroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsListSample.ts -[networksecuritygroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsUpdateTagsSample.ts -[networksecurityperimeteraccessrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts -[networksecurityperimeteraccessrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesDeleteSample.ts -[networksecurityperimeteraccessrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesGetSample.ts -[networksecurityperimeteraccessruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesListSample.ts -[networksecurityperimeteraccessrulesreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesReconcileSample.ts -[networksecurityperimeterassociableresourcetypeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociableResourceTypesListSample.ts -[networksecurityperimeterassociationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts -[networksecurityperimeterassociationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsDeleteSample.ts -[networksecurityperimeterassociationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsGetSample.ts -[networksecurityperimeterassociationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsListSample.ts -[networksecurityperimeterassociationsreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsReconcileSample.ts -[networksecurityperimeterlinkreferencesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesDeleteSample.ts -[networksecurityperimeterlinkreferencesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesGetSample.ts -[networksecurityperimeterlinkreferenceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesListSample.ts -[networksecurityperimeterlinkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksCreateOrUpdateSample.ts -[networksecurityperimeterlinksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksDeleteSample.ts -[networksecurityperimeterlinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksGetSample.ts -[networksecurityperimeterlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksListSample.ts -[networksecurityperimeterloggingconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts -[networksecurityperimeterloggingconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts -[networksecurityperimeterloggingconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsGetSample.ts -[networksecurityperimeterloggingconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsListSample.ts -[networksecurityperimeteroperationstatusesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterOperationStatusesGetSample.ts -[networksecurityperimeterprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts -[networksecurityperimeterprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesDeleteSample.ts -[networksecurityperimeterprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesGetSample.ts -[networksecurityperimeterprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesListSample.ts -[networksecurityperimeterservicetagslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterServiceTagsListSample.ts -[networksecurityperimeterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersCreateOrUpdateSample.ts -[networksecurityperimetersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersDeleteSample.ts -[networksecurityperimetersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersGetSample.ts -[networksecurityperimeterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersListBySubscriptionSample.ts -[networksecurityperimeterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersListSample.ts -[networksecurityperimeterspatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersPatchSample.ts -[networkvirtualapplianceconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts -[networkvirtualapplianceconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts -[networkvirtualapplianceconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsGetSample.ts -[networkvirtualapplianceconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsListSample.ts -[networkvirtualappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts -[networkvirtualappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesDeleteSample.ts -[networkvirtualappliancesgetbootdiagnosticlogssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts -[networkvirtualappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesGetSample.ts -[networkvirtualapplianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts -[networkvirtualapplianceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesListSample.ts -[networkvirtualappliancesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesReimageSample.ts -[networkvirtualappliancesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesRestartSample.ts -[networkvirtualappliancesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts -[networkwatcherscheckconnectivitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersCheckConnectivitySample.ts -[networkwatcherscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersCreateOrUpdateSample.ts -[networkwatchersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersDeleteSample.ts -[networkwatchersgetazurereachabilityreportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts -[networkwatchersgetflowlogstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetFlowLogStatusSample.ts -[networkwatchersgetnetworkconfigurationdiagnosticsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts -[networkwatchersgetnexthopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetNextHopSample.ts -[networkwatchersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetSample.ts -[networkwatchersgettopologysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTopologySample.ts -[networkwatchersgettroubleshootingresultsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTroubleshootingResultSample.ts -[networkwatchersgettroubleshootingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTroubleshootingSample.ts -[networkwatchersgetvmsecurityrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetVMSecurityRulesSample.ts -[networkwatcherslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListAllSample.ts -[networkwatcherslistavailableproviderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListAvailableProvidersSample.ts -[networkwatcherslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListSample.ts -[networkwatcherssetflowlogconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts -[networkwatchersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersUpdateTagsSample.ts -[networkwatchersverifyipflowsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersVerifyIPFlowSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/operationsListSample.ts -[p2svpngatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts -[p2svpngatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysDeleteSample.ts -[p2svpngatewaysdisconnectp2svpnconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts -[p2svpngatewaysgeneratevpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts -[p2svpngatewaysgetp2svpnconnectionhealthdetailedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts -[p2svpngatewaysgetp2svpnconnectionhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts -[p2svpngatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetSample.ts -[p2svpngatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts -[p2svpngatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysListSample.ts -[p2svpngatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysResetSample.ts -[p2svpngatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts -[packetcapturescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesCreateSample.ts -[packetcapturesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesDeleteSample.ts -[packetcapturesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesGetSample.ts -[packetcapturesgetstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesGetStatusSample.ts -[packetcaptureslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesListSample.ts -[packetcapturesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesStopSample.ts -[peerexpressroutecircuitconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts -[peerexpressroutecircuitconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts -[privatednszonegroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts -[privatednszonegroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsDeleteSample.ts -[privatednszonegroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsGetSample.ts -[privatednszonegroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsListSample.ts -[privateendpointscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsCreateOrUpdateSample.ts -[privateendpointsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsDeleteSample.ts -[privateendpointsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsGetSample.ts -[privateendpointslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsListBySubscriptionSample.ts -[privateendpointslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsListSample.ts -[privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts -[privatelinkservicescheckprivatelinkservicevisibilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts -[privatelinkservicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCreateOrUpdateSample.ts -[privatelinkservicesdeleteprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts -[privatelinkservicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesDeleteSample.ts -[privatelinkservicesgetprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts -[privatelinkservicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesGetSample.ts -[privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts -[privatelinkserviceslistautoapprovedprivatelinkservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts -[privatelinkserviceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListBySubscriptionSample.ts -[privatelinkserviceslistprivateendpointconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts -[privatelinkserviceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListSample.ts -[privatelinkservicesupdateprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts -[publicipaddressescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesCreateOrUpdateSample.ts -[publicipaddressesddosprotectionstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts -[publicipaddressesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDeleteSample.ts -[publicipaddressesdisassociatecloudservicereservedpublicipsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts -[publicipaddressesgetcloudservicepublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts -[publicipaddressesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetSample.ts -[publicipaddressesgetvirtualmachinescalesetpublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts -[publicipaddresseslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListAllSample.ts -[publicipaddresseslistcloudservicepublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts -[publicipaddresseslistcloudserviceroleinstancepublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts -[publicipaddresseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListSample.ts -[publicipaddresseslistvirtualmachinescalesetpublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts -[publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts -[publicipaddressesreservecloudservicepublicipaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts -[publicipaddressesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesUpdateTagsSample.ts -[publicipprefixescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts -[publicipprefixesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesDeleteSample.ts -[publicipprefixesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesGetSample.ts -[publicipprefixeslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesListAllSample.ts -[publicipprefixeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesListSample.ts -[publicipprefixesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesUpdateTagsSample.ts -[putbastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/putBastionShareableLinkSample.ts -[reachabilityanalysisintentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsCreateSample.ts -[reachabilityanalysisintentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts -[reachabilityanalysisintentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsGetSample.ts -[reachabilityanalysisintentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsListSample.ts -[reachabilityanalysisrunscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsCreateSample.ts -[reachabilityanalysisrunsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsDeleteSample.ts -[reachabilityanalysisrunsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsGetSample.ts -[reachabilityanalysisrunslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsListSample.ts -[resourcenavigationlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/resourceNavigationLinksListSample.ts -[routefilterrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesCreateOrUpdateSample.ts -[routefilterrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesDeleteSample.ts -[routefilterrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesGetSample.ts -[routefilterruleslistbyroutefiltersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesListByRouteFilterSample.ts -[routefilterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersCreateOrUpdateSample.ts -[routefiltersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersDeleteSample.ts -[routefiltersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersGetSample.ts -[routefilterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersListByResourceGroupSample.ts -[routefilterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersListSample.ts -[routefiltersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersUpdateTagsSample.ts -[routemapscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeMapsCreateOrUpdateSample.ts -[routemapsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeMapsDeleteSample.ts -[routemapsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeMapsGetSample.ts -[routemapslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeMapsListSample.ts -[routetablescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeTablesCreateOrUpdateSample.ts -[routetablesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeTablesDeleteSample.ts -[routetablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeTablesGetSample.ts -[routetableslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeTablesListAllSample.ts -[routetableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeTablesListSample.ts -[routetablesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routeTablesUpdateTagsSample.ts -[routescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routesCreateOrUpdateSample.ts -[routesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routesDeleteSample.ts -[routesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routesGetSample.ts -[routeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routesListSample.ts -[routingintentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingIntentCreateOrUpdateSample.ts -[routingintentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingIntentDeleteSample.ts -[routingintentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingIntentGetSample.ts -[routingintentlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingIntentListSample.ts -[routingrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts -[routingrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsDeleteSample.ts -[routingrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsGetSample.ts -[routingrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsListSample.ts -[routingrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingRulesCreateOrUpdateSample.ts -[routingrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingRulesDeleteSample.ts -[routingrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingRulesGetSample.ts -[routingruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/routingRulesListSample.ts -[scopeconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsCreateOrUpdateSample.ts -[scopeconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsDeleteSample.ts -[scopeconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsGetSample.ts -[scopeconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsListSample.ts -[securityadminconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts -[securityadminconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsDeleteSample.ts -[securityadminconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsGetSample.ts -[securityadminconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsListSample.ts -[securitypartnerproviderscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts -[securitypartnerprovidersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersDeleteSample.ts -[securitypartnerprovidersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersGetSample.ts -[securitypartnerproviderslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts -[securitypartnerproviderslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersListSample.ts -[securitypartnerprovidersupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersUpdateTagsSample.ts -[securityrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityRulesCreateOrUpdateSample.ts -[securityrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityRulesDeleteSample.ts -[securityrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityRulesGetSample.ts -[securityruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityRulesListSample.ts -[securityuserconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts -[securityuserconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsDeleteSample.ts -[securityuserconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsGetSample.ts -[securityuserconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsListSample.ts -[securityuserrulecollectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts -[securityuserrulecollectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsDeleteSample.ts -[securityuserrulecollectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsGetSample.ts -[securityuserrulecollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsListSample.ts -[securityuserrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesCreateOrUpdateSample.ts -[securityuserrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesDeleteSample.ts -[securityuserrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesGetSample.ts -[securityuserruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesListSample.ts -[serviceassociationlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceAssociationLinksListSample.ts -[serviceendpointpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts -[serviceendpointpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesDeleteSample.ts -[serviceendpointpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesGetSample.ts -[serviceendpointpolicieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts -[serviceendpointpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesListSample.ts -[serviceendpointpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts -[serviceendpointpolicydefinitionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts -[serviceendpointpolicydefinitionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts -[serviceendpointpolicydefinitionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts -[serviceendpointpolicydefinitionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts -[servicegatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysCreateOrUpdateSample.ts -[servicegatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysDeleteSample.ts -[servicegatewaysgetaddresslocationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetAddressLocationsSample.ts -[servicegatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetSample.ts -[servicegatewaysgetservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetServicesSample.ts -[servicegatewayslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysListAllSample.ts -[servicegatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysListSample.ts -[servicegatewaysupdateaddresslocationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateAddressLocationsSample.ts -[servicegatewaysupdateservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateServicesSample.ts -[servicegatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateTagsSample.ts -[servicetaginformationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceTagInformationListSample.ts -[servicetagslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/serviceTagsListSample.ts -[staticcidrscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsCreateSample.ts -[staticcidrsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsDeleteSample.ts -[staticcidrsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsGetSample.ts -[staticcidrslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsListSample.ts -[staticmemberscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/staticMembersCreateOrUpdateSample.ts -[staticmembersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/staticMembersDeleteSample.ts -[staticmembersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/staticMembersGetSample.ts -[staticmemberslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/staticMembersListSample.ts -[subnetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/subnetsCreateOrUpdateSample.ts -[subnetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/subnetsDeleteSample.ts -[subnetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/subnetsGetSample.ts -[subnetslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/subnetsListSample.ts -[subnetspreparenetworkpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/subnetsPrepareNetworkPoliciesSample.ts -[subnetsunpreparenetworkpoliciessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts -[subscriptionnetworkmanagerconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts -[subscriptionnetworkmanagerconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts -[subscriptionnetworkmanagerconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts -[subscriptionnetworkmanagerconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts -[supportedsecurityproviderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/supportedSecurityProvidersSample.ts -[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/usagesListSample.ts -[verifierworkspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesCreateSample.ts -[verifierworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesDeleteSample.ts -[verifierworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesGetSample.ts -[verifierworkspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesListSample.ts -[verifierworkspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesUpdateSample.ts -[vipswapcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vipSwapCreateSample.ts -[vipswapgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vipSwapGetSample.ts -[vipswaplistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vipSwapListSample.ts -[virtualappliancesitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts -[virtualappliancesitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesDeleteSample.ts -[virtualappliancesitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesGetSample.ts -[virtualappliancesiteslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesListSample.ts -[virtualapplianceskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSkusGetSample.ts -[virtualapplianceskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSkusListSample.ts -[virtualhubbgpconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts -[virtualhubbgpconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionDeleteSample.ts -[virtualhubbgpconnectiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionGetSample.ts -[virtualhubbgpconnectionslistadvertisedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts -[virtualhubbgpconnectionslistlearnedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts -[virtualhubbgpconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListSample.ts -[virtualhubipconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts -[virtualhubipconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationDeleteSample.ts -[virtualhubipconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationGetSample.ts -[virtualhubipconfigurationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationListSample.ts -[virtualhubroutetablev2screateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts -[virtualhubroutetablev2sdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SDeleteSample.ts -[virtualhubroutetablev2sgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SGetSample.ts -[virtualhubroutetablev2slistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SListSample.ts -[virtualhubscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsCreateOrUpdateSample.ts -[virtualhubsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsDeleteSample.ts -[virtualhubsgeteffectivevirtualhubroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts -[virtualhubsgetinboundroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetInboundRoutesSample.ts -[virtualhubsgetoutboundroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetOutboundRoutesSample.ts -[virtualhubsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetSample.ts -[virtualhubslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsListByResourceGroupSample.ts -[virtualhubslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsListSample.ts -[virtualhubsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsUpdateTagsSample.ts -[virtualnetworkappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesCreateOrUpdateSample.ts -[virtualnetworkappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesDeleteSample.ts -[virtualnetworkappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesGetSample.ts -[virtualnetworkapplianceslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesListAllSample.ts -[virtualnetworkapplianceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesListSample.ts -[virtualnetworkappliancesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesUpdateTagsSample.ts -[virtualnetworkgatewayconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts -[virtualnetworkgatewayconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts -[virtualnetworkgatewayconnectionsgetikesassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts -[virtualnetworkgatewayconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts -[virtualnetworkgatewayconnectionsgetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts -[virtualnetworkgatewayconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsListSample.ts -[virtualnetworkgatewayconnectionsresetconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts -[virtualnetworkgatewayconnectionsresetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts -[virtualnetworkgatewayconnectionssetsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts -[virtualnetworkgatewayconnectionsstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts -[virtualnetworkgatewayconnectionsstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts -[virtualnetworkgatewayconnectionsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts -[virtualnetworkgatewaynatrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts -[virtualnetworkgatewaynatrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts -[virtualnetworkgatewaynatrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts -[virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts -[virtualnetworkgatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts -[virtualnetworkgatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysDeleteSample.ts -[virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts -[virtualnetworkgatewaysgeneratevpnprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts -[virtualnetworkgatewaysgeneratevpnclientpackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts -[virtualnetworkgatewaysgetadvertisedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts -[virtualnetworkgatewaysgetbgppeerstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts -[virtualnetworkgatewaysgetfailoveralltestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts -[virtualnetworkgatewaysgetfailoversingletestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts -[virtualnetworkgatewaysgetlearnedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts -[virtualnetworkgatewaysgetresiliencyinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetResiliencyInformationSample.ts -[virtualnetworkgatewaysgetroutesinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetRoutesInformationSample.ts -[virtualnetworkgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetSample.ts -[virtualnetworkgatewaysgetvpnprofilepackageurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts -[virtualnetworkgatewaysgetvpnclientconnectionhealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts -[virtualnetworkgatewaysgetvpnclientipsecparameterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts -[virtualnetworkgatewaysinvokeabortmigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeAbortMigrationSample.ts -[virtualnetworkgatewaysinvokecommitmigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeCommitMigrationSample.ts -[virtualnetworkgatewaysinvokeexecutemigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts -[virtualnetworkgatewaysinvokepreparemigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokePrepareMigrationSample.ts -[virtualnetworkgatewayslistconnectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts -[virtualnetworkgatewayslistradiussecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListRadiusSecretsSample.ts -[virtualnetworkgatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListSample.ts -[virtualnetworkgatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysResetSample.ts -[virtualnetworkgatewaysresetvpnclientsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts -[virtualnetworkgatewayssetvpnclientipsecparameterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts -[virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts -[virtualnetworkgatewaysstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts -[virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts -[virtualnetworkgatewaysstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts -[virtualnetworkgatewayssupportedvpndevicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts -[virtualnetworkgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts -[virtualnetworkgatewaysvpndeviceconfigurationscriptsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts -[virtualnetworkpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts -[virtualnetworkpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsDeleteSample.ts -[virtualnetworkpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsGetSample.ts -[virtualnetworkpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsListSample.ts -[virtualnetworktapscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts -[virtualnetworktapsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsDeleteSample.ts -[virtualnetworktapsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsGetSample.ts -[virtualnetworktapslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsListAllSample.ts -[virtualnetworktapslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts -[virtualnetworktapsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsUpdateTagsSample.ts -[virtualnetworkscheckipaddressavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts -[virtualnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksCreateOrUpdateSample.ts -[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksDeleteSample.ts -[virtualnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksGetSample.ts -[virtualnetworkslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListAllSample.ts -[virtualnetworkslistddosprotectionstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts -[virtualnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListSample.ts -[virtualnetworkslistusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListUsageSample.ts -[virtualnetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksUpdateTagsSample.ts -[virtualrouterpeeringscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts -[virtualrouterpeeringsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsDeleteSample.ts -[virtualrouterpeeringsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsGetSample.ts -[virtualrouterpeeringslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsListSample.ts -[virtualrouterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersCreateOrUpdateSample.ts -[virtualroutersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersDeleteSample.ts -[virtualroutersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersGetSample.ts -[virtualrouterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersListByResourceGroupSample.ts -[virtualrouterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersListSample.ts -[virtualwanscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualWansCreateOrUpdateSample.ts -[virtualwansdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualWansDeleteSample.ts -[virtualwansgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualWansGetSample.ts -[virtualwanslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualWansListByResourceGroupSample.ts -[virtualwanslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualWansListSample.ts -[virtualwansupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/virtualWansUpdateTagsSample.ts -[vpnconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsCreateOrUpdateSample.ts -[vpnconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsDeleteSample.ts -[vpnconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsGetSample.ts -[vpnconnectionslistbyvpngatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsListByVpnGatewaySample.ts -[vpnconnectionsstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsStartPacketCaptureSample.ts -[vpnconnectionsstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsStopPacketCaptureSample.ts -[vpngatewayscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysCreateOrUpdateSample.ts -[vpngatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysDeleteSample.ts -[vpngatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysGetSample.ts -[vpngatewayslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysListByResourceGroupSample.ts -[vpngatewayslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysListSample.ts -[vpngatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysResetSample.ts -[vpngatewaysstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysStartPacketCaptureSample.ts -[vpngatewaysstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysStopPacketCaptureSample.ts -[vpngatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysUpdateTagsSample.ts -[vpnlinkconnectionsgetallsharedkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts -[vpnlinkconnectionsgetdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts -[vpnlinkconnectionsgetikesassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts -[vpnlinkconnectionslistbyvpnconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts -[vpnlinkconnectionslistdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts -[vpnlinkconnectionsresetconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsResetConnectionSample.ts -[vpnlinkconnectionssetorinitdefaultsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts -[vpnserverconfigurationsassociatedwithvirtualwanlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts -[vpnserverconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts -[vpnserverconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsDeleteSample.ts -[vpnserverconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsGetSample.ts -[vpnserverconfigurationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts -[vpnserverconfigurationslistradiussecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListRadiusSecretsSample.ts -[vpnserverconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListSample.ts -[vpnserverconfigurationsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts -[vpnsitelinkconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinkConnectionsGetSample.ts -[vpnsitelinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinksGetSample.ts -[vpnsitelinkslistbyvpnsitesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinksListByVpnSiteSample.ts -[vpnsitesconfigurationdownloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesConfigurationDownloadSample.ts -[vpnsitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesCreateOrUpdateSample.ts -[vpnsitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesDeleteSample.ts -[vpnsitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesGetSample.ts -[vpnsiteslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesListByResourceGroupSample.ts -[vpnsiteslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesListSample.ts -[vpnsitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesUpdateTagsSample.ts -[webapplicationfirewallpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts -[webapplicationfirewallpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts -[webapplicationfirewallpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesGetSample.ts -[webapplicationfirewallpolicieslistallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesListAllSample.ts -[webapplicationfirewallpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesListSample.ts -[webcategoriesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/webCategoriesGetSample.ts -[webcategorieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v36/typescript/src/webCategoriesListBySubscriptionSample.ts -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-network?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/network/arm-network/samples/v36/typescript/package.json b/sdk/network/arm-network/samples/v36/typescript/package.json deleted file mode 100644 index 4bfbafe6fe31..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "@azure-samples/arm-network-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=20.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/network/arm-network" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic", - "cloud" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network", - "dependencies": { - "@azure/arm-network": "latest", - "dotenv": "latest", - "@azure/identity": "^4.13.0" - }, - "devDependencies": { - "@types/node": "^20.0.0", - "cross-env": "latest", - "rimraf": "latest", - "typescript": "~5.9.3" - } -} diff --git a/sdk/network/arm-network/samples/v36/typescript/sample.env b/sdk/network/arm-network/samples/v36/typescript/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts deleted file mode 100644 index 52278885d932..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - AdminRuleCollection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an admin rule collection. - * - * @summary Creates or updates an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionPut.json - */ -async function createOrUpdateAnAdminRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleCollection: AdminRuleCollection = { - description: "A sample policy", - appliesToGroups: [ - { - networkGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateAnAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsDeleteSample.ts deleted file mode 100644 index ab71eefe3b9c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - AdminRuleCollectionsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an admin rule collection. - * - * @summary Deletes an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json - */ -async function deletesAnAdminRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const force = false; - const options: AdminRuleCollectionsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deletesAnAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsGetSample.ts deleted file mode 100644 index ecafbc31956e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a network manager security admin configuration rule collection. - * - * @summary Gets a network manager security admin configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionGet.json - */ -async function getsSecurityAdminRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getsSecurityAdminRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsListSample.ts deleted file mode 100644 index 049b14580be8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/adminRuleCollectionsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the rule collections in a security admin configuration, in a paginated format. - * - * @summary Lists all the rule collections in a security admin configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleCollectionList.json - */ -async function listSecurityAdminRuleCollections(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.adminRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSecurityAdminRuleCollections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/adminRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/adminRulesCreateOrUpdateSample.ts deleted file mode 100644 index e5b56031e4ed..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/adminRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { AdminRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an admin rule. - * - * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json - */ -async function createAAdminRuleWithNetworkGroupAsSourceOrDestination(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const adminRule: AdminRule = { - description: "This is Sample Admin Rule", - access: "Deny", - destinationPortRanges: ["22"], - destinations: [ - { - addressPrefix: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1", - addressPrefixType: "NetworkGroup", - }, - ], - direction: "Inbound", - kind: "Custom", - priority: 1, - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - adminRule, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an admin rule. - * - * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRulePut.json - */ -async function createAnAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const adminRule: AdminRule = { - description: "This is Sample Admin Rule", - access: "Deny", - destinationPortRanges: ["22"], - destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - direction: "Inbound", - kind: "Custom", - priority: 1, - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - adminRule, - ); - console.log(result); -} - -async function main(): Promise { - await createAAdminRuleWithNetworkGroupAsSourceOrDestination(); - await createAnAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/adminRulesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/adminRulesDeleteSample.ts deleted file mode 100644 index 9223201a84c5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/adminRulesDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - AdminRulesDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an admin rule. - * - * @summary Deletes an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleDelete.json - */ -async function deletesAnAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const force = false; - const options: AdminRulesDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deletesAnAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/adminRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/adminRulesGetSample.ts deleted file mode 100644 index 52bc2c2cbdec..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/adminRulesGetSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a network manager security configuration admin rule. - * - * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleGet.json - */ -async function getsSecurityAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleAdminRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets a network manager security configuration admin rule. - * - * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDefaultAdminRuleGet.json - */ -async function getsSecurityDefaultAdminRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleDefaultAdminRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.adminRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main(): Promise { - await getsSecurityAdminRule(); - await getsSecurityDefaultAdminRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/adminRulesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/adminRulesListSample.ts deleted file mode 100644 index 74ed363abd41..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/adminRulesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network manager security configuration admin rules. - * - * @summary List all network manager security configuration admin rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerAdminRuleList.json - */ -async function listSecurityAdminRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.adminRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts deleted file mode 100644 index ddc572dde1ef..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified private endpoint connection on application gateway. - * - * @summary Deletes the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json - */ -async function deleteApplicationGatewayPrivateEndpointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGatewayPrivateEndpointConnections.beginDeleteAndWait( - resourceGroupName, - applicationGatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts deleted file mode 100644 index 24097da80e1b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified private endpoint connection on application gateway. - * - * @summary Gets the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json - */ -async function getApplicationGatewayPrivateEndpointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGatewayPrivateEndpointConnections.get( - resourceGroupName, - applicationGatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts deleted file mode 100644 index fe550fa45c9f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all private endpoint connections on an application gateway. - * - * @summary Lists all private endpoint connections on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json - */ -async function listsAllPrivateEndpointConnectionsOnApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayPrivateEndpointConnections.list( - resourceGroupName, - applicationGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllPrivateEndpointConnectionsOnApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts deleted file mode 100644 index 44cc672f6dc5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ApplicationGatewayPrivateEndpointConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the specified private endpoint connection on application gateway. - * - * @summary Updates the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json - */ -async function updateApplicationGatewayPrivateEndpointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const connectionName = "connection1"; - const parameters: ApplicationGatewayPrivateEndpointConnection = { - name: "connection1", - privateEndpoint: { - id: "/subscriptions/subId2/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe", - }, - privateLinkServiceConnectionState: { - description: "approved it for some reason.", - status: "Approved", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGatewayPrivateEndpointConnections.beginUpdateAndWait( - resourceGroupName, - applicationGatewayName, - connectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateApplicationGatewayPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts deleted file mode 100644 index 6dcad2676ecc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all private link resources on an application gateway. - * - * @summary Lists all private link resources on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json - */ -async function listsAllPrivateLinkResourcesOnApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayPrivateLinkResources.list( - resourceGroupName, - applicationGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllPrivateLinkResourcesOnApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts deleted file mode 100644 index d7f65301ff50..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the regional application gateway waf manifest. - * - * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json - */ -async function getsWafDefaultManifest(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGatewayWafDynamicManifestsDefault.get(location); - console.log(result); -} - -async function main(): Promise { - await getsWafDefaultManifest(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts deleted file mode 100644 index a298a8fb8b49..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the regional application gateway waf manifest. - * - * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetApplicationGatewayWafDynamicManifests.json - */ -async function getsWafManifests(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGatewayWafDynamicManifests.list( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getsWafManifests(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts deleted file mode 100644 index ae1b2cef3c5e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ApplicationGatewayOnDemandProbe} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * - * @summary Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayBackendHealthTest.json - */ -async function testBackendHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const probeRequest: ApplicationGatewayOnDemandProbe = { - path: "/", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendaddressPools/MFAnalyticsPool", - }, - backendHttpSettings: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/MFPoolSettings", - }, - pickHostNameFromBackendHttpSettings: true, - timeout: 30, - protocol: "Http", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.beginBackendHealthOnDemandAndWait( - resourceGroupName, - applicationGatewayName, - probeRequest, - ); - console.log(result); -} - -async function main(): Promise { - await testBackendHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysBackendHealthSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysBackendHealthSample.ts deleted file mode 100644 index b595a0bb267a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysBackendHealthSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the backend health of the specified application gateway in a resource group. - * - * @summary Gets the backend health of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayBackendHealthGet.json - */ -async function getBackendHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "appgw"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginBackendHealthAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getBackendHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 50864b79cdfc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ApplicationGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified application gateway. - * - * @summary Creates or updates the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayCreate.json - */ -async function createApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const parameters: ApplicationGateway = { - backendAddressPools: [ - { - name: "appgwpool", - backendAddresses: [ - { ipAddress: "10.0.1.1" }, - { ipAddress: "10.0.1.2" }, - ], - }, - { - name: "appgwpool1", - backendAddresses: [ - { ipAddress: "10.0.0.1" }, - { ipAddress: "10.0.0.2" }, - ], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool1", - }, - ], - backendHttpSettingsCollection: [ - { - name: "appgwbhs", - cookieBasedAffinity: "Disabled", - port: 80, - requestTimeout: 30, - protocol: "Http", - }, - ], - entraJWTValidationConfigs: [ - { - name: "entraJWTValidationConfig1", - clientId: "37293f5a-97b3-451d-b786-f532d711c9ff", - tenantId: "70a036f6-8e4d-4615-bad6-149c02e7720d", - unAuthorizedRequestAction: "Deny", - }, - ], - frontendIPConfigurations: [ - { - name: "appgwfip", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/appgwpip", - }, - }, - ], - frontendPorts: [ - { name: "appgwfp", port: 443 }, - { name: "appgwfp80", port: 80 }, - ], - gatewayIPConfigurations: [ - { - name: "appgwipc", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet/subnets/appgwsubnet", - }, - }, - ], - globalConfiguration: { - enableRequestBuffering: true, - enableResponseBuffering: true, - }, - httpListeners: [ - { - name: "appgwhl", - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", - }, - frontendPort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp", - }, - requireServerNameIndication: false, - sslCertificate: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslCertificates/sslcert", - }, - sslProfile: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslProfiles/sslProfile1", - }, - protocol: "Https", - }, - { - name: "appgwhttplistener", - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip", - }, - frontendPort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp80", - }, - protocol: "Http", - }, - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "eastus", - requestRoutingRules: [ - { - name: "appgwrule", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool", - }, - backendHttpSettings: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs", - }, - entraJWTValidationConfig: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/entraJWTValidationConfigs/entraJWTValidationConfig1", - }, - httpListener: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhl", - }, - priority: 10, - rewriteRuleSet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1", - }, - ruleType: "Basic", - }, - ], - rewriteRuleSets: [ - { - name: "rewriteRuleSet1", - rewriteRules: [ - { - name: "Set X-Forwarded-For", - actionSet: { - requestHeaderConfigurations: [ - { - headerName: "X-Forwarded-For", - headerValue: "{var_add_x_forwarded_for_proxy}", - }, - ], - responseHeaderConfigurations: [ - { - headerName: "Strict-Transport-Security", - headerValue: "max-age=31536000", - }, - ], - urlConfiguration: { modifiedPath: "/abc" }, - }, - conditions: [ - { - ignoreCase: true, - negate: false, - pattern: "^Bearer", - variable: "http_req_Authorization", - }, - ], - ruleSequence: 102, - }, - ], - }, - ], - sku: { name: "Standard_v2", capacity: 3, tier: "Standard_v2" }, - sslCertificates: [ - { name: "sslcert", data: "****", password: "****" }, - { name: "sslcert2", keyVaultSecretId: "https://kv/secret" }, - ], - sslProfiles: [ - { - name: "sslProfile1", - clientAuthConfiguration: { verifyClientCertIssuerDN: true }, - sslPolicy: { - cipherSuites: ["TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"], - minProtocolVersion: "TLSv1_1", - policyType: "Custom", - }, - trustedClientCertificates: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/trustedClientCertificates/clientcert", - }, - ], - }, - ], - trustedClientCertificates: [{ name: "clientcert", data: "****" }], - trustedRootCertificates: [ - { name: "rootcert", data: "****" }, - { name: "rootcert1", keyVaultSecretId: "https://kv/secret" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - applicationGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysDeleteSample.ts deleted file mode 100644 index 9f6c5c962eab..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified application gateway. - * - * @summary Deletes the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayDelete.json - */ -async function deleteApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginDeleteAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysGetSample.ts deleted file mode 100644 index e8e7427e100c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified application gateway. - * - * @summary Gets the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayGet.json - */ -async function getApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.get( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts deleted file mode 100644 index 95663af6c47d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets Ssl predefined policy with the specified policy name. - * - * @summary Gets Ssl predefined policy with the specified policy name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json - */ -async function getAvailableSslPredefinedPolicyByName(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const predefinedPolicyName = "AppGwSslPolicy20150501"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.getSslPredefinedPolicy( - predefinedPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getAvailableSslPredefinedPolicyByName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAllSample.ts deleted file mode 100644 index 704a57e51060..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the application gateways in a subscription. - * - * @summary Gets all the application gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayListAll.json - */ -async function listsAllApplicationGatewaysInASubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllApplicationGatewaysInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts deleted file mode 100644 index 6dfc2cd9363a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all available request headers. - * - * @summary Lists all available request headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json - */ -async function getAvailableRequestHeaders(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableRequestHeaders(); - console.log(result); -} - -async function main(): Promise { - await getAvailableRequestHeaders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts deleted file mode 100644 index f042ff220d76..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all available response headers. - * - * @summary Lists all available response headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json - */ -async function getAvailableResponseHeaders(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.listAvailableResponseHeaders(); - console.log(result); -} - -async function main(): Promise { - await getAvailableResponseHeaders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts deleted file mode 100644 index 2c255abd7b53..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all available server variables. - * - * @summary Lists all available server variables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json - */ -async function getAvailableServerVariables(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationGateways.listAvailableServerVariables(); - console.log(result); -} - -async function main(): Promise { - await getAvailableServerVariables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts deleted file mode 100644 index ed489bd2c45b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists available Ssl options for configuring Ssl policy. - * - * @summary Lists available Ssl options for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json - */ -async function getAvailableSslOptions(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableSslOptions(); - console.log(result); -} - -async function main(): Promise { - await getAvailableSslOptions(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts deleted file mode 100644 index 3c0a2d0d91e4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all SSL predefined policies for configuring Ssl policy. - * - * @summary Lists all SSL predefined policies for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json - */ -async function getAvailableSslPredefinedPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.listAvailableSslPredefinedPolicies()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailableSslPredefinedPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts deleted file mode 100644 index fdbc7f936c0a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all available web application firewall rule sets. - * - * @summary Lists all available web application firewall rule sets. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json - */ -async function getAvailableWafRuleSets(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.listAvailableWafRuleSets(); - console.log(result); -} - -async function main(): Promise { - await getAvailableWafRuleSets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListSample.ts deleted file mode 100644 index 260765a1bddf..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all application gateways in a resource group. - * - * @summary Lists all application gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayList.json - */ -async function listsAllApplicationGatewaysInAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllApplicationGatewaysInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysStartSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysStartSample.ts deleted file mode 100644 index c07ea6df15fc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysStartSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts the specified application gateway. - * - * @summary Starts the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayStart.json - */ -async function startApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginStartAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await startApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysStopSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysStopSample.ts deleted file mode 100644 index f3e304a49f42..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysStopSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the specified application gateway in a resource group. - * - * @summary Stops the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayStop.json - */ -async function stopApplicationGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "appgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.beginStopAndWait( - resourceGroupName, - applicationGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await stopApplicationGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysUpdateTagsSample.ts deleted file mode 100644 index d3e7c5238e30..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the specified application gateway tags. - * - * @summary Updates the specified application gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationGatewayUpdateTags.json - */ -async function updateApplicationGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationGatewayName = "AppGw"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationGateways.updateTags( - resourceGroupName, - applicationGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateApplicationGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 390d0508deb9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ApplicationSecurityGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an application security group. - * - * @summary Creates or updates an application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupCreate.json - */ -async function createApplicationSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const parameters: ApplicationSecurityGroup = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.applicationSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - applicationSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsDeleteSample.ts deleted file mode 100644 index 3b2253f4c826..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified application security group. - * - * @summary Deletes the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupDelete.json - */ -async function deleteApplicationSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.beginDeleteAndWait( - resourceGroupName, - applicationSecurityGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsGetSample.ts deleted file mode 100644 index deebc64d4481..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified application security group. - * - * @summary Gets information about the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupGet.json - */ -async function getApplicationSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.get( - resourceGroupName, - applicationSecurityGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await getApplicationSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsListAllSample.ts deleted file mode 100644 index 3b4fe36b42be..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all application security groups in a subscription. - * - * @summary Gets all application security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupListAll.json - */ -async function listAllApplicationSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationSecurityGroups.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllApplicationSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsListSample.ts deleted file mode 100644 index d9e7029db1a5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the application security groups in a resource group. - * - * @summary Gets all the application security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupList.json - */ -async function listLoadBalancersInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationSecurityGroups.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listLoadBalancersInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts deleted file mode 100644 index bc914dd557f9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an application security group's tags. - * - * @summary Updates an application security group's tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ApplicationSecurityGroupUpdateTags.json - */ -async function updateApplicationSecurityGroupTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const applicationSecurityGroupName = "test-asg"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.applicationSecurityGroups.updateTags( - resourceGroupName, - applicationSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateApplicationSecurityGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/availableDelegationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/availableDelegationsListSample.ts deleted file mode 100644 index fafc495884aa..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/availableDelegationsListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all of the available subnet delegations for this subscription in this region. - * - * @summary Gets all of the available subnet delegations for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableDelegationsSubscriptionGet.json - */ -async function getAvailableDelegations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableDelegations.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailableDelegations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/availableEndpointServicesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/availableEndpointServicesListSample.ts deleted file mode 100644 index 031e2c3cec99..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/availableEndpointServicesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List what values of endpoint services are available for use. - * - * @summary List what values of endpoint services are available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EndpointServicesList.json - */ -async function endpointServicesList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableEndpointServices.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await endpointServicesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts deleted file mode 100644 index 91ecd5eed380..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * - * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json - */ -async function getAvailablePrivateEndpointTypesInTheResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availablePrivateEndpointTypes.listByResourceGroup( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailablePrivateEndpointTypesInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/availablePrivateEndpointTypesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/availablePrivateEndpointTypesListSample.ts deleted file mode 100644 index fe2e2fa09f8f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/availablePrivateEndpointTypesListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * - * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailablePrivateEndpointTypesGet.json - */ -async function getAvailablePrivateEndpointTypes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availablePrivateEndpointTypes.list( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailablePrivateEndpointTypes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/availableResourceGroupDelegationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/availableResourceGroupDelegationsListSample.ts deleted file mode 100644 index 4febf85450a1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/availableResourceGroupDelegationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all of the available subnet delegations for this resource group in this region. - * - * @summary Gets all of the available subnet delegations for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableDelegationsResourceGroupGet.json - */ -async function getAvailableDelegationsInTheResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableResourceGroupDelegations.list( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailableDelegationsInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/availableServiceAliasesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/availableServiceAliasesListByResourceGroupSample.ts deleted file mode 100644 index bed7d04d14af..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/availableServiceAliasesListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all available service aliases for this resource group in this region. - * - * @summary Gets all available service aliases for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableServiceAliasesListByResourceGroup.json - */ -async function getAvailableServiceAliasesInTheResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableServiceAliases.listByResourceGroup( - resourceGroupName, - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailableServiceAliasesInTheResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/availableServiceAliasesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/availableServiceAliasesListSample.ts deleted file mode 100644 index 3f4129015bbe..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/availableServiceAliasesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all available service aliases for this subscription in this region. - * - * @summary Gets all available service aliases for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AvailableServiceAliasesList.json - */ -async function getAvailableServiceAliases(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableServiceAliases.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAvailableServiceAliases(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallFqdnTagsListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallFqdnTagsListAllSample.ts deleted file mode 100644 index 5efe556c864b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallFqdnTagsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Azure Firewall FQDN Tags in a subscription. - * - * @summary Gets all the Azure Firewall FQDN Tags in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json - */ -async function listAllAzureFirewallFqdnTagsForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewallFqdnTags.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllAzureFirewallFqdnTagsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsCreateOrUpdateSample.ts deleted file mode 100644 index 90e75393abb5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsCreateOrUpdateSample.ts +++ /dev/null @@ -1,638 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { AzureFirewall} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPut.json - */ -async function createAzureFirewall(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], - }, - { - name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithAdditionalProperties.json - */ -async function createAzureFirewallWithAdditionalProperties(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - additionalProperties: { key1: "value1", key2: "value2" }, - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - ipGroups: [], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], - }, - { - name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithIpGroups.json - */ -async function createAzureFirewallWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], - }, - { - name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithZones.json - */ -async function createAzureFirewallWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US 2", - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], - }, - { - name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: ["1", "2", "3"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutWithMgmtSubnet.json - */ -async function createAzureFirewallWithManagementSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - applicationRuleCollections: [ - { - name: "apprulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - priority: 110, - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - targetFqdns: ["www.test.com"], - }, - ], - }, - ], - ipConfigurations: [ - { - name: "azureFirewallIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet", - }, - }, - ], - location: "West US", - managementIpConfiguration: { - name: "azureFirewallMgmtIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/managementPipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallManagementSubnet", - }, - }, - natRuleCollections: [ - { - name: "natrulecoll", - action: { type: "Dnat" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - priority: 112, - rules: [ - { - name: "DNAT-HTTPS-traffic", - description: "D-NAT all outbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["443"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedAddress: "1.2.3.5", - translatedPort: "8443", - }, - { - name: "DNAT-HTTP-traffic-With-FQDN", - description: "D-NAT all inbound web traffic for inspection", - destinationAddresses: ["1.2.3.4"], - destinationPorts: ["80"], - protocols: ["TCP"], - sourceAddresses: ["*"], - translatedFqdn: "internalhttpserver", - translatedPort: "880", - }, - ], - }, - ], - networkRuleCollections: [ - { - name: "netrulecoll", - action: { type: "Deny" }, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - priority: 112, - rules: [ - { - name: "L4-traffic", - description: "Block traffic based on source IPs and ports", - destinationAddresses: ["*"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: [ - "192.168.1.1-192.168.1.12", - "10.1.4.12-10.1.4.255", - ], - }, - { - name: "L4-traffic-with-FQDN", - description: - "Block traffic based on source IPs and ports to amazon", - destinationFqdns: ["www.amazon.com"], - destinationPorts: ["443-444", "8443"], - protocols: ["TCP"], - sourceAddresses: ["10.2.4.12-10.2.4.255"], - }, - ], - }, - ], - sku: { name: "AZFW_VNet", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Azure Firewall. - * - * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPutInHub.json - */ -async function createAzureFirewallInVirtualHub(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const parameters: AzureFirewall = { - firewallPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/policy1", - }, - hubIPAddresses: { publicIPs: { addresses: [], count: 1 } }, - location: "West US", - sku: { name: "AZFW_Hub", tier: "Standard" }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - zones: [], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginCreateOrUpdateAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createAzureFirewall(); - await createAzureFirewallWithAdditionalProperties(); - await createAzureFirewallWithIPGroups(); - await createAzureFirewallWithZones(); - await createAzureFirewallWithManagementSubnet(); - await createAzureFirewallInVirtualHub(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsDeleteSample.ts deleted file mode 100644 index 3ef8a684cf48..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Azure Firewall. - * - * @summary Deletes the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallDelete.json - */ -async function deleteAzureFirewall(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginDeleteAndWait( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteAzureFirewall(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsGetSample.ts deleted file mode 100644 index 60d21597136b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsGetSample.ts +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGet.json - */ -async function getAzureFirewall(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithAdditionalProperties.json - */ -async function getAzureFirewallWithAdditionalProperties(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithIpGroups.json - */ -async function getAzureFirewallWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithZones.json - */ -async function getAzureFirewallWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Azure Firewall. - * - * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallGetWithMgmtSubnet.json - */ -async function getAzureFirewallWithManagementSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azurefirewall"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.get( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -async function main(): Promise { - await getAzureFirewall(); - await getAzureFirewallWithAdditionalProperties(); - await getAzureFirewallWithIPGroups(); - await getAzureFirewallWithZones(); - await getAzureFirewallWithManagementSubnet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListAllSample.ts deleted file mode 100644 index a2c6c53d1e89..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Azure Firewalls in a subscription. - * - * @summary Gets all the Azure Firewalls in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListBySubscription.json - */ -async function listAllAzureFirewallsForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewalls.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllAzureFirewallsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListLearnedPrefixesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListLearnedPrefixesSample.ts deleted file mode 100644 index d13ba2dad60e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListLearnedPrefixesSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * - * @summary Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListLearnedIPPrefixes.json - */ -async function azureFirewallListLearnedPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginListLearnedPrefixesAndWait( - resourceGroupName, - azureFirewallName, - ); - console.log(result); -} - -async function main(): Promise { - await azureFirewallListLearnedPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListSample.ts deleted file mode 100644 index 388b675d1ac8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Azure Firewalls in a resource group. - * - * @summary Lists all Azure Firewalls in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallListByResourceGroup.json - */ -async function listAllAzureFirewallsForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.azureFirewalls.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllAzureFirewallsForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsPacketCaptureOperationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsPacketCaptureOperationSample.ts deleted file mode 100644 index 3abbcc4186bd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsPacketCaptureOperationSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FirewallPacketCaptureParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Runs a packet capture operation on AzureFirewall. - * - * @summary Runs a packet capture operation on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPacketCaptureOperation.json - */ -async function azureFirewallPacketCaptureOperation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const parameters: FirewallPacketCaptureParameters = { - durationInSeconds: 300, - fileName: "azureFirewallPacketCapture", - filters: [ - { - destinationPorts: ["4500"], - destinations: ["20.1.2.0"], - sources: ["20.1.1.0"], - }, - { - destinationPorts: ["123", "80"], - destinations: ["10.1.2.0"], - sources: ["10.1.1.0", "10.1.1.1"], - }, - ], - flags: [{ type: "syn" }, { type: "fin" }], - numberOfPacketsToCapture: 5000, - operation: "Status", - sasUrl: "someSASURL", - protocol: "Any", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginPacketCaptureOperationAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await azureFirewallPacketCaptureOperation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsPacketCaptureSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsPacketCaptureSample.ts deleted file mode 100644 index 90b16cacac2d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsPacketCaptureSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FirewallPacketCaptureParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Runs a packet capture on AzureFirewall. - * - * @summary Runs a packet capture on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallPacketCapture.json - */ -async function azureFirewallPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const azureFirewallName = "azureFirewall1"; - const parameters: FirewallPacketCaptureParameters = { - durationInSeconds: 300, - fileName: "azureFirewallPacketCapture", - filters: [ - { - destinationPorts: ["4500"], - destinations: ["20.1.2.0"], - sources: ["20.1.1.0"], - }, - { - destinationPorts: ["123", "80"], - destinations: ["10.1.2.0"], - sources: ["10.1.1.0", "10.1.1.1"], - }, - ], - flags: [{ type: "syn" }, { type: "fin" }], - numberOfPacketsToCapture: 5000, - sasUrl: "someSASURL", - protocol: "Any", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginPacketCaptureAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await azureFirewallPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsUpdateTagsSample.ts deleted file mode 100644 index 027a89d9d273..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/azureFirewallsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of an Azure Firewall resource. - * - * @summary Updates tags of an Azure Firewall resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureFirewallUpdateTags.json - */ -async function updateAzureFirewallTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "azfwtest"; - const azureFirewallName = "fw1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.azureFirewalls.beginUpdateTagsAndWait( - resourceGroupName, - azureFirewallName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateAzureFirewallTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsCreateOrUpdateSample.ts deleted file mode 100644 index a5022f8182d4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsCreateOrUpdateSample.ts +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { BastionHost} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPut.json - */ -async function createBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: BastionHost = { - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPutWithPrivateOnly.json - */ -async function createBastionHostWithPrivateOnly(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: BastionHost = { - enablePrivateOnlyBastion: true, - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPutWithZones.json - */ -async function createBastionHostWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: BastionHost = { - ipConfigurations: [ - { - name: "bastionHostIpConfiguration", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Bastion Host. - * - * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDeveloperPut.json - */ -async function createDeveloperBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg2"; - const bastionHostName = "bastionhostdeveloper"; - const parameters: BastionHost = { - ipConfigurations: [], - networkAcls: { ipRules: [{ addressPrefix: "1.1.1.1/16" }] }, - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginCreateOrUpdateAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createBastionHost(); - await createBastionHostWithPrivateOnly(); - await createBastionHostWithZones(); - await createDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsDeleteSample.ts deleted file mode 100644 index a21d2c89fd29..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsDeleteSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Bastion Host. - * - * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDelete.json - */ -async function deleteBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginDeleteAndWait( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deletes the specified Bastion Host. - * - * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDeveloperDelete.json - */ -async function deleteDeveloperBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg2"; - const bastionHostName = "bastionhostdeveloper"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginDeleteAndWait( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteBastionHost(); - await deleteDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsGetSample.ts deleted file mode 100644 index 9bc996855a8b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsGetSample.ts +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostGet.json - */ -async function getBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant'"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostGetWithPrivateOnly.json - */ -async function getBastionHostWithPrivateOnly(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostGetWithZones.json - */ -async function getBastionHostWithZones(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified Bastion Host. - * - * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostDeveloperGet.json - */ -async function getDeveloperBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhostdeveloper'"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.get( - resourceGroupName, - bastionHostName, - ); - console.log(result); -} - -async function main(): Promise { - await getBastionHost(); - await getBastionHostWithPrivateOnly(); - await getBastionHostWithZones(); - await getDeveloperBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsListByResourceGroupSample.ts deleted file mode 100644 index c5c757210d56..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Bastion Hosts in a resource group. - * - * @summary Lists all Bastion Hosts in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostListByResourceGroup.json - */ -async function listAllBastionHostsForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bastionHosts.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllBastionHostsForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsListSample.ts deleted file mode 100644 index 95a611f0eb10..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Bastion Hosts in a subscription. - * - * @summary Lists all Bastion Hosts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostListBySubscription.json - */ -async function listAllBastionHostsForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bastionHosts.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllBastionHostsForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsUpdateTagsSample.ts deleted file mode 100644 index 4a1782ff8d29..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/bastionHostsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates Tags for BastionHost resource - * - * @summary Updates Tags for BastionHost resource - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionHostPatch.json - */ -async function patchBastionHost(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.bastionHosts.beginUpdateTagsAndWait( - resourceGroupName, - bastionHostName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await patchBastionHost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/bgpServiceCommunitiesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/bgpServiceCommunitiesListSample.ts deleted file mode 100644 index 6502dadcd7cc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/bgpServiceCommunitiesListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the available bgp service communities. - * - * @summary Gets all the available bgp service communities. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceCommunityList.json - */ -async function serviceCommunityList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.bgpServiceCommunities.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await serviceCommunityList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/checkDnsNameAvailabilitySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/checkDnsNameAvailabilitySample.ts deleted file mode 100644 index 7630dbdae8f0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/checkDnsNameAvailabilitySample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * - * @summary Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckDnsNameAvailability.json - */ -async function checkDnsNameAvailability(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const domainNameLabel = "testdns"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.checkDnsNameAvailability( - location, - domainNameLabel, - ); - console.log(result); -} - -async function main(): Promise { - await checkDnsNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 8a1a52681363..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnServerConfigurationPolicyGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * - * @summary Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupPut.json - */ -async function configurationPolicyGroupPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup = - { - isDefault: true, - policyMembers: [ - { - name: "policy1", - attributeType: "RadiusAzureGroupId", - attributeValue: "6ad1bd08", - }, - { - name: "policy2", - attributeType: "CertificateGroupId", - attributeValue: "red.com", - }, - ], - priority: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.configurationPolicyGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - vpnServerConfigurationPolicyGroupParameters, - ); - console.log(result); -} - -async function main(): Promise { - await configurationPolicyGroupPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsDeleteSample.ts deleted file mode 100644 index 5f29520d2909..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a ConfigurationPolicyGroup. - * - * @summary Deletes a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupDelete.json - */ -async function configurationPolicyGroupDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.configurationPolicyGroups.beginDeleteAndWait( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await configurationPolicyGroupDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsGetSample.ts deleted file mode 100644 index fb49f380df59..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a ConfigurationPolicyGroup. - * - * @summary Retrieves the details of a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupGet.json - */ -async function configurationPolicyGroupGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const configurationPolicyGroupName = "policyGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.configurationPolicyGroups.get( - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await configurationPolicyGroupGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts deleted file mode 100644 index ada8d86e369a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * - * @summary Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json - */ -async function configurationPolicyGroupListByVpnServerConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.configurationPolicyGroups.listByVpnServerConfiguration( - resourceGroupName, - vpnServerConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await configurationPolicyGroupListByVpnServerConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsCreateOrUpdateSample.ts deleted file mode 100644 index d4e768b60c64..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsCreateOrUpdateSample.ts +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { ConnectionMonitor} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorCreate.json - */ -async function createConnectionMonitorV1(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: ConnectionMonitor = { - endpoints: [ - { - name: "source", - resourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/ct1", - }, - { name: "destination", address: "bing.com" }, - ], - location: "eastus", - testConfigurations: [ - { - name: "tcp", - tcpConfiguration: { port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "tg", - destinations: ["destination"], - sources: ["source"], - testConfigurations: ["tcp"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorV2Create.json - */ -async function createConnectionMonitorV2(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: ConnectionMonitor = { - endpoints: [ - { - name: "vm1", - resourceId: - "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/NwRgIrinaCentralUSEUAP/providers/Microsoft.Compute/virtualMachines/vm1", - }, - { - name: "CanaryWorkspaceVamshi", - filter: { - type: "Include", - items: [{ type: "AgentAddress", address: "npmuser" }], - }, - resourceId: - "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/vasamudrRG/providers/Microsoft.OperationalInsights/workspaces/vasamudrWorkspace", - }, - { name: "bing", address: "bing.com" }, - { name: "google", address: "google.com" }, - ], - outputs: [], - testConfigurations: [ - { - name: "testConfig1", - tcpConfiguration: { disableTraceRoute: false, port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "test1", - destinations: ["bing", "google"], - disable: false, - sources: ["vm1", "CanaryWorkspaceVamshi"], - testConfigurations: ["testConfig1"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a connection monitor. - * - * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json - */ -async function createConnectionMonitorWithArcNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: ConnectionMonitor = { - endpoints: [ - { - name: "vm1", - type: "AzureVM", - resourceId: - "/subscriptions/9cece3e3-0f7d-47ca-af0e-9772773f90b7/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/TESTVM", - }, - { name: "bing", type: "ExternalAddress", address: "bing.com" }, - { name: "google", type: "ExternalAddress", address: "google.com" }, - { - name: "ArcBasedNetwork", - type: "AzureArcNetwork", - locationDetails: { region: "eastus" }, - scope: { include: [{ address: "172.21.128.0/20" }] }, - subscriptionId: "9cece3e3-0f7d-47ca-af0e-9772773f90b7", - }, - ], - outputs: [], - testConfigurations: [ - { - name: "testConfig1", - tcpConfiguration: { disableTraceRoute: false, port: 80 }, - testFrequencySec: 60, - protocol: "Tcp", - }, - ], - testGroups: [ - { - name: "test1", - destinations: ["bing", "google"], - disable: false, - sources: ["vm1", "ArcBasedNetwork"], - testConfigurations: ["testConfig1"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createConnectionMonitorV1(); - await createConnectionMonitorV2(); - await createConnectionMonitorWithArcNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsDeleteSample.ts deleted file mode 100644 index eb5f7cbadc1c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified connection monitor. - * - * @summary Deletes the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorDelete.json - */ -async function deleteConnectionMonitor(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsGetSample.ts deleted file mode 100644 index f341bbf7b89d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a connection monitor by name. - * - * @summary Gets a connection monitor by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorGet.json - */ -async function getConnectionMonitor(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.get( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main(): Promise { - await getConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsListSample.ts deleted file mode 100644 index a51c35f3c9d4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all connection monitors for the specified Network Watcher. - * - * @summary Lists all connection monitors for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorList.json - */ -async function listConnectionMonitors(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.connectionMonitors.list( - resourceGroupName, - networkWatcherName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listConnectionMonitors(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsStopSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsStopSample.ts deleted file mode 100644 index ae9a6131bfa2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsStopSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the specified connection monitor. - * - * @summary Stops the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorStop.json - */ -async function stopConnectionMonitor(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.beginStopAndWait( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - ); - console.log(result); -} - -async function main(): Promise { - await stopConnectionMonitor(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsUpdateTagsSample.ts deleted file mode 100644 index cb8b93b9a4e6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/connectionMonitorsUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update tags of the specified connection monitor. - * - * @summary Update tags of the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json - */ -async function updateConnectionMonitorTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const connectionMonitorName = "cm1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectionMonitors.updateTags( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateConnectionMonitorTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 971731171ebf..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectivityConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates/Updates a new network manager connectivity configuration - * - * @summary Creates/Updates a new network manager connectivity configuration - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationPut.json - */ -async function connectivityConfigurationsPut(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const connectivityConfiguration: ConnectivityConfiguration = { - description: "Sample Configuration", - appliesToGroups: [ - { - groupConnectivity: "None", - isGlobal: "False", - networkGroupId: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/group1", - useHubGateway: "True", - }, - ], - connectivityCapabilities: { - connectedGroupAddressOverlap: "Allowed", - connectedGroupPrivateEndpointsScale: "Standard", - peeringEnforcement: "Unenforced", - }, - connectivityTopology: "HubAndSpoke", - deleteExistingPeering: "True", - hubs: [ - { - resourceId: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myTestConnectivityConfig", - resourceType: "Microsoft.Network/virtualNetworks", - }, - ], - isGlobal: "True", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - connectivityConfiguration, - ); - console.log(result); -} - -async function main(): Promise { - await connectivityConfigurationsPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsDeleteSample.ts deleted file mode 100644 index 4fd68bfbba18..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectivityConfigurationsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * - * @summary Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json - */ -async function connectivityConfigurationsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const force = false; - const options: ConnectivityConfigurationsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await connectivityConfigurationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsGetSample.ts deleted file mode 100644 index 8da8e0804342..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * - * @summary Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationGet.json - */ -async function connectivityConfigurationsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestConnectivityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.connectivityConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main(): Promise { - await connectivityConfigurationsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsListSample.ts deleted file mode 100644 index c050a97078f8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/connectivityConfigurationsListSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the network manager connectivity configuration in a specified network manager. - * - * @summary Lists all the network manager connectivity configuration in a specified network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectivityConfigurationList.json - */ -async function connectivityConfigurationsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.connectivityConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await connectivityConfigurationsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesCreateOrUpdateSample.ts deleted file mode 100644 index ee8184724a76..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesCreateOrUpdateSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { CustomIpPrefix} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a custom IP prefix. - * - * @summary Creates or updates a custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixCreateCustomizedValues.json - */ -async function createCustomIPPrefixAllocationMethod(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const parameters: CustomIpPrefix = { cidr: "0.0.0.0/24", location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - customIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createCustomIPPrefixAllocationMethod(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesDeleteSample.ts deleted file mode 100644 index a6ad06fa8e21..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified custom IP prefix. - * - * @summary Deletes the specified custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixDelete.json - */ -async function deleteCustomIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.beginDeleteAndWait( - resourceGroupName, - customIpPrefixName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteCustomIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesGetSample.ts deleted file mode 100644 index 01c40540de33..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified custom IP prefix in a specified resource group. - * - * @summary Gets the specified custom IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixGet.json - */ -async function getCustomIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.get( - resourceGroupName, - customIpPrefixName, - ); - console.log(result); -} - -async function main(): Promise { - await getCustomIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesListAllSample.ts deleted file mode 100644 index 009e7d9e10b1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the custom IP prefixes in a subscription. - * - * @summary Gets all the custom IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixListAll.json - */ -async function listAllCustomIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.customIPPrefixes.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllCustomIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesListSample.ts deleted file mode 100644 index 1e1c98db830a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all custom IP prefixes in a resource group. - * - * @summary Gets all custom IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixList.json - */ -async function listResourceGroupCustomIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.customIPPrefixes.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listResourceGroupCustomIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesUpdateTagsSample.ts deleted file mode 100644 index 3231a90497cb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/customIPPrefixesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates custom IP prefix tags. - * - * @summary Updates custom IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CustomIpPrefixUpdateTags.json - */ -async function updatePublicIPAddressTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const customIpPrefixName = "test-customipprefix"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.customIPPrefixes.updateTags( - resourceGroupName, - customIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updatePublicIPAddressTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index 3066949a48e8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { DdosCustomPolicy} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a DDoS custom policy. - * - * @summary Creates or updates a DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyCreate.json - */ -async function createDDoSCustomPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const parameters: DdosCustomPolicy = { - detectionRules: [ - { - name: "detectionRuleTcp", - detectionMode: "TrafficThreshold", - trafficDetectionRule: { packetsPerSecond: 1000000, trafficType: "Tcp" }, - }, - ], - location: "centraluseuap", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - ddosCustomPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesDeleteSample.ts deleted file mode 100644 index 54b335f6a278..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified DDoS custom policy. - * - * @summary Deletes the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyDelete.json - */ -async function deleteDDoSCustomPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.beginDeleteAndWait( - resourceGroupName, - ddosCustomPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesGetSample.ts deleted file mode 100644 index 77566f0ca6e7..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified DDoS custom policy. - * - * @summary Gets information about the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyGet.json - */ -async function getDDoSCustomPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.get( - resourceGroupName, - ddosCustomPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getDDoSCustomPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts deleted file mode 100644 index e40ed50a2ca5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update a DDoS custom policy tags. - * - * @summary Update a DDoS custom policy tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosCustomPolicyUpdateTags.json - */ -async function dDoSCustomPolicyUpdateTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosCustomPolicyName = "test-ddos-custom-policy"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosCustomPolicies.updateTags( - resourceGroupName, - ddosCustomPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await dDoSCustomPolicyUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts deleted file mode 100644 index c94de9c1bef6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - DdosProtectionPlan} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a DDoS protection plan. - * - * @summary Creates or updates a DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanCreate.json - */ -async function createDDoSProtectionPlan(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const parameters: DdosProtectionPlan = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.beginCreateOrUpdateAndWait( - resourceGroupName, - ddosProtectionPlanName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansDeleteSample.ts deleted file mode 100644 index 7f27f8ef6a51..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified DDoS protection plan. - * - * @summary Deletes the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanDelete.json - */ -async function deleteDDoSProtectionPlan(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.beginDeleteAndWait( - resourceGroupName, - ddosProtectionPlanName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansGetSample.ts deleted file mode 100644 index cf6fdb947582..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified DDoS protection plan. - * - * @summary Gets information about the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanGet.json - */ -async function getDDoSProtectionPlan(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.get( - resourceGroupName, - ddosProtectionPlanName, - ); - console.log(result); -} - -async function main(): Promise { - await getDDoSProtectionPlan(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts deleted file mode 100644 index d51ff6c4a8ca..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the DDoS protection plans in a resource group. - * - * @summary Gets all the DDoS protection plans in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanList.json - */ -async function listDDoSProtectionPlansInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ddosProtectionPlans.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listDDoSProtectionPlansInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansListSample.ts deleted file mode 100644 index d9a5e58cf379..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all DDoS protection plans in a subscription. - * - * @summary Gets all DDoS protection plans in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanListAll.json - */ -async function listAllDDoSProtectionPlans(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ddosProtectionPlans.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllDDoSProtectionPlans(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansUpdateTagsSample.ts deleted file mode 100644 index 93437e8cd9b8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ddosProtectionPlansUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update a DDoS protection plan tags. - * - * @summary Update a DDoS protection plan tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DdosProtectionPlanUpdateTags.json - */ -async function dDoSProtectionPlanUpdateTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ddosProtectionPlanName = "test-plan"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ddosProtectionPlans.updateTags( - resourceGroupName, - ddosProtectionPlanName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await dDoSProtectionPlanUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/defaultSecurityRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/defaultSecurityRulesGetSample.ts deleted file mode 100644 index 045c432c164e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/defaultSecurityRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified default network security rule. - * - * @summary Get the specified default network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DefaultSecurityRuleGet.json - */ -async function defaultSecurityRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkSecurityGroupName = "nsg1"; - const defaultSecurityRuleName = "AllowVnetInBound"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.defaultSecurityRules.get( - resourceGroupName, - networkSecurityGroupName, - defaultSecurityRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await defaultSecurityRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/defaultSecurityRulesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/defaultSecurityRulesListSample.ts deleted file mode 100644 index a14c3d9288f5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/defaultSecurityRulesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all default security rules in a network security group. - * - * @summary Gets all default security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DefaultSecurityRuleList.json - */ -async function defaultSecurityRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkSecurityGroupName = "nsg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.defaultSecurityRules.list( - resourceGroupName, - networkSecurityGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await defaultSecurityRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/deleteBastionShareableLinkByTokenSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/deleteBastionShareableLinkByTokenSample.ts deleted file mode 100644 index 19e991016571..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/deleteBastionShareableLinkByTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BastionShareableLinkTokenListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the Bastion Shareable Links for all the tokens specified in the request. - * - * @summary Deletes the Bastion Shareable Links for all the tokens specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkDeleteByToken.json - */ -async function deleteBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslTokenRequest: BastionShareableLinkTokenListRequest = { - tokens: [ - "abcd1234-efgh-hijk-5678-abcdefgh1234", - "dcba4321-hgfe-kjih-8765-hgfedcba4321", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginDeleteBastionShareableLinkByTokenAndWait( - resourceGroupName, - bastionHostName, - bslTokenRequest, - ); - console.log(result); -} - -async function main(): Promise { - await deleteBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/deleteBastionShareableLinkSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/deleteBastionShareableLinkSample.ts deleted file mode 100644 index 5fe2cd046093..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/deleteBastionShareableLinkSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BastionShareableLinkListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Deletes the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkDelete.json - */ -async function deleteBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest: BastionShareableLinkListRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.beginDeleteBastionShareableLinkAndWait( - resourceGroupName, - bastionHostName, - bslRequest, - ); - console.log(result); -} - -async function main(): Promise { - await deleteBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/disconnectActiveSessionsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/disconnectActiveSessionsSample.ts deleted file mode 100644 index 1e3e46af719a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/disconnectActiveSessionsSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { SessionIds} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. - * - * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionSessionDelete.json - */ -async function deletesTheSpecifiedActiveSession(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const sessionIds: SessionIds = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.listDisconnectActiveSessions( - resourceGroupName, - bastionHostName, - sessionIds, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await deletesTheSpecifiedActiveSession(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationCreateOrUpdateSample.ts deleted file mode 100644 index 5ee041632229..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationCreateOrUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { DscpConfiguration} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a DSCP Configuration. - * - * @summary Creates or updates a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationCreate.json - */ -async function createDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpconfig"; - const parameters: DscpConfiguration = { - location: "eastus", - qosDefinitionCollection: [ - { - destinationIpRanges: [{ endIP: "127.0.10.2", startIP: "127.0.10.1" }], - destinationPortRanges: [{ end: 15, start: 15 }], - markings: [1], - sourceIpRanges: [{ endIP: "127.0.0.2", startIP: "127.0.0.1" }], - sourcePortRanges: [ - { end: 11, start: 10 }, - { end: 21, start: 20 }, - ], - protocol: "Tcp", - }, - { - destinationIpRanges: [{ endIP: "12.0.10.2", startIP: "12.0.10.1" }], - destinationPortRanges: [{ end: 52, start: 51 }], - markings: [2], - sourceIpRanges: [{ endIP: "12.0.0.2", startIP: "12.0.0.1" }], - sourcePortRanges: [{ end: 12, start: 11 }], - protocol: "Udp", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.dscpConfigurationOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - dscpConfigurationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationDeleteSample.ts deleted file mode 100644 index 300160211a32..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a DSCP Configuration. - * - * @summary Deletes a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationDelete.json - */ -async function deleteDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.beginDeleteAndWait( - resourceGroupName, - dscpConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationGetSample.ts deleted file mode 100644 index 567ff7c80a53..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a DSCP Configuration. - * - * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationGet.json - */ -async function getDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const dscpConfigurationName = "mydscpConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.dscpConfigurationOperations.get( - resourceGroupName, - dscpConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationListAllSample.ts deleted file mode 100644 index fa4707dd4259..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all dscp configurations in a subscription. - * - * @summary Gets all dscp configurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationListAll.json - */ -async function listAllNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.dscpConfigurationOperations.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationListSample.ts deleted file mode 100644 index e8c65d63f939..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/dscpConfigurationListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a DSCP Configuration. - * - * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/DscpConfigurationList.json - */ -async function getDscpConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.dscpConfigurationOperations.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getDscpConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts deleted file mode 100644 index 6601e16793a7..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCircuitAuthorization} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an authorization in the specified express route circuit. - * - * @summary Creates or updates an authorization in the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json - */ -async function createExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizatinName"; - const authorizationParameters: ExpressRouteCircuitAuthorization = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitAuthorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - authorizationName, - authorizationParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts deleted file mode 100644 index bc8dad6f1d2d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified authorization from the specified express route circuit. - * - * @summary Deletes the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json - */ -async function deleteExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitAuthorizations.beginDeleteAndWait( - resourceGroupName, - circuitName, - authorizationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts deleted file mode 100644 index 5d11332b71ab..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified authorization from the specified express route circuit. - * - * @summary Gets the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationGet.json - */ -async function getExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitAuthorizations.get( - resourceGroupName, - circuitName, - authorizationName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsListSample.ts deleted file mode 100644 index d09c01d045de..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitAuthorizationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all authorizations in an express route circuit. - * - * @summary Gets all authorizations in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitAuthorizationList.json - */ -async function listExpressRouteCircuitAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitAuthorizations.list( - resourceGroupName, - circuitName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteCircuitAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 67505d778227..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCircuitConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @summary Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionCreate.json - */ -async function expressRouteCircuitConnectionCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection = - { - addressPrefix: "10.0.0.0/29", - authorizationKey: "946a1918-b7a2-4917-b43c-8c4cdaee006a", - expressRouteCircuitPeering: { - id: "/subscriptions/subid1/resourceGroups/dedharcktinit/providers/Microsoft.Network/expressRouteCircuits/dedharcktlocal/peerings/AzurePrivatePeering", - }, - ipv6CircuitConnectionConfig: { addressPrefix: "aa:bb::/125" }, - peerExpressRouteCircuitPeering: { - id: "/subscriptions/subid2/resourceGroups/dedharcktpeer/providers/Microsoft.Network/expressRouteCircuits/dedharcktremote/peerings/AzurePrivatePeering", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - peeringName, - connectionName, - expressRouteCircuitConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteCircuitConnectionCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts deleted file mode 100644 index 151fd8e36568..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @summary Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionDelete.json - */ -async function deleteExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitConnections.beginDeleteAndWait( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsGetSample.ts deleted file mode 100644 index 51c192d1b0c7..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Express Route Circuit Connection from the specified express route circuit. - * - * @summary Gets the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionGet.json - */ -async function expressRouteCircuitConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "circuitConnectionUSAUS"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitConnections.get( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteCircuitConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsListSample.ts deleted file mode 100644 index c76cc815da65..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitConnectionsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all global reach connections associated with a private peering in an express route circuit. - * - * @summary Gets all global reach connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitConnectionList.json - */ -async function listExpressRouteCircuitConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitConnections.list( - resourceGroupName, - circuitName, - peeringName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteCircuitConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts deleted file mode 100644 index 95b612c2178a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCircuitPeering} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a peering in the specified express route circuits. - * - * @summary Creates or updates a peering in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringCreate.json - */ -async function createExpressRouteCircuitPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "AzurePrivatePeering"; - const peeringParameters: ExpressRouteCircuitPeering = { - peerASN: 200, - primaryPeerAddressPrefix: "192.168.16.252/30", - secondaryPeerAddressPrefix: "192.168.18.252/30", - vlanId: 200, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuitPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - peeringName, - peeringParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts deleted file mode 100644 index cd1237ce282a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified peering from the specified express route circuit. - * - * @summary Deletes the specified peering from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringDelete.json - */ -async function deleteExpressRouteCircuitPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitPeerings.beginDeleteAndWait( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsGetSample.ts deleted file mode 100644 index 520a505e9675..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified peering for the express route circuit. - * - * @summary Gets the specified peering for the express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringGet.json - */ -async function getExpressRouteCircuitPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "MicrosoftPeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuitPeerings.get( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCircuitPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsListSample.ts deleted file mode 100644 index 493552648ce4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitPeeringsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all peerings in a specified express route circuit. - * - * @summary Gets all peerings in a specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringList.json - */ -async function listExpressRouteCircuitPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuitPeerings.list( - resourceGroupName, - circuitName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteCircuitPeerings(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts deleted file mode 100644 index 335e0e1cfd32..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCircuit} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an express route circuit. - * - * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitCreate.json - */ -async function createExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const parameters: ExpressRouteCircuit = { - allowClassicOperations: false, - authorizations: [], - location: "Brazil South", - peerings: [], - serviceProviderProperties: { - bandwidthInMbps: 200, - peeringLocation: "Silicon Valley", - serviceProviderName: "Equinix", - }, - sku: { - name: "Standard_MeteredData", - family: "MeteredData", - tier: "Standard", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an express route circuit. - * - * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json - */ -async function createExpressRouteCircuitOnExpressRoutePort(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "expressRouteCircuit1"; - const parameters: ExpressRouteCircuit = { - authorizationKey: "b0be57f5-1fba-463b-adec-ffe767354cdd", - bandwidthInGbps: 10, - enableDirectPortRateLimit: false, - expressRoutePort: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRoutePorts/portName", - }, - location: "westus", - sku: { - name: "Premium_MeteredData", - family: "MeteredData", - tier: "Premium", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginCreateOrUpdateAndWait( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createExpressRouteCircuit(); - await createExpressRouteCircuitOnExpressRoutePort(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsDeleteSample.ts deleted file mode 100644 index d56581a3b339..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified express route circuit. - * - * @summary Deletes the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitDelete.json - */ -async function deleteExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginDeleteAndWait( - resourceGroupName, - circuitName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts deleted file mode 100644 index e737f1698c27..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all stats from an express route circuit in a resource group. - * - * @summary Gets all stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitPeeringStats.json - */ -async function getExpressRouteCircuitPeeringTrafficStats(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.getPeeringStats( - resourceGroupName, - circuitName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCircuitPeeringTrafficStats(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetSample.ts deleted file mode 100644 index a00ad69f406f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified express route circuit. - * - * @summary Gets information about the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitGet.json - */ -async function getExpressRouteCircuit(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.get( - resourceGroupName, - circuitName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCircuit(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetStatsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetStatsSample.ts deleted file mode 100644 index 346ce7de9106..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsGetStatsSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the stats from an express route circuit in a resource group. - * - * @summary Gets all the stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitStats.json - */ -async function getExpressRouteCircuitTrafficStats(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.getStats( - resourceGroupName, - circuitName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCircuitTrafficStats(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListAllSample.ts deleted file mode 100644 index 5b5a80fff24f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the express route circuits in a subscription. - * - * @summary Gets all the express route circuits in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitListBySubscription.json - */ -async function listExpressRouteCircuitsInASubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuits.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteCircuitsInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListArpTableSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListArpTableSample.ts deleted file mode 100644 index 5db37c07ca5a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListArpTableSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitARPTableList.json - */ -async function listArpTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListArpTableAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await listArpTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListRoutesTableSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListRoutesTableSample.ts deleted file mode 100644 index cfcb1e2a4912..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListRoutesTableSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the currently advertised routes table associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised routes table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitRouteTableList.json - */ -async function listRouteTables(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.beginListRoutesTableAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await listRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts deleted file mode 100644 index 5077bdf1d7a6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * - * @summary Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json - */ -async function listRouteTableSummary(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "circuitName"; - const peeringName = "peeringName"; - const devicePath = "devicePath"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCircuits.beginListRoutesTableSummaryAndWait( - resourceGroupName, - circuitName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await listRouteTableSummary(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListSample.ts deleted file mode 100644 index 1fac3f08ba30..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the express route circuits in a resource group. - * - * @summary Gets all the express route circuits in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitListByResourceGroup.json - */ -async function listExpressRouteCircuitsInAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCircuits.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteCircuitsInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsUpdateTagsSample.ts deleted file mode 100644 index 4377297ad0dd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCircuitsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an express route circuit tags. - * - * @summary Updates an express route circuit tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCircuitUpdateTags.json - */ -async function updateExpressRouteCircuitTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "ertest"; - const circuitName = "er1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCircuits.updateTags( - resourceGroupName, - circuitName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateExpressRouteCircuitTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index c80f5513dd2d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * - * @summary Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionCreate.json - */ -async function expressRouteConnectionCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "gateway-2"; - const connectionName = "connectionName"; - const putExpressRouteConnectionParameters: ExpressRouteConnection = { - name: "connectionName", - authorizationKey: "authorizationKey", - expressRouteCircuitPeering: { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering", - }, - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/gateway-2/expressRouteConnections/connectionName", - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - }, - routingWeight: 2, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRouteGatewayName, - connectionName, - putExpressRouteConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteConnectionCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsDeleteSample.ts deleted file mode 100644 index 6229aea64b93..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a connection to a ExpressRoute circuit. - * - * @summary Deletes a connection to a ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionDelete.json - */ -async function expressRouteConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const connectionName = "connectionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.beginDeleteAndWait( - resourceGroupName, - expressRouteGatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsGetSample.ts deleted file mode 100644 index d73a3344f9ab..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsGetSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified ExpressRouteConnection. - * - * @summary Gets the specified ExpressRouteConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionGet.json - */ -async function expressRouteConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const connectionName = "connectionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.get( - resourceGroupName, - expressRouteGatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsListSample.ts deleted file mode 100644 index 7f7ca42a2930..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteConnectionsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists ExpressRouteConnections. - * - * @summary Lists ExpressRouteConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteConnectionList.json - */ -async function expressRouteConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteConnections.list( - resourceGroupName, - expressRouteGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts deleted file mode 100644 index d7a4e5af4a5b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCrossConnectionPeering} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @summary Creates or updates a peering in the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json - */ -async function expressRouteCrossConnectionBgpPeeringCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const peeringParameters: ExpressRouteCrossConnectionPeering = { - ipv6PeeringConfig: { - primaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::/126", - secondaryPeerAddressPrefix: "3FFE:FFFF:0:CD30::4/126", - }, - peerASN: 200, - primaryPeerAddressPrefix: "192.168.16.252/30", - secondaryPeerAddressPrefix: "192.168.18.252/30", - vlanId: 200, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnectionPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - peeringParameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteCrossConnectionBgpPeeringCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts deleted file mode 100644 index 96746a9b3fd8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @summary Deletes the specified peering from the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json - */ -async function deleteExpressRouteCrossConnectionBgpPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnectionPeerings.beginDeleteAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRouteCrossConnectionBgpPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts deleted file mode 100644 index bca6150c9d30..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified peering for the ExpressRouteCrossConnection. - * - * @summary Gets the specified peering for the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json - */ -async function getExpressRouteCrossConnectionBgpPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnectionPeerings.get( - resourceGroupName, - crossConnectionName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCrossConnectionBgpPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts deleted file mode 100644 index 3b12464e137f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @summary Gets all peerings in a specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json - */ -async function expressRouteCrossConnectionBgpPeeringList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnectionPeerings.list( - resourceGroupName, - crossConnectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRouteCrossConnectionBgpPeeringList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index eaf7ecee7a8c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteCrossConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update the specified ExpressRouteCrossConnection. - * - * @summary Update the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionUpdate.json - */ -async function updateExpressRouteCrossConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const parameters: ExpressRouteCrossConnection = { - serviceProviderProvisioningState: "NotProvisioned", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - crossConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateExpressRouteCrossConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsGetSample.ts deleted file mode 100644 index 473def1a59a5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsGetSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets details about the specified ExpressRouteCrossConnection. - * - * @summary Gets details about the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionGet.json - */ -async function getExpressRouteCrossConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.get( - resourceGroupName, - crossConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCrossConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts deleted file mode 100644 index 2cc2571fc03b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @summary Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsArpTable.json - */ -async function getExpressRouteCrossConnectionsArpTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginListArpTableAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCrossConnectionsArpTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts deleted file mode 100644 index 4c6122345a38..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @summary Retrieves all the ExpressRouteCrossConnections in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json - */ -async function expressRouteCrossConnectionListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnections.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRouteCrossConnectionListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts deleted file mode 100644 index 12cbd1ef6939..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @summary Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json - */ -async function getExpressRouteCrossConnectionsRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginListRoutesTableAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCrossConnectionsRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts deleted file mode 100644 index 6cd4a4f0cf25..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the route table summary associated with the express route cross connection in a resource group. - * - * @summary Gets the route table summary associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json - */ -async function getExpressRouteCrossConnectionsRouteTableSummary(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const peeringName = "AzurePrivatePeering"; - const devicePath = "primary"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteCrossConnections.beginListRoutesTableSummaryAndWait( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRouteCrossConnectionsRouteTableSummary(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListSample.ts deleted file mode 100644 index 246a69735b5d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @summary Retrieves all the ExpressRouteCrossConnections in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionList.json - */ -async function expressRouteCrossConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteCrossConnections.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRouteCrossConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts deleted file mode 100644 index 9fb54128b985..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an express route cross connection tags. - * - * @summary Updates an express route cross connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json - */ -async function updateExpressRouteCrossConnectionTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "CrossConnection-SiliconValley"; - const crossConnectionName = ""; - const crossConnectionParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteCrossConnections.updateTags( - resourceGroupName, - crossConnectionName, - crossConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateExpressRouteCrossConnectionTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 9f9709010620..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a ExpressRoute gateway in a specified resource group. - * - * @summary Creates or updates a ExpressRoute gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayCreate.json - */ -async function expressRouteGatewayCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "gateway-2"; - const putExpressRouteGatewayParameters: ExpressRouteGateway = { - allowNonVirtualWanTraffic: false, - autoScaleConfiguration: { bounds: { min: 3 } }, - location: "westus", - virtualHub: { - id: "/subscriptions/subid/resourceGroups/resourceGroupId/providers/Microsoft.Network/virtualHubs/virtualHubName", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRouteGatewayName, - putExpressRouteGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysDeleteSample.ts deleted file mode 100644 index 76d66d87e37d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysDeleteSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * - * @summary Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayDelete.json - */ -async function expressRouteGatewayDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginDeleteAndWait( - resourceGroupName, - expressRouteGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysGetSample.ts deleted file mode 100644 index e805e43e68be..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysGetSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Fetches the details of a ExpressRoute gateway in a resource group. - * - * @summary Fetches the details of a ExpressRoute gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayGet.json - */ -async function expressRouteGatewayGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.get( - resourceGroupName, - expressRouteGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts deleted file mode 100644 index 8e3ddb0a6fd3..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists ExpressRoute gateways in a given resource group. - * - * @summary Lists ExpressRoute gateways in a given resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayListByResourceGroup.json - */ -async function expressRouteGatewayListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRouteGateways.listByResourceGroup(resourceGroupName); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts deleted file mode 100644 index de2cb234106e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists ExpressRoute gateways under a given subscription. - * - * @summary Lists ExpressRoute gateways under a given subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayListBySubscription.json - */ -async function expressRouteGatewayListBySubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.listBySubscription(); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysUpdateTagsSample.ts deleted file mode 100644 index 056e27deceb5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates express route gateway tags. - * - * @summary Updates express route gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteGatewayUpdateTags.json - */ -async function expressRouteGatewayUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resourceGroupName"; - const expressRouteGatewayName = "expressRouteGatewayName"; - const expressRouteGatewayParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteGateways.beginUpdateTagsAndWait( - resourceGroupName, - expressRouteGatewayName, - expressRouteGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteLinksGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteLinksGetSample.ts deleted file mode 100644 index 85d67a296190..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteLinksGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the specified ExpressRouteLink resource. - * - * @summary Retrieves the specified ExpressRouteLink resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteLinkGet.json - */ -async function expressRouteLinkGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const linkName = "linkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteLinks.get( - resourceGroupName, - expressRoutePortName, - linkName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRouteLinkGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteLinksListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteLinksListSample.ts deleted file mode 100644 index b8b14f8bcc62..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteLinksListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * - * @summary Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteLinkList.json - */ -async function expressRouteLinkGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteLinks.list( - resourceGroupName, - expressRoutePortName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRouteLinkGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts deleted file mode 100644 index b793bdf92b86..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRoutePortAuthorization} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an authorization in the specified express route port. - * - * @summary Creates or updates an authorization in the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationCreate.json - */ -async function createExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizatinName"; - const authorizationParameters: ExpressRoutePortAuthorization = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.expressRoutePortAuthorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - authorizationName, - authorizationParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts deleted file mode 100644 index 1f007a97e9a4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified authorization from the specified express route port. - * - * @summary Deletes the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationDelete.json - */ -async function deleteExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortAuthorizations.beginDeleteAndWait( - resourceGroupName, - expressRoutePortName, - authorizationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsGetSample.ts deleted file mode 100644 index d2d5d3009e15..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified authorization from the specified express route port. - * - * @summary Gets the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationGet.json - */ -async function getExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const authorizationName = "authorizationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortAuthorizations.get( - resourceGroupName, - expressRoutePortName, - authorizationName, - ); - console.log(result); -} - -async function main(): Promise { - await getExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsListSample.ts deleted file mode 100644 index 991c346feaaf..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortAuthorizationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all authorizations in an express route port. - * - * @summary Gets all authorizations in an express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortAuthorizationList.json - */ -async function listExpressRoutePortAuthorization(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "expressRoutePortName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePortAuthorizations.list( - resourceGroupName, - expressRoutePortName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRoutePortAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsCreateOrUpdateSample.ts deleted file mode 100644 index d4f45771bf9a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsCreateOrUpdateSample.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { ExpressRoutePort} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. - * - * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortCreate.json - */ -async function expressRoutePortCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters: ExpressRoutePort = { - bandwidthInGbps: 100, - billingType: "UnlimitedData", - encapsulation: "QinQ", - location: "westus", - peeringLocation: "peeringLocationName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. - * - * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortUpdateLink.json - */ -async function expressRoutePortUpdateLink(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters: ExpressRoutePort = { - bandwidthInGbps: 100, - billingType: "UnlimitedData", - encapsulation: "QinQ", - links: [{ name: "link1", adminState: "Enabled" }], - location: "westus", - peeringLocation: "peeringLocationName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginCreateOrUpdateAndWait( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRoutePortCreate(); - await expressRoutePortUpdateLink(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsDeleteSample.ts deleted file mode 100644 index 437e9e1c9116..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified ExpressRoutePort resource. - * - * @summary Deletes the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortDelete.json - */ -async function expressRoutePortDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.beginDeleteAndWait( - resourceGroupName, - expressRoutePortName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRoutePortDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsGenerateLoaSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsGenerateLoaSample.ts deleted file mode 100644 index 79da4bf0fb67..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsGenerateLoaSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - GenerateExpressRoutePortsLOARequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Generate a letter of authorization for the requested ExpressRoutePort resource. - * - * @summary Generate a letter of authorization for the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GenerateExpressRoutePortsLOA.json - */ -async function generateExpressRoutePortLoa(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const request: GenerateExpressRoutePortsLOARequest = { - customerName: "customerName", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.generateLOA( - resourceGroupName, - expressRoutePortName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await generateExpressRoutePortLoa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsGetSample.ts deleted file mode 100644 index 4229daa4b2e7..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the requested ExpressRoutePort resource. - * - * @summary Retrieves the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortGet.json - */ -async function expressRoutePortGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.get( - resourceGroupName, - expressRoutePortName, - ); - console.log(result); -} - -async function main(): Promise { - await expressRoutePortGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsListByResourceGroupSample.ts deleted file mode 100644 index 8a1815123db1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all the ExpressRoutePort resources in the specified resource group. - * - * @summary List all the ExpressRoutePort resources in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortListByResourceGroup.json - */ -async function expressRoutePortListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePorts.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRoutePortListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsListSample.ts deleted file mode 100644 index 7041280ab68c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all the ExpressRoutePort resources in the specified subscription. - * - * @summary List all the ExpressRoutePort resources in the specified subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortList.json - */ -async function expressRoutePortList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePorts.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRoutePortList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsLocationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsLocationsGetSample.ts deleted file mode 100644 index 80561bd954ed..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsLocationsGetSample.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * - * @summary Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortsLocationGet.json - */ -async function expressRoutePortsLocationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const locationName = "locationName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePortsLocations.get(locationName); - console.log(result); -} - -async function main(): Promise { - await expressRoutePortsLocationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsLocationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsLocationsListSample.ts deleted file mode 100644 index bd04f41f7aaf..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsLocationsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * - * @summary Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortsLocationList.json - */ -async function expressRoutePortsLocationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRoutePortsLocations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await expressRoutePortsLocationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsUpdateTagsSample.ts deleted file mode 100644 index ccff356f6de4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRoutePortsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update ExpressRoutePort tags. - * - * @summary Update ExpressRoutePort tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRoutePortUpdateTags.json - */ -async function expressRoutePortUpdateTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const expressRoutePortName = "portName"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRoutePorts.updateTags( - resourceGroupName, - expressRoutePortName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await expressRoutePortUpdateTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteProviderPortSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteProviderPortSample.ts deleted file mode 100644 index 162f71026b7c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteProviderPortSample.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves detail of a provider port. - * - * @summary Retrieves detail of a provider port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/expressRouteProviderPort.json - */ -async function expressRouteProviderPort(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const providerport = "abc"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteProviderPort(providerport); - console.log(result); -} - -async function main(): Promise { - await expressRouteProviderPort(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteProviderPortsLocationListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteProviderPortsLocationListSample.ts deleted file mode 100644 index c78f74cb4ef4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteProviderPortsLocationListSample.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all the ExpressRouteProviderPorts in a subscription. - * - * @summary Retrieves all the ExpressRouteProviderPorts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/expressRouteProviderPortList.json - */ -async function expressRouteProviderPortList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.expressRouteProviderPortsLocation.list(); - console.log(result); -} - -async function main(): Promise { - await expressRouteProviderPortList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteServiceProvidersListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/expressRouteServiceProvidersListSample.ts deleted file mode 100644 index fccd0860bda8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/expressRouteServiceProvidersListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the available express route service providers. - * - * @summary Gets all the available express route service providers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ExpressRouteProviderList.json - */ -async function listExpressRouteProviders(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.expressRouteServiceProviders.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listExpressRouteProviders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index 5c75c935f7da..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { FirewallPolicy} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Firewall Policy. - * - * @summary Creates or updates the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyPut.json - */ -async function createFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: FirewallPolicy = { - dnsSettings: { - enableProxy: true, - requireProxyForNetworkRules: false, - servers: ["30.3.4.5"], - }, - explicitProxy: { - enableExplicitProxy: true, - enablePacFile: true, - httpPort: 8087, - httpsPort: 8087, - pacFile: - "https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D", - pacFilePort: 8087, - }, - insights: { - isEnabled: true, - logAnalyticsResources: { - defaultWorkspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", - }, - workspaces: [ - { - region: "westus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", - }, - }, - { - region: "eastus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", - }, - }, - ], - }, - retentionDays: 100, - }, - intrusionDetection: { - configuration: { - bypassTrafficSettings: [ - { - name: "bypassRule1", - description: "Rule 1", - destinationAddresses: ["5.6.7.8"], - destinationPorts: ["*"], - sourceAddresses: ["1.2.3.4"], - protocol: "TCP", - }, - ], - signatureOverrides: [{ id: "2525004", mode: "Deny" }], - }, - mode: "Alert", - profile: "Core", - }, - location: "West US", - sku: { tier: "Premium" }, - snat: { privateRanges: ["IANAPrivateRanges"] }, - sql: { allowSqlRedirect: true }, - tags: { key1: "value1" }, - threatIntelMode: "Alert", - threatIntelWhitelist: { - fqdns: ["*.microsoft.com"], - ipAddresses: ["20.3.4.5"], - }, - transportSecurity: { - certificateAuthority: { - name: "clientcert", - keyVaultSecretId: "https://kv/secret", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesDeleteSample.ts deleted file mode 100644 index 17142a5edfb2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Firewall Policy. - * - * @summary Deletes the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDelete.json - */ -async function deleteFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.beginDeleteAndWait( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesGetSample.ts deleted file mode 100644 index 4751d28f1d31..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Firewall Policy. - * - * @summary Gets the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyGet.json - */ -async function getFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.get( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesListAllSample.ts deleted file mode 100644 index e79188f6230d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Firewall Policies in a subscription. - * - * @summary Gets all the Firewall Policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyListBySubscription.json - */ -async function listAllFirewallPoliciesForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicies.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllFirewallPoliciesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesListSample.ts deleted file mode 100644 index c3d8d92c317a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Firewall Policies in a resource group. - * - * @summary Lists all Firewall Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyListByResourceGroup.json - */ -async function listAllFirewallPoliciesForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicies.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllFirewallPoliciesForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesUpdateTagsSample.ts deleted file mode 100644 index 5c14368305ab..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPoliciesUpdateTagsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of a Azure Firewall Policy resource. - * - * @summary Updates tags of a Azure Firewall Policy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyPatch.json - */ -async function updateFirewallPolicyTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const firewallPolicyName = "firewallPolicy"; - const parameters: TagsObject = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicies.updateTags( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateFirewallPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDeploymentsDeploySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDeploymentsDeploySample.ts deleted file mode 100644 index bad3a4d109c2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDeploymentsDeploySample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deploys the firewall policy draft and child rule collection group drafts. - * - * @summary Deploys the firewall policy draft and child rule collection group drafts. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftDeploy.json - */ -async function deployFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDeployments.beginDeployAndWait( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await deployFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts deleted file mode 100644 index b62d0cb06451..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FirewallPolicyDraft} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a draft Firewall Policy. - * - * @summary Create or update a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftPut.json - */ -async function createOrUpdateFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: FirewallPolicyDraft = { - dnsSettings: { - enableProxy: true, - requireProxyForNetworkRules: false, - servers: ["30.3.4.5"], - }, - explicitProxy: { - enableExplicitProxy: true, - enablePacFile: true, - httpPort: 8087, - httpsPort: 8087, - pacFile: - "https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D", - pacFilePort: 8087, - }, - insights: { - isEnabled: true, - logAnalyticsResources: { - defaultWorkspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace", - }, - workspaces: [ - { - region: "westus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1", - }, - }, - { - region: "eastus", - workspaceId: { - id: "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2", - }, - }, - ], - }, - retentionDays: 100, - }, - intrusionDetection: { - configuration: { - bypassTrafficSettings: [ - { - name: "bypassRule1", - description: "Rule 1", - destinationAddresses: ["5.6.7.8"], - destinationPorts: ["*"], - sourceAddresses: ["1.2.3.4"], - protocol: "TCP", - }, - ], - signatureOverrides: [{ id: "2525004", mode: "Deny" }], - }, - mode: "Alert", - profile: "Balanced", - }, - snat: { privateRanges: ["IANAPrivateRanges"] }, - sql: { allowSqlRedirect: true }, - threatIntelMode: "Alert", - threatIntelWhitelist: { - fqdns: ["*.microsoft.com"], - ipAddresses: ["20.3.4.5"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.createOrUpdate( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsDeleteSample.ts deleted file mode 100644 index a73d19f8de96..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a draft policy. - * - * @summary Delete a draft policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftDelete.json - */ -async function deleteFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.delete( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsGetSample.ts deleted file mode 100644 index 2083d20c7c75..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyDraftsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a draft Firewall Policy. - * - * @summary Get a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyDraftGet.json - */ -async function getFirewallPolicyDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyDrafts.get( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getFirewallPolicyDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts deleted file mode 100644 index 2231f4ac4c3e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SignatureOverridesFilterValuesQuery} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the current filter values for the signatures overrides - * - * @summary Retrieves the current filter values for the signatures overrides - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json - */ -async function querySignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: SignatureOverridesFilterValuesQuery = { - filterName: "severity", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesFilterValues.list( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await querySignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesListSample.ts deleted file mode 100644 index a3bc73ebedd7..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesListSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { IdpsQueryObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * - * @summary Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyQuerySignatureOverrides.json - */ -async function querySignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: IdpsQueryObject = { - filters: [{ field: "Mode", values: ["Deny"] }], - orderBy: { field: "severity", order: "Ascending" }, - resultsPerPage: 20, - search: "", - skip: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignatures.list( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await querySignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts deleted file mode 100644 index 576f8e11f774..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all signatures overrides for a specific policy. - * - * @summary Returns all signatures overrides for a specific policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesGet.json - */ -async function getSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.get( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts deleted file mode 100644 index 589b5d4d9583..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all signatures overrides objects for a specific policy as a list containing a single value. - * - * @summary Returns all signatures overrides objects for a specific policy as a list containing a single value. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesList.json - */ -async function getSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.list( - resourceGroupName, - firewallPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts deleted file mode 100644 index b718ce2828a6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SignaturesOverrides} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Will update the status of policy's signature overrides for IDPS - * - * @summary Will update the status of policy's signature overrides for IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesPatch.json - */ -async function patchSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: SignaturesOverrides = { - name: "default", - type: "Microsoft.Network/firewallPolicies/signatureOverrides", - id: "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", - properties: { signatures: { "2000105": "Off", "2000106": "Deny" } }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.patch( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await patchSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts deleted file mode 100644 index b89bca784ace..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SignaturesOverrides} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Will override/create a new signature overrides for the policy's IDPS - * - * @summary Will override/create a new signature overrides for the policy's IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicySignatureOverridesPut.json - */ -async function putSignatureOverrides(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const parameters: SignaturesOverrides = { - name: "default", - type: "Microsoft.Network/firewallPolicies/signatureOverrides", - id: "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", - properties: { signatures: { "2000105": "Off", "2000106": "Deny" } }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyIdpsSignaturesOverrides.put( - resourceGroupName, - firewallPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putSignatureOverrides(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts deleted file mode 100644 index 17513c8bbe23..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FirewallPolicyRuleCollectionGroupDraft} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update Rule Collection Group Draft. - * - * @summary Create or Update Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json - */ -async function createOrUpdateRuleCollectionGroupDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroupDraft = { - priority: 100, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - priority: 100, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-rule1", - destinationAddresses: ["*"], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceAddresses: ["10.1.25.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroupDrafts.createOrUpdate( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts deleted file mode 100644 index 9b4082047081..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete Rule Collection Group Draft. - * - * @summary Delete Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json - */ -async function deleteFirewallRuleCollectionGroupDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroupDrafts.delete( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteFirewallRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts deleted file mode 100644 index de0a353b6c3b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get Rule Collection Group Draft. - * - * @summary Get Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json - */ -async function getRuleCollectionGroupDraft(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroupDrafts.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await getRuleCollectionGroupDraft(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts deleted file mode 100644 index c918fbd16d98..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FirewallPolicyRuleCollectionGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json - */ -async function createFirewallPolicyNatRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 100, - ruleCollections: [ - { - name: "Example-Nat-Rule-Collection", - action: { type: "DNAT" }, - priority: 100, - ruleCollectionType: "FirewallPolicyNatRuleCollection", - rules: [ - { - name: "nat-rule1", - destinationAddresses: ["152.23.32.23"], - destinationPorts: ["8080"], - ipProtocols: ["TCP", "UDP"], - ruleType: "NatRule", - sourceAddresses: ["2.2.2.2"], - sourceIpGroups: [], - translatedFqdn: "internalhttp.server.net", - translatedPort: "8080", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupPut.json - */ -async function createFirewallPolicyRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 100, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - priority: 100, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-rule1", - destinationAddresses: ["*"], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceAddresses: ["10.1.25.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json - */ -async function createFirewallPolicyRuleCollectionGroupWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "network-1", - destinationIpGroups: [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups2", - ], - destinationPorts: ["*"], - ipProtocols: ["TCP"], - ruleType: "NetworkRule", - sourceIpGroups: [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups1", - ], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json - */ -async function createFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Deny" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "rule1", - description: "Deny inbound rule", - protocols: [{ port: 443, protocolType: "Https" }], - ruleType: "ApplicationRule", - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - webCategories: ["Hacking"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json - */ -async function createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const parameters: FirewallPolicyRuleCollectionGroup = { - priority: 110, - ruleCollections: [ - { - name: "Example-Filter-Rule-Collection", - action: { type: "Allow" }, - ruleCollectionType: "FirewallPolicyFilterRuleCollection", - rules: [ - { - name: "rule1", - description: "Insert trusted tenants header", - fqdnTags: ["WindowsVirtualDesktop"], - httpHeadersToInsert: [ - { - headerName: "Restrict-Access-To-Tenants", - headerValue: "contoso.com,fabrikam.onmicrosoft.com", - }, - ], - protocols: [{ port: 80, protocolType: "Http" }], - ruleType: "ApplicationRule", - sourceAddresses: ["216.58.216.164", "10.0.0.0/24"], - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createFirewallPolicyNatRuleCollectionGroup(); - await createFirewallPolicyRuleCollectionGroup(); - await createFirewallPolicyRuleCollectionGroupWithIPGroups(); - await createFirewallPolicyRuleCollectionGroupWithWebCategories(); - await createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts deleted file mode 100644 index f27246710c1d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Deletes the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json - */ -async function deleteFirewallPolicyRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.firewallPolicyRuleCollectionGroups.beginDeleteAndWait( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteFirewallPolicyRuleCollectionGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts deleted file mode 100644 index 20f98b8a2bad..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json - */ -async function getFirewallPolicyNatRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupGet.json - */ -async function getFirewallPolicyRuleCollectionGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json - */ -async function getFirewallPolicyRuleCollectionGroupWithIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. - * - * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json - */ -async function getFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const ruleCollectionGroupName = "ruleCollectionGroup1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.firewallPolicyRuleCollectionGroups.get( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await getFirewallPolicyNatRuleCollectionGroup(); - await getFirewallPolicyRuleCollectionGroup(); - await getFirewallPolicyRuleCollectionGroupWithIPGroups(); - await getFirewallPolicyRuleCollectionGroupWithWebCategories(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts deleted file mode 100644 index 22221578b85a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "e747cc13-97d4-4a79-b463-42d7f4e558f2"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * - * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json - */ -async function listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const firewallPolicyName = "firewallPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.firewallPolicyRuleCollectionGroups.list( - resourceGroupName, - firewallPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllFirewallPolicyRuleCollectionGroupWithWebCategories(); - await listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy(); - await listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/flowLogsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/flowLogsCreateOrUpdateSample.ts deleted file mode 100644 index aea41cc7d710..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/flowLogsCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { FlowLog} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a flow log for the specified network security group. - * - * @summary Create or update a flow log for the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogCreate.json - */ -async function createOrUpdateFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "fl"; - const parameters: FlowLog = { - format: { type: "JSON", version: 1 }, - enabled: true, - enabledFilteringCriteria: "srcIP=158.255.7.8 || dstPort=56891", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": - {}, - }, - }, - location: "centraluseuap", - recordTypes: "B,E", - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.beginCreateOrUpdateAndWait( - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/flowLogsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/flowLogsDeleteSample.ts deleted file mode 100644 index 6dc0cd3a6133..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/flowLogsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified flow log resource. - * - * @summary Deletes the specified flow log resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogDelete.json - */ -async function deleteFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "fl"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - flowLogName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/flowLogsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/flowLogsGetSample.ts deleted file mode 100644 index acabb9e272a3..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/flowLogsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a flow log resource by name. - * - * @summary Gets a flow log resource by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogGet.json - */ -async function getFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const flowLogName = "flowLog1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.get( - resourceGroupName, - networkWatcherName, - flowLogName, - ); - console.log(result); -} - -async function main(): Promise { - await getFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/flowLogsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/flowLogsListSample.ts deleted file mode 100644 index 2d589ed6e491..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/flowLogsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all flow log resources for the specified Network Watcher. - * - * @summary Lists all flow log resources for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogList.json - */ -async function listConnectionMonitors(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.flowLogs.list( - resourceGroupName, - networkWatcherName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listConnectionMonitors(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/flowLogsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/flowLogsUpdateTagsSample.ts deleted file mode 100644 index fa67816e98c9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/flowLogsUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update tags of the specified flow log. - * - * @summary Update tags of the specified flow log. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogUpdateTags.json - */ -async function updateFlowLogTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw"; - const flowLogName = "fl"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.flowLogs.updateTags( - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateFlowLogTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts deleted file mode 100644 index 086d265e39f7..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualWanVpnProfileParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * - * @summary Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json - */ -async function generateVirtualWanVpnServerConfigurationVpnProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const vpnClientParams: VirtualWanVpnProfileParameters = { - authenticationMethod: "EAPTLS", - vpnServerConfigurationResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnconfig1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.beginGeneratevirtualwanvpnserverconfigurationvpnprofileAndWait( - resourceGroupName, - virtualWANName, - vpnClientParams, - ); - console.log(result); -} - -async function main(): Promise { - await generateVirtualWanVpnServerConfigurationVpnProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/getActiveSessionsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/getActiveSessionsSample.ts deleted file mode 100644 index 96bb970e31cb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/getActiveSessionsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. - * - * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionSessionsList.json - */ -async function returnsAListOfCurrentlyActiveSessionsOnTheBastion(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.beginListActiveSessionsAndWait( - resourceGroupName, - bastionHostName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await returnsAListOfCurrentlyActiveSessionsOnTheBastion(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/getBastionShareableLinkSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/getBastionShareableLinkSample.ts deleted file mode 100644 index f3d2cc366dc0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/getBastionShareableLinkSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BastionShareableLinkListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Return the Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Return the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkGet.json - */ -async function returnsTheBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest: BastionShareableLinkListRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.listBastionShareableLink( - resourceGroupName, - bastionHostName, - bslRequest, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await returnsTheBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesCreateOrUpdateSample.ts deleted file mode 100644 index 416510149c06..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { HubRouteTable} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * - * @summary Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTablePut.json - */ -async function routeTablePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const routeTableParameters: HubRouteTable = { - labels: ["label1", "label2"], - routes: [ - { - name: "route1", - destinationType: "CIDR", - destinations: ["10.0.0.0/8", "20.0.0.0/8", "30.0.0.0/8"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1", - nextHopType: "ResourceId", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - routeTableParameters, - ); - console.log(result); -} - -async function main(): Promise { - await routeTablePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesDeleteSample.ts deleted file mode 100644 index e873aea86a1a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a RouteTable. - * - * @summary Deletes a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableDelete.json - */ -async function routeTableDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await routeTableDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesGetSample.ts deleted file mode 100644 index eadbce073ac1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a RouteTable. - * - * @summary Retrieves the details of a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableGet.json - */ -async function routeTableGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "hubRouteTable1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubRouteTables.get( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await routeTableGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesListSample.ts deleted file mode 100644 index 3fc599e9caec..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/hubRouteTablesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all RouteTables. - * - * @summary Retrieves the details of all RouteTables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubRouteTableList.json - */ -async function routeTableList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.hubRouteTables.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routeTableList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index ca765610db15..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - HubVirtualNetworkConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * - * @summary Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionPut.json - */ -async function hubVirtualNetworkConnectionPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection = { - enableInternetSecurity: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/SpokeVnet1", - }, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - ], - labels: ["label1", "label2"], - }, - vnetRoutes: { - staticRoutes: [ - { - name: "route1", - addressPrefixes: ["10.1.0.0/16", "10.2.0.0/16"], - nextHopIpAddress: "10.0.0.68", - }, - { - name: "route2", - addressPrefixes: ["10.3.0.0/16", "10.4.0.0/16"], - nextHopIpAddress: "10.0.0.65", - }, - ], - staticRoutesConfig: { vnetLocalRouteOverrideCriteria: "Equal" }, - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.hubVirtualNetworkConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - connectionName, - hubVirtualNetworkConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await hubVirtualNetworkConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts deleted file mode 100644 index 00608ce61001..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a HubVirtualNetworkConnection. - * - * @summary Deletes a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionDelete.json - */ -async function hubVirtualNetworkConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await hubVirtualNetworkConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsGetSample.ts deleted file mode 100644 index 85c889114ab5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a HubVirtualNetworkConnection. - * - * @summary Retrieves the details of a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionGet.json - */ -async function hubVirtualNetworkConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.hubVirtualNetworkConnections.get( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await hubVirtualNetworkConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsListSample.ts deleted file mode 100644 index 28f9e9b04493..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/hubVirtualNetworkConnectionsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all HubVirtualNetworkConnections. - * - * @summary Retrieves the details of all HubVirtualNetworkConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/HubVirtualNetworkConnectionList.json - */ -async function hubVirtualNetworkConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.hubVirtualNetworkConnections.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await hubVirtualNetworkConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesCreateOrUpdateSample.ts deleted file mode 100644 index 0634d6c0b928..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { InboundNatRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a load balancer inbound NAT rule. - * - * @summary Creates or updates a load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleCreate.json - */ -async function inboundNatRuleCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const inboundNatRuleParameters: InboundNatRule = { - backendPort: 3389, - enableFloatingIP: false, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/ip1", - }, - frontendPort: 3390, - idleTimeoutInMinutes: 4, - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - inboundNatRuleParameters, - ); - console.log(result); -} - -async function main(): Promise { - await inboundNatRuleCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesDeleteSample.ts deleted file mode 100644 index 673b8c5d403d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified load balancer inbound NAT rule. - * - * @summary Deletes the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleDelete.json - */ -async function inboundNatRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await inboundNatRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesGetSample.ts deleted file mode 100644 index 314712d52be1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified load balancer inbound NAT rule. - * - * @summary Gets the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleGet.json - */ -async function inboundNatRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const inboundNatRuleName = "natRule1.1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundNatRules.get( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await inboundNatRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesListSample.ts deleted file mode 100644 index f9a7a2199323..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/inboundNatRulesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the inbound NAT rules in a load balancer. - * - * @summary Gets all the inbound NAT rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundNatRuleList.json - */ -async function inboundNatRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.inboundNatRules.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await inboundNatRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts deleted file mode 100644 index 2d9de07d921d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - InboundSecurityRule} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * - * @summary Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundSecurityRulePut.json - */ -async function createNetworkVirtualApplianceInboundSecurityRules(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const ruleCollectionName = "rule1"; - const parameters: InboundSecurityRule = { - ruleType: "Permanent", - rules: [ - { - name: "inboundRule1", - appliesOn: ["slbip1"], - destinationPortRange: 22, - destinationPortRanges: ["80-100"], - sourceAddressPrefix: "50.20.121.5/32", - protocol: "TCP", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.inboundSecurityRuleOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkVirtualApplianceInboundSecurityRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/inboundSecurityRuleGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/inboundSecurityRuleGetSample.ts deleted file mode 100644 index 4a051074ff18..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/inboundSecurityRuleGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * - * @summary Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/InboundSecurityRuleGet.json - */ -async function createNetworkVirtualApplianceInboundSecurityRules(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const ruleCollectionName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.inboundSecurityRuleOperations.get( - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkVirtualApplianceInboundSecurityRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsCreateOrUpdateSample.ts deleted file mode 100644 index 81e5e6a6e25b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { IpAllocation} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an IpAllocation in the specified resource group. - * - * @summary Creates or updates an IpAllocation in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationCreate.json - */ -async function createIPAllocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const parameters: IpAllocation = { - typePropertiesType: "Hypernet", - allocationTags: { - vNetID: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1", - }, - location: "centraluseuap", - prefix: "3.2.5.0/24", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.beginCreateOrUpdateAndWait( - resourceGroupName, - ipAllocationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsDeleteSample.ts deleted file mode 100644 index f90de92b82f0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified IpAllocation. - * - * @summary Deletes the specified IpAllocation. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationDelete.json - */ -async function deleteIPAllocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.beginDeleteAndWait( - resourceGroupName, - ipAllocationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsGetSample.ts deleted file mode 100644 index 2c7a6573690e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified IpAllocation by resource group. - * - * @summary Gets the specified IpAllocation by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationGet.json - */ -async function getIPAllocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.get( - resourceGroupName, - ipAllocationName, - ); - console.log(result); -} - -async function main(): Promise { - await getIPAllocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsListByResourceGroupSample.ts deleted file mode 100644 index 715e360635f8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all IpAllocations in a resource group. - * - * @summary Gets all IpAllocations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationListByResourceGroup.json - */ -async function listIPAllocationsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipAllocations.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listIPAllocationsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsListSample.ts deleted file mode 100644 index f68950861981..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all IpAllocations in a subscription. - * - * @summary Gets all IpAllocations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationList.json - */ -async function listAllIPAllocations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipAllocations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllIPAllocations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsUpdateTagsSample.ts deleted file mode 100644 index 07f8201e1c07..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipAllocationsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a IpAllocation tags. - * - * @summary Updates a IpAllocation tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpAllocationUpdateTags.json - */ -async function updateVirtualNetworkTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const ipAllocationName = "test-ipallocation"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipAllocations.updateTags( - resourceGroupName, - ipAllocationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 05d12d5375ae..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { IpGroup} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an ipGroups in a specified resource group. - * - * @summary Creates or updates an ipGroups in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsCreate.json - */ -async function createOrUpdateIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const parameters: IpGroup = { - ipAddresses: ["13.64.39.16/32", "40.74.146.80/31", "40.74.147.32/28"], - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - ipGroupsName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsDeleteSample.ts deleted file mode 100644 index 593e317da01f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsDeleteSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified ipGroups. - * - * @summary Deletes the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsDelete.json - */ -async function deleteIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.beginDeleteAndWait( - resourceGroupName, - ipGroupsName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsGetSample.ts deleted file mode 100644 index 8d64b8bf6777..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified ipGroups. - * - * @summary Gets the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsGet.json - */ -async function getIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.get(resourceGroupName, ipGroupsName); - console.log(result); -} - -async function main(): Promise { - await getIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsListByResourceGroupSample.ts deleted file mode 100644 index 4ac24f20543e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsListByResourceGroupSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all IpGroups in a resource group. - * - * @summary Gets all IpGroups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsListByResourceGroup.json - */ -async function listByResourceGroupIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipGroups.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listByResourceGroupIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsListSample.ts deleted file mode 100644 index 8531041cc41e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all IpGroups in a subscription. - * - * @summary Gets all IpGroups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsListBySubscription.json - */ -async function listIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipGroups.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsUpdateGroupsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsUpdateGroupsSample.ts deleted file mode 100644 index 36bacd58e28d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipGroupsUpdateGroupsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of an IpGroups resource. - * - * @summary Updates tags of an IpGroups resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpGroupsUpdateTags.json - */ -async function updateIPGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const ipGroupsName = "ipGroups1"; - const parameters: TagsObject = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipGroups.updateGroups( - resourceGroupName, - ipGroupsName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateIPGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsCreateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsCreateSample.ts deleted file mode 100644 index 64554d2253c5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsCreateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { IpamPool} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates/Updates the Pool resource. - * - * @summary Creates/Updates the Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Create.json - */ -async function ipamPoolsCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const body: IpamPool = { - location: "eastus", - properties: { - description: "Test description.", - addressPrefixes: ["10.0.0.0/24"], - parentPoolName: "", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.beginCreateAndWait( - resourceGroupName, - networkManagerName, - poolName, - body, - ); - console.log(result); -} - -async function main(): Promise { - await ipamPoolsCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsDeleteSample.ts deleted file mode 100644 index 16355fcc8949..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the Pool resource. - * - * @summary Delete the Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Delete.json - */ -async function ipamPoolsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main(): Promise { - await ipamPoolsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsGetPoolUsageSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsGetPoolUsageSample.ts deleted file mode 100644 index d4e356a31d80..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsGetPoolUsageSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the Pool Usage. - * - * @summary Get the Pool Usage. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_GetPoolUsage.json - */ -async function ipamPoolsGetPoolUsage(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.getPoolUsage( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main(): Promise { - await ipamPoolsGetPoolUsage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsGetSample.ts deleted file mode 100644 index c3cbeb7c27ab..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specific Pool resource. - * - * @summary Gets the specific Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Get.json - */ -async function ipamPoolsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.get( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main(): Promise { - await ipamPoolsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsListAssociatedResourcesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsListAssociatedResourcesSample.ts deleted file mode 100644 index 3da854e088ea..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsListAssociatedResourcesSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List Associated Resource in the Pool. - * - * @summary List Associated Resource in the Pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_ListAssociatedResources.json - */ -async function ipamPoolsListAssociatedResources(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipamPools.listAssociatedResources( - resourceGroupName, - networkManagerName, - poolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await ipamPoolsListAssociatedResources(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsListSample.ts deleted file mode 100644 index ab700597e81e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of Pool resources at Network Manager level. - * - * @summary Gets list of Pool resources at Network Manager level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_List.json - */ -async function ipamPoolsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.ipamPools.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await ipamPoolsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsUpdateSample.ts deleted file mode 100644 index 69892123b5ef..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/ipamPoolsUpdateSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the specific Pool resource. - * - * @summary Updates the specific Pool resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/IpamPools_Update.json - */ -async function ipamPoolsUpdate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.ipamPools.update( - resourceGroupName, - networkManagerName, - poolName, - ); - console.log(result); -} - -async function main(): Promise { - await ipamPoolsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/listActiveConnectivityConfigurationsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/listActiveConnectivityConfigurationsSample.ts deleted file mode 100644 index e56ca5f19ea5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/listActiveConnectivityConfigurationsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ActiveConfigurationParameter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists active connectivity configurations in a network manager. - * - * @summary Lists active connectivity configurations in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json - */ -async function listActiveConnectivityConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const parameters: ActiveConfigurationParameter = { - regions: ["westus"], - skipToken: "fakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listActiveConnectivityConfigurations( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await listActiveConnectivityConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/listActiveSecurityAdminRulesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/listActiveSecurityAdminRulesSample.ts deleted file mode 100644 index 2c88688c9b50..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/listActiveSecurityAdminRulesSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ActiveConfigurationParameter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists active security admin rules in a network manager. - * - * @summary Lists active security admin rules in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json - */ -async function listActiveSecurityAdminRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const networkManagerName = "testNetworkManager"; - const parameters: ActiveConfigurationParameter = { - regions: ["westus"], - skipToken: "fakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listActiveSecurityAdminRules( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await listActiveSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts deleted file mode 100644 index 52428d128dd9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - QueryRequestOptions} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all effective connectivity configurations applied on a virtual network. - * - * @summary List all effective connectivity configurations applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json - */ -async function listEffectiveConnectivityConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const virtualNetworkName = "testVirtualNetwork"; - const parameters: QueryRequestOptions = { skipToken: "FakeSkipTokenCode" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.listNetworkManagerEffectiveConnectivityConfigurations( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await listEffectiveConnectivityConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts deleted file mode 100644 index a55a59ebd5db..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - QueryRequestOptions} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all effective security admin rules applied on a virtual network. - * - * @summary List all effective security admin rules applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json - */ -async function listEffectiveSecurityAdminRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "myResourceGroup"; - const virtualNetworkName = "testVirtualNetwork"; - const parameters: QueryRequestOptions = { skipToken: "FakeSkipTokenCode" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.listNetworkManagerEffectiveSecurityAdminRules( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await listEffectiveSecurityAdminRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts deleted file mode 100644 index ae610180aec9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BackendAddressPool} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a load balancer backend address pool. - * - * @summary Creates or updates a load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json - */ -async function updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const parameters: BackendAddressPool = { - loadBalancerBackendAddresses: [ - { - name: "address1", - ipAddress: "10.0.0.4", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - { - name: "address2", - ipAddress: "10.0.0.5", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.loadBalancerBackendAddressPools.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts deleted file mode 100644 index 0f1cca4837fb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified load balancer backend address pool. - * - * @summary Deletes the specified load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerBackendAddressPoolDelete.json - */ -async function backendAddressPoolDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.loadBalancerBackendAddressPools.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -async function main(): Promise { - await backendAddressPoolDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts deleted file mode 100644 index 434fc2a59eef..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets load balancer backend address pool. - * - * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json - */ -async function loadBalancerWithBackendAddressPoolWithBackendAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.get( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets load balancer backend address pool. - * - * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerBackendAddressPoolGet.json - */ -async function loadBalancerBackendAddressPoolGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const backendAddressPoolName = "backend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerBackendAddressPools.get( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - ); - console.log(result); -} - -async function main(): Promise { - await loadBalancerWithBackendAddressPoolWithBackendAddresses(); - await loadBalancerBackendAddressPoolGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsListSample.ts deleted file mode 100644 index 84ddfdc12d0b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerBackendAddressPoolsListSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancer backed address pools. - * - * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json - */ -async function loadBalancerWithBackendAddressPoolContainingBackendAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerBackendAddressPools.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets all the load balancer backed address pools. - * - * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerBackendAddressPoolList.json - */ -async function loadBalancerBackendAddressPoolList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerBackendAddressPools.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerWithBackendAddressPoolContainingBackendAddresses(); - await loadBalancerBackendAddressPoolList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts deleted file mode 100644 index c543bfaf7dad..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets load balancer frontend IP configuration. - * - * @summary Gets load balancer frontend IP configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json - */ -async function loadBalancerFrontendIPConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const frontendIPConfigurationName = "frontend"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerFrontendIPConfigurations.get( - resourceGroupName, - loadBalancerName, - frontendIPConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await loadBalancerFrontendIPConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts deleted file mode 100644 index c37c497c026e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancer frontend IP configurations. - * - * @summary Gets all the load balancer frontend IP configurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerFrontendIPConfigurationList.json - */ -async function loadBalancerFrontendIPConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerFrontendIPConfigurations.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerFrontendIPConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts deleted file mode 100644 index 9cef37a99ec2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified load balancer load balancing rule. - * - * @summary Gets the specified load balancer load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerLoadBalancingRuleGet.json - */ -async function loadBalancerLoadBalancingRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const loadBalancingRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerLoadBalancingRules.get( - resourceGroupName, - loadBalancerName, - loadBalancingRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await loadBalancerLoadBalancingRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts deleted file mode 100644 index 363b64359be1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get health details of a load balancing rule. - * - * @summary Get health details of a load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerHealth.json - */ -async function queryLoadBalancingRuleHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const loadBalancingRuleName = "rulelb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerLoadBalancingRules.beginHealthAndWait( - groupName, - loadBalancerName, - loadBalancingRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await queryLoadBalancingRuleHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesListSample.ts deleted file mode 100644 index 67672e0b1ccc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerLoadBalancingRulesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancing rules in a load balancer. - * - * @summary Gets all the load balancing rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerLoadBalancingRuleList.json - */ -async function loadBalancerLoadBalancingRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerLoadBalancingRules.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerLoadBalancingRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerNetworkInterfacesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerNetworkInterfacesListSample.ts deleted file mode 100644 index 86c046ae082a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerNetworkInterfacesListSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets associated load balancer network interfaces. - * - * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json - */ -async function loadBalancerNetworkInterfaceListSimple(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerNetworkInterfaces.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets associated load balancer network interfaces. - * - * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerNetworkInterfaceListVmss.json - */ -async function loadBalancerNetworkInterfaceListVmss(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerNetworkInterfaces.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerNetworkInterfaceListSimple(); - await loadBalancerNetworkInterfaceListVmss(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerOutboundRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerOutboundRulesGetSample.ts deleted file mode 100644 index d864745371dc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerOutboundRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified load balancer outbound rule. - * - * @summary Gets the specified load balancer outbound rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerOutboundRuleGet.json - */ -async function loadBalancerOutboundRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const outboundRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerOutboundRules.get( - resourceGroupName, - loadBalancerName, - outboundRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await loadBalancerOutboundRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerOutboundRulesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerOutboundRulesListSample.ts deleted file mode 100644 index 4dc8430b4efd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerOutboundRulesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the outbound rules in a load balancer. - * - * @summary Gets all the outbound rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerOutboundRuleList.json - */ -async function loadBalancerOutboundRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerOutboundRules.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerOutboundRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerProbesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerProbesGetSample.ts deleted file mode 100644 index d764ef133fee..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerProbesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets load balancer probe. - * - * @summary Gets load balancer probe. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerProbeGet.json - */ -async function loadBalancerProbeGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const probeName = "probe1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancerProbes.get( - resourceGroupName, - loadBalancerName, - probeName, - ); - console.log(result); -} - -async function main(): Promise { - await loadBalancerProbeGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerProbesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerProbesListSample.ts deleted file mode 100644 index 20425d9f9f1a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancerProbesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancer probes. - * - * @summary Gets all the load balancer probes. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerProbeList.json - */ -async function loadBalancerProbeList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancerProbes.list( - resourceGroupName, - loadBalancerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await loadBalancerProbeList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersCreateOrUpdateSample.ts deleted file mode 100644 index 0a9974175dfd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersCreateOrUpdateSample.ts +++ /dev/null @@ -1,803 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { LoadBalancer} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreate.json - */ -async function createLoadBalancer(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - enableTcpReset: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - scope: "Public", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithZones.json - */ -async function createLoadBalancerWithFrontendIPInZone1(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - zones: ["1"], - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json - */ -async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - gatewayLoadBalancer: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json - */ -async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [ - { - name: "be-lb", - tunnelInterfaces: [ - { type: "Internal", identifier: 900, port: 15000, protocol: "VXLAN" }, - { type: "Internal", identifier: 901, port: 15001, protocol: "VXLAN" }, - ], - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPools: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - ], - backendPort: 0, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 0, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "All", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Gateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json - */ -async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb1" }, { name: "be-lb2" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: {}, - backendAddressPools: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb2", - }, - ], - backendPort: 0, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 0, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "All", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Gateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateGlobalTier.json - */ -async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [ - { - name: "be-lb", - loadBalancerBackendAddresses: [ - { - name: "regional-lb1-address", - loadBalancerFrontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/regional-lb-rg1/providers/Microsoft.Network/loadBalancers/regional-lb/frontendIPConfigurations/fe-rlb", - }, - }, - ], - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: false, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard", tier: "Global" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateStandardSku.json - */ -async function createLoadBalancerWithStandardSku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json - */ -async function createLoadBalancerWithSyncModePropertyOnPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [ - { - name: "be-lb", - syncMode: "Automatic", - virtualNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb", - }, - }, - ], - frontendIPConfigurations: [ - { - name: "fe-lb", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithInboundNatPool.json - */ -async function createLoadBalancerWithInboundNatPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [], - frontendIPConfigurations: [ - { - name: "test", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", - privateIPAllocationMethod: "Dynamic", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/lbvnet/subnets/lbsubnet", - }, - zones: [], - }, - ], - inboundNatPools: [ - { - name: "test", - backendPort: 8888, - enableFloatingIP: true, - enableTcpReset: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", - }, - frontendPortRangeEnd: 8085, - frontendPortRangeStart: 8080, - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/inboundNatPools/test", - idleTimeoutInMinutes: 10, - protocol: "Tcp", - }, - ], - inboundNatRules: [], - loadBalancingRules: [], - location: "eastus", - outboundRules: [], - probes: [], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a load balancer. - * - * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerCreateWithOutboundRules.json - */ -async function createLoadBalancerWithOutboundRules(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: LoadBalancer = { - backendAddressPools: [{ name: "be-lb" }], - frontendIPConfigurations: [ - { - name: "fe-lb", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip", - }, - }, - ], - inboundNatPools: [], - inboundNatRules: [ - { - name: "in-nat-rule", - backendPort: 3389, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 3389, - idleTimeoutInMinutes: 15, - protocol: "Tcp", - }, - ], - loadBalancingRules: [ - { - name: "rulelb", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - backendPort: 80, - disableOutboundSnat: true, - enableFloatingIP: true, - frontendIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - frontendPort: 80, - idleTimeoutInMinutes: 15, - loadDistribution: "Default", - probe: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb", - }, - protocol: "Tcp", - }, - ], - location: "eastus", - outboundRules: [ - { - name: "rule1", - backendAddressPool: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb", - }, - frontendIPConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - ], - protocol: "All", - }, - ], - probes: [ - { - name: "probe-lb", - intervalInSeconds: 15, - numberOfProbes: 2, - port: 80, - probeThreshold: 1, - requestPath: "healthcheck.aspx", - protocol: "Http", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginCreateOrUpdateAndWait( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createLoadBalancer(); - await createLoadBalancerWithFrontendIPInZone1(); - await createLoadBalancerWithGatewayLoadBalancerConsumerConfigured(); - await createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool(); - await createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool(); - await createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool(); - await createLoadBalancerWithStandardSku(); - await createLoadBalancerWithSyncModePropertyOnPool(); - await createLoadBalancerWithInboundNatPool(); - await createLoadBalancerWithOutboundRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersDeleteSample.ts deleted file mode 100644 index 3182473680bc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified load balancer. - * - * @summary Deletes the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerDelete.json - */ -async function deleteLoadBalancer(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginDeleteAndWait( - resourceGroupName, - loadBalancerName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteLoadBalancer(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersGetSample.ts deleted file mode 100644 index 9be1b199367c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified load balancer. - * - * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerGet.json - */ -async function getLoadBalancer(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.get( - resourceGroupName, - loadBalancerName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified load balancer. - * - * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerGetInboundNatRulePortMapping.json - */ -async function getLoadBalancerWithInboundNatRulePortMapping(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.get( - resourceGroupName, - loadBalancerName, - ); - console.log(result); -} - -async function main(): Promise { - await getLoadBalancer(); - await getLoadBalancerWithInboundNatRulePortMapping(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListAllSample.ts deleted file mode 100644 index a1dd25596b24..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancers in a subscription. - * - * @summary Gets all the load balancers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerListAll.json - */ -async function listAllLoadBalancers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancers.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllLoadBalancers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts deleted file mode 100644 index f1e012f189b5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - QueryInboundNatRulePortMappingRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of inbound NAT rule port mappings. - * - * @summary List of inbound NAT rule port mappings. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/QueryInboundNatRulePortMapping.json - */ -async function queryInboundNatRulePortMapping(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const backendPoolName = "bp1"; - const parameters: QueryInboundNatRulePortMappingRequest = { - ipAddress: "10.0.0.4", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.loadBalancers.beginListInboundNatRulePortMappingsAndWait( - groupName, - loadBalancerName, - backendPoolName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await queryInboundNatRulePortMapping(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListSample.ts deleted file mode 100644 index 17606c3c692a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the load balancers in a resource group. - * - * @summary Gets all the load balancers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerList.json - */ -async function listLoadBalancersInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.loadBalancers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listLoadBalancersInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersMigrateToIPBasedSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersMigrateToIPBasedSample.ts deleted file mode 100644 index 321cabbb1c08..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersMigrateToIPBasedSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - MigrateLoadBalancerToIpBasedRequest, - LoadBalancersMigrateToIpBasedOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Migrate load balancer to IP Based - * - * @summary Migrate load balancer to IP Based - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/MigrateLoadBalancerToIPBased.json - */ -async function migrateLoadBalancerToIPBased(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const loadBalancerName = "lb1"; - const parameters: MigrateLoadBalancerToIpBasedRequest = { - pools: ["pool1", "pool2"], - }; - const options: LoadBalancersMigrateToIpBasedOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.migrateToIpBased( - groupName, - loadBalancerName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await migrateLoadBalancerToIPBased(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts deleted file mode 100644 index ebaf8fe015c3..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - LoadBalancerVipSwapRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Swaps VIPs between two load balancers. - * - * @summary Swaps VIPs between two load balancers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancersSwapPublicIpAddresses.json - */ -async function swapViPsBetweenTwoLoadBalancers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const parameters: LoadBalancerVipSwapRequest = { - frontendIPConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/lbfe1", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/pip2", - }, - }, - { - id: "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/loadBalancers/lb2/frontendIPConfigurations/lbfe2", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.beginSwapPublicIpAddressesAndWait( - location, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await swapViPsBetweenTwoLoadBalancers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersUpdateTagsSample.ts deleted file mode 100644 index 841fbbb903dc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/loadBalancersUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a load balancer tags. - * - * @summary Updates a load balancer tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LoadBalancerUpdateTags.json - */ -async function updateLoadBalancerTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const loadBalancerName = "lb"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.loadBalancers.updateTags( - resourceGroupName, - loadBalancerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateLoadBalancerTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 7b4c664127b4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - LocalNetworkGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a local network gateway in the specified resource group. - * - * @summary Creates or updates a local network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayCreate.json - */ -async function createLocalNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const parameters: LocalNetworkGateway = { - fqdn: "site1.contoso.com", - gatewayIpAddress: "11.12.13.14", - localNetworkAddressSpace: { addressPrefixes: ["10.1.0.0/16"] }, - location: "Central US", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - localNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysDeleteSample.ts deleted file mode 100644 index b4dee4a41ba8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified local network gateway. - * - * @summary Deletes the specified local network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayDelete.json - */ -async function deleteLocalNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.beginDeleteAndWait( - resourceGroupName, - localNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysGetSample.ts deleted file mode 100644 index 3e6f06758839..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified local network gateway in a resource group. - * - * @summary Gets the specified local network gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayGet.json - */ -async function getLocalNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "localgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.get( - resourceGroupName, - localNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getLocalNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysListSample.ts deleted file mode 100644 index 78615db9889f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the local network gateways in a resource group. - * - * @summary Gets all the local network gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayList.json - */ -async function listLocalNetworkGateways(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.localNetworkGateways.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listLocalNetworkGateways(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysUpdateTagsSample.ts deleted file mode 100644 index 38e861efa208..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/localNetworkGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a local network gateway tags. - * - * @summary Updates a local network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/LocalNetworkGatewayUpdateTags.json - */ -async function updateLocalNetworkGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const localNetworkGatewayName = "lgw"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.localNetworkGateways.updateTags( - resourceGroupName, - localNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateLocalNetworkGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 92978f2f7536..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagerConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a network manager connection on this management group. - * - * @summary Create a network manager connection on this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupPut.json - */ -async function createOrUpdateManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const parameters: NetworkManagerConnection = { - networkManagerId: - "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = - await client.managementGroupNetworkManagerConnections.createOrUpdate( - managementGroupId, - networkManagerConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts deleted file mode 100644 index 772bba9f063d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete specified pending connection created by this management group. - * - * @summary Delete specified pending connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json - */ -async function deleteManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = await client.managementGroupNetworkManagerConnections.delete( - managementGroupId, - networkManagerConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts deleted file mode 100644 index 23c2646aa95f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a specified connection created by this management group. - * - * @summary Get a specified connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupGet.json - */ -async function getManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const result = await client.managementGroupNetworkManagerConnections.get( - managementGroupId, - networkManagerConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts deleted file mode 100644 index cdd38dba4d09..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network manager connections created by this management group. - * - * @summary List all network manager connections created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionManagementGroupList.json - */ -async function listManagementGroupNetworkManagerConnection(): Promise { - const managementGroupId = "managementGroupA"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential); - const resArray = new Array(); - for await (const item of client.managementGroupNetworkManagerConnections.list( - managementGroupId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listManagementGroupNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 8d77f0435e4f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NatGateway} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a nat gateway. - * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayCreateOrUpdate.json - */ -async function createNatGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters: NatGateway = { - location: "westus", - publicIpAddresses: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", - }, - ], - publicIpPrefixes: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", - }, - ], - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a nat gateway. - * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayCreateOrUpdateStandardV2Sku.json - */ -async function createNatGatewayWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters: NatGateway = { - location: "westus", - publicIpAddresses: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", - }, - ], - publicIpPrefixes: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", - }, - ], - sku: { name: "StandardV2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a nat gateway. - * - * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayWithServiceGatewayCreateOrUpdate.json - */ -async function createNatGatewayWithServiceGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natgateway"; - const parameters: NatGateway = { - location: "westus", - publicIpAddresses: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1", - }, - ], - publicIpPrefixes: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1", - }, - ], - serviceGateway: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/serviceGateways/SG1", - }, - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNatGateway(); - await createNatGatewayWithStandardV2Sku(); - await createNatGatewayWithServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysDeleteSample.ts deleted file mode 100644 index 34f2f230b866..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified nat gateway. - * - * @summary Deletes the specified nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayDelete.json - */ -async function deleteNatGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.beginDeleteAndWait( - resourceGroupName, - natGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNatGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysGetSample.ts deleted file mode 100644 index b3c63879a6cb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysGetSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. - * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayGet.json - */ -async function getNatGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get( - resourceGroupName, - natGatewayName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. - * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayGetStandardV2Sku.json - */ -async function getNatGatewayWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get( - resourceGroupName, - natGatewayName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. - * - * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayWithServiceGatewayGet.json - */ -async function getNatGatewayWithServiceGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.get( - resourceGroupName, - natGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getNatGateway(); - await getNatGatewayWithStandardV2Sku(); - await getNatGatewayWithServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysListAllSample.ts deleted file mode 100644 index 723c91af7cfb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Nat Gateways in a subscription. - * - * @summary Gets all the Nat Gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayListAll.json - */ -async function listAllNatGateways(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natGateways.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNatGateways(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysListSample.ts deleted file mode 100644 index 0a016f76dcfe..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all nat gateways in a resource group. - * - * @summary Gets all nat gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayList.json - */ -async function listNatGatewaysInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNatGatewaysInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysUpdateTagsSample.ts deleted file mode 100644 index 2a7ef3b595f3..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/natGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates nat gateway tags. - * - * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayUpdateTags.json - */ -async function updateNatGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.updateTags( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates nat gateway tags. - * - * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatGatewayUpdateTagsStandardV2Sku.json - */ -async function updateNatGatewayWithStandardV2SkuTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const natGatewayName = "test-natGateway"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natGateways.updateTags( - resourceGroupName, - natGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNatGatewayTags(); - await updateNatGatewayWithStandardV2SkuTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/natRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/natRulesCreateOrUpdateSample.ts deleted file mode 100644 index a327433921e2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/natRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VpnGatewayNatRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * - * @summary Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRulePut.json - */ -async function natRulePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const natRuleParameters: VpnGatewayNatRule = { - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "192.168.21.0/24" }], - internalMappings: [{ addressSpace: "10.4.0.0/24" }], - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default", - mode: "EgressSnat", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - natRuleName, - natRuleParameters, - ); - console.log(result); -} - -async function main(): Promise { - await natRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/natRulesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/natRulesDeleteSample.ts deleted file mode 100644 index d0d36d918ad5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/natRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a nat rule. - * - * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleDelete.json - */ -async function natRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.beginDeleteAndWait( - resourceGroupName, - gatewayName, - natRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await natRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/natRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/natRulesGetSample.ts deleted file mode 100644 index e53cace4f6c9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/natRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a nat ruleGet. - * - * @summary Retrieves the details of a nat ruleGet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleGet.json - */ -async function natRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.natRules.get( - resourceGroupName, - gatewayName, - natRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await natRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/natRulesListByVpnGatewaySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/natRulesListByVpnGatewaySample.ts deleted file mode 100644 index c1e15b9ee4d8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/natRulesListByVpnGatewaySample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all nat rules for a particular virtual wan vpn gateway. - * - * @summary Retrieves all nat rules for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NatRuleList.json - */ -async function natRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.natRules.listByVpnGateway( - resourceGroupName, - gatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await natRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 555f339ad2d2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NetworkGroup} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network group. - * - * @summary Creates or updates a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupPut.json - */ -async function networkGroupsPut(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const parameters: NetworkGroup = { - description: "A sample group", - memberType: "VirtualNetwork", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.createOrUpdate( - resourceGroupName, - networkManagerName, - networkGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkGroupsPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsDeleteSample.ts deleted file mode 100644 index 4887ff95a208..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkGroupsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network group. - * - * @summary Deletes a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupDelete.json - */ -async function networkGroupsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const force = false; - const options: NetworkGroupsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - networkGroupName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await networkGroupsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsGetSample.ts deleted file mode 100644 index 8056658ca02b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network group. - * - * @summary Gets the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupGet.json - */ -async function networkGroupsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkGroups.get( - resourceGroupName, - networkManagerName, - networkGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await networkGroupsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsListSample.ts deleted file mode 100644 index aa0cff3bc21b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkGroupsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the specified network group. - * - * @summary Lists the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGroupList.json - */ -async function networkGroupsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkGroups.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkGroupsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceIPConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceIPConfigurationsGetSample.ts deleted file mode 100644 index 1ff2cc234a61..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceIPConfigurationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network interface ip configuration. - * - * @summary Gets the specified network interface ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceIPConfigurationGet.json - */ -async function networkInterfaceIPConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const ipConfigurationName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceIPConfigurations.get( - resourceGroupName, - networkInterfaceName, - ipConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await networkInterfaceIPConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceIPConfigurationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceIPConfigurationsListSample.ts deleted file mode 100644 index 177ca1b34c06..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceIPConfigurationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all ip configurations in a network interface. - * - * @summary Get all ip configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceIPConfigurationList.json - */ -async function networkInterfaceIPConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceIPConfigurations.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkInterfaceIPConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceLoadBalancersListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceLoadBalancersListSample.ts deleted file mode 100644 index 0b44afd9b6ed..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceLoadBalancersListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all load balancers in a network interface. - * - * @summary List all load balancers in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceLoadBalancerList.json - */ -async function networkInterfaceLoadBalancerList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceLoadBalancers.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkInterfaceLoadBalancerList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 6913217e712f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkInterfaceTapConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a Tap configuration in the specified NetworkInterface. - * - * @summary Creates or updates a Tap configuration in the specified NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationCreate.json - */ -async function createNetworkInterfaceTapConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const tapConfigurationParameters: NetworkInterfaceTapConfiguration = { - virtualNetworkTap: { - id: "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworkTaps/testvtap", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaceTapConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - tapConfigurationParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkInterfaceTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts deleted file mode 100644 index 776d97cc95cd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified tap configuration from the NetworkInterface. - * - * @summary Deletes the specified tap configuration from the NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationDelete.json - */ -async function deleteTapConfiguration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaceTapConfigurations.beginDeleteAndWait( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteTapConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsGetSample.ts deleted file mode 100644 index e893b86bd5c4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified tap configuration on a network interface. - * - * @summary Get the specified tap configuration on a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationGet.json - */ -async function getNetworkInterfaceTapConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const tapConfigurationName = "tapconfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaceTapConfigurations.get( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkInterfaceTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsListSample.ts deleted file mode 100644 index 13fcb3b6cbbb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfaceTapConfigurationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all Tap configurations in a network interface. - * - * @summary Get all Tap configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceTapConfigurationList.json - */ -async function listVirtualNetworkTapConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const networkInterfaceName = "mynic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaceTapConfigurations.list( - resourceGroupName, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualNetworkTapConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesCreateOrUpdateSample.ts deleted file mode 100644 index a196836147c9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesCreateOrUpdateSample.ts +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NetworkInterface} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network interface. - * - * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceCreate.json - */ -async function createNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters: NetworkInterface = { - disableTcpStateTracking: true, - enableAcceleratedNetworking: true, - ipConfigurations: [ - { - name: "ipconfig1", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", - }, - }, - { name: "ipconfig2", privateIPAddressPrefixLength: 28 }, - ], - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network interface. - * - * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json - */ -async function createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters: NetworkInterface = { - enableAcceleratedNetworking: true, - ipConfigurations: [ - { - name: "ipconfig1", - gatewayLoadBalancer: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider", - }, - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", - }, - }, - ], - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginCreateOrUpdateAndWait( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkInterface(); - await createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesDeleteSample.ts deleted file mode 100644 index 3f39c627d0f0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified network interface. - * - * @summary Deletes the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceDelete.json - */ -async function deleteNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.beginDeleteAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts deleted file mode 100644 index c40b5723b159..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network interface in a cloud service. - * - * @summary Get the specified network interface in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceNetworkInterfaceGet.json - */ -async function getCloudServiceNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const roleInstanceName = "TestVMRole_IN_0"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.getCloudServiceNetworkInterface( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await getCloudServiceNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts deleted file mode 100644 index 1ca06574670f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all route tables applied to a network interface. - * - * @summary Gets all route tables applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json - */ -async function showNetworkInterfaceEffectiveRouteTables(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.beginGetEffectiveRouteTableAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await showNetworkInterfaceEffectiveRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetSample.ts deleted file mode 100644 index b66d145914ac..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified network interface. - * - * @summary Gets information about the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceGet.json - */ -async function getNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.get( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts deleted file mode 100644 index da1777dd0691..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. - * - * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceIpConfigGet.json - */ -async function getVirtualMachineScaleSetNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "2"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.getVirtualMachineScaleSetIpConfiguration( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualMachineScaleSetNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts deleted file mode 100644 index fa1a72be883c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network interface in a virtual machine scale set. - * - * @summary Get the specified network interface in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceGet.json - */ -async function getVirtualMachineScaleSetNetworkInterface(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.getVirtualMachineScaleSetNetworkInterface( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualMachineScaleSetNetworkInterface(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListAllSample.ts deleted file mode 100644 index d3f487a8d3ba..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network interfaces in a subscription. - * - * @summary Gets all network interfaces in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceListAll.json - */ -async function listAllNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts deleted file mode 100644 index c5465f88319f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network interfaces in a cloud service. - * - * @summary Gets all network interfaces in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceNetworkInterfaceList.json - */ -async function listCloudServiceNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listCloudServiceNetworkInterfaces( - resourceGroupName, - cloudServiceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listCloudServiceNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts deleted file mode 100644 index 4802555ce99a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all network interfaces in a role instance in a cloud service. - * - * @summary Gets information about all network interfaces in a role instance in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json - */ -async function listCloudServiceRoleInstanceNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const cloudServiceName = "cs1"; - const roleInstanceName = "TestVMRole_IN_0"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listCloudServiceRoleInstanceNetworkInterfaces( - resourceGroupName, - cloudServiceName, - roleInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listCloudServiceRoleInstanceNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts deleted file mode 100644 index 3b3ed8826fff..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network security groups applied to a network interface. - * - * @summary Gets all network security groups applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceEffectiveNSGList.json - */ -async function listNetworkInterfaceEffectiveNetworkSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkInterfaces.beginListEffectiveNetworkSecurityGroupsAndWait( - resourceGroupName, - networkInterfaceName, - ); - console.log(result); -} - -async function main(): Promise { - await listNetworkInterfaceEffectiveNetworkSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListSample.ts deleted file mode 100644 index 5449641a9371..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network interfaces in a resource group. - * - * @summary Gets all network interfaces in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceList.json - */ -async function listNetworkInterfacesInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkInterfacesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts deleted file mode 100644 index 2666892396e6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. - * - * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceIpConfigList.json - */ -async function listVirtualMachineScaleSetNetworkInterfaceIPConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "2"; - const networkInterfaceName = "nic1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetIpConfigurations( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualMachineScaleSetNetworkInterfaceIPConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts deleted file mode 100644 index c723cac0719f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network interfaces in a virtual machine scale set. - * - * @summary Gets all network interfaces in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssNetworkInterfaceList.json - */ -async function listVirtualMachineScaleSetNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualMachineScaleSetNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts deleted file mode 100644 index a10381f7317c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * - * @summary Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssVmNetworkInterfaceList.json - */ -async function listVirtualMachineScaleSetVMNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkInterfaces.listVirtualMachineScaleSetVMNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualMachineScaleSetVMNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesUpdateTagsSample.ts deleted file mode 100644 index 640e8807eb2b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkInterfacesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a network interface tags. - * - * @summary Updates a network interface tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkInterfaceUpdateTags.json - */ -async function updateNetworkInterfaceTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkInterfaceName = "test-nic"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkInterfaces.updateTags( - resourceGroupName, - networkInterfaceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNetworkInterfaceTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerCommitsPostSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagerCommitsPostSample.ts deleted file mode 100644 index 4c4e9bfc5677..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerCommitsPostSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagerCommit} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Post a Network Manager Commit. - * - * @summary Post a Network Manager Commit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerCommitPost.json - */ -async function networkManageCommitPost(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resoureGroupSample"; - const networkManagerName = "testNetworkManager"; - const parameters: NetworkManagerCommit = { - commitType: "SecurityAdmin", - configurationIds: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resoureGroupSample/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/SampleSecurityAdminConfig", - ], - targetLocations: ["useast"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerCommits.beginPostAndWait( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkManageCommitPost(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerDeploymentStatusListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagerDeploymentStatusListSample.ts deleted file mode 100644 index 259198594298..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerDeploymentStatusListSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagerDeploymentStatusParameter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Post to List of Network Manager Deployment Status. - * - * @summary Post to List of Network Manager Deployment Status. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDeploymentStatusList.json - */ -async function networkManagerDeploymentStatusList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "resoureGroupSample"; - const networkManagerName = "testNetworkManager"; - const parameters: NetworkManagerDeploymentStatusParameter = { - deploymentTypes: ["Connectivity", "AdminPolicy"], - regions: ["eastus", "westus"], - skipToken: "FakeSkipTokenCode", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerDeploymentStatusOperations.list( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkManagerDeploymentStatusList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 361007de33b8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagerRoutingConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network manager routing configuration. - * - * @summary Creates or updates a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationPut.json - */ -async function createNetworkManagerRoutingConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const routingConfiguration: NetworkManagerRoutingConfiguration = { - description: "A sample policy", - routeTableUsageMode: "ManagedOnly", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkManagerRoutingConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - routingConfiguration, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkManagerRoutingConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts deleted file mode 100644 index ce169d651400..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network manager routing configuration. - * - * @summary Deletes a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationDelete.json - */ -async function deleteNetworkManagerRoutingConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkManagerRoutingConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkManagerRoutingConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsGetSample.ts deleted file mode 100644 index 979dd5f22f0a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a network manager routing configuration. - * - * @summary Retrieves a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationGet.json - */ -async function getRoutingConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagerRoutingConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getRoutingConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsListSample.ts deleted file mode 100644 index a9e18b15355f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagerRoutingConfigurationsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the network manager routing configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager routing configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingConfigurationList.json - */ -async function listRoutingConfigurationsInANetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagerRoutingConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRoutingConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagersCreateOrUpdateSample.ts deleted file mode 100644 index 71e1d3138ecf..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NetworkManager} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a Network Manager. - * - * @summary Creates or updates a Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerPut.json - */ -async function putNetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const parameters: NetworkManager = { - description: "My Test Network Manager", - networkManagerScopeAccesses: ["Connectivity"], - networkManagerScopes: { - managementGroups: ["/Microsoft.Management/testmg"], - subscriptions: ["/subscriptions/00000000-0000-0000-0000-000000000000"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.createOrUpdate( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putNetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagersDeleteSample.ts deleted file mode 100644 index fd4309557d06..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersDeleteSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagersDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network manager. - * - * @summary Deletes a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerDelete.json - */ -async function networkManagersDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const force = false; - const options: NetworkManagersDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await networkManagersDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagersGetSample.ts deleted file mode 100644 index 24e319c759c2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Network Manager. - * - * @summary Gets the specified Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerGet.json - */ -async function networkManagersGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.get( - resourceGroupName, - networkManagerName, - ); - console.log(result); -} - -async function main(): Promise { - await networkManagersGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagersListBySubscriptionSample.ts deleted file mode 100644 index ed8fe8bd96c9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network managers in a subscription. - * - * @summary List all network managers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerListAll.json - */ -async function networkManagersList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkManagersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagersListSample.ts deleted file mode 100644 index 575644412293..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List network managers in a resource group. - * - * @summary List network managers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerList.json - */ -async function listNetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkManagers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersPatchSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkManagersPatchSample.ts deleted file mode 100644 index fac84808cef3..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkManagersPatchSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { PatchObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Patch NetworkManager. - * - * @summary Patch NetworkManager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerPatch.json - */ -async function networkManagesPatch(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const parameters: PatchObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkManagers.patch( - resourceGroupName, - networkManagerName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkManagesPatch(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesCreateOrUpdateSample.ts deleted file mode 100644 index 67ab84817675..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NetworkProfile} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network profile. - * - * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileCreateConfigOnly.json - */ -async function createNetworkProfileDefaults(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const parameters: NetworkProfile = { - containerNetworkInterfaceConfigurations: [ - { - name: "eth1", - ipConfigurations: [ - { - name: "ipconfig1", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/networkProfileVnet/subnets/networkProfileSubnet1", - }, - }, - ], - }, - ], - location: "westus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.createOrUpdate( - resourceGroupName, - networkProfileName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkProfileDefaults(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesDeleteSample.ts deleted file mode 100644 index 5b7ff6dc138b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified network profile. - * - * @summary Deletes the specified network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileDelete.json - */ -async function deleteNetworkProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.beginDeleteAndWait( - resourceGroupName, - networkProfileName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesGetSample.ts deleted file mode 100644 index c1b4c6f902d3..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network profile in a specified resource group. - * - * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileGetConfigOnly.json - */ -async function getNetworkProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.get( - resourceGroupName, - networkProfileName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified network profile in a specified resource group. - * - * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileGetWithContainerNic.json - */ -async function getNetworkProfileWithContainerNetworkInterfaces(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "networkProfile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.get( - resourceGroupName, - networkProfileName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkProfile(); - await getNetworkProfileWithContainerNetworkInterfaces(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesListAllSample.ts deleted file mode 100644 index 940dabada4eb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the network profiles in a subscription. - * - * @summary Gets all the network profiles in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileListAll.json - */ -async function listAllNetworkProfiles(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkProfiles.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkProfiles(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesListSample.ts deleted file mode 100644 index a2ea5b08ff27..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network profiles in a resource group. - * - * @summary Gets all network profiles in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileList.json - */ -async function listResourceGroupNetworkProfiles(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkProfiles.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listResourceGroupNetworkProfiles(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesUpdateTagsSample.ts deleted file mode 100644 index c23f229ca28a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkProfilesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates network profile tags. - * - * @summary Updates network profile tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkProfileUpdateTags.json - */ -async function updateNetworkProfileTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkProfileName = "test-np"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkProfiles.updateTags( - resourceGroupName, - networkProfileName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNetworkProfileTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 890f9d62f216..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkSecurityGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network security group in the specified resource group. - * - * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupCreate.json - */ -async function createNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters: NetworkSecurityGroup = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network security group in the specified resource group. - * - * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupCreateWithRule.json - */ -async function createNetworkSecurityGroupWithRule(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters: NetworkSecurityGroup = { - location: "eastus", - securityRules: [ - { - name: "rule1", - access: "Allow", - destinationAddressPrefix: "*", - destinationPortRange: "80", - direction: "Inbound", - priority: 130, - sourceAddressPrefix: "*", - sourcePortRange: "*", - protocol: "*", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkSecurityGroup(); - await createNetworkSecurityGroupWithRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsDeleteSample.ts deleted file mode 100644 index bda3f612fc7f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified network security group. - * - * @summary Deletes the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupDelete.json - */ -async function deleteNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.beginDeleteAndWait( - resourceGroupName, - networkSecurityGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsGetSample.ts deleted file mode 100644 index dec36f15fe0c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network security group. - * - * @summary Gets the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupGet.json - */ -async function getNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.get( - resourceGroupName, - networkSecurityGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsListAllSample.ts deleted file mode 100644 index 60db6637bee7..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network security groups in a subscription. - * - * @summary Gets all network security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupListAll.json - */ -async function listAllNetworkSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityGroups.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkSecurityGroups(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsListSample.ts deleted file mode 100644 index 14385bb6a918..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network security groups in a resource group. - * - * @summary Gets all network security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupList.json - */ -async function listNetworkSecurityGroupsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityGroups.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkSecurityGroupsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsUpdateTagsSample.ts deleted file mode 100644 index 2a220577b005..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityGroupsUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a network security group tags. - * - * @summary Updates a network security group tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupUpdateTags.json - */ -async function updateNetworkSecurityGroupTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityGroups.updateTags( - resourceGroupName, - networkSecurityGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNetworkSecurityGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts deleted file mode 100644 index 99db45d8fb2e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NspAccessRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network access rule. - * - * @summary Creates or updates a network access rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRulePut.json - */ -async function nspAccessRulePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const parameters: NspAccessRule = { - addressPrefixes: ["10.11.0.0/16", "10.10.1.0/24"], - direction: "Inbound", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterAccessRules.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspAccessRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesDeleteSample.ts deleted file mode 100644 index a019e8376a05..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP access rule. - * - * @summary Deletes an NSP access rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleDelete.json - */ -async function nspAccessRulesDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.delete( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await nspAccessRulesDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesGetSample.ts deleted file mode 100644 index 9167d5c36f45..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified NSP access rule by name. - * - * @summary Gets the specified NSP access rule by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleGet.json - */ -async function nspAccessRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.get( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await nspAccessRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesListSample.ts deleted file mode 100644 index 8f9d86a1b87d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP access rules in the specified NSP profile. - * - * @summary Lists the NSP access rules in the specified NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleList.json - */ -async function nspAccessRulesList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAccessRules.list( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspAccessRulesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesReconcileSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesReconcileSample.ts deleted file mode 100644 index 9462e137feff..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAccessRulesReconcileSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reconcile NSP access rules - * - * @summary Reconcile NSP access rules - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAccessRuleReconcile.json - */ -async function nspAccessRuleReconcile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const accessRuleName = "accessRuleName1"; - const parameters: Record = { properties: {} }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAccessRules.reconcile( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspAccessRuleReconcile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociableResourceTypesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociableResourceTypesListSample.ts deleted file mode 100644 index b51f9da24bc2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociableResourceTypesListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter - * - * @summary Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PerimeterAssociableResourcesList.json - */ -async function networkSecurityPerimeterAssociableResourceTypes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAssociableResourceTypes.list( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkSecurityPerimeterAssociableResourceTypes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts deleted file mode 100644 index 6524b013d47e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NspAssociation} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a NSP resource association. - * - * @summary Creates or updates a NSP resource association. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationPut.json - */ -async function nspAssociationPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const parameters: NspAssociation = { - accessMode: "Enforced", - privateLinkResource: { - id: "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}", - }, - profile: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterAssociations.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspAssociationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsDeleteSample.ts deleted file mode 100644 index a2dc74805b0a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP association resource. - * - * @summary Deletes an NSP association resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationDelete.json - */ -async function nspAssociationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterAssociations.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - ); - console.log(result); -} - -async function main(): Promise { - await nspAssociationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsGetSample.ts deleted file mode 100644 index 3dabe22a5846..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified NSP association by name. - * - * @summary Gets the specified NSP association by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationGet.json - */ -async function nspAssociationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.get( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - ); - console.log(result); -} - -async function main(): Promise { - await nspAssociationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsListSample.ts deleted file mode 100644 index b85377113599..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP resource associations. - * - * @summary Lists the NSP resource associations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationList.json - */ -async function nspAssociationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterAssociations.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspAssociationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsReconcileSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsReconcileSample.ts deleted file mode 100644 index d2c7eb318836..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterAssociationsReconcileSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reconcile NSP association - * - * @summary Reconcile NSP association - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspAssociationReconcile.json - */ -async function nspAssociationReconcile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const associationName = "association1"; - const parameters: Record = { properties: {} }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterAssociations.reconcile( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspAssociationReconcile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesDeleteSample.ts deleted file mode 100644 index 9ba89f8de087..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP LinkReference resource. - * - * @summary Deletes an NSP LinkReference resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceDelete.json - */ -async function nspLinkReferenceDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const linkReferenceName = "link1-guid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterLinkReferences.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLinkReferenceDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesGetSample.ts deleted file mode 100644 index 73daf6a9aa9b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified NSP linkReference resource. - * - * @summary Gets the specified NSP linkReference resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceGet.json - */ -async function nspLinkReferencesGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const linkReferenceName = "link1-guid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinkReferences.get( - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLinkReferencesGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesListSample.ts deleted file mode 100644 index 08c8a91c0046..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinkReferencesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP LinkReference resources in the specified network security perimeter. - * - * @summary Lists the NSP LinkReference resources in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkReferenceList.json - */ -async function nspLinkReferenceList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp2"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLinkReferences.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspLinkReferenceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksCreateOrUpdateSample.ts deleted file mode 100644 index 3bf00d110f79..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksCreateOrUpdateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NspLink} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates NSP link resource. - * - * @summary Creates or updates NSP link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkPut.json - */ -async function nspLinksPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const parameters: NspLink = { - autoApprovedRemotePerimeterResourceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp2", - localInboundProfiles: ["*"], - remoteInboundProfiles: ["*"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspLinksPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksDeleteSample.ts deleted file mode 100644 index d759db2235a1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP Link resource. - * - * @summary Deletes an NSP Link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkDelete.json - */ -async function nspLinkDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLinkDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksGetSample.ts deleted file mode 100644 index 42f5dcc86e57..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified NSP link resource. - * - * @summary Gets the specified NSP link resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkGet.json - */ -async function nspLinksGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const linkName = "link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLinks.get( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLinksGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksListSample.ts deleted file mode 100644 index 7f2ea54c22fa..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLinksListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP Link resources in the specified network security perimeter. - * - * @summary Lists the NSP Link resources in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLinkList.json - */ -async function nspLinkList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLinks.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspLinkList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index eefe607d5926..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NspLoggingConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates NSP logging configuration. - * - * @summary Creates or updates NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationPut.json - */ -async function nspLoggingConfigurationPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const parameters: NspLoggingConfiguration = { - enabledLogCategories: [ - "NspPublicInboundPerimeterRulesDenied", - "NspPublicOutboundPerimeterRulesDenied", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterLoggingConfigurations.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspLoggingConfigurationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts deleted file mode 100644 index 3191adc62e84..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP Logging configuration. - * - * @summary Deletes an NSP Logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationDelete.json - */ -async function nspLoggingConfigurationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkSecurityPerimeterLoggingConfigurations.delete( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLoggingConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsGetSample.ts deleted file mode 100644 index f04ea003a275..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the NSP logging configuration. - * - * @summary Gets the NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationGet.json - */ -async function nspLoggingConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const loggingConfigurationName = "instance"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterLoggingConfigurations.get( - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await nspLoggingConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsListSample.ts deleted file mode 100644 index 89990f76e9fb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterLoggingConfigurationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP logging configuration. - * - * @summary Lists the NSP logging configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspLoggingConfigurationList.json - */ -async function nspLoggingConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterLoggingConfigurations.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspLoggingConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterOperationStatusesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterOperationStatusesGetSample.ts deleted file mode 100644 index e26c96a85c7b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterOperationStatusesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the operation status for the given operation id. - * - * @summary Gets the operation status for the given operation id. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspOperationStatusGet.json - */ -async function nspOperationStatusGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "location1"; - const operationId = "operationId1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterOperationStatuses.get( - location, - operationId, - ); - console.log(result); -} - -async function main(): Promise { - await nspOperationStatusGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts deleted file mode 100644 index d5552a939c02..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesCreateOrUpdateSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NspProfile} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network profile. - * - * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfilePut.json - */ -async function nspProfilesPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const parameters: NspProfile = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await nspProfilesPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesDeleteSample.ts deleted file mode 100644 index 32f161cdcc81..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an NSP profile. - * - * @summary Deletes an NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileDelete.json - */ -async function nspProfilesDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.delete( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - ); - console.log(result); -} - -async function main(): Promise { - await nspProfilesDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesGetSample.ts deleted file mode 100644 index 257f6bc53bf8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified NSP profile. - * - * @summary Gets the specified NSP profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileGet.json - */ -async function nspProfilesGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const profileName = "profile1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterProfiles.get( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - ); - console.log(result); -} - -async function main(): Promise { - await nspProfilesGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesListSample.ts deleted file mode 100644 index 22ce1826100c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterProfilesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the NSP profiles in the specified network security perimeter. - * - * @summary Lists the NSP profiles in the specified network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspProfileList.json - */ -async function nspProfilesList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterProfiles.list( - resourceGroupName, - networkSecurityPerimeterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspProfilesList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterServiceTagsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterServiceTagsListSample.ts deleted file mode 100644 index f55b1daaeb13..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimeterServiceTagsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. - * - * @summary Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NspServiceTagsList.json - */ -async function nspServiceTagsList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeterServiceTags.list( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await nspServiceTagsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersCreateOrUpdateSample.ts deleted file mode 100644 index 38d6b3639ee0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersCreateOrUpdateSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkSecurityPerimeter} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a Network Security Perimeter. - * - * @summary Creates or updates a Network Security Perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterPut.json - */ -async function putNetworkSecurityPerimeter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const parameters: NetworkSecurityPerimeter = { location: "location1" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.createOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersDeleteSample.ts deleted file mode 100644 index 3d28e80266d4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network security perimeter. - * - * @summary Deletes a network security perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterDelete.json - */ -async function networkSecurityPerimeterDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "testNSP1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.beginDeleteAndWait( - resourceGroupName, - networkSecurityPerimeterName, - ); - console.log(result); -} - -async function main(): Promise { - await networkSecurityPerimeterDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersGetSample.ts deleted file mode 100644 index a445b45febc4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network security perimeter by the name. - * - * @summary Gets the specified network security perimeter by the name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterGet.json - */ -async function networkSecurityPerimeterGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.get( - resourceGroupName, - networkSecurityPerimeterName, - ); - console.log(result); -} - -async function main(): Promise { - await networkSecurityPerimeterGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersListBySubscriptionSample.ts deleted file mode 100644 index d2bd622362a4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network security perimeters in a subscription. - * - * @summary List all network security perimeters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterListAll.json - */ -async function networkSecurityPerimetersList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkSecurityPerimetersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersListSample.ts deleted file mode 100644 index 04eec97d7168..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List network security perimeters in a resource group. - * - * @summary List network security perimeters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterList.json - */ -async function listNetworkSecurityPerimeter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkSecurityPerimeters.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersPatchSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersPatchSample.ts deleted file mode 100644 index 341d4fa1c815..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkSecurityPerimetersPatchSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { UpdateTagsRequest} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Patch Tags for a Network Security Perimeter. - * - * @summary Patch Tags for a Network Security Perimeter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityPerimeterPatch.json - */ -async function patchNetworkSecurityPerimeter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityPerimeterName = "nsp1"; - const parameters: UpdateTagsRequest = { tags: { description: "nsp1" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeters.patch( - resourceGroupName, - networkSecurityPerimeterName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await patchNetworkSecurityPerimeter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index e7eed325a5c6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkVirtualApplianceConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * - * @summary Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionPut.json - */ -async function networkVirtualApplianceConnectionPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection = - { - namePropertiesName: "connection1", - asn: 64512, - bgpPeerAddress: ["169.254.16.13", "169.254.16.14"], - enableInternetSecurity: false, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - ], - labels: ["label1"], - }, - }, - tunnelIdentifier: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualApplianceConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - networkVirtualApplianceConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkVirtualApplianceConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts deleted file mode 100644 index 4a24ef2470ad..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a NVA connection. - * - * @summary Deletes a NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionDelete.json - */ -async function networkVirtualApplianceConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualApplianceConnections.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await networkVirtualApplianceConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsGetSample.ts deleted file mode 100644 index f2b81a3556c1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of specified NVA connection. - * - * @summary Retrieves the details of specified NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionGet.json - */ -async function networkVirtualApplianceConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const connectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualApplianceConnections.get( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await networkVirtualApplianceConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsListSample.ts deleted file mode 100644 index b9be8da441c2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualApplianceConnectionsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists NetworkVirtualApplianceConnections under the NVA. - * - * @summary Lists NetworkVirtualApplianceConnections under the NVA. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceConnectionList.json - */ -async function networkVirtualApplianceConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualApplianceConnections.list( - resourceGroupName, - networkVirtualApplianceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkVirtualApplianceConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts deleted file mode 100644 index fb9a885a5be3..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts +++ /dev/null @@ -1,479 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkVirtualAppliance} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetBasicPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetIngressPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicIncludingInternetIngress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - internetIngressPublicIps: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/slbip", - }, - ], - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetNetworkProfilePut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicIncludingNetworkProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - networkProfile: { - networkInterfaceConfigurations: [ - { - nicType: "PublicNic", - properties: { - ipConfigurations: [ - { - name: "myPrimaryPublicIpConfig", - properties: { primary: true }, - }, - { - name: "myNonPrimaryPublicIpConfig", - properties: { primary: false }, - }, - ], - }, - }, - { - nicType: "PrivateNic", - properties: { - ipConfigurations: [ - { - name: "myPrimaryPrivateIpConfig", - properties: { primary: true }, - }, - { - name: "myNonPrimaryPrivateIpConfig", - properties: { primary: false }, - }, - ], - }, - }, - ], - }, - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetAdditionalPrivatePut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicAdditionalPrivateNic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - { - name: "myAdditionalInterface", - type: ["AdditionalPrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceVnetAdditionalPublicPut.json - */ -async function createNvaInVNetWithPrivateNicPublicNicAdditionalPublicNic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - location: "West US", - nvaInterfaceConfigurations: [ - { - name: "dataInterface", - type: ["PrivateNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - { - name: "managementInterface", - type: ["PublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2", - }, - }, - { - name: "myAdditionalPublicInterface", - type: ["AdditionalPublicNic"], - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3", - }, - }, - ], - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "latest", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualAppliancePut.json - */ -async function createNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - additionalNics: [{ name: "exrsdwan", hasPublicIp: true }], - bootStrapConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig", - ], - cloudInitConfigurationBlobs: [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig", - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - internetIngressPublicIps: [ - { - id: "/subscriptions/{{subscriptionId}}/resourceGroups/{{rg}}/providers/Microsoft.Network/publicIPAddresses/slbip", - }, - ], - location: "West US", - networkProfile: { - networkInterfaceConfigurations: [ - { - nicType: "PublicNic", - properties: { - ipConfigurations: [ - { name: "publicnicipconfig", properties: { primary: true } }, - { name: "publicnicipconfig-2", properties: { primary: false } }, - ], - }, - }, - { - nicType: "PrivateNic", - properties: { - ipConfigurations: [ - { name: "privatenicipconfig", properties: { primary: true } }, - { name: "privatenicipconfig-2", properties: { primary: false } }, - ], - }, - }, - ], - }, - nvaSku: { - bundledScaleUnit: "1", - marketPlaceVersion: "12.1", - vendor: "Cisco SDWAN", - }, - tags: { key1: "value1" }, - virtualApplianceAsn: 10000, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. - * - * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSaaSPut.json - */ -async function createSaaSNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: NetworkVirtualAppliance = { - delegation: { serviceName: "PaloAltoNetworks.Cloudngfw/firewalls" }, - location: "West US", - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNvaInVNetWithPrivateNicPublicNic(); - await createNvaInVNetWithPrivateNicPublicNicIncludingInternetIngress(); - await createNvaInVNetWithPrivateNicPublicNicIncludingNetworkProfile(); - await createNvaInVNetWithPrivateNicPublicNicAdditionalPrivateNic(); - await createNvaInVNetWithPrivateNicPublicNicAdditionalPublicNic(); - await createNetworkVirtualAppliance(); - await createSaaSNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesDeleteSample.ts deleted file mode 100644 index deddde6bb6f9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Network Virtual Appliance. - * - * @summary Deletes the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceDelete.json - */ -async function deleteNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts deleted file mode 100644 index 413a144463d2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesGetBootDiagnosticLogsSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkVirtualApplianceBootDiagnosticParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. - * - * @summary Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceBootDiagnostics.json - */ -async function retrieveBootDiagnosticLogsForAGivenNvaVmssInstance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const request: NetworkVirtualApplianceBootDiagnosticParameters = { - consoleScreenshotStorageSasUrl: - "https://blobcortextesturl.blob.core.windows.net/nvaBootDiagContainer/consoleScreenshot.png?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - instanceId: 0, - serialConsoleStorageSasUrl: - "https://blobcortextesturl.blob.core.windows.net/nvaBootDiagContainer/serialLogs.txt?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkVirtualAppliances.beginGetBootDiagnosticLogsAndWait( - resourceGroupName, - networkVirtualApplianceName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await retrieveBootDiagnosticLogsForAGivenNvaVmssInstance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesGetSample.ts deleted file mode 100644 index 143ef0815e75..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Network Virtual Appliance. - * - * @summary Gets the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceGet.json - */ -async function getNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.get( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts deleted file mode 100644 index 4939f91026b4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Network Virtual Appliances in a resource group. - * - * @summary Lists all Network Virtual Appliances in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json - */ -async function listAllNetworkVirtualApplianceForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualAppliances.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkVirtualApplianceForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesListSample.ts deleted file mode 100644 index 49736d492aa3..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Network Virtual Appliances in a subscription. - * - * @summary Gets all Network Virtual Appliances in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceListBySubscription.json - */ -async function listAllNetworkVirtualAppliancesForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkVirtualAppliances.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkVirtualAppliancesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesReimageSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesReimageSample.ts deleted file mode 100644 index eae533485687..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesReimageSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reimages one VM belonging to the specified Network Virtual Appliance. - * - * @summary Reimages one VM belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSpecificReimage.json - */ -async function reimagesSpecificNetworkVirtualApplianceVMSInVMScaleSet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginReimageAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await reimagesSpecificNetworkVirtualApplianceVMSInVMScaleSet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesRestartSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesRestartSample.ts deleted file mode 100644 index 764e75cb6565..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesRestartSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * - * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceEmptyRestart.json - */ -async function restartAllNetworkVirtualApplianceVMSInVMScaleSet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginRestartAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * - * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSpecificRestart.json - */ -async function restartSpecificNetworkVirtualApplianceVMSInVMScaleSet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.beginRestartAndWait( - resourceGroupName, - networkVirtualApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await restartAllNetworkVirtualApplianceVMSInVMScaleSet(); - await restartSpecificNetworkVirtualApplianceVMSInVMScaleSet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts deleted file mode 100644 index 576ed38ce159..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a Network Virtual Appliance. - * - * @summary Updates a Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceUpdateTags.json - */ -async function updateNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const parameters: TagsObject = { tags: { key1: "value1", key2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkVirtualAppliances.updateTags( - resourceGroupName, - networkVirtualApplianceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersCheckConnectivitySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersCheckConnectivitySample.ts deleted file mode 100644 index 86004c40096c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersCheckConnectivitySample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectivityParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * - * @summary Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherConnectivityCheck.json - */ -async function checkConnectivity(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: ConnectivityParameters = { - destination: { address: "192.168.100.4", port: 3389 }, - preferredIPVersion: "IPv4", - source: { - resourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginCheckConnectivityAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await checkConnectivity(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersCreateOrUpdateSample.ts deleted file mode 100644 index 6096bad1b4f1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersCreateOrUpdateSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NetworkWatcher} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network watcher in the specified resource group. - * - * @summary Creates or updates a network watcher in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherCreate.json - */ -async function createNetworkWatcher(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: NetworkWatcher = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.createOrUpdate( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersDeleteSample.ts deleted file mode 100644 index 97c3356e1aec..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified network watcher resource. - * - * @summary Deletes the specified network watcher resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherDelete.json - */ -async function deleteNetworkWatcher(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts deleted file mode 100644 index 9c75adf0299f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - AzureReachabilityReportParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @summary NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json - */ -async function getAzureReachabilityReport(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: AzureReachabilityReportParameters = { - azureLocations: ["West US"], - endTime: new Date("2017-09-10T00:00:00Z"), - providerLocation: { country: "United States", state: "washington" }, - providers: ["Frontier Communications of America, Inc. - ASN 5650"], - startTime: new Date("2017-09-07T00:00:00Z"), - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginGetAzureReachabilityReportAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getAzureReachabilityReport(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetFlowLogStatusSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetFlowLogStatusSample.ts deleted file mode 100644 index 742802f302fa..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetFlowLogStatusSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FlowLogStatusParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Queries status of flow log and traffic analytics (optional) on a specified resource. - * - * @summary Queries status of flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogStatusQuery.json - */ -async function getFlowLogStatus(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: FlowLogStatusParameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetFlowLogStatusAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getFlowLogStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts deleted file mode 100644 index d354fc36d733..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkConfigurationDiagnosticParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * - * @summary Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json - */ -async function networkConfigurationDiagnostic(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: NetworkConfigurationDiagnosticParameters = { - profiles: [ - { - destination: "12.11.12.14", - destinationPort: "12100", - direction: "Inbound", - source: "10.1.0.4", - protocol: "TCP", - }, - ], - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginGetNetworkConfigurationDiagnosticAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await networkConfigurationDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetNextHopSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetNextHopSample.ts deleted file mode 100644 index b3e5a37f56a2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetNextHopSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { NextHopParameters} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the next hop from the specified VM. - * - * @summary Gets the next hop from the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherNextHopGet.json - */ -async function getNextHop(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: NextHopParameters = { - destinationIPAddress: "10.0.0.10", - sourceIPAddress: "10.0.0.5", - targetNicResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetNextHopAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getNextHop(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetSample.ts deleted file mode 100644 index d7912422b85a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified network watcher by resource group. - * - * @summary Gets the specified network watcher by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherGet.json - */ -async function getNetworkWatcher(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.get( - resourceGroupName, - networkWatcherName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkWatcher(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTopologySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTopologySample.ts deleted file mode 100644 index 046c01c32b8d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTopologySample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - TopologyParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the current network topology by resource group. - * - * @summary Gets the current network topology by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTopologyGet.json - */ -async function getTopology(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: TopologyParameters = { targetResourceGroupName: "rg2" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.getTopology( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getTopology(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTroubleshootingResultSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTroubleshootingResultSample.ts deleted file mode 100644 index e1e2e9af4e63..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTroubleshootingResultSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - QueryTroubleshootingParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the last completed troubleshooting result on a specified resource. - * - * @summary Get the last completed troubleshooting result on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTroubleshootResultQuery.json - */ -async function getTroubleshootResult(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: QueryTroubleshootingParameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginGetTroubleshootingResultAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getTroubleshootResult(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTroubleshootingSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTroubleshootingSample.ts deleted file mode 100644 index ee4b9632b8eb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetTroubleshootingSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - TroubleshootingParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Initiate troubleshooting on a specified resource. - * - * @summary Initiate troubleshooting on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherTroubleshootGet.json - */ -async function getTroubleshooting(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: TroubleshootingParameters = { - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", - storagePath: "https://st1.blob.core.windows.net/cn1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetTroubleshootingAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getTroubleshooting(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetVMSecurityRulesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetVMSecurityRulesSample.ts deleted file mode 100644 index 21767e08eb69..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersGetVMSecurityRulesSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityGroupViewParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the configured and effective security group rules on the specified VM. - * - * @summary Gets the configured and effective security group rules on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherSecurityGroupViewGet.json - */ -async function getSecurityGroupView(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: SecurityGroupViewParameters = { - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginGetVMSecurityRulesAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getSecurityGroupView(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListAllSample.ts deleted file mode 100644 index 977bc2da5ec9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network watchers by subscription. - * - * @summary Gets all network watchers by subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherListAll.json - */ -async function listAllNetworkWatchers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkWatchers.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkWatchers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListAvailableProvidersSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListAvailableProvidersSample.ts deleted file mode 100644 index 15dfd82e3c19..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListAvailableProvidersSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - AvailableProvidersListParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * - * @summary NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherAvailableProvidersListGet.json - */ -async function getAvailableProvidersList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: AvailableProvidersListParameters = { - azureLocations: ["West US"], - city: "seattle", - country: "United States", - state: "washington", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginListAvailableProvidersAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getAvailableProvidersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListSample.ts deleted file mode 100644 index 905bf6aad7bc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all network watchers by resource group. - * - * @summary Gets all network watchers by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherList.json - */ -async function listNetworkWatchers(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.networkWatchers.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkWatchers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts deleted file mode 100644 index b950cce252ba..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - FlowLogInformation} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Configures flow log and traffic analytics (optional) on a specified resource. - * - * @summary Configures flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherFlowLogConfigure.json - */ -async function configureFlowLog(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: FlowLogInformation = { - enabled: true, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": - {}, - }, - }, - storageId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.networkWatchers.beginSetFlowLogConfigurationAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await configureFlowLog(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersUpdateTagsSample.ts deleted file mode 100644 index 89f6ed6cfe9c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a network watcher tags. - * - * @summary Updates a network watcher tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherUpdateTags.json - */ -async function updateNetworkWatcherTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.updateTags( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateNetworkWatcherTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersVerifyIPFlowSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersVerifyIPFlowSample.ts deleted file mode 100644 index 00ab00594bb8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/networkWatchersVerifyIPFlowSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VerificationIPFlowParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * - * @summary Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherIpFlowVerify.json - */ -async function ipFlowVerify(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const parameters: VerificationIPFlowParameters = { - direction: "Outbound", - localIPAddress: "10.2.0.4", - localPort: "80", - remoteIPAddress: "121.10.1.1", - remotePort: "80", - targetResourceId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - protocol: "TCP", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.networkWatchers.beginVerifyIPFlowAndWait( - resourceGroupName, - networkWatcherName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await ipFlowVerify(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/operationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/operationsListSample.ts deleted file mode 100644 index d780aa09727f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all of the available Network Rest API operations. - * - * @summary Lists all of the available Network Rest API operations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/OperationList.json - */ -async function getAListOfOperationsForAResourceProvider(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAListOfOperationsForAResourceProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 16ae47c00a46..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { P2SVpnGateway} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * - * @summary Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayPut.json - */ -async function p2SVpnGatewayPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const p2SVpnGatewayParameters: P2SVpnGateway = { - customDnsServers: ["1.1.1.1", "2.2.2.2"], - isRoutingPreferenceInternet: false, - location: "West US", - p2SConnectionConfigurations: [ - { - name: "P2SConnectionConfig1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/p2sVpnGateways/p2sVpnGateway1/p2sConnectionConfigurations/P2SConnectionConfig1", - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - vnetRoutes: { staticRoutes: [] }, - }, - vpnClientAddressPool: { addressPrefixes: ["101.3.0.0/16"] }, - }, - ], - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", - }, - vpnGatewayScaleUnit: 1, - vpnServerConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysDeleteSample.ts deleted file mode 100644 index bdb47aef54d2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a virtual wan p2s vpn gateway. - * - * @summary Deletes a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayDelete.json - */ -async function p2SVpnGatewayDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginDeleteAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts deleted file mode 100644 index fd4f8f04d141..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - P2SVpnConnectionRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json - */ -async function disconnectVpnConnectionsFromP2SVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vpn-gateway-test"; - const p2SVpnGatewayName = "p2svpngateway"; - const request: P2SVpnConnectionRequest = { - vpnConnectionIds: ["vpnconnId1", "vpnconnId2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.p2SVpnGateways.beginDisconnectP2SVpnConnectionsAndWait( - resourceGroupName, - p2SVpnGatewayName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await disconnectVpnConnectionsFromP2SVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts deleted file mode 100644 index d02221208f6d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - P2SVpnProfileParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * - * @summary Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json - */ -async function generateP2SVpnGatewayVpnprofile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const parameters: P2SVpnProfileParameters = { - authenticationMethod: "EAPTLS", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginGenerateVpnProfileAndWait( - resourceGroupName, - gatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await generateP2SVpnGatewayVpnprofile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts deleted file mode 100644 index 2fe9b68284cd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - P2SVpnConnectionHealthRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json - */ -async function p2SVpnGatewayGetConnectionHealthDetailed(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vpn-gateway-test"; - const gatewayName = "p2svpngateway"; - const request: P2SVpnConnectionHealthRequest = { - outputBlobSasUrl: - "https://blobcortextesturl.blob.core.windows.net/folderforconfig/p2sconnectionhealths?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - vpnUserNamesFilter: ["vpnUser1", "vpnUser2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.p2SVpnGateways.beginGetP2SVpnConnectionHealthDetailedAndWait( - resourceGroupName, - gatewayName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayGetConnectionHealthDetailed(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts deleted file mode 100644 index fa0518945158..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * - * @summary Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGetConnectionHealth.json - */ -async function p2SVpnGatewayGetConnectionHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.p2SVpnGateways.beginGetP2SVpnConnectionHealthAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayGetConnectionHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetSample.ts deleted file mode 100644 index 076c52c92c2d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a virtual wan p2s vpn gateway. - * - * @summary Retrieves the details of a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayGet.json - */ -async function p2SVpnGatewayGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.get( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts deleted file mode 100644 index 77b997157953..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the P2SVpnGateways in a resource group. - * - * @summary Lists all the P2SVpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayListByResourceGroup.json - */ -async function p2SVpnGatewayListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.p2SVpnGateways.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await p2SVpnGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysListSample.ts deleted file mode 100644 index bfdc87b7a48a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the P2SVpnGateways in a subscription. - * - * @summary Lists all the P2SVpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayList.json - */ -async function p2SVpnGatewayListBySubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.p2SVpnGateways.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await p2SVpnGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysResetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysResetSample.ts deleted file mode 100644 index bd8a7e21a586..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysResetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the primary of the p2s vpn gateway in the specified resource group. - * - * @summary Resets the primary of the p2s vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayReset.json - */ -async function resetP2SVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginResetAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await resetP2SVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts deleted file mode 100644 index de043d14741f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates virtual wan p2s vpn gateway tags. - * - * @summary Updates virtual wan p2s vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/P2SVpnGatewayUpdateTags.json - */ -async function p2SVpnGatewayUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "p2sVpnGateway1"; - const p2SVpnGatewayParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.p2SVpnGateways.beginUpdateTagsAndWait( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await p2SVpnGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesCreateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesCreateSample.ts deleted file mode 100644 index 7ccbae963060..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesCreateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { PacketCapture} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create and start a packet capture on the specified VM. - * - * @summary Create and start a packet capture on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureCreate.json - */ -async function createPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const parameters: PacketCapture = { - bytesToCapturePerPacket: 10000, - filters: [{ localIPAddress: "10.0.0.4", localPort: "80", protocol: "TCP" }], - storageLocation: { - filePath: "D:\\capture\\pc1.cap", - storageId: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/pcstore", - storagePath: - "https://mytestaccountname.blob.core.windows.net/capture/pc1.cap", - }, - target: - "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - timeLimitInSeconds: 100, - totalBytesPerSession: 100000, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginCreateAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesDeleteSample.ts deleted file mode 100644 index d1be1f9b8d53..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified packet capture session. - * - * @summary Deletes the specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureDelete.json - */ -async function deletePacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginDeleteAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesGetSample.ts deleted file mode 100644 index 61d5575f33a5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a packet capture session by name. - * - * @summary Gets a packet capture session by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureGet.json - */ -async function getPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.get( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main(): Promise { - await getPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesGetStatusSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesGetStatusSample.ts deleted file mode 100644 index 4c9bc1de3b4a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesGetStatusSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Query the status of a running packet capture session. - * - * @summary Query the status of a running packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json - */ -async function queryPacketCaptureStatus(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginGetStatusAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main(): Promise { - await queryPacketCaptureStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesListSample.ts deleted file mode 100644 index 9d98c8fc05f1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all packet capture sessions within the specified resource group. - * - * @summary Lists all packet capture sessions within the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCapturesList.json - */ -async function listPacketCaptures(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.packetCaptures.list( - resourceGroupName, - networkWatcherName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPacketCaptures(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesStopSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesStopSample.ts deleted file mode 100644 index 5be4c192b412..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/packetCapturesStopSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops a specified packet capture session. - * - * @summary Stops a specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkWatcherPacketCaptureStop.json - */ -async function stopPacketCapture(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkWatcherName = "nw1"; - const packetCaptureName = "pc1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.packetCaptures.beginStopAndWait( - resourceGroupName, - networkWatcherName, - packetCaptureName, - ); - console.log(result); -} - -async function main(): Promise { - await stopPacketCapture(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts deleted file mode 100644 index 389180e4fdbe..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * - * @summary Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PeerExpressRouteCircuitConnectionGet.json - */ -async function peerExpressRouteCircuitConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const connectionName = "60aee347-e889-4a42-8c1b-0aae8b1e4013"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.peerExpressRouteCircuitConnections.get( - resourceGroupName, - circuitName, - peeringName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await peerExpressRouteCircuitConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts deleted file mode 100644 index c3368e8b522a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all global reach peer connections associated with a private peering in an express route circuit. - * - * @summary Gets all global reach peer connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PeerExpressRouteCircuitConnectionList.json - */ -async function listPeerExpressRouteCircuitConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const circuitName = "ExpressRouteARMCircuitA"; - const peeringName = "AzurePrivatePeering"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.peerExpressRouteCircuitConnections.list( - resourceGroupName, - circuitName, - peeringName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPeerExpressRouteCircuitConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts deleted file mode 100644 index e77d6f60b762..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - PrivateDnsZoneGroup} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a private dns zone group in the specified private endpoint. - * - * @summary Creates or updates a private dns zone group in the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json - */ -async function createPrivateDnsZoneGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const parameters: PrivateDnsZoneGroup = { - privateDnsZoneConfigs: [ - { - privateDnsZoneId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/zone1.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsDeleteSample.ts deleted file mode 100644 index 66dbb0e00d7f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified private dns zone group. - * - * @summary Deletes the specified private dns zone group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json - */ -async function deletePrivateDnsZoneGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.beginDeleteAndWait( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsGetSample.ts deleted file mode 100644 index a1b7ce811591..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the private dns zone group resource by specified private dns zone group name. - * - * @summary Gets the private dns zone group resource by specified private dns zone group name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupGet.json - */ -async function getPrivateDnsZoneGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const privateDnsZoneGroupName = "testPdnsgroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateDnsZoneGroups.get( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - ); - console.log(result); -} - -async function main(): Promise { - await getPrivateDnsZoneGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsListSample.ts deleted file mode 100644 index a3254c37ee80..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateDnsZoneGroupsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private dns zone groups in a private endpoint. - * - * @summary Gets all private dns zone groups in a private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDnsZoneGroupList.json - */ -async function listPrivateEndpointsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const privateEndpointName = "testPe"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateDnsZoneGroups.list( - privateEndpointName, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPrivateEndpointsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsCreateOrUpdateSample.ts deleted file mode 100644 index 836299591a4f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsCreateOrUpdateSample.ts +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { PrivateEndpoint} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointCreate.json - */ -async function createPrivateEndpoint(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters: PrivateEndpoint = { - customNetworkInterfaceName: "testPeNic", - ipConfigurations: [ - { - name: "pestaticconfig", - groupId: "file", - memberName: "file", - privateIPAddress: "192.168.0.6", - }, - ], - ipVersionType: "IPv4", - location: "eastus2euap", - privateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointCreateWithASG.json - */ -async function createPrivateEndpointWithApplicationSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters: PrivateEndpoint = { - applicationSecurityGroups: [ - { - id: "/subscriptions/subId/resourceGroups/rg1/provders/Microsoft.Network/applicationSecurityGroup/asg1", - }, - ], - location: "eastus2euap", - privateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. - * - * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointCreateForManualApproval.json - */ -async function createPrivateEndpointWithManualApprovalConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const parameters: PrivateEndpoint = { - customNetworkInterfaceName: "testPeNic", - ipConfigurations: [ - { - name: "pestaticconfig", - groupId: "file", - memberName: "file", - privateIPAddress: "192.168.0.5", - }, - ], - location: "eastus", - manualPrivateLinkServiceConnections: [ - { - groupIds: ["groupIdFromResource"], - privateLinkServiceId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - requestMessage: "Please manually approve my connection.", - }, - ], - subnet: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginCreateOrUpdateAndWait( - resourceGroupName, - privateEndpointName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPrivateEndpoint(); - await createPrivateEndpointWithApplicationSecurityGroups(); - await createPrivateEndpointWithManualApprovalConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsDeleteSample.ts deleted file mode 100644 index d8e88ff3ba70..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified private endpoint. - * - * @summary Deletes the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointDelete.json - */ -async function deletePrivateEndpoint(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.beginDeleteAndWait( - resourceGroupName, - privateEndpointName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePrivateEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsGetSample.ts deleted file mode 100644 index 6ce3c6a11d62..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsGetSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointGet.json - */ -async function getPrivateEndpoint(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get( - resourceGroupName, - privateEndpointName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointGetWithASG.json - */ -async function getPrivateEndpointWithApplicationSecurityGroups(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get( - resourceGroupName, - privateEndpointName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified private endpoint by resource group. - * - * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointGetForManualApproval.json - */ -async function getPrivateEndpointWithManualApprovalConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const privateEndpointName = "testPe"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateEndpoints.get( - resourceGroupName, - privateEndpointName, - ); - console.log(result); -} - -async function main(): Promise { - await getPrivateEndpoint(); - await getPrivateEndpointWithApplicationSecurityGroups(); - await getPrivateEndpointWithManualApprovalConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsListBySubscriptionSample.ts deleted file mode 100644 index ce2bf0eca776..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private endpoints in a subscription. - * - * @summary Gets all private endpoints in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointListAll.json - */ -async function listAllPrivateEndpoints(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateEndpoints.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllPrivateEndpoints(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsListSample.ts deleted file mode 100644 index c6a1d95b9f20..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateEndpointsListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private endpoints in a resource group. - * - * @summary Gets all private endpoints in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateEndpointList.json - */ -async function listPrivateEndpointsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateEndpoints.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPrivateEndpointsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts deleted file mode 100644 index d9a4527c9e34..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - CheckPrivateLinkServiceVisibilityRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks whether the subscription is visible to private link service in the specified resource group. - * - * @summary Checks whether the subscription is visible to private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json - */ -async function checkPrivateLinkServiceVisibility(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const parameters: CheckPrivateLinkServiceVisibilityRequest = { - privateLinkServiceAlias: - "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.beginCheckPrivateLinkServiceVisibilityByResourceGroupAndWait( - location, - resourceGroupName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await checkPrivateLinkServiceVisibility(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts deleted file mode 100644 index d06098c30bef..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - CheckPrivateLinkServiceVisibilityRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks whether the subscription is visible to private link service. - * - * @summary Checks whether the subscription is visible to private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CheckPrivateLinkServiceVisibility.json - */ -async function checkPrivateLinkServiceVisibility(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const parameters: CheckPrivateLinkServiceVisibilityRequest = { - privateLinkServiceAlias: - "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.beginCheckPrivateLinkServiceVisibilityAndWait( - location, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await checkPrivateLinkServiceVisibility(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCreateOrUpdateSample.ts deleted file mode 100644 index 52e4221af9cf..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - PrivateLinkService} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an private link service in the specified resource group. - * - * @summary Creates or updates an private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceCreate.json - */ -async function createPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const parameters: PrivateLinkService = { - autoApproval: { subscriptions: ["subscription1", "subscription2"] }, - fqdns: ["fqdn1", "fqdn2", "fqdn3"], - ipConfigurations: [ - { - name: "fe-lb", - privateIPAddress: "10.0.1.4", - privateIPAddressVersion: "IPv4", - privateIPAllocationMethod: "Static", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb", - }, - }, - ], - loadBalancerFrontendIpConfigurations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb", - }, - ], - location: "eastus", - visibility: { - subscriptions: ["subscription1", "subscription2", "subscription3"], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts deleted file mode 100644 index 2432116f703a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete private end point connection for a private link service in a subscription. - * - * @summary Delete private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json - */ -async function deletePrivateEndPointConnectionForAPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.beginDeletePrivateEndpointConnectionAndWait( - resourceGroupName, - serviceName, - peConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePrivateEndPointConnectionForAPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesDeleteSample.ts deleted file mode 100644 index 0b33dc2a9309..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified private link service. - * - * @summary Deletes the specified private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceDelete.json - */ -async function deletePrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.beginDeleteAndWait( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts deleted file mode 100644 index 86a25b687d4b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specific private end point connection by specific private link service in the resource group. - * - * @summary Get the specific private end point connection by specific private link service in the resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json - */ -async function getPrivateEndPointConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.getPrivateEndpointConnection( - resourceGroupName, - serviceName, - peConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getPrivateEndPointConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesGetSample.ts deleted file mode 100644 index e35943be42a9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified private link service by resource group. - * - * @summary Gets the specified private link service by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceGet.json - */ -async function getPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.privateLinkServices.get( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await getPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts deleted file mode 100644 index 0530889eca3b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * - * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json - */ -async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listAutoApprovedPrivateLinkServicesByResourceGroup( - location, - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts deleted file mode 100644 index 07728ed7867f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * - * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AutoApprovedPrivateLinkServicesGet.json - */ -async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "regionName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listAutoApprovedPrivateLinkServices( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListBySubscriptionSample.ts deleted file mode 100644 index 5c67956e6e9c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private link service in a subscription. - * - * @summary Gets all private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceListAll.json - */ -async function listAllPrivateListService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllPrivateListService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts deleted file mode 100644 index 906cfbbf28b6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private end point connections for a specific private link service. - * - * @summary Gets all private end point connections for a specific private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json - */ -async function listPrivateLinkServiceInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.listPrivateEndpointConnections( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPrivateLinkServiceInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListSample.ts deleted file mode 100644 index d28bd5e7d293..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all private link services in a resource group. - * - * @summary Gets all private link services in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceList.json - */ -async function listPrivateLinkServiceInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateLinkServices.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPrivateLinkServiceInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts deleted file mode 100644 index eade28955715..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - PrivateEndpointConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Approve or reject private end point connection for a private link service in a subscription. - * - * @summary Approve or reject private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json - */ -async function approveOrRejectPrivateEndPointConnectionForAPrivateLinkService(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceName = "testPls"; - const peConnectionName = "testPlePeConnection"; - const parameters: PrivateEndpointConnection = { - name: "testPlePeConnection", - privateEndpoint: { - id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe", - }, - privateLinkServiceConnectionState: { - description: "approved it for some reason.", - status: "Approved", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.privateLinkServices.updatePrivateEndpointConnection( - resourceGroupName, - serviceName, - peConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await approveOrRejectPrivateEndPointConnectionForAPrivateLinkService(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesCreateOrUpdateSample.ts deleted file mode 100644 index 6959cb71876e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesCreateOrUpdateSample.ts +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { PublicIPAddress} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDns.json - */ -async function createPublicIPAddressDns(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { - dnsSettings: { domainNameLabel: "dnslbl" }, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json - */ -async function createPublicIPAddressDnsWithDomainNameLabelScope(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { - dnsSettings: { - domainNameLabel: "dnslbl", - domainNameLabelScope: "TenantReuse", - }, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateCustomizedValues.json - */ -async function createPublicIPAddressAllocationMethod(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { - idleTimeoutInMinutes: 10, - location: "eastus", - publicIPAddressVersion: "IPv4", - publicIPAllocationMethod: "Static", - sku: { name: "Standard", tier: "Global" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDefaults.json - */ -async function createPublicIPAddressDefaults(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP address. - * - * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressCreateDefaultsStandardV2Sku.json - */ -async function createPublicIPAddressDefaultsWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: PublicIPAddress = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPublicIPAddressDns(); - await createPublicIPAddressDnsWithDomainNameLabelScope(); - await createPublicIPAddressAllocationMethod(); - await createPublicIPAddressDefaults(); - await createPublicIPAddressDefaultsWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts deleted file mode 100644 index f855eb3a35f4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the Ddos Protection Status of a Public IP Address - * - * @summary Gets the Ddos Protection Status of a Public IP Address - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json - */ -async function getDdosProtectionStatusOfAPublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-pip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.beginDdosProtectionStatusAndWait( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await getDdosProtectionStatusOfAPublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDeleteSample.ts deleted file mode 100644 index 6c83f7a80c24..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified public IP address. - * - * @summary Deletes the specified public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressDelete.json - */ -async function deletePublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.beginDeleteAndWait( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts deleted file mode 100644 index fb5169c88d5f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesDisassociateCloudServiceReservedPublicIPSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - DisassociateCloudServicePublicIpRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. - * - * @summary Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressDisassociateCloudServiceReservedPublicIp.json - */ -async function disassociatePublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "pip1"; - const parameters: DisassociateCloudServicePublicIpRequest = { - publicIpArmId: - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/publicIpAddresses/pip2", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.beginDisassociateCloudServiceReservedPublicIpAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await disassociatePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts deleted file mode 100644 index 5a26b5532649..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified public IP address in a cloud service. - * - * @summary Get the specified public IP address in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServicePublicIpGet.json - */ -async function getVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const roleInstanceName = "Test_VM_0"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const publicIpAddressName = "pub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.getCloudServicePublicIPAddress( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await getVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetSample.ts deleted file mode 100644 index f682b2905437..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified public IP address in a specified resource group. - * - * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGet.json - */ -async function getPublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "testDNS-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.get( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified public IP address in a specified resource group. - * - * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressGetStandardV2Sku.json - */ -async function getPublicIPAddressWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "testDNS-ip"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.get( - resourceGroupName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await getPublicIPAddress(); - await getPublicIPAddressWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts deleted file mode 100644 index 8112089cf7d5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified public IP address in a virtual machine scale set. - * - * @summary Get the specified public IP address in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssPublicIpGet.json - */ -async function getVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const publicIpAddressName = "pub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.getVirtualMachineScaleSetPublicIPAddress( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - ); - console.log(result); -} - -async function main(): Promise { - await getVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListAllSample.ts deleted file mode 100644 index 753d8c4f3370..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the public IP addresses in a subscription. - * - * @summary Gets all the public IP addresses in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressListAll.json - */ -async function listAllPublicIPAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllPublicIPAddresses(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts deleted file mode 100644 index 1c179709a104..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses on a cloud service level. - * - * @summary Gets information about all public IP addresses on a cloud service level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServicePublicIpListAll.json - */ -async function listVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listCloudServicePublicIPAddresses( - resourceGroupName, - cloudServiceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts deleted file mode 100644 index 920920e0ff63..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * - * @summary Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceRoleInstancePublicIpList.json - */ -async function listVmssvmPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "cs-tester"; - const cloudServiceName = "cs1"; - const roleInstanceName = "Test_VM_0"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listCloudServiceRoleInstancePublicIPAddresses( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssvmPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListSample.ts deleted file mode 100644 index b864ddc1f79a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all public IP addresses in a resource group. - * - * @summary Gets all public IP addresses in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressList.json - */ -async function listResourceGroupPublicIPAddresses(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listResourceGroupPublicIPAddresses(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts deleted file mode 100644 index 8c0f1685fa9e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses on a virtual machine scale set level. - * - * @summary Gets information about all public IP addresses on a virtual machine scale set level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssPublicIpListAll.json - */ -async function listVmssPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listVirtualMachineScaleSetPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts deleted file mode 100644 index 9c73398e3371..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * - * @summary Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VmssVmPublicIpList.json - */ -async function listVmssvmPublicIP(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vmss-tester"; - const virtualMachineScaleSetName = "vmss1"; - const virtualmachineIndex = "1"; - const networkInterfaceName = "nic1"; - const ipConfigurationName = "ip1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPAddresses.listVirtualMachineScaleSetVMPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVmssvmPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts deleted file mode 100644 index e42864cbf205..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesReserveCloudServicePublicIPAddressSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ReserveCloudServicePublicIpAddressRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. - * - * @summary Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressReserve.json - */ -async function reservePublicIPAddress(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: ReserveCloudServicePublicIpAddressRequest = { - isRollback: "false", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.publicIPAddresses.beginReserveCloudServicePublicIpAddressAndWait( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await reservePublicIPAddress(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesUpdateTagsSample.ts deleted file mode 100644 index 5b5a2c825d2e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPAddressesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates public IP address tags. - * - * @summary Updates public IP address tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpAddressUpdateTags.json - */ -async function updatePublicIPAddressTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpAddressName = "test-ip"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPAddresses.updateTags( - resourceGroupName, - publicIpAddressName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updatePublicIPAddressTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts deleted file mode 100644 index 7980db1d3f61..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { PublicIPPrefix} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixCreateCustomizedValues.json - */ -async function createPublicIPPrefixAllocationMethod(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: PublicIPPrefix = { - location: "westus", - prefixLength: 30, - publicIPAddressVersion: "IPv4", - sku: { name: "Standard", tier: "Regional" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixCreateDefaults.json - */ -async function createPublicIPPrefixDefaults(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: PublicIPPrefix = { - location: "westus", - prefixLength: 30, - sku: { name: "Standard" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. - * - * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixCreateDefaultsStandardV2Sku.json - */ -async function createPublicIPPrefixDefaultsWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: PublicIPPrefix = { - location: "westus", - prefixLength: 30, - sku: { name: "StandardV2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginCreateOrUpdateAndWait( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createPublicIPPrefixAllocationMethod(); - await createPublicIPPrefixDefaults(); - await createPublicIPPrefixDefaultsWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesDeleteSample.ts deleted file mode 100644 index ec9b4caf6f22..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified public IP prefix. - * - * @summary Deletes the specified public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixDelete.json - */ -async function deletePublicIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.beginDeleteAndWait( - resourceGroupName, - publicIpPrefixName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePublicIPPrefix(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesGetSample.ts deleted file mode 100644 index 84e34d5dd034..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. - * - * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixGet.json - */ -async function getPublicIPPrefix(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.get( - resourceGroupName, - publicIpPrefixName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. - * - * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixGetStandardV2Sku.json - */ -async function getPublicIPPrefixWithStandardV2Sku(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.get( - resourceGroupName, - publicIpPrefixName, - ); - console.log(result); -} - -async function main(): Promise { - await getPublicIPPrefix(); - await getPublicIPPrefixWithStandardV2Sku(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesListAllSample.ts deleted file mode 100644 index df742a5f8696..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the public IP prefixes in a subscription. - * - * @summary Gets all the public IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixListAll.json - */ -async function listAllPublicIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPPrefixes.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllPublicIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesListSample.ts deleted file mode 100644 index 739a2392e4f1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all public IP prefixes in a resource group. - * - * @summary Gets all public IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixList.json - */ -async function listResourceGroupPublicIPPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.publicIPPrefixes.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listResourceGroupPublicIPPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesUpdateTagsSample.ts deleted file mode 100644 index fe5a14d375e1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/publicIPPrefixesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates public IP prefix tags. - * - * @summary Updates public IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/PublicIpPrefixUpdateTags.json - */ -async function updatePublicIPPrefixTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const publicIpPrefixName = "test-ipprefix"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.publicIPPrefixes.updateTags( - resourceGroupName, - publicIpPrefixName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updatePublicIPPrefixTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/putBastionShareableLinkSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/putBastionShareableLinkSample.ts deleted file mode 100644 index d83e445d66a1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/putBastionShareableLinkSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BastionShareableLinkListRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a Bastion Shareable Links for all the VMs specified in the request. - * - * @summary Creates a Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/BastionShareableLinkCreate.json - */ -async function createBastionShareableLinksForTheRequestVMS(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant"; - const bslRequest: BastionShareableLinkListRequest = { - vms: [ - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1", - }, - }, - { - vm: { - id: "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.beginListPutBastionShareableLinkAndWait( - resourceGroupName, - bastionHostName, - bslRequest, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await createBastionShareableLinksForTheRequestVMS(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsCreateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsCreateSample.ts deleted file mode 100644 index 04e53e5ba4a7..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsCreateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ReachabilityAnalysisIntent} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates Reachability Analysis Intent. - * - * @summary Creates Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentPut.json - */ -async function reachabilityAnalysisIntentCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntentName"; - const body: ReachabilityAnalysisIntent = { - properties: { - description: "A sample reachability analysis intent", - destinationResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmDest", - ipTraffic: { - destinationIps: ["10.4.0.1"], - destinationPorts: ["0"], - protocols: ["Any"], - sourceIps: ["10.4.0.0"], - sourcePorts: ["0"], - }, - sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmSrc", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.create( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - body, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisIntentCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts deleted file mode 100644 index 2afe6be5256a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes Reachability Analysis Intent. - * - * @summary Deletes Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentDelete.json - */ -async function reachabilityAnalysisIntentDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntent"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.delete( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisIntentDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsGetSample.ts deleted file mode 100644 index 09a630c81ba2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the Reachability Analysis Intent. - * - * @summary Get the Reachability Analysis Intent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentGet.json - */ -async function reachabilityAnalysisIntentGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisIntentName = "testAnalysisIntentName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisIntents.get( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisIntentGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsListSample.ts deleted file mode 100644 index 56b2d175e671..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisIntentsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of Reachability Analysis Intents . - * - * @summary Gets list of Reachability Analysis Intents . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisIntentList.json - */ -async function reachabilityAnalysisIntentList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testVerifierWorkspace1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reachabilityAnalysisIntents.list( - resourceGroupName, - networkManagerName, - workspaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await reachabilityAnalysisIntentList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsCreateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsCreateSample.ts deleted file mode 100644 index dc32272cbf44..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsCreateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ReachabilityAnalysisRun} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates Reachability Analysis Runs. - * - * @summary Creates Reachability Analysis Runs. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunPut.json - */ -async function reachabilityAnalysisRunCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRunName"; - const body: ReachabilityAnalysisRun = { - properties: { - description: "A sample reachability analysis run", - intentId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/verifierWorkspaces/testVerifierWorkspace1/reachabilityAnalysisIntents/testReachabilityAnalysisIntenant1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.create( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - body, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisRunCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsDeleteSample.ts deleted file mode 100644 index 6a632dc0c29e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsDeleteSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes Reachability Analysis Run. - * - * @summary Deletes Reachability Analysis Run. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunDelete.json - */ -async function reachabilityAnalysisRunDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRun"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisRunDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsGetSample.ts deleted file mode 100644 index 0914eed46132..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets Reachability Analysis Run. - * - * @summary Gets Reachability Analysis Run. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunGet.json - */ -async function reachabilityAnalysisRunGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const reachabilityAnalysisRunName = "testAnalysisRunName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.reachabilityAnalysisRuns.get( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - ); - console.log(result); -} - -async function main(): Promise { - await reachabilityAnalysisRunGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsListSample.ts deleted file mode 100644 index 5b436c29ec75..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/reachabilityAnalysisRunsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of Reachability Analysis Runs. - * - * @summary Gets list of Reachability Analysis Runs. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ReachabilityAnalysisRunList.json - */ -async function reachabilityAnalysisRunList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testVerifierWorkspace1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reachabilityAnalysisRuns.list( - resourceGroupName, - networkManagerName, - workspaceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await reachabilityAnalysisRunList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/resourceNavigationLinksListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/resourceNavigationLinksListSample.ts deleted file mode 100644 index 54db045ec990..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/resourceNavigationLinksListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a list of resource navigation links for a subnet. - * - * @summary Gets a list of resource navigation links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json - */ -async function getResourceNavigationLinks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnet"; - const subnetName = "subnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.resourceNavigationLinks.list( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main(): Promise { - await getResourceNavigationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesCreateOrUpdateSample.ts deleted file mode 100644 index ea40a626ecad..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RouteFilterRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a route in the specified route filter. - * - * @summary Creates or updates a route in the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleCreate.json - */ -async function routeFilterRuleCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "ruleName"; - const routeFilterRuleParameters: RouteFilterRule = { - access: "Allow", - communities: ["12076:5030", "12076:5040"], - routeFilterRuleType: "Community", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.beginCreateOrUpdateAndWait( - resourceGroupName, - routeFilterName, - ruleName, - routeFilterRuleParameters, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterRuleCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesDeleteSample.ts deleted file mode 100644 index 0465d8ffc488..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified rule from a route filter. - * - * @summary Deletes the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleDelete.json - */ -async function routeFilterRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "ruleName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.beginDeleteAndWait( - resourceGroupName, - routeFilterName, - ruleName, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesGetSample.ts deleted file mode 100644 index 47d983f2ef90..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified rule from a route filter. - * - * @summary Gets the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleGet.json - */ -async function routeFilterRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const ruleName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilterRules.get( - resourceGroupName, - routeFilterName, - ruleName, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesListByRouteFilterSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesListByRouteFilterSample.ts deleted file mode 100644 index b25edaefeb2c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeFilterRulesListByRouteFilterSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all RouteFilterRules in a route filter. - * - * @summary Gets all RouteFilterRules in a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterRuleListByRouteFilter.json - */ -async function routeFilterRuleListByRouteFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilterRules.listByRouteFilter( - resourceGroupName, - routeFilterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routeFilterRuleListByRouteFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersCreateOrUpdateSample.ts deleted file mode 100644 index 8e23d6e9e3fd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RouteFilter} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a route filter in a specified resource group. - * - * @summary Creates or updates a route filter in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterCreate.json - */ -async function routeFilterCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const routeFilterParameters: RouteFilter = { - location: "West US", - rules: [ - { - name: "ruleName", - access: "Allow", - communities: ["12076:5030", "12076:5040"], - routeFilterRuleType: "Community", - }, - ], - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.beginCreateOrUpdateAndWait( - resourceGroupName, - routeFilterName, - routeFilterParameters, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersDeleteSample.ts deleted file mode 100644 index 17ffc25d9266..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified route filter. - * - * @summary Deletes the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterDelete.json - */ -async function routeFilterDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.beginDeleteAndWait( - resourceGroupName, - routeFilterName, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersGetSample.ts deleted file mode 100644 index ba24c899b6a1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified route filter. - * - * @summary Gets the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterGet.json - */ -async function routeFilterGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.get( - resourceGroupName, - routeFilterName, - ); - console.log(result); -} - -async function main(): Promise { - await routeFilterGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersListByResourceGroupSample.ts deleted file mode 100644 index b76a48a1030c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all route filters in a resource group. - * - * @summary Gets all route filters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterListByResourceGroup.json - */ -async function routeFilterListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilters.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routeFilterListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersListSample.ts deleted file mode 100644 index 66b0bae4cefd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all route filters in a subscription. - * - * @summary Gets all route filters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterList.json - */ -async function routeFilterList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeFilters.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routeFilterList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersUpdateTagsSample.ts deleted file mode 100644 index 1d9b664869ac..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeFiltersUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of a route filter. - * - * @summary Updates tags of a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteFilterUpdateTags.json - */ -async function updateRouteFilterTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeFilterName = "filterName"; - const parameters: TagsObject = { tags: { key1: "value1" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeFilters.updateTags( - resourceGroupName, - routeFilterName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateRouteFilterTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeMapsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeMapsCreateOrUpdateSample.ts deleted file mode 100644 index fe6cfdc60516..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeMapsCreateOrUpdateSample.ts +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RouteMap} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a RouteMap if it doesn't exist else updates the existing one. - * - * @summary Creates a RouteMap if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapPut.json - */ -async function routeMapPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const routeMapParameters: RouteMap = { - associatedInboundConnections: [ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGateway1/expressRouteConnections/exrConn1", - ], - associatedOutboundConnections: [], - rules: [ - { - name: "rule1", - actions: [ - { - type: "Add", - parameters: [{ asPath: ["22334"], community: [], routePrefix: [] }], - }, - ], - matchCriteria: [ - { - asPath: [], - community: [], - matchCondition: "Contains", - routePrefix: ["10.0.0.0/8"], - }, - ], - nextStepIfMatched: "Continue", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeMapName, - routeMapParameters, - ); - console.log(result); -} - -async function main(): Promise { - await routeMapPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeMapsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeMapsDeleteSample.ts deleted file mode 100644 index e0642e9627f8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeMapsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a RouteMap. - * - * @summary Deletes a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapDelete.json - */ -async function routeMapDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeMapName, - ); - console.log(result); -} - -async function main(): Promise { - await routeMapDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeMapsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeMapsGetSample.ts deleted file mode 100644 index 7ff0f5e92df3..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeMapsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a RouteMap. - * - * @summary Retrieves the details of a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapGet.json - */ -async function routeMapGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeMapName = "routeMap1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeMaps.get( - resourceGroupName, - virtualHubName, - routeMapName, - ); - console.log(result); -} - -async function main(): Promise { - await routeMapGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeMapsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeMapsListSample.ts deleted file mode 100644 index 03c6cd349336..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeMapsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all RouteMaps. - * - * @summary Retrieves the details of all RouteMaps. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteMapList.json - */ -async function routeMapList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeMaps.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routeMapList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeTablesCreateOrUpdateSample.ts deleted file mode 100644 index c450a33fee2e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesCreateOrUpdateSample.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RouteTable} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or updates a route table in a specified resource group. - * - * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableCreate.json - */ -async function createRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters: RouteTable = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or updates a route table in a specified resource group. - * - * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableCreateWithRoute.json - */ -async function createRouteTableWithRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters: RouteTable = { - disableBgpRoutePropagation: true, - location: "westus", - routes: [ - { - name: "route1", - addressPrefix: "10.0.3.0/24", - nextHopType: "VirtualNetworkGateway", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createRouteTable(); - await createRouteTableWithRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeTablesDeleteSample.ts deleted file mode 100644 index b538f991cbac..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified route table. - * - * @summary Deletes the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableDelete.json - */ -async function deleteRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.beginDeleteAndWait( - resourceGroupName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeTablesGetSample.ts deleted file mode 100644 index ab338d52e6fc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified route table. - * - * @summary Gets the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableGet.json - */ -async function getRouteTable(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.get( - resourceGroupName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await getRouteTable(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeTablesListAllSample.ts deleted file mode 100644 index 07ddc8dd7613..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all route tables in a subscription. - * - * @summary Gets all route tables in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableListAll.json - */ -async function listAllRouteTables(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeTables.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllRouteTables(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeTablesListSample.ts deleted file mode 100644 index 55dcf32c0f24..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all route tables in a resource group. - * - * @summary Gets all route tables in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableList.json - */ -async function listRouteTablesInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routeTables.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRouteTablesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routeTablesUpdateTagsSample.ts deleted file mode 100644 index 5bb61621fd87..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routeTablesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a route table tags. - * - * @summary Updates a route table tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableUpdateTags.json - */ -async function updateRouteTableTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routeTables.updateTags( - resourceGroupName, - routeTableName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateRouteTableTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routesCreateOrUpdateSample.ts deleted file mode 100644 index a30a922dd43c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routesCreateOrUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Route} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a route in the specified route table. - * - * @summary Creates or updates a route in the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteCreate.json - */ -async function createRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const routeParameters: Route = { - addressPrefix: "10.0.3.0/24", - nextHopType: "VirtualNetworkGateway", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.beginCreateOrUpdateAndWait( - resourceGroupName, - routeTableName, - routeName, - routeParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routesDeleteSample.ts deleted file mode 100644 index 6d85eaa86402..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified route from a route table. - * - * @summary Deletes the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteDelete.json - */ -async function deleteRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.beginDeleteAndWait( - resourceGroupName, - routeTableName, - routeName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routesGetSample.ts deleted file mode 100644 index 0d9a91856ac6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified route from a route table. - * - * @summary Gets the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteGet.json - */ -async function getRoute(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const routeName = "route1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routes.get( - resourceGroupName, - routeTableName, - routeName, - ); - console.log(result); -} - -async function main(): Promise { - await getRoute(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routesListSample.ts deleted file mode 100644 index 301305ae773a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all routes in a route table. - * - * @summary Gets all routes in a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RouteTableRouteList.json - */ -async function listRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const routeTableName = "testrt"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routes.list( - resourceGroupName, - routeTableName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingIntentCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingIntentCreateOrUpdateSample.ts deleted file mode 100644 index 49ba4274d704..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingIntentCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RoutingIntent} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * - * @summary Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentPut.json - */ -async function routeTablePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const routingIntentParameters: RoutingIntent = { - routingPolicies: [ - { - name: "InternetTraffic", - destinations: ["Internet"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", - }, - { - name: "PrivateTrafficPolicy", - destinations: ["PrivateTraffic"], - nextHop: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.routingIntentOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routingIntentName, - routingIntentParameters, - ); - console.log(result); -} - -async function main(): Promise { - await routeTablePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingIntentDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingIntentDeleteSample.ts deleted file mode 100644 index f7e9bbe0a286..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingIntentDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a RoutingIntent. - * - * @summary Deletes a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentDelete.json - */ -async function routeTableDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routingIntentName, - ); - console.log(result); -} - -async function main(): Promise { - await routeTableDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingIntentGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingIntentGetSample.ts deleted file mode 100644 index 8fe1d2b41d51..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingIntentGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a RoutingIntent. - * - * @summary Retrieves the details of a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentGet.json - */ -async function routeTableGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routingIntentName = "Intent1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingIntentOperations.get( - resourceGroupName, - virtualHubName, - routingIntentName, - ); - console.log(result); -} - -async function main(): Promise { - await routeTableGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingIntentListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingIntentListSample.ts deleted file mode 100644 index 8b6b09c31f73..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingIntentListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * - * @summary Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/RoutingIntentList.json - */ -async function routingIntentList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingIntentOperations.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await routingIntentList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts deleted file mode 100644 index 9981cb1575d2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - RoutingRuleCollection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a routing rule collection. - * - * @summary Creates or updates a routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json - */ -async function createOrUpdateARoutingRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleCollection: RoutingRuleCollection = { - description: "A sample policy", - appliesTo: [ - { - networkGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateARoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsDeleteSample.ts deleted file mode 100644 index f47a10be498c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsDeleteSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an routing rule collection. - * - * @summary Deletes an routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json - */ -async function deletesAnRoutingRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deletesAnRoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsGetSample.ts deleted file mode 100644 index 8bfba9994944..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a network manager routing configuration rule collection. - * - * @summary Gets a network manager routing configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json - */ -async function getsRoutingRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getsRoutingRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsListSample.ts deleted file mode 100644 index 75e062e35caa..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingRuleCollectionsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the rule collections in a routing configuration, in a paginated format. - * - * @summary Lists all the rule collections in a routing configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleCollectionList.json - */ -async function listRoutingRuleCollections(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRoutingRuleCollections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingRulesCreateOrUpdateSample.ts deleted file mode 100644 index d2524802b95c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RoutingRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an routing rule. - * - * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRulePut.json - */ -async function createADefaultRoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const routingRule: RoutingRule = { - description: "This is Sample Routing Rule", - destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, - nextHop: { nextHopType: "VirtualNetworkGateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - routingRule, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an routing rule. - * - * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRulePut.json - */ -async function createAnRoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const routingRule: RoutingRule = { - description: "This is Sample Routing Rule", - destination: { type: "AddressPrefix", destinationAddress: "10.0.0.0/16" }, - nextHop: { nextHopType: "VirtualNetworkGateway" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - routingRule, - ); - console.log(result); -} - -async function main(): Promise { - await createADefaultRoutingRule(); - await createAnRoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingRulesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingRulesDeleteSample.ts deleted file mode 100644 index 693fd97d853b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingRulesDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - RoutingRulesDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a routing rule. - * - * @summary Deletes a routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleDelete.json - */ -async function deletesARoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "sampleRule"; - const force = false; - const options: RoutingRulesDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deletesARoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingRulesGetSample.ts deleted file mode 100644 index 92351663fae2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingRulesGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a network manager routing configuration routing rule. - * - * @summary Gets a network manager routing configuration routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleGet.json - */ -async function getsRoutingRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleRoutingRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.routingRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main(): Promise { - await getsRoutingRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/routingRulesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/routingRulesListSample.ts deleted file mode 100644 index ba98d93ab74f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/routingRulesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network manager routing configuration routing rules. - * - * @summary List all network manager routing configuration routing rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerRoutingRuleList.json - */ -async function listRoutingRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestRoutingConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.routingRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRoutingRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index dfd13e2daf15..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { ScopeConnection} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates scope connection from Network Manager - * - * @summary Creates or updates scope connection from Network Manager - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionPut.json - */ -async function createOrUpdateNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const parameters: ScopeConnection = { - description: "This is a scope connection to a cross tenant subscription.", - resourceId: "subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b", - tenantId: "6babcaad-604b-40ac-a9d7-9fd97c0b779f", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.createOrUpdate( - resourceGroupName, - networkManagerName, - scopeConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsDeleteSample.ts deleted file mode 100644 index 55391e39580b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the pending scope connection created by this network manager. - * - * @summary Delete the pending scope connection created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionDelete.json - */ -async function deleteNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.delete( - resourceGroupName, - networkManagerName, - scopeConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsGetSample.ts deleted file mode 100644 index abd0ed54d6ae..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get specified scope connection created by this Network Manager. - * - * @summary Get specified scope connection created by this Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionGet.json - */ -async function getNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const scopeConnectionName = "TestScopeConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.scopeConnections.get( - resourceGroupName, - networkManagerName, - scopeConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsListSample.ts deleted file mode 100644 index 0b084e131e72..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/scopeConnectionsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all scope connections created by this network manager. - * - * @summary List all scope connections created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerScopeConnectionList.json - */ -async function listNetworkManagerScopeConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.scopeConnections.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkManagerScopeConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 0e822757e0cb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityAdminConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network manager security admin configuration. - * - * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json - */ -async function createManualModeSecurityAdminConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityAdminConfiguration: SecurityAdminConfiguration = { - description: - "A configuration which will update any network groups ip addresses at commit times.", - networkGroupAddressSpaceAggregationOption: "Manual", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityAdminConfiguration, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a network manager security admin configuration. - * - * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationPut.json - */ -async function createNetworkManagerSecurityAdminConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityAdminConfiguration: SecurityAdminConfiguration = { - description: "A sample policy", - applyOnNetworkIntentPolicyBasedServices: ["None"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityAdminConfiguration, - ); - console.log(result); -} - -async function main(): Promise { - await createManualModeSecurityAdminConfiguration(); - await createNetworkManagerSecurityAdminConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsDeleteSample.ts deleted file mode 100644 index bd053e27af25..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityAdminConfigurationsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network manager security admin configuration. - * - * @summary Deletes a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json - */ -async function deleteNetworkManagerSecurityAdminConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const force = false; - const options: SecurityAdminConfigurationsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkManagerSecurityAdminConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsGetSample.ts deleted file mode 100644 index 15c18a8fdc69..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a network manager security admin configuration. - * - * @summary Retrieves a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json - */ -async function getSecurityAdminConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityAdminConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getSecurityAdminConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsListSample.ts deleted file mode 100644 index f6e218872f72..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityAdminConfigurationsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the network manager security admin configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager security admin configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json - */ -async function listSecurityAdminConfigurationsInANetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityAdminConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSecurityAdminConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts deleted file mode 100644 index 9ec6eb9e3ca0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityPartnerProvider} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Security Partner Provider. - * - * @summary Creates or updates the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderPut.json - */ -async function createSecurityPartnerProvider(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const parameters: SecurityPartnerProvider = { - location: "West US", - securityProviderName: "ZScaler", - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.securityPartnerProviders.beginCreateOrUpdateAndWait( - resourceGroupName, - securityPartnerProviderName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersDeleteSample.ts deleted file mode 100644 index 881eb9c09781..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Security Partner Provider. - * - * @summary Deletes the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderDelete.json - */ -async function deleteSecurityPartnerProvider(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.beginDeleteAndWait( - resourceGroupName, - securityPartnerProviderName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersGetSample.ts deleted file mode 100644 index e9322cf81d87..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Security Partner Provider. - * - * @summary Gets the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderGet.json - */ -async function getSecurityPartnerProvider(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.get( - resourceGroupName, - securityPartnerProviderName, - ); - console.log(result); -} - -async function main(): Promise { - await getSecurityPartnerProvider(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts deleted file mode 100644 index 85667e0e26a0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Security Partner Providers in a resource group. - * - * @summary Lists all Security Partner Providers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderListByResourceGroup.json - */ -async function listAllSecurityPartnerProvidersForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityPartnerProviders.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllSecurityPartnerProvidersForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersListSample.ts deleted file mode 100644 index ef4db796f4d3..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Security Partner Providers in a subscription. - * - * @summary Gets all the Security Partner Providers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderListBySubscription.json - */ -async function listAllSecurityPartnerProvidersForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityPartnerProviders.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllSecurityPartnerProvidersForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersUpdateTagsSample.ts deleted file mode 100644 index d90efb3fbaa0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityPartnerProvidersUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of a Security Partner Provider resource. - * - * @summary Updates tags of a Security Partner Provider resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SecurityPartnerProviderUpdateTags.json - */ -async function updateSecurityPartnerProviderTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const securityPartnerProviderName = "securityPartnerProvider"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityPartnerProviders.updateTags( - resourceGroupName, - securityPartnerProviderName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateSecurityPartnerProviderTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityRulesCreateOrUpdateSample.ts deleted file mode 100644 index bf6d399d7f0e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { SecurityRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a security rule in the specified network security group. - * - * @summary Creates or updates a security rule in the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleCreate.json - */ -async function createSecurityRule(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const securityRuleParameters: SecurityRule = { - access: "Deny", - destinationAddressPrefix: "11.0.0.0/8", - destinationPortRange: "8080", - direction: "Outbound", - priority: 100, - sourceAddressPrefix: "10.0.0.0/8", - sourcePortRange: "*", - protocol: "*", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.beginCreateOrUpdateAndWait( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - securityRuleParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createSecurityRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityRulesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityRulesDeleteSample.ts deleted file mode 100644 index 12ac57737193..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified network security rule. - * - * @summary Deletes the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleDelete.json - */ -async function deleteNetworkSecurityRuleFromNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.beginDeleteAndWait( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkSecurityRuleFromNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityRulesGetSample.ts deleted file mode 100644 index c60ca12c69c9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified network security rule. - * - * @summary Get the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleGet.json - */ -async function getNetworkSecurityRuleInNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const securityRuleName = "rule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityRules.get( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkSecurityRuleInNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityRulesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityRulesListSample.ts deleted file mode 100644 index 57828f028c16..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityRulesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all security rules in a network security group. - * - * @summary Gets all security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkSecurityGroupRuleList.json - */ -async function listNetworkSecurityRulesInNetworkSecurityGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkSecurityGroupName = "testnsg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityRules.list( - resourceGroupName, - networkSecurityGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNetworkSecurityRulesInNetworkSecurityGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index b5d17e2c4d55..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityUserConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a network manager security user configuration. - * - * @summary Creates or updates a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json - */ -async function createNetworkManagerSecurityUserConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const securityUserConfiguration: SecurityUserConfiguration = { - description: "A sample policy", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - securityUserConfiguration, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkManagerSecurityUserConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsDeleteSample.ts deleted file mode 100644 index 102926e9db16..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityUserConfigurationsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a network manager security user configuration. - * - * @summary Deletes a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json - */ -async function deleteNetworkManagerSecurityUserConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const force = false; - const options: SecurityUserConfigurationsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkManagerSecurityUserConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsGetSample.ts deleted file mode 100644 index c5ac28422b35..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a network manager security user configuration. - * - * @summary Retrieves a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json - */ -async function getSecurityUserConfigurations(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserConfigurations.get( - resourceGroupName, - networkManagerName, - configurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getSecurityUserConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsListSample.ts deleted file mode 100644 index ea660ff42fb8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserConfigurationsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the network manager security user configurations in a network manager, in a paginated format. - * - * @summary Lists all the network manager security user configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserConfigurationList.json - */ -async function listSecurityUserConfigurationsInANetworkManager(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserConfigurations.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSecurityUserConfigurationsInANetworkManager(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts deleted file mode 100644 index 840517fd6262..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityUserRuleCollection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a security user rule collection. - * - * @summary Creates or updates a security user rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json - */ -async function createOrUpdateASecurityUserRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const securityUserRuleCollection: SecurityUserRuleCollection = { - description: "A sample policy", - appliesToGroups: [ - { - networkGroupId: - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - securityUserRuleCollection, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateASecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsDeleteSample.ts deleted file mode 100644 index 8d3d940e8949..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityUserRuleCollectionsDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a Security User Rule collection. - * - * @summary Deletes a Security User Rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json - */ -async function deletesASecurityUserRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const force = false; - const options: SecurityUserRuleCollectionsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deletesASecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsGetSample.ts deleted file mode 100644 index 9f806cb5ce9d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a network manager security user configuration rule collection. - * - * @summary Gets a network manager security user configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json - */ -async function getsSecurityUserRuleCollection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRuleCollections.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getsSecurityUserRuleCollection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsListSample.ts deleted file mode 100644 index 4c550fd4e8c0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRuleCollectionsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the security user rule collections in a security configuration, in a paginated format. - * - * @summary Lists all the security user rule collections in a security configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json - */ -async function listRuleCollectionsInASecurityConfiguration(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserRuleCollections.list( - resourceGroupName, - networkManagerName, - configurationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRuleCollectionsInASecurityConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesCreateOrUpdateSample.ts deleted file mode 100644 index 04ddab1ea062..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { SecurityUserRule} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a security user rule. - * - * @summary Creates or updates a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRulePut.json - */ -async function createASecurityUserRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const securityUserRule: SecurityUserRule = { - description: "Sample User Rule", - destinationPortRanges: ["22"], - destinations: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - direction: "Inbound", - sourcePortRanges: ["0-65535"], - sources: [{ addressPrefix: "*", addressPrefixType: "IPPrefix" }], - protocol: "Tcp", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.createOrUpdate( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - securityUserRule, - ); - console.log(result); -} - -async function main(): Promise { - await createASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesDeleteSample.ts deleted file mode 100644 index ce3c9a23294d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - SecurityUserRulesDeleteOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a security user rule. - * - * @summary Deletes a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleDelete.json - */ -async function deleteASecurityUserRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const force = false; - const options: SecurityUserRulesDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deleteASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesGetSample.ts deleted file mode 100644 index 8f64b9f0a9a2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a security user rule. - * - * @summary Gets a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleGet.json - */ -async function getsASecurityUserRule(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleUserRule"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.securityUserRules.get( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - ); - console.log(result); -} - -async function main(): Promise { - await getsASecurityUserRule(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesListSample.ts deleted file mode 100644 index 433f53abb1af..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/securityUserRulesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Security User Rules in a rule collection. - * - * @summary Lists all Security User Rules in a rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerSecurityUserRuleList.json - */ -async function listSecurityUserRules(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const configurationName = "myTestSecurityConfig"; - const ruleCollectionName = "testRuleCollection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.securityUserRules.list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSecurityUserRules(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceAssociationLinksListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceAssociationLinksListSample.ts deleted file mode 100644 index 77bb8cf59b8a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceAssociationLinksListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a list of service association links for a subnet. - * - * @summary Gets a list of service association links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json - */ -async function getServiceAssociationLinks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnet"; - const subnetName = "subnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceAssociationLinks.list( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main(): Promise { - await getServiceAssociationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index c646585e9662..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ServiceEndpointPolicy} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a service Endpoint Policies. - * - * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyCreate.json - */ -async function createServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const parameters: ServiceEndpointPolicy = { location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a service Endpoint Policies. - * - * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyCreateWithDefinition.json - */ -async function createServiceEndpointPolicyWithDefinition(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const parameters: ServiceEndpointPolicy = { - location: "westus", - serviceEndpointPolicyDefinitions: [ - { - name: "StorageServiceEndpointPolicyDefinition", - description: "Storage Service EndpointPolicy Definition", - service: "Microsoft.Storage", - serviceResources: [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createServiceEndpointPolicy(); - await createServiceEndpointPolicyWithDefinition(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesDeleteSample.ts deleted file mode 100644 index 39bb6391483c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified service endpoint policy. - * - * @summary Deletes the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDelete.json - */ -async function deleteServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "serviceEndpointPolicy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.beginDeleteAndWait( - resourceGroupName, - serviceEndpointPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesGetSample.ts deleted file mode 100644 index 29af69cf7c2b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified service Endpoint Policies in a specified resource group. - * - * @summary Gets the specified service Endpoint Policies in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyGet.json - */ -async function getServiceEndPointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testServiceEndpointPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.get( - resourceGroupName, - serviceEndpointPolicyName, - ); - console.log(result); -} - -async function main(): Promise { - await getServiceEndPointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts deleted file mode 100644 index 5c1d728091bf..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all service endpoint Policies in a resource group. - * - * @summary Gets all service endpoint Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyList.json - */ -async function listResourceGroupServiceEndpointPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicies.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listResourceGroupServiceEndpointPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesListSample.ts deleted file mode 100644 index bda1afca0273..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the service endpoint policies in a subscription. - * - * @summary Gets all the service endpoint policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyListAll.json - */ -async function listAllServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicies.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts deleted file mode 100644 index d4c2366b75e0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates tags of a service endpoint policy. - * - * @summary Updates tags of a service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyUpdateTags.json - */ -async function updateServiceEndpointPolicyTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testServiceEndpointPolicy"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicies.updateTags( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateServiceEndpointPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts deleted file mode 100644 index 33debb0345b9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ServiceEndpointPolicyDefinition} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * - * @summary Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionCreate.json - */ -async function createServiceEndpointPolicyDefinition(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition = { - description: "Storage Service EndpointPolicy Definition", - service: "Microsoft.Storage", - serviceResources: [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicyDefinitions.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - serviceEndpointPolicyDefinitions, - ); - console.log(result); -} - -async function main(): Promise { - await createServiceEndpointPolicyDefinition(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts deleted file mode 100644 index 9e60a8139cc8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified ServiceEndpoint policy definitions. - * - * @summary Deletes the specified ServiceEndpoint policy definitions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json - */ -async function deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceEndpointPolicyDefinitions.beginDeleteAndWait( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts deleted file mode 100644 index 7e5d7627d3c1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the specified service endpoint policy definitions from service endpoint policy. - * - * @summary Get the specified service endpoint policy definitions from service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionGet.json - */ -async function getServiceEndpointDefinitionInServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const serviceEndpointPolicyDefinitionName = "testDefinition"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceEndpointPolicyDefinitions.get( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - ); - console.log(result); -} - -async function main(): Promise { - await getServiceEndpointDefinitionInServiceEndpointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts deleted file mode 100644 index 0ed55c12b0ce..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all service endpoint policy definitions in a service end point policy. - * - * @summary Gets all service endpoint policy definitions in a service end point policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceEndpointPolicyDefinitionList.json - */ -async function listServiceEndpointDefinitionsInServiceEndPointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceEndpointPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceEndpointPolicyDefinitions.listByResourceGroup( - resourceGroupName, - serviceEndpointPolicyName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listServiceEndpointDefinitionsInServiceEndPointPolicy(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index e5a512114305..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { ServiceGateway} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a service gateway. - * - * @summary Creates or updates a service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayCreate.json - */ -async function createServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters: ServiceGateway = { - location: "eastus", - routeTargetAddress: { - privateIPAddress: "10.0.1.4", - privateIPAllocationMethod: "Static", - subnet: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet", - }, - }, - virtualNetwork: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysDeleteSample.ts deleted file mode 100644 index 271adf2beedc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified service gateway. - * - * @summary Deletes the specified service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayDelete.json - */ -async function deleteServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.beginDeleteAndWait( - resourceGroupName, - serviceGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetAddressLocationsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetAddressLocationsSample.ts deleted file mode 100644 index bbbcc9d7a9bb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetAddressLocationsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get address locations in service gateway. - * - * @summary Get address locations in service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGetAddressLocationsResponse.json - */ -async function getAddressLocationsInServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceGateways.listAddressLocations( - resourceGroupName, - serviceGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAddressLocationsInServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetSample.ts deleted file mode 100644 index a05f5911d4f5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified service gateway. - * - * @summary Gets the specified service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGet.json - */ -async function getLoadBalancer(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.get( - resourceGroupName, - serviceGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getLoadBalancer(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetServicesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetServicesSample.ts deleted file mode 100644 index 3121d09dc431..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysGetServicesSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get Services in service gateway. - * - * @summary Get Services in service gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayGetServicesResponse.json - */ -async function getServicesInServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceGateways.listServices( - resourceGroupName, - serviceGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getServicesInServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysListAllSample.ts deleted file mode 100644 index 8df94f0410dc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysListAllSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the service gateways in a subscription. - * - * @summary Gets all the service gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayListAll.json - */ -async function listAllLoadBalancers(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceGateways.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllLoadBalancers(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysListSample.ts deleted file mode 100644 index cd144dfa0013..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the service gateways in a resource group. - * - * @summary Gets all the service gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayList.json - */ -async function listServiceGatewayInResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceGateways.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listServiceGatewayInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateAddressLocationsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateAddressLocationsSample.ts deleted file mode 100644 index 5d6571f9e5ca..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateAddressLocationsSample.ts +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ServiceGatewayUpdateAddressLocationsRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates address locations within the service gateway. - -The request supports both full and partial update modes at two levels: location and address. - -Full update replaces all existing data. - -Partial update modifies only the specified entries: - -For location-level partial updates, if no address is provided, the existing address will be deleted. - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. - * - * @summary Creates or updates address locations within the service gateway. - -The request supports both full and partial update modes at two levels: location and address. - -Full update replaces all existing data. - -Partial update modifies only the specified entries: - -For location-level partial updates, if no address is provided, the existing address will be deleted. - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayFullUpdateAddressLocationsRequest.json - */ -async function fullUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters: ServiceGatewayUpdateAddressLocationsRequest = { - action: "FullUpdate", - addressLocations: [ - { - addressLocation: "192.0.0.1", - addressUpdateAction: "FullUpdate", - addresses: [{ address: "10.0.0.4", services: ["Service1"] }], - }, - { - addressLocation: "192.0.0.2", - addressUpdateAction: "PartialUpdate", - addresses: [ - { address: "10.0.0.5", services: ["Service2"] }, - { address: "10.0.0.6" }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceGateways.beginUpdateAddressLocationsAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates address locations within the service gateway. - -The request supports both full and partial update modes at two levels: location and address. - -Full update replaces all existing data. - -Partial update modifies only the specified entries: - -For location-level partial updates, if no address is provided, the existing address will be deleted. - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. - * - * @summary Creates or updates address locations within the service gateway. - -The request supports both full and partial update modes at two levels: location and address. - -Full update replaces all existing data. - -Partial update modifies only the specified entries: - -For location-level partial updates, if no address is provided, the existing address will be deleted. - -For address-level partial updates, if no services are provided, the existing services will be considered for deletion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayPartialUpdateAddressLocationsRequest.json - */ -async function partialUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters: ServiceGatewayUpdateAddressLocationsRequest = { - action: "PartialUpdate", - addressLocations: [ - { - addressLocation: "192.0.0.1", - addressUpdateAction: "FullUpdate", - addresses: [{ address: "10.0.0.4", services: ["Service1"] }], - }, - { - addressLocation: "192.0.0.2", - addressUpdateAction: "PartialUpdate", - addresses: [ - { address: "10.0.0.5", services: ["Service2"] }, - { address: "10.0.0.6" }, - ], - }, - { addressLocation: "192.0.0.3" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.serviceGateways.beginUpdateAddressLocationsAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await fullUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGateway(); - await partialUpdateCreateUpdateOrDeleteAddressLocationsInTheServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateServicesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateServicesSample.ts deleted file mode 100644 index cb8625c09aae..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateServicesSample.ts +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ServiceGatewayUpdateServicesRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates, updates, or deletes services within the service gateway. -The request supports both full and partial update modes at the service level. - -Full update replaces all existing services with the new list provided in the request. -Partial update modifies only the specified services. - * - * @summary Creates, updates, or deletes services within the service gateway. -The request supports both full and partial update modes at the service level. - -Full update replaces all existing services with the new list provided in the request. -Partial update modifies only the specified services. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayUpdateServicesRequest.json - */ -async function createOrFullUpdateServicesInServiceGateway(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters: ServiceGatewayUpdateServicesRequest = { - action: "FullUpdate", - serviceRequests: [ - { - service: { - name: "Service1", - isDefault: true, - loadBalancerBackendPools: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/be1", - }, - ], - publicNatGatewayId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/natGateways/test-natGateway", - serviceType: "Inbound", - }, - }, - { - isDelete: true, - service: { - name: "Service2", - isDefault: false, - serviceType: "Outbound", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.beginUpdateServicesAndWait( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrFullUpdateServicesInServiceGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateTagsSample.ts deleted file mode 100644 index 70833db1486d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a service gateway tags. - * - * @summary Updates a service gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceGatewayUpdateTags.json - */ -async function updateServiceGatewayTags(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const serviceGatewayName = "sg"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceGateways.updateTags( - resourceGroupName, - serviceGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateServiceGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceTagInformationListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceTagInformationListSample.ts deleted file mode 100644 index 173265e4a018..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceTagInformationListSample.ts +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ServiceTagInformationListOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagInformationListResult.json - */ -async function getListOfServiceTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json - */ -async function getListOfServiceTagsWithNoAddressPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const noAddressPrefixes = true; - const options: ServiceTagInformationListOptionalParams = { - noAddressPrefixes, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list( - location, - options, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets a list of service tag information resources with pagination. - * - * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagInformationListResultWithTagname.json - */ -async function getListOfServiceTagsWithTagName(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westeurope"; - const tagName = "ApiManagement"; - const options: ServiceTagInformationListOptionalParams = { tagName }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serviceTagInformationOperations.list( - location, - options, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getListOfServiceTags(); - await getListOfServiceTagsWithNoAddressPrefixes(); - await getListOfServiceTagsWithTagName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/serviceTagsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/serviceTagsListSample.ts deleted file mode 100644 index dbff0fb1e428..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/serviceTagsListSample.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a list of service tag information resources. - * - * @summary Gets a list of service tag information resources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/ServiceTagsList.json - */ -async function getListOfServiceTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const location = "westcentralus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.serviceTags.list(location); - console.log(result); -} - -async function main(): Promise { - await getListOfServiceTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsCreateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsCreateSample.ts deleted file mode 100644 index d95801161f07..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsCreateSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates/Updates the Static CIDR resource. - * - * @summary Creates/Updates the Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Create.json - */ -async function staticCidrsCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.create( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main(): Promise { - await staticCidrsCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsDeleteSample.ts deleted file mode 100644 index 15a813208acc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsDeleteSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the Static CIDR resource. - * - * @summary Delete the Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Delete.json - */ -async function staticCidrsDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main(): Promise { - await staticCidrsDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsGetSample.ts deleted file mode 100644 index f1937af5fbc6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specific Static CIDR resource. - * - * @summary Gets the specific Static CIDR resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_Get.json - */ -async function staticCidrsGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const staticCidrName = "TestStaticCidr"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticCidrs.get( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - ); - console.log(result); -} - -async function main(): Promise { - await staticCidrsGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsListSample.ts deleted file mode 100644 index fe1d718f799d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/staticCidrsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of Static CIDR resources at Network Manager level. - * - * @summary Gets list of Static CIDR resources at Network Manager level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/StaticCidrs_List.json - */ -async function staticCidrsList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "TestNetworkManager"; - const poolName = "TestPool"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.staticCidrs.list( - resourceGroupName, - networkManagerName, - poolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await staticCidrsList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/staticMembersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/staticMembersCreateOrUpdateSample.ts deleted file mode 100644 index ff7525f16fd4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/staticMembersCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { StaticMember} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a static member. - * - * @summary Creates or updates a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberPut.json - */ -async function staticMemberPut(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const parameters: StaticMember = { - resourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroup/rg1/providers/Microsoft.Network/virtualnetworks/vnet1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.createOrUpdate( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await staticMemberPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/staticMembersDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/staticMembersDeleteSample.ts deleted file mode 100644 index 9f483dcec87d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/staticMembersDeleteSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a static member. - * - * @summary Deletes a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberDelete.json - */ -async function staticMembersDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "SampleRG"; - const networkManagerName = "TestNM"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.delete( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - ); - console.log(result); -} - -async function main(): Promise { - await staticMembersDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/staticMembersGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/staticMembersGetSample.ts deleted file mode 100644 index 762330943c78..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/staticMembersGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified static member. - * - * @summary Gets the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberGet.json - */ -async function staticMembersGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const staticMemberName = "testStaticMember"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.staticMembers.get( - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - ); - console.log(result); -} - -async function main(): Promise { - await staticMembersGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/staticMembersListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/staticMembersListSample.ts deleted file mode 100644 index c5087015497e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/staticMembersListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the specified static member. - * - * @summary Lists the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerStaticMemberList.json - */ -async function staticMembersList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const networkGroupName = "testNetworkGroup"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.staticMembers.list( - resourceGroupName, - networkManagerName, - networkGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await staticMembersList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/subnetsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/subnetsCreateOrUpdateSample.ts deleted file mode 100644 index 5882f944373f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/subnetsCreateOrUpdateSample.ts +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Subnet} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateWithServiceGateway.json - */ -async function createSubnetWithServiceGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { - addressPrefix: "10.0.0.0/16", - serviceGateway: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/serviceGateways/SG1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreate.json - */ -async function createSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateWithDelegation.json - */ -async function createSubnetWithADelegation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateServiceEndpoint.json - */ -async function createSubnetWithServiceEndpoints(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json - */ -async function createSubnetWithServiceEndpointsWithNetworkIdentifier(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [ - { - networkIdentifier: { - id: "/subscriptions/subid/resourceGroups/subnet-test/providers/Microsoft.Network/publicIPAddresses/test-ip", - }, - service: "Microsoft.Storage", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. - * - * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetCreateWithSharingScope.json - */ -async function createSubnetWithSharingScope(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const subnetParameters: Subnet = { addressPrefix: "10.0.0.0/16" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createSubnetWithServiceGateway(); - await createSubnet(); - await createSubnetWithADelegation(); - await createSubnetWithServiceEndpoints(); - await createSubnetWithServiceEndpointsWithNetworkIdentifier(); - await createSubnetWithSharingScope(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/subnetsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/subnetsDeleteSample.ts deleted file mode 100644 index c85cefe78f04..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/subnetsDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified subnet. - * - * @summary Deletes the specified subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetDelete.json - */ -async function deleteSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteSubnet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/subnetsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/subnetsGetSample.ts deleted file mode 100644 index 4d4ea1868396..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/subnetsGetSample.ts +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetGet.json - */ -async function getSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetGetWithDelegation.json - */ -async function getSubnetWithADelegation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. - * - * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetGetWithSharingScope.json - */ -async function getSubnetWithSharingScope(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const subnetName = "subnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.get( - resourceGroupName, - virtualNetworkName, - subnetName, - ); - console.log(result); -} - -async function main(): Promise { - await getSubnet(); - await getSubnetWithADelegation(); - await getSubnetWithSharingScope(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/subnetsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/subnetsListSample.ts deleted file mode 100644 index 3ea9c6acbf48..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/subnetsListSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all subnets in a virtual network. - * - * @summary Gets all subnets in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetList.json - */ -async function listSubnets(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "subnet-test"; - const virtualNetworkName = "vnetname"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.subnets.list( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSubnets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/subnetsPrepareNetworkPoliciesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/subnetsPrepareNetworkPoliciesSample.ts deleted file mode 100644 index c11fc69a0ea4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/subnetsPrepareNetworkPoliciesSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - PrepareNetworkPoliciesRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Prepares a subnet by applying network intent policies. - * - * @summary Prepares a subnet by applying network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetPrepareNetworkPolicies.json - */ -async function prepareNetworkPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const subnetName = "subnet1"; - const prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest = - { serviceName: "Microsoft.Sql/managedInstances" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginPrepareNetworkPoliciesAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - prepareNetworkPoliciesRequestParameters, - ); - console.log(result); -} - -async function main(): Promise { - await prepareNetworkPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts deleted file mode 100644 index 962dc9346090..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - UnprepareNetworkPoliciesRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Unprepares a subnet by removing network intent policies. - * - * @summary Unprepares a subnet by removing network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/SubnetUnprepareNetworkPolicies.json - */ -async function unprepareNetworkPolicies(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const subnetName = "subnet1"; - const unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest = - { serviceName: "Microsoft.Sql/managedInstances" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subnets.beginUnprepareNetworkPoliciesAndWait( - resourceGroupName, - virtualNetworkName, - subnetName, - unprepareNetworkPoliciesRequestParameters, - ); - console.log(result); -} - -async function main(): Promise { - await unprepareNetworkPolicies(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 77656c1591df..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - NetworkManagerConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a network manager connection on this subscription. - * - * @summary Create a network manager connection on this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionPut.json - */ -async function createOrUpdateSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const parameters: NetworkManagerConnection = { - networkManagerId: - "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.subscriptionNetworkManagerConnections.createOrUpdate( - networkManagerConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts deleted file mode 100644 index f9709a3d1575..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete specified connection created by this subscription. - * - * @summary Delete specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json - */ -async function deleteSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.delete( - networkManagerConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts deleted file mode 100644 index 3349f95bb847..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a specified connection created by this subscription. - * - * @summary Get a specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionGet.json - */ -async function getSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const networkManagerConnectionName = "TestNMConnection"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.subscriptionNetworkManagerConnections.get( - networkManagerConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts deleted file mode 100644 index 8be51a3ea6d6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all network manager connections created by this subscription. - * - * @summary List all network manager connections created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkManagerConnectionSubscriptionList.json - */ -async function listSubscriptionNetworkManagerConnection(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.subscriptionNetworkManagerConnections.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listSubscriptionNetworkManagerConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/supportedSecurityProvidersSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/supportedSecurityProvidersSample.ts deleted file mode 100644 index e453eea1d6e7..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/supportedSecurityProvidersSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gives the supported security providers for the virtual wan. - * - * @summary Gives the supported security providers for the virtual wan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWanSupportedSecurityProviders.json - */ -async function supportedSecurityProviders(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.supportedSecurityProviders( - resourceGroupName, - virtualWANName, - ); - console.log(result); -} - -async function main(): Promise { - await supportedSecurityProviders(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/usagesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/usagesListSample.ts deleted file mode 100644 index 2fadb8c4ec2a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/usagesListSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List network usages for a subscription. - * - * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/UsageList.json - */ -async function listUsages(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.usages.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List network usages for a subscription. - * - * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/UsageListSpacedLocation.json - */ -async function listUsagesSpacedLocation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const location = "West US"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.usages.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listUsages(); - await listUsagesSpacedLocation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesCreateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesCreateSample.ts deleted file mode 100644 index ff5c445b927a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesCreateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VerifierWorkspace} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates Verifier Workspace. - * - * @summary Creates Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspacePut.json - */ -async function verifierWorkspaceCreate(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const body: VerifierWorkspace = { - location: "eastus", - properties: { description: "A sample workspace" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.create( - resourceGroupName, - networkManagerName, - workspaceName, - body, - ); - console.log(result); -} - -async function main(): Promise { - await verifierWorkspaceCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesDeleteSample.ts deleted file mode 100644 index e69e0c1339a1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes Verifier Workspace. - * - * @summary Deletes Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceDelete.json - */ -async function verifierWorkspaceDelete(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.beginDeleteAndWait( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main(): Promise { - await verifierWorkspaceDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesGetSample.ts deleted file mode 100644 index 1ff5d7e27725..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets Verifier Workspace. - * - * @summary Gets Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceGet.json - */ -async function verifierWorkspaceGet(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.get( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main(): Promise { - await verifierWorkspaceGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesListSample.ts deleted file mode 100644 index 97b0bc039e89..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of Verifier Workspaces. - * - * @summary Gets list of Verifier Workspaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspaceList.json - */ -async function verifierWorkspaceList(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.verifierWorkspaces.list( - resourceGroupName, - networkManagerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await verifierWorkspaceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesUpdateSample.ts deleted file mode 100644 index c9dea62d2c54..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/verifierWorkspacesUpdateSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates Verifier Workspace. - * - * @summary Updates Verifier Workspace. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VerifierWorkspacePatch.json - */ -async function verifierWorkspacePatch(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkManagerName = "testNetworkManager"; - const workspaceName = "testWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.verifierWorkspaces.update( - resourceGroupName, - networkManagerName, - workspaceName, - ); - console.log(result); -} - -async function main(): Promise { - await verifierWorkspacePatch(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vipSwapCreateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vipSwapCreateSample.ts deleted file mode 100644 index 5e023f51727d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vipSwapCreateSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { SwapResource} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Performs vip swap operation on swappable cloud services. - * - * @summary Performs vip swap operation on swappable cloud services. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapPut.json - */ -async function putVipSwapOperation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const parameters: SwapResource = { properties: { slotType: "Production" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.beginCreateAndWait( - groupName, - resourceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putVipSwapOperation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vipSwapGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vipSwapGetSample.ts deleted file mode 100644 index 5cef4f2b5821..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vipSwapGetSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * - * @summary Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapGet.json - */ -async function getSwapResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.get(groupName, resourceName); - console.log(result); -} - -async function main(): Promise { - await getSwapResource(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vipSwapListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vipSwapListSample.ts deleted file mode 100644 index c39f94979aa0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vipSwapListSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * - * @summary Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/CloudServiceSwapList.json - */ -async function getSwapResourceList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const groupName = "rg1"; - const resourceName = "testCloudService"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vipSwap.list(groupName, resourceName); - console.log(result); -} - -async function main(): Promise { - await getSwapResourceList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts deleted file mode 100644 index a80a7bbbe595..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualApplianceSite} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Site. - * - * @summary Creates or updates the specified Network Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSitePut.json - */ -async function createNetworkVirtualApplianceSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const parameters: VirtualApplianceSite = { - addressPrefix: "192.168.1.0/24", - o365Policy: { - breakOutCategories: { default: true, allow: true, optimize: true }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.beginCreateOrUpdateAndWait( - resourceGroupName, - networkVirtualApplianceName, - siteName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesDeleteSample.ts deleted file mode 100644 index 15f99da290f5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified site from a Virtual Appliance. - * - * @summary Deletes the specified site from a Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteDelete.json - */ -async function deleteNetworkVirtualApplianceSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.beginDeleteAndWait( - resourceGroupName, - networkVirtualApplianceName, - siteName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesGetSample.ts deleted file mode 100644 index 97b64840d5ef..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Virtual Appliance Site. - * - * @summary Gets the specified Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteGet.json - */ -async function getNetworkVirtualApplianceSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const siteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSites.get( - resourceGroupName, - networkVirtualApplianceName, - siteName, - ); - console.log(result); -} - -async function main(): Promise { - await getNetworkVirtualApplianceSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesListSample.ts deleted file mode 100644 index 81d80115968d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSitesListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * - * @summary Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSiteList.json - */ -async function listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const networkVirtualApplianceName = "nva"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualApplianceSites.list( - resourceGroupName, - networkVirtualApplianceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSkusGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSkusGetSample.ts deleted file mode 100644 index b4b2f5731065..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSkusGetSample.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a single available sku for network virtual appliance. - * - * @summary Retrieves a single available sku for network virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSkuGet.json - */ -async function networkVirtualApplianceSkuGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const skuName = "ciscoSdwan"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualApplianceSkus.get(skuName); - console.log(result); -} - -async function main(): Promise { - await networkVirtualApplianceSkuGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSkusListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSkusListSample.ts deleted file mode 100644 index 06ce0c8b2ed6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualApplianceSkusListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all SKUs available for a virtual appliance. - * - * @summary List all SKUs available for a virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/NetworkVirtualApplianceSkuList.json - */ -async function networkVirtualApplianceSkuListResult(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualApplianceSkus.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await networkVirtualApplianceSkuListResult(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts deleted file mode 100644 index 791ddd912753..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { BgpConnection} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * - * @summary Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionPut.json - */ -async function virtualHubRouteTableV2Put(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const parameters: BgpConnection = { - hubVirtualNetworkConnection: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1", - }, - peerAsn: 20000, - peerIp: "192.168.1.5", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubBgpConnection.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - connectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubRouteTableV2Put(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionDeleteSample.ts deleted file mode 100644 index 343c386f11b7..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VirtualHubBgpConnection. - * - * @summary Deletes a VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionDelete.json - */ -async function virtualHubRouteTableV2Delete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubRouteTableV2Delete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionGetSample.ts deleted file mode 100644 index 5c9cd7c0a480..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a Virtual Hub Bgp Connection. - * - * @summary Retrieves the details of a Virtual Hub Bgp Connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionGet.json - */ -async function virtualHubVirtualHubRouteTableV2Get(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const connectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubBgpConnection.get( - resourceGroupName, - virtualHubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts deleted file mode 100644 index e546e8e9c745..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * - * @summary Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json - */ -async function virtualRouterPeerListAdvertisedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const hubName = "virtualRouter1"; - const connectionName = "peer1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubBgpConnections.beginListAdvertisedRoutesAndWait( - resourceGroupName, - hubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualRouterPeerListAdvertisedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts deleted file mode 100644 index ffaf8b821b86..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection has learned. - * - * @summary Retrieves a list of routes the virtual hub bgp connection has learned. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeerListLearnedRoute.json - */ -async function virtualRouterPeerListLearnedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const hubName = "virtualRouter1"; - const connectionName = "peer1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubBgpConnections.beginListLearnedRoutesAndWait( - resourceGroupName, - hubName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualRouterPeerListLearnedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListSample.ts deleted file mode 100644 index 13850592f747..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubBgpConnectionsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubBgpConnections. - * - * @summary Retrieves the details of all VirtualHubBgpConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubBgpConnectionList.json - */ -async function virtualHubRouteTableV2List(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubBgpConnections.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts deleted file mode 100644 index 90a2cf396430..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - HubIpConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * - * @summary Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationPut.json - */ -async function virtualHubIPConfigurationPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const parameters: HubIpConfiguration = { - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubIpConfiguration.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - ipConfigName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubIPConfigurationPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationDeleteSample.ts deleted file mode 100644 index 211769b507c4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VirtualHubIpConfiguration. - * - * @summary Deletes a VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationDelete.json - */ -async function virtualHubIPConfigurationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - ipConfigName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubIPConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationGetSample.ts deleted file mode 100644 index a93327b89553..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a Virtual Hub Ip configuration. - * - * @summary Retrieves the details of a Virtual Hub Ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationGet.json - */ -async function virtualHubVirtualHubRouteTableV2Get(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const ipConfigName = "ipconfig1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubIpConfiguration.get( - resourceGroupName, - virtualHubName, - ipConfigName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationListSample.ts deleted file mode 100644 index 8d93863d056c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubIPConfigurationListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubIpConfigurations. - * - * @summary Retrieves the details of all VirtualHubIpConfigurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubIpConfigurationList.json - */ -async function virtualHubRouteTableV2List(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "hub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubIpConfiguration.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts deleted file mode 100644 index 883198cd5c93..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualHubRouteTableV2} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * - * @summary Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Put.json - */ -async function virtualHubRouteTableV2Put(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2 = { - attachedConnections: ["All_Vnets"], - routes: [ - { - destinationType: "CIDR", - destinations: ["20.10.0.0/16", "20.20.0.0/16"], - nextHopType: "IPAddress", - nextHops: ["10.0.0.68"], - }, - { - destinationType: "CIDR", - destinations: ["0.0.0.0/0"], - nextHopType: "IPAddress", - nextHops: ["10.0.0.68"], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubRouteTableV2S.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - virtualHubRouteTableV2Parameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubRouteTableV2Put(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SDeleteSample.ts deleted file mode 100644 index 432e429dffa2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VirtualHubRouteTableV2. - * - * @summary Deletes a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Delete.json - */ -async function virtualHubRouteTableV2Delete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubRouteTableV2S.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubRouteTableV2Delete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SGetSample.ts deleted file mode 100644 index 596ff02dfe34..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VirtualHubRouteTableV2. - * - * @summary Retrieves the details of a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2Get.json - */ -async function virtualHubVirtualHubRouteTableV2Get(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const routeTableName = "virtualHubRouteTable1a"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubRouteTableV2S.get( - resourceGroupName, - virtualHubName, - routeTableName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubVirtualHubRouteTableV2Get(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SListSample.ts deleted file mode 100644 index 1cae4a5e532c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubRouteTableV2SListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of all VirtualHubRouteTableV2s. - * - * @summary Retrieves the details of all VirtualHubRouteTableV2s. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubRouteTableV2List.json - */ -async function virtualHubRouteTableV2List(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubRouteTableV2S.list( - resourceGroupName, - virtualHubName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualHubRouteTableV2List(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsCreateOrUpdateSample.ts deleted file mode 100644 index ff203532c5aa..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VirtualHub} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * - * @summary Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubPut.json - */ -async function virtualHubPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub2"; - const virtualHubParameters: VirtualHub = { - addressPrefix: "10.168.0.0/24", - location: "West US", - sku: "Basic", - tags: { key1: "value1" }, - virtualWan: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualHubName, - virtualHubParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsDeleteSample.ts deleted file mode 100644 index 0106312c2c08..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VirtualHub. - * - * @summary Deletes a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubDelete.json - */ -async function virtualHubDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginDeleteAndWait( - resourceGroupName, - virtualHubName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts deleted file mode 100644 index 1f86d8ad5cee..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - EffectiveRoutesParameters, - VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EffectiveRoutesListForConnection.json - */ -async function effectiveRoutesForAConnectionResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters: EffectiveRoutesParameters = { - resourceId: - "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName", - virtualWanResourceType: "ExpressRouteConnection", - }; - const options: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EffectiveRoutesListForRouteTable.json - */ -async function effectiveRoutesForARouteTableResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters: EffectiveRoutesParameters = { - resourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1", - virtualWanResourceType: "RouteTable", - }; - const options: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * - * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/EffectiveRoutesListForVirtualHub.json - */ -async function effectiveRoutesForTheVirtualHub(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const effectiveRoutesParameters: EffectiveRoutesParameters = {}; - const options: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams = { - effectiveRoutesParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualHubs.beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName, - virtualHubName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await effectiveRoutesForAConnectionResource(); - await effectiveRoutesForARouteTableResource(); - await effectiveRoutesForTheVirtualHub(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetInboundRoutesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetInboundRoutesSample.ts deleted file mode 100644 index b76ca713b8ea..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetInboundRoutesSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - GetInboundRoutesParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the inbound routes configured for the Virtual Hub on a particular connection. - * - * @summary Gets the inbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetInboundRoutes.json - */ -async function inboundRoutesForTheVirtualHubOnAParticularConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const getInboundRoutesParameters: GetInboundRoutesParameters = { - connectionType: "ExpressRouteConnection", - resourceUri: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetInboundRoutesAndWait( - resourceGroupName, - virtualHubName, - getInboundRoutesParameters, - ); - console.log(result); -} - -async function main(): Promise { - await inboundRoutesForTheVirtualHubOnAParticularConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetOutboundRoutesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetOutboundRoutesSample.ts deleted file mode 100644 index fb9d2fe814ef..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetOutboundRoutesSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - GetOutboundRoutesParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the outbound routes configured for the Virtual Hub on a particular connection. - * - * @summary Gets the outbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetOutboundRoutes.json - */ -async function outboundRoutesForTheVirtualHubOnAParticularConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const getOutboundRoutesParameters: GetOutboundRoutesParameters = { - connectionType: "ExpressRouteConnection", - resourceUri: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.beginGetOutboundRoutesAndWait( - resourceGroupName, - virtualHubName, - getOutboundRoutesParameters, - ); - console.log(result); -} - -async function main(): Promise { - await outboundRoutesForTheVirtualHubOnAParticularConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetSample.ts deleted file mode 100644 index e7947b36185d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VirtualHub. - * - * @summary Retrieves the details of a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubGet.json - */ -async function virtualHubGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.get( - resourceGroupName, - virtualHubName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsListByResourceGroupSample.ts deleted file mode 100644 index 600940a1b0ed..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VirtualHubs in a resource group. - * - * @summary Lists all the VirtualHubs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubListByResourceGroup.json - */ -async function virtualHubListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubs.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualHubListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsListSample.ts deleted file mode 100644 index cba21c60686d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VirtualHubs in a subscription. - * - * @summary Lists all the VirtualHubs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubList.json - */ -async function virtualHubList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualHubs.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualHubList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsUpdateTagsSample.ts deleted file mode 100644 index f22df6600715..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualHubsUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates VirtualHub tags. - * - * @summary Updates VirtualHub tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualHubUpdateTags.json - */ -async function virtualHubUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualHubName = "virtualHub2"; - const virtualHubParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualHubs.updateTags( - resourceGroupName, - virtualHubName, - virtualHubParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualHubUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesCreateOrUpdateSample.ts deleted file mode 100644 index e0faa1c09c3b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesCreateOrUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkAppliance} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a virtual network appliance. - * - * @summary Creates or updates a virtual network appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_CreateOrUpdate.json - */ -async function createVirtualNetworkAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; - const parameters: VirtualNetworkAppliance = { - bandwidthInGbps: "100", - location: "eastus", - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkApplianceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createVirtualNetworkAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesDeleteSample.ts deleted file mode 100644 index 7d4284c02d8e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified virtual network appliance. - * - * @summary Deletes the specified virtual network appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_Delete.json - */ -async function deleteVirtualNetworkAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkAppliances.beginDeleteAndWait( - resourceGroupName, - virtualNetworkApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualNetworkAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesGetSample.ts deleted file mode 100644 index def56ee4750b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified virtual network appliance. - * - * @summary Gets information about the specified virtual network appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_Get.json - */ -async function getVirtualNetworkAppliance(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkAppliances.get( - resourceGroupName, - virtualNetworkApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkAppliance(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesListAllSample.ts deleted file mode 100644 index 4ccbd19bfc45..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all virtual network appliances in a subscription. - * - * @summary Gets all virtual network appliances in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_ListBySubscription.json - */ -async function listAllVirtualNetworkAppliances(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkAppliances.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllVirtualNetworkAppliances(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesListSample.ts deleted file mode 100644 index 053dbdd3200d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all virtual network appliances in a resource group. - * - * @summary Gets all virtual network appliances in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_List.json - */ -async function listVirtualNetworkAppliancesInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkAppliances.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualNetworkAppliancesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesUpdateTagsSample.ts deleted file mode 100644 index 86251d7a01ed..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkAppliancesUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a virtual network appliance tags. - * - * @summary Updates a virtual network appliance tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkAppliances_UpdateTags.json - */ -async function updateVirtualNetworkApplianceTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkApplianceName = "test-vna"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkAppliances.updateTags( - resourceGroupName, - virtualNetworkApplianceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkApplianceTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index a5deecb15adc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGatewayConnection} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway connection in the specified resource group. - * - * @summary Creates or updates a virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionCreate.json - */ -async function createVirtualNetworkGatewayConnectionS2S(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const parameters: VirtualNetworkGatewayConnection = { - authenticationType: "Certificate", - certificateAuthentication: { - inboundAuthCertificateChain: [ - "MIIC+TCCAeGgAwIBAgIQFOJUqDaxV5xJcKpTKO...", - "MIIC+TCCAeGgAwIBAgIQPJerInitNblK7yBgkqh...", - ], - inboundAuthCertificateSubjectName: "CN=rootCert.com", - outboundAuthCertificate: - "https://customerKv.vault.azure.net/Certificates/outBoundcert/Version", - }, - connectionMode: "Default", - connectionProtocol: "IKEv2", - connectionType: "IPsec", - dpdTimeoutSeconds: 30, - egressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", - }, - ], - enableBgp: false, - gatewayCustomBgpIpAddresses: [ - { - customBgpIpAddress: "169.254.21.1", - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/default", - }, - { - customBgpIpAddress: "169.254.21.3", - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/ActiveActive", - }, - ], - ingressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", - }, - ], - ipsecPolicies: [], - localNetworkGateway2: { - gatewayIpAddress: "x.x.x.x", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw", - localNetworkAddressSpace: { addressPrefixes: ["10.1.0.0/16"] }, - location: "centralus", - tags: {}, - }, - location: "centralus", - routingWeight: 0, - sharedKey: "Abc123", - trafficSelectorPolicies: [], - tunnelProperties: [ - { bgpPeeringAddress: "10.78.1.17", tunnelIpAddress: "10.78.1.5" }, - { bgpPeeringAddress: "10.78.1.20", tunnelIpAddress: "10.78.1.7" }, - ], - usePolicyBasedTrafficSelectors: false, - virtualNetworkGateway1: { - active: false, - bgpSettings: { - asn: 65514, - bgpPeeringAddress: "10.0.1.30", - peerWeight: 0, - }, - enableBgp: false, - gatewayType: "Vpn", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw", - ipConfigurations: [ - { - name: "gwipconfig1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - sku: { name: "VpnGw1", tier: "VpnGw1" }, - tags: {}, - vpnType: "RouteBased", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createVirtualNetworkGatewayConnectionS2S(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts deleted file mode 100644 index eef5c2a4d5db..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified virtual network Gateway connection. - * - * @summary Deletes the specified virtual network Gateway connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionDelete.json - */ -async function deleteVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts deleted file mode 100644 index c1cf97cafc08..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * - * @summary Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json - */ -async function getVirtualNetworkGatewayConnectionIkeSa(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginGetIkeSasAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayConnectionIkeSa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts deleted file mode 100644 index e893e09d5dfe..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified virtual network gateway connection by resource group. - * - * @summary Gets the specified virtual network gateway connection by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGet.json - */ -async function getVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.get( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts deleted file mode 100644 index 5d365767b023..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * - * @summary The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json - */ -async function getVirtualNetworkGatewayConnectionSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayConnections.getSharedKey( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsListSample.ts deleted file mode 100644 index 5875ed141596..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * - * @summary The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionsList.json - */ -async function listVirtualNetworkGatewayConnectionsinResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGatewayConnections.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualNetworkGatewayConnectionsinResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts deleted file mode 100644 index 7f887defeb36..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the virtual network gateway connection specified. - * - * @summary Resets the virtual network gateway connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionReset.json - */ -async function resetVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginResetConnectionAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await resetVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts deleted file mode 100644 index 9bde7da4cec7..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectionResetSharedKey} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * - * @summary The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json - */ -async function resetVirtualNetworkGatewayConnectionSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "conn1"; - const parameters: ConnectionResetSharedKey = { keyLength: 128 }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginResetSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await resetVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts deleted file mode 100644 index 0c8de6429c2e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectionSharedKey} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * - * @summary The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json - */ -async function setVirtualNetworkGatewayConnectionSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "connS2S"; - const parameters: ConnectionSharedKey = { value: "AzureAbc123" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginSetSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await setVirtualNetworkGatewayConnectionSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts deleted file mode 100644 index 802d34f5caf1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnPacketCaptureStartParameters, - VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const parameters: VpnPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams = - { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter(); - await startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts deleted file mode 100644 index 68f5fa37bd3d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnPacketCaptureStopParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops packet capture on virtual network gateway connection in the specified resource group. - * - * @summary Stops packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json - */ -async function stopPacketCaptureOnVirtualNetworkGatewayConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngwcn1"; - const parameters: VpnPacketCaptureStopParameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginStopPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await stopPacketCaptureOnVirtualNetworkGatewayConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts deleted file mode 100644 index a0f693aa84b1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a virtual network gateway connection tags. - * - * @summary Updates a virtual network gateway connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json - */ -async function updateVirtualNetworkGatewayConnectionTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "test"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayConnections.beginUpdateTagsAndWait( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkGatewayConnectionTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts deleted file mode 100644 index 3dd03a503444..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGatewayNatRule} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * - * @summary Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRulePut.json - */ -async function virtualNetworkGatewayNatRulePut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const natRuleParameters: VirtualNetworkGatewayNatRule = { - typePropertiesType: "Static", - externalMappings: [ - { addressSpace: "192.168.21.0/24", portRange: "300-400" }, - ], - internalMappings: [{ addressSpace: "10.4.0.0/24", portRange: "200-300" }], - ipConfigurationId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/ipConfigurations/default", - mode: "EgressSnat", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGatewayNatRules.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - natRuleParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayNatRulePut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts deleted file mode 100644 index de0c553a2a89..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a nat rule. - * - * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json - */ -async function virtualNetworkGatewayNatRuleDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayNatRuleDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts deleted file mode 100644 index 117eaace62b1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a nat rule. - * - * @summary Retrieves the details of a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleGet.json - */ -async function virtualNetworkGatewayNatRuleGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const natRuleName = "natRule1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGatewayNatRules.get( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayNatRuleGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts deleted file mode 100644 index 604f9c5cf1b4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all nat rules for a particular virtual network gateway. - * - * @summary Retrieves all nat rules for a particular virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayNatRuleList.json - */ -async function virtualNetworkGatewayNatRuleList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGatewayNatRules.listByVirtualNetworkGateway( - resourceGroupName, - virtualNetworkGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualNetworkGatewayNatRuleList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index 8cb9797ab703..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGateway} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. - * - * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayUpdate.json - */ -async function updateVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VirtualNetworkGateway = { - active: false, - allowRemoteVnetTraffic: false, - allowVirtualWanTraffic: false, - bgpSettings: { asn: 65515, bgpPeeringAddress: "10.0.1.30", peerWeight: 0 }, - customRoutes: { addressPrefixes: ["101.168.0.6/32"] }, - disableIPSecReplayProtection: false, - enableBgp: false, - enableBgpRouteTranslationForNat: false, - enableDnsForwarding: true, - enableHighBandwidthVpnGateway: false, - gatewayType: "Vpn", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": - {}, - }, - }, - ipConfigurations: [ - { - name: "gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - natRules: [ - { - name: "natRule1", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "50.0.0.0/24" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", - internalMappings: [{ addressSpace: "10.10.0.0/24" }], - ipConfigurationId: "", - mode: "EgressSnat", - }, - { - name: "natRule2", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "30.0.0.0/24" }], - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", - internalMappings: [{ addressSpace: "20.10.0.0/24" }], - ipConfigurationId: "", - mode: "IngressSnat", - }, - ], - sku: { name: "VpnGw1", tier: "VpnGw1" }, - vpnClientConfiguration: { - radiusServers: [ - { - radiusServerAddress: "10.2.0.0", - radiusServerScore: 20, - radiusServerSecret: "radiusServerSecret", - }, - ], - vpnClientProtocols: ["OpenVPN"], - vpnClientRevokedCertificates: [], - vpnClientRootCertificates: [], - }, - vpnType: "RouteBased", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. - * - * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkScalableGatewayUpdate.json - */ -async function updateVirtualNetworkScalableGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const parameters: VirtualNetworkGateway = { - active: false, - adminState: "Enabled", - allowRemoteVnetTraffic: false, - allowVirtualWanTraffic: false, - autoScaleConfiguration: { bounds: { max: 3, min: 2 } }, - bgpSettings: {}, - disableIPSecReplayProtection: false, - enableBgp: false, - enableBgpRouteTranslationForNat: false, - gatewayType: "ExpressRoute", - ipConfigurations: [ - { - name: "gwipconfig1", - privateIPAllocationMethod: "Dynamic", - publicIPAddress: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip", - }, - subnet: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet", - }, - }, - ], - location: "centralus", - natRules: [], - sku: { name: "ErGwScale", tier: "ErGwScale" }, - virtualNetworkGatewayPolicyGroups: [], - vpnClientConfiguration: {}, - vpnType: "PolicyBased", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkGateway(); - await updateVirtualNetworkScalableGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysDeleteSample.ts deleted file mode 100644 index c980df0e72d9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified virtual network gateway. - * - * @summary Deletes the specified virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayDelete.json - */ -async function deleteVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginDeleteAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts deleted file mode 100644 index 4355a82c1308..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - P2SVpnConnectionRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Disconnect vpn connections of virtual network gateway in the specified resource group. - * - * @summary Disconnect vpn connections of virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json - */ -async function disconnectVpnConnectionsFromVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "vpn-gateway-test"; - const virtualNetworkGatewayName = "vpngateway"; - const request: P2SVpnConnectionRequest = { - vpnConnectionIds: ["vpnconnId1", "vpnconnId2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginDisconnectVirtualNetworkGatewayVpnConnectionsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await disconnectVpnConnectionsFromVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts deleted file mode 100644 index 98d8b6328e3e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnClientParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * - * @summary Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json - */ -async function generateVirtualNetworkGatewayVpnProfile(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnClientParameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGenerateVpnProfileAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await generateVirtualNetworkGatewayVpnProfile(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts deleted file mode 100644 index 983ebb77e523..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnClientParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * - * @summary Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json - */ -async function generateVpnClientPackage(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnClientParameters = {}; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGeneratevpnclientpackageAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await generateVpnClientPackage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts deleted file mode 100644 index 8c6029c6eecc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * - * @summary This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json - */ -async function getVirtualNetworkGatewayAdvertisedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const peer = "test"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetAdvertisedRoutesAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peer, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayAdvertisedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts deleted file mode 100644 index 6e8e2d3b8d52..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * - * @summary The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json - */ -async function getVirtualNetworkGatewayBgpPeerStatus(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetBgpPeerStatusAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayBgpPeerStatus(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts deleted file mode 100644 index ba21b7450a29..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves the details of all the failover tests performed on the gateway for different peering locations - * - * @summary This operation retrieves the details of all the failover tests performed on the gateway for different peering locations - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json - */ -async function virtualNetworkGatewayGetFailoverAllTestsDetails(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const typeParam = "SingleSiteFailover"; - const fetchLatest = true; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetFailoverAllTestDetailsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - typeParam, - fetchLatest, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayGetFailoverAllTestsDetails(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts deleted file mode 100644 index 60856b9bf2dc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid - * - * @summary This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json - */ -async function virtualNetworkGatewayGetFailoverSingleTestDetails(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const peeringLocation = "Vancouver"; - const failoverTestId = "fe458ae8-d2ae-4520-a104-44bc233bde7e"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetFailoverSingleTestDetailsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - failoverTestId, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayGetFailoverSingleTestDetails(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts deleted file mode 100644 index 0906fdea5e46..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * - * @summary This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json - */ -async function getVirtualNetworkGatewayLearnedRoutes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetLearnedRoutesAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayLearnedRoutes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetResiliencyInformationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetResiliencyInformationSample.ts deleted file mode 100644 index edd15d96b324..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetResiliencyInformationSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGatewaysGetResiliencyInformationOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score - * - * @summary This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetResiliencyInformation.json - */ -async function getVirtualNetworkGatewayResiliencyInformation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const attemptRefresh = true; - const options: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams = - { attemptRefresh }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetResiliencyInformationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayResiliencyInformation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetRoutesInformationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetRoutesInformationSample.ts deleted file mode 100644 index 4a345c7cf7ac..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetRoutesInformationSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGatewaysGetRoutesInformationOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation retrieves the route set information for an Express Route Gateway based on their resiliency - * - * @summary This operation retrieves the route set information for an Express Route Gateway based on their resiliency - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetRoutesInformation.json - */ -async function getVirtualNetworkGatewayRoutesInformation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const attemptRefresh = false; - const options: VirtualNetworkGatewaysGetRoutesInformationOptionalParams = { - attemptRefresh, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetRoutesInformationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayRoutesInformation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetSample.ts deleted file mode 100644 index 53113dc2910a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified virtual network gateway by resource group. - * - * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGet.json - */ -async function getVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.get( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network gateway by resource group. - * - * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkScalableGatewayGet.json - */ -async function getVirtualNetworkScalableGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.get( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGateway(); - await getVirtualNetworkScalableGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts deleted file mode 100644 index eeafbc473538..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * - * @summary Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json - */ -async function getVirtualNetworkGatewayVpnProfilePackageUrl(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetVpnProfilePackageUrlAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayVpnProfilePackageUrl(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts deleted file mode 100644 index 7b5fcf0aae27..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * - * @summary Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json - */ -async function getVirtualNetworkGatewayVpnclientConnectionHealth(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["NETWORK_RESOURCE_GROUP"] || "p2s-vnet-test"; - const virtualNetworkGatewayName = "vpnp2sgw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetVpnclientConnectionHealthAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayVpnclientConnectionHealth(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts deleted file mode 100644 index 582b8d637a7e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * - * @summary The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json - */ -async function getVirtualNetworkGatewayVpnClientIpsecParameters(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginGetVpnclientIpsecParametersAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkGatewayVpnClientIpsecParameters(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeAbortMigrationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeAbortMigrationSample.ts deleted file mode 100644 index 5605af77d626..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeAbortMigrationSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Trigger abort migration for the virtual network gateway. - * - * @summary Trigger abort migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayAbortMigration.json - */ -async function virtualNetworkGatewayAbortMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokeAbortMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayAbortMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeCommitMigrationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeCommitMigrationSample.ts deleted file mode 100644 index b68ff5b14324..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeCommitMigrationSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Trigger commit migration for the virtual network gateway. - * - * @summary Trigger commit migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayCommitMigration.json - */ -async function virtualNetworkGatewayCommitMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokeCommitMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayCommitMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts deleted file mode 100644 index 2f63a07191dd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokeExecuteMigrationSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Trigger execute migration for the virtual network gateway. - * - * @summary Trigger execute migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayExecuteMigration.json - */ -async function virtualNetworkGatewayExecuteMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokeExecuteMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayExecuteMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokePrepareMigrationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokePrepareMigrationSample.ts deleted file mode 100644 index 4dc045e6d2bd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysInvokePrepareMigrationSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkGatewayMigrationParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Trigger prepare migration for the virtual network gateway. - * - * @summary Trigger prepare migration for the virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayPrepareMigration.json - */ -async function virtualNetworkGatewayPrepareMigration(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const migrationParams: VirtualNetworkGatewayMigrationParameters = { - migrationType: "UpgradeDeploymentToStandardIP", - resourceUrl: "testUrl", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginInvokePrepareMigrationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - migrationParams, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayPrepareMigration(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts deleted file mode 100644 index 6d13f79647b1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the connections in a virtual network gateway. - * - * @summary Gets all the connections in a virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaysListConnections.json - */ -async function virtualNetworkGatewaysListConnections(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "testrg"; - const virtualNetworkGatewayName = "test-vpn-gateway-1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGateways.listConnections( - resourceGroupName, - virtualNetworkGatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualNetworkGatewaysListConnections(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListRadiusSecretsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListRadiusSecretsSample.ts deleted file mode 100644 index e45c0fb4d9cc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListRadiusSecretsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. - * - * @summary List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AllVirtualNetworkGatewayRadiusServerSecretsList.json - */ -async function listAllVirtualNetworkGatewayRadiusServerSecrets(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.listRadiusSecrets( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await listAllVirtualNetworkGatewayRadiusServerSecrets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListSample.ts deleted file mode 100644 index 693c156aafbd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all virtual network gateways by resource group. - * - * @summary Gets all virtual network gateways by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayList.json - */ -async function listVirtualNetworkGatewaysinResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkGateways.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualNetworkGatewaysinResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysResetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysResetSample.ts deleted file mode 100644 index 53baa0f1abca..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysResetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the primary of the virtual network gateway in the specified resource group. - * - * @summary Resets the primary of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayReset.json - */ -async function resetVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginResetAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await resetVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts deleted file mode 100644 index e0247d3831e6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * - * @summary Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json - */ -async function resetVpnClientSharedKey(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginResetVpnClientSharedKeyAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await resetVpnClientSharedKey(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts deleted file mode 100644 index 100473c7e61c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnClientIPsecParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * - * @summary The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json - */ -async function setVirtualNetworkGatewayVpnClientIpsecParameters(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const vpnclientIpsecParams: VpnClientIPsecParameters = { - dhGroup: "DHGroup2", - ikeEncryption: "AES256", - ikeIntegrity: "SHA384", - ipsecEncryption: "AES256", - ipsecIntegrity: "SHA256", - pfsGroup: "PFS2", - saDataSizeKilobytes: 429497, - saLifeTimeSeconds: 86473, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginSetVpnclientIpsecParametersAndWait( - resourceGroupName, - virtualNetworkGatewayName, - vpnclientIpsecParams, - ); - console.log(result); -} - -async function main(): Promise { - await setVirtualNetworkGatewayVpnClientIpsecParameters(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts deleted file mode 100644 index a643c0101d37..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation starts failover simulation on the gateway for the specified peering location - * - * @summary This operation starts failover simulation on the gateway for the specified peering location - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json - */ -async function virtualNetworkGatewayStartSiteFailoverSimulation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const peeringLocation = "Vancouver"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayStartSiteFailoverSimulation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts deleted file mode 100644 index 065d85933607..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnPacketCaptureStartParameters, - VirtualNetworkGatewaysStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options: VirtualNetworkGatewaysStartPacketCaptureOptionalParams = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. - * - * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStartPacketCapture.json - */ -async function startPacketCaptureOnVirtualNetworkGatewayWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await startPacketCaptureOnVirtualNetworkGatewayWithFilter(); - await startPacketCaptureOnVirtualNetworkGatewayWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts deleted file mode 100644 index 6ea59dcd0df2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ExpressRouteFailoverStopApiParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation stops failover simulation on the gateway for the specified peering location - * - * @summary This operation stops failover simulation on the gateway for the specified peering location - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json - */ -async function virtualNetworkGatewayStopSiteFailoverSimulation(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "ergw"; - const stopParameters: ExpressRouteFailoverStopApiParameters = { - peeringLocation: "Vancouver", - wasSimulationSuccessful: true, - details: [ - { - failoverConnectionName: "conn1", - failoverLocation: "Denver", - isVerified: false, - }, - { - failoverConnectionName: "conn2", - failoverLocation: "Amsterdam", - isVerified: true, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName, - virtualNetworkGatewayName, - stopParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworkGatewayStopSiteFailoverSimulation(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts deleted file mode 100644 index 31644238be1a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnPacketCaptureStopParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops packet capture on virtual network gateway in the specified resource group. - * - * @summary Stops packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json - */ -async function stopPacketCaptureOnVirtualNetworkGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: VpnPacketCaptureStopParameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.beginStopPacketCaptureAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await stopPacketCaptureOnVirtualNetworkGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts deleted file mode 100644 index 00aead437fc5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a xml format representation for supported vpn devices. - * - * @summary Gets a xml format representation for supported vpn devices. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json - */ -async function listVirtualNetworkGatewaySupportedVpnDevices(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.supportedVpnDevices( - resourceGroupName, - virtualNetworkGatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await listVirtualNetworkGatewaySupportedVpnDevices(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts deleted file mode 100644 index 8598423aebdd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a virtual network gateway tags. - * - * @summary Updates a virtual network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayUpdateTags.json - */ -async function updateVirtualNetworkGatewayTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayName = "vpngw"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkGateways.beginUpdateTagsAndWait( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkGatewayTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts deleted file mode 100644 index cad436b32352..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnDeviceScriptParameters} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a xml format representation for vpn device configuration script. - * - * @summary Gets a xml format representation for vpn device configuration script. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json - */ -async function getVpnDeviceConfigurationScript(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkGatewayConnectionName = "vpngw"; - const parameters: VpnDeviceScriptParameters = { - deviceFamily: "ISR", - firmwareVersion: "IOS 15.1 (Preview)", - vendor: "Cisco", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.virtualNetworkGateways.vpnDeviceConfigurationScript( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await getVpnDeviceConfigurationScript(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts deleted file mode 100644 index d0a77f5406b9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworkPeering, - VirtualNetworkPeeringsCreateOrUpdateOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringCreate.json - */ -async function createV6SubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: true, - localSubnetNames: ["Subnet1", "Subnet4"], - peerCompleteVnets: false, - remoteSubnetNames: ["Subnet2"], - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringCreate.json - */ -async function createPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json - */ -async function createPeeringWithRemoteVirtualNetworkEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkSubnetPeeringCreate.json - */ -async function createSubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: false, - localSubnetNames: ["Subnet1", "Subnet4"], - peerCompleteVnets: false, - remoteSubnetNames: ["Subnet2"], - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringSync.json - */ -async function syncPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options: VirtualNetworkPeeringsCreateOrUpdateOptionalParams = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringSync.json - */ -async function syncV6SubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: true, - peerCompleteVnets: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options: VirtualNetworkPeeringsCreateOrUpdateOptionalParams = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a peering in the specified virtual network. - * - * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkSubnetPeeringSync.json - */ -async function syncSubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const syncRemoteAddressSpace = "true"; - const virtualNetworkPeeringParameters: VirtualNetworkPeering = { - allowForwardedTraffic: true, - allowGatewayTransit: false, - allowVirtualNetworkAccess: true, - enableOnlyIPv6Peering: false, - peerCompleteVnets: false, - remoteVirtualNetwork: { - id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2", - }, - useRemoteGateways: false, - }; - const options: VirtualNetworkPeeringsCreateOrUpdateOptionalParams = { - syncRemoteAddressSpace, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await createV6SubnetPeering(); - await createPeering(); - await createPeeringWithRemoteVirtualNetworkEncryption(); - await createSubnetPeering(); - await syncPeering(); - await syncV6SubnetPeering(); - await syncSubnetPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsDeleteSample.ts deleted file mode 100644 index 5897b68b59b4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified virtual network peering. - * - * @summary Deletes the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringDelete.json - */ -async function deletePeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -async function main(): Promise { - await deletePeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsGetSample.ts deleted file mode 100644 index 4727f25c5484..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsGetSample.ts +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json - */ -async function getV6SubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringGet.json - */ -async function getPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json - */ -async function getPeeringWithRemoteVirtualNetworkEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network peering. - * - * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkSubnetPeeringGet.json - */ -async function getSubnetPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const virtualNetworkPeeringName = "peer"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkPeerings.get( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - ); - console.log(result); -} - -async function main(): Promise { - await getV6SubnetPeering(); - await getPeering(); - await getPeeringWithRemoteVirtualNetworkEncryption(); - await getSubnetPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsListSample.ts deleted file mode 100644 index c45bfa2c317d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkPeeringsListSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all virtual network peerings in a virtual network. - * - * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringList.json - */ -async function listPeerings(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkPeerings.list( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets all virtual network peerings in a virtual network. - * - * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json - */ -async function listPeeringsWithRemoteVirtualNetworkEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest"; - const virtualNetworkName = "vnet1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkPeerings.list( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPeerings(); - await listPeeringsWithRemoteVirtualNetworkEncryption(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts deleted file mode 100644 index b51877cafceb..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VirtualNetworkTap} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a Virtual Network Tap. - * - * @summary Creates or updates a Virtual Network Tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapCreate.json - */ -async function createVirtualNetworkTap(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const parameters: VirtualNetworkTap = { - destinationNetworkInterfaceIPConfiguration: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testNetworkInterface/ipConfigurations/ipconfig1", - }, - location: "centraluseuap", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.beginCreateOrUpdateAndWait( - resourceGroupName, - tapName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createVirtualNetworkTap(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsDeleteSample.ts deleted file mode 100644 index 3ddef8c3d95e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified virtual network tap. - * - * @summary Deletes the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapDelete.json - */ -async function deleteVirtualNetworkTapResource(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.beginDeleteAndWait( - resourceGroupName, - tapName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualNetworkTapResource(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsGetSample.ts deleted file mode 100644 index 0b04640eaca6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about the specified virtual network tap. - * - * @summary Gets information about the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapGet.json - */ -async function getVirtualNetworkTap(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "testvtap"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.get( - resourceGroupName, - tapName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetworkTap(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsListAllSample.ts deleted file mode 100644 index 4a2184bfd5ea..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. - * - * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapListAll.json - */ -async function listAllVirtualNetworkTaps(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkTaps.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllVirtualNetworkTaps(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts deleted file mode 100644 index 0767a53f022b..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. - * - * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapList.json - */ -async function listVirtualNetworkTapsInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworkTaps.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualNetworkTapsInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsUpdateTagsSample.ts deleted file mode 100644 index 5c34e4b508dd..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworkTapsUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an VirtualNetworkTap tags. - * - * @summary Updates an VirtualNetworkTap tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkTapUpdateTags.json - */ -async function updateVirtualNetworkTapTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const tapName = "test-vtap"; - const tapParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworkTaps.updateTags( - resourceGroupName, - tapName, - tapParameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkTapTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts deleted file mode 100644 index 4f945245494e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks whether a private IP address is available for use. - * - * @summary Checks whether a private IP address is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json - */ -async function checkIPAddressAvailability(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const ipAddress = "10.0.1.4"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.checkIPAddressAvailability( - resourceGroupName, - virtualNetworkName, - ipAddress, - ); - console.log(result); -} - -async function main(): Promise { - await checkIPAddressAvailability(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 7a5d3a6b02ab..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VirtualNetwork} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreate.json - */ -async function createVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - flowTimeoutInMinutes: 10, - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateWithBgpCommunities.json - */ -async function createVirtualNetworkWithBgpCommunities(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - bgpCommunities: { virtualNetworkCommunity: "12076:20000" }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateSubnetWithDelegation.json - */ -async function createVirtualNetworkWithDelegatedSubnets(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "westcentralus", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/24", - delegations: [ - { - name: "myDelegation", - serviceName: "Microsoft.Sql/managedInstances", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateWithEncryption.json - */ -async function createVirtualNetworkWithEncryption(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - encryption: { enabled: true, enforcement: "AllowUnencrypted" }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateWithIpamPool.json - */ -async function createVirtualNetworkWithIpamPool(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { - ipamPoolPrefixAllocations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", - numberOfIpAddresses: "65536", - }, - ], - }, - location: "eastus", - subnets: [ - { - name: "test-1", - ipamPoolPrefixAllocations: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", - numberOfIpAddresses: "80", - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateServiceEndpoints.json - */ -async function createVirtualNetworkWithServiceEndpoints(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vnetTest"; - const virtualNetworkName = "vnet1"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/16", - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json - */ -async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "vnetTest"; - const virtualNetworkName = "vnet1"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus2euap", - subnets: [ - { - name: "test-1", - addressPrefix: "10.0.0.0/16", - serviceEndpointPolicies: [ - { - id: "/subscriptions/subid/resourceGroups/vnetTest/providers/Microsoft.Network/serviceEndpointPolicies/ServiceEndpointPolicy1", - }, - ], - serviceEndpoints: [{ service: "Microsoft.Storage" }], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateSubnet.json - */ -async function createVirtualNetworkWithSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [{ name: "test-1", addressPrefix: "10.0.0.0/24" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. - * - * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json - */ -async function createVirtualNetworkWithSubnetContainingAddressPrefixes(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: VirtualNetwork = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - location: "eastus", - subnets: [ - { name: "test-2", addressPrefixes: ["10.0.0.0/28", "10.0.1.0/28"] }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createVirtualNetwork(); - await createVirtualNetworkWithBgpCommunities(); - await createVirtualNetworkWithDelegatedSubnets(); - await createVirtualNetworkWithEncryption(); - await createVirtualNetworkWithIpamPool(); - await createVirtualNetworkWithServiceEndpoints(); - await createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(); - await createVirtualNetworkWithSubnet(); - await createVirtualNetworkWithSubnetContainingAddressPrefixes(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksDeleteSample.ts deleted file mode 100644 index 58fd2b4ae4b6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified virtual network. - * - * @summary Deletes the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkDelete.json - */ -async function deleteVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksGetSample.ts deleted file mode 100644 index 86027860c4e6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksGetSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGet.json - */ -async function getVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetWithSubnetDelegation.json - */ -async function getVirtualNetworkWithADelegatedSubnet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the specified virtual network by resource group. - * - * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetWithServiceAssociationLink.json - */ -async function getVirtualNetworkWithServiceAssociationLinks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.get( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualNetwork(); - await getVirtualNetworkWithADelegatedSubnet(); - await getVirtualNetworkWithServiceAssociationLinks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListAllSample.ts deleted file mode 100644 index 3e7a81ee0061..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all virtual networks in a subscription. - * - * @summary Gets all virtual networks in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkListAll.json - */ -async function listAllVirtualNetworks(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllVirtualNetworks(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts deleted file mode 100644 index fc48c29cee65..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualNetworksListDdosProtectionStatusOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * - * @summary Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json - */ -async function getDdosProtectionStatusOfAVirtualNetwork(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const top = 75; - const options: VirtualNetworksListDdosProtectionStatusOptionalParams = { - top, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.beginListDdosProtectionStatusAndWait( - resourceGroupName, - virtualNetworkName, - options, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getDdosProtectionStatusOfAVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListSample.ts deleted file mode 100644 index 72dfe879db13..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all virtual networks in a resource group. - * - * @summary Gets all virtual networks in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkList.json - */ -async function listVirtualNetworksInResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVirtualNetworksInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListUsageSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListUsageSample.ts deleted file mode 100644 index 2b297a448bd4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksListUsageSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists usage stats. - * - * @summary Lists usage stats. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkListUsage.json - */ -async function vnetGetUsage(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "vnetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listUsage( - resourceGroupName, - virtualNetworkName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vnetGetUsage(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksUpdateTagsSample.ts deleted file mode 100644 index 2d688f0c2179..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a virtual network tags. - * - * @summary Updates a virtual network tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualNetworkUpdateTags.json - */ -async function updateVirtualNetworkTags(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualNetworkName = "test-vnet"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualNetworks.updateTags( - resourceGroupName, - virtualNetworkName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateVirtualNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts deleted file mode 100644 index 7ef486bcc360..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualRouterPeering} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Virtual Router Peering. - * - * @summary Creates or updates the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringPut.json - */ -async function createVirtualRouterPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const parameters: VirtualRouterPeering = { - peerAsn: 20000, - peerIp: "192.168.1.5", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualRouterName, - peeringName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsDeleteSample.ts deleted file mode 100644 index 1cfbf872c4c4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified peering from a Virtual Router. - * - * @summary Deletes the specified peering from a Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringDelete.json - */ -async function deleteVirtualRouterPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.beginDeleteAndWait( - resourceGroupName, - virtualRouterName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsGetSample.ts deleted file mode 100644 index 6a7ec460ae25..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Virtual Router Peering. - * - * @summary Gets the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringGet.json - */ -async function getVirtualRouterPeering(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const peeringName = "peering1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouterPeerings.get( - resourceGroupName, - virtualRouterName, - peeringName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualRouterPeering(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsListSample.ts deleted file mode 100644 index 20d04c4a53f6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualRouterPeeringsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Virtual Router Peerings in a Virtual Router resource. - * - * @summary Lists all Virtual Router Peerings in a Virtual Router resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPeeringList.json - */ -async function listAllVirtualRouterPeeringsForAGivenVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouterPeerings.list( - resourceGroupName, - virtualRouterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllVirtualRouterPeeringsForAGivenVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersCreateOrUpdateSample.ts deleted file mode 100644 index c8033d2324a5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VirtualRouter} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the specified Virtual Router. - * - * @summary Creates or updates the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterPut.json - */ -async function createVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const parameters: VirtualRouter = { - hostedGateway: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vnetGateway", - }, - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualRouterName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersDeleteSample.ts deleted file mode 100644 index 8c67a6ffc916..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Virtual Router. - * - * @summary Deletes the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterDelete.json - */ -async function deleteVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.beginDeleteAndWait( - resourceGroupName, - virtualRouterName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersGetSample.ts deleted file mode 100644 index 5f0603227603..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Virtual Router. - * - * @summary Gets the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterGet.json - */ -async function getVirtualRouter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualRouterName = "virtualRouter"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualRouters.get( - resourceGroupName, - virtualRouterName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualRouter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersListByResourceGroupSample.ts deleted file mode 100644 index ef702806bfc8..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Virtual Routers in a resource group. - * - * @summary Lists all Virtual Routers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterListByResourceGroup.json - */ -async function listAllVirtualRouterForAGivenResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouters.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllVirtualRouterForAGivenResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersListSample.ts deleted file mode 100644 index f6a82bb83010..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualRoutersListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Virtual Routers in a subscription. - * - * @summary Gets all the Virtual Routers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualRouterListBySubscription.json - */ -async function listAllVirtualRoutersForAGivenSubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualRouters.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllVirtualRoutersForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualWansCreateOrUpdateSample.ts deleted file mode 100644 index 59aafdf699d2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansCreateOrUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VirtualWAN} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * - * @summary Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANPut.json - */ -async function virtualWanCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const wANParameters: VirtualWAN = { - typePropertiesType: "Basic", - disableVpnEncryption: false, - location: "West US", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualWANName, - wANParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualWanCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualWansDeleteSample.ts deleted file mode 100644 index 67ff965c4afe..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VirtualWAN. - * - * @summary Deletes a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANDelete.json - */ -async function virtualWanDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "virtualWan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.beginDeleteAndWait( - resourceGroupName, - virtualWANName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualWanDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualWansGetSample.ts deleted file mode 100644 index 6eb7c20bff90..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VirtualWAN. - * - * @summary Retrieves the details of a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANGet.json - */ -async function virtualWanGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.get( - resourceGroupName, - virtualWANName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualWanGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualWansListByResourceGroupSample.ts deleted file mode 100644 index 736fdfd993da..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VirtualWANs in a resource group. - * - * @summary Lists all the VirtualWANs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANListByResourceGroup.json - */ -async function virtualWanListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualWans.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualWanListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualWansListSample.ts deleted file mode 100644 index 855525386f64..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VirtualWANs in a subscription. - * - * @summary Lists all the VirtualWANs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANList.json - */ -async function virtualWanList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualWans.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualWanList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/virtualWansUpdateTagsSample.ts deleted file mode 100644 index f2d605c70d61..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/virtualWansUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a VirtualWAN tags. - * - * @summary Updates a VirtualWAN tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VirtualWANUpdateTags.json - */ -async function virtualWanUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const wANParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.virtualWans.updateTags( - resourceGroupName, - virtualWANName, - wANParameters, - ); - console.log(result); -} - -async function main(): Promise { - await virtualWanUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 52d00d01b587..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VpnConnection} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * - * @summary Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionPut.json - */ -async function vpnConnectionPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const vpnConnectionParameters: VpnConnection = { - remoteVpnSite: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", - }, - routingConfiguration: { - associatedRouteTable: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - inboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1", - }, - outboundRouteMap: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2", - }, - propagatedRouteTables: { - ids: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2", - }, - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3", - }, - ], - labels: ["label1", "label2"], - }, - }, - trafficSelectorPolicies: [], - vpnLinkConnections: [ - { - name: "Connection-Link1", - connectionBandwidth: 200, - sharedKey: "key", - usePolicyBasedTrafficSelectors: false, - vpnConnectionProtocolType: "IKEv2", - vpnLinkConnectionMode: "Default", - vpnSiteLink: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", - }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - connectionName, - vpnConnectionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnConnectionPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsDeleteSample.ts deleted file mode 100644 index cfe113a3eb20..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a vpn connection. - * - * @summary Deletes a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionDelete.json - */ -async function vpnConnectionDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginDeleteAndWait( - resourceGroupName, - gatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnConnectionDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsGetSample.ts deleted file mode 100644 index ce7fed4b1ff2..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a vpn connection. - * - * @summary Retrieves the details of a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionGet.json - */ -async function vpnConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.get( - resourceGroupName, - gatewayName, - connectionName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsListByVpnGatewaySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsListByVpnGatewaySample.ts deleted file mode 100644 index bc97223a7b1d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsListByVpnGatewaySample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all vpn connections for a particular virtual wan vpn gateway. - * - * @summary Retrieves all vpn connections for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionList.json - */ -async function vpnConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnConnections.listByVpnGateway( - resourceGroupName, - gatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsStartPacketCaptureSample.ts deleted file mode 100644 index eff65c4a4f5f..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsStartPacketCaptureSample.ts +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnConnectionPacketCaptureStartParameters, - VpnConnectionsStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. - * - * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVpnConnectionWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters: VpnConnectionPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - linkConnectionNames: ["siteLink1", "siteLink2"], - }; - const options: VpnConnectionsStartPacketCaptureOptionalParams = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. - * - * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStartPacketCapture.json - */ -async function startPacketCaptureOnVpnConnectionWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters: VpnConnectionPacketCaptureStartParameters = { - linkConnectionNames: ["siteLink1", "siteLink2"], - }; - const options: VpnConnectionsStartPacketCaptureOptionalParams = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await startPacketCaptureOnVpnConnectionWithFilter(); - await startPacketCaptureOnVpnConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsStopPacketCaptureSample.ts deleted file mode 100644 index 924d6a46646d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnConnectionsStopPacketCaptureSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnConnectionPacketCaptureStopParameters, - VpnConnectionsStopPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops packet capture on Vpn connection in the specified resource group. - * - * @summary Stops packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnConnectionStopPacketCapture.json - */ -async function startPacketCaptureOnVpnConnectionWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnConnectionName = "vpnConnection1"; - const parameters: VpnConnectionPacketCaptureStopParameters = { - linkConnectionNames: ["vpnSiteLink1", "vpnSiteLink2"], - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const options: VpnConnectionsStopPacketCaptureOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnConnections.beginStopPacketCaptureAndWait( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await startPacketCaptureOnVpnConnectionWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysCreateOrUpdateSample.ts deleted file mode 100644 index a445bf8fc678..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysCreateOrUpdateSample.ts +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VpnGateway} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * - * @summary Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayPut.json - */ -async function vpnGatewayPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnGatewayParameters: VpnGateway = { - bgpSettings: { - asn: 65515, - bgpPeeringAddresses: [ - { - customBgpIpAddresses: ["169.254.21.5"], - ipconfigurationId: "Instance0", - }, - { - customBgpIpAddresses: ["169.254.21.10"], - ipconfigurationId: "Instance1", - }, - ], - peerWeight: 0, - }, - connections: [ - { - name: "vpnConnection1", - remoteVpnSite: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1", - }, - vpnLinkConnections: [ - { - name: "Connection-Link1", - connectionBandwidth: 200, - egressNatRules: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03", - }, - ], - sharedKey: "key", - vpnConnectionProtocolType: "IKEv2", - vpnSiteLink: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1", - }, - }, - ], - }, - ], - enableBgpRouteTranslationForNat: false, - isRoutingPreferenceInternet: false, - location: "westcentralus", - natRules: [ - { - name: "nat03", - typePropertiesType: "Static", - externalMappings: [{ addressSpace: "192.168.0.0/26" }], - internalMappings: [{ addressSpace: "0.0.0.0/26" }], - ipConfigurationId: "", - mode: "EgressSnat", - }, - ], - tags: { key1: "value1" }, - virtualHub: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnGatewayPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysDeleteSample.ts deleted file mode 100644 index c16a9b253c33..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a virtual wan vpn gateway. - * - * @summary Deletes a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayDelete.json - */ -async function vpnGatewayDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginDeleteAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnGatewayDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysGetSample.ts deleted file mode 100644 index a644adaa78f5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysGetSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a virtual wan vpn gateway. - * - * @summary Retrieves the details of a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayGet.json - */ -async function vpnGatewayGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.get(resourceGroupName, gatewayName); - console.log(result); -} - -async function main(): Promise { - await vpnGatewayGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysListByResourceGroupSample.ts deleted file mode 100644 index 69419cee57ba..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VpnGateways in a resource group. - * - * @summary Lists all the VpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayListByResourceGroup.json - */ -async function vpnGatewayListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnGateways.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnGatewayListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysListSample.ts deleted file mode 100644 index a7daf5faefe6..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VpnGateways in a subscription. - * - * @summary Lists all the VpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayList.json - */ -async function vpnGatewayListBySubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnGateways.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnGatewayListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysResetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysResetSample.ts deleted file mode 100644 index 54ed44ab6124..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysResetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the primary of the vpn gateway in the specified resource group. - * - * @summary Resets the primary of the vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayReset.json - */ -async function resetVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginResetAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await resetVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysStartPacketCaptureSample.ts deleted file mode 100644 index 5c96a0c3c9f0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysStartPacketCaptureSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnGatewayPacketCaptureStartParameters, - VpnGatewaysStartPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. - * - * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json - */ -async function startPacketCaptureOnVpnGatewayWithFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const parameters: VpnGatewayPacketCaptureStartParameters = { - filterData: - "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}", - }; - const options: VpnGatewaysStartPacketCaptureOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. - * - * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStartPacketCapture.json - */ -async function startPacketCaptureOnVpnGatewayWithoutFilter(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStartPacketCaptureAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await startPacketCaptureOnVpnGatewayWithFilter(); - await startPacketCaptureOnVpnGatewayWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysStopPacketCaptureSample.ts deleted file mode 100644 index 86d286f9d0dc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysStopPacketCaptureSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnGatewayPacketCaptureStopParameters, - VpnGatewaysStopPacketCaptureOptionalParams} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops packet capture on vpn gateway in the specified resource group. - * - * @summary Stops packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayStopPacketCapture.json - */ -async function stopPacketCaptureOnVpnGateway(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "vpngw"; - const parameters: VpnGatewayPacketCaptureStopParameters = { - sasUrl: - "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D", - }; - const options: VpnGatewaysStopPacketCaptureOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginStopPacketCaptureAndWait( - resourceGroupName, - gatewayName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await stopPacketCaptureOnVpnGateway(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysUpdateTagsSample.ts deleted file mode 100644 index 5e0d6008b25c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnGatewaysUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates virtual wan vpn gateway tags. - * - * @summary Updates virtual wan vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnGatewayUpdateTags.json - */ -async function vpnGatewayUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const vpnGatewayParameters: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnGateways.beginUpdateTagsAndWait( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnGatewayUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts deleted file mode 100644 index 8c90b8c7dd07..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all shared keys of VpnLink connection specified. - * - * @summary Lists all shared keys of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json - */ -async function vpnSiteLinkConnectionSharedKeysGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnLinkConnections.listAllSharedKeys( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnSiteLinkConnectionSharedKeysGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts deleted file mode 100644 index e804c7203bf1..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the shared key of VpnLink connection specified. - * - * @summary Gets the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.getDefaultSharedKey( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteLinkConnectionDefaultSharedKeyGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts deleted file mode 100644 index 9272b1c6e09a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * - * @summary Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json - */ -async function getVpnLinkConnectionIkeSa(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginGetIkeSasAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await getVpnLinkConnectionIkeSa(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts deleted file mode 100644 index 7ab0ef9e5cda..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * - * @summary Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionList.json - */ -async function vpnSiteLinkConnectionList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnLinkConnections.listByVpnConnection( - resourceGroupName, - gatewayName, - connectionName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnSiteLinkConnectionList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts deleted file mode 100644 index 54b2c2521ec9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the value of the shared key of VpnLink connection specified. - * - * @summary Gets the value of the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.listDefaultSharedKey( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteLinkConnectionDefaultSharedKeyList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsResetConnectionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsResetConnectionSample.ts deleted file mode 100644 index 3273375cebab..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsResetConnectionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resets the VpnLink connection specified. - * - * @summary Resets the VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionReset.json - */ -async function resetVpnLinkConnection(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnLinkConnections.beginResetConnectionAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await resetVpnLinkConnection(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts deleted file mode 100644 index 906160d904c4..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConnectionSharedKeyResult} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * - * @summary Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json - */ -async function vpnSiteLinkConnectionDefaultSharedKeyPut(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const connectionSharedKeyParameters: ConnectionSharedKeyResult = { - properties: { sharedKey: "ABCDEF123456" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.vpnLinkConnections.beginSetOrInitDefaultSharedKeyAndWait( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - connectionSharedKeyParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteLinkConnectionDefaultSharedKeyPut(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts deleted file mode 100644 index f14c19df5d42..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * - * @summary Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/GetVirtualWanVpnServerConfigurations.json - */ -async function getVirtualWanVpnServerConfigurations(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.vpnServerConfigurationsAssociatedWithVirtualWan.beginListAndWait( - resourceGroupName, - virtualWANName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualWanVpnServerConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 6dcac82ff879..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VpnServerConfiguration} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * - * @summary Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationPut.json - */ -async function vpnServerConfigurationCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const vpnServerConfigurationParameters: VpnServerConfiguration = { - configurationPolicyGroups: [ - { - name: "policyGroup1", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup1", - isDefault: true, - policyMembers: [ - { - name: "policy1", - attributeType: "RadiusAzureGroupId", - attributeValue: "6ad1bd08", - }, - ], - priority: 0, - }, - { - name: "policyGroup2", - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup2", - isDefault: true, - policyMembers: [ - { - name: "policy2", - attributeType: "CertificateGroupId", - attributeValue: "red.com", - }, - ], - priority: 0, - }, - ], - location: "West US", - radiusClientRootCertificates: [ - { - name: "vpnServerConfigRadiusClientRootCert1", - thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", - }, - ], - radiusServerRootCertificates: [ - { - name: "vpnServerConfigRadiusServerRootCer1", - publicCertData: - "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuM", - }, - ], - radiusServers: [ - { - radiusServerAddress: "10.0.0.0", - radiusServerScore: 25, - radiusServerSecret: "radiusServerSecret", - }, - ], - tags: { key1: "value1" }, - vpnClientIpsecPolicies: [ - { - dhGroup: "DHGroup14", - ikeEncryption: "AES256", - ikeIntegrity: "SHA384", - ipsecEncryption: "AES256", - ipsecIntegrity: "SHA256", - pfsGroup: "PFS14", - saDataSizeKilobytes: 429497, - saLifeTimeSeconds: 86472, - }, - ], - vpnClientRevokedCertificates: [ - { - name: "vpnServerConfigVpnClientRevokedCert1", - thumbprint: "83FFBFC8848B5A5836C94D0112367E16148A286F", - }, - ], - vpnClientRootCertificates: [ - { - name: "vpnServerConfigVpnClientRootCert1", - publicCertData: - "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuN", - }, - ], - vpnProtocols: ["IkeV2"], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = - await client.vpnServerConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnServerConfigurationCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsDeleteSample.ts deleted file mode 100644 index afb20443ab29..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VpnServerConfiguration. - * - * @summary Deletes a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationDelete.json - */ -async function vpnServerConfigurationDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.beginDeleteAndWait( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnServerConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsGetSample.ts deleted file mode 100644 index da8b7d5cc693..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VpnServerConfiguration. - * - * @summary Retrieves the details of a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationGet.json - */ -async function vpnServerConfigurationGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.get( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnServerConfigurationGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts deleted file mode 100644 index d9cb5087ad55..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the vpnServerConfigurations in a resource group. - * - * @summary Lists all the vpnServerConfigurations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationListByResourceGroup.json - */ -async function vpnServerConfigurationListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnServerConfigurations.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnServerConfigurationListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListRadiusSecretsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListRadiusSecretsSample.ts deleted file mode 100644 index e761584ff8a5..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListRadiusSecretsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all Radius servers with respective radius secrets from VpnServerConfiguration. - * - * @summary List all Radius servers with respective radius secrets from VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AllVpnServerConfigurationRadiusServerSecretsList.json - */ -async function listAllVpnServerConfigurationRadiusServerSecrets(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "72f988bf-86f1-41af-91ab-2d7cd0dddd4"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnserverconfig"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.listRadiusSecrets( - resourceGroupName, - vpnServerConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await listAllVpnServerConfigurationRadiusServerSecrets(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListSample.ts deleted file mode 100644 index 7d297bd65205..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VpnServerConfigurations in a subscription. - * - * @summary Lists all the VpnServerConfigurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationList.json - */ -async function vpnServerConfigurationList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnServerConfigurations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnServerConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts deleted file mode 100644 index 9456f3bd618c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates VpnServerConfiguration tags. - * - * @summary Updates VpnServerConfiguration tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnServerConfigurationUpdateTags.json - */ -async function vpnServerConfigurationUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnServerConfigurationName = "vpnServerConfiguration1"; - const vpnServerConfigurationParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnServerConfigurations.updateTags( - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnServerConfigurationUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinkConnectionsGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinkConnectionsGetSample.ts deleted file mode 100644 index 4545c0aaa74d..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinkConnectionsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a vpn site link connection. - * - * @summary Retrieves the details of a vpn site link connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkConnectionGet.json - */ -async function vpnSiteLinkConnectionGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "gateway1"; - const connectionName = "vpnConnection1"; - const linkConnectionName = "Connection-Link1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSiteLinkConnections.get( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteLinkConnectionGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinksGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinksGetSample.ts deleted file mode 100644 index 403ce643e034..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinksGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VPN site link. - * - * @summary Retrieves the details of a VPN site link. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkGet.json - */ -async function vpnSiteGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteLinkName = "vpnSiteLink1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSiteLinks.get( - resourceGroupName, - vpnSiteName, - vpnSiteLinkName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinksListByVpnSiteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinksListByVpnSiteSample.ts deleted file mode 100644 index 6f7258069907..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnSiteLinksListByVpnSiteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the vpnSiteLinks in a resource group for a vpn site. - * - * @summary Lists all the vpnSiteLinks in a resource group for a vpn site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteLinkListByVpnSite.json - */ -async function vpnSiteLinkListByVpnSite(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSiteLinks.listByVpnSite( - resourceGroupName, - vpnSiteName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnSiteLinkListByVpnSite(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesConfigurationDownloadSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesConfigurationDownloadSample.ts deleted file mode 100644 index 4b149100326e..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesConfigurationDownloadSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - GetVpnSitesConfigurationRequest} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gives the sas-url to download the configurations for vpn-sites in a resource group. - * - * @summary Gives the sas-url to download the configurations for vpn-sites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSitesConfigurationDownload.json - */ -async function vpnSitesConfigurationDownload(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const virtualWANName = "wan1"; - const request: GetVpnSitesConfigurationRequest = { - outputBlobSasUrl: - "https://blobcortextesturl.blob.core.windows.net/folderforconfig/vpnFile?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - vpnSites: [ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/abc", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSitesConfiguration.beginDownloadAndWait( - resourceGroupName, - virtualWANName, - request, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSitesConfigurationDownload(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesCreateOrUpdateSample.ts deleted file mode 100644 index 28f31e7f04e9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesCreateOrUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VpnSite} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * - * @summary Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSitePut.json - */ -async function vpnSiteCreate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteParameters: VpnSite = { - addressSpace: { addressPrefixes: ["10.0.0.0/16"] }, - isSecuritySite: false, - location: "West US", - o365Policy: { - breakOutCategories: { default: false, allow: true, optimize: true }, - }, - tags: { key1: "value1" }, - virtualWan: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1", - }, - vpnSiteLinks: [ - { - name: "vpnSiteLink1", - bgpProperties: { asn: 1234, bgpPeeringAddress: "192.168.0.0" }, - fqdn: "link1.vpnsite1.contoso.com", - ipAddress: "50.50.50.56", - linkProperties: { linkProviderName: "vendor1", linkSpeedInMbps: 0 }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.beginCreateOrUpdateAndWait( - resourceGroupName, - vpnSiteName, - vpnSiteParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteCreate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesDeleteSample.ts deleted file mode 100644 index bd87bdb8b55a..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a VpnSite. - * - * @summary Deletes a VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteDelete.json - */ -async function vpnSiteDelete(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.beginDeleteAndWait( - resourceGroupName, - vpnSiteName, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteDelete(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesGetSample.ts deleted file mode 100644 index f8347c5b68f0..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesGetSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves the details of a VPN site. - * - * @summary Retrieves the details of a VPN site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteGet.json - */ -async function vpnSiteGet(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.get(resourceGroupName, vpnSiteName); - console.log(result); -} - -async function main(): Promise { - await vpnSiteGet(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesListByResourceGroupSample.ts deleted file mode 100644 index 182c7cad2cfc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the vpnSites in a resource group. - * - * @summary Lists all the vpnSites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteListByResourceGroup.json - */ -async function vpnSiteListByResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSites.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnSiteListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesListSample.ts deleted file mode 100644 index 71d83b52eadc..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the VpnSites in a subscription. - * - * @summary Lists all the VpnSites in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteList.json - */ -async function vpnSiteList(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vpnSites.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vpnSiteList(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesUpdateTagsSample.ts deleted file mode 100644 index 1119152ff8a3..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/vpnSitesUpdateTagsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TagsObject} from "@azure/arm-network"; -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates VpnSite tags. - * - * @summary Updates VpnSite tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/VpnSiteUpdateTags.json - */ -async function vpnSiteUpdate(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const vpnSiteName = "vpnSite1"; - const vpnSiteParameters: TagsObject = { - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.vpnSites.updateTags( - resourceGroupName, - vpnSiteName, - vpnSiteParameters, - ); - console.log(result); -} - -async function main(): Promise { - await vpnSiteUpdate(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index 4f7fb2c953ae..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - WebApplicationFirewallPolicy} from "@azure/arm-network"; -import { - NetworkManagementClient, -} from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or update policy with specified rule set name within a resource group. - * - * @summary Creates or update policy with specified rule set name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyCreateOrUpdate.json - */ -async function createsOrUpdatesAWafPolicyWithinAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const parameters: WebApplicationFirewallPolicy = { - customRules: [ - { - name: "Rule1", - action: "Block", - matchConditions: [ - { - matchValues: ["192.168.1.0/24", "10.0.0.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], - operator: "IPMatch", - }, - ], - priority: 1, - ruleType: "MatchRule", - }, - { - name: "Rule2", - action: "Block", - matchConditions: [ - { - matchValues: ["192.168.1.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], - operator: "IPMatch", - }, - { - matchValues: ["Windows"], - matchVariables: [ - { selector: "UserAgent", variableName: "RequestHeaders" }, - ], - operator: "Contains", - }, - ], - priority: 2, - ruleType: "MatchRule", - }, - { - name: "RateLimitRule3", - action: "Block", - groupByUserSession: [ - { groupByVariables: [{ variableName: "ClientAddr" }] }, - ], - matchConditions: [ - { - matchValues: ["192.168.1.0/24", "10.0.0.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], - negationConditon: true, - operator: "IPMatch", - }, - ], - priority: 3, - rateLimitDuration: "OneMin", - rateLimitThreshold: 10, - ruleType: "RateLimitRule", - }, - { - name: "Rule4", - action: "JSChallenge", - matchConditions: [ - { - matchValues: ["192.168.1.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], - operator: "IPMatch", - }, - { - matchValues: ["Bot"], - matchVariables: [ - { selector: "UserAgent", variableName: "RequestHeaders" }, - ], - operator: "Contains", - }, - ], - priority: 4, - ruleType: "MatchRule", - }, - { - name: "Rule5", - action: "CAPTCHA", - matchConditions: [ - { - matchValues: ["192.168.2.0/24"], - matchVariables: [ - { selector: undefined, variableName: "RemoteAddr" }, - ], - negationConditon: false, - operator: "IPMatch", - }, - { - matchValues: ["Bot"], - matchVariables: [ - { selector: "UserAgent", variableName: "RequestHeaders" }, - ], - negationConditon: false, - operator: "Contains", - }, - ], - priority: 5, - ruleType: "MatchRule", - state: "Enabled", - }, - ], - location: "WestUs", - managedRules: { - exclusions: [ - { - exclusionManagedRuleSets: [ - { - ruleGroups: [ - { - ruleGroupName: "REQUEST-930-APPLICATION-ATTACK-LFI", - rules: [{ ruleId: "930120" }], - }, - { ruleGroupName: "REQUEST-932-APPLICATION-ATTACK-RCE" }, - ], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - ], - matchVariable: "RequestArgNames", - selector: "hello", - selectorMatchOperator: "StartsWith", - }, - { - exclusionManagedRuleSets: [ - { ruleGroups: [], ruleSetType: "OWASP", ruleSetVersion: "3.1" }, - ], - matchVariable: "RequestArgNames", - selector: "hello", - selectorMatchOperator: "EndsWith", - }, - { - matchVariable: "RequestArgNames", - selector: "test", - selectorMatchOperator: "StartsWith", - }, - { - matchVariable: "RequestArgValues", - selector: "test", - selectorMatchOperator: "StartsWith", - }, - ], - managedRuleSets: [ - { - ruleGroupOverrides: [ - { - ruleGroupName: "REQUEST-931-APPLICATION-ATTACK-RFI", - rules: [ - { action: "Log", ruleId: "931120", state: "Enabled" }, - { - action: "AnomalyScoring", - ruleId: "931130", - state: "Disabled", - }, - ], - }, - ], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - { - ruleGroupOverrides: [ - { - ruleGroupName: "UnknownBots", - rules: [ - { action: "JSChallenge", ruleId: "300700", state: "Enabled" }, - { action: "CAPTCHA", ruleId: "300600", state: "Enabled" }, - ], - }, - ], - ruleSetType: "Microsoft_BotManagerRuleSet", - ruleSetVersion: "1.0", - }, - { - ruleGroupOverrides: [ - { - ruleGroupName: "ExcessiveRequests", - rules: [ - { - action: "Block", - ruleId: "500100", - sensitivity: "High", - state: "Enabled", - }, - ], - }, - ], - ruleSetType: "Microsoft_HTTPDDoSRuleSet", - ruleSetVersion: "1.0", - }, - ], - exceptions: [ - { - exceptionManagedRuleSets: [ - { ruleSetType: "OWASP", ruleSetVersion: "3.2" }, - ], - matchVariable: "RequestURI", - valueMatchOperator: "Contains", - values: ["health", "account/images", "default.aspx"], - }, - { - exceptionManagedRuleSets: [ - { - ruleGroups: [ - { ruleGroupName: "REQUEST-932-APPLICATION-ATTACK-RCE" }, - ], - ruleSetType: "OWASP", - ruleSetVersion: "3.2", - }, - ], - matchVariable: "RequestHeader", - selector: "User-Agent", - selectorMatchOperator: "StartsWith", - valueMatchOperator: "Contains", - values: ["Mozilla/5.0", "Chrome/122.0.0.0"], - }, - { - exceptionManagedRuleSets: [ - { - ruleGroups: [ - { ruleGroupName: "BadBots", rules: [{ ruleId: "100100" }] }, - ], - ruleSetType: "Microsoft_BotManagerRuleSet", - ruleSetVersion: "1.0", - }, - ], - matchVariable: "RemoteAddr", - valueMatchOperator: "IPMatch", - values: ["1.2.3.4", "10.0.0.1/6"], - }, - ], - }, - policySettings: { - captchaCookieExpirationInMins: 100, - jsChallengeCookieExpirationInMins: 100, - logScrubbing: { - scrubbingRules: [ - { - matchVariable: "RequestArgNames", - selector: "test", - selectorMatchOperator: "Equals", - state: "Enabled", - }, - { - matchVariable: "RequestIPAddress", - selectorMatchOperator: "EqualsAny", - state: "Enabled", - }, - ], - state: "Enabled", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.createOrUpdate( - resourceGroupName, - policyName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await createsOrUpdatesAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts deleted file mode 100644 index e35249672931..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes Policy. - * - * @summary Deletes Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyDelete.json - */ -async function deletesAWafPolicyWithinAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.beginDeleteAndWait( - resourceGroupName, - policyName, - ); - console.log(result); -} - -async function main(): Promise { - await deletesAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesGetSample.ts deleted file mode 100644 index 1c7a927883ed..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieve protection policy with specified name within a resource group. - * - * @summary Retrieve protection policy with specified name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafPolicyGet.json - */ -async function getsAWafPolicyWithinAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const policyName = "Policy1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webApplicationFirewallPolicies.get( - resourceGroupName, - policyName, - ); - console.log(result); -} - -async function main(): Promise { - await getsAWafPolicyWithinAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesListAllSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesListAllSample.ts deleted file mode 100644 index 0f42e6fed32c..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesListAllSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the WAF policies in a subscription. - * - * @summary Gets all the WAF policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafListAllPolicies.json - */ -async function listsAllWafPoliciesInASubscription(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webApplicationFirewallPolicies.listAll()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllWafPoliciesInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesListSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesListSample.ts deleted file mode 100644 index 248dc7dd51ec..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/webApplicationFirewallPoliciesListSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all of the protection policies within a resource group. - * - * @summary Lists all of the protection policies within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/WafListPolicies.json - */ -async function listsAllWafPoliciesInAResourceGroup(): Promise { - const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webApplicationFirewallPolicies.list( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllWafPoliciesInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/webCategoriesGetSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/webCategoriesGetSample.ts deleted file mode 100644 index 9d1cb381c2d9..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/webCategoriesGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Azure Web Category. - * - * @summary Gets the specified Azure Web Category. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureWebCategoryGet.json - */ -async function getAzureWebCategoryByName(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "4de8428a-4a92-4cea-90ff-b47128b8cab8"; - const name = "Arts"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const result = await client.webCategories.get(name); - console.log(result); -} - -async function main(): Promise { - await getAzureWebCategoryByName(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/src/webCategoriesListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v36/typescript/src/webCategoriesListBySubscriptionSample.ts deleted file mode 100644 index beec38269f13..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/src/webCategoriesListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkManagementClient } from "@azure/arm-network"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all the Azure Web Categories in a subscription. - * - * @summary Gets all the Azure Web Categories in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/Network/stable/2025-05-01/examples/AzureWebCategoriesListBySubscription.json - */ -async function listAllAzureWebCategoriesForAGivenSubscription(): Promise { - const subscriptionId = - process.env["NETWORK_SUBSCRIPTION_ID"] || - "4de8428a-4a92-4cea-90ff-b47128b8cab8"; - const credential = new DefaultAzureCredential(); - const client = new NetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.webCategories.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listAllAzureWebCategoriesForAGivenSubscription(); -} - -main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v36/typescript/tsconfig.json b/sdk/network/arm-network/samples/v36/typescript/tsconfig.json deleted file mode 100644 index 400db87cf648..000000000000 --- a/sdk/network/arm-network/samples/v36/typescript/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2023", - "module": "commonjs", - "lib": [], - "importHelpers": true, - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "node10", - "esModuleInterop": true, - "outDir": "./dist", - "resolveJsonModule": true - }, - "include": [ - "./src" - ] -} diff --git a/sdk/network/arm-network/src/api/adminRuleCollections/index.ts b/sdk/network/arm-network/src/api/adminRuleCollections/index.ts new file mode 100644 index 000000000000..1c5ec1047ea6 --- /dev/null +++ b/sdk/network/arm-network/src/api/adminRuleCollections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + AdminRuleCollectionsListOptionalParams, + AdminRuleCollectionsDeleteOptionalParams, + AdminRuleCollectionsCreateOrUpdateOptionalParams, + AdminRuleCollectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/adminRuleCollections/operations.ts b/sdk/network/arm-network/src/api/adminRuleCollections/operations.ts new file mode 100644 index 000000000000..067418afe10e --- /dev/null +++ b/sdk/network/arm-network/src/api/adminRuleCollections/operations.ts @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + commonErrorResponseDeserializer, + AdminRuleCollection, + adminRuleCollectionSerializer, + adminRuleCollectionDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _AdminRuleCollectionListResult, + _adminRuleCollectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + AdminRuleCollectionsListOptionalParams, + AdminRuleCollectionsDeleteOptionalParams, + AdminRuleCollectionsCreateOrUpdateOptionalParams, + AdminRuleCollectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: AdminRuleCollectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_AdminRuleCollectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return _adminRuleCollectionListResultDeserializer(result.body); +} + +/** Lists all the rule collections in a security admin configuration, in a paginated format. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: AdminRuleCollectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, configurationName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: AdminRuleCollectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes an admin rule collection. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: AdminRuleCollectionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleCollection: AdminRuleCollection, + options: AdminRuleCollectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: adminRuleCollectionSerializer(ruleCollection), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return adminRuleCollectionDeserializer(result.body); +} + +/** Creates or updates an admin rule collection. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleCollection: AdminRuleCollection, + options: AdminRuleCollectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleCollection, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: AdminRuleCollectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return adminRuleCollectionDeserializer(result.body); +} + +/** Gets a network manager security admin configuration rule collection. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: AdminRuleCollectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/adminRuleCollections/options.ts b/sdk/network/arm-network/src/api/adminRuleCollections/options.ts new file mode 100644 index 000000000000..f118efb4db22 --- /dev/null +++ b/sdk/network/arm-network/src/api/adminRuleCollections/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AdminRuleCollectionsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface AdminRuleCollectionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface AdminRuleCollectionsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AdminRuleCollectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/adminRules/index.ts b/sdk/network/arm-network/src/api/adminRules/index.ts new file mode 100644 index 000000000000..83906f7be8ce --- /dev/null +++ b/sdk/network/arm-network/src/api/adminRules/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + AdminRulesListOptionalParams, + AdminRulesDeleteOptionalParams, + AdminRulesCreateOrUpdateOptionalParams, + AdminRulesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/adminRules/operations.ts b/sdk/network/arm-network/src/api/adminRules/operations.ts new file mode 100644 index 000000000000..bbe5ea209a92 --- /dev/null +++ b/sdk/network/arm-network/src/api/adminRules/operations.ts @@ -0,0 +1,304 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + commonErrorResponseDeserializer, + baseAdminRuleUnionSerializer, + baseAdminRuleUnionDeserializer, + BaseAdminRuleUnion, + _AdminRuleListResult, + _adminRuleListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + AdminRulesListOptionalParams, + AdminRulesDeleteOptionalParams, + AdminRulesCreateOrUpdateOptionalParams, + AdminRulesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: AdminRulesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_AdminRuleListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return _adminRuleListResultDeserializer(result.body); +} + +/** List all network manager security configuration admin rules. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: AdminRulesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: AdminRulesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes an admin rule. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: AdminRulesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + adminRule: BaseAdminRuleUnion, + options: AdminRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: baseAdminRuleUnionSerializer(adminRule), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return baseAdminRuleUnionDeserializer(result.body); +} + +/** Creates or updates an admin rule. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + adminRule: BaseAdminRuleUnion, + options: AdminRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + adminRule, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: AdminRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return baseAdminRuleUnionDeserializer(result.body); +} + +/** Gets a network manager security configuration admin rule. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: AdminRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/adminRules/options.ts b/sdk/network/arm-network/src/api/adminRules/options.ts new file mode 100644 index 000000000000..bf3332449beb --- /dev/null +++ b/sdk/network/arm-network/src/api/adminRules/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AdminRulesListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface AdminRulesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface AdminRulesCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AdminRulesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/index.ts b/sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/index.ts new file mode 100644 index 000000000000..43c51cf22164 --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, update, get } from "./operations.js"; +export type { + ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/operations.ts b/sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/operations.ts new file mode 100644 index 000000000000..3869f627fc66 --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/operations.ts @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ApplicationGatewayPrivateEndpointConnection, + applicationGatewayPrivateEndpointConnectionSerializer, + applicationGatewayPrivateEndpointConnectionDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _ApplicationGatewayPrivateEndpointConnectionListResult, + _applicationGatewayPrivateEndpointConnectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewayPrivateEndpointConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ApplicationGatewayPrivateEndpointConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _applicationGatewayPrivateEndpointConnectionListResultDeserializer(result.body); +} + +/** Lists all private endpoint connections on an application gateway. */ +export function list( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewayPrivateEndpointConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, applicationGatewayName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified private endpoint connection on application gateway. */ +export function $delete( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, applicationGatewayName, connectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + parameters: ApplicationGatewayPrivateEndpointConnection, + options: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: applicationGatewayPrivateEndpointConnectionSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationGatewayPrivateEndpointConnectionDeserializer(result.body); +} + +/** Updates the specified private endpoint connection on application gateway. */ +export function update( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + parameters: ApplicationGatewayPrivateEndpointConnection, + options: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + ApplicationGatewayPrivateEndpointConnection +> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + applicationGatewayName, + connectionName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ApplicationGatewayPrivateEndpointConnection + >; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options: ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationGatewayPrivateEndpointConnectionDeserializer(result.body); +} + +/** Gets the specified private endpoint connection on application gateway. */ +export async function get( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options: ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + applicationGatewayName, + connectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/options.ts b/sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/options.ts new file mode 100644 index 000000000000..cbbe90965857 --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayPrivateEndpointConnections/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApplicationGatewayPrivateEndpointConnectionsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/index.ts b/sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/index.ts new file mode 100644 index 000000000000..ce65efedf1bd --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ApplicationGatewayPrivateLinkResourcesListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/operations.ts b/sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/operations.ts new file mode 100644 index 000000000000..fcae44b5a812 --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/operations.ts @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { ApplicationGatewayPrivateLinkResource } from "../../models/microsoft/network/models.js"; +import { + _ApplicationGatewayPrivateLinkResourceListResult, + _applicationGatewayPrivateLinkResourceListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApplicationGatewayPrivateLinkResourcesListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewayPrivateLinkResourcesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateLinkResources{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ApplicationGatewayPrivateLinkResourceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _applicationGatewayPrivateLinkResourceListResultDeserializer(result.body); +} + +/** Lists all private link resources on an application gateway. */ +export function list( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewayPrivateLinkResourcesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, applicationGatewayName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/options.ts b/sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/options.ts new file mode 100644 index 000000000000..b85668f5c451 --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayPrivateLinkResources/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApplicationGatewayPrivateLinkResourcesListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/index.ts b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/index.ts new file mode 100644 index 000000000000..c0e13a9a1ebc --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ApplicationGatewayWafDynamicManifestsListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/operations.ts b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/operations.ts new file mode 100644 index 000000000000..1631f55769e6 --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/operations.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ApplicationGatewayWafDynamicManifestResult, + _ApplicationGatewayWafDynamicManifestResultList, + _applicationGatewayWafDynamicManifestResultListDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApplicationGatewayWafDynamicManifestsListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + location: string, + options: ApplicationGatewayWafDynamicManifestsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ApplicationGatewayWafDynamicManifestResultList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _applicationGatewayWafDynamicManifestResultListDeserializer(result.body); +} + +/** Gets the regional application gateway waf manifest. */ +export function list( + context: Client, + location: string, + options: ApplicationGatewayWafDynamicManifestsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, location, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/options.ts b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/options.ts new file mode 100644 index 000000000000..334d7f2d97f1 --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifests/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApplicationGatewayWafDynamicManifestsListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/index.ts b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/index.ts new file mode 100644 index 000000000000..793b3c23f37a --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get } from "./operations.js"; +export type { ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/operations.ts b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/operations.ts new file mode 100644 index 000000000000..55993fc77120 --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/operations.ts @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ApplicationGatewayWafDynamicManifestResult, + applicationGatewayWafDynamicManifestResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + location: string, + options: ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests/dafault{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationGatewayWafDynamicManifestResultDeserializer(result.body); +} + +/** Gets the regional application gateway waf manifest. */ +export async function get( + context: Client, + location: string, + options: ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, location, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/options.ts b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/options.ts new file mode 100644 index 000000000000..955157505c2e --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGatewayWafDynamicManifestsDefault/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/applicationGateways/index.ts b/sdk/network/arm-network/src/api/applicationGateways/index.ts new file mode 100644 index 000000000000..6dc28b5ffead --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGateways/index.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listAvailableWafRuleSets, + listAvailableResponseHeaders, + listAvailableRequestHeaders, + listAvailableServerVariables, + getSslPredefinedPolicy, + listAvailableSslPredefinedPolicies, + listAvailableSslOptions, + backendHealthOnDemand, + backendHealth, + stop, + start, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + ApplicationGatewaysListAvailableWafRuleSetsOptionalParams, + ApplicationGatewaysListAvailableResponseHeadersOptionalParams, + ApplicationGatewaysListAvailableRequestHeadersOptionalParams, + ApplicationGatewaysListAvailableServerVariablesOptionalParams, + ApplicationGatewaysGetSslPredefinedPolicyOptionalParams, + ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, + ApplicationGatewaysListAvailableSslOptionsOptionalParams, + ApplicationGatewaysBackendHealthOnDemandOptionalParams, + ApplicationGatewaysBackendHealthOptionalParams, + ApplicationGatewaysStopOptionalParams, + ApplicationGatewaysStartOptionalParams, + ApplicationGatewaysListAllOptionalParams, + ApplicationGatewaysListOptionalParams, + ApplicationGatewaysDeleteOptionalParams, + ApplicationGatewaysUpdateTagsOptionalParams, + ApplicationGatewaysCreateOrUpdateOptionalParams, + ApplicationGatewaysGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/applicationGateways/operations.ts b/sdk/network/arm-network/src/api/applicationGateways/operations.ts new file mode 100644 index 000000000000..86a18bb4f784 --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGateways/operations.ts @@ -0,0 +1,936 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ApplicationGateway, + applicationGatewaySerializer, + applicationGatewayDeserializer, + TagsObject, + tagsObjectSerializer, + ApplicationGatewayBackendHealth, + applicationGatewayBackendHealthDeserializer, + ApplicationGatewayOnDemandProbe, + applicationGatewayOnDemandProbeSerializer, + ApplicationGatewayBackendHealthOnDemand, + applicationGatewayBackendHealthOnDemandDeserializer, + ApplicationGatewayAvailableSslOptions, + applicationGatewayAvailableSslOptionsDeserializer, + _ApplicationGatewayAvailableSslPredefinedPolicies, + _applicationGatewayAvailableSslPredefinedPoliciesDeserializer, + ApplicationGatewaySslPredefinedPolicy, + applicationGatewaySslPredefinedPolicyDeserializer, + errorDeserializer, + ApplicationGatewayAvailableWafRuleSetsResult, + applicationGatewayAvailableWafRuleSetsResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _ApplicationGatewayListResult, + _applicationGatewayListResultDeserializer, + ApplicationGatewaysListAvailableResponseHeadersResponse, + ApplicationGatewaysListAvailableRequestHeadersResponse, + ApplicationGatewaysListAvailableServerVariablesResponse, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApplicationGatewaysListAvailableWafRuleSetsOptionalParams, + ApplicationGatewaysListAvailableResponseHeadersOptionalParams, + ApplicationGatewaysListAvailableRequestHeadersOptionalParams, + ApplicationGatewaysListAvailableServerVariablesOptionalParams, + ApplicationGatewaysGetSslPredefinedPolicyOptionalParams, + ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, + ApplicationGatewaysListAvailableSslOptionsOptionalParams, + ApplicationGatewaysBackendHealthOnDemandOptionalParams, + ApplicationGatewaysBackendHealthOptionalParams, + ApplicationGatewaysStopOptionalParams, + ApplicationGatewaysStartOptionalParams, + ApplicationGatewaysListAllOptionalParams, + ApplicationGatewaysListOptionalParams, + ApplicationGatewaysDeleteOptionalParams, + ApplicationGatewaysUpdateTagsOptionalParams, + ApplicationGatewaysCreateOrUpdateOptionalParams, + ApplicationGatewaysGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAvailableWafRuleSetsSend( + context: Client, + options: ApplicationGatewaysListAvailableWafRuleSetsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAvailableWafRuleSetsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationGatewayAvailableWafRuleSetsResultDeserializer(result.body); +} + +/** Lists all available web application firewall rule sets. */ +export async function listAvailableWafRuleSets( + context: Client, + options: ApplicationGatewaysListAvailableWafRuleSetsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listAvailableWafRuleSetsSend(context, options); + return _listAvailableWafRuleSetsDeserialize(result); +} + +export function _listAvailableResponseHeadersSend( + context: Client, + options: ApplicationGatewaysListAvailableResponseHeadersOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAvailableResponseHeadersDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return { + body: result.body.map((p: any) => { + return p; + }), + }; +} + +/** Lists all available response headers. */ +export async function listAvailableResponseHeaders( + context: Client, + options: ApplicationGatewaysListAvailableResponseHeadersOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listAvailableResponseHeadersSend(context, options); + return _listAvailableResponseHeadersDeserialize(result); +} + +export function _listAvailableRequestHeadersSend( + context: Client, + options: ApplicationGatewaysListAvailableRequestHeadersOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAvailableRequestHeadersDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return { + body: result.body.map((p: any) => { + return p; + }), + }; +} + +/** Lists all available request headers. */ +export async function listAvailableRequestHeaders( + context: Client, + options: ApplicationGatewaysListAvailableRequestHeadersOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listAvailableRequestHeadersSend(context, options); + return _listAvailableRequestHeadersDeserialize(result); +} + +export function _listAvailableServerVariablesSend( + context: Client, + options: ApplicationGatewaysListAvailableServerVariablesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAvailableServerVariablesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return { + body: result.body.map((p: any) => { + return p; + }), + }; +} + +/** Lists all available server variables. */ +export async function listAvailableServerVariables( + context: Client, + options: ApplicationGatewaysListAvailableServerVariablesOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listAvailableServerVariablesSend(context, options); + return _listAvailableServerVariablesDeserialize(result); +} + +export function _getSslPredefinedPolicySend( + context: Client, + predefinedPolicyName: string, + options: ApplicationGatewaysGetSslPredefinedPolicyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + predefinedPolicyName: predefinedPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getSslPredefinedPolicyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationGatewaySslPredefinedPolicyDeserializer(result.body); +} + +/** Gets Ssl predefined policy with the specified policy name. */ +export async function getSslPredefinedPolicy( + context: Client, + predefinedPolicyName: string, + options: ApplicationGatewaysGetSslPredefinedPolicyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSslPredefinedPolicySend(context, predefinedPolicyName, options); + return _getSslPredefinedPolicyDeserialize(result); +} + +export function _listAvailableSslPredefinedPoliciesSend( + context: Client, + options: ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAvailableSslPredefinedPoliciesDeserialize( + result: PathUncheckedResponse, +): Promise<_ApplicationGatewayAvailableSslPredefinedPolicies> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _applicationGatewayAvailableSslPredefinedPoliciesDeserializer(result.body); +} + +/** Lists all SSL predefined policies for configuring Ssl policy. */ +export function listAvailableSslPredefinedPolicies( + context: Client, + options: ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAvailableSslPredefinedPoliciesSend(context, options), + _listAvailableSslPredefinedPoliciesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listAvailableSslOptionsSend( + context: Client, + options: ApplicationGatewaysListAvailableSslOptionsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAvailableSslOptionsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationGatewayAvailableSslOptionsDeserializer(result.body); +} + +/** Lists available Ssl options for configuring Ssl policy. */ +export async function listAvailableSslOptions( + context: Client, + options: ApplicationGatewaysListAvailableSslOptionsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listAvailableSslOptionsSend(context, options); + return _listAvailableSslOptionsDeserialize(result); +} + +export function _backendHealthOnDemandSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + probeRequest: ApplicationGatewayOnDemandProbe, + options: ApplicationGatewaysBackendHealthOnDemandOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: applicationGatewayOnDemandProbeSerializer(probeRequest), + }); +} + +export async function _backendHealthOnDemandDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationGatewayBackendHealthOnDemandDeserializer(result.body); +} + +/** Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. */ +export function backendHealthOnDemand( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + probeRequest: ApplicationGatewayOnDemandProbe, + options: ApplicationGatewaysBackendHealthOnDemandOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ApplicationGatewayBackendHealthOnDemand +> { + return getLongRunningPoller(context, _backendHealthOnDemandDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _backendHealthOnDemandSend( + context, + resourceGroupName, + applicationGatewayName, + probeRequest, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ApplicationGatewayBackendHealthOnDemand + >; +} + +export function _backendHealthSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewaysBackendHealthOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _backendHealthDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationGatewayBackendHealthDeserializer(result.body); +} + +/** Gets the backend health of the specified application gateway in a resource group. */ +export function backendHealth( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewaysBackendHealthOptionalParams = { requestOptions: {} }, +): PollerLike, ApplicationGatewayBackendHealth> { + return getLongRunningPoller(context, _backendHealthDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _backendHealthSend(context, resourceGroupName, applicationGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ApplicationGatewayBackendHealth + >; +} + +export function _stopSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewaysStopOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _stopDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Stops the specified application gateway in a resource group. */ +export function stop( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewaysStopOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _stopDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopSend(context, resourceGroupName, applicationGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _startSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewaysStartOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _startDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Starts the specified application gateway. */ +export function start( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewaysStartOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _startDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startSend(context, resourceGroupName, applicationGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _listAllSend( + context: Client, + options: ApplicationGatewaysListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_ApplicationGatewayListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _applicationGatewayListResultDeserializer(result.body); +} + +/** Gets all the application gateways in a subscription. */ +export function listAll( + context: Client, + options: ApplicationGatewaysListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: ApplicationGatewaysListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ApplicationGatewayListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _applicationGatewayListResultDeserializer(result.body); +} + +/** Lists all application gateways in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: ApplicationGatewaysListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewaysDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified application gateway. */ +export function $delete( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewaysDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, applicationGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + parameters: TagsObject, + options: ApplicationGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationGatewayDeserializer(result.body); +} + +/** Updates the specified application gateway tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + parameters: TagsObject, + options: ApplicationGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + applicationGatewayName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + parameters: ApplicationGateway, + options: ApplicationGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: applicationGatewaySerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationGatewayDeserializer(result.body); +} + +/** Creates or updates the specified application gateway. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + parameters: ApplicationGateway, + options: ApplicationGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ApplicationGateway> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, applicationGatewayName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ApplicationGateway>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewaysGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationGatewayName: applicationGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationGatewayDeserializer(result.body); +} + +/** Gets the specified application gateway. */ +export async function get( + context: Client, + resourceGroupName: string, + applicationGatewayName: string, + options: ApplicationGatewaysGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, applicationGatewayName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/applicationGateways/options.ts b/sdk/network/arm-network/src/api/applicationGateways/options.ts new file mode 100644 index 000000000000..a95d782a9fea --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationGateways/options.ts @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApplicationGatewaysListAvailableWafRuleSetsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGatewaysListAvailableResponseHeadersOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGatewaysListAvailableRequestHeadersOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGatewaysListAvailableServerVariablesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGatewaysGetSslPredefinedPolicyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGatewaysListAvailableSslOptionsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGatewaysBackendHealthOnDemandOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Expands BackendAddressPool and BackendHttpSettings referenced in backend health. */ + expand?: string; +} + +/** Optional parameters. */ +export interface ApplicationGatewaysBackendHealthOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Expands BackendAddressPool and BackendHttpSettings referenced in backend health. */ + expand?: string; +} + +/** Optional parameters. */ +export interface ApplicationGatewaysStopOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationGatewaysStartOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationGatewaysListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGatewaysListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGatewaysDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationGatewaysUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGatewaysCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationGatewaysGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/applicationSecurityGroups/index.ts b/sdk/network/arm-network/src/api/applicationSecurityGroups/index.ts new file mode 100644 index 000000000000..3c1b4e407d2d --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationSecurityGroups/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + ApplicationSecurityGroupsListAllOptionalParams, + ApplicationSecurityGroupsListOptionalParams, + ApplicationSecurityGroupsDeleteOptionalParams, + ApplicationSecurityGroupsUpdateTagsOptionalParams, + ApplicationSecurityGroupsCreateOrUpdateOptionalParams, + ApplicationSecurityGroupsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/applicationSecurityGroups/operations.ts b/sdk/network/arm-network/src/api/applicationSecurityGroups/operations.ts new file mode 100644 index 000000000000..c4f0b12eff47 --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationSecurityGroups/operations.ts @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + ApplicationSecurityGroup, + applicationSecurityGroupSerializer, + applicationSecurityGroupDeserializer, +} from "../../models/common/models.js"; +import { TagsObject, tagsObjectSerializer } from "../../models/microsoft/network/models.js"; +import { + _ApplicationSecurityGroupListResult, + _applicationSecurityGroupListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApplicationSecurityGroupsListAllOptionalParams, + ApplicationSecurityGroupsListOptionalParams, + ApplicationSecurityGroupsDeleteOptionalParams, + ApplicationSecurityGroupsUpdateTagsOptionalParams, + ApplicationSecurityGroupsCreateOrUpdateOptionalParams, + ApplicationSecurityGroupsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: ApplicationSecurityGroupsListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_ApplicationSecurityGroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _applicationSecurityGroupListResultDeserializer(result.body); +} + +/** Gets all application security groups in a subscription. */ +export function listAll( + context: Client, + options: ApplicationSecurityGroupsListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: ApplicationSecurityGroupsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ApplicationSecurityGroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _applicationSecurityGroupListResultDeserializer(result.body); +} + +/** Gets all the application security groups in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: ApplicationSecurityGroupsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + applicationSecurityGroupName: string, + options: ApplicationSecurityGroupsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationSecurityGroupName: applicationSecurityGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified application security group. */ +export function $delete( + context: Client, + resourceGroupName: string, + applicationSecurityGroupName: string, + options: ApplicationSecurityGroupsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, applicationSecurityGroupName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: TagsObject, + options: ApplicationSecurityGroupsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationSecurityGroupName: applicationSecurityGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationSecurityGroupDeserializer(result.body); +} + +/** Updates an application security group's tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: TagsObject, + options: ApplicationSecurityGroupsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + applicationSecurityGroupName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: ApplicationSecurityGroup, + options: ApplicationSecurityGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationSecurityGroupName: applicationSecurityGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: applicationSecurityGroupSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationSecurityGroupDeserializer(result.body); +} + +/** Creates or updates an application security group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: ApplicationSecurityGroup, + options: ApplicationSecurityGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ApplicationSecurityGroup> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + applicationSecurityGroupName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ApplicationSecurityGroup>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + applicationSecurityGroupName: string, + options: ApplicationSecurityGroupsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + applicationSecurityGroupName: applicationSecurityGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return applicationSecurityGroupDeserializer(result.body); +} + +/** Gets information about the specified application security group. */ +export async function get( + context: Client, + resourceGroupName: string, + applicationSecurityGroupName: string, + options: ApplicationSecurityGroupsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, applicationSecurityGroupName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/applicationSecurityGroups/options.ts b/sdk/network/arm-network/src/api/applicationSecurityGroups/options.ts new file mode 100644 index 000000000000..e61e5d7bcd6f --- /dev/null +++ b/sdk/network/arm-network/src/api/applicationSecurityGroups/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApplicationSecurityGroupsListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationSecurityGroupsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationSecurityGroupsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationSecurityGroupsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationSecurityGroupsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationSecurityGroupsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/availableDelegations/index.ts b/sdk/network/arm-network/src/api/availableDelegations/index.ts new file mode 100644 index 000000000000..b9cc50a2bb4c --- /dev/null +++ b/sdk/network/arm-network/src/api/availableDelegations/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { AvailableDelegationsListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/availableDelegations/operations.ts b/sdk/network/arm-network/src/api/availableDelegations/operations.ts new file mode 100644 index 000000000000..4efc8272545f --- /dev/null +++ b/sdk/network/arm-network/src/api/availableDelegations/operations.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + _AvailableDelegationsResult, + _availableDelegationsResultDeserializer, + AvailableDelegation, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { AvailableDelegationsListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + location: string, + options: AvailableDelegationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_AvailableDelegationsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _availableDelegationsResultDeserializer(result.body); +} + +/** Gets all of the available subnet delegations for this subscription in this region. */ +export function list( + context: Client, + location: string, + options: AvailableDelegationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, location, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/availableDelegations/options.ts b/sdk/network/arm-network/src/api/availableDelegations/options.ts new file mode 100644 index 000000000000..999157c33131 --- /dev/null +++ b/sdk/network/arm-network/src/api/availableDelegations/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AvailableDelegationsListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/availableEndpointServices/index.ts b/sdk/network/arm-network/src/api/availableEndpointServices/index.ts new file mode 100644 index 000000000000..1ad69049e117 --- /dev/null +++ b/sdk/network/arm-network/src/api/availableEndpointServices/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { AvailableEndpointServicesListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/availableEndpointServices/operations.ts b/sdk/network/arm-network/src/api/availableEndpointServices/operations.ts new file mode 100644 index 000000000000..12163271f240 --- /dev/null +++ b/sdk/network/arm-network/src/api/availableEndpointServices/operations.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + _EndpointServicesListResult, + _endpointServicesListResultDeserializer, + EndpointServiceResult, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { AvailableEndpointServicesListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + location: string, + options: AvailableEndpointServicesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_EndpointServicesListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _endpointServicesListResultDeserializer(result.body); +} + +/** List what values of endpoint services are available for use. */ +export function list( + context: Client, + location: string, + options: AvailableEndpointServicesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, location, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/availableEndpointServices/options.ts b/sdk/network/arm-network/src/api/availableEndpointServices/options.ts new file mode 100644 index 000000000000..d3b106ace0d7 --- /dev/null +++ b/sdk/network/arm-network/src/api/availableEndpointServices/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AvailableEndpointServicesListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/availablePrivateEndpointTypes/index.ts b/sdk/network/arm-network/src/api/availablePrivateEndpointTypes/index.ts new file mode 100644 index 000000000000..f9a4b0dbea19 --- /dev/null +++ b/sdk/network/arm-network/src/api/availablePrivateEndpointTypes/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByResourceGroup, list } from "./operations.js"; +export type { + AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, + AvailablePrivateEndpointTypesListOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/availablePrivateEndpointTypes/operations.ts b/sdk/network/arm-network/src/api/availablePrivateEndpointTypes/operations.ts new file mode 100644 index 000000000000..e8b041a65c02 --- /dev/null +++ b/sdk/network/arm-network/src/api/availablePrivateEndpointTypes/operations.ts @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + _AvailablePrivateEndpointTypesResult, + _availablePrivateEndpointTypesResultDeserializer, + AvailablePrivateEndpointType, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, + AvailablePrivateEndpointTypesListOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + location: string, + options: AvailablePrivateEndpointTypesListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_AvailablePrivateEndpointTypesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _availablePrivateEndpointTypesResultDeserializer(result.body); +} + +/** Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + location: string, + options: AvailablePrivateEndpointTypesListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, location, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + location: string, + options: AvailablePrivateEndpointTypesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_AvailablePrivateEndpointTypesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _availablePrivateEndpointTypesResultDeserializer(result.body); +} + +/** Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. */ +export function list( + context: Client, + location: string, + options: AvailablePrivateEndpointTypesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, location, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/availablePrivateEndpointTypes/options.ts b/sdk/network/arm-network/src/api/availablePrivateEndpointTypes/options.ts new file mode 100644 index 000000000000..43afbe9f3594 --- /dev/null +++ b/sdk/network/arm-network/src/api/availablePrivateEndpointTypes/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AvailablePrivateEndpointTypesListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AvailablePrivateEndpointTypesListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/availableResourceGroupDelegations/index.ts b/sdk/network/arm-network/src/api/availableResourceGroupDelegations/index.ts new file mode 100644 index 000000000000..2de011c804c6 --- /dev/null +++ b/sdk/network/arm-network/src/api/availableResourceGroupDelegations/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { AvailableResourceGroupDelegationsListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/availableResourceGroupDelegations/operations.ts b/sdk/network/arm-network/src/api/availableResourceGroupDelegations/operations.ts new file mode 100644 index 000000000000..13f87777d5a6 --- /dev/null +++ b/sdk/network/arm-network/src/api/availableResourceGroupDelegations/operations.ts @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + _AvailableDelegationsResult, + _availableDelegationsResultDeserializer, + AvailableDelegation, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { AvailableResourceGroupDelegationsListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + location: string, + options: AvailableResourceGroupDelegationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableDelegations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_AvailableDelegationsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _availableDelegationsResultDeserializer(result.body); +} + +/** Gets all of the available subnet delegations for this resource group in this region. */ +export function list( + context: Client, + resourceGroupName: string, + location: string, + options: AvailableResourceGroupDelegationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, location, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/availableResourceGroupDelegations/options.ts b/sdk/network/arm-network/src/api/availableResourceGroupDelegations/options.ts new file mode 100644 index 000000000000..8f954fdaf31c --- /dev/null +++ b/sdk/network/arm-network/src/api/availableResourceGroupDelegations/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AvailableResourceGroupDelegationsListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/availableServiceAliases/index.ts b/sdk/network/arm-network/src/api/availableServiceAliases/index.ts new file mode 100644 index 000000000000..ea17b4ba67cb --- /dev/null +++ b/sdk/network/arm-network/src/api/availableServiceAliases/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByResourceGroup, list } from "./operations.js"; +export type { + AvailableServiceAliasesListByResourceGroupOptionalParams, + AvailableServiceAliasesListOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/availableServiceAliases/operations.ts b/sdk/network/arm-network/src/api/availableServiceAliases/operations.ts new file mode 100644 index 000000000000..046048b2a418 --- /dev/null +++ b/sdk/network/arm-network/src/api/availableServiceAliases/operations.ts @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + _AvailableServiceAliasesResult, + _availableServiceAliasesResultDeserializer, + AvailableServiceAlias, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + AvailableServiceAliasesListByResourceGroupOptionalParams, + AvailableServiceAliasesListOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + location: string, + options: AvailableServiceAliasesListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableServiceAliases{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_AvailableServiceAliasesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _availableServiceAliasesResultDeserializer(result.body); +} + +/** Gets all available service aliases for this resource group in this region. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + location: string, + options: AvailableServiceAliasesListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, location, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + location: string, + options: AvailableServiceAliasesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableServiceAliases{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_AvailableServiceAliasesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _availableServiceAliasesResultDeserializer(result.body); +} + +/** Gets all available service aliases for this subscription in this region. */ +export function list( + context: Client, + location: string, + options: AvailableServiceAliasesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, location, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/availableServiceAliases/options.ts b/sdk/network/arm-network/src/api/availableServiceAliases/options.ts new file mode 100644 index 000000000000..e35926f5d312 --- /dev/null +++ b/sdk/network/arm-network/src/api/availableServiceAliases/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AvailableServiceAliasesListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AvailableServiceAliasesListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/azureFirewallFqdnTags/index.ts b/sdk/network/arm-network/src/api/azureFirewallFqdnTags/index.ts new file mode 100644 index 000000000000..18cf284c854f --- /dev/null +++ b/sdk/network/arm-network/src/api/azureFirewallFqdnTags/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll } from "./operations.js"; +export type { AzureFirewallFqdnTagsListAllOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/azureFirewallFqdnTags/operations.ts b/sdk/network/arm-network/src/api/azureFirewallFqdnTags/operations.ts new file mode 100644 index 000000000000..eb1f3c8ce1a0 --- /dev/null +++ b/sdk/network/arm-network/src/api/azureFirewallFqdnTags/operations.ts @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { AzureFirewallFqdnTag } from "../../models/microsoft/network/models.js"; +import { + _AzureFirewallFqdnTagListResult, + _azureFirewallFqdnTagListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { AzureFirewallFqdnTagsListAllOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listAllSend( + context: Client, + options: AzureFirewallFqdnTagsListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_AzureFirewallFqdnTagListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _azureFirewallFqdnTagListResultDeserializer(result.body); +} + +/** Gets all the Azure Firewall FQDN Tags in a subscription. */ +export function listAll( + context: Client, + options: AzureFirewallFqdnTagsListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/azureFirewallFqdnTags/options.ts b/sdk/network/arm-network/src/api/azureFirewallFqdnTags/options.ts new file mode 100644 index 000000000000..836a3ec3a12d --- /dev/null +++ b/sdk/network/arm-network/src/api/azureFirewallFqdnTags/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AzureFirewallFqdnTagsListAllOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/azureFirewalls/index.ts b/sdk/network/arm-network/src/api/azureFirewalls/index.ts new file mode 100644 index 000000000000..2b6953677ce1 --- /dev/null +++ b/sdk/network/arm-network/src/api/azureFirewalls/index.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + packetCaptureOperation, + packetCapture, + listLearnedPrefixes, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + AzureFirewallsPacketCaptureOperationOptionalParams, + AzureFirewallsPacketCaptureOptionalParams, + AzureFirewallsListLearnedPrefixesOptionalParams, + AzureFirewallsListAllOptionalParams, + AzureFirewallsListOptionalParams, + AzureFirewallsDeleteOptionalParams, + AzureFirewallsUpdateTagsOptionalParams, + AzureFirewallsCreateOrUpdateOptionalParams, + AzureFirewallsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/azureFirewalls/operations.ts b/sdk/network/arm-network/src/api/azureFirewalls/operations.ts new file mode 100644 index 000000000000..df61f6cd8d38 --- /dev/null +++ b/sdk/network/arm-network/src/api/azureFirewalls/operations.ts @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + AzureFirewall, + azureFirewallSerializer, + azureFirewallDeserializer, + IPPrefixesList, + ipPrefixesListDeserializer, + FirewallPacketCaptureParameters, + firewallPacketCaptureParametersSerializer, + AzureFirewallPacketCaptureResponse, + azureFirewallPacketCaptureResponseDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _AzureFirewallListResult, + _azureFirewallListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + AzureFirewallsPacketCaptureOperationOptionalParams, + AzureFirewallsPacketCaptureOptionalParams, + AzureFirewallsListLearnedPrefixesOptionalParams, + AzureFirewallsListAllOptionalParams, + AzureFirewallsListOptionalParams, + AzureFirewallsDeleteOptionalParams, + AzureFirewallsUpdateTagsOptionalParams, + AzureFirewallsCreateOrUpdateOptionalParams, + AzureFirewallsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _packetCaptureOperationSend( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options: AzureFirewallsPacketCaptureOperationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/packetCaptureOperation{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + azureFirewallName: azureFirewallName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: firewallPacketCaptureParametersSerializer(parameters), + }); +} + +export async function _packetCaptureOperationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return azureFirewallPacketCaptureResponseDeserializer(result.body); +} + +/** Runs a packet capture operation on AzureFirewall. */ +export function packetCaptureOperation( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options: AzureFirewallsPacketCaptureOperationOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + AzureFirewallPacketCaptureResponse +> { + return getLongRunningPoller(context, _packetCaptureOperationDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _packetCaptureOperationSend( + context, + resourceGroupName, + azureFirewallName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + AzureFirewallPacketCaptureResponse + >; +} + +export function _packetCaptureSend( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options: AzureFirewallsPacketCaptureOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/packetCapture{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + azureFirewallName: azureFirewallName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: firewallPacketCaptureParametersSerializer(parameters), + }); +} + +export async function _packetCaptureDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Runs a packet capture on AzureFirewall. */ +export function packetCapture( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options: AzureFirewallsPacketCaptureOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _packetCaptureDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _packetCaptureSend(context, resourceGroupName, azureFirewallName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _listLearnedPrefixesSend( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + options: AzureFirewallsListLearnedPrefixesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/learnedIPPrefixes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + azureFirewallName: azureFirewallName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listLearnedPrefixesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return ipPrefixesListDeserializer(result.body); +} + +/** Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. */ +export function listLearnedPrefixes( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + options: AzureFirewallsListLearnedPrefixesOptionalParams = { requestOptions: {} }, +): PollerLike, IPPrefixesList> { + return getLongRunningPoller(context, _listLearnedPrefixesDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listLearnedPrefixesSend(context, resourceGroupName, azureFirewallName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, IPPrefixesList>; +} + +export function _listAllSend( + context: Client, + options: AzureFirewallsListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_AzureFirewallListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _azureFirewallListResultDeserializer(result.body); +} + +/** Gets all the Azure Firewalls in a subscription. */ +export function listAll( + context: Client, + options: AzureFirewallsListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: AzureFirewallsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_AzureFirewallListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _azureFirewallListResultDeserializer(result.body); +} + +/** Lists all Azure Firewalls in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: AzureFirewallsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + options: AzureFirewallsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + azureFirewallName: azureFirewallName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Azure Firewall. */ +export function $delete( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + options: AzureFirewallsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, azureFirewallName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + parameters: TagsObject, + options: AzureFirewallsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + azureFirewallName: azureFirewallName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return azureFirewallDeserializer(result.body); +} + +/** Updates tags of an Azure Firewall resource. */ +export function updateTags( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + parameters: TagsObject, + options: AzureFirewallsUpdateTagsOptionalParams = { requestOptions: {} }, +): PollerLike, AzureFirewall> { + return getLongRunningPoller(context, _updateTagsDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateTagsSend(context, resourceGroupName, azureFirewallName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, AzureFirewall>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + parameters: AzureFirewall, + options: AzureFirewallsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}{?api%2Dversion,createAfcControlPlane}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + azureFirewallName: azureFirewallName, + "api%2Dversion": "2025-07-01", + createAfcControlPlane: options?.createAfcControlPlane, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: azureFirewallSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return azureFirewallDeserializer(result.body); +} + +/** Creates or updates the specified Azure Firewall. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + parameters: AzureFirewall, + options: AzureFirewallsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, AzureFirewall> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, azureFirewallName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, AzureFirewall>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + options: AzureFirewallsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + azureFirewallName: azureFirewallName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return azureFirewallDeserializer(result.body); +} + +/** Gets the specified Azure Firewall. */ +export async function get( + context: Client, + resourceGroupName: string, + azureFirewallName: string, + options: AzureFirewallsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, azureFirewallName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/azureFirewalls/options.ts b/sdk/network/arm-network/src/api/azureFirewalls/options.ts new file mode 100644 index 000000000000..6a1ed502cd1c --- /dev/null +++ b/sdk/network/arm-network/src/api/azureFirewalls/options.ts @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AzureFirewallsPacketCaptureOperationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AzureFirewallsPacketCaptureOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AzureFirewallsListLearnedPrefixesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AzureFirewallsListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AzureFirewallsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AzureFirewallsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AzureFirewallsUpdateTagsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AzureFirewallsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** When set to true, creates an AFC control plane for the Azure Firewall. */ + createAfcControlPlane?: boolean; +} + +/** Optional parameters. */ +export interface AzureFirewallsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/bastionHosts/index.ts b/sdk/network/arm-network/src/api/bastionHosts/index.ts new file mode 100644 index 000000000000..988d212e70a7 --- /dev/null +++ b/sdk/network/arm-network/src/api/bastionHosts/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + BastionHostsListOptionalParams, + BastionHostsListByResourceGroupOptionalParams, + BastionHostsDeleteOptionalParams, + BastionHostsUpdateTagsOptionalParams, + BastionHostsCreateOrUpdateOptionalParams, + BastionHostsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/bastionHosts/operations.ts b/sdk/network/arm-network/src/api/bastionHosts/operations.ts new file mode 100644 index 000000000000..57420468ae58 --- /dev/null +++ b/sdk/network/arm-network/src/api/bastionHosts/operations.ts @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + BastionHost, + bastionHostSerializer, + bastionHostDeserializer, +} from "../../models/microsoft/network/models.js"; +import { _BastionHostListResult, _bastionHostListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + BastionHostsListOptionalParams, + BastionHostsListByResourceGroupOptionalParams, + BastionHostsDeleteOptionalParams, + BastionHostsUpdateTagsOptionalParams, + BastionHostsCreateOrUpdateOptionalParams, + BastionHostsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + options: BastionHostsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_BastionHostListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _bastionHostListResultDeserializer(result.body); +} + +/** Lists all Bastion Hosts in a subscription. */ +export function list( + context: Client, + options: BastionHostsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: BastionHostsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_BastionHostListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _bastionHostListResultDeserializer(result.body); +} + +/** Lists all Bastion Hosts in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: BastionHostsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + bastionHostName: string, + options: BastionHostsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bastionHostName: bastionHostName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Bastion Host. */ +export function $delete( + context: Client, + resourceGroupName: string, + bastionHostName: string, + options: BastionHostsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, bastionHostName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + bastionHostName: string, + parameters: TagsObject, + options: BastionHostsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bastionHostName: bastionHostName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return bastionHostDeserializer(result.body); +} + +/** Updates Tags for BastionHost resource */ +export function updateTags( + context: Client, + resourceGroupName: string, + bastionHostName: string, + parameters: TagsObject, + options: BastionHostsUpdateTagsOptionalParams = { requestOptions: {} }, +): PollerLike, BastionHost> { + return getLongRunningPoller(context, _updateTagsDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateTagsSend(context, resourceGroupName, bastionHostName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, BastionHost>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + bastionHostName: string, + parameters: BastionHost, + options: BastionHostsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bastionHostName: bastionHostName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: bastionHostSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return bastionHostDeserializer(result.body); +} + +/** Creates or updates the specified Bastion Host. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + bastionHostName: string, + parameters: BastionHost, + options: BastionHostsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, BastionHost> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, bastionHostName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, BastionHost>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + bastionHostName: string, + options: BastionHostsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bastionHostName: bastionHostName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return bastionHostDeserializer(result.body); +} + +/** Gets the specified Bastion Host. */ +export async function get( + context: Client, + resourceGroupName: string, + bastionHostName: string, + options: BastionHostsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, bastionHostName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/bastionHosts/options.ts b/sdk/network/arm-network/src/api/bastionHosts/options.ts new file mode 100644 index 000000000000..24711f1552c6 --- /dev/null +++ b/sdk/network/arm-network/src/api/bastionHosts/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface BastionHostsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface BastionHostsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface BastionHostsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface BastionHostsUpdateTagsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface BastionHostsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface BastionHostsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/bgpServiceCommunities/index.ts b/sdk/network/arm-network/src/api/bgpServiceCommunities/index.ts new file mode 100644 index 000000000000..18c67fda4d87 --- /dev/null +++ b/sdk/network/arm-network/src/api/bgpServiceCommunities/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { BgpServiceCommunitiesListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/bgpServiceCommunities/operations.ts b/sdk/network/arm-network/src/api/bgpServiceCommunities/operations.ts new file mode 100644 index 000000000000..db88a09ec36f --- /dev/null +++ b/sdk/network/arm-network/src/api/bgpServiceCommunities/operations.ts @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { BgpServiceCommunity } from "../../models/microsoft/network/models.js"; +import { + _BgpServiceCommunityListResult, + _bgpServiceCommunityListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { BgpServiceCommunitiesListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: BgpServiceCommunitiesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_BgpServiceCommunityListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _bgpServiceCommunityListResultDeserializer(result.body); +} + +/** Gets all the available bgp service communities. */ +export function list( + context: Client, + options: BgpServiceCommunitiesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/bgpServiceCommunities/options.ts b/sdk/network/arm-network/src/api/bgpServiceCommunities/options.ts new file mode 100644 index 000000000000..2824b700845a --- /dev/null +++ b/sdk/network/arm-network/src/api/bgpServiceCommunities/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface BgpServiceCommunitiesListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/commits/index.ts b/sdk/network/arm-network/src/api/commits/index.ts new file mode 100644 index 000000000000..700f19769087 --- /dev/null +++ b/sdk/network/arm-network/src/api/commits/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + CommitsListOptionalParams, + CommitsDeleteOptionalParams, + CommitsCreateOrUpdateOptionalParams, + CommitsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/commits/operations.ts b/sdk/network/arm-network/src/api/commits/operations.ts new file mode 100644 index 000000000000..fa822b87e677 --- /dev/null +++ b/sdk/network/arm-network/src/api/commits/operations.ts @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + Commit, + commitSerializer, + commitDeserializer, +} from "../../models/microsoft/network/models.js"; +import { _CommitListResult, _commitListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + CommitsListOptionalParams, + CommitsDeleteOptionalParams, + CommitsCreateOrUpdateOptionalParams, + CommitsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: CommitsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commits{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_CommitListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _commitListResultDeserializer(result.body); +} + +/** Lists all commits for the specified network manager. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: CommitsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options: CommitsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commits/{commitName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + commitName: commitName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a commit. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options: CommitsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkManagerName, commitName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + commitName: string, + resource: Commit, + options: CommitsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commits/{commitName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + commitName: commitName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: commitSerializer(resource), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return commitDeserializer(result.body); +} + +/** Creates or updates a commit. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + commitName: string, + resource: Commit, + options: CommitsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Commit> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + commitName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, Commit>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options: CommitsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commits/{commitName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + commitName: commitName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return commitDeserializer(result.body); +} + +/** Gets the specified commit. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options: CommitsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + commitName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/commits/options.ts b/sdk/network/arm-network/src/api/commits/options.ts new file mode 100644 index 000000000000..08f5f1b6336c --- /dev/null +++ b/sdk/network/arm-network/src/api/commits/options.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface CommitsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface CommitsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface CommitsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface CommitsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/configurationPolicyGroups/index.ts b/sdk/network/arm-network/src/api/configurationPolicyGroups/index.ts new file mode 100644 index 000000000000..b6d2187a77b7 --- /dev/null +++ b/sdk/network/arm-network/src/api/configurationPolicyGroups/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByVpnServerConfiguration, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams, + ConfigurationPolicyGroupsDeleteOptionalParams, + ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ConfigurationPolicyGroupsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/configurationPolicyGroups/operations.ts b/sdk/network/arm-network/src/api/configurationPolicyGroups/operations.ts new file mode 100644 index 000000000000..f0e165fa9d9e --- /dev/null +++ b/sdk/network/arm-network/src/api/configurationPolicyGroups/operations.ts @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + VpnServerConfigurationPolicyGroup, + vpnServerConfigurationPolicyGroupSerializer, + vpnServerConfigurationPolicyGroupDeserializer, + _ListVpnServerConfigurationPolicyGroupsResult, + _listVpnServerConfigurationPolicyGroupsResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams, + ConfigurationPolicyGroupsDeleteOptionalParams, + ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ConfigurationPolicyGroupsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByVpnServerConfigurationSend( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + options: ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnServerConfigurationName: vpnServerConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByVpnServerConfigurationDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVpnServerConfigurationPolicyGroupsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVpnServerConfigurationPolicyGroupsResultDeserializer(result.body); +} + +/** Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. */ +export function listByVpnServerConfiguration( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + options: ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByVpnServerConfigurationSend( + context, + resourceGroupName, + vpnServerConfigurationName, + options, + ), + _listByVpnServerConfigurationDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options: ConfigurationPolicyGroupsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnServerConfigurationName: vpnServerConfigurationName, + configurationPolicyGroupName: configurationPolicyGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a ConfigurationPolicyGroup. */ +export function $delete( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options: ConfigurationPolicyGroupsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnServerConfigurationName: vpnServerConfigurationName, + configurationPolicyGroupName: configurationPolicyGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnServerConfigurationPolicyGroupSerializer(vpnServerConfigurationPolicyGroupParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnServerConfigurationPolicyGroupDeserializer(result.body); +} + +/** Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VpnServerConfigurationPolicyGroup +> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + vpnServerConfigurationPolicyGroupParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VpnServerConfigurationPolicyGroup + >; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options: ConfigurationPolicyGroupsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnServerConfigurationName: vpnServerConfigurationName, + configurationPolicyGroupName: configurationPolicyGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnServerConfigurationPolicyGroupDeserializer(result.body); +} + +/** Retrieves the details of a ConfigurationPolicyGroup. */ +export async function get( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options: ConfigurationPolicyGroupsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/configurationPolicyGroups/options.ts b/sdk/network/arm-network/src/api/configurationPolicyGroups/options.ts new file mode 100644 index 000000000000..5cbe3988ab49 --- /dev/null +++ b/sdk/network/arm-network/src/api/configurationPolicyGroups/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ConfigurationPolicyGroupsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ConfigurationPolicyGroupsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ConfigurationPolicyGroupsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/connectionMonitors/index.ts b/sdk/network/arm-network/src/api/connectionMonitors/index.ts new file mode 100644 index 000000000000..367ad25d4fd6 --- /dev/null +++ b/sdk/network/arm-network/src/api/connectionMonitors/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { stop, list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + ConnectionMonitorsStopOptionalParams, + ConnectionMonitorsListOptionalParams, + ConnectionMonitorsDeleteOptionalParams, + ConnectionMonitorsUpdateTagsOptionalParams, + ConnectionMonitorsCreateOrUpdateOptionalParams, + ConnectionMonitorsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/connectionMonitors/operations.ts b/sdk/network/arm-network/src/api/connectionMonitors/operations.ts new file mode 100644 index 000000000000..a22090f13ee3 --- /dev/null +++ b/sdk/network/arm-network/src/api/connectionMonitors/operations.ts @@ -0,0 +1,387 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + TagsObject, + tagsObjectSerializer, + errorResponseDeserializer, + ConnectionMonitorResult, + connectionMonitorResultDeserializer, + ConnectionMonitor, + connectionMonitorSerializer, + _ConnectionMonitorListResult, + _connectionMonitorListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ConnectionMonitorsStopOptionalParams, + ConnectionMonitorsListOptionalParams, + ConnectionMonitorsDeleteOptionalParams, + ConnectionMonitorsUpdateTagsOptionalParams, + ConnectionMonitorsCreateOrUpdateOptionalParams, + ConnectionMonitorsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _stopSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options: ConnectionMonitorsStopOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + connectionMonitorName: connectionMonitorName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _stopDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Stops the specified connection monitor. */ +export function stop( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options: ConnectionMonitorsStopOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _stopDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopSend(context, resourceGroupName, networkWatcherName, connectionMonitorName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _listSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + options: ConnectionMonitorsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ConnectionMonitorListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _connectionMonitorListResultDeserializer(result.body); +} + +/** Lists all connection monitors for the specified Network Watcher. */ +export function list( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + options: ConnectionMonitorsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkWatcherName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options: ConnectionMonitorsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + connectionMonitorName: connectionMonitorName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified connection monitor. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options: ConnectionMonitorsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkWatcherName, connectionMonitorName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: TagsObject, + options: ConnectionMonitorsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + connectionMonitorName: connectionMonitorName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return connectionMonitorResultDeserializer(result.body); +} + +/** Update tags of the specified connection monitor. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: TagsObject, + options: ConnectionMonitorsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + networkWatcherName, + connectionMonitorName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: ConnectionMonitor, + options: ConnectionMonitorsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}{?api%2Dversion,migrate}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + connectionMonitorName: connectionMonitorName, + "api%2Dversion": "2025-07-01", + migrate: options?.migrate, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: connectionMonitorSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return connectionMonitorResultDeserializer(result.body); +} + +/** Create or update a connection monitor. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: ConnectionMonitor, + options: ConnectionMonitorsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ConnectionMonitorResult> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + networkWatcherName, + connectionMonitorName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ConnectionMonitorResult>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options: ConnectionMonitorsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + connectionMonitorName: connectionMonitorName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return connectionMonitorResultDeserializer(result.body); +} + +/** Gets a connection monitor by name. */ +export async function get( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options: ConnectionMonitorsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkWatcherName, + connectionMonitorName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/connectionMonitors/options.ts b/sdk/network/arm-network/src/api/connectionMonitors/options.ts new file mode 100644 index 000000000000..01c6243c1c80 --- /dev/null +++ b/sdk/network/arm-network/src/api/connectionMonitors/options.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ConnectionMonitorsStopOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ConnectionMonitorsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ConnectionMonitorsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ConnectionMonitorsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ConnectionMonitorsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Value indicating whether connection monitor V1 should be migrated to V2 format. */ + migrate?: string; +} + +/** Optional parameters. */ +export interface ConnectionMonitorsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/connectionPolicies/index.ts b/sdk/network/arm-network/src/api/connectionPolicies/index.ts new file mode 100644 index 000000000000..979b61803f15 --- /dev/null +++ b/sdk/network/arm-network/src/api/connectionPolicies/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ConnectionPoliciesListOptionalParams, + ConnectionPoliciesDeleteOptionalParams, + ConnectionPoliciesCreateOrUpdateOptionalParams, + ConnectionPoliciesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/connectionPolicies/operations.ts b/sdk/network/arm-network/src/api/connectionPolicies/operations.ts new file mode 100644 index 000000000000..8267f0232e67 --- /dev/null +++ b/sdk/network/arm-network/src/api/connectionPolicies/operations.ts @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ConnectionPolicy, + connectionPolicySerializer, + connectionPolicyDeserializer, + _ListConnectionPoliciesResult, + _listConnectionPoliciesResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ConnectionPoliciesListOptionalParams, + ConnectionPoliciesDeleteOptionalParams, + ConnectionPoliciesCreateOrUpdateOptionalParams, + ConnectionPoliciesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: ConnectionPoliciesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/connectionPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListConnectionPoliciesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listConnectionPoliciesResultDeserializer(result.body); +} + +/** Retrieves the details of all ConnectionPolicies. */ +export function list( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: ConnectionPoliciesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, virtualHubName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options: ConnectionPoliciesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/connectionPolicies/{connectionPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + connectionPolicyName: connectionPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a ConnectionPolicy. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options: ConnectionPoliciesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualHubName, connectionPolicyName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + resource: ConnectionPolicy, + options: ConnectionPoliciesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/connectionPolicies/{connectionPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + connectionPolicyName: connectionPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: connectionPolicySerializer(resource), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return connectionPolicyDeserializer(result.body); +} + +/** Creates a ConnectionPolicy if it doesn't exist else updates the existing one. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + resource: ConnectionPolicy, + options: ConnectionPoliciesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ConnectionPolicy> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualHubName, + connectionPolicyName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ConnectionPolicy>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options: ConnectionPoliciesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/connectionPolicies/{connectionPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + connectionPolicyName: connectionPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return connectionPolicyDeserializer(result.body); +} + +/** Retrieves the details of a ConnectionPolicy. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options: ConnectionPoliciesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualHubName, + connectionPolicyName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/connectionPolicies/options.ts b/sdk/network/arm-network/src/api/connectionPolicies/options.ts new file mode 100644 index 000000000000..8921511a443e --- /dev/null +++ b/sdk/network/arm-network/src/api/connectionPolicies/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ConnectionPoliciesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ConnectionPoliciesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ConnectionPoliciesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ConnectionPoliciesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/connectivityConfigurations/index.ts b/sdk/network/arm-network/src/api/connectivityConfigurations/index.ts new file mode 100644 index 000000000000..b19bf0f26488 --- /dev/null +++ b/sdk/network/arm-network/src/api/connectivityConfigurations/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ConnectivityConfigurationsListOptionalParams, + ConnectivityConfigurationsDeleteOptionalParams, + ConnectivityConfigurationsCreateOrUpdateOptionalParams, + ConnectivityConfigurationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/connectivityConfigurations/operations.ts b/sdk/network/arm-network/src/api/connectivityConfigurations/operations.ts new file mode 100644 index 000000000000..399198cdae68 --- /dev/null +++ b/sdk/network/arm-network/src/api/connectivityConfigurations/operations.ts @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ConnectivityConfiguration, + connectivityConfigurationSerializer, + connectivityConfigurationDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _ConnectivityConfigurationListResult, + _connectivityConfigurationListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ConnectivityConfigurationsListOptionalParams, + ConnectivityConfigurationsDeleteOptionalParams, + ConnectivityConfigurationsCreateOrUpdateOptionalParams, + ConnectivityConfigurationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: ConnectivityConfigurationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ConnectivityConfigurationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _connectivityConfigurationListResultDeserializer(result.body); +} + +/** Lists all the network manager connectivity configuration in a specified network manager. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: ConnectivityConfigurationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: ConnectivityConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: ConnectivityConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkManagerName, configurationName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + connectivityConfiguration: ConnectivityConfiguration, + options: ConnectivityConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: connectivityConfigurationSerializer(connectivityConfiguration), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return connectivityConfigurationDeserializer(result.body); +} + +/** Creates/Updates a new network manager connectivity configuration */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + connectivityConfiguration: ConnectivityConfiguration, + options: ConnectivityConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + connectivityConfiguration, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: ConnectivityConfigurationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return connectivityConfigurationDeserializer(result.body); +} + +/** Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: ConnectivityConfigurationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/connectivityConfigurations/options.ts b/sdk/network/arm-network/src/api/connectivityConfigurations/options.ts new file mode 100644 index 000000000000..8e38f0c6e01c --- /dev/null +++ b/sdk/network/arm-network/src/api/connectivityConfigurations/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ConnectivityConfigurationsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ConnectivityConfigurationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface ConnectivityConfigurationsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ConnectivityConfigurationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/customIPPrefixes/index.ts b/sdk/network/arm-network/src/api/customIPPrefixes/index.ts new file mode 100644 index 000000000000..59bc967b9651 --- /dev/null +++ b/sdk/network/arm-network/src/api/customIPPrefixes/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + CustomIPPrefixesListAllOptionalParams, + CustomIPPrefixesListOptionalParams, + CustomIPPrefixesDeleteOptionalParams, + CustomIPPrefixesUpdateTagsOptionalParams, + CustomIPPrefixesCreateOrUpdateOptionalParams, + CustomIPPrefixesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/customIPPrefixes/operations.ts b/sdk/network/arm-network/src/api/customIPPrefixes/operations.ts new file mode 100644 index 000000000000..6a879cb614b4 --- /dev/null +++ b/sdk/network/arm-network/src/api/customIPPrefixes/operations.ts @@ -0,0 +1,351 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + CustomIpPrefix, + customIpPrefixSerializer, + customIpPrefixDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _CustomIpPrefixListResult, + _customIpPrefixListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + CustomIPPrefixesListAllOptionalParams, + CustomIPPrefixesListOptionalParams, + CustomIPPrefixesDeleteOptionalParams, + CustomIPPrefixesUpdateTagsOptionalParams, + CustomIPPrefixesCreateOrUpdateOptionalParams, + CustomIPPrefixesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: CustomIPPrefixesListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/customIpPrefixes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_CustomIpPrefixListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _customIpPrefixListResultDeserializer(result.body); +} + +/** Gets all the custom IP prefixes in a subscription. */ +export function listAll( + context: Client, + options: CustomIPPrefixesListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: CustomIPPrefixesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_CustomIpPrefixListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _customIpPrefixListResultDeserializer(result.body); +} + +/** Gets all custom IP prefixes in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: CustomIPPrefixesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + customIpPrefixName: string, + options: CustomIPPrefixesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customIpPrefixName: customIpPrefixName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified custom IP prefix. */ +export function $delete( + context: Client, + resourceGroupName: string, + customIpPrefixName: string, + options: CustomIPPrefixesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, customIpPrefixName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + customIpPrefixName: string, + parameters: TagsObject, + options: CustomIPPrefixesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customIpPrefixName: customIpPrefixName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return customIpPrefixDeserializer(result.body); +} + +/** Updates custom IP prefix tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + customIpPrefixName: string, + parameters: TagsObject, + options: CustomIPPrefixesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + customIpPrefixName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + customIpPrefixName: string, + parameters: CustomIpPrefix, + options: CustomIPPrefixesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customIpPrefixName: customIpPrefixName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: customIpPrefixSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return customIpPrefixDeserializer(result.body); +} + +/** Creates or updates a custom IP prefix. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + customIpPrefixName: string, + parameters: CustomIpPrefix, + options: CustomIPPrefixesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, CustomIpPrefix> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, customIpPrefixName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, CustomIpPrefix>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + customIpPrefixName: string, + options: CustomIPPrefixesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customIpPrefixName: customIpPrefixName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return customIpPrefixDeserializer(result.body); +} + +/** Gets the specified custom IP prefix in a specified resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + customIpPrefixName: string, + options: CustomIPPrefixesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, customIpPrefixName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/customIPPrefixes/options.ts b/sdk/network/arm-network/src/api/customIPPrefixes/options.ts new file mode 100644 index 000000000000..0815fd42b962 --- /dev/null +++ b/sdk/network/arm-network/src/api/customIPPrefixes/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface CustomIPPrefixesListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CustomIPPrefixesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CustomIPPrefixesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface CustomIPPrefixesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CustomIPPrefixesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface CustomIPPrefixesGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/ddosCustomPolicies/index.ts b/sdk/network/arm-network/src/api/ddosCustomPolicies/index.ts new file mode 100644 index 000000000000..0a587a431d2f --- /dev/null +++ b/sdk/network/arm-network/src/api/ddosCustomPolicies/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + DdosCustomPoliciesListAllOptionalParams, + DdosCustomPoliciesListOptionalParams, + DdosCustomPoliciesDeleteOptionalParams, + DdosCustomPoliciesUpdateTagsOptionalParams, + DdosCustomPoliciesCreateOrUpdateOptionalParams, + DdosCustomPoliciesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/ddosCustomPolicies/operations.ts b/sdk/network/arm-network/src/api/ddosCustomPolicies/operations.ts new file mode 100644 index 000000000000..e7a39e6430a6 --- /dev/null +++ b/sdk/network/arm-network/src/api/ddosCustomPolicies/operations.ts @@ -0,0 +1,351 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + DdosCustomPolicy, + ddosCustomPolicySerializer, + ddosCustomPolicyDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _DdosCustomPolicyListResult, + _ddosCustomPolicyListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + DdosCustomPoliciesListAllOptionalParams, + DdosCustomPoliciesListOptionalParams, + DdosCustomPoliciesDeleteOptionalParams, + DdosCustomPoliciesUpdateTagsOptionalParams, + DdosCustomPoliciesCreateOrUpdateOptionalParams, + DdosCustomPoliciesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: DdosCustomPoliciesListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosCustomPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_DdosCustomPolicyListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _ddosCustomPolicyListResultDeserializer(result.body); +} + +/** Gets all the DDoS custom policies in a subscription. */ +export function listAll( + context: Client, + options: DdosCustomPoliciesListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: DdosCustomPoliciesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_DdosCustomPolicyListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _ddosCustomPolicyListResultDeserializer(result.body); +} + +/** Gets all the DDoS custom policies in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: DdosCustomPoliciesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + ddosCustomPolicyName: string, + options: DdosCustomPoliciesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ddosCustomPolicyName: ddosCustomPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified DDoS custom policy. */ +export function $delete( + context: Client, + resourceGroupName: string, + ddosCustomPolicyName: string, + options: DdosCustomPoliciesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, ddosCustomPolicyName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: TagsObject, + options: DdosCustomPoliciesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ddosCustomPolicyName: ddosCustomPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return ddosCustomPolicyDeserializer(result.body); +} + +/** Update a DDoS custom policy tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: TagsObject, + options: DdosCustomPoliciesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + ddosCustomPolicyName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: DdosCustomPolicy, + options: DdosCustomPoliciesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ddosCustomPolicyName: ddosCustomPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: ddosCustomPolicySerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return ddosCustomPolicyDeserializer(result.body); +} + +/** Creates or updates a DDoS custom policy. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: DdosCustomPolicy, + options: DdosCustomPoliciesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, DdosCustomPolicy> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, ddosCustomPolicyName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, DdosCustomPolicy>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + ddosCustomPolicyName: string, + options: DdosCustomPoliciesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ddosCustomPolicyName: ddosCustomPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return ddosCustomPolicyDeserializer(result.body); +} + +/** Gets information about the specified DDoS custom policy. */ +export async function get( + context: Client, + resourceGroupName: string, + ddosCustomPolicyName: string, + options: DdosCustomPoliciesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, ddosCustomPolicyName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/ddosCustomPolicies/options.ts b/sdk/network/arm-network/src/api/ddosCustomPolicies/options.ts new file mode 100644 index 000000000000..921f05a15b3b --- /dev/null +++ b/sdk/network/arm-network/src/api/ddosCustomPolicies/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface DdosCustomPoliciesListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DdosCustomPoliciesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DdosCustomPoliciesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DdosCustomPoliciesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DdosCustomPoliciesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DdosCustomPoliciesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/ddosProtectionPlans/index.ts b/sdk/network/arm-network/src/api/ddosProtectionPlans/index.ts new file mode 100644 index 000000000000..71a19780da41 --- /dev/null +++ b/sdk/network/arm-network/src/api/ddosProtectionPlans/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + DdosProtectionPlansListOptionalParams, + DdosProtectionPlansListByResourceGroupOptionalParams, + DdosProtectionPlansDeleteOptionalParams, + DdosProtectionPlansUpdateTagsOptionalParams, + DdosProtectionPlansCreateOrUpdateOptionalParams, + DdosProtectionPlansGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/ddosProtectionPlans/operations.ts b/sdk/network/arm-network/src/api/ddosProtectionPlans/operations.ts new file mode 100644 index 000000000000..5f6c3d9c4a21 --- /dev/null +++ b/sdk/network/arm-network/src/api/ddosProtectionPlans/operations.ts @@ -0,0 +1,351 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + DdosProtectionPlan, + ddosProtectionPlanSerializer, + ddosProtectionPlanDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _DdosProtectionPlanListResult, + _ddosProtectionPlanListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + DdosProtectionPlansListOptionalParams, + DdosProtectionPlansListByResourceGroupOptionalParams, + DdosProtectionPlansDeleteOptionalParams, + DdosProtectionPlansUpdateTagsOptionalParams, + DdosProtectionPlansCreateOrUpdateOptionalParams, + DdosProtectionPlansGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + options: DdosProtectionPlansListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_DdosProtectionPlanListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _ddosProtectionPlanListResultDeserializer(result.body); +} + +/** Gets all DDoS protection plans in a subscription. */ +export function list( + context: Client, + options: DdosProtectionPlansListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: DdosProtectionPlansListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_DdosProtectionPlanListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _ddosProtectionPlanListResultDeserializer(result.body); +} + +/** Gets all the DDoS protection plans in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: DdosProtectionPlansListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + ddosProtectionPlanName: string, + options: DdosProtectionPlansDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ddosProtectionPlanName: ddosProtectionPlanName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified DDoS protection plan. */ +export function $delete( + context: Client, + resourceGroupName: string, + ddosProtectionPlanName: string, + options: DdosProtectionPlansDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, ddosProtectionPlanName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: TagsObject, + options: DdosProtectionPlansUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ddosProtectionPlanName: ddosProtectionPlanName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return ddosProtectionPlanDeserializer(result.body); +} + +/** Update a DDoS protection plan tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: TagsObject, + options: DdosProtectionPlansUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + ddosProtectionPlanName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: DdosProtectionPlan, + options: DdosProtectionPlansCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ddosProtectionPlanName: ddosProtectionPlanName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: ddosProtectionPlanSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return ddosProtectionPlanDeserializer(result.body); +} + +/** Creates or updates a DDoS protection plan. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: DdosProtectionPlan, + options: DdosProtectionPlansCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, DdosProtectionPlan> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, ddosProtectionPlanName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, DdosProtectionPlan>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + ddosProtectionPlanName: string, + options: DdosProtectionPlansGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ddosProtectionPlanName: ddosProtectionPlanName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return ddosProtectionPlanDeserializer(result.body); +} + +/** Gets information about the specified DDoS protection plan. */ +export async function get( + context: Client, + resourceGroupName: string, + ddosProtectionPlanName: string, + options: DdosProtectionPlansGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, ddosProtectionPlanName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/ddosProtectionPlans/options.ts b/sdk/network/arm-network/src/api/ddosProtectionPlans/options.ts new file mode 100644 index 000000000000..0abdbd229e41 --- /dev/null +++ b/sdk/network/arm-network/src/api/ddosProtectionPlans/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface DdosProtectionPlansListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DdosProtectionPlansListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DdosProtectionPlansDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DdosProtectionPlansUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DdosProtectionPlansCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DdosProtectionPlansGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/defaultSecurityRules/index.ts b/sdk/network/arm-network/src/api/defaultSecurityRules/index.ts new file mode 100644 index 000000000000..f1adf5be04ec --- /dev/null +++ b/sdk/network/arm-network/src/api/defaultSecurityRules/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export type { + DefaultSecurityRulesListOptionalParams, + DefaultSecurityRulesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/defaultSecurityRules/operations.ts b/sdk/network/arm-network/src/api/defaultSecurityRules/operations.ts new file mode 100644 index 000000000000..fcc27dd0f074 --- /dev/null +++ b/sdk/network/arm-network/src/api/defaultSecurityRules/operations.ts @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + SecurityRule, + securityRuleDeserializer, +} from "../../models/common/models.js"; +import { + _SecurityRuleListResult, + _securityRuleListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + DefaultSecurityRulesListOptionalParams, + DefaultSecurityRulesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + options: DefaultSecurityRulesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityGroupName: networkSecurityGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SecurityRuleListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _securityRuleListResultDeserializer(result.body); +} + +/** Gets all default security rules in a network security group. */ +export function list( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + options: DefaultSecurityRulesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkSecurityGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + defaultSecurityRuleName: string, + options: DefaultSecurityRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityGroupName: networkSecurityGroupName, + defaultSecurityRuleName: defaultSecurityRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityRuleDeserializer(result.body); +} + +/** Get the specified default network security rule. */ +export async function get( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + defaultSecurityRuleName: string, + options: DefaultSecurityRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkSecurityGroupName, + defaultSecurityRuleName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/defaultSecurityRules/options.ts b/sdk/network/arm-network/src/api/defaultSecurityRules/options.ts new file mode 100644 index 000000000000..f2bf9f7457e7 --- /dev/null +++ b/sdk/network/arm-network/src/api/defaultSecurityRules/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface DefaultSecurityRulesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DefaultSecurityRulesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/dscpConfiguration/index.ts b/sdk/network/arm-network/src/api/dscpConfiguration/index.ts new file mode 100644 index 000000000000..2459873dc5ee --- /dev/null +++ b/sdk/network/arm-network/src/api/dscpConfiguration/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + DscpConfigurationListAllOptionalParams, + DscpConfigurationListOptionalParams, + DscpConfigurationDeleteOptionalParams, + DscpConfigurationCreateOrUpdateOptionalParams, + DscpConfigurationGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/dscpConfiguration/operations.ts b/sdk/network/arm-network/src/api/dscpConfiguration/operations.ts new file mode 100644 index 000000000000..33b15e10616b --- /dev/null +++ b/sdk/network/arm-network/src/api/dscpConfiguration/operations.ts @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + DscpConfiguration, + dscpConfigurationSerializer, + dscpConfigurationDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _DscpConfigurationListResult, + _dscpConfigurationListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + DscpConfigurationListAllOptionalParams, + DscpConfigurationListOptionalParams, + DscpConfigurationDeleteOptionalParams, + DscpConfigurationCreateOrUpdateOptionalParams, + DscpConfigurationGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: DscpConfigurationListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/dscpConfigurations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_DscpConfigurationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _dscpConfigurationListResultDeserializer(result.body); +} + +/** Gets all dscp configurations in a subscription. */ +export function listAll( + context: Client, + options: DscpConfigurationListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: DscpConfigurationListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_DscpConfigurationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _dscpConfigurationListResultDeserializer(result.body); +} + +/** Gets a DSCP Configuration. */ +export function list( + context: Client, + resourceGroupName: string, + options: DscpConfigurationListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + dscpConfigurationName: string, + options: DscpConfigurationDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + dscpConfigurationName: dscpConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a DSCP Configuration. */ +export function $delete( + context: Client, + resourceGroupName: string, + dscpConfigurationName: string, + options: DscpConfigurationDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, dscpConfigurationName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + dscpConfigurationName: string, + parameters: DscpConfiguration, + options: DscpConfigurationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + dscpConfigurationName: dscpConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: dscpConfigurationSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return dscpConfigurationDeserializer(result.body); +} + +/** Creates or updates a DSCP Configuration. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + dscpConfigurationName: string, + parameters: DscpConfiguration, + options: DscpConfigurationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, DscpConfiguration> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, dscpConfigurationName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, DscpConfiguration>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + dscpConfigurationName: string, + options: DscpConfigurationGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + dscpConfigurationName: dscpConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return dscpConfigurationDeserializer(result.body); +} + +/** Gets a DSCP Configuration. */ +export async function get( + context: Client, + resourceGroupName: string, + dscpConfigurationName: string, + options: DscpConfigurationGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, dscpConfigurationName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/dscpConfiguration/options.ts b/sdk/network/arm-network/src/api/dscpConfiguration/options.ts new file mode 100644 index 000000000000..1fd5ab5906c7 --- /dev/null +++ b/sdk/network/arm-network/src/api/dscpConfiguration/options.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface DscpConfigurationListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DscpConfigurationListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DscpConfigurationDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DscpConfigurationCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DscpConfigurationGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/index.ts b/sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/index.ts new file mode 100644 index 000000000000..7584ae9b9446 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ExpressRouteCircuitAuthorizationsListOptionalParams, + ExpressRouteCircuitAuthorizationsDeleteOptionalParams, + ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, + ExpressRouteCircuitAuthorizationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/operations.ts b/sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/operations.ts new file mode 100644 index 000000000000..738e66c5266b --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/operations.ts @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ExpressRouteCircuitAuthorization, + expressRouteCircuitAuthorizationSerializer, + expressRouteCircuitAuthorizationDeserializer, + _AuthorizationListResult, + _authorizationListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRouteCircuitAuthorizationsListOptionalParams, + ExpressRouteCircuitAuthorizationsDeleteOptionalParams, + ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, + ExpressRouteCircuitAuthorizationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitAuthorizationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_AuthorizationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _authorizationListResultDeserializer(result.body); +} + +/** Gets all authorizations in an express route circuit. */ +export function list( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitAuthorizationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, circuitName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options: ExpressRouteCircuitAuthorizationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + authorizationName: authorizationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified authorization from the specified express route circuit. */ +export function $delete( + context: Client, + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options: ExpressRouteCircuitAuthorizationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, circuitName, authorizationName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + circuitName: string, + authorizationName: string, + authorizationParameters: ExpressRouteCircuitAuthorization, + options: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + authorizationName: authorizationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRouteCircuitAuthorizationSerializer(authorizationParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitAuthorizationDeserializer(result.body); +} + +/** Creates or updates an authorization in the specified express route circuit. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + circuitName: string, + authorizationName: string, + authorizationParameters: ExpressRouteCircuitAuthorization, + options: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ExpressRouteCircuitAuthorization> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + circuitName, + authorizationName, + authorizationParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ExpressRouteCircuitAuthorization + >; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options: ExpressRouteCircuitAuthorizationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + authorizationName: authorizationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitAuthorizationDeserializer(result.body); +} + +/** Gets the specified authorization from the specified express route circuit. */ +export async function get( + context: Client, + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options: ExpressRouteCircuitAuthorizationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + circuitName, + authorizationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/options.ts b/sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/options.ts new file mode 100644 index 000000000000..9ae8924efb69 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuitAuthorizations/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRouteCircuitAuthorizationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteCircuitAuthorizationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitAuthorizationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRouteCircuitConnections/index.ts b/sdk/network/arm-network/src/api/expressRouteCircuitConnections/index.ts new file mode 100644 index 000000000000..3fa87664cae7 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuitConnections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ExpressRouteCircuitConnectionsListOptionalParams, + ExpressRouteCircuitConnectionsDeleteOptionalParams, + ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, + ExpressRouteCircuitConnectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRouteCircuitConnections/operations.ts b/sdk/network/arm-network/src/api/expressRouteCircuitConnections/operations.ts new file mode 100644 index 000000000000..15eb5d4c314c --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuitConnections/operations.ts @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ExpressRouteCircuitConnection, + expressRouteCircuitConnectionSerializer, + expressRouteCircuitConnectionDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _ExpressRouteCircuitConnectionListResult, + _expressRouteCircuitConnectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRouteCircuitConnectionsListOptionalParams, + ExpressRouteCircuitConnectionsDeleteOptionalParams, + ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, + ExpressRouteCircuitConnectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + options: ExpressRouteCircuitConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRouteCircuitConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRouteCircuitConnectionListResultDeserializer(result.body); +} + +/** Gets all global reach connections associated with a private peering in an express route circuit. */ +export function list( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + options: ExpressRouteCircuitConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, circuitName, peeringName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options: ExpressRouteCircuitConnectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Express Route Circuit Connection from the specified express route circuit. */ +export function $delete( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options: ExpressRouteCircuitConnectionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, circuitName, peeringName, connectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, + options: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRouteCircuitConnectionSerializer(expressRouteCircuitConnectionParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitConnectionDeserializer(result.body); +} + +/** Creates or updates a Express Route Circuit Connection in the specified express route circuits. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, + options: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ExpressRouteCircuitConnection> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + circuitName, + peeringName, + connectionName, + expressRouteCircuitConnectionParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ExpressRouteCircuitConnection>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options: ExpressRouteCircuitConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitConnectionDeserializer(result.body); +} + +/** Gets the specified Express Route Circuit Connection from the specified express route circuit. */ +export async function get( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options: ExpressRouteCircuitConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + circuitName, + peeringName, + connectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/expressRouteCircuitConnections/options.ts b/sdk/network/arm-network/src/api/expressRouteCircuitConnections/options.ts new file mode 100644 index 000000000000..d376a2a371ef --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuitConnections/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRouteCircuitConnectionsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteCircuitConnectionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitConnectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRouteCircuitPeerings/index.ts b/sdk/network/arm-network/src/api/expressRouteCircuitPeerings/index.ts new file mode 100644 index 000000000000..45dec2c28d5e --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuitPeerings/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ExpressRouteCircuitPeeringsListOptionalParams, + ExpressRouteCircuitPeeringsDeleteOptionalParams, + ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, + ExpressRouteCircuitPeeringsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRouteCircuitPeerings/operations.ts b/sdk/network/arm-network/src/api/expressRouteCircuitPeerings/operations.ts new file mode 100644 index 000000000000..882b03a6f4c6 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuitPeerings/operations.ts @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ExpressRouteCircuitPeering, + expressRouteCircuitPeeringSerializer, + expressRouteCircuitPeeringDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _ExpressRouteCircuitPeeringListResult, + _expressRouteCircuitPeeringListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRouteCircuitPeeringsListOptionalParams, + ExpressRouteCircuitPeeringsDeleteOptionalParams, + ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, + ExpressRouteCircuitPeeringsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitPeeringsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRouteCircuitPeeringListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRouteCircuitPeeringListResultDeserializer(result.body); +} + +/** Gets all peerings in a specified express route circuit. */ +export function list( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitPeeringsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, circuitName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + options: ExpressRouteCircuitPeeringsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified peering from the specified express route circuit. */ +export function $delete( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + options: ExpressRouteCircuitPeeringsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, circuitName, peeringName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + peeringParameters: ExpressRouteCircuitPeering, + options: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRouteCircuitPeeringSerializer(peeringParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitPeeringDeserializer(result.body); +} + +/** Creates or updates a peering in the specified express route circuits. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + peeringParameters: ExpressRouteCircuitPeering, + options: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ExpressRouteCircuitPeering> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + circuitName, + peeringName, + peeringParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ExpressRouteCircuitPeering>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + options: ExpressRouteCircuitPeeringsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitPeeringDeserializer(result.body); +} + +/** Gets the specified peering for the express route circuit. */ +export async function get( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + options: ExpressRouteCircuitPeeringsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, circuitName, peeringName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/expressRouteCircuitPeerings/options.ts b/sdk/network/arm-network/src/api/expressRouteCircuitPeerings/options.ts new file mode 100644 index 000000000000..37444b2ae9d9 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuitPeerings/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRouteCircuitPeeringsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteCircuitPeeringsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitPeeringsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRouteCircuits/index.ts b/sdk/network/arm-network/src/api/expressRouteCircuits/index.ts new file mode 100644 index 000000000000..4d2094443c59 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuits/index.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + getPeeringStats, + listRoutesTableSummary, + listRoutesTable, + listArpTable, + stopCircuitLinkFailoverTest, + startCircuitLinkFailoverTest, + getCircuitLinkFailoverSingleTestDetails, + getCircuitLinkFailoverAllTestsDetails, + getStats, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + ExpressRouteCircuitsGetPeeringStatsOptionalParams, + ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, + ExpressRouteCircuitsListRoutesTableOptionalParams, + ExpressRouteCircuitsListArpTableOptionalParams, + ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams, + ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams, + ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams, + ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams, + ExpressRouteCircuitsGetStatsOptionalParams, + ExpressRouteCircuitsListAllOptionalParams, + ExpressRouteCircuitsListOptionalParams, + ExpressRouteCircuitsDeleteOptionalParams, + ExpressRouteCircuitsUpdateTagsOptionalParams, + ExpressRouteCircuitsCreateOrUpdateOptionalParams, + ExpressRouteCircuitsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRouteCircuits/operations.ts b/sdk/network/arm-network/src/api/expressRouteCircuits/operations.ts new file mode 100644 index 000000000000..adb81001fd10 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuits/operations.ts @@ -0,0 +1,1014 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + ExpressRouteCircuit, + expressRouteCircuitSerializer, + expressRouteCircuitDeserializer, + ExpressRouteCircuitStats, + expressRouteCircuitStatsDeserializer, + ExpressRouteLinkFailoverAllTestsDetails, + ExpressRouteLinkFailoverSingleTestDetails, + ExpressRouteLinkFailoverStopApiParameters, + expressRouteLinkFailoverStopApiParametersSerializer, + ExpressRouteCircuitsArpTableListResult, + expressRouteCircuitsArpTableListResultDeserializer, + ExpressRouteCircuitsRoutesTableListResult, + expressRouteCircuitsRoutesTableListResultDeserializer, + ExpressRouteCircuitsRoutesTableSummaryListResult, + expressRouteCircuitsRoutesTableSummaryListResultDeserializer, + expressRouteLinkFailoverAllTestsDetailsArrayDeserializer, + expressRouteLinkFailoverSingleTestDetailsArrayDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _ExpressRouteCircuitListResult, + _expressRouteCircuitListResultDeserializer, + ExpressRouteCircuitsStopCircuitLinkFailoverTestResponse, + ExpressRouteCircuitsStartCircuitLinkFailoverTestResponse, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRouteCircuitsGetPeeringStatsOptionalParams, + ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, + ExpressRouteCircuitsListRoutesTableOptionalParams, + ExpressRouteCircuitsListArpTableOptionalParams, + ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams, + ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams, + ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams, + ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams, + ExpressRouteCircuitsGetStatsOptionalParams, + ExpressRouteCircuitsListAllOptionalParams, + ExpressRouteCircuitsListOptionalParams, + ExpressRouteCircuitsDeleteOptionalParams, + ExpressRouteCircuitsUpdateTagsOptionalParams, + ExpressRouteCircuitsCreateOrUpdateOptionalParams, + ExpressRouteCircuitsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getPeeringStatsSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + options: ExpressRouteCircuitsGetPeeringStatsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getPeeringStatsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitStatsDeserializer(result.body); +} + +/** Gets all stats from an express route circuit in a resource group. */ +export async function getPeeringStats( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + options: ExpressRouteCircuitsGetPeeringStatsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getPeeringStatsSend( + context, + resourceGroupName, + circuitName, + peeringName, + options, + ); + return _getPeeringStatsDeserialize(result); +} + +export function _listRoutesTableSummarySend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + devicePath: devicePath, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listRoutesTableSummaryDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitsRoutesTableSummaryListResultDeserializer(result.body); +} + +/** Gets the currently advertised routes table summary associated with the express route circuit in a resource group. */ +export function listRoutesTableSummary( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableSummaryListResult +> { + return getLongRunningPoller(context, _listRoutesTableSummaryDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listRoutesTableSummarySend( + context, + resourceGroupName, + circuitName, + peeringName, + devicePath, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableSummaryListResult + >; +} + +export function _listRoutesTableSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCircuitsListRoutesTableOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + devicePath: devicePath, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listRoutesTableDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitsRoutesTableListResultDeserializer(result.body); +} + +/** Gets the currently advertised routes table associated with the express route circuit in a resource group. */ +export function listRoutesTable( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCircuitsListRoutesTableOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableListResult +> { + return getLongRunningPoller(context, _listRoutesTableDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listRoutesTableSend( + context, + resourceGroupName, + circuitName, + peeringName, + devicePath, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableListResult + >; +} + +export function _listArpTableSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCircuitsListArpTableOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + devicePath: devicePath, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listArpTableDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitsArpTableListResultDeserializer(result.body); +} + +/** Gets the currently advertised ARP table associated with the express route circuit in a resource group. */ +export function listArpTable( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCircuitsListArpTableOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteCircuitsArpTableListResult +> { + return getLongRunningPoller(context, _listArpTableDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listArpTableSend(context, resourceGroupName, circuitName, peeringName, devicePath, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ExpressRouteCircuitsArpTableListResult + >; +} + +export function _stopCircuitLinkFailoverTestSend( + context: Client, + resourceGroupName: string, + circuitName: string, + body: { + stopParameters: ExpressRouteLinkFailoverStopApiParameters; + }, + options: ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stopCircuitLinkFailoverTest{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRouteLinkFailoverStopApiParametersSerializer(body.stopParameters), + }); +} + +export async function _stopCircuitLinkFailoverTestDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Stops link failover simulation on the express route circuit. */ +export function stopCircuitLinkFailoverTest( + context: Client, + resourceGroupName: string, + circuitName: string, + body: { + stopParameters: ExpressRouteLinkFailoverStopApiParameters; + }, + options: ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteCircuitsStopCircuitLinkFailoverTestResponse +> { + return getLongRunningPoller( + context, + _stopCircuitLinkFailoverTestDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopCircuitLinkFailoverTestSend(context, resourceGroupName, circuitName, body, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + ExpressRouteCircuitsStopCircuitLinkFailoverTestResponse + >; +} + +export function _startCircuitLinkFailoverTestSend( + context: Client, + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + options: ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/startCircuitLinkFailoverTest{?api%2Dversion,linkType,circuitTestCategory}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + "api%2Dversion": "2025-07-01", + linkType: linkType, + circuitTestCategory: circuitTestCategory, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _startCircuitLinkFailoverTestDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Starts link failover simulation on the express route circuit for the specified link type and test category. */ +export function startCircuitLinkFailoverTest( + context: Client, + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + options: ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteCircuitsStartCircuitLinkFailoverTestResponse +> { + return getLongRunningPoller( + context, + _startCircuitLinkFailoverTestDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startCircuitLinkFailoverTestSend( + context, + resourceGroupName, + circuitName, + linkType, + circuitTestCategory, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + ExpressRouteCircuitsStartCircuitLinkFailoverTestResponse + >; +} + +export function _getCircuitLinkFailoverSingleTestDetailsSend( + context: Client, + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + failoverTestId: string, + options: ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/getCircuitLinkFailoverSingleTestDetails{?api%2Dversion,linkType,circuitTestCategory,failoverTestId}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + "api%2Dversion": "2025-07-01", + linkType: linkType, + circuitTestCategory: circuitTestCategory, + failoverTestId: failoverTestId, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getCircuitLinkFailoverSingleTestDetailsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteLinkFailoverSingleTestDetailsArrayDeserializer(result.body); +} + +/** Retrieves the details of a particular link failover test performed on the express route circuit. */ +export function getCircuitLinkFailoverSingleTestDetails( + context: Client, + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + failoverTestId: string, + options: ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + ExpressRouteLinkFailoverSingleTestDetails[] +> { + return getLongRunningPoller( + context, + _getCircuitLinkFailoverSingleTestDetailsDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getCircuitLinkFailoverSingleTestDetailsSend( + context, + resourceGroupName, + circuitName, + linkType, + circuitTestCategory, + failoverTestId, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + ExpressRouteLinkFailoverSingleTestDetails[] + >; +} + +export function _getCircuitLinkFailoverAllTestsDetailsSend( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/getCircuitLinkFailoverAllTestsDetails{?api%2Dversion,failoverTestType,fetchLatest}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + "api%2Dversion": "2025-07-01", + failoverTestType: options?.failoverTestType, + fetchLatest: options?.fetchLatest, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getCircuitLinkFailoverAllTestsDetailsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteLinkFailoverAllTestsDetailsArrayDeserializer(result.body); +} + +/** Retrieves the details of all the link failover tests performed on the express route circuit. */ +export function getCircuitLinkFailoverAllTestsDetails( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + ExpressRouteLinkFailoverAllTestsDetails[] +> { + return getLongRunningPoller( + context, + _getCircuitLinkFailoverAllTestsDetailsDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getCircuitLinkFailoverAllTestsDetailsSend( + context, + resourceGroupName, + circuitName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + ExpressRouteLinkFailoverAllTestsDetails[] + >; +} + +export function _getStatsSend( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitsGetStatsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getStatsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitStatsDeserializer(result.body); +} + +/** Gets all the stats from an express route circuit in a resource group. */ +export async function getStats( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitsGetStatsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getStatsSend(context, resourceGroupName, circuitName, options); + return _getStatsDeserialize(result); +} + +export function _listAllSend( + context: Client, + options: ExpressRouteCircuitsListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRouteCircuitListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRouteCircuitListResultDeserializer(result.body); +} + +/** Gets all the express route circuits in a subscription. */ +export function listAll( + context: Client, + options: ExpressRouteCircuitsListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: ExpressRouteCircuitsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRouteCircuitListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRouteCircuitListResultDeserializer(result.body); +} + +/** Gets all the express route circuits in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: ExpressRouteCircuitsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified express route circuit. */ +export function $delete( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, circuitName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + circuitName: string, + parameters: TagsObject, + options: ExpressRouteCircuitsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitDeserializer(result.body); +} + +/** Updates an express route circuit tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + circuitName: string, + parameters: TagsObject, + options: ExpressRouteCircuitsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + circuitName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + circuitName: string, + parameters: ExpressRouteCircuit, + options: ExpressRouteCircuitsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRouteCircuitSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitDeserializer(result.body); +} + +/** Creates or updates an express route circuit. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + circuitName: string, + parameters: ExpressRouteCircuit, + options: ExpressRouteCircuitsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ExpressRouteCircuit> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, circuitName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ExpressRouteCircuit>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitDeserializer(result.body); +} + +/** Gets information about the specified express route circuit. */ +export async function get( + context: Client, + resourceGroupName: string, + circuitName: string, + options: ExpressRouteCircuitsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, circuitName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/expressRouteCircuits/options.ts b/sdk/network/arm-network/src/api/expressRouteCircuits/options.ts new file mode 100644 index 000000000000..f4566ba8cfa9 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCircuits/options.ts @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRouteCircuitsGetPeeringStatsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsListRoutesTableSummaryOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsListRoutesTableOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsListArpTableOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The type of failover test. */ + failoverTestType?: string; + /** Fetch only the latest tests. */ + fetchLatest?: boolean; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsGetStatsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCircuitsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRouteConnections/index.ts b/sdk/network/arm-network/src/api/expressRouteConnections/index.ts new file mode 100644 index 000000000000..93acfbb98292 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteConnections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, get, createOrUpdate } from "./operations.js"; +export type { + ExpressRouteConnectionsListOptionalParams, + ExpressRouteConnectionsDeleteOptionalParams, + ExpressRouteConnectionsGetOptionalParams, + ExpressRouteConnectionsCreateOrUpdateOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRouteConnections/operations.ts b/sdk/network/arm-network/src/api/expressRouteConnections/operations.ts new file mode 100644 index 000000000000..715993369067 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteConnections/operations.ts @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ExpressRouteConnection, + expressRouteConnectionSerializer, + expressRouteConnectionDeserializer, + ExpressRouteConnectionList, + expressRouteConnectionListDeserializer, +} from "../../models/microsoft/network/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRouteConnectionsListOptionalParams, + ExpressRouteConnectionsDeleteOptionalParams, + ExpressRouteConnectionsGetOptionalParams, + ExpressRouteConnectionsCreateOrUpdateOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteConnectionListDeserializer(result.body); +} + +/** Lists ExpressRouteConnections. */ +export async function list( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteConnectionsListOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSend(context, resourceGroupName, expressRouteGatewayName, options); + return _listDeserialize(result); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options: ExpressRouteConnectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a connection to a ExpressRoute circuit. */ +export function $delete( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options: ExpressRouteConnectionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, expressRouteGatewayName, connectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options: ExpressRouteConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteConnectionDeserializer(result.body); +} + +/** Gets the specified ExpressRouteConnection. */ +export async function get( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options: ExpressRouteConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + expressRouteGatewayName, + connectionName, + options, + ); + return _getDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + putExpressRouteConnectionParameters: ExpressRouteConnection, + options: ExpressRouteConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRouteConnectionSerializer(putExpressRouteConnectionParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteConnectionDeserializer(result.body); +} + +/** Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + putExpressRouteConnectionParameters: ExpressRouteConnection, + options: ExpressRouteConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ExpressRouteConnection> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + expressRouteGatewayName, + connectionName, + putExpressRouteConnectionParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ExpressRouteConnection>; +} diff --git a/sdk/network/arm-network/src/api/expressRouteConnections/options.ts b/sdk/network/arm-network/src/api/expressRouteConnections/options.ts new file mode 100644 index 000000000000..30bdc7fc523c --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteConnections/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRouteConnectionsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteConnectionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteConnectionsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteConnectionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/index.ts b/sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/index.ts new file mode 100644 index 000000000000..56781df45c6d --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { createOrUpdate, get, $delete, list } from "./operations.js"; +export type { + ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, + ExpressRouteCrossConnectionPeeringsGetOptionalParams, + ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, + ExpressRouteCrossConnectionPeeringsListOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/operations.ts b/sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/operations.ts new file mode 100644 index 000000000000..4872c1ff3165 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/operations.ts @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ExpressRouteCrossConnectionPeering, + expressRouteCrossConnectionPeeringSerializer, + expressRouteCrossConnectionPeeringDeserializer, + _ExpressRouteCrossConnectionPeeringList, + _expressRouteCrossConnectionPeeringListDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, + ExpressRouteCrossConnectionPeeringsGetOptionalParams, + ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, + ExpressRouteCrossConnectionPeeringsListOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + peeringParameters: ExpressRouteCrossConnectionPeering, + options: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + crossConnectionName: crossConnectionName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRouteCrossConnectionPeeringSerializer(peeringParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCrossConnectionPeeringDeserializer(result.body); +} + +/** Creates or updates a peering in the specified ExpressRouteCrossConnection. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + peeringParameters: ExpressRouteCrossConnectionPeering, + options: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteCrossConnectionPeering +> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + crossConnectionName, + peeringName, + peeringParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ExpressRouteCrossConnectionPeering + >; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options: ExpressRouteCrossConnectionPeeringsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + crossConnectionName: crossConnectionName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCrossConnectionPeeringDeserializer(result.body); +} + +/** Gets the specified peering for the ExpressRouteCrossConnection. */ +export async function get( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options: ExpressRouteCrossConnectionPeeringsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + crossConnectionName, + peeringName, + options, + ); + return _getDeserialize(result); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + crossConnectionName: crossConnectionName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified peering from the ExpressRouteCrossConnection. */ +export function $delete( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, crossConnectionName, peeringName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _listSend( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + options: ExpressRouteCrossConnectionPeeringsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + crossConnectionName: crossConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRouteCrossConnectionPeeringList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRouteCrossConnectionPeeringListDeserializer(result.body); +} + +/** Gets all peerings in a specified ExpressRouteCrossConnection. */ +export function list( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + options: ExpressRouteCrossConnectionPeeringsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, crossConnectionName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/options.ts b/sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/options.ts new file mode 100644 index 000000000000..e04d25eb1dea --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCrossConnectionPeerings/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionPeeringsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionPeeringsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionPeeringsListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRouteCrossConnections/index.ts b/sdk/network/arm-network/src/api/expressRouteCrossConnections/index.ts new file mode 100644 index 000000000000..1e2a1a43a1ca --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCrossConnections/index.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listRoutesTable, + listRoutesTableSummary, + listArpTable, + list, + listByResourceGroup, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + ExpressRouteCrossConnectionsListRoutesTableOptionalParams, + ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, + ExpressRouteCrossConnectionsListArpTableOptionalParams, + ExpressRouteCrossConnectionsListOptionalParams, + ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, + ExpressRouteCrossConnectionsUpdateTagsOptionalParams, + ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, + ExpressRouteCrossConnectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRouteCrossConnections/operations.ts b/sdk/network/arm-network/src/api/expressRouteCrossConnections/operations.ts new file mode 100644 index 000000000000..b0f4b4b4c7c2 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCrossConnections/operations.ts @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + ExpressRouteCircuitsArpTableListResult, + expressRouteCircuitsArpTableListResultDeserializer, + ExpressRouteCircuitsRoutesTableListResult, + expressRouteCircuitsRoutesTableListResultDeserializer, + ExpressRouteCrossConnection, + expressRouteCrossConnectionSerializer, + expressRouteCrossConnectionDeserializer, + ExpressRouteCrossConnectionsRoutesTableSummaryListResult, + expressRouteCrossConnectionsRoutesTableSummaryListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _ExpressRouteCrossConnectionListResult, + _expressRouteCrossConnectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRouteCrossConnectionsListRoutesTableOptionalParams, + ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, + ExpressRouteCrossConnectionsListArpTableOptionalParams, + ExpressRouteCrossConnectionsListOptionalParams, + ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, + ExpressRouteCrossConnectionsUpdateTagsOptionalParams, + ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, + ExpressRouteCrossConnectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listRoutesTableSend( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCrossConnectionsListRoutesTableOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + crossConnectionName: crossConnectionName, + peeringName: peeringName, + devicePath: devicePath, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listRoutesTableDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitsRoutesTableListResultDeserializer(result.body); +} + +/** Gets the currently advertised routes table associated with the express route cross connection in a resource group. */ +export function listRoutesTable( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCrossConnectionsListRoutesTableOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableListResult +> { + return getLongRunningPoller(context, _listRoutesTableDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listRoutesTableSend( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableListResult + >; +} + +export function _listRoutesTableSummarySend( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + crossConnectionName: crossConnectionName, + peeringName: peeringName, + devicePath: devicePath, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listRoutesTableSummaryDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCrossConnectionsRoutesTableSummaryListResultDeserializer(result.body); +} + +/** Gets the route table summary associated with the express route cross connection in a resource group. */ +export function listRoutesTableSummary( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + ExpressRouteCrossConnectionsRoutesTableSummaryListResult +> { + return getLongRunningPoller(context, _listRoutesTableSummaryDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listRoutesTableSummarySend( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ExpressRouteCrossConnectionsRoutesTableSummaryListResult + >; +} + +export function _listArpTableSend( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCrossConnectionsListArpTableOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + crossConnectionName: crossConnectionName, + peeringName: peeringName, + devicePath: devicePath, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listArpTableDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCircuitsArpTableListResultDeserializer(result.body); +} + +/** Gets the currently advertised ARP table associated with the express route cross connection in a resource group. */ +export function listArpTable( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options: ExpressRouteCrossConnectionsListArpTableOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteCircuitsArpTableListResult +> { + return getLongRunningPoller(context, _listArpTableDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listArpTableSend( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ExpressRouteCircuitsArpTableListResult + >; +} + +export function _listSend( + context: Client, + options: ExpressRouteCrossConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections{?api%2Dversion,%24filter}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + "%24filter": options?.filter, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRouteCrossConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRouteCrossConnectionListResultDeserializer(result.body); +} + +/** Retrieves all the ExpressRouteCrossConnections in a subscription. */ +export function list( + context: Client, + options: ExpressRouteCrossConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: ExpressRouteCrossConnectionsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRouteCrossConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRouteCrossConnectionListResultDeserializer(result.body); +} + +/** Retrieves all the ExpressRouteCrossConnections in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: ExpressRouteCrossConnectionsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + crossConnectionParameters: TagsObject, + options: ExpressRouteCrossConnectionsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + crossConnectionName: crossConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(crossConnectionParameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCrossConnectionDeserializer(result.body); +} + +/** Updates an express route cross connection tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + crossConnectionParameters: TagsObject, + options: ExpressRouteCrossConnectionsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + crossConnectionName, + crossConnectionParameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + parameters: ExpressRouteCrossConnection, + options: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + crossConnectionName: crossConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRouteCrossConnectionSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCrossConnectionDeserializer(result.body); +} + +/** Update the specified ExpressRouteCrossConnection. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + parameters: ExpressRouteCrossConnection, + options: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ExpressRouteCrossConnection> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, crossConnectionName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ExpressRouteCrossConnection>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + options: ExpressRouteCrossConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + crossConnectionName: crossConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteCrossConnectionDeserializer(result.body); +} + +/** Gets details about the specified ExpressRouteCrossConnection. */ +export async function get( + context: Client, + resourceGroupName: string, + crossConnectionName: string, + options: ExpressRouteCrossConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, crossConnectionName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/expressRouteCrossConnections/options.ts b/sdk/network/arm-network/src/api/expressRouteCrossConnections/options.ts new file mode 100644 index 000000000000..8b09910e6c69 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteCrossConnections/options.ts @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionsListRoutesTableOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionsListArpTableOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionsListOptionalParams extends OperationOptions { + /** The filter to apply on the operation. For example, you can use $filter=name eq '{circuitServiceKey}'. */ + filter?: string; +} + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteCrossConnectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRouteGateways/index.ts b/sdk/network/arm-network/src/api/expressRouteGateways/index.ts new file mode 100644 index 000000000000..17d8244320c7 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteGateways/index.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + getResiliencyInformation, + getRoutesInformation, + stopSiteFailoverTest, + startSiteFailoverTest, + getFailoverSingleTestDetails, + getFailoverAllTestsDetails, + listBySubscription, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + ExpressRouteGatewaysGetResiliencyInformationOptionalParams, + ExpressRouteGatewaysGetRoutesInformationOptionalParams, + ExpressRouteGatewaysStopSiteFailoverTestOptionalParams, + ExpressRouteGatewaysStartSiteFailoverTestOptionalParams, + ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams, + ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams, + ExpressRouteGatewaysListBySubscriptionOptionalParams, + ExpressRouteGatewaysListByResourceGroupOptionalParams, + ExpressRouteGatewaysDeleteOptionalParams, + ExpressRouteGatewaysUpdateTagsOptionalParams, + ExpressRouteGatewaysCreateOrUpdateOptionalParams, + ExpressRouteGatewaysGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRouteGateways/operations.ts b/sdk/network/arm-network/src/api/expressRouteGateways/operations.ts new file mode 100644 index 000000000000..7b6b491d731e --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteGateways/operations.ts @@ -0,0 +1,775 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + GatewayResiliencyInformation, + gatewayResiliencyInformationDeserializer, + GatewayRouteSetsInformation, + gatewayRouteSetsInformationDeserializer, + ExpressRouteFailoverTestDetails, + ExpressRouteFailoverSingleTestDetails, + ExpressRouteFailoverStopApiParameters, + expressRouteFailoverStopApiParametersSerializer, + ExpressRouteGateway, + expressRouteGatewaySerializer, + expressRouteGatewayDeserializer, + ExpressRouteGatewayList, + expressRouteGatewayListDeserializer, + expressRouteFailoverTestDetailsArrayDeserializer, + expressRouteFailoverSingleTestDetailsArrayDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + ExpressRouteGatewaysStopSiteFailoverTestResponse, + ExpressRouteGatewaysStartSiteFailoverTestResponse, +} from "../../models/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRouteGatewaysGetResiliencyInformationOptionalParams, + ExpressRouteGatewaysGetRoutesInformationOptionalParams, + ExpressRouteGatewaysStopSiteFailoverTestOptionalParams, + ExpressRouteGatewaysStartSiteFailoverTestOptionalParams, + ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams, + ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams, + ExpressRouteGatewaysListBySubscriptionOptionalParams, + ExpressRouteGatewaysListByResourceGroupOptionalParams, + ExpressRouteGatewaysDeleteOptionalParams, + ExpressRouteGatewaysUpdateTagsOptionalParams, + ExpressRouteGatewaysCreateOrUpdateOptionalParams, + ExpressRouteGatewaysGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getResiliencyInformationSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteGatewaysGetResiliencyInformationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/getResiliencyInformation{?api%2Dversion,attemptRefresh}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + "api%2Dversion": "2025-07-01", + attemptRefresh: options?.attemptRefresh, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getResiliencyInformationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return gatewayResiliencyInformationDeserializer(result.body); +} + +/** Retrieves the resiliency information for the ExpressRoute gateway. */ +export function getResiliencyInformation( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteGatewaysGetResiliencyInformationOptionalParams = { requestOptions: {} }, +): PollerLike, GatewayResiliencyInformation> { + return getLongRunningPoller( + context, + _getResiliencyInformationDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getResiliencyInformationSend(context, resourceGroupName, expressRouteGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, GatewayResiliencyInformation>; +} + +export function _getRoutesInformationSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteGatewaysGetRoutesInformationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/getRoutesInformation{?api%2Dversion,attemptRefresh}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + "api%2Dversion": "2025-07-01", + attemptRefresh: options?.attemptRefresh, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getRoutesInformationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return gatewayRouteSetsInformationDeserializer(result.body); +} + +/** Retrieves the route sets information for the ExpressRoute gateway. */ +export function getRoutesInformation( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteGatewaysGetRoutesInformationOptionalParams = { requestOptions: {} }, +): PollerLike, GatewayRouteSetsInformation> { + return getLongRunningPoller(context, _getRoutesInformationDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getRoutesInformationSend(context, resourceGroupName, expressRouteGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, GatewayRouteSetsInformation>; +} + +export function _stopSiteFailoverTestSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + body: { + stopParameters: ExpressRouteFailoverStopApiParameters; + }, + options: ExpressRouteGatewaysStopSiteFailoverTestOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/stopSiteFailoverTest{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRouteFailoverStopApiParametersSerializer(body.stopParameters), + }); +} + +export async function _stopSiteFailoverTestDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Stops failover simulation on the ExpressRoute gateway for the specified peering location. */ +export function stopSiteFailoverTest( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + body: { + stopParameters: ExpressRouteFailoverStopApiParameters; + }, + options: ExpressRouteGatewaysStopSiteFailoverTestOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteGatewaysStopSiteFailoverTestResponse +> { + return getLongRunningPoller(context, _stopSiteFailoverTestDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopSiteFailoverTestSend(context, resourceGroupName, expressRouteGatewayName, body, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ExpressRouteGatewaysStopSiteFailoverTestResponse + >; +} + +export function _startSiteFailoverTestSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + options: ExpressRouteGatewaysStartSiteFailoverTestOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/startSiteFailoverTest{?api%2Dversion,peeringLocation}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + "api%2Dversion": "2025-07-01", + peeringLocation: peeringLocation, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _startSiteFailoverTestDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Starts failover simulation on the ExpressRoute gateway for the specified peering location. */ +export function startSiteFailoverTest( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + options: ExpressRouteGatewaysStartSiteFailoverTestOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteGatewaysStartSiteFailoverTestResponse +> { + return getLongRunningPoller(context, _startSiteFailoverTestDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startSiteFailoverTestSend( + context, + resourceGroupName, + expressRouteGatewayName, + peeringLocation, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ExpressRouteGatewaysStartSiteFailoverTestResponse + >; +} + +export function _getFailoverSingleTestDetailsSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options: ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/getFailoverSingleTestDetails{?api%2Dversion,peeringLocation,failoverTestId}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + "api%2Dversion": "2025-07-01", + peeringLocation: peeringLocation, + failoverTestId: failoverTestId, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getFailoverSingleTestDetailsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteFailoverSingleTestDetailsArrayDeserializer(result.body); +} + +/** Retrieves the details of a particular failover test performed on the ExpressRoute gateway based on the test Guid. */ +export function getFailoverSingleTestDetails( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options: ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteFailoverSingleTestDetails[] +> { + return getLongRunningPoller( + context, + _getFailoverSingleTestDetailsDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getFailoverSingleTestDetailsSend( + context, + resourceGroupName, + expressRouteGatewayName, + peeringLocation, + failoverTestId, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + ExpressRouteFailoverSingleTestDetails[] + >; +} + +export function _getFailoverAllTestsDetailsSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/getFailoverAllTestsDetails{?api%2Dversion,type,fetchLatest}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + "api%2Dversion": "2025-07-01", + type: options?.typeParam, + fetchLatest: options?.fetchLatest, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getFailoverAllTestsDetailsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteFailoverTestDetailsArrayDeserializer(result.body); +} + +/** Retrieves the details of all the failover tests performed on the ExpressRoute gateway for different peering locations. */ +export function getFailoverAllTestsDetails( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteFailoverTestDetails[] +> { + return getLongRunningPoller( + context, + _getFailoverAllTestsDetailsDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getFailoverAllTestsDetailsSend( + context, + resourceGroupName, + expressRouteGatewayName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + ExpressRouteFailoverTestDetails[] + >; +} + +export function _listBySubscriptionSend( + context: Client, + options: ExpressRouteGatewaysListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteGatewayListDeserializer(result.body); +} + +/** Lists ExpressRoute gateways under a given subscription. */ +export async function listBySubscription( + context: Client, + options: ExpressRouteGatewaysListBySubscriptionOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listBySubscriptionSend(context, options); + return _listBySubscriptionDeserialize(result); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: ExpressRouteGatewaysListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteGatewayListDeserializer(result.body); +} + +/** Lists ExpressRoute gateways in a given resource group. */ +export async function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: ExpressRouteGatewaysListByResourceGroupOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByResourceGroupSend(context, resourceGroupName, options); + return _listByResourceGroupDeserialize(result); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteGatewaysDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. */ +export function $delete( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteGatewaysDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, expressRouteGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + expressRouteGatewayParameters: TagsObject, + options: ExpressRouteGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(expressRouteGatewayParameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteGatewayDeserializer(result.body); +} + +/** Updates express route gateway tags. */ +export function updateTags( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + expressRouteGatewayParameters: TagsObject, + options: ExpressRouteGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): PollerLike, ExpressRouteGateway> { + return getLongRunningPoller(context, _updateTagsDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateTagsSend( + context, + resourceGroupName, + expressRouteGatewayName, + expressRouteGatewayParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ExpressRouteGateway>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + putExpressRouteGatewayParameters: ExpressRouteGateway, + options: ExpressRouteGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRouteGatewaySerializer(putExpressRouteGatewayParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteGatewayDeserializer(result.body); +} + +/** Creates or updates a ExpressRoute gateway in a specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + putExpressRouteGatewayParameters: ExpressRouteGateway, + options: ExpressRouteGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ExpressRouteGateway> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + expressRouteGatewayName, + putExpressRouteGatewayParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ExpressRouteGateway>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteGatewaysGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRouteGatewayName: expressRouteGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteGatewayDeserializer(result.body); +} + +/** Fetches the details of a ExpressRoute gateway in a resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + expressRouteGatewayName: string, + options: ExpressRouteGatewaysGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, expressRouteGatewayName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/expressRouteGateways/options.ts b/sdk/network/arm-network/src/api/expressRouteGateways/options.ts new file mode 100644 index 000000000000..7c8a54d2a6d7 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteGateways/options.ts @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRouteGatewaysGetResiliencyInformationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Whether to attempt a refresh of the resiliency information. */ + attemptRefresh?: boolean; +} + +/** Optional parameters. */ +export interface ExpressRouteGatewaysGetRoutesInformationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Whether to attempt a refresh of the route sets. */ + attemptRefresh?: boolean; +} + +/** Optional parameters. */ +export interface ExpressRouteGatewaysStopSiteFailoverTestOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteGatewaysStartSiteFailoverTestOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The type of failover test. */ + typeParam?: string; + /** Fetch only the latest tests for each peering location. */ + fetchLatest?: boolean; +} + +/** Optional parameters. */ +export interface ExpressRouteGatewaysListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteGatewaysListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteGatewaysDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteGatewaysUpdateTagsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteGatewaysCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteGatewaysGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRouteLinks/index.ts b/sdk/network/arm-network/src/api/expressRouteLinks/index.ts new file mode 100644 index 000000000000..0d118e9843b1 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteLinks/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export type { + ExpressRouteLinksListOptionalParams, + ExpressRouteLinksGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRouteLinks/operations.ts b/sdk/network/arm-network/src/api/expressRouteLinks/operations.ts new file mode 100644 index 000000000000..0cbf2f17d634 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteLinks/operations.ts @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ExpressRouteLink, + expressRouteLinkDeserializer, + _ExpressRouteLinkListResult, + _expressRouteLinkListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRouteLinksListOptionalParams, + ExpressRouteLinksGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + options: ExpressRouteLinksListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRoutePortName: expressRoutePortName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRouteLinkListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRouteLinkListResultDeserializer(result.body); +} + +/** Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. */ +export function list( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + options: ExpressRouteLinksListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, expressRoutePortName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + linkName: string, + options: ExpressRouteLinksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRoutePortName: expressRoutePortName, + linkName: linkName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteLinkDeserializer(result.body); +} + +/** Retrieves the specified ExpressRouteLink resource. */ +export async function get( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + linkName: string, + options: ExpressRouteLinksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + expressRoutePortName, + linkName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/expressRouteLinks/options.ts b/sdk/network/arm-network/src/api/expressRouteLinks/options.ts new file mode 100644 index 000000000000..eb010681b6a0 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteLinks/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRouteLinksListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRouteLinksGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRoutePortAuthorizations/index.ts b/sdk/network/arm-network/src/api/expressRoutePortAuthorizations/index.ts new file mode 100644 index 000000000000..c47e0b2ea897 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRoutePortAuthorizations/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ExpressRoutePortAuthorizationsListOptionalParams, + ExpressRoutePortAuthorizationsDeleteOptionalParams, + ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ExpressRoutePortAuthorizationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRoutePortAuthorizations/operations.ts b/sdk/network/arm-network/src/api/expressRoutePortAuthorizations/operations.ts new file mode 100644 index 000000000000..6c2f745ace81 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRoutePortAuthorizations/operations.ts @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ExpressRoutePortAuthorization, + expressRoutePortAuthorizationSerializer, + expressRoutePortAuthorizationDeserializer, + _ExpressRoutePortAuthorizationListResult, + _expressRoutePortAuthorizationListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRoutePortAuthorizationsListOptionalParams, + ExpressRoutePortAuthorizationsDeleteOptionalParams, + ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ExpressRoutePortAuthorizationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + options: ExpressRoutePortAuthorizationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRoutePortName: expressRoutePortName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRoutePortAuthorizationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRoutePortAuthorizationListResultDeserializer(result.body); +} + +/** Gets all authorizations in an express route port. */ +export function list( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + options: ExpressRoutePortAuthorizationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, expressRoutePortName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options: ExpressRoutePortAuthorizationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRoutePortName: expressRoutePortName, + authorizationName: authorizationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified authorization from the specified express route port. */ +export function $delete( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options: ExpressRoutePortAuthorizationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, expressRoutePortName, authorizationName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRoutePortName: expressRoutePortName, + authorizationName: authorizationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRoutePortAuthorizationSerializer(authorizationParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRoutePortAuthorizationDeserializer(result.body); +} + +/** Creates or updates an authorization in the specified express route port. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ExpressRoutePortAuthorization> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + expressRoutePortName, + authorizationName, + authorizationParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ExpressRoutePortAuthorization>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options: ExpressRoutePortAuthorizationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRoutePortName: expressRoutePortName, + authorizationName: authorizationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRoutePortAuthorizationDeserializer(result.body); +} + +/** Gets the specified authorization from the specified express route port. */ +export async function get( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options: ExpressRoutePortAuthorizationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + expressRoutePortName, + authorizationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/expressRoutePortAuthorizations/options.ts b/sdk/network/arm-network/src/api/expressRoutePortAuthorizations/options.ts new file mode 100644 index 000000000000..ec1cd68cec34 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRoutePortAuthorizations/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRoutePorts/index.ts b/sdk/network/arm-network/src/api/expressRoutePorts/index.ts new file mode 100644 index 000000000000..f9b68ab593c7 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRoutePorts/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + generateLOA, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + ExpressRoutePortsGenerateLOAOptionalParams, + ExpressRoutePortsListOptionalParams, + ExpressRoutePortsListByResourceGroupOptionalParams, + ExpressRoutePortsDeleteOptionalParams, + ExpressRoutePortsUpdateTagsOptionalParams, + ExpressRoutePortsCreateOrUpdateOptionalParams, + ExpressRoutePortsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRoutePorts/operations.ts b/sdk/network/arm-network/src/api/expressRoutePorts/operations.ts new file mode 100644 index 000000000000..a2bb855e9a78 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRoutePorts/operations.ts @@ -0,0 +1,413 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + ExpressRoutePort, + expressRoutePortSerializer, + expressRoutePortDeserializer, + _ExpressRoutePortListResult, + _expressRoutePortListResultDeserializer, + GenerateExpressRoutePortsLOARequest, + generateExpressRoutePortsLOARequestSerializer, + GenerateExpressRoutePortsLOAResult, + generateExpressRoutePortsLOAResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRoutePortsGenerateLOAOptionalParams, + ExpressRoutePortsListOptionalParams, + ExpressRoutePortsListByResourceGroupOptionalParams, + ExpressRoutePortsDeleteOptionalParams, + ExpressRoutePortsUpdateTagsOptionalParams, + ExpressRoutePortsCreateOrUpdateOptionalParams, + ExpressRoutePortsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _generateLOASend( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + request: GenerateExpressRoutePortsLOARequest, + options: ExpressRoutePortsGenerateLOAOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/generateLoa{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRoutePortName: expressRoutePortName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: generateExpressRoutePortsLOARequestSerializer(request), + }); +} + +export async function _generateLOADeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return generateExpressRoutePortsLOAResultDeserializer(result.body); +} + +/** Generate a letter of authorization for the requested ExpressRoutePort resource. */ +export async function generateLOA( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + request: GenerateExpressRoutePortsLOARequest, + options: ExpressRoutePortsGenerateLOAOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _generateLOASend( + context, + resourceGroupName, + expressRoutePortName, + request, + options, + ); + return _generateLOADeserialize(result); +} + +export function _listSend( + context: Client, + options: ExpressRoutePortsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRoutePortListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRoutePortListResultDeserializer(result.body); +} + +/** List all the ExpressRoutePort resources in the specified subscription. */ +export function list( + context: Client, + options: ExpressRoutePortsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: ExpressRoutePortsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRoutePortListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRoutePortListResultDeserializer(result.body); +} + +/** List all the ExpressRoutePort resources in the specified resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: ExpressRoutePortsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + options: ExpressRoutePortsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRoutePortName: expressRoutePortName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified ExpressRoutePort resource. */ +export function $delete( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + options: ExpressRoutePortsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, expressRoutePortName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + parameters: TagsObject, + options: ExpressRoutePortsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRoutePortName: expressRoutePortName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRoutePortDeserializer(result.body); +} + +/** Update ExpressRoutePort tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + parameters: TagsObject, + options: ExpressRoutePortsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + expressRoutePortName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + parameters: ExpressRoutePort, + options: ExpressRoutePortsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRoutePortName: expressRoutePortName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRoutePortSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRoutePortDeserializer(result.body); +} + +/** Creates or updates the specified ExpressRoutePort resource. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + parameters: ExpressRoutePort, + options: ExpressRoutePortsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ExpressRoutePort> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, expressRoutePortName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ExpressRoutePort>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + options: ExpressRoutePortsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + expressRoutePortName: expressRoutePortName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRoutePortDeserializer(result.body); +} + +/** Retrieves the requested ExpressRoutePort resource. */ +export async function get( + context: Client, + resourceGroupName: string, + expressRoutePortName: string, + options: ExpressRoutePortsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, expressRoutePortName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/expressRoutePorts/options.ts b/sdk/network/arm-network/src/api/expressRoutePorts/options.ts new file mode 100644 index 000000000000..4ecce390d731 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRoutePorts/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRoutePortsGenerateLOAOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRoutePortsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRoutePortsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRoutePortsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRoutePortsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRoutePortsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ExpressRoutePortsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRoutePortsLocations/index.ts b/sdk/network/arm-network/src/api/expressRoutePortsLocations/index.ts new file mode 100644 index 000000000000..86bc823e6013 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRoutePortsLocations/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export type { + ExpressRoutePortsLocationsListOptionalParams, + ExpressRoutePortsLocationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRoutePortsLocations/operations.ts b/sdk/network/arm-network/src/api/expressRoutePortsLocations/operations.ts new file mode 100644 index 000000000000..7aeb8fa4b6c1 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRoutePortsLocations/operations.ts @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ExpressRoutePortsLocation, + expressRoutePortsLocationDeserializer, + _ExpressRoutePortsLocationListResult, + _expressRoutePortsLocationListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ExpressRoutePortsLocationsListOptionalParams, + ExpressRoutePortsLocationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: ExpressRoutePortsLocationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRoutePortsLocationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRoutePortsLocationListResultDeserializer(result.body); +} + +/** Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. */ +export function list( + context: Client, + options: ExpressRoutePortsLocationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + locationName: string, + options: ExpressRoutePortsLocationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + locationName: locationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRoutePortsLocationDeserializer(result.body); +} + +/** Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. */ +export async function get( + context: Client, + locationName: string, + options: ExpressRoutePortsLocationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, locationName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/expressRoutePortsLocations/options.ts b/sdk/network/arm-network/src/api/expressRoutePortsLocations/options.ts new file mode 100644 index 000000000000..c30abb405f95 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRoutePortsLocations/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRoutePortsLocationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ExpressRoutePortsLocationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/index.ts b/sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/index.ts new file mode 100644 index 000000000000..78fb1abdfbe7 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ExpressRouteProviderPortsLocationListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/operations.ts b/sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/operations.ts new file mode 100644 index 000000000000..120417542fd6 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/operations.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ExpressRouteProviderPortListResult, + expressRouteProviderPortListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ExpressRouteProviderPortsLocationListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: ExpressRouteProviderPortsLocationListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts{?api%2Dversion,%24filter}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + "%24filter": options?.filter, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteProviderPortListResultDeserializer(result.body); +} + +/** Retrieves all the ExpressRouteProviderPorts in a subscription. */ +export async function list( + context: Client, + options: ExpressRouteProviderPortsLocationListOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSend(context, options); + return _listDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/options.ts b/sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/options.ts new file mode 100644 index 000000000000..14fad0e0a5c8 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteProviderPortsLocation/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRouteProviderPortsLocationListOptionalParams extends OperationOptions { + /** The filter to apply on the operation. For example, you can use $filter=location eq '{state}'. */ + filter?: string; +} diff --git a/sdk/network/arm-network/src/api/expressRouteServiceProviders/index.ts b/sdk/network/arm-network/src/api/expressRouteServiceProviders/index.ts new file mode 100644 index 000000000000..d6d7d62e1910 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteServiceProviders/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ExpressRouteServiceProvidersListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/expressRouteServiceProviders/operations.ts b/sdk/network/arm-network/src/api/expressRouteServiceProviders/operations.ts new file mode 100644 index 000000000000..c5fe73c71166 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteServiceProviders/operations.ts @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { ExpressRouteServiceProvider } from "../../models/microsoft/network/models.js"; +import { + _ExpressRouteServiceProviderListResult, + _expressRouteServiceProviderListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ExpressRouteServiceProvidersListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: ExpressRouteServiceProvidersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRouteServiceProviderListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _expressRouteServiceProviderListResultDeserializer(result.body); +} + +/** Gets all the available express route service providers. */ +export function list( + context: Client, + options: ExpressRouteServiceProvidersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/expressRouteServiceProviders/options.ts b/sdk/network/arm-network/src/api/expressRouteServiceProviders/options.ts new file mode 100644 index 000000000000..0f4c10feb018 --- /dev/null +++ b/sdk/network/arm-network/src/api/expressRouteServiceProviders/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ExpressRouteServiceProvidersListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/firewallPolicies/index.ts b/sdk/network/arm-network/src/api/firewallPolicies/index.ts new file mode 100644 index 000000000000..8a567063cc89 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicies/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + FirewallPoliciesListAllOptionalParams, + FirewallPoliciesListOptionalParams, + FirewallPoliciesDeleteOptionalParams, + FirewallPoliciesUpdateTagsOptionalParams, + FirewallPoliciesCreateOrUpdateOptionalParams, + FirewallPoliciesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/firewallPolicies/operations.ts b/sdk/network/arm-network/src/api/firewallPolicies/operations.ts new file mode 100644 index 000000000000..eaa18d9448e0 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicies/operations.ts @@ -0,0 +1,351 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + FirewallPolicy, + firewallPolicySerializer, + firewallPolicyDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _FirewallPolicyListResult, + _firewallPolicyListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + FirewallPoliciesListAllOptionalParams, + FirewallPoliciesListOptionalParams, + FirewallPoliciesDeleteOptionalParams, + FirewallPoliciesUpdateTagsOptionalParams, + FirewallPoliciesCreateOrUpdateOptionalParams, + FirewallPoliciesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: FirewallPoliciesListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_FirewallPolicyListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _firewallPolicyListResultDeserializer(result.body); +} + +/** Gets all the Firewall Policies in a subscription. */ +export function listAll( + context: Client, + options: FirewallPoliciesListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: FirewallPoliciesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_FirewallPolicyListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _firewallPolicyListResultDeserializer(result.body); +} + +/** Lists all Firewall Policies in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: FirewallPoliciesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPoliciesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Firewall Policy. */ +export function $delete( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPoliciesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, firewallPolicyName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: TagsObject, + options: FirewallPoliciesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return firewallPolicyDeserializer(result.body); +} + +/** Updates tags of a Azure Firewall Policy resource. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: TagsObject, + options: FirewallPoliciesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + firewallPolicyName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicy, + options: FirewallPoliciesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: firewallPolicySerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return firewallPolicyDeserializer(result.body); +} + +/** Creates or updates the specified Firewall Policy. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicy, + options: FirewallPoliciesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, FirewallPolicy> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, firewallPolicyName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, FirewallPolicy>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPoliciesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return firewallPolicyDeserializer(result.body); +} + +/** Gets the specified Firewall Policy. */ +export async function get( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPoliciesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, firewallPolicyName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/firewallPolicies/options.ts b/sdk/network/arm-network/src/api/firewallPolicies/options.ts new file mode 100644 index 000000000000..04846b64aa74 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicies/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface FirewallPoliciesListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FirewallPoliciesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FirewallPoliciesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface FirewallPoliciesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FirewallPoliciesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface FirewallPoliciesGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/firewallPolicyDeployments/index.ts b/sdk/network/arm-network/src/api/firewallPolicyDeployments/index.ts new file mode 100644 index 000000000000..e240769246b1 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyDeployments/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { deploy } from "./operations.js"; +export type { FirewallPolicyDeploymentsDeployOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/firewallPolicyDeployments/operations.ts b/sdk/network/arm-network/src/api/firewallPolicyDeployments/operations.ts new file mode 100644 index 000000000000..ea12a2ba7ea8 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyDeployments/operations.ts @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { FirewallPolicyDeploymentsDeployOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _deploySend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyDeploymentsDeployOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/deploy{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _deployDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deploys the firewall policy draft and child rule collection group drafts. */ +export function deploy( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyDeploymentsDeployOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _deployDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _deploySend(context, resourceGroupName, firewallPolicyName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} diff --git a/sdk/network/arm-network/src/api/firewallPolicyDeployments/options.ts b/sdk/network/arm-network/src/api/firewallPolicyDeployments/options.ts new file mode 100644 index 000000000000..6e5c91965672 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyDeployments/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface FirewallPolicyDeploymentsDeployOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/network/arm-network/src/api/firewallPolicyDrafts/index.ts b/sdk/network/arm-network/src/api/firewallPolicyDrafts/index.ts new file mode 100644 index 000000000000..20afc7650843 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyDrafts/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, get } from "./operations.js"; +export type { + FirewallPolicyDraftsDeleteOptionalParams, + FirewallPolicyDraftsCreateOrUpdateOptionalParams, + FirewallPolicyDraftsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/firewallPolicyDrafts/operations.ts b/sdk/network/arm-network/src/api/firewallPolicyDrafts/operations.ts new file mode 100644 index 000000000000..2e681793149b --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyDrafts/operations.ts @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + FirewallPolicyDraft, + firewallPolicyDraftSerializer, + firewallPolicyDraftDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + FirewallPolicyDraftsDeleteOptionalParams, + FirewallPolicyDraftsCreateOrUpdateOptionalParams, + FirewallPolicyDraftsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyDraftsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/firewallPolicyDrafts/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete a draft policy. */ +export async function $delete( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyDraftsDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend(context, resourceGroupName, firewallPolicyName, options); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicyDraft, + options: FirewallPolicyDraftsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/firewallPolicyDrafts/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: firewallPolicyDraftSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return firewallPolicyDraftDeserializer(result.body); +} + +/** Create or update a draft Firewall Policy. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicyDraft, + options: FirewallPolicyDraftsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + firewallPolicyName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyDraftsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/firewallPolicyDrafts/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return firewallPolicyDraftDeserializer(result.body); +} + +/** Get a draft Firewall Policy. */ +export async function get( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyDraftsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, firewallPolicyName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/firewallPolicyDrafts/options.ts b/sdk/network/arm-network/src/api/firewallPolicyDrafts/options.ts new file mode 100644 index 000000000000..0f46e4905afb --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyDrafts/options.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface FirewallPolicyDraftsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FirewallPolicyDraftsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FirewallPolicyDraftsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/index.ts b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/index.ts new file mode 100644 index 000000000000..bc89a247f7c8 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { FirewallPolicyIdpsSignaturesListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/operations.ts b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/operations.ts new file mode 100644 index 000000000000..728f7820a596 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/operations.ts @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + IdpsQueryObject, + idpsQueryObjectSerializer, + QueryResults, + queryResultsDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { FirewallPolicyIdpsSignaturesListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: IdpsQueryObject, + options: FirewallPolicyIdpsSignaturesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsSignatures{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: idpsQueryObjectSerializer(parameters), + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return queryResultsDeserializer(result.body); +} + +/** Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. */ +export async function list( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: IdpsQueryObject, + options: FirewallPolicyIdpsSignaturesListOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSend( + context, + resourceGroupName, + firewallPolicyName, + parameters, + options, + ); + return _listDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/options.ts b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/options.ts new file mode 100644 index 000000000000..505aba272930 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignatures/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface FirewallPolicyIdpsSignaturesListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/index.ts b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/index.ts new file mode 100644 index 000000000000..b6c88cdf4db4 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/operations.ts b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/operations.ts new file mode 100644 index 000000000000..70191e25f031 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/operations.ts @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + SignatureOverridesFilterValuesQuery, + signatureOverridesFilterValuesQuerySerializer, + SignatureOverridesFilterValuesResponse, + signatureOverridesFilterValuesResponseDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignatureOverridesFilterValuesQuery, + options: FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsFilterOptions{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: signatureOverridesFilterValuesQuerySerializer(parameters), + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return signatureOverridesFilterValuesResponseDeserializer(result.body); +} + +/** Retrieves the current filter values for the signatures overrides */ +export async function list( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignatureOverridesFilterValuesQuery, + options: FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSend( + context, + resourceGroupName, + firewallPolicyName, + parameters, + options, + ); + return _listDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/options.ts b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/options.ts new file mode 100644 index 000000000000..90a3ceeebc73 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesFilterValues/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/index.ts b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/index.ts new file mode 100644 index 000000000000..34f96d3bc339 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, patch, put, get } from "./operations.js"; +export type { + FirewallPolicyIdpsSignaturesOverridesListOptionalParams, + FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams, + FirewallPolicyIdpsSignaturesOverridesPutOptionalParams, + FirewallPolicyIdpsSignaturesOverridesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/operations.ts b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/operations.ts new file mode 100644 index 000000000000..c35e94d766e6 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/operations.ts @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + SignaturesOverrides, + signaturesOverridesSerializer, + signaturesOverridesDeserializer, + SignaturesOverridesList, + signaturesOverridesListDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + FirewallPolicyIdpsSignaturesOverridesListOptionalParams, + FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams, + FirewallPolicyIdpsSignaturesOverridesPutOptionalParams, + FirewallPolicyIdpsSignaturesOverridesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyIdpsSignaturesOverridesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return signaturesOverridesListDeserializer(result.body); +} + +/** Returns all signatures overrides objects for a specific policy as a list containing a single value. */ +export async function list( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyIdpsSignaturesOverridesListOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSend(context, resourceGroupName, firewallPolicyName, options); + return _listDeserialize(result); +} + +export function _patchSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignaturesOverrides, + options: FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: signaturesOverridesSerializer(parameters), + }); +} + +export async function _patchDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return signaturesOverridesDeserializer(result.body); +} + +/** Will update the status of policy's signature overrides for IDPS */ +export async function patch( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignaturesOverrides, + options: FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _patchSend( + context, + resourceGroupName, + firewallPolicyName, + parameters, + options, + ); + return _patchDeserialize(result); +} + +export function _putSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignaturesOverrides, + options: FirewallPolicyIdpsSignaturesOverridesPutOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: signaturesOverridesSerializer(parameters), + }); +} + +export async function _putDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return signaturesOverridesDeserializer(result.body); +} + +/** Will override/create a new signature overrides for the policy's IDPS */ +export async function put( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignaturesOverrides, + options: FirewallPolicyIdpsSignaturesOverridesPutOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _putSend( + context, + resourceGroupName, + firewallPolicyName, + parameters, + options, + ); + return _putDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyIdpsSignaturesOverridesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return signaturesOverridesDeserializer(result.body); +} + +/** Returns all signatures overrides for a specific policy. */ +export async function get( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyIdpsSignaturesOverridesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, firewallPolicyName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/options.ts b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/options.ts new file mode 100644 index 000000000000..9a285673447e --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyIdpsSignaturesOverrides/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface FirewallPolicyIdpsSignaturesOverridesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FirewallPolicyIdpsSignaturesOverridesPutOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FirewallPolicyIdpsSignaturesOverridesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/index.ts b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/index.ts new file mode 100644 index 000000000000..2ad271ce47ac --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, get } from "./operations.js"; +export type { + FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams, + FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams, + FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/operations.ts b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/operations.ts new file mode 100644 index 000000000000..3e1b92cd7bcd --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/operations.ts @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + FirewallPolicyRuleCollectionGroupDraft, + firewallPolicyRuleCollectionGroupDraftSerializer, + firewallPolicyRuleCollectionGroupDraftDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams, + FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams, + FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options: FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + ruleCollectionGroupName: ruleCollectionGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete Rule Collection Group Draft. */ +export async function $delete( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options: FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroupDraft, + options: FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + ruleCollectionGroupName: ruleCollectionGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: firewallPolicyRuleCollectionGroupDraftSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return firewallPolicyRuleCollectionGroupDraftDeserializer(result.body); +} + +/** Create or Update Rule Collection Group Draft. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroupDraft, + options: FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options: FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + ruleCollectionGroupName: ruleCollectionGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return firewallPolicyRuleCollectionGroupDraftDeserializer(result.body); +} + +/** Get Rule Collection Group Draft. */ +export async function get( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options: FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/options.ts b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/options.ts new file mode 100644 index 000000000000..ef5fb74354a2 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroupDrafts/options.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/index.ts b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/index.ts new file mode 100644 index 000000000000..7ecbce3e491d --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + FirewallPolicyRuleCollectionGroupsListOptionalParams, + FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, + FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, + FirewallPolicyRuleCollectionGroupsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/operations.ts b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/operations.ts new file mode 100644 index 000000000000..47d7ea289ee3 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/operations.ts @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + FirewallPolicyRuleCollectionGroup, + firewallPolicyRuleCollectionGroupSerializer, + firewallPolicyRuleCollectionGroupDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _FirewallPolicyRuleCollectionGroupListResult, + _firewallPolicyRuleCollectionGroupListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + FirewallPolicyRuleCollectionGroupsListOptionalParams, + FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, + FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, + FirewallPolicyRuleCollectionGroupsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyRuleCollectionGroupsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_FirewallPolicyRuleCollectionGroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _firewallPolicyRuleCollectionGroupListResultDeserializer(result.body); +} + +/** Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. */ +export function list( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + options: FirewallPolicyRuleCollectionGroupsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, firewallPolicyName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + ruleCollectionGroupName: ruleCollectionGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified FirewallPolicyRuleCollectionGroup. */ +export function $delete( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroup, + options: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + ruleCollectionGroupName: ruleCollectionGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: firewallPolicyRuleCollectionGroupSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return firewallPolicyRuleCollectionGroupDeserializer(result.body); +} + +/** Creates or updates the specified FirewallPolicyRuleCollectionGroup. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroup, + options: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + FirewallPolicyRuleCollectionGroup +> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + FirewallPolicyRuleCollectionGroup + >; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options: FirewallPolicyRuleCollectionGroupsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + firewallPolicyName: firewallPolicyName, + ruleCollectionGroupName: ruleCollectionGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return firewallPolicyRuleCollectionGroupDeserializer(result.body); +} + +/** Gets the specified FirewallPolicyRuleCollectionGroup. */ +export async function get( + context: Client, + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options: FirewallPolicyRuleCollectionGroupsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/options.ts b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/options.ts new file mode 100644 index 000000000000..4ec72daa9ae5 --- /dev/null +++ b/sdk/network/arm-network/src/api/firewallPolicyRuleCollectionGroups/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface FirewallPolicyRuleCollectionGroupsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FirewallPolicyRuleCollectionGroupsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface FirewallPolicyRuleCollectionGroupsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/flowLogs/index.ts b/sdk/network/arm-network/src/api/flowLogs/index.ts new file mode 100644 index 000000000000..f64e0f6755d9 --- /dev/null +++ b/sdk/network/arm-network/src/api/flowLogs/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + FlowLogsListOptionalParams, + FlowLogsDeleteOptionalParams, + FlowLogsUpdateTagsOptionalParams, + FlowLogsCreateOrUpdateOptionalParams, + FlowLogsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/flowLogs/operations.ts b/sdk/network/arm-network/src/api/flowLogs/operations.ts new file mode 100644 index 000000000000..04571911fbd9 --- /dev/null +++ b/sdk/network/arm-network/src/api/flowLogs/operations.ts @@ -0,0 +1,320 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { FlowLog, flowLogSerializer, flowLogDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + errorResponseDeserializer, +} from "../../models/microsoft/network/models.js"; +import { _FlowLogListResult, _flowLogListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + FlowLogsListOptionalParams, + FlowLogsDeleteOptionalParams, + FlowLogsUpdateTagsOptionalParams, + FlowLogsCreateOrUpdateOptionalParams, + FlowLogsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + options: FlowLogsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_FlowLogListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _flowLogListResultDeserializer(result.body); +} + +/** Lists all flow log resources for the specified Network Watcher. */ +export function list( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + options: FlowLogsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkWatcherName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options: FlowLogsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + flowLogName: flowLogName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified flow log resource. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options: FlowLogsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkWatcherName, flowLogName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: TagsObject, + options: FlowLogsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + flowLogName: flowLogName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return flowLogDeserializer(result.body); +} + +/** Update tags of the specified flow log. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: TagsObject, + options: FlowLogsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + networkWatcherName, + flowLogName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: FlowLog, + options: FlowLogsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + flowLogName: flowLogName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: flowLogSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return flowLogDeserializer(result.body); +} + +/** Create or update a flow log for the specified network security group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: FlowLog, + options: FlowLogsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, FlowLog> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + networkWatcherName, + flowLogName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, FlowLog>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options: FlowLogsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + flowLogName: flowLogName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return flowLogDeserializer(result.body); +} + +/** Gets a flow log resource by name. */ +export async function get( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options: FlowLogsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkWatcherName, + flowLogName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/flowLogs/options.ts b/sdk/network/arm-network/src/api/flowLogs/options.ts new file mode 100644 index 000000000000..1320882c3a96 --- /dev/null +++ b/sdk/network/arm-network/src/api/flowLogs/options.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface FlowLogsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FlowLogsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface FlowLogsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface FlowLogsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface FlowLogsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/hubRouteTables/index.ts b/sdk/network/arm-network/src/api/hubRouteTables/index.ts new file mode 100644 index 000000000000..c82b1c9af1d4 --- /dev/null +++ b/sdk/network/arm-network/src/api/hubRouteTables/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + HubRouteTablesListOptionalParams, + HubRouteTablesDeleteOptionalParams, + HubRouteTablesCreateOrUpdateOptionalParams, + HubRouteTablesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/hubRouteTables/operations.ts b/sdk/network/arm-network/src/api/hubRouteTables/operations.ts new file mode 100644 index 000000000000..b6bf9a718c04 --- /dev/null +++ b/sdk/network/arm-network/src/api/hubRouteTables/operations.ts @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + HubRouteTable, + hubRouteTableSerializer, + hubRouteTableDeserializer, + _ListHubRouteTablesResult, + _listHubRouteTablesResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + HubRouteTablesListOptionalParams, + HubRouteTablesDeleteOptionalParams, + HubRouteTablesCreateOrUpdateOptionalParams, + HubRouteTablesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: HubRouteTablesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListHubRouteTablesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listHubRouteTablesResultDeserializer(result.body); +} + +/** Retrieves the details of all RouteTables. */ +export function list( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: HubRouteTablesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, virtualHubName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options: HubRouteTablesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routeTableName: routeTableName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a RouteTable. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options: HubRouteTablesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualHubName, routeTableName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + routeTableParameters: HubRouteTable, + options: HubRouteTablesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routeTableName: routeTableName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: hubRouteTableSerializer(routeTableParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return hubRouteTableDeserializer(result.body); +} + +/** Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + routeTableParameters: HubRouteTable, + options: HubRouteTablesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, HubRouteTable> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualHubName, + routeTableName, + routeTableParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, HubRouteTable>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options: HubRouteTablesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routeTableName: routeTableName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return hubRouteTableDeserializer(result.body); +} + +/** Retrieves the details of a RouteTable. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options: HubRouteTablesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualHubName, + routeTableName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/hubRouteTables/options.ts b/sdk/network/arm-network/src/api/hubRouteTables/options.ts new file mode 100644 index 000000000000..7239932b7342 --- /dev/null +++ b/sdk/network/arm-network/src/api/hubRouteTables/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface HubRouteTablesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface HubRouteTablesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface HubRouteTablesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface HubRouteTablesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/hubVirtualNetworkConnections/index.ts b/sdk/network/arm-network/src/api/hubVirtualNetworkConnections/index.ts new file mode 100644 index 000000000000..5d1c23d5ff86 --- /dev/null +++ b/sdk/network/arm-network/src/api/hubVirtualNetworkConnections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get, $delete, createOrUpdate } from "./operations.js"; +export type { + HubVirtualNetworkConnectionsListOptionalParams, + HubVirtualNetworkConnectionsGetOptionalParams, + HubVirtualNetworkConnectionsDeleteOptionalParams, + HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/hubVirtualNetworkConnections/operations.ts b/sdk/network/arm-network/src/api/hubVirtualNetworkConnections/operations.ts new file mode 100644 index 000000000000..0cdcc55b128e --- /dev/null +++ b/sdk/network/arm-network/src/api/hubVirtualNetworkConnections/operations.ts @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + HubVirtualNetworkConnection, + hubVirtualNetworkConnectionSerializer, + hubVirtualNetworkConnectionDeserializer, + _ListHubVirtualNetworkConnectionsResult, + _listHubVirtualNetworkConnectionsResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + HubVirtualNetworkConnectionsListOptionalParams, + HubVirtualNetworkConnectionsGetOptionalParams, + HubVirtualNetworkConnectionsDeleteOptionalParams, + HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: HubVirtualNetworkConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListHubVirtualNetworkConnectionsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listHubVirtualNetworkConnectionsResultDeserializer(result.body); +} + +/** Retrieves the details of all HubVirtualNetworkConnections. */ +export function list( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: HubVirtualNetworkConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, virtualHubName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options: HubVirtualNetworkConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return hubVirtualNetworkConnectionDeserializer(result.body); +} + +/** Retrieves the details of a HubVirtualNetworkConnection. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options: HubVirtualNetworkConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualHubName, + connectionName, + options, + ); + return _getDeserialize(result); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options: HubVirtualNetworkConnectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a HubVirtualNetworkConnection. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options: HubVirtualNetworkConnectionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualHubName, connectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, + options: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: hubVirtualNetworkConnectionSerializer(hubVirtualNetworkConnectionParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return hubVirtualNetworkConnectionDeserializer(result.body); +} + +/** Creates a hub virtual network connection if it doesn't exist else updates the existing one. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, + options: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, HubVirtualNetworkConnection> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualHubName, + connectionName, + hubVirtualNetworkConnectionParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, HubVirtualNetworkConnection>; +} diff --git a/sdk/network/arm-network/src/api/hubVirtualNetworkConnections/options.ts b/sdk/network/arm-network/src/api/hubVirtualNetworkConnections/options.ts new file mode 100644 index 000000000000..a40843d48f27 --- /dev/null +++ b/sdk/network/arm-network/src/api/hubVirtualNetworkConnections/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface HubVirtualNetworkConnectionsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface HubVirtualNetworkConnectionsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface HubVirtualNetworkConnectionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/network/arm-network/src/api/inboundNatRules/index.ts b/sdk/network/arm-network/src/api/inboundNatRules/index.ts new file mode 100644 index 000000000000..0ed8637d706c --- /dev/null +++ b/sdk/network/arm-network/src/api/inboundNatRules/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + InboundNatRulesListOptionalParams, + InboundNatRulesDeleteOptionalParams, + InboundNatRulesCreateOrUpdateOptionalParams, + InboundNatRulesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/inboundNatRules/operations.ts b/sdk/network/arm-network/src/api/inboundNatRules/operations.ts new file mode 100644 index 000000000000..1750eb479a54 --- /dev/null +++ b/sdk/network/arm-network/src/api/inboundNatRules/operations.ts @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + InboundNatRule, + inboundNatRuleSerializer, + inboundNatRuleDeserializer, +} from "../../models/common/models.js"; +import { + _InboundNatRuleListResult, + _inboundNatRuleListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + InboundNatRulesListOptionalParams, + InboundNatRulesDeleteOptionalParams, + InboundNatRulesCreateOrUpdateOptionalParams, + InboundNatRulesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: InboundNatRulesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_InboundNatRuleListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _inboundNatRuleListResultDeserializer(result.body); +} + +/** Gets all the inbound NAT rules in a load balancer. */ +export function list( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: InboundNatRulesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, loadBalancerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options: InboundNatRulesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + inboundNatRuleName: inboundNatRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified load balancer inbound NAT rule. */ +export function $delete( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options: InboundNatRulesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, loadBalancerName, inboundNatRuleName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + inboundNatRuleParameters: InboundNatRule, + options: InboundNatRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + inboundNatRuleName: inboundNatRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: inboundNatRuleSerializer(inboundNatRuleParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return inboundNatRuleDeserializer(result.body); +} + +/** Creates or updates a load balancer inbound NAT rule. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + inboundNatRuleParameters: InboundNatRule, + options: InboundNatRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, InboundNatRule> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + loadBalancerName, + inboundNatRuleName, + inboundNatRuleParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, InboundNatRule>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options: InboundNatRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + inboundNatRuleName: inboundNatRuleName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return inboundNatRuleDeserializer(result.body); +} + +/** Gets the specified load balancer inbound NAT rule. */ +export async function get( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options: InboundNatRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + loadBalancerName, + inboundNatRuleName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/inboundNatRules/options.ts b/sdk/network/arm-network/src/api/inboundNatRules/options.ts new file mode 100644 index 000000000000..33035d80d5d0 --- /dev/null +++ b/sdk/network/arm-network/src/api/inboundNatRules/options.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface InboundNatRulesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface InboundNatRulesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface InboundNatRulesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface InboundNatRulesGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/inboundSecurityRule/index.ts b/sdk/network/arm-network/src/api/inboundSecurityRule/index.ts new file mode 100644 index 000000000000..29761b1b3401 --- /dev/null +++ b/sdk/network/arm-network/src/api/inboundSecurityRule/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { createOrUpdate, get } from "./operations.js"; +export type { + InboundSecurityRuleCreateOrUpdateOptionalParams, + InboundSecurityRuleGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/inboundSecurityRule/operations.ts b/sdk/network/arm-network/src/api/inboundSecurityRule/operations.ts new file mode 100644 index 000000000000..63f13c7a77e8 --- /dev/null +++ b/sdk/network/arm-network/src/api/inboundSecurityRule/operations.ts @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + InboundSecurityRule, + inboundSecurityRuleSerializer, + inboundSecurityRuleDeserializer, +} from "../../models/microsoft/network/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + InboundSecurityRuleCreateOrUpdateOptionalParams, + InboundSecurityRuleGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + parameters: InboundSecurityRule, + options: InboundSecurityRuleCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: inboundSecurityRuleSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return inboundSecurityRuleDeserializer(result.body); +} + +/** Creates or updates the specified Network Virtual Appliance Inbound Security Rules. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + parameters: InboundSecurityRule, + options: InboundSecurityRuleCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, InboundSecurityRule> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + networkVirtualApplianceName, + ruleCollectionName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, InboundSecurityRule>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + options: InboundSecurityRuleGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return inboundSecurityRuleDeserializer(result.body); +} + +/** Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. */ +export async function get( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + options: InboundSecurityRuleGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkVirtualApplianceName, + ruleCollectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/inboundSecurityRule/options.ts b/sdk/network/arm-network/src/api/inboundSecurityRule/options.ts new file mode 100644 index 000000000000..19a0949f1670 --- /dev/null +++ b/sdk/network/arm-network/src/api/inboundSecurityRule/options.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface InboundSecurityRuleCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface InboundSecurityRuleGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/index.ts b/sdk/network/arm-network/src/api/index.ts new file mode 100644 index 000000000000..327616fcbbf7 --- /dev/null +++ b/sdk/network/arm-network/src/api/index.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export type { + NetworkManagementContext, + NetworkManagementClientOptionalParams, +} from "./networkManagementContext.js"; +export { createNetworkManagement } from "./networkManagementContext.js"; +export { + checkDnsNameAvailability, + generatevirtualwanvpnserverconfigurationvpnprofile, + supportedSecurityProviders, + listNetworkManagerEffectiveSecurityAdminRules, + listNetworkManagerEffectiveConnectivityConfigurations, + listActiveSecurityAdminRules, + listActiveConnectivityConfigurations, + expressRouteProviderPort, + disconnectActiveSessions, + getActiveSessions, + getBastionShareableLink, + deleteBastionShareableLinkByToken, + deleteBastionShareableLink, + putBastionShareableLink, +} from "./operations.js"; +export type { + CheckDnsNameAvailabilityOptionalParams, + GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams, + SupportedSecurityProvidersOptionalParams, + ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams, + ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams, + ListActiveSecurityAdminRulesOptionalParams, + ListActiveConnectivityConfigurationsOptionalParams, + ExpressRouteProviderPortOptionalParams, + DisconnectActiveSessionsOptionalParams, + GetActiveSessionsOptionalParams, + GetBastionShareableLinkOptionalParams, + DeleteBastionShareableLinkByTokenOptionalParams, + DeleteBastionShareableLinkOptionalParams, + PutBastionShareableLinkOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/interconnectGroups/index.ts b/sdk/network/arm-network/src/api/interconnectGroups/index.ts new file mode 100644 index 000000000000..6a82837492aa --- /dev/null +++ b/sdk/network/arm-network/src/api/interconnectGroups/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + getNodeAvailability, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + InterconnectGroupsGetNodeAvailabilityOptionalParams, + InterconnectGroupsListAllOptionalParams, + InterconnectGroupsListOptionalParams, + InterconnectGroupsDeleteOptionalParams, + InterconnectGroupsUpdateTagsOptionalParams, + InterconnectGroupsCreateOrUpdateOptionalParams, + InterconnectGroupsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/interconnectGroups/operations.ts b/sdk/network/arm-network/src/api/interconnectGroups/operations.ts new file mode 100644 index 000000000000..479d27bc0599 --- /dev/null +++ b/sdk/network/arm-network/src/api/interconnectGroups/operations.ts @@ -0,0 +1,409 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + InterconnectGroup, + interconnectGroupSerializer, + interconnectGroupDeserializer, + InterconnectGroupNodeAvailability, + interconnectGroupNodeAvailabilityDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _InterconnectGroupListResult, + _interconnectGroupListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + InterconnectGroupsGetNodeAvailabilityOptionalParams, + InterconnectGroupsListAllOptionalParams, + InterconnectGroupsListOptionalParams, + InterconnectGroupsDeleteOptionalParams, + InterconnectGroupsUpdateTagsOptionalParams, + InterconnectGroupsCreateOrUpdateOptionalParams, + InterconnectGroupsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getNodeAvailabilitySend( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + options: InterconnectGroupsGetNodeAvailabilityOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interconnectGroups/{interconnectGroupName}/nodeAvailability{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + interconnectGroupName: interconnectGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getNodeAvailabilityDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return interconnectGroupNodeAvailabilityDeserializer(result.body); +} + +/** Gets node availability for all subgroups in the specified interconnect group. */ +export function getNodeAvailability( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + options: InterconnectGroupsGetNodeAvailabilityOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + InterconnectGroupNodeAvailability +> { + return getLongRunningPoller(context, _getNodeAvailabilityDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getNodeAvailabilitySend(context, resourceGroupName, interconnectGroupName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + InterconnectGroupNodeAvailability + >; +} + +export function _listAllSend( + context: Client, + options: InterconnectGroupsListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/interconnectGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_InterconnectGroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _interconnectGroupListResultDeserializer(result.body); +} + +/** Gets all interconnect groups in a subscription. */ +export function listAll( + context: Client, + options: InterconnectGroupsListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: InterconnectGroupsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interconnectGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_InterconnectGroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _interconnectGroupListResultDeserializer(result.body); +} + +/** Gets all interconnect groups in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: InterconnectGroupsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + options: InterconnectGroupsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interconnectGroups/{interconnectGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + interconnectGroupName: interconnectGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified interconnect group. */ +export async function $delete( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + options: InterconnectGroupsDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend(context, resourceGroupName, interconnectGroupName, options); + return _$deleteDeserialize(result); +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + parameters: TagsObject, + options: InterconnectGroupsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interconnectGroups/{interconnectGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + interconnectGroupName: interconnectGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return interconnectGroupDeserializer(result.body); +} + +/** Updates interconnect group tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + parameters: TagsObject, + options: InterconnectGroupsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + interconnectGroupName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + parameters: InterconnectGroup, + options: InterconnectGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interconnectGroups/{interconnectGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + interconnectGroupName: interconnectGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: interconnectGroupSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return interconnectGroupDeserializer(result.body); +} + +/** Creates or updates an interconnect group. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + parameters: InterconnectGroup, + options: InterconnectGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + interconnectGroupName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + options: InterconnectGroupsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interconnectGroups/{interconnectGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + interconnectGroupName: interconnectGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return interconnectGroupDeserializer(result.body); +} + +/** Gets information about the specified interconnect group. */ +export async function get( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + options: InterconnectGroupsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, interconnectGroupName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/interconnectGroups/options.ts b/sdk/network/arm-network/src/api/interconnectGroups/options.ts new file mode 100644 index 000000000000..e2758f82d056 --- /dev/null +++ b/sdk/network/arm-network/src/api/interconnectGroups/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface InterconnectGroupsGetNodeAvailabilityOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface InterconnectGroupsListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface InterconnectGroupsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface InterconnectGroupsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface InterconnectGroupsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface InterconnectGroupsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface InterconnectGroupsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/ipAllocations/index.ts b/sdk/network/arm-network/src/api/ipAllocations/index.ts new file mode 100644 index 000000000000..1d81d8b47cab --- /dev/null +++ b/sdk/network/arm-network/src/api/ipAllocations/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + IpAllocationsListOptionalParams, + IpAllocationsListByResourceGroupOptionalParams, + IpAllocationsDeleteOptionalParams, + IpAllocationsUpdateTagsOptionalParams, + IpAllocationsCreateOrUpdateOptionalParams, + IpAllocationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/ipAllocations/operations.ts b/sdk/network/arm-network/src/api/ipAllocations/operations.ts new file mode 100644 index 000000000000..3813d2b2e623 --- /dev/null +++ b/sdk/network/arm-network/src/api/ipAllocations/operations.ts @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + IpAllocation, + ipAllocationSerializer, + ipAllocationDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _IpAllocationListResult, + _ipAllocationListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + IpAllocationsListOptionalParams, + IpAllocationsListByResourceGroupOptionalParams, + IpAllocationsDeleteOptionalParams, + IpAllocationsUpdateTagsOptionalParams, + IpAllocationsCreateOrUpdateOptionalParams, + IpAllocationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + options: IpAllocationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/IpAllocations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_IpAllocationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _ipAllocationListResultDeserializer(result.body); +} + +/** Gets all IpAllocations in a subscription. */ +export function list( + context: Client, + options: IpAllocationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: IpAllocationsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_IpAllocationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _ipAllocationListResultDeserializer(result.body); +} + +/** Gets all IpAllocations in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: IpAllocationsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + ipAllocationName: string, + options: IpAllocationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ipAllocationName: ipAllocationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified IpAllocation. */ +export function $delete( + context: Client, + resourceGroupName: string, + ipAllocationName: string, + options: IpAllocationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, ipAllocationName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + ipAllocationName: string, + parameters: TagsObject, + options: IpAllocationsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ipAllocationName: ipAllocationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return ipAllocationDeserializer(result.body); +} + +/** Updates a IpAllocation tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + ipAllocationName: string, + parameters: TagsObject, + options: IpAllocationsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + ipAllocationName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + ipAllocationName: string, + parameters: IpAllocation, + options: IpAllocationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ipAllocationName: ipAllocationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: ipAllocationSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return ipAllocationDeserializer(result.body); +} + +/** Creates or updates an IpAllocation in the specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + ipAllocationName: string, + parameters: IpAllocation, + options: IpAllocationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, IpAllocation> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, ipAllocationName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, IpAllocation>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + ipAllocationName: string, + options: IpAllocationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ipAllocationName: ipAllocationName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return ipAllocationDeserializer(result.body); +} + +/** Gets the specified IpAllocation by resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + ipAllocationName: string, + options: IpAllocationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, ipAllocationName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/ipAllocations/options.ts b/sdk/network/arm-network/src/api/ipAllocations/options.ts new file mode 100644 index 000000000000..4b02b62d2a06 --- /dev/null +++ b/sdk/network/arm-network/src/api/ipAllocations/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface IpAllocationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IpAllocationsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IpAllocationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface IpAllocationsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IpAllocationsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface IpAllocationsGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/ipGroups/index.ts b/sdk/network/arm-network/src/api/ipGroups/index.ts new file mode 100644 index 000000000000..b00c76427311 --- /dev/null +++ b/sdk/network/arm-network/src/api/ipGroups/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + list, + listByResourceGroup, + $delete, + updateGroups, + createOrUpdate, + get, +} from "./operations.js"; +export type { + IpGroupsListOptionalParams, + IpGroupsListByResourceGroupOptionalParams, + IpGroupsDeleteOptionalParams, + IpGroupsUpdateGroupsOptionalParams, + IpGroupsCreateOrUpdateOptionalParams, + IpGroupsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/ipGroups/operations.ts b/sdk/network/arm-network/src/api/ipGroups/operations.ts new file mode 100644 index 000000000000..8aaac5008794 --- /dev/null +++ b/sdk/network/arm-network/src/api/ipGroups/operations.ts @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + TagsObject, + tagsObjectSerializer, + errorDeserializer, + IpGroup, + ipGroupSerializer, + ipGroupDeserializer, +} from "../../models/microsoft/network/models.js"; +import { _IpGroupListResult, _ipGroupListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + IpGroupsListOptionalParams, + IpGroupsListByResourceGroupOptionalParams, + IpGroupsDeleteOptionalParams, + IpGroupsUpdateGroupsOptionalParams, + IpGroupsCreateOrUpdateOptionalParams, + IpGroupsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + options: IpGroupsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_IpGroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return _ipGroupListResultDeserializer(result.body); +} + +/** Gets all IpGroups in a subscription. */ +export function list( + context: Client, + options: IpGroupsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: IpGroupsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_IpGroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return _ipGroupListResultDeserializer(result.body); +} + +/** Gets all IpGroups in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: IpGroupsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + ipGroupsName: string, + options: IpGroupsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ipGroupsName: ipGroupsName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified ipGroups. */ +export function $delete( + context: Client, + resourceGroupName: string, + ipGroupsName: string, + options: IpGroupsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, ipGroupsName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateGroupsSend( + context: Client, + resourceGroupName: string, + ipGroupsName: string, + parameters: TagsObject, + options: IpGroupsUpdateGroupsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ipGroupsName: ipGroupsName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateGroupsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return ipGroupDeserializer(result.body); +} + +/** Updates tags of an IpGroups resource. */ +export async function updateGroups( + context: Client, + resourceGroupName: string, + ipGroupsName: string, + parameters: TagsObject, + options: IpGroupsUpdateGroupsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateGroupsSend( + context, + resourceGroupName, + ipGroupsName, + parameters, + options, + ); + return _updateGroupsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + ipGroupsName: string, + parameters: IpGroup, + options: IpGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ipGroupsName: ipGroupsName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: ipGroupSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return ipGroupDeserializer(result.body); +} + +/** Creates or updates an ipGroups in a specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + ipGroupsName: string, + parameters: IpGroup, + options: IpGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, IpGroup> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, ipGroupsName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, IpGroup>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + ipGroupsName: string, + options: IpGroupsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + ipGroupsName: ipGroupsName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return ipGroupDeserializer(result.body); +} + +/** Gets the specified ipGroups. */ +export async function get( + context: Client, + resourceGroupName: string, + ipGroupsName: string, + options: IpGroupsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, ipGroupsName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/ipGroups/options.ts b/sdk/network/arm-network/src/api/ipGroups/options.ts new file mode 100644 index 000000000000..ecf17ae10055 --- /dev/null +++ b/sdk/network/arm-network/src/api/ipGroups/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface IpGroupsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IpGroupsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IpGroupsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface IpGroupsUpdateGroupsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IpGroupsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface IpGroupsGetOptionalParams extends OperationOptions { + /** Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups resource. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/ipamPools/index.ts b/sdk/network/arm-network/src/api/ipamPools/index.ts new file mode 100644 index 000000000000..cab8cc3ff8c4 --- /dev/null +++ b/sdk/network/arm-network/src/api/ipamPools/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listAssociatedResources, + getPoolUsage, + list, + $delete, + update, + create, + get, +} from "./operations.js"; +export type { + IpamPoolsListAssociatedResourcesOptionalParams, + IpamPoolsGetPoolUsageOptionalParams, + IpamPoolsListOptionalParams, + IpamPoolsDeleteOptionalParams, + IpamPoolsUpdateOptionalParams, + IpamPoolsCreateOptionalParams, + IpamPoolsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/ipamPools/operations.ts b/sdk/network/arm-network/src/api/ipamPools/operations.ts new file mode 100644 index 000000000000..a2a1bdad8039 --- /dev/null +++ b/sdk/network/arm-network/src/api/ipamPools/operations.ts @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + IpamPool, + ipamPoolSerializer, + ipamPoolDeserializer, + commonErrorResponseDeserializer, + ipamPoolUpdateSerializer, + _IpamPoolList, + _ipamPoolListDeserializer, + PoolUsage, + poolUsageDeserializer, + _PoolAssociationList, + _poolAssociationListDeserializer, + PoolAssociation, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + IpamPoolsListAssociatedResourcesOptionalParams, + IpamPoolsGetPoolUsageOptionalParams, + IpamPoolsListOptionalParams, + IpamPoolsDeleteOptionalParams, + IpamPoolsUpdateOptionalParams, + IpamPoolsCreateOptionalParams, + IpamPoolsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAssociatedResourcesSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: IpamPoolsListAssociatedResourcesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/listAssociatedResources{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + poolName: poolName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAssociatedResourcesDeserialize( + result: PathUncheckedResponse, +): Promise<_PoolAssociationList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return _poolAssociationListDeserializer(result.body); +} + +/** List Associated Resource in the Pool. */ +export function listAssociatedResources( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: IpamPoolsListAssociatedResourcesOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listAssociatedResourcesSend( + context, + resourceGroupName, + networkManagerName, + poolName, + options, + ), + _listAssociatedResourcesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getPoolUsageSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: IpamPoolsGetPoolUsageOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/getPoolUsage{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + poolName: poolName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getPoolUsageDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return poolUsageDeserializer(result.body); +} + +/** Get the Pool Usage. */ +export async function getPoolUsage( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: IpamPoolsGetPoolUsageOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getPoolUsageSend( + context, + resourceGroupName, + networkManagerName, + poolName, + options, + ); + return _getPoolUsageDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: IpamPoolsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools{?api%2Dversion,skipToken,skip,top,sortKey,sortValue}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + skipToken: options?.skipToken, + skip: options?.skip, + top: options?.top, + sortKey: options?.sortKey, + sortValue: options?.sortValue, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_IpamPoolList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return _ipamPoolListDeserializer(result.body); +} + +/** Gets list of Pool resources at Network Manager level. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: IpamPoolsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: IpamPoolsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + poolName: poolName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete the Pool resource. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: IpamPoolsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkManagerName, poolName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: IpamPoolsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + poolName: poolName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options?.body ? options?.body : ipamPoolUpdateSerializer(options?.body), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return ipamPoolDeserializer(result.body); +} + +/** Updates the specific Pool resource. */ +export async function update( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: IpamPoolsUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + networkManagerName, + poolName, + options, + ); + return _updateDeserialize(result); +} + +export function _createSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options: IpamPoolsCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + poolName: poolName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: ipamPoolSerializer(body), + }); +} + +export async function _createDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return ipamPoolDeserializer(result.body); +} + +/** Creates/Updates the Pool resource. */ +export function create( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options: IpamPoolsCreateOptionalParams = { requestOptions: {} }, +): PollerLike, IpamPool> { + return getLongRunningPoller(context, _createDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createSend(context, resourceGroupName, networkManagerName, poolName, body, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, IpamPool>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: IpamPoolsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + poolName: poolName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return ipamPoolDeserializer(result.body); +} + +/** Gets the specific Pool resource. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: IpamPoolsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, networkManagerName, poolName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/ipamPools/options.ts b/sdk/network/arm-network/src/api/ipamPools/options.ts new file mode 100644 index 000000000000..c3354afdf771 --- /dev/null +++ b/sdk/network/arm-network/src/api/ipamPools/options.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { IpamPoolUpdate } from "../../models/microsoft/network/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface IpamPoolsListAssociatedResourcesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IpamPoolsGetPoolUsageOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IpamPoolsListOptionalParams extends OperationOptions { + /** Optional skip token. */ + skipToken?: string; + /** Optional num entries to skip. */ + skip?: number; + /** Optional num entries to show. */ + top?: number; + /** Optional key by which to sort. */ + sortKey?: string; + /** Optional sort value for pagination. */ + sortValue?: string; +} + +/** Optional parameters. */ +export interface IpamPoolsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface IpamPoolsUpdateOptionalParams extends OperationOptions { + /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ + ifMatch?: string; + /** Pool resource object to update partially. */ + body?: IpamPoolUpdate; +} + +/** Optional parameters. */ +export interface IpamPoolsCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface IpamPoolsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/index.ts b/sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/index.ts new file mode 100644 index 000000000000..c73be5f5203c --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + LoadBalancerBackendAddressPoolsListOptionalParams, + LoadBalancerBackendAddressPoolsDeleteOptionalParams, + LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, + LoadBalancerBackendAddressPoolsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/operations.ts b/sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/operations.ts new file mode 100644 index 000000000000..3f1b075cd10f --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/operations.ts @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + BackendAddressPool, + backendAddressPoolSerializer, + backendAddressPoolDeserializer, +} from "../../models/common/models.js"; +import { + _LoadBalancerBackendAddressPoolListResult, + _loadBalancerBackendAddressPoolListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + LoadBalancerBackendAddressPoolsListOptionalParams, + LoadBalancerBackendAddressPoolsDeleteOptionalParams, + LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, + LoadBalancerBackendAddressPoolsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerBackendAddressPoolsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_LoadBalancerBackendAddressPoolListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _loadBalancerBackendAddressPoolListResultDeserializer(result.body); +} + +/** Gets all the load balancer backed address pools. */ +export function list( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerBackendAddressPoolsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, loadBalancerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options: LoadBalancerBackendAddressPoolsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + backendAddressPoolName: backendAddressPoolName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified load balancer backend address pool. */ +export function $delete( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options: LoadBalancerBackendAddressPoolsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, loadBalancerName, backendAddressPoolName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + parameters: BackendAddressPool, + options: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + backendAddressPoolName: backendAddressPoolName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: backendAddressPoolSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return backendAddressPoolDeserializer(result.body); +} + +/** Creates or updates a load balancer backend address pool. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + parameters: BackendAddressPool, + options: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, BackendAddressPool> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + loadBalancerName, + backendAddressPoolName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, BackendAddressPool>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options: LoadBalancerBackendAddressPoolsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + backendAddressPoolName: backendAddressPoolName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return backendAddressPoolDeserializer(result.body); +} + +/** Gets load balancer backend address pool. */ +export async function get( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options: LoadBalancerBackendAddressPoolsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + loadBalancerName, + backendAddressPoolName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/options.ts b/sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/options.ts new file mode 100644 index 000000000000..1b34eefbd175 --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerBackendAddressPools/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface LoadBalancerBackendAddressPoolsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LoadBalancerBackendAddressPoolsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface LoadBalancerBackendAddressPoolsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/index.ts b/sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/index.ts new file mode 100644 index 000000000000..f370d62feeed --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export type { + LoadBalancerFrontendIPConfigurationsListOptionalParams, + LoadBalancerFrontendIPConfigurationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/operations.ts b/sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/operations.ts new file mode 100644 index 000000000000..99040b533af4 --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/operations.ts @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + FrontendIPConfiguration, + frontendIPConfigurationDeserializer, +} from "../../models/common/models.js"; +import { + _LoadBalancerFrontendIPConfigurationListResult, + _loadBalancerFrontendIPConfigurationListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + LoadBalancerFrontendIPConfigurationsListOptionalParams, + LoadBalancerFrontendIPConfigurationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerFrontendIPConfigurationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_LoadBalancerFrontendIPConfigurationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _loadBalancerFrontendIPConfigurationListResultDeserializer(result.body); +} + +/** Gets all the load balancer frontend IP configurations. */ +export function list( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerFrontendIPConfigurationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, loadBalancerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + frontendIPConfigurationName: string, + options: LoadBalancerFrontendIPConfigurationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + frontendIPConfigurationName: frontendIPConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return frontendIPConfigurationDeserializer(result.body); +} + +/** Gets load balancer frontend IP configuration. */ +export async function get( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + frontendIPConfigurationName: string, + options: LoadBalancerFrontendIPConfigurationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + loadBalancerName, + frontendIPConfigurationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/options.ts b/sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/options.ts new file mode 100644 index 000000000000..80a358511a8c --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerFrontendIPConfigurations/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface LoadBalancerFrontendIPConfigurationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LoadBalancerFrontendIPConfigurationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/index.ts b/sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/index.ts new file mode 100644 index 000000000000..27add57757fe --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { health, list, get } from "./operations.js"; +export type { + LoadBalancerLoadBalancingRulesHealthOptionalParams, + LoadBalancerLoadBalancingRulesListOptionalParams, + LoadBalancerLoadBalancingRulesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/operations.ts b/sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/operations.ts new file mode 100644 index 000000000000..f2f579e2b31c --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/operations.ts @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + LoadBalancingRule, + loadBalancingRuleDeserializer, +} from "../../models/common/models.js"; +import { + _LoadBalancerLoadBalancingRuleListResult, + _loadBalancerLoadBalancingRuleListResultDeserializer, + LoadBalancerHealthPerRule, + loadBalancerHealthPerRuleDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + LoadBalancerLoadBalancingRulesHealthOptionalParams, + LoadBalancerLoadBalancingRulesListOptionalParams, + LoadBalancerLoadBalancingRulesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _healthSend( + context: Client, + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options: LoadBalancerLoadBalancingRulesHealthOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}/health{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + groupName: groupName, + loadBalancerName: loadBalancerName, + loadBalancingRuleName: loadBalancingRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _healthDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return loadBalancerHealthPerRuleDeserializer(result.body); +} + +/** Get health details of a load balancing rule. */ +export function health( + context: Client, + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options: LoadBalancerLoadBalancingRulesHealthOptionalParams = { requestOptions: {} }, +): PollerLike, LoadBalancerHealthPerRule> { + return getLongRunningPoller(context, _healthDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _healthSend(context, groupName, loadBalancerName, loadBalancingRuleName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, LoadBalancerHealthPerRule>; +} + +export function _listSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerLoadBalancingRulesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_LoadBalancerLoadBalancingRuleListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _loadBalancerLoadBalancingRuleListResultDeserializer(result.body); +} + +/** Gets all the load balancing rules in a load balancer. */ +export function list( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerLoadBalancingRulesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, loadBalancerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options: LoadBalancerLoadBalancingRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + loadBalancingRuleName: loadBalancingRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return loadBalancingRuleDeserializer(result.body); +} + +/** Gets the specified load balancer load balancing rule. */ +export async function get( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options: LoadBalancerLoadBalancingRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + loadBalancerName, + loadBalancingRuleName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/options.ts b/sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/options.ts new file mode 100644 index 000000000000..742cdae6906f --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerLoadBalancingRules/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface LoadBalancerLoadBalancingRulesHealthOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface LoadBalancerLoadBalancingRulesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LoadBalancerLoadBalancingRulesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/index.ts b/sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/index.ts new file mode 100644 index 000000000000..7ffe1835dbc1 --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { LoadBalancerNetworkInterfacesListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/operations.ts b/sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/operations.ts new file mode 100644 index 000000000000..76b959769cb8 --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/operations.ts @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer, NetworkInterface } from "../../models/common/models.js"; +import { + _NetworkInterfaceListResult, + _networkInterfaceListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { LoadBalancerNetworkInterfacesListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerNetworkInterfacesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkInterfaceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkInterfaceListResultDeserializer(result.body); +} + +/** Gets associated load balancer network interfaces. */ +export function list( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerNetworkInterfacesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, loadBalancerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/options.ts b/sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/options.ts new file mode 100644 index 000000000000..2a9e655ff8da --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerNetworkInterfaces/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface LoadBalancerNetworkInterfacesListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/loadBalancerOutboundRules/index.ts b/sdk/network/arm-network/src/api/loadBalancerOutboundRules/index.ts new file mode 100644 index 000000000000..ca7020d77157 --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerOutboundRules/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export type { + LoadBalancerOutboundRulesListOptionalParams, + LoadBalancerOutboundRulesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/loadBalancerOutboundRules/operations.ts b/sdk/network/arm-network/src/api/loadBalancerOutboundRules/operations.ts new file mode 100644 index 000000000000..74a78db6d1ea --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerOutboundRules/operations.ts @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + OutboundRule, + outboundRuleDeserializer, +} from "../../models/common/models.js"; +import { + _LoadBalancerOutboundRuleListResult, + _loadBalancerOutboundRuleListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + LoadBalancerOutboundRulesListOptionalParams, + LoadBalancerOutboundRulesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerOutboundRulesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_LoadBalancerOutboundRuleListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _loadBalancerOutboundRuleListResultDeserializer(result.body); +} + +/** Gets all the outbound rules in a load balancer. */ +export function list( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerOutboundRulesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, loadBalancerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + outboundRuleName: string, + options: LoadBalancerOutboundRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + outboundRuleName: outboundRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return outboundRuleDeserializer(result.body); +} + +/** Gets the specified load balancer outbound rule. */ +export async function get( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + outboundRuleName: string, + options: LoadBalancerOutboundRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + loadBalancerName, + outboundRuleName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/loadBalancerOutboundRules/options.ts b/sdk/network/arm-network/src/api/loadBalancerOutboundRules/options.ts new file mode 100644 index 000000000000..86f70cf5b163 --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerOutboundRules/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface LoadBalancerOutboundRulesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LoadBalancerOutboundRulesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/loadBalancerProbes/index.ts b/sdk/network/arm-network/src/api/loadBalancerProbes/index.ts new file mode 100644 index 000000000000..977a9f630fcb --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerProbes/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export type { + LoadBalancerProbesListOptionalParams, + LoadBalancerProbesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/loadBalancerProbes/operations.ts b/sdk/network/arm-network/src/api/loadBalancerProbes/operations.ts new file mode 100644 index 000000000000..31bd9a934ede --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerProbes/operations.ts @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer, Probe, probeDeserializer } from "../../models/common/models.js"; +import { + _LoadBalancerProbeListResult, + _loadBalancerProbeListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + LoadBalancerProbesListOptionalParams, + LoadBalancerProbesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerProbesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_LoadBalancerProbeListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _loadBalancerProbeListResultDeserializer(result.body); +} + +/** Gets all the load balancer probes. */ +export function list( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancerProbesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, loadBalancerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + probeName: string, + options: LoadBalancerProbesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + probeName: probeName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return probeDeserializer(result.body); +} + +/** Gets load balancer probe. */ +export async function get( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + probeName: string, + options: LoadBalancerProbesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, loadBalancerName, probeName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/loadBalancerProbes/options.ts b/sdk/network/arm-network/src/api/loadBalancerProbes/options.ts new file mode 100644 index 000000000000..f4d9ab48501f --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancerProbes/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface LoadBalancerProbesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LoadBalancerProbesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/loadBalancers/index.ts b/sdk/network/arm-network/src/api/loadBalancers/index.ts new file mode 100644 index 000000000000..6629bcb5b995 --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancers/index.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + swapPublicIpAddresses, + listInboundNatRulePortMappings, + migrateToIpBased, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + LoadBalancersSwapPublicIpAddressesOptionalParams, + LoadBalancersListInboundNatRulePortMappingsOptionalParams, + LoadBalancersMigrateToIpBasedOptionalParams, + LoadBalancersListAllOptionalParams, + LoadBalancersListOptionalParams, + LoadBalancersDeleteOptionalParams, + LoadBalancersUpdateTagsOptionalParams, + LoadBalancersCreateOrUpdateOptionalParams, + LoadBalancersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/loadBalancers/operations.ts b/sdk/network/arm-network/src/api/loadBalancers/operations.ts new file mode 100644 index 000000000000..f904fce376d1 --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancers/operations.ts @@ -0,0 +1,551 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + LoadBalancer, + loadBalancerSerializer, + loadBalancerDeserializer, +} from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + migrateLoadBalancerToIpBasedRequestSerializer, + MigratedPools, + migratedPoolsDeserializer, + QueryInboundNatRulePortMappingRequest, + queryInboundNatRulePortMappingRequestSerializer, + BackendAddressInboundNatRulePortMappings, + backendAddressInboundNatRulePortMappingsDeserializer, + LoadBalancerVipSwapRequest, + loadBalancerVipSwapRequestSerializer, +} from "../../models/microsoft/network/models.js"; +import { + _LoadBalancerListResult, + _loadBalancerListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + LoadBalancersSwapPublicIpAddressesOptionalParams, + LoadBalancersListInboundNatRulePortMappingsOptionalParams, + LoadBalancersMigrateToIpBasedOptionalParams, + LoadBalancersListAllOptionalParams, + LoadBalancersListOptionalParams, + LoadBalancersDeleteOptionalParams, + LoadBalancersUpdateTagsOptionalParams, + LoadBalancersCreateOrUpdateOptionalParams, + LoadBalancersGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _swapPublicIpAddressesSend( + context: Client, + location: string, + parameters: LoadBalancerVipSwapRequest, + options: LoadBalancersSwapPublicIpAddressesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: loadBalancerVipSwapRequestSerializer(parameters), + }); +} + +export async function _swapPublicIpAddressesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Swaps VIPs between two load balancers. */ +export function swapPublicIpAddresses( + context: Client, + location: string, + parameters: LoadBalancerVipSwapRequest, + options: LoadBalancersSwapPublicIpAddressesOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _swapPublicIpAddressesDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _swapPublicIpAddressesSend(context, location, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _listInboundNatRulePortMappingsSend( + context: Client, + groupName: string, + loadBalancerName: string, + backendPoolName: string, + parameters: QueryInboundNatRulePortMappingRequest, + options: LoadBalancersListInboundNatRulePortMappingsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + groupName: groupName, + loadBalancerName: loadBalancerName, + backendPoolName: backendPoolName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: queryInboundNatRulePortMappingRequestSerializer(parameters), + }); +} + +export async function _listInboundNatRulePortMappingsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return backendAddressInboundNatRulePortMappingsDeserializer(result.body); +} + +/** List of inbound NAT rule port mappings. */ +export function listInboundNatRulePortMappings( + context: Client, + groupName: string, + loadBalancerName: string, + backendPoolName: string, + parameters: QueryInboundNatRulePortMappingRequest, + options: LoadBalancersListInboundNatRulePortMappingsOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + BackendAddressInboundNatRulePortMappings +> { + return getLongRunningPoller( + context, + _listInboundNatRulePortMappingsDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listInboundNatRulePortMappingsSend( + context, + groupName, + loadBalancerName, + backendPoolName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + BackendAddressInboundNatRulePortMappings + >; +} + +export function _migrateToIpBasedSend( + context: Client, + groupName: string, + loadBalancerName: string, + options: LoadBalancersMigrateToIpBasedOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/migrateToIpBased{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + groupName: groupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.parameters + ? options?.parameters + : migrateLoadBalancerToIpBasedRequestSerializer(options?.parameters), + }); +} + +export async function _migrateToIpBasedDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return migratedPoolsDeserializer(result.body); +} + +/** Migrate load balancer to IP Based */ +export async function migrateToIpBased( + context: Client, + groupName: string, + loadBalancerName: string, + options: LoadBalancersMigrateToIpBasedOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _migrateToIpBasedSend(context, groupName, loadBalancerName, options); + return _migrateToIpBasedDeserialize(result); +} + +export function _listAllSend( + context: Client, + options: LoadBalancersListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_LoadBalancerListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _loadBalancerListResultDeserializer(result.body); +} + +/** Gets all the load balancers in a subscription. */ +export function listAll( + context: Client, + options: LoadBalancersListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: LoadBalancersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_LoadBalancerListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _loadBalancerListResultDeserializer(result.body); +} + +/** Gets all the load balancers in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: LoadBalancersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified load balancer. */ +export function $delete( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, loadBalancerName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + parameters: TagsObject, + options: LoadBalancersUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return loadBalancerDeserializer(result.body); +} + +/** Updates a load balancer tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + parameters: TagsObject, + options: LoadBalancersUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + loadBalancerName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + parameters: LoadBalancer, + options: LoadBalancersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: loadBalancerSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return loadBalancerDeserializer(result.body); +} + +/** Creates or updates a load balancer. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + parameters: LoadBalancer, + options: LoadBalancersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, LoadBalancer> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, loadBalancerName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, LoadBalancer>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}{?api%2Dversion,%24expand,detailLevel}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + loadBalancerName: loadBalancerName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + detailLevel: options?.detailLevel, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return loadBalancerDeserializer(result.body); +} + +/** Gets the specified load balancer. */ +export async function get( + context: Client, + resourceGroupName: string, + loadBalancerName: string, + options: LoadBalancersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, loadBalancerName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/loadBalancers/options.ts b/sdk/network/arm-network/src/api/loadBalancers/options.ts new file mode 100644 index 000000000000..bd0f2e245fa4 --- /dev/null +++ b/sdk/network/arm-network/src/api/loadBalancers/options.ts @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + MigrateLoadBalancerToIpBasedRequest, + LoadBalancerDetailLevel, +} from "../../models/microsoft/network/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface LoadBalancersSwapPublicIpAddressesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface LoadBalancersListInboundNatRulePortMappingsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface LoadBalancersMigrateToIpBasedOptionalParams extends OperationOptions { + /** Parameters supplied to the migrateToIpBased Api. */ + parameters?: MigrateLoadBalancerToIpBasedRequest; +} + +/** Optional parameters. */ +export interface LoadBalancersListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LoadBalancersListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LoadBalancersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface LoadBalancersUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LoadBalancersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface LoadBalancersGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; + /** Controls verbosity of the returned load balancer resource. When set to 'Reduced', read-only back-reference collections (e.g., rules referencing frontendIPConfigurations) are omitted from the response. */ + detailLevel?: LoadBalancerDetailLevel; +} diff --git a/sdk/network/arm-network/src/api/localNetworkGateways/index.ts b/sdk/network/arm-network/src/api/localNetworkGateways/index.ts new file mode 100644 index 000000000000..e11bfbf209e4 --- /dev/null +++ b/sdk/network/arm-network/src/api/localNetworkGateways/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + LocalNetworkGatewaysListOptionalParams, + LocalNetworkGatewaysDeleteOptionalParams, + LocalNetworkGatewaysUpdateTagsOptionalParams, + LocalNetworkGatewaysCreateOrUpdateOptionalParams, + LocalNetworkGatewaysGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/localNetworkGateways/operations.ts b/sdk/network/arm-network/src/api/localNetworkGateways/operations.ts new file mode 100644 index 000000000000..043becdb9c83 --- /dev/null +++ b/sdk/network/arm-network/src/api/localNetworkGateways/operations.ts @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + LocalNetworkGateway, + localNetworkGatewaySerializer, + localNetworkGatewayDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _LocalNetworkGatewayListResult, + _localNetworkGatewayListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + LocalNetworkGatewaysListOptionalParams, + LocalNetworkGatewaysDeleteOptionalParams, + LocalNetworkGatewaysUpdateTagsOptionalParams, + LocalNetworkGatewaysCreateOrUpdateOptionalParams, + LocalNetworkGatewaysGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + options: LocalNetworkGatewaysListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_LocalNetworkGatewayListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _localNetworkGatewayListResultDeserializer(result.body); +} + +/** Gets all the local network gateways in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: LocalNetworkGatewaysListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + localNetworkGatewayName: string, + options: LocalNetworkGatewaysDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + localNetworkGatewayName: localNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified local network gateway. */ +export function $delete( + context: Client, + resourceGroupName: string, + localNetworkGatewayName: string, + options: LocalNetworkGatewaysDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, localNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: TagsObject, + options: LocalNetworkGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + localNetworkGatewayName: localNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return localNetworkGatewayDeserializer(result.body); +} + +/** Updates a local network gateway tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: TagsObject, + options: LocalNetworkGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + localNetworkGatewayName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: LocalNetworkGateway, + options: LocalNetworkGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + localNetworkGatewayName: localNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: localNetworkGatewaySerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return localNetworkGatewayDeserializer(result.body); +} + +/** Creates or updates a local network gateway in the specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: LocalNetworkGateway, + options: LocalNetworkGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, LocalNetworkGateway> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, localNetworkGatewayName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, LocalNetworkGateway>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + localNetworkGatewayName: string, + options: LocalNetworkGatewaysGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + localNetworkGatewayName: localNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return localNetworkGatewayDeserializer(result.body); +} + +/** Gets the specified local network gateway in a resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + localNetworkGatewayName: string, + options: LocalNetworkGatewaysGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, localNetworkGatewayName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/localNetworkGateways/options.ts b/sdk/network/arm-network/src/api/localNetworkGateways/options.ts new file mode 100644 index 000000000000..b137e9047afa --- /dev/null +++ b/sdk/network/arm-network/src/api/localNetworkGateways/options.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface LocalNetworkGatewaysListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LocalNetworkGatewaysDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface LocalNetworkGatewaysUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LocalNetworkGatewaysCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface LocalNetworkGatewaysGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/index.ts b/sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/index.ts new file mode 100644 index 000000000000..1e523bf09d1f --- /dev/null +++ b/sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ManagementGroupNetworkManagerConnectionsListOptionalParams, + ManagementGroupNetworkManagerConnectionsDeleteOptionalParams, + ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams, + ManagementGroupNetworkManagerConnectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/operations.ts b/sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/operations.ts new file mode 100644 index 000000000000..4efddbedd6ba --- /dev/null +++ b/sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/operations.ts @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NetworkManagerConnection, + networkManagerConnectionSerializer, + networkManagerConnectionDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _NetworkManagerConnectionListResult, + _networkManagerConnectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ManagementGroupNetworkManagerConnectionsListOptionalParams, + ManagementGroupNetworkManagerConnectionsDeleteOptionalParams, + ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams, + ManagementGroupNetworkManagerConnectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + managementGroupId: string, + options: ManagementGroupNetworkManagerConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections{?api%2Dversion,%24top,%24skipToken}", + { + managementGroupId: managementGroupId, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkManagerConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkManagerConnectionListResultDeserializer(result.body); +} + +/** List all network manager connections created by this management group. */ +export function list( + context: Client, + managementGroupId: string, + options: ManagementGroupNetworkManagerConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, managementGroupId, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + managementGroupId: string, + networkManagerConnectionName: string, + options: ManagementGroupNetworkManagerConnectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}{?api%2Dversion}", + { + managementGroupId: managementGroupId, + networkManagerConnectionName: networkManagerConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete specified pending connection created by this management group. */ +export async function $delete( + context: Client, + managementGroupId: string, + networkManagerConnectionName: string, + options: ManagementGroupNetworkManagerConnectionsDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + managementGroupId, + networkManagerConnectionName, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + managementGroupId: string, + networkManagerConnectionName: string, + parameters: NetworkManagerConnection, + options: ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}{?api%2Dversion}", + { + managementGroupId: managementGroupId, + networkManagerConnectionName: networkManagerConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkManagerConnectionSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerConnectionDeserializer(result.body); +} + +/** Create a network manager connection on this management group. */ +export async function createOrUpdate( + context: Client, + managementGroupId: string, + networkManagerConnectionName: string, + parameters: NetworkManagerConnection, + options: ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _createOrUpdateSend( + context, + managementGroupId, + networkManagerConnectionName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + managementGroupId: string, + networkManagerConnectionName: string, + options: ManagementGroupNetworkManagerConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}{?api%2Dversion}", + { + managementGroupId: managementGroupId, + networkManagerConnectionName: networkManagerConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerConnectionDeserializer(result.body); +} + +/** Get a specified connection created by this management group. */ +export async function get( + context: Client, + managementGroupId: string, + networkManagerConnectionName: string, + options: ManagementGroupNetworkManagerConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, managementGroupId, networkManagerConnectionName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/options.ts b/sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/options.ts new file mode 100644 index 000000000000..5f1a1203b0f5 --- /dev/null +++ b/sdk/network/arm-network/src/api/managementGroupNetworkManagerConnections/options.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ManagementGroupNetworkManagerConnectionsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ManagementGroupNetworkManagerConnectionsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagementGroupNetworkManagerConnectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/natGateways/index.ts b/sdk/network/arm-network/src/api/natGateways/index.ts new file mode 100644 index 000000000000..5e98012b7ba9 --- /dev/null +++ b/sdk/network/arm-network/src/api/natGateways/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + NatGatewaysListAllOptionalParams, + NatGatewaysListOptionalParams, + NatGatewaysDeleteOptionalParams, + NatGatewaysUpdateTagsOptionalParams, + NatGatewaysCreateOrUpdateOptionalParams, + NatGatewaysGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/natGateways/operations.ts b/sdk/network/arm-network/src/api/natGateways/operations.ts new file mode 100644 index 000000000000..97c624e33159 --- /dev/null +++ b/sdk/network/arm-network/src/api/natGateways/operations.ts @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + NatGateway, + natGatewaySerializer, + natGatewayDeserializer, +} from "../../models/common/models.js"; +import { TagsObject, tagsObjectSerializer } from "../../models/microsoft/network/models.js"; +import { _NatGatewayListResult, _natGatewayListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NatGatewaysListAllOptionalParams, + NatGatewaysListOptionalParams, + NatGatewaysDeleteOptionalParams, + NatGatewaysUpdateTagsOptionalParams, + NatGatewaysCreateOrUpdateOptionalParams, + NatGatewaysGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: NatGatewaysListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_NatGatewayListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _natGatewayListResultDeserializer(result.body); +} + +/** Gets all the Nat Gateways in a subscription. */ +export function listAll( + context: Client, + options: NatGatewaysListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: NatGatewaysListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NatGatewayListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _natGatewayListResultDeserializer(result.body); +} + +/** Gets all nat gateways in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: NatGatewaysListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + natGatewayName: string, + options: NatGatewaysDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + natGatewayName: natGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified nat gateway. */ +export function $delete( + context: Client, + resourceGroupName: string, + natGatewayName: string, + options: NatGatewaysDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, natGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + natGatewayName: string, + parameters: TagsObject, + options: NatGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + natGatewayName: natGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return natGatewayDeserializer(result.body); +} + +/** Updates nat gateway tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + natGatewayName: string, + parameters: TagsObject, + options: NatGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + natGatewayName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + natGatewayName: string, + parameters: NatGateway, + options: NatGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + natGatewayName: natGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: natGatewaySerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return natGatewayDeserializer(result.body); +} + +/** Creates or updates a nat gateway. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + natGatewayName: string, + parameters: NatGateway, + options: NatGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, NatGateway> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, natGatewayName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, NatGateway>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + natGatewayName: string, + options: NatGatewaysGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + natGatewayName: natGatewayName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return natGatewayDeserializer(result.body); +} + +/** Gets the specified nat gateway in a specified resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + natGatewayName: string, + options: NatGatewaysGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, natGatewayName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/natGateways/options.ts b/sdk/network/arm-network/src/api/natGateways/options.ts new file mode 100644 index 000000000000..a752a10481d5 --- /dev/null +++ b/sdk/network/arm-network/src/api/natGateways/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NatGatewaysListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NatGatewaysListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NatGatewaysDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NatGatewaysUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NatGatewaysCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NatGatewaysGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/natRules/index.ts b/sdk/network/arm-network/src/api/natRules/index.ts new file mode 100644 index 000000000000..1f5705b2aacf --- /dev/null +++ b/sdk/network/arm-network/src/api/natRules/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByVpnGateway, $delete, createOrUpdate, get } from "./operations.js"; +export type { + NatRulesListByVpnGatewayOptionalParams, + NatRulesDeleteOptionalParams, + NatRulesCreateOrUpdateOptionalParams, + NatRulesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/natRules/operations.ts b/sdk/network/arm-network/src/api/natRules/operations.ts new file mode 100644 index 000000000000..2a360047c490 --- /dev/null +++ b/sdk/network/arm-network/src/api/natRules/operations.ts @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + VpnGatewayNatRule, + vpnGatewayNatRuleSerializer, + vpnGatewayNatRuleDeserializer, + _ListVpnGatewayNatRulesResult, + _listVpnGatewayNatRulesResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NatRulesListByVpnGatewayOptionalParams, + NatRulesDeleteOptionalParams, + NatRulesCreateOrUpdateOptionalParams, + NatRulesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByVpnGatewaySend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: NatRulesListByVpnGatewayOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByVpnGatewayDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVpnGatewayNatRulesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVpnGatewayNatRulesResultDeserializer(result.body); +} + +/** Retrieves all nat rules for a particular virtual wan vpn gateway. */ +export function listByVpnGateway( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: NatRulesListByVpnGatewayOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByVpnGatewaySend(context, resourceGroupName, gatewayName, options), + _listByVpnGatewayDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options: NatRulesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + natRuleName: natRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a nat rule. */ +export function $delete( + context: Client, + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options: NatRulesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, gatewayName, natRuleName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + natRuleParameters: VpnGatewayNatRule, + options: NatRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + natRuleName: natRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnGatewayNatRuleSerializer(natRuleParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnGatewayNatRuleDeserializer(result.body); +} + +/** Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + natRuleParameters: VpnGatewayNatRule, + options: NatRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VpnGatewayNatRule> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + gatewayName, + natRuleName, + natRuleParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VpnGatewayNatRule>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options: NatRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + natRuleName: natRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnGatewayNatRuleDeserializer(result.body); +} + +/** Retrieves the details of a nat ruleGet. */ +export async function get( + context: Client, + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options: NatRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, gatewayName, natRuleName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/natRules/options.ts b/sdk/network/arm-network/src/api/natRules/options.ts new file mode 100644 index 000000000000..2c0896cc4f7c --- /dev/null +++ b/sdk/network/arm-network/src/api/natRules/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NatRulesListByVpnGatewayOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NatRulesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NatRulesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NatRulesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkGroups/index.ts b/sdk/network/arm-network/src/api/networkGroups/index.ts new file mode 100644 index 000000000000..7a1fe7ee835c --- /dev/null +++ b/sdk/network/arm-network/src/api/networkGroups/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + NetworkGroupsListOptionalParams, + NetworkGroupsDeleteOptionalParams, + NetworkGroupsCreateOrUpdateOptionalParams, + NetworkGroupsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkGroups/operations.ts b/sdk/network/arm-network/src/api/networkGroups/operations.ts new file mode 100644 index 000000000000..7daddd4e35be --- /dev/null +++ b/sdk/network/arm-network/src/api/networkGroups/operations.ts @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NetworkGroup, + networkGroupSerializer, + networkGroupDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _NetworkGroupListResult, + _networkGroupListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkGroupsListOptionalParams, + NetworkGroupsDeleteOptionalParams, + NetworkGroupsCreateOrUpdateOptionalParams, + NetworkGroupsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: NetworkGroupsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkGroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkGroupListResultDeserializer(result.body); +} + +/** Lists the specified network group. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: NetworkGroupsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options: NetworkGroupsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + networkGroupName: networkGroupName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a network group. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options: NetworkGroupsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkManagerName, networkGroupName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + parameters: NetworkGroup, + options: NetworkGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + networkGroupName: networkGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: networkGroupSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkGroupDeserializer(result.body); +} + +/** Creates or updates a network group. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + parameters: NetworkGroup, + options: NetworkGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + networkGroupName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options: NetworkGroupsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + networkGroupName: networkGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkGroupDeserializer(result.body); +} + +/** Gets the specified network group. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options: NetworkGroupsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + networkGroupName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkGroups/options.ts b/sdk/network/arm-network/src/api/networkGroups/options.ts new file mode 100644 index 000000000000..83ac0890dabd --- /dev/null +++ b/sdk/network/arm-network/src/api/networkGroups/options.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkGroupsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface NetworkGroupsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface NetworkGroupsCreateOrUpdateOptionalParams extends OperationOptions { + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface NetworkGroupsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/index.ts b/sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/index.ts new file mode 100644 index 000000000000..0c0ab35099dd --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export type { + NetworkInterfaceIPConfigurationsListOptionalParams, + NetworkInterfaceIPConfigurationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/operations.ts b/sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/operations.ts new file mode 100644 index 000000000000..1255a759f680 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/operations.ts @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + NetworkInterfaceIPConfiguration, + networkInterfaceIPConfigurationDeserializer, +} from "../../models/common/models.js"; +import { + _NetworkInterfaceIPConfigurationListResult, + _networkInterfaceIPConfigurationListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkInterfaceIPConfigurationsListOptionalParams, + NetworkInterfaceIPConfigurationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfaceIPConfigurationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkInterfaceIPConfigurationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkInterfaceIPConfigurationListResultDeserializer(result.body); +} + +/** Get all ip configurations in a network interface. */ +export function list( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfaceIPConfigurationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkInterfaceName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + ipConfigurationName: string, + options: NetworkInterfaceIPConfigurationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + ipConfigurationName: ipConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkInterfaceIPConfigurationDeserializer(result.body); +} + +/** Gets the specified network interface ip configuration. */ +export async function get( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + ipConfigurationName: string, + options: NetworkInterfaceIPConfigurationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkInterfaceName, + ipConfigurationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/options.ts b/sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/options.ts new file mode 100644 index 000000000000..f7b845ed51d9 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaceIPConfigurations/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkInterfaceIPConfigurationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkInterfaceIPConfigurationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/index.ts b/sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/index.ts new file mode 100644 index 000000000000..eb9c537b126a --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { NetworkInterfaceLoadBalancersListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/operations.ts b/sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/operations.ts new file mode 100644 index 000000000000..cb46692c7829 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/operations.ts @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer, LoadBalancer } from "../../models/common/models.js"; +import { + _NetworkInterfaceLoadBalancerListResult, + _networkInterfaceLoadBalancerListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { NetworkInterfaceLoadBalancersListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfaceLoadBalancersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkInterfaceLoadBalancerListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkInterfaceLoadBalancerListResultDeserializer(result.body); +} + +/** List all load balancers in a network interface. */ +export function list( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfaceLoadBalancersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkInterfaceName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/options.ts b/sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/options.ts new file mode 100644 index 000000000000..930919a148c6 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaceLoadBalancers/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkInterfaceLoadBalancersListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/index.ts b/sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/index.ts new file mode 100644 index 000000000000..49a259e95f2b --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + NetworkInterfaceTapConfigurationsListOptionalParams, + NetworkInterfaceTapConfigurationsDeleteOptionalParams, + NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, + NetworkInterfaceTapConfigurationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/operations.ts b/sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/operations.ts new file mode 100644 index 000000000000..3bea9ae99428 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/operations.ts @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + NetworkInterfaceTapConfiguration, + networkInterfaceTapConfigurationSerializer, + networkInterfaceTapConfigurationDeserializer, +} from "../../models/common/models.js"; +import { + _NetworkInterfaceTapConfigurationListResult, + _networkInterfaceTapConfigurationListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkInterfaceTapConfigurationsListOptionalParams, + NetworkInterfaceTapConfigurationsDeleteOptionalParams, + NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, + NetworkInterfaceTapConfigurationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfaceTapConfigurationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkInterfaceTapConfigurationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkInterfaceTapConfigurationListResultDeserializer(result.body); +} + +/** Get all Tap configurations in a network interface. */ +export function list( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfaceTapConfigurationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkInterfaceName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options: NetworkInterfaceTapConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + tapConfigurationName: tapConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified tap configuration from the NetworkInterface. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options: NetworkInterfaceTapConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkInterfaceName, tapConfigurationName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + tapConfigurationParameters: NetworkInterfaceTapConfiguration, + options: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + tapConfigurationName: tapConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkInterfaceTapConfigurationSerializer(tapConfigurationParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkInterfaceTapConfigurationDeserializer(result.body); +} + +/** Creates or updates a Tap configuration in the specified NetworkInterface. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + tapConfigurationParameters: NetworkInterfaceTapConfiguration, + options: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, NetworkInterfaceTapConfiguration> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + networkInterfaceName, + tapConfigurationName, + tapConfigurationParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + NetworkInterfaceTapConfiguration + >; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options: NetworkInterfaceTapConfigurationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + tapConfigurationName: tapConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkInterfaceTapConfigurationDeserializer(result.body); +} + +/** Get the specified tap configuration on a network interface. */ +export async function get( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options: NetworkInterfaceTapConfigurationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkInterfaceName, + tapConfigurationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/options.ts b/sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/options.ts new file mode 100644 index 000000000000..8550c7efdc95 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaceTapConfigurations/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkInterfaceTapConfigurationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkInterfaceTapConfigurationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkInterfaceTapConfigurationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkInterfaces/index.ts b/sdk/network/arm-network/src/api/networkInterfaces/index.ts new file mode 100644 index 000000000000..e771ba0d1c42 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaces/index.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listVirtualMachineScaleSetNetworkInterfaces, + listCloudServiceNetworkInterfaces, + listVirtualMachineScaleSetIpConfigurations, + getVirtualMachineScaleSetIpConfiguration, + listEffectiveNetworkSecurityGroups, + getEffectiveRouteTable, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, + listVirtualMachineScaleSetVMNetworkInterfaces, + getVirtualMachineScaleSetNetworkInterface, + listCloudServiceRoleInstanceNetworkInterfaces, + getCloudServiceNetworkInterface, +} from "./operations.js"; +export type { + NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, + NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, + NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, + NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams, + NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, + NetworkInterfacesGetEffectiveRouteTableOptionalParams, + NetworkInterfacesListAllOptionalParams, + NetworkInterfacesListOptionalParams, + NetworkInterfacesDeleteOptionalParams, + NetworkInterfacesUpdateTagsOptionalParams, + NetworkInterfacesCreateOrUpdateOptionalParams, + NetworkInterfacesGetOptionalParams, + NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, + NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams, + NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, + NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkInterfaces/operations.ts b/sdk/network/arm-network/src/api/networkInterfaces/operations.ts new file mode 100644 index 000000000000..ffe5279f88bf --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaces/operations.ts @@ -0,0 +1,1035 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + NetworkInterfaceIPConfiguration, + networkInterfaceIPConfigurationDeserializer, + NetworkInterface, + networkInterfaceSerializer, + networkInterfaceDeserializer, +} from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + EffectiveRouteListResult, + effectiveRouteListResultDeserializer, + EffectiveNetworkSecurityGroupListResult, + effectiveNetworkSecurityGroupListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _NetworkInterfaceListResult, + _networkInterfaceListResultDeserializer, + _NetworkInterfaceIPConfigurationListResult, + _networkInterfaceIPConfigurationListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, + NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, + NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, + NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams, + NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, + NetworkInterfacesGetEffectiveRouteTableOptionalParams, + NetworkInterfacesListAllOptionalParams, + NetworkInterfacesListOptionalParams, + NetworkInterfacesDeleteOptionalParams, + NetworkInterfacesUpdateTagsOptionalParams, + NetworkInterfacesCreateOrUpdateOptionalParams, + NetworkInterfacesGetOptionalParams, + NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, + NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams, + NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, + NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listVirtualMachineScaleSetNetworkInterfacesSend( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + options: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineScaleSetName: virtualMachineScaleSetName, + "api%2Dversion": "2018-10-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listVirtualMachineScaleSetNetworkInterfacesDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkInterfaceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkInterfaceListResultDeserializer(result.body); +} + +/** Gets all network interfaces in a virtual machine scale set. */ +export function listVirtualMachineScaleSetNetworkInterfaces( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + options: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listVirtualMachineScaleSetNetworkInterfacesSend( + context, + resourceGroupName, + virtualMachineScaleSetName, + options, + ), + _listVirtualMachineScaleSetNetworkInterfacesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2018-10-01" }, + ); +} + +export function _listCloudServiceNetworkInterfacesSend( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + options: NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + cloudServiceName: cloudServiceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listCloudServiceNetworkInterfacesDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkInterfaceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkInterfaceListResultDeserializer(result.body); +} + +/** Gets all network interfaces in a cloud service. */ +export function listCloudServiceNetworkInterfaces( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + options: NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listCloudServiceNetworkInterfacesSend(context, resourceGroupName, cloudServiceName, options), + _listCloudServiceNetworkInterfacesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listVirtualMachineScaleSetIpConfigurationsSend( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + options: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineScaleSetName: virtualMachineScaleSetName, + virtualmachineIndex: virtualmachineIndex, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2018-10-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listVirtualMachineScaleSetIpConfigurationsDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkInterfaceIPConfigurationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkInterfaceIPConfigurationListResultDeserializer(result.body); +} + +/** Get the specified network interface ip configuration in a virtual machine scale set. */ +export function listVirtualMachineScaleSetIpConfigurations( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + options: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listVirtualMachineScaleSetIpConfigurationsSend( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + networkInterfaceName, + options, + ), + _listVirtualMachineScaleSetIpConfigurationsDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2018-10-01" }, + ); +} + +export function _getVirtualMachineScaleSetIpConfigurationSend( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + options: NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineScaleSetName: virtualMachineScaleSetName, + virtualmachineIndex: virtualmachineIndex, + networkInterfaceName: networkInterfaceName, + ipConfigurationName: ipConfigurationName, + "api%2Dversion": "2018-10-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getVirtualMachineScaleSetIpConfigurationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkInterfaceIPConfigurationDeserializer(result.body); +} + +/** Get the specified network interface ip configuration in a virtual machine scale set. */ +export async function getVirtualMachineScaleSetIpConfiguration( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + options: NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getVirtualMachineScaleSetIpConfigurationSend( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + networkInterfaceName, + ipConfigurationName, + options, + ); + return _getVirtualMachineScaleSetIpConfigurationDeserialize(result); +} + +export function _listEffectiveNetworkSecurityGroupsSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listEffectiveNetworkSecurityGroupsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return effectiveNetworkSecurityGroupListResultDeserializer(result.body); +} + +/** Gets all network security groups applied to a network interface. */ +export function listEffectiveNetworkSecurityGroups( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + EffectiveNetworkSecurityGroupListResult +> { + return getLongRunningPoller( + context, + _listEffectiveNetworkSecurityGroupsDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listEffectiveNetworkSecurityGroupsSend( + context, + resourceGroupName, + networkInterfaceName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + EffectiveNetworkSecurityGroupListResult + >; +} + +export function _getEffectiveRouteTableSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfacesGetEffectiveRouteTableOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getEffectiveRouteTableDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return effectiveRouteListResultDeserializer(result.body); +} + +/** Gets all route tables applied to a network interface. */ +export function getEffectiveRouteTable( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfacesGetEffectiveRouteTableOptionalParams = { requestOptions: {} }, +): PollerLike, EffectiveRouteListResult> { + return getLongRunningPoller(context, _getEffectiveRouteTableDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getEffectiveRouteTableSend(context, resourceGroupName, networkInterfaceName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, EffectiveRouteListResult>; +} + +export function _listAllSend( + context: Client, + options: NetworkInterfacesListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkInterfaceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkInterfaceListResultDeserializer(result.body); +} + +/** Gets all network interfaces in a subscription. */ +export function listAll( + context: Client, + options: NetworkInterfacesListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: NetworkInterfacesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkInterfaceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkInterfaceListResultDeserializer(result.body); +} + +/** Gets all network interfaces in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: NetworkInterfacesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfacesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified network interface. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfacesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkInterfaceName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + parameters: TagsObject, + options: NetworkInterfacesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkInterfaceDeserializer(result.body); +} + +/** Updates a network interface tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + parameters: TagsObject, + options: NetworkInterfacesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + networkInterfaceName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + parameters: NetworkInterface, + options: NetworkInterfacesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkInterfaceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkInterfaceDeserializer(result.body); +} + +/** Creates or updates a network interface. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + parameters: NetworkInterface, + options: NetworkInterfacesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, NetworkInterface> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, networkInterfaceName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, NetworkInterface>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfacesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkInterfaceDeserializer(result.body); +} + +/** Gets information about the specified network interface. */ +export async function get( + context: Client, + resourceGroupName: string, + networkInterfaceName: string, + options: NetworkInterfacesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, networkInterfaceName, options); + return _getDeserialize(result); +} + +export function _listVirtualMachineScaleSetVMNetworkInterfacesSend( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + options: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineScaleSetName: virtualMachineScaleSetName, + virtualmachineIndex: virtualmachineIndex, + "api%2Dversion": "2018-10-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listVirtualMachineScaleSetVMNetworkInterfacesDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkInterfaceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkInterfaceListResultDeserializer(result.body); +} + +/** Gets information about all network interfaces in a virtual machine in a virtual machine scale set. */ +export function listVirtualMachineScaleSetVMNetworkInterfaces( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + options: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listVirtualMachineScaleSetVMNetworkInterfacesSend( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + options, + ), + _listVirtualMachineScaleSetVMNetworkInterfacesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2018-10-01" }, + ); +} + +export function _getVirtualMachineScaleSetNetworkInterfaceSend( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + options: NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineScaleSetName: virtualMachineScaleSetName, + virtualmachineIndex: virtualmachineIndex, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2018-10-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getVirtualMachineScaleSetNetworkInterfaceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkInterfaceDeserializer(result.body); +} + +/** Get the specified network interface in a virtual machine scale set. */ +export async function getVirtualMachineScaleSetNetworkInterface( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + options: NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getVirtualMachineScaleSetNetworkInterfaceSend( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + networkInterfaceName, + options, + ); + return _getVirtualMachineScaleSetNetworkInterfaceDeserialize(result); +} + +export function _listCloudServiceRoleInstanceNetworkInterfacesSend( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + options: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + cloudServiceName: cloudServiceName, + roleInstanceName: roleInstanceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listCloudServiceRoleInstanceNetworkInterfacesDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkInterfaceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkInterfaceListResultDeserializer(result.body); +} + +/** Gets information about all network interfaces in a role instance in a cloud service. */ +export function listCloudServiceRoleInstanceNetworkInterfaces( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + options: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listCloudServiceRoleInstanceNetworkInterfacesSend( + context, + resourceGroupName, + cloudServiceName, + roleInstanceName, + options, + ), + _listCloudServiceRoleInstanceNetworkInterfacesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getCloudServiceNetworkInterfaceSend( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + options: NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + cloudServiceName: cloudServiceName, + roleInstanceName: roleInstanceName, + networkInterfaceName: networkInterfaceName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getCloudServiceNetworkInterfaceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkInterfaceDeserializer(result.body); +} + +/** Get the specified network interface in a cloud service. */ +export async function getCloudServiceNetworkInterface( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + options: NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getCloudServiceNetworkInterfaceSend( + context, + resourceGroupName, + cloudServiceName, + roleInstanceName, + networkInterfaceName, + options, + ); + return _getCloudServiceNetworkInterfaceDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkInterfaces/options.ts b/sdk/network/arm-network/src/api/networkInterfaces/options.ts new file mode 100644 index 000000000000..70167f4656fd --- /dev/null +++ b/sdk/network/arm-network/src/api/networkInterfaces/options.ts @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} + +/** Optional parameters. */ +export interface NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} + +/** Optional parameters. */ +export interface NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkInterfacesGetEffectiveRouteTableOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkInterfacesListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkInterfacesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkInterfacesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkInterfacesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkInterfacesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkInterfacesGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} + +/** Optional parameters. */ +export interface NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} + +/** Optional parameters. */ +export interface NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/networkManagementContext.ts b/sdk/network/arm-network/src/api/networkManagementContext.ts new file mode 100644 index 000000000000..fc3e9297567b --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagementContext.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { logger } from "../logger.js"; +import { AzureSupportedClouds, getArmEndpoint } from "../static-helpers/cloudSettingHelpers.js"; +import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; +import { TokenCredential } from "@azure/core-auth"; + +export interface NetworkManagementContext extends Client { + /** The ID of the target subscription. The value must be an UUID. */ + subscriptionId: string; +} + +/** Optional parameters for the client. */ +export interface NetworkManagementClientOptionalParams extends ClientOptions { + /** Specifies the Azure cloud environment for the client. */ + cloudSetting?: AzureSupportedClouds; +} + +export function createNetworkManagement( + credential: TokenCredential, + subscriptionId: string, + options: NetworkManagementClientOptionalParams = {}, +): NetworkManagementContext { + const endpointUrl = + options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? "https://management.azure.com"; + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentInfo = `azsdk-js-arm-network/1.0.0-beta.1`; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` + : `azsdk-js-api ${userAgentInfo}`; + const { apiVersion: _, ...updatedOptions } = { + ...options, + userAgentOptions: { userAgentPrefix }, + loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info }, + credentials: { + scopes: options.credentials?.scopes ?? ["https://management.azure.com/.default"], + }, + }; + const clientContext = getClient(endpointUrl, credential, updatedOptions); + + if (options.apiVersion) { + logger.warning( + "This client does not support client api-version, please change it at the operation level", + ); + } + return { ...clientContext, subscriptionId } as NetworkManagementContext; +} diff --git a/sdk/network/arm-network/src/api/networkManagerCommits/index.ts b/sdk/network/arm-network/src/api/networkManagerCommits/index.ts new file mode 100644 index 000000000000..4eb39bebb02a --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagerCommits/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { post } from "./operations.js"; +export type { NetworkManagerCommitsPostOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkManagerCommits/operations.ts b/sdk/network/arm-network/src/api/networkManagerCommits/operations.ts new file mode 100644 index 000000000000..bcffca97f842 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagerCommits/operations.ts @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NetworkManagerCommit, + networkManagerCommitSerializer, + networkManagerCommitDeserializer, +} from "../../models/microsoft/network/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { NetworkManagerCommitsPostOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _postSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerCommit, + options: NetworkManagerCommitsPostOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commit{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkManagerCommitSerializer(parameters), + }); +} + +export async function _postDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerCommitDeserializer(result.body); +} + +/** Post a Network Manager Commit. */ +export function post( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerCommit, + options: NetworkManagerCommitsPostOptionalParams = { requestOptions: {} }, +): PollerLike, NetworkManagerCommit> { + return getLongRunningPoller(context, _postDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _postSend(context, resourceGroupName, networkManagerName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, NetworkManagerCommit>; +} diff --git a/sdk/network/arm-network/src/api/networkManagerCommits/options.ts b/sdk/network/arm-network/src/api/networkManagerCommits/options.ts new file mode 100644 index 000000000000..a26c0a57a40d --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagerCommits/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkManagerCommitsPostOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/network/arm-network/src/api/networkManagerDeploymentStatus/index.ts b/sdk/network/arm-network/src/api/networkManagerDeploymentStatus/index.ts new file mode 100644 index 000000000000..f4c725717eed --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagerDeploymentStatus/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { NetworkManagerDeploymentStatusListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkManagerDeploymentStatus/operations.ts b/sdk/network/arm-network/src/api/networkManagerDeploymentStatus/operations.ts new file mode 100644 index 000000000000..2d83a65898d9 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagerDeploymentStatus/operations.ts @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NetworkManagerDeploymentStatusParameter, + networkManagerDeploymentStatusParameterSerializer, + NetworkManagerDeploymentStatusListResult, + networkManagerDeploymentStatusListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { NetworkManagerDeploymentStatusListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerDeploymentStatusParameter, + options: NetworkManagerDeploymentStatusListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listDeploymentStatus{?api%2Dversion,%24top}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkManagerDeploymentStatusParameterSerializer(parameters), + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerDeploymentStatusListResultDeserializer(result.body); +} + +/** Post to List of Network Manager Deployment Status. */ +export async function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerDeploymentStatusParameter, + options: NetworkManagerDeploymentStatusListOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSend( + context, + resourceGroupName, + networkManagerName, + parameters, + options, + ); + return _listDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkManagerDeploymentStatus/options.ts b/sdk/network/arm-network/src/api/networkManagerDeploymentStatus/options.ts new file mode 100644 index 000000000000..8623e4d3f75a --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagerDeploymentStatus/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkManagerDeploymentStatusListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; +} diff --git a/sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/index.ts b/sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/index.ts new file mode 100644 index 000000000000..148b3373eb49 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + NetworkManagerRoutingConfigurationsListOptionalParams, + NetworkManagerRoutingConfigurationsDeleteOptionalParams, + NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams, + NetworkManagerRoutingConfigurationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/operations.ts b/sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/operations.ts new file mode 100644 index 000000000000..750ec5be38c0 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/operations.ts @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NetworkManagerRoutingConfiguration, + networkManagerRoutingConfigurationSerializer, + networkManagerRoutingConfigurationDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _NetworkManagerRoutingConfigurationListResult, + _networkManagerRoutingConfigurationListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkManagerRoutingConfigurationsListOptionalParams, + NetworkManagerRoutingConfigurationsDeleteOptionalParams, + NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams, + NetworkManagerRoutingConfigurationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: NetworkManagerRoutingConfigurationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkManagerRoutingConfigurationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkManagerRoutingConfigurationListResultDeserializer(result.body); +} + +/** Lists all the network manager routing configurations in a network manager, in a paginated format. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: NetworkManagerRoutingConfigurationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: NetworkManagerRoutingConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a network manager routing configuration. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: NetworkManagerRoutingConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkManagerName, configurationName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + routingConfiguration: NetworkManagerRoutingConfiguration, + options: NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkManagerRoutingConfigurationSerializer(routingConfiguration), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerRoutingConfigurationDeserializer(result.body); +} + +/** Creates or updates a network manager routing configuration. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + routingConfiguration: NetworkManagerRoutingConfiguration, + options: NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + routingConfiguration, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: NetworkManagerRoutingConfigurationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerRoutingConfigurationDeserializer(result.body); +} + +/** Retrieves a network manager routing configuration. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: NetworkManagerRoutingConfigurationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/options.ts b/sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/options.ts new file mode 100644 index 000000000000..e2f164f5edcd --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagerRoutingConfigurations/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkManagerRoutingConfigurationsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface NetworkManagerRoutingConfigurationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkManagerRoutingConfigurationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkManagers/index.ts b/sdk/network/arm-network/src/api/networkManagers/index.ts new file mode 100644 index 000000000000..1dbbc71ad60d --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagers/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listBySubscription, list, $delete, patch, createOrUpdate, get } from "./operations.js"; +export type { + NetworkManagersListBySubscriptionOptionalParams, + NetworkManagersListOptionalParams, + NetworkManagersDeleteOptionalParams, + NetworkManagersPatchOptionalParams, + NetworkManagersCreateOrUpdateOptionalParams, + NetworkManagersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkManagers/operations.ts b/sdk/network/arm-network/src/api/networkManagers/operations.ts new file mode 100644 index 000000000000..95b3a75ddebc --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagers/operations.ts @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NetworkManager, + networkManagerSerializer, + networkManagerDeserializer, + PatchObject, + patchObjectSerializer, +} from "../../models/microsoft/network/models.js"; +import { + _NetworkManagerListResult, + _networkManagerListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkManagersListBySubscriptionOptionalParams, + NetworkManagersListOptionalParams, + NetworkManagersDeleteOptionalParams, + NetworkManagersPatchOptionalParams, + NetworkManagersCreateOrUpdateOptionalParams, + NetworkManagersGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: NetworkManagersListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagers{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkManagerListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkManagerListResultDeserializer(result.body); +} + +/** List all network managers in a subscription. */ +export function listBySubscription( + context: Client, + options: NetworkManagersListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: NetworkManagersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkManagerListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkManagerListResultDeserializer(result.body); +} + +/** List network managers in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: NetworkManagersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: NetworkManagersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a network manager. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: NetworkManagersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, networkManagerName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _patchSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: PatchObject, + options: NetworkManagersPatchOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: patchObjectSerializer(parameters), + }); +} + +export async function _patchDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerDeserializer(result.body); +} + +/** Patch NetworkManager. */ +export async function patch( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: PatchObject, + options: NetworkManagersPatchOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _patchSend( + context, + resourceGroupName, + networkManagerName, + parameters, + options, + ); + return _patchDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManager, + options: NetworkManagersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkManagerSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerDeserializer(result.body); +} + +/** Creates or updates a Network Manager. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManager, + options: NetworkManagersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: NetworkManagersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerDeserializer(result.body); +} + +/** Gets the specified Network Manager. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: NetworkManagersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, networkManagerName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkManagers/options.ts b/sdk/network/arm-network/src/api/networkManagers/options.ts new file mode 100644 index 000000000000..d3ac4f8a2a33 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkManagers/options.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkManagersListBySubscriptionOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface NetworkManagersListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface NetworkManagersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface NetworkManagersPatchOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkManagersCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkManagersGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkProfiles/index.ts b/sdk/network/arm-network/src/api/networkProfiles/index.ts new file mode 100644 index 000000000000..34767386370e --- /dev/null +++ b/sdk/network/arm-network/src/api/networkProfiles/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + NetworkProfilesListAllOptionalParams, + NetworkProfilesListOptionalParams, + NetworkProfilesDeleteOptionalParams, + NetworkProfilesUpdateTagsOptionalParams, + NetworkProfilesCreateOrUpdateOptionalParams, + NetworkProfilesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkProfiles/operations.ts b/sdk/network/arm-network/src/api/networkProfiles/operations.ts new file mode 100644 index 000000000000..72d4b6aff44b --- /dev/null +++ b/sdk/network/arm-network/src/api/networkProfiles/operations.ts @@ -0,0 +1,351 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + NetworkProfile, + networkProfileSerializer, + networkProfileDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _NetworkProfileListResult, + _networkProfileListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkProfilesListAllOptionalParams, + NetworkProfilesListOptionalParams, + NetworkProfilesDeleteOptionalParams, + NetworkProfilesUpdateTagsOptionalParams, + NetworkProfilesCreateOrUpdateOptionalParams, + NetworkProfilesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: NetworkProfilesListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkProfileListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkProfileListResultDeserializer(result.body); +} + +/** Gets all the network profiles in a subscription. */ +export function listAll( + context: Client, + options: NetworkProfilesListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: NetworkProfilesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkProfileListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkProfileListResultDeserializer(result.body); +} + +/** Gets all network profiles in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: NetworkProfilesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkProfileName: string, + options: NetworkProfilesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkProfileName: networkProfileName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified network profile. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkProfileName: string, + options: NetworkProfilesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, networkProfileName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + networkProfileName: string, + parameters: TagsObject, + options: NetworkProfilesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkProfileName: networkProfileName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkProfileDeserializer(result.body); +} + +/** Updates network profile tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + networkProfileName: string, + parameters: TagsObject, + options: NetworkProfilesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + networkProfileName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkProfileName: string, + parameters: NetworkProfile, + options: NetworkProfilesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkProfileName: networkProfileName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkProfileSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkProfileDeserializer(result.body); +} + +/** Creates or updates a network profile. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkProfileName: string, + parameters: NetworkProfile, + options: NetworkProfilesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkProfileName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkProfileName: string, + options: NetworkProfilesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkProfileName: networkProfileName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkProfileDeserializer(result.body); +} + +/** Gets the specified network profile in a specified resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + networkProfileName: string, + options: NetworkProfilesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, networkProfileName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkProfiles/options.ts b/sdk/network/arm-network/src/api/networkProfiles/options.ts new file mode 100644 index 000000000000..8ea37199e0ae --- /dev/null +++ b/sdk/network/arm-network/src/api/networkProfiles/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkProfilesListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkProfilesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkProfilesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkProfilesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkProfilesCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkProfilesGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/networkSecurityGroups/index.ts b/sdk/network/arm-network/src/api/networkSecurityGroups/index.ts new file mode 100644 index 000000000000..c5d320b269e9 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityGroups/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + NetworkSecurityGroupsListAllOptionalParams, + NetworkSecurityGroupsListOptionalParams, + NetworkSecurityGroupsDeleteOptionalParams, + NetworkSecurityGroupsUpdateTagsOptionalParams, + NetworkSecurityGroupsCreateOrUpdateOptionalParams, + NetworkSecurityGroupsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkSecurityGroups/operations.ts b/sdk/network/arm-network/src/api/networkSecurityGroups/operations.ts new file mode 100644 index 000000000000..b782a82ef598 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityGroups/operations.ts @@ -0,0 +1,359 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + NetworkSecurityGroup, + networkSecurityGroupSerializer, + networkSecurityGroupDeserializer, +} from "../../models/common/models.js"; +import { TagsObject, tagsObjectSerializer } from "../../models/microsoft/network/models.js"; +import { + _NetworkSecurityGroupListResult, + _networkSecurityGroupListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkSecurityGroupsListAllOptionalParams, + NetworkSecurityGroupsListOptionalParams, + NetworkSecurityGroupsDeleteOptionalParams, + NetworkSecurityGroupsUpdateTagsOptionalParams, + NetworkSecurityGroupsCreateOrUpdateOptionalParams, + NetworkSecurityGroupsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: NetworkSecurityGroupsListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkSecurityGroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkSecurityGroupListResultDeserializer(result.body); +} + +/** Gets all network security groups in a subscription. */ +export function listAll( + context: Client, + options: NetworkSecurityGroupsListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: NetworkSecurityGroupsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkSecurityGroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkSecurityGroupListResultDeserializer(result.body); +} + +/** Gets all network security groups in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: NetworkSecurityGroupsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + options: NetworkSecurityGroupsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityGroupName: networkSecurityGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified network security group. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + options: NetworkSecurityGroupsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkSecurityGroupName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: TagsObject, + options: NetworkSecurityGroupsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityGroupName: networkSecurityGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkSecurityGroupDeserializer(result.body); +} + +/** Updates a network security group tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: TagsObject, + options: NetworkSecurityGroupsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + networkSecurityGroupName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: NetworkSecurityGroup, + options: NetworkSecurityGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityGroupName: networkSecurityGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkSecurityGroupSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkSecurityGroupDeserializer(result.body); +} + +/** Creates or updates a network security group in the specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: NetworkSecurityGroup, + options: NetworkSecurityGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, NetworkSecurityGroup> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + networkSecurityGroupName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, NetworkSecurityGroup>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + options: NetworkSecurityGroupsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityGroupName: networkSecurityGroupName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkSecurityGroupDeserializer(result.body); +} + +/** Gets the specified network security group. */ +export async function get( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + options: NetworkSecurityGroupsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, networkSecurityGroupName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkSecurityGroups/options.ts b/sdk/network/arm-network/src/api/networkSecurityGroups/options.ts new file mode 100644 index 000000000000..fad777761ea0 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityGroups/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkSecurityGroupsListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityGroupsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityGroupsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkSecurityGroupsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityGroupsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkSecurityGroupsGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/index.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/index.ts new file mode 100644 index 000000000000..a4380024b69c --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { reconcile, list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + NetworkSecurityPerimeterAccessRulesReconcileOptionalParams, + NetworkSecurityPerimeterAccessRulesListOptionalParams, + NetworkSecurityPerimeterAccessRulesDeleteOptionalParams, + NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterAccessRulesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/operations.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/operations.ts new file mode 100644 index 000000000000..2aecb40ce8ef --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/operations.ts @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NspAccessRule, + nspAccessRuleSerializer, + nspAccessRuleDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _NspAccessRuleListResult, + _nspAccessRuleListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkSecurityPerimeterAccessRulesReconcileOptionalParams, + NetworkSecurityPerimeterAccessRulesListOptionalParams, + NetworkSecurityPerimeterAccessRulesDeleteOptionalParams, + NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterAccessRulesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _reconcileSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + parameters: Record, + options: NetworkSecurityPerimeterAccessRulesReconcileOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules/{accessRuleName}/reconcile{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + profileName: profileName, + accessRuleName: accessRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: parameters, + }); +} + +export async function _reconcileDeserialize( + result: PathUncheckedResponse, +): Promise> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return result.body; +} + +/** Reconcile NSP access rules */ +export async function reconcile( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + parameters: Record, + options: NetworkSecurityPerimeterAccessRulesReconcileOptionalParams = { requestOptions: {} }, +): Promise> { + const result = await _reconcileSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + accessRuleName, + parameters, + options, + ); + return _reconcileDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options: NetworkSecurityPerimeterAccessRulesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + profileName: profileName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NspAccessRuleListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _nspAccessRuleListResultDeserializer(result.body); +} + +/** Lists the NSP access rules in the specified NSP profile. */ +export function list( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options: NetworkSecurityPerimeterAccessRulesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkSecurityPerimeterName, profileName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + options: NetworkSecurityPerimeterAccessRulesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules/{accessRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + profileName: profileName, + accessRuleName: accessRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes an NSP access rule. */ +export async function $delete( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + options: NetworkSecurityPerimeterAccessRulesDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + accessRuleName, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + parameters: NspAccessRule, + options: NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules/{accessRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + profileName: profileName, + accessRuleName: accessRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: nspAccessRuleSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return nspAccessRuleDeserializer(result.body); +} + +/** Creates or updates a network access rule. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + parameters: NspAccessRule, + options: NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + accessRuleName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + options: NetworkSecurityPerimeterAccessRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules/{accessRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + profileName: profileName, + accessRuleName: accessRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return nspAccessRuleDeserializer(result.body); +} + +/** Gets the specified NSP access rule by name. */ +export async function get( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + options: NetworkSecurityPerimeterAccessRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + accessRuleName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/options.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/options.ts new file mode 100644 index 000000000000..7de093c471e2 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterAccessRules/options.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterAccessRulesReconcileOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterAccessRulesListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterAccessRulesDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterAccessRulesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/index.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/index.ts new file mode 100644 index 000000000000..deb0cbb16858 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/operations.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/operations.ts new file mode 100644 index 000000000000..d854b47b7719 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/operations.ts @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + _PerimeterAssociableResourcesListResult, + _perimeterAssociableResourcesListResultDeserializer, + PerimeterAssociableResource, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + location: string, + options: NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/perimeterAssociableResourceTypes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_PerimeterAssociableResourcesListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _perimeterAssociableResourcesListResultDeserializer(result.body); +} + +/** Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter */ +export function list( + context: Client, + location: string, + options: NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, location, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/options.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/options.ts new file mode 100644 index 000000000000..2da5db60e28b --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociableResourceTypes/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/index.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/index.ts new file mode 100644 index 000000000000..f5a0d2fc7416 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { reconcile, list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + NetworkSecurityPerimeterAssociationsReconcileOptionalParams, + NetworkSecurityPerimeterAssociationsListOptionalParams, + NetworkSecurityPerimeterAssociationsDeleteOptionalParams, + NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterAssociationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/operations.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/operations.ts new file mode 100644 index 000000000000..1596517372b7 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/operations.ts @@ -0,0 +1,339 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NspAssociation, + nspAssociationSerializer, + nspAssociationDeserializer, + _NspAssociationsListResult, + _nspAssociationsListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkSecurityPerimeterAssociationsReconcileOptionalParams, + NetworkSecurityPerimeterAssociationsListOptionalParams, + NetworkSecurityPerimeterAssociationsDeleteOptionalParams, + NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterAssociationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _reconcileSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: Record, + options: NetworkSecurityPerimeterAssociationsReconcileOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}/reconcile{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + associationName: associationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: parameters, + }); +} + +export async function _reconcileDeserialize( + result: PathUncheckedResponse, +): Promise> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return result.body; +} + +/** Reconcile NSP association */ +export async function reconcile( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: Record, + options: NetworkSecurityPerimeterAssociationsReconcileOptionalParams = { requestOptions: {} }, +): Promise> { + const result = await _reconcileSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + associationName, + parameters, + options, + ); + return _reconcileDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimeterAssociationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NspAssociationsListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _nspAssociationsListResultDeserializer(result.body); +} + +/** Lists the NSP resource associations. */ +export function list( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimeterAssociationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkSecurityPerimeterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options: NetworkSecurityPerimeterAssociationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + associationName: associationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes an NSP association resource. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options: NetworkSecurityPerimeterAssociationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + associationName, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: NspAssociation, + options: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + associationName: associationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: nspAssociationSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return nspAssociationDeserializer(result.body); +} + +/** Creates or updates a NSP resource association. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: NspAssociation, + options: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, NspAssociation> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + associationName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, NspAssociation>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options: NetworkSecurityPerimeterAssociationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + associationName: associationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return nspAssociationDeserializer(result.body); +} + +/** Gets the specified NSP association by name. */ +export async function get( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options: NetworkSecurityPerimeterAssociationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + associationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/options.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/options.ts new file mode 100644 index 000000000000..1ac053b1c085 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterAssociations/options.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterAssociationsReconcileOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterAssociationsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterAssociationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterAssociationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/index.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/index.ts new file mode 100644 index 000000000000..1466cde04019 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, get } from "./operations.js"; +export type { + NetworkSecurityPerimeterLinkReferencesListOptionalParams, + NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, + NetworkSecurityPerimeterLinkReferencesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/operations.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/operations.ts new file mode 100644 index 000000000000..512bd335e95a --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/operations.ts @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NspLinkReference, + nspLinkReferenceDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _NspLinkReferenceListResult, + _nspLinkReferenceListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkSecurityPerimeterLinkReferencesListOptionalParams, + NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, + NetworkSecurityPerimeterLinkReferencesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimeterLinkReferencesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/linkReferences{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NspLinkReferenceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _nspLinkReferenceListResultDeserializer(result.body); +} + +/** Lists the NSP LinkReference resources in the specified network security perimeter. */ +export function list( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimeterLinkReferencesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkSecurityPerimeterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/linkReferences/{linkReferenceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + linkReferenceName: linkReferenceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes an NSP LinkReference resource. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + linkReferenceName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options: NetworkSecurityPerimeterLinkReferencesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/linkReferences/{linkReferenceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + linkReferenceName: linkReferenceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return nspLinkReferenceDeserializer(result.body); +} + +/** Gets the specified NSP linkReference resource. */ +export async function get( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options: NetworkSecurityPerimeterLinkReferencesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + linkReferenceName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/options.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/options.ts new file mode 100644 index 000000000000..5bc175ad086c --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinkReferences/options.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterLinkReferencesListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterLinkReferencesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/index.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/index.ts new file mode 100644 index 000000000000..270163c521cc --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + NetworkSecurityPerimeterLinksListOptionalParams, + NetworkSecurityPerimeterLinksDeleteOptionalParams, + NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterLinksGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/operations.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/operations.ts new file mode 100644 index 000000000000..9bb552474d19 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/operations.ts @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NspLink, + nspLinkSerializer, + nspLinkDeserializer, +} from "../../models/microsoft/network/models.js"; +import { _NspLinkListResult, _nspLinkListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkSecurityPerimeterLinksListOptionalParams, + NetworkSecurityPerimeterLinksDeleteOptionalParams, + NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterLinksGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimeterLinksListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_NspLinkListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _nspLinkListResultDeserializer(result.body); +} + +/** Lists the NSP Link resources in the specified network security perimeter. */ +export function list( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimeterLinksListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkSecurityPerimeterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options: NetworkSecurityPerimeterLinksDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + linkName: linkName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes an NSP Link resource. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options: NetworkSecurityPerimeterLinksDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkSecurityPerimeterName, linkName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + parameters: NspLink, + options: NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + linkName: linkName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: nspLinkSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return nspLinkDeserializer(result.body); +} + +/** Creates or updates NSP link resource. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + parameters: NspLink, + options: NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + linkName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options: NetworkSecurityPerimeterLinksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + linkName: linkName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return nspLinkDeserializer(result.body); +} + +/** Gets the specified NSP link resource. */ +export async function get( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options: NetworkSecurityPerimeterLinksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + linkName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/options.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/options.ts new file mode 100644 index 000000000000..39ac461d9db2 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterLinks/options.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterLinksListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterLinksDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterLinksGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/index.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/index.ts new file mode 100644 index 000000000000..7543874252ce --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/operations.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/operations.ts new file mode 100644 index 000000000000..3ebf9828ad1b --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/operations.ts @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NspLoggingConfiguration, + nspLoggingConfigurationSerializer, + nspLoggingConfigurationDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _NspLoggingConfigurationListResult, + _nspLoggingConfigurationListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NspLoggingConfigurationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _nspLoggingConfigurationListResultDeserializer(result.body); +} + +/** Lists the NSP logging configuration. */ +export function list( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkSecurityPerimeterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + options: NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations/{loggingConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + loggingConfigurationName: loggingConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes an NSP Logging configuration. */ +export async function $delete( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + options: NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + loggingConfigurationName, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + parameters: NspLoggingConfiguration, + options: NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations/{loggingConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + loggingConfigurationName: loggingConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: nspLoggingConfigurationSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return nspLoggingConfigurationDeserializer(result.body); +} + +/** Creates or updates NSP logging configuration. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + parameters: NspLoggingConfiguration, + options: NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + loggingConfigurationName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + options: NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations/{loggingConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + loggingConfigurationName: loggingConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return nspLoggingConfigurationDeserializer(result.body); +} + +/** Gets the NSP logging configuration. */ +export async function get( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + options: NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + loggingConfigurationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/options.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/options.ts new file mode 100644 index 000000000000..28d786cfa726 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterLoggingConfigurations/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/index.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/index.ts new file mode 100644 index 000000000000..e8d809595993 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get } from "./operations.js"; +export type { NetworkSecurityPerimeterOperationStatusesGetOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/operations.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/operations.ts new file mode 100644 index 000000000000..42118a7ec58a --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/operations.ts @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { OperationStatusResult, operationStatusResultDeserializer } from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { NetworkSecurityPerimeterOperationStatusesGetOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + location: string, + operationId: string, + options: NetworkSecurityPerimeterOperationStatusesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/networkSecurityPerimeterOperationStatuses/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + operationId: operationId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Gets the operation status for the given operation id. */ +export async function get( + context: Client, + location: string, + operationId: string, + options: NetworkSecurityPerimeterOperationStatusesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, location, operationId, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/options.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/options.ts new file mode 100644 index 000000000000..de242304b698 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterOperationStatuses/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterOperationStatusesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/index.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/index.ts new file mode 100644 index 000000000000..54875c1295e1 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + NetworkSecurityPerimeterProfilesListOptionalParams, + NetworkSecurityPerimeterProfilesDeleteOptionalParams, + NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterProfilesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/operations.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/operations.ts new file mode 100644 index 000000000000..4b6d98ea9bed --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/operations.ts @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NspProfile, + nspProfileSerializer, + nspProfileDeserializer, +} from "../../models/microsoft/network/models.js"; +import { _NspProfileListResult, _nspProfileListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkSecurityPerimeterProfilesListOptionalParams, + NetworkSecurityPerimeterProfilesDeleteOptionalParams, + NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterProfilesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimeterProfilesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NspProfileListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _nspProfileListResultDeserializer(result.body); +} + +/** Lists the NSP profiles in the specified network security perimeter. */ +export function list( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimeterProfilesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkSecurityPerimeterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options: NetworkSecurityPerimeterProfilesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + profileName: profileName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes an NSP profile. */ +export async function $delete( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options: NetworkSecurityPerimeterProfilesDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + parameters: NspProfile, + options: NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + profileName: profileName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: nspProfileSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return nspProfileDeserializer(result.body); +} + +/** Creates or updates a network profile. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + parameters: NspProfile, + options: NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options: NetworkSecurityPerimeterProfilesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + profileName: profileName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return nspProfileDeserializer(result.body); +} + +/** Gets the specified NSP profile. */ +export async function get( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options: NetworkSecurityPerimeterProfilesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/options.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/options.ts new file mode 100644 index 000000000000..d52d6ce13b7a --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterProfiles/options.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterProfilesListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterProfilesDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterProfilesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/index.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/index.ts new file mode 100644 index 000000000000..6e60ab102787 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { NetworkSecurityPerimeterServiceTagsListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/operations.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/operations.ts new file mode 100644 index 000000000000..622db68a53ab --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/operations.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + _NspServiceTagsListResult, + _nspServiceTagsListResultDeserializer, + NspServiceTagsResource, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { NetworkSecurityPerimeterServiceTagsListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + location: string, + options: NetworkSecurityPerimeterServiceTagsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/nspServiceTags{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NspServiceTagsListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _nspServiceTagsListResultDeserializer(result.body); +} + +/** Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. */ +export function list( + context: Client, + location: string, + options: NetworkSecurityPerimeterServiceTagsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, location, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/options.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/options.ts new file mode 100644 index 000000000000..e60bcd0639c4 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeterServiceTags/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterServiceTagsListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeters/index.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeters/index.ts new file mode 100644 index 000000000000..1d957161f544 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeters/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listBySubscription, list, $delete, patch, createOrUpdate, get } from "./operations.js"; +export type { + NetworkSecurityPerimetersListBySubscriptionOptionalParams, + NetworkSecurityPerimetersListOptionalParams, + NetworkSecurityPerimetersDeleteOptionalParams, + NetworkSecurityPerimetersPatchOptionalParams, + NetworkSecurityPerimetersCreateOrUpdateOptionalParams, + NetworkSecurityPerimetersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeters/operations.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeters/operations.ts new file mode 100644 index 000000000000..8e0a064df3ea --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeters/operations.ts @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NetworkSecurityPerimeter, + networkSecurityPerimeterSerializer, + networkSecurityPerimeterDeserializer, + UpdateTagsRequest, + updateTagsRequestSerializer, +} from "../../models/microsoft/network/models.js"; +import { + _NetworkSecurityPerimeterListResult, + _networkSecurityPerimeterListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkSecurityPerimetersListBySubscriptionOptionalParams, + NetworkSecurityPerimetersListOptionalParams, + NetworkSecurityPerimetersDeleteOptionalParams, + NetworkSecurityPerimetersPatchOptionalParams, + NetworkSecurityPerimetersCreateOrUpdateOptionalParams, + NetworkSecurityPerimetersGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: NetworkSecurityPerimetersListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkSecurityPerimeterListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkSecurityPerimeterListResultDeserializer(result.body); +} + +/** List all network security perimeters in a subscription. */ +export function listBySubscription( + context: Client, + options: NetworkSecurityPerimetersListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: NetworkSecurityPerimetersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkSecurityPerimeterListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkSecurityPerimeterListResultDeserializer(result.body); +} + +/** List network security perimeters in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: NetworkSecurityPerimetersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimetersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}{?api%2Dversion,forceDeletion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + "api%2Dversion": "2025-07-01", + forceDeletion: options?.forceDeletion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a network security perimeter. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimetersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkSecurityPerimeterName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _patchSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + parameters: UpdateTagsRequest, + options: NetworkSecurityPerimetersPatchOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: updateTagsRequestSerializer(parameters), + }); +} + +export async function _patchDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkSecurityPerimeterDeserializer(result.body); +} + +/** Patch Tags for a Network Security Perimeter. */ +export async function patch( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + parameters: UpdateTagsRequest, + options: NetworkSecurityPerimetersPatchOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _patchSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + parameters, + options, + ); + return _patchDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + parameters: NetworkSecurityPerimeter, + options: NetworkSecurityPerimetersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkSecurityPerimeterSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkSecurityPerimeterDeserializer(result.body); +} + +/** Creates or updates a Network Security Perimeter. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + parameters: NetworkSecurityPerimeter, + options: NetworkSecurityPerimetersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkSecurityPerimeterName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimetersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityPerimeterName: networkSecurityPerimeterName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkSecurityPerimeterDeserializer(result.body); +} + +/** Gets the specified network security perimeter by the name. */ +export async function get( + context: Client, + resourceGroupName: string, + networkSecurityPerimeterName: string, + options: NetworkSecurityPerimetersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, networkSecurityPerimeterName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkSecurityPerimeters/options.ts b/sdk/network/arm-network/src/api/networkSecurityPerimeters/options.ts new file mode 100644 index 000000000000..acd5d770b292 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkSecurityPerimeters/options.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkSecurityPerimetersListBySubscriptionOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimetersListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimetersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it contains any child associations. */ + forceDeletion?: boolean; +} + +/** Optional parameters. */ +export interface NetworkSecurityPerimetersPatchOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimetersCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkSecurityPerimetersGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/networkVirtualApplianceConnections/index.ts b/sdk/network/arm-network/src/api/networkVirtualApplianceConnections/index.ts new file mode 100644 index 000000000000..04a9df27148b --- /dev/null +++ b/sdk/network/arm-network/src/api/networkVirtualApplianceConnections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, get, createOrUpdate } from "./operations.js"; +export type { + NetworkVirtualApplianceConnectionsListOptionalParams, + NetworkVirtualApplianceConnectionsDeleteOptionalParams, + NetworkVirtualApplianceConnectionsGetOptionalParams, + NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkVirtualApplianceConnections/operations.ts b/sdk/network/arm-network/src/api/networkVirtualApplianceConnections/operations.ts new file mode 100644 index 000000000000..476b5b67a588 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkVirtualApplianceConnections/operations.ts @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NetworkVirtualApplianceConnection, + networkVirtualApplianceConnectionSerializer, + networkVirtualApplianceConnectionDeserializer, + _NetworkVirtualApplianceConnectionList, + _networkVirtualApplianceConnectionListDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkVirtualApplianceConnectionsListOptionalParams, + NetworkVirtualApplianceConnectionsDeleteOptionalParams, + NetworkVirtualApplianceConnectionsGetOptionalParams, + NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: NetworkVirtualApplianceConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkVirtualApplianceConnectionList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkVirtualApplianceConnectionListDeserializer(result.body); +} + +/** Lists NetworkVirtualApplianceConnections under the NVA. */ +export function list( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: NetworkVirtualApplianceConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkVirtualApplianceName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options: NetworkVirtualApplianceConnectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a NVA connection. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options: NetworkVirtualApplianceConnectionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + networkVirtualApplianceName, + connectionName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options: NetworkVirtualApplianceConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkVirtualApplianceConnectionDeserializer(result.body); +} + +/** Retrieves the details of specified NVA connection. */ +export async function get( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options: NetworkVirtualApplianceConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkVirtualApplianceName, + connectionName, + options, + ); + return _getDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, + options: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkVirtualApplianceConnectionSerializer(networkVirtualApplianceConnectionParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkVirtualApplianceConnectionDeserializer(result.body); +} + +/** Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, + options: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + NetworkVirtualApplianceConnection +> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + networkVirtualApplianceName, + connectionName, + networkVirtualApplianceConnectionParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + NetworkVirtualApplianceConnection + >; +} diff --git a/sdk/network/arm-network/src/api/networkVirtualApplianceConnections/options.ts b/sdk/network/arm-network/src/api/networkVirtualApplianceConnections/options.ts new file mode 100644 index 000000000000..ccf023741394 --- /dev/null +++ b/sdk/network/arm-network/src/api/networkVirtualApplianceConnections/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkVirtualApplianceConnectionsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkVirtualApplianceConnectionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkVirtualApplianceConnectionsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/network/arm-network/src/api/networkVirtualAppliances/index.ts b/sdk/network/arm-network/src/api/networkVirtualAppliances/index.ts new file mode 100644 index 000000000000..76250e8eddfa --- /dev/null +++ b/sdk/network/arm-network/src/api/networkVirtualAppliances/index.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + getBootDiagnosticLogs, + reimage, + restart, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, + NetworkVirtualAppliancesReimageOptionalParams, + NetworkVirtualAppliancesRestartOptionalParams, + NetworkVirtualAppliancesListOptionalParams, + NetworkVirtualAppliancesListByResourceGroupOptionalParams, + NetworkVirtualAppliancesDeleteOptionalParams, + NetworkVirtualAppliancesUpdateTagsOptionalParams, + NetworkVirtualAppliancesCreateOrUpdateOptionalParams, + NetworkVirtualAppliancesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkVirtualAppliances/operations.ts b/sdk/network/arm-network/src/api/networkVirtualAppliances/operations.ts new file mode 100644 index 000000000000..26d3e99ceafa --- /dev/null +++ b/sdk/network/arm-network/src/api/networkVirtualAppliances/operations.ts @@ -0,0 +1,571 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + NetworkVirtualAppliance, + networkVirtualApplianceSerializer, + networkVirtualApplianceDeserializer, + NetworkVirtualApplianceInstanceIds, + networkVirtualApplianceInstanceIdsSerializer, + networkVirtualApplianceInstanceIdsDeserializer, + NetworkVirtualApplianceBootDiagnosticParameters, + networkVirtualApplianceBootDiagnosticParametersSerializer, + NetworkVirtualApplianceInstanceId, + networkVirtualApplianceInstanceIdDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _NetworkVirtualApplianceListResult, + _networkVirtualApplianceListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, + NetworkVirtualAppliancesReimageOptionalParams, + NetworkVirtualAppliancesRestartOptionalParams, + NetworkVirtualAppliancesListOptionalParams, + NetworkVirtualAppliancesListByResourceGroupOptionalParams, + NetworkVirtualAppliancesDeleteOptionalParams, + NetworkVirtualAppliancesUpdateTagsOptionalParams, + NetworkVirtualAppliancesCreateOrUpdateOptionalParams, + NetworkVirtualAppliancesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getBootDiagnosticLogsSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + request: NetworkVirtualApplianceBootDiagnosticParameters, + options: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/getBootDiagnosticLogs{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkVirtualApplianceBootDiagnosticParametersSerializer(request), + }); +} + +export async function _getBootDiagnosticLogsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkVirtualApplianceInstanceIdDeserializer(result.body); +} + +/** Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. */ +export function getBootDiagnosticLogs( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + request: NetworkVirtualApplianceBootDiagnosticParameters, + options: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + NetworkVirtualApplianceInstanceId +> { + return getLongRunningPoller(context, _getBootDiagnosticLogsDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getBootDiagnosticLogsSend( + context, + resourceGroupName, + networkVirtualApplianceName, + request, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + NetworkVirtualApplianceInstanceId + >; +} + +export function _reimageSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: NetworkVirtualAppliancesReimageOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/reimage{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.networkVirtualApplianceInstanceIds + ? options?.networkVirtualApplianceInstanceIds + : networkVirtualApplianceInstanceIdsSerializer(options?.networkVirtualApplianceInstanceIds), + }); +} + +export async function _reimageDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkVirtualApplianceInstanceIdsDeserializer(result.body); +} + +/** Reimages one VM belonging to the specified Network Virtual Appliance. */ +export function reimage( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: NetworkVirtualAppliancesReimageOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + NetworkVirtualApplianceInstanceIds +> { + return getLongRunningPoller(context, _reimageDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _reimageSend(context, resourceGroupName, networkVirtualApplianceName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + NetworkVirtualApplianceInstanceIds + >; +} + +export function _restartSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: NetworkVirtualAppliancesRestartOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/restart{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.networkVirtualApplianceInstanceIds + ? options?.networkVirtualApplianceInstanceIds + : networkVirtualApplianceInstanceIdsSerializer(options?.networkVirtualApplianceInstanceIds), + }); +} + +export async function _restartDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkVirtualApplianceInstanceIdsDeserializer(result.body); +} + +/** Restarts one or more VMs belonging to the specified Network Virtual Appliance. */ +export function restart( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: NetworkVirtualAppliancesRestartOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + NetworkVirtualApplianceInstanceIds +> { + return getLongRunningPoller(context, _restartDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _restartSend(context, resourceGroupName, networkVirtualApplianceName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + NetworkVirtualApplianceInstanceIds + >; +} + +export function _listSend( + context: Client, + options: NetworkVirtualAppliancesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkVirtualApplianceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkVirtualApplianceListResultDeserializer(result.body); +} + +/** Gets all Network Virtual Appliances in a subscription. */ +export function list( + context: Client, + options: NetworkVirtualAppliancesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: NetworkVirtualAppliancesListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkVirtualApplianceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkVirtualApplianceListResultDeserializer(result.body); +} + +/** Lists all Network Virtual Appliances in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: NetworkVirtualAppliancesListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: NetworkVirtualAppliancesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Network Virtual Appliance. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: NetworkVirtualAppliancesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkVirtualApplianceName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: TagsObject, + options: NetworkVirtualAppliancesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkVirtualApplianceDeserializer(result.body); +} + +/** Updates a Network Virtual Appliance. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: TagsObject, + options: NetworkVirtualAppliancesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + networkVirtualApplianceName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: NetworkVirtualAppliance, + options: NetworkVirtualAppliancesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkVirtualApplianceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkVirtualApplianceDeserializer(result.body); +} + +/** Creates or updates the specified Network Virtual Appliance. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: NetworkVirtualAppliance, + options: NetworkVirtualAppliancesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, NetworkVirtualAppliance> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + networkVirtualApplianceName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, NetworkVirtualAppliance>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: NetworkVirtualAppliancesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkVirtualApplianceDeserializer(result.body); +} + +/** Gets the specified Network Virtual Appliance. */ +export async function get( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: NetworkVirtualAppliancesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, networkVirtualApplianceName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkVirtualAppliances/options.ts b/sdk/network/arm-network/src/api/networkVirtualAppliances/options.ts new file mode 100644 index 000000000000..8b3f9922e2be --- /dev/null +++ b/sdk/network/arm-network/src/api/networkVirtualAppliances/options.ts @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkVirtualApplianceInstanceIds } from "../../models/microsoft/network/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkVirtualAppliancesReimageOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. */ + networkVirtualApplianceInstanceIds?: NetworkVirtualApplianceInstanceIds; +} + +/** Optional parameters. */ +export interface NetworkVirtualAppliancesRestartOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. */ + networkVirtualApplianceInstanceIds?: NetworkVirtualApplianceInstanceIds; +} + +/** Optional parameters. */ +export interface NetworkVirtualAppliancesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkVirtualAppliancesListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkVirtualAppliancesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkVirtualAppliancesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkVirtualAppliancesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkVirtualAppliancesGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/networkWatchers/index.ts b/sdk/network/arm-network/src/api/networkWatchers/index.ts new file mode 100644 index 000000000000..808a204cecdb --- /dev/null +++ b/sdk/network/arm-network/src/api/networkWatchers/index.ts @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + getNetworkConfigurationDiagnostic, + listAvailableProviders, + getAzureReachabilityReport, + checkConnectivity, + getFlowLogStatus, + setFlowLogConfiguration, + getTroubleshootingResult, + getTroubleshooting, + getVMSecurityRules, + getNextHop, + verifyIPFlow, + getTopology, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, + NetworkWatchersListAvailableProvidersOptionalParams, + NetworkWatchersGetAzureReachabilityReportOptionalParams, + NetworkWatchersCheckConnectivityOptionalParams, + NetworkWatchersGetFlowLogStatusOptionalParams, + NetworkWatchersSetFlowLogConfigurationOptionalParams, + NetworkWatchersGetTroubleshootingResultOptionalParams, + NetworkWatchersGetTroubleshootingOptionalParams, + NetworkWatchersGetVMSecurityRulesOptionalParams, + NetworkWatchersGetNextHopOptionalParams, + NetworkWatchersVerifyIPFlowOptionalParams, + NetworkWatchersGetTopologyOptionalParams, + NetworkWatchersListAllOptionalParams, + NetworkWatchersListOptionalParams, + NetworkWatchersDeleteOptionalParams, + NetworkWatchersUpdateTagsOptionalParams, + NetworkWatchersCreateOrUpdateOptionalParams, + NetworkWatchersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/networkWatchers/operations.ts b/sdk/network/arm-network/src/api/networkWatchers/operations.ts new file mode 100644 index 000000000000..b573968f0daa --- /dev/null +++ b/sdk/network/arm-network/src/api/networkWatchers/operations.ts @@ -0,0 +1,1162 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + NetworkWatcher, + networkWatcherSerializer, + networkWatcherDeserializer, +} from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + errorResponseDeserializer, + _NetworkWatcherListResult, + _networkWatcherListResultDeserializer, + TopologyParameters, + topologyParametersSerializer, + Topology, + topologyDeserializer, + VerificationIPFlowParameters, + verificationIPFlowParametersSerializer, + VerificationIPFlowResult, + verificationIPFlowResultDeserializer, + NextHopParameters, + nextHopParametersSerializer, + NextHopResult, + nextHopResultDeserializer, + SecurityGroupViewParameters, + securityGroupViewParametersSerializer, + SecurityGroupViewResult, + securityGroupViewResultDeserializer, + TroubleshootingParameters, + troubleshootingParametersSerializer, + TroubleshootingResult, + troubleshootingResultDeserializer, + QueryTroubleshootingParameters, + queryTroubleshootingParametersSerializer, + FlowLogInformation, + flowLogInformationSerializer, + flowLogInformationDeserializer, + FlowLogStatusParameters, + flowLogStatusParametersSerializer, + ConnectivityParameters, + connectivityParametersSerializer, + ConnectivityInformation, + connectivityInformationDeserializer, + AzureReachabilityReportParameters, + azureReachabilityReportParametersSerializer, + AzureReachabilityReport, + azureReachabilityReportDeserializer, + AvailableProvidersListParameters, + availableProvidersListParametersSerializer, + AvailableProvidersList, + availableProvidersListDeserializer, + NetworkConfigurationDiagnosticParameters, + networkConfigurationDiagnosticParametersSerializer, + NetworkConfigurationDiagnosticResponse, + networkConfigurationDiagnosticResponseDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, + NetworkWatchersListAvailableProvidersOptionalParams, + NetworkWatchersGetAzureReachabilityReportOptionalParams, + NetworkWatchersCheckConnectivityOptionalParams, + NetworkWatchersGetFlowLogStatusOptionalParams, + NetworkWatchersSetFlowLogConfigurationOptionalParams, + NetworkWatchersGetTroubleshootingResultOptionalParams, + NetworkWatchersGetTroubleshootingOptionalParams, + NetworkWatchersGetVMSecurityRulesOptionalParams, + NetworkWatchersGetNextHopOptionalParams, + NetworkWatchersVerifyIPFlowOptionalParams, + NetworkWatchersGetTopologyOptionalParams, + NetworkWatchersListAllOptionalParams, + NetworkWatchersListOptionalParams, + NetworkWatchersDeleteOptionalParams, + NetworkWatchersUpdateTagsOptionalParams, + NetworkWatchersCreateOrUpdateOptionalParams, + NetworkWatchersGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getNetworkConfigurationDiagnosticSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkConfigurationDiagnosticParameters, + options: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkConfigurationDiagnosticParametersSerializer(parameters), + }); +} + +export async function _getNetworkConfigurationDiagnosticDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return networkConfigurationDiagnosticResponseDeserializer(result.body); +} + +/** Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. */ +export function getNetworkConfigurationDiagnostic( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkConfigurationDiagnosticParameters, + options: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + NetworkConfigurationDiagnosticResponse +> { + return getLongRunningPoller( + context, + _getNetworkConfigurationDiagnosticDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getNetworkConfigurationDiagnosticSend( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + NetworkConfigurationDiagnosticResponse + >; +} + +export function _listAvailableProvidersSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: AvailableProvidersListParameters, + options: NetworkWatchersListAvailableProvidersOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: availableProvidersListParametersSerializer(parameters), + }); +} + +export async function _listAvailableProvidersDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return availableProvidersListDeserializer(result.body); +} + +/** NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. */ +export function listAvailableProviders( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: AvailableProvidersListParameters, + options: NetworkWatchersListAvailableProvidersOptionalParams = { requestOptions: {} }, +): PollerLike, AvailableProvidersList> { + return getLongRunningPoller(context, _listAvailableProvidersDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listAvailableProvidersSend( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, AvailableProvidersList>; +} + +export function _getAzureReachabilityReportSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: AzureReachabilityReportParameters, + options: NetworkWatchersGetAzureReachabilityReportOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: azureReachabilityReportParametersSerializer(parameters), + }); +} + +export async function _getAzureReachabilityReportDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return azureReachabilityReportDeserializer(result.body); +} + +/** NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. */ +export function getAzureReachabilityReport( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: AzureReachabilityReportParameters, + options: NetworkWatchersGetAzureReachabilityReportOptionalParams = { requestOptions: {} }, +): PollerLike, AzureReachabilityReport> { + return getLongRunningPoller( + context, + _getAzureReachabilityReportDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getAzureReachabilityReportSend( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, AzureReachabilityReport>; +} + +export function _checkConnectivitySend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: ConnectivityParameters, + options: NetworkWatchersCheckConnectivityOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: connectivityParametersSerializer(parameters), + }); +} + +export async function _checkConnectivityDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return connectivityInformationDeserializer(result.body); +} + +/** Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. */ +export function checkConnectivity( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: ConnectivityParameters, + options: NetworkWatchersCheckConnectivityOptionalParams = { requestOptions: {} }, +): PollerLike, ConnectivityInformation> { + return getLongRunningPoller(context, _checkConnectivityDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _checkConnectivitySend(context, resourceGroupName, networkWatcherName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, ConnectivityInformation>; +} + +export function _getFlowLogStatusSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogStatusParameters, + options: NetworkWatchersGetFlowLogStatusOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: flowLogStatusParametersSerializer(parameters), + }); +} + +export async function _getFlowLogStatusDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return flowLogInformationDeserializer(result.body); +} + +/** Queries status of flow log and traffic analytics (optional) on a specified resource. */ +export function getFlowLogStatus( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogStatusParameters, + options: NetworkWatchersGetFlowLogStatusOptionalParams = { requestOptions: {} }, +): PollerLike, FlowLogInformation> { + return getLongRunningPoller(context, _getFlowLogStatusDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getFlowLogStatusSend(context, resourceGroupName, networkWatcherName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, FlowLogInformation>; +} + +export function _setFlowLogConfigurationSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogInformation, + options: NetworkWatchersSetFlowLogConfigurationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: flowLogInformationSerializer(parameters), + }); +} + +export async function _setFlowLogConfigurationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return flowLogInformationDeserializer(result.body); +} + +/** Configures flow log and traffic analytics (optional) on a specified resource. */ +export function setFlowLogConfiguration( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogInformation, + options: NetworkWatchersSetFlowLogConfigurationOptionalParams = { requestOptions: {} }, +): PollerLike, FlowLogInformation> { + return getLongRunningPoller(context, _setFlowLogConfigurationDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _setFlowLogConfigurationSend( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, FlowLogInformation>; +} + +export function _getTroubleshootingResultSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: QueryTroubleshootingParameters, + options: NetworkWatchersGetTroubleshootingResultOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: queryTroubleshootingParametersSerializer(parameters), + }); +} + +export async function _getTroubleshootingResultDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return troubleshootingResultDeserializer(result.body); +} + +/** Get the last completed troubleshooting result on a specified resource. */ +export function getTroubleshootingResult( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: QueryTroubleshootingParameters, + options: NetworkWatchersGetTroubleshootingResultOptionalParams = { requestOptions: {} }, +): PollerLike, TroubleshootingResult> { + return getLongRunningPoller( + context, + _getTroubleshootingResultDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getTroubleshootingResultSend( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, TroubleshootingResult>; +} + +export function _getTroubleshootingSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: TroubleshootingParameters, + options: NetworkWatchersGetTroubleshootingOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: troubleshootingParametersSerializer(parameters), + }); +} + +export async function _getTroubleshootingDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return troubleshootingResultDeserializer(result.body); +} + +/** Initiate troubleshooting on a specified resource. */ +export function getTroubleshooting( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: TroubleshootingParameters, + options: NetworkWatchersGetTroubleshootingOptionalParams = { requestOptions: {} }, +): PollerLike, TroubleshootingResult> { + return getLongRunningPoller(context, _getTroubleshootingDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getTroubleshootingSend(context, resourceGroupName, networkWatcherName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, TroubleshootingResult>; +} + +export function _getVMSecurityRulesSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: SecurityGroupViewParameters, + options: NetworkWatchersGetVMSecurityRulesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: securityGroupViewParametersSerializer(parameters), + }); +} + +export async function _getVMSecurityRulesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return securityGroupViewResultDeserializer(result.body); +} + +/** Gets the configured and effective security group rules on the specified VM. */ +export function getVMSecurityRules( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: SecurityGroupViewParameters, + options: NetworkWatchersGetVMSecurityRulesOptionalParams = { requestOptions: {} }, +): PollerLike, SecurityGroupViewResult> { + return getLongRunningPoller(context, _getVMSecurityRulesDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getVMSecurityRulesSend(context, resourceGroupName, networkWatcherName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, SecurityGroupViewResult>; +} + +export function _getNextHopSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: NextHopParameters, + options: NetworkWatchersGetNextHopOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: nextHopParametersSerializer(parameters), + }); +} + +export async function _getNextHopDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return nextHopResultDeserializer(result.body); +} + +/** Gets the next hop from the specified VM. */ +export function getNextHop( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: NextHopParameters, + options: NetworkWatchersGetNextHopOptionalParams = { requestOptions: {} }, +): PollerLike, NextHopResult> { + return getLongRunningPoller(context, _getNextHopDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getNextHopSend(context, resourceGroupName, networkWatcherName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, NextHopResult>; +} + +export function _verifyIPFlowSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: VerificationIPFlowParameters, + options: NetworkWatchersVerifyIPFlowOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: verificationIPFlowParametersSerializer(parameters), + }); +} + +export async function _verifyIPFlowDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return verificationIPFlowResultDeserializer(result.body); +} + +/** Verify IP flow from the specified VM to a location given the currently configured NSG rules. */ +export function verifyIPFlow( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: VerificationIPFlowParameters, + options: NetworkWatchersVerifyIPFlowOptionalParams = { requestOptions: {} }, +): PollerLike, VerificationIPFlowResult> { + return getLongRunningPoller(context, _verifyIPFlowDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _verifyIPFlowSend(context, resourceGroupName, networkWatcherName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, VerificationIPFlowResult>; +} + +export function _getTopologySend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: TopologyParameters, + options: NetworkWatchersGetTopologyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: topologyParametersSerializer(parameters), + }); +} + +export async function _getTopologyDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return topologyDeserializer(result.body); +} + +/** Gets the current network topology by resource group. */ +export async function getTopology( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: TopologyParameters, + options: NetworkWatchersGetTopologyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getTopologySend( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + return _getTopologyDeserialize(result); +} + +export function _listAllSend( + context: Client, + options: NetworkWatchersListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkWatcherListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _networkWatcherListResultDeserializer(result.body); +} + +/** Gets all network watchers by subscription. */ +export function listAll( + context: Client, + options: NetworkWatchersListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: NetworkWatchersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkWatcherListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _networkWatcherListResultDeserializer(result.body); +} + +/** Gets all network watchers by resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: NetworkWatchersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + options: NetworkWatchersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified network watcher resource. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + options: NetworkWatchersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, networkWatcherName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: TagsObject, + options: NetworkWatchersUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return networkWatcherDeserializer(result.body); +} + +/** Updates a network watcher tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: TagsObject, + options: NetworkWatchersUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkWatcher, + options: NetworkWatchersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkWatcherSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return networkWatcherDeserializer(result.body); +} + +/** Creates or updates a network watcher in the specified resource group. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkWatcher, + options: NetworkWatchersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + options: NetworkWatchersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return networkWatcherDeserializer(result.body); +} + +/** Gets the specified network watcher by resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + options: NetworkWatchersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, networkWatcherName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/networkWatchers/options.ts b/sdk/network/arm-network/src/api/networkWatchers/options.ts new file mode 100644 index 000000000000..04fd6ece026a --- /dev/null +++ b/sdk/network/arm-network/src/api/networkWatchers/options.ts @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersListAvailableProvidersOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersGetAzureReachabilityReportOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersCheckConnectivityOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersGetFlowLogStatusOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersSetFlowLogConfigurationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersGetTroubleshootingResultOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersGetTroubleshootingOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersGetVMSecurityRulesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersGetNextHopOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersVerifyIPFlowOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersGetTopologyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkWatchersListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkWatchersListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkWatchersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NetworkWatchersUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkWatchersCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkWatchersGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/operations.ts b/sdk/network/arm-network/src/api/operations.ts new file mode 100644 index 000000000000..36f59097a2fc --- /dev/null +++ b/sdk/network/arm-network/src/api/operations.ts @@ -0,0 +1,954 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "./index.js"; +import { cloudErrorDeserializer } from "../models/common/models.js"; +import { + BastionShareableLinkListRequest, + bastionShareableLinkListRequestSerializer, + BastionShareableLink, + _BastionShareableLinkListResult, + _bastionShareableLinkListResultDeserializer, + BastionShareableLinkTokenListRequest, + bastionShareableLinkTokenListRequestSerializer, + _BastionActiveSessionListResult, + _bastionActiveSessionListResultDeserializer, + BastionActiveSession, + SessionIds, + sessionIdsSerializer, + _BastionSessionDeleteResult, + _bastionSessionDeleteResultDeserializer, + BastionSessionState, + ExpressRouteProviderPort, + expressRouteProviderPortDeserializer, + ActiveConfigurationParameter, + activeConfigurationParameterSerializer, + ActiveConnectivityConfigurationsListResult, + activeConnectivityConfigurationsListResultDeserializer, + ActiveSecurityAdminRulesListResult, + activeSecurityAdminRulesListResultDeserializer, + QueryRequestOptions, + queryRequestOptionsSerializer, + NetworkManagerEffectiveConnectivityConfigurationListResult, + networkManagerEffectiveConnectivityConfigurationListResultDeserializer, + NetworkManagerEffectiveSecurityAdminRulesListResult, + networkManagerEffectiveSecurityAdminRulesListResultDeserializer, + VirtualWanSecurityProviders, + virtualWanSecurityProvidersDeserializer, + VirtualWanVpnProfileParameters, + virtualWanVpnProfileParametersSerializer, + VpnProfileResponse, + vpnProfileResponseDeserializer, + DnsNameAvailabilityResult, + dnsNameAvailabilityResultDeserializer, +} from "../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../static-helpers/urlTemplate.js"; +import { + CheckDnsNameAvailabilityOptionalParams, + GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams, + SupportedSecurityProvidersOptionalParams, + ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams, + ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams, + ListActiveSecurityAdminRulesOptionalParams, + ListActiveConnectivityConfigurationsOptionalParams, + ExpressRouteProviderPortOptionalParams, + DisconnectActiveSessionsOptionalParams, + GetActiveSessionsOptionalParams, + GetBastionShareableLinkOptionalParams, + DeleteBastionShareableLinkByTokenOptionalParams, + DeleteBastionShareableLinkOptionalParams, + PutBastionShareableLinkOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _checkDnsNameAvailabilitySend( + context: Client, + location: string, + domainNameLabel: string, + options: CheckDnsNameAvailabilityOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkDnsNameAvailability{?api%2Dversion,domainNameLabel}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + domainNameLabel: domainNameLabel, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _checkDnsNameAvailabilityDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return dnsNameAvailabilityResultDeserializer(result.body); +} + +/** Checks whether a domain name in the cloudapp.azure.com zone is available for use. */ +export async function checkDnsNameAvailability( + context: Client, + location: string, + domainNameLabel: string, + options: CheckDnsNameAvailabilityOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _checkDnsNameAvailabilitySend(context, location, domainNameLabel, options); + return _checkDnsNameAvailabilityDeserialize(result); +} + +export function _generatevirtualwanvpnserverconfigurationvpnprofileSend( + context: Client, + resourceGroupName: string, + virtualWANName: string, + vpnClientParams: VirtualWanVpnProfileParameters, + options: GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/generateVpnProfile{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualWANName: virtualWANName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualWanVpnProfileParametersSerializer(vpnClientParams), + }); +} + +export async function _generatevirtualwanvpnserverconfigurationvpnprofileDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnProfileResponseDeserializer(result.body); +} + +/** Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. */ +export function generatevirtualwanvpnserverconfigurationvpnprofile( + context: Client, + resourceGroupName: string, + virtualWANName: string, + vpnClientParams: VirtualWanVpnProfileParameters, + options: GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams = { + requestOptions: {}, + }, +): PollerLike, VpnProfileResponse> { + return getLongRunningPoller( + context, + _generatevirtualwanvpnserverconfigurationvpnprofileDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _generatevirtualwanvpnserverconfigurationvpnprofileSend( + context, + resourceGroupName, + virtualWANName, + vpnClientParams, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, VpnProfileResponse>; +} + +export function _supportedSecurityProvidersSend( + context: Client, + resourceGroupName: string, + virtualWANName: string, + options: SupportedSecurityProvidersOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualWANName: virtualWANName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _supportedSecurityProvidersDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualWanSecurityProvidersDeserializer(result.body); +} + +/** Gives the supported security providers for the virtual wan. */ +export async function supportedSecurityProviders( + context: Client, + resourceGroupName: string, + virtualWANName: string, + options: SupportedSecurityProvidersOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _supportedSecurityProvidersSend( + context, + resourceGroupName, + virtualWANName, + options, + ); + return _supportedSecurityProvidersDeserialize(result); +} + +export function _listNetworkManagerEffectiveSecurityAdminRulesSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + parameters: QueryRequestOptions, + options: ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveSecurityAdminRules{?api%2Dversion,%24top}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: queryRequestOptionsSerializer(parameters), + }); +} + +export async function _listNetworkManagerEffectiveSecurityAdminRulesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerEffectiveSecurityAdminRulesListResultDeserializer(result.body); +} + +/** List all effective security admin rules applied on a virtual network. */ +export async function listNetworkManagerEffectiveSecurityAdminRules( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + parameters: QueryRequestOptions, + options: ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listNetworkManagerEffectiveSecurityAdminRulesSend( + context, + resourceGroupName, + virtualNetworkName, + parameters, + options, + ); + return _listNetworkManagerEffectiveSecurityAdminRulesDeserialize(result); +} + +export function _listNetworkManagerEffectiveConnectivityConfigurationsSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + parameters: QueryRequestOptions, + options: ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveConnectivityConfigurations{?api%2Dversion,%24top}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: queryRequestOptionsSerializer(parameters), + }); +} + +export async function _listNetworkManagerEffectiveConnectivityConfigurationsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerEffectiveConnectivityConfigurationListResultDeserializer(result.body); +} + +/** List all effective connectivity configurations applied on a virtual network. */ +export async function listNetworkManagerEffectiveConnectivityConfigurations( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + parameters: QueryRequestOptions, + options: ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _listNetworkManagerEffectiveConnectivityConfigurationsSend( + context, + resourceGroupName, + virtualNetworkName, + parameters, + options, + ); + return _listNetworkManagerEffectiveConnectivityConfigurationsDeserialize(result); +} + +export function _listActiveSecurityAdminRulesSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: ActiveConfigurationParameter, + options: ListActiveSecurityAdminRulesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityAdminRules{?api%2Dversion,%24top}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: activeConfigurationParameterSerializer(parameters), + }); +} + +export async function _listActiveSecurityAdminRulesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return activeSecurityAdminRulesListResultDeserializer(result.body); +} + +/** Lists active security admin rules in a network manager. */ +export async function listActiveSecurityAdminRules( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: ActiveConfigurationParameter, + options: ListActiveSecurityAdminRulesOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listActiveSecurityAdminRulesSend( + context, + resourceGroupName, + networkManagerName, + parameters, + options, + ); + return _listActiveSecurityAdminRulesDeserialize(result); +} + +export function _listActiveConnectivityConfigurationsSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: ActiveConfigurationParameter, + options: ListActiveConnectivityConfigurationsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveConnectivityConfigurations{?api%2Dversion,%24top}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: activeConfigurationParameterSerializer(parameters), + }); +} + +export async function _listActiveConnectivityConfigurationsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return activeConnectivityConfigurationsListResultDeserializer(result.body); +} + +/** Lists active connectivity configurations in a network manager. */ +export async function listActiveConnectivityConfigurations( + context: Client, + resourceGroupName: string, + networkManagerName: string, + parameters: ActiveConfigurationParameter, + options: ListActiveConnectivityConfigurationsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listActiveConnectivityConfigurationsSend( + context, + resourceGroupName, + networkManagerName, + parameters, + options, + ); + return _listActiveConnectivityConfigurationsDeserialize(result); +} + +export function _expressRouteProviderPortSend( + context: Client, + providerport: string, + options: ExpressRouteProviderPortOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts/{providerport}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + providerport: providerport, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _expressRouteProviderPortDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteProviderPortDeserializer(result.body); +} + +/** Retrieves detail of a provider port. */ +export async function expressRouteProviderPort( + context: Client, + providerport: string, + options: ExpressRouteProviderPortOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _expressRouteProviderPortSend(context, providerport, options); + return _expressRouteProviderPortDeserialize(result); +} + +export function _disconnectActiveSessionsSend( + context: Client, + resourceGroupName: string, + bastionHostName: string, + sessionIds: SessionIds, + options: DisconnectActiveSessionsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bastionHostName: bastionHostName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: sessionIdsSerializer(sessionIds), + }); +} + +export async function _disconnectActiveSessionsDeserialize( + result: PathUncheckedResponse, +): Promise<_BastionSessionDeleteResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _bastionSessionDeleteResultDeserializer(result.body); +} + +/** Returns the list of currently active sessions on the Bastion. */ +export function disconnectActiveSessions( + context: Client, + resourceGroupName: string, + bastionHostName: string, + sessionIds: SessionIds, + options: DisconnectActiveSessionsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _disconnectActiveSessionsSend( + context, + resourceGroupName, + bastionHostName, + sessionIds, + options, + ), + _disconnectActiveSessionsDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getActiveSessionsSend( + context: Client, + resourceGroupName: string, + bastionHostName: string, + options: GetActiveSessionsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bastionHostName: bastionHostName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getActiveSessionsDeserialize( + result: PathUncheckedResponse, +): Promise<_BastionActiveSessionListResult> { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _bastionActiveSessionListResultDeserializer(result.body); +} + +/** Returns the list of currently active sessions on the Bastion. */ +export function getActiveSessions( + context: Client, + resourceGroupName: string, + bastionHostName: string, + options: GetActiveSessionsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + const initialPagingPoller = getLongRunningPoller( + context, + async (result: PathUncheckedResponse) => result, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getActiveSessionsSend(context, resourceGroupName, bastionHostName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, PathUncheckedResponse>; + + return buildPagedAsyncIterator( + context, + async () => await initialPagingPoller, + _getActiveSessionsDeserialize, + ["200", "202", "201"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getBastionShareableLinkSend( + context: Client, + resourceGroupName: string, + bastionHostName: string, + bslRequest: BastionShareableLinkListRequest, + options: GetBastionShareableLinkOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bastionHostName: bastionHostName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: bastionShareableLinkListRequestSerializer(bslRequest), + }); +} + +export async function _getBastionShareableLinkDeserialize( + result: PathUncheckedResponse, +): Promise<_BastionShareableLinkListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _bastionShareableLinkListResultDeserializer(result.body); +} + +/** Return the Bastion Shareable Links for all the VMs specified in the request. */ +export function getBastionShareableLink( + context: Client, + resourceGroupName: string, + bastionHostName: string, + bslRequest: BastionShareableLinkListRequest, + options: GetBastionShareableLinkOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _getBastionShareableLinkSend( + context, + resourceGroupName, + bastionHostName, + bslRequest, + options, + ), + _getBastionShareableLinkDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _deleteBastionShareableLinkByTokenSend( + context: Client, + resourceGroupName: string, + bastionHostName: string, + bslTokenRequest: BastionShareableLinkTokenListRequest, + options: DeleteBastionShareableLinkByTokenOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinksByToken{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bastionHostName: bastionHostName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: bastionShareableLinkTokenListRequestSerializer(bslTokenRequest), + }); +} + +export async function _deleteBastionShareableLinkByTokenDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the Bastion Shareable Links for all the tokens specified in the request. */ +export function deleteBastionShareableLinkByToken( + context: Client, + resourceGroupName: string, + bastionHostName: string, + bslTokenRequest: BastionShareableLinkTokenListRequest, + options: DeleteBastionShareableLinkByTokenOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _deleteBastionShareableLinkByTokenDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _deleteBastionShareableLinkByTokenSend( + context, + resourceGroupName, + bastionHostName, + bslTokenRequest, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, void>; +} + +export function _deleteBastionShareableLinkSend( + context: Client, + resourceGroupName: string, + bastionHostName: string, + bslRequest: BastionShareableLinkListRequest, + options: DeleteBastionShareableLinkOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bastionHostName: bastionHostName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: bastionShareableLinkListRequestSerializer(bslRequest), + }); +} + +export async function _deleteBastionShareableLinkDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the Bastion Shareable Links for all the VMs specified in the request. */ +export function deleteBastionShareableLink( + context: Client, + resourceGroupName: string, + bastionHostName: string, + bslRequest: BastionShareableLinkListRequest, + options: DeleteBastionShareableLinkOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _deleteBastionShareableLinkDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _deleteBastionShareableLinkSend( + context, + resourceGroupName, + bastionHostName, + bslRequest, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, void>; +} + +export function _putBastionShareableLinkSend( + context: Client, + resourceGroupName: string, + bastionHostName: string, + bslRequest: BastionShareableLinkListRequest, + options: PutBastionShareableLinkOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bastionHostName: bastionHostName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: bastionShareableLinkListRequestSerializer(bslRequest), + }); +} + +export async function _putBastionShareableLinkDeserialize( + result: PathUncheckedResponse, +): Promise<_BastionShareableLinkListResult> { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _bastionShareableLinkListResultDeserializer(result.body); +} + +/** Creates a Bastion Shareable Links for all the VMs specified in the request. */ +export function putBastionShareableLink( + context: Client, + resourceGroupName: string, + bastionHostName: string, + bslRequest: BastionShareableLinkListRequest, + options: PutBastionShareableLinkOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + const initialPagingPoller = getLongRunningPoller( + context, + async (result: PathUncheckedResponse) => result, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _putBastionShareableLinkSend( + context, + resourceGroupName, + bastionHostName, + bslRequest, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, PathUncheckedResponse>; + + return buildPagedAsyncIterator( + context, + async () => await initialPagingPoller, + _putBastionShareableLinkDeserialize, + ["200", "202", "201"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/operations/index.ts b/sdk/network/arm-network/src/api/operations/index.ts new file mode 100644 index 000000000000..de883c05d2f1 --- /dev/null +++ b/sdk/network/arm-network/src/api/operations/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { OperationsListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/operations/operations.ts b/sdk/network/arm-network/src/api/operations/operations.ts new file mode 100644 index 000000000000..87bbfc45f154 --- /dev/null +++ b/sdk/network/arm-network/src/api/operations/operations.ts @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + _OperationListResult, + _operationListResultDeserializer, + Operation, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { OperationsListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/providers/Microsoft.Network/operations{?api%2Dversion}", + { + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _operationListResultDeserializer(result.body); +} + +/** Lists all of the available Network Rest API operations. */ +export function list( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/operations/options.ts b/sdk/network/arm-network/src/api/operations/options.ts new file mode 100644 index 000000000000..c461016ad1c5 --- /dev/null +++ b/sdk/network/arm-network/src/api/operations/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/options.ts b/sdk/network/arm-network/src/api/options.ts new file mode 100644 index 000000000000..cddb03939a35 --- /dev/null +++ b/sdk/network/arm-network/src/api/options.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface CheckDnsNameAvailabilityOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SupportedSecurityProvidersOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; +} + +/** Optional parameters. */ +export interface ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; +} + +/** Optional parameters. */ +export interface ListActiveSecurityAdminRulesOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; +} + +/** Optional parameters. */ +export interface ListActiveConnectivityConfigurationsOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; +} + +/** Optional parameters. */ +export interface ExpressRouteProviderPortOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DisconnectActiveSessionsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GetActiveSessionsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface GetBastionShareableLinkOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DeleteBastionShareableLinkByTokenOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DeleteBastionShareableLinkOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PutBastionShareableLinkOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/network/arm-network/src/api/p2SVpnGateways/index.ts b/sdk/network/arm-network/src/api/p2SVpnGateways/index.ts new file mode 100644 index 000000000000..9ae9708b142d --- /dev/null +++ b/sdk/network/arm-network/src/api/p2SVpnGateways/index.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + disconnectP2SVpnConnections, + getP2SVpnConnectionHealthDetailed, + getP2SVpnConnectionHealth, + generateVpnProfile, + reset, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, + P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, + P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, + P2SVpnGatewaysGenerateVpnProfileOptionalParams, + P2SVpnGatewaysResetOptionalParams, + P2SVpnGatewaysListOptionalParams, + P2SVpnGatewaysListByResourceGroupOptionalParams, + P2SVpnGatewaysDeleteOptionalParams, + P2SVpnGatewaysUpdateTagsOptionalParams, + P2SVpnGatewaysCreateOrUpdateOptionalParams, + P2SVpnGatewaysGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/p2SVpnGateways/operations.ts b/sdk/network/arm-network/src/api/p2SVpnGateways/operations.ts new file mode 100644 index 000000000000..ac688985df30 --- /dev/null +++ b/sdk/network/arm-network/src/api/p2SVpnGateways/operations.ts @@ -0,0 +1,679 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + VpnProfileResponse, + vpnProfileResponseDeserializer, + TagsObject, + tagsObjectSerializer, + P2SVpnConnectionRequest, + p2SVpnConnectionRequestSerializer, + P2SVpnGateway, + p2SVpnGatewaySerializer, + p2SVpnGatewayDeserializer, + _ListP2SVpnGatewaysResult, + _listP2SVpnGatewaysResultDeserializer, + P2SVpnProfileParameters, + p2SVpnProfileParametersSerializer, + P2SVpnConnectionHealthRequest, + p2SVpnConnectionHealthRequestSerializer, + P2SVpnConnectionHealth, + p2SVpnConnectionHealthDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, + P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, + P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, + P2SVpnGatewaysGenerateVpnProfileOptionalParams, + P2SVpnGatewaysResetOptionalParams, + P2SVpnGatewaysListOptionalParams, + P2SVpnGatewaysListByResourceGroupOptionalParams, + P2SVpnGatewaysDeleteOptionalParams, + P2SVpnGatewaysUpdateTagsOptionalParams, + P2SVpnGatewaysCreateOrUpdateOptionalParams, + P2SVpnGatewaysGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _disconnectP2SVpnConnectionsSend( + context: Client, + resourceGroupName: string, + p2SVpnGatewayName: string, + request: P2SVpnConnectionRequest, + options: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + p2sVpnGatewayName: p2SVpnGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: p2SVpnConnectionRequestSerializer(request), + }); +} + +export async function _disconnectP2SVpnConnectionsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. */ +export function disconnectP2SVpnConnections( + context: Client, + resourceGroupName: string, + p2SVpnGatewayName: string, + request: P2SVpnConnectionRequest, + options: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _disconnectP2SVpnConnectionsDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _disconnectP2SVpnConnectionsSend( + context, + resourceGroupName, + p2SVpnGatewayName, + request, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, void>; +} + +export function _getP2SVpnConnectionHealthDetailedSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + request: P2SVpnConnectionHealthRequest, + options: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: p2SVpnConnectionHealthRequestSerializer(request), + }); +} + +export async function _getP2SVpnConnectionHealthDetailedDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return p2SVpnConnectionHealthDeserializer(result.body); +} + +/** Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. */ +export function getP2SVpnConnectionHealthDetailed( + context: Client, + resourceGroupName: string, + gatewayName: string, + request: P2SVpnConnectionHealthRequest, + options: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams = { requestOptions: {} }, +): PollerLike, P2SVpnConnectionHealth> { + return getLongRunningPoller( + context, + _getP2SVpnConnectionHealthDetailedDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getP2SVpnConnectionHealthDetailedSend( + context, + resourceGroupName, + gatewayName, + request, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, P2SVpnConnectionHealth>; +} + +export function _getP2SVpnConnectionHealthSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getP2SVpnConnectionHealthDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return p2SVpnGatewayDeserializer(result.body); +} + +/** Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. */ +export function getP2SVpnConnectionHealth( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams = { requestOptions: {} }, +): PollerLike, P2SVpnGateway> { + return getLongRunningPoller( + context, + _getP2SVpnConnectionHealthDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getP2SVpnConnectionHealthSend(context, resourceGroupName, gatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, P2SVpnGateway>; +} + +export function _generateVpnProfileSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + parameters: P2SVpnProfileParameters, + options: P2SVpnGatewaysGenerateVpnProfileOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: p2SVpnProfileParametersSerializer(parameters), + }); +} + +export async function _generateVpnProfileDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnProfileResponseDeserializer(result.body); +} + +/** Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. */ +export function generateVpnProfile( + context: Client, + resourceGroupName: string, + gatewayName: string, + parameters: P2SVpnProfileParameters, + options: P2SVpnGatewaysGenerateVpnProfileOptionalParams = { requestOptions: {} }, +): PollerLike, VpnProfileResponse> { + return getLongRunningPoller(context, _generateVpnProfileDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _generateVpnProfileSend(context, resourceGroupName, gatewayName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, VpnProfileResponse>; +} + +export function _resetSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: P2SVpnGatewaysResetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _resetDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return p2SVpnGatewayDeserializer(result.body); +} + +/** Resets the primary of the p2s vpn gateway in the specified resource group. */ +export function reset( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: P2SVpnGatewaysResetOptionalParams = { requestOptions: {} }, +): PollerLike, P2SVpnGateway> { + return getLongRunningPoller(context, _resetDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _resetSend(context, resourceGroupName, gatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, P2SVpnGateway>; +} + +export function _listSend( + context: Client, + options: P2SVpnGatewaysListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListP2SVpnGatewaysResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listP2SVpnGatewaysResultDeserializer(result.body); +} + +/** Lists all the P2SVpnGateways in a subscription. */ +export function list( + context: Client, + options: P2SVpnGatewaysListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: P2SVpnGatewaysListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ListP2SVpnGatewaysResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listP2SVpnGatewaysResultDeserializer(result.body); +} + +/** Lists all the P2SVpnGateways in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: P2SVpnGatewaysListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: P2SVpnGatewaysDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a virtual wan p2s vpn gateway. */ +export function $delete( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: P2SVpnGatewaysDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, gatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: TagsObject, + options: P2SVpnGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(p2SVpnGatewayParameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return p2SVpnGatewayDeserializer(result.body); +} + +/** Updates virtual wan p2s vpn gateway tags. */ +export function updateTags( + context: Client, + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: TagsObject, + options: P2SVpnGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): PollerLike, P2SVpnGateway> { + return getLongRunningPoller(context, _updateTagsDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateTagsSend(context, resourceGroupName, gatewayName, p2SVpnGatewayParameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, P2SVpnGateway>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: P2SVpnGateway, + options: P2SVpnGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: p2SVpnGatewaySerializer(p2SVpnGatewayParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return p2SVpnGatewayDeserializer(result.body); +} + +/** Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: P2SVpnGateway, + options: P2SVpnGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, P2SVpnGateway> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + gatewayName, + p2SVpnGatewayParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, P2SVpnGateway>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: P2SVpnGatewaysGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return p2SVpnGatewayDeserializer(result.body); +} + +/** Retrieves the details of a virtual wan p2s vpn gateway. */ +export async function get( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: P2SVpnGatewaysGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, gatewayName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/p2SVpnGateways/options.ts b/sdk/network/arm-network/src/api/p2SVpnGateways/options.ts new file mode 100644 index 000000000000..c1e551a942e7 --- /dev/null +++ b/sdk/network/arm-network/src/api/p2SVpnGateways/options.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface P2SVpnGatewaysGenerateVpnProfileOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface P2SVpnGatewaysResetOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface P2SVpnGatewaysListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface P2SVpnGatewaysListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface P2SVpnGatewaysDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface P2SVpnGatewaysUpdateTagsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface P2SVpnGatewaysCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface P2SVpnGatewaysGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/packetCaptures/index.ts b/sdk/network/arm-network/src/api/packetCaptures/index.ts new file mode 100644 index 000000000000..4e5bff0c7a9f --- /dev/null +++ b/sdk/network/arm-network/src/api/packetCaptures/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, getStatus, stop, $delete, get, create } from "./operations.js"; +export type { + PacketCapturesListOptionalParams, + PacketCapturesGetStatusOptionalParams, + PacketCapturesStopOptionalParams, + PacketCapturesDeleteOptionalParams, + PacketCapturesGetOptionalParams, + PacketCapturesCreateOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/packetCaptures/operations.ts b/sdk/network/arm-network/src/api/packetCaptures/operations.ts new file mode 100644 index 000000000000..1a839f3f0b66 --- /dev/null +++ b/sdk/network/arm-network/src/api/packetCaptures/operations.ts @@ -0,0 +1,379 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PacketCapture, + packetCaptureSerializer, + PacketCaptureResult, + packetCaptureResultDeserializer, + PacketCaptureQueryStatusResult, + packetCaptureQueryStatusResultDeserializer, + _PacketCaptureListResult, + _packetCaptureListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PacketCapturesListOptionalParams, + PacketCapturesGetStatusOptionalParams, + PacketCapturesStopOptionalParams, + PacketCapturesDeleteOptionalParams, + PacketCapturesGetOptionalParams, + PacketCapturesCreateOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + options: PacketCapturesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_PacketCaptureListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _packetCaptureListResultDeserializer(result.body); +} + +/** Lists all packet capture sessions within the specified resource group. */ +export function list( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + options: PacketCapturesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkWatcherName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getStatusSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options: PacketCapturesGetStatusOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + packetCaptureName: packetCaptureName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getStatusDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return packetCaptureQueryStatusResultDeserializer(result.body); +} + +/** Query the status of a running packet capture session. */ +export function getStatus( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options: PacketCapturesGetStatusOptionalParams = { requestOptions: {} }, +): PollerLike, PacketCaptureQueryStatusResult> { + return getLongRunningPoller(context, _getStatusDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getStatusSend(context, resourceGroupName, networkWatcherName, packetCaptureName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, PacketCaptureQueryStatusResult>; +} + +export function _stopSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options: PacketCapturesStopOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + packetCaptureName: packetCaptureName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _stopDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Stops a specified packet capture session. */ +export function stop( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options: PacketCapturesStopOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _stopDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopSend(context, resourceGroupName, networkWatcherName, packetCaptureName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options: PacketCapturesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + packetCaptureName: packetCaptureName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified packet capture session. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options: PacketCapturesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkWatcherName, packetCaptureName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options: PacketCapturesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + packetCaptureName: packetCaptureName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return packetCaptureResultDeserializer(result.body); +} + +/** Gets a packet capture session by name. */ +export async function get( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options: PacketCapturesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkWatcherName, + packetCaptureName, + options, + ); + return _getDeserialize(result); +} + +export function _createSend( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + parameters: PacketCapture, + options: PacketCapturesCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkWatcherName: networkWatcherName, + packetCaptureName: packetCaptureName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: packetCaptureSerializer(parameters), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["201", "200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return packetCaptureResultDeserializer(result.body); +} + +/** Create and start a packet capture on the specified VM. */ +export function create( + context: Client, + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + parameters: PacketCapture, + options: PacketCapturesCreateOptionalParams = { requestOptions: {} }, +): PollerLike, PacketCaptureResult> { + return getLongRunningPoller(context, _createDeserialize, ["201", "200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createSend( + context, + resourceGroupName, + networkWatcherName, + packetCaptureName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, PacketCaptureResult>; +} diff --git a/sdk/network/arm-network/src/api/packetCaptures/options.ts b/sdk/network/arm-network/src/api/packetCaptures/options.ts new file mode 100644 index 000000000000..2a6e5ba9775b --- /dev/null +++ b/sdk/network/arm-network/src/api/packetCaptures/options.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PacketCapturesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PacketCapturesGetStatusOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PacketCapturesStopOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PacketCapturesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PacketCapturesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PacketCapturesCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/index.ts b/sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/index.ts new file mode 100644 index 000000000000..70f772394bb3 --- /dev/null +++ b/sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export type { + PeerExpressRouteCircuitConnectionsListOptionalParams, + PeerExpressRouteCircuitConnectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/operations.ts b/sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/operations.ts new file mode 100644 index 000000000000..961d5cb44bbc --- /dev/null +++ b/sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/operations.ts @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + PeerExpressRouteCircuitConnection, + peerExpressRouteCircuitConnectionDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _PeerExpressRouteCircuitConnectionListResult, + _peerExpressRouteCircuitConnectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PeerExpressRouteCircuitConnectionsListOptionalParams, + PeerExpressRouteCircuitConnectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + options: PeerExpressRouteCircuitConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_PeerExpressRouteCircuitConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _peerExpressRouteCircuitConnectionListResultDeserializer(result.body); +} + +/** Gets all global reach peer connections associated with a private peering in an express route circuit. */ +export function list( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + options: PeerExpressRouteCircuitConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, circuitName, peeringName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options: PeerExpressRouteCircuitConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + circuitName: circuitName, + peeringName: peeringName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return peerExpressRouteCircuitConnectionDeserializer(result.body); +} + +/** Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. */ +export async function get( + context: Client, + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options: PeerExpressRouteCircuitConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + circuitName, + peeringName, + connectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/options.ts b/sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/options.ts new file mode 100644 index 000000000000..b7e9c868c737 --- /dev/null +++ b/sdk/network/arm-network/src/api/peerExpressRouteCircuitConnections/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PeerExpressRouteCircuitConnectionsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PeerExpressRouteCircuitConnectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/privateDnsZoneGroups/index.ts b/sdk/network/arm-network/src/api/privateDnsZoneGroups/index.ts new file mode 100644 index 000000000000..234ea61baa75 --- /dev/null +++ b/sdk/network/arm-network/src/api/privateDnsZoneGroups/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, createOrUpdate, get, $delete } from "./operations.js"; +export type { + PrivateDnsZoneGroupsListOptionalParams, + PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, + PrivateDnsZoneGroupsGetOptionalParams, + PrivateDnsZoneGroupsDeleteOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/privateDnsZoneGroups/operations.ts b/sdk/network/arm-network/src/api/privateDnsZoneGroups/operations.ts new file mode 100644 index 000000000000..44cb15e23c97 --- /dev/null +++ b/sdk/network/arm-network/src/api/privateDnsZoneGroups/operations.ts @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + PrivateDnsZoneGroup, + privateDnsZoneGroupSerializer, + privateDnsZoneGroupDeserializer, + _PrivateDnsZoneGroupListResult, + _privateDnsZoneGroupListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PrivateDnsZoneGroupsListOptionalParams, + PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, + PrivateDnsZoneGroupsGetOptionalParams, + PrivateDnsZoneGroupsDeleteOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + options: PrivateDnsZoneGroupsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateEndpointName: privateEndpointName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_PrivateDnsZoneGroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _privateDnsZoneGroupListResultDeserializer(result.body); +} + +/** Gets all private dns zone groups in a private endpoint. */ +export function list( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + options: PrivateDnsZoneGroupsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateEndpointName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + parameters: PrivateDnsZoneGroup, + options: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateEndpointName: privateEndpointName, + privateDnsZoneGroupName: privateDnsZoneGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: privateDnsZoneGroupSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return privateDnsZoneGroupDeserializer(result.body); +} + +/** Creates or updates a private dns zone group in the specified private endpoint. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + parameters: PrivateDnsZoneGroup, + options: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PrivateDnsZoneGroup> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + privateEndpointName, + privateDnsZoneGroupName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, PrivateDnsZoneGroup>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options: PrivateDnsZoneGroupsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateEndpointName: privateEndpointName, + privateDnsZoneGroupName: privateDnsZoneGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return privateDnsZoneGroupDeserializer(result.body); +} + +/** Gets the private dns zone group resource by specified private dns zone group name. */ +export async function get( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options: PrivateDnsZoneGroupsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateEndpointName, + privateDnsZoneGroupName, + options, + ); + return _getDeserialize(result); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options: PrivateDnsZoneGroupsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateEndpointName: privateEndpointName, + privateDnsZoneGroupName: privateDnsZoneGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified private dns zone group. */ +export function $delete( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options: PrivateDnsZoneGroupsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + privateEndpointName, + privateDnsZoneGroupName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} diff --git a/sdk/network/arm-network/src/api/privateDnsZoneGroups/options.ts b/sdk/network/arm-network/src/api/privateDnsZoneGroups/options.ts new file mode 100644 index 000000000000..0b8be6655ea7 --- /dev/null +++ b/sdk/network/arm-network/src/api/privateDnsZoneGroups/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PrivateDnsZoneGroupsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateDnsZoneGroupsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateDnsZoneGroupsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateDnsZoneGroupsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/network/arm-network/src/api/privateEndpoints/index.ts b/sdk/network/arm-network/src/api/privateEndpoints/index.ts new file mode 100644 index 000000000000..359d749e2772 --- /dev/null +++ b/sdk/network/arm-network/src/api/privateEndpoints/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listBySubscription, list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + PrivateEndpointsListBySubscriptionOptionalParams, + PrivateEndpointsListOptionalParams, + PrivateEndpointsDeleteOptionalParams, + PrivateEndpointsCreateOrUpdateOptionalParams, + PrivateEndpointsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/privateEndpoints/operations.ts b/sdk/network/arm-network/src/api/privateEndpoints/operations.ts new file mode 100644 index 000000000000..1c8b34511b59 --- /dev/null +++ b/sdk/network/arm-network/src/api/privateEndpoints/operations.ts @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + PrivateEndpoint, + privateEndpointSerializer, + privateEndpointDeserializer, +} from "../../models/common/models.js"; +import { errorDeserializer } from "../../models/microsoft/network/models.js"; +import { + _PrivateEndpointListResult, + _privateEndpointListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PrivateEndpointsListBySubscriptionOptionalParams, + PrivateEndpointsListOptionalParams, + PrivateEndpointsDeleteOptionalParams, + PrivateEndpointsCreateOrUpdateOptionalParams, + PrivateEndpointsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: PrivateEndpointsListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_PrivateEndpointListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return _privateEndpointListResultDeserializer(result.body); +} + +/** Gets all private endpoints in a subscription. */ +export function listBySubscription( + context: Client, + options: PrivateEndpointsListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: PrivateEndpointsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_PrivateEndpointListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return _privateEndpointListResultDeserializer(result.body); +} + +/** Gets all private endpoints in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: PrivateEndpointsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + options: PrivateEndpointsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateEndpointName: privateEndpointName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified private endpoint. */ +export function $delete( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + options: PrivateEndpointsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, privateEndpointName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + parameters: PrivateEndpoint, + options: PrivateEndpointsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateEndpointName: privateEndpointName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: privateEndpointSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return privateEndpointDeserializer(result.body); +} + +/** Creates or updates an private endpoint in the specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + parameters: PrivateEndpoint, + options: PrivateEndpointsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PrivateEndpoint> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, privateEndpointName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, PrivateEndpoint>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + options: PrivateEndpointsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateEndpointName: privateEndpointName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return privateEndpointDeserializer(result.body); +} + +/** Gets the specified private endpoint by resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + privateEndpointName: string, + options: PrivateEndpointsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, privateEndpointName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/privateEndpoints/options.ts b/sdk/network/arm-network/src/api/privateEndpoints/options.ts new file mode 100644 index 000000000000..b3df1d489795 --- /dev/null +++ b/sdk/network/arm-network/src/api/privateEndpoints/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PrivateEndpointsListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateEndpointsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateEndpointsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateEndpointsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateEndpointsGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/privateLinkServices/index.ts b/sdk/network/arm-network/src/api/privateLinkServices/index.ts new file mode 100644 index 000000000000..b9682879a874 --- /dev/null +++ b/sdk/network/arm-network/src/api/privateLinkServices/index.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listAutoApprovedPrivateLinkServicesByResourceGroup, + listAutoApprovedPrivateLinkServices, + checkPrivateLinkServiceVisibilityByResourceGroup, + checkPrivateLinkServiceVisibility, + listPrivateEndpointConnections, + deletePrivateEndpointConnection, + updatePrivateEndpointConnection, + getPrivateEndpointConnection, + listBySubscription, + list, + $delete, + createOrUpdate, + get, +} from "./operations.js"; +export type { + PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, + PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, + PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, + PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, + PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, + PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, + PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams, + PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams, + PrivateLinkServicesListBySubscriptionOptionalParams, + PrivateLinkServicesListOptionalParams, + PrivateLinkServicesDeleteOptionalParams, + PrivateLinkServicesCreateOrUpdateOptionalParams, + PrivateLinkServicesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/privateLinkServices/operations.ts b/sdk/network/arm-network/src/api/privateLinkServices/operations.ts new file mode 100644 index 000000000000..b93c706d841d --- /dev/null +++ b/sdk/network/arm-network/src/api/privateLinkServices/operations.ts @@ -0,0 +1,820 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + PrivateLinkService, + privateLinkServiceSerializer, + privateLinkServiceDeserializer, + PrivateEndpointConnection, + privateEndpointConnectionSerializer, + privateEndpointConnectionDeserializer, +} from "../../models/common/models.js"; +import { + errorDeserializer, + CheckPrivateLinkServiceVisibilityRequest, + checkPrivateLinkServiceVisibilityRequestSerializer, + PrivateLinkServiceVisibility, + privateLinkServiceVisibilityDeserializer, + _AutoApprovedPrivateLinkServicesResult, + _autoApprovedPrivateLinkServicesResultDeserializer, + AutoApprovedPrivateLinkService, +} from "../../models/microsoft/network/models.js"; +import { + _PrivateLinkServiceListResult, + _privateLinkServiceListResultDeserializer, + _PrivateEndpointConnectionListResult, + _privateEndpointConnectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, + PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, + PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, + PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, + PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, + PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, + PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams, + PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams, + PrivateLinkServicesListBySubscriptionOptionalParams, + PrivateLinkServicesListOptionalParams, + PrivateLinkServicesDeleteOptionalParams, + PrivateLinkServicesCreateOrUpdateOptionalParams, + PrivateLinkServicesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAutoApprovedPrivateLinkServicesByResourceGroupSend( + context: Client, + resourceGroupName: string, + location: string, + options: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAutoApprovedPrivateLinkServicesByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_AutoApprovedPrivateLinkServicesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _autoApprovedPrivateLinkServicesResultDeserializer(result.body); +} + +/** Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. */ +export function listAutoApprovedPrivateLinkServicesByResourceGroup( + context: Client, + resourceGroupName: string, + location: string, + options: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listAutoApprovedPrivateLinkServicesByResourceGroupSend( + context, + resourceGroupName, + location, + options, + ), + _listAutoApprovedPrivateLinkServicesByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listAutoApprovedPrivateLinkServicesSend( + context: Client, + location: string, + options: PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAutoApprovedPrivateLinkServicesDeserialize( + result: PathUncheckedResponse, +): Promise<_AutoApprovedPrivateLinkServicesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _autoApprovedPrivateLinkServicesResultDeserializer(result.body); +} + +/** Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. */ +export function listAutoApprovedPrivateLinkServices( + context: Client, + location: string, + options: PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAutoApprovedPrivateLinkServicesSend(context, location, options), + _listAutoApprovedPrivateLinkServicesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _checkPrivateLinkServiceVisibilityByResourceGroupSend( + context: Client, + resourceGroupName: string, + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: checkPrivateLinkServiceVisibilityRequestSerializer(parameters), + }); +} + +export async function _checkPrivateLinkServiceVisibilityByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return privateLinkServiceVisibilityDeserializer(result.body); +} + +/** Checks whether the subscription is visible to private link service in the specified resource group. */ +export function checkPrivateLinkServiceVisibilityByResourceGroup( + context: Client, + resourceGroupName: string, + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PollerLike, PrivateLinkServiceVisibility> { + return getLongRunningPoller( + context, + _checkPrivateLinkServiceVisibilityByResourceGroupDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _checkPrivateLinkServiceVisibilityByResourceGroupSend( + context, + resourceGroupName, + location, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, PrivateLinkServiceVisibility>; +} + +export function _checkPrivateLinkServiceVisibilitySend( + context: Client, + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: checkPrivateLinkServiceVisibilityRequestSerializer(parameters), + }); +} + +export async function _checkPrivateLinkServiceVisibilityDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return privateLinkServiceVisibilityDeserializer(result.body); +} + +/** Checks whether the subscription is visible to private link service. */ +export function checkPrivateLinkServiceVisibility( + context: Client, + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams = { + requestOptions: {}, + }, +): PollerLike, PrivateLinkServiceVisibility> { + return getLongRunningPoller( + context, + _checkPrivateLinkServiceVisibilityDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _checkPrivateLinkServiceVisibilitySend(context, location, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, PrivateLinkServiceVisibility>; +} + +export function _listPrivateEndpointConnectionsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listPrivateEndpointConnectionsDeserialize( + result: PathUncheckedResponse, +): Promise<_PrivateEndpointConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return _privateEndpointConnectionListResultDeserializer(result.body); +} + +/** Gets all private end point connections for a specific private link service. */ +export function listPrivateEndpointConnections( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listPrivateEndpointConnectionsSend(context, resourceGroupName, serviceName, options), + _listPrivateEndpointConnectionsDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _deletePrivateEndpointConnectionSend( + context: Client, + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + peConnectionName: peConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _deletePrivateEndpointConnectionDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete private end point connection for a private link service in a subscription. */ +export function deletePrivateEndpointConnection( + context: Client, + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _deletePrivateEndpointConnectionDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _deletePrivateEndpointConnectionSend( + context, + resourceGroupName, + serviceName, + peConnectionName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, void>; +} + +export function _updatePrivateEndpointConnectionSend( + context: Client, + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + parameters: PrivateEndpointConnection, + options: PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + peConnectionName: peConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: privateEndpointConnectionSerializer(parameters), + }); +} + +export async function _updatePrivateEndpointConnectionDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return privateEndpointConnectionDeserializer(result.body); +} + +/** Approve or reject private end point connection for a private link service in a subscription. */ +export async function updatePrivateEndpointConnection( + context: Client, + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + parameters: PrivateEndpointConnection, + options: PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _updatePrivateEndpointConnectionSend( + context, + resourceGroupName, + serviceName, + peConnectionName, + parameters, + options, + ); + return _updatePrivateEndpointConnectionDeserialize(result); +} + +export function _getPrivateEndpointConnectionSend( + context: Client, + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options: PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + peConnectionName: peConnectionName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getPrivateEndpointConnectionDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return privateEndpointConnectionDeserializer(result.body); +} + +/** Get the specific private end point connection by specific private link service in the resource group. */ +export async function getPrivateEndpointConnection( + context: Client, + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options: PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getPrivateEndpointConnectionSend( + context, + resourceGroupName, + serviceName, + peConnectionName, + options, + ); + return _getPrivateEndpointConnectionDeserialize(result); +} + +export function _listBySubscriptionSend( + context: Client, + options: PrivateLinkServicesListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_PrivateLinkServiceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return _privateLinkServiceListResultDeserializer(result.body); +} + +/** Gets all private link service in a subscription. */ +export function listBySubscription( + context: Client, + options: PrivateLinkServicesListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: PrivateLinkServicesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_PrivateLinkServiceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return _privateLinkServiceListResultDeserializer(result.body); +} + +/** Gets all private link services in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: PrivateLinkServicesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PrivateLinkServicesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified private link service. */ +export function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PrivateLinkServicesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, serviceName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: PrivateLinkService, + options: PrivateLinkServicesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: privateLinkServiceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return privateLinkServiceDeserializer(result.body); +} + +/** Creates or updates an private link service in the specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: PrivateLinkService, + options: PrivateLinkServicesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PrivateLinkService> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, serviceName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, PrivateLinkService>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PrivateLinkServicesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return privateLinkServiceDeserializer(result.body); +} + +/** Gets the specified private link service by resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PrivateLinkServicesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/privateLinkServices/options.ts b/sdk/network/arm-network/src/api/privateLinkServices/options.ts new file mode 100644 index 000000000000..39d8b4f29758 --- /dev/null +++ b/sdk/network/arm-network/src/api/privateLinkServices/options.ts @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} + +/** Optional parameters. */ +export interface PrivateLinkServicesListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateLinkServicesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateLinkServicesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateLinkServicesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateLinkServicesGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/publicIPAddresses/index.ts b/sdk/network/arm-network/src/api/publicIPAddresses/index.ts new file mode 100644 index 000000000000..b0bf787e6895 --- /dev/null +++ b/sdk/network/arm-network/src/api/publicIPAddresses/index.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listVirtualMachineScaleSetPublicIPAddresses, + listCloudServicePublicIPAddresses, + disassociateCloudServiceReservedPublicIp, + reserveCloudServicePublicIpAddress, + ddosProtectionStatus, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, + listVirtualMachineScaleSetVMPublicIPAddresses, + getVirtualMachineScaleSetPublicIPAddress, + listCloudServiceRoleInstancePublicIPAddresses, + getCloudServicePublicIPAddress, +} from "./operations.js"; +export type { + PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, + PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, + PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, + PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, + PublicIPAddressesDdosProtectionStatusOptionalParams, + PublicIPAddressesListAllOptionalParams, + PublicIPAddressesListOptionalParams, + PublicIPAddressesDeleteOptionalParams, + PublicIPAddressesUpdateTagsOptionalParams, + PublicIPAddressesCreateOrUpdateOptionalParams, + PublicIPAddressesGetOptionalParams, + PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, + PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams, + PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, + PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/publicIPAddresses/operations.ts b/sdk/network/arm-network/src/api/publicIPAddresses/operations.ts new file mode 100644 index 000000000000..3802c7b2dd4d --- /dev/null +++ b/sdk/network/arm-network/src/api/publicIPAddresses/operations.ts @@ -0,0 +1,999 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + PublicIPAddress, + publicIPAddressSerializer, + publicIPAddressDeserializer, +} from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + PublicIpDdosProtectionStatusResult, + publicIpDdosProtectionStatusResultDeserializer, + ReserveCloudServicePublicIpAddressRequest, + reserveCloudServicePublicIpAddressRequestSerializer, + DisassociateCloudServicePublicIpRequest, + disassociateCloudServicePublicIpRequestSerializer, +} from "../../models/microsoft/network/models.js"; +import { + _PublicIPAddressListResult, + _publicIPAddressListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, + PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, + PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, + PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, + PublicIPAddressesDdosProtectionStatusOptionalParams, + PublicIPAddressesListAllOptionalParams, + PublicIPAddressesListOptionalParams, + PublicIPAddressesDeleteOptionalParams, + PublicIPAddressesUpdateTagsOptionalParams, + PublicIPAddressesCreateOrUpdateOptionalParams, + PublicIPAddressesGetOptionalParams, + PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, + PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams, + PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, + PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listVirtualMachineScaleSetPublicIPAddressesSend( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + options: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineScaleSetName: virtualMachineScaleSetName, + "api%2Dversion": "2018-10-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listVirtualMachineScaleSetPublicIPAddressesDeserialize( + result: PathUncheckedResponse, +): Promise<_PublicIPAddressListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _publicIPAddressListResultDeserializer(result.body); +} + +/** Gets information about all public IP addresses on a virtual machine scale set level. */ +export function listVirtualMachineScaleSetPublicIPAddresses( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + options: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listVirtualMachineScaleSetPublicIPAddressesSend( + context, + resourceGroupName, + virtualMachineScaleSetName, + options, + ), + _listVirtualMachineScaleSetPublicIPAddressesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2018-10-01" }, + ); +} + +export function _listCloudServicePublicIPAddressesSend( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + options: PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + cloudServiceName: cloudServiceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listCloudServicePublicIPAddressesDeserialize( + result: PathUncheckedResponse, +): Promise<_PublicIPAddressListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _publicIPAddressListResultDeserializer(result.body); +} + +/** Gets information about all public IP addresses on a cloud service level. */ +export function listCloudServicePublicIPAddresses( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + options: PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listCloudServicePublicIPAddressesSend(context, resourceGroupName, cloudServiceName, options), + _listCloudServicePublicIPAddressesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _disassociateCloudServiceReservedPublicIpSend( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + parameters: DisassociateCloudServicePublicIpRequest, + options: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/disassociateCloudServiceReservedPublicIp{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIpAddressName: publicIpAddressName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: disassociateCloudServicePublicIpRequestSerializer(parameters), + }); +} + +export async function _disassociateCloudServiceReservedPublicIpDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return publicIPAddressDeserializer(result.body); +} + +/** Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. */ +export function disassociateCloudServiceReservedPublicIp( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + parameters: DisassociateCloudServicePublicIpRequest, + options: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams = { + requestOptions: {}, + }, +): PollerLike, PublicIPAddress> { + return getLongRunningPoller( + context, + _disassociateCloudServiceReservedPublicIpDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _disassociateCloudServiceReservedPublicIpSend( + context, + resourceGroupName, + publicIpAddressName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, PublicIPAddress>; +} + +export function _reserveCloudServicePublicIpAddressSend( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + parameters: ReserveCloudServicePublicIpAddressRequest, + options: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/reserveCloudServicePublicIpAddress{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIpAddressName: publicIpAddressName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: reserveCloudServicePublicIpAddressRequestSerializer(parameters), + }); +} + +export async function _reserveCloudServicePublicIpAddressDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return publicIPAddressDeserializer(result.body); +} + +/** Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. */ +export function reserveCloudServicePublicIpAddress( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + parameters: ReserveCloudServicePublicIpAddressRequest, + options: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams = { + requestOptions: {}, + }, +): PollerLike, PublicIPAddress> { + return getLongRunningPoller( + context, + _reserveCloudServicePublicIpAddressDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _reserveCloudServicePublicIpAddressSend( + context, + resourceGroupName, + publicIpAddressName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, PublicIPAddress>; +} + +export function _ddosProtectionStatusSend( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + options: PublicIPAddressesDdosProtectionStatusOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/ddosProtectionStatus{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIpAddressName: publicIpAddressName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _ddosProtectionStatusDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return publicIpDdosProtectionStatusResultDeserializer(result.body); +} + +/** Gets the Ddos Protection Status of a Public IP Address */ +export function ddosProtectionStatus( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + options: PublicIPAddressesDdosProtectionStatusOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + PublicIpDdosProtectionStatusResult +> { + return getLongRunningPoller(context, _ddosProtectionStatusDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _ddosProtectionStatusSend(context, resourceGroupName, publicIpAddressName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + PublicIpDdosProtectionStatusResult + >; +} + +export function _listAllSend( + context: Client, + options: PublicIPAddressesListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_PublicIPAddressListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _publicIPAddressListResultDeserializer(result.body); +} + +/** Gets all the public IP addresses in a subscription. */ +export function listAll( + context: Client, + options: PublicIPAddressesListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: PublicIPAddressesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_PublicIPAddressListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _publicIPAddressListResultDeserializer(result.body); +} + +/** Gets all public IP addresses in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: PublicIPAddressesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + options: PublicIPAddressesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIpAddressName: publicIpAddressName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified public IP address. */ +export function $delete( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + options: PublicIPAddressesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, publicIpAddressName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + parameters: TagsObject, + options: PublicIPAddressesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIpAddressName: publicIpAddressName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return publicIPAddressDeserializer(result.body); +} + +/** Updates public IP address tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + parameters: TagsObject, + options: PublicIPAddressesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + publicIpAddressName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + parameters: PublicIPAddress, + options: PublicIPAddressesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIpAddressName: publicIpAddressName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: publicIPAddressSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return publicIPAddressDeserializer(result.body); +} + +/** Creates or updates a static or dynamic public IP address. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + parameters: PublicIPAddress, + options: PublicIPAddressesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PublicIPAddress> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, publicIpAddressName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, PublicIPAddress>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + options: PublicIPAddressesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIpAddressName: publicIpAddressName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return publicIPAddressDeserializer(result.body); +} + +/** Gets the specified public IP address in a specified resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + publicIpAddressName: string, + options: PublicIPAddressesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, publicIpAddressName, options); + return _getDeserialize(result); +} + +export function _listVirtualMachineScaleSetVMPublicIPAddressesSend( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + options: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineScaleSetName: virtualMachineScaleSetName, + virtualmachineIndex: virtualmachineIndex, + networkInterfaceName: networkInterfaceName, + ipConfigurationName: ipConfigurationName, + "api%2Dversion": "2018-10-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listVirtualMachineScaleSetVMPublicIPAddressesDeserialize( + result: PathUncheckedResponse, +): Promise<_PublicIPAddressListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _publicIPAddressListResultDeserializer(result.body); +} + +/** Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. */ +export function listVirtualMachineScaleSetVMPublicIPAddresses( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + options: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listVirtualMachineScaleSetVMPublicIPAddressesSend( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + networkInterfaceName, + ipConfigurationName, + options, + ), + _listVirtualMachineScaleSetVMPublicIPAddressesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2018-10-01" }, + ); +} + +export function _getVirtualMachineScaleSetPublicIPAddressSend( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + publicIpAddressName: string, + options: PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineScaleSetName: virtualMachineScaleSetName, + virtualmachineIndex: virtualmachineIndex, + networkInterfaceName: networkInterfaceName, + ipConfigurationName: ipConfigurationName, + publicIpAddressName: publicIpAddressName, + "api%2Dversion": "2018-10-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getVirtualMachineScaleSetPublicIPAddressDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return publicIPAddressDeserializer(result.body); +} + +/** Get the specified public IP address in a virtual machine scale set. */ +export async function getVirtualMachineScaleSetPublicIPAddress( + context: Client, + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + publicIpAddressName: string, + options: PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getVirtualMachineScaleSetPublicIPAddressSend( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + networkInterfaceName, + ipConfigurationName, + publicIpAddressName, + options, + ); + return _getVirtualMachineScaleSetPublicIPAddressDeserialize(result); +} + +export function _listCloudServiceRoleInstancePublicIPAddressesSend( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + ipConfigurationName: string, + options: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + cloudServiceName: cloudServiceName, + roleInstanceName: roleInstanceName, + networkInterfaceName: networkInterfaceName, + ipConfigurationName: ipConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listCloudServiceRoleInstancePublicIPAddressesDeserialize( + result: PathUncheckedResponse, +): Promise<_PublicIPAddressListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _publicIPAddressListResultDeserializer(result.body); +} + +/** Gets information about all public IP addresses in a role instance IP configuration in a cloud service. */ +export function listCloudServiceRoleInstancePublicIPAddresses( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + ipConfigurationName: string, + options: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listCloudServiceRoleInstancePublicIPAddressesSend( + context, + resourceGroupName, + cloudServiceName, + roleInstanceName, + networkInterfaceName, + ipConfigurationName, + options, + ), + _listCloudServiceRoleInstancePublicIPAddressesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getCloudServicePublicIPAddressSend( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + ipConfigurationName: string, + publicIpAddressName: string, + options: PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + cloudServiceName: cloudServiceName, + roleInstanceName: roleInstanceName, + networkInterfaceName: networkInterfaceName, + ipConfigurationName: ipConfigurationName, + publicIpAddressName: publicIpAddressName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getCloudServicePublicIPAddressDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return publicIPAddressDeserializer(result.body); +} + +/** Get the specified public IP address in a cloud service. */ +export async function getCloudServicePublicIPAddress( + context: Client, + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + ipConfigurationName: string, + publicIpAddressName: string, + options: PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getCloudServicePublicIPAddressSend( + context, + resourceGroupName, + cloudServiceName, + roleInstanceName, + networkInterfaceName, + ipConfigurationName, + publicIpAddressName, + options, + ); + return _getCloudServicePublicIPAddressDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/publicIPAddresses/options.ts b/sdk/network/arm-network/src/api/publicIPAddresses/options.ts new file mode 100644 index 000000000000..ba326a7092f1 --- /dev/null +++ b/sdk/network/arm-network/src/api/publicIPAddresses/options.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PublicIPAddressesDdosProtectionStatusOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PublicIPAddressesListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PublicIPAddressesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PublicIPAddressesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PublicIPAddressesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PublicIPAddressesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PublicIPAddressesGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} + +/** Optional parameters. */ +export interface PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} + +/** Optional parameters. */ +export interface PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/publicIPPrefixes/index.ts b/sdk/network/arm-network/src/api/publicIPPrefixes/index.ts new file mode 100644 index 000000000000..0551be9310ae --- /dev/null +++ b/sdk/network/arm-network/src/api/publicIPPrefixes/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + PublicIPPrefixesListAllOptionalParams, + PublicIPPrefixesListOptionalParams, + PublicIPPrefixesDeleteOptionalParams, + PublicIPPrefixesUpdateTagsOptionalParams, + PublicIPPrefixesCreateOrUpdateOptionalParams, + PublicIPPrefixesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/publicIPPrefixes/operations.ts b/sdk/network/arm-network/src/api/publicIPPrefixes/operations.ts new file mode 100644 index 000000000000..920a2d4fad5e --- /dev/null +++ b/sdk/network/arm-network/src/api/publicIPPrefixes/operations.ts @@ -0,0 +1,351 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + PublicIPPrefix, + publicIPPrefixSerializer, + publicIPPrefixDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _PublicIPPrefixListResult, + _publicIPPrefixListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PublicIPPrefixesListAllOptionalParams, + PublicIPPrefixesListOptionalParams, + PublicIPPrefixesDeleteOptionalParams, + PublicIPPrefixesUpdateTagsOptionalParams, + PublicIPPrefixesCreateOrUpdateOptionalParams, + PublicIPPrefixesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: PublicIPPrefixesListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_PublicIPPrefixListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _publicIPPrefixListResultDeserializer(result.body); +} + +/** Gets all the public IP prefixes in a subscription. */ +export function listAll( + context: Client, + options: PublicIPPrefixesListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: PublicIPPrefixesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_PublicIPPrefixListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _publicIPPrefixListResultDeserializer(result.body); +} + +/** Gets all public IP prefixes in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: PublicIPPrefixesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + publicIpPrefixName: string, + options: PublicIPPrefixesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIpPrefixName: publicIpPrefixName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified public IP prefix. */ +export function $delete( + context: Client, + resourceGroupName: string, + publicIpPrefixName: string, + options: PublicIPPrefixesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, publicIpPrefixName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + publicIpPrefixName: string, + parameters: TagsObject, + options: PublicIPPrefixesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIpPrefixName: publicIpPrefixName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return publicIPPrefixDeserializer(result.body); +} + +/** Updates public IP prefix tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + publicIpPrefixName: string, + parameters: TagsObject, + options: PublicIPPrefixesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + publicIpPrefixName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + publicIpPrefixName: string, + parameters: PublicIPPrefix, + options: PublicIPPrefixesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIpPrefixName: publicIpPrefixName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: publicIPPrefixSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return publicIPPrefixDeserializer(result.body); +} + +/** Creates or updates a static or dynamic public IP prefix. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + publicIpPrefixName: string, + parameters: PublicIPPrefix, + options: PublicIPPrefixesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PublicIPPrefix> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, publicIpPrefixName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, PublicIPPrefix>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + publicIpPrefixName: string, + options: PublicIPPrefixesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIpPrefixName: publicIpPrefixName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return publicIPPrefixDeserializer(result.body); +} + +/** Gets the specified public IP prefix in a specified resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + publicIpPrefixName: string, + options: PublicIPPrefixesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, publicIpPrefixName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/publicIPPrefixes/options.ts b/sdk/network/arm-network/src/api/publicIPPrefixes/options.ts new file mode 100644 index 000000000000..f818e1f74cdf --- /dev/null +++ b/sdk/network/arm-network/src/api/publicIPPrefixes/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PublicIPPrefixesListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PublicIPPrefixesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PublicIPPrefixesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PublicIPPrefixesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PublicIPPrefixesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PublicIPPrefixesGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/reachabilityAnalysisIntents/index.ts b/sdk/network/arm-network/src/api/reachabilityAnalysisIntents/index.ts new file mode 100644 index 000000000000..46115f1791ad --- /dev/null +++ b/sdk/network/arm-network/src/api/reachabilityAnalysisIntents/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, create, get } from "./operations.js"; +export type { + ReachabilityAnalysisIntentsListOptionalParams, + ReachabilityAnalysisIntentsDeleteOptionalParams, + ReachabilityAnalysisIntentsCreateOptionalParams, + ReachabilityAnalysisIntentsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/reachabilityAnalysisIntents/operations.ts b/sdk/network/arm-network/src/api/reachabilityAnalysisIntents/operations.ts new file mode 100644 index 000000000000..56075e4bca72 --- /dev/null +++ b/sdk/network/arm-network/src/api/reachabilityAnalysisIntents/operations.ts @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + commonErrorResponseDeserializer, + ReachabilityAnalysisIntent, + reachabilityAnalysisIntentSerializer, + reachabilityAnalysisIntentDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _ReachabilityAnalysisIntentListResult, + _reachabilityAnalysisIntentListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ReachabilityAnalysisIntentsListOptionalParams, + ReachabilityAnalysisIntentsDeleteOptionalParams, + ReachabilityAnalysisIntentsCreateOptionalParams, + ReachabilityAnalysisIntentsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options: ReachabilityAnalysisIntentsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents{?api%2Dversion,skipToken,skip,top,sortKey,sortValue}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + "api%2Dversion": "2025-07-01", + skipToken: options?.skipToken, + skip: options?.skip, + top: options?.top, + sortKey: options?.sortKey, + sortValue: options?.sortValue, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ReachabilityAnalysisIntentListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return _reachabilityAnalysisIntentListResultDeserializer(result.body); +} + +/** Gets list of Reachability Analysis Intents . */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options: ReachabilityAnalysisIntentsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, workspaceName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options: ReachabilityAnalysisIntentsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + reachabilityAnalysisIntentName: reachabilityAnalysisIntentName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes Reachability Analysis Intent. */ +export async function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options: ReachabilityAnalysisIntentsDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + body: ReachabilityAnalysisIntent, + options: ReachabilityAnalysisIntentsCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + reachabilityAnalysisIntentName: reachabilityAnalysisIntentName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: reachabilityAnalysisIntentSerializer(body), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return reachabilityAnalysisIntentDeserializer(result.body); +} + +/** Creates Reachability Analysis Intent. */ +export async function create( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + body: ReachabilityAnalysisIntent, + options: ReachabilityAnalysisIntentsCreateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createSend( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + body, + options, + ); + return _createDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options: ReachabilityAnalysisIntentsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + reachabilityAnalysisIntentName: reachabilityAnalysisIntentName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return reachabilityAnalysisIntentDeserializer(result.body); +} + +/** Get the Reachability Analysis Intent. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options: ReachabilityAnalysisIntentsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/reachabilityAnalysisIntents/options.ts b/sdk/network/arm-network/src/api/reachabilityAnalysisIntents/options.ts new file mode 100644 index 000000000000..74b3a1983a3f --- /dev/null +++ b/sdk/network/arm-network/src/api/reachabilityAnalysisIntents/options.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ReachabilityAnalysisIntentsListOptionalParams extends OperationOptions { + /** Optional skip token. */ + skipToken?: string; + /** Optional num entries to skip. */ + skip?: number; + /** Optional num entries to show. */ + top?: number; + /** Optional key by which to sort. */ + sortKey?: string; + /** Optional sort value for pagination. */ + sortValue?: string; +} + +/** Optional parameters. */ +export interface ReachabilityAnalysisIntentsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ReachabilityAnalysisIntentsCreateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ReachabilityAnalysisIntentsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/reachabilityAnalysisRuns/index.ts b/sdk/network/arm-network/src/api/reachabilityAnalysisRuns/index.ts new file mode 100644 index 000000000000..cf4344ef7b58 --- /dev/null +++ b/sdk/network/arm-network/src/api/reachabilityAnalysisRuns/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, create, get } from "./operations.js"; +export type { + ReachabilityAnalysisRunsListOptionalParams, + ReachabilityAnalysisRunsDeleteOptionalParams, + ReachabilityAnalysisRunsCreateOptionalParams, + ReachabilityAnalysisRunsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/reachabilityAnalysisRuns/operations.ts b/sdk/network/arm-network/src/api/reachabilityAnalysisRuns/operations.ts new file mode 100644 index 000000000000..c3fd9804567c --- /dev/null +++ b/sdk/network/arm-network/src/api/reachabilityAnalysisRuns/operations.ts @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + commonErrorResponseDeserializer, + ReachabilityAnalysisRun, + reachabilityAnalysisRunSerializer, + reachabilityAnalysisRunDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _ReachabilityAnalysisRunListResult, + _reachabilityAnalysisRunListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ReachabilityAnalysisRunsListOptionalParams, + ReachabilityAnalysisRunsDeleteOptionalParams, + ReachabilityAnalysisRunsCreateOptionalParams, + ReachabilityAnalysisRunsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options: ReachabilityAnalysisRunsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns{?api%2Dversion,skipToken,skip,top,sortKey,sortValue}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + "api%2Dversion": "2025-07-01", + skipToken: options?.skipToken, + skip: options?.skip, + top: options?.top, + sortKey: options?.sortKey, + sortValue: options?.sortValue, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ReachabilityAnalysisRunListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return _reachabilityAnalysisRunListResultDeserializer(result.body); +} + +/** Gets list of Reachability Analysis Runs. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options: ReachabilityAnalysisRunsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, workspaceName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options: ReachabilityAnalysisRunsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + reachabilityAnalysisRunName: reachabilityAnalysisRunName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes Reachability Analysis Run. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options: ReachabilityAnalysisRunsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + body: ReachabilityAnalysisRun, + options: ReachabilityAnalysisRunsCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + reachabilityAnalysisRunName: reachabilityAnalysisRunName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: reachabilityAnalysisRunSerializer(body), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return reachabilityAnalysisRunDeserializer(result.body); +} + +/** Creates Reachability Analysis Runs. */ +export async function create( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + body: ReachabilityAnalysisRun, + options: ReachabilityAnalysisRunsCreateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createSend( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + body, + options, + ); + return _createDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options: ReachabilityAnalysisRunsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + reachabilityAnalysisRunName: reachabilityAnalysisRunName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return reachabilityAnalysisRunDeserializer(result.body); +} + +/** Gets Reachability Analysis Run. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options: ReachabilityAnalysisRunsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/reachabilityAnalysisRuns/options.ts b/sdk/network/arm-network/src/api/reachabilityAnalysisRuns/options.ts new file mode 100644 index 000000000000..2e92872e6e09 --- /dev/null +++ b/sdk/network/arm-network/src/api/reachabilityAnalysisRuns/options.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ReachabilityAnalysisRunsListOptionalParams extends OperationOptions { + /** Optional skip token. */ + skipToken?: string; + /** Optional num entries to skip. */ + skip?: number; + /** Optional num entries to show. */ + top?: number; + /** Optional key by which to sort. */ + sortKey?: string; + /** Optional sort value for pagination. */ + sortValue?: string; +} + +/** Optional parameters. */ +export interface ReachabilityAnalysisRunsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ReachabilityAnalysisRunsCreateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ReachabilityAnalysisRunsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/resourceNavigationLinks/index.ts b/sdk/network/arm-network/src/api/resourceNavigationLinks/index.ts new file mode 100644 index 000000000000..39e9ce70e5c1 --- /dev/null +++ b/sdk/network/arm-network/src/api/resourceNavigationLinks/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ResourceNavigationLinksListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/resourceNavigationLinks/operations.ts b/sdk/network/arm-network/src/api/resourceNavigationLinks/operations.ts new file mode 100644 index 000000000000..07a120bfae95 --- /dev/null +++ b/sdk/network/arm-network/src/api/resourceNavigationLinks/operations.ts @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ResourceNavigationLinksListResult, + resourceNavigationLinksListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ResourceNavigationLinksListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options: ResourceNavigationLinksListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/resourceNavigationLinks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + subnetName: subnetName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return resourceNavigationLinksListResultDeserializer(result.body); +} + +/** Gets a list of resource navigation links for a subnet. */ +export async function list( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options: ResourceNavigationLinksListOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSend( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + options, + ); + return _listDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/resourceNavigationLinks/options.ts b/sdk/network/arm-network/src/api/resourceNavigationLinks/options.ts new file mode 100644 index 000000000000..c5851996258f --- /dev/null +++ b/sdk/network/arm-network/src/api/resourceNavigationLinks/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ResourceNavigationLinksListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/routeFilterRules/index.ts b/sdk/network/arm-network/src/api/routeFilterRules/index.ts new file mode 100644 index 000000000000..947544025375 --- /dev/null +++ b/sdk/network/arm-network/src/api/routeFilterRules/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByRouteFilter, createOrUpdate, get, $delete } from "./operations.js"; +export type { + RouteFilterRulesListByRouteFilterOptionalParams, + RouteFilterRulesCreateOrUpdateOptionalParams, + RouteFilterRulesGetOptionalParams, + RouteFilterRulesDeleteOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/routeFilterRules/operations.ts b/sdk/network/arm-network/src/api/routeFilterRules/operations.ts new file mode 100644 index 000000000000..22c0eb760dbd --- /dev/null +++ b/sdk/network/arm-network/src/api/routeFilterRules/operations.ts @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + RouteFilterRule, + routeFilterRuleSerializer, + routeFilterRuleDeserializer, + _RouteFilterRuleListResult, + _routeFilterRuleListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + RouteFilterRulesListByRouteFilterOptionalParams, + RouteFilterRulesCreateOrUpdateOptionalParams, + RouteFilterRulesGetOptionalParams, + RouteFilterRulesDeleteOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByRouteFilterSend( + context: Client, + resourceGroupName: string, + routeFilterName: string, + options: RouteFilterRulesListByRouteFilterOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeFilterName: routeFilterName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByRouteFilterDeserialize( + result: PathUncheckedResponse, +): Promise<_RouteFilterRuleListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _routeFilterRuleListResultDeserializer(result.body); +} + +/** Gets all RouteFilterRules in a route filter. */ +export function listByRouteFilter( + context: Client, + resourceGroupName: string, + routeFilterName: string, + options: RouteFilterRulesListByRouteFilterOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByRouteFilterSend(context, resourceGroupName, routeFilterName, options), + _listByRouteFilterDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + routeFilterRuleParameters: RouteFilterRule, + options: RouteFilterRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeFilterName: routeFilterName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: routeFilterRuleSerializer(routeFilterRuleParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeFilterRuleDeserializer(result.body); +} + +/** Creates or updates a route in the specified route filter. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + routeFilterRuleParameters: RouteFilterRule, + options: RouteFilterRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, RouteFilterRule> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + routeFilterName, + ruleName, + routeFilterRuleParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, RouteFilterRule>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options: RouteFilterRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeFilterName: routeFilterName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeFilterRuleDeserializer(result.body); +} + +/** Gets the specified rule from a route filter. */ +export async function get( + context: Client, + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options: RouteFilterRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, routeFilterName, ruleName, options); + return _getDeserialize(result); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options: RouteFilterRulesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeFilterName: routeFilterName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified rule from a route filter. */ +export function $delete( + context: Client, + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options: RouteFilterRulesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, routeFilterName, ruleName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} diff --git a/sdk/network/arm-network/src/api/routeFilterRules/options.ts b/sdk/network/arm-network/src/api/routeFilterRules/options.ts new file mode 100644 index 000000000000..617c534b0269 --- /dev/null +++ b/sdk/network/arm-network/src/api/routeFilterRules/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface RouteFilterRulesListByRouteFilterOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RouteFilterRulesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface RouteFilterRulesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RouteFilterRulesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/network/arm-network/src/api/routeFilters/index.ts b/sdk/network/arm-network/src/api/routeFilters/index.ts new file mode 100644 index 000000000000..5d302832c48e --- /dev/null +++ b/sdk/network/arm-network/src/api/routeFilters/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + RouteFiltersListOptionalParams, + RouteFiltersListByResourceGroupOptionalParams, + RouteFiltersDeleteOptionalParams, + RouteFiltersUpdateTagsOptionalParams, + RouteFiltersCreateOrUpdateOptionalParams, + RouteFiltersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/routeFilters/operations.ts b/sdk/network/arm-network/src/api/routeFilters/operations.ts new file mode 100644 index 000000000000..9bae2e586f74 --- /dev/null +++ b/sdk/network/arm-network/src/api/routeFilters/operations.ts @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + RouteFilter, + routeFilterSerializer, + routeFilterDeserializer, +} from "../../models/microsoft/network/models.js"; +import { _RouteFilterListResult, _routeFilterListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + RouteFiltersListOptionalParams, + RouteFiltersListByResourceGroupOptionalParams, + RouteFiltersDeleteOptionalParams, + RouteFiltersUpdateTagsOptionalParams, + RouteFiltersCreateOrUpdateOptionalParams, + RouteFiltersGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + options: RouteFiltersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_RouteFilterListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _routeFilterListResultDeserializer(result.body); +} + +/** Gets all route filters in a subscription. */ +export function list( + context: Client, + options: RouteFiltersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: RouteFiltersListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_RouteFilterListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _routeFilterListResultDeserializer(result.body); +} + +/** Gets all route filters in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: RouteFiltersListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + routeFilterName: string, + options: RouteFiltersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeFilterName: routeFilterName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified route filter. */ +export function $delete( + context: Client, + resourceGroupName: string, + routeFilterName: string, + options: RouteFiltersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, routeFilterName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + routeFilterName: string, + parameters: TagsObject, + options: RouteFiltersUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeFilterName: routeFilterName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeFilterDeserializer(result.body); +} + +/** Updates tags of a route filter. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + routeFilterName: string, + parameters: TagsObject, + options: RouteFiltersUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + routeFilterName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + routeFilterName: string, + routeFilterParameters: RouteFilter, + options: RouteFiltersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeFilterName: routeFilterName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: routeFilterSerializer(routeFilterParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeFilterDeserializer(result.body); +} + +/** Creates or updates a route filter in a specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + routeFilterName: string, + routeFilterParameters: RouteFilter, + options: RouteFiltersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, RouteFilter> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + routeFilterName, + routeFilterParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, RouteFilter>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + routeFilterName: string, + options: RouteFiltersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeFilterName: routeFilterName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeFilterDeserializer(result.body); +} + +/** Gets the specified route filter. */ +export async function get( + context: Client, + resourceGroupName: string, + routeFilterName: string, + options: RouteFiltersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, routeFilterName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/routeFilters/options.ts b/sdk/network/arm-network/src/api/routeFilters/options.ts new file mode 100644 index 000000000000..25bd301fc8d1 --- /dev/null +++ b/sdk/network/arm-network/src/api/routeFilters/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface RouteFiltersListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RouteFiltersListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RouteFiltersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface RouteFiltersUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RouteFiltersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface RouteFiltersGetOptionalParams extends OperationOptions { + /** Expands referenced express route bgp peering resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/routeMaps/index.ts b/sdk/network/arm-network/src/api/routeMaps/index.ts new file mode 100644 index 000000000000..e58a5eeb1aa7 --- /dev/null +++ b/sdk/network/arm-network/src/api/routeMaps/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + RouteMapsListOptionalParams, + RouteMapsDeleteOptionalParams, + RouteMapsCreateOrUpdateOptionalParams, + RouteMapsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/routeMaps/operations.ts b/sdk/network/arm-network/src/api/routeMaps/operations.ts new file mode 100644 index 000000000000..787f47aff227 --- /dev/null +++ b/sdk/network/arm-network/src/api/routeMaps/operations.ts @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + RouteMap, + routeMapSerializer, + routeMapDeserializer, + _ListRouteMapsResult, + _listRouteMapsResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + RouteMapsListOptionalParams, + RouteMapsDeleteOptionalParams, + RouteMapsCreateOrUpdateOptionalParams, + RouteMapsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: RouteMapsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListRouteMapsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listRouteMapsResultDeserializer(result.body); +} + +/** Retrieves the details of all RouteMaps. */ +export function list( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: RouteMapsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, virtualHubName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options: RouteMapsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routeMapName: routeMapName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a RouteMap. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options: RouteMapsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualHubName, routeMapName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + routeMapParameters: RouteMap, + options: RouteMapsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routeMapName: routeMapName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: routeMapSerializer(routeMapParameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeMapDeserializer(result.body); +} + +/** Creates a RouteMap if it doesn't exist else updates the existing one. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + routeMapParameters: RouteMap, + options: RouteMapsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, RouteMap> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualHubName, + routeMapName, + routeMapParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, RouteMap>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options: RouteMapsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routeMapName: routeMapName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeMapDeserializer(result.body); +} + +/** Retrieves the details of a RouteMap. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options: RouteMapsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, virtualHubName, routeMapName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/routeMaps/options.ts b/sdk/network/arm-network/src/api/routeMaps/options.ts new file mode 100644 index 000000000000..c447831bc4aa --- /dev/null +++ b/sdk/network/arm-network/src/api/routeMaps/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface RouteMapsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RouteMapsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface RouteMapsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface RouteMapsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/routeTables/index.ts b/sdk/network/arm-network/src/api/routeTables/index.ts new file mode 100644 index 000000000000..8d82cffc4a95 --- /dev/null +++ b/sdk/network/arm-network/src/api/routeTables/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + RouteTablesListAllOptionalParams, + RouteTablesListOptionalParams, + RouteTablesDeleteOptionalParams, + RouteTablesUpdateTagsOptionalParams, + RouteTablesCreateOrUpdateOptionalParams, + RouteTablesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/routeTables/operations.ts b/sdk/network/arm-network/src/api/routeTables/operations.ts new file mode 100644 index 000000000000..139f32e96dc5 --- /dev/null +++ b/sdk/network/arm-network/src/api/routeTables/operations.ts @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + RouteTable, + routeTableSerializer, + routeTableDeserializer, +} from "../../models/common/models.js"; +import { TagsObject, tagsObjectSerializer } from "../../models/microsoft/network/models.js"; +import { _RouteTableListResult, _routeTableListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + RouteTablesListAllOptionalParams, + RouteTablesListOptionalParams, + RouteTablesDeleteOptionalParams, + RouteTablesUpdateTagsOptionalParams, + RouteTablesCreateOrUpdateOptionalParams, + RouteTablesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: RouteTablesListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_RouteTableListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _routeTableListResultDeserializer(result.body); +} + +/** Gets all route tables in a subscription. */ +export function listAll( + context: Client, + options: RouteTablesListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: RouteTablesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_RouteTableListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _routeTableListResultDeserializer(result.body); +} + +/** Gets all route tables in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: RouteTablesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + routeTableName: string, + options: RouteTablesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeTableName: routeTableName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified route table. */ +export function $delete( + context: Client, + resourceGroupName: string, + routeTableName: string, + options: RouteTablesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, routeTableName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + routeTableName: string, + parameters: TagsObject, + options: RouteTablesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeTableName: routeTableName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeTableDeserializer(result.body); +} + +/** Updates a route table tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + routeTableName: string, + parameters: TagsObject, + options: RouteTablesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + routeTableName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + routeTableName: string, + parameters: RouteTable, + options: RouteTablesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeTableName: routeTableName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: routeTableSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeTableDeserializer(result.body); +} + +/** Create or updates a route table in a specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + routeTableName: string, + parameters: RouteTable, + options: RouteTablesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, RouteTable> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, routeTableName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, RouteTable>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + routeTableName: string, + options: RouteTablesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeTableName: routeTableName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeTableDeserializer(result.body); +} + +/** Gets the specified route table. */ +export async function get( + context: Client, + resourceGroupName: string, + routeTableName: string, + options: RouteTablesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, routeTableName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/routeTables/options.ts b/sdk/network/arm-network/src/api/routeTables/options.ts new file mode 100644 index 000000000000..b64d94949ef3 --- /dev/null +++ b/sdk/network/arm-network/src/api/routeTables/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface RouteTablesListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RouteTablesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RouteTablesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface RouteTablesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RouteTablesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface RouteTablesGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/routes/index.ts b/sdk/network/arm-network/src/api/routes/index.ts new file mode 100644 index 000000000000..73238bf792db --- /dev/null +++ b/sdk/network/arm-network/src/api/routes/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + RoutesListOptionalParams, + RoutesDeleteOptionalParams, + RoutesCreateOrUpdateOptionalParams, + RoutesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/routes/operations.ts b/sdk/network/arm-network/src/api/routes/operations.ts new file mode 100644 index 000000000000..525ab61d1439 --- /dev/null +++ b/sdk/network/arm-network/src/api/routes/operations.ts @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + Route, + routeSerializer, + routeDeserializer, +} from "../../models/common/models.js"; +import { _RouteListResult, _routeListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + RoutesListOptionalParams, + RoutesDeleteOptionalParams, + RoutesCreateOrUpdateOptionalParams, + RoutesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + routeTableName: string, + options: RoutesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeTableName: routeTableName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_RouteListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _routeListResultDeserializer(result.body); +} + +/** Gets all routes in a route table. */ +export function list( + context: Client, + resourceGroupName: string, + routeTableName: string, + options: RoutesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, routeTableName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + routeTableName: string, + routeName: string, + options: RoutesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeTableName: routeTableName, + routeName: routeName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified route from a route table. */ +export function $delete( + context: Client, + resourceGroupName: string, + routeTableName: string, + routeName: string, + options: RoutesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, routeTableName, routeName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + routeTableName: string, + routeName: string, + routeParameters: Route, + options: RoutesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeTableName: routeTableName, + routeName: routeName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: routeSerializer(routeParameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeDeserializer(result.body); +} + +/** Creates or updates a route in the specified route table. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + routeTableName: string, + routeName: string, + routeParameters: Route, + options: RoutesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Route> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + routeTableName, + routeName, + routeParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, Route>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + routeTableName: string, + routeName: string, + options: RoutesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + routeTableName: routeTableName, + routeName: routeName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routeDeserializer(result.body); +} + +/** Gets the specified route from a route table. */ +export async function get( + context: Client, + resourceGroupName: string, + routeTableName: string, + routeName: string, + options: RoutesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, routeTableName, routeName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/routes/options.ts b/sdk/network/arm-network/src/api/routes/options.ts new file mode 100644 index 000000000000..f82bda0a63d3 --- /dev/null +++ b/sdk/network/arm-network/src/api/routes/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface RoutesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RoutesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface RoutesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface RoutesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/routingIntent/index.ts b/sdk/network/arm-network/src/api/routingIntent/index.ts new file mode 100644 index 000000000000..b838af6ddb3f --- /dev/null +++ b/sdk/network/arm-network/src/api/routingIntent/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + RoutingIntentListOptionalParams, + RoutingIntentDeleteOptionalParams, + RoutingIntentCreateOrUpdateOptionalParams, + RoutingIntentGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/routingIntent/operations.ts b/sdk/network/arm-network/src/api/routingIntent/operations.ts new file mode 100644 index 000000000000..fe1ca983ccc7 --- /dev/null +++ b/sdk/network/arm-network/src/api/routingIntent/operations.ts @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + RoutingIntent, + routingIntentSerializer, + routingIntentDeserializer, + _ListRoutingIntentResult, + _listRoutingIntentResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + RoutingIntentListOptionalParams, + RoutingIntentDeleteOptionalParams, + RoutingIntentCreateOrUpdateOptionalParams, + RoutingIntentGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: RoutingIntentListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListRoutingIntentResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listRoutingIntentResultDeserializer(result.body); +} + +/** Retrieves the details of all RoutingIntent child resources of the VirtualHub. */ +export function list( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: RoutingIntentListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, virtualHubName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options: RoutingIntentDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routingIntentName: routingIntentName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a RoutingIntent. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options: RoutingIntentDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualHubName, routingIntentName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + routingIntentParameters: RoutingIntent, + options: RoutingIntentCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routingIntentName: routingIntentName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: routingIntentSerializer(routingIntentParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routingIntentDeserializer(result.body); +} + +/** Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + routingIntentParameters: RoutingIntent, + options: RoutingIntentCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, RoutingIntent> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualHubName, + routingIntentName, + routingIntentParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, RoutingIntent>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options: RoutingIntentGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routingIntentName: routingIntentName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routingIntentDeserializer(result.body); +} + +/** Retrieves the details of a RoutingIntent. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options: RoutingIntentGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualHubName, + routingIntentName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/routingIntent/options.ts b/sdk/network/arm-network/src/api/routingIntent/options.ts new file mode 100644 index 000000000000..ed826897329d --- /dev/null +++ b/sdk/network/arm-network/src/api/routingIntent/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface RoutingIntentListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RoutingIntentDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface RoutingIntentCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface RoutingIntentGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/routingRuleCollections/index.ts b/sdk/network/arm-network/src/api/routingRuleCollections/index.ts new file mode 100644 index 000000000000..256b0b3d054e --- /dev/null +++ b/sdk/network/arm-network/src/api/routingRuleCollections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + RoutingRuleCollectionsListOptionalParams, + RoutingRuleCollectionsDeleteOptionalParams, + RoutingRuleCollectionsCreateOrUpdateOptionalParams, + RoutingRuleCollectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/routingRuleCollections/operations.ts b/sdk/network/arm-network/src/api/routingRuleCollections/operations.ts new file mode 100644 index 000000000000..c595d403756f --- /dev/null +++ b/sdk/network/arm-network/src/api/routingRuleCollections/operations.ts @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + RoutingRuleCollection, + routingRuleCollectionSerializer, + routingRuleCollectionDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _RoutingRuleCollectionListResult, + _routingRuleCollectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + RoutingRuleCollectionsListOptionalParams, + RoutingRuleCollectionsDeleteOptionalParams, + RoutingRuleCollectionsCreateOrUpdateOptionalParams, + RoutingRuleCollectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: RoutingRuleCollectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_RoutingRuleCollectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _routingRuleCollectionListResultDeserializer(result.body); +} + +/** Lists all the rule collections in a routing configuration, in a paginated format. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: RoutingRuleCollectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, configurationName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: RoutingRuleCollectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes an routing rule collection. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: RoutingRuleCollectionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleCollection: RoutingRuleCollection, + options: RoutingRuleCollectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: routingRuleCollectionSerializer(ruleCollection), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routingRuleCollectionDeserializer(result.body); +} + +/** Creates or updates a routing rule collection. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleCollection: RoutingRuleCollection, + options: RoutingRuleCollectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleCollection, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: RoutingRuleCollectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routingRuleCollectionDeserializer(result.body); +} + +/** Gets a network manager routing configuration rule collection. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: RoutingRuleCollectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/routingRuleCollections/options.ts b/sdk/network/arm-network/src/api/routingRuleCollections/options.ts new file mode 100644 index 000000000000..7c2cab3764fb --- /dev/null +++ b/sdk/network/arm-network/src/api/routingRuleCollections/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface RoutingRuleCollectionsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface RoutingRuleCollectionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface RoutingRuleCollectionsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RoutingRuleCollectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/routingRules/index.ts b/sdk/network/arm-network/src/api/routingRules/index.ts new file mode 100644 index 000000000000..7b5b72a5ea98 --- /dev/null +++ b/sdk/network/arm-network/src/api/routingRules/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + RoutingRulesListOptionalParams, + RoutingRulesDeleteOptionalParams, + RoutingRulesCreateOrUpdateOptionalParams, + RoutingRulesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/routingRules/operations.ts b/sdk/network/arm-network/src/api/routingRules/operations.ts new file mode 100644 index 000000000000..0c9e39ed47a5 --- /dev/null +++ b/sdk/network/arm-network/src/api/routingRules/operations.ts @@ -0,0 +1,303 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + RoutingRule, + routingRuleSerializer, + routingRuleDeserializer, +} from "../../models/microsoft/network/models.js"; +import { _RoutingRuleListResult, _routingRuleListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + RoutingRulesListOptionalParams, + RoutingRulesDeleteOptionalParams, + RoutingRulesCreateOrUpdateOptionalParams, + RoutingRulesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: RoutingRulesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_RoutingRuleListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _routingRuleListResultDeserializer(result.body); +} + +/** List all network manager routing configuration routing rules. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: RoutingRulesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: RoutingRulesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a routing rule. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: RoutingRulesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + routingRule: RoutingRule, + options: RoutingRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: routingRuleSerializer(routingRule), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routingRuleDeserializer(result.body); +} + +/** Creates or updates an routing rule. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + routingRule: RoutingRule, + options: RoutingRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + routingRule, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: RoutingRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return routingRuleDeserializer(result.body); +} + +/** Gets a network manager routing configuration routing rule. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: RoutingRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/routingRules/options.ts b/sdk/network/arm-network/src/api/routingRules/options.ts new file mode 100644 index 000000000000..fa39fede53ba --- /dev/null +++ b/sdk/network/arm-network/src/api/routingRules/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface RoutingRulesListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface RoutingRulesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface RoutingRulesCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RoutingRulesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/scopeConnections/index.ts b/sdk/network/arm-network/src/api/scopeConnections/index.ts new file mode 100644 index 000000000000..e7968806eae4 --- /dev/null +++ b/sdk/network/arm-network/src/api/scopeConnections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ScopeConnectionsListOptionalParams, + ScopeConnectionsDeleteOptionalParams, + ScopeConnectionsCreateOrUpdateOptionalParams, + ScopeConnectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/scopeConnections/operations.ts b/sdk/network/arm-network/src/api/scopeConnections/operations.ts new file mode 100644 index 000000000000..258ed9feeca0 --- /dev/null +++ b/sdk/network/arm-network/src/api/scopeConnections/operations.ts @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ScopeConnection, + scopeConnectionSerializer, + scopeConnectionDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _ScopeConnectionListResult, + _scopeConnectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ScopeConnectionsListOptionalParams, + ScopeConnectionsDeleteOptionalParams, + ScopeConnectionsCreateOrUpdateOptionalParams, + ScopeConnectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: ScopeConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ScopeConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _scopeConnectionListResultDeserializer(result.body); +} + +/** List all scope connections created by this network manager. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: ScopeConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + options: ScopeConnectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + scopeConnectionName: scopeConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete the pending scope connection created by this network manager. */ +export async function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + options: ScopeConnectionsDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + networkManagerName, + scopeConnectionName, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + parameters: ScopeConnection, + options: ScopeConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + scopeConnectionName: scopeConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: scopeConnectionSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return scopeConnectionDeserializer(result.body); +} + +/** Creates or updates scope connection from Network Manager */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + parameters: ScopeConnection, + options: ScopeConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + scopeConnectionName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + options: ScopeConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + scopeConnectionName: scopeConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return scopeConnectionDeserializer(result.body); +} + +/** Get specified scope connection created by this Network Manager. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + options: ScopeConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + scopeConnectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/scopeConnections/options.ts b/sdk/network/arm-network/src/api/scopeConnections/options.ts new file mode 100644 index 000000000000..3c3e9a0f597f --- /dev/null +++ b/sdk/network/arm-network/src/api/scopeConnections/options.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ScopeConnectionsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ScopeConnectionsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ScopeConnectionsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ScopeConnectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/securityAdminConfigurations/index.ts b/sdk/network/arm-network/src/api/securityAdminConfigurations/index.ts new file mode 100644 index 000000000000..62001a4c0103 --- /dev/null +++ b/sdk/network/arm-network/src/api/securityAdminConfigurations/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + SecurityAdminConfigurationsListOptionalParams, + SecurityAdminConfigurationsDeleteOptionalParams, + SecurityAdminConfigurationsCreateOrUpdateOptionalParams, + SecurityAdminConfigurationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/securityAdminConfigurations/operations.ts b/sdk/network/arm-network/src/api/securityAdminConfigurations/operations.ts new file mode 100644 index 000000000000..746ec9a503ea --- /dev/null +++ b/sdk/network/arm-network/src/api/securityAdminConfigurations/operations.ts @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + commonErrorResponseDeserializer, + SecurityAdminConfiguration, + securityAdminConfigurationSerializer, + securityAdminConfigurationDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _SecurityAdminConfigurationListResult, + _securityAdminConfigurationListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + SecurityAdminConfigurationsListOptionalParams, + SecurityAdminConfigurationsDeleteOptionalParams, + SecurityAdminConfigurationsCreateOrUpdateOptionalParams, + SecurityAdminConfigurationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: SecurityAdminConfigurationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SecurityAdminConfigurationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return _securityAdminConfigurationListResultDeserializer(result.body); +} + +/** Lists all the network manager security admin configurations in a network manager, in a paginated format. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: SecurityAdminConfigurationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: SecurityAdminConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a network manager security admin configuration. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: SecurityAdminConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkManagerName, configurationName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + securityAdminConfiguration: SecurityAdminConfiguration, + options: SecurityAdminConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: securityAdminConfigurationSerializer(securityAdminConfiguration), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return securityAdminConfigurationDeserializer(result.body); +} + +/** Creates or updates a network manager security admin configuration. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + securityAdminConfiguration: SecurityAdminConfiguration, + options: SecurityAdminConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + securityAdminConfiguration, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: SecurityAdminConfigurationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return securityAdminConfigurationDeserializer(result.body); +} + +/** Retrieves a network manager security admin configuration. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: SecurityAdminConfigurationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/securityAdminConfigurations/options.ts b/sdk/network/arm-network/src/api/securityAdminConfigurations/options.ts new file mode 100644 index 000000000000..675ea24f1b4d --- /dev/null +++ b/sdk/network/arm-network/src/api/securityAdminConfigurations/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SecurityAdminConfigurationsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface SecurityAdminConfigurationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface SecurityAdminConfigurationsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SecurityAdminConfigurationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/securityPartnerProviders/index.ts b/sdk/network/arm-network/src/api/securityPartnerProviders/index.ts new file mode 100644 index 000000000000..f106daa0d07f --- /dev/null +++ b/sdk/network/arm-network/src/api/securityPartnerProviders/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + SecurityPartnerProvidersListOptionalParams, + SecurityPartnerProvidersListByResourceGroupOptionalParams, + SecurityPartnerProvidersDeleteOptionalParams, + SecurityPartnerProvidersUpdateTagsOptionalParams, + SecurityPartnerProvidersCreateOrUpdateOptionalParams, + SecurityPartnerProvidersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/securityPartnerProviders/operations.ts b/sdk/network/arm-network/src/api/securityPartnerProviders/operations.ts new file mode 100644 index 000000000000..335955aa8a81 --- /dev/null +++ b/sdk/network/arm-network/src/api/securityPartnerProviders/operations.ts @@ -0,0 +1,359 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + SecurityPartnerProvider, + securityPartnerProviderSerializer, + securityPartnerProviderDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _SecurityPartnerProviderListResult, + _securityPartnerProviderListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + SecurityPartnerProvidersListOptionalParams, + SecurityPartnerProvidersListByResourceGroupOptionalParams, + SecurityPartnerProvidersDeleteOptionalParams, + SecurityPartnerProvidersUpdateTagsOptionalParams, + SecurityPartnerProvidersCreateOrUpdateOptionalParams, + SecurityPartnerProvidersGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + options: SecurityPartnerProvidersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/securityPartnerProviders{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SecurityPartnerProviderListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _securityPartnerProviderListResultDeserializer(result.body); +} + +/** Gets all the Security Partner Providers in a subscription. */ +export function list( + context: Client, + options: SecurityPartnerProvidersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: SecurityPartnerProvidersListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_SecurityPartnerProviderListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _securityPartnerProviderListResultDeserializer(result.body); +} + +/** Lists all Security Partner Providers in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: SecurityPartnerProvidersListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + securityPartnerProviderName: string, + options: SecurityPartnerProvidersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + securityPartnerProviderName: securityPartnerProviderName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Security Partner Provider. */ +export function $delete( + context: Client, + resourceGroupName: string, + securityPartnerProviderName: string, + options: SecurityPartnerProvidersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, securityPartnerProviderName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: TagsObject, + options: SecurityPartnerProvidersUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + securityPartnerProviderName: securityPartnerProviderName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityPartnerProviderDeserializer(result.body); +} + +/** Updates tags of a Security Partner Provider resource. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: TagsObject, + options: SecurityPartnerProvidersUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + securityPartnerProviderName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: SecurityPartnerProvider, + options: SecurityPartnerProvidersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + securityPartnerProviderName: securityPartnerProviderName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: securityPartnerProviderSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityPartnerProviderDeserializer(result.body); +} + +/** Creates or updates the specified Security Partner Provider. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: SecurityPartnerProvider, + options: SecurityPartnerProvidersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, SecurityPartnerProvider> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + securityPartnerProviderName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, SecurityPartnerProvider>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + securityPartnerProviderName: string, + options: SecurityPartnerProvidersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + securityPartnerProviderName: securityPartnerProviderName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityPartnerProviderDeserializer(result.body); +} + +/** Gets the specified Security Partner Provider. */ +export async function get( + context: Client, + resourceGroupName: string, + securityPartnerProviderName: string, + options: SecurityPartnerProvidersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, securityPartnerProviderName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/securityPartnerProviders/options.ts b/sdk/network/arm-network/src/api/securityPartnerProviders/options.ts new file mode 100644 index 000000000000..a92405294e14 --- /dev/null +++ b/sdk/network/arm-network/src/api/securityPartnerProviders/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SecurityPartnerProvidersListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SecurityPartnerProvidersListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SecurityPartnerProvidersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SecurityPartnerProvidersUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SecurityPartnerProvidersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SecurityPartnerProvidersGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/securityRules/index.ts b/sdk/network/arm-network/src/api/securityRules/index.ts new file mode 100644 index 000000000000..297b2e440e0a --- /dev/null +++ b/sdk/network/arm-network/src/api/securityRules/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + SecurityRulesListOptionalParams, + SecurityRulesDeleteOptionalParams, + SecurityRulesCreateOrUpdateOptionalParams, + SecurityRulesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/securityRules/operations.ts b/sdk/network/arm-network/src/api/securityRules/operations.ts new file mode 100644 index 000000000000..982d5300dbff --- /dev/null +++ b/sdk/network/arm-network/src/api/securityRules/operations.ts @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + SecurityRule, + securityRuleSerializer, + securityRuleDeserializer, +} from "../../models/common/models.js"; +import { + _SecurityRuleListResult, + _securityRuleListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + SecurityRulesListOptionalParams, + SecurityRulesDeleteOptionalParams, + SecurityRulesCreateOrUpdateOptionalParams, + SecurityRulesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + options: SecurityRulesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityGroupName: networkSecurityGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SecurityRuleListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _securityRuleListResultDeserializer(result.body); +} + +/** Gets all security rules in a network security group. */ +export function list( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + options: SecurityRulesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkSecurityGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options: SecurityRulesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityGroupName: networkSecurityGroupName, + securityRuleName: securityRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified network security rule. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options: SecurityRulesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkSecurityGroupName, securityRuleName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + securityRuleParameters: SecurityRule, + options: SecurityRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityGroupName: networkSecurityGroupName, + securityRuleName: securityRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: securityRuleSerializer(securityRuleParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityRuleDeserializer(result.body); +} + +/** Creates or updates a security rule in the specified network security group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + securityRuleParameters: SecurityRule, + options: SecurityRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, SecurityRule> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + networkSecurityGroupName, + securityRuleName, + securityRuleParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, SecurityRule>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options: SecurityRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkSecurityGroupName: networkSecurityGroupName, + securityRuleName: securityRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityRuleDeserializer(result.body); +} + +/** Get the specified network security rule. */ +export async function get( + context: Client, + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options: SecurityRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkSecurityGroupName, + securityRuleName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/securityRules/options.ts b/sdk/network/arm-network/src/api/securityRules/options.ts new file mode 100644 index 000000000000..6a55460ba385 --- /dev/null +++ b/sdk/network/arm-network/src/api/securityRules/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SecurityRulesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SecurityRulesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SecurityRulesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SecurityRulesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/securityUserConfigurations/index.ts b/sdk/network/arm-network/src/api/securityUserConfigurations/index.ts new file mode 100644 index 000000000000..d20bda3cea97 --- /dev/null +++ b/sdk/network/arm-network/src/api/securityUserConfigurations/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + SecurityUserConfigurationsListOptionalParams, + SecurityUserConfigurationsDeleteOptionalParams, + SecurityUserConfigurationsCreateOrUpdateOptionalParams, + SecurityUserConfigurationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/securityUserConfigurations/operations.ts b/sdk/network/arm-network/src/api/securityUserConfigurations/operations.ts new file mode 100644 index 000000000000..ae19ebb5bd03 --- /dev/null +++ b/sdk/network/arm-network/src/api/securityUserConfigurations/operations.ts @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + SecurityUserConfiguration, + securityUserConfigurationSerializer, + securityUserConfigurationDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _SecurityUserConfigurationListResult, + _securityUserConfigurationListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + SecurityUserConfigurationsListOptionalParams, + SecurityUserConfigurationsDeleteOptionalParams, + SecurityUserConfigurationsCreateOrUpdateOptionalParams, + SecurityUserConfigurationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: SecurityUserConfigurationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SecurityUserConfigurationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _securityUserConfigurationListResultDeserializer(result.body); +} + +/** Lists all the network manager security user configurations in a network manager, in a paginated format. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: SecurityUserConfigurationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: SecurityUserConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a network manager security user configuration. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: SecurityUserConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkManagerName, configurationName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + securityUserConfiguration: SecurityUserConfiguration, + options: SecurityUserConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: securityUserConfigurationSerializer(securityUserConfiguration), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityUserConfigurationDeserializer(result.body); +} + +/** Creates or updates a network manager security user configuration. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + securityUserConfiguration: SecurityUserConfiguration, + options: SecurityUserConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + securityUserConfiguration, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: SecurityUserConfigurationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityUserConfigurationDeserializer(result.body); +} + +/** Retrieves a network manager security user configuration. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: SecurityUserConfigurationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/securityUserConfigurations/options.ts b/sdk/network/arm-network/src/api/securityUserConfigurations/options.ts new file mode 100644 index 000000000000..20ad01edecd1 --- /dev/null +++ b/sdk/network/arm-network/src/api/securityUserConfigurations/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SecurityUserConfigurationsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface SecurityUserConfigurationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface SecurityUserConfigurationsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SecurityUserConfigurationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/securityUserRuleCollections/index.ts b/sdk/network/arm-network/src/api/securityUserRuleCollections/index.ts new file mode 100644 index 000000000000..745d4483d0df --- /dev/null +++ b/sdk/network/arm-network/src/api/securityUserRuleCollections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + SecurityUserRuleCollectionsListOptionalParams, + SecurityUserRuleCollectionsDeleteOptionalParams, + SecurityUserRuleCollectionsCreateOrUpdateOptionalParams, + SecurityUserRuleCollectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/securityUserRuleCollections/operations.ts b/sdk/network/arm-network/src/api/securityUserRuleCollections/operations.ts new file mode 100644 index 000000000000..10b47fae12be --- /dev/null +++ b/sdk/network/arm-network/src/api/securityUserRuleCollections/operations.ts @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + SecurityUserRuleCollection, + securityUserRuleCollectionSerializer, + securityUserRuleCollectionDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _SecurityUserRuleCollectionListResult, + _securityUserRuleCollectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + SecurityUserRuleCollectionsListOptionalParams, + SecurityUserRuleCollectionsDeleteOptionalParams, + SecurityUserRuleCollectionsCreateOrUpdateOptionalParams, + SecurityUserRuleCollectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: SecurityUserRuleCollectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SecurityUserRuleCollectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _securityUserRuleCollectionListResultDeserializer(result.body); +} + +/** Lists all the security user rule collections in a security configuration, in a paginated format. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options: SecurityUserRuleCollectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, configurationName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: SecurityUserRuleCollectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a Security User Rule collection. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: SecurityUserRuleCollectionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + securityUserRuleCollection: SecurityUserRuleCollection, + options: SecurityUserRuleCollectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: securityUserRuleCollectionSerializer(securityUserRuleCollection), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityUserRuleCollectionDeserializer(result.body); +} + +/** Creates or updates a security user rule collection. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + securityUserRuleCollection: SecurityUserRuleCollection, + options: SecurityUserRuleCollectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + securityUserRuleCollection, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: SecurityUserRuleCollectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityUserRuleCollectionDeserializer(result.body); +} + +/** Gets a network manager security user configuration rule collection. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: SecurityUserRuleCollectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/securityUserRuleCollections/options.ts b/sdk/network/arm-network/src/api/securityUserRuleCollections/options.ts new file mode 100644 index 000000000000..9e99d23431ee --- /dev/null +++ b/sdk/network/arm-network/src/api/securityUserRuleCollections/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SecurityUserRuleCollectionsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface SecurityUserRuleCollectionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface SecurityUserRuleCollectionsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SecurityUserRuleCollectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/securityUserRules/index.ts b/sdk/network/arm-network/src/api/securityUserRules/index.ts new file mode 100644 index 000000000000..fc650bed7d6c --- /dev/null +++ b/sdk/network/arm-network/src/api/securityUserRules/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + SecurityUserRulesListOptionalParams, + SecurityUserRulesDeleteOptionalParams, + SecurityUserRulesCreateOrUpdateOptionalParams, + SecurityUserRulesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/securityUserRules/operations.ts b/sdk/network/arm-network/src/api/securityUserRules/operations.ts new file mode 100644 index 000000000000..960cdcdaab05 --- /dev/null +++ b/sdk/network/arm-network/src/api/securityUserRules/operations.ts @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + SecurityUserRule, + securityUserRuleSerializer, + securityUserRuleDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _SecurityUserRuleListResult, + _securityUserRuleListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + SecurityUserRulesListOptionalParams, + SecurityUserRulesDeleteOptionalParams, + SecurityUserRulesCreateOrUpdateOptionalParams, + SecurityUserRulesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: SecurityUserRulesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SecurityUserRuleListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _securityUserRuleListResultDeserializer(result.body); +} + +/** Lists all Security User Rules in a rule collection. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options: SecurityUserRulesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: SecurityUserRulesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a security user rule. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: SecurityUserRulesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + securityUserRule: SecurityUserRule, + options: SecurityUserRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: securityUserRuleSerializer(securityUserRule), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityUserRuleDeserializer(result.body); +} + +/** Creates or updates a security user rule. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + securityUserRule: SecurityUserRule, + options: SecurityUserRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + securityUserRule, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: SecurityUserRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + configurationName: configurationName, + ruleCollectionName: ruleCollectionName, + ruleName: ruleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return securityUserRuleDeserializer(result.body); +} + +/** Gets a security user rule. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options: SecurityUserRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/securityUserRules/options.ts b/sdk/network/arm-network/src/api/securityUserRules/options.ts new file mode 100644 index 000000000000..b39f41e86644 --- /dev/null +++ b/sdk/network/arm-network/src/api/securityUserRules/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SecurityUserRulesListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface SecurityUserRulesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface SecurityUserRulesCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SecurityUserRulesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/serviceAssociationLinks/index.ts b/sdk/network/arm-network/src/api/serviceAssociationLinks/index.ts new file mode 100644 index 000000000000..f3e81588eeb5 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceAssociationLinks/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ServiceAssociationLinksListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/serviceAssociationLinks/operations.ts b/sdk/network/arm-network/src/api/serviceAssociationLinks/operations.ts new file mode 100644 index 000000000000..9417acb60167 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceAssociationLinks/operations.ts @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ServiceAssociationLinksListResult, + serviceAssociationLinksListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ServiceAssociationLinksListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options: ServiceAssociationLinksListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/serviceAssociationLinks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + subnetName: subnetName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return serviceAssociationLinksListResultDeserializer(result.body); +} + +/** Gets a list of service association links for a subnet. */ +export async function list( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options: ServiceAssociationLinksListOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSend( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + options, + ); + return _listDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/serviceAssociationLinks/options.ts b/sdk/network/arm-network/src/api/serviceAssociationLinks/options.ts new file mode 100644 index 000000000000..62141bb9a37b --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceAssociationLinks/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ServiceAssociationLinksListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/serviceEndpointPolicies/index.ts b/sdk/network/arm-network/src/api/serviceEndpointPolicies/index.ts new file mode 100644 index 000000000000..2b37a0eef509 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceEndpointPolicies/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + ServiceEndpointPoliciesListOptionalParams, + ServiceEndpointPoliciesListByResourceGroupOptionalParams, + ServiceEndpointPoliciesDeleteOptionalParams, + ServiceEndpointPoliciesUpdateTagsOptionalParams, + ServiceEndpointPoliciesCreateOrUpdateOptionalParams, + ServiceEndpointPoliciesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/serviceEndpointPolicies/operations.ts b/sdk/network/arm-network/src/api/serviceEndpointPolicies/operations.ts new file mode 100644 index 000000000000..98bf91ad8579 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceEndpointPolicies/operations.ts @@ -0,0 +1,359 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + ServiceEndpointPolicy, + serviceEndpointPolicySerializer, + serviceEndpointPolicyDeserializer, +} from "../../models/common/models.js"; +import { TagsObject, tagsObjectSerializer } from "../../models/microsoft/network/models.js"; +import { + _ServiceEndpointPolicyListResult, + _serviceEndpointPolicyListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ServiceEndpointPoliciesListOptionalParams, + ServiceEndpointPoliciesListByResourceGroupOptionalParams, + ServiceEndpointPoliciesDeleteOptionalParams, + ServiceEndpointPoliciesUpdateTagsOptionalParams, + ServiceEndpointPoliciesCreateOrUpdateOptionalParams, + ServiceEndpointPoliciesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + options: ServiceEndpointPoliciesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/serviceEndpointPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ServiceEndpointPolicyListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _serviceEndpointPolicyListResultDeserializer(result.body); +} + +/** Gets all the service endpoint policies in a subscription. */ +export function list( + context: Client, + options: ServiceEndpointPoliciesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: ServiceEndpointPoliciesListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ServiceEndpointPolicyListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _serviceEndpointPolicyListResultDeserializer(result.body); +} + +/** Gets all service endpoint Policies in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: ServiceEndpointPoliciesListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + options: ServiceEndpointPoliciesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceEndpointPolicyName: serviceEndpointPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified service endpoint policy. */ +export function $delete( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + options: ServiceEndpointPoliciesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, serviceEndpointPolicyName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: TagsObject, + options: ServiceEndpointPoliciesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceEndpointPolicyName: serviceEndpointPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return serviceEndpointPolicyDeserializer(result.body); +} + +/** Updates tags of a service endpoint policy. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: TagsObject, + options: ServiceEndpointPoliciesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + serviceEndpointPolicyName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: ServiceEndpointPolicy, + options: ServiceEndpointPoliciesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceEndpointPolicyName: serviceEndpointPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: serviceEndpointPolicySerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return serviceEndpointPolicyDeserializer(result.body); +} + +/** Creates or updates a service Endpoint Policies. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: ServiceEndpointPolicy, + options: ServiceEndpointPoliciesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ServiceEndpointPolicy> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + serviceEndpointPolicyName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ServiceEndpointPolicy>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + options: ServiceEndpointPoliciesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceEndpointPolicyName: serviceEndpointPolicyName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return serviceEndpointPolicyDeserializer(result.body); +} + +/** Gets the specified service Endpoint Policies in a specified resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + options: ServiceEndpointPoliciesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceEndpointPolicyName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/serviceEndpointPolicies/options.ts b/sdk/network/arm-network/src/api/serviceEndpointPolicies/options.ts new file mode 100644 index 000000000000..4f1669117054 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceEndpointPolicies/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ServiceEndpointPoliciesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServiceEndpointPoliciesListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServiceEndpointPoliciesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ServiceEndpointPoliciesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServiceEndpointPoliciesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ServiceEndpointPoliciesGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/index.ts b/sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/index.ts new file mode 100644 index 000000000000..1512348cfecb --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByResourceGroup, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, + ServiceEndpointPolicyDefinitionsDeleteOptionalParams, + ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, + ServiceEndpointPolicyDefinitionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/operations.ts b/sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/operations.ts new file mode 100644 index 000000000000..b8f5eef60ef2 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/operations.ts @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + ServiceEndpointPolicyDefinition, + serviceEndpointPolicyDefinitionSerializer, + serviceEndpointPolicyDefinitionDeserializer, +} from "../../models/common/models.js"; +import { + _ServiceEndpointPolicyDefinitionListResult, + _serviceEndpointPolicyDefinitionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, + ServiceEndpointPolicyDefinitionsDeleteOptionalParams, + ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, + ServiceEndpointPolicyDefinitionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + options: ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceEndpointPolicyName: serviceEndpointPolicyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ServiceEndpointPolicyDefinitionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _serviceEndpointPolicyDefinitionListResultDeserializer(result.body); +} + +/** Gets all service endpoint policy definitions in a service end point policy. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + options: ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, serviceEndpointPolicyName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options: ServiceEndpointPolicyDefinitionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceEndpointPolicyName: serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName: serviceEndpointPolicyDefinitionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified ServiceEndpoint policy definitions. */ +export function $delete( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options: ServiceEndpointPolicyDefinitionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, + options: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceEndpointPolicyName: serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName: serviceEndpointPolicyDefinitionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: serviceEndpointPolicyDefinitionSerializer(serviceEndpointPolicyDefinitions), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return serviceEndpointPolicyDefinitionDeserializer(result.body); +} + +/** Creates or updates a service endpoint policy definition in the specified service endpoint policy. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, + options: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ServiceEndpointPolicyDefinition> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName, + serviceEndpointPolicyDefinitions, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + ServiceEndpointPolicyDefinition + >; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options: ServiceEndpointPolicyDefinitionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceEndpointPolicyName: serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName: serviceEndpointPolicyDefinitionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return serviceEndpointPolicyDefinitionDeserializer(result.body); +} + +/** Get a ServiceEndpointPolicyDefinition */ +export async function get( + context: Client, + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options: ServiceEndpointPolicyDefinitionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/options.ts b/sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/options.ts new file mode 100644 index 000000000000..ec9419ffbf8a --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceEndpointPolicyDefinitions/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServiceEndpointPolicyDefinitionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ServiceEndpointPolicyDefinitionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/serviceGateways/index.ts b/sdk/network/arm-network/src/api/serviceGateways/index.ts new file mode 100644 index 000000000000..7299ddaecd79 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceGateways/index.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listServices, + listAddressLocations, + updateServices, + updateAddressLocations, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + ServiceGatewaysListServicesOptionalParams, + ServiceGatewaysListAddressLocationsOptionalParams, + ServiceGatewaysUpdateServicesOptionalParams, + ServiceGatewaysUpdateAddressLocationsOptionalParams, + ServiceGatewaysListAllOptionalParams, + ServiceGatewaysListOptionalParams, + ServiceGatewaysDeleteOptionalParams, + ServiceGatewaysUpdateTagsOptionalParams, + ServiceGatewaysCreateOrUpdateOptionalParams, + ServiceGatewaysGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/serviceGateways/operations.ts b/sdk/network/arm-network/src/api/serviceGateways/operations.ts new file mode 100644 index 000000000000..22f419d8da41 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceGateways/operations.ts @@ -0,0 +1,615 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + ServiceGateway, + serviceGatewaySerializer, + serviceGatewayDeserializer, + ServiceGatewayUpdateAddressLocationsRequest, + serviceGatewayUpdateAddressLocationsRequestSerializer, + ServiceGatewayUpdateServicesRequest, + serviceGatewayUpdateServicesRequestSerializer, + ServiceGatewayService, + _GetServiceGatewayAddressLocationsResult, + _getServiceGatewayAddressLocationsResultDeserializer, + ServiceGatewayAddressLocationResponse, + _GetServiceGatewayServicesResult, + _getServiceGatewayServicesResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _ServiceGatewayListResult, + _serviceGatewayListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ServiceGatewaysListServicesOptionalParams, + ServiceGatewaysListAddressLocationsOptionalParams, + ServiceGatewaysUpdateServicesOptionalParams, + ServiceGatewaysUpdateAddressLocationsOptionalParams, + ServiceGatewaysListAllOptionalParams, + ServiceGatewaysListOptionalParams, + ServiceGatewaysDeleteOptionalParams, + ServiceGatewaysUpdateTagsOptionalParams, + ServiceGatewaysCreateOrUpdateOptionalParams, + ServiceGatewaysGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listServicesSend( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + options: ServiceGatewaysListServicesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}/services{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceGatewayName: serviceGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listServicesDeserialize( + result: PathUncheckedResponse, +): Promise<_GetServiceGatewayServicesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _getServiceGatewayServicesResultDeserializer(result.body); +} + +/** Get Services in service gateway. */ +export function listServices( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + options: ServiceGatewaysListServicesOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listServicesSend(context, resourceGroupName, serviceGatewayName, options), + _listServicesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listAddressLocationsSend( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + options: ServiceGatewaysListAddressLocationsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}/addressLocations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceGatewayName: serviceGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAddressLocationsDeserialize( + result: PathUncheckedResponse, +): Promise<_GetServiceGatewayAddressLocationsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _getServiceGatewayAddressLocationsResultDeserializer(result.body); +} + +/** Get address locations in service gateway. */ +export function listAddressLocations( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + options: ServiceGatewaysListAddressLocationsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAddressLocationsSend(context, resourceGroupName, serviceGatewayName, options), + _listAddressLocationsDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _updateServicesSend( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateServicesRequest, + options: ServiceGatewaysUpdateServicesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}/updateServices{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceGatewayName: serviceGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: serviceGatewayUpdateServicesRequestSerializer(parameters), + }); +} + +export async function _updateServicesDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** + * Creates, updates, or deletes services within the service gateway. + * The request supports both full and partial update modes at the service level. + * + * Full update replaces all existing services with the new list provided in the request. + * Partial update modifies only the specified services. + */ +export function updateServices( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateServicesRequest, + options: ServiceGatewaysUpdateServicesOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _updateServicesDeserialize, ["202", "204", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateServicesSend(context, resourceGroupName, serviceGatewayName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateAddressLocationsSend( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateAddressLocationsRequest, + options: ServiceGatewaysUpdateAddressLocationsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}/updateAddressLocations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceGatewayName: serviceGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: serviceGatewayUpdateAddressLocationsRequestSerializer(parameters), + }); +} + +export async function _updateAddressLocationsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** + * Creates or updates address locations within the service gateway. + * + * The request supports both full and partial update modes at two levels: location and address. + * + * Full update replaces all existing data. + * + * Partial update modifies only the specified entries: + * + * For location-level partial updates, if no address is provided, the existing address will be deleted. + * + * For address-level partial updates, if no services are provided, the existing services will be considered for deletion. + */ +export function updateAddressLocations( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateAddressLocationsRequest, + options: ServiceGatewaysUpdateAddressLocationsOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _updateAddressLocationsDeserialize, + ["202", "204", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateAddressLocationsSend( + context, + resourceGroupName, + serviceGatewayName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, void>; +} + +export function _listAllSend( + context: Client, + options: ServiceGatewaysListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/serviceGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_ServiceGatewayListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _serviceGatewayListResultDeserializer(result.body); +} + +/** Gets all the service gateways in a subscription. */ +export function listAll( + context: Client, + options: ServiceGatewaysListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: ServiceGatewaysListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ServiceGatewayListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _serviceGatewayListResultDeserializer(result.body); +} + +/** Gets all the service gateways in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: ServiceGatewaysListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + options: ServiceGatewaysDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceGatewayName: serviceGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified service gateway. */ +export function $delete( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + options: ServiceGatewaysDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, serviceGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + parameters: TagsObject, + options: ServiceGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceGatewayName: serviceGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return serviceGatewayDeserializer(result.body); +} + +/** Updates a service gateway tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + parameters: TagsObject, + options: ServiceGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + serviceGatewayName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGateway, + options: ServiceGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceGatewayName: serviceGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: serviceGatewaySerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return serviceGatewayDeserializer(result.body); +} + +/** Creates or updates a service gateway. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGateway, + options: ServiceGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ServiceGateway> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, serviceGatewayName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ServiceGateway>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + options: ServiceGatewaysGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceGatewayName: serviceGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return serviceGatewayDeserializer(result.body); +} + +/** Gets the specified service gateway. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceGatewayName: string, + options: ServiceGatewaysGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceGatewayName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/serviceGateways/options.ts b/sdk/network/arm-network/src/api/serviceGateways/options.ts new file mode 100644 index 000000000000..8e6e499b2325 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceGateways/options.ts @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ServiceGatewaysListServicesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServiceGatewaysListAddressLocationsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServiceGatewaysUpdateServicesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ServiceGatewaysUpdateAddressLocationsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ServiceGatewaysListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServiceGatewaysListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServiceGatewaysDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ServiceGatewaysUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServiceGatewaysCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ServiceGatewaysGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/serviceTagInformation/index.ts b/sdk/network/arm-network/src/api/serviceTagInformation/index.ts new file mode 100644 index 000000000000..9bd3f7127817 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceTagInformation/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ServiceTagInformationListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/serviceTagInformation/operations.ts b/sdk/network/arm-network/src/api/serviceTagInformation/operations.ts new file mode 100644 index 000000000000..b98d5478f3d7 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceTagInformation/operations.ts @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ServiceTagInformation, + _ServiceTagInformationListResult, + _serviceTagInformationListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ServiceTagInformationListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + location: string, + options: ServiceTagInformationListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTagDetails{?api%2Dversion,noAddressPrefixes,tagName}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + noAddressPrefixes: options?.noAddressPrefixes, + tagName: options?.tagName, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ServiceTagInformationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _serviceTagInformationListResultDeserializer(result.body); +} + +/** Gets a list of service tag information resources with pagination. */ +export function list( + context: Client, + location: string, + options: ServiceTagInformationListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, location, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/serviceTagInformation/options.ts b/sdk/network/arm-network/src/api/serviceTagInformation/options.ts new file mode 100644 index 000000000000..487ce6b1dde8 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceTagInformation/options.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ServiceTagInformationListOptionalParams extends OperationOptions { + /** Do not return address prefixes for the tag(s). */ + noAddressPrefixes?: boolean; + /** Return tag information for a particular tag. */ + tagName?: string; +} diff --git a/sdk/network/arm-network/src/api/serviceTags/index.ts b/sdk/network/arm-network/src/api/serviceTags/index.ts new file mode 100644 index 000000000000..1dc6ffd80742 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceTags/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ServiceTagsListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/serviceTags/operations.ts b/sdk/network/arm-network/src/api/serviceTags/operations.ts new file mode 100644 index 000000000000..48a280081a51 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceTags/operations.ts @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + ServiceTagsListResult, + serviceTagsListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ServiceTagsListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + location: string, + options: ServiceTagsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return serviceTagsListResultDeserializer(result.body); +} + +/** Gets a list of service tag information resources. */ +export async function list( + context: Client, + location: string, + options: ServiceTagsListOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSend(context, location, options); + return _listDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/serviceTags/options.ts b/sdk/network/arm-network/src/api/serviceTags/options.ts new file mode 100644 index 000000000000..16a77fe058d7 --- /dev/null +++ b/sdk/network/arm-network/src/api/serviceTags/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ServiceTagsListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/staticCidrs/index.ts b/sdk/network/arm-network/src/api/staticCidrs/index.ts new file mode 100644 index 000000000000..bd55ae2bb56f --- /dev/null +++ b/sdk/network/arm-network/src/api/staticCidrs/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, create, get } from "./operations.js"; +export type { + StaticCidrsListOptionalParams, + StaticCidrsDeleteOptionalParams, + StaticCidrsCreateOptionalParams, + StaticCidrsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/staticCidrs/operations.ts b/sdk/network/arm-network/src/api/staticCidrs/operations.ts new file mode 100644 index 000000000000..3cc615ffd997 --- /dev/null +++ b/sdk/network/arm-network/src/api/staticCidrs/operations.ts @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + commonErrorResponseDeserializer, + StaticCidr, + staticCidrSerializer, + staticCidrDeserializer, + _StaticCidrList, + _staticCidrListDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StaticCidrsListOptionalParams, + StaticCidrsDeleteOptionalParams, + StaticCidrsCreateOptionalParams, + StaticCidrsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: StaticCidrsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs{?api%2Dversion,skipToken,skip,top,sortKey,sortValue}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + poolName: poolName, + "api%2Dversion": "2025-07-01", + skipToken: options?.skipToken, + skip: options?.skip, + top: options?.top, + sortKey: options?.sortKey, + sortValue: options?.sortValue, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_StaticCidrList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return _staticCidrListDeserializer(result.body); +} + +/** Gets list of Static CIDR resources at Network Manager level. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options: StaticCidrsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, poolName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options: StaticCidrsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + poolName: poolName, + staticCidrName: staticCidrName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete the Static CIDR resource. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options: StaticCidrsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options: StaticCidrsCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + poolName: poolName, + staticCidrName: staticCidrName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.body ? options?.body : staticCidrSerializer(options?.body), + }); +} + +export async function _createDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return staticCidrDeserializer(result.body); +} + +/** Creates/Updates the Static CIDR resource. */ +export async function create( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options: StaticCidrsCreateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createSend( + context, + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + options, + ); + return _createDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options: StaticCidrsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + poolName: poolName, + staticCidrName: staticCidrName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return staticCidrDeserializer(result.body); +} + +/** Gets the specific Static CIDR resource. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options: StaticCidrsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/staticCidrs/options.ts b/sdk/network/arm-network/src/api/staticCidrs/options.ts new file mode 100644 index 000000000000..c5517c82706b --- /dev/null +++ b/sdk/network/arm-network/src/api/staticCidrs/options.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { StaticCidr } from "../../models/microsoft/network/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface StaticCidrsListOptionalParams extends OperationOptions { + /** Optional skip token. */ + skipToken?: string; + /** Optional num entries to skip. */ + skip?: number; + /** Optional num entries to show. */ + top?: number; + /** Optional key by which to sort. */ + sortKey?: string; + /** Optional sort value for pagination. */ + sortValue?: string; +} + +/** Optional parameters. */ +export interface StaticCidrsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface StaticCidrsCreateOptionalParams extends OperationOptions { + /** StaticCidr resource object to create/update. */ + body?: StaticCidr; +} + +/** Optional parameters. */ +export interface StaticCidrsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/staticMembers/index.ts b/sdk/network/arm-network/src/api/staticMembers/index.ts new file mode 100644 index 000000000000..621331fbd982 --- /dev/null +++ b/sdk/network/arm-network/src/api/staticMembers/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + StaticMembersListOptionalParams, + StaticMembersDeleteOptionalParams, + StaticMembersCreateOrUpdateOptionalParams, + StaticMembersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/staticMembers/operations.ts b/sdk/network/arm-network/src/api/staticMembers/operations.ts new file mode 100644 index 000000000000..46e7bc4d1b57 --- /dev/null +++ b/sdk/network/arm-network/src/api/staticMembers/operations.ts @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + StaticMember, + staticMemberSerializer, + staticMemberDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _StaticMemberListResult, + _staticMemberListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StaticMembersListOptionalParams, + StaticMembersDeleteOptionalParams, + StaticMembersCreateOrUpdateOptionalParams, + StaticMembersGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options: StaticMembersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + networkGroupName: networkGroupName, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_StaticMemberListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _staticMemberListResultDeserializer(result.body); +} + +/** Lists the specified static member. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options: StaticMembersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, networkGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + options: StaticMembersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + networkGroupName: networkGroupName, + staticMemberName: staticMemberName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a static member. */ +export async function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + options: StaticMembersDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + networkManagerName, + networkGroupName, + staticMemberName, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + parameters: StaticMember, + options: StaticMembersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + networkGroupName: networkGroupName, + staticMemberName: staticMemberName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: staticMemberSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return staticMemberDeserializer(result.body); +} + +/** Creates or updates a static member. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + parameters: StaticMember, + options: StaticMembersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + networkManagerName, + networkGroupName, + staticMemberName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + options: StaticMembersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + networkGroupName: networkGroupName, + staticMemberName: staticMemberName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return staticMemberDeserializer(result.body); +} + +/** Gets the specified static member. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + options: StaticMembersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + networkGroupName, + staticMemberName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/staticMembers/options.ts b/sdk/network/arm-network/src/api/staticMembers/options.ts new file mode 100644 index 000000000000..ec0f97e4a175 --- /dev/null +++ b/sdk/network/arm-network/src/api/staticMembers/options.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface StaticMembersListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface StaticMembersDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface StaticMembersCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface StaticMembersGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/subgroups/index.ts b/sdk/network/arm-network/src/api/subgroups/index.ts new file mode 100644 index 000000000000..21c94650a74f --- /dev/null +++ b/sdk/network/arm-network/src/api/subgroups/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export type { SubgroupsListOptionalParams, SubgroupsGetOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/subgroups/operations.ts b/sdk/network/arm-network/src/api/subgroups/operations.ts new file mode 100644 index 000000000000..2288007b13c1 --- /dev/null +++ b/sdk/network/arm-network/src/api/subgroups/operations.ts @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { Subgroup, subgroupDeserializer } from "../../models/microsoft/network/models.js"; +import { _SubgroupListResult, _subgroupListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { SubgroupsListOptionalParams, SubgroupsGetOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + options: SubgroupsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interconnectGroups/{interconnectGroupName}/subgroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + interconnectGroupName: interconnectGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SubgroupListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _subgroupListResultDeserializer(result.body); +} + +/** Gets all subgroups in an interconnect group. */ +export function list( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + options: SubgroupsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, interconnectGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + subgroupName: string, + options: SubgroupsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interconnectGroups/{interconnectGroupName}/subgroups/{subgroupName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + interconnectGroupName: interconnectGroupName, + subgroupName: subgroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return subgroupDeserializer(result.body); +} + +/** Gets the specified subgroup in an interconnect group. */ +export async function get( + context: Client, + resourceGroupName: string, + interconnectGroupName: string, + subgroupName: string, + options: SubgroupsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + interconnectGroupName, + subgroupName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/subgroups/options.ts b/sdk/network/arm-network/src/api/subgroups/options.ts new file mode 100644 index 000000000000..71c3b6c4fe40 --- /dev/null +++ b/sdk/network/arm-network/src/api/subgroups/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SubgroupsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SubgroupsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/subnets/index.ts b/sdk/network/arm-network/src/api/subnets/index.ts new file mode 100644 index 000000000000..0cd407dbed3b --- /dev/null +++ b/sdk/network/arm-network/src/api/subnets/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + unprepareNetworkPolicies, + prepareNetworkPolicies, + list, + $delete, + createOrUpdate, + get, +} from "./operations.js"; +export type { + SubnetsUnprepareNetworkPoliciesOptionalParams, + SubnetsPrepareNetworkPoliciesOptionalParams, + SubnetsListOptionalParams, + SubnetsDeleteOptionalParams, + SubnetsCreateOrUpdateOptionalParams, + SubnetsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/subnets/operations.ts b/sdk/network/arm-network/src/api/subnets/operations.ts new file mode 100644 index 000000000000..2110bf433eff --- /dev/null +++ b/sdk/network/arm-network/src/api/subnets/operations.ts @@ -0,0 +1,408 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + Subnet, + subnetSerializer, + subnetDeserializer, +} from "../../models/common/models.js"; +import { + PrepareNetworkPoliciesRequest, + prepareNetworkPoliciesRequestSerializer, + UnprepareNetworkPoliciesRequest, + unprepareNetworkPoliciesRequestSerializer, +} from "../../models/microsoft/network/models.js"; +import { _SubnetListResult, _subnetListResultDeserializer } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + SubnetsUnprepareNetworkPoliciesOptionalParams, + SubnetsPrepareNetworkPoliciesOptionalParams, + SubnetsListOptionalParams, + SubnetsDeleteOptionalParams, + SubnetsCreateOrUpdateOptionalParams, + SubnetsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _unprepareNetworkPoliciesSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, + options: SubnetsUnprepareNetworkPoliciesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/unprepareNetworkPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + subnetName: subnetName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: unprepareNetworkPoliciesRequestSerializer(unprepareNetworkPoliciesRequestParameters), + }); +} + +export async function _unprepareNetworkPoliciesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Unprepares a subnet by removing network intent policies. */ +export function unprepareNetworkPolicies( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, + options: SubnetsUnprepareNetworkPoliciesOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _unprepareNetworkPoliciesDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _unprepareNetworkPoliciesSend( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + unprepareNetworkPoliciesRequestParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, void>; +} + +export function _prepareNetworkPoliciesSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, + options: SubnetsPrepareNetworkPoliciesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/prepareNetworkPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + subnetName: subnetName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: prepareNetworkPoliciesRequestSerializer(prepareNetworkPoliciesRequestParameters), + }); +} + +export async function _prepareNetworkPoliciesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Prepares a subnet by applying network intent policies. */ +export function prepareNetworkPolicies( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, + options: SubnetsPrepareNetworkPoliciesOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _prepareNetworkPoliciesDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _prepareNetworkPoliciesSend( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + prepareNetworkPoliciesRequestParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: SubnetsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_SubnetListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _subnetListResultDeserializer(result.body); +} + +/** Gets all subnets in a virtual network. */ +export function list( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: SubnetsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, virtualNetworkName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options: SubnetsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + subnetName: subnetName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified subnet. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options: SubnetsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualNetworkName, subnetName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + subnetParameters: Subnet, + options: SubnetsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + subnetName: subnetName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: subnetSerializer(subnetParameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return subnetDeserializer(result.body); +} + +/** Creates or updates a subnet in the specified virtual network. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + subnetParameters: Subnet, + options: SubnetsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Subnet> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + subnetParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, Subnet>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options: SubnetsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + subnetName: subnetName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return subnetDeserializer(result.body); +} + +/** Gets the specified subnet by virtual network and resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options: SubnetsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/subnets/options.ts b/sdk/network/arm-network/src/api/subnets/options.ts new file mode 100644 index 000000000000..bb381d974242 --- /dev/null +++ b/sdk/network/arm-network/src/api/subnets/options.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SubnetsUnprepareNetworkPoliciesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SubnetsPrepareNetworkPoliciesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SubnetsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SubnetsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SubnetsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SubnetsGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/index.ts b/sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/index.ts new file mode 100644 index 000000000000..122f1335b393 --- /dev/null +++ b/sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + SubscriptionNetworkManagerConnectionsListOptionalParams, + SubscriptionNetworkManagerConnectionsDeleteOptionalParams, + SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams, + SubscriptionNetworkManagerConnectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/operations.ts b/sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/operations.ts new file mode 100644 index 000000000000..97d0a6ad2267 --- /dev/null +++ b/sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/operations.ts @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NetworkManagerConnection, + networkManagerConnectionSerializer, + networkManagerConnectionDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _NetworkManagerConnectionListResult, + _networkManagerConnectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + SubscriptionNetworkManagerConnectionsListOptionalParams, + SubscriptionNetworkManagerConnectionsDeleteOptionalParams, + SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams, + SubscriptionNetworkManagerConnectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: SubscriptionNetworkManagerConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkManagerConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkManagerConnectionListResultDeserializer(result.body); +} + +/** List all network manager connections created by this subscription. */ +export function list( + context: Client, + options: SubscriptionNetworkManagerConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + networkManagerConnectionName: string, + options: SubscriptionNetworkManagerConnectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + networkManagerConnectionName: networkManagerConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete specified connection created by this subscription. */ +export async function $delete( + context: Client, + networkManagerConnectionName: string, + options: SubscriptionNetworkManagerConnectionsDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend(context, networkManagerConnectionName, options); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + networkManagerConnectionName: string, + parameters: NetworkManagerConnection, + options: SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + networkManagerConnectionName: networkManagerConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: networkManagerConnectionSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerConnectionDeserializer(result.body); +} + +/** Create a network manager connection on this subscription. */ +export async function createOrUpdate( + context: Client, + networkManagerConnectionName: string, + parameters: NetworkManagerConnection, + options: SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _createOrUpdateSend( + context, + networkManagerConnectionName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + networkManagerConnectionName: string, + options: SubscriptionNetworkManagerConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + networkManagerConnectionName: networkManagerConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkManagerConnectionDeserializer(result.body); +} + +/** Get a specified connection created by this subscription. */ +export async function get( + context: Client, + networkManagerConnectionName: string, + options: SubscriptionNetworkManagerConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, networkManagerConnectionName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/options.ts b/sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/options.ts new file mode 100644 index 000000000000..a2c95c803623 --- /dev/null +++ b/sdk/network/arm-network/src/api/subscriptionNetworkManagerConnections/options.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SubscriptionNetworkManagerConnectionsListOptionalParams extends OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface SubscriptionNetworkManagerConnectionsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SubscriptionNetworkManagerConnectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/usages/index.ts b/sdk/network/arm-network/src/api/usages/index.ts new file mode 100644 index 000000000000..7e9f1ecca01f --- /dev/null +++ b/sdk/network/arm-network/src/api/usages/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { UsagesListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/usages/operations.ts b/sdk/network/arm-network/src/api/usages/operations.ts new file mode 100644 index 000000000000..8160754662fd --- /dev/null +++ b/sdk/network/arm-network/src/api/usages/operations.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + _UsagesListResult, + _usagesListResultDeserializer, + Usage, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { UsagesListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + location: string, + options: UsagesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_UsagesListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _usagesListResultDeserializer(result.body); +} + +/** List network usages for a subscription. */ +export function list( + context: Client, + location: string, + options: UsagesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, location, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/usages/options.ts b/sdk/network/arm-network/src/api/usages/options.ts new file mode 100644 index 000000000000..268a7246998b --- /dev/null +++ b/sdk/network/arm-network/src/api/usages/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface UsagesListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/verifierWorkspaces/index.ts b/sdk/network/arm-network/src/api/verifierWorkspaces/index.ts new file mode 100644 index 000000000000..64b525857774 --- /dev/null +++ b/sdk/network/arm-network/src/api/verifierWorkspaces/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, update, create, get } from "./operations.js"; +export type { + VerifierWorkspacesListOptionalParams, + VerifierWorkspacesDeleteOptionalParams, + VerifierWorkspacesUpdateOptionalParams, + VerifierWorkspacesCreateOptionalParams, + VerifierWorkspacesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/verifierWorkspaces/operations.ts b/sdk/network/arm-network/src/api/verifierWorkspaces/operations.ts new file mode 100644 index 000000000000..59e7c3b5d748 --- /dev/null +++ b/sdk/network/arm-network/src/api/verifierWorkspaces/operations.ts @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + commonErrorResponseDeserializer, + VerifierWorkspace, + verifierWorkspaceSerializer, + verifierWorkspaceDeserializer, + verifierWorkspaceUpdateSerializer, +} from "../../models/microsoft/network/models.js"; +import { + _VerifierWorkspaceListResult, + _verifierWorkspaceListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VerifierWorkspacesListOptionalParams, + VerifierWorkspacesDeleteOptionalParams, + VerifierWorkspacesUpdateOptionalParams, + VerifierWorkspacesCreateOptionalParams, + VerifierWorkspacesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: VerifierWorkspacesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces{?api%2Dversion,skipToken,skip,top,sortKey,sortValue}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + "api%2Dversion": "2025-07-01", + skipToken: options?.skipToken, + skip: options?.skip, + top: options?.top, + sortKey: options?.sortKey, + sortValue: options?.sortValue, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_VerifierWorkspaceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return _verifierWorkspaceListResultDeserializer(result.body); +} + +/** Gets list of Verifier Workspaces. */ +export function list( + context: Client, + resourceGroupName: string, + networkManagerName: string, + options: VerifierWorkspacesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkManagerName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options: VerifierWorkspacesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes Verifier Workspace. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options: VerifierWorkspacesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkManagerName, workspaceName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options: VerifierWorkspacesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options?.body ? options?.body : verifierWorkspaceUpdateSerializer(options?.body), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return verifierWorkspaceDeserializer(result.body); +} + +/** Updates Verifier Workspace. */ +export async function update( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options: VerifierWorkspacesUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + networkManagerName, + workspaceName, + options, + ); + return _updateDeserialize(result); +} + +export function _createSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + body: VerifierWorkspace, + options: VerifierWorkspacesCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: verifierWorkspaceSerializer(body), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return verifierWorkspaceDeserializer(result.body); +} + +/** Creates Verifier Workspace. */ +export async function create( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + body: VerifierWorkspace, + options: VerifierWorkspacesCreateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createSend( + context, + resourceGroupName, + networkManagerName, + workspaceName, + body, + options, + ); + return _createDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options: VerifierWorkspacesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkManagerName: networkManagerName, + workspaceName: workspaceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = commonErrorResponseDeserializer(result.body); + + throw error; + } + + return verifierWorkspaceDeserializer(result.body); +} + +/** Gets Verifier Workspace. */ +export async function get( + context: Client, + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options: VerifierWorkspacesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkManagerName, + workspaceName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/verifierWorkspaces/options.ts b/sdk/network/arm-network/src/api/verifierWorkspaces/options.ts new file mode 100644 index 000000000000..8d1218b5f8df --- /dev/null +++ b/sdk/network/arm-network/src/api/verifierWorkspaces/options.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { VerifierWorkspaceUpdate } from "../../models/microsoft/network/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VerifierWorkspacesListOptionalParams extends OperationOptions { + /** Optional skip token. */ + skipToken?: string; + /** Optional num entries to skip. */ + skip?: number; + /** Optional num entries to show. */ + top?: number; + /** Optional key by which to sort. */ + sortKey?: string; + /** Optional sort value for pagination. */ + sortValue?: string; +} + +/** Optional parameters. */ +export interface VerifierWorkspacesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface VerifierWorkspacesUpdateOptionalParams extends OperationOptions { + /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ + ifMatch?: string; + /** Verifier Workspace object to create/update. */ + body?: VerifierWorkspaceUpdate; +} + +/** Optional parameters. */ +export interface VerifierWorkspacesCreateOptionalParams extends OperationOptions { + /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface VerifierWorkspacesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/vipSwap/index.ts b/sdk/network/arm-network/src/api/vipSwap/index.ts new file mode 100644 index 000000000000..cbdf76f9543b --- /dev/null +++ b/sdk/network/arm-network/src/api/vipSwap/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, create, get } from "./operations.js"; +export type { + VipSwapListOptionalParams, + VipSwapCreateOptionalParams, + VipSwapGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/vipSwap/operations.ts b/sdk/network/arm-network/src/api/vipSwap/operations.ts new file mode 100644 index 000000000000..9dd070c30bcd --- /dev/null +++ b/sdk/network/arm-network/src/api/vipSwap/operations.ts @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + SwapResource, + swapResourceSerializer, + swapResourceDeserializer, + SwapResourceListResult, + swapResourceListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VipSwapListOptionalParams, + VipSwapCreateOptionalParams, + VipSwapGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + groupName: string, + resourceName: string, + options: VipSwapListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/microsoft.Compute/cloudServices/{resourceName}/providers/Microsoft.Network/cloudServiceSlots{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + groupName: groupName, + resourceName: resourceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return swapResourceListResultDeserializer(result.body); +} + +/** Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production */ +export async function list( + context: Client, + groupName: string, + resourceName: string, + options: VipSwapListOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSend(context, groupName, resourceName, options); + return _listDeserialize(result); +} + +export function _createSend( + context: Client, + groupName: string, + resourceName: string, + parameters: SwapResource, + options: VipSwapCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/microsoft.Compute/cloudServices/{resourceName}/providers/Microsoft.Network/cloudServiceSlots/{singletonResource}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + groupName: groupName, + resourceName: resourceName, + singletonResource: "swap", + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: swapResourceSerializer(parameters), + }); +} + +export async function _createDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Performs vip swap operation on swappable cloud services. */ +export function create( + context: Client, + groupName: string, + resourceName: string, + parameters: SwapResource, + options: VipSwapCreateOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _createDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _createSend(context, groupName, resourceName, parameters, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _getSend( + context: Client, + groupName: string, + resourceName: string, + options: VipSwapGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/microsoft.Compute/cloudServices/{resourceName}/providers/Microsoft.Network/cloudServiceSlots/{singletonResource}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + groupName: groupName, + resourceName: resourceName, + singletonResource: "swap", + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return swapResourceDeserializer(result.body); +} + +/** Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production */ +export async function get( + context: Client, + groupName: string, + resourceName: string, + options: VipSwapGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, groupName, resourceName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/vipSwap/options.ts b/sdk/network/arm-network/src/api/vipSwap/options.ts new file mode 100644 index 000000000000..1aca24858d96 --- /dev/null +++ b/sdk/network/arm-network/src/api/vipSwap/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VipSwapListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VipSwapCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VipSwapGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualApplianceSites/index.ts b/sdk/network/arm-network/src/api/virtualApplianceSites/index.ts new file mode 100644 index 000000000000..8c1df4a97038 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualApplianceSites/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + VirtualApplianceSitesListOptionalParams, + VirtualApplianceSitesDeleteOptionalParams, + VirtualApplianceSitesCreateOrUpdateOptionalParams, + VirtualApplianceSitesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualApplianceSites/operations.ts b/sdk/network/arm-network/src/api/virtualApplianceSites/operations.ts new file mode 100644 index 000000000000..57d8de4487c8 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualApplianceSites/operations.ts @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + VirtualApplianceSite, + virtualApplianceSiteSerializer, + virtualApplianceSiteDeserializer, + _NetworkVirtualApplianceSiteListResult, + _networkVirtualApplianceSiteListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualApplianceSitesListOptionalParams, + VirtualApplianceSitesDeleteOptionalParams, + VirtualApplianceSitesCreateOrUpdateOptionalParams, + VirtualApplianceSitesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: VirtualApplianceSitesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkVirtualApplianceSiteListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkVirtualApplianceSiteListResultDeserializer(result.body); +} + +/** Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. */ +export function list( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + options: VirtualApplianceSitesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, networkVirtualApplianceName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options: VirtualApplianceSitesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + siteName: siteName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified site from a Virtual Appliance. */ +export function $delete( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options: VirtualApplianceSitesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, networkVirtualApplianceName, siteName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + parameters: VirtualApplianceSite, + options: VirtualApplianceSitesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + siteName: siteName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualApplianceSiteSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualApplianceSiteDeserializer(result.body); +} + +/** Creates or updates the specified Network Virtual Appliance Site. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + parameters: VirtualApplianceSite, + options: VirtualApplianceSitesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualApplianceSite> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + networkVirtualApplianceName, + siteName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualApplianceSite>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options: VirtualApplianceSitesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + networkVirtualApplianceName: networkVirtualApplianceName, + siteName: siteName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualApplianceSiteDeserializer(result.body); +} + +/** Gets the specified Virtual Appliance Site. */ +export async function get( + context: Client, + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options: VirtualApplianceSitesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + networkVirtualApplianceName, + siteName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualApplianceSites/options.ts b/sdk/network/arm-network/src/api/virtualApplianceSites/options.ts new file mode 100644 index 000000000000..6931ba9322ad --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualApplianceSites/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualApplianceSitesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualApplianceSitesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualApplianceSitesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualApplianceSitesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualApplianceSkus/index.ts b/sdk/network/arm-network/src/api/virtualApplianceSkus/index.ts new file mode 100644 index 000000000000..69ec28604cd7 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualApplianceSkus/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export type { + VirtualApplianceSkusListOptionalParams, + VirtualApplianceSkusGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualApplianceSkus/operations.ts b/sdk/network/arm-network/src/api/virtualApplianceSkus/operations.ts new file mode 100644 index 000000000000..168e531d417d --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualApplianceSkus/operations.ts @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + NetworkVirtualApplianceSku, + networkVirtualApplianceSkuDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _NetworkVirtualApplianceSkuListResult, + _networkVirtualApplianceSkuListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualApplianceSkusListOptionalParams, + VirtualApplianceSkusGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: VirtualApplianceSkusListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NetworkVirtualApplianceSkuListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _networkVirtualApplianceSkuListResultDeserializer(result.body); +} + +/** List all SKUs available for a virtual appliance. */ +export function list( + context: Client, + options: VirtualApplianceSkusListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + skuName: string, + options: VirtualApplianceSkusGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus/{skuName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + skuName: skuName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return networkVirtualApplianceSkuDeserializer(result.body); +} + +/** Retrieves a single available sku for network virtual appliance. */ +export async function get( + context: Client, + skuName: string, + options: VirtualApplianceSkusGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, skuName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualApplianceSkus/options.ts b/sdk/network/arm-network/src/api/virtualApplianceSkus/options.ts new file mode 100644 index 000000000000..8e1605e3dd1a --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualApplianceSkus/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualApplianceSkusListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualApplianceSkusGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualHubBgpConnection/index.ts b/sdk/network/arm-network/src/api/virtualHubBgpConnection/index.ts new file mode 100644 index 000000000000..39c5e35c72df --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubBgpConnection/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, get } from "./operations.js"; +export type { + VirtualHubBgpConnectionDeleteOptionalParams, + VirtualHubBgpConnectionCreateOrUpdateOptionalParams, + VirtualHubBgpConnectionGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualHubBgpConnection/operations.ts b/sdk/network/arm-network/src/api/virtualHubBgpConnection/operations.ts new file mode 100644 index 000000000000..2fd889a08981 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubBgpConnection/operations.ts @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + BgpConnection, + bgpConnectionSerializer, + bgpConnectionDeserializer, +} from "../../models/microsoft/network/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualHubBgpConnectionDeleteOptionalParams, + VirtualHubBgpConnectionCreateOrUpdateOptionalParams, + VirtualHubBgpConnectionGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options: VirtualHubBgpConnectionDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a VirtualHubBgpConnection. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options: VirtualHubBgpConnectionDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualHubName, connectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + parameters: BgpConnection, + options: VirtualHubBgpConnectionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: bgpConnectionSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return bgpConnectionDeserializer(result.body); +} + +/** Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + parameters: BgpConnection, + options: VirtualHubBgpConnectionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, BgpConnection> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualHubName, + connectionName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, BgpConnection>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options: VirtualHubBgpConnectionGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return bgpConnectionDeserializer(result.body); +} + +/** Retrieves the details of a Virtual Hub Bgp Connection. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options: VirtualHubBgpConnectionGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualHubName, + connectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualHubBgpConnection/options.ts b/sdk/network/arm-network/src/api/virtualHubBgpConnection/options.ts new file mode 100644 index 000000000000..342a5dab5842 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubBgpConnection/options.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualHubBgpConnectionDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubBgpConnectionCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubBgpConnectionGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualHubBgpConnections/index.ts b/sdk/network/arm-network/src/api/virtualHubBgpConnections/index.ts new file mode 100644 index 000000000000..53eff46ef61b --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubBgpConnections/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAdvertisedRoutes, listLearnedRoutes, list } from "./operations.js"; +export type { + VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, + VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, + VirtualHubBgpConnectionsListOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualHubBgpConnections/operations.ts b/sdk/network/arm-network/src/api/virtualHubBgpConnections/operations.ts new file mode 100644 index 000000000000..f781a6ce4baf --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubBgpConnections/operations.ts @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + BgpConnection, + _ListVirtualHubBgpConnectionResults, + _listVirtualHubBgpConnectionResultsDeserializer, + PeerRoute, + peerRouteArrayRecordDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, + VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, + VirtualHubBgpConnectionsListOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAdvertisedRoutesSend( + context: Client, + resourceGroupName: string, + hubName: string, + connectionName: string, + options: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + hubName: hubName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAdvertisedRoutesDeserialize( + result: PathUncheckedResponse, +): Promise> { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return peerRouteArrayRecordDeserializer(result.body); +} + +/** Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. */ +export function listAdvertisedRoutes( + context: Client, + resourceGroupName: string, + hubName: string, + connectionName: string, + options: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams = { requestOptions: {} }, +): PollerLike>, Record> { + return getLongRunningPoller(context, _listAdvertisedRoutesDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listAdvertisedRoutesSend(context, resourceGroupName, hubName, connectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike>, Record>; +} + +export function _listLearnedRoutesSend( + context: Client, + resourceGroupName: string, + hubName: string, + connectionName: string, + options: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + hubName: hubName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listLearnedRoutesDeserialize( + result: PathUncheckedResponse, +): Promise> { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return peerRouteArrayRecordDeserializer(result.body); +} + +/** Retrieves a list of routes the virtual hub bgp connection has learned. */ +export function listLearnedRoutes( + context: Client, + resourceGroupName: string, + hubName: string, + connectionName: string, + options: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams = { requestOptions: {} }, +): PollerLike>, Record> { + return getLongRunningPoller(context, _listLearnedRoutesDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listLearnedRoutesSend(context, resourceGroupName, hubName, connectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike>, Record>; +} + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubBgpConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVirtualHubBgpConnectionResults> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVirtualHubBgpConnectionResultsDeserializer(result.body); +} + +/** Retrieves the details of all VirtualHubBgpConnections. */ +export function list( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubBgpConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, virtualHubName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} diff --git a/sdk/network/arm-network/src/api/virtualHubBgpConnections/options.ts b/sdk/network/arm-network/src/api/virtualHubBgpConnections/options.ts new file mode 100644 index 000000000000..6bcdbc47a260 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubBgpConnections/options.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubBgpConnectionsListLearnedRoutesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubBgpConnectionsListOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualHubIpConfiguration/index.ts b/sdk/network/arm-network/src/api/virtualHubIpConfiguration/index.ts new file mode 100644 index 000000000000..24f8b218c0c5 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubIpConfiguration/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + VirtualHubIpConfigurationListOptionalParams, + VirtualHubIpConfigurationDeleteOptionalParams, + VirtualHubIpConfigurationCreateOrUpdateOptionalParams, + VirtualHubIpConfigurationGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualHubIpConfiguration/operations.ts b/sdk/network/arm-network/src/api/virtualHubIpConfiguration/operations.ts new file mode 100644 index 000000000000..8bfa46b3c975 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubIpConfiguration/operations.ts @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + HubIpConfiguration, + hubIpConfigurationSerializer, + hubIpConfigurationDeserializer, + _ListVirtualHubIpConfigurationResults, + _listVirtualHubIpConfigurationResultsDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualHubIpConfigurationListOptionalParams, + VirtualHubIpConfigurationDeleteOptionalParams, + VirtualHubIpConfigurationCreateOrUpdateOptionalParams, + VirtualHubIpConfigurationGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubIpConfigurationListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVirtualHubIpConfigurationResults> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVirtualHubIpConfigurationResultsDeserializer(result.body); +} + +/** Retrieves the details of all VirtualHubIpConfigurations. */ +export function list( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubIpConfigurationListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, virtualHubName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options: VirtualHubIpConfigurationDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + ipConfigName: ipConfigName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a VirtualHubIpConfiguration. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options: VirtualHubIpConfigurationDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualHubName, ipConfigName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + parameters: HubIpConfiguration, + options: VirtualHubIpConfigurationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + ipConfigName: ipConfigName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: hubIpConfigurationSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return hubIpConfigurationDeserializer(result.body); +} + +/** Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + parameters: HubIpConfiguration, + options: VirtualHubIpConfigurationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, HubIpConfiguration> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualHubName, + ipConfigName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, HubIpConfiguration>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options: VirtualHubIpConfigurationGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + ipConfigName: ipConfigName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return hubIpConfigurationDeserializer(result.body); +} + +/** Retrieves the details of a Virtual Hub Ip configuration. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options: VirtualHubIpConfigurationGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, virtualHubName, ipConfigName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualHubIpConfiguration/options.ts b/sdk/network/arm-network/src/api/virtualHubIpConfiguration/options.ts new file mode 100644 index 000000000000..caa16c0b2ba9 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubIpConfiguration/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualHubIpConfigurationListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualHubIpConfigurationDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubIpConfigurationCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubIpConfigurationGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualHubRouteTableV2S/index.ts b/sdk/network/arm-network/src/api/virtualHubRouteTableV2S/index.ts new file mode 100644 index 000000000000..ddfdb4479010 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubRouteTableV2S/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + VirtualHubRouteTableV2SListOptionalParams, + VirtualHubRouteTableV2SDeleteOptionalParams, + VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, + VirtualHubRouteTableV2SGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualHubRouteTableV2S/operations.ts b/sdk/network/arm-network/src/api/virtualHubRouteTableV2S/operations.ts new file mode 100644 index 000000000000..4acb005b7f58 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubRouteTableV2S/operations.ts @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + errorDeserializer, + VirtualHubRouteTableV2, + virtualHubRouteTableV2Serializer, + virtualHubRouteTableV2Deserializer, + _ListVirtualHubRouteTableV2SResult, + _listVirtualHubRouteTableV2SResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualHubRouteTableV2SListOptionalParams, + VirtualHubRouteTableV2SDeleteOptionalParams, + VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, + VirtualHubRouteTableV2SGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubRouteTableV2SListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVirtualHubRouteTableV2SResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVirtualHubRouteTableV2SResultDeserializer(result.body); +} + +/** Retrieves the details of all VirtualHubRouteTableV2s. */ +export function list( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubRouteTableV2SListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, virtualHubName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options: VirtualHubRouteTableV2SDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routeTableName: routeTableName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a VirtualHubRouteTableV2. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options: VirtualHubRouteTableV2SDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualHubName, routeTableName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, + options: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routeTableName: routeTableName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualHubRouteTableV2Serializer(virtualHubRouteTableV2Parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return virtualHubRouteTableV2Deserializer(result.body); +} + +/** Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, + options: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualHubRouteTableV2> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualHubName, + routeTableName, + virtualHubRouteTableV2Parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualHubRouteTableV2>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options: VirtualHubRouteTableV2SGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + routeTableName: routeTableName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return virtualHubRouteTableV2Deserializer(result.body); +} + +/** Retrieves the details of a VirtualHubRouteTableV2. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options: VirtualHubRouteTableV2SGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualHubName, + routeTableName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualHubRouteTableV2S/options.ts b/sdk/network/arm-network/src/api/virtualHubRouteTableV2S/options.ts new file mode 100644 index 000000000000..ac6e011cc275 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubRouteTableV2S/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualHubRouteTableV2SListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualHubRouteTableV2SDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubRouteTableV2SCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubRouteTableV2SGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualHubs/index.ts b/sdk/network/arm-network/src/api/virtualHubs/index.ts new file mode 100644 index 000000000000..0ea184084ef2 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubs/index.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + getOutboundRoutes, + getInboundRoutes, + getEffectiveVirtualHubRoutes, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VirtualHubsGetOutboundRoutesOptionalParams, + VirtualHubsGetInboundRoutesOptionalParams, + VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, + VirtualHubsListOptionalParams, + VirtualHubsListByResourceGroupOptionalParams, + VirtualHubsDeleteOptionalParams, + VirtualHubsUpdateTagsOptionalParams, + VirtualHubsCreateOrUpdateOptionalParams, + VirtualHubsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualHubs/operations.ts b/sdk/network/arm-network/src/api/virtualHubs/operations.ts new file mode 100644 index 000000000000..745f1f3d330e --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubs/operations.ts @@ -0,0 +1,558 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + VirtualHub, + virtualHubSerializer, + virtualHubDeserializer, + _ListVirtualHubsResult, + _listVirtualHubsResultDeserializer, + effectiveRoutesParametersSerializer, + VirtualHubEffectiveRouteList, + virtualHubEffectiveRouteListDeserializer, + GetInboundRoutesParameters, + getInboundRoutesParametersSerializer, + EffectiveRouteMapRouteList, + effectiveRouteMapRouteListDeserializer, + GetOutboundRoutesParameters, + getOutboundRoutesParametersSerializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualHubsGetOutboundRoutesOptionalParams, + VirtualHubsGetInboundRoutesOptionalParams, + VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, + VirtualHubsListOptionalParams, + VirtualHubsListByResourceGroupOptionalParams, + VirtualHubsDeleteOptionalParams, + VirtualHubsUpdateTagsOptionalParams, + VirtualHubsCreateOrUpdateOptionalParams, + VirtualHubsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getOutboundRoutesSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + getOutboundRoutesParameters: GetOutboundRoutesParameters, + options: VirtualHubsGetOutboundRoutesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/outboundRoutes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: getOutboundRoutesParametersSerializer(getOutboundRoutesParameters), + }); +} + +export async function _getOutboundRoutesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return effectiveRouteMapRouteListDeserializer(result.body); +} + +/** Gets the outbound routes configured for the Virtual Hub on a particular connection. */ +export function getOutboundRoutes( + context: Client, + resourceGroupName: string, + virtualHubName: string, + getOutboundRoutesParameters: GetOutboundRoutesParameters, + options: VirtualHubsGetOutboundRoutesOptionalParams = { requestOptions: {} }, +): PollerLike, EffectiveRouteMapRouteList> { + return getLongRunningPoller(context, _getOutboundRoutesDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getOutboundRoutesSend( + context, + resourceGroupName, + virtualHubName, + getOutboundRoutesParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, EffectiveRouteMapRouteList>; +} + +export function _getInboundRoutesSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + getInboundRoutesParameters: GetInboundRoutesParameters, + options: VirtualHubsGetInboundRoutesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/inboundRoutes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: getInboundRoutesParametersSerializer(getInboundRoutesParameters), + }); +} + +export async function _getInboundRoutesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return effectiveRouteMapRouteListDeserializer(result.body); +} + +/** Gets the inbound routes configured for the Virtual Hub on a particular connection. */ +export function getInboundRoutes( + context: Client, + resourceGroupName: string, + virtualHubName: string, + getInboundRoutesParameters: GetInboundRoutesParameters, + options: VirtualHubsGetInboundRoutesOptionalParams = { requestOptions: {} }, +): PollerLike, EffectiveRouteMapRouteList> { + return getLongRunningPoller(context, _getInboundRoutesDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getInboundRoutesSend( + context, + resourceGroupName, + virtualHubName, + getInboundRoutesParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, EffectiveRouteMapRouteList>; +} + +export function _getEffectiveVirtualHubRoutesSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.effectiveRoutesParameters + ? options?.effectiveRoutesParameters + : effectiveRoutesParametersSerializer(options?.effectiveRoutesParameters), + }); +} + +export async function _getEffectiveVirtualHubRoutesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualHubEffectiveRouteListDeserializer(result.body); +} + +/** Gets the effective routes configured for the Virtual Hub resource or the specified resource . */ +export function getEffectiveVirtualHubRoutes( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualHubEffectiveRouteList> { + return getLongRunningPoller( + context, + _getEffectiveVirtualHubRoutesDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getEffectiveVirtualHubRoutesSend(context, resourceGroupName, virtualHubName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, VirtualHubEffectiveRouteList>; +} + +export function _listSend( + context: Client, + options: VirtualHubsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVirtualHubsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVirtualHubsResultDeserializer(result.body); +} + +/** Lists all the VirtualHubs in a subscription. */ +export function list( + context: Client, + options: VirtualHubsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VirtualHubsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVirtualHubsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVirtualHubsResultDeserializer(result.body); +} + +/** Lists all the VirtualHubs in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: VirtualHubsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a VirtualHub. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, virtualHubName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: TagsObject, + options: VirtualHubsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(virtualHubParameters), + }); +} + +export async function _updateTagsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualHubDeserializer(result.body); +} + +/** Updates VirtualHub tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: TagsObject, + options: VirtualHubsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + virtualHubName, + virtualHubParameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: VirtualHub, + options: VirtualHubsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualHubSerializer(virtualHubParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualHubDeserializer(result.body); +} + +/** Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: VirtualHub, + options: VirtualHubsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualHub> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualHubName, + virtualHubParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualHub>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualHubName: virtualHubName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualHubDeserializer(result.body); +} + +/** Retrieves the details of a VirtualHub. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualHubName: string, + options: VirtualHubsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, virtualHubName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualHubs/options.ts b/sdk/network/arm-network/src/api/virtualHubs/options.ts new file mode 100644 index 000000000000..9ebb9ea381ef --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualHubs/options.ts @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { EffectiveRoutesParameters } from "../../models/microsoft/network/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualHubsGetOutboundRoutesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubsGetInboundRoutesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Parameters supplied to get the effective routes for a specific resource. */ + effectiveRoutesParameters?: EffectiveRoutesParameters; +} + +/** Optional parameters. */ +export interface VirtualHubsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualHubsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualHubsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualHubsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualHubsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualNetworkAppliances/index.ts b/sdk/network/arm-network/src/api/virtualNetworkAppliances/index.ts new file mode 100644 index 000000000000..fd26fd56e5b8 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkAppliances/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, updateTags, createOrUpdate, get } from "./operations.js"; +export type { + VirtualNetworkAppliancesListAllOptionalParams, + VirtualNetworkAppliancesListOptionalParams, + VirtualNetworkAppliancesDeleteOptionalParams, + VirtualNetworkAppliancesUpdateTagsOptionalParams, + VirtualNetworkAppliancesCreateOrUpdateOptionalParams, + VirtualNetworkAppliancesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualNetworkAppliances/operations.ts b/sdk/network/arm-network/src/api/virtualNetworkAppliances/operations.ts new file mode 100644 index 000000000000..bcc044ab03a1 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkAppliances/operations.ts @@ -0,0 +1,359 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + VirtualNetworkAppliance, + virtualNetworkApplianceSerializer, + virtualNetworkApplianceDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _VirtualNetworkApplianceListResult, + _virtualNetworkApplianceListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualNetworkAppliancesListAllOptionalParams, + VirtualNetworkAppliancesListOptionalParams, + VirtualNetworkAppliancesDeleteOptionalParams, + VirtualNetworkAppliancesUpdateTagsOptionalParams, + VirtualNetworkAppliancesCreateOrUpdateOptionalParams, + VirtualNetworkAppliancesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: VirtualNetworkAppliancesListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkAppliances{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkApplianceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkApplianceListResultDeserializer(result.body); +} + +/** Gets all virtual network appliances in a subscription. */ +export function listAll( + context: Client, + options: VirtualNetworkAppliancesListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: VirtualNetworkAppliancesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkApplianceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkApplianceListResultDeserializer(result.body); +} + +/** Gets all virtual network appliances in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: VirtualNetworkAppliancesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualNetworkApplianceName: string, + options: VirtualNetworkAppliancesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances/{virtualNetworkApplianceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkApplianceName: virtualNetworkApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified virtual network appliance. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualNetworkApplianceName: string, + options: VirtualNetworkAppliancesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualNetworkApplianceName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: TagsObject, + options: VirtualNetworkAppliancesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances/{virtualNetworkApplianceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkApplianceName: virtualNetworkApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkApplianceDeserializer(result.body); +} + +/** Updates a virtual network appliance tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: TagsObject, + options: VirtualNetworkAppliancesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + virtualNetworkApplianceName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: VirtualNetworkAppliance, + options: VirtualNetworkAppliancesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances/{virtualNetworkApplianceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkApplianceName: virtualNetworkApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualNetworkApplianceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkApplianceDeserializer(result.body); +} + +/** Creates or updates a virtual network appliance. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: VirtualNetworkAppliance, + options: VirtualNetworkAppliancesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetworkAppliance> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualNetworkApplianceName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualNetworkAppliance>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualNetworkApplianceName: string, + options: VirtualNetworkAppliancesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances/{virtualNetworkApplianceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkApplianceName: virtualNetworkApplianceName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkApplianceDeserializer(result.body); +} + +/** Gets information about the specified virtual network appliance. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualNetworkApplianceName: string, + options: VirtualNetworkAppliancesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, virtualNetworkApplianceName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualNetworkAppliances/options.ts b/sdk/network/arm-network/src/api/virtualNetworkAppliances/options.ts new file mode 100644 index 000000000000..358e5535a86b --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkAppliances/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualNetworkAppliancesListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkAppliancesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkAppliancesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkAppliancesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkAppliancesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkAppliancesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/index.ts b/sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/index.ts new file mode 100644 index 000000000000..00cd89cdc6b6 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/index.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + resetConnection, + getIkeSas, + stopPacketCapture, + startPacketCapture, + resetSharedKey, + getSharedKey, + setSharedKey, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, + VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, + VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, + VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, + VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsListOptionalParams, + VirtualNetworkGatewayConnectionsDeleteOptionalParams, + VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, + VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, + VirtualNetworkGatewayConnectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/operations.ts b/sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/operations.ts new file mode 100644 index 000000000000..a66207f9ca9a --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/operations.ts @@ -0,0 +1,793 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + errorDeserializer, + errorResponseDeserializer, + vpnPacketCaptureStartParametersSerializer, + VpnPacketCaptureStopParameters, + vpnPacketCaptureStopParametersSerializer, + VirtualNetworkGatewayConnection, + virtualNetworkGatewayConnectionSerializer, + virtualNetworkGatewayConnectionDeserializer, + ConnectionSharedKey, + connectionSharedKeySerializer, + connectionSharedKeyDeserializer, + ConnectionResetSharedKey, + connectionResetSharedKeySerializer, + connectionResetSharedKeyDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _VirtualNetworkGatewayConnectionListResult, + _virtualNetworkGatewayConnectionListResultDeserializer, + VirtualNetworkGatewayConnectionsGetIkeSasResponse, + VirtualNetworkGatewayConnectionsStopPacketCaptureResponse, + VirtualNetworkGatewayConnectionsStartPacketCaptureResponse, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, + VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, + VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, + VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, + VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsListOptionalParams, + VirtualNetworkGatewayConnectionsDeleteOptionalParams, + VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, + VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, + VirtualNetworkGatewayConnectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _resetConnectionSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _resetConnectionDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Resets the virtual network gateway connection specified. */ +export function resetConnection( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _resetConnectionDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _resetConnectionSend( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _getIkeSasSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getIkeSasDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. */ +export function getIkeSas( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VirtualNetworkGatewayConnectionsGetIkeSasResponse +> { + return getLongRunningPoller(context, _getIkeSasDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getIkeSasSend(context, resourceGroupName, virtualNetworkGatewayConnectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VirtualNetworkGatewayConnectionsGetIkeSasResponse + >; +} + +export function _stopPacketCaptureSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnPacketCaptureStopParameters, + options: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnPacketCaptureStopParametersSerializer(parameters), + }); +} + +export async function _stopPacketCaptureDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Stops packet capture on virtual network gateway connection in the specified resource group. */ +export function stopPacketCapture( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnPacketCaptureStopParameters, + options: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VirtualNetworkGatewayConnectionsStopPacketCaptureResponse +> { + return getLongRunningPoller(context, _stopPacketCaptureDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopPacketCaptureSend( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VirtualNetworkGatewayConnectionsStopPacketCaptureResponse + >; +} + +export function _startPacketCaptureSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.parameters + ? options?.parameters + : vpnPacketCaptureStartParametersSerializer(options?.parameters), + }); +} + +export async function _startPacketCaptureDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Starts packet capture on virtual network gateway connection in the specified resource group. */ +export function startPacketCapture( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + VirtualNetworkGatewayConnectionsStartPacketCaptureResponse +> { + return getLongRunningPoller(context, _startPacketCaptureDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startPacketCaptureSend( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VirtualNetworkGatewayConnectionsStartPacketCaptureResponse + >; +} + +export function _resetSharedKeySend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionResetSharedKey, + options: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: connectionResetSharedKeySerializer(parameters), + }); +} + +export async function _resetSharedKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return connectionResetSharedKeyDeserializer(result.body); +} + +/** The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. */ +export function resetSharedKey( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionResetSharedKey, + options: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams = { requestOptions: {} }, +): PollerLike, ConnectionResetSharedKey> { + return getLongRunningPoller(context, _resetSharedKeyDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _resetSharedKeySend( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, ConnectionResetSharedKey>; +} + +export function _getSharedKeySend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getSharedKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return connectionSharedKeyDeserializer(result.body); +} + +/** The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. */ +export async function getSharedKey( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSharedKeySend( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ); + return _getSharedKeyDeserialize(result); +} + +export function _setSharedKeySend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionSharedKey, + options: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: connectionSharedKeySerializer(parameters), + }); +} + +export async function _setSharedKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return connectionSharedKeyDeserializer(result.body); +} + +/** The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. */ +export function setSharedKey( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionSharedKey, + options: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams = { requestOptions: {} }, +): PollerLike, ConnectionSharedKey> { + return getLongRunningPoller(context, _setSharedKeyDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _setSharedKeySend( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, ConnectionSharedKey>; +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: VirtualNetworkGatewayConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkGatewayConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkGatewayConnectionListResultDeserializer(result.body); +} + +/** The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. */ +export function list( + context: Client, + resourceGroupName: string, + options: VirtualNetworkGatewayConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified virtual network Gateway connection. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualNetworkGatewayConnectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: TagsObject, + options: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkGatewayConnectionDeserializer(result.body); +} + +/** Updates a virtual network gateway connection tags. */ +export function updateTags( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: TagsObject, + options: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetworkGatewayConnection> { + return getLongRunningPoller(context, _updateTagsDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateTagsSend( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VirtualNetworkGatewayConnection + >; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VirtualNetworkGatewayConnection, + options: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualNetworkGatewayConnectionSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkGatewayConnectionDeserializer(result.body); +} + +/** Creates or updates a virtual network gateway connection in the specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VirtualNetworkGatewayConnection, + options: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetworkGatewayConnection> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VirtualNetworkGatewayConnection + >; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkGatewayConnectionDeserializer(result.body); +} + +/** Gets the specified virtual network gateway connection by resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options: VirtualNetworkGatewayConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/options.ts b/sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/options.ts new file mode 100644 index 000000000000..1348730f360b --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkGatewayConnections/options.ts @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { VpnPacketCaptureStartParameters } from "../../models/microsoft/network/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsResetConnectionOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Virtual network gateway packet capture parameters supplied to start packet capture on gateway connection. */ + parameters?: VpnPacketCaptureStartParameters; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayConnectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/index.ts b/sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/index.ts new file mode 100644 index 000000000000..85b6b02b579f --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByVirtualNetworkGateway, $delete, createOrUpdate, get } from "./operations.js"; +export type { + VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, + VirtualNetworkGatewayNatRulesDeleteOptionalParams, + VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, + VirtualNetworkGatewayNatRulesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/operations.ts b/sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/operations.ts new file mode 100644 index 000000000000..6268f7e0ba7e --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/operations.ts @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + VirtualNetworkGatewayNatRule, + virtualNetworkGatewayNatRuleSerializer, + virtualNetworkGatewayNatRuleDeserializer, + _ListVirtualNetworkGatewayNatRulesResult, + _listVirtualNetworkGatewayNatRulesResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, + VirtualNetworkGatewayNatRulesDeleteOptionalParams, + VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, + VirtualNetworkGatewayNatRulesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByVirtualNetworkGatewaySend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByVirtualNetworkGatewayDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVirtualNetworkGatewayNatRulesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVirtualNetworkGatewayNatRulesResultDeserializer(result.body); +} + +/** Retrieves all nat rules for a particular virtual network gateway. */ +export function listByVirtualNetworkGateway( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByVirtualNetworkGatewaySend( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ), + _listByVirtualNetworkGatewayDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options: VirtualNetworkGatewayNatRulesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + natRuleName: natRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a nat rule. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options: VirtualNetworkGatewayNatRulesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualNetworkGatewayName, natRuleName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + natRuleParameters: VirtualNetworkGatewayNatRule, + options: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + natRuleName: natRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualNetworkGatewayNatRuleSerializer(natRuleParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkGatewayNatRuleDeserializer(result.body); +} + +/** Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + natRuleParameters: VirtualNetworkGatewayNatRule, + options: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetworkGatewayNatRule> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + natRuleName, + natRuleParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualNetworkGatewayNatRule>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options: VirtualNetworkGatewayNatRulesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + natRuleName: natRuleName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkGatewayNatRuleDeserializer(result.body); +} + +/** Retrieves the details of a nat rule. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options: VirtualNetworkGatewayNatRulesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + natRuleName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/options.ts b/sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/options.ts new file mode 100644 index 000000000000..c224a77dddd7 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkGatewayNatRules/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayNatRulesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewayNatRulesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualNetworkGateways/index.ts b/sdk/network/arm-network/src/api/virtualNetworkGateways/index.ts new file mode 100644 index 000000000000..8f8c1477373c --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkGateways/index.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + vpnDeviceConfigurationScript, + invokeAbortMigration, + invokeCommitMigration, + invokeExecuteMigration, + invokePrepareMigration, + disconnectVirtualNetworkGatewayVpnConnections, + getVpnclientConnectionHealth, + stopExpressRouteSiteFailoverSimulation, + startExpressRouteSiteFailoverSimulation, + getFailoverSingleTestDetails, + getFailoverAllTestDetails, + stopPacketCapture, + startPacketCapture, + getVpnclientIpsecParameters, + setVpnclientIpsecParameters, + getRoutesInformation, + getResiliencyInformation, + getAdvertisedRoutes, + getLearnedRoutes, + listRadiusSecrets, + supportedVpnDevices, + getBgpPeerStatus, + getVpnProfilePackageUrl, + generateVpnProfile, + generatevpnclientpackage, + resetVpnClientSharedKey, + reset, + listConnections, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams, + VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, + VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, + VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, + VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, + VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, + VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + VirtualNetworkGatewaysStopPacketCaptureOptionalParams, + VirtualNetworkGatewaysStartPacketCaptureOptionalParams, + VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, + VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, + VirtualNetworkGatewaysGetRoutesInformationOptionalParams, + VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, + VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, + VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, + VirtualNetworkGatewaysListRadiusSecretsOptionalParams, + VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams, + VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, + VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, + VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, + VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, + VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, + VirtualNetworkGatewaysResetOptionalParams, + VirtualNetworkGatewaysListConnectionsOptionalParams, + VirtualNetworkGatewaysListOptionalParams, + VirtualNetworkGatewaysDeleteOptionalParams, + VirtualNetworkGatewaysUpdateTagsOptionalParams, + VirtualNetworkGatewaysCreateOrUpdateOptionalParams, + VirtualNetworkGatewaysGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualNetworkGateways/operations.ts b/sdk/network/arm-network/src/api/virtualNetworkGateways/operations.ts new file mode 100644 index 000000000000..3827f592a10d --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkGateways/operations.ts @@ -0,0 +1,2181 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + errorDeserializer, + VirtualNetworkGateway, + virtualNetworkGatewaySerializer, + virtualNetworkGatewayDeserializer, + _VirtualNetworkGatewayListConnectionsResult, + _virtualNetworkGatewayListConnectionsResultDeserializer, + VirtualNetworkGatewayConnectionListEntity, + VpnClientParameters, + vpnClientParametersSerializer, + BgpPeerStatusListResult, + bgpPeerStatusListResultDeserializer, + RadiusAuthServerListResult, + radiusAuthServerListResultDeserializer, + GatewayRouteListResult, + gatewayRouteListResultDeserializer, + GatewayResiliencyInformation, + gatewayResiliencyInformationDeserializer, + GatewayRouteSetsInformation, + gatewayRouteSetsInformationDeserializer, + VpnClientIPsecParameters, + vpnClientIPsecParametersSerializer, + vpnClientIPsecParametersDeserializer, + vpnPacketCaptureStartParametersSerializer, + VpnPacketCaptureStopParameters, + vpnPacketCaptureStopParametersSerializer, + ExpressRouteFailoverTestDetails, + ExpressRouteFailoverSingleTestDetails, + ExpressRouteFailoverStopApiParameters, + expressRouteFailoverStopApiParametersSerializer, + VpnClientConnectionHealthDetailListResult, + vpnClientConnectionHealthDetailListResultDeserializer, + P2SVpnConnectionRequest, + p2SVpnConnectionRequestSerializer, + VirtualNetworkGatewayMigrationParameters, + virtualNetworkGatewayMigrationParametersSerializer, + VpnDeviceScriptParameters, + vpnDeviceScriptParametersSerializer, + expressRouteFailoverTestDetailsArrayDeserializer, + expressRouteFailoverSingleTestDetailsArrayDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _VirtualNetworkGatewayListResult, + _virtualNetworkGatewayListResultDeserializer, + VirtualNetworkGatewaysVpnDeviceConfigurationScriptResponse, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse, + VirtualNetworkGatewaysStopPacketCaptureResponse, + VirtualNetworkGatewaysStartPacketCaptureResponse, + VirtualNetworkGatewaysSupportedVpnDevicesResponse, + VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse, + VirtualNetworkGatewaysGenerateVpnProfileResponse, + VirtualNetworkGatewaysGeneratevpnclientpackageResponse, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams, + VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, + VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, + VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, + VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, + VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, + VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + VirtualNetworkGatewaysStopPacketCaptureOptionalParams, + VirtualNetworkGatewaysStartPacketCaptureOptionalParams, + VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, + VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, + VirtualNetworkGatewaysGetRoutesInformationOptionalParams, + VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, + VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, + VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, + VirtualNetworkGatewaysListRadiusSecretsOptionalParams, + VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams, + VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, + VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, + VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, + VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, + VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, + VirtualNetworkGatewaysResetOptionalParams, + VirtualNetworkGatewaysListConnectionsOptionalParams, + VirtualNetworkGatewaysListOptionalParams, + VirtualNetworkGatewaysDeleteOptionalParams, + VirtualNetworkGatewaysUpdateTagsOptionalParams, + VirtualNetworkGatewaysCreateOrUpdateOptionalParams, + VirtualNetworkGatewaysGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _vpnDeviceConfigurationScriptSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnDeviceScriptParameters, + options: VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayConnectionName: virtualNetworkGatewayConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnDeviceScriptParametersSerializer(parameters), + }); +} + +export async function _vpnDeviceConfigurationScriptDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Gets a xml format representation for vpn device configuration script. */ +export async function vpnDeviceConfigurationScript( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnDeviceScriptParameters, + options: VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _vpnDeviceConfigurationScriptSend( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ); + return _vpnDeviceConfigurationScriptDeserialize(result); +} + +export function _invokeAbortMigrationSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/abortMigration{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _invokeAbortMigrationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Trigger abort migration for the virtual network gateway. */ +export function invokeAbortMigration( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _invokeAbortMigrationDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _invokeAbortMigrationSend(context, resourceGroupName, virtualNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _invokeCommitMigrationSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/commitMigration{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _invokeCommitMigrationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Trigger commit migration for the virtual network gateway. */ +export function invokeCommitMigration( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _invokeCommitMigrationDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _invokeCommitMigrationSend(context, resourceGroupName, virtualNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _invokeExecuteMigrationSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/executeMigration{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _invokeExecuteMigrationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Trigger execute migration for the virtual network gateway. */ +export function invokeExecuteMigration( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _invokeExecuteMigrationDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _invokeExecuteMigrationSend(context, resourceGroupName, virtualNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _invokePrepareMigrationSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + migrationParams: VirtualNetworkGatewayMigrationParameters, + options: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/prepareMigration{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: virtualNetworkGatewayMigrationParametersSerializer(migrationParams), + }); +} + +export async function _invokePrepareMigrationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Trigger prepare migration for the virtual network gateway. */ +export function invokePrepareMigration( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + migrationParams: VirtualNetworkGatewayMigrationParameters, + options: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _invokePrepareMigrationDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _invokePrepareMigrationSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + migrationParams, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _disconnectVirtualNetworkGatewayVpnConnectionsSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + request: P2SVpnConnectionRequest, + options: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: p2SVpnConnectionRequestSerializer(request), + }); +} + +export async function _disconnectVirtualNetworkGatewayVpnConnectionsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Disconnect vpn connections of virtual network gateway in the specified resource group. */ +export function disconnectVirtualNetworkGatewayVpnConnections( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + request: P2SVpnConnectionRequest, + options: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _disconnectVirtualNetworkGatewayVpnConnectionsDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _disconnectVirtualNetworkGatewayVpnConnectionsSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + request, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, void>; +} + +export function _getVpnclientConnectionHealthSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getVpnclientConnectionHealthDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnClientConnectionHealthDetailListResultDeserializer(result.body); +} + +/** Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. */ +export function getVpnclientConnectionHealth( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + VpnClientConnectionHealthDetailListResult +> { + return getLongRunningPoller( + context, + _getVpnclientConnectionHealthDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getVpnclientConnectionHealthSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + VpnClientConnectionHealthDetailListResult + >; +} + +export function _stopExpressRouteSiteFailoverSimulationSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopSiteFailoverTest{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: expressRouteFailoverStopApiParametersSerializer(stopParameters), + }); +} + +export async function _stopExpressRouteSiteFailoverSimulationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** This operation stops failover simulation on the gateway for the specified peering location */ +export function stopExpressRouteSiteFailoverSimulation( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse +> { + return getLongRunningPoller( + context, + _stopExpressRouteSiteFailoverSimulationDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopExpressRouteSiteFailoverSimulationSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + stopParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse + >; +} + +export function _startExpressRouteSiteFailoverSimulationSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startSiteFailoverTest{?api%2Dversion,peeringLocation}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + peeringLocation: peeringLocation, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _startExpressRouteSiteFailoverSimulationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** This operation starts failover simulation on the gateway for the specified peering location */ +export function startExpressRouteSiteFailoverSimulation( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse +> { + return getLongRunningPoller( + context, + _startExpressRouteSiteFailoverSimulationDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startExpressRouteSiteFailoverSimulationSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse + >; +} + +export function _getFailoverSingleTestDetailsSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverSingleTestDetails{?api%2Dversion,peeringLocation,failoverTestId}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + peeringLocation: peeringLocation, + failoverTestId: failoverTestId, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getFailoverSingleTestDetailsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteFailoverSingleTestDetailsArrayDeserializer(result.body); +} + +/** This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid */ +export function getFailoverSingleTestDetails( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + ExpressRouteFailoverSingleTestDetails[] +> { + return getLongRunningPoller( + context, + _getFailoverSingleTestDetailsDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getFailoverSingleTestDetailsSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + failoverTestId, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + ExpressRouteFailoverSingleTestDetails[] + >; +} + +export function _getFailoverAllTestDetailsSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverAllTestsDetails{?api%2Dversion,type,fetchLatest}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + type: typeParam, + fetchLatest: fetchLatest, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getFailoverAllTestDetailsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return expressRouteFailoverTestDetailsArrayDeserializer(result.body); +} + +/** This operation retrieves the details of all the failover tests performed on the gateway for different peering locations */ +export function getFailoverAllTestDetails( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteFailoverTestDetails[] +> { + return getLongRunningPoller( + context, + _getFailoverAllTestDetailsDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getFailoverAllTestDetailsSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + typeParam, + fetchLatest, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + ExpressRouteFailoverTestDetails[] + >; +} + +export function _stopPacketCaptureSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnPacketCaptureStopParameters, + options: VirtualNetworkGatewaysStopPacketCaptureOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnPacketCaptureStopParametersSerializer(parameters), + }); +} + +export async function _stopPacketCaptureDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Stops packet capture on virtual network gateway in the specified resource group. */ +export function stopPacketCapture( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnPacketCaptureStopParameters, + options: VirtualNetworkGatewaysStopPacketCaptureOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VirtualNetworkGatewaysStopPacketCaptureResponse +> { + return getLongRunningPoller(context, _stopPacketCaptureDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopPacketCaptureSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VirtualNetworkGatewaysStopPacketCaptureResponse + >; +} + +export function _startPacketCaptureSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysStartPacketCaptureOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.parameters + ? options?.parameters + : vpnPacketCaptureStartParametersSerializer(options?.parameters), + }); +} + +export async function _startPacketCaptureDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Starts packet capture on virtual network gateway in the specified resource group. */ +export function startPacketCapture( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysStartPacketCaptureOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VirtualNetworkGatewaysStartPacketCaptureResponse +> { + return getLongRunningPoller(context, _startPacketCaptureDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startPacketCaptureSend(context, resourceGroupName, virtualNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VirtualNetworkGatewaysStartPacketCaptureResponse + >; +} + +export function _getVpnclientIpsecParametersSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getVpnclientIpsecParametersDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnClientIPsecParametersDeserializer(result.body); +} + +/** The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. */ +export function getVpnclientIpsecParameters( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams = { requestOptions: {} }, +): PollerLike, VpnClientIPsecParameters> { + return getLongRunningPoller( + context, + _getVpnclientIpsecParametersDeserialize, + ["200", "201", "202"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getVpnclientIpsecParametersSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, VpnClientIPsecParameters>; +} + +export function _setVpnclientIpsecParametersSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + vpnclientIpsecParams: VpnClientIPsecParameters, + options: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnClientIPsecParametersSerializer(vpnclientIpsecParams), + }); +} + +export async function _setVpnclientIpsecParametersDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnClientIPsecParametersDeserializer(result.body); +} + +/** The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. */ +export function setVpnclientIpsecParameters( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + vpnclientIpsecParams: VpnClientIPsecParameters, + options: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams = { requestOptions: {} }, +): PollerLike, VpnClientIPsecParameters> { + return getLongRunningPoller( + context, + _setVpnclientIpsecParametersDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _setVpnclientIpsecParametersSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + vpnclientIpsecParams, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, VpnClientIPsecParameters>; +} + +export function _getRoutesInformationSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetRoutesInformationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getRoutesInformation{?api%2Dversion,attemptRefresh}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + attemptRefresh: options?.attemptRefresh, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getRoutesInformationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return gatewayRouteSetsInformationDeserializer(result.body); +} + +/** This operation retrieves the route set information for an Express Route Gateway based on their resiliency */ +export function getRoutesInformation( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetRoutesInformationOptionalParams = { requestOptions: {} }, +): PollerLike, GatewayRouteSetsInformation> { + return getLongRunningPoller(context, _getRoutesInformationDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getRoutesInformationSend(context, resourceGroupName, virtualNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, GatewayRouteSetsInformation>; +} + +export function _getResiliencyInformationSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getResiliencyInformation{?api%2Dversion,attemptRefresh}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + attemptRefresh: options?.attemptRefresh, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getResiliencyInformationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return gatewayResiliencyInformationDeserializer(result.body); +} + +/** This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score */ +export function getResiliencyInformation( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams = { requestOptions: {} }, +): PollerLike, GatewayResiliencyInformation> { + return getLongRunningPoller( + context, + _getResiliencyInformationDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getResiliencyInformationSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, GatewayResiliencyInformation>; +} + +export function _getAdvertisedRoutesSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + peer: string, + options: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes{?api%2Dversion,peer}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + peer: peer, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getAdvertisedRoutesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return gatewayRouteListResultDeserializer(result.body); +} + +/** This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. */ +export function getAdvertisedRoutes( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + peer: string, + options: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams = { requestOptions: {} }, +): PollerLike, GatewayRouteListResult> { + return getLongRunningPoller(context, _getAdvertisedRoutesDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getAdvertisedRoutesSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + peer, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, GatewayRouteListResult>; +} + +export function _getLearnedRoutesSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getLearnedRoutesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return gatewayRouteListResultDeserializer(result.body); +} + +/** This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. */ +export function getLearnedRoutes( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams = { requestOptions: {} }, +): PollerLike, GatewayRouteListResult> { + return getLongRunningPoller(context, _getLearnedRoutesDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getLearnedRoutesSend(context, resourceGroupName, virtualNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, GatewayRouteListResult>; +} + +export function _listRadiusSecretsSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysListRadiusSecretsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/listRadiusSecrets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listRadiusSecretsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return radiusAuthServerListResultDeserializer(result.body); +} + +/** List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. */ +export async function listRadiusSecrets( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysListRadiusSecretsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listRadiusSecretsSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + return _listRadiusSecretsDeserialize(result); +} + +export function _supportedVpnDevicesSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _supportedVpnDevicesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Gets a xml format representation for supported vpn devices. */ +export async function supportedVpnDevices( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _supportedVpnDevicesSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + return _supportedVpnDevicesDeserialize(result); +} + +export function _getBgpPeerStatusSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus{?api%2Dversion,peer}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + peer: options?.peer, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getBgpPeerStatusDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return bgpPeerStatusListResultDeserializer(result.body); +} + +/** The GetBgpPeerStatus operation retrieves the status of all BGP peers. */ +export function getBgpPeerStatus( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams = { requestOptions: {} }, +): PollerLike, BgpPeerStatusListResult> { + return getLongRunningPoller(context, _getBgpPeerStatusDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getBgpPeerStatusSend(context, resourceGroupName, virtualNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, BgpPeerStatusListResult>; +} + +export function _getVpnProfilePackageUrlSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getVpnProfilePackageUrlDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. */ +export function getVpnProfilePackageUrl( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse +> { + return getLongRunningPoller(context, _getVpnProfilePackageUrlDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getVpnProfilePackageUrlSend(context, resourceGroupName, virtualNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse + >; +} + +export function _generateVpnProfileSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnClientParametersSerializer(parameters), + }); +} + +export async function _generateVpnProfileDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. */ +export function generateVpnProfile( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VirtualNetworkGatewaysGenerateVpnProfileResponse +> { + return getLongRunningPoller(context, _generateVpnProfileDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _generateVpnProfileSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VirtualNetworkGatewaysGenerateVpnProfileResponse + >; +} + +export function _generatevpnclientpackageSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnClientParametersSerializer(parameters), + }); +} + +export async function _generatevpnclientpackageDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. */ +export function generatevpnclientpackage( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VirtualNetworkGatewaysGeneratevpnclientpackageResponse +> { + return getLongRunningPoller( + context, + _generatevpnclientpackageDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _generatevpnclientpackageSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike< + OperationState, + VirtualNetworkGatewaysGeneratevpnclientpackageResponse + >; +} + +export function _resetVpnClientSharedKeySend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _resetVpnClientSharedKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Resets the VPN client shared key of the virtual network gateway in the specified resource group. */ +export function resetVpnClientSharedKey( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _resetVpnClientSharedKeyDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _resetVpnClientSharedKeySend(context, resourceGroupName, virtualNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _resetSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysResetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset{?api%2Dversion,gatewayVip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + gatewayVip: options?.gatewayVip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _resetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkGatewayDeserializer(result.body); +} + +/** Resets the primary of the virtual network gateway in the specified resource group. */ +export function reset( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysResetOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetworkGateway> { + return getLongRunningPoller(context, _resetDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _resetSend(context, resourceGroupName, virtualNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualNetworkGateway>; +} + +export function _listConnectionsSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysListConnectionsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listConnectionsDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkGatewayListConnectionsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkGatewayListConnectionsResultDeserializer(result.body); +} + +/** Gets all the connections in a virtual network gateway. */ +export function listConnections( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysListConnectionsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listConnectionsSend(context, resourceGroupName, virtualNetworkGatewayName, options), + _listConnectionsDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: VirtualNetworkGatewaysListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkGatewayListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkGatewayListResultDeserializer(result.body); +} + +/** Gets all virtual network gateways by resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: VirtualNetworkGatewaysListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified virtual network gateway. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualNetworkGatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: TagsObject, + options: VirtualNetworkGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkGatewayDeserializer(result.body); +} + +/** Updates a virtual network gateway tags. */ +export function updateTags( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: TagsObject, + options: VirtualNetworkGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetworkGateway> { + return getLongRunningPoller(context, _updateTagsDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateTagsSend(context, resourceGroupName, virtualNetworkGatewayName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualNetworkGateway>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VirtualNetworkGateway, + options: VirtualNetworkGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualNetworkGatewaySerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkGatewayDeserializer(result.body); +} + +/** Creates or updates a virtual network gateway in the specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VirtualNetworkGateway, + options: VirtualNetworkGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetworkGateway> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualNetworkGateway>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkGatewayName: virtualNetworkGatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkGatewayDeserializer(result.body); +} + +/** Gets the specified virtual network gateway by resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualNetworkGatewayName: string, + options: VirtualNetworkGatewaysGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, virtualNetworkGatewayName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualNetworkGateways/options.ts b/sdk/network/arm-network/src/api/virtualNetworkGateways/options.ts new file mode 100644 index 000000000000..31988c24857d --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkGateways/options.ts @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { VpnPacketCaptureStartParameters } from "../../models/microsoft/network/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysStopPacketCaptureOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysStartPacketCaptureOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Virtual network gateway packet capture parameters supplied to start packet capture on gateway. */ + parameters?: VpnPacketCaptureStartParameters; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetRoutesInformationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Attempt to recalculate the Route Sets Information for the gateway */ + attemptRefresh?: boolean; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetResiliencyInformationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Attempt to recalculate the Resiliency Information for the gateway */ + attemptRefresh?: boolean; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetLearnedRoutesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysListRadiusSecretsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The IP address of the peer to retrieve the status of. */ + peer?: string; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGenerateVpnProfileOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysResetOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. */ + gatewayVip?: string; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysListConnectionsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysUpdateTagsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualNetworkPeerings/index.ts b/sdk/network/arm-network/src/api/virtualNetworkPeerings/index.ts new file mode 100644 index 000000000000..0a26035982e4 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkPeerings/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + VirtualNetworkPeeringsListOptionalParams, + VirtualNetworkPeeringsDeleteOptionalParams, + VirtualNetworkPeeringsCreateOrUpdateOptionalParams, + VirtualNetworkPeeringsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualNetworkPeerings/operations.ts b/sdk/network/arm-network/src/api/virtualNetworkPeerings/operations.ts new file mode 100644 index 000000000000..64a0b22068f4 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkPeerings/operations.ts @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + VirtualNetworkPeering, + virtualNetworkPeeringSerializer, + virtualNetworkPeeringDeserializer, +} from "../../models/common/models.js"; +import { + _VirtualNetworkPeeringListResult, + _virtualNetworkPeeringListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualNetworkPeeringsListOptionalParams, + VirtualNetworkPeeringsDeleteOptionalParams, + VirtualNetworkPeeringsCreateOrUpdateOptionalParams, + VirtualNetworkPeeringsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworkPeeringsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkPeeringListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkPeeringListResultDeserializer(result.body); +} + +/** Gets all virtual network peerings in a virtual network. */ +export function list( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworkPeeringsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, virtualNetworkName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options: VirtualNetworkPeeringsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + virtualNetworkPeeringName: virtualNetworkPeeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified virtual network peering. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options: VirtualNetworkPeeringsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + virtualNetworkName, + virtualNetworkPeeringName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + virtualNetworkPeeringParameters: VirtualNetworkPeering, + options: VirtualNetworkPeeringsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}{?api%2Dversion,syncRemoteAddressSpace}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + virtualNetworkPeeringName: virtualNetworkPeeringName, + "api%2Dversion": "2025-07-01", + syncRemoteAddressSpace: options?.syncRemoteAddressSpace, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualNetworkPeeringSerializer(virtualNetworkPeeringParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkPeeringDeserializer(result.body); +} + +/** Creates or updates a peering in the specified virtual network. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + virtualNetworkPeeringParameters: VirtualNetworkPeering, + options: VirtualNetworkPeeringsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetworkPeering> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualNetworkName, + virtualNetworkPeeringName, + virtualNetworkPeeringParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualNetworkPeering>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options: VirtualNetworkPeeringsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + virtualNetworkPeeringName: virtualNetworkPeeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkPeeringDeserializer(result.body); +} + +/** Gets the specified virtual network peering. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options: VirtualNetworkPeeringsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualNetworkName, + virtualNetworkPeeringName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualNetworkPeerings/options.ts b/sdk/network/arm-network/src/api/virtualNetworkPeerings/options.ts new file mode 100644 index 000000000000..e2113bb23d8a --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkPeerings/options.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { SyncRemoteAddressSpace } from "../../models/microsoft/network/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualNetworkPeeringsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkPeeringsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkPeeringsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Parameter indicates the intention to sync the peering with the current address space on the remote vNet after it's updated. */ + syncRemoteAddressSpace?: SyncRemoteAddressSpace; +} + +/** Optional parameters. */ +export interface VirtualNetworkPeeringsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualNetworkTaps/index.ts b/sdk/network/arm-network/src/api/virtualNetworkTaps/index.ts new file mode 100644 index 000000000000..1ef04d264329 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkTaps/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listAll, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VirtualNetworkTapsListAllOptionalParams, + VirtualNetworkTapsListByResourceGroupOptionalParams, + VirtualNetworkTapsDeleteOptionalParams, + VirtualNetworkTapsUpdateTagsOptionalParams, + VirtualNetworkTapsCreateOrUpdateOptionalParams, + VirtualNetworkTapsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualNetworkTaps/operations.ts b/sdk/network/arm-network/src/api/virtualNetworkTaps/operations.ts new file mode 100644 index 000000000000..bd41d98da410 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkTaps/operations.ts @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + VirtualNetworkTap, + virtualNetworkTapSerializer, + virtualNetworkTapDeserializer, +} from "../../models/common/models.js"; +import { TagsObject, tagsObjectSerializer } from "../../models/microsoft/network/models.js"; +import { + _VirtualNetworkTapListResult, + _virtualNetworkTapListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualNetworkTapsListAllOptionalParams, + VirtualNetworkTapsListByResourceGroupOptionalParams, + VirtualNetworkTapsDeleteOptionalParams, + VirtualNetworkTapsUpdateTagsOptionalParams, + VirtualNetworkTapsCreateOrUpdateOptionalParams, + VirtualNetworkTapsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: VirtualNetworkTapsListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkTapListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkTapListResultDeserializer(result.body); +} + +/** Gets all the VirtualNetworkTaps in a subscription. */ +export function listAll( + context: Client, + options: VirtualNetworkTapsListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VirtualNetworkTapsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkTapListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkTapListResultDeserializer(result.body); +} + +/** Gets all the VirtualNetworkTaps in a subscription. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: VirtualNetworkTapsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + tapName: string, + options: VirtualNetworkTapsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + tapName: tapName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete a VirtualNetworkTap */ +export function $delete( + context: Client, + resourceGroupName: string, + tapName: string, + options: VirtualNetworkTapsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, tapName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + tapName: string, + tapParameters: TagsObject, + options: VirtualNetworkTapsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + tapName: tapName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(tapParameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkTapDeserializer(result.body); +} + +/** Update a VirtualNetworkTap */ +export async function updateTags( + context: Client, + resourceGroupName: string, + tapName: string, + tapParameters: TagsObject, + options: VirtualNetworkTapsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend(context, resourceGroupName, tapName, tapParameters, options); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + tapName: string, + parameters: VirtualNetworkTap, + options: VirtualNetworkTapsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + tapName: tapName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualNetworkTapSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkTapDeserializer(result.body); +} + +/** Create a VirtualNetworkTap */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + tapName: string, + parameters: VirtualNetworkTap, + options: VirtualNetworkTapsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetworkTap> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, tapName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualNetworkTap>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + tapName: string, + options: VirtualNetworkTapsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + tapName: tapName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkTapDeserializer(result.body); +} + +/** Get a VirtualNetworkTap */ +export async function get( + context: Client, + resourceGroupName: string, + tapName: string, + options: VirtualNetworkTapsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, tapName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualNetworkTaps/options.ts b/sdk/network/arm-network/src/api/virtualNetworkTaps/options.ts new file mode 100644 index 000000000000..f8a1ea6e8be0 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworkTaps/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualNetworkTapsListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkTapsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkTapsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkTapsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworkTapsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworkTapsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualNetworks/index.ts b/sdk/network/arm-network/src/api/virtualNetworks/index.ts new file mode 100644 index 000000000000..023b2c00e68f --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworks/index.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listDdosProtectionStatus, + listUsage, + checkIPAddressAvailability, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VirtualNetworksListDdosProtectionStatusOptionalParams, + VirtualNetworksListUsageOptionalParams, + VirtualNetworksCheckIPAddressAvailabilityOptionalParams, + VirtualNetworksListAllOptionalParams, + VirtualNetworksListOptionalParams, + VirtualNetworksDeleteOptionalParams, + VirtualNetworksUpdateTagsOptionalParams, + VirtualNetworksCreateOrUpdateOptionalParams, + VirtualNetworksGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualNetworks/operations.ts b/sdk/network/arm-network/src/api/virtualNetworks/operations.ts new file mode 100644 index 000000000000..6314206b2b45 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworks/operations.ts @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + cloudErrorDeserializer, + VirtualNetwork, + virtualNetworkSerializer, + virtualNetworkDeserializer, +} from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + PublicIpDdosProtectionStatusResult, + IPAddressAvailabilityResult, + ipAddressAvailabilityResultDeserializer, + _VirtualNetworkListUsageResult, + _virtualNetworkListUsageResultDeserializer, + VirtualNetworkUsage, + _VirtualNetworkDdosProtectionStatusResult, + _virtualNetworkDdosProtectionStatusResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _VirtualNetworkListResult, + _virtualNetworkListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualNetworksListDdosProtectionStatusOptionalParams, + VirtualNetworksListUsageOptionalParams, + VirtualNetworksCheckIPAddressAvailabilityOptionalParams, + VirtualNetworksListAllOptionalParams, + VirtualNetworksListOptionalParams, + VirtualNetworksDeleteOptionalParams, + VirtualNetworksUpdateTagsOptionalParams, + VirtualNetworksCreateOrUpdateOptionalParams, + VirtualNetworksGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listDdosProtectionStatusSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksListDdosProtectionStatusOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/ddosProtectionStatus{?api%2Dversion,top,skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + "api%2Dversion": "2025-07-01", + top: options?.top, + skipToken: options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDdosProtectionStatusDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkDdosProtectionStatusResult> { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkDdosProtectionStatusResultDeserializer(result.body); +} + +/** Gets the Ddos Protection Status of all IP Addresses under the Virtual Network */ +export function listDdosProtectionStatus( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksListDdosProtectionStatusOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + const initialPagingPoller = getLongRunningPoller( + context, + async (result: PathUncheckedResponse) => result, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _listDdosProtectionStatusSend(context, resourceGroupName, virtualNetworkName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }, + ) as PollerLike, PathUncheckedResponse>; + + return buildPagedAsyncIterator( + context, + async () => await initialPagingPoller, + _listDdosProtectionStatusDeserialize, + ["200", "202", "201"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listUsageSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksListUsageOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listUsageDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkListUsageResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkListUsageResultDeserializer(result.body); +} + +/** Lists usage stats. */ +export function listUsage( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksListUsageOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listUsageSend(context, resourceGroupName, virtualNetworkName, options), + _listUsageDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _checkIPAddressAvailabilitySend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + ipAddress: string, + options: VirtualNetworksCheckIPAddressAvailabilityOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/checkIPAddressAvailability{?api%2Dversion,ipAddress}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + "api%2Dversion": "2025-07-01", + ipAddress: ipAddress, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _checkIPAddressAvailabilityDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return ipAddressAvailabilityResultDeserializer(result.body); +} + +/** Checks whether a private IP address is available for use. */ +export async function checkIPAddressAvailability( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + ipAddress: string, + options: VirtualNetworksCheckIPAddressAvailabilityOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _checkIPAddressAvailabilitySend( + context, + resourceGroupName, + virtualNetworkName, + ipAddress, + options, + ); + return _checkIPAddressAvailabilityDeserialize(result); +} + +export function _listAllSend( + context: Client, + options: VirtualNetworksListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkListResultDeserializer(result.body); +} + +/** Gets all virtual networks in a subscription. */ +export function listAll( + context: Client, + options: VirtualNetworksListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: VirtualNetworksListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _virtualNetworkListResultDeserializer(result.body); +} + +/** Gets all virtual networks in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: VirtualNetworksListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified virtual network. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, virtualNetworkName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + parameters: TagsObject, + options: VirtualNetworksUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(parameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkDeserializer(result.body); +} + +/** Updates a virtual network tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + parameters: TagsObject, + options: VirtualNetworksUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + virtualNetworkName, + parameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + parameters: VirtualNetwork, + options: VirtualNetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualNetworkSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkDeserializer(result.body); +} + +/** Creates or updates a virtual network in the specified resource group. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + parameters: VirtualNetwork, + options: VirtualNetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetwork> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, virtualNetworkName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualNetwork>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualNetworkName: virtualNetworkName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualNetworkDeserializer(result.body); +} + +/** Gets the specified virtual network by resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, virtualNetworkName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualNetworks/options.ts b/sdk/network/arm-network/src/api/virtualNetworks/options.ts new file mode 100644 index 000000000000..154dd57a60b6 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualNetworks/options.ts @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualNetworksListDdosProtectionStatusOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The max number of ip addresses to return. */ + top?: number; + /** The skipToken that is given with nextLink. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface VirtualNetworksListUsageOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworksCheckIPAddressAvailabilityOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworksListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworksListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworksDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworksUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworksCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworksGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/virtualRouterPeerings/index.ts b/sdk/network/arm-network/src/api/virtualRouterPeerings/index.ts new file mode 100644 index 000000000000..4230b1c7dc86 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualRouterPeerings/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + VirtualRouterPeeringsListOptionalParams, + VirtualRouterPeeringsDeleteOptionalParams, + VirtualRouterPeeringsCreateOrUpdateOptionalParams, + VirtualRouterPeeringsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualRouterPeerings/operations.ts b/sdk/network/arm-network/src/api/virtualRouterPeerings/operations.ts new file mode 100644 index 000000000000..ab8ecf16437f --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualRouterPeerings/operations.ts @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + errorDeserializer, + VirtualRouterPeering, + virtualRouterPeeringSerializer, + virtualRouterPeeringDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _VirtualRouterPeeringListResult, + _virtualRouterPeeringListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualRouterPeeringsListOptionalParams, + VirtualRouterPeeringsDeleteOptionalParams, + VirtualRouterPeeringsCreateOrUpdateOptionalParams, + VirtualRouterPeeringsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + options: VirtualRouterPeeringsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualRouterName: virtualRouterName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualRouterPeeringListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return _virtualRouterPeeringListResultDeserializer(result.body); +} + +/** Lists all Virtual Router Peerings in a Virtual Router resource. */ +export function list( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + options: VirtualRouterPeeringsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, virtualRouterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options: VirtualRouterPeeringsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualRouterName: virtualRouterName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified peering from a Virtual Router. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options: VirtualRouterPeeringsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualRouterName, peeringName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + parameters: VirtualRouterPeering, + options: VirtualRouterPeeringsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualRouterName: virtualRouterName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualRouterPeeringSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return virtualRouterPeeringDeserializer(result.body); +} + +/** Creates or updates the specified Virtual Router Peering. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + parameters: VirtualRouterPeering, + options: VirtualRouterPeeringsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualRouterPeering> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualRouterName, + peeringName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualRouterPeering>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options: VirtualRouterPeeringsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualRouterName: virtualRouterName, + peeringName: peeringName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return virtualRouterPeeringDeserializer(result.body); +} + +/** Gets the specified Virtual Router Peering. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options: VirtualRouterPeeringsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualRouterName, + peeringName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualRouterPeerings/options.ts b/sdk/network/arm-network/src/api/virtualRouterPeerings/options.ts new file mode 100644 index 000000000000..a7388337b61e --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualRouterPeerings/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualRouterPeeringsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualRouterPeeringsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualRouterPeeringsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualRouterPeeringsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/virtualRouters/index.ts b/sdk/network/arm-network/src/api/virtualRouters/index.ts new file mode 100644 index 000000000000..896f17dc647e --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualRouters/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, listByResourceGroup, $delete, createOrUpdate, get } from "./operations.js"; +export type { + VirtualRoutersListOptionalParams, + VirtualRoutersListByResourceGroupOptionalParams, + VirtualRoutersDeleteOptionalParams, + VirtualRoutersCreateOrUpdateOptionalParams, + VirtualRoutersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualRouters/operations.ts b/sdk/network/arm-network/src/api/virtualRouters/operations.ts new file mode 100644 index 000000000000..90a1d1422294 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualRouters/operations.ts @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { + errorDeserializer, + VirtualRouter, + virtualRouterSerializer, + virtualRouterDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + _VirtualRouterListResult, + _virtualRouterListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualRoutersListOptionalParams, + VirtualRoutersListByResourceGroupOptionalParams, + VirtualRoutersDeleteOptionalParams, + VirtualRoutersCreateOrUpdateOptionalParams, + VirtualRoutersGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + options: VirtualRoutersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualRouterListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return _virtualRouterListResultDeserializer(result.body); +} + +/** Gets all the Virtual Routers in a subscription. */ +export function list( + context: Client, + options: VirtualRoutersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VirtualRoutersListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualRouterListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return _virtualRouterListResultDeserializer(result.body); +} + +/** Lists all Virtual Routers in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: VirtualRoutersListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + options: VirtualRoutersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualRouterName: virtualRouterName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Virtual Router. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + options: VirtualRoutersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, virtualRouterName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + parameters: VirtualRouter, + options: VirtualRoutersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualRouterName: virtualRouterName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualRouterSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return virtualRouterDeserializer(result.body); +} + +/** Creates or updates the specified Virtual Router. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + parameters: VirtualRouter, + options: VirtualRoutersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualRouter> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, virtualRouterName, parameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualRouter>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + options: VirtualRoutersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualRouterName: virtualRouterName, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorDeserializer(result.body); + + throw error; + } + + return virtualRouterDeserializer(result.body); +} + +/** Gets the specified Virtual Router. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualRouterName: string, + options: VirtualRoutersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, virtualRouterName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualRouters/options.ts b/sdk/network/arm-network/src/api/virtualRouters/options.ts new file mode 100644 index 000000000000..2e52da4b46b9 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualRouters/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualRoutersListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualRoutersListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualRoutersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualRoutersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualRoutersGetOptionalParams extends OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/api/virtualWans/index.ts b/sdk/network/arm-network/src/api/virtualWans/index.ts new file mode 100644 index 000000000000..047cf9e7c217 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualWans/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VirtualWansListOptionalParams, + VirtualWansListByResourceGroupOptionalParams, + VirtualWansDeleteOptionalParams, + VirtualWansUpdateTagsOptionalParams, + VirtualWansCreateOrUpdateOptionalParams, + VirtualWansGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/virtualWans/operations.ts b/sdk/network/arm-network/src/api/virtualWans/operations.ts new file mode 100644 index 000000000000..444f85d6ceee --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualWans/operations.ts @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + VirtualWAN, + virtualWANSerializer, + virtualWANDeserializer, + _ListVirtualWANsResult, + _listVirtualWANsResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualWansListOptionalParams, + VirtualWansListByResourceGroupOptionalParams, + VirtualWansDeleteOptionalParams, + VirtualWansUpdateTagsOptionalParams, + VirtualWansCreateOrUpdateOptionalParams, + VirtualWansGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + options: VirtualWansListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVirtualWANsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVirtualWANsResultDeserializer(result.body); +} + +/** Lists all the VirtualWANs in a subscription. */ +export function list( + context: Client, + options: VirtualWansListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VirtualWansListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVirtualWANsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVirtualWANsResultDeserializer(result.body); +} + +/** Lists all the VirtualWANs in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: VirtualWansListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualWANName: string, + options: VirtualWansDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + VirtualWANName: virtualWANName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a VirtualWAN. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualWANName: string, + options: VirtualWansDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, virtualWANName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + virtualWANName: string, + wanParameters: TagsObject, + options: VirtualWansUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + VirtualWANName: virtualWANName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(wanParameters), + }); +} + +export async function _updateTagsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualWANDeserializer(result.body); +} + +/** Updates a VirtualWAN tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + virtualWANName: string, + wanParameters: TagsObject, + options: VirtualWansUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + virtualWANName, + wanParameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualWANName: string, + wanParameters: VirtualWAN, + options: VirtualWansCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + VirtualWANName: virtualWANName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: virtualWANSerializer(wanParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualWANDeserializer(result.body); +} + +/** Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualWANName: string, + wanParameters: VirtualWAN, + options: VirtualWansCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualWAN> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, virtualWANName, wanParameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VirtualWAN>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualWANName: string, + options: VirtualWansGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + VirtualWANName: virtualWANName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return virtualWANDeserializer(result.body); +} + +/** Retrieves the details of a VirtualWAN. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualWANName: string, + options: VirtualWansGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, virtualWANName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/virtualWans/options.ts b/sdk/network/arm-network/src/api/virtualWans/options.ts new file mode 100644 index 000000000000..156f448f3cb1 --- /dev/null +++ b/sdk/network/arm-network/src/api/virtualWans/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualWansListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualWansListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualWansDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualWansUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualWansCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualWansGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/vpnConnections/index.ts b/sdk/network/arm-network/src/api/vpnConnections/index.ts new file mode 100644 index 000000000000..2f4e45810563 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnConnections/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listByVpnGateway, + stopPacketCapture, + startPacketCapture, + $delete, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VpnConnectionsListByVpnGatewayOptionalParams, + VpnConnectionsStopPacketCaptureOptionalParams, + VpnConnectionsStartPacketCaptureOptionalParams, + VpnConnectionsDeleteOptionalParams, + VpnConnectionsCreateOrUpdateOptionalParams, + VpnConnectionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/vpnConnections/operations.ts b/sdk/network/arm-network/src/api/vpnConnections/operations.ts new file mode 100644 index 000000000000..c13efbb77ab1 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnConnections/operations.ts @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + VpnConnection, + vpnConnectionSerializer, + vpnConnectionDeserializer, + vpnConnectionPacketCaptureStartParametersSerializer, + vpnConnectionPacketCaptureStopParametersSerializer, + _ListVpnConnectionsResult, + _listVpnConnectionsResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + VpnConnectionsStopPacketCaptureResponse, + VpnConnectionsStartPacketCaptureResponse, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VpnConnectionsListByVpnGatewayOptionalParams, + VpnConnectionsStopPacketCaptureOptionalParams, + VpnConnectionsStartPacketCaptureOptionalParams, + VpnConnectionsDeleteOptionalParams, + VpnConnectionsCreateOrUpdateOptionalParams, + VpnConnectionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByVpnGatewaySend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnConnectionsListByVpnGatewayOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByVpnGatewayDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVpnConnectionsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVpnConnectionsResultDeserializer(result.body); +} + +/** Retrieves all vpn connections for a particular virtual wan vpn gateway. */ +export function listByVpnGateway( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnConnectionsListByVpnGatewayOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByVpnGatewaySend(context, resourceGroupName, gatewayName, options), + _listByVpnGatewayDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _stopPacketCaptureSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options: VpnConnectionsStopPacketCaptureOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + vpnConnectionName: vpnConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.parameters + ? options?.parameters + : vpnConnectionPacketCaptureStopParametersSerializer(options?.parameters), + }); +} + +export async function _stopPacketCaptureDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Stops packet capture on Vpn connection in the specified resource group. */ +export function stopPacketCapture( + context: Client, + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options: VpnConnectionsStopPacketCaptureOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VpnConnectionsStopPacketCaptureResponse +> { + return getLongRunningPoller(context, _stopPacketCaptureDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopPacketCaptureSend(context, resourceGroupName, gatewayName, vpnConnectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VpnConnectionsStopPacketCaptureResponse + >; +} + +export function _startPacketCaptureSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options: VpnConnectionsStartPacketCaptureOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + vpnConnectionName: vpnConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.parameters + ? options?.parameters + : vpnConnectionPacketCaptureStartParametersSerializer(options?.parameters), + }); +} + +export async function _startPacketCaptureDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Starts packet capture on Vpn connection in the specified resource group. */ +export function startPacketCapture( + context: Client, + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options: VpnConnectionsStartPacketCaptureOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VpnConnectionsStartPacketCaptureResponse +> { + return getLongRunningPoller(context, _startPacketCaptureDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startPacketCaptureSend(context, resourceGroupName, gatewayName, vpnConnectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VpnConnectionsStartPacketCaptureResponse + >; +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options: VpnConnectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a vpn connection. */ +export function $delete( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options: VpnConnectionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, gatewayName, connectionName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + vpnConnectionParameters: VpnConnection, + options: VpnConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnConnectionSerializer(vpnConnectionParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnConnectionDeserializer(result.body); +} + +/** Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + vpnConnectionParameters: VpnConnection, + options: VpnConnectionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VpnConnection> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + gatewayName, + connectionName, + vpnConnectionParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VpnConnection>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options: VpnConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnConnectionDeserializer(result.body); +} + +/** Retrieves the details of a vpn connection. */ +export async function get( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options: VpnConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, gatewayName, connectionName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/vpnConnections/options.ts b/sdk/network/arm-network/src/api/vpnConnections/options.ts new file mode 100644 index 000000000000..d07c1e6de2c9 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnConnections/options.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + VpnConnectionPacketCaptureStartParameters, + VpnConnectionPacketCaptureStopParameters, +} from "../../models/microsoft/network/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VpnConnectionsListByVpnGatewayOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnConnectionsStopPacketCaptureOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. */ + parameters?: VpnConnectionPacketCaptureStopParameters; +} + +/** Optional parameters. */ +export interface VpnConnectionsStartPacketCaptureOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Vpn Connection packet capture parameters supplied to start packet capture on gateway connection. */ + parameters?: VpnConnectionPacketCaptureStartParameters; +} + +/** Optional parameters. */ +export interface VpnConnectionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnConnectionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnConnectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/vpnGateways/index.ts b/sdk/network/arm-network/src/api/vpnGateways/index.ts new file mode 100644 index 000000000000..06880e138655 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnGateways/index.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + stopPacketCapture, + startPacketCapture, + reset, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VpnGatewaysStopPacketCaptureOptionalParams, + VpnGatewaysStartPacketCaptureOptionalParams, + VpnGatewaysResetOptionalParams, + VpnGatewaysListOptionalParams, + VpnGatewaysListByResourceGroupOptionalParams, + VpnGatewaysDeleteOptionalParams, + VpnGatewaysUpdateTagsOptionalParams, + VpnGatewaysCreateOrUpdateOptionalParams, + VpnGatewaysGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/vpnGateways/operations.ts b/sdk/network/arm-network/src/api/vpnGateways/operations.ts new file mode 100644 index 000000000000..b71c85a26f9e --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnGateways/operations.ts @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + VpnGateway, + vpnGatewaySerializer, + vpnGatewayDeserializer, + _ListVpnGatewaysResult, + _listVpnGatewaysResultDeserializer, + vpnGatewayPacketCaptureStartParametersSerializer, + vpnGatewayPacketCaptureStopParametersSerializer, +} from "../../models/microsoft/network/models.js"; +import { + VpnGatewaysStopPacketCaptureResponse, + VpnGatewaysStartPacketCaptureResponse, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VpnGatewaysStopPacketCaptureOptionalParams, + VpnGatewaysStartPacketCaptureOptionalParams, + VpnGatewaysResetOptionalParams, + VpnGatewaysListOptionalParams, + VpnGatewaysListByResourceGroupOptionalParams, + VpnGatewaysDeleteOptionalParams, + VpnGatewaysUpdateTagsOptionalParams, + VpnGatewaysCreateOrUpdateOptionalParams, + VpnGatewaysGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _stopPacketCaptureSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnGatewaysStopPacketCaptureOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.parameters + ? options?.parameters + : vpnGatewayPacketCaptureStopParametersSerializer(options?.parameters), + }); +} + +export async function _stopPacketCaptureDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Stops packet capture on vpn gateway in the specified resource group. */ +export function stopPacketCapture( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnGatewaysStopPacketCaptureOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VpnGatewaysStopPacketCaptureResponse +> { + return getLongRunningPoller(context, _stopPacketCaptureDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopPacketCaptureSend(context, resourceGroupName, gatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VpnGatewaysStopPacketCaptureResponse + >; +} + +export function _startPacketCaptureSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnGatewaysStartPacketCaptureOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.parameters + ? options?.parameters + : vpnGatewayPacketCaptureStartParametersSerializer(options?.parameters), + }); +} + +export async function _startPacketCaptureDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Starts packet capture on vpn gateway in the specified resource group. */ +export function startPacketCapture( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnGatewaysStartPacketCaptureOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VpnGatewaysStartPacketCaptureResponse +> { + return getLongRunningPoller(context, _startPacketCaptureDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startPacketCaptureSend(context, resourceGroupName, gatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VpnGatewaysStartPacketCaptureResponse + >; +} + +export function _resetSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnGatewaysResetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset{?api%2Dversion,ipConfigurationId}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + ipConfigurationId: options?.ipConfigurationId, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _resetDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnGatewayDeserializer(result.body); +} + +/** Resets the primary of the vpn gateway in the specified resource group. */ +export function reset( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnGatewaysResetOptionalParams = { requestOptions: {} }, +): PollerLike, VpnGateway> { + return getLongRunningPoller(context, _resetDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _resetSend(context, resourceGroupName, gatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, VpnGateway>; +} + +export function _listSend( + context: Client, + options: VpnGatewaysListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVpnGatewaysResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVpnGatewaysResultDeserializer(result.body); +} + +/** Lists all the VpnGateways in a subscription. */ +export function list( + context: Client, + options: VpnGatewaysListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VpnGatewaysListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVpnGatewaysResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVpnGatewaysResultDeserializer(result.body); +} + +/** Lists all the VpnGateways in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: VpnGatewaysListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnGatewaysDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a virtual wan vpn gateway. */ +export function $delete( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnGatewaysDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, gatewayName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: TagsObject, + options: VpnGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(vpnGatewayParameters), + }); +} + +export async function _updateTagsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnGatewayDeserializer(result.body); +} + +/** Updates virtual wan vpn gateway tags. */ +export function updateTags( + context: Client, + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: TagsObject, + options: VpnGatewaysUpdateTagsOptionalParams = { requestOptions: {} }, +): PollerLike, VpnGateway> { + return getLongRunningPoller(context, _updateTagsDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateTagsSend(context, resourceGroupName, gatewayName, vpnGatewayParameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VpnGateway>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: VpnGateway, + options: VpnGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnGatewaySerializer(vpnGatewayParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnGatewayDeserializer(result.body); +} + +/** Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: VpnGateway, + options: VpnGatewaysCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VpnGateway> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, gatewayName, vpnGatewayParameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VpnGateway>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnGatewaysGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnGatewayDeserializer(result.body); +} + +/** Retrieves the details of a virtual wan vpn gateway. */ +export async function get( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: VpnGatewaysGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, gatewayName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/vpnGateways/options.ts b/sdk/network/arm-network/src/api/vpnGateways/options.ts new file mode 100644 index 000000000000..9591db43d242 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnGateways/options.ts @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + VpnGatewayPacketCaptureStartParameters, + VpnGatewayPacketCaptureStopParameters, +} from "../../models/microsoft/network/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VpnGatewaysStopPacketCaptureOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Vpn gateway packet capture parameters supplied to stop packet capture on vpn gateway. */ + parameters?: VpnGatewayPacketCaptureStopParameters; +} + +/** Optional parameters. */ +export interface VpnGatewaysStartPacketCaptureOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Vpn gateway packet capture parameters supplied to start packet capture on vpn gateway. */ + parameters?: VpnGatewayPacketCaptureStartParameters; +} + +/** Optional parameters. */ +export interface VpnGatewaysResetOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** VpnGateway ipConfigurationId to specify the gateway instance. */ + ipConfigurationId?: string; +} + +/** Optional parameters. */ +export interface VpnGatewaysListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnGatewaysListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnGatewaysDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnGatewaysUpdateTagsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnGatewaysCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnGatewaysGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/vpnLinkConnections/index.ts b/sdk/network/arm-network/src/api/vpnLinkConnections/index.ts new file mode 100644 index 000000000000..ea193c64e74d --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnLinkConnections/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + getIkeSas, + resetConnection, + listByVpnConnection, + listDefaultSharedKey, + listAllSharedKeys, + setOrInitDefaultSharedKey, + getDefaultSharedKey, +} from "./operations.js"; +export type { + VpnLinkConnectionsGetIkeSasOptionalParams, + VpnLinkConnectionsResetConnectionOptionalParams, + VpnLinkConnectionsListByVpnConnectionOptionalParams, + VpnLinkConnectionsListDefaultSharedKeyOptionalParams, + VpnLinkConnectionsListAllSharedKeysOptionalParams, + VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, + VpnLinkConnectionsGetDefaultSharedKeyOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/vpnLinkConnections/operations.ts b/sdk/network/arm-network/src/api/vpnLinkConnections/operations.ts new file mode 100644 index 000000000000..7ec7dce05843 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnLinkConnections/operations.ts @@ -0,0 +1,504 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + errorResponseDeserializer, + VpnSiteLinkConnection, + ConnectionSharedKeyResult, + connectionSharedKeyResultSerializer, + connectionSharedKeyResultDeserializer, + _ConnectionSharedKeyResultList, + _connectionSharedKeyResultListDeserializer, + _ListVpnSiteLinkConnectionsResult, + _listVpnSiteLinkConnectionsResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { VpnLinkConnectionsGetIkeSasResponse } from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VpnLinkConnectionsGetIkeSasOptionalParams, + VpnLinkConnectionsResetConnectionOptionalParams, + VpnLinkConnectionsListByVpnConnectionOptionalParams, + VpnLinkConnectionsListDefaultSharedKeyOptionalParams, + VpnLinkConnectionsListAllSharedKeysOptionalParams, + VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, + VpnLinkConnectionsGetDefaultSharedKeyOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getIkeSasSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnLinkConnectionsGetIkeSasOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + connectionName: connectionName, + linkConnectionName: linkConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getIkeSasDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return { body: result.body }; +} + +/** Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. */ +export function getIkeSas( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnLinkConnectionsGetIkeSasOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + VpnLinkConnectionsGetIkeSasResponse +> { + return getLongRunningPoller(context, _getIkeSasDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _getIkeSasSend( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VpnLinkConnectionsGetIkeSasResponse + >; +} + +export function _resetConnectionSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnLinkConnectionsResetConnectionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + connectionName: connectionName, + linkConnectionName: linkConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _resetConnectionDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Resets the VpnLink connection specified. */ +export function resetConnection( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnLinkConnectionsResetConnectionOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _resetConnectionDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _resetConnectionSend( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _listByVpnConnectionSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options: VpnLinkConnectionsListByVpnConnectionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + connectionName: connectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByVpnConnectionDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVpnSiteLinkConnectionsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVpnSiteLinkConnectionsResultDeserializer(result.body); +} + +/** Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. */ +export function listByVpnConnection( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options: VpnLinkConnectionsListByVpnConnectionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByVpnConnectionSend(context, resourceGroupName, gatewayName, connectionName, options), + _listByVpnConnectionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listDefaultSharedKeySend( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnLinkConnectionsListDefaultSharedKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys/default/listSharedKey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + connectionName: connectionName, + linkConnectionName: linkConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDefaultSharedKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return connectionSharedKeyResultDeserializer(result.body); +} + +/** Gets the value of the shared key of VpnLink connection specified. */ +export async function listDefaultSharedKey( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnLinkConnectionsListDefaultSharedKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listDefaultSharedKeySend( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ); + return _listDefaultSharedKeyDeserialize(result); +} + +export function _listAllSharedKeysSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnLinkConnectionsListAllSharedKeysOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + connectionName: connectionName, + linkConnectionName: linkConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllSharedKeysDeserialize( + result: PathUncheckedResponse, +): Promise<_ConnectionSharedKeyResultList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _connectionSharedKeyResultListDeserializer(result.body); +} + +/** Lists all shared keys of VpnLink connection specified. */ +export function listAllSharedKeys( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnLinkConnectionsListAllSharedKeysOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listAllSharedKeysSend( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ), + _listAllSharedKeysDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _setOrInitDefaultSharedKeySend( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + connectionSharedKeyParameters: ConnectionSharedKeyResult, + options: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + connectionName: connectionName, + linkConnectionName: linkConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: connectionSharedKeyResultSerializer(connectionSharedKeyParameters), + }); +} + +export async function _setOrInitDefaultSharedKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return connectionSharedKeyResultDeserializer(result.body); +} + +/** Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. */ +export function setOrInitDefaultSharedKey( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + connectionSharedKeyParameters: ConnectionSharedKeyResult, + options: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams = { requestOptions: {} }, +): PollerLike, ConnectionSharedKeyResult> { + return getLongRunningPoller( + context, + _setOrInitDefaultSharedKeyDeserialize, + ["200", "201", "202"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _setOrInitDefaultSharedKeySend( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + connectionSharedKeyParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }, + ) as PollerLike, ConnectionSharedKeyResult>; +} + +export function _getDefaultSharedKeySend( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnLinkConnectionsGetDefaultSharedKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + connectionName: connectionName, + linkConnectionName: linkConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDefaultSharedKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return connectionSharedKeyResultDeserializer(result.body); +} + +/** Gets the shared key of VpnLink connection specified. */ +export async function getDefaultSharedKey( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnLinkConnectionsGetDefaultSharedKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getDefaultSharedKeySend( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ); + return _getDefaultSharedKeyDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/vpnLinkConnections/options.ts b/sdk/network/arm-network/src/api/vpnLinkConnections/options.ts new file mode 100644 index 000000000000..aae42b6973d5 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnLinkConnections/options.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VpnLinkConnectionsGetIkeSasOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnLinkConnectionsResetConnectionOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnLinkConnectionsListByVpnConnectionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnLinkConnectionsListDefaultSharedKeyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnLinkConnectionsListAllSharedKeysOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnLinkConnectionsGetDefaultSharedKeyOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/vpnServerConfigurations/index.ts b/sdk/network/arm-network/src/api/vpnServerConfigurations/index.ts new file mode 100644 index 000000000000..e0d1df1de563 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnServerConfigurations/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listRadiusSecrets, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VpnServerConfigurationsListRadiusSecretsOptionalParams, + VpnServerConfigurationsListOptionalParams, + VpnServerConfigurationsListByResourceGroupOptionalParams, + VpnServerConfigurationsDeleteOptionalParams, + VpnServerConfigurationsUpdateTagsOptionalParams, + VpnServerConfigurationsCreateOrUpdateOptionalParams, + VpnServerConfigurationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/vpnServerConfigurations/operations.ts b/sdk/network/arm-network/src/api/vpnServerConfigurations/operations.ts new file mode 100644 index 000000000000..447e059424a2 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnServerConfigurations/operations.ts @@ -0,0 +1,414 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + RadiusAuthServerListResult, + radiusAuthServerListResultDeserializer, + VpnServerConfiguration, + vpnServerConfigurationSerializer, + vpnServerConfigurationDeserializer, + _ListVpnServerConfigurationsResult, + _listVpnServerConfigurationsResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VpnServerConfigurationsListRadiusSecretsOptionalParams, + VpnServerConfigurationsListOptionalParams, + VpnServerConfigurationsListByResourceGroupOptionalParams, + VpnServerConfigurationsDeleteOptionalParams, + VpnServerConfigurationsUpdateTagsOptionalParams, + VpnServerConfigurationsCreateOrUpdateOptionalParams, + VpnServerConfigurationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listRadiusSecretsSend( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + options: VpnServerConfigurationsListRadiusSecretsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/listRadiusSecrets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnServerConfigurationName: vpnServerConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listRadiusSecretsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return radiusAuthServerListResultDeserializer(result.body); +} + +/** List all Radius servers with respective radius secrets from VpnServerConfiguration. */ +export async function listRadiusSecrets( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + options: VpnServerConfigurationsListRadiusSecretsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listRadiusSecretsSend( + context, + resourceGroupName, + vpnServerConfigurationName, + options, + ); + return _listRadiusSecretsDeserialize(result); +} + +export function _listSend( + context: Client, + options: VpnServerConfigurationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVpnServerConfigurationsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVpnServerConfigurationsResultDeserializer(result.body); +} + +/** Lists all the VpnServerConfigurations in a subscription. */ +export function list( + context: Client, + options: VpnServerConfigurationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VpnServerConfigurationsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVpnServerConfigurationsResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVpnServerConfigurationsResultDeserializer(result.body); +} + +/** Lists all the vpnServerConfigurations in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: VpnServerConfigurationsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + options: VpnServerConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnServerConfigurationName: vpnServerConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a VpnServerConfiguration. */ +export function $delete( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + options: VpnServerConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, vpnServerConfigurationName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: TagsObject, + options: VpnServerConfigurationsUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnServerConfigurationName: vpnServerConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(vpnServerConfigurationParameters), + }); +} + +export async function _updateTagsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnServerConfigurationDeserializer(result.body); +} + +/** Updates VpnServerConfiguration tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: TagsObject, + options: VpnServerConfigurationsUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + vpnServerConfigurationName, + vpnServerConfigurationParameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: VpnServerConfiguration, + options: VpnServerConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnServerConfigurationName: vpnServerConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnServerConfigurationSerializer(vpnServerConfigurationParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnServerConfigurationDeserializer(result.body); +} + +/** Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: VpnServerConfiguration, + options: VpnServerConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VpnServerConfiguration> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + vpnServerConfigurationName, + vpnServerConfigurationParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VpnServerConfiguration>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + options: VpnServerConfigurationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnServerConfigurationName: vpnServerConfigurationName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnServerConfigurationDeserializer(result.body); +} + +/** Retrieves the details of a VpnServerConfiguration. */ +export async function get( + context: Client, + resourceGroupName: string, + vpnServerConfigurationName: string, + options: VpnServerConfigurationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, vpnServerConfigurationName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/vpnServerConfigurations/options.ts b/sdk/network/arm-network/src/api/vpnServerConfigurations/options.ts new file mode 100644 index 000000000000..b2488760480e --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnServerConfigurations/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VpnServerConfigurationsListRadiusSecretsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnServerConfigurationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnServerConfigurationsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnServerConfigurationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnServerConfigurationsUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnServerConfigurationsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnServerConfigurationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/index.ts b/sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/index.ts new file mode 100644 index 000000000000..4cc613566698 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/operations.ts b/sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/operations.ts new file mode 100644 index 000000000000..d0e6863c21f6 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/operations.ts @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + VpnServerConfigurationsResponse, + vpnServerConfigurationsResponseDeserializer, +} from "../../models/microsoft/network/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + virtualWANName: string, + options: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualWANName: virtualWANName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnServerConfigurationsResponseDeserializer(result.body); +} + +/** Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + virtualWANName: string, + options: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams = { + requestOptions: {}, + }, +): PollerLike, VpnServerConfigurationsResponse> { + return getLongRunningPoller(context, _listDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _listSend(context, resourceGroupName, virtualWANName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike< + OperationState, + VpnServerConfigurationsResponse + >; +} diff --git a/sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/options.ts b/sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/options.ts new file mode 100644 index 000000000000..1eabc7e6df65 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnServerConfigurationsAssociatedWithVirtualWan/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/network/arm-network/src/api/vpnSiteLinkConnections/index.ts b/sdk/network/arm-network/src/api/vpnSiteLinkConnections/index.ts new file mode 100644 index 000000000000..7a6386bd4475 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSiteLinkConnections/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get } from "./operations.js"; +export type { VpnSiteLinkConnectionsGetOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/vpnSiteLinkConnections/operations.ts b/sdk/network/arm-network/src/api/vpnSiteLinkConnections/operations.ts new file mode 100644 index 000000000000..c927f3ff19f0 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSiteLinkConnections/operations.ts @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + VpnSiteLinkConnection, + vpnSiteLinkConnectionDeserializer, +} from "../../models/microsoft/network/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { VpnSiteLinkConnectionsGetOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnSiteLinkConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + connectionName: connectionName, + linkConnectionName: linkConnectionName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnSiteLinkConnectionDeserializer(result.body); +} + +/** Retrieves the details of a vpn site link connection. */ +export async function get( + context: Client, + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options: VpnSiteLinkConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/vpnSiteLinkConnections/options.ts b/sdk/network/arm-network/src/api/vpnSiteLinkConnections/options.ts new file mode 100644 index 000000000000..686ae94ce16b --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSiteLinkConnections/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VpnSiteLinkConnectionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/vpnSiteLinks/index.ts b/sdk/network/arm-network/src/api/vpnSiteLinks/index.ts new file mode 100644 index 000000000000..8b226e1185b3 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSiteLinks/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByVpnSite, get } from "./operations.js"; +export type { + VpnSiteLinksListByVpnSiteOptionalParams, + VpnSiteLinksGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/vpnSiteLinks/operations.ts b/sdk/network/arm-network/src/api/vpnSiteLinks/operations.ts new file mode 100644 index 000000000000..190ef67e53ff --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSiteLinks/operations.ts @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + VpnSiteLink, + vpnSiteLinkDeserializer, + _ListVpnSiteLinksResult, + _listVpnSiteLinksResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VpnSiteLinksListByVpnSiteOptionalParams, + VpnSiteLinksGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByVpnSiteSend( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + options: VpnSiteLinksListByVpnSiteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnSiteName: vpnSiteName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByVpnSiteDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVpnSiteLinksResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVpnSiteLinksResultDeserializer(result.body); +} + +/** Lists all the vpnSiteLinks in a resource group for a vpn site. */ +export function listByVpnSite( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + options: VpnSiteLinksListByVpnSiteOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByVpnSiteSend(context, resourceGroupName, vpnSiteName, options), + _listByVpnSiteDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + vpnSiteLinkName: string, + options: VpnSiteLinksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnSiteName: vpnSiteName, + vpnSiteLinkName: vpnSiteLinkName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnSiteLinkDeserializer(result.body); +} + +/** Retrieves the details of a VPN site link. */ +export async function get( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + vpnSiteLinkName: string, + options: VpnSiteLinksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, vpnSiteName, vpnSiteLinkName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/vpnSiteLinks/options.ts b/sdk/network/arm-network/src/api/vpnSiteLinks/options.ts new file mode 100644 index 000000000000..9f01531ba262 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSiteLinks/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VpnSiteLinksListByVpnSiteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnSiteLinksGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/vpnSites/index.ts b/sdk/network/arm-network/src/api/vpnSites/index.ts new file mode 100644 index 000000000000..cebf4ccc3bb7 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSites/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VpnSitesListOptionalParams, + VpnSitesListByResourceGroupOptionalParams, + VpnSitesDeleteOptionalParams, + VpnSitesUpdateTagsOptionalParams, + VpnSitesCreateOrUpdateOptionalParams, + VpnSitesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/vpnSites/operations.ts b/sdk/network/arm-network/src/api/vpnSites/operations.ts new file mode 100644 index 000000000000..c07df879ec1d --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSites/operations.ts @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + TagsObject, + tagsObjectSerializer, + VpnSite, + vpnSiteSerializer, + vpnSiteDeserializer, + _ListVpnSitesResult, + _listVpnSitesResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VpnSitesListOptionalParams, + VpnSitesListByResourceGroupOptionalParams, + VpnSitesDeleteOptionalParams, + VpnSitesUpdateTagsOptionalParams, + VpnSitesCreateOrUpdateOptionalParams, + VpnSitesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + options: VpnSitesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVpnSitesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVpnSitesResultDeserializer(result.body); +} + +/** Lists all the VpnSites in a subscription. */ +export function list( + context: Client, + options: VpnSitesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VpnSitesListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ListVpnSitesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _listVpnSitesResultDeserializer(result.body); +} + +/** Lists all the vpnSites in a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: VpnSitesListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + options: VpnSitesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnSiteName: vpnSiteName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a VpnSite. */ +export function $delete( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + options: VpnSitesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, vpnSiteName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _updateTagsSend( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: TagsObject, + options: VpnSitesUpdateTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnSiteName: vpnSiteName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagsObjectSerializer(vpnSiteParameters), + }); +} + +export async function _updateTagsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnSiteDeserializer(result.body); +} + +/** Updates VpnSite tags. */ +export async function updateTags( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: TagsObject, + options: VpnSitesUpdateTagsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateTagsSend( + context, + resourceGroupName, + vpnSiteName, + vpnSiteParameters, + options, + ); + return _updateTagsDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: VpnSite, + options: VpnSitesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnSiteName: vpnSiteName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: vpnSiteSerializer(vpnSiteParameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnSiteDeserializer(result.body); +} + +/** Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: VpnSite, + options: VpnSitesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VpnSite> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, vpnSiteName, vpnSiteParameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: "2025-07-01", + }) as PollerLike, VpnSite>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + options: VpnSitesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vpnSiteName: vpnSiteName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return vpnSiteDeserializer(result.body); +} + +/** Retrieves the details of a VPN site. */ +export async function get( + context: Client, + resourceGroupName: string, + vpnSiteName: string, + options: VpnSitesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, vpnSiteName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/vpnSites/options.ts b/sdk/network/arm-network/src/api/vpnSites/options.ts new file mode 100644 index 000000000000..c312b39e28cf --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSites/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VpnSitesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnSitesListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnSitesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnSitesUpdateTagsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VpnSitesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VpnSitesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/vpnSitesConfiguration/index.ts b/sdk/network/arm-network/src/api/vpnSitesConfiguration/index.ts new file mode 100644 index 000000000000..45038bae87d8 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSitesConfiguration/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { download } from "./operations.js"; +export type { VpnSitesConfigurationDownloadOptionalParams } from "./options.js"; diff --git a/sdk/network/arm-network/src/api/vpnSitesConfiguration/operations.ts b/sdk/network/arm-network/src/api/vpnSitesConfiguration/operations.ts new file mode 100644 index 000000000000..9e0a0b7f37e8 --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSitesConfiguration/operations.ts @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + GetVpnSitesConfigurationRequest, + getVpnSitesConfigurationRequestSerializer, +} from "../../models/microsoft/network/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { VpnSitesConfigurationDownloadOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _downloadSend( + context: Client, + resourceGroupName: string, + virtualWANName: string, + request: GetVpnSitesConfigurationRequest, + options: VpnSitesConfigurationDownloadOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualWANName: virtualWANName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: getVpnSitesConfigurationRequestSerializer(request), + }); +} + +export async function _downloadDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gives the sas-url to download the configurations for vpn-sites in a resource group. */ +export function download( + context: Client, + resourceGroupName: string, + virtualWANName: string, + request: GetVpnSitesConfigurationRequest, + options: VpnSitesConfigurationDownloadOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _downloadDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _downloadSend(context, resourceGroupName, virtualWANName, request, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} diff --git a/sdk/network/arm-network/src/api/vpnSitesConfiguration/options.ts b/sdk/network/arm-network/src/api/vpnSitesConfiguration/options.ts new file mode 100644 index 000000000000..d39fc7cdb93c --- /dev/null +++ b/sdk/network/arm-network/src/api/vpnSitesConfiguration/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VpnSitesConfigurationDownloadOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/network/arm-network/src/api/webApplicationFirewallPolicies/index.ts b/sdk/network/arm-network/src/api/webApplicationFirewallPolicies/index.ts new file mode 100644 index 000000000000..43bffb2da3d6 --- /dev/null +++ b/sdk/network/arm-network/src/api/webApplicationFirewallPolicies/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAll, list, $delete, createOrUpdate, get } from "./operations.js"; +export type { + WebApplicationFirewallPoliciesListAllOptionalParams, + WebApplicationFirewallPoliciesListOptionalParams, + WebApplicationFirewallPoliciesDeleteOptionalParams, + WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams, + WebApplicationFirewallPoliciesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/webApplicationFirewallPolicies/operations.ts b/sdk/network/arm-network/src/api/webApplicationFirewallPolicies/operations.ts new file mode 100644 index 000000000000..d9b67bd01eeb --- /dev/null +++ b/sdk/network/arm-network/src/api/webApplicationFirewallPolicies/operations.ts @@ -0,0 +1,288 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + WebApplicationFirewallPolicy, + webApplicationFirewallPolicySerializer, + webApplicationFirewallPolicyDeserializer, + _WebApplicationFirewallPolicyListResult, + _webApplicationFirewallPolicyListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WebApplicationFirewallPoliciesListAllOptionalParams, + WebApplicationFirewallPoliciesListOptionalParams, + WebApplicationFirewallPoliciesDeleteOptionalParams, + WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams, + WebApplicationFirewallPoliciesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAllSend( + context: Client, + options: WebApplicationFirewallPoliciesListAllOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAllDeserialize( + result: PathUncheckedResponse, +): Promise<_WebApplicationFirewallPolicyListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _webApplicationFirewallPolicyListResultDeserializer(result.body); +} + +/** Gets all the WAF policies in a subscription. */ +export function listAll( + context: Client, + options: WebApplicationFirewallPoliciesListAllOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAllSend(context, options), + _listAllDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: WebApplicationFirewallPoliciesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_WebApplicationFirewallPolicyListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _webApplicationFirewallPolicyListResultDeserializer(result.body); +} + +/** Lists all of the protection policies within a resource group. */ +export function list( + context: Client, + resourceGroupName: string, + options: WebApplicationFirewallPoliciesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + policyName: string, + options: WebApplicationFirewallPoliciesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + policyName: policyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes Policy. */ +export function $delete( + context: Client, + resourceGroupName: string, + policyName: string, + options: WebApplicationFirewallPoliciesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, policyName, options), + resourceLocationConfig: "location", + apiVersion: "2025-07-01", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + policyName: string, + parameters: WebApplicationFirewallPolicy, + options: WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + policyName: policyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: webApplicationFirewallPolicySerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return webApplicationFirewallPolicyDeserializer(result.body); +} + +/** Creates or update policy with specified rule set name within a resource group. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + policyName: string, + parameters: WebApplicationFirewallPolicy, + options: WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + policyName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + policyName: string, + options: WebApplicationFirewallPoliciesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + policyName: policyName, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return webApplicationFirewallPolicyDeserializer(result.body); +} + +/** Retrieve protection policy with specified name within a resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + policyName: string, + options: WebApplicationFirewallPoliciesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, policyName, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/webApplicationFirewallPolicies/options.ts b/sdk/network/arm-network/src/api/webApplicationFirewallPolicies/options.ts new file mode 100644 index 000000000000..c3577fd9b4f8 --- /dev/null +++ b/sdk/network/arm-network/src/api/webApplicationFirewallPolicies/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WebApplicationFirewallPoliciesListAllOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WebApplicationFirewallPoliciesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WebApplicationFirewallPoliciesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WebApplicationFirewallPoliciesGetOptionalParams extends OperationOptions {} diff --git a/sdk/network/arm-network/src/api/webCategories/index.ts b/sdk/network/arm-network/src/api/webCategories/index.ts new file mode 100644 index 000000000000..5251915deeb1 --- /dev/null +++ b/sdk/network/arm-network/src/api/webCategories/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listBySubscription, get } from "./operations.js"; +export type { + WebCategoriesListBySubscriptionOptionalParams, + WebCategoriesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/network/arm-network/src/api/webCategories/operations.ts b/sdk/network/arm-network/src/api/webCategories/operations.ts new file mode 100644 index 000000000000..b084609bd93d --- /dev/null +++ b/sdk/network/arm-network/src/api/webCategories/operations.ts @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext as Client } from "../index.js"; +import { cloudErrorDeserializer } from "../../models/common/models.js"; +import { + AzureWebCategory, + azureWebCategoryDeserializer, + _AzureWebCategoryListResult, + _azureWebCategoryListResultDeserializer, +} from "../../models/microsoft/network/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WebCategoriesListBySubscriptionOptionalParams, + WebCategoriesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listBySubscriptionSend( + context: Client, + options: WebCategoriesListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": "2025-07-01", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_AzureWebCategoryListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return _azureWebCategoryListResultDeserializer(result.body); +} + +/** Gets all the Azure Web Categories in a subscription. */ +export function listBySubscription( + context: Client, + options: WebCategoriesListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink", apiVersion: "2025-07-01" }, + ); +} + +export function _getSend( + context: Client, + name: string, + options: WebCategoriesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories/{name}{?api%2Dversion,%24expand}", + { + subscriptionId: context.subscriptionId, + name: name, + "api%2Dversion": "2025-07-01", + "%24expand": options?.expand, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = cloudErrorDeserializer(result.body); + + throw error; + } + + return azureWebCategoryDeserializer(result.body); +} + +/** Gets the specified Azure Web Category. */ +export async function get( + context: Client, + name: string, + options: WebCategoriesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, name, options); + return _getDeserialize(result); +} diff --git a/sdk/network/arm-network/src/api/webCategories/options.ts b/sdk/network/arm-network/src/api/webCategories/options.ts new file mode 100644 index 000000000000..eac3e9211ea2 --- /dev/null +++ b/sdk/network/arm-network/src/api/webCategories/options.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WebCategoriesListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WebCategoriesGetOptionalParams extends OperationOptions { + /** Expands resourceIds back referenced by the azureWebCategory resource. */ + expand?: string; +} diff --git a/sdk/network/arm-network/src/classic/adminRuleCollections/index.ts b/sdk/network/arm-network/src/classic/adminRuleCollections/index.ts new file mode 100644 index 000000000000..d5d67bd78276 --- /dev/null +++ b/sdk/network/arm-network/src/classic/adminRuleCollections/index.ts @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/adminRuleCollections/operations.js"; +import { + AdminRuleCollectionsListOptionalParams, + AdminRuleCollectionsDeleteOptionalParams, + AdminRuleCollectionsCreateOrUpdateOptionalParams, + AdminRuleCollectionsGetOptionalParams, +} from "../../api/adminRuleCollections/options.js"; +import { AdminRuleCollection } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a AdminRuleCollections operations. */ +export interface AdminRuleCollectionsOperations { + /** Lists all the rule collections in a security admin configuration, in a paginated format. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: AdminRuleCollectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an admin rule collection. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: AdminRuleCollectionsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: AdminRuleCollectionsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: AdminRuleCollectionsDeleteOptionalParams, + ) => Promise; + /** Creates or updates an admin rule collection. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleCollection: AdminRuleCollection, + options?: AdminRuleCollectionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets a network manager security admin configuration rule collection. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: AdminRuleCollectionsGetOptionalParams, + ) => Promise; +} + +function _getAdminRuleCollections(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: AdminRuleCollectionsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, configurationName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: AdminRuleCollectionsDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: AdminRuleCollectionsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: AdminRuleCollectionsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleCollection: AdminRuleCollection, + options?: AdminRuleCollectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleCollection, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: AdminRuleCollectionsGetOptionalParams, + ) => + get( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + }; +} + +export function _getAdminRuleCollectionsOperations( + context: NetworkManagementContext, +): AdminRuleCollectionsOperations { + return { + ..._getAdminRuleCollections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/adminRules/index.ts b/sdk/network/arm-network/src/classic/adminRules/index.ts new file mode 100644 index 000000000000..7c3b1f862f12 --- /dev/null +++ b/sdk/network/arm-network/src/classic/adminRules/index.ts @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/adminRules/operations.js"; +import { + AdminRulesListOptionalParams, + AdminRulesDeleteOptionalParams, + AdminRulesCreateOrUpdateOptionalParams, + AdminRulesGetOptionalParams, +} from "../../api/adminRules/options.js"; +import { BaseAdminRuleUnion } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a AdminRules operations. */ +export interface AdminRulesOperations { + /** List all network manager security configuration admin rules. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: AdminRulesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an admin rule. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: AdminRulesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: AdminRulesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: AdminRulesDeleteOptionalParams, + ) => Promise; + /** Creates or updates an admin rule. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + adminRule: BaseAdminRuleUnion, + options?: AdminRulesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets a network manager security configuration admin rule. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: AdminRulesGetOptionalParams, + ) => Promise; +} + +function _getAdminRules(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: AdminRulesListOptionalParams, + ) => + list( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: AdminRulesDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: AdminRulesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: AdminRulesDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + adminRule: BaseAdminRuleUnion, + options?: AdminRulesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + adminRule, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: AdminRulesGetOptionalParams, + ) => + get( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ), + }; +} + +export function _getAdminRulesOperations(context: NetworkManagementContext): AdminRulesOperations { + return { + ..._getAdminRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/applicationGatewayPrivateEndpointConnections/index.ts b/sdk/network/arm-network/src/classic/applicationGatewayPrivateEndpointConnections/index.ts new file mode 100644 index 000000000000..f3fef5b45558 --- /dev/null +++ b/sdk/network/arm-network/src/classic/applicationGatewayPrivateEndpointConnections/index.ts @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + update, + get, +} from "../../api/applicationGatewayPrivateEndpointConnections/operations.js"; +import { + ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams, +} from "../../api/applicationGatewayPrivateEndpointConnections/options.js"; +import { ApplicationGatewayPrivateEndpointConnection } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ApplicationGatewayPrivateEndpointConnections operations. */ +export interface ApplicationGatewayPrivateEndpointConnectionsOperations { + /** Lists all private endpoint connections on an application gateway. */ + list: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified private endpoint connection on application gateway. */ + delete: ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, + ) => Promise; + /** Updates the specified private endpoint connection on application gateway. */ + update: ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + parameters: ApplicationGatewayPrivateEndpointConnection, + options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, + ) => PollerLike< + OperationState, + ApplicationGatewayPrivateEndpointConnection + >; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + parameters: ApplicationGatewayPrivateEndpointConnection, + options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ApplicationGatewayPrivateEndpointConnection + > + >; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + parameters: ApplicationGatewayPrivateEndpointConnection, + options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, + ) => Promise; + /** Gets the specified private endpoint connection on application gateway. */ + get: ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options?: ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams, + ) => Promise; +} + +function _getApplicationGatewayPrivateEndpointConnections(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, + ) => list(context, resourceGroupName, applicationGatewayName, options), + delete: ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, applicationGatewayName, connectionName, options), + beginDelete: async ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + applicationGatewayName, + connectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + applicationGatewayName, + connectionName, + options, + ); + }, + update: ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + parameters: ApplicationGatewayPrivateEndpointConnection, + options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + applicationGatewayName, + connectionName, + parameters, + options, + ), + beginUpdate: async ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + parameters: ApplicationGatewayPrivateEndpointConnection, + options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, + ) => { + const poller = update( + context, + resourceGroupName, + applicationGatewayName, + connectionName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + parameters: ApplicationGatewayPrivateEndpointConnection, + options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, + ) => { + return await update( + context, + resourceGroupName, + applicationGatewayName, + connectionName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + applicationGatewayName: string, + connectionName: string, + options?: ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, applicationGatewayName, connectionName, options), + }; +} + +export function _getApplicationGatewayPrivateEndpointConnectionsOperations( + context: NetworkManagementContext, +): ApplicationGatewayPrivateEndpointConnectionsOperations { + return { + ..._getApplicationGatewayPrivateEndpointConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/applicationGatewayPrivateLinkResources/index.ts b/sdk/network/arm-network/src/classic/applicationGatewayPrivateLinkResources/index.ts new file mode 100644 index 000000000000..24948881ba50 --- /dev/null +++ b/sdk/network/arm-network/src/classic/applicationGatewayPrivateLinkResources/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/applicationGatewayPrivateLinkResources/operations.js"; +import { ApplicationGatewayPrivateLinkResourcesListOptionalParams } from "../../api/applicationGatewayPrivateLinkResources/options.js"; +import { ApplicationGatewayPrivateLinkResource } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApplicationGatewayPrivateLinkResources operations. */ +export interface ApplicationGatewayPrivateLinkResourcesOperations { + /** Lists all private link resources on an application gateway. */ + list: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewayPrivateLinkResourcesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getApplicationGatewayPrivateLinkResources(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewayPrivateLinkResourcesListOptionalParams, + ) => list(context, resourceGroupName, applicationGatewayName, options), + }; +} + +export function _getApplicationGatewayPrivateLinkResourcesOperations( + context: NetworkManagementContext, +): ApplicationGatewayPrivateLinkResourcesOperations { + return { + ..._getApplicationGatewayPrivateLinkResources(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/applicationGatewayWafDynamicManifests/index.ts b/sdk/network/arm-network/src/classic/applicationGatewayWafDynamicManifests/index.ts new file mode 100644 index 000000000000..643dc6ad8ee7 --- /dev/null +++ b/sdk/network/arm-network/src/classic/applicationGatewayWafDynamicManifests/index.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/applicationGatewayWafDynamicManifests/operations.js"; +import { ApplicationGatewayWafDynamicManifestsListOptionalParams } from "../../api/applicationGatewayWafDynamicManifests/options.js"; +import { ApplicationGatewayWafDynamicManifestResult } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApplicationGatewayWafDynamicManifests operations. */ +export interface ApplicationGatewayWafDynamicManifestsOperations { + /** Gets the regional application gateway waf manifest. */ + list: ( + location: string, + options?: ApplicationGatewayWafDynamicManifestsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getApplicationGatewayWafDynamicManifests(context: NetworkManagementContext) { + return { + list: (location: string, options?: ApplicationGatewayWafDynamicManifestsListOptionalParams) => + list(context, location, options), + }; +} + +export function _getApplicationGatewayWafDynamicManifestsOperations( + context: NetworkManagementContext, +): ApplicationGatewayWafDynamicManifestsOperations { + return { + ..._getApplicationGatewayWafDynamicManifests(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/applicationGatewayWafDynamicManifestsDefault/index.ts b/sdk/network/arm-network/src/classic/applicationGatewayWafDynamicManifestsDefault/index.ts new file mode 100644 index 000000000000..24a7ba16a427 --- /dev/null +++ b/sdk/network/arm-network/src/classic/applicationGatewayWafDynamicManifestsDefault/index.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { get } from "../../api/applicationGatewayWafDynamicManifestsDefault/operations.js"; +import { ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams } from "../../api/applicationGatewayWafDynamicManifestsDefault/options.js"; +import { ApplicationGatewayWafDynamicManifestResult } from "../../models/microsoft/network/models.js"; + +/** Interface representing a ApplicationGatewayWafDynamicManifestsDefault operations. */ +export interface ApplicationGatewayWafDynamicManifestsDefaultOperations { + /** Gets the regional application gateway waf manifest. */ + get: ( + location: string, + options?: ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams, + ) => Promise; +} + +function _getApplicationGatewayWafDynamicManifestsDefault(context: NetworkManagementContext) { + return { + get: ( + location: string, + options?: ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams, + ) => get(context, location, options), + }; +} + +export function _getApplicationGatewayWafDynamicManifestsDefaultOperations( + context: NetworkManagementContext, +): ApplicationGatewayWafDynamicManifestsDefaultOperations { + return { + ..._getApplicationGatewayWafDynamicManifestsDefault(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/applicationGateways/index.ts b/sdk/network/arm-network/src/classic/applicationGateways/index.ts new file mode 100644 index 000000000000..4d4954bbe3f1 --- /dev/null +++ b/sdk/network/arm-network/src/classic/applicationGateways/index.ts @@ -0,0 +1,453 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAvailableWafRuleSets, + listAvailableResponseHeaders, + listAvailableRequestHeaders, + listAvailableServerVariables, + getSslPredefinedPolicy, + listAvailableSslPredefinedPolicies, + listAvailableSslOptions, + backendHealthOnDemand, + backendHealth, + stop, + start, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/applicationGateways/operations.js"; +import { + ApplicationGatewaysListAvailableWafRuleSetsOptionalParams, + ApplicationGatewaysListAvailableResponseHeadersOptionalParams, + ApplicationGatewaysListAvailableRequestHeadersOptionalParams, + ApplicationGatewaysListAvailableServerVariablesOptionalParams, + ApplicationGatewaysGetSslPredefinedPolicyOptionalParams, + ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, + ApplicationGatewaysListAvailableSslOptionsOptionalParams, + ApplicationGatewaysBackendHealthOnDemandOptionalParams, + ApplicationGatewaysBackendHealthOptionalParams, + ApplicationGatewaysStopOptionalParams, + ApplicationGatewaysStartOptionalParams, + ApplicationGatewaysListAllOptionalParams, + ApplicationGatewaysListOptionalParams, + ApplicationGatewaysDeleteOptionalParams, + ApplicationGatewaysUpdateTagsOptionalParams, + ApplicationGatewaysCreateOrUpdateOptionalParams, + ApplicationGatewaysGetOptionalParams, +} from "../../api/applicationGateways/options.js"; +import { + ApplicationGateway, + TagsObject, + ApplicationGatewayBackendHealth, + ApplicationGatewayOnDemandProbe, + ApplicationGatewayBackendHealthOnDemand, + ApplicationGatewayAvailableSslOptions, + ApplicationGatewaySslPredefinedPolicy, + ApplicationGatewayAvailableWafRuleSetsResult, +} from "../../models/microsoft/network/models.js"; +import { + ApplicationGatewaysListAvailableResponseHeadersResponse, + ApplicationGatewaysListAvailableRequestHeadersResponse, + ApplicationGatewaysListAvailableServerVariablesResponse, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ApplicationGateways operations. */ +export interface ApplicationGatewaysOperations { + /** Lists all available web application firewall rule sets. */ + listAvailableWafRuleSets: ( + options?: ApplicationGatewaysListAvailableWafRuleSetsOptionalParams, + ) => Promise; + /** Lists all available response headers. */ + listAvailableResponseHeaders: ( + options?: ApplicationGatewaysListAvailableResponseHeadersOptionalParams, + ) => Promise; + /** Lists all available request headers. */ + listAvailableRequestHeaders: ( + options?: ApplicationGatewaysListAvailableRequestHeadersOptionalParams, + ) => Promise; + /** Lists all available server variables. */ + listAvailableServerVariables: ( + options?: ApplicationGatewaysListAvailableServerVariablesOptionalParams, + ) => Promise; + /** Gets Ssl predefined policy with the specified policy name. */ + getSslPredefinedPolicy: ( + predefinedPolicyName: string, + options?: ApplicationGatewaysGetSslPredefinedPolicyOptionalParams, + ) => Promise; + /** Lists all SSL predefined policies for configuring Ssl policy. */ + listAvailableSslPredefinedPolicies: ( + options?: ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists available Ssl options for configuring Ssl policy. */ + listAvailableSslOptions: ( + options?: ApplicationGatewaysListAvailableSslOptionsOptionalParams, + ) => Promise; + /** Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. */ + backendHealthOnDemand: ( + resourceGroupName: string, + applicationGatewayName: string, + probeRequest: ApplicationGatewayOnDemandProbe, + options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams, + ) => PollerLike< + OperationState, + ApplicationGatewayBackendHealthOnDemand + >; + /** @deprecated use backendHealthOnDemand instead */ + beginBackendHealthOnDemand: ( + resourceGroupName: string, + applicationGatewayName: string, + probeRequest: ApplicationGatewayOnDemandProbe, + options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ApplicationGatewayBackendHealthOnDemand + > + >; + /** @deprecated use backendHealthOnDemand instead */ + beginBackendHealthOnDemandAndWait: ( + resourceGroupName: string, + applicationGatewayName: string, + probeRequest: ApplicationGatewayOnDemandProbe, + options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams, + ) => Promise; + /** Gets the backend health of the specified application gateway in a resource group. */ + backendHealth: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysBackendHealthOptionalParams, + ) => PollerLike, ApplicationGatewayBackendHealth>; + /** @deprecated use backendHealth instead */ + beginBackendHealth: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysBackendHealthOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ApplicationGatewayBackendHealth + > + >; + /** @deprecated use backendHealth instead */ + beginBackendHealthAndWait: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysBackendHealthOptionalParams, + ) => Promise; + /** Stops the specified application gateway in a resource group. */ + stop: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStopOptionalParams, + ) => PollerLike, void>; + /** @deprecated use stop instead */ + beginStop: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStopOptionalParams, + ) => Promise, void>>; + /** @deprecated use stop instead */ + beginStopAndWait: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStopOptionalParams, + ) => Promise; + /** Starts the specified application gateway. */ + start: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStartOptionalParams, + ) => PollerLike, void>; + /** @deprecated use start instead */ + beginStart: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStartOptionalParams, + ) => Promise, void>>; + /** @deprecated use start instead */ + beginStartAndWait: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStartOptionalParams, + ) => Promise; + /** Gets all the application gateways in a subscription. */ + listAll: ( + options?: ApplicationGatewaysListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists all application gateways in a resource group. */ + list: ( + resourceGroupName: string, + options?: ApplicationGatewaysListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified application gateway. */ + delete: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysDeleteOptionalParams, + ) => Promise; + /** Updates the specified application gateway tags. */ + updateTags: ( + resourceGroupName: string, + applicationGatewayName: string, + parameters: TagsObject, + options?: ApplicationGatewaysUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates the specified application gateway. */ + createOrUpdate: ( + resourceGroupName: string, + applicationGatewayName: string, + parameters: ApplicationGateway, + options?: ApplicationGatewaysCreateOrUpdateOptionalParams, + ) => PollerLike, ApplicationGateway>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + applicationGatewayName: string, + parameters: ApplicationGateway, + options?: ApplicationGatewaysCreateOrUpdateOptionalParams, + ) => Promise, ApplicationGateway>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + applicationGatewayName: string, + parameters: ApplicationGateway, + options?: ApplicationGatewaysCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified application gateway. */ + get: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysGetOptionalParams, + ) => Promise; +} + +function _getApplicationGateways(context: NetworkManagementContext) { + return { + listAvailableWafRuleSets: ( + options?: ApplicationGatewaysListAvailableWafRuleSetsOptionalParams, + ) => listAvailableWafRuleSets(context, options), + listAvailableResponseHeaders: ( + options?: ApplicationGatewaysListAvailableResponseHeadersOptionalParams, + ) => listAvailableResponseHeaders(context, options), + listAvailableRequestHeaders: ( + options?: ApplicationGatewaysListAvailableRequestHeadersOptionalParams, + ) => listAvailableRequestHeaders(context, options), + listAvailableServerVariables: ( + options?: ApplicationGatewaysListAvailableServerVariablesOptionalParams, + ) => listAvailableServerVariables(context, options), + getSslPredefinedPolicy: ( + predefinedPolicyName: string, + options?: ApplicationGatewaysGetSslPredefinedPolicyOptionalParams, + ) => getSslPredefinedPolicy(context, predefinedPolicyName, options), + listAvailableSslPredefinedPolicies: ( + options?: ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, + ) => listAvailableSslPredefinedPolicies(context, options), + listAvailableSslOptions: (options?: ApplicationGatewaysListAvailableSslOptionsOptionalParams) => + listAvailableSslOptions(context, options), + backendHealthOnDemand: ( + resourceGroupName: string, + applicationGatewayName: string, + probeRequest: ApplicationGatewayOnDemandProbe, + options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams, + ) => + backendHealthOnDemand( + context, + resourceGroupName, + applicationGatewayName, + probeRequest, + options, + ), + beginBackendHealthOnDemand: async ( + resourceGroupName: string, + applicationGatewayName: string, + probeRequest: ApplicationGatewayOnDemandProbe, + options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams, + ) => { + const poller = backendHealthOnDemand( + context, + resourceGroupName, + applicationGatewayName, + probeRequest, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginBackendHealthOnDemandAndWait: async ( + resourceGroupName: string, + applicationGatewayName: string, + probeRequest: ApplicationGatewayOnDemandProbe, + options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams, + ) => { + return await backendHealthOnDemand( + context, + resourceGroupName, + applicationGatewayName, + probeRequest, + options, + ); + }, + backendHealth: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysBackendHealthOptionalParams, + ) => backendHealth(context, resourceGroupName, applicationGatewayName, options), + beginBackendHealth: async ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysBackendHealthOptionalParams, + ) => { + const poller = backendHealth(context, resourceGroupName, applicationGatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginBackendHealthAndWait: async ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysBackendHealthOptionalParams, + ) => { + return await backendHealth(context, resourceGroupName, applicationGatewayName, options); + }, + stop: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStopOptionalParams, + ) => stop(context, resourceGroupName, applicationGatewayName, options), + beginStop: async ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStopOptionalParams, + ) => { + const poller = stop(context, resourceGroupName, applicationGatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStopAndWait: async ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStopOptionalParams, + ) => { + return await stop(context, resourceGroupName, applicationGatewayName, options); + }, + start: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStartOptionalParams, + ) => start(context, resourceGroupName, applicationGatewayName, options), + beginStart: async ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStartOptionalParams, + ) => { + const poller = start(context, resourceGroupName, applicationGatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStartAndWait: async ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysStartOptionalParams, + ) => { + return await start(context, resourceGroupName, applicationGatewayName, options); + }, + listAll: (options?: ApplicationGatewaysListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: ApplicationGatewaysListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysDeleteOptionalParams, + ) => $delete(context, resourceGroupName, applicationGatewayName, options), + beginDelete: async ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, applicationGatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, applicationGatewayName, options); + }, + updateTags: ( + resourceGroupName: string, + applicationGatewayName: string, + parameters: TagsObject, + options?: ApplicationGatewaysUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, applicationGatewayName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + applicationGatewayName: string, + parameters: ApplicationGateway, + options?: ApplicationGatewaysCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, applicationGatewayName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + applicationGatewayName: string, + parameters: ApplicationGateway, + options?: ApplicationGatewaysCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + applicationGatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + applicationGatewayName: string, + parameters: ApplicationGateway, + options?: ApplicationGatewaysCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + applicationGatewayName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + applicationGatewayName: string, + options?: ApplicationGatewaysGetOptionalParams, + ) => get(context, resourceGroupName, applicationGatewayName, options), + }; +} + +export function _getApplicationGatewaysOperations( + context: NetworkManagementContext, +): ApplicationGatewaysOperations { + return { + ..._getApplicationGateways(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/applicationSecurityGroups/index.ts b/sdk/network/arm-network/src/classic/applicationSecurityGroups/index.ts new file mode 100644 index 000000000000..d3f18dacede7 --- /dev/null +++ b/sdk/network/arm-network/src/classic/applicationSecurityGroups/index.ts @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/applicationSecurityGroups/operations.js"; +import { + ApplicationSecurityGroupsListAllOptionalParams, + ApplicationSecurityGroupsListOptionalParams, + ApplicationSecurityGroupsDeleteOptionalParams, + ApplicationSecurityGroupsUpdateTagsOptionalParams, + ApplicationSecurityGroupsCreateOrUpdateOptionalParams, + ApplicationSecurityGroupsGetOptionalParams, +} from "../../api/applicationSecurityGroups/options.js"; +import { ApplicationSecurityGroup } from "../../models/common/models.js"; +import { TagsObject } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ApplicationSecurityGroups operations. */ +export interface ApplicationSecurityGroupsOperations { + /** Gets all application security groups in a subscription. */ + listAll: ( + options?: ApplicationSecurityGroupsListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all the application security groups in a resource group. */ + list: ( + resourceGroupName: string, + options?: ApplicationSecurityGroupsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified application security group. */ + delete: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + options?: ApplicationSecurityGroupsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + options?: ApplicationSecurityGroupsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + options?: ApplicationSecurityGroupsDeleteOptionalParams, + ) => Promise; + /** Updates an application security group's tags. */ + updateTags: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: TagsObject, + options?: ApplicationSecurityGroupsUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates an application security group. */ + createOrUpdate: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: ApplicationSecurityGroup, + options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams, + ) => PollerLike, ApplicationSecurityGroup>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: ApplicationSecurityGroup, + options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, ApplicationSecurityGroup> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: ApplicationSecurityGroup, + options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets information about the specified application security group. */ + get: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + options?: ApplicationSecurityGroupsGetOptionalParams, + ) => Promise; +} + +function _getApplicationSecurityGroups(context: NetworkManagementContext) { + return { + listAll: (options?: ApplicationSecurityGroupsListAllOptionalParams) => + listAll(context, options), + list: (resourceGroupName: string, options?: ApplicationSecurityGroupsListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + options?: ApplicationSecurityGroupsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, applicationSecurityGroupName, options), + beginDelete: async ( + resourceGroupName: string, + applicationSecurityGroupName: string, + options?: ApplicationSecurityGroupsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, applicationSecurityGroupName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + applicationSecurityGroupName: string, + options?: ApplicationSecurityGroupsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, applicationSecurityGroupName, options); + }, + updateTags: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: TagsObject, + options?: ApplicationSecurityGroupsUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, applicationSecurityGroupName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: ApplicationSecurityGroup, + options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, applicationSecurityGroupName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: ApplicationSecurityGroup, + options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + applicationSecurityGroupName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + applicationSecurityGroupName: string, + parameters: ApplicationSecurityGroup, + options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + applicationSecurityGroupName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + applicationSecurityGroupName: string, + options?: ApplicationSecurityGroupsGetOptionalParams, + ) => get(context, resourceGroupName, applicationSecurityGroupName, options), + }; +} + +export function _getApplicationSecurityGroupsOperations( + context: NetworkManagementContext, +): ApplicationSecurityGroupsOperations { + return { + ..._getApplicationSecurityGroups(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/availableDelegations/index.ts b/sdk/network/arm-network/src/classic/availableDelegations/index.ts new file mode 100644 index 000000000000..13b1b2d0e3d9 --- /dev/null +++ b/sdk/network/arm-network/src/classic/availableDelegations/index.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/availableDelegations/operations.js"; +import { AvailableDelegationsListOptionalParams } from "../../api/availableDelegations/options.js"; +import { AvailableDelegation } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AvailableDelegations operations. */ +export interface AvailableDelegationsOperations { + /** Gets all of the available subnet delegations for this subscription in this region. */ + list: ( + location: string, + options?: AvailableDelegationsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getAvailableDelegations(context: NetworkManagementContext) { + return { + list: (location: string, options?: AvailableDelegationsListOptionalParams) => + list(context, location, options), + }; +} + +export function _getAvailableDelegationsOperations( + context: NetworkManagementContext, +): AvailableDelegationsOperations { + return { + ..._getAvailableDelegations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/availableEndpointServices/index.ts b/sdk/network/arm-network/src/classic/availableEndpointServices/index.ts new file mode 100644 index 000000000000..785201ea20c8 --- /dev/null +++ b/sdk/network/arm-network/src/classic/availableEndpointServices/index.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/availableEndpointServices/operations.js"; +import { AvailableEndpointServicesListOptionalParams } from "../../api/availableEndpointServices/options.js"; +import { EndpointServiceResult } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AvailableEndpointServices operations. */ +export interface AvailableEndpointServicesOperations { + /** List what values of endpoint services are available for use. */ + list: ( + location: string, + options?: AvailableEndpointServicesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getAvailableEndpointServices(context: NetworkManagementContext) { + return { + list: (location: string, options?: AvailableEndpointServicesListOptionalParams) => + list(context, location, options), + }; +} + +export function _getAvailableEndpointServicesOperations( + context: NetworkManagementContext, +): AvailableEndpointServicesOperations { + return { + ..._getAvailableEndpointServices(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/availablePrivateEndpointTypes/index.ts b/sdk/network/arm-network/src/classic/availablePrivateEndpointTypes/index.ts new file mode 100644 index 000000000000..9264d475fb30 --- /dev/null +++ b/sdk/network/arm-network/src/classic/availablePrivateEndpointTypes/index.ts @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { listByResourceGroup, list } from "../../api/availablePrivateEndpointTypes/operations.js"; +import { + AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, + AvailablePrivateEndpointTypesListOptionalParams, +} from "../../api/availablePrivateEndpointTypes/options.js"; +import { AvailablePrivateEndpointType } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AvailablePrivateEndpointTypes operations. */ +export interface AvailablePrivateEndpointTypesOperations { + /** Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. */ + listByResourceGroup: ( + resourceGroupName: string, + location: string, + options?: AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. */ + list: ( + location: string, + options?: AvailablePrivateEndpointTypesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getAvailablePrivateEndpointTypes(context: NetworkManagementContext) { + return { + listByResourceGroup: ( + resourceGroupName: string, + location: string, + options?: AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, location, options), + list: (location: string, options?: AvailablePrivateEndpointTypesListOptionalParams) => + list(context, location, options), + }; +} + +export function _getAvailablePrivateEndpointTypesOperations( + context: NetworkManagementContext, +): AvailablePrivateEndpointTypesOperations { + return { + ..._getAvailablePrivateEndpointTypes(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/availableResourceGroupDelegations/index.ts b/sdk/network/arm-network/src/classic/availableResourceGroupDelegations/index.ts new file mode 100644 index 000000000000..f1fd427973ab --- /dev/null +++ b/sdk/network/arm-network/src/classic/availableResourceGroupDelegations/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/availableResourceGroupDelegations/operations.js"; +import { AvailableResourceGroupDelegationsListOptionalParams } from "../../api/availableResourceGroupDelegations/options.js"; +import { AvailableDelegation } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AvailableResourceGroupDelegations operations. */ +export interface AvailableResourceGroupDelegationsOperations { + /** Gets all of the available subnet delegations for this resource group in this region. */ + list: ( + resourceGroupName: string, + location: string, + options?: AvailableResourceGroupDelegationsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getAvailableResourceGroupDelegations(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + location: string, + options?: AvailableResourceGroupDelegationsListOptionalParams, + ) => list(context, resourceGroupName, location, options), + }; +} + +export function _getAvailableResourceGroupDelegationsOperations( + context: NetworkManagementContext, +): AvailableResourceGroupDelegationsOperations { + return { + ..._getAvailableResourceGroupDelegations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/availableServiceAliases/index.ts b/sdk/network/arm-network/src/classic/availableServiceAliases/index.ts new file mode 100644 index 000000000000..62c75b136b66 --- /dev/null +++ b/sdk/network/arm-network/src/classic/availableServiceAliases/index.ts @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { listByResourceGroup, list } from "../../api/availableServiceAliases/operations.js"; +import { + AvailableServiceAliasesListByResourceGroupOptionalParams, + AvailableServiceAliasesListOptionalParams, +} from "../../api/availableServiceAliases/options.js"; +import { AvailableServiceAlias } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AvailableServiceAliases operations. */ +export interface AvailableServiceAliasesOperations { + /** Gets all available service aliases for this resource group in this region. */ + listByResourceGroup: ( + resourceGroupName: string, + location: string, + options?: AvailableServiceAliasesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all available service aliases for this subscription in this region. */ + list: ( + location: string, + options?: AvailableServiceAliasesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getAvailableServiceAliases(context: NetworkManagementContext) { + return { + listByResourceGroup: ( + resourceGroupName: string, + location: string, + options?: AvailableServiceAliasesListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, location, options), + list: (location: string, options?: AvailableServiceAliasesListOptionalParams) => + list(context, location, options), + }; +} + +export function _getAvailableServiceAliasesOperations( + context: NetworkManagementContext, +): AvailableServiceAliasesOperations { + return { + ..._getAvailableServiceAliases(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/azureFirewallFqdnTags/index.ts b/sdk/network/arm-network/src/classic/azureFirewallFqdnTags/index.ts new file mode 100644 index 000000000000..ac0f52a895fe --- /dev/null +++ b/sdk/network/arm-network/src/classic/azureFirewallFqdnTags/index.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { listAll } from "../../api/azureFirewallFqdnTags/operations.js"; +import { AzureFirewallFqdnTagsListAllOptionalParams } from "../../api/azureFirewallFqdnTags/options.js"; +import { AzureFirewallFqdnTag } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AzureFirewallFqdnTags operations. */ +export interface AzureFirewallFqdnTagsOperations { + /** Gets all the Azure Firewall FQDN Tags in a subscription. */ + listAll: ( + options?: AzureFirewallFqdnTagsListAllOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getAzureFirewallFqdnTags(context: NetworkManagementContext) { + return { + listAll: (options?: AzureFirewallFqdnTagsListAllOptionalParams) => listAll(context, options), + }; +} + +export function _getAzureFirewallFqdnTagsOperations( + context: NetworkManagementContext, +): AzureFirewallFqdnTagsOperations { + return { + ..._getAzureFirewallFqdnTags(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/azureFirewalls/index.ts b/sdk/network/arm-network/src/classic/azureFirewalls/index.ts new file mode 100644 index 000000000000..6d5d1b93a3ff --- /dev/null +++ b/sdk/network/arm-network/src/classic/azureFirewalls/index.ts @@ -0,0 +1,378 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + packetCaptureOperation, + packetCapture, + listLearnedPrefixes, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/azureFirewalls/operations.js"; +import { + AzureFirewallsPacketCaptureOperationOptionalParams, + AzureFirewallsPacketCaptureOptionalParams, + AzureFirewallsListLearnedPrefixesOptionalParams, + AzureFirewallsListAllOptionalParams, + AzureFirewallsListOptionalParams, + AzureFirewallsDeleteOptionalParams, + AzureFirewallsUpdateTagsOptionalParams, + AzureFirewallsCreateOrUpdateOptionalParams, + AzureFirewallsGetOptionalParams, +} from "../../api/azureFirewalls/options.js"; +import { + TagsObject, + AzureFirewall, + IPPrefixesList, + FirewallPacketCaptureParameters, + AzureFirewallPacketCaptureResponse, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a AzureFirewalls operations. */ +export interface AzureFirewallsOperations { + /** Runs a packet capture operation on AzureFirewall. */ + packetCaptureOperation: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOperationOptionalParams, + ) => PollerLike< + OperationState, + AzureFirewallPacketCaptureResponse + >; + /** @deprecated use packetCaptureOperation instead */ + beginPacketCaptureOperation: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOperationOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + AzureFirewallPacketCaptureResponse + > + >; + /** @deprecated use packetCaptureOperation instead */ + beginPacketCaptureOperationAndWait: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOperationOptionalParams, + ) => Promise; + /** Runs a packet capture on AzureFirewall. */ + packetCapture: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOptionalParams, + ) => PollerLike, void>; + /** @deprecated use packetCapture instead */ + beginPacketCapture: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOptionalParams, + ) => Promise, void>>; + /** @deprecated use packetCapture instead */ + beginPacketCaptureAndWait: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOptionalParams, + ) => Promise; + /** Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. */ + listLearnedPrefixes: ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsListLearnedPrefixesOptionalParams, + ) => PollerLike, IPPrefixesList>; + /** @deprecated use listLearnedPrefixes instead */ + beginListLearnedPrefixes: ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsListLearnedPrefixesOptionalParams, + ) => Promise, IPPrefixesList>>; + /** @deprecated use listLearnedPrefixes instead */ + beginListLearnedPrefixesAndWait: ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsListLearnedPrefixesOptionalParams, + ) => Promise; + /** Gets all the Azure Firewalls in a subscription. */ + listAll: ( + options?: AzureFirewallsListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists all Azure Firewalls in a resource group. */ + list: ( + resourceGroupName: string, + options?: AzureFirewallsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Azure Firewall. */ + delete: ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsDeleteOptionalParams, + ) => Promise; + /** Updates tags of an Azure Firewall resource. */ + updateTags: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: TagsObject, + options?: AzureFirewallsUpdateTagsOptionalParams, + ) => PollerLike, AzureFirewall>; + /** @deprecated use updateTags instead */ + beginUpdateTags: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: TagsObject, + options?: AzureFirewallsUpdateTagsOptionalParams, + ) => Promise, AzureFirewall>>; + /** @deprecated use updateTags instead */ + beginUpdateTagsAndWait: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: TagsObject, + options?: AzureFirewallsUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates the specified Azure Firewall. */ + createOrUpdate: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: AzureFirewall, + options?: AzureFirewallsCreateOrUpdateOptionalParams, + ) => PollerLike, AzureFirewall>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: AzureFirewall, + options?: AzureFirewallsCreateOrUpdateOptionalParams, + ) => Promise, AzureFirewall>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: AzureFirewall, + options?: AzureFirewallsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified Azure Firewall. */ + get: ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsGetOptionalParams, + ) => Promise; +} + +function _getAzureFirewalls(context: NetworkManagementContext) { + return { + packetCaptureOperation: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOperationOptionalParams, + ) => packetCaptureOperation(context, resourceGroupName, azureFirewallName, parameters, options), + beginPacketCaptureOperation: async ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOperationOptionalParams, + ) => { + const poller = packetCaptureOperation( + context, + resourceGroupName, + azureFirewallName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginPacketCaptureOperationAndWait: async ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOperationOptionalParams, + ) => { + return await packetCaptureOperation( + context, + resourceGroupName, + azureFirewallName, + parameters, + options, + ); + }, + packetCapture: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOptionalParams, + ) => packetCapture(context, resourceGroupName, azureFirewallName, parameters, options), + beginPacketCapture: async ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOptionalParams, + ) => { + const poller = packetCapture( + context, + resourceGroupName, + azureFirewallName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginPacketCaptureAndWait: async ( + resourceGroupName: string, + azureFirewallName: string, + parameters: FirewallPacketCaptureParameters, + options?: AzureFirewallsPacketCaptureOptionalParams, + ) => { + return await packetCapture( + context, + resourceGroupName, + azureFirewallName, + parameters, + options, + ); + }, + listLearnedPrefixes: ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsListLearnedPrefixesOptionalParams, + ) => listLearnedPrefixes(context, resourceGroupName, azureFirewallName, options), + beginListLearnedPrefixes: async ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsListLearnedPrefixesOptionalParams, + ) => { + const poller = listLearnedPrefixes(context, resourceGroupName, azureFirewallName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListLearnedPrefixesAndWait: async ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsListLearnedPrefixesOptionalParams, + ) => { + return await listLearnedPrefixes(context, resourceGroupName, azureFirewallName, options); + }, + listAll: (options?: AzureFirewallsListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: AzureFirewallsListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, azureFirewallName, options), + beginDelete: async ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, azureFirewallName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, azureFirewallName, options); + }, + updateTags: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: TagsObject, + options?: AzureFirewallsUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, azureFirewallName, parameters, options), + beginUpdateTags: async ( + resourceGroupName: string, + azureFirewallName: string, + parameters: TagsObject, + options?: AzureFirewallsUpdateTagsOptionalParams, + ) => { + const poller = updateTags(context, resourceGroupName, azureFirewallName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateTagsAndWait: async ( + resourceGroupName: string, + azureFirewallName: string, + parameters: TagsObject, + options?: AzureFirewallsUpdateTagsOptionalParams, + ) => { + return await updateTags(context, resourceGroupName, azureFirewallName, parameters, options); + }, + createOrUpdate: ( + resourceGroupName: string, + azureFirewallName: string, + parameters: AzureFirewall, + options?: AzureFirewallsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, azureFirewallName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + azureFirewallName: string, + parameters: AzureFirewall, + options?: AzureFirewallsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + azureFirewallName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + azureFirewallName: string, + parameters: AzureFirewall, + options?: AzureFirewallsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + azureFirewallName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + azureFirewallName: string, + options?: AzureFirewallsGetOptionalParams, + ) => get(context, resourceGroupName, azureFirewallName, options), + }; +} + +export function _getAzureFirewallsOperations( + context: NetworkManagementContext, +): AzureFirewallsOperations { + return { + ..._getAzureFirewalls(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/bastionHosts/index.ts b/sdk/network/arm-network/src/classic/bastionHosts/index.ts new file mode 100644 index 000000000000..73ee3a6dba11 --- /dev/null +++ b/sdk/network/arm-network/src/classic/bastionHosts/index.ts @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/bastionHosts/operations.js"; +import { + BastionHostsListOptionalParams, + BastionHostsListByResourceGroupOptionalParams, + BastionHostsDeleteOptionalParams, + BastionHostsUpdateTagsOptionalParams, + BastionHostsCreateOrUpdateOptionalParams, + BastionHostsGetOptionalParams, +} from "../../api/bastionHosts/options.js"; +import { TagsObject, BastionHost } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a BastionHosts operations. */ +export interface BastionHostsOperations { + /** Lists all Bastion Hosts in a subscription. */ + list: (options?: BastionHostsListOptionalParams) => PagedAsyncIterableIterator; + /** Lists all Bastion Hosts in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: BastionHostsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Bastion Host. */ + delete: ( + resourceGroupName: string, + bastionHostName: string, + options?: BastionHostsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + bastionHostName: string, + options?: BastionHostsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + bastionHostName: string, + options?: BastionHostsDeleteOptionalParams, + ) => Promise; + /** Updates Tags for BastionHost resource */ + updateTags: ( + resourceGroupName: string, + bastionHostName: string, + parameters: TagsObject, + options?: BastionHostsUpdateTagsOptionalParams, + ) => PollerLike, BastionHost>; + /** @deprecated use updateTags instead */ + beginUpdateTags: ( + resourceGroupName: string, + bastionHostName: string, + parameters: TagsObject, + options?: BastionHostsUpdateTagsOptionalParams, + ) => Promise, BastionHost>>; + /** @deprecated use updateTags instead */ + beginUpdateTagsAndWait: ( + resourceGroupName: string, + bastionHostName: string, + parameters: TagsObject, + options?: BastionHostsUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates the specified Bastion Host. */ + createOrUpdate: ( + resourceGroupName: string, + bastionHostName: string, + parameters: BastionHost, + options?: BastionHostsCreateOrUpdateOptionalParams, + ) => PollerLike, BastionHost>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + bastionHostName: string, + parameters: BastionHost, + options?: BastionHostsCreateOrUpdateOptionalParams, + ) => Promise, BastionHost>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + bastionHostName: string, + parameters: BastionHost, + options?: BastionHostsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified Bastion Host. */ + get: ( + resourceGroupName: string, + bastionHostName: string, + options?: BastionHostsGetOptionalParams, + ) => Promise; +} + +function _getBastionHosts(context: NetworkManagementContext) { + return { + list: (options?: BastionHostsListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: BastionHostsListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + bastionHostName: string, + options?: BastionHostsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, bastionHostName, options), + beginDelete: async ( + resourceGroupName: string, + bastionHostName: string, + options?: BastionHostsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, bastionHostName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + bastionHostName: string, + options?: BastionHostsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, bastionHostName, options); + }, + updateTags: ( + resourceGroupName: string, + bastionHostName: string, + parameters: TagsObject, + options?: BastionHostsUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, bastionHostName, parameters, options), + beginUpdateTags: async ( + resourceGroupName: string, + bastionHostName: string, + parameters: TagsObject, + options?: BastionHostsUpdateTagsOptionalParams, + ) => { + const poller = updateTags(context, resourceGroupName, bastionHostName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateTagsAndWait: async ( + resourceGroupName: string, + bastionHostName: string, + parameters: TagsObject, + options?: BastionHostsUpdateTagsOptionalParams, + ) => { + return await updateTags(context, resourceGroupName, bastionHostName, parameters, options); + }, + createOrUpdate: ( + resourceGroupName: string, + bastionHostName: string, + parameters: BastionHost, + options?: BastionHostsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, bastionHostName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + bastionHostName: string, + parameters: BastionHost, + options?: BastionHostsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + bastionHostName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + bastionHostName: string, + parameters: BastionHost, + options?: BastionHostsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate(context, resourceGroupName, bastionHostName, parameters, options); + }, + get: ( + resourceGroupName: string, + bastionHostName: string, + options?: BastionHostsGetOptionalParams, + ) => get(context, resourceGroupName, bastionHostName, options), + }; +} + +export function _getBastionHostsOperations( + context: NetworkManagementContext, +): BastionHostsOperations { + return { + ..._getBastionHosts(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/bgpServiceCommunities/index.ts b/sdk/network/arm-network/src/classic/bgpServiceCommunities/index.ts new file mode 100644 index 000000000000..e4b8d4bca7bb --- /dev/null +++ b/sdk/network/arm-network/src/classic/bgpServiceCommunities/index.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/bgpServiceCommunities/operations.js"; +import { BgpServiceCommunitiesListOptionalParams } from "../../api/bgpServiceCommunities/options.js"; +import { BgpServiceCommunity } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a BgpServiceCommunities operations. */ +export interface BgpServiceCommunitiesOperations { + /** Gets all the available bgp service communities. */ + list: ( + options?: BgpServiceCommunitiesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getBgpServiceCommunities(context: NetworkManagementContext) { + return { + list: (options?: BgpServiceCommunitiesListOptionalParams) => list(context, options), + }; +} + +export function _getBgpServiceCommunitiesOperations( + context: NetworkManagementContext, +): BgpServiceCommunitiesOperations { + return { + ..._getBgpServiceCommunities(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/commits/index.ts b/sdk/network/arm-network/src/classic/commits/index.ts new file mode 100644 index 000000000000..9d75b05c965c --- /dev/null +++ b/sdk/network/arm-network/src/classic/commits/index.ts @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/commits/operations.js"; +import { + CommitsListOptionalParams, + CommitsDeleteOptionalParams, + CommitsCreateOrUpdateOptionalParams, + CommitsGetOptionalParams, +} from "../../api/commits/options.js"; +import { Commit } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Commits operations. */ +export interface CommitsOperations { + /** Lists all commits for the specified network manager. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: CommitsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a commit. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options?: CommitsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options?: CommitsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options?: CommitsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a commit. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + resource: Commit, + options?: CommitsCreateOrUpdateOptionalParams, + ) => PollerLike, Commit>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + resource: Commit, + options?: CommitsCreateOrUpdateOptionalParams, + ) => Promise, Commit>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + resource: Commit, + options?: CommitsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified commit. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options?: CommitsGetOptionalParams, + ) => Promise; +} + +function _getCommits(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: CommitsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options?: CommitsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkManagerName, commitName, options), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options?: CommitsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, networkManagerName, commitName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options?: CommitsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, networkManagerName, commitName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + resource: Commit, + options?: CommitsCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, networkManagerName, commitName, resource, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + resource: Commit, + options?: CommitsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkManagerName, + commitName, + resource, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + resource: Commit, + options?: CommitsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkManagerName, + commitName, + resource, + options, + ); + }, + get: ( + resourceGroupName: string, + networkManagerName: string, + commitName: string, + options?: CommitsGetOptionalParams, + ) => get(context, resourceGroupName, networkManagerName, commitName, options), + }; +} + +export function _getCommitsOperations(context: NetworkManagementContext): CommitsOperations { + return { + ..._getCommits(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/configurationPolicyGroups/index.ts b/sdk/network/arm-network/src/classic/configurationPolicyGroups/index.ts new file mode 100644 index 000000000000..d85534419994 --- /dev/null +++ b/sdk/network/arm-network/src/classic/configurationPolicyGroups/index.ts @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listByVpnServerConfiguration, + $delete, + createOrUpdate, + get, +} from "../../api/configurationPolicyGroups/operations.js"; +import { + ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams, + ConfigurationPolicyGroupsDeleteOptionalParams, + ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ConfigurationPolicyGroupsGetOptionalParams, +} from "../../api/configurationPolicyGroups/options.js"; +import { VpnServerConfigurationPolicyGroup } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ConfigurationPolicyGroups operations. */ +export interface ConfigurationPolicyGroupsOperations { + /** Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. */ + listByVpnServerConfiguration: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a ConfigurationPolicyGroup. */ + delete: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsDeleteOptionalParams, + ) => Promise; + /** Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. */ + createOrUpdate: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ) => PollerLike< + OperationState, + VpnServerConfigurationPolicyGroup + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VpnServerConfigurationPolicyGroup + > + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a ConfigurationPolicyGroup. */ + get: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsGetOptionalParams, + ) => Promise; +} + +function _getConfigurationPolicyGroups(context: NetworkManagementContext) { + return { + listByVpnServerConfiguration: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams, + ) => + listByVpnServerConfiguration(context, resourceGroupName, vpnServerConfigurationName, options), + delete: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + options, + ), + beginDelete: async ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + vpnServerConfigurationPolicyGroupParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + vpnServerConfigurationPolicyGroupParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + vpnServerConfigurationPolicyGroupParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsGetOptionalParams, + ) => + get( + context, + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + options, + ), + }; +} + +export function _getConfigurationPolicyGroupsOperations( + context: NetworkManagementContext, +): ConfigurationPolicyGroupsOperations { + return { + ..._getConfigurationPolicyGroups(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/connectionMonitors/index.ts b/sdk/network/arm-network/src/classic/connectionMonitors/index.ts new file mode 100644 index 000000000000..633a2a96debd --- /dev/null +++ b/sdk/network/arm-network/src/classic/connectionMonitors/index.ts @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + stop, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/connectionMonitors/operations.js"; +import { + ConnectionMonitorsStopOptionalParams, + ConnectionMonitorsListOptionalParams, + ConnectionMonitorsDeleteOptionalParams, + ConnectionMonitorsUpdateTagsOptionalParams, + ConnectionMonitorsCreateOrUpdateOptionalParams, + ConnectionMonitorsGetOptionalParams, +} from "../../api/connectionMonitors/options.js"; +import { + TagsObject, + ConnectionMonitorResult, + ConnectionMonitor, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ConnectionMonitors operations. */ +export interface ConnectionMonitorsOperations { + /** Stops the specified connection monitor. */ + stop: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsStopOptionalParams, + ) => PollerLike, void>; + /** @deprecated use stop instead */ + beginStop: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsStopOptionalParams, + ) => Promise, void>>; + /** @deprecated use stop instead */ + beginStopAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsStopOptionalParams, + ) => Promise; + /** Lists all connection monitors for the specified Network Watcher. */ + list: ( + resourceGroupName: string, + networkWatcherName: string, + options?: ConnectionMonitorsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified connection monitor. */ + delete: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsDeleteOptionalParams, + ) => Promise; + /** Update tags of the specified connection monitor. */ + updateTags: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: TagsObject, + options?: ConnectionMonitorsUpdateTagsOptionalParams, + ) => Promise; + /** Create or update a connection monitor. */ + createOrUpdate: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: ConnectionMonitor, + options?: ConnectionMonitorsCreateOrUpdateOptionalParams, + ) => PollerLike, ConnectionMonitorResult>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: ConnectionMonitor, + options?: ConnectionMonitorsCreateOrUpdateOptionalParams, + ) => Promise, ConnectionMonitorResult>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: ConnectionMonitor, + options?: ConnectionMonitorsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets a connection monitor by name. */ + get: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsGetOptionalParams, + ) => Promise; +} + +function _getConnectionMonitors(context: NetworkManagementContext) { + return { + stop: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsStopOptionalParams, + ) => stop(context, resourceGroupName, networkWatcherName, connectionMonitorName, options), + beginStop: async ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsStopOptionalParams, + ) => { + const poller = stop( + context, + resourceGroupName, + networkWatcherName, + connectionMonitorName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStopAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsStopOptionalParams, + ) => { + return await stop( + context, + resourceGroupName, + networkWatcherName, + connectionMonitorName, + options, + ); + }, + list: ( + resourceGroupName: string, + networkWatcherName: string, + options?: ConnectionMonitorsListOptionalParams, + ) => list(context, resourceGroupName, networkWatcherName, options), + delete: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkWatcherName, connectionMonitorName, options), + beginDelete: async ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkWatcherName, + connectionMonitorName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkWatcherName, + connectionMonitorName, + options, + ); + }, + updateTags: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: TagsObject, + options?: ConnectionMonitorsUpdateTagsOptionalParams, + ) => + updateTags( + context, + resourceGroupName, + networkWatcherName, + connectionMonitorName, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: ConnectionMonitor, + options?: ConnectionMonitorsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkWatcherName, + connectionMonitorName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: ConnectionMonitor, + options?: ConnectionMonitorsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkWatcherName, + connectionMonitorName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + parameters: ConnectionMonitor, + options?: ConnectionMonitorsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkWatcherName, + connectionMonitorName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + networkWatcherName: string, + connectionMonitorName: string, + options?: ConnectionMonitorsGetOptionalParams, + ) => get(context, resourceGroupName, networkWatcherName, connectionMonitorName, options), + }; +} + +export function _getConnectionMonitorsOperations( + context: NetworkManagementContext, +): ConnectionMonitorsOperations { + return { + ..._getConnectionMonitors(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/connectionPolicies/index.ts b/sdk/network/arm-network/src/classic/connectionPolicies/index.ts new file mode 100644 index 000000000000..a453270368f5 --- /dev/null +++ b/sdk/network/arm-network/src/classic/connectionPolicies/index.ts @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/connectionPolicies/operations.js"; +import { + ConnectionPoliciesListOptionalParams, + ConnectionPoliciesDeleteOptionalParams, + ConnectionPoliciesCreateOrUpdateOptionalParams, + ConnectionPoliciesGetOptionalParams, +} from "../../api/connectionPolicies/options.js"; +import { ConnectionPolicy } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ConnectionPolicies operations. */ +export interface ConnectionPoliciesOperations { + /** Retrieves the details of all ConnectionPolicies. */ + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: ConnectionPoliciesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a ConnectionPolicy. */ + delete: ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options?: ConnectionPoliciesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options?: ConnectionPoliciesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options?: ConnectionPoliciesDeleteOptionalParams, + ) => Promise; + /** Creates a ConnectionPolicy if it doesn't exist else updates the existing one. */ + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + resource: ConnectionPolicy, + options?: ConnectionPoliciesCreateOrUpdateOptionalParams, + ) => PollerLike, ConnectionPolicy>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + resource: ConnectionPolicy, + options?: ConnectionPoliciesCreateOrUpdateOptionalParams, + ) => Promise, ConnectionPolicy>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + resource: ConnectionPolicy, + options?: ConnectionPoliciesCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a ConnectionPolicy. */ + get: ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options?: ConnectionPoliciesGetOptionalParams, + ) => Promise; +} + +function _getConnectionPolicies(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: ConnectionPoliciesListOptionalParams, + ) => list(context, resourceGroupName, virtualHubName, options), + delete: ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options?: ConnectionPoliciesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualHubName, connectionPolicyName, options), + beginDelete: async ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options?: ConnectionPoliciesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + virtualHubName, + connectionPolicyName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options?: ConnectionPoliciesDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + virtualHubName, + connectionPolicyName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + resource: ConnectionPolicy, + options?: ConnectionPoliciesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualHubName, + connectionPolicyName, + resource, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + resource: ConnectionPolicy, + options?: ConnectionPoliciesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualHubName, + connectionPolicyName, + resource, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + resource: ConnectionPolicy, + options?: ConnectionPoliciesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualHubName, + connectionPolicyName, + resource, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualHubName: string, + connectionPolicyName: string, + options?: ConnectionPoliciesGetOptionalParams, + ) => get(context, resourceGroupName, virtualHubName, connectionPolicyName, options), + }; +} + +export function _getConnectionPoliciesOperations( + context: NetworkManagementContext, +): ConnectionPoliciesOperations { + return { + ..._getConnectionPolicies(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/connectivityConfigurations/index.ts b/sdk/network/arm-network/src/classic/connectivityConfigurations/index.ts new file mode 100644 index 000000000000..366d34a6d782 --- /dev/null +++ b/sdk/network/arm-network/src/classic/connectivityConfigurations/index.ts @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/connectivityConfigurations/operations.js"; +import { + ConnectivityConfigurationsListOptionalParams, + ConnectivityConfigurationsDeleteOptionalParams, + ConnectivityConfigurationsCreateOrUpdateOptionalParams, + ConnectivityConfigurationsGetOptionalParams, +} from "../../api/connectivityConfigurations/options.js"; +import { ConnectivityConfiguration } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ConnectivityConfigurations operations. */ +export interface ConnectivityConfigurationsOperations { + /** Lists all the network manager connectivity configuration in a specified network manager. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: ConnectivityConfigurationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: ConnectivityConfigurationsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: ConnectivityConfigurationsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: ConnectivityConfigurationsDeleteOptionalParams, + ) => Promise; + /** Creates/Updates a new network manager connectivity configuration */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + connectivityConfiguration: ConnectivityConfiguration, + options?: ConnectivityConfigurationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name */ + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: ConnectivityConfigurationsGetOptionalParams, + ) => Promise; +} + +function _getConnectivityConfigurations(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: ConnectivityConfigurationsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: ConnectivityConfigurationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkManagerName, configurationName, options), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: ConnectivityConfigurationsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: ConnectivityConfigurationsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + connectivityConfiguration: ConnectivityConfiguration, + options?: ConnectivityConfigurationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + configurationName, + connectivityConfiguration, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: ConnectivityConfigurationsGetOptionalParams, + ) => get(context, resourceGroupName, networkManagerName, configurationName, options), + }; +} + +export function _getConnectivityConfigurationsOperations( + context: NetworkManagementContext, +): ConnectivityConfigurationsOperations { + return { + ..._getConnectivityConfigurations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/customIPPrefixes/index.ts b/sdk/network/arm-network/src/classic/customIPPrefixes/index.ts new file mode 100644 index 000000000000..c834d63851b9 --- /dev/null +++ b/sdk/network/arm-network/src/classic/customIPPrefixes/index.ts @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/customIPPrefixes/operations.js"; +import { + CustomIPPrefixesListAllOptionalParams, + CustomIPPrefixesListOptionalParams, + CustomIPPrefixesDeleteOptionalParams, + CustomIPPrefixesUpdateTagsOptionalParams, + CustomIPPrefixesCreateOrUpdateOptionalParams, + CustomIPPrefixesGetOptionalParams, +} from "../../api/customIPPrefixes/options.js"; +import { TagsObject, CustomIpPrefix } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a CustomIPPrefixes operations. */ +export interface CustomIPPrefixesOperations { + /** Gets all the custom IP prefixes in a subscription. */ + listAll: ( + options?: CustomIPPrefixesListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all custom IP prefixes in a resource group. */ + list: ( + resourceGroupName: string, + options?: CustomIPPrefixesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified custom IP prefix. */ + delete: ( + resourceGroupName: string, + customIpPrefixName: string, + options?: CustomIPPrefixesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + customIpPrefixName: string, + options?: CustomIPPrefixesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + customIpPrefixName: string, + options?: CustomIPPrefixesDeleteOptionalParams, + ) => Promise; + /** Updates custom IP prefix tags. */ + updateTags: ( + resourceGroupName: string, + customIpPrefixName: string, + parameters: TagsObject, + options?: CustomIPPrefixesUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a custom IP prefix. */ + createOrUpdate: ( + resourceGroupName: string, + customIpPrefixName: string, + parameters: CustomIpPrefix, + options?: CustomIPPrefixesCreateOrUpdateOptionalParams, + ) => PollerLike, CustomIpPrefix>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + customIpPrefixName: string, + parameters: CustomIpPrefix, + options?: CustomIPPrefixesCreateOrUpdateOptionalParams, + ) => Promise, CustomIpPrefix>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + customIpPrefixName: string, + parameters: CustomIpPrefix, + options?: CustomIPPrefixesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified custom IP prefix in a specified resource group. */ + get: ( + resourceGroupName: string, + customIpPrefixName: string, + options?: CustomIPPrefixesGetOptionalParams, + ) => Promise; +} + +function _getCustomIPPrefixes(context: NetworkManagementContext) { + return { + listAll: (options?: CustomIPPrefixesListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: CustomIPPrefixesListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + customIpPrefixName: string, + options?: CustomIPPrefixesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, customIpPrefixName, options), + beginDelete: async ( + resourceGroupName: string, + customIpPrefixName: string, + options?: CustomIPPrefixesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, customIpPrefixName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + customIpPrefixName: string, + options?: CustomIPPrefixesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, customIpPrefixName, options); + }, + updateTags: ( + resourceGroupName: string, + customIpPrefixName: string, + parameters: TagsObject, + options?: CustomIPPrefixesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, customIpPrefixName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + customIpPrefixName: string, + parameters: CustomIpPrefix, + options?: CustomIPPrefixesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, customIpPrefixName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + customIpPrefixName: string, + parameters: CustomIpPrefix, + options?: CustomIPPrefixesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + customIpPrefixName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + customIpPrefixName: string, + parameters: CustomIpPrefix, + options?: CustomIPPrefixesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + customIpPrefixName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + customIpPrefixName: string, + options?: CustomIPPrefixesGetOptionalParams, + ) => get(context, resourceGroupName, customIpPrefixName, options), + }; +} + +export function _getCustomIPPrefixesOperations( + context: NetworkManagementContext, +): CustomIPPrefixesOperations { + return { + ..._getCustomIPPrefixes(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/ddosCustomPolicies/index.ts b/sdk/network/arm-network/src/classic/ddosCustomPolicies/index.ts new file mode 100644 index 000000000000..f36fcd8e5425 --- /dev/null +++ b/sdk/network/arm-network/src/classic/ddosCustomPolicies/index.ts @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/ddosCustomPolicies/operations.js"; +import { + DdosCustomPoliciesListAllOptionalParams, + DdosCustomPoliciesListOptionalParams, + DdosCustomPoliciesDeleteOptionalParams, + DdosCustomPoliciesUpdateTagsOptionalParams, + DdosCustomPoliciesCreateOrUpdateOptionalParams, + DdosCustomPoliciesGetOptionalParams, +} from "../../api/ddosCustomPolicies/options.js"; +import { TagsObject, DdosCustomPolicy } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a DdosCustomPolicies operations. */ +export interface DdosCustomPoliciesOperations { + /** Gets all the DDoS custom policies in a subscription. */ + listAll: ( + options?: DdosCustomPoliciesListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all the DDoS custom policies in a resource group. */ + list: ( + resourceGroupName: string, + options?: DdosCustomPoliciesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified DDoS custom policy. */ + delete: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + options?: DdosCustomPoliciesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + options?: DdosCustomPoliciesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + options?: DdosCustomPoliciesDeleteOptionalParams, + ) => Promise; + /** Update a DDoS custom policy tags. */ + updateTags: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: TagsObject, + options?: DdosCustomPoliciesUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a DDoS custom policy. */ + createOrUpdate: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: DdosCustomPolicy, + options?: DdosCustomPoliciesCreateOrUpdateOptionalParams, + ) => PollerLike, DdosCustomPolicy>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: DdosCustomPolicy, + options?: DdosCustomPoliciesCreateOrUpdateOptionalParams, + ) => Promise, DdosCustomPolicy>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: DdosCustomPolicy, + options?: DdosCustomPoliciesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets information about the specified DDoS custom policy. */ + get: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + options?: DdosCustomPoliciesGetOptionalParams, + ) => Promise; +} + +function _getDdosCustomPolicies(context: NetworkManagementContext) { + return { + listAll: (options?: DdosCustomPoliciesListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: DdosCustomPoliciesListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + options?: DdosCustomPoliciesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, ddosCustomPolicyName, options), + beginDelete: async ( + resourceGroupName: string, + ddosCustomPolicyName: string, + options?: DdosCustomPoliciesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, ddosCustomPolicyName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + ddosCustomPolicyName: string, + options?: DdosCustomPoliciesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, ddosCustomPolicyName, options); + }, + updateTags: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: TagsObject, + options?: DdosCustomPoliciesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, ddosCustomPolicyName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: DdosCustomPolicy, + options?: DdosCustomPoliciesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, ddosCustomPolicyName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: DdosCustomPolicy, + options?: DdosCustomPoliciesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + ddosCustomPolicyName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + ddosCustomPolicyName: string, + parameters: DdosCustomPolicy, + options?: DdosCustomPoliciesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + ddosCustomPolicyName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + ddosCustomPolicyName: string, + options?: DdosCustomPoliciesGetOptionalParams, + ) => get(context, resourceGroupName, ddosCustomPolicyName, options), + }; +} + +export function _getDdosCustomPoliciesOperations( + context: NetworkManagementContext, +): DdosCustomPoliciesOperations { + return { + ..._getDdosCustomPolicies(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/ddosProtectionPlans/index.ts b/sdk/network/arm-network/src/classic/ddosProtectionPlans/index.ts new file mode 100644 index 000000000000..66ec11fb2a61 --- /dev/null +++ b/sdk/network/arm-network/src/classic/ddosProtectionPlans/index.ts @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/ddosProtectionPlans/operations.js"; +import { + DdosProtectionPlansListOptionalParams, + DdosProtectionPlansListByResourceGroupOptionalParams, + DdosProtectionPlansDeleteOptionalParams, + DdosProtectionPlansUpdateTagsOptionalParams, + DdosProtectionPlansCreateOrUpdateOptionalParams, + DdosProtectionPlansGetOptionalParams, +} from "../../api/ddosProtectionPlans/options.js"; +import { TagsObject, DdosProtectionPlan } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a DdosProtectionPlans operations. */ +export interface DdosProtectionPlansOperations { + /** Gets all DDoS protection plans in a subscription. */ + list: ( + options?: DdosProtectionPlansListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all the DDoS protection plans in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: DdosProtectionPlansListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified DDoS protection plan. */ + delete: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + options?: DdosProtectionPlansDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + options?: DdosProtectionPlansDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + options?: DdosProtectionPlansDeleteOptionalParams, + ) => Promise; + /** Update a DDoS protection plan tags. */ + updateTags: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: TagsObject, + options?: DdosProtectionPlansUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a DDoS protection plan. */ + createOrUpdate: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: DdosProtectionPlan, + options?: DdosProtectionPlansCreateOrUpdateOptionalParams, + ) => PollerLike, DdosProtectionPlan>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: DdosProtectionPlan, + options?: DdosProtectionPlansCreateOrUpdateOptionalParams, + ) => Promise, DdosProtectionPlan>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: DdosProtectionPlan, + options?: DdosProtectionPlansCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets information about the specified DDoS protection plan. */ + get: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + options?: DdosProtectionPlansGetOptionalParams, + ) => Promise; +} + +function _getDdosProtectionPlans(context: NetworkManagementContext) { + return { + list: (options?: DdosProtectionPlansListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: DdosProtectionPlansListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + options?: DdosProtectionPlansDeleteOptionalParams, + ) => $delete(context, resourceGroupName, ddosProtectionPlanName, options), + beginDelete: async ( + resourceGroupName: string, + ddosProtectionPlanName: string, + options?: DdosProtectionPlansDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, ddosProtectionPlanName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + ddosProtectionPlanName: string, + options?: DdosProtectionPlansDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, ddosProtectionPlanName, options); + }, + updateTags: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: TagsObject, + options?: DdosProtectionPlansUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, ddosProtectionPlanName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: DdosProtectionPlan, + options?: DdosProtectionPlansCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, ddosProtectionPlanName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: DdosProtectionPlan, + options?: DdosProtectionPlansCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + ddosProtectionPlanName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + ddosProtectionPlanName: string, + parameters: DdosProtectionPlan, + options?: DdosProtectionPlansCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + ddosProtectionPlanName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + ddosProtectionPlanName: string, + options?: DdosProtectionPlansGetOptionalParams, + ) => get(context, resourceGroupName, ddosProtectionPlanName, options), + }; +} + +export function _getDdosProtectionPlansOperations( + context: NetworkManagementContext, +): DdosProtectionPlansOperations { + return { + ..._getDdosProtectionPlans(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/defaultSecurityRules/index.ts b/sdk/network/arm-network/src/classic/defaultSecurityRules/index.ts new file mode 100644 index 000000000000..bd1534e29d44 --- /dev/null +++ b/sdk/network/arm-network/src/classic/defaultSecurityRules/index.ts @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, get } from "../../api/defaultSecurityRules/operations.js"; +import { + DefaultSecurityRulesListOptionalParams, + DefaultSecurityRulesGetOptionalParams, +} from "../../api/defaultSecurityRules/options.js"; +import { SecurityRule } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a DefaultSecurityRules operations. */ +export interface DefaultSecurityRulesOperations { + /** Gets all default security rules in a network security group. */ + list: ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: DefaultSecurityRulesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get the specified default network security rule. */ + get: ( + resourceGroupName: string, + networkSecurityGroupName: string, + defaultSecurityRuleName: string, + options?: DefaultSecurityRulesGetOptionalParams, + ) => Promise; +} + +function _getDefaultSecurityRules(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: DefaultSecurityRulesListOptionalParams, + ) => list(context, resourceGroupName, networkSecurityGroupName, options), + get: ( + resourceGroupName: string, + networkSecurityGroupName: string, + defaultSecurityRuleName: string, + options?: DefaultSecurityRulesGetOptionalParams, + ) => + get(context, resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName, options), + }; +} + +export function _getDefaultSecurityRulesOperations( + context: NetworkManagementContext, +): DefaultSecurityRulesOperations { + return { + ..._getDefaultSecurityRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/dscpConfiguration/index.ts b/sdk/network/arm-network/src/classic/dscpConfiguration/index.ts new file mode 100644 index 000000000000..b052d00797be --- /dev/null +++ b/sdk/network/arm-network/src/classic/dscpConfiguration/index.ts @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + createOrUpdate, + get, +} from "../../api/dscpConfiguration/operations.js"; +import { + DscpConfigurationListAllOptionalParams, + DscpConfigurationListOptionalParams, + DscpConfigurationDeleteOptionalParams, + DscpConfigurationCreateOrUpdateOptionalParams, + DscpConfigurationGetOptionalParams, +} from "../../api/dscpConfiguration/options.js"; +import { DscpConfiguration } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a DscpConfiguration operations. */ +export interface DscpConfigurationOperations { + /** Gets all dscp configurations in a subscription. */ + listAll: ( + options?: DscpConfigurationListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets a DSCP Configuration. */ + list: ( + resourceGroupName: string, + options?: DscpConfigurationListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a DSCP Configuration. */ + delete: ( + resourceGroupName: string, + dscpConfigurationName: string, + options?: DscpConfigurationDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + dscpConfigurationName: string, + options?: DscpConfigurationDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + dscpConfigurationName: string, + options?: DscpConfigurationDeleteOptionalParams, + ) => Promise; + /** Creates or updates a DSCP Configuration. */ + createOrUpdate: ( + resourceGroupName: string, + dscpConfigurationName: string, + parameters: DscpConfiguration, + options?: DscpConfigurationCreateOrUpdateOptionalParams, + ) => PollerLike, DscpConfiguration>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + dscpConfigurationName: string, + parameters: DscpConfiguration, + options?: DscpConfigurationCreateOrUpdateOptionalParams, + ) => Promise, DscpConfiguration>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + dscpConfigurationName: string, + parameters: DscpConfiguration, + options?: DscpConfigurationCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets a DSCP Configuration. */ + get: ( + resourceGroupName: string, + dscpConfigurationName: string, + options?: DscpConfigurationGetOptionalParams, + ) => Promise; +} + +function _getDscpConfiguration(context: NetworkManagementContext) { + return { + listAll: (options?: DscpConfigurationListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: DscpConfigurationListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + dscpConfigurationName: string, + options?: DscpConfigurationDeleteOptionalParams, + ) => $delete(context, resourceGroupName, dscpConfigurationName, options), + beginDelete: async ( + resourceGroupName: string, + dscpConfigurationName: string, + options?: DscpConfigurationDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, dscpConfigurationName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + dscpConfigurationName: string, + options?: DscpConfigurationDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, dscpConfigurationName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + dscpConfigurationName: string, + parameters: DscpConfiguration, + options?: DscpConfigurationCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, dscpConfigurationName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + dscpConfigurationName: string, + parameters: DscpConfiguration, + options?: DscpConfigurationCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + dscpConfigurationName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + dscpConfigurationName: string, + parameters: DscpConfiguration, + options?: DscpConfigurationCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + dscpConfigurationName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + dscpConfigurationName: string, + options?: DscpConfigurationGetOptionalParams, + ) => get(context, resourceGroupName, dscpConfigurationName, options), + }; +} + +export function _getDscpConfigurationOperations( + context: NetworkManagementContext, +): DscpConfigurationOperations { + return { + ..._getDscpConfiguration(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRouteCircuitAuthorizations/index.ts b/sdk/network/arm-network/src/classic/expressRouteCircuitAuthorizations/index.ts new file mode 100644 index 000000000000..bd7212ac2351 --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRouteCircuitAuthorizations/index.ts @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/expressRouteCircuitAuthorizations/operations.js"; +import { + ExpressRouteCircuitAuthorizationsListOptionalParams, + ExpressRouteCircuitAuthorizationsDeleteOptionalParams, + ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, + ExpressRouteCircuitAuthorizationsGetOptionalParams, +} from "../../api/expressRouteCircuitAuthorizations/options.js"; +import { ExpressRouteCircuitAuthorization } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ExpressRouteCircuitAuthorizations operations. */ +export interface ExpressRouteCircuitAuthorizationsOperations { + /** Gets all authorizations in an express route circuit. */ + list: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitAuthorizationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified authorization from the specified express route circuit. */ + delete: ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams, + ) => Promise; + /** Creates or updates an authorization in the specified express route circuit. */ + createOrUpdate: ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + authorizationParameters: ExpressRouteCircuitAuthorization, + options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteCircuitAuthorization + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + authorizationParameters: ExpressRouteCircuitAuthorization, + options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteCircuitAuthorization + > + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + authorizationParameters: ExpressRouteCircuitAuthorization, + options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified authorization from the specified express route circuit. */ + get: ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options?: ExpressRouteCircuitAuthorizationsGetOptionalParams, + ) => Promise; +} + +function _getExpressRouteCircuitAuthorizations(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitAuthorizationsListOptionalParams, + ) => list(context, resourceGroupName, circuitName, options), + delete: ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, circuitName, authorizationName, options), + beginDelete: async ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, circuitName, authorizationName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, circuitName, authorizationName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + authorizationParameters: ExpressRouteCircuitAuthorization, + options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + circuitName, + authorizationName, + authorizationParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + authorizationParameters: ExpressRouteCircuitAuthorization, + options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + circuitName, + authorizationName, + authorizationParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + authorizationParameters: ExpressRouteCircuitAuthorization, + options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + circuitName, + authorizationName, + authorizationParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + circuitName: string, + authorizationName: string, + options?: ExpressRouteCircuitAuthorizationsGetOptionalParams, + ) => get(context, resourceGroupName, circuitName, authorizationName, options), + }; +} + +export function _getExpressRouteCircuitAuthorizationsOperations( + context: NetworkManagementContext, +): ExpressRouteCircuitAuthorizationsOperations { + return { + ..._getExpressRouteCircuitAuthorizations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRouteCircuitConnections/index.ts b/sdk/network/arm-network/src/classic/expressRouteCircuitConnections/index.ts new file mode 100644 index 000000000000..13a8d3563ddc --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRouteCircuitConnections/index.ts @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/expressRouteCircuitConnections/operations.js"; +import { + ExpressRouteCircuitConnectionsListOptionalParams, + ExpressRouteCircuitConnectionsDeleteOptionalParams, + ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, + ExpressRouteCircuitConnectionsGetOptionalParams, +} from "../../api/expressRouteCircuitConnections/options.js"; +import { ExpressRouteCircuitConnection } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ExpressRouteCircuitConnections operations. */ +export interface ExpressRouteCircuitConnectionsOperations { + /** Gets all global reach connections associated with a private peering in an express route circuit. */ + list: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Express Route Circuit Connection from the specified express route circuit. */ + delete: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options?: ExpressRouteCircuitConnectionsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options?: ExpressRouteCircuitConnectionsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options?: ExpressRouteCircuitConnectionsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a Express Route Circuit Connection in the specified express route circuits. */ + createOrUpdate: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, + options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, + ) => PollerLike, ExpressRouteCircuitConnection>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, + options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, ExpressRouteCircuitConnection> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, + options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified Express Route Circuit Connection from the specified express route circuit. */ + get: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options?: ExpressRouteCircuitConnectionsGetOptionalParams, + ) => Promise; +} + +function _getExpressRouteCircuitConnections(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitConnectionsListOptionalParams, + ) => list(context, resourceGroupName, circuitName, peeringName, options), + delete: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options?: ExpressRouteCircuitConnectionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, circuitName, peeringName, connectionName, options), + beginDelete: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options?: ExpressRouteCircuitConnectionsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + circuitName, + peeringName, + connectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options?: ExpressRouteCircuitConnectionsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + circuitName, + peeringName, + connectionName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, + options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + circuitName, + peeringName, + connectionName, + expressRouteCircuitConnectionParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, + options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + circuitName, + peeringName, + connectionName, + expressRouteCircuitConnectionParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, + options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + circuitName, + peeringName, + connectionName, + expressRouteCircuitConnectionParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options?: ExpressRouteCircuitConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, circuitName, peeringName, connectionName, options), + }; +} + +export function _getExpressRouteCircuitConnectionsOperations( + context: NetworkManagementContext, +): ExpressRouteCircuitConnectionsOperations { + return { + ..._getExpressRouteCircuitConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRouteCircuitPeerings/index.ts b/sdk/network/arm-network/src/classic/expressRouteCircuitPeerings/index.ts new file mode 100644 index 000000000000..13f6823a643d --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRouteCircuitPeerings/index.ts @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/expressRouteCircuitPeerings/operations.js"; +import { + ExpressRouteCircuitPeeringsListOptionalParams, + ExpressRouteCircuitPeeringsDeleteOptionalParams, + ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, + ExpressRouteCircuitPeeringsGetOptionalParams, +} from "../../api/expressRouteCircuitPeerings/options.js"; +import { ExpressRouteCircuitPeering } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ExpressRouteCircuitPeerings operations. */ +export interface ExpressRouteCircuitPeeringsOperations { + /** Gets all peerings in a specified express route circuit. */ + list: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitPeeringsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified peering from the specified express route circuit. */ + delete: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitPeeringsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitPeeringsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitPeeringsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a peering in the specified express route circuits. */ + createOrUpdate: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + peeringParameters: ExpressRouteCircuitPeering, + options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, + ) => PollerLike, ExpressRouteCircuitPeering>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + peeringParameters: ExpressRouteCircuitPeering, + options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, ExpressRouteCircuitPeering> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + peeringParameters: ExpressRouteCircuitPeering, + options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified peering for the express route circuit. */ + get: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitPeeringsGetOptionalParams, + ) => Promise; +} + +function _getExpressRouteCircuitPeerings(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitPeeringsListOptionalParams, + ) => list(context, resourceGroupName, circuitName, options), + delete: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitPeeringsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, circuitName, peeringName, options), + beginDelete: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitPeeringsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, circuitName, peeringName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitPeeringsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, circuitName, peeringName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + peeringParameters: ExpressRouteCircuitPeering, + options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + circuitName, + peeringName, + peeringParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + peeringParameters: ExpressRouteCircuitPeering, + options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + circuitName, + peeringName, + peeringParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + peeringParameters: ExpressRouteCircuitPeering, + options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + circuitName, + peeringName, + peeringParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitPeeringsGetOptionalParams, + ) => get(context, resourceGroupName, circuitName, peeringName, options), + }; +} + +export function _getExpressRouteCircuitPeeringsOperations( + context: NetworkManagementContext, +): ExpressRouteCircuitPeeringsOperations { + return { + ..._getExpressRouteCircuitPeerings(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRouteCircuits/index.ts b/sdk/network/arm-network/src/classic/expressRouteCircuits/index.ts new file mode 100644 index 000000000000..c6872eab1f15 --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRouteCircuits/index.ts @@ -0,0 +1,749 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + getPeeringStats, + listRoutesTableSummary, + listRoutesTable, + listArpTable, + stopCircuitLinkFailoverTest, + startCircuitLinkFailoverTest, + getCircuitLinkFailoverSingleTestDetails, + getCircuitLinkFailoverAllTestsDetails, + getStats, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/expressRouteCircuits/operations.js"; +import { + ExpressRouteCircuitsGetPeeringStatsOptionalParams, + ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, + ExpressRouteCircuitsListRoutesTableOptionalParams, + ExpressRouteCircuitsListArpTableOptionalParams, + ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams, + ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams, + ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams, + ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams, + ExpressRouteCircuitsGetStatsOptionalParams, + ExpressRouteCircuitsListAllOptionalParams, + ExpressRouteCircuitsListOptionalParams, + ExpressRouteCircuitsDeleteOptionalParams, + ExpressRouteCircuitsUpdateTagsOptionalParams, + ExpressRouteCircuitsCreateOrUpdateOptionalParams, + ExpressRouteCircuitsGetOptionalParams, +} from "../../api/expressRouteCircuits/options.js"; +import { + TagsObject, + ExpressRouteCircuit, + ExpressRouteCircuitStats, + ExpressRouteLinkFailoverAllTestsDetails, + ExpressRouteLinkFailoverSingleTestDetails, + ExpressRouteLinkFailoverStopApiParameters, + ExpressRouteCircuitsArpTableListResult, + ExpressRouteCircuitsRoutesTableListResult, + ExpressRouteCircuitsRoutesTableSummaryListResult, +} from "../../models/microsoft/network/models.js"; +import { + ExpressRouteCircuitsStopCircuitLinkFailoverTestResponse, + ExpressRouteCircuitsStartCircuitLinkFailoverTestResponse, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ExpressRouteCircuits operations. */ +export interface ExpressRouteCircuitsOperations { + /** Gets all stats from an express route circuit in a resource group. */ + getPeeringStats: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitsGetPeeringStatsOptionalParams, + ) => Promise; + /** Gets the currently advertised routes table summary associated with the express route circuit in a resource group. */ + listRoutesTableSummary: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableSummaryListResult + >; + /** @deprecated use listRoutesTableSummary instead */ + beginListRoutesTableSummary: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableSummaryListResult + > + >; + /** @deprecated use listRoutesTableSummary instead */ + beginListRoutesTableSummaryAndWait: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, + ) => Promise; + /** Gets the currently advertised routes table associated with the express route circuit in a resource group. */ + listRoutesTable: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableListResult + >; + /** @deprecated use listRoutesTable instead */ + beginListRoutesTable: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableListResult + > + >; + /** @deprecated use listRoutesTable instead */ + beginListRoutesTableAndWait: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableOptionalParams, + ) => Promise; + /** Gets the currently advertised ARP table associated with the express route circuit in a resource group. */ + listArpTable: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListArpTableOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteCircuitsArpTableListResult + >; + /** @deprecated use listArpTable instead */ + beginListArpTable: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListArpTableOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteCircuitsArpTableListResult + > + >; + /** @deprecated use listArpTable instead */ + beginListArpTableAndWait: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListArpTableOptionalParams, + ) => Promise; + /** Stops link failover simulation on the express route circuit. */ + stopCircuitLinkFailoverTest: ( + resourceGroupName: string, + circuitName: string, + body: { + stopParameters: ExpressRouteLinkFailoverStopApiParameters; + }, + options?: ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteCircuitsStopCircuitLinkFailoverTestResponse + >; + /** @deprecated use stopCircuitLinkFailoverTest instead */ + beginStopCircuitLinkFailoverTest: ( + resourceGroupName: string, + circuitName: string, + body: { + stopParameters: ExpressRouteLinkFailoverStopApiParameters; + }, + options?: ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteCircuitsStopCircuitLinkFailoverTestResponse + > + >; + /** @deprecated use stopCircuitLinkFailoverTest instead */ + beginStopCircuitLinkFailoverTestAndWait: ( + resourceGroupName: string, + circuitName: string, + body: { + stopParameters: ExpressRouteLinkFailoverStopApiParameters; + }, + options?: ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams, + ) => Promise; + /** Starts link failover simulation on the express route circuit for the specified link type and test category. */ + startCircuitLinkFailoverTest: ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + options?: ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteCircuitsStartCircuitLinkFailoverTestResponse + >; + /** @deprecated use startCircuitLinkFailoverTest instead */ + beginStartCircuitLinkFailoverTest: ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + options?: ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteCircuitsStartCircuitLinkFailoverTestResponse + > + >; + /** @deprecated use startCircuitLinkFailoverTest instead */ + beginStartCircuitLinkFailoverTestAndWait: ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + options?: ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams, + ) => Promise; + /** Retrieves the details of a particular link failover test performed on the express route circuit. */ + getCircuitLinkFailoverSingleTestDetails: ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + failoverTestId: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteLinkFailoverSingleTestDetails[] + >; + /** @deprecated use getCircuitLinkFailoverSingleTestDetails instead */ + beginGetCircuitLinkFailoverSingleTestDetails: ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + failoverTestId: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteLinkFailoverSingleTestDetails[] + > + >; + /** @deprecated use getCircuitLinkFailoverSingleTestDetails instead */ + beginGetCircuitLinkFailoverSingleTestDetailsAndWait: ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + failoverTestId: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams, + ) => Promise; + /** Retrieves the details of all the link failover tests performed on the express route circuit. */ + getCircuitLinkFailoverAllTestsDetails: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteLinkFailoverAllTestsDetails[] + >; + /** @deprecated use getCircuitLinkFailoverAllTestsDetails instead */ + beginGetCircuitLinkFailoverAllTestsDetails: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteLinkFailoverAllTestsDetails[] + > + >; + /** @deprecated use getCircuitLinkFailoverAllTestsDetails instead */ + beginGetCircuitLinkFailoverAllTestsDetailsAndWait: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams, + ) => Promise; + /** Gets all the stats from an express route circuit in a resource group. */ + getStats: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsGetStatsOptionalParams, + ) => Promise; + /** Gets all the express route circuits in a subscription. */ + listAll: ( + options?: ExpressRouteCircuitsListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all the express route circuits in a resource group. */ + list: ( + resourceGroupName: string, + options?: ExpressRouteCircuitsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified express route circuit. */ + delete: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsDeleteOptionalParams, + ) => Promise; + /** Updates an express route circuit tags. */ + updateTags: ( + resourceGroupName: string, + circuitName: string, + parameters: TagsObject, + options?: ExpressRouteCircuitsUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates an express route circuit. */ + createOrUpdate: ( + resourceGroupName: string, + circuitName: string, + parameters: ExpressRouteCircuit, + options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams, + ) => PollerLike, ExpressRouteCircuit>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + circuitName: string, + parameters: ExpressRouteCircuit, + options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams, + ) => Promise, ExpressRouteCircuit>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + circuitName: string, + parameters: ExpressRouteCircuit, + options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets information about the specified express route circuit. */ + get: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsGetOptionalParams, + ) => Promise; +} + +function _getExpressRouteCircuits(context: NetworkManagementContext) { + return { + getPeeringStats: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: ExpressRouteCircuitsGetPeeringStatsOptionalParams, + ) => getPeeringStats(context, resourceGroupName, circuitName, peeringName, options), + listRoutesTableSummary: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, + ) => + listRoutesTableSummary( + context, + resourceGroupName, + circuitName, + peeringName, + devicePath, + options, + ), + beginListRoutesTableSummary: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, + ) => { + const poller = listRoutesTableSummary( + context, + resourceGroupName, + circuitName, + peeringName, + devicePath, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListRoutesTableSummaryAndWait: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, + ) => { + return await listRoutesTableSummary( + context, + resourceGroupName, + circuitName, + peeringName, + devicePath, + options, + ); + }, + listRoutesTable: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableOptionalParams, + ) => listRoutesTable(context, resourceGroupName, circuitName, peeringName, devicePath, options), + beginListRoutesTable: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableOptionalParams, + ) => { + const poller = listRoutesTable( + context, + resourceGroupName, + circuitName, + peeringName, + devicePath, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListRoutesTableAndWait: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListRoutesTableOptionalParams, + ) => { + return await listRoutesTable( + context, + resourceGroupName, + circuitName, + peeringName, + devicePath, + options, + ); + }, + listArpTable: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListArpTableOptionalParams, + ) => listArpTable(context, resourceGroupName, circuitName, peeringName, devicePath, options), + beginListArpTable: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListArpTableOptionalParams, + ) => { + const poller = listArpTable( + context, + resourceGroupName, + circuitName, + peeringName, + devicePath, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListArpTableAndWait: async ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCircuitsListArpTableOptionalParams, + ) => { + return await listArpTable( + context, + resourceGroupName, + circuitName, + peeringName, + devicePath, + options, + ); + }, + stopCircuitLinkFailoverTest: ( + resourceGroupName: string, + circuitName: string, + body: { + stopParameters: ExpressRouteLinkFailoverStopApiParameters; + }, + options?: ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams, + ) => stopCircuitLinkFailoverTest(context, resourceGroupName, circuitName, body, options), + beginStopCircuitLinkFailoverTest: async ( + resourceGroupName: string, + circuitName: string, + body: { + stopParameters: ExpressRouteLinkFailoverStopApiParameters; + }, + options?: ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams, + ) => { + const poller = stopCircuitLinkFailoverTest( + context, + resourceGroupName, + circuitName, + body, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStopCircuitLinkFailoverTestAndWait: async ( + resourceGroupName: string, + circuitName: string, + body: { + stopParameters: ExpressRouteLinkFailoverStopApiParameters; + }, + options?: ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams, + ) => { + return await stopCircuitLinkFailoverTest( + context, + resourceGroupName, + circuitName, + body, + options, + ); + }, + startCircuitLinkFailoverTest: ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + options?: ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams, + ) => + startCircuitLinkFailoverTest( + context, + resourceGroupName, + circuitName, + linkType, + circuitTestCategory, + options, + ), + beginStartCircuitLinkFailoverTest: async ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + options?: ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams, + ) => { + const poller = startCircuitLinkFailoverTest( + context, + resourceGroupName, + circuitName, + linkType, + circuitTestCategory, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStartCircuitLinkFailoverTestAndWait: async ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + options?: ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams, + ) => { + return await startCircuitLinkFailoverTest( + context, + resourceGroupName, + circuitName, + linkType, + circuitTestCategory, + options, + ); + }, + getCircuitLinkFailoverSingleTestDetails: ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + failoverTestId: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams, + ) => + getCircuitLinkFailoverSingleTestDetails( + context, + resourceGroupName, + circuitName, + linkType, + circuitTestCategory, + failoverTestId, + options, + ), + beginGetCircuitLinkFailoverSingleTestDetails: async ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + failoverTestId: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams, + ) => { + const poller = getCircuitLinkFailoverSingleTestDetails( + context, + resourceGroupName, + circuitName, + linkType, + circuitTestCategory, + failoverTestId, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetCircuitLinkFailoverSingleTestDetailsAndWait: async ( + resourceGroupName: string, + circuitName: string, + linkType: string, + circuitTestCategory: string, + failoverTestId: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams, + ) => { + return await getCircuitLinkFailoverSingleTestDetails( + context, + resourceGroupName, + circuitName, + linkType, + circuitTestCategory, + failoverTestId, + options, + ); + }, + getCircuitLinkFailoverAllTestsDetails: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams, + ) => getCircuitLinkFailoverAllTestsDetails(context, resourceGroupName, circuitName, options), + beginGetCircuitLinkFailoverAllTestsDetails: async ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams, + ) => { + const poller = getCircuitLinkFailoverAllTestsDetails( + context, + resourceGroupName, + circuitName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetCircuitLinkFailoverAllTestsDetailsAndWait: async ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams, + ) => { + return await getCircuitLinkFailoverAllTestsDetails( + context, + resourceGroupName, + circuitName, + options, + ); + }, + getStats: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsGetStatsOptionalParams, + ) => getStats(context, resourceGroupName, circuitName, options), + listAll: (options?: ExpressRouteCircuitsListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: ExpressRouteCircuitsListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, circuitName, options), + beginDelete: async ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, circuitName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, circuitName, options); + }, + updateTags: ( + resourceGroupName: string, + circuitName: string, + parameters: TagsObject, + options?: ExpressRouteCircuitsUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, circuitName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + circuitName: string, + parameters: ExpressRouteCircuit, + options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, circuitName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + circuitName: string, + parameters: ExpressRouteCircuit, + options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate(context, resourceGroupName, circuitName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + circuitName: string, + parameters: ExpressRouteCircuit, + options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate(context, resourceGroupName, circuitName, parameters, options); + }, + get: ( + resourceGroupName: string, + circuitName: string, + options?: ExpressRouteCircuitsGetOptionalParams, + ) => get(context, resourceGroupName, circuitName, options), + }; +} + +export function _getExpressRouteCircuitsOperations( + context: NetworkManagementContext, +): ExpressRouteCircuitsOperations { + return { + ..._getExpressRouteCircuits(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRouteConnections/index.ts b/sdk/network/arm-network/src/classic/expressRouteConnections/index.ts new file mode 100644 index 000000000000..b3c98e751308 --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRouteConnections/index.ts @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + get, + createOrUpdate, +} from "../../api/expressRouteConnections/operations.js"; +import { + ExpressRouteConnectionsListOptionalParams, + ExpressRouteConnectionsDeleteOptionalParams, + ExpressRouteConnectionsGetOptionalParams, + ExpressRouteConnectionsCreateOrUpdateOptionalParams, +} from "../../api/expressRouteConnections/options.js"; +import { + ExpressRouteConnection, + ExpressRouteConnectionList, +} from "../../models/microsoft/network/models.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ExpressRouteConnections operations. */ +export interface ExpressRouteConnectionsOperations { + /** Lists ExpressRouteConnections. */ + list: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteConnectionsListOptionalParams, + ) => Promise; + /** Deletes a connection to a ExpressRoute circuit. */ + delete: ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options?: ExpressRouteConnectionsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options?: ExpressRouteConnectionsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options?: ExpressRouteConnectionsDeleteOptionalParams, + ) => Promise; + /** Gets the specified ExpressRouteConnection. */ + get: ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options?: ExpressRouteConnectionsGetOptionalParams, + ) => Promise; + /** Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. */ + createOrUpdate: ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + putExpressRouteConnectionParameters: ExpressRouteConnection, + options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams, + ) => PollerLike, ExpressRouteConnection>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + putExpressRouteConnectionParameters: ExpressRouteConnection, + options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams, + ) => Promise, ExpressRouteConnection>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + putExpressRouteConnectionParameters: ExpressRouteConnection, + options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams, + ) => Promise; +} + +function _getExpressRouteConnections(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteConnectionsListOptionalParams, + ) => list(context, resourceGroupName, expressRouteGatewayName, options), + delete: ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options?: ExpressRouteConnectionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, expressRouteGatewayName, connectionName, options), + beginDelete: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options?: ExpressRouteConnectionsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + expressRouteGatewayName, + connectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options?: ExpressRouteConnectionsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + expressRouteGatewayName, + connectionName, + options, + ); + }, + get: ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + options?: ExpressRouteConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, expressRouteGatewayName, connectionName, options), + createOrUpdate: ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + putExpressRouteConnectionParameters: ExpressRouteConnection, + options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + expressRouteGatewayName, + connectionName, + putExpressRouteConnectionParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + putExpressRouteConnectionParameters: ExpressRouteConnection, + options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + expressRouteGatewayName, + connectionName, + putExpressRouteConnectionParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + connectionName: string, + putExpressRouteConnectionParameters: ExpressRouteConnection, + options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + expressRouteGatewayName, + connectionName, + putExpressRouteConnectionParameters, + options, + ); + }, + }; +} + +export function _getExpressRouteConnectionsOperations( + context: NetworkManagementContext, +): ExpressRouteConnectionsOperations { + return { + ..._getExpressRouteConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRouteCrossConnectionPeerings/index.ts b/sdk/network/arm-network/src/classic/expressRouteCrossConnectionPeerings/index.ts new file mode 100644 index 000000000000..8e66f8ba23d6 --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRouteCrossConnectionPeerings/index.ts @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + createOrUpdate, + get, + $delete, + list, +} from "../../api/expressRouteCrossConnectionPeerings/operations.js"; +import { + ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, + ExpressRouteCrossConnectionPeeringsGetOptionalParams, + ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, + ExpressRouteCrossConnectionPeeringsListOptionalParams, +} from "../../api/expressRouteCrossConnectionPeerings/options.js"; +import { ExpressRouteCrossConnectionPeering } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ExpressRouteCrossConnectionPeerings operations. */ +export interface ExpressRouteCrossConnectionPeeringsOperations { + /** Creates or updates a peering in the specified ExpressRouteCrossConnection. */ + createOrUpdate: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + peeringParameters: ExpressRouteCrossConnectionPeering, + options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteCrossConnectionPeering + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + peeringParameters: ExpressRouteCrossConnectionPeering, + options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteCrossConnectionPeering + > + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + peeringParameters: ExpressRouteCrossConnectionPeering, + options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified peering for the ExpressRouteCrossConnection. */ + get: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options?: ExpressRouteCrossConnectionPeeringsGetOptionalParams, + ) => Promise; + /** Deletes the specified peering from the ExpressRouteCrossConnection. */ + delete: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, + ) => Promise; + /** Gets all peerings in a specified ExpressRouteCrossConnection. */ + list: ( + resourceGroupName: string, + crossConnectionName: string, + options?: ExpressRouteCrossConnectionPeeringsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getExpressRouteCrossConnectionPeerings(context: NetworkManagementContext) { + return { + createOrUpdate: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + peeringParameters: ExpressRouteCrossConnectionPeering, + options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + crossConnectionName, + peeringName, + peeringParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + peeringParameters: ExpressRouteCrossConnectionPeering, + options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + crossConnectionName, + peeringName, + peeringParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + peeringParameters: ExpressRouteCrossConnectionPeering, + options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + crossConnectionName, + peeringName, + peeringParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options?: ExpressRouteCrossConnectionPeeringsGetOptionalParams, + ) => get(context, resourceGroupName, crossConnectionName, peeringName, options), + delete: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, crossConnectionName, peeringName, options), + beginDelete: async ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, crossConnectionName, peeringName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, crossConnectionName, peeringName, options); + }, + list: ( + resourceGroupName: string, + crossConnectionName: string, + options?: ExpressRouteCrossConnectionPeeringsListOptionalParams, + ) => list(context, resourceGroupName, crossConnectionName, options), + }; +} + +export function _getExpressRouteCrossConnectionPeeringsOperations( + context: NetworkManagementContext, +): ExpressRouteCrossConnectionPeeringsOperations { + return { + ..._getExpressRouteCrossConnectionPeerings(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRouteCrossConnections/index.ts b/sdk/network/arm-network/src/classic/expressRouteCrossConnections/index.ts new file mode 100644 index 000000000000..c93606334651 --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRouteCrossConnections/index.ts @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listRoutesTable, + listRoutesTableSummary, + listArpTable, + list, + listByResourceGroup, + updateTags, + createOrUpdate, + get, +} from "../../api/expressRouteCrossConnections/operations.js"; +import { + ExpressRouteCrossConnectionsListRoutesTableOptionalParams, + ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, + ExpressRouteCrossConnectionsListArpTableOptionalParams, + ExpressRouteCrossConnectionsListOptionalParams, + ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, + ExpressRouteCrossConnectionsUpdateTagsOptionalParams, + ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, + ExpressRouteCrossConnectionsGetOptionalParams, +} from "../../api/expressRouteCrossConnections/options.js"; +import { + TagsObject, + ExpressRouteCircuitsArpTableListResult, + ExpressRouteCircuitsRoutesTableListResult, + ExpressRouteCrossConnection, + ExpressRouteCrossConnectionsRoutesTableSummaryListResult, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ExpressRouteCrossConnections operations. */ +export interface ExpressRouteCrossConnectionsOperations { + /** Gets the currently advertised routes table associated with the express route cross connection in a resource group. */ + listRoutesTable: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableListResult + >; + /** @deprecated use listRoutesTable instead */ + beginListRoutesTable: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteCircuitsRoutesTableListResult + > + >; + /** @deprecated use listRoutesTable instead */ + beginListRoutesTableAndWait: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams, + ) => Promise; + /** Gets the route table summary associated with the express route cross connection in a resource group. */ + listRoutesTableSummary: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteCrossConnectionsRoutesTableSummaryListResult + >; + /** @deprecated use listRoutesTableSummary instead */ + beginListRoutesTableSummary: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteCrossConnectionsRoutesTableSummaryListResult + > + >; + /** @deprecated use listRoutesTableSummary instead */ + beginListRoutesTableSummaryAndWait: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, + ) => Promise; + /** Gets the currently advertised ARP table associated with the express route cross connection in a resource group. */ + listArpTable: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListArpTableOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteCircuitsArpTableListResult + >; + /** @deprecated use listArpTable instead */ + beginListArpTable: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListArpTableOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteCircuitsArpTableListResult + > + >; + /** @deprecated use listArpTable instead */ + beginListArpTableAndWait: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListArpTableOptionalParams, + ) => Promise; + /** Retrieves all the ExpressRouteCrossConnections in a subscription. */ + list: ( + options?: ExpressRouteCrossConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Retrieves all the ExpressRouteCrossConnections in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Updates an express route cross connection tags. */ + updateTags: ( + resourceGroupName: string, + crossConnectionName: string, + crossConnectionParameters: TagsObject, + options?: ExpressRouteCrossConnectionsUpdateTagsOptionalParams, + ) => Promise; + /** Update the specified ExpressRouteCrossConnection. */ + createOrUpdate: ( + resourceGroupName: string, + crossConnectionName: string, + parameters: ExpressRouteCrossConnection, + options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, + ) => PollerLike, ExpressRouteCrossConnection>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + crossConnectionName: string, + parameters: ExpressRouteCrossConnection, + options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, ExpressRouteCrossConnection> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + crossConnectionName: string, + parameters: ExpressRouteCrossConnection, + options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets details about the specified ExpressRouteCrossConnection. */ + get: ( + resourceGroupName: string, + crossConnectionName: string, + options?: ExpressRouteCrossConnectionsGetOptionalParams, + ) => Promise; +} + +function _getExpressRouteCrossConnections(context: NetworkManagementContext) { + return { + listRoutesTable: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams, + ) => + listRoutesTable( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ), + beginListRoutesTable: async ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams, + ) => { + const poller = listRoutesTable( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListRoutesTableAndWait: async ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams, + ) => { + return await listRoutesTable( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ); + }, + listRoutesTableSummary: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, + ) => + listRoutesTableSummary( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ), + beginListRoutesTableSummary: async ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, + ) => { + const poller = listRoutesTableSummary( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListRoutesTableSummaryAndWait: async ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, + ) => { + return await listRoutesTableSummary( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ); + }, + listArpTable: ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListArpTableOptionalParams, + ) => + listArpTable( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ), + beginListArpTable: async ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListArpTableOptionalParams, + ) => { + const poller = listArpTable( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListArpTableAndWait: async ( + resourceGroupName: string, + crossConnectionName: string, + peeringName: string, + devicePath: string, + options?: ExpressRouteCrossConnectionsListArpTableOptionalParams, + ) => { + return await listArpTable( + context, + resourceGroupName, + crossConnectionName, + peeringName, + devicePath, + options, + ); + }, + list: (options?: ExpressRouteCrossConnectionsListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + updateTags: ( + resourceGroupName: string, + crossConnectionName: string, + crossConnectionParameters: TagsObject, + options?: ExpressRouteCrossConnectionsUpdateTagsOptionalParams, + ) => + updateTags( + context, + resourceGroupName, + crossConnectionName, + crossConnectionParameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + crossConnectionName: string, + parameters: ExpressRouteCrossConnection, + options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, crossConnectionName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + crossConnectionName: string, + parameters: ExpressRouteCrossConnection, + options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + crossConnectionName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + crossConnectionName: string, + parameters: ExpressRouteCrossConnection, + options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + crossConnectionName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + crossConnectionName: string, + options?: ExpressRouteCrossConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, crossConnectionName, options), + }; +} + +export function _getExpressRouteCrossConnectionsOperations( + context: NetworkManagementContext, +): ExpressRouteCrossConnectionsOperations { + return { + ..._getExpressRouteCrossConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRouteGateways/index.ts b/sdk/network/arm-network/src/classic/expressRouteGateways/index.ts new file mode 100644 index 000000000000..2be7dd4bc0aa --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRouteGateways/index.ts @@ -0,0 +1,647 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + getResiliencyInformation, + getRoutesInformation, + stopSiteFailoverTest, + startSiteFailoverTest, + getFailoverSingleTestDetails, + getFailoverAllTestsDetails, + listBySubscription, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/expressRouteGateways/operations.js"; +import { + ExpressRouteGatewaysGetResiliencyInformationOptionalParams, + ExpressRouteGatewaysGetRoutesInformationOptionalParams, + ExpressRouteGatewaysStopSiteFailoverTestOptionalParams, + ExpressRouteGatewaysStartSiteFailoverTestOptionalParams, + ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams, + ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams, + ExpressRouteGatewaysListBySubscriptionOptionalParams, + ExpressRouteGatewaysListByResourceGroupOptionalParams, + ExpressRouteGatewaysDeleteOptionalParams, + ExpressRouteGatewaysUpdateTagsOptionalParams, + ExpressRouteGatewaysCreateOrUpdateOptionalParams, + ExpressRouteGatewaysGetOptionalParams, +} from "../../api/expressRouteGateways/options.js"; +import { + TagsObject, + GatewayResiliencyInformation, + GatewayRouteSetsInformation, + ExpressRouteFailoverTestDetails, + ExpressRouteFailoverSingleTestDetails, + ExpressRouteFailoverStopApiParameters, + ExpressRouteGateway, + ExpressRouteGatewayList, +} from "../../models/microsoft/network/models.js"; +import { + ExpressRouteGatewaysStopSiteFailoverTestResponse, + ExpressRouteGatewaysStartSiteFailoverTestResponse, +} from "../../models/models.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ExpressRouteGateways operations. */ +export interface ExpressRouteGatewaysOperations { + /** Retrieves the resiliency information for the ExpressRoute gateway. */ + getResiliencyInformation: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetResiliencyInformationOptionalParams, + ) => PollerLike, GatewayResiliencyInformation>; + /** @deprecated use getResiliencyInformation instead */ + beginGetResiliencyInformation: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetResiliencyInformationOptionalParams, + ) => Promise< + SimplePollerLike, GatewayResiliencyInformation> + >; + /** @deprecated use getResiliencyInformation instead */ + beginGetResiliencyInformationAndWait: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetResiliencyInformationOptionalParams, + ) => Promise; + /** Retrieves the route sets information for the ExpressRoute gateway. */ + getRoutesInformation: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetRoutesInformationOptionalParams, + ) => PollerLike, GatewayRouteSetsInformation>; + /** @deprecated use getRoutesInformation instead */ + beginGetRoutesInformation: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetRoutesInformationOptionalParams, + ) => Promise< + SimplePollerLike, GatewayRouteSetsInformation> + >; + /** @deprecated use getRoutesInformation instead */ + beginGetRoutesInformationAndWait: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetRoutesInformationOptionalParams, + ) => Promise; + /** Stops failover simulation on the ExpressRoute gateway for the specified peering location. */ + stopSiteFailoverTest: ( + resourceGroupName: string, + expressRouteGatewayName: string, + body: { + stopParameters: ExpressRouteFailoverStopApiParameters; + }, + options?: ExpressRouteGatewaysStopSiteFailoverTestOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteGatewaysStopSiteFailoverTestResponse + >; + /** @deprecated use stopSiteFailoverTest instead */ + beginStopSiteFailoverTest: ( + resourceGroupName: string, + expressRouteGatewayName: string, + body: { + stopParameters: ExpressRouteFailoverStopApiParameters; + }, + options?: ExpressRouteGatewaysStopSiteFailoverTestOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteGatewaysStopSiteFailoverTestResponse + > + >; + /** @deprecated use stopSiteFailoverTest instead */ + beginStopSiteFailoverTestAndWait: ( + resourceGroupName: string, + expressRouteGatewayName: string, + body: { + stopParameters: ExpressRouteFailoverStopApiParameters; + }, + options?: ExpressRouteGatewaysStopSiteFailoverTestOptionalParams, + ) => Promise; + /** Starts failover simulation on the ExpressRoute gateway for the specified peering location. */ + startSiteFailoverTest: ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + options?: ExpressRouteGatewaysStartSiteFailoverTestOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteGatewaysStartSiteFailoverTestResponse + >; + /** @deprecated use startSiteFailoverTest instead */ + beginStartSiteFailoverTest: ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + options?: ExpressRouteGatewaysStartSiteFailoverTestOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteGatewaysStartSiteFailoverTestResponse + > + >; + /** @deprecated use startSiteFailoverTest instead */ + beginStartSiteFailoverTestAndWait: ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + options?: ExpressRouteGatewaysStartSiteFailoverTestOptionalParams, + ) => Promise; + /** Retrieves the details of a particular failover test performed on the ExpressRoute gateway based on the test Guid. */ + getFailoverSingleTestDetails: ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteFailoverSingleTestDetails[] + >; + /** @deprecated use getFailoverSingleTestDetails instead */ + beginGetFailoverSingleTestDetails: ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteFailoverSingleTestDetails[] + > + >; + /** @deprecated use getFailoverSingleTestDetails instead */ + beginGetFailoverSingleTestDetailsAndWait: ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => Promise; + /** Retrieves the details of all the failover tests performed on the ExpressRoute gateway for different peering locations. */ + getFailoverAllTestsDetails: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteFailoverTestDetails[] + >; + /** @deprecated use getFailoverAllTestsDetails instead */ + beginGetFailoverAllTestsDetails: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteFailoverTestDetails[] + > + >; + /** @deprecated use getFailoverAllTestsDetails instead */ + beginGetFailoverAllTestsDetailsAndWait: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams, + ) => Promise; + /** Lists ExpressRoute gateways under a given subscription. */ + listBySubscription: ( + options?: ExpressRouteGatewaysListBySubscriptionOptionalParams, + ) => Promise; + /** Lists ExpressRoute gateways in a given resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: ExpressRouteGatewaysListByResourceGroupOptionalParams, + ) => Promise; + /** Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. */ + delete: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysDeleteOptionalParams, + ) => Promise; + /** Updates express route gateway tags. */ + updateTags: ( + resourceGroupName: string, + expressRouteGatewayName: string, + expressRouteGatewayParameters: TagsObject, + options?: ExpressRouteGatewaysUpdateTagsOptionalParams, + ) => PollerLike, ExpressRouteGateway>; + /** @deprecated use updateTags instead */ + beginUpdateTags: ( + resourceGroupName: string, + expressRouteGatewayName: string, + expressRouteGatewayParameters: TagsObject, + options?: ExpressRouteGatewaysUpdateTagsOptionalParams, + ) => Promise, ExpressRouteGateway>>; + /** @deprecated use updateTags instead */ + beginUpdateTagsAndWait: ( + resourceGroupName: string, + expressRouteGatewayName: string, + expressRouteGatewayParameters: TagsObject, + options?: ExpressRouteGatewaysUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a ExpressRoute gateway in a specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + expressRouteGatewayName: string, + putExpressRouteGatewayParameters: ExpressRouteGateway, + options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams, + ) => PollerLike, ExpressRouteGateway>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + expressRouteGatewayName: string, + putExpressRouteGatewayParameters: ExpressRouteGateway, + options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams, + ) => Promise, ExpressRouteGateway>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + expressRouteGatewayName: string, + putExpressRouteGatewayParameters: ExpressRouteGateway, + options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams, + ) => Promise; + /** Fetches the details of a ExpressRoute gateway in a resource group. */ + get: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetOptionalParams, + ) => Promise; +} + +function _getExpressRouteGateways(context: NetworkManagementContext) { + return { + getResiliencyInformation: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetResiliencyInformationOptionalParams, + ) => getResiliencyInformation(context, resourceGroupName, expressRouteGatewayName, options), + beginGetResiliencyInformation: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetResiliencyInformationOptionalParams, + ) => { + const poller = getResiliencyInformation( + context, + resourceGroupName, + expressRouteGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetResiliencyInformationAndWait: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetResiliencyInformationOptionalParams, + ) => { + return await getResiliencyInformation( + context, + resourceGroupName, + expressRouteGatewayName, + options, + ); + }, + getRoutesInformation: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetRoutesInformationOptionalParams, + ) => getRoutesInformation(context, resourceGroupName, expressRouteGatewayName, options), + beginGetRoutesInformation: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetRoutesInformationOptionalParams, + ) => { + const poller = getRoutesInformation( + context, + resourceGroupName, + expressRouteGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetRoutesInformationAndWait: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetRoutesInformationOptionalParams, + ) => { + return await getRoutesInformation( + context, + resourceGroupName, + expressRouteGatewayName, + options, + ); + }, + stopSiteFailoverTest: ( + resourceGroupName: string, + expressRouteGatewayName: string, + body: { + stopParameters: ExpressRouteFailoverStopApiParameters; + }, + options?: ExpressRouteGatewaysStopSiteFailoverTestOptionalParams, + ) => stopSiteFailoverTest(context, resourceGroupName, expressRouteGatewayName, body, options), + beginStopSiteFailoverTest: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + body: { + stopParameters: ExpressRouteFailoverStopApiParameters; + }, + options?: ExpressRouteGatewaysStopSiteFailoverTestOptionalParams, + ) => { + const poller = stopSiteFailoverTest( + context, + resourceGroupName, + expressRouteGatewayName, + body, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStopSiteFailoverTestAndWait: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + body: { + stopParameters: ExpressRouteFailoverStopApiParameters; + }, + options?: ExpressRouteGatewaysStopSiteFailoverTestOptionalParams, + ) => { + return await stopSiteFailoverTest( + context, + resourceGroupName, + expressRouteGatewayName, + body, + options, + ); + }, + startSiteFailoverTest: ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + options?: ExpressRouteGatewaysStartSiteFailoverTestOptionalParams, + ) => + startSiteFailoverTest( + context, + resourceGroupName, + expressRouteGatewayName, + peeringLocation, + options, + ), + beginStartSiteFailoverTest: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + options?: ExpressRouteGatewaysStartSiteFailoverTestOptionalParams, + ) => { + const poller = startSiteFailoverTest( + context, + resourceGroupName, + expressRouteGatewayName, + peeringLocation, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStartSiteFailoverTestAndWait: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + options?: ExpressRouteGatewaysStartSiteFailoverTestOptionalParams, + ) => { + return await startSiteFailoverTest( + context, + resourceGroupName, + expressRouteGatewayName, + peeringLocation, + options, + ); + }, + getFailoverSingleTestDetails: ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => + getFailoverSingleTestDetails( + context, + resourceGroupName, + expressRouteGatewayName, + peeringLocation, + failoverTestId, + options, + ), + beginGetFailoverSingleTestDetails: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => { + const poller = getFailoverSingleTestDetails( + context, + resourceGroupName, + expressRouteGatewayName, + peeringLocation, + failoverTestId, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetFailoverSingleTestDetailsAndWait: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => { + return await getFailoverSingleTestDetails( + context, + resourceGroupName, + expressRouteGatewayName, + peeringLocation, + failoverTestId, + options, + ); + }, + getFailoverAllTestsDetails: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams, + ) => getFailoverAllTestsDetails(context, resourceGroupName, expressRouteGatewayName, options), + beginGetFailoverAllTestsDetails: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams, + ) => { + const poller = getFailoverAllTestsDetails( + context, + resourceGroupName, + expressRouteGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetFailoverAllTestsDetailsAndWait: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams, + ) => { + return await getFailoverAllTestsDetails( + context, + resourceGroupName, + expressRouteGatewayName, + options, + ); + }, + listBySubscription: (options?: ExpressRouteGatewaysListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: ExpressRouteGatewaysListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysDeleteOptionalParams, + ) => $delete(context, resourceGroupName, expressRouteGatewayName, options), + beginDelete: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, expressRouteGatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, expressRouteGatewayName, options); + }, + updateTags: ( + resourceGroupName: string, + expressRouteGatewayName: string, + expressRouteGatewayParameters: TagsObject, + options?: ExpressRouteGatewaysUpdateTagsOptionalParams, + ) => + updateTags( + context, + resourceGroupName, + expressRouteGatewayName, + expressRouteGatewayParameters, + options, + ), + beginUpdateTags: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + expressRouteGatewayParameters: TagsObject, + options?: ExpressRouteGatewaysUpdateTagsOptionalParams, + ) => { + const poller = updateTags( + context, + resourceGroupName, + expressRouteGatewayName, + expressRouteGatewayParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateTagsAndWait: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + expressRouteGatewayParameters: TagsObject, + options?: ExpressRouteGatewaysUpdateTagsOptionalParams, + ) => { + return await updateTags( + context, + resourceGroupName, + expressRouteGatewayName, + expressRouteGatewayParameters, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + expressRouteGatewayName: string, + putExpressRouteGatewayParameters: ExpressRouteGateway, + options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + expressRouteGatewayName, + putExpressRouteGatewayParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + putExpressRouteGatewayParameters: ExpressRouteGateway, + options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + expressRouteGatewayName, + putExpressRouteGatewayParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + expressRouteGatewayName: string, + putExpressRouteGatewayParameters: ExpressRouteGateway, + options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + expressRouteGatewayName, + putExpressRouteGatewayParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + expressRouteGatewayName: string, + options?: ExpressRouteGatewaysGetOptionalParams, + ) => get(context, resourceGroupName, expressRouteGatewayName, options), + }; +} + +export function _getExpressRouteGatewaysOperations( + context: NetworkManagementContext, +): ExpressRouteGatewaysOperations { + return { + ..._getExpressRouteGateways(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRouteLinks/index.ts b/sdk/network/arm-network/src/classic/expressRouteLinks/index.ts new file mode 100644 index 000000000000..01db17a9215f --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRouteLinks/index.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, get } from "../../api/expressRouteLinks/operations.js"; +import { + ExpressRouteLinksListOptionalParams, + ExpressRouteLinksGetOptionalParams, +} from "../../api/expressRouteLinks/options.js"; +import { ExpressRouteLink } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ExpressRouteLinks operations. */ +export interface ExpressRouteLinksOperations { + /** Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. */ + list: ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRouteLinksListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Retrieves the specified ExpressRouteLink resource. */ + get: ( + resourceGroupName: string, + expressRoutePortName: string, + linkName: string, + options?: ExpressRouteLinksGetOptionalParams, + ) => Promise; +} + +function _getExpressRouteLinks(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRouteLinksListOptionalParams, + ) => list(context, resourceGroupName, expressRoutePortName, options), + get: ( + resourceGroupName: string, + expressRoutePortName: string, + linkName: string, + options?: ExpressRouteLinksGetOptionalParams, + ) => get(context, resourceGroupName, expressRoutePortName, linkName, options), + }; +} + +export function _getExpressRouteLinksOperations( + context: NetworkManagementContext, +): ExpressRouteLinksOperations { + return { + ..._getExpressRouteLinks(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRoutePortAuthorizations/index.ts b/sdk/network/arm-network/src/classic/expressRoutePortAuthorizations/index.ts new file mode 100644 index 000000000000..c2d8110f8a9e --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRoutePortAuthorizations/index.ts @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/expressRoutePortAuthorizations/operations.js"; +import { + ExpressRoutePortAuthorizationsListOptionalParams, + ExpressRoutePortAuthorizationsDeleteOptionalParams, + ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ExpressRoutePortAuthorizationsGetOptionalParams, +} from "../../api/expressRoutePortAuthorizations/options.js"; +import { ExpressRoutePortAuthorization } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ExpressRoutePortAuthorizations operations. */ +export interface ExpressRoutePortAuthorizationsOperations { + /** Gets all authorizations in an express route port. */ + list: ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified authorization from the specified express route port. */ + delete: ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams, + ) => Promise; + /** Creates or updates an authorization in the specified express route port. */ + createOrUpdate: ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ) => PollerLike, ExpressRoutePortAuthorization>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, ExpressRoutePortAuthorization> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified authorization from the specified express route port. */ + get: ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsGetOptionalParams, + ) => Promise; +} + +function _getExpressRoutePortAuthorizations(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams, + ) => list(context, resourceGroupName, expressRoutePortName, options), + delete: ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, expressRoutePortName, authorizationName, options), + beginDelete: async ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + expressRoutePortName, + authorizationName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + expressRoutePortName, + authorizationName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + expressRoutePortName, + authorizationName, + authorizationParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + expressRoutePortName, + authorizationName, + authorizationParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + expressRoutePortName, + authorizationName, + authorizationParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsGetOptionalParams, + ) => get(context, resourceGroupName, expressRoutePortName, authorizationName, options), + }; +} + +export function _getExpressRoutePortAuthorizationsOperations( + context: NetworkManagementContext, +): ExpressRoutePortAuthorizationsOperations { + return { + ..._getExpressRoutePortAuthorizations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRoutePorts/index.ts b/sdk/network/arm-network/src/classic/expressRoutePorts/index.ts new file mode 100644 index 000000000000..e6a87072d764 --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRoutePorts/index.ts @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + generateLOA, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/expressRoutePorts/operations.js"; +import { + ExpressRoutePortsGenerateLOAOptionalParams, + ExpressRoutePortsListOptionalParams, + ExpressRoutePortsListByResourceGroupOptionalParams, + ExpressRoutePortsDeleteOptionalParams, + ExpressRoutePortsUpdateTagsOptionalParams, + ExpressRoutePortsCreateOrUpdateOptionalParams, + ExpressRoutePortsGetOptionalParams, +} from "../../api/expressRoutePorts/options.js"; +import { + TagsObject, + ExpressRoutePort, + GenerateExpressRoutePortsLOARequest, + GenerateExpressRoutePortsLOAResult, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ExpressRoutePorts operations. */ +export interface ExpressRoutePortsOperations { + /** Generate a letter of authorization for the requested ExpressRoutePort resource. */ + generateLOA: ( + resourceGroupName: string, + expressRoutePortName: string, + request: GenerateExpressRoutePortsLOARequest, + options?: ExpressRoutePortsGenerateLOAOptionalParams, + ) => Promise; + /** List all the ExpressRoutePort resources in the specified subscription. */ + list: ( + options?: ExpressRoutePortsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** List all the ExpressRoutePort resources in the specified resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: ExpressRoutePortsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified ExpressRoutePort resource. */ + delete: ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortsDeleteOptionalParams, + ) => Promise; + /** Update ExpressRoutePort tags. */ + updateTags: ( + resourceGroupName: string, + expressRoutePortName: string, + parameters: TagsObject, + options?: ExpressRoutePortsUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates the specified ExpressRoutePort resource. */ + createOrUpdate: ( + resourceGroupName: string, + expressRoutePortName: string, + parameters: ExpressRoutePort, + options?: ExpressRoutePortsCreateOrUpdateOptionalParams, + ) => PollerLike, ExpressRoutePort>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + expressRoutePortName: string, + parameters: ExpressRoutePort, + options?: ExpressRoutePortsCreateOrUpdateOptionalParams, + ) => Promise, ExpressRoutePort>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + expressRoutePortName: string, + parameters: ExpressRoutePort, + options?: ExpressRoutePortsCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the requested ExpressRoutePort resource. */ + get: ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortsGetOptionalParams, + ) => Promise; +} + +function _getExpressRoutePorts(context: NetworkManagementContext) { + return { + generateLOA: ( + resourceGroupName: string, + expressRoutePortName: string, + request: GenerateExpressRoutePortsLOARequest, + options?: ExpressRoutePortsGenerateLOAOptionalParams, + ) => generateLOA(context, resourceGroupName, expressRoutePortName, request, options), + list: (options?: ExpressRoutePortsListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: ExpressRoutePortsListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, expressRoutePortName, options), + beginDelete: async ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, expressRoutePortName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, expressRoutePortName, options); + }, + updateTags: ( + resourceGroupName: string, + expressRoutePortName: string, + parameters: TagsObject, + options?: ExpressRoutePortsUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, expressRoutePortName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + expressRoutePortName: string, + parameters: ExpressRoutePort, + options?: ExpressRoutePortsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, expressRoutePortName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + expressRoutePortName: string, + parameters: ExpressRoutePort, + options?: ExpressRoutePortsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + expressRoutePortName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + expressRoutePortName: string, + parameters: ExpressRoutePort, + options?: ExpressRoutePortsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + expressRoutePortName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortsGetOptionalParams, + ) => get(context, resourceGroupName, expressRoutePortName, options), + }; +} + +export function _getExpressRoutePortsOperations( + context: NetworkManagementContext, +): ExpressRoutePortsOperations { + return { + ..._getExpressRoutePorts(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRoutePortsLocations/index.ts b/sdk/network/arm-network/src/classic/expressRoutePortsLocations/index.ts new file mode 100644 index 000000000000..37a5ebc372d6 --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRoutePortsLocations/index.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, get } from "../../api/expressRoutePortsLocations/operations.js"; +import { + ExpressRoutePortsLocationsListOptionalParams, + ExpressRoutePortsLocationsGetOptionalParams, +} from "../../api/expressRoutePortsLocations/options.js"; +import { ExpressRoutePortsLocation } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ExpressRoutePortsLocations operations. */ +export interface ExpressRoutePortsLocationsOperations { + /** Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. */ + list: ( + options?: ExpressRoutePortsLocationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. */ + get: ( + locationName: string, + options?: ExpressRoutePortsLocationsGetOptionalParams, + ) => Promise; +} + +function _getExpressRoutePortsLocations(context: NetworkManagementContext) { + return { + list: (options?: ExpressRoutePortsLocationsListOptionalParams) => list(context, options), + get: (locationName: string, options?: ExpressRoutePortsLocationsGetOptionalParams) => + get(context, locationName, options), + }; +} + +export function _getExpressRoutePortsLocationsOperations( + context: NetworkManagementContext, +): ExpressRoutePortsLocationsOperations { + return { + ..._getExpressRoutePortsLocations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRouteProviderPortsLocation/index.ts b/sdk/network/arm-network/src/classic/expressRouteProviderPortsLocation/index.ts new file mode 100644 index 000000000000..0029bea4de45 --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRouteProviderPortsLocation/index.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/expressRouteProviderPortsLocation/operations.js"; +import { ExpressRouteProviderPortsLocationListOptionalParams } from "../../api/expressRouteProviderPortsLocation/options.js"; +import { ExpressRouteProviderPortListResult } from "../../models/microsoft/network/models.js"; + +/** Interface representing a ExpressRouteProviderPortsLocation operations. */ +export interface ExpressRouteProviderPortsLocationOperations { + /** Retrieves all the ExpressRouteProviderPorts in a subscription. */ + list: ( + options?: ExpressRouteProviderPortsLocationListOptionalParams, + ) => Promise; +} + +function _getExpressRouteProviderPortsLocation(context: NetworkManagementContext) { + return { + list: (options?: ExpressRouteProviderPortsLocationListOptionalParams) => list(context, options), + }; +} + +export function _getExpressRouteProviderPortsLocationOperations( + context: NetworkManagementContext, +): ExpressRouteProviderPortsLocationOperations { + return { + ..._getExpressRouteProviderPortsLocation(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/expressRouteServiceProviders/index.ts b/sdk/network/arm-network/src/classic/expressRouteServiceProviders/index.ts new file mode 100644 index 000000000000..7d3215466f89 --- /dev/null +++ b/sdk/network/arm-network/src/classic/expressRouteServiceProviders/index.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/expressRouteServiceProviders/operations.js"; +import { ExpressRouteServiceProvidersListOptionalParams } from "../../api/expressRouteServiceProviders/options.js"; +import { ExpressRouteServiceProvider } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ExpressRouteServiceProviders operations. */ +export interface ExpressRouteServiceProvidersOperations { + /** Gets all the available express route service providers. */ + list: ( + options?: ExpressRouteServiceProvidersListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getExpressRouteServiceProviders(context: NetworkManagementContext) { + return { + list: (options?: ExpressRouteServiceProvidersListOptionalParams) => list(context, options), + }; +} + +export function _getExpressRouteServiceProvidersOperations( + context: NetworkManagementContext, +): ExpressRouteServiceProvidersOperations { + return { + ..._getExpressRouteServiceProviders(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/firewallPolicies/index.ts b/sdk/network/arm-network/src/classic/firewallPolicies/index.ts new file mode 100644 index 000000000000..4a35fe2e534b --- /dev/null +++ b/sdk/network/arm-network/src/classic/firewallPolicies/index.ts @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/firewallPolicies/operations.js"; +import { + FirewallPoliciesListAllOptionalParams, + FirewallPoliciesListOptionalParams, + FirewallPoliciesDeleteOptionalParams, + FirewallPoliciesUpdateTagsOptionalParams, + FirewallPoliciesCreateOrUpdateOptionalParams, + FirewallPoliciesGetOptionalParams, +} from "../../api/firewallPolicies/options.js"; +import { TagsObject, FirewallPolicy } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a FirewallPolicies operations. */ +export interface FirewallPoliciesOperations { + /** Gets all the Firewall Policies in a subscription. */ + listAll: ( + options?: FirewallPoliciesListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists all Firewall Policies in a resource group. */ + list: ( + resourceGroupName: string, + options?: FirewallPoliciesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Firewall Policy. */ + delete: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPoliciesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPoliciesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPoliciesDeleteOptionalParams, + ) => Promise; + /** Updates tags of a Azure Firewall Policy resource. */ + updateTags: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: TagsObject, + options?: FirewallPoliciesUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates the specified Firewall Policy. */ + createOrUpdate: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicy, + options?: FirewallPoliciesCreateOrUpdateOptionalParams, + ) => PollerLike, FirewallPolicy>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicy, + options?: FirewallPoliciesCreateOrUpdateOptionalParams, + ) => Promise, FirewallPolicy>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicy, + options?: FirewallPoliciesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified Firewall Policy. */ + get: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPoliciesGetOptionalParams, + ) => Promise; +} + +function _getFirewallPolicies(context: NetworkManagementContext) { + return { + listAll: (options?: FirewallPoliciesListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: FirewallPoliciesListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPoliciesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, firewallPolicyName, options), + beginDelete: async ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPoliciesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, firewallPolicyName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPoliciesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, firewallPolicyName, options); + }, + updateTags: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: TagsObject, + options?: FirewallPoliciesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, firewallPolicyName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicy, + options?: FirewallPoliciesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, firewallPolicyName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicy, + options?: FirewallPoliciesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + firewallPolicyName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicy, + options?: FirewallPoliciesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + firewallPolicyName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPoliciesGetOptionalParams, + ) => get(context, resourceGroupName, firewallPolicyName, options), + }; +} + +export function _getFirewallPoliciesOperations( + context: NetworkManagementContext, +): FirewallPoliciesOperations { + return { + ..._getFirewallPolicies(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/firewallPolicyDeployments/index.ts b/sdk/network/arm-network/src/classic/firewallPolicyDeployments/index.ts new file mode 100644 index 000000000000..9600c81105e0 --- /dev/null +++ b/sdk/network/arm-network/src/classic/firewallPolicyDeployments/index.ts @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { deploy } from "../../api/firewallPolicyDeployments/operations.js"; +import { FirewallPolicyDeploymentsDeployOptionalParams } from "../../api/firewallPolicyDeployments/options.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a FirewallPolicyDeployments operations. */ +export interface FirewallPolicyDeploymentsOperations { + /** Deploys the firewall policy draft and child rule collection group drafts. */ + deploy: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyDeploymentsDeployOptionalParams, + ) => PollerLike, void>; + /** @deprecated use deploy instead */ + beginDeploy: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyDeploymentsDeployOptionalParams, + ) => Promise, void>>; + /** @deprecated use deploy instead */ + beginDeployAndWait: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyDeploymentsDeployOptionalParams, + ) => Promise; +} + +function _getFirewallPolicyDeployments(context: NetworkManagementContext) { + return { + deploy: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyDeploymentsDeployOptionalParams, + ) => deploy(context, resourceGroupName, firewallPolicyName, options), + beginDeploy: async ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyDeploymentsDeployOptionalParams, + ) => { + const poller = deploy(context, resourceGroupName, firewallPolicyName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeployAndWait: async ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyDeploymentsDeployOptionalParams, + ) => { + return await deploy(context, resourceGroupName, firewallPolicyName, options); + }, + }; +} + +export function _getFirewallPolicyDeploymentsOperations( + context: NetworkManagementContext, +): FirewallPolicyDeploymentsOperations { + return { + ..._getFirewallPolicyDeployments(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/firewallPolicyDrafts/index.ts b/sdk/network/arm-network/src/classic/firewallPolicyDrafts/index.ts new file mode 100644 index 000000000000..50dab2a109e9 --- /dev/null +++ b/sdk/network/arm-network/src/classic/firewallPolicyDrafts/index.ts @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { $delete, createOrUpdate, get } from "../../api/firewallPolicyDrafts/operations.js"; +import { + FirewallPolicyDraftsDeleteOptionalParams, + FirewallPolicyDraftsCreateOrUpdateOptionalParams, + FirewallPolicyDraftsGetOptionalParams, +} from "../../api/firewallPolicyDrafts/options.js"; +import { FirewallPolicyDraft } from "../../models/microsoft/network/models.js"; + +/** Interface representing a FirewallPolicyDrafts operations. */ +export interface FirewallPolicyDraftsOperations { + /** Delete a draft policy. */ + delete: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyDraftsDeleteOptionalParams, + ) => Promise; + /** Create or update a draft Firewall Policy. */ + createOrUpdate: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicyDraft, + options?: FirewallPolicyDraftsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get a draft Firewall Policy. */ + get: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyDraftsGetOptionalParams, + ) => Promise; +} + +function _getFirewallPolicyDrafts(context: NetworkManagementContext) { + return { + delete: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyDraftsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, firewallPolicyName, options), + createOrUpdate: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: FirewallPolicyDraft, + options?: FirewallPolicyDraftsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, firewallPolicyName, parameters, options), + get: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyDraftsGetOptionalParams, + ) => get(context, resourceGroupName, firewallPolicyName, options), + }; +} + +export function _getFirewallPolicyDraftsOperations( + context: NetworkManagementContext, +): FirewallPolicyDraftsOperations { + return { + ..._getFirewallPolicyDrafts(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/firewallPolicyIdpsSignatures/index.ts b/sdk/network/arm-network/src/classic/firewallPolicyIdpsSignatures/index.ts new file mode 100644 index 000000000000..cd3a5d72ebe2 --- /dev/null +++ b/sdk/network/arm-network/src/classic/firewallPolicyIdpsSignatures/index.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/firewallPolicyIdpsSignatures/operations.js"; +import { FirewallPolicyIdpsSignaturesListOptionalParams } from "../../api/firewallPolicyIdpsSignatures/options.js"; +import { IdpsQueryObject, QueryResults } from "../../models/microsoft/network/models.js"; + +/** Interface representing a FirewallPolicyIdpsSignatures operations. */ +export interface FirewallPolicyIdpsSignaturesOperations { + /** Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. */ + list: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: IdpsQueryObject, + options?: FirewallPolicyIdpsSignaturesListOptionalParams, + ) => Promise; +} + +function _getFirewallPolicyIdpsSignatures(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: IdpsQueryObject, + options?: FirewallPolicyIdpsSignaturesListOptionalParams, + ) => list(context, resourceGroupName, firewallPolicyName, parameters, options), + }; +} + +export function _getFirewallPolicyIdpsSignaturesOperations( + context: NetworkManagementContext, +): FirewallPolicyIdpsSignaturesOperations { + return { + ..._getFirewallPolicyIdpsSignatures(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/firewallPolicyIdpsSignaturesFilterValues/index.ts b/sdk/network/arm-network/src/classic/firewallPolicyIdpsSignaturesFilterValues/index.ts new file mode 100644 index 000000000000..71e14a30e50e --- /dev/null +++ b/sdk/network/arm-network/src/classic/firewallPolicyIdpsSignaturesFilterValues/index.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/firewallPolicyIdpsSignaturesFilterValues/operations.js"; +import { FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams } from "../../api/firewallPolicyIdpsSignaturesFilterValues/options.js"; +import { + SignatureOverridesFilterValuesQuery, + SignatureOverridesFilterValuesResponse, +} from "../../models/microsoft/network/models.js"; + +/** Interface representing a FirewallPolicyIdpsSignaturesFilterValues operations. */ +export interface FirewallPolicyIdpsSignaturesFilterValuesOperations { + /** Retrieves the current filter values for the signatures overrides */ + list: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignatureOverridesFilterValuesQuery, + options?: FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams, + ) => Promise; +} + +function _getFirewallPolicyIdpsSignaturesFilterValues(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignatureOverridesFilterValuesQuery, + options?: FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams, + ) => list(context, resourceGroupName, firewallPolicyName, parameters, options), + }; +} + +export function _getFirewallPolicyIdpsSignaturesFilterValuesOperations( + context: NetworkManagementContext, +): FirewallPolicyIdpsSignaturesFilterValuesOperations { + return { + ..._getFirewallPolicyIdpsSignaturesFilterValues(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/firewallPolicyIdpsSignaturesOverrides/index.ts b/sdk/network/arm-network/src/classic/firewallPolicyIdpsSignaturesOverrides/index.ts new file mode 100644 index 000000000000..ab95e25e2f22 --- /dev/null +++ b/sdk/network/arm-network/src/classic/firewallPolicyIdpsSignaturesOverrides/index.ts @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + patch, + put, + get, +} from "../../api/firewallPolicyIdpsSignaturesOverrides/operations.js"; +import { + FirewallPolicyIdpsSignaturesOverridesListOptionalParams, + FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams, + FirewallPolicyIdpsSignaturesOverridesPutOptionalParams, + FirewallPolicyIdpsSignaturesOverridesGetOptionalParams, +} from "../../api/firewallPolicyIdpsSignaturesOverrides/options.js"; +import { + SignaturesOverrides, + SignaturesOverridesList, +} from "../../models/microsoft/network/models.js"; + +/** Interface representing a FirewallPolicyIdpsSignaturesOverrides operations. */ +export interface FirewallPolicyIdpsSignaturesOverridesOperations { + /** Returns all signatures overrides objects for a specific policy as a list containing a single value. */ + list: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyIdpsSignaturesOverridesListOptionalParams, + ) => Promise; + /** Will update the status of policy's signature overrides for IDPS */ + patch: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignaturesOverrides, + options?: FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams, + ) => Promise; + /** Will override/create a new signature overrides for the policy's IDPS */ + put: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignaturesOverrides, + options?: FirewallPolicyIdpsSignaturesOverridesPutOptionalParams, + ) => Promise; + /** Returns all signatures overrides for a specific policy. */ + get: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyIdpsSignaturesOverridesGetOptionalParams, + ) => Promise; +} + +function _getFirewallPolicyIdpsSignaturesOverrides(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyIdpsSignaturesOverridesListOptionalParams, + ) => list(context, resourceGroupName, firewallPolicyName, options), + patch: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignaturesOverrides, + options?: FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams, + ) => patch(context, resourceGroupName, firewallPolicyName, parameters, options), + put: ( + resourceGroupName: string, + firewallPolicyName: string, + parameters: SignaturesOverrides, + options?: FirewallPolicyIdpsSignaturesOverridesPutOptionalParams, + ) => put(context, resourceGroupName, firewallPolicyName, parameters, options), + get: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyIdpsSignaturesOverridesGetOptionalParams, + ) => get(context, resourceGroupName, firewallPolicyName, options), + }; +} + +export function _getFirewallPolicyIdpsSignaturesOverridesOperations( + context: NetworkManagementContext, +): FirewallPolicyIdpsSignaturesOverridesOperations { + return { + ..._getFirewallPolicyIdpsSignaturesOverrides(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/firewallPolicyRuleCollectionGroupDrafts/index.ts b/sdk/network/arm-network/src/classic/firewallPolicyRuleCollectionGroupDrafts/index.ts new file mode 100644 index 000000000000..54d4de6894b0 --- /dev/null +++ b/sdk/network/arm-network/src/classic/firewallPolicyRuleCollectionGroupDrafts/index.ts @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + $delete, + createOrUpdate, + get, +} from "../../api/firewallPolicyRuleCollectionGroupDrafts/operations.js"; +import { + FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams, + FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams, + FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams, +} from "../../api/firewallPolicyRuleCollectionGroupDrafts/options.js"; +import { FirewallPolicyRuleCollectionGroupDraft } from "../../models/microsoft/network/models.js"; + +/** Interface representing a FirewallPolicyRuleCollectionGroupDrafts operations. */ +export interface FirewallPolicyRuleCollectionGroupDraftsOperations { + /** Delete Rule Collection Group Draft. */ + delete: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams, + ) => Promise; + /** Create or Update Rule Collection Group Draft. */ + createOrUpdate: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroupDraft, + options?: FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get Rule Collection Group Draft. */ + get: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams, + ) => Promise; +} + +function _getFirewallPolicyRuleCollectionGroupDrafts(context: NetworkManagementContext) { + return { + delete: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options), + createOrUpdate: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroupDraft, + options?: FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + parameters, + options, + ), + get: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams, + ) => get(context, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options), + }; +} + +export function _getFirewallPolicyRuleCollectionGroupDraftsOperations( + context: NetworkManagementContext, +): FirewallPolicyRuleCollectionGroupDraftsOperations { + return { + ..._getFirewallPolicyRuleCollectionGroupDrafts(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/firewallPolicyRuleCollectionGroups/index.ts b/sdk/network/arm-network/src/classic/firewallPolicyRuleCollectionGroups/index.ts new file mode 100644 index 000000000000..3fa3a27d375f --- /dev/null +++ b/sdk/network/arm-network/src/classic/firewallPolicyRuleCollectionGroups/index.ts @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/firewallPolicyRuleCollectionGroups/operations.js"; +import { + FirewallPolicyRuleCollectionGroupsListOptionalParams, + FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, + FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, + FirewallPolicyRuleCollectionGroupsGetOptionalParams, +} from "../../api/firewallPolicyRuleCollectionGroups/options.js"; +import { FirewallPolicyRuleCollectionGroup } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a FirewallPolicyRuleCollectionGroups operations. */ +export interface FirewallPolicyRuleCollectionGroupsOperations { + /** Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. */ + list: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyRuleCollectionGroupsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified FirewallPolicyRuleCollectionGroup. */ + delete: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, + ) => Promise; + /** Creates or updates the specified FirewallPolicyRuleCollectionGroup. */ + createOrUpdate: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroup, + options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, + ) => PollerLike< + OperationState, + FirewallPolicyRuleCollectionGroup + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroup, + options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + FirewallPolicyRuleCollectionGroup + > + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroup, + options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified FirewallPolicyRuleCollectionGroup. */ + get: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupsGetOptionalParams, + ) => Promise; +} + +function _getFirewallPolicyRuleCollectionGroups(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + firewallPolicyName: string, + options?: FirewallPolicyRuleCollectionGroupsListOptionalParams, + ) => list(context, resourceGroupName, firewallPolicyName, options), + delete: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options), + beginDelete: async ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroup, + options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroup, + options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + parameters: FirewallPolicyRuleCollectionGroup, + options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + firewallPolicyName, + ruleCollectionGroupName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + firewallPolicyName: string, + ruleCollectionGroupName: string, + options?: FirewallPolicyRuleCollectionGroupsGetOptionalParams, + ) => get(context, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options), + }; +} + +export function _getFirewallPolicyRuleCollectionGroupsOperations( + context: NetworkManagementContext, +): FirewallPolicyRuleCollectionGroupsOperations { + return { + ..._getFirewallPolicyRuleCollectionGroups(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/flowLogs/index.ts b/sdk/network/arm-network/src/classic/flowLogs/index.ts new file mode 100644 index 000000000000..00d5dd8b8574 --- /dev/null +++ b/sdk/network/arm-network/src/classic/flowLogs/index.ts @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, updateTags, createOrUpdate, get } from "../../api/flowLogs/operations.js"; +import { + FlowLogsListOptionalParams, + FlowLogsDeleteOptionalParams, + FlowLogsUpdateTagsOptionalParams, + FlowLogsCreateOrUpdateOptionalParams, + FlowLogsGetOptionalParams, +} from "../../api/flowLogs/options.js"; +import { FlowLog } from "../../models/common/models.js"; +import { TagsObject } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a FlowLogs operations. */ +export interface FlowLogsOperations { + /** Lists all flow log resources for the specified Network Watcher. */ + list: ( + resourceGroupName: string, + networkWatcherName: string, + options?: FlowLogsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified flow log resource. */ + delete: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options?: FlowLogsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options?: FlowLogsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options?: FlowLogsDeleteOptionalParams, + ) => Promise; + /** Update tags of the specified flow log. */ + updateTags: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: TagsObject, + options?: FlowLogsUpdateTagsOptionalParams, + ) => Promise; + /** Create or update a flow log for the specified network security group. */ + createOrUpdate: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: FlowLog, + options?: FlowLogsCreateOrUpdateOptionalParams, + ) => PollerLike, FlowLog>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: FlowLog, + options?: FlowLogsCreateOrUpdateOptionalParams, + ) => Promise, FlowLog>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: FlowLog, + options?: FlowLogsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets a flow log resource by name. */ + get: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options?: FlowLogsGetOptionalParams, + ) => Promise; +} + +function _getFlowLogs(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkWatcherName: string, + options?: FlowLogsListOptionalParams, + ) => list(context, resourceGroupName, networkWatcherName, options), + delete: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options?: FlowLogsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkWatcherName, flowLogName, options), + beginDelete: async ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options?: FlowLogsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, networkWatcherName, flowLogName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options?: FlowLogsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, networkWatcherName, flowLogName, options); + }, + updateTags: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: TagsObject, + options?: FlowLogsUpdateTagsOptionalParams, + ) => + updateTags(context, resourceGroupName, networkWatcherName, flowLogName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: FlowLog, + options?: FlowLogsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkWatcherName, + flowLogName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: FlowLog, + options?: FlowLogsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkWatcherName, + flowLogName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + parameters: FlowLog, + options?: FlowLogsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkWatcherName, + flowLogName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + networkWatcherName: string, + flowLogName: string, + options?: FlowLogsGetOptionalParams, + ) => get(context, resourceGroupName, networkWatcherName, flowLogName, options), + }; +} + +export function _getFlowLogsOperations(context: NetworkManagementContext): FlowLogsOperations { + return { + ..._getFlowLogs(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/hubRouteTables/index.ts b/sdk/network/arm-network/src/classic/hubRouteTables/index.ts new file mode 100644 index 000000000000..5fbbc16e33e4 --- /dev/null +++ b/sdk/network/arm-network/src/classic/hubRouteTables/index.ts @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/hubRouteTables/operations.js"; +import { + HubRouteTablesListOptionalParams, + HubRouteTablesDeleteOptionalParams, + HubRouteTablesCreateOrUpdateOptionalParams, + HubRouteTablesGetOptionalParams, +} from "../../api/hubRouteTables/options.js"; +import { HubRouteTable } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a HubRouteTables operations. */ +export interface HubRouteTablesOperations { + /** Retrieves the details of all RouteTables. */ + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: HubRouteTablesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a RouteTable. */ + delete: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: HubRouteTablesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: HubRouteTablesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: HubRouteTablesDeleteOptionalParams, + ) => Promise; + /** Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. */ + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + routeTableParameters: HubRouteTable, + options?: HubRouteTablesCreateOrUpdateOptionalParams, + ) => PollerLike, HubRouteTable>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + routeTableParameters: HubRouteTable, + options?: HubRouteTablesCreateOrUpdateOptionalParams, + ) => Promise, HubRouteTable>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + routeTableParameters: HubRouteTable, + options?: HubRouteTablesCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a RouteTable. */ + get: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: HubRouteTablesGetOptionalParams, + ) => Promise; +} + +function _getHubRouteTables(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: HubRouteTablesListOptionalParams, + ) => list(context, resourceGroupName, virtualHubName, options), + delete: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: HubRouteTablesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualHubName, routeTableName, options), + beginDelete: async ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: HubRouteTablesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualHubName, routeTableName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: HubRouteTablesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualHubName, routeTableName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + routeTableParameters: HubRouteTable, + options?: HubRouteTablesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routeTableName, + routeTableParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + routeTableParameters: HubRouteTable, + options?: HubRouteTablesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routeTableName, + routeTableParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + routeTableParameters: HubRouteTable, + options?: HubRouteTablesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routeTableName, + routeTableParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: HubRouteTablesGetOptionalParams, + ) => get(context, resourceGroupName, virtualHubName, routeTableName, options), + }; +} + +export function _getHubRouteTablesOperations( + context: NetworkManagementContext, +): HubRouteTablesOperations { + return { + ..._getHubRouteTables(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/hubVirtualNetworkConnections/index.ts b/sdk/network/arm-network/src/classic/hubVirtualNetworkConnections/index.ts new file mode 100644 index 000000000000..b86b23d11ced --- /dev/null +++ b/sdk/network/arm-network/src/classic/hubVirtualNetworkConnections/index.ts @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + get, + $delete, + createOrUpdate, +} from "../../api/hubVirtualNetworkConnections/operations.js"; +import { + HubVirtualNetworkConnectionsListOptionalParams, + HubVirtualNetworkConnectionsGetOptionalParams, + HubVirtualNetworkConnectionsDeleteOptionalParams, + HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, +} from "../../api/hubVirtualNetworkConnections/options.js"; +import { HubVirtualNetworkConnection } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a HubVirtualNetworkConnections operations. */ +export interface HubVirtualNetworkConnectionsOperations { + /** Retrieves the details of all HubVirtualNetworkConnections. */ + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: HubVirtualNetworkConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Retrieves the details of a HubVirtualNetworkConnection. */ + get: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: HubVirtualNetworkConnectionsGetOptionalParams, + ) => Promise; + /** Deletes a HubVirtualNetworkConnection. */ + delete: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: HubVirtualNetworkConnectionsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: HubVirtualNetworkConnectionsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: HubVirtualNetworkConnectionsDeleteOptionalParams, + ) => Promise; + /** Creates a hub virtual network connection if it doesn't exist else updates the existing one. */ + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, + options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, + ) => PollerLike, HubVirtualNetworkConnection>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, + options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, HubVirtualNetworkConnection> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, + options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, + ) => Promise; +} + +function _getHubVirtualNetworkConnections(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: HubVirtualNetworkConnectionsListOptionalParams, + ) => list(context, resourceGroupName, virtualHubName, options), + get: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: HubVirtualNetworkConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, virtualHubName, connectionName, options), + delete: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: HubVirtualNetworkConnectionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualHubName, connectionName, options), + beginDelete: async ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: HubVirtualNetworkConnectionsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualHubName, connectionName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: HubVirtualNetworkConnectionsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualHubName, connectionName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, + options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualHubName, + connectionName, + hubVirtualNetworkConnectionParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, + options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualHubName, + connectionName, + hubVirtualNetworkConnectionParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, + options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualHubName, + connectionName, + hubVirtualNetworkConnectionParameters, + options, + ); + }, + }; +} + +export function _getHubVirtualNetworkConnectionsOperations( + context: NetworkManagementContext, +): HubVirtualNetworkConnectionsOperations { + return { + ..._getHubVirtualNetworkConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/inboundNatRules/index.ts b/sdk/network/arm-network/src/classic/inboundNatRules/index.ts new file mode 100644 index 000000000000..b71a7722bf2e --- /dev/null +++ b/sdk/network/arm-network/src/classic/inboundNatRules/index.ts @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/inboundNatRules/operations.js"; +import { + InboundNatRulesListOptionalParams, + InboundNatRulesDeleteOptionalParams, + InboundNatRulesCreateOrUpdateOptionalParams, + InboundNatRulesGetOptionalParams, +} from "../../api/inboundNatRules/options.js"; +import { InboundNatRule } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a InboundNatRules operations. */ +export interface InboundNatRulesOperations { + /** Gets all the inbound NAT rules in a load balancer. */ + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: InboundNatRulesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified load balancer inbound NAT rule. */ + delete: ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options?: InboundNatRulesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options?: InboundNatRulesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options?: InboundNatRulesDeleteOptionalParams, + ) => Promise; + /** Creates or updates a load balancer inbound NAT rule. */ + createOrUpdate: ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + inboundNatRuleParameters: InboundNatRule, + options?: InboundNatRulesCreateOrUpdateOptionalParams, + ) => PollerLike, InboundNatRule>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + inboundNatRuleParameters: InboundNatRule, + options?: InboundNatRulesCreateOrUpdateOptionalParams, + ) => Promise, InboundNatRule>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + inboundNatRuleParameters: InboundNatRule, + options?: InboundNatRulesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified load balancer inbound NAT rule. */ + get: ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options?: InboundNatRulesGetOptionalParams, + ) => Promise; +} + +function _getInboundNatRules(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: InboundNatRulesListOptionalParams, + ) => list(context, resourceGroupName, loadBalancerName, options), + delete: ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options?: InboundNatRulesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, loadBalancerName, inboundNatRuleName, options), + beginDelete: async ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options?: InboundNatRulesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + loadBalancerName, + inboundNatRuleName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options?: InboundNatRulesDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + loadBalancerName, + inboundNatRuleName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + inboundNatRuleParameters: InboundNatRule, + options?: InboundNatRulesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + loadBalancerName, + inboundNatRuleName, + inboundNatRuleParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + inboundNatRuleParameters: InboundNatRule, + options?: InboundNatRulesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + loadBalancerName, + inboundNatRuleName, + inboundNatRuleParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + inboundNatRuleParameters: InboundNatRule, + options?: InboundNatRulesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + loadBalancerName, + inboundNatRuleName, + inboundNatRuleParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + loadBalancerName: string, + inboundNatRuleName: string, + options?: InboundNatRulesGetOptionalParams, + ) => get(context, resourceGroupName, loadBalancerName, inboundNatRuleName, options), + }; +} + +export function _getInboundNatRulesOperations( + context: NetworkManagementContext, +): InboundNatRulesOperations { + return { + ..._getInboundNatRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/inboundSecurityRule/index.ts b/sdk/network/arm-network/src/classic/inboundSecurityRule/index.ts new file mode 100644 index 000000000000..9991f6de73f7 --- /dev/null +++ b/sdk/network/arm-network/src/classic/inboundSecurityRule/index.ts @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { createOrUpdate, get } from "../../api/inboundSecurityRule/operations.js"; +import { + InboundSecurityRuleCreateOrUpdateOptionalParams, + InboundSecurityRuleGetOptionalParams, +} from "../../api/inboundSecurityRule/options.js"; +import { InboundSecurityRule } from "../../models/microsoft/network/models.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a InboundSecurityRule operations. */ +export interface InboundSecurityRuleOperations { + /** Creates or updates the specified Network Virtual Appliance Inbound Security Rules. */ + createOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + parameters: InboundSecurityRule, + options?: InboundSecurityRuleCreateOrUpdateOptionalParams, + ) => PollerLike, InboundSecurityRule>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + parameters: InboundSecurityRule, + options?: InboundSecurityRuleCreateOrUpdateOptionalParams, + ) => Promise, InboundSecurityRule>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + parameters: InboundSecurityRule, + options?: InboundSecurityRuleCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. */ + get: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + options?: InboundSecurityRuleGetOptionalParams, + ) => Promise; +} + +function _getInboundSecurityRule(context: NetworkManagementContext) { + return { + createOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + parameters: InboundSecurityRule, + options?: InboundSecurityRuleCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkVirtualApplianceName, + ruleCollectionName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + parameters: InboundSecurityRule, + options?: InboundSecurityRuleCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkVirtualApplianceName, + ruleCollectionName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + parameters: InboundSecurityRule, + options?: InboundSecurityRuleCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkVirtualApplianceName, + ruleCollectionName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + ruleCollectionName: string, + options?: InboundSecurityRuleGetOptionalParams, + ) => get(context, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, options), + }; +} + +export function _getInboundSecurityRuleOperations( + context: NetworkManagementContext, +): InboundSecurityRuleOperations { + return { + ..._getInboundSecurityRule(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/index.ts b/sdk/network/arm-network/src/classic/index.ts new file mode 100644 index 000000000000..2b9d3b23aed2 --- /dev/null +++ b/sdk/network/arm-network/src/classic/index.ts @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export type { AdminRuleCollectionsOperations } from "./adminRuleCollections/index.js"; +export type { AdminRulesOperations } from "./adminRules/index.js"; +export type { ApplicationGatewayPrivateEndpointConnectionsOperations } from "./applicationGatewayPrivateEndpointConnections/index.js"; +export type { ApplicationGatewayPrivateLinkResourcesOperations } from "./applicationGatewayPrivateLinkResources/index.js"; +export type { ApplicationGatewaysOperations } from "./applicationGateways/index.js"; +export type { ApplicationGatewayWafDynamicManifestsOperations } from "./applicationGatewayWafDynamicManifests/index.js"; +export type { ApplicationGatewayWafDynamicManifestsDefaultOperations } from "./applicationGatewayWafDynamicManifestsDefault/index.js"; +export type { ApplicationSecurityGroupsOperations } from "./applicationSecurityGroups/index.js"; +export type { AvailableDelegationsOperations } from "./availableDelegations/index.js"; +export type { AvailableEndpointServicesOperations } from "./availableEndpointServices/index.js"; +export type { AvailablePrivateEndpointTypesOperations } from "./availablePrivateEndpointTypes/index.js"; +export type { AvailableResourceGroupDelegationsOperations } from "./availableResourceGroupDelegations/index.js"; +export type { AvailableServiceAliasesOperations } from "./availableServiceAliases/index.js"; +export type { AzureFirewallFqdnTagsOperations } from "./azureFirewallFqdnTags/index.js"; +export type { AzureFirewallsOperations } from "./azureFirewalls/index.js"; +export type { BastionHostsOperations } from "./bastionHosts/index.js"; +export type { BgpServiceCommunitiesOperations } from "./bgpServiceCommunities/index.js"; +export type { CommitsOperations } from "./commits/index.js"; +export type { ConfigurationPolicyGroupsOperations } from "./configurationPolicyGroups/index.js"; +export type { ConnectionMonitorsOperations } from "./connectionMonitors/index.js"; +export type { ConnectionPoliciesOperations } from "./connectionPolicies/index.js"; +export type { ConnectivityConfigurationsOperations } from "./connectivityConfigurations/index.js"; +export type { CustomIPPrefixesOperations } from "./customIPPrefixes/index.js"; +export type { DdosCustomPoliciesOperations } from "./ddosCustomPolicies/index.js"; +export type { DdosProtectionPlansOperations } from "./ddosProtectionPlans/index.js"; +export type { DefaultSecurityRulesOperations } from "./defaultSecurityRules/index.js"; +export type { DscpConfigurationOperations } from "./dscpConfiguration/index.js"; +export type { ExpressRouteCircuitAuthorizationsOperations } from "./expressRouteCircuitAuthorizations/index.js"; +export type { ExpressRouteCircuitConnectionsOperations } from "./expressRouteCircuitConnections/index.js"; +export type { ExpressRouteCircuitPeeringsOperations } from "./expressRouteCircuitPeerings/index.js"; +export type { ExpressRouteCircuitsOperations } from "./expressRouteCircuits/index.js"; +export type { ExpressRouteConnectionsOperations } from "./expressRouteConnections/index.js"; +export type { ExpressRouteCrossConnectionPeeringsOperations } from "./expressRouteCrossConnectionPeerings/index.js"; +export type { ExpressRouteCrossConnectionsOperations } from "./expressRouteCrossConnections/index.js"; +export type { ExpressRouteGatewaysOperations } from "./expressRouteGateways/index.js"; +export type { ExpressRouteLinksOperations } from "./expressRouteLinks/index.js"; +export type { ExpressRoutePortAuthorizationsOperations } from "./expressRoutePortAuthorizations/index.js"; +export type { ExpressRoutePortsOperations } from "./expressRoutePorts/index.js"; +export type { ExpressRoutePortsLocationsOperations } from "./expressRoutePortsLocations/index.js"; +export type { ExpressRouteProviderPortsLocationOperations } from "./expressRouteProviderPortsLocation/index.js"; +export type { ExpressRouteServiceProvidersOperations } from "./expressRouteServiceProviders/index.js"; +export type { FirewallPoliciesOperations } from "./firewallPolicies/index.js"; +export type { FirewallPolicyDeploymentsOperations } from "./firewallPolicyDeployments/index.js"; +export type { FirewallPolicyDraftsOperations } from "./firewallPolicyDrafts/index.js"; +export type { FirewallPolicyIdpsSignaturesOperations } from "./firewallPolicyIdpsSignatures/index.js"; +export type { FirewallPolicyIdpsSignaturesFilterValuesOperations } from "./firewallPolicyIdpsSignaturesFilterValues/index.js"; +export type { FirewallPolicyIdpsSignaturesOverridesOperations } from "./firewallPolicyIdpsSignaturesOverrides/index.js"; +export type { FirewallPolicyRuleCollectionGroupDraftsOperations } from "./firewallPolicyRuleCollectionGroupDrafts/index.js"; +export type { FirewallPolicyRuleCollectionGroupsOperations } from "./firewallPolicyRuleCollectionGroups/index.js"; +export type { FlowLogsOperations } from "./flowLogs/index.js"; +export type { HubRouteTablesOperations } from "./hubRouteTables/index.js"; +export type { HubVirtualNetworkConnectionsOperations } from "./hubVirtualNetworkConnections/index.js"; +export type { InboundNatRulesOperations } from "./inboundNatRules/index.js"; +export type { InboundSecurityRuleOperations } from "./inboundSecurityRule/index.js"; +export type { InterconnectGroupsOperations } from "./interconnectGroups/index.js"; +export type { IpAllocationsOperations } from "./ipAllocations/index.js"; +export type { IpamPoolsOperations } from "./ipamPools/index.js"; +export type { IpGroupsOperations } from "./ipGroups/index.js"; +export type { LoadBalancerBackendAddressPoolsOperations } from "./loadBalancerBackendAddressPools/index.js"; +export type { LoadBalancerFrontendIPConfigurationsOperations } from "./loadBalancerFrontendIPConfigurations/index.js"; +export type { LoadBalancerLoadBalancingRulesOperations } from "./loadBalancerLoadBalancingRules/index.js"; +export type { LoadBalancerNetworkInterfacesOperations } from "./loadBalancerNetworkInterfaces/index.js"; +export type { LoadBalancerOutboundRulesOperations } from "./loadBalancerOutboundRules/index.js"; +export type { LoadBalancerProbesOperations } from "./loadBalancerProbes/index.js"; +export type { LoadBalancersOperations } from "./loadBalancers/index.js"; +export type { LocalNetworkGatewaysOperations } from "./localNetworkGateways/index.js"; +export type { ManagementGroupNetworkManagerConnectionsOperations } from "./managementGroupNetworkManagerConnections/index.js"; +export type { NatGatewaysOperations } from "./natGateways/index.js"; +export type { NatRulesOperations } from "./natRules/index.js"; +export type { NetworkGroupsOperations } from "./networkGroups/index.js"; +export type { NetworkInterfaceIPConfigurationsOperations } from "./networkInterfaceIPConfigurations/index.js"; +export type { NetworkInterfaceLoadBalancersOperations } from "./networkInterfaceLoadBalancers/index.js"; +export type { NetworkInterfacesOperations } from "./networkInterfaces/index.js"; +export type { NetworkInterfaceTapConfigurationsOperations } from "./networkInterfaceTapConfigurations/index.js"; +export type { NetworkManagerCommitsOperations } from "./networkManagerCommits/index.js"; +export type { NetworkManagerDeploymentStatusOperations } from "./networkManagerDeploymentStatus/index.js"; +export type { NetworkManagerRoutingConfigurationsOperations } from "./networkManagerRoutingConfigurations/index.js"; +export type { NetworkManagersOperations } from "./networkManagers/index.js"; +export type { NetworkProfilesOperations } from "./networkProfiles/index.js"; +export type { NetworkSecurityGroupsOperations } from "./networkSecurityGroups/index.js"; +export type { NetworkSecurityPerimeterAccessRulesOperations } from "./networkSecurityPerimeterAccessRules/index.js"; +export type { NetworkSecurityPerimeterAssociableResourceTypesOperations } from "./networkSecurityPerimeterAssociableResourceTypes/index.js"; +export type { NetworkSecurityPerimeterAssociationsOperations } from "./networkSecurityPerimeterAssociations/index.js"; +export type { NetworkSecurityPerimeterLinkReferencesOperations } from "./networkSecurityPerimeterLinkReferences/index.js"; +export type { NetworkSecurityPerimeterLinksOperations } from "./networkSecurityPerimeterLinks/index.js"; +export type { NetworkSecurityPerimeterLoggingConfigurationsOperations } from "./networkSecurityPerimeterLoggingConfigurations/index.js"; +export type { NetworkSecurityPerimeterOperationStatusesOperations } from "./networkSecurityPerimeterOperationStatuses/index.js"; +export type { NetworkSecurityPerimeterProfilesOperations } from "./networkSecurityPerimeterProfiles/index.js"; +export type { NetworkSecurityPerimetersOperations } from "./networkSecurityPerimeters/index.js"; +export type { NetworkSecurityPerimeterServiceTagsOperations } from "./networkSecurityPerimeterServiceTags/index.js"; +export type { NetworkVirtualApplianceConnectionsOperations } from "./networkVirtualApplianceConnections/index.js"; +export type { NetworkVirtualAppliancesOperations } from "./networkVirtualAppliances/index.js"; +export type { NetworkWatchersOperations } from "./networkWatchers/index.js"; +export type { OperationsOperations } from "./operations/index.js"; +export type { P2SVpnGatewaysOperations } from "./p2SVpnGateways/index.js"; +export type { PacketCapturesOperations } from "./packetCaptures/index.js"; +export type { PeerExpressRouteCircuitConnectionsOperations } from "./peerExpressRouteCircuitConnections/index.js"; +export type { PrivateDnsZoneGroupsOperations } from "./privateDnsZoneGroups/index.js"; +export type { PrivateEndpointsOperations } from "./privateEndpoints/index.js"; +export type { PrivateLinkServicesOperations } from "./privateLinkServices/index.js"; +export type { PublicIPAddressesOperations } from "./publicIPAddresses/index.js"; +export type { PublicIPPrefixesOperations } from "./publicIPPrefixes/index.js"; +export type { ReachabilityAnalysisIntentsOperations } from "./reachabilityAnalysisIntents/index.js"; +export type { ReachabilityAnalysisRunsOperations } from "./reachabilityAnalysisRuns/index.js"; +export type { ResourceNavigationLinksOperations } from "./resourceNavigationLinks/index.js"; +export type { RouteFilterRulesOperations } from "./routeFilterRules/index.js"; +export type { RouteFiltersOperations } from "./routeFilters/index.js"; +export type { RouteMapsOperations } from "./routeMaps/index.js"; +export type { RoutesOperations } from "./routes/index.js"; +export type { RouteTablesOperations } from "./routeTables/index.js"; +export type { RoutingIntentOperations } from "./routingIntent/index.js"; +export type { RoutingRuleCollectionsOperations } from "./routingRuleCollections/index.js"; +export type { RoutingRulesOperations } from "./routingRules/index.js"; +export type { ScopeConnectionsOperations } from "./scopeConnections/index.js"; +export type { SecurityAdminConfigurationsOperations } from "./securityAdminConfigurations/index.js"; +export type { SecurityPartnerProvidersOperations } from "./securityPartnerProviders/index.js"; +export type { SecurityRulesOperations } from "./securityRules/index.js"; +export type { SecurityUserConfigurationsOperations } from "./securityUserConfigurations/index.js"; +export type { SecurityUserRuleCollectionsOperations } from "./securityUserRuleCollections/index.js"; +export type { SecurityUserRulesOperations } from "./securityUserRules/index.js"; +export type { ServiceAssociationLinksOperations } from "./serviceAssociationLinks/index.js"; +export type { ServiceEndpointPoliciesOperations } from "./serviceEndpointPolicies/index.js"; +export type { ServiceEndpointPolicyDefinitionsOperations } from "./serviceEndpointPolicyDefinitions/index.js"; +export type { ServiceGatewaysOperations } from "./serviceGateways/index.js"; +export type { ServiceTagInformationOperations } from "./serviceTagInformation/index.js"; +export type { ServiceTagsOperations } from "./serviceTags/index.js"; +export type { StaticCidrsOperations } from "./staticCidrs/index.js"; +export type { StaticMembersOperations } from "./staticMembers/index.js"; +export type { SubgroupsOperations } from "./subgroups/index.js"; +export type { SubnetsOperations } from "./subnets/index.js"; +export type { SubscriptionNetworkManagerConnectionsOperations } from "./subscriptionNetworkManagerConnections/index.js"; +export type { UsagesOperations } from "./usages/index.js"; +export type { VerifierWorkspacesOperations } from "./verifierWorkspaces/index.js"; +export type { VipSwapOperations } from "./vipSwap/index.js"; +export type { VirtualApplianceSitesOperations } from "./virtualApplianceSites/index.js"; +export type { VirtualApplianceSkusOperations } from "./virtualApplianceSkus/index.js"; +export type { VirtualHubBgpConnectionOperations } from "./virtualHubBgpConnection/index.js"; +export type { VirtualHubBgpConnectionsOperations } from "./virtualHubBgpConnections/index.js"; +export type { VirtualHubIpConfigurationOperations } from "./virtualHubIpConfiguration/index.js"; +export type { VirtualHubRouteTableV2SOperations } from "./virtualHubRouteTableV2S/index.js"; +export type { VirtualHubsOperations } from "./virtualHubs/index.js"; +export type { VirtualNetworkAppliancesOperations } from "./virtualNetworkAppliances/index.js"; +export type { VirtualNetworkGatewayConnectionsOperations } from "./virtualNetworkGatewayConnections/index.js"; +export type { VirtualNetworkGatewayNatRulesOperations } from "./virtualNetworkGatewayNatRules/index.js"; +export type { VirtualNetworkGatewaysOperations } from "./virtualNetworkGateways/index.js"; +export type { VirtualNetworkPeeringsOperations } from "./virtualNetworkPeerings/index.js"; +export type { VirtualNetworksOperations } from "./virtualNetworks/index.js"; +export type { VirtualNetworkTapsOperations } from "./virtualNetworkTaps/index.js"; +export type { VirtualRouterPeeringsOperations } from "./virtualRouterPeerings/index.js"; +export type { VirtualRoutersOperations } from "./virtualRouters/index.js"; +export type { VirtualWansOperations } from "./virtualWans/index.js"; +export type { VpnConnectionsOperations } from "./vpnConnections/index.js"; +export type { VpnGatewaysOperations } from "./vpnGateways/index.js"; +export type { VpnLinkConnectionsOperations } from "./vpnLinkConnections/index.js"; +export type { VpnServerConfigurationsOperations } from "./vpnServerConfigurations/index.js"; +export type { VpnServerConfigurationsAssociatedWithVirtualWanOperations } from "./vpnServerConfigurationsAssociatedWithVirtualWan/index.js"; +export type { VpnSiteLinkConnectionsOperations } from "./vpnSiteLinkConnections/index.js"; +export type { VpnSiteLinksOperations } from "./vpnSiteLinks/index.js"; +export type { VpnSitesOperations } from "./vpnSites/index.js"; +export type { VpnSitesConfigurationOperations } from "./vpnSitesConfiguration/index.js"; +export type { WebApplicationFirewallPoliciesOperations } from "./webApplicationFirewallPolicies/index.js"; +export type { WebCategoriesOperations } from "./webCategories/index.js"; diff --git a/sdk/network/arm-network/src/classic/interconnectGroups/index.ts b/sdk/network/arm-network/src/classic/interconnectGroups/index.ts new file mode 100644 index 000000000000..5e3d8610c7d0 --- /dev/null +++ b/sdk/network/arm-network/src/classic/interconnectGroups/index.ts @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + getNodeAvailability, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/interconnectGroups/operations.js"; +import { + InterconnectGroupsGetNodeAvailabilityOptionalParams, + InterconnectGroupsListAllOptionalParams, + InterconnectGroupsListOptionalParams, + InterconnectGroupsDeleteOptionalParams, + InterconnectGroupsUpdateTagsOptionalParams, + InterconnectGroupsCreateOrUpdateOptionalParams, + InterconnectGroupsGetOptionalParams, +} from "../../api/interconnectGroups/options.js"; +import { + TagsObject, + InterconnectGroup, + InterconnectGroupNodeAvailability, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a InterconnectGroups operations. */ +export interface InterconnectGroupsOperations { + /** Gets node availability for all subgroups in the specified interconnect group. */ + getNodeAvailability: ( + resourceGroupName: string, + interconnectGroupName: string, + options?: InterconnectGroupsGetNodeAvailabilityOptionalParams, + ) => PollerLike< + OperationState, + InterconnectGroupNodeAvailability + >; + /** @deprecated use getNodeAvailability instead */ + beginGetNodeAvailability: ( + resourceGroupName: string, + interconnectGroupName: string, + options?: InterconnectGroupsGetNodeAvailabilityOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + InterconnectGroupNodeAvailability + > + >; + /** @deprecated use getNodeAvailability instead */ + beginGetNodeAvailabilityAndWait: ( + resourceGroupName: string, + interconnectGroupName: string, + options?: InterconnectGroupsGetNodeAvailabilityOptionalParams, + ) => Promise; + /** Gets all interconnect groups in a subscription. */ + listAll: ( + options?: InterconnectGroupsListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all interconnect groups in a resource group. */ + list: ( + resourceGroupName: string, + options?: InterconnectGroupsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified interconnect group. */ + delete: ( + resourceGroupName: string, + interconnectGroupName: string, + options?: InterconnectGroupsDeleteOptionalParams, + ) => Promise; + /** Updates interconnect group tags. */ + updateTags: ( + resourceGroupName: string, + interconnectGroupName: string, + parameters: TagsObject, + options?: InterconnectGroupsUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates an interconnect group. */ + createOrUpdate: ( + resourceGroupName: string, + interconnectGroupName: string, + parameters: InterconnectGroup, + options?: InterconnectGroupsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets information about the specified interconnect group. */ + get: ( + resourceGroupName: string, + interconnectGroupName: string, + options?: InterconnectGroupsGetOptionalParams, + ) => Promise; +} + +function _getInterconnectGroups(context: NetworkManagementContext) { + return { + getNodeAvailability: ( + resourceGroupName: string, + interconnectGroupName: string, + options?: InterconnectGroupsGetNodeAvailabilityOptionalParams, + ) => getNodeAvailability(context, resourceGroupName, interconnectGroupName, options), + beginGetNodeAvailability: async ( + resourceGroupName: string, + interconnectGroupName: string, + options?: InterconnectGroupsGetNodeAvailabilityOptionalParams, + ) => { + const poller = getNodeAvailability( + context, + resourceGroupName, + interconnectGroupName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetNodeAvailabilityAndWait: async ( + resourceGroupName: string, + interconnectGroupName: string, + options?: InterconnectGroupsGetNodeAvailabilityOptionalParams, + ) => { + return await getNodeAvailability(context, resourceGroupName, interconnectGroupName, options); + }, + listAll: (options?: InterconnectGroupsListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: InterconnectGroupsListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + interconnectGroupName: string, + options?: InterconnectGroupsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, interconnectGroupName, options), + updateTags: ( + resourceGroupName: string, + interconnectGroupName: string, + parameters: TagsObject, + options?: InterconnectGroupsUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, interconnectGroupName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + interconnectGroupName: string, + parameters: InterconnectGroup, + options?: InterconnectGroupsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, interconnectGroupName, parameters, options), + get: ( + resourceGroupName: string, + interconnectGroupName: string, + options?: InterconnectGroupsGetOptionalParams, + ) => get(context, resourceGroupName, interconnectGroupName, options), + }; +} + +export function _getInterconnectGroupsOperations( + context: NetworkManagementContext, +): InterconnectGroupsOperations { + return { + ..._getInterconnectGroups(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/ipAllocations/index.ts b/sdk/network/arm-network/src/classic/ipAllocations/index.ts new file mode 100644 index 000000000000..d28a59351a39 --- /dev/null +++ b/sdk/network/arm-network/src/classic/ipAllocations/index.ts @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/ipAllocations/operations.js"; +import { + IpAllocationsListOptionalParams, + IpAllocationsListByResourceGroupOptionalParams, + IpAllocationsDeleteOptionalParams, + IpAllocationsUpdateTagsOptionalParams, + IpAllocationsCreateOrUpdateOptionalParams, + IpAllocationsGetOptionalParams, +} from "../../api/ipAllocations/options.js"; +import { TagsObject, IpAllocation } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a IpAllocations operations. */ +export interface IpAllocationsOperations { + /** Gets all IpAllocations in a subscription. */ + list: (options?: IpAllocationsListOptionalParams) => PagedAsyncIterableIterator; + /** Gets all IpAllocations in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: IpAllocationsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified IpAllocation. */ + delete: ( + resourceGroupName: string, + ipAllocationName: string, + options?: IpAllocationsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + ipAllocationName: string, + options?: IpAllocationsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + ipAllocationName: string, + options?: IpAllocationsDeleteOptionalParams, + ) => Promise; + /** Updates a IpAllocation tags. */ + updateTags: ( + resourceGroupName: string, + ipAllocationName: string, + parameters: TagsObject, + options?: IpAllocationsUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates an IpAllocation in the specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + ipAllocationName: string, + parameters: IpAllocation, + options?: IpAllocationsCreateOrUpdateOptionalParams, + ) => PollerLike, IpAllocation>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + ipAllocationName: string, + parameters: IpAllocation, + options?: IpAllocationsCreateOrUpdateOptionalParams, + ) => Promise, IpAllocation>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + ipAllocationName: string, + parameters: IpAllocation, + options?: IpAllocationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified IpAllocation by resource group. */ + get: ( + resourceGroupName: string, + ipAllocationName: string, + options?: IpAllocationsGetOptionalParams, + ) => Promise; +} + +function _getIpAllocations(context: NetworkManagementContext) { + return { + list: (options?: IpAllocationsListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: IpAllocationsListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + ipAllocationName: string, + options?: IpAllocationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, ipAllocationName, options), + beginDelete: async ( + resourceGroupName: string, + ipAllocationName: string, + options?: IpAllocationsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, ipAllocationName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + ipAllocationName: string, + options?: IpAllocationsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, ipAllocationName, options); + }, + updateTags: ( + resourceGroupName: string, + ipAllocationName: string, + parameters: TagsObject, + options?: IpAllocationsUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, ipAllocationName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + ipAllocationName: string, + parameters: IpAllocation, + options?: IpAllocationsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, ipAllocationName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + ipAllocationName: string, + parameters: IpAllocation, + options?: IpAllocationsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + ipAllocationName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + ipAllocationName: string, + parameters: IpAllocation, + options?: IpAllocationsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + ipAllocationName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + ipAllocationName: string, + options?: IpAllocationsGetOptionalParams, + ) => get(context, resourceGroupName, ipAllocationName, options), + }; +} + +export function _getIpAllocationsOperations( + context: NetworkManagementContext, +): IpAllocationsOperations { + return { + ..._getIpAllocations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/ipGroups/index.ts b/sdk/network/arm-network/src/classic/ipGroups/index.ts new file mode 100644 index 000000000000..8812a1bd93b9 --- /dev/null +++ b/sdk/network/arm-network/src/classic/ipGroups/index.ts @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + listByResourceGroup, + $delete, + updateGroups, + createOrUpdate, + get, +} from "../../api/ipGroups/operations.js"; +import { + IpGroupsListOptionalParams, + IpGroupsListByResourceGroupOptionalParams, + IpGroupsDeleteOptionalParams, + IpGroupsUpdateGroupsOptionalParams, + IpGroupsCreateOrUpdateOptionalParams, + IpGroupsGetOptionalParams, +} from "../../api/ipGroups/options.js"; +import { TagsObject, IpGroup } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a IpGroups operations. */ +export interface IpGroupsOperations { + /** Gets all IpGroups in a subscription. */ + list: (options?: IpGroupsListOptionalParams) => PagedAsyncIterableIterator; + /** Gets all IpGroups in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: IpGroupsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified ipGroups. */ + delete: ( + resourceGroupName: string, + ipGroupsName: string, + options?: IpGroupsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + ipGroupsName: string, + options?: IpGroupsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + ipGroupsName: string, + options?: IpGroupsDeleteOptionalParams, + ) => Promise; + /** Updates tags of an IpGroups resource. */ + updateGroups: ( + resourceGroupName: string, + ipGroupsName: string, + parameters: TagsObject, + options?: IpGroupsUpdateGroupsOptionalParams, + ) => Promise; + /** Creates or updates an ipGroups in a specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + ipGroupsName: string, + parameters: IpGroup, + options?: IpGroupsCreateOrUpdateOptionalParams, + ) => PollerLike, IpGroup>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + ipGroupsName: string, + parameters: IpGroup, + options?: IpGroupsCreateOrUpdateOptionalParams, + ) => Promise, IpGroup>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + ipGroupsName: string, + parameters: IpGroup, + options?: IpGroupsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified ipGroups. */ + get: ( + resourceGroupName: string, + ipGroupsName: string, + options?: IpGroupsGetOptionalParams, + ) => Promise; +} + +function _getIpGroups(context: NetworkManagementContext) { + return { + list: (options?: IpGroupsListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: IpGroupsListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + ipGroupsName: string, + options?: IpGroupsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, ipGroupsName, options), + beginDelete: async ( + resourceGroupName: string, + ipGroupsName: string, + options?: IpGroupsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, ipGroupsName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + ipGroupsName: string, + options?: IpGroupsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, ipGroupsName, options); + }, + updateGroups: ( + resourceGroupName: string, + ipGroupsName: string, + parameters: TagsObject, + options?: IpGroupsUpdateGroupsOptionalParams, + ) => updateGroups(context, resourceGroupName, ipGroupsName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + ipGroupsName: string, + parameters: IpGroup, + options?: IpGroupsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, ipGroupsName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + ipGroupsName: string, + parameters: IpGroup, + options?: IpGroupsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate(context, resourceGroupName, ipGroupsName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + ipGroupsName: string, + parameters: IpGroup, + options?: IpGroupsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate(context, resourceGroupName, ipGroupsName, parameters, options); + }, + get: (resourceGroupName: string, ipGroupsName: string, options?: IpGroupsGetOptionalParams) => + get(context, resourceGroupName, ipGroupsName, options), + }; +} + +export function _getIpGroupsOperations(context: NetworkManagementContext): IpGroupsOperations { + return { + ..._getIpGroups(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/ipamPools/index.ts b/sdk/network/arm-network/src/classic/ipamPools/index.ts new file mode 100644 index 000000000000..766a4794a49e --- /dev/null +++ b/sdk/network/arm-network/src/classic/ipamPools/index.ts @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAssociatedResources, + getPoolUsage, + list, + $delete, + update, + create, + get, +} from "../../api/ipamPools/operations.js"; +import { + IpamPoolsListAssociatedResourcesOptionalParams, + IpamPoolsGetPoolUsageOptionalParams, + IpamPoolsListOptionalParams, + IpamPoolsDeleteOptionalParams, + IpamPoolsUpdateOptionalParams, + IpamPoolsCreateOptionalParams, + IpamPoolsGetOptionalParams, +} from "../../api/ipamPools/options.js"; +import { IpamPool, PoolUsage, PoolAssociation } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a IpamPools operations. */ +export interface IpamPoolsOperations { + /** List Associated Resource in the Pool. */ + listAssociatedResources: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsListAssociatedResourcesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get the Pool Usage. */ + getPoolUsage: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsGetPoolUsageOptionalParams, + ) => Promise; + /** Gets list of Pool resources at Network Manager level. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: IpamPoolsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the Pool resource. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsDeleteOptionalParams, + ) => Promise; + /** Updates the specific Pool resource. */ + update: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsUpdateOptionalParams, + ) => Promise; + /** Creates/Updates the Pool resource. */ + create: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options?: IpamPoolsCreateOptionalParams, + ) => PollerLike, IpamPool>; + /** @deprecated use create instead */ + beginCreate: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options?: IpamPoolsCreateOptionalParams, + ) => Promise, IpamPool>>; + /** @deprecated use create instead */ + beginCreateAndWait: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options?: IpamPoolsCreateOptionalParams, + ) => Promise; + /** Gets the specific Pool resource. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsGetOptionalParams, + ) => Promise; +} + +function _getIpamPools(context: NetworkManagementContext) { + return { + listAssociatedResources: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsListAssociatedResourcesOptionalParams, + ) => listAssociatedResources(context, resourceGroupName, networkManagerName, poolName, options), + getPoolUsage: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsGetPoolUsageOptionalParams, + ) => getPoolUsage(context, resourceGroupName, networkManagerName, poolName, options), + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: IpamPoolsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkManagerName, poolName, options), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, networkManagerName, poolName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, networkManagerName, poolName, options); + }, + update: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsUpdateOptionalParams, + ) => update(context, resourceGroupName, networkManagerName, poolName, options), + create: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options?: IpamPoolsCreateOptionalParams, + ) => create(context, resourceGroupName, networkManagerName, poolName, body, options), + beginCreate: async ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options?: IpamPoolsCreateOptionalParams, + ) => { + const poller = create( + context, + resourceGroupName, + networkManagerName, + poolName, + body, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options?: IpamPoolsCreateOptionalParams, + ) => { + return await create(context, resourceGroupName, networkManagerName, poolName, body, options); + }, + get: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsGetOptionalParams, + ) => get(context, resourceGroupName, networkManagerName, poolName, options), + }; +} + +export function _getIpamPoolsOperations(context: NetworkManagementContext): IpamPoolsOperations { + return { + ..._getIpamPools(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/loadBalancerBackendAddressPools/index.ts b/sdk/network/arm-network/src/classic/loadBalancerBackendAddressPools/index.ts new file mode 100644 index 000000000000..25aaa72cd0ee --- /dev/null +++ b/sdk/network/arm-network/src/classic/loadBalancerBackendAddressPools/index.ts @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/loadBalancerBackendAddressPools/operations.js"; +import { + LoadBalancerBackendAddressPoolsListOptionalParams, + LoadBalancerBackendAddressPoolsDeleteOptionalParams, + LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, + LoadBalancerBackendAddressPoolsGetOptionalParams, +} from "../../api/loadBalancerBackendAddressPools/options.js"; +import { BackendAddressPool } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a LoadBalancerBackendAddressPools operations. */ +export interface LoadBalancerBackendAddressPoolsOperations { + /** Gets all the load balancer backed address pools. */ + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerBackendAddressPoolsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified load balancer backend address pool. */ + delete: ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a load balancer backend address pool. */ + createOrUpdate: ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + parameters: BackendAddressPool, + options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, + ) => PollerLike, BackendAddressPool>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + parameters: BackendAddressPool, + options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, + ) => Promise, BackendAddressPool>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + parameters: BackendAddressPool, + options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets load balancer backend address pool. */ + get: ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options?: LoadBalancerBackendAddressPoolsGetOptionalParams, + ) => Promise; +} + +function _getLoadBalancerBackendAddressPools(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerBackendAddressPoolsListOptionalParams, + ) => list(context, resourceGroupName, loadBalancerName, options), + delete: ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, loadBalancerName, backendAddressPoolName, options), + beginDelete: async ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + loadBalancerName, + backendAddressPoolName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + loadBalancerName, + backendAddressPoolName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + parameters: BackendAddressPool, + options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + loadBalancerName, + backendAddressPoolName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + parameters: BackendAddressPool, + options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + loadBalancerName, + backendAddressPoolName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + parameters: BackendAddressPool, + options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + loadBalancerName, + backendAddressPoolName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + loadBalancerName: string, + backendAddressPoolName: string, + options?: LoadBalancerBackendAddressPoolsGetOptionalParams, + ) => get(context, resourceGroupName, loadBalancerName, backendAddressPoolName, options), + }; +} + +export function _getLoadBalancerBackendAddressPoolsOperations( + context: NetworkManagementContext, +): LoadBalancerBackendAddressPoolsOperations { + return { + ..._getLoadBalancerBackendAddressPools(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/loadBalancerFrontendIPConfigurations/index.ts b/sdk/network/arm-network/src/classic/loadBalancerFrontendIPConfigurations/index.ts new file mode 100644 index 000000000000..1f94a198c6c7 --- /dev/null +++ b/sdk/network/arm-network/src/classic/loadBalancerFrontendIPConfigurations/index.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, get } from "../../api/loadBalancerFrontendIPConfigurations/operations.js"; +import { + LoadBalancerFrontendIPConfigurationsListOptionalParams, + LoadBalancerFrontendIPConfigurationsGetOptionalParams, +} from "../../api/loadBalancerFrontendIPConfigurations/options.js"; +import { FrontendIPConfiguration } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a LoadBalancerFrontendIPConfigurations operations. */ +export interface LoadBalancerFrontendIPConfigurationsOperations { + /** Gets all the load balancer frontend IP configurations. */ + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerFrontendIPConfigurationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets load balancer frontend IP configuration. */ + get: ( + resourceGroupName: string, + loadBalancerName: string, + frontendIPConfigurationName: string, + options?: LoadBalancerFrontendIPConfigurationsGetOptionalParams, + ) => Promise; +} + +function _getLoadBalancerFrontendIPConfigurations(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerFrontendIPConfigurationsListOptionalParams, + ) => list(context, resourceGroupName, loadBalancerName, options), + get: ( + resourceGroupName: string, + loadBalancerName: string, + frontendIPConfigurationName: string, + options?: LoadBalancerFrontendIPConfigurationsGetOptionalParams, + ) => get(context, resourceGroupName, loadBalancerName, frontendIPConfigurationName, options), + }; +} + +export function _getLoadBalancerFrontendIPConfigurationsOperations( + context: NetworkManagementContext, +): LoadBalancerFrontendIPConfigurationsOperations { + return { + ..._getLoadBalancerFrontendIPConfigurations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/loadBalancerLoadBalancingRules/index.ts b/sdk/network/arm-network/src/classic/loadBalancerLoadBalancingRules/index.ts new file mode 100644 index 000000000000..4cd50e357a71 --- /dev/null +++ b/sdk/network/arm-network/src/classic/loadBalancerLoadBalancingRules/index.ts @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { health, list, get } from "../../api/loadBalancerLoadBalancingRules/operations.js"; +import { + LoadBalancerLoadBalancingRulesHealthOptionalParams, + LoadBalancerLoadBalancingRulesListOptionalParams, + LoadBalancerLoadBalancingRulesGetOptionalParams, +} from "../../api/loadBalancerLoadBalancingRules/options.js"; +import { LoadBalancingRule } from "../../models/common/models.js"; +import { LoadBalancerHealthPerRule } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a LoadBalancerLoadBalancingRules operations. */ +export interface LoadBalancerLoadBalancingRulesOperations { + /** Get health details of a load balancing rule. */ + health: ( + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, + ) => PollerLike, LoadBalancerHealthPerRule>; + /** @deprecated use health instead */ + beginHealth: ( + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, + ) => Promise< + SimplePollerLike, LoadBalancerHealthPerRule> + >; + /** @deprecated use health instead */ + beginHealthAndWait: ( + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, + ) => Promise; + /** Gets all the load balancing rules in a load balancer. */ + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerLoadBalancingRulesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets the specified load balancer load balancing rule. */ + get: ( + resourceGroupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesGetOptionalParams, + ) => Promise; +} + +function _getLoadBalancerLoadBalancingRules(context: NetworkManagementContext) { + return { + health: ( + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, + ) => health(context, groupName, loadBalancerName, loadBalancingRuleName, options), + beginHealth: async ( + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, + ) => { + const poller = health(context, groupName, loadBalancerName, loadBalancingRuleName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginHealthAndWait: async ( + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, + ) => { + return await health(context, groupName, loadBalancerName, loadBalancingRuleName, options); + }, + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerLoadBalancingRulesListOptionalParams, + ) => list(context, resourceGroupName, loadBalancerName, options), + get: ( + resourceGroupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesGetOptionalParams, + ) => get(context, resourceGroupName, loadBalancerName, loadBalancingRuleName, options), + }; +} + +export function _getLoadBalancerLoadBalancingRulesOperations( + context: NetworkManagementContext, +): LoadBalancerLoadBalancingRulesOperations { + return { + ..._getLoadBalancerLoadBalancingRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/loadBalancerNetworkInterfaces/index.ts b/sdk/network/arm-network/src/classic/loadBalancerNetworkInterfaces/index.ts new file mode 100644 index 000000000000..8a8d3be00bb5 --- /dev/null +++ b/sdk/network/arm-network/src/classic/loadBalancerNetworkInterfaces/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/loadBalancerNetworkInterfaces/operations.js"; +import { LoadBalancerNetworkInterfacesListOptionalParams } from "../../api/loadBalancerNetworkInterfaces/options.js"; +import { NetworkInterface } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a LoadBalancerNetworkInterfaces operations. */ +export interface LoadBalancerNetworkInterfacesOperations { + /** Gets associated load balancer network interfaces. */ + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerNetworkInterfacesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getLoadBalancerNetworkInterfaces(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerNetworkInterfacesListOptionalParams, + ) => list(context, resourceGroupName, loadBalancerName, options), + }; +} + +export function _getLoadBalancerNetworkInterfacesOperations( + context: NetworkManagementContext, +): LoadBalancerNetworkInterfacesOperations { + return { + ..._getLoadBalancerNetworkInterfaces(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/loadBalancerOutboundRules/index.ts b/sdk/network/arm-network/src/classic/loadBalancerOutboundRules/index.ts new file mode 100644 index 000000000000..b01e967503db --- /dev/null +++ b/sdk/network/arm-network/src/classic/loadBalancerOutboundRules/index.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, get } from "../../api/loadBalancerOutboundRules/operations.js"; +import { + LoadBalancerOutboundRulesListOptionalParams, + LoadBalancerOutboundRulesGetOptionalParams, +} from "../../api/loadBalancerOutboundRules/options.js"; +import { OutboundRule } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a LoadBalancerOutboundRules operations. */ +export interface LoadBalancerOutboundRulesOperations { + /** Gets all the outbound rules in a load balancer. */ + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerOutboundRulesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets the specified load balancer outbound rule. */ + get: ( + resourceGroupName: string, + loadBalancerName: string, + outboundRuleName: string, + options?: LoadBalancerOutboundRulesGetOptionalParams, + ) => Promise; +} + +function _getLoadBalancerOutboundRules(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerOutboundRulesListOptionalParams, + ) => list(context, resourceGroupName, loadBalancerName, options), + get: ( + resourceGroupName: string, + loadBalancerName: string, + outboundRuleName: string, + options?: LoadBalancerOutboundRulesGetOptionalParams, + ) => get(context, resourceGroupName, loadBalancerName, outboundRuleName, options), + }; +} + +export function _getLoadBalancerOutboundRulesOperations( + context: NetworkManagementContext, +): LoadBalancerOutboundRulesOperations { + return { + ..._getLoadBalancerOutboundRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/loadBalancerProbes/index.ts b/sdk/network/arm-network/src/classic/loadBalancerProbes/index.ts new file mode 100644 index 000000000000..9ba2ab5b6603 --- /dev/null +++ b/sdk/network/arm-network/src/classic/loadBalancerProbes/index.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, get } from "../../api/loadBalancerProbes/operations.js"; +import { + LoadBalancerProbesListOptionalParams, + LoadBalancerProbesGetOptionalParams, +} from "../../api/loadBalancerProbes/options.js"; +import { Probe } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a LoadBalancerProbes operations. */ +export interface LoadBalancerProbesOperations { + /** Gets all the load balancer probes. */ + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerProbesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets load balancer probe. */ + get: ( + resourceGroupName: string, + loadBalancerName: string, + probeName: string, + options?: LoadBalancerProbesGetOptionalParams, + ) => Promise; +} + +function _getLoadBalancerProbes(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancerProbesListOptionalParams, + ) => list(context, resourceGroupName, loadBalancerName, options), + get: ( + resourceGroupName: string, + loadBalancerName: string, + probeName: string, + options?: LoadBalancerProbesGetOptionalParams, + ) => get(context, resourceGroupName, loadBalancerName, probeName, options), + }; +} + +export function _getLoadBalancerProbesOperations( + context: NetworkManagementContext, +): LoadBalancerProbesOperations { + return { + ..._getLoadBalancerProbes(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/loadBalancers/index.ts b/sdk/network/arm-network/src/classic/loadBalancers/index.ts new file mode 100644 index 000000000000..1432104b3d0b --- /dev/null +++ b/sdk/network/arm-network/src/classic/loadBalancers/index.ts @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + swapPublicIpAddresses, + listInboundNatRulePortMappings, + migrateToIpBased, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/loadBalancers/operations.js"; +import { + LoadBalancersSwapPublicIpAddressesOptionalParams, + LoadBalancersListInboundNatRulePortMappingsOptionalParams, + LoadBalancersMigrateToIpBasedOptionalParams, + LoadBalancersListAllOptionalParams, + LoadBalancersListOptionalParams, + LoadBalancersDeleteOptionalParams, + LoadBalancersUpdateTagsOptionalParams, + LoadBalancersCreateOrUpdateOptionalParams, + LoadBalancersGetOptionalParams, +} from "../../api/loadBalancers/options.js"; +import { LoadBalancer } from "../../models/common/models.js"; +import { + TagsObject, + MigratedPools, + QueryInboundNatRulePortMappingRequest, + BackendAddressInboundNatRulePortMappings, + LoadBalancerVipSwapRequest, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a LoadBalancers operations. */ +export interface LoadBalancersOperations { + /** Swaps VIPs between two load balancers. */ + swapPublicIpAddresses: ( + location: string, + parameters: LoadBalancerVipSwapRequest, + options?: LoadBalancersSwapPublicIpAddressesOptionalParams, + ) => PollerLike, void>; + /** @deprecated use swapPublicIpAddresses instead */ + beginSwapPublicIpAddresses: ( + location: string, + parameters: LoadBalancerVipSwapRequest, + options?: LoadBalancersSwapPublicIpAddressesOptionalParams, + ) => Promise, void>>; + /** @deprecated use swapPublicIpAddresses instead */ + beginSwapPublicIpAddressesAndWait: ( + location: string, + parameters: LoadBalancerVipSwapRequest, + options?: LoadBalancersSwapPublicIpAddressesOptionalParams, + ) => Promise; + /** List of inbound NAT rule port mappings. */ + listInboundNatRulePortMappings: ( + groupName: string, + loadBalancerName: string, + backendPoolName: string, + parameters: QueryInboundNatRulePortMappingRequest, + options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams, + ) => PollerLike< + OperationState, + BackendAddressInboundNatRulePortMappings + >; + /** @deprecated use listInboundNatRulePortMappings instead */ + beginListInboundNatRulePortMappings: ( + groupName: string, + loadBalancerName: string, + backendPoolName: string, + parameters: QueryInboundNatRulePortMappingRequest, + options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + BackendAddressInboundNatRulePortMappings + > + >; + /** @deprecated use listInboundNatRulePortMappings instead */ + beginListInboundNatRulePortMappingsAndWait: ( + groupName: string, + loadBalancerName: string, + backendPoolName: string, + parameters: QueryInboundNatRulePortMappingRequest, + options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams, + ) => Promise; + /** Migrate load balancer to IP Based */ + migrateToIpBased: ( + groupName: string, + loadBalancerName: string, + options?: LoadBalancersMigrateToIpBasedOptionalParams, + ) => Promise; + /** Gets all the load balancers in a subscription. */ + listAll: ( + options?: LoadBalancersListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all the load balancers in a resource group. */ + list: ( + resourceGroupName: string, + options?: LoadBalancersListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified load balancer. */ + delete: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ) => Promise; + /** Updates a load balancer tags. */ + updateTags: ( + resourceGroupName: string, + loadBalancerName: string, + parameters: TagsObject, + options?: LoadBalancersUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a load balancer. */ + createOrUpdate: ( + resourceGroupName: string, + loadBalancerName: string, + parameters: LoadBalancer, + options?: LoadBalancersCreateOrUpdateOptionalParams, + ) => PollerLike, LoadBalancer>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + loadBalancerName: string, + parameters: LoadBalancer, + options?: LoadBalancersCreateOrUpdateOptionalParams, + ) => Promise, LoadBalancer>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + loadBalancerName: string, + parameters: LoadBalancer, + options?: LoadBalancersCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified load balancer. */ + get: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancersGetOptionalParams, + ) => Promise; +} + +function _getLoadBalancers(context: NetworkManagementContext) { + return { + swapPublicIpAddresses: ( + location: string, + parameters: LoadBalancerVipSwapRequest, + options?: LoadBalancersSwapPublicIpAddressesOptionalParams, + ) => swapPublicIpAddresses(context, location, parameters, options), + beginSwapPublicIpAddresses: async ( + location: string, + parameters: LoadBalancerVipSwapRequest, + options?: LoadBalancersSwapPublicIpAddressesOptionalParams, + ) => { + const poller = swapPublicIpAddresses(context, location, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginSwapPublicIpAddressesAndWait: async ( + location: string, + parameters: LoadBalancerVipSwapRequest, + options?: LoadBalancersSwapPublicIpAddressesOptionalParams, + ) => { + return await swapPublicIpAddresses(context, location, parameters, options); + }, + listInboundNatRulePortMappings: ( + groupName: string, + loadBalancerName: string, + backendPoolName: string, + parameters: QueryInboundNatRulePortMappingRequest, + options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams, + ) => + listInboundNatRulePortMappings( + context, + groupName, + loadBalancerName, + backendPoolName, + parameters, + options, + ), + beginListInboundNatRulePortMappings: async ( + groupName: string, + loadBalancerName: string, + backendPoolName: string, + parameters: QueryInboundNatRulePortMappingRequest, + options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams, + ) => { + const poller = listInboundNatRulePortMappings( + context, + groupName, + loadBalancerName, + backendPoolName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListInboundNatRulePortMappingsAndWait: async ( + groupName: string, + loadBalancerName: string, + backendPoolName: string, + parameters: QueryInboundNatRulePortMappingRequest, + options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams, + ) => { + return await listInboundNatRulePortMappings( + context, + groupName, + loadBalancerName, + backendPoolName, + parameters, + options, + ); + }, + migrateToIpBased: ( + groupName: string, + loadBalancerName: string, + options?: LoadBalancersMigrateToIpBasedOptionalParams, + ) => migrateToIpBased(context, groupName, loadBalancerName, options), + listAll: (options?: LoadBalancersListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: LoadBalancersListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, loadBalancerName, options), + beginDelete: async ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, loadBalancerName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, loadBalancerName, options); + }, + updateTags: ( + resourceGroupName: string, + loadBalancerName: string, + parameters: TagsObject, + options?: LoadBalancersUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, loadBalancerName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + loadBalancerName: string, + parameters: LoadBalancer, + options?: LoadBalancersCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, loadBalancerName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + loadBalancerName: string, + parameters: LoadBalancer, + options?: LoadBalancersCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + loadBalancerName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + loadBalancerName: string, + parameters: LoadBalancer, + options?: LoadBalancersCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + loadBalancerName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + loadBalancerName: string, + options?: LoadBalancersGetOptionalParams, + ) => get(context, resourceGroupName, loadBalancerName, options), + }; +} + +export function _getLoadBalancersOperations( + context: NetworkManagementContext, +): LoadBalancersOperations { + return { + ..._getLoadBalancers(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/localNetworkGateways/index.ts b/sdk/network/arm-network/src/classic/localNetworkGateways/index.ts new file mode 100644 index 000000000000..31550dc783b3 --- /dev/null +++ b/sdk/network/arm-network/src/classic/localNetworkGateways/index.ts @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/localNetworkGateways/operations.js"; +import { + LocalNetworkGatewaysListOptionalParams, + LocalNetworkGatewaysDeleteOptionalParams, + LocalNetworkGatewaysUpdateTagsOptionalParams, + LocalNetworkGatewaysCreateOrUpdateOptionalParams, + LocalNetworkGatewaysGetOptionalParams, +} from "../../api/localNetworkGateways/options.js"; +import { TagsObject, LocalNetworkGateway } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a LocalNetworkGateways operations. */ +export interface LocalNetworkGatewaysOperations { + /** Gets all the local network gateways in a resource group. */ + list: ( + resourceGroupName: string, + options?: LocalNetworkGatewaysListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified local network gateway. */ + delete: ( + resourceGroupName: string, + localNetworkGatewayName: string, + options?: LocalNetworkGatewaysDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + localNetworkGatewayName: string, + options?: LocalNetworkGatewaysDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + localNetworkGatewayName: string, + options?: LocalNetworkGatewaysDeleteOptionalParams, + ) => Promise; + /** Updates a local network gateway tags. */ + updateTags: ( + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: TagsObject, + options?: LocalNetworkGatewaysUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a local network gateway in the specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: LocalNetworkGateway, + options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams, + ) => PollerLike, LocalNetworkGateway>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: LocalNetworkGateway, + options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams, + ) => Promise, LocalNetworkGateway>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: LocalNetworkGateway, + options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified local network gateway in a resource group. */ + get: ( + resourceGroupName: string, + localNetworkGatewayName: string, + options?: LocalNetworkGatewaysGetOptionalParams, + ) => Promise; +} + +function _getLocalNetworkGateways(context: NetworkManagementContext) { + return { + list: (resourceGroupName: string, options?: LocalNetworkGatewaysListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + localNetworkGatewayName: string, + options?: LocalNetworkGatewaysDeleteOptionalParams, + ) => $delete(context, resourceGroupName, localNetworkGatewayName, options), + beginDelete: async ( + resourceGroupName: string, + localNetworkGatewayName: string, + options?: LocalNetworkGatewaysDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, localNetworkGatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + localNetworkGatewayName: string, + options?: LocalNetworkGatewaysDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, localNetworkGatewayName, options); + }, + updateTags: ( + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: TagsObject, + options?: LocalNetworkGatewaysUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, localNetworkGatewayName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: LocalNetworkGateway, + options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, localNetworkGatewayName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: LocalNetworkGateway, + options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + localNetworkGatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + localNetworkGatewayName: string, + parameters: LocalNetworkGateway, + options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + localNetworkGatewayName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + localNetworkGatewayName: string, + options?: LocalNetworkGatewaysGetOptionalParams, + ) => get(context, resourceGroupName, localNetworkGatewayName, options), + }; +} + +export function _getLocalNetworkGatewaysOperations( + context: NetworkManagementContext, +): LocalNetworkGatewaysOperations { + return { + ..._getLocalNetworkGateways(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/managementGroupNetworkManagerConnections/index.ts b/sdk/network/arm-network/src/classic/managementGroupNetworkManagerConnections/index.ts new file mode 100644 index 000000000000..e78edb70c843 --- /dev/null +++ b/sdk/network/arm-network/src/classic/managementGroupNetworkManagerConnections/index.ts @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/managementGroupNetworkManagerConnections/operations.js"; +import { + ManagementGroupNetworkManagerConnectionsListOptionalParams, + ManagementGroupNetworkManagerConnectionsDeleteOptionalParams, + ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams, + ManagementGroupNetworkManagerConnectionsGetOptionalParams, +} from "../../api/managementGroupNetworkManagerConnections/options.js"; +import { NetworkManagerConnection } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ManagementGroupNetworkManagerConnections operations. */ +export interface ManagementGroupNetworkManagerConnectionsOperations { + /** List all network manager connections created by this management group. */ + list: ( + managementGroupId: string, + options?: ManagementGroupNetworkManagerConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete specified pending connection created by this management group. */ + delete: ( + managementGroupId: string, + networkManagerConnectionName: string, + options?: ManagementGroupNetworkManagerConnectionsDeleteOptionalParams, + ) => Promise; + /** Create a network manager connection on this management group. */ + createOrUpdate: ( + managementGroupId: string, + networkManagerConnectionName: string, + parameters: NetworkManagerConnection, + options?: ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get a specified connection created by this management group. */ + get: ( + managementGroupId: string, + networkManagerConnectionName: string, + options?: ManagementGroupNetworkManagerConnectionsGetOptionalParams, + ) => Promise; +} + +function _getManagementGroupNetworkManagerConnections(context: NetworkManagementContext) { + return { + list: ( + managementGroupId: string, + options?: ManagementGroupNetworkManagerConnectionsListOptionalParams, + ) => list(context, managementGroupId, options), + delete: ( + managementGroupId: string, + networkManagerConnectionName: string, + options?: ManagementGroupNetworkManagerConnectionsDeleteOptionalParams, + ) => $delete(context, managementGroupId, networkManagerConnectionName, options), + createOrUpdate: ( + managementGroupId: string, + networkManagerConnectionName: string, + parameters: NetworkManagerConnection, + options?: ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, managementGroupId, networkManagerConnectionName, parameters, options), + get: ( + managementGroupId: string, + networkManagerConnectionName: string, + options?: ManagementGroupNetworkManagerConnectionsGetOptionalParams, + ) => get(context, managementGroupId, networkManagerConnectionName, options), + }; +} + +export function _getManagementGroupNetworkManagerConnectionsOperations( + context: NetworkManagementContext, +): ManagementGroupNetworkManagerConnectionsOperations { + return { + ..._getManagementGroupNetworkManagerConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/natGateways/index.ts b/sdk/network/arm-network/src/classic/natGateways/index.ts new file mode 100644 index 000000000000..0cde7025ca88 --- /dev/null +++ b/sdk/network/arm-network/src/classic/natGateways/index.ts @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/natGateways/operations.js"; +import { + NatGatewaysListAllOptionalParams, + NatGatewaysListOptionalParams, + NatGatewaysDeleteOptionalParams, + NatGatewaysUpdateTagsOptionalParams, + NatGatewaysCreateOrUpdateOptionalParams, + NatGatewaysGetOptionalParams, +} from "../../api/natGateways/options.js"; +import { NatGateway } from "../../models/common/models.js"; +import { TagsObject } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NatGateways operations. */ +export interface NatGatewaysOperations { + /** Gets all the Nat Gateways in a subscription. */ + listAll: (options?: NatGatewaysListAllOptionalParams) => PagedAsyncIterableIterator; + /** Gets all nat gateways in a resource group. */ + list: ( + resourceGroupName: string, + options?: NatGatewaysListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified nat gateway. */ + delete: ( + resourceGroupName: string, + natGatewayName: string, + options?: NatGatewaysDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + natGatewayName: string, + options?: NatGatewaysDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + natGatewayName: string, + options?: NatGatewaysDeleteOptionalParams, + ) => Promise; + /** Updates nat gateway tags. */ + updateTags: ( + resourceGroupName: string, + natGatewayName: string, + parameters: TagsObject, + options?: NatGatewaysUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a nat gateway. */ + createOrUpdate: ( + resourceGroupName: string, + natGatewayName: string, + parameters: NatGateway, + options?: NatGatewaysCreateOrUpdateOptionalParams, + ) => PollerLike, NatGateway>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + natGatewayName: string, + parameters: NatGateway, + options?: NatGatewaysCreateOrUpdateOptionalParams, + ) => Promise, NatGateway>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + natGatewayName: string, + parameters: NatGateway, + options?: NatGatewaysCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified nat gateway in a specified resource group. */ + get: ( + resourceGroupName: string, + natGatewayName: string, + options?: NatGatewaysGetOptionalParams, + ) => Promise; +} + +function _getNatGateways(context: NetworkManagementContext) { + return { + listAll: (options?: NatGatewaysListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: NatGatewaysListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + natGatewayName: string, + options?: NatGatewaysDeleteOptionalParams, + ) => $delete(context, resourceGroupName, natGatewayName, options), + beginDelete: async ( + resourceGroupName: string, + natGatewayName: string, + options?: NatGatewaysDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, natGatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + natGatewayName: string, + options?: NatGatewaysDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, natGatewayName, options); + }, + updateTags: ( + resourceGroupName: string, + natGatewayName: string, + parameters: TagsObject, + options?: NatGatewaysUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, natGatewayName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + natGatewayName: string, + parameters: NatGateway, + options?: NatGatewaysCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, natGatewayName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + natGatewayName: string, + parameters: NatGateway, + options?: NatGatewaysCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + natGatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + natGatewayName: string, + parameters: NatGateway, + options?: NatGatewaysCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate(context, resourceGroupName, natGatewayName, parameters, options); + }, + get: ( + resourceGroupName: string, + natGatewayName: string, + options?: NatGatewaysGetOptionalParams, + ) => get(context, resourceGroupName, natGatewayName, options), + }; +} + +export function _getNatGatewaysOperations( + context: NetworkManagementContext, +): NatGatewaysOperations { + return { + ..._getNatGateways(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/natRules/index.ts b/sdk/network/arm-network/src/classic/natRules/index.ts new file mode 100644 index 000000000000..655cf56e2e54 --- /dev/null +++ b/sdk/network/arm-network/src/classic/natRules/index.ts @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { listByVpnGateway, $delete, createOrUpdate, get } from "../../api/natRules/operations.js"; +import { + NatRulesListByVpnGatewayOptionalParams, + NatRulesDeleteOptionalParams, + NatRulesCreateOrUpdateOptionalParams, + NatRulesGetOptionalParams, +} from "../../api/natRules/options.js"; +import { VpnGatewayNatRule } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NatRules operations. */ +export interface NatRulesOperations { + /** Retrieves all nat rules for a particular virtual wan vpn gateway. */ + listByVpnGateway: ( + resourceGroupName: string, + gatewayName: string, + options?: NatRulesListByVpnGatewayOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a nat rule. */ + delete: ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options?: NatRulesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options?: NatRulesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options?: NatRulesDeleteOptionalParams, + ) => Promise; + /** Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. */ + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + natRuleParameters: VpnGatewayNatRule, + options?: NatRulesCreateOrUpdateOptionalParams, + ) => PollerLike, VpnGatewayNatRule>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + natRuleParameters: VpnGatewayNatRule, + options?: NatRulesCreateOrUpdateOptionalParams, + ) => Promise, VpnGatewayNatRule>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + natRuleParameters: VpnGatewayNatRule, + options?: NatRulesCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a nat ruleGet. */ + get: ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options?: NatRulesGetOptionalParams, + ) => Promise; +} + +function _getNatRules(context: NetworkManagementContext) { + return { + listByVpnGateway: ( + resourceGroupName: string, + gatewayName: string, + options?: NatRulesListByVpnGatewayOptionalParams, + ) => listByVpnGateway(context, resourceGroupName, gatewayName, options), + delete: ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options?: NatRulesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, gatewayName, natRuleName, options), + beginDelete: async ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options?: NatRulesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, gatewayName, natRuleName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options?: NatRulesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, gatewayName, natRuleName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + natRuleParameters: VpnGatewayNatRule, + options?: NatRulesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + gatewayName, + natRuleName, + natRuleParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + natRuleParameters: VpnGatewayNatRule, + options?: NatRulesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + gatewayName, + natRuleName, + natRuleParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + natRuleParameters: VpnGatewayNatRule, + options?: NatRulesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + gatewayName, + natRuleName, + natRuleParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + gatewayName: string, + natRuleName: string, + options?: NatRulesGetOptionalParams, + ) => get(context, resourceGroupName, gatewayName, natRuleName, options), + }; +} + +export function _getNatRulesOperations(context: NetworkManagementContext): NatRulesOperations { + return { + ..._getNatRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkGroups/index.ts b/sdk/network/arm-network/src/classic/networkGroups/index.ts new file mode 100644 index 000000000000..1e1237ce24a6 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkGroups/index.ts @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/networkGroups/operations.js"; +import { + NetworkGroupsListOptionalParams, + NetworkGroupsDeleteOptionalParams, + NetworkGroupsCreateOrUpdateOptionalParams, + NetworkGroupsGetOptionalParams, +} from "../../api/networkGroups/options.js"; +import { NetworkGroup } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkGroups operations. */ +export interface NetworkGroupsOperations { + /** Lists the specified network group. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkGroupsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a network group. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options?: NetworkGroupsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options?: NetworkGroupsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options?: NetworkGroupsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a network group. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + parameters: NetworkGroup, + options?: NetworkGroupsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified network group. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options?: NetworkGroupsGetOptionalParams, + ) => Promise; +} + +function _getNetworkGroups(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkGroupsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options?: NetworkGroupsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkManagerName, networkGroupName, options), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options?: NetworkGroupsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + networkGroupName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options?: NetworkGroupsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + networkGroupName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + parameters: NetworkGroup, + options?: NetworkGroupsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + networkGroupName, + parameters, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options?: NetworkGroupsGetOptionalParams, + ) => get(context, resourceGroupName, networkManagerName, networkGroupName, options), + }; +} + +export function _getNetworkGroupsOperations( + context: NetworkManagementContext, +): NetworkGroupsOperations { + return { + ..._getNetworkGroups(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkInterfaceIPConfigurations/index.ts b/sdk/network/arm-network/src/classic/networkInterfaceIPConfigurations/index.ts new file mode 100644 index 000000000000..a5a105284486 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkInterfaceIPConfigurations/index.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, get } from "../../api/networkInterfaceIPConfigurations/operations.js"; +import { + NetworkInterfaceIPConfigurationsListOptionalParams, + NetworkInterfaceIPConfigurationsGetOptionalParams, +} from "../../api/networkInterfaceIPConfigurations/options.js"; +import { NetworkInterfaceIPConfiguration } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a NetworkInterfaceIPConfigurations operations. */ +export interface NetworkInterfaceIPConfigurationsOperations { + /** Get all ip configurations in a network interface. */ + list: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfaceIPConfigurationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets the specified network interface ip configuration. */ + get: ( + resourceGroupName: string, + networkInterfaceName: string, + ipConfigurationName: string, + options?: NetworkInterfaceIPConfigurationsGetOptionalParams, + ) => Promise; +} + +function _getNetworkInterfaceIPConfigurations(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfaceIPConfigurationsListOptionalParams, + ) => list(context, resourceGroupName, networkInterfaceName, options), + get: ( + resourceGroupName: string, + networkInterfaceName: string, + ipConfigurationName: string, + options?: NetworkInterfaceIPConfigurationsGetOptionalParams, + ) => get(context, resourceGroupName, networkInterfaceName, ipConfigurationName, options), + }; +} + +export function _getNetworkInterfaceIPConfigurationsOperations( + context: NetworkManagementContext, +): NetworkInterfaceIPConfigurationsOperations { + return { + ..._getNetworkInterfaceIPConfigurations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkInterfaceLoadBalancers/index.ts b/sdk/network/arm-network/src/classic/networkInterfaceLoadBalancers/index.ts new file mode 100644 index 000000000000..30d7b0355f17 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkInterfaceLoadBalancers/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/networkInterfaceLoadBalancers/operations.js"; +import { NetworkInterfaceLoadBalancersListOptionalParams } from "../../api/networkInterfaceLoadBalancers/options.js"; +import { LoadBalancer } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a NetworkInterfaceLoadBalancers operations. */ +export interface NetworkInterfaceLoadBalancersOperations { + /** List all load balancers in a network interface. */ + list: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfaceLoadBalancersListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getNetworkInterfaceLoadBalancers(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfaceLoadBalancersListOptionalParams, + ) => list(context, resourceGroupName, networkInterfaceName, options), + }; +} + +export function _getNetworkInterfaceLoadBalancersOperations( + context: NetworkManagementContext, +): NetworkInterfaceLoadBalancersOperations { + return { + ..._getNetworkInterfaceLoadBalancers(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkInterfaceTapConfigurations/index.ts b/sdk/network/arm-network/src/classic/networkInterfaceTapConfigurations/index.ts new file mode 100644 index 000000000000..b2564756f3b3 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkInterfaceTapConfigurations/index.ts @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/networkInterfaceTapConfigurations/operations.js"; +import { + NetworkInterfaceTapConfigurationsListOptionalParams, + NetworkInterfaceTapConfigurationsDeleteOptionalParams, + NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, + NetworkInterfaceTapConfigurationsGetOptionalParams, +} from "../../api/networkInterfaceTapConfigurations/options.js"; +import { NetworkInterfaceTapConfiguration } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkInterfaceTapConfigurations operations. */ +export interface NetworkInterfaceTapConfigurationsOperations { + /** Get all Tap configurations in a network interface. */ + list: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfaceTapConfigurationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified tap configuration from the NetworkInterface. */ + delete: ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a Tap configuration in the specified NetworkInterface. */ + createOrUpdate: ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + tapConfigurationParameters: NetworkInterfaceTapConfiguration, + options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, + ) => PollerLike< + OperationState, + NetworkInterfaceTapConfiguration + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + tapConfigurationParameters: NetworkInterfaceTapConfiguration, + options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + NetworkInterfaceTapConfiguration + > + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + tapConfigurationParameters: NetworkInterfaceTapConfiguration, + options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get the specified tap configuration on a network interface. */ + get: ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options?: NetworkInterfaceTapConfigurationsGetOptionalParams, + ) => Promise; +} + +function _getNetworkInterfaceTapConfigurations(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfaceTapConfigurationsListOptionalParams, + ) => list(context, resourceGroupName, networkInterfaceName, options), + delete: ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkInterfaceName, tapConfigurationName, options), + beginDelete: async ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkInterfaceName, + tapConfigurationName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkInterfaceName, + tapConfigurationName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + tapConfigurationParameters: NetworkInterfaceTapConfiguration, + options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkInterfaceName, + tapConfigurationName, + tapConfigurationParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + tapConfigurationParameters: NetworkInterfaceTapConfiguration, + options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkInterfaceName, + tapConfigurationName, + tapConfigurationParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + tapConfigurationParameters: NetworkInterfaceTapConfiguration, + options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkInterfaceName, + tapConfigurationName, + tapConfigurationParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + networkInterfaceName: string, + tapConfigurationName: string, + options?: NetworkInterfaceTapConfigurationsGetOptionalParams, + ) => get(context, resourceGroupName, networkInterfaceName, tapConfigurationName, options), + }; +} + +export function _getNetworkInterfaceTapConfigurationsOperations( + context: NetworkManagementContext, +): NetworkInterfaceTapConfigurationsOperations { + return { + ..._getNetworkInterfaceTapConfigurations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkInterfaces/index.ts b/sdk/network/arm-network/src/classic/networkInterfaces/index.ts new file mode 100644 index 000000000000..d334dc6d9aa8 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkInterfaces/index.ts @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listVirtualMachineScaleSetNetworkInterfaces, + listCloudServiceNetworkInterfaces, + listVirtualMachineScaleSetIpConfigurations, + getVirtualMachineScaleSetIpConfiguration, + listEffectiveNetworkSecurityGroups, + getEffectiveRouteTable, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, + listVirtualMachineScaleSetVMNetworkInterfaces, + getVirtualMachineScaleSetNetworkInterface, + listCloudServiceRoleInstanceNetworkInterfaces, + getCloudServiceNetworkInterface, +} from "../../api/networkInterfaces/operations.js"; +import { + NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, + NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, + NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, + NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams, + NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, + NetworkInterfacesGetEffectiveRouteTableOptionalParams, + NetworkInterfacesListAllOptionalParams, + NetworkInterfacesListOptionalParams, + NetworkInterfacesDeleteOptionalParams, + NetworkInterfacesUpdateTagsOptionalParams, + NetworkInterfacesCreateOrUpdateOptionalParams, + NetworkInterfacesGetOptionalParams, + NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, + NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams, + NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, + NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams, +} from "../../api/networkInterfaces/options.js"; +import { NetworkInterfaceIPConfiguration, NetworkInterface } from "../../models/common/models.js"; +import { + TagsObject, + EffectiveRouteListResult, + EffectiveNetworkSecurityGroupListResult, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkInterfaces operations. */ +export interface NetworkInterfacesOperations { + /** Gets all network interfaces in a virtual machine scale set. */ + listVirtualMachineScaleSetNetworkInterfaces: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + options?: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all network interfaces in a cloud service. */ + listCloudServiceNetworkInterfaces: ( + resourceGroupName: string, + cloudServiceName: string, + options?: NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get the specified network interface ip configuration in a virtual machine scale set. */ + listVirtualMachineScaleSetIpConfigurations: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + options?: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get the specified network interface ip configuration in a virtual machine scale set. */ + getVirtualMachineScaleSetIpConfiguration: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + options?: NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams, + ) => Promise; + /** Gets all network security groups applied to a network interface. */ + listEffectiveNetworkSecurityGroups: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, + ) => PollerLike< + OperationState, + EffectiveNetworkSecurityGroupListResult + >; + /** @deprecated use listEffectiveNetworkSecurityGroups instead */ + beginListEffectiveNetworkSecurityGroups: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + EffectiveNetworkSecurityGroupListResult + > + >; + /** @deprecated use listEffectiveNetworkSecurityGroups instead */ + beginListEffectiveNetworkSecurityGroupsAndWait: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, + ) => Promise; + /** Gets all route tables applied to a network interface. */ + getEffectiveRouteTable: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams, + ) => PollerLike, EffectiveRouteListResult>; + /** @deprecated use getEffectiveRouteTable instead */ + beginGetEffectiveRouteTable: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams, + ) => Promise< + SimplePollerLike, EffectiveRouteListResult> + >; + /** @deprecated use getEffectiveRouteTable instead */ + beginGetEffectiveRouteTableAndWait: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams, + ) => Promise; + /** Gets all network interfaces in a subscription. */ + listAll: ( + options?: NetworkInterfacesListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all network interfaces in a resource group. */ + list: ( + resourceGroupName: string, + options?: NetworkInterfacesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified network interface. */ + delete: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams, + ) => Promise; + /** Updates a network interface tags. */ + updateTags: ( + resourceGroupName: string, + networkInterfaceName: string, + parameters: TagsObject, + options?: NetworkInterfacesUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a network interface. */ + createOrUpdate: ( + resourceGroupName: string, + networkInterfaceName: string, + parameters: NetworkInterface, + options?: NetworkInterfacesCreateOrUpdateOptionalParams, + ) => PollerLike, NetworkInterface>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkInterfaceName: string, + parameters: NetworkInterface, + options?: NetworkInterfacesCreateOrUpdateOptionalParams, + ) => Promise, NetworkInterface>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkInterfaceName: string, + parameters: NetworkInterface, + options?: NetworkInterfacesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets information about the specified network interface. */ + get: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetOptionalParams, + ) => Promise; + /** Gets information about all network interfaces in a virtual machine in a virtual machine scale set. */ + listVirtualMachineScaleSetVMNetworkInterfaces: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + options?: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get the specified network interface in a virtual machine scale set. */ + getVirtualMachineScaleSetNetworkInterface: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams, + ) => Promise; + /** Gets information about all network interfaces in a role instance in a cloud service. */ + listCloudServiceRoleInstanceNetworkInterfaces: ( + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + options?: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get the specified network interface in a cloud service. */ + getCloudServiceNetworkInterface: ( + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams, + ) => Promise; +} + +function _getNetworkInterfaces(context: NetworkManagementContext) { + return { + listVirtualMachineScaleSetNetworkInterfaces: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + options?: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, + ) => + listVirtualMachineScaleSetNetworkInterfaces( + context, + resourceGroupName, + virtualMachineScaleSetName, + options, + ), + listCloudServiceNetworkInterfaces: ( + resourceGroupName: string, + cloudServiceName: string, + options?: NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, + ) => listCloudServiceNetworkInterfaces(context, resourceGroupName, cloudServiceName, options), + listVirtualMachineScaleSetIpConfigurations: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + options?: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, + ) => + listVirtualMachineScaleSetIpConfigurations( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + networkInterfaceName, + options, + ), + getVirtualMachineScaleSetIpConfiguration: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + options?: NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams, + ) => + getVirtualMachineScaleSetIpConfiguration( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + networkInterfaceName, + ipConfigurationName, + options, + ), + listEffectiveNetworkSecurityGroups: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, + ) => + listEffectiveNetworkSecurityGroups(context, resourceGroupName, networkInterfaceName, options), + beginListEffectiveNetworkSecurityGroups: async ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, + ) => { + const poller = listEffectiveNetworkSecurityGroups( + context, + resourceGroupName, + networkInterfaceName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListEffectiveNetworkSecurityGroupsAndWait: async ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, + ) => { + return await listEffectiveNetworkSecurityGroups( + context, + resourceGroupName, + networkInterfaceName, + options, + ); + }, + getEffectiveRouteTable: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams, + ) => getEffectiveRouteTable(context, resourceGroupName, networkInterfaceName, options), + beginGetEffectiveRouteTable: async ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams, + ) => { + const poller = getEffectiveRouteTable( + context, + resourceGroupName, + networkInterfaceName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetEffectiveRouteTableAndWait: async ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams, + ) => { + return await getEffectiveRouteTable( + context, + resourceGroupName, + networkInterfaceName, + options, + ); + }, + listAll: (options?: NetworkInterfacesListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: NetworkInterfacesListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkInterfaceName, options), + beginDelete: async ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, networkInterfaceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, networkInterfaceName, options); + }, + updateTags: ( + resourceGroupName: string, + networkInterfaceName: string, + parameters: TagsObject, + options?: NetworkInterfacesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, networkInterfaceName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + networkInterfaceName: string, + parameters: NetworkInterface, + options?: NetworkInterfacesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, networkInterfaceName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkInterfaceName: string, + parameters: NetworkInterface, + options?: NetworkInterfacesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkInterfaceName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkInterfaceName: string, + parameters: NetworkInterface, + options?: NetworkInterfacesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkInterfaceName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetOptionalParams, + ) => get(context, resourceGroupName, networkInterfaceName, options), + listVirtualMachineScaleSetVMNetworkInterfaces: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + options?: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, + ) => + listVirtualMachineScaleSetVMNetworkInterfaces( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + options, + ), + getVirtualMachineScaleSetNetworkInterface: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams, + ) => + getVirtualMachineScaleSetNetworkInterface( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + networkInterfaceName, + options, + ), + listCloudServiceRoleInstanceNetworkInterfaces: ( + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + options?: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, + ) => + listCloudServiceRoleInstanceNetworkInterfaces( + context, + resourceGroupName, + cloudServiceName, + roleInstanceName, + options, + ), + getCloudServiceNetworkInterface: ( + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams, + ) => + getCloudServiceNetworkInterface( + context, + resourceGroupName, + cloudServiceName, + roleInstanceName, + networkInterfaceName, + options, + ), + }; +} + +export function _getNetworkInterfacesOperations( + context: NetworkManagementContext, +): NetworkInterfacesOperations { + return { + ..._getNetworkInterfaces(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkManagerCommits/index.ts b/sdk/network/arm-network/src/classic/networkManagerCommits/index.ts new file mode 100644 index 000000000000..6642203f9e9d --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkManagerCommits/index.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { post } from "../../api/networkManagerCommits/operations.js"; +import { NetworkManagerCommitsPostOptionalParams } from "../../api/networkManagerCommits/options.js"; +import { NetworkManagerCommit } from "../../models/microsoft/network/models.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkManagerCommits operations. */ +export interface NetworkManagerCommitsOperations { + /** Post a Network Manager Commit. */ + post: ( + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerCommit, + options?: NetworkManagerCommitsPostOptionalParams, + ) => PollerLike, NetworkManagerCommit>; + /** @deprecated use post instead */ + beginPost: ( + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerCommit, + options?: NetworkManagerCommitsPostOptionalParams, + ) => Promise, NetworkManagerCommit>>; + /** @deprecated use post instead */ + beginPostAndWait: ( + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerCommit, + options?: NetworkManagerCommitsPostOptionalParams, + ) => Promise; +} + +function _getNetworkManagerCommits(context: NetworkManagementContext) { + return { + post: ( + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerCommit, + options?: NetworkManagerCommitsPostOptionalParams, + ) => post(context, resourceGroupName, networkManagerName, parameters, options), + beginPost: async ( + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerCommit, + options?: NetworkManagerCommitsPostOptionalParams, + ) => { + const poller = post(context, resourceGroupName, networkManagerName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginPostAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerCommit, + options?: NetworkManagerCommitsPostOptionalParams, + ) => { + return await post(context, resourceGroupName, networkManagerName, parameters, options); + }, + }; +} + +export function _getNetworkManagerCommitsOperations( + context: NetworkManagementContext, +): NetworkManagerCommitsOperations { + return { + ..._getNetworkManagerCommits(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkManagerDeploymentStatus/index.ts b/sdk/network/arm-network/src/classic/networkManagerDeploymentStatus/index.ts new file mode 100644 index 000000000000..7475031f5ea4 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkManagerDeploymentStatus/index.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/networkManagerDeploymentStatus/operations.js"; +import { NetworkManagerDeploymentStatusListOptionalParams } from "../../api/networkManagerDeploymentStatus/options.js"; +import { + NetworkManagerDeploymentStatusParameter, + NetworkManagerDeploymentStatusListResult, +} from "../../models/microsoft/network/models.js"; + +/** Interface representing a NetworkManagerDeploymentStatus operations. */ +export interface NetworkManagerDeploymentStatusOperations { + /** Post to List of Network Manager Deployment Status. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerDeploymentStatusParameter, + options?: NetworkManagerDeploymentStatusListOptionalParams, + ) => Promise; +} + +function _getNetworkManagerDeploymentStatus(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManagerDeploymentStatusParameter, + options?: NetworkManagerDeploymentStatusListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, parameters, options), + }; +} + +export function _getNetworkManagerDeploymentStatusOperations( + context: NetworkManagementContext, +): NetworkManagerDeploymentStatusOperations { + return { + ..._getNetworkManagerDeploymentStatus(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkManagerRoutingConfigurations/index.ts b/sdk/network/arm-network/src/classic/networkManagerRoutingConfigurations/index.ts new file mode 100644 index 000000000000..2b8d1ef01229 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkManagerRoutingConfigurations/index.ts @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/networkManagerRoutingConfigurations/operations.js"; +import { + NetworkManagerRoutingConfigurationsListOptionalParams, + NetworkManagerRoutingConfigurationsDeleteOptionalParams, + NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams, + NetworkManagerRoutingConfigurationsGetOptionalParams, +} from "../../api/networkManagerRoutingConfigurations/options.js"; +import { NetworkManagerRoutingConfiguration } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkManagerRoutingConfigurations operations. */ +export interface NetworkManagerRoutingConfigurationsOperations { + /** Lists all the network manager routing configurations in a network manager, in a paginated format. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkManagerRoutingConfigurationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a network manager routing configuration. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a network manager routing configuration. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + routingConfiguration: NetworkManagerRoutingConfiguration, + options?: NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves a network manager routing configuration. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: NetworkManagerRoutingConfigurationsGetOptionalParams, + ) => Promise; +} + +function _getNetworkManagerRoutingConfigurations(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkManagerRoutingConfigurationsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkManagerName, configurationName, options), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + routingConfiguration: NetworkManagerRoutingConfiguration, + options?: NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + configurationName, + routingConfiguration, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: NetworkManagerRoutingConfigurationsGetOptionalParams, + ) => get(context, resourceGroupName, networkManagerName, configurationName, options), + }; +} + +export function _getNetworkManagerRoutingConfigurationsOperations( + context: NetworkManagementContext, +): NetworkManagerRoutingConfigurationsOperations { + return { + ..._getNetworkManagerRoutingConfigurations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkManagers/index.ts b/sdk/network/arm-network/src/classic/networkManagers/index.ts new file mode 100644 index 000000000000..d63b2d20d1f4 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkManagers/index.ts @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listBySubscription, + list, + $delete, + patch, + createOrUpdate, + get, +} from "../../api/networkManagers/operations.js"; +import { + NetworkManagersListBySubscriptionOptionalParams, + NetworkManagersListOptionalParams, + NetworkManagersDeleteOptionalParams, + NetworkManagersPatchOptionalParams, + NetworkManagersCreateOrUpdateOptionalParams, + NetworkManagersGetOptionalParams, +} from "../../api/networkManagers/options.js"; +import { NetworkManager, PatchObject } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkManagers operations. */ +export interface NetworkManagersOperations { + /** List all network managers in a subscription. */ + listBySubscription: ( + options?: NetworkManagersListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** List network managers in a resource group. */ + list: ( + resourceGroupName: string, + options?: NetworkManagersListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a network manager. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkManagersDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkManagersDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkManagersDeleteOptionalParams, + ) => Promise; + /** Patch NetworkManager. */ + patch: ( + resourceGroupName: string, + networkManagerName: string, + parameters: PatchObject, + options?: NetworkManagersPatchOptionalParams, + ) => Promise; + /** Creates or updates a Network Manager. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManager, + options?: NetworkManagersCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified Network Manager. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkManagersGetOptionalParams, + ) => Promise; +} + +function _getNetworkManagers(context: NetworkManagementContext) { + return { + listBySubscription: (options?: NetworkManagersListBySubscriptionOptionalParams) => + listBySubscription(context, options), + list: (resourceGroupName: string, options?: NetworkManagersListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkManagersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkManagerName, options), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkManagersDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, networkManagerName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkManagersDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, networkManagerName, options); + }, + patch: ( + resourceGroupName: string, + networkManagerName: string, + parameters: PatchObject, + options?: NetworkManagersPatchOptionalParams, + ) => patch(context, resourceGroupName, networkManagerName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + parameters: NetworkManager, + options?: NetworkManagersCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, networkManagerName, parameters, options), + get: ( + resourceGroupName: string, + networkManagerName: string, + options?: NetworkManagersGetOptionalParams, + ) => get(context, resourceGroupName, networkManagerName, options), + }; +} + +export function _getNetworkManagersOperations( + context: NetworkManagementContext, +): NetworkManagersOperations { + return { + ..._getNetworkManagers(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkProfiles/index.ts b/sdk/network/arm-network/src/classic/networkProfiles/index.ts new file mode 100644 index 000000000000..342e878e1f37 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkProfiles/index.ts @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/networkProfiles/operations.js"; +import { + NetworkProfilesListAllOptionalParams, + NetworkProfilesListOptionalParams, + NetworkProfilesDeleteOptionalParams, + NetworkProfilesUpdateTagsOptionalParams, + NetworkProfilesCreateOrUpdateOptionalParams, + NetworkProfilesGetOptionalParams, +} from "../../api/networkProfiles/options.js"; +import { TagsObject, NetworkProfile } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkProfiles operations. */ +export interface NetworkProfilesOperations { + /** Gets all the network profiles in a subscription. */ + listAll: ( + options?: NetworkProfilesListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all network profiles in a resource group. */ + list: ( + resourceGroupName: string, + options?: NetworkProfilesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified network profile. */ + delete: ( + resourceGroupName: string, + networkProfileName: string, + options?: NetworkProfilesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkProfileName: string, + options?: NetworkProfilesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkProfileName: string, + options?: NetworkProfilesDeleteOptionalParams, + ) => Promise; + /** Updates network profile tags. */ + updateTags: ( + resourceGroupName: string, + networkProfileName: string, + parameters: TagsObject, + options?: NetworkProfilesUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a network profile. */ + createOrUpdate: ( + resourceGroupName: string, + networkProfileName: string, + parameters: NetworkProfile, + options?: NetworkProfilesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified network profile in a specified resource group. */ + get: ( + resourceGroupName: string, + networkProfileName: string, + options?: NetworkProfilesGetOptionalParams, + ) => Promise; +} + +function _getNetworkProfiles(context: NetworkManagementContext) { + return { + listAll: (options?: NetworkProfilesListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: NetworkProfilesListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + networkProfileName: string, + options?: NetworkProfilesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkProfileName, options), + beginDelete: async ( + resourceGroupName: string, + networkProfileName: string, + options?: NetworkProfilesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, networkProfileName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkProfileName: string, + options?: NetworkProfilesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, networkProfileName, options); + }, + updateTags: ( + resourceGroupName: string, + networkProfileName: string, + parameters: TagsObject, + options?: NetworkProfilesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, networkProfileName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + networkProfileName: string, + parameters: NetworkProfile, + options?: NetworkProfilesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, networkProfileName, parameters, options), + get: ( + resourceGroupName: string, + networkProfileName: string, + options?: NetworkProfilesGetOptionalParams, + ) => get(context, resourceGroupName, networkProfileName, options), + }; +} + +export function _getNetworkProfilesOperations( + context: NetworkManagementContext, +): NetworkProfilesOperations { + return { + ..._getNetworkProfiles(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkSecurityGroups/index.ts b/sdk/network/arm-network/src/classic/networkSecurityGroups/index.ts new file mode 100644 index 000000000000..ecc7ec4d515e --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkSecurityGroups/index.ts @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/networkSecurityGroups/operations.js"; +import { + NetworkSecurityGroupsListAllOptionalParams, + NetworkSecurityGroupsListOptionalParams, + NetworkSecurityGroupsDeleteOptionalParams, + NetworkSecurityGroupsUpdateTagsOptionalParams, + NetworkSecurityGroupsCreateOrUpdateOptionalParams, + NetworkSecurityGroupsGetOptionalParams, +} from "../../api/networkSecurityGroups/options.js"; +import { NetworkSecurityGroup } from "../../models/common/models.js"; +import { TagsObject } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkSecurityGroups operations. */ +export interface NetworkSecurityGroupsOperations { + /** Gets all network security groups in a subscription. */ + listAll: ( + options?: NetworkSecurityGroupsListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all network security groups in a resource group. */ + list: ( + resourceGroupName: string, + options?: NetworkSecurityGroupsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified network security group. */ + delete: ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: NetworkSecurityGroupsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: NetworkSecurityGroupsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: NetworkSecurityGroupsDeleteOptionalParams, + ) => Promise; + /** Updates a network security group tags. */ + updateTags: ( + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: TagsObject, + options?: NetworkSecurityGroupsUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a network security group in the specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: NetworkSecurityGroup, + options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams, + ) => PollerLike, NetworkSecurityGroup>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: NetworkSecurityGroup, + options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams, + ) => Promise, NetworkSecurityGroup>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: NetworkSecurityGroup, + options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified network security group. */ + get: ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: NetworkSecurityGroupsGetOptionalParams, + ) => Promise; +} + +function _getNetworkSecurityGroups(context: NetworkManagementContext) { + return { + listAll: (options?: NetworkSecurityGroupsListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: NetworkSecurityGroupsListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: NetworkSecurityGroupsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkSecurityGroupName, options), + beginDelete: async ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: NetworkSecurityGroupsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, networkSecurityGroupName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: NetworkSecurityGroupsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, networkSecurityGroupName, options); + }, + updateTags: ( + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: TagsObject, + options?: NetworkSecurityGroupsUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, networkSecurityGroupName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: NetworkSecurityGroup, + options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, networkSecurityGroupName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: NetworkSecurityGroup, + options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkSecurityGroupName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkSecurityGroupName: string, + parameters: NetworkSecurityGroup, + options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkSecurityGroupName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: NetworkSecurityGroupsGetOptionalParams, + ) => get(context, resourceGroupName, networkSecurityGroupName, options), + }; +} + +export function _getNetworkSecurityGroupsOperations( + context: NetworkManagementContext, +): NetworkSecurityGroupsOperations { + return { + ..._getNetworkSecurityGroups(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkSecurityPerimeterAccessRules/index.ts b/sdk/network/arm-network/src/classic/networkSecurityPerimeterAccessRules/index.ts new file mode 100644 index 000000000000..efaa6e7c8889 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkSecurityPerimeterAccessRules/index.ts @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + reconcile, + list, + $delete, + createOrUpdate, + get, +} from "../../api/networkSecurityPerimeterAccessRules/operations.js"; +import { + NetworkSecurityPerimeterAccessRulesReconcileOptionalParams, + NetworkSecurityPerimeterAccessRulesListOptionalParams, + NetworkSecurityPerimeterAccessRulesDeleteOptionalParams, + NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterAccessRulesGetOptionalParams, +} from "../../api/networkSecurityPerimeterAccessRules/options.js"; +import { NspAccessRule } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a NetworkSecurityPerimeterAccessRules operations. */ +export interface NetworkSecurityPerimeterAccessRulesOperations { + /** Reconcile NSP access rules */ + reconcile: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + parameters: Record, + options?: NetworkSecurityPerimeterAccessRulesReconcileOptionalParams, + ) => Promise>; + /** Lists the NSP access rules in the specified NSP profile. */ + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options?: NetworkSecurityPerimeterAccessRulesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an NSP access rule. */ + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + options?: NetworkSecurityPerimeterAccessRulesDeleteOptionalParams, + ) => Promise; + /** Creates or updates a network access rule. */ + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + parameters: NspAccessRule, + options?: NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified NSP access rule by name. */ + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + options?: NetworkSecurityPerimeterAccessRulesGetOptionalParams, + ) => Promise; +} + +function _getNetworkSecurityPerimeterAccessRules(context: NetworkManagementContext) { + return { + reconcile: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + parameters: Record, + options?: NetworkSecurityPerimeterAccessRulesReconcileOptionalParams, + ) => + reconcile( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + accessRuleName, + parameters, + options, + ), + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options?: NetworkSecurityPerimeterAccessRulesListOptionalParams, + ) => list(context, resourceGroupName, networkSecurityPerimeterName, profileName, options), + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + options?: NetworkSecurityPerimeterAccessRulesDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + accessRuleName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + parameters: NspAccessRule, + options?: NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + accessRuleName, + parameters, + options, + ), + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + accessRuleName: string, + options?: NetworkSecurityPerimeterAccessRulesGetOptionalParams, + ) => + get( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + accessRuleName, + options, + ), + }; +} + +export function _getNetworkSecurityPerimeterAccessRulesOperations( + context: NetworkManagementContext, +): NetworkSecurityPerimeterAccessRulesOperations { + return { + ..._getNetworkSecurityPerimeterAccessRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkSecurityPerimeterAssociableResourceTypes/index.ts b/sdk/network/arm-network/src/classic/networkSecurityPerimeterAssociableResourceTypes/index.ts new file mode 100644 index 000000000000..79a54a3f04db --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkSecurityPerimeterAssociableResourceTypes/index.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/networkSecurityPerimeterAssociableResourceTypes/operations.js"; +import { NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams } from "../../api/networkSecurityPerimeterAssociableResourceTypes/options.js"; +import { PerimeterAssociableResource } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a NetworkSecurityPerimeterAssociableResourceTypes operations. */ +export interface NetworkSecurityPerimeterAssociableResourceTypesOperations { + /** Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter */ + list: ( + location: string, + options?: NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getNetworkSecurityPerimeterAssociableResourceTypes(context: NetworkManagementContext) { + return { + list: ( + location: string, + options?: NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams, + ) => list(context, location, options), + }; +} + +export function _getNetworkSecurityPerimeterAssociableResourceTypesOperations( + context: NetworkManagementContext, +): NetworkSecurityPerimeterAssociableResourceTypesOperations { + return { + ..._getNetworkSecurityPerimeterAssociableResourceTypes(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkSecurityPerimeterAssociations/index.ts b/sdk/network/arm-network/src/classic/networkSecurityPerimeterAssociations/index.ts new file mode 100644 index 000000000000..52670a756211 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkSecurityPerimeterAssociations/index.ts @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + reconcile, + list, + $delete, + createOrUpdate, + get, +} from "../../api/networkSecurityPerimeterAssociations/operations.js"; +import { + NetworkSecurityPerimeterAssociationsReconcileOptionalParams, + NetworkSecurityPerimeterAssociationsListOptionalParams, + NetworkSecurityPerimeterAssociationsDeleteOptionalParams, + NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterAssociationsGetOptionalParams, +} from "../../api/networkSecurityPerimeterAssociations/options.js"; +import { NspAssociation } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkSecurityPerimeterAssociations operations. */ +export interface NetworkSecurityPerimeterAssociationsOperations { + /** Reconcile NSP association */ + reconcile: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: Record, + options?: NetworkSecurityPerimeterAssociationsReconcileOptionalParams, + ) => Promise>; + /** Lists the NSP resource associations. */ + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimeterAssociationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an NSP association resource. */ + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a NSP resource association. */ + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: NspAssociation, + options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, + ) => PollerLike, NspAssociation>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: NspAssociation, + options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, + ) => Promise, NspAssociation>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: NspAssociation, + options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified NSP association by name. */ + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options?: NetworkSecurityPerimeterAssociationsGetOptionalParams, + ) => Promise; +} + +function _getNetworkSecurityPerimeterAssociations(context: NetworkManagementContext) { + return { + reconcile: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: Record, + options?: NetworkSecurityPerimeterAssociationsReconcileOptionalParams, + ) => + reconcile( + context, + resourceGroupName, + networkSecurityPerimeterName, + associationName, + parameters, + options, + ), + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimeterAssociationsListOptionalParams, + ) => list(context, resourceGroupName, networkSecurityPerimeterName, options), + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, networkSecurityPerimeterName, associationName, options), + beginDelete: async ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkSecurityPerimeterName, + associationName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkSecurityPerimeterName, + associationName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: NspAssociation, + options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkSecurityPerimeterName, + associationName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: NspAssociation, + options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkSecurityPerimeterName, + associationName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + parameters: NspAssociation, + options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkSecurityPerimeterName, + associationName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + associationName: string, + options?: NetworkSecurityPerimeterAssociationsGetOptionalParams, + ) => get(context, resourceGroupName, networkSecurityPerimeterName, associationName, options), + }; +} + +export function _getNetworkSecurityPerimeterAssociationsOperations( + context: NetworkManagementContext, +): NetworkSecurityPerimeterAssociationsOperations { + return { + ..._getNetworkSecurityPerimeterAssociations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkSecurityPerimeterLinkReferences/index.ts b/sdk/network/arm-network/src/classic/networkSecurityPerimeterLinkReferences/index.ts new file mode 100644 index 000000000000..0e7d16f3fe7f --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkSecurityPerimeterLinkReferences/index.ts @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, get } from "../../api/networkSecurityPerimeterLinkReferences/operations.js"; +import { + NetworkSecurityPerimeterLinkReferencesListOptionalParams, + NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, + NetworkSecurityPerimeterLinkReferencesGetOptionalParams, +} from "../../api/networkSecurityPerimeterLinkReferences/options.js"; +import { NspLinkReference } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkSecurityPerimeterLinkReferences operations. */ +export interface NetworkSecurityPerimeterLinkReferencesOperations { + /** Lists the NSP LinkReference resources in the specified network security perimeter. */ + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimeterLinkReferencesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an NSP LinkReference resource. */ + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, + ) => Promise; + /** Gets the specified NSP linkReference resource. */ + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options?: NetworkSecurityPerimeterLinkReferencesGetOptionalParams, + ) => Promise; +} + +function _getNetworkSecurityPerimeterLinkReferences(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimeterLinkReferencesListOptionalParams, + ) => list(context, resourceGroupName, networkSecurityPerimeterName, options), + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, networkSecurityPerimeterName, linkReferenceName, options), + beginDelete: async ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkSecurityPerimeterName, + linkReferenceName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkSecurityPerimeterName, + linkReferenceName, + options, + ); + }, + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkReferenceName: string, + options?: NetworkSecurityPerimeterLinkReferencesGetOptionalParams, + ) => get(context, resourceGroupName, networkSecurityPerimeterName, linkReferenceName, options), + }; +} + +export function _getNetworkSecurityPerimeterLinkReferencesOperations( + context: NetworkManagementContext, +): NetworkSecurityPerimeterLinkReferencesOperations { + return { + ..._getNetworkSecurityPerimeterLinkReferences(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkSecurityPerimeterLinks/index.ts b/sdk/network/arm-network/src/classic/networkSecurityPerimeterLinks/index.ts new file mode 100644 index 000000000000..d2cde31432eb --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkSecurityPerimeterLinks/index.ts @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/networkSecurityPerimeterLinks/operations.js"; +import { + NetworkSecurityPerimeterLinksListOptionalParams, + NetworkSecurityPerimeterLinksDeleteOptionalParams, + NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterLinksGetOptionalParams, +} from "../../api/networkSecurityPerimeterLinks/options.js"; +import { NspLink } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkSecurityPerimeterLinks operations. */ +export interface NetworkSecurityPerimeterLinksOperations { + /** Lists the NSP Link resources in the specified network security perimeter. */ + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimeterLinksListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an NSP Link resource. */ + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options?: NetworkSecurityPerimeterLinksDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options?: NetworkSecurityPerimeterLinksDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options?: NetworkSecurityPerimeterLinksDeleteOptionalParams, + ) => Promise; + /** Creates or updates NSP link resource. */ + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + parameters: NspLink, + options?: NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified NSP link resource. */ + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options?: NetworkSecurityPerimeterLinksGetOptionalParams, + ) => Promise; +} + +function _getNetworkSecurityPerimeterLinks(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimeterLinksListOptionalParams, + ) => list(context, resourceGroupName, networkSecurityPerimeterName, options), + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options?: NetworkSecurityPerimeterLinksDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkSecurityPerimeterName, linkName, options), + beginDelete: async ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options?: NetworkSecurityPerimeterLinksDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkSecurityPerimeterName, + linkName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options?: NetworkSecurityPerimeterLinksDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkSecurityPerimeterName, + linkName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + parameters: NspLink, + options?: NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkSecurityPerimeterName, + linkName, + parameters, + options, + ), + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + linkName: string, + options?: NetworkSecurityPerimeterLinksGetOptionalParams, + ) => get(context, resourceGroupName, networkSecurityPerimeterName, linkName, options), + }; +} + +export function _getNetworkSecurityPerimeterLinksOperations( + context: NetworkManagementContext, +): NetworkSecurityPerimeterLinksOperations { + return { + ..._getNetworkSecurityPerimeterLinks(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkSecurityPerimeterLoggingConfigurations/index.ts b/sdk/network/arm-network/src/classic/networkSecurityPerimeterLoggingConfigurations/index.ts new file mode 100644 index 000000000000..2cc6dd1e6696 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkSecurityPerimeterLoggingConfigurations/index.ts @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/networkSecurityPerimeterLoggingConfigurations/operations.js"; +import { + NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams, +} from "../../api/networkSecurityPerimeterLoggingConfigurations/options.js"; +import { NspLoggingConfiguration } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a NetworkSecurityPerimeterLoggingConfigurations operations. */ +export interface NetworkSecurityPerimeterLoggingConfigurationsOperations { + /** Lists the NSP logging configuration. */ + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an NSP Logging configuration. */ + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + options?: NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams, + ) => Promise; + /** Creates or updates NSP logging configuration. */ + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + parameters: NspLoggingConfiguration, + options?: NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the NSP logging configuration. */ + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + options?: NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams, + ) => Promise; +} + +function _getNetworkSecurityPerimeterLoggingConfigurations(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, + ) => list(context, resourceGroupName, networkSecurityPerimeterName, options), + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + options?: NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + networkSecurityPerimeterName, + loggingConfigurationName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + parameters: NspLoggingConfiguration, + options?: NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkSecurityPerimeterName, + loggingConfigurationName, + parameters, + options, + ), + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + loggingConfigurationName: string, + options?: NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams, + ) => + get( + context, + resourceGroupName, + networkSecurityPerimeterName, + loggingConfigurationName, + options, + ), + }; +} + +export function _getNetworkSecurityPerimeterLoggingConfigurationsOperations( + context: NetworkManagementContext, +): NetworkSecurityPerimeterLoggingConfigurationsOperations { + return { + ..._getNetworkSecurityPerimeterLoggingConfigurations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkSecurityPerimeterOperationStatuses/index.ts b/sdk/network/arm-network/src/classic/networkSecurityPerimeterOperationStatuses/index.ts new file mode 100644 index 000000000000..c7a03d7bde42 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkSecurityPerimeterOperationStatuses/index.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { get } from "../../api/networkSecurityPerimeterOperationStatuses/operations.js"; +import { NetworkSecurityPerimeterOperationStatusesGetOptionalParams } from "../../api/networkSecurityPerimeterOperationStatuses/options.js"; +import { OperationStatusResult } from "../../models/models.js"; + +/** Interface representing a NetworkSecurityPerimeterOperationStatuses operations. */ +export interface NetworkSecurityPerimeterOperationStatusesOperations { + /** Gets the operation status for the given operation id. */ + get: ( + location: string, + operationId: string, + options?: NetworkSecurityPerimeterOperationStatusesGetOptionalParams, + ) => Promise; +} + +function _getNetworkSecurityPerimeterOperationStatuses(context: NetworkManagementContext) { + return { + get: ( + location: string, + operationId: string, + options?: NetworkSecurityPerimeterOperationStatusesGetOptionalParams, + ) => get(context, location, operationId, options), + }; +} + +export function _getNetworkSecurityPerimeterOperationStatusesOperations( + context: NetworkManagementContext, +): NetworkSecurityPerimeterOperationStatusesOperations { + return { + ..._getNetworkSecurityPerimeterOperationStatuses(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkSecurityPerimeterProfiles/index.ts b/sdk/network/arm-network/src/classic/networkSecurityPerimeterProfiles/index.ts new file mode 100644 index 000000000000..40edf269ad7b --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkSecurityPerimeterProfiles/index.ts @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/networkSecurityPerimeterProfiles/operations.js"; +import { + NetworkSecurityPerimeterProfilesListOptionalParams, + NetworkSecurityPerimeterProfilesDeleteOptionalParams, + NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterProfilesGetOptionalParams, +} from "../../api/networkSecurityPerimeterProfiles/options.js"; +import { NspProfile } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a NetworkSecurityPerimeterProfiles operations. */ +export interface NetworkSecurityPerimeterProfilesOperations { + /** Lists the NSP profiles in the specified network security perimeter. */ + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimeterProfilesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an NSP profile. */ + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options?: NetworkSecurityPerimeterProfilesDeleteOptionalParams, + ) => Promise; + /** Creates or updates a network profile. */ + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + parameters: NspProfile, + options?: NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified NSP profile. */ + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options?: NetworkSecurityPerimeterProfilesGetOptionalParams, + ) => Promise; +} + +function _getNetworkSecurityPerimeterProfiles(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimeterProfilesListOptionalParams, + ) => list(context, resourceGroupName, networkSecurityPerimeterName, options), + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options?: NetworkSecurityPerimeterProfilesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkSecurityPerimeterName, profileName, options), + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + parameters: NspProfile, + options?: NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkSecurityPerimeterName, + profileName, + parameters, + options, + ), + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + profileName: string, + options?: NetworkSecurityPerimeterProfilesGetOptionalParams, + ) => get(context, resourceGroupName, networkSecurityPerimeterName, profileName, options), + }; +} + +export function _getNetworkSecurityPerimeterProfilesOperations( + context: NetworkManagementContext, +): NetworkSecurityPerimeterProfilesOperations { + return { + ..._getNetworkSecurityPerimeterProfiles(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkSecurityPerimeterServiceTags/index.ts b/sdk/network/arm-network/src/classic/networkSecurityPerimeterServiceTags/index.ts new file mode 100644 index 000000000000..eecc18782a68 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkSecurityPerimeterServiceTags/index.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/networkSecurityPerimeterServiceTags/operations.js"; +import { NetworkSecurityPerimeterServiceTagsListOptionalParams } from "../../api/networkSecurityPerimeterServiceTags/options.js"; +import { NspServiceTagsResource } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a NetworkSecurityPerimeterServiceTags operations. */ +export interface NetworkSecurityPerimeterServiceTagsOperations { + /** Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. */ + list: ( + location: string, + options?: NetworkSecurityPerimeterServiceTagsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getNetworkSecurityPerimeterServiceTags(context: NetworkManagementContext) { + return { + list: (location: string, options?: NetworkSecurityPerimeterServiceTagsListOptionalParams) => + list(context, location, options), + }; +} + +export function _getNetworkSecurityPerimeterServiceTagsOperations( + context: NetworkManagementContext, +): NetworkSecurityPerimeterServiceTagsOperations { + return { + ..._getNetworkSecurityPerimeterServiceTags(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkSecurityPerimeters/index.ts b/sdk/network/arm-network/src/classic/networkSecurityPerimeters/index.ts new file mode 100644 index 000000000000..17a15264940b --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkSecurityPerimeters/index.ts @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listBySubscription, + list, + $delete, + patch, + createOrUpdate, + get, +} from "../../api/networkSecurityPerimeters/operations.js"; +import { + NetworkSecurityPerimetersListBySubscriptionOptionalParams, + NetworkSecurityPerimetersListOptionalParams, + NetworkSecurityPerimetersDeleteOptionalParams, + NetworkSecurityPerimetersPatchOptionalParams, + NetworkSecurityPerimetersCreateOrUpdateOptionalParams, + NetworkSecurityPerimetersGetOptionalParams, +} from "../../api/networkSecurityPerimeters/options.js"; +import { + NetworkSecurityPerimeter, + UpdateTagsRequest, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkSecurityPerimeters operations. */ +export interface NetworkSecurityPerimetersOperations { + /** List all network security perimeters in a subscription. */ + listBySubscription: ( + options?: NetworkSecurityPerimetersListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** List network security perimeters in a resource group. */ + list: ( + resourceGroupName: string, + options?: NetworkSecurityPerimetersListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a network security perimeter. */ + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimetersDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimetersDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimetersDeleteOptionalParams, + ) => Promise; + /** Patch Tags for a Network Security Perimeter. */ + patch: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + parameters: UpdateTagsRequest, + options?: NetworkSecurityPerimetersPatchOptionalParams, + ) => Promise; + /** Creates or updates a Network Security Perimeter. */ + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + parameters: NetworkSecurityPerimeter, + options?: NetworkSecurityPerimetersCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified network security perimeter by the name. */ + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimetersGetOptionalParams, + ) => Promise; +} + +function _getNetworkSecurityPerimeters(context: NetworkManagementContext) { + return { + listBySubscription: (options?: NetworkSecurityPerimetersListBySubscriptionOptionalParams) => + listBySubscription(context, options), + list: (resourceGroupName: string, options?: NetworkSecurityPerimetersListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimetersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkSecurityPerimeterName, options), + beginDelete: async ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimetersDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, networkSecurityPerimeterName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimetersDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, networkSecurityPerimeterName, options); + }, + patch: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + parameters: UpdateTagsRequest, + options?: NetworkSecurityPerimetersPatchOptionalParams, + ) => patch(context, resourceGroupName, networkSecurityPerimeterName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + parameters: NetworkSecurityPerimeter, + options?: NetworkSecurityPerimetersCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, networkSecurityPerimeterName, parameters, options), + get: ( + resourceGroupName: string, + networkSecurityPerimeterName: string, + options?: NetworkSecurityPerimetersGetOptionalParams, + ) => get(context, resourceGroupName, networkSecurityPerimeterName, options), + }; +} + +export function _getNetworkSecurityPerimetersOperations( + context: NetworkManagementContext, +): NetworkSecurityPerimetersOperations { + return { + ..._getNetworkSecurityPerimeters(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkVirtualApplianceConnections/index.ts b/sdk/network/arm-network/src/classic/networkVirtualApplianceConnections/index.ts new file mode 100644 index 000000000000..9eb3c587050f --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkVirtualApplianceConnections/index.ts @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + get, + createOrUpdate, +} from "../../api/networkVirtualApplianceConnections/operations.js"; +import { + NetworkVirtualApplianceConnectionsListOptionalParams, + NetworkVirtualApplianceConnectionsDeleteOptionalParams, + NetworkVirtualApplianceConnectionsGetOptionalParams, + NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, +} from "../../api/networkVirtualApplianceConnections/options.js"; +import { NetworkVirtualApplianceConnection } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkVirtualApplianceConnections operations. */ +export interface NetworkVirtualApplianceConnectionsOperations { + /** Lists NetworkVirtualApplianceConnections under the NVA. */ + list: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualApplianceConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a NVA connection. */ + delete: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams, + ) => Promise; + /** Retrieves the details of specified NVA connection. */ + get: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options?: NetworkVirtualApplianceConnectionsGetOptionalParams, + ) => Promise; + /** Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' */ + createOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, + options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, + ) => PollerLike< + OperationState, + NetworkVirtualApplianceConnection + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, + options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + NetworkVirtualApplianceConnection + > + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, + options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, + ) => Promise; +} + +function _getNetworkVirtualApplianceConnections(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualApplianceConnectionsListOptionalParams, + ) => list(context, resourceGroupName, networkVirtualApplianceName, options), + delete: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkVirtualApplianceName, connectionName, options), + beginDelete: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkVirtualApplianceName, + connectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkVirtualApplianceName, + connectionName, + options, + ); + }, + get: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + options?: NetworkVirtualApplianceConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, networkVirtualApplianceName, connectionName, options), + createOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, + options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkVirtualApplianceName, + connectionName, + networkVirtualApplianceConnectionParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, + options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkVirtualApplianceName, + connectionName, + networkVirtualApplianceConnectionParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + connectionName: string, + networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, + options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkVirtualApplianceName, + connectionName, + networkVirtualApplianceConnectionParameters, + options, + ); + }, + }; +} + +export function _getNetworkVirtualApplianceConnectionsOperations( + context: NetworkManagementContext, +): NetworkVirtualApplianceConnectionsOperations { + return { + ..._getNetworkVirtualApplianceConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkVirtualAppliances/index.ts b/sdk/network/arm-network/src/classic/networkVirtualAppliances/index.ts new file mode 100644 index 000000000000..a262cb96c2e9 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkVirtualAppliances/index.ts @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + getBootDiagnosticLogs, + reimage, + restart, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/networkVirtualAppliances/operations.js"; +import { + NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, + NetworkVirtualAppliancesReimageOptionalParams, + NetworkVirtualAppliancesRestartOptionalParams, + NetworkVirtualAppliancesListOptionalParams, + NetworkVirtualAppliancesListByResourceGroupOptionalParams, + NetworkVirtualAppliancesDeleteOptionalParams, + NetworkVirtualAppliancesUpdateTagsOptionalParams, + NetworkVirtualAppliancesCreateOrUpdateOptionalParams, + NetworkVirtualAppliancesGetOptionalParams, +} from "../../api/networkVirtualAppliances/options.js"; +import { + TagsObject, + NetworkVirtualAppliance, + NetworkVirtualApplianceInstanceIds, + NetworkVirtualApplianceBootDiagnosticParameters, + NetworkVirtualApplianceInstanceId, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkVirtualAppliances operations. */ +export interface NetworkVirtualAppliancesOperations { + /** Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance. */ + getBootDiagnosticLogs: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + request: NetworkVirtualApplianceBootDiagnosticParameters, + options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, + ) => PollerLike< + OperationState, + NetworkVirtualApplianceInstanceId + >; + /** @deprecated use getBootDiagnosticLogs instead */ + beginGetBootDiagnosticLogs: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + request: NetworkVirtualApplianceBootDiagnosticParameters, + options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + NetworkVirtualApplianceInstanceId + > + >; + /** @deprecated use getBootDiagnosticLogs instead */ + beginGetBootDiagnosticLogsAndWait: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + request: NetworkVirtualApplianceBootDiagnosticParameters, + options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, + ) => Promise; + /** Reimages one VM belonging to the specified Network Virtual Appliance. */ + reimage: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesReimageOptionalParams, + ) => PollerLike< + OperationState, + NetworkVirtualApplianceInstanceIds + >; + /** @deprecated use reimage instead */ + beginReimage: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesReimageOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + NetworkVirtualApplianceInstanceIds + > + >; + /** @deprecated use reimage instead */ + beginReimageAndWait: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesReimageOptionalParams, + ) => Promise; + /** Restarts one or more VMs belonging to the specified Network Virtual Appliance. */ + restart: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesRestartOptionalParams, + ) => PollerLike< + OperationState, + NetworkVirtualApplianceInstanceIds + >; + /** @deprecated use restart instead */ + beginRestart: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesRestartOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + NetworkVirtualApplianceInstanceIds + > + >; + /** @deprecated use restart instead */ + beginRestartAndWait: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesRestartOptionalParams, + ) => Promise; + /** Gets all Network Virtual Appliances in a subscription. */ + list: ( + options?: NetworkVirtualAppliancesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists all Network Virtual Appliances in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: NetworkVirtualAppliancesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Network Virtual Appliance. */ + delete: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesDeleteOptionalParams, + ) => Promise; + /** Updates a Network Virtual Appliance. */ + updateTags: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: TagsObject, + options?: NetworkVirtualAppliancesUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates the specified Network Virtual Appliance. */ + createOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: NetworkVirtualAppliance, + options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams, + ) => PollerLike, NetworkVirtualAppliance>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: NetworkVirtualAppliance, + options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams, + ) => Promise, NetworkVirtualAppliance>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: NetworkVirtualAppliance, + options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified Network Virtual Appliance. */ + get: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesGetOptionalParams, + ) => Promise; +} + +function _getNetworkVirtualAppliances(context: NetworkManagementContext) { + return { + getBootDiagnosticLogs: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + request: NetworkVirtualApplianceBootDiagnosticParameters, + options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, + ) => + getBootDiagnosticLogs( + context, + resourceGroupName, + networkVirtualApplianceName, + request, + options, + ), + beginGetBootDiagnosticLogs: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + request: NetworkVirtualApplianceBootDiagnosticParameters, + options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, + ) => { + const poller = getBootDiagnosticLogs( + context, + resourceGroupName, + networkVirtualApplianceName, + request, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetBootDiagnosticLogsAndWait: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + request: NetworkVirtualApplianceBootDiagnosticParameters, + options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, + ) => { + return await getBootDiagnosticLogs( + context, + resourceGroupName, + networkVirtualApplianceName, + request, + options, + ); + }, + reimage: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesReimageOptionalParams, + ) => reimage(context, resourceGroupName, networkVirtualApplianceName, options), + beginReimage: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesReimageOptionalParams, + ) => { + const poller = reimage(context, resourceGroupName, networkVirtualApplianceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginReimageAndWait: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesReimageOptionalParams, + ) => { + return await reimage(context, resourceGroupName, networkVirtualApplianceName, options); + }, + restart: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesRestartOptionalParams, + ) => restart(context, resourceGroupName, networkVirtualApplianceName, options), + beginRestart: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesRestartOptionalParams, + ) => { + const poller = restart(context, resourceGroupName, networkVirtualApplianceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRestartAndWait: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesRestartOptionalParams, + ) => { + return await restart(context, resourceGroupName, networkVirtualApplianceName, options); + }, + list: (options?: NetworkVirtualAppliancesListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: NetworkVirtualAppliancesListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkVirtualApplianceName, options), + beginDelete: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, networkVirtualApplianceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, networkVirtualApplianceName, options); + }, + updateTags: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: TagsObject, + options?: NetworkVirtualAppliancesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, networkVirtualApplianceName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: NetworkVirtualAppliance, + options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, networkVirtualApplianceName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: NetworkVirtualAppliance, + options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkVirtualApplianceName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + parameters: NetworkVirtualAppliance, + options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkVirtualApplianceName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: NetworkVirtualAppliancesGetOptionalParams, + ) => get(context, resourceGroupName, networkVirtualApplianceName, options), + }; +} + +export function _getNetworkVirtualAppliancesOperations( + context: NetworkManagementContext, +): NetworkVirtualAppliancesOperations { + return { + ..._getNetworkVirtualAppliances(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/networkWatchers/index.ts b/sdk/network/arm-network/src/classic/networkWatchers/index.ts new file mode 100644 index 000000000000..234f1e26e8a4 --- /dev/null +++ b/sdk/network/arm-network/src/classic/networkWatchers/index.ts @@ -0,0 +1,838 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + getNetworkConfigurationDiagnostic, + listAvailableProviders, + getAzureReachabilityReport, + checkConnectivity, + getFlowLogStatus, + setFlowLogConfiguration, + getTroubleshootingResult, + getTroubleshooting, + getVMSecurityRules, + getNextHop, + verifyIPFlow, + getTopology, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/networkWatchers/operations.js"; +import { + NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, + NetworkWatchersListAvailableProvidersOptionalParams, + NetworkWatchersGetAzureReachabilityReportOptionalParams, + NetworkWatchersCheckConnectivityOptionalParams, + NetworkWatchersGetFlowLogStatusOptionalParams, + NetworkWatchersSetFlowLogConfigurationOptionalParams, + NetworkWatchersGetTroubleshootingResultOptionalParams, + NetworkWatchersGetTroubleshootingOptionalParams, + NetworkWatchersGetVMSecurityRulesOptionalParams, + NetworkWatchersGetNextHopOptionalParams, + NetworkWatchersVerifyIPFlowOptionalParams, + NetworkWatchersGetTopologyOptionalParams, + NetworkWatchersListAllOptionalParams, + NetworkWatchersListOptionalParams, + NetworkWatchersDeleteOptionalParams, + NetworkWatchersUpdateTagsOptionalParams, + NetworkWatchersCreateOrUpdateOptionalParams, + NetworkWatchersGetOptionalParams, +} from "../../api/networkWatchers/options.js"; +import { NetworkWatcher } from "../../models/common/models.js"; +import { + TagsObject, + TopologyParameters, + Topology, + VerificationIPFlowParameters, + VerificationIPFlowResult, + NextHopParameters, + NextHopResult, + SecurityGroupViewParameters, + SecurityGroupViewResult, + TroubleshootingParameters, + TroubleshootingResult, + QueryTroubleshootingParameters, + FlowLogInformation, + FlowLogStatusParameters, + ConnectivityParameters, + ConnectivityInformation, + AzureReachabilityReportParameters, + AzureReachabilityReport, + AvailableProvidersListParameters, + AvailableProvidersList, + NetworkConfigurationDiagnosticParameters, + NetworkConfigurationDiagnosticResponse, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NetworkWatchers operations. */ +export interface NetworkWatchersOperations { + /** Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. */ + getNetworkConfigurationDiagnostic: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkConfigurationDiagnosticParameters, + options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, + ) => PollerLike< + OperationState, + NetworkConfigurationDiagnosticResponse + >; + /** @deprecated use getNetworkConfigurationDiagnostic instead */ + beginGetNetworkConfigurationDiagnostic: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkConfigurationDiagnosticParameters, + options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + NetworkConfigurationDiagnosticResponse + > + >; + /** @deprecated use getNetworkConfigurationDiagnostic instead */ + beginGetNetworkConfigurationDiagnosticAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkConfigurationDiagnosticParameters, + options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, + ) => Promise; + /** NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. */ + listAvailableProviders: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AvailableProvidersListParameters, + options?: NetworkWatchersListAvailableProvidersOptionalParams, + ) => PollerLike, AvailableProvidersList>; + /** @deprecated use listAvailableProviders instead */ + beginListAvailableProviders: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AvailableProvidersListParameters, + options?: NetworkWatchersListAvailableProvidersOptionalParams, + ) => Promise, AvailableProvidersList>>; + /** @deprecated use listAvailableProviders instead */ + beginListAvailableProvidersAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AvailableProvidersListParameters, + options?: NetworkWatchersListAvailableProvidersOptionalParams, + ) => Promise; + /** NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. */ + getAzureReachabilityReport: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AzureReachabilityReportParameters, + options?: NetworkWatchersGetAzureReachabilityReportOptionalParams, + ) => PollerLike, AzureReachabilityReport>; + /** @deprecated use getAzureReachabilityReport instead */ + beginGetAzureReachabilityReport: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AzureReachabilityReportParameters, + options?: NetworkWatchersGetAzureReachabilityReportOptionalParams, + ) => Promise, AzureReachabilityReport>>; + /** @deprecated use getAzureReachabilityReport instead */ + beginGetAzureReachabilityReportAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AzureReachabilityReportParameters, + options?: NetworkWatchersGetAzureReachabilityReportOptionalParams, + ) => Promise; + /** Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. */ + checkConnectivity: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: ConnectivityParameters, + options?: NetworkWatchersCheckConnectivityOptionalParams, + ) => PollerLike, ConnectivityInformation>; + /** @deprecated use checkConnectivity instead */ + beginCheckConnectivity: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: ConnectivityParameters, + options?: NetworkWatchersCheckConnectivityOptionalParams, + ) => Promise, ConnectivityInformation>>; + /** @deprecated use checkConnectivity instead */ + beginCheckConnectivityAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: ConnectivityParameters, + options?: NetworkWatchersCheckConnectivityOptionalParams, + ) => Promise; + /** Queries status of flow log and traffic analytics (optional) on a specified resource. */ + getFlowLogStatus: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogStatusParameters, + options?: NetworkWatchersGetFlowLogStatusOptionalParams, + ) => PollerLike, FlowLogInformation>; + /** @deprecated use getFlowLogStatus instead */ + beginGetFlowLogStatus: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogStatusParameters, + options?: NetworkWatchersGetFlowLogStatusOptionalParams, + ) => Promise, FlowLogInformation>>; + /** @deprecated use getFlowLogStatus instead */ + beginGetFlowLogStatusAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogStatusParameters, + options?: NetworkWatchersGetFlowLogStatusOptionalParams, + ) => Promise; + /** Configures flow log and traffic analytics (optional) on a specified resource. */ + setFlowLogConfiguration: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogInformation, + options?: NetworkWatchersSetFlowLogConfigurationOptionalParams, + ) => PollerLike, FlowLogInformation>; + /** @deprecated use setFlowLogConfiguration instead */ + beginSetFlowLogConfiguration: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogInformation, + options?: NetworkWatchersSetFlowLogConfigurationOptionalParams, + ) => Promise, FlowLogInformation>>; + /** @deprecated use setFlowLogConfiguration instead */ + beginSetFlowLogConfigurationAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogInformation, + options?: NetworkWatchersSetFlowLogConfigurationOptionalParams, + ) => Promise; + /** Get the last completed troubleshooting result on a specified resource. */ + getTroubleshootingResult: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: QueryTroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingResultOptionalParams, + ) => PollerLike, TroubleshootingResult>; + /** @deprecated use getTroubleshootingResult instead */ + beginGetTroubleshootingResult: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: QueryTroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingResultOptionalParams, + ) => Promise, TroubleshootingResult>>; + /** @deprecated use getTroubleshootingResult instead */ + beginGetTroubleshootingResultAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: QueryTroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingResultOptionalParams, + ) => Promise; + /** Initiate troubleshooting on a specified resource. */ + getTroubleshooting: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: TroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingOptionalParams, + ) => PollerLike, TroubleshootingResult>; + /** @deprecated use getTroubleshooting instead */ + beginGetTroubleshooting: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: TroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingOptionalParams, + ) => Promise, TroubleshootingResult>>; + /** @deprecated use getTroubleshooting instead */ + beginGetTroubleshootingAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: TroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingOptionalParams, + ) => Promise; + /** Gets the configured and effective security group rules on the specified VM. */ + getVMSecurityRules: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: SecurityGroupViewParameters, + options?: NetworkWatchersGetVMSecurityRulesOptionalParams, + ) => PollerLike, SecurityGroupViewResult>; + /** @deprecated use getVMSecurityRules instead */ + beginGetVMSecurityRules: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: SecurityGroupViewParameters, + options?: NetworkWatchersGetVMSecurityRulesOptionalParams, + ) => Promise, SecurityGroupViewResult>>; + /** @deprecated use getVMSecurityRules instead */ + beginGetVMSecurityRulesAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: SecurityGroupViewParameters, + options?: NetworkWatchersGetVMSecurityRulesOptionalParams, + ) => Promise; + /** Gets the next hop from the specified VM. */ + getNextHop: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NextHopParameters, + options?: NetworkWatchersGetNextHopOptionalParams, + ) => PollerLike, NextHopResult>; + /** @deprecated use getNextHop instead */ + beginGetNextHop: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NextHopParameters, + options?: NetworkWatchersGetNextHopOptionalParams, + ) => Promise, NextHopResult>>; + /** @deprecated use getNextHop instead */ + beginGetNextHopAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NextHopParameters, + options?: NetworkWatchersGetNextHopOptionalParams, + ) => Promise; + /** Verify IP flow from the specified VM to a location given the currently configured NSG rules. */ + verifyIPFlow: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: VerificationIPFlowParameters, + options?: NetworkWatchersVerifyIPFlowOptionalParams, + ) => PollerLike, VerificationIPFlowResult>; + /** @deprecated use verifyIPFlow instead */ + beginVerifyIPFlow: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: VerificationIPFlowParameters, + options?: NetworkWatchersVerifyIPFlowOptionalParams, + ) => Promise< + SimplePollerLike, VerificationIPFlowResult> + >; + /** @deprecated use verifyIPFlow instead */ + beginVerifyIPFlowAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: VerificationIPFlowParameters, + options?: NetworkWatchersVerifyIPFlowOptionalParams, + ) => Promise; + /** Gets the current network topology by resource group. */ + getTopology: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: TopologyParameters, + options?: NetworkWatchersGetTopologyOptionalParams, + ) => Promise; + /** Gets all network watchers by subscription. */ + listAll: ( + options?: NetworkWatchersListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all network watchers by resource group. */ + list: ( + resourceGroupName: string, + options?: NetworkWatchersListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified network watcher resource. */ + delete: ( + resourceGroupName: string, + networkWatcherName: string, + options?: NetworkWatchersDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkWatcherName: string, + options?: NetworkWatchersDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + options?: NetworkWatchersDeleteOptionalParams, + ) => Promise; + /** Updates a network watcher tags. */ + updateTags: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: TagsObject, + options?: NetworkWatchersUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a network watcher in the specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkWatcher, + options?: NetworkWatchersCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified network watcher by resource group. */ + get: ( + resourceGroupName: string, + networkWatcherName: string, + options?: NetworkWatchersGetOptionalParams, + ) => Promise; +} + +function _getNetworkWatchers(context: NetworkManagementContext) { + return { + getNetworkConfigurationDiagnostic: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkConfigurationDiagnosticParameters, + options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, + ) => + getNetworkConfigurationDiagnostic( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ), + beginGetNetworkConfigurationDiagnostic: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkConfigurationDiagnosticParameters, + options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, + ) => { + const poller = getNetworkConfigurationDiagnostic( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetNetworkConfigurationDiagnosticAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkConfigurationDiagnosticParameters, + options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, + ) => { + return await getNetworkConfigurationDiagnostic( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + }, + listAvailableProviders: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AvailableProvidersListParameters, + options?: NetworkWatchersListAvailableProvidersOptionalParams, + ) => + listAvailableProviders(context, resourceGroupName, networkWatcherName, parameters, options), + beginListAvailableProviders: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AvailableProvidersListParameters, + options?: NetworkWatchersListAvailableProvidersOptionalParams, + ) => { + const poller = listAvailableProviders( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListAvailableProvidersAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AvailableProvidersListParameters, + options?: NetworkWatchersListAvailableProvidersOptionalParams, + ) => { + return await listAvailableProviders( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + }, + getAzureReachabilityReport: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AzureReachabilityReportParameters, + options?: NetworkWatchersGetAzureReachabilityReportOptionalParams, + ) => + getAzureReachabilityReport( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ), + beginGetAzureReachabilityReport: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AzureReachabilityReportParameters, + options?: NetworkWatchersGetAzureReachabilityReportOptionalParams, + ) => { + const poller = getAzureReachabilityReport( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetAzureReachabilityReportAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: AzureReachabilityReportParameters, + options?: NetworkWatchersGetAzureReachabilityReportOptionalParams, + ) => { + return await getAzureReachabilityReport( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + }, + checkConnectivity: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: ConnectivityParameters, + options?: NetworkWatchersCheckConnectivityOptionalParams, + ) => checkConnectivity(context, resourceGroupName, networkWatcherName, parameters, options), + beginCheckConnectivity: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: ConnectivityParameters, + options?: NetworkWatchersCheckConnectivityOptionalParams, + ) => { + const poller = checkConnectivity( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCheckConnectivityAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: ConnectivityParameters, + options?: NetworkWatchersCheckConnectivityOptionalParams, + ) => { + return await checkConnectivity( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + }, + getFlowLogStatus: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogStatusParameters, + options?: NetworkWatchersGetFlowLogStatusOptionalParams, + ) => getFlowLogStatus(context, resourceGroupName, networkWatcherName, parameters, options), + beginGetFlowLogStatus: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogStatusParameters, + options?: NetworkWatchersGetFlowLogStatusOptionalParams, + ) => { + const poller = getFlowLogStatus( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetFlowLogStatusAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogStatusParameters, + options?: NetworkWatchersGetFlowLogStatusOptionalParams, + ) => { + return await getFlowLogStatus( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + }, + setFlowLogConfiguration: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogInformation, + options?: NetworkWatchersSetFlowLogConfigurationOptionalParams, + ) => + setFlowLogConfiguration(context, resourceGroupName, networkWatcherName, parameters, options), + beginSetFlowLogConfiguration: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogInformation, + options?: NetworkWatchersSetFlowLogConfigurationOptionalParams, + ) => { + const poller = setFlowLogConfiguration( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginSetFlowLogConfigurationAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: FlowLogInformation, + options?: NetworkWatchersSetFlowLogConfigurationOptionalParams, + ) => { + return await setFlowLogConfiguration( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + }, + getTroubleshootingResult: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: QueryTroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingResultOptionalParams, + ) => + getTroubleshootingResult(context, resourceGroupName, networkWatcherName, parameters, options), + beginGetTroubleshootingResult: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: QueryTroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingResultOptionalParams, + ) => { + const poller = getTroubleshootingResult( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetTroubleshootingResultAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: QueryTroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingResultOptionalParams, + ) => { + return await getTroubleshootingResult( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + }, + getTroubleshooting: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: TroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingOptionalParams, + ) => getTroubleshooting(context, resourceGroupName, networkWatcherName, parameters, options), + beginGetTroubleshooting: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: TroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingOptionalParams, + ) => { + const poller = getTroubleshooting( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetTroubleshootingAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: TroubleshootingParameters, + options?: NetworkWatchersGetTroubleshootingOptionalParams, + ) => { + return await getTroubleshooting( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + }, + getVMSecurityRules: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: SecurityGroupViewParameters, + options?: NetworkWatchersGetVMSecurityRulesOptionalParams, + ) => getVMSecurityRules(context, resourceGroupName, networkWatcherName, parameters, options), + beginGetVMSecurityRules: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: SecurityGroupViewParameters, + options?: NetworkWatchersGetVMSecurityRulesOptionalParams, + ) => { + const poller = getVMSecurityRules( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetVMSecurityRulesAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: SecurityGroupViewParameters, + options?: NetworkWatchersGetVMSecurityRulesOptionalParams, + ) => { + return await getVMSecurityRules( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + }, + getNextHop: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NextHopParameters, + options?: NetworkWatchersGetNextHopOptionalParams, + ) => getNextHop(context, resourceGroupName, networkWatcherName, parameters, options), + beginGetNextHop: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NextHopParameters, + options?: NetworkWatchersGetNextHopOptionalParams, + ) => { + const poller = getNextHop( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetNextHopAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NextHopParameters, + options?: NetworkWatchersGetNextHopOptionalParams, + ) => { + return await getNextHop(context, resourceGroupName, networkWatcherName, parameters, options); + }, + verifyIPFlow: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: VerificationIPFlowParameters, + options?: NetworkWatchersVerifyIPFlowOptionalParams, + ) => verifyIPFlow(context, resourceGroupName, networkWatcherName, parameters, options), + beginVerifyIPFlow: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: VerificationIPFlowParameters, + options?: NetworkWatchersVerifyIPFlowOptionalParams, + ) => { + const poller = verifyIPFlow( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginVerifyIPFlowAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + parameters: VerificationIPFlowParameters, + options?: NetworkWatchersVerifyIPFlowOptionalParams, + ) => { + return await verifyIPFlow( + context, + resourceGroupName, + networkWatcherName, + parameters, + options, + ); + }, + getTopology: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: TopologyParameters, + options?: NetworkWatchersGetTopologyOptionalParams, + ) => getTopology(context, resourceGroupName, networkWatcherName, parameters, options), + listAll: (options?: NetworkWatchersListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: NetworkWatchersListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + networkWatcherName: string, + options?: NetworkWatchersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkWatcherName, options), + beginDelete: async ( + resourceGroupName: string, + networkWatcherName: string, + options?: NetworkWatchersDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, networkWatcherName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + options?: NetworkWatchersDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, networkWatcherName, options); + }, + updateTags: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: TagsObject, + options?: NetworkWatchersUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, networkWatcherName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + networkWatcherName: string, + parameters: NetworkWatcher, + options?: NetworkWatchersCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, networkWatcherName, parameters, options), + get: ( + resourceGroupName: string, + networkWatcherName: string, + options?: NetworkWatchersGetOptionalParams, + ) => get(context, resourceGroupName, networkWatcherName, options), + }; +} + +export function _getNetworkWatchersOperations( + context: NetworkManagementContext, +): NetworkWatchersOperations { + return { + ..._getNetworkWatchers(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/operations/index.ts b/sdk/network/arm-network/src/classic/operations/index.ts new file mode 100644 index 000000000000..d2aaf1d28b92 --- /dev/null +++ b/sdk/network/arm-network/src/classic/operations/index.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/operations/operations.js"; +import { OperationsListOptionalParams } from "../../api/operations/options.js"; +import { Operation } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Operations operations. */ +export interface OperationsOperations { + /** Lists all of the available Network Rest API operations. */ + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; +} + +function _getOperations(context: NetworkManagementContext) { + return { + list: (options?: OperationsListOptionalParams) => list(context, options), + }; +} + +export function _getOperationsOperations(context: NetworkManagementContext): OperationsOperations { + return { + ..._getOperations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/p2SVpnGateways/index.ts b/sdk/network/arm-network/src/classic/p2SVpnGateways/index.ts new file mode 100644 index 000000000000..f5a9e2a511b6 --- /dev/null +++ b/sdk/network/arm-network/src/classic/p2SVpnGateways/index.ts @@ -0,0 +1,480 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + disconnectP2SVpnConnections, + getP2SVpnConnectionHealthDetailed, + getP2SVpnConnectionHealth, + generateVpnProfile, + reset, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/p2SVpnGateways/operations.js"; +import { + P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, + P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, + P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, + P2SVpnGatewaysGenerateVpnProfileOptionalParams, + P2SVpnGatewaysResetOptionalParams, + P2SVpnGatewaysListOptionalParams, + P2SVpnGatewaysListByResourceGroupOptionalParams, + P2SVpnGatewaysDeleteOptionalParams, + P2SVpnGatewaysUpdateTagsOptionalParams, + P2SVpnGatewaysCreateOrUpdateOptionalParams, + P2SVpnGatewaysGetOptionalParams, +} from "../../api/p2SVpnGateways/options.js"; +import { + VpnProfileResponse, + TagsObject, + P2SVpnConnectionRequest, + P2SVpnGateway, + P2SVpnProfileParameters, + P2SVpnConnectionHealthRequest, + P2SVpnConnectionHealth, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a P2SVpnGateways operations. */ +export interface P2SVpnGatewaysOperations { + /** Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. */ + disconnectP2SVpnConnections: ( + resourceGroupName: string, + p2SVpnGatewayName: string, + request: P2SVpnConnectionRequest, + options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, + ) => PollerLike, void>; + /** @deprecated use disconnectP2SVpnConnections instead */ + beginDisconnectP2SVpnConnections: ( + resourceGroupName: string, + p2SVpnGatewayName: string, + request: P2SVpnConnectionRequest, + options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, + ) => Promise, void>>; + /** @deprecated use disconnectP2SVpnConnections instead */ + beginDisconnectP2SVpnConnectionsAndWait: ( + resourceGroupName: string, + p2SVpnGatewayName: string, + request: P2SVpnConnectionRequest, + options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, + ) => Promise; + /** Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. */ + getP2SVpnConnectionHealthDetailed: ( + resourceGroupName: string, + gatewayName: string, + request: P2SVpnConnectionHealthRequest, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, + ) => PollerLike, P2SVpnConnectionHealth>; + /** @deprecated use getP2SVpnConnectionHealthDetailed instead */ + beginGetP2SVpnConnectionHealthDetailed: ( + resourceGroupName: string, + gatewayName: string, + request: P2SVpnConnectionHealthRequest, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, + ) => Promise, P2SVpnConnectionHealth>>; + /** @deprecated use getP2SVpnConnectionHealthDetailed instead */ + beginGetP2SVpnConnectionHealthDetailedAndWait: ( + resourceGroupName: string, + gatewayName: string, + request: P2SVpnConnectionHealthRequest, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, + ) => Promise; + /** Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. */ + getP2SVpnConnectionHealth: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, + ) => PollerLike, P2SVpnGateway>; + /** @deprecated use getP2SVpnConnectionHealth instead */ + beginGetP2SVpnConnectionHealth: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, + ) => Promise, P2SVpnGateway>>; + /** @deprecated use getP2SVpnConnectionHealth instead */ + beginGetP2SVpnConnectionHealthAndWait: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, + ) => Promise; + /** Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. */ + generateVpnProfile: ( + resourceGroupName: string, + gatewayName: string, + parameters: P2SVpnProfileParameters, + options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams, + ) => PollerLike, VpnProfileResponse>; + /** @deprecated use generateVpnProfile instead */ + beginGenerateVpnProfile: ( + resourceGroupName: string, + gatewayName: string, + parameters: P2SVpnProfileParameters, + options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams, + ) => Promise, VpnProfileResponse>>; + /** @deprecated use generateVpnProfile instead */ + beginGenerateVpnProfileAndWait: ( + resourceGroupName: string, + gatewayName: string, + parameters: P2SVpnProfileParameters, + options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams, + ) => Promise; + /** Resets the primary of the p2s vpn gateway in the specified resource group. */ + reset: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysResetOptionalParams, + ) => PollerLike, P2SVpnGateway>; + /** @deprecated use reset instead */ + beginReset: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysResetOptionalParams, + ) => Promise, P2SVpnGateway>>; + /** @deprecated use reset instead */ + beginResetAndWait: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysResetOptionalParams, + ) => Promise; + /** Lists all the P2SVpnGateways in a subscription. */ + list: (options?: P2SVpnGatewaysListOptionalParams) => PagedAsyncIterableIterator; + /** Lists all the P2SVpnGateways in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: P2SVpnGatewaysListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a virtual wan p2s vpn gateway. */ + delete: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysDeleteOptionalParams, + ) => Promise; + /** Updates virtual wan p2s vpn gateway tags. */ + updateTags: ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: TagsObject, + options?: P2SVpnGatewaysUpdateTagsOptionalParams, + ) => PollerLike, P2SVpnGateway>; + /** @deprecated use updateTags instead */ + beginUpdateTags: ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: TagsObject, + options?: P2SVpnGatewaysUpdateTagsOptionalParams, + ) => Promise, P2SVpnGateway>>; + /** @deprecated use updateTags instead */ + beginUpdateTagsAndWait: ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: TagsObject, + options?: P2SVpnGatewaysUpdateTagsOptionalParams, + ) => Promise; + /** Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. */ + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: P2SVpnGateway, + options?: P2SVpnGatewaysCreateOrUpdateOptionalParams, + ) => PollerLike, P2SVpnGateway>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: P2SVpnGateway, + options?: P2SVpnGatewaysCreateOrUpdateOptionalParams, + ) => Promise, P2SVpnGateway>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: P2SVpnGateway, + options?: P2SVpnGatewaysCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a virtual wan p2s vpn gateway. */ + get: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysGetOptionalParams, + ) => Promise; +} + +function _getP2SVpnGateways(context: NetworkManagementContext) { + return { + disconnectP2SVpnConnections: ( + resourceGroupName: string, + p2SVpnGatewayName: string, + request: P2SVpnConnectionRequest, + options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, + ) => + disconnectP2SVpnConnections(context, resourceGroupName, p2SVpnGatewayName, request, options), + beginDisconnectP2SVpnConnections: async ( + resourceGroupName: string, + p2SVpnGatewayName: string, + request: P2SVpnConnectionRequest, + options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, + ) => { + const poller = disconnectP2SVpnConnections( + context, + resourceGroupName, + p2SVpnGatewayName, + request, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDisconnectP2SVpnConnectionsAndWait: async ( + resourceGroupName: string, + p2SVpnGatewayName: string, + request: P2SVpnConnectionRequest, + options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, + ) => { + return await disconnectP2SVpnConnections( + context, + resourceGroupName, + p2SVpnGatewayName, + request, + options, + ); + }, + getP2SVpnConnectionHealthDetailed: ( + resourceGroupName: string, + gatewayName: string, + request: P2SVpnConnectionHealthRequest, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, + ) => + getP2SVpnConnectionHealthDetailed(context, resourceGroupName, gatewayName, request, options), + beginGetP2SVpnConnectionHealthDetailed: async ( + resourceGroupName: string, + gatewayName: string, + request: P2SVpnConnectionHealthRequest, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, + ) => { + const poller = getP2SVpnConnectionHealthDetailed( + context, + resourceGroupName, + gatewayName, + request, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetP2SVpnConnectionHealthDetailedAndWait: async ( + resourceGroupName: string, + gatewayName: string, + request: P2SVpnConnectionHealthRequest, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, + ) => { + return await getP2SVpnConnectionHealthDetailed( + context, + resourceGroupName, + gatewayName, + request, + options, + ); + }, + getP2SVpnConnectionHealth: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, + ) => getP2SVpnConnectionHealth(context, resourceGroupName, gatewayName, options), + beginGetP2SVpnConnectionHealth: async ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, + ) => { + const poller = getP2SVpnConnectionHealth(context, resourceGroupName, gatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetP2SVpnConnectionHealthAndWait: async ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, + ) => { + return await getP2SVpnConnectionHealth(context, resourceGroupName, gatewayName, options); + }, + generateVpnProfile: ( + resourceGroupName: string, + gatewayName: string, + parameters: P2SVpnProfileParameters, + options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams, + ) => generateVpnProfile(context, resourceGroupName, gatewayName, parameters, options), + beginGenerateVpnProfile: async ( + resourceGroupName: string, + gatewayName: string, + parameters: P2SVpnProfileParameters, + options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams, + ) => { + const poller = generateVpnProfile( + context, + resourceGroupName, + gatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGenerateVpnProfileAndWait: async ( + resourceGroupName: string, + gatewayName: string, + parameters: P2SVpnProfileParameters, + options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams, + ) => { + return await generateVpnProfile(context, resourceGroupName, gatewayName, parameters, options); + }, + reset: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysResetOptionalParams, + ) => reset(context, resourceGroupName, gatewayName, options), + beginReset: async ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysResetOptionalParams, + ) => { + const poller = reset(context, resourceGroupName, gatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginResetAndWait: async ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysResetOptionalParams, + ) => { + return await reset(context, resourceGroupName, gatewayName, options); + }, + list: (options?: P2SVpnGatewaysListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: P2SVpnGatewaysListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysDeleteOptionalParams, + ) => $delete(context, resourceGroupName, gatewayName, options), + beginDelete: async ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, gatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, gatewayName, options); + }, + updateTags: ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: TagsObject, + options?: P2SVpnGatewaysUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, gatewayName, p2SVpnGatewayParameters, options), + beginUpdateTags: async ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: TagsObject, + options?: P2SVpnGatewaysUpdateTagsOptionalParams, + ) => { + const poller = updateTags( + context, + resourceGroupName, + gatewayName, + p2SVpnGatewayParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateTagsAndWait: async ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: TagsObject, + options?: P2SVpnGatewaysUpdateTagsOptionalParams, + ) => { + return await updateTags( + context, + resourceGroupName, + gatewayName, + p2SVpnGatewayParameters, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: P2SVpnGateway, + options?: P2SVpnGatewaysCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, gatewayName, p2SVpnGatewayParameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: P2SVpnGateway, + options?: P2SVpnGatewaysCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + gatewayName, + p2SVpnGatewayParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + gatewayName: string, + p2SVpnGatewayParameters: P2SVpnGateway, + options?: P2SVpnGatewaysCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + gatewayName, + p2SVpnGatewayParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + gatewayName: string, + options?: P2SVpnGatewaysGetOptionalParams, + ) => get(context, resourceGroupName, gatewayName, options), + }; +} + +export function _getP2SVpnGatewaysOperations( + context: NetworkManagementContext, +): P2SVpnGatewaysOperations { + return { + ..._getP2SVpnGateways(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/packetCaptures/index.ts b/sdk/network/arm-network/src/classic/packetCaptures/index.ts new file mode 100644 index 000000000000..268a4be0d991 --- /dev/null +++ b/sdk/network/arm-network/src/classic/packetCaptures/index.ts @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + getStatus, + stop, + $delete, + get, + create, +} from "../../api/packetCaptures/operations.js"; +import { + PacketCapturesListOptionalParams, + PacketCapturesGetStatusOptionalParams, + PacketCapturesStopOptionalParams, + PacketCapturesDeleteOptionalParams, + PacketCapturesGetOptionalParams, + PacketCapturesCreateOptionalParams, +} from "../../api/packetCaptures/options.js"; +import { + PacketCapture, + PacketCaptureResult, + PacketCaptureQueryStatusResult, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PacketCaptures operations. */ +export interface PacketCapturesOperations { + /** Lists all packet capture sessions within the specified resource group. */ + list: ( + resourceGroupName: string, + networkWatcherName: string, + options?: PacketCapturesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Query the status of a running packet capture session. */ + getStatus: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesGetStatusOptionalParams, + ) => PollerLike, PacketCaptureQueryStatusResult>; + /** @deprecated use getStatus instead */ + beginGetStatus: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesGetStatusOptionalParams, + ) => Promise< + SimplePollerLike, PacketCaptureQueryStatusResult> + >; + /** @deprecated use getStatus instead */ + beginGetStatusAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesGetStatusOptionalParams, + ) => Promise; + /** Stops a specified packet capture session. */ + stop: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesStopOptionalParams, + ) => PollerLike, void>; + /** @deprecated use stop instead */ + beginStop: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesStopOptionalParams, + ) => Promise, void>>; + /** @deprecated use stop instead */ + beginStopAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesStopOptionalParams, + ) => Promise; + /** Deletes the specified packet capture session. */ + delete: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesDeleteOptionalParams, + ) => Promise; + /** Gets a packet capture session by name. */ + get: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesGetOptionalParams, + ) => Promise; + /** Create and start a packet capture on the specified VM. */ + create: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + parameters: PacketCapture, + options?: PacketCapturesCreateOptionalParams, + ) => PollerLike, PacketCaptureResult>; + /** @deprecated use create instead */ + beginCreate: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + parameters: PacketCapture, + options?: PacketCapturesCreateOptionalParams, + ) => Promise, PacketCaptureResult>>; + /** @deprecated use create instead */ + beginCreateAndWait: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + parameters: PacketCapture, + options?: PacketCapturesCreateOptionalParams, + ) => Promise; +} + +function _getPacketCaptures(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkWatcherName: string, + options?: PacketCapturesListOptionalParams, + ) => list(context, resourceGroupName, networkWatcherName, options), + getStatus: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesGetStatusOptionalParams, + ) => getStatus(context, resourceGroupName, networkWatcherName, packetCaptureName, options), + beginGetStatus: async ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesGetStatusOptionalParams, + ) => { + const poller = getStatus( + context, + resourceGroupName, + networkWatcherName, + packetCaptureName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetStatusAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesGetStatusOptionalParams, + ) => { + return await getStatus( + context, + resourceGroupName, + networkWatcherName, + packetCaptureName, + options, + ); + }, + stop: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesStopOptionalParams, + ) => stop(context, resourceGroupName, networkWatcherName, packetCaptureName, options), + beginStop: async ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesStopOptionalParams, + ) => { + const poller = stop( + context, + resourceGroupName, + networkWatcherName, + packetCaptureName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStopAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesStopOptionalParams, + ) => { + return await stop(context, resourceGroupName, networkWatcherName, packetCaptureName, options); + }, + delete: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkWatcherName, packetCaptureName, options), + beginDelete: async ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkWatcherName, + packetCaptureName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkWatcherName, + packetCaptureName, + options, + ); + }, + get: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + options?: PacketCapturesGetOptionalParams, + ) => get(context, resourceGroupName, networkWatcherName, packetCaptureName, options), + create: ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + parameters: PacketCapture, + options?: PacketCapturesCreateOptionalParams, + ) => + create( + context, + resourceGroupName, + networkWatcherName, + packetCaptureName, + parameters, + options, + ), + beginCreate: async ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + parameters: PacketCapture, + options?: PacketCapturesCreateOptionalParams, + ) => { + const poller = create( + context, + resourceGroupName, + networkWatcherName, + packetCaptureName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateAndWait: async ( + resourceGroupName: string, + networkWatcherName: string, + packetCaptureName: string, + parameters: PacketCapture, + options?: PacketCapturesCreateOptionalParams, + ) => { + return await create( + context, + resourceGroupName, + networkWatcherName, + packetCaptureName, + parameters, + options, + ); + }, + }; +} + +export function _getPacketCapturesOperations( + context: NetworkManagementContext, +): PacketCapturesOperations { + return { + ..._getPacketCaptures(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/peerExpressRouteCircuitConnections/index.ts b/sdk/network/arm-network/src/classic/peerExpressRouteCircuitConnections/index.ts new file mode 100644 index 000000000000..7b6601f30b5c --- /dev/null +++ b/sdk/network/arm-network/src/classic/peerExpressRouteCircuitConnections/index.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, get } from "../../api/peerExpressRouteCircuitConnections/operations.js"; +import { + PeerExpressRouteCircuitConnectionsListOptionalParams, + PeerExpressRouteCircuitConnectionsGetOptionalParams, +} from "../../api/peerExpressRouteCircuitConnections/options.js"; +import { PeerExpressRouteCircuitConnection } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a PeerExpressRouteCircuitConnections operations. */ +export interface PeerExpressRouteCircuitConnectionsOperations { + /** Gets all global reach peer connections associated with a private peering in an express route circuit. */ + list: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: PeerExpressRouteCircuitConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. */ + get: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options?: PeerExpressRouteCircuitConnectionsGetOptionalParams, + ) => Promise; +} + +function _getPeerExpressRouteCircuitConnections(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + options?: PeerExpressRouteCircuitConnectionsListOptionalParams, + ) => list(context, resourceGroupName, circuitName, peeringName, options), + get: ( + resourceGroupName: string, + circuitName: string, + peeringName: string, + connectionName: string, + options?: PeerExpressRouteCircuitConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, circuitName, peeringName, connectionName, options), + }; +} + +export function _getPeerExpressRouteCircuitConnectionsOperations( + context: NetworkManagementContext, +): PeerExpressRouteCircuitConnectionsOperations { + return { + ..._getPeerExpressRouteCircuitConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/privateDnsZoneGroups/index.ts b/sdk/network/arm-network/src/classic/privateDnsZoneGroups/index.ts new file mode 100644 index 000000000000..a2777f26e346 --- /dev/null +++ b/sdk/network/arm-network/src/classic/privateDnsZoneGroups/index.ts @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, createOrUpdate, get, $delete } from "../../api/privateDnsZoneGroups/operations.js"; +import { + PrivateDnsZoneGroupsListOptionalParams, + PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, + PrivateDnsZoneGroupsGetOptionalParams, + PrivateDnsZoneGroupsDeleteOptionalParams, +} from "../../api/privateDnsZoneGroups/options.js"; +import { PrivateDnsZoneGroup } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PrivateDnsZoneGroups operations. */ +export interface PrivateDnsZoneGroupsOperations { + /** Gets all private dns zone groups in a private endpoint. */ + list: ( + resourceGroupName: string, + privateEndpointName: string, + options?: PrivateDnsZoneGroupsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Creates or updates a private dns zone group in the specified private endpoint. */ + createOrUpdate: ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + parameters: PrivateDnsZoneGroup, + options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, + ) => PollerLike, PrivateDnsZoneGroup>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + parameters: PrivateDnsZoneGroup, + options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, + ) => Promise, PrivateDnsZoneGroup>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + parameters: PrivateDnsZoneGroup, + options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the private dns zone group resource by specified private dns zone group name. */ + get: ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options?: PrivateDnsZoneGroupsGetOptionalParams, + ) => Promise; + /** Deletes the specified private dns zone group. */ + delete: ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options?: PrivateDnsZoneGroupsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options?: PrivateDnsZoneGroupsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options?: PrivateDnsZoneGroupsDeleteOptionalParams, + ) => Promise; +} + +function _getPrivateDnsZoneGroups(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + privateEndpointName: string, + options?: PrivateDnsZoneGroupsListOptionalParams, + ) => list(context, resourceGroupName, privateEndpointName, options), + createOrUpdate: ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + parameters: PrivateDnsZoneGroup, + options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + privateEndpointName, + privateDnsZoneGroupName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + parameters: PrivateDnsZoneGroup, + options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + privateEndpointName, + privateDnsZoneGroupName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + parameters: PrivateDnsZoneGroup, + options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + privateEndpointName, + privateDnsZoneGroupName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options?: PrivateDnsZoneGroupsGetOptionalParams, + ) => get(context, resourceGroupName, privateEndpointName, privateDnsZoneGroupName, options), + delete: ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options?: PrivateDnsZoneGroupsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateEndpointName, privateDnsZoneGroupName, options), + beginDelete: async ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options?: PrivateDnsZoneGroupsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + privateEndpointName, + privateDnsZoneGroupName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + privateEndpointName: string, + privateDnsZoneGroupName: string, + options?: PrivateDnsZoneGroupsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + privateEndpointName, + privateDnsZoneGroupName, + options, + ); + }, + }; +} + +export function _getPrivateDnsZoneGroupsOperations( + context: NetworkManagementContext, +): PrivateDnsZoneGroupsOperations { + return { + ..._getPrivateDnsZoneGroups(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/privateEndpoints/index.ts b/sdk/network/arm-network/src/classic/privateEndpoints/index.ts new file mode 100644 index 000000000000..e2d79226457d --- /dev/null +++ b/sdk/network/arm-network/src/classic/privateEndpoints/index.ts @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listBySubscription, + list, + $delete, + createOrUpdate, + get, +} from "../../api/privateEndpoints/operations.js"; +import { + PrivateEndpointsListBySubscriptionOptionalParams, + PrivateEndpointsListOptionalParams, + PrivateEndpointsDeleteOptionalParams, + PrivateEndpointsCreateOrUpdateOptionalParams, + PrivateEndpointsGetOptionalParams, +} from "../../api/privateEndpoints/options.js"; +import { PrivateEndpoint } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PrivateEndpoints operations. */ +export interface PrivateEndpointsOperations { + /** Gets all private endpoints in a subscription. */ + listBySubscription: ( + options?: PrivateEndpointsListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all private endpoints in a resource group. */ + list: ( + resourceGroupName: string, + options?: PrivateEndpointsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified private endpoint. */ + delete: ( + resourceGroupName: string, + privateEndpointName: string, + options?: PrivateEndpointsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + privateEndpointName: string, + options?: PrivateEndpointsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + privateEndpointName: string, + options?: PrivateEndpointsDeleteOptionalParams, + ) => Promise; + /** Creates or updates an private endpoint in the specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + privateEndpointName: string, + parameters: PrivateEndpoint, + options?: PrivateEndpointsCreateOrUpdateOptionalParams, + ) => PollerLike, PrivateEndpoint>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + privateEndpointName: string, + parameters: PrivateEndpoint, + options?: PrivateEndpointsCreateOrUpdateOptionalParams, + ) => Promise, PrivateEndpoint>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + privateEndpointName: string, + parameters: PrivateEndpoint, + options?: PrivateEndpointsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified private endpoint by resource group. */ + get: ( + resourceGroupName: string, + privateEndpointName: string, + options?: PrivateEndpointsGetOptionalParams, + ) => Promise; +} + +function _getPrivateEndpoints(context: NetworkManagementContext) { + return { + listBySubscription: (options?: PrivateEndpointsListBySubscriptionOptionalParams) => + listBySubscription(context, options), + list: (resourceGroupName: string, options?: PrivateEndpointsListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + privateEndpointName: string, + options?: PrivateEndpointsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateEndpointName, options), + beginDelete: async ( + resourceGroupName: string, + privateEndpointName: string, + options?: PrivateEndpointsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, privateEndpointName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + privateEndpointName: string, + options?: PrivateEndpointsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, privateEndpointName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + privateEndpointName: string, + parameters: PrivateEndpoint, + options?: PrivateEndpointsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, privateEndpointName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + privateEndpointName: string, + parameters: PrivateEndpoint, + options?: PrivateEndpointsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + privateEndpointName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + privateEndpointName: string, + parameters: PrivateEndpoint, + options?: PrivateEndpointsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + privateEndpointName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + privateEndpointName: string, + options?: PrivateEndpointsGetOptionalParams, + ) => get(context, resourceGroupName, privateEndpointName, options), + }; +} + +export function _getPrivateEndpointsOperations( + context: NetworkManagementContext, +): PrivateEndpointsOperations { + return { + ..._getPrivateEndpoints(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/privateLinkServices/index.ts b/sdk/network/arm-network/src/classic/privateLinkServices/index.ts new file mode 100644 index 000000000000..97708a1100d9 --- /dev/null +++ b/sdk/network/arm-network/src/classic/privateLinkServices/index.ts @@ -0,0 +1,419 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAutoApprovedPrivateLinkServicesByResourceGroup, + listAutoApprovedPrivateLinkServices, + checkPrivateLinkServiceVisibilityByResourceGroup, + checkPrivateLinkServiceVisibility, + listPrivateEndpointConnections, + deletePrivateEndpointConnection, + updatePrivateEndpointConnection, + getPrivateEndpointConnection, + listBySubscription, + list, + $delete, + createOrUpdate, + get, +} from "../../api/privateLinkServices/operations.js"; +import { + PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, + PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, + PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, + PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, + PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, + PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, + PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams, + PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams, + PrivateLinkServicesListBySubscriptionOptionalParams, + PrivateLinkServicesListOptionalParams, + PrivateLinkServicesDeleteOptionalParams, + PrivateLinkServicesCreateOrUpdateOptionalParams, + PrivateLinkServicesGetOptionalParams, +} from "../../api/privateLinkServices/options.js"; +import { PrivateLinkService, PrivateEndpointConnection } from "../../models/common/models.js"; +import { + CheckPrivateLinkServiceVisibilityRequest, + PrivateLinkServiceVisibility, + AutoApprovedPrivateLinkService, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PrivateLinkServices operations. */ +export interface PrivateLinkServicesOperations { + /** Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. */ + listAutoApprovedPrivateLinkServicesByResourceGroup: ( + resourceGroupName: string, + location: string, + options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. */ + listAutoApprovedPrivateLinkServices: ( + location: string, + options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Checks whether the subscription is visible to private link service in the specified resource group. */ + checkPrivateLinkServiceVisibilityByResourceGroup: ( + resourceGroupName: string, + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, + ) => PollerLike, PrivateLinkServiceVisibility>; + /** @deprecated use checkPrivateLinkServiceVisibilityByResourceGroup instead */ + beginCheckPrivateLinkServiceVisibilityByResourceGroup: ( + resourceGroupName: string, + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, + ) => Promise< + SimplePollerLike, PrivateLinkServiceVisibility> + >; + /** @deprecated use checkPrivateLinkServiceVisibilityByResourceGroup instead */ + beginCheckPrivateLinkServiceVisibilityByResourceGroupAndWait: ( + resourceGroupName: string, + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, + ) => Promise; + /** Checks whether the subscription is visible to private link service. */ + checkPrivateLinkServiceVisibility: ( + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, + ) => PollerLike, PrivateLinkServiceVisibility>; + /** @deprecated use checkPrivateLinkServiceVisibility instead */ + beginCheckPrivateLinkServiceVisibility: ( + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, + ) => Promise< + SimplePollerLike, PrivateLinkServiceVisibility> + >; + /** @deprecated use checkPrivateLinkServiceVisibility instead */ + beginCheckPrivateLinkServiceVisibilityAndWait: ( + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, + ) => Promise; + /** Gets all private end point connections for a specific private link service. */ + listPrivateEndpointConnections: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete private end point connection for a private link service in a subscription. */ + deletePrivateEndpointConnection: ( + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, + ) => PollerLike, void>; + /** @deprecated use deletePrivateEndpointConnection instead */ + beginDeletePrivateEndpointConnection: ( + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, + ) => Promise, void>>; + /** @deprecated use deletePrivateEndpointConnection instead */ + beginDeletePrivateEndpointConnectionAndWait: ( + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, + ) => Promise; + /** Approve or reject private end point connection for a private link service in a subscription. */ + updatePrivateEndpointConnection: ( + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + parameters: PrivateEndpointConnection, + options?: PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams, + ) => Promise; + /** Get the specific private end point connection by specific private link service in the resource group. */ + getPrivateEndpointConnection: ( + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options?: PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams, + ) => Promise; + /** Gets all private link service in a subscription. */ + listBySubscription: ( + options?: PrivateLinkServicesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all private link services in a resource group. */ + list: ( + resourceGroupName: string, + options?: PrivateLinkServicesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified private link service. */ + delete: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateLinkServicesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateLinkServicesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateLinkServicesDeleteOptionalParams, + ) => Promise; + /** Creates or updates an private link service in the specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: PrivateLinkService, + options?: PrivateLinkServicesCreateOrUpdateOptionalParams, + ) => PollerLike, PrivateLinkService>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: PrivateLinkService, + options?: PrivateLinkServicesCreateOrUpdateOptionalParams, + ) => Promise, PrivateLinkService>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + parameters: PrivateLinkService, + options?: PrivateLinkServicesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified private link service by resource group. */ + get: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateLinkServicesGetOptionalParams, + ) => Promise; +} + +function _getPrivateLinkServices(context: NetworkManagementContext) { + return { + listAutoApprovedPrivateLinkServicesByResourceGroup: ( + resourceGroupName: string, + location: string, + options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, + ) => + listAutoApprovedPrivateLinkServicesByResourceGroup( + context, + resourceGroupName, + location, + options, + ), + listAutoApprovedPrivateLinkServices: ( + location: string, + options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, + ) => listAutoApprovedPrivateLinkServices(context, location, options), + checkPrivateLinkServiceVisibilityByResourceGroup: ( + resourceGroupName: string, + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, + ) => + checkPrivateLinkServiceVisibilityByResourceGroup( + context, + resourceGroupName, + location, + parameters, + options, + ), + beginCheckPrivateLinkServiceVisibilityByResourceGroup: async ( + resourceGroupName: string, + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, + ) => { + const poller = checkPrivateLinkServiceVisibilityByResourceGroup( + context, + resourceGroupName, + location, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCheckPrivateLinkServiceVisibilityByResourceGroupAndWait: async ( + resourceGroupName: string, + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, + ) => { + return await checkPrivateLinkServiceVisibilityByResourceGroup( + context, + resourceGroupName, + location, + parameters, + options, + ); + }, + checkPrivateLinkServiceVisibility: ( + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, + ) => checkPrivateLinkServiceVisibility(context, location, parameters, options), + beginCheckPrivateLinkServiceVisibility: async ( + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, + ) => { + const poller = checkPrivateLinkServiceVisibility(context, location, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCheckPrivateLinkServiceVisibilityAndWait: async ( + location: string, + parameters: CheckPrivateLinkServiceVisibilityRequest, + options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, + ) => { + return await checkPrivateLinkServiceVisibility(context, location, parameters, options); + }, + listPrivateEndpointConnections: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, + ) => listPrivateEndpointConnections(context, resourceGroupName, serviceName, options), + deletePrivateEndpointConnection: ( + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, + ) => + deletePrivateEndpointConnection( + context, + resourceGroupName, + serviceName, + peConnectionName, + options, + ), + beginDeletePrivateEndpointConnection: async ( + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, + ) => { + const poller = deletePrivateEndpointConnection( + context, + resourceGroupName, + serviceName, + peConnectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeletePrivateEndpointConnectionAndWait: async ( + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, + ) => { + return await deletePrivateEndpointConnection( + context, + resourceGroupName, + serviceName, + peConnectionName, + options, + ); + }, + updatePrivateEndpointConnection: ( + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + parameters: PrivateEndpointConnection, + options?: PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams, + ) => + updatePrivateEndpointConnection( + context, + resourceGroupName, + serviceName, + peConnectionName, + parameters, + options, + ), + getPrivateEndpointConnection: ( + resourceGroupName: string, + serviceName: string, + peConnectionName: string, + options?: PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams, + ) => + getPrivateEndpointConnection( + context, + resourceGroupName, + serviceName, + peConnectionName, + options, + ), + listBySubscription: (options?: PrivateLinkServicesListBySubscriptionOptionalParams) => + listBySubscription(context, options), + list: (resourceGroupName: string, options?: PrivateLinkServicesListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateLinkServicesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, options), + beginDelete: async ( + resourceGroupName: string, + serviceName: string, + options?: PrivateLinkServicesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, serviceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + serviceName: string, + options?: PrivateLinkServicesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, serviceName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: PrivateLinkService, + options?: PrivateLinkServicesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + parameters: PrivateLinkService, + options?: PrivateLinkServicesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate(context, resourceGroupName, serviceName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + parameters: PrivateLinkService, + options?: PrivateLinkServicesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate(context, resourceGroupName, serviceName, parameters, options); + }, + get: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateLinkServicesGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, options), + }; +} + +export function _getPrivateLinkServicesOperations( + context: NetworkManagementContext, +): PrivateLinkServicesOperations { + return { + ..._getPrivateLinkServices(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/publicIPAddresses/index.ts b/sdk/network/arm-network/src/classic/publicIPAddresses/index.ts new file mode 100644 index 000000000000..914e684842f3 --- /dev/null +++ b/sdk/network/arm-network/src/classic/publicIPAddresses/index.ts @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listVirtualMachineScaleSetPublicIPAddresses, + listCloudServicePublicIPAddresses, + disassociateCloudServiceReservedPublicIp, + reserveCloudServicePublicIpAddress, + ddosProtectionStatus, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, + listVirtualMachineScaleSetVMPublicIPAddresses, + getVirtualMachineScaleSetPublicIPAddress, + listCloudServiceRoleInstancePublicIPAddresses, + getCloudServicePublicIPAddress, +} from "../../api/publicIPAddresses/operations.js"; +import { + PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, + PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, + PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, + PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, + PublicIPAddressesDdosProtectionStatusOptionalParams, + PublicIPAddressesListAllOptionalParams, + PublicIPAddressesListOptionalParams, + PublicIPAddressesDeleteOptionalParams, + PublicIPAddressesUpdateTagsOptionalParams, + PublicIPAddressesCreateOrUpdateOptionalParams, + PublicIPAddressesGetOptionalParams, + PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, + PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams, + PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, + PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams, +} from "../../api/publicIPAddresses/options.js"; +import { PublicIPAddress } from "../../models/common/models.js"; +import { + TagsObject, + PublicIpDdosProtectionStatusResult, + ReserveCloudServicePublicIpAddressRequest, + DisassociateCloudServicePublicIpRequest, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PublicIPAddresses operations. */ +export interface PublicIPAddressesOperations { + /** Gets information about all public IP addresses on a virtual machine scale set level. */ + listVirtualMachineScaleSetPublicIPAddresses: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + options?: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets information about all public IP addresses on a cloud service level. */ + listCloudServicePublicIPAddresses: ( + resourceGroupName: string, + cloudServiceName: string, + options?: PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend. */ + disassociateCloudServiceReservedPublicIp: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: DisassociateCloudServicePublicIpRequest, + options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, + ) => PollerLike, PublicIPAddress>; + /** @deprecated use disassociateCloudServiceReservedPublicIp instead */ + beginDisassociateCloudServiceReservedPublicIp: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: DisassociateCloudServicePublicIpRequest, + options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, + ) => Promise, PublicIPAddress>>; + /** @deprecated use disassociateCloudServiceReservedPublicIp instead */ + beginDisassociateCloudServiceReservedPublicIpAndWait: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: DisassociateCloudServicePublicIpRequest, + options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, + ) => Promise; + /** Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic. */ + reserveCloudServicePublicIpAddress: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: ReserveCloudServicePublicIpAddressRequest, + options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, + ) => PollerLike, PublicIPAddress>; + /** @deprecated use reserveCloudServicePublicIpAddress instead */ + beginReserveCloudServicePublicIpAddress: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: ReserveCloudServicePublicIpAddressRequest, + options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, + ) => Promise, PublicIPAddress>>; + /** @deprecated use reserveCloudServicePublicIpAddress instead */ + beginReserveCloudServicePublicIpAddressAndWait: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: ReserveCloudServicePublicIpAddressRequest, + options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, + ) => Promise; + /** Gets the Ddos Protection Status of a Public IP Address */ + ddosProtectionStatus: ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDdosProtectionStatusOptionalParams, + ) => PollerLike< + OperationState, + PublicIpDdosProtectionStatusResult + >; + /** @deprecated use ddosProtectionStatus instead */ + beginDdosProtectionStatus: ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDdosProtectionStatusOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + PublicIpDdosProtectionStatusResult + > + >; + /** @deprecated use ddosProtectionStatus instead */ + beginDdosProtectionStatusAndWait: ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDdosProtectionStatusOptionalParams, + ) => Promise; + /** Gets all the public IP addresses in a subscription. */ + listAll: ( + options?: PublicIPAddressesListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all public IP addresses in a resource group. */ + list: ( + resourceGroupName: string, + options?: PublicIPAddressesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified public IP address. */ + delete: ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDeleteOptionalParams, + ) => Promise; + /** Updates public IP address tags. */ + updateTags: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: TagsObject, + options?: PublicIPAddressesUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a static or dynamic public IP address. */ + createOrUpdate: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: PublicIPAddress, + options?: PublicIPAddressesCreateOrUpdateOptionalParams, + ) => PollerLike, PublicIPAddress>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: PublicIPAddress, + options?: PublicIPAddressesCreateOrUpdateOptionalParams, + ) => Promise, PublicIPAddress>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: PublicIPAddress, + options?: PublicIPAddressesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified public IP address in a specified resource group. */ + get: ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesGetOptionalParams, + ) => Promise; + /** Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. */ + listVirtualMachineScaleSetVMPublicIPAddresses: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + options?: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get the specified public IP address in a virtual machine scale set. */ + getVirtualMachineScaleSetPublicIPAddress: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + publicIpAddressName: string, + options?: PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams, + ) => Promise; + /** Gets information about all public IP addresses in a role instance IP configuration in a cloud service. */ + listCloudServiceRoleInstancePublicIPAddresses: ( + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + ipConfigurationName: string, + options?: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get the specified public IP address in a cloud service. */ + getCloudServicePublicIPAddress: ( + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + ipConfigurationName: string, + publicIpAddressName: string, + options?: PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams, + ) => Promise; +} + +function _getPublicIPAddresses(context: NetworkManagementContext) { + return { + listVirtualMachineScaleSetPublicIPAddresses: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + options?: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, + ) => + listVirtualMachineScaleSetPublicIPAddresses( + context, + resourceGroupName, + virtualMachineScaleSetName, + options, + ), + listCloudServicePublicIPAddresses: ( + resourceGroupName: string, + cloudServiceName: string, + options?: PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, + ) => listCloudServicePublicIPAddresses(context, resourceGroupName, cloudServiceName, options), + disassociateCloudServiceReservedPublicIp: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: DisassociateCloudServicePublicIpRequest, + options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, + ) => + disassociateCloudServiceReservedPublicIp( + context, + resourceGroupName, + publicIpAddressName, + parameters, + options, + ), + beginDisassociateCloudServiceReservedPublicIp: async ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: DisassociateCloudServicePublicIpRequest, + options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, + ) => { + const poller = disassociateCloudServiceReservedPublicIp( + context, + resourceGroupName, + publicIpAddressName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDisassociateCloudServiceReservedPublicIpAndWait: async ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: DisassociateCloudServicePublicIpRequest, + options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, + ) => { + return await disassociateCloudServiceReservedPublicIp( + context, + resourceGroupName, + publicIpAddressName, + parameters, + options, + ); + }, + reserveCloudServicePublicIpAddress: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: ReserveCloudServicePublicIpAddressRequest, + options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, + ) => + reserveCloudServicePublicIpAddress( + context, + resourceGroupName, + publicIpAddressName, + parameters, + options, + ), + beginReserveCloudServicePublicIpAddress: async ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: ReserveCloudServicePublicIpAddressRequest, + options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, + ) => { + const poller = reserveCloudServicePublicIpAddress( + context, + resourceGroupName, + publicIpAddressName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginReserveCloudServicePublicIpAddressAndWait: async ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: ReserveCloudServicePublicIpAddressRequest, + options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, + ) => { + return await reserveCloudServicePublicIpAddress( + context, + resourceGroupName, + publicIpAddressName, + parameters, + options, + ); + }, + ddosProtectionStatus: ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDdosProtectionStatusOptionalParams, + ) => ddosProtectionStatus(context, resourceGroupName, publicIpAddressName, options), + beginDdosProtectionStatus: async ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDdosProtectionStatusOptionalParams, + ) => { + const poller = ddosProtectionStatus(context, resourceGroupName, publicIpAddressName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDdosProtectionStatusAndWait: async ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDdosProtectionStatusOptionalParams, + ) => { + return await ddosProtectionStatus(context, resourceGroupName, publicIpAddressName, options); + }, + listAll: (options?: PublicIPAddressesListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: PublicIPAddressesListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, publicIpAddressName, options), + beginDelete: async ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, publicIpAddressName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, publicIpAddressName, options); + }, + updateTags: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: TagsObject, + options?: PublicIPAddressesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, publicIpAddressName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: PublicIPAddress, + options?: PublicIPAddressesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, publicIpAddressName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: PublicIPAddress, + options?: PublicIPAddressesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + publicIpAddressName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + publicIpAddressName: string, + parameters: PublicIPAddress, + options?: PublicIPAddressesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + publicIpAddressName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + publicIpAddressName: string, + options?: PublicIPAddressesGetOptionalParams, + ) => get(context, resourceGroupName, publicIpAddressName, options), + listVirtualMachineScaleSetVMPublicIPAddresses: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + options?: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, + ) => + listVirtualMachineScaleSetVMPublicIPAddresses( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + networkInterfaceName, + ipConfigurationName, + options, + ), + getVirtualMachineScaleSetPublicIPAddress: ( + resourceGroupName: string, + virtualMachineScaleSetName: string, + virtualmachineIndex: string, + networkInterfaceName: string, + ipConfigurationName: string, + publicIpAddressName: string, + options?: PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams, + ) => + getVirtualMachineScaleSetPublicIPAddress( + context, + resourceGroupName, + virtualMachineScaleSetName, + virtualmachineIndex, + networkInterfaceName, + ipConfigurationName, + publicIpAddressName, + options, + ), + listCloudServiceRoleInstancePublicIPAddresses: ( + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + ipConfigurationName: string, + options?: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, + ) => + listCloudServiceRoleInstancePublicIPAddresses( + context, + resourceGroupName, + cloudServiceName, + roleInstanceName, + networkInterfaceName, + ipConfigurationName, + options, + ), + getCloudServicePublicIPAddress: ( + resourceGroupName: string, + cloudServiceName: string, + roleInstanceName: string, + networkInterfaceName: string, + ipConfigurationName: string, + publicIpAddressName: string, + options?: PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams, + ) => + getCloudServicePublicIPAddress( + context, + resourceGroupName, + cloudServiceName, + roleInstanceName, + networkInterfaceName, + ipConfigurationName, + publicIpAddressName, + options, + ), + }; +} + +export function _getPublicIPAddressesOperations( + context: NetworkManagementContext, +): PublicIPAddressesOperations { + return { + ..._getPublicIPAddresses(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/publicIPPrefixes/index.ts b/sdk/network/arm-network/src/classic/publicIPPrefixes/index.ts new file mode 100644 index 000000000000..58a02ec90680 --- /dev/null +++ b/sdk/network/arm-network/src/classic/publicIPPrefixes/index.ts @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/publicIPPrefixes/operations.js"; +import { + PublicIPPrefixesListAllOptionalParams, + PublicIPPrefixesListOptionalParams, + PublicIPPrefixesDeleteOptionalParams, + PublicIPPrefixesUpdateTagsOptionalParams, + PublicIPPrefixesCreateOrUpdateOptionalParams, + PublicIPPrefixesGetOptionalParams, +} from "../../api/publicIPPrefixes/options.js"; +import { TagsObject, PublicIPPrefix } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PublicIPPrefixes operations. */ +export interface PublicIPPrefixesOperations { + /** Gets all the public IP prefixes in a subscription. */ + listAll: ( + options?: PublicIPPrefixesListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all public IP prefixes in a resource group. */ + list: ( + resourceGroupName: string, + options?: PublicIPPrefixesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified public IP prefix. */ + delete: ( + resourceGroupName: string, + publicIpPrefixName: string, + options?: PublicIPPrefixesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + publicIpPrefixName: string, + options?: PublicIPPrefixesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + publicIpPrefixName: string, + options?: PublicIPPrefixesDeleteOptionalParams, + ) => Promise; + /** Updates public IP prefix tags. */ + updateTags: ( + resourceGroupName: string, + publicIpPrefixName: string, + parameters: TagsObject, + options?: PublicIPPrefixesUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a static or dynamic public IP prefix. */ + createOrUpdate: ( + resourceGroupName: string, + publicIpPrefixName: string, + parameters: PublicIPPrefix, + options?: PublicIPPrefixesCreateOrUpdateOptionalParams, + ) => PollerLike, PublicIPPrefix>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + publicIpPrefixName: string, + parameters: PublicIPPrefix, + options?: PublicIPPrefixesCreateOrUpdateOptionalParams, + ) => Promise, PublicIPPrefix>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + publicIpPrefixName: string, + parameters: PublicIPPrefix, + options?: PublicIPPrefixesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified public IP prefix in a specified resource group. */ + get: ( + resourceGroupName: string, + publicIpPrefixName: string, + options?: PublicIPPrefixesGetOptionalParams, + ) => Promise; +} + +function _getPublicIPPrefixes(context: NetworkManagementContext) { + return { + listAll: (options?: PublicIPPrefixesListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: PublicIPPrefixesListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + publicIpPrefixName: string, + options?: PublicIPPrefixesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, publicIpPrefixName, options), + beginDelete: async ( + resourceGroupName: string, + publicIpPrefixName: string, + options?: PublicIPPrefixesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, publicIpPrefixName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + publicIpPrefixName: string, + options?: PublicIPPrefixesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, publicIpPrefixName, options); + }, + updateTags: ( + resourceGroupName: string, + publicIpPrefixName: string, + parameters: TagsObject, + options?: PublicIPPrefixesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, publicIpPrefixName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + publicIpPrefixName: string, + parameters: PublicIPPrefix, + options?: PublicIPPrefixesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, publicIpPrefixName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + publicIpPrefixName: string, + parameters: PublicIPPrefix, + options?: PublicIPPrefixesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + publicIpPrefixName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + publicIpPrefixName: string, + parameters: PublicIPPrefix, + options?: PublicIPPrefixesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + publicIpPrefixName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + publicIpPrefixName: string, + options?: PublicIPPrefixesGetOptionalParams, + ) => get(context, resourceGroupName, publicIpPrefixName, options), + }; +} + +export function _getPublicIPPrefixesOperations( + context: NetworkManagementContext, +): PublicIPPrefixesOperations { + return { + ..._getPublicIPPrefixes(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/reachabilityAnalysisIntents/index.ts b/sdk/network/arm-network/src/classic/reachabilityAnalysisIntents/index.ts new file mode 100644 index 000000000000..c8d8e478dd63 --- /dev/null +++ b/sdk/network/arm-network/src/classic/reachabilityAnalysisIntents/index.ts @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, create, get } from "../../api/reachabilityAnalysisIntents/operations.js"; +import { + ReachabilityAnalysisIntentsListOptionalParams, + ReachabilityAnalysisIntentsDeleteOptionalParams, + ReachabilityAnalysisIntentsCreateOptionalParams, + ReachabilityAnalysisIntentsGetOptionalParams, +} from "../../api/reachabilityAnalysisIntents/options.js"; +import { ReachabilityAnalysisIntent } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ReachabilityAnalysisIntents operations. */ +export interface ReachabilityAnalysisIntentsOperations { + /** Gets list of Reachability Analysis Intents . */ + list: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisIntentsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes Reachability Analysis Intent. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options?: ReachabilityAnalysisIntentsDeleteOptionalParams, + ) => Promise; + /** Creates Reachability Analysis Intent. */ + create: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + body: ReachabilityAnalysisIntent, + options?: ReachabilityAnalysisIntentsCreateOptionalParams, + ) => Promise; + /** Get the Reachability Analysis Intent. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options?: ReachabilityAnalysisIntentsGetOptionalParams, + ) => Promise; +} + +function _getReachabilityAnalysisIntents(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisIntentsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, workspaceName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options?: ReachabilityAnalysisIntentsDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + options, + ), + create: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + body: ReachabilityAnalysisIntent, + options?: ReachabilityAnalysisIntentsCreateOptionalParams, + ) => + create( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + body, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options?: ReachabilityAnalysisIntentsGetOptionalParams, + ) => + get( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + options, + ), + }; +} + +export function _getReachabilityAnalysisIntentsOperations( + context: NetworkManagementContext, +): ReachabilityAnalysisIntentsOperations { + return { + ..._getReachabilityAnalysisIntents(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/reachabilityAnalysisRuns/index.ts b/sdk/network/arm-network/src/classic/reachabilityAnalysisRuns/index.ts new file mode 100644 index 000000000000..06aac2ca1cae --- /dev/null +++ b/sdk/network/arm-network/src/classic/reachabilityAnalysisRuns/index.ts @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, create, get } from "../../api/reachabilityAnalysisRuns/operations.js"; +import { + ReachabilityAnalysisRunsListOptionalParams, + ReachabilityAnalysisRunsDeleteOptionalParams, + ReachabilityAnalysisRunsCreateOptionalParams, + ReachabilityAnalysisRunsGetOptionalParams, +} from "../../api/reachabilityAnalysisRuns/options.js"; +import { ReachabilityAnalysisRun } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ReachabilityAnalysisRuns operations. */ +export interface ReachabilityAnalysisRunsOperations { + /** Gets list of Reachability Analysis Runs. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisRunsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes Reachability Analysis Run. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsDeleteOptionalParams, + ) => Promise; + /** Creates Reachability Analysis Runs. */ + create: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + body: ReachabilityAnalysisRun, + options?: ReachabilityAnalysisRunsCreateOptionalParams, + ) => Promise; + /** Gets Reachability Analysis Run. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsGetOptionalParams, + ) => Promise; +} + +function _getReachabilityAnalysisRuns(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisRunsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, workspaceName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + options, + ), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + options, + ); + }, + create: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + body: ReachabilityAnalysisRun, + options?: ReachabilityAnalysisRunsCreateOptionalParams, + ) => + create( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + body, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsGetOptionalParams, + ) => + get( + context, + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + options, + ), + }; +} + +export function _getReachabilityAnalysisRunsOperations( + context: NetworkManagementContext, +): ReachabilityAnalysisRunsOperations { + return { + ..._getReachabilityAnalysisRuns(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/resourceNavigationLinks/index.ts b/sdk/network/arm-network/src/classic/resourceNavigationLinks/index.ts new file mode 100644 index 000000000000..6124f673b91e --- /dev/null +++ b/sdk/network/arm-network/src/classic/resourceNavigationLinks/index.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/resourceNavigationLinks/operations.js"; +import { ResourceNavigationLinksListOptionalParams } from "../../api/resourceNavigationLinks/options.js"; +import { ResourceNavigationLinksListResult } from "../../models/microsoft/network/models.js"; + +/** Interface representing a ResourceNavigationLinks operations. */ +export interface ResourceNavigationLinksOperations { + /** Gets a list of resource navigation links for a subnet. */ + list: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: ResourceNavigationLinksListOptionalParams, + ) => Promise; +} + +function _getResourceNavigationLinks(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: ResourceNavigationLinksListOptionalParams, + ) => list(context, resourceGroupName, virtualNetworkName, subnetName, options), + }; +} + +export function _getResourceNavigationLinksOperations( + context: NetworkManagementContext, +): ResourceNavigationLinksOperations { + return { + ..._getResourceNavigationLinks(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/routeFilterRules/index.ts b/sdk/network/arm-network/src/classic/routeFilterRules/index.ts new file mode 100644 index 000000000000..00e52d71a73d --- /dev/null +++ b/sdk/network/arm-network/src/classic/routeFilterRules/index.ts @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listByRouteFilter, + createOrUpdate, + get, + $delete, +} from "../../api/routeFilterRules/operations.js"; +import { + RouteFilterRulesListByRouteFilterOptionalParams, + RouteFilterRulesCreateOrUpdateOptionalParams, + RouteFilterRulesGetOptionalParams, + RouteFilterRulesDeleteOptionalParams, +} from "../../api/routeFilterRules/options.js"; +import { RouteFilterRule } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a RouteFilterRules operations. */ +export interface RouteFilterRulesOperations { + /** Gets all RouteFilterRules in a route filter. */ + listByRouteFilter: ( + resourceGroupName: string, + routeFilterName: string, + options?: RouteFilterRulesListByRouteFilterOptionalParams, + ) => PagedAsyncIterableIterator; + /** Creates or updates a route in the specified route filter. */ + createOrUpdate: ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + routeFilterRuleParameters: RouteFilterRule, + options?: RouteFilterRulesCreateOrUpdateOptionalParams, + ) => PollerLike, RouteFilterRule>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + routeFilterRuleParameters: RouteFilterRule, + options?: RouteFilterRulesCreateOrUpdateOptionalParams, + ) => Promise, RouteFilterRule>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + routeFilterRuleParameters: RouteFilterRule, + options?: RouteFilterRulesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified rule from a route filter. */ + get: ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options?: RouteFilterRulesGetOptionalParams, + ) => Promise; + /** Deletes the specified rule from a route filter. */ + delete: ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options?: RouteFilterRulesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options?: RouteFilterRulesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options?: RouteFilterRulesDeleteOptionalParams, + ) => Promise; +} + +function _getRouteFilterRules(context: NetworkManagementContext) { + return { + listByRouteFilter: ( + resourceGroupName: string, + routeFilterName: string, + options?: RouteFilterRulesListByRouteFilterOptionalParams, + ) => listByRouteFilter(context, resourceGroupName, routeFilterName, options), + createOrUpdate: ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + routeFilterRuleParameters: RouteFilterRule, + options?: RouteFilterRulesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + routeFilterName, + ruleName, + routeFilterRuleParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + routeFilterRuleParameters: RouteFilterRule, + options?: RouteFilterRulesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + routeFilterName, + ruleName, + routeFilterRuleParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + routeFilterRuleParameters: RouteFilterRule, + options?: RouteFilterRulesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + routeFilterName, + ruleName, + routeFilterRuleParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options?: RouteFilterRulesGetOptionalParams, + ) => get(context, resourceGroupName, routeFilterName, ruleName, options), + delete: ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options?: RouteFilterRulesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, routeFilterName, ruleName, options), + beginDelete: async ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options?: RouteFilterRulesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, routeFilterName, ruleName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + routeFilterName: string, + ruleName: string, + options?: RouteFilterRulesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, routeFilterName, ruleName, options); + }, + }; +} + +export function _getRouteFilterRulesOperations( + context: NetworkManagementContext, +): RouteFilterRulesOperations { + return { + ..._getRouteFilterRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/routeFilters/index.ts b/sdk/network/arm-network/src/classic/routeFilters/index.ts new file mode 100644 index 000000000000..aa110c95ddb6 --- /dev/null +++ b/sdk/network/arm-network/src/classic/routeFilters/index.ts @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/routeFilters/operations.js"; +import { + RouteFiltersListOptionalParams, + RouteFiltersListByResourceGroupOptionalParams, + RouteFiltersDeleteOptionalParams, + RouteFiltersUpdateTagsOptionalParams, + RouteFiltersCreateOrUpdateOptionalParams, + RouteFiltersGetOptionalParams, +} from "../../api/routeFilters/options.js"; +import { TagsObject, RouteFilter } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a RouteFilters operations. */ +export interface RouteFiltersOperations { + /** Gets all route filters in a subscription. */ + list: (options?: RouteFiltersListOptionalParams) => PagedAsyncIterableIterator; + /** Gets all route filters in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: RouteFiltersListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified route filter. */ + delete: ( + resourceGroupName: string, + routeFilterName: string, + options?: RouteFiltersDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + routeFilterName: string, + options?: RouteFiltersDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + routeFilterName: string, + options?: RouteFiltersDeleteOptionalParams, + ) => Promise; + /** Updates tags of a route filter. */ + updateTags: ( + resourceGroupName: string, + routeFilterName: string, + parameters: TagsObject, + options?: RouteFiltersUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a route filter in a specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + routeFilterName: string, + routeFilterParameters: RouteFilter, + options?: RouteFiltersCreateOrUpdateOptionalParams, + ) => PollerLike, RouteFilter>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + routeFilterName: string, + routeFilterParameters: RouteFilter, + options?: RouteFiltersCreateOrUpdateOptionalParams, + ) => Promise, RouteFilter>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + routeFilterName: string, + routeFilterParameters: RouteFilter, + options?: RouteFiltersCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified route filter. */ + get: ( + resourceGroupName: string, + routeFilterName: string, + options?: RouteFiltersGetOptionalParams, + ) => Promise; +} + +function _getRouteFilters(context: NetworkManagementContext) { + return { + list: (options?: RouteFiltersListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: RouteFiltersListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + routeFilterName: string, + options?: RouteFiltersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, routeFilterName, options), + beginDelete: async ( + resourceGroupName: string, + routeFilterName: string, + options?: RouteFiltersDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, routeFilterName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + routeFilterName: string, + options?: RouteFiltersDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, routeFilterName, options); + }, + updateTags: ( + resourceGroupName: string, + routeFilterName: string, + parameters: TagsObject, + options?: RouteFiltersUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, routeFilterName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + routeFilterName: string, + routeFilterParameters: RouteFilter, + options?: RouteFiltersCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, routeFilterName, routeFilterParameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + routeFilterName: string, + routeFilterParameters: RouteFilter, + options?: RouteFiltersCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + routeFilterName, + routeFilterParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + routeFilterName: string, + routeFilterParameters: RouteFilter, + options?: RouteFiltersCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + routeFilterName, + routeFilterParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + routeFilterName: string, + options?: RouteFiltersGetOptionalParams, + ) => get(context, resourceGroupName, routeFilterName, options), + }; +} + +export function _getRouteFiltersOperations( + context: NetworkManagementContext, +): RouteFiltersOperations { + return { + ..._getRouteFilters(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/routeMaps/index.ts b/sdk/network/arm-network/src/classic/routeMaps/index.ts new file mode 100644 index 000000000000..e273437eb311 --- /dev/null +++ b/sdk/network/arm-network/src/classic/routeMaps/index.ts @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/routeMaps/operations.js"; +import { + RouteMapsListOptionalParams, + RouteMapsDeleteOptionalParams, + RouteMapsCreateOrUpdateOptionalParams, + RouteMapsGetOptionalParams, +} from "../../api/routeMaps/options.js"; +import { RouteMap } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a RouteMaps operations. */ +export interface RouteMapsOperations { + /** Retrieves the details of all RouteMaps. */ + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: RouteMapsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a RouteMap. */ + delete: ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options?: RouteMapsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options?: RouteMapsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options?: RouteMapsDeleteOptionalParams, + ) => Promise; + /** Creates a RouteMap if it doesn't exist else updates the existing one. */ + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + routeMapParameters: RouteMap, + options?: RouteMapsCreateOrUpdateOptionalParams, + ) => PollerLike, RouteMap>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + routeMapParameters: RouteMap, + options?: RouteMapsCreateOrUpdateOptionalParams, + ) => Promise, RouteMap>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + routeMapParameters: RouteMap, + options?: RouteMapsCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a RouteMap. */ + get: ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options?: RouteMapsGetOptionalParams, + ) => Promise; +} + +function _getRouteMaps(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: RouteMapsListOptionalParams, + ) => list(context, resourceGroupName, virtualHubName, options), + delete: ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options?: RouteMapsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualHubName, routeMapName, options), + beginDelete: async ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options?: RouteMapsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualHubName, routeMapName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options?: RouteMapsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualHubName, routeMapName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + routeMapParameters: RouteMap, + options?: RouteMapsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routeMapName, + routeMapParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + routeMapParameters: RouteMap, + options?: RouteMapsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routeMapName, + routeMapParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + routeMapParameters: RouteMap, + options?: RouteMapsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routeMapName, + routeMapParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualHubName: string, + routeMapName: string, + options?: RouteMapsGetOptionalParams, + ) => get(context, resourceGroupName, virtualHubName, routeMapName, options), + }; +} + +export function _getRouteMapsOperations(context: NetworkManagementContext): RouteMapsOperations { + return { + ..._getRouteMaps(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/routeTables/index.ts b/sdk/network/arm-network/src/classic/routeTables/index.ts new file mode 100644 index 000000000000..c71afa50566a --- /dev/null +++ b/sdk/network/arm-network/src/classic/routeTables/index.ts @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/routeTables/operations.js"; +import { + RouteTablesListAllOptionalParams, + RouteTablesListOptionalParams, + RouteTablesDeleteOptionalParams, + RouteTablesUpdateTagsOptionalParams, + RouteTablesCreateOrUpdateOptionalParams, + RouteTablesGetOptionalParams, +} from "../../api/routeTables/options.js"; +import { RouteTable } from "../../models/common/models.js"; +import { TagsObject } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a RouteTables operations. */ +export interface RouteTablesOperations { + /** Gets all route tables in a subscription. */ + listAll: (options?: RouteTablesListAllOptionalParams) => PagedAsyncIterableIterator; + /** Gets all route tables in a resource group. */ + list: ( + resourceGroupName: string, + options?: RouteTablesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified route table. */ + delete: ( + resourceGroupName: string, + routeTableName: string, + options?: RouteTablesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + routeTableName: string, + options?: RouteTablesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + routeTableName: string, + options?: RouteTablesDeleteOptionalParams, + ) => Promise; + /** Updates a route table tags. */ + updateTags: ( + resourceGroupName: string, + routeTableName: string, + parameters: TagsObject, + options?: RouteTablesUpdateTagsOptionalParams, + ) => Promise; + /** Create or updates a route table in a specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + routeTableName: string, + parameters: RouteTable, + options?: RouteTablesCreateOrUpdateOptionalParams, + ) => PollerLike, RouteTable>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + routeTableName: string, + parameters: RouteTable, + options?: RouteTablesCreateOrUpdateOptionalParams, + ) => Promise, RouteTable>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + routeTableName: string, + parameters: RouteTable, + options?: RouteTablesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified route table. */ + get: ( + resourceGroupName: string, + routeTableName: string, + options?: RouteTablesGetOptionalParams, + ) => Promise; +} + +function _getRouteTables(context: NetworkManagementContext) { + return { + listAll: (options?: RouteTablesListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: RouteTablesListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + routeTableName: string, + options?: RouteTablesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, routeTableName, options), + beginDelete: async ( + resourceGroupName: string, + routeTableName: string, + options?: RouteTablesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, routeTableName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + routeTableName: string, + options?: RouteTablesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, routeTableName, options); + }, + updateTags: ( + resourceGroupName: string, + routeTableName: string, + parameters: TagsObject, + options?: RouteTablesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, routeTableName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + routeTableName: string, + parameters: RouteTable, + options?: RouteTablesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, routeTableName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + routeTableName: string, + parameters: RouteTable, + options?: RouteTablesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + routeTableName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + routeTableName: string, + parameters: RouteTable, + options?: RouteTablesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate(context, resourceGroupName, routeTableName, parameters, options); + }, + get: ( + resourceGroupName: string, + routeTableName: string, + options?: RouteTablesGetOptionalParams, + ) => get(context, resourceGroupName, routeTableName, options), + }; +} + +export function _getRouteTablesOperations( + context: NetworkManagementContext, +): RouteTablesOperations { + return { + ..._getRouteTables(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/routes/index.ts b/sdk/network/arm-network/src/classic/routes/index.ts new file mode 100644 index 000000000000..008c157c266d --- /dev/null +++ b/sdk/network/arm-network/src/classic/routes/index.ts @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/routes/operations.js"; +import { + RoutesListOptionalParams, + RoutesDeleteOptionalParams, + RoutesCreateOrUpdateOptionalParams, + RoutesGetOptionalParams, +} from "../../api/routes/options.js"; +import { Route } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Routes operations. */ +export interface RoutesOperations { + /** Gets all routes in a route table. */ + list: ( + resourceGroupName: string, + routeTableName: string, + options?: RoutesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified route from a route table. */ + delete: ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + options?: RoutesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + options?: RoutesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + options?: RoutesDeleteOptionalParams, + ) => Promise; + /** Creates or updates a route in the specified route table. */ + createOrUpdate: ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + routeParameters: Route, + options?: RoutesCreateOrUpdateOptionalParams, + ) => PollerLike, Route>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + routeParameters: Route, + options?: RoutesCreateOrUpdateOptionalParams, + ) => Promise, Route>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + routeParameters: Route, + options?: RoutesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified route from a route table. */ + get: ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + options?: RoutesGetOptionalParams, + ) => Promise; +} + +function _getRoutes(context: NetworkManagementContext) { + return { + list: (resourceGroupName: string, routeTableName: string, options?: RoutesListOptionalParams) => + list(context, resourceGroupName, routeTableName, options), + delete: ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + options?: RoutesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, routeTableName, routeName, options), + beginDelete: async ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + options?: RoutesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, routeTableName, routeName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + options?: RoutesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, routeTableName, routeName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + routeParameters: Route, + options?: RoutesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + routeTableName, + routeName, + routeParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + routeParameters: Route, + options?: RoutesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + routeTableName, + routeName, + routeParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + routeParameters: Route, + options?: RoutesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + routeTableName, + routeName, + routeParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + routeTableName: string, + routeName: string, + options?: RoutesGetOptionalParams, + ) => get(context, resourceGroupName, routeTableName, routeName, options), + }; +} + +export function _getRoutesOperations(context: NetworkManagementContext): RoutesOperations { + return { + ..._getRoutes(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/routingIntent/index.ts b/sdk/network/arm-network/src/classic/routingIntent/index.ts new file mode 100644 index 000000000000..6df071914f80 --- /dev/null +++ b/sdk/network/arm-network/src/classic/routingIntent/index.ts @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/routingIntent/operations.js"; +import { + RoutingIntentListOptionalParams, + RoutingIntentDeleteOptionalParams, + RoutingIntentCreateOrUpdateOptionalParams, + RoutingIntentGetOptionalParams, +} from "../../api/routingIntent/options.js"; +import { RoutingIntent } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a RoutingIntent operations. */ +export interface RoutingIntentOperations { + /** Retrieves the details of all RoutingIntent child resources of the VirtualHub. */ + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: RoutingIntentListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a RoutingIntent. */ + delete: ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options?: RoutingIntentDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options?: RoutingIntentDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options?: RoutingIntentDeleteOptionalParams, + ) => Promise; + /** Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. */ + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + routingIntentParameters: RoutingIntent, + options?: RoutingIntentCreateOrUpdateOptionalParams, + ) => PollerLike, RoutingIntent>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + routingIntentParameters: RoutingIntent, + options?: RoutingIntentCreateOrUpdateOptionalParams, + ) => Promise, RoutingIntent>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + routingIntentParameters: RoutingIntent, + options?: RoutingIntentCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a RoutingIntent. */ + get: ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options?: RoutingIntentGetOptionalParams, + ) => Promise; +} + +function _getRoutingIntent(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: RoutingIntentListOptionalParams, + ) => list(context, resourceGroupName, virtualHubName, options), + delete: ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options?: RoutingIntentDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualHubName, routingIntentName, options), + beginDelete: async ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options?: RoutingIntentDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + virtualHubName, + routingIntentName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options?: RoutingIntentDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualHubName, routingIntentName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + routingIntentParameters: RoutingIntent, + options?: RoutingIntentCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routingIntentName, + routingIntentParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + routingIntentParameters: RoutingIntent, + options?: RoutingIntentCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routingIntentName, + routingIntentParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + routingIntentParameters: RoutingIntent, + options?: RoutingIntentCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routingIntentName, + routingIntentParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualHubName: string, + routingIntentName: string, + options?: RoutingIntentGetOptionalParams, + ) => get(context, resourceGroupName, virtualHubName, routingIntentName, options), + }; +} + +export function _getRoutingIntentOperations( + context: NetworkManagementContext, +): RoutingIntentOperations { + return { + ..._getRoutingIntent(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/routingRuleCollections/index.ts b/sdk/network/arm-network/src/classic/routingRuleCollections/index.ts new file mode 100644 index 000000000000..921f0c9aee64 --- /dev/null +++ b/sdk/network/arm-network/src/classic/routingRuleCollections/index.ts @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/routingRuleCollections/operations.js"; +import { + RoutingRuleCollectionsListOptionalParams, + RoutingRuleCollectionsDeleteOptionalParams, + RoutingRuleCollectionsCreateOrUpdateOptionalParams, + RoutingRuleCollectionsGetOptionalParams, +} from "../../api/routingRuleCollections/options.js"; +import { RoutingRuleCollection } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a RoutingRuleCollections operations. */ +export interface RoutingRuleCollectionsOperations { + /** Lists all the rule collections in a routing configuration, in a paginated format. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: RoutingRuleCollectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an routing rule collection. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: RoutingRuleCollectionsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: RoutingRuleCollectionsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: RoutingRuleCollectionsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a routing rule collection. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleCollection: RoutingRuleCollection, + options?: RoutingRuleCollectionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets a network manager routing configuration rule collection. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: RoutingRuleCollectionsGetOptionalParams, + ) => Promise; +} + +function _getRoutingRuleCollections(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: RoutingRuleCollectionsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, configurationName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: RoutingRuleCollectionsDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: RoutingRuleCollectionsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: RoutingRuleCollectionsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleCollection: RoutingRuleCollection, + options?: RoutingRuleCollectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleCollection, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: RoutingRuleCollectionsGetOptionalParams, + ) => + get( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + }; +} + +export function _getRoutingRuleCollectionsOperations( + context: NetworkManagementContext, +): RoutingRuleCollectionsOperations { + return { + ..._getRoutingRuleCollections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/routingRules/index.ts b/sdk/network/arm-network/src/classic/routingRules/index.ts new file mode 100644 index 000000000000..acd1529c0756 --- /dev/null +++ b/sdk/network/arm-network/src/classic/routingRules/index.ts @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/routingRules/operations.js"; +import { + RoutingRulesListOptionalParams, + RoutingRulesDeleteOptionalParams, + RoutingRulesCreateOrUpdateOptionalParams, + RoutingRulesGetOptionalParams, +} from "../../api/routingRules/options.js"; +import { RoutingRule } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a RoutingRules operations. */ +export interface RoutingRulesOperations { + /** List all network manager routing configuration routing rules. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: RoutingRulesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a routing rule. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: RoutingRulesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: RoutingRulesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: RoutingRulesDeleteOptionalParams, + ) => Promise; + /** Creates or updates an routing rule. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + routingRule: RoutingRule, + options?: RoutingRulesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets a network manager routing configuration routing rule. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: RoutingRulesGetOptionalParams, + ) => Promise; +} + +function _getRoutingRules(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: RoutingRulesListOptionalParams, + ) => + list( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: RoutingRulesDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: RoutingRulesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: RoutingRulesDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + routingRule: RoutingRule, + options?: RoutingRulesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + routingRule, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: RoutingRulesGetOptionalParams, + ) => + get( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ), + }; +} + +export function _getRoutingRulesOperations( + context: NetworkManagementContext, +): RoutingRulesOperations { + return { + ..._getRoutingRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/scopeConnections/index.ts b/sdk/network/arm-network/src/classic/scopeConnections/index.ts new file mode 100644 index 000000000000..669d1e1b99c2 --- /dev/null +++ b/sdk/network/arm-network/src/classic/scopeConnections/index.ts @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/scopeConnections/operations.js"; +import { + ScopeConnectionsListOptionalParams, + ScopeConnectionsDeleteOptionalParams, + ScopeConnectionsCreateOrUpdateOptionalParams, + ScopeConnectionsGetOptionalParams, +} from "../../api/scopeConnections/options.js"; +import { ScopeConnection } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ScopeConnections operations. */ +export interface ScopeConnectionsOperations { + /** List all scope connections created by this network manager. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: ScopeConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the pending scope connection created by this network manager. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + options?: ScopeConnectionsDeleteOptionalParams, + ) => Promise; + /** Creates or updates scope connection from Network Manager */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + parameters: ScopeConnection, + options?: ScopeConnectionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get specified scope connection created by this Network Manager. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + options?: ScopeConnectionsGetOptionalParams, + ) => Promise; +} + +function _getScopeConnections(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: ScopeConnectionsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + options?: ScopeConnectionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkManagerName, scopeConnectionName, options), + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + parameters: ScopeConnection, + options?: ScopeConnectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + scopeConnectionName, + parameters, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + scopeConnectionName: string, + options?: ScopeConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, networkManagerName, scopeConnectionName, options), + }; +} + +export function _getScopeConnectionsOperations( + context: NetworkManagementContext, +): ScopeConnectionsOperations { + return { + ..._getScopeConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/securityAdminConfigurations/index.ts b/sdk/network/arm-network/src/classic/securityAdminConfigurations/index.ts new file mode 100644 index 000000000000..31f70582b0d3 --- /dev/null +++ b/sdk/network/arm-network/src/classic/securityAdminConfigurations/index.ts @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/securityAdminConfigurations/operations.js"; +import { + SecurityAdminConfigurationsListOptionalParams, + SecurityAdminConfigurationsDeleteOptionalParams, + SecurityAdminConfigurationsCreateOrUpdateOptionalParams, + SecurityAdminConfigurationsGetOptionalParams, +} from "../../api/securityAdminConfigurations/options.js"; +import { SecurityAdminConfiguration } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a SecurityAdminConfigurations operations. */ +export interface SecurityAdminConfigurationsOperations { + /** Lists all the network manager security admin configurations in a network manager, in a paginated format. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: SecurityAdminConfigurationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a network manager security admin configuration. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityAdminConfigurationsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityAdminConfigurationsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityAdminConfigurationsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a network manager security admin configuration. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + securityAdminConfiguration: SecurityAdminConfiguration, + options?: SecurityAdminConfigurationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves a network manager security admin configuration. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityAdminConfigurationsGetOptionalParams, + ) => Promise; +} + +function _getSecurityAdminConfigurations(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: SecurityAdminConfigurationsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityAdminConfigurationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkManagerName, configurationName, options), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityAdminConfigurationsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityAdminConfigurationsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + securityAdminConfiguration: SecurityAdminConfiguration, + options?: SecurityAdminConfigurationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + configurationName, + securityAdminConfiguration, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityAdminConfigurationsGetOptionalParams, + ) => get(context, resourceGroupName, networkManagerName, configurationName, options), + }; +} + +export function _getSecurityAdminConfigurationsOperations( + context: NetworkManagementContext, +): SecurityAdminConfigurationsOperations { + return { + ..._getSecurityAdminConfigurations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/securityPartnerProviders/index.ts b/sdk/network/arm-network/src/classic/securityPartnerProviders/index.ts new file mode 100644 index 000000000000..de979e044baa --- /dev/null +++ b/sdk/network/arm-network/src/classic/securityPartnerProviders/index.ts @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/securityPartnerProviders/operations.js"; +import { + SecurityPartnerProvidersListOptionalParams, + SecurityPartnerProvidersListByResourceGroupOptionalParams, + SecurityPartnerProvidersDeleteOptionalParams, + SecurityPartnerProvidersUpdateTagsOptionalParams, + SecurityPartnerProvidersCreateOrUpdateOptionalParams, + SecurityPartnerProvidersGetOptionalParams, +} from "../../api/securityPartnerProviders/options.js"; +import { TagsObject, SecurityPartnerProvider } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a SecurityPartnerProviders operations. */ +export interface SecurityPartnerProvidersOperations { + /** Gets all the Security Partner Providers in a subscription. */ + list: ( + options?: SecurityPartnerProvidersListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists all Security Partner Providers in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: SecurityPartnerProvidersListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Security Partner Provider. */ + delete: ( + resourceGroupName: string, + securityPartnerProviderName: string, + options?: SecurityPartnerProvidersDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + securityPartnerProviderName: string, + options?: SecurityPartnerProvidersDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + securityPartnerProviderName: string, + options?: SecurityPartnerProvidersDeleteOptionalParams, + ) => Promise; + /** Updates tags of a Security Partner Provider resource. */ + updateTags: ( + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: TagsObject, + options?: SecurityPartnerProvidersUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates the specified Security Partner Provider. */ + createOrUpdate: ( + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: SecurityPartnerProvider, + options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams, + ) => PollerLike, SecurityPartnerProvider>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: SecurityPartnerProvider, + options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams, + ) => Promise, SecurityPartnerProvider>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: SecurityPartnerProvider, + options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified Security Partner Provider. */ + get: ( + resourceGroupName: string, + securityPartnerProviderName: string, + options?: SecurityPartnerProvidersGetOptionalParams, + ) => Promise; +} + +function _getSecurityPartnerProviders(context: NetworkManagementContext) { + return { + list: (options?: SecurityPartnerProvidersListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: SecurityPartnerProvidersListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + securityPartnerProviderName: string, + options?: SecurityPartnerProvidersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, securityPartnerProviderName, options), + beginDelete: async ( + resourceGroupName: string, + securityPartnerProviderName: string, + options?: SecurityPartnerProvidersDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, securityPartnerProviderName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + securityPartnerProviderName: string, + options?: SecurityPartnerProvidersDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, securityPartnerProviderName, options); + }, + updateTags: ( + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: TagsObject, + options?: SecurityPartnerProvidersUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, securityPartnerProviderName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: SecurityPartnerProvider, + options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, securityPartnerProviderName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: SecurityPartnerProvider, + options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + securityPartnerProviderName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + securityPartnerProviderName: string, + parameters: SecurityPartnerProvider, + options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + securityPartnerProviderName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + securityPartnerProviderName: string, + options?: SecurityPartnerProvidersGetOptionalParams, + ) => get(context, resourceGroupName, securityPartnerProviderName, options), + }; +} + +export function _getSecurityPartnerProvidersOperations( + context: NetworkManagementContext, +): SecurityPartnerProvidersOperations { + return { + ..._getSecurityPartnerProviders(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/securityRules/index.ts b/sdk/network/arm-network/src/classic/securityRules/index.ts new file mode 100644 index 000000000000..d8613378bb83 --- /dev/null +++ b/sdk/network/arm-network/src/classic/securityRules/index.ts @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/securityRules/operations.js"; +import { + SecurityRulesListOptionalParams, + SecurityRulesDeleteOptionalParams, + SecurityRulesCreateOrUpdateOptionalParams, + SecurityRulesGetOptionalParams, +} from "../../api/securityRules/options.js"; +import { SecurityRule } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a SecurityRules operations. */ +export interface SecurityRulesOperations { + /** Gets all security rules in a network security group. */ + list: ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: SecurityRulesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified network security rule. */ + delete: ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options?: SecurityRulesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options?: SecurityRulesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options?: SecurityRulesDeleteOptionalParams, + ) => Promise; + /** Creates or updates a security rule in the specified network security group. */ + createOrUpdate: ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + securityRuleParameters: SecurityRule, + options?: SecurityRulesCreateOrUpdateOptionalParams, + ) => PollerLike, SecurityRule>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + securityRuleParameters: SecurityRule, + options?: SecurityRulesCreateOrUpdateOptionalParams, + ) => Promise, SecurityRule>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + securityRuleParameters: SecurityRule, + options?: SecurityRulesCreateOrUpdateOptionalParams, + ) => Promise; + /** Get the specified network security rule. */ + get: ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options?: SecurityRulesGetOptionalParams, + ) => Promise; +} + +function _getSecurityRules(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkSecurityGroupName: string, + options?: SecurityRulesListOptionalParams, + ) => list(context, resourceGroupName, networkSecurityGroupName, options), + delete: ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options?: SecurityRulesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkSecurityGroupName, securityRuleName, options), + beginDelete: async ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options?: SecurityRulesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkSecurityGroupName, + securityRuleName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options?: SecurityRulesDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkSecurityGroupName, + securityRuleName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + securityRuleParameters: SecurityRule, + options?: SecurityRulesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkSecurityGroupName, + securityRuleName, + securityRuleParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + securityRuleParameters: SecurityRule, + options?: SecurityRulesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkSecurityGroupName, + securityRuleName, + securityRuleParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + securityRuleParameters: SecurityRule, + options?: SecurityRulesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkSecurityGroupName, + securityRuleName, + securityRuleParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + networkSecurityGroupName: string, + securityRuleName: string, + options?: SecurityRulesGetOptionalParams, + ) => get(context, resourceGroupName, networkSecurityGroupName, securityRuleName, options), + }; +} + +export function _getSecurityRulesOperations( + context: NetworkManagementContext, +): SecurityRulesOperations { + return { + ..._getSecurityRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/securityUserConfigurations/index.ts b/sdk/network/arm-network/src/classic/securityUserConfigurations/index.ts new file mode 100644 index 000000000000..ca93ed8b6ffe --- /dev/null +++ b/sdk/network/arm-network/src/classic/securityUserConfigurations/index.ts @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/securityUserConfigurations/operations.js"; +import { + SecurityUserConfigurationsListOptionalParams, + SecurityUserConfigurationsDeleteOptionalParams, + SecurityUserConfigurationsCreateOrUpdateOptionalParams, + SecurityUserConfigurationsGetOptionalParams, +} from "../../api/securityUserConfigurations/options.js"; +import { SecurityUserConfiguration } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a SecurityUserConfigurations operations. */ +export interface SecurityUserConfigurationsOperations { + /** Lists all the network manager security user configurations in a network manager, in a paginated format. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: SecurityUserConfigurationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a network manager security user configuration. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityUserConfigurationsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityUserConfigurationsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityUserConfigurationsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a network manager security user configuration. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + securityUserConfiguration: SecurityUserConfiguration, + options?: SecurityUserConfigurationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves a network manager security user configuration. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityUserConfigurationsGetOptionalParams, + ) => Promise; +} + +function _getSecurityUserConfigurations(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: SecurityUserConfigurationsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityUserConfigurationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkManagerName, configurationName, options), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityUserConfigurationsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityUserConfigurationsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + securityUserConfiguration: SecurityUserConfiguration, + options?: SecurityUserConfigurationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + configurationName, + securityUserConfiguration, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityUserConfigurationsGetOptionalParams, + ) => get(context, resourceGroupName, networkManagerName, configurationName, options), + }; +} + +export function _getSecurityUserConfigurationsOperations( + context: NetworkManagementContext, +): SecurityUserConfigurationsOperations { + return { + ..._getSecurityUserConfigurations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/securityUserRuleCollections/index.ts b/sdk/network/arm-network/src/classic/securityUserRuleCollections/index.ts new file mode 100644 index 000000000000..f2bc21e4be2e --- /dev/null +++ b/sdk/network/arm-network/src/classic/securityUserRuleCollections/index.ts @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/securityUserRuleCollections/operations.js"; +import { + SecurityUserRuleCollectionsListOptionalParams, + SecurityUserRuleCollectionsDeleteOptionalParams, + SecurityUserRuleCollectionsCreateOrUpdateOptionalParams, + SecurityUserRuleCollectionsGetOptionalParams, +} from "../../api/securityUserRuleCollections/options.js"; +import { SecurityUserRuleCollection } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a SecurityUserRuleCollections operations. */ +export interface SecurityUserRuleCollectionsOperations { + /** Lists all the security user rule collections in a security configuration, in a paginated format. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityUserRuleCollectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a Security User Rule collection. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: SecurityUserRuleCollectionsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: SecurityUserRuleCollectionsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: SecurityUserRuleCollectionsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a security user rule collection. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + securityUserRuleCollection: SecurityUserRuleCollection, + options?: SecurityUserRuleCollectionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets a network manager security user configuration rule collection. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: SecurityUserRuleCollectionsGetOptionalParams, + ) => Promise; +} + +function _getSecurityUserRuleCollections(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + options?: SecurityUserRuleCollectionsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, configurationName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: SecurityUserRuleCollectionsDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: SecurityUserRuleCollectionsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: SecurityUserRuleCollectionsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + securityUserRuleCollection: SecurityUserRuleCollection, + options?: SecurityUserRuleCollectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + securityUserRuleCollection, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: SecurityUserRuleCollectionsGetOptionalParams, + ) => + get( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + }; +} + +export function _getSecurityUserRuleCollectionsOperations( + context: NetworkManagementContext, +): SecurityUserRuleCollectionsOperations { + return { + ..._getSecurityUserRuleCollections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/securityUserRules/index.ts b/sdk/network/arm-network/src/classic/securityUserRules/index.ts new file mode 100644 index 000000000000..80d77d9c52ea --- /dev/null +++ b/sdk/network/arm-network/src/classic/securityUserRules/index.ts @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/securityUserRules/operations.js"; +import { + SecurityUserRulesListOptionalParams, + SecurityUserRulesDeleteOptionalParams, + SecurityUserRulesCreateOrUpdateOptionalParams, + SecurityUserRulesGetOptionalParams, +} from "../../api/securityUserRules/options.js"; +import { SecurityUserRule } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a SecurityUserRules operations. */ +export interface SecurityUserRulesOperations { + /** Lists all Security User Rules in a rule collection. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: SecurityUserRulesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a security user rule. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: SecurityUserRulesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: SecurityUserRulesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: SecurityUserRulesDeleteOptionalParams, + ) => Promise; + /** Creates or updates a security user rule. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + securityUserRule: SecurityUserRule, + options?: SecurityUserRulesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets a security user rule. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: SecurityUserRulesGetOptionalParams, + ) => Promise; +} + +function _getSecurityUserRules(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + options?: SecurityUserRulesListOptionalParams, + ) => + list( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + options, + ), + delete: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: SecurityUserRulesDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: SecurityUserRulesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: SecurityUserRulesDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + securityUserRule: SecurityUserRule, + options?: SecurityUserRulesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + securityUserRule, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + configurationName: string, + ruleCollectionName: string, + ruleName: string, + options?: SecurityUserRulesGetOptionalParams, + ) => + get( + context, + resourceGroupName, + networkManagerName, + configurationName, + ruleCollectionName, + ruleName, + options, + ), + }; +} + +export function _getSecurityUserRulesOperations( + context: NetworkManagementContext, +): SecurityUserRulesOperations { + return { + ..._getSecurityUserRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/serviceAssociationLinks/index.ts b/sdk/network/arm-network/src/classic/serviceAssociationLinks/index.ts new file mode 100644 index 000000000000..ac6f4ab377b7 --- /dev/null +++ b/sdk/network/arm-network/src/classic/serviceAssociationLinks/index.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/serviceAssociationLinks/operations.js"; +import { ServiceAssociationLinksListOptionalParams } from "../../api/serviceAssociationLinks/options.js"; +import { ServiceAssociationLinksListResult } from "../../models/microsoft/network/models.js"; + +/** Interface representing a ServiceAssociationLinks operations. */ +export interface ServiceAssociationLinksOperations { + /** Gets a list of service association links for a subnet. */ + list: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: ServiceAssociationLinksListOptionalParams, + ) => Promise; +} + +function _getServiceAssociationLinks(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: ServiceAssociationLinksListOptionalParams, + ) => list(context, resourceGroupName, virtualNetworkName, subnetName, options), + }; +} + +export function _getServiceAssociationLinksOperations( + context: NetworkManagementContext, +): ServiceAssociationLinksOperations { + return { + ..._getServiceAssociationLinks(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/serviceEndpointPolicies/index.ts b/sdk/network/arm-network/src/classic/serviceEndpointPolicies/index.ts new file mode 100644 index 000000000000..7249f2c4429c --- /dev/null +++ b/sdk/network/arm-network/src/classic/serviceEndpointPolicies/index.ts @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/serviceEndpointPolicies/operations.js"; +import { + ServiceEndpointPoliciesListOptionalParams, + ServiceEndpointPoliciesListByResourceGroupOptionalParams, + ServiceEndpointPoliciesDeleteOptionalParams, + ServiceEndpointPoliciesUpdateTagsOptionalParams, + ServiceEndpointPoliciesCreateOrUpdateOptionalParams, + ServiceEndpointPoliciesGetOptionalParams, +} from "../../api/serviceEndpointPolicies/options.js"; +import { ServiceEndpointPolicy } from "../../models/common/models.js"; +import { TagsObject } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ServiceEndpointPolicies operations. */ +export interface ServiceEndpointPoliciesOperations { + /** Gets all the service endpoint policies in a subscription. */ + list: ( + options?: ServiceEndpointPoliciesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all service endpoint Policies in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: ServiceEndpointPoliciesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified service endpoint policy. */ + delete: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + options?: ServiceEndpointPoliciesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + options?: ServiceEndpointPoliciesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + options?: ServiceEndpointPoliciesDeleteOptionalParams, + ) => Promise; + /** Updates tags of a service endpoint policy. */ + updateTags: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: TagsObject, + options?: ServiceEndpointPoliciesUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a service Endpoint Policies. */ + createOrUpdate: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: ServiceEndpointPolicy, + options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams, + ) => PollerLike, ServiceEndpointPolicy>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: ServiceEndpointPolicy, + options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams, + ) => Promise, ServiceEndpointPolicy>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: ServiceEndpointPolicy, + options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified service Endpoint Policies in a specified resource group. */ + get: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + options?: ServiceEndpointPoliciesGetOptionalParams, + ) => Promise; +} + +function _getServiceEndpointPolicies(context: NetworkManagementContext) { + return { + list: (options?: ServiceEndpointPoliciesListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: ServiceEndpointPoliciesListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + options?: ServiceEndpointPoliciesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceEndpointPolicyName, options), + beginDelete: async ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + options?: ServiceEndpointPoliciesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, serviceEndpointPolicyName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + options?: ServiceEndpointPoliciesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, serviceEndpointPolicyName, options); + }, + updateTags: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: TagsObject, + options?: ServiceEndpointPoliciesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, serviceEndpointPolicyName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: ServiceEndpointPolicy, + options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceEndpointPolicyName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: ServiceEndpointPolicy, + options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceEndpointPolicyName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + parameters: ServiceEndpointPolicy, + options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceEndpointPolicyName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + options?: ServiceEndpointPoliciesGetOptionalParams, + ) => get(context, resourceGroupName, serviceEndpointPolicyName, options), + }; +} + +export function _getServiceEndpointPoliciesOperations( + context: NetworkManagementContext, +): ServiceEndpointPoliciesOperations { + return { + ..._getServiceEndpointPolicies(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/serviceEndpointPolicyDefinitions/index.ts b/sdk/network/arm-network/src/classic/serviceEndpointPolicyDefinitions/index.ts new file mode 100644 index 000000000000..4307e340f56e --- /dev/null +++ b/sdk/network/arm-network/src/classic/serviceEndpointPolicyDefinitions/index.ts @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listByResourceGroup, + $delete, + createOrUpdate, + get, +} from "../../api/serviceEndpointPolicyDefinitions/operations.js"; +import { + ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, + ServiceEndpointPolicyDefinitionsDeleteOptionalParams, + ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, + ServiceEndpointPolicyDefinitionsGetOptionalParams, +} from "../../api/serviceEndpointPolicyDefinitions/options.js"; +import { ServiceEndpointPolicyDefinition } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ServiceEndpointPolicyDefinitions operations. */ +export interface ServiceEndpointPolicyDefinitionsOperations { + /** Gets all service endpoint policy definitions in a service end point policy. */ + listByResourceGroup: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + options?: ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified ServiceEndpoint policy definitions. */ + delete: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a service endpoint policy definition in the specified service endpoint policy. */ + createOrUpdate: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, + options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, + ) => PollerLike, ServiceEndpointPolicyDefinition>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, + options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ServiceEndpointPolicyDefinition + > + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, + options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get a ServiceEndpointPolicyDefinition */ + get: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options?: ServiceEndpointPolicyDefinitionsGetOptionalParams, + ) => Promise; +} + +function _getServiceEndpointPolicyDefinitions(context: NetworkManagementContext) { + return { + listByResourceGroup: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + options?: ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, serviceEndpointPolicyName, options), + delete: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName, + options, + ), + beginDelete: async ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, + options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName, + serviceEndpointPolicyDefinitions, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, + options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName, + serviceEndpointPolicyDefinitions, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, + options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName, + serviceEndpointPolicyDefinitions, + options, + ); + }, + get: ( + resourceGroupName: string, + serviceEndpointPolicyName: string, + serviceEndpointPolicyDefinitionName: string, + options?: ServiceEndpointPolicyDefinitionsGetOptionalParams, + ) => + get( + context, + resourceGroupName, + serviceEndpointPolicyName, + serviceEndpointPolicyDefinitionName, + options, + ), + }; +} + +export function _getServiceEndpointPolicyDefinitionsOperations( + context: NetworkManagementContext, +): ServiceEndpointPolicyDefinitionsOperations { + return { + ..._getServiceEndpointPolicyDefinitions(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/serviceGateways/index.ts b/sdk/network/arm-network/src/classic/serviceGateways/index.ts new file mode 100644 index 000000000000..ac1478a1de49 --- /dev/null +++ b/sdk/network/arm-network/src/classic/serviceGateways/index.ts @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listServices, + listAddressLocations, + updateServices, + updateAddressLocations, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/serviceGateways/operations.js"; +import { + ServiceGatewaysListServicesOptionalParams, + ServiceGatewaysListAddressLocationsOptionalParams, + ServiceGatewaysUpdateServicesOptionalParams, + ServiceGatewaysUpdateAddressLocationsOptionalParams, + ServiceGatewaysListAllOptionalParams, + ServiceGatewaysListOptionalParams, + ServiceGatewaysDeleteOptionalParams, + ServiceGatewaysUpdateTagsOptionalParams, + ServiceGatewaysCreateOrUpdateOptionalParams, + ServiceGatewaysGetOptionalParams, +} from "../../api/serviceGateways/options.js"; +import { + TagsObject, + ServiceGateway, + ServiceGatewayUpdateAddressLocationsRequest, + ServiceGatewayUpdateServicesRequest, + ServiceGatewayService, + ServiceGatewayAddressLocationResponse, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ServiceGateways operations. */ +export interface ServiceGatewaysOperations { + /** Get Services in service gateway. */ + listServices: ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysListServicesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get address locations in service gateway. */ + listAddressLocations: ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysListAddressLocationsOptionalParams, + ) => PagedAsyncIterableIterator; + /** + * Creates, updates, or deletes services within the service gateway. + * The request supports both full and partial update modes at the service level. + * + * Full update replaces all existing services with the new list provided in the request. + * Partial update modifies only the specified services. + */ + updateServices: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateServicesRequest, + options?: ServiceGatewaysUpdateServicesOptionalParams, + ) => PollerLike, void>; + /** @deprecated use updateServices instead */ + beginUpdateServices: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateServicesRequest, + options?: ServiceGatewaysUpdateServicesOptionalParams, + ) => Promise, void>>; + /** @deprecated use updateServices instead */ + beginUpdateServicesAndWait: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateServicesRequest, + options?: ServiceGatewaysUpdateServicesOptionalParams, + ) => Promise; + /** + * Creates or updates address locations within the service gateway. + * + * The request supports both full and partial update modes at two levels: location and address. + * + * Full update replaces all existing data. + * + * Partial update modifies only the specified entries: + * + * For location-level partial updates, if no address is provided, the existing address will be deleted. + * + * For address-level partial updates, if no services are provided, the existing services will be considered for deletion. + */ + updateAddressLocations: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateAddressLocationsRequest, + options?: ServiceGatewaysUpdateAddressLocationsOptionalParams, + ) => PollerLike, void>; + /** @deprecated use updateAddressLocations instead */ + beginUpdateAddressLocations: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateAddressLocationsRequest, + options?: ServiceGatewaysUpdateAddressLocationsOptionalParams, + ) => Promise, void>>; + /** @deprecated use updateAddressLocations instead */ + beginUpdateAddressLocationsAndWait: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateAddressLocationsRequest, + options?: ServiceGatewaysUpdateAddressLocationsOptionalParams, + ) => Promise; + /** Gets all the service gateways in a subscription. */ + listAll: ( + options?: ServiceGatewaysListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all the service gateways in a resource group. */ + list: ( + resourceGroupName: string, + options?: ServiceGatewaysListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified service gateway. */ + delete: ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysDeleteOptionalParams, + ) => Promise; + /** Updates a service gateway tags. */ + updateTags: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: TagsObject, + options?: ServiceGatewaysUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a service gateway. */ + createOrUpdate: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGateway, + options?: ServiceGatewaysCreateOrUpdateOptionalParams, + ) => PollerLike, ServiceGateway>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGateway, + options?: ServiceGatewaysCreateOrUpdateOptionalParams, + ) => Promise, ServiceGateway>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGateway, + options?: ServiceGatewaysCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified service gateway. */ + get: ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysGetOptionalParams, + ) => Promise; +} + +function _getServiceGateways(context: NetworkManagementContext) { + return { + listServices: ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysListServicesOptionalParams, + ) => listServices(context, resourceGroupName, serviceGatewayName, options), + listAddressLocations: ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysListAddressLocationsOptionalParams, + ) => listAddressLocations(context, resourceGroupName, serviceGatewayName, options), + updateServices: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateServicesRequest, + options?: ServiceGatewaysUpdateServicesOptionalParams, + ) => updateServices(context, resourceGroupName, serviceGatewayName, parameters, options), + beginUpdateServices: async ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateServicesRequest, + options?: ServiceGatewaysUpdateServicesOptionalParams, + ) => { + const poller = updateServices( + context, + resourceGroupName, + serviceGatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateServicesAndWait: async ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateServicesRequest, + options?: ServiceGatewaysUpdateServicesOptionalParams, + ) => { + return await updateServices( + context, + resourceGroupName, + serviceGatewayName, + parameters, + options, + ); + }, + updateAddressLocations: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateAddressLocationsRequest, + options?: ServiceGatewaysUpdateAddressLocationsOptionalParams, + ) => + updateAddressLocations(context, resourceGroupName, serviceGatewayName, parameters, options), + beginUpdateAddressLocations: async ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateAddressLocationsRequest, + options?: ServiceGatewaysUpdateAddressLocationsOptionalParams, + ) => { + const poller = updateAddressLocations( + context, + resourceGroupName, + serviceGatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAddressLocationsAndWait: async ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGatewayUpdateAddressLocationsRequest, + options?: ServiceGatewaysUpdateAddressLocationsOptionalParams, + ) => { + return await updateAddressLocations( + context, + resourceGroupName, + serviceGatewayName, + parameters, + options, + ); + }, + listAll: (options?: ServiceGatewaysListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: ServiceGatewaysListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceGatewayName, options), + beginDelete: async ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, serviceGatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, serviceGatewayName, options); + }, + updateTags: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: TagsObject, + options?: ServiceGatewaysUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, serviceGatewayName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGateway, + options?: ServiceGatewaysCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceGatewayName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGateway, + options?: ServiceGatewaysCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceGatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceGatewayName: string, + parameters: ServiceGateway, + options?: ServiceGatewaysCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceGatewayName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + serviceGatewayName: string, + options?: ServiceGatewaysGetOptionalParams, + ) => get(context, resourceGroupName, serviceGatewayName, options), + }; +} + +export function _getServiceGatewaysOperations( + context: NetworkManagementContext, +): ServiceGatewaysOperations { + return { + ..._getServiceGateways(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/serviceTagInformation/index.ts b/sdk/network/arm-network/src/classic/serviceTagInformation/index.ts new file mode 100644 index 000000000000..a30953bf9d36 --- /dev/null +++ b/sdk/network/arm-network/src/classic/serviceTagInformation/index.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/serviceTagInformation/operations.js"; +import { ServiceTagInformationListOptionalParams } from "../../api/serviceTagInformation/options.js"; +import { ServiceTagInformation } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ServiceTagInformation operations. */ +export interface ServiceTagInformationOperations { + /** Gets a list of service tag information resources with pagination. */ + list: ( + location: string, + options?: ServiceTagInformationListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getServiceTagInformation(context: NetworkManagementContext) { + return { + list: (location: string, options?: ServiceTagInformationListOptionalParams) => + list(context, location, options), + }; +} + +export function _getServiceTagInformationOperations( + context: NetworkManagementContext, +): ServiceTagInformationOperations { + return { + ..._getServiceTagInformation(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/serviceTags/index.ts b/sdk/network/arm-network/src/classic/serviceTags/index.ts new file mode 100644 index 000000000000..a1f28c85eeb8 --- /dev/null +++ b/sdk/network/arm-network/src/classic/serviceTags/index.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/serviceTags/operations.js"; +import { ServiceTagsListOptionalParams } from "../../api/serviceTags/options.js"; +import { ServiceTagsListResult } from "../../models/microsoft/network/models.js"; + +/** Interface representing a ServiceTags operations. */ +export interface ServiceTagsOperations { + /** Gets a list of service tag information resources. */ + list: ( + location: string, + options?: ServiceTagsListOptionalParams, + ) => Promise; +} + +function _getServiceTags(context: NetworkManagementContext) { + return { + list: (location: string, options?: ServiceTagsListOptionalParams) => + list(context, location, options), + }; +} + +export function _getServiceTagsOperations( + context: NetworkManagementContext, +): ServiceTagsOperations { + return { + ..._getServiceTags(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/staticCidrs/index.ts b/sdk/network/arm-network/src/classic/staticCidrs/index.ts new file mode 100644 index 000000000000..0b3d910471d5 --- /dev/null +++ b/sdk/network/arm-network/src/classic/staticCidrs/index.ts @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, create, get } from "../../api/staticCidrs/operations.js"; +import { + StaticCidrsListOptionalParams, + StaticCidrsDeleteOptionalParams, + StaticCidrsCreateOptionalParams, + StaticCidrsGetOptionalParams, +} from "../../api/staticCidrs/options.js"; +import { StaticCidr } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a StaticCidrs operations. */ +export interface StaticCidrsOperations { + /** Gets list of Static CIDR resources at Network Manager level. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: StaticCidrsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the Static CIDR resource. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsDeleteOptionalParams, + ) => Promise; + /** Creates/Updates the Static CIDR resource. */ + create: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsCreateOptionalParams, + ) => Promise; + /** Gets the specific Static CIDR resource. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsGetOptionalParams, + ) => Promise; +} + +function _getStaticCidrs(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: StaticCidrsListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, poolName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkManagerName, poolName, staticCidrName, options), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + options, + ); + }, + create: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsCreateOptionalParams, + ) => create(context, resourceGroupName, networkManagerName, poolName, staticCidrName, options), + get: ( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsGetOptionalParams, + ) => get(context, resourceGroupName, networkManagerName, poolName, staticCidrName, options), + }; +} + +export function _getStaticCidrsOperations( + context: NetworkManagementContext, +): StaticCidrsOperations { + return { + ..._getStaticCidrs(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/staticMembers/index.ts b/sdk/network/arm-network/src/classic/staticMembers/index.ts new file mode 100644 index 000000000000..0d584449a5a1 --- /dev/null +++ b/sdk/network/arm-network/src/classic/staticMembers/index.ts @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/staticMembers/operations.js"; +import { + StaticMembersListOptionalParams, + StaticMembersDeleteOptionalParams, + StaticMembersCreateOrUpdateOptionalParams, + StaticMembersGetOptionalParams, +} from "../../api/staticMembers/options.js"; +import { StaticMember } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a StaticMembers operations. */ +export interface StaticMembersOperations { + /** Lists the specified static member. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options?: StaticMembersListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a static member. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + options?: StaticMembersDeleteOptionalParams, + ) => Promise; + /** Creates or updates a static member. */ + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + parameters: StaticMember, + options?: StaticMembersCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified static member. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + options?: StaticMembersGetOptionalParams, + ) => Promise; +} + +function _getStaticMembers(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + options?: StaticMembersListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, networkGroupName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + options?: StaticMembersDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + networkManagerName, + networkGroupName, + staticMemberName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + parameters: StaticMember, + options?: StaticMembersCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkManagerName, + networkGroupName, + staticMemberName, + parameters, + options, + ), + get: ( + resourceGroupName: string, + networkManagerName: string, + networkGroupName: string, + staticMemberName: string, + options?: StaticMembersGetOptionalParams, + ) => + get( + context, + resourceGroupName, + networkManagerName, + networkGroupName, + staticMemberName, + options, + ), + }; +} + +export function _getStaticMembersOperations( + context: NetworkManagementContext, +): StaticMembersOperations { + return { + ..._getStaticMembers(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/subgroups/index.ts b/sdk/network/arm-network/src/classic/subgroups/index.ts new file mode 100644 index 000000000000..efc557693e2e --- /dev/null +++ b/sdk/network/arm-network/src/classic/subgroups/index.ts @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, get } from "../../api/subgroups/operations.js"; +import { + SubgroupsListOptionalParams, + SubgroupsGetOptionalParams, +} from "../../api/subgroups/options.js"; +import { Subgroup } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Subgroups operations. */ +export interface SubgroupsOperations { + /** Gets all subgroups in an interconnect group. */ + list: ( + resourceGroupName: string, + interconnectGroupName: string, + options?: SubgroupsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets the specified subgroup in an interconnect group. */ + get: ( + resourceGroupName: string, + interconnectGroupName: string, + subgroupName: string, + options?: SubgroupsGetOptionalParams, + ) => Promise; +} + +function _getSubgroups(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + interconnectGroupName: string, + options?: SubgroupsListOptionalParams, + ) => list(context, resourceGroupName, interconnectGroupName, options), + get: ( + resourceGroupName: string, + interconnectGroupName: string, + subgroupName: string, + options?: SubgroupsGetOptionalParams, + ) => get(context, resourceGroupName, interconnectGroupName, subgroupName, options), + }; +} + +export function _getSubgroupsOperations(context: NetworkManagementContext): SubgroupsOperations { + return { + ..._getSubgroups(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/subnets/index.ts b/sdk/network/arm-network/src/classic/subnets/index.ts new file mode 100644 index 000000000000..6b4bf92f3b43 --- /dev/null +++ b/sdk/network/arm-network/src/classic/subnets/index.ts @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + unprepareNetworkPolicies, + prepareNetworkPolicies, + list, + $delete, + createOrUpdate, + get, +} from "../../api/subnets/operations.js"; +import { + SubnetsUnprepareNetworkPoliciesOptionalParams, + SubnetsPrepareNetworkPoliciesOptionalParams, + SubnetsListOptionalParams, + SubnetsDeleteOptionalParams, + SubnetsCreateOrUpdateOptionalParams, + SubnetsGetOptionalParams, +} from "../../api/subnets/options.js"; +import { Subnet } from "../../models/common/models.js"; +import { + PrepareNetworkPoliciesRequest, + UnprepareNetworkPoliciesRequest, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Subnets operations. */ +export interface SubnetsOperations { + /** Unprepares a subnet by removing network intent policies. */ + unprepareNetworkPolicies: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, + options?: SubnetsUnprepareNetworkPoliciesOptionalParams, + ) => PollerLike, void>; + /** @deprecated use unprepareNetworkPolicies instead */ + beginUnprepareNetworkPolicies: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, + options?: SubnetsUnprepareNetworkPoliciesOptionalParams, + ) => Promise, void>>; + /** @deprecated use unprepareNetworkPolicies instead */ + beginUnprepareNetworkPoliciesAndWait: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, + options?: SubnetsUnprepareNetworkPoliciesOptionalParams, + ) => Promise; + /** Prepares a subnet by applying network intent policies. */ + prepareNetworkPolicies: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, + options?: SubnetsPrepareNetworkPoliciesOptionalParams, + ) => PollerLike, void>; + /** @deprecated use prepareNetworkPolicies instead */ + beginPrepareNetworkPolicies: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, + options?: SubnetsPrepareNetworkPoliciesOptionalParams, + ) => Promise, void>>; + /** @deprecated use prepareNetworkPolicies instead */ + beginPrepareNetworkPoliciesAndWait: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, + options?: SubnetsPrepareNetworkPoliciesOptionalParams, + ) => Promise; + /** Gets all subnets in a virtual network. */ + list: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: SubnetsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified subnet. */ + delete: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: SubnetsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: SubnetsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: SubnetsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a subnet in the specified virtual network. */ + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + subnetParameters: Subnet, + options?: SubnetsCreateOrUpdateOptionalParams, + ) => PollerLike, Subnet>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + subnetParameters: Subnet, + options?: SubnetsCreateOrUpdateOptionalParams, + ) => Promise, Subnet>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + subnetParameters: Subnet, + options?: SubnetsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified subnet by virtual network and resource group. */ + get: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: SubnetsGetOptionalParams, + ) => Promise; +} + +function _getSubnets(context: NetworkManagementContext) { + return { + unprepareNetworkPolicies: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, + options?: SubnetsUnprepareNetworkPoliciesOptionalParams, + ) => + unprepareNetworkPolicies( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + unprepareNetworkPoliciesRequestParameters, + options, + ), + beginUnprepareNetworkPolicies: async ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, + options?: SubnetsUnprepareNetworkPoliciesOptionalParams, + ) => { + const poller = unprepareNetworkPolicies( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + unprepareNetworkPoliciesRequestParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUnprepareNetworkPoliciesAndWait: async ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, + options?: SubnetsUnprepareNetworkPoliciesOptionalParams, + ) => { + return await unprepareNetworkPolicies( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + unprepareNetworkPoliciesRequestParameters, + options, + ); + }, + prepareNetworkPolicies: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, + options?: SubnetsPrepareNetworkPoliciesOptionalParams, + ) => + prepareNetworkPolicies( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + prepareNetworkPoliciesRequestParameters, + options, + ), + beginPrepareNetworkPolicies: async ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, + options?: SubnetsPrepareNetworkPoliciesOptionalParams, + ) => { + const poller = prepareNetworkPolicies( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + prepareNetworkPoliciesRequestParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginPrepareNetworkPoliciesAndWait: async ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, + options?: SubnetsPrepareNetworkPoliciesOptionalParams, + ) => { + return await prepareNetworkPolicies( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + prepareNetworkPoliciesRequestParameters, + options, + ); + }, + list: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: SubnetsListOptionalParams, + ) => list(context, resourceGroupName, virtualNetworkName, options), + delete: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: SubnetsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualNetworkName, subnetName, options), + beginDelete: async ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: SubnetsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualNetworkName, subnetName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: SubnetsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualNetworkName, subnetName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + subnetParameters: Subnet, + options?: SubnetsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + subnetParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + subnetParameters: Subnet, + options?: SubnetsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + subnetParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + subnetParameters: Subnet, + options?: SubnetsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualNetworkName, + subnetName, + subnetParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualNetworkName: string, + subnetName: string, + options?: SubnetsGetOptionalParams, + ) => get(context, resourceGroupName, virtualNetworkName, subnetName, options), + }; +} + +export function _getSubnetsOperations(context: NetworkManagementContext): SubnetsOperations { + return { + ..._getSubnets(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/subscriptionNetworkManagerConnections/index.ts b/sdk/network/arm-network/src/classic/subscriptionNetworkManagerConnections/index.ts new file mode 100644 index 000000000000..06c995b06467 --- /dev/null +++ b/sdk/network/arm-network/src/classic/subscriptionNetworkManagerConnections/index.ts @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/subscriptionNetworkManagerConnections/operations.js"; +import { + SubscriptionNetworkManagerConnectionsListOptionalParams, + SubscriptionNetworkManagerConnectionsDeleteOptionalParams, + SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams, + SubscriptionNetworkManagerConnectionsGetOptionalParams, +} from "../../api/subscriptionNetworkManagerConnections/options.js"; +import { NetworkManagerConnection } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a SubscriptionNetworkManagerConnections operations. */ +export interface SubscriptionNetworkManagerConnectionsOperations { + /** List all network manager connections created by this subscription. */ + list: ( + options?: SubscriptionNetworkManagerConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete specified connection created by this subscription. */ + delete: ( + networkManagerConnectionName: string, + options?: SubscriptionNetworkManagerConnectionsDeleteOptionalParams, + ) => Promise; + /** Create a network manager connection on this subscription. */ + createOrUpdate: ( + networkManagerConnectionName: string, + parameters: NetworkManagerConnection, + options?: SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get a specified connection created by this subscription. */ + get: ( + networkManagerConnectionName: string, + options?: SubscriptionNetworkManagerConnectionsGetOptionalParams, + ) => Promise; +} + +function _getSubscriptionNetworkManagerConnections(context: NetworkManagementContext) { + return { + list: (options?: SubscriptionNetworkManagerConnectionsListOptionalParams) => + list(context, options), + delete: ( + networkManagerConnectionName: string, + options?: SubscriptionNetworkManagerConnectionsDeleteOptionalParams, + ) => $delete(context, networkManagerConnectionName, options), + createOrUpdate: ( + networkManagerConnectionName: string, + parameters: NetworkManagerConnection, + options?: SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, networkManagerConnectionName, parameters, options), + get: ( + networkManagerConnectionName: string, + options?: SubscriptionNetworkManagerConnectionsGetOptionalParams, + ) => get(context, networkManagerConnectionName, options), + }; +} + +export function _getSubscriptionNetworkManagerConnectionsOperations( + context: NetworkManagementContext, +): SubscriptionNetworkManagerConnectionsOperations { + return { + ..._getSubscriptionNetworkManagerConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/usages/index.ts b/sdk/network/arm-network/src/classic/usages/index.ts new file mode 100644 index 000000000000..73e64c3f8c26 --- /dev/null +++ b/sdk/network/arm-network/src/classic/usages/index.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/usages/operations.js"; +import { UsagesListOptionalParams } from "../../api/usages/options.js"; +import { Usage } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Usages operations. */ +export interface UsagesOperations { + /** List network usages for a subscription. */ + list: (location: string, options?: UsagesListOptionalParams) => PagedAsyncIterableIterator; +} + +function _getUsages(context: NetworkManagementContext) { + return { + list: (location: string, options?: UsagesListOptionalParams) => + list(context, location, options), + }; +} + +export function _getUsagesOperations(context: NetworkManagementContext): UsagesOperations { + return { + ..._getUsages(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/verifierWorkspaces/index.ts b/sdk/network/arm-network/src/classic/verifierWorkspaces/index.ts new file mode 100644 index 000000000000..c23955322122 --- /dev/null +++ b/sdk/network/arm-network/src/classic/verifierWorkspaces/index.ts @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, update, create, get } from "../../api/verifierWorkspaces/operations.js"; +import { + VerifierWorkspacesListOptionalParams, + VerifierWorkspacesDeleteOptionalParams, + VerifierWorkspacesUpdateOptionalParams, + VerifierWorkspacesCreateOptionalParams, + VerifierWorkspacesGetOptionalParams, +} from "../../api/verifierWorkspaces/options.js"; +import { VerifierWorkspace } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VerifierWorkspaces operations. */ +export interface VerifierWorkspacesOperations { + /** Gets list of Verifier Workspaces. */ + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: VerifierWorkspacesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes Verifier Workspace. */ + delete: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesDeleteOptionalParams, + ) => Promise; + /** Updates Verifier Workspace. */ + update: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesUpdateOptionalParams, + ) => Promise; + /** Creates Verifier Workspace. */ + create: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + body: VerifierWorkspace, + options?: VerifierWorkspacesCreateOptionalParams, + ) => Promise; + /** Gets Verifier Workspace. */ + get: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesGetOptionalParams, + ) => Promise; +} + +function _getVerifierWorkspaces(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkManagerName: string, + options?: VerifierWorkspacesListOptionalParams, + ) => list(context, resourceGroupName, networkManagerName, options), + delete: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkManagerName, workspaceName, options), + beginDelete: async ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkManagerName, + workspaceName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, networkManagerName, workspaceName, options); + }, + update: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesUpdateOptionalParams, + ) => update(context, resourceGroupName, networkManagerName, workspaceName, options), + create: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + body: VerifierWorkspace, + options?: VerifierWorkspacesCreateOptionalParams, + ) => create(context, resourceGroupName, networkManagerName, workspaceName, body, options), + get: ( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesGetOptionalParams, + ) => get(context, resourceGroupName, networkManagerName, workspaceName, options), + }; +} + +export function _getVerifierWorkspacesOperations( + context: NetworkManagementContext, +): VerifierWorkspacesOperations { + return { + ..._getVerifierWorkspaces(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/vipSwap/index.ts b/sdk/network/arm-network/src/classic/vipSwap/index.ts new file mode 100644 index 000000000000..a23a5573145a --- /dev/null +++ b/sdk/network/arm-network/src/classic/vipSwap/index.ts @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, create, get } from "../../api/vipSwap/operations.js"; +import { + VipSwapListOptionalParams, + VipSwapCreateOptionalParams, + VipSwapGetOptionalParams, +} from "../../api/vipSwap/options.js"; +import { SwapResource, SwapResourceListResult } from "../../models/microsoft/network/models.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VipSwap operations. */ +export interface VipSwapOperations { + /** Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production */ + list: ( + groupName: string, + resourceName: string, + options?: VipSwapListOptionalParams, + ) => Promise; + /** Performs vip swap operation on swappable cloud services. */ + create: ( + groupName: string, + resourceName: string, + parameters: SwapResource, + options?: VipSwapCreateOptionalParams, + ) => PollerLike, void>; + /** @deprecated use create instead */ + beginCreate: ( + groupName: string, + resourceName: string, + parameters: SwapResource, + options?: VipSwapCreateOptionalParams, + ) => Promise, void>>; + /** @deprecated use create instead */ + beginCreateAndWait: ( + groupName: string, + resourceName: string, + parameters: SwapResource, + options?: VipSwapCreateOptionalParams, + ) => Promise; + /** Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production */ + get: ( + groupName: string, + resourceName: string, + options?: VipSwapGetOptionalParams, + ) => Promise; +} + +function _getVipSwap(context: NetworkManagementContext) { + return { + list: (groupName: string, resourceName: string, options?: VipSwapListOptionalParams) => + list(context, groupName, resourceName, options), + create: ( + groupName: string, + resourceName: string, + parameters: SwapResource, + options?: VipSwapCreateOptionalParams, + ) => create(context, groupName, resourceName, parameters, options), + beginCreate: async ( + groupName: string, + resourceName: string, + parameters: SwapResource, + options?: VipSwapCreateOptionalParams, + ) => { + const poller = create(context, groupName, resourceName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateAndWait: async ( + groupName: string, + resourceName: string, + parameters: SwapResource, + options?: VipSwapCreateOptionalParams, + ) => { + return await create(context, groupName, resourceName, parameters, options); + }, + get: (groupName: string, resourceName: string, options?: VipSwapGetOptionalParams) => + get(context, groupName, resourceName, options), + }; +} + +export function _getVipSwapOperations(context: NetworkManagementContext): VipSwapOperations { + return { + ..._getVipSwap(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualApplianceSites/index.ts b/sdk/network/arm-network/src/classic/virtualApplianceSites/index.ts new file mode 100644 index 000000000000..0db07230b4d4 --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualApplianceSites/index.ts @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/virtualApplianceSites/operations.js"; +import { + VirtualApplianceSitesListOptionalParams, + VirtualApplianceSitesDeleteOptionalParams, + VirtualApplianceSitesCreateOrUpdateOptionalParams, + VirtualApplianceSitesGetOptionalParams, +} from "../../api/virtualApplianceSites/options.js"; +import { VirtualApplianceSite } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualApplianceSites operations. */ +export interface VirtualApplianceSitesOperations { + /** Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. */ + list: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: VirtualApplianceSitesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified site from a Virtual Appliance. */ + delete: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options?: VirtualApplianceSitesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options?: VirtualApplianceSitesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options?: VirtualApplianceSitesDeleteOptionalParams, + ) => Promise; + /** Creates or updates the specified Network Virtual Appliance Site. */ + createOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + parameters: VirtualApplianceSite, + options?: VirtualApplianceSitesCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualApplianceSite>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + parameters: VirtualApplianceSite, + options?: VirtualApplianceSitesCreateOrUpdateOptionalParams, + ) => Promise, VirtualApplianceSite>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + parameters: VirtualApplianceSite, + options?: VirtualApplianceSitesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified Virtual Appliance Site. */ + get: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options?: VirtualApplianceSitesGetOptionalParams, + ) => Promise; +} + +function _getVirtualApplianceSites(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + options?: VirtualApplianceSitesListOptionalParams, + ) => list(context, resourceGroupName, networkVirtualApplianceName, options), + delete: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options?: VirtualApplianceSitesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, networkVirtualApplianceName, siteName, options), + beginDelete: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options?: VirtualApplianceSitesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + networkVirtualApplianceName, + siteName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options?: VirtualApplianceSitesDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + networkVirtualApplianceName, + siteName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + parameters: VirtualApplianceSite, + options?: VirtualApplianceSitesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + networkVirtualApplianceName, + siteName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + parameters: VirtualApplianceSite, + options?: VirtualApplianceSitesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + networkVirtualApplianceName, + siteName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + parameters: VirtualApplianceSite, + options?: VirtualApplianceSitesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + networkVirtualApplianceName, + siteName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + networkVirtualApplianceName: string, + siteName: string, + options?: VirtualApplianceSitesGetOptionalParams, + ) => get(context, resourceGroupName, networkVirtualApplianceName, siteName, options), + }; +} + +export function _getVirtualApplianceSitesOperations( + context: NetworkManagementContext, +): VirtualApplianceSitesOperations { + return { + ..._getVirtualApplianceSites(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualApplianceSkus/index.ts b/sdk/network/arm-network/src/classic/virtualApplianceSkus/index.ts new file mode 100644 index 000000000000..dcd5bfd02b98 --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualApplianceSkus/index.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, get } from "../../api/virtualApplianceSkus/operations.js"; +import { + VirtualApplianceSkusListOptionalParams, + VirtualApplianceSkusGetOptionalParams, +} from "../../api/virtualApplianceSkus/options.js"; +import { NetworkVirtualApplianceSku } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a VirtualApplianceSkus operations. */ +export interface VirtualApplianceSkusOperations { + /** List all SKUs available for a virtual appliance. */ + list: ( + options?: VirtualApplianceSkusListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Retrieves a single available sku for network virtual appliance. */ + get: ( + skuName: string, + options?: VirtualApplianceSkusGetOptionalParams, + ) => Promise; +} + +function _getVirtualApplianceSkus(context: NetworkManagementContext) { + return { + list: (options?: VirtualApplianceSkusListOptionalParams) => list(context, options), + get: (skuName: string, options?: VirtualApplianceSkusGetOptionalParams) => + get(context, skuName, options), + }; +} + +export function _getVirtualApplianceSkusOperations( + context: NetworkManagementContext, +): VirtualApplianceSkusOperations { + return { + ..._getVirtualApplianceSkus(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualHubBgpConnection/index.ts b/sdk/network/arm-network/src/classic/virtualHubBgpConnection/index.ts new file mode 100644 index 000000000000..38db77d47a18 --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualHubBgpConnection/index.ts @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { $delete, createOrUpdate, get } from "../../api/virtualHubBgpConnection/operations.js"; +import { + VirtualHubBgpConnectionDeleteOptionalParams, + VirtualHubBgpConnectionCreateOrUpdateOptionalParams, + VirtualHubBgpConnectionGetOptionalParams, +} from "../../api/virtualHubBgpConnection/options.js"; +import { BgpConnection } from "../../models/microsoft/network/models.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualHubBgpConnection operations. */ +export interface VirtualHubBgpConnectionOperations { + /** Deletes a VirtualHubBgpConnection. */ + delete: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionDeleteOptionalParams, + ) => Promise; + /** Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. */ + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + parameters: BgpConnection, + options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams, + ) => PollerLike, BgpConnection>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + parameters: BgpConnection, + options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams, + ) => Promise, BgpConnection>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + parameters: BgpConnection, + options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a Virtual Hub Bgp Connection. */ + get: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionGetOptionalParams, + ) => Promise; +} + +function _getVirtualHubBgpConnection(context: NetworkManagementContext) { + return { + delete: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualHubName, connectionName, options), + beginDelete: async ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualHubName, connectionName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualHubName, connectionName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + parameters: BgpConnection, + options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualHubName, + connectionName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + parameters: BgpConnection, + options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualHubName, + connectionName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + parameters: BgpConnection, + options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualHubName, + connectionName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualHubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionGetOptionalParams, + ) => get(context, resourceGroupName, virtualHubName, connectionName, options), + }; +} + +export function _getVirtualHubBgpConnectionOperations( + context: NetworkManagementContext, +): VirtualHubBgpConnectionOperations { + return { + ..._getVirtualHubBgpConnection(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualHubBgpConnections/index.ts b/sdk/network/arm-network/src/classic/virtualHubBgpConnections/index.ts new file mode 100644 index 000000000000..31281d9362ee --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualHubBgpConnections/index.ts @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAdvertisedRoutes, + listLearnedRoutes, + list, +} from "../../api/virtualHubBgpConnections/operations.js"; +import { + VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, + VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, + VirtualHubBgpConnectionsListOptionalParams, +} from "../../api/virtualHubBgpConnections/options.js"; +import { BgpConnection, PeerRoute } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualHubBgpConnections operations. */ +export interface VirtualHubBgpConnectionsOperations { + /** Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. */ + listAdvertisedRoutes: ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, + ) => PollerLike>, Record>; + /** @deprecated use listAdvertisedRoutes instead */ + beginListAdvertisedRoutes: ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, + ) => Promise< + SimplePollerLike>, Record> + >; + /** @deprecated use listAdvertisedRoutes instead */ + beginListAdvertisedRoutesAndWait: ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, + ) => Promise>; + /** Retrieves a list of routes the virtual hub bgp connection has learned. */ + listLearnedRoutes: ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, + ) => PollerLike>, Record>; + /** @deprecated use listLearnedRoutes instead */ + beginListLearnedRoutes: ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, + ) => Promise< + SimplePollerLike>, Record> + >; + /** @deprecated use listLearnedRoutes instead */ + beginListLearnedRoutesAndWait: ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, + ) => Promise>; + /** Retrieves the details of all VirtualHubBgpConnections. */ + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubBgpConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getVirtualHubBgpConnections(context: NetworkManagementContext) { + return { + listAdvertisedRoutes: ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, + ) => listAdvertisedRoutes(context, resourceGroupName, hubName, connectionName, options), + beginListAdvertisedRoutes: async ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, + ) => { + const poller = listAdvertisedRoutes( + context, + resourceGroupName, + hubName, + connectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListAdvertisedRoutesAndWait: async ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, + ) => { + return await listAdvertisedRoutes( + context, + resourceGroupName, + hubName, + connectionName, + options, + ); + }, + listLearnedRoutes: ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, + ) => listLearnedRoutes(context, resourceGroupName, hubName, connectionName, options), + beginListLearnedRoutes: async ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, + ) => { + const poller = listLearnedRoutes( + context, + resourceGroupName, + hubName, + connectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListLearnedRoutesAndWait: async ( + resourceGroupName: string, + hubName: string, + connectionName: string, + options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, + ) => { + return await listLearnedRoutes(context, resourceGroupName, hubName, connectionName, options); + }, + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubBgpConnectionsListOptionalParams, + ) => list(context, resourceGroupName, virtualHubName, options), + }; +} + +export function _getVirtualHubBgpConnectionsOperations( + context: NetworkManagementContext, +): VirtualHubBgpConnectionsOperations { + return { + ..._getVirtualHubBgpConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualHubIpConfiguration/index.ts b/sdk/network/arm-network/src/classic/virtualHubIpConfiguration/index.ts new file mode 100644 index 000000000000..0a04edff2c45 --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualHubIpConfiguration/index.ts @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/virtualHubIpConfiguration/operations.js"; +import { + VirtualHubIpConfigurationListOptionalParams, + VirtualHubIpConfigurationDeleteOptionalParams, + VirtualHubIpConfigurationCreateOrUpdateOptionalParams, + VirtualHubIpConfigurationGetOptionalParams, +} from "../../api/virtualHubIpConfiguration/options.js"; +import { HubIpConfiguration } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualHubIpConfiguration operations. */ +export interface VirtualHubIpConfigurationOperations { + /** Retrieves the details of all VirtualHubIpConfigurations. */ + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubIpConfigurationListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a VirtualHubIpConfiguration. */ + delete: ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options?: VirtualHubIpConfigurationDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options?: VirtualHubIpConfigurationDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options?: VirtualHubIpConfigurationDeleteOptionalParams, + ) => Promise; + /** Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. */ + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + parameters: HubIpConfiguration, + options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams, + ) => PollerLike, HubIpConfiguration>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + parameters: HubIpConfiguration, + options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams, + ) => Promise, HubIpConfiguration>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + parameters: HubIpConfiguration, + options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a Virtual Hub Ip configuration. */ + get: ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options?: VirtualHubIpConfigurationGetOptionalParams, + ) => Promise; +} + +function _getVirtualHubIpConfiguration(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubIpConfigurationListOptionalParams, + ) => list(context, resourceGroupName, virtualHubName, options), + delete: ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options?: VirtualHubIpConfigurationDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualHubName, ipConfigName, options), + beginDelete: async ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options?: VirtualHubIpConfigurationDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualHubName, ipConfigName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options?: VirtualHubIpConfigurationDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualHubName, ipConfigName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + parameters: HubIpConfiguration, + options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, virtualHubName, ipConfigName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + parameters: HubIpConfiguration, + options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualHubName, + ipConfigName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + parameters: HubIpConfiguration, + options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualHubName, + ipConfigName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualHubName: string, + ipConfigName: string, + options?: VirtualHubIpConfigurationGetOptionalParams, + ) => get(context, resourceGroupName, virtualHubName, ipConfigName, options), + }; +} + +export function _getVirtualHubIpConfigurationOperations( + context: NetworkManagementContext, +): VirtualHubIpConfigurationOperations { + return { + ..._getVirtualHubIpConfiguration(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualHubRouteTableV2S/index.ts b/sdk/network/arm-network/src/classic/virtualHubRouteTableV2S/index.ts new file mode 100644 index 000000000000..8eed63735d62 --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualHubRouteTableV2S/index.ts @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + $delete, + createOrUpdate, + get, +} from "../../api/virtualHubRouteTableV2S/operations.js"; +import { + VirtualHubRouteTableV2SListOptionalParams, + VirtualHubRouteTableV2SDeleteOptionalParams, + VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, + VirtualHubRouteTableV2SGetOptionalParams, +} from "../../api/virtualHubRouteTableV2S/options.js"; +import { VirtualHubRouteTableV2 } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualHubRouteTableV2S operations. */ +export interface VirtualHubRouteTableV2SOperations { + /** Retrieves the details of all VirtualHubRouteTableV2s. */ + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubRouteTableV2SListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a VirtualHubRouteTableV2. */ + delete: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: VirtualHubRouteTableV2SDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: VirtualHubRouteTableV2SDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: VirtualHubRouteTableV2SDeleteOptionalParams, + ) => Promise; + /** Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. */ + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, + options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualHubRouteTableV2>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, + options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, + ) => Promise, VirtualHubRouteTableV2>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, + options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a VirtualHubRouteTableV2. */ + get: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: VirtualHubRouteTableV2SGetOptionalParams, + ) => Promise; +} + +function _getVirtualHubRouteTableV2S(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubRouteTableV2SListOptionalParams, + ) => list(context, resourceGroupName, virtualHubName, options), + delete: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: VirtualHubRouteTableV2SDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualHubName, routeTableName, options), + beginDelete: async ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: VirtualHubRouteTableV2SDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualHubName, routeTableName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: VirtualHubRouteTableV2SDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualHubName, routeTableName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, + options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routeTableName, + virtualHubRouteTableV2Parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, + options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routeTableName, + virtualHubRouteTableV2Parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, + options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualHubName, + routeTableName, + virtualHubRouteTableV2Parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualHubName: string, + routeTableName: string, + options?: VirtualHubRouteTableV2SGetOptionalParams, + ) => get(context, resourceGroupName, virtualHubName, routeTableName, options), + }; +} + +export function _getVirtualHubRouteTableV2SOperations( + context: NetworkManagementContext, +): VirtualHubRouteTableV2SOperations { + return { + ..._getVirtualHubRouteTableV2S(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualHubs/index.ts b/sdk/network/arm-network/src/classic/virtualHubs/index.ts new file mode 100644 index 000000000000..fcecc708d584 --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualHubs/index.ts @@ -0,0 +1,369 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + getOutboundRoutes, + getInboundRoutes, + getEffectiveVirtualHubRoutes, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/virtualHubs/operations.js"; +import { + VirtualHubsGetOutboundRoutesOptionalParams, + VirtualHubsGetInboundRoutesOptionalParams, + VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, + VirtualHubsListOptionalParams, + VirtualHubsListByResourceGroupOptionalParams, + VirtualHubsDeleteOptionalParams, + VirtualHubsUpdateTagsOptionalParams, + VirtualHubsCreateOrUpdateOptionalParams, + VirtualHubsGetOptionalParams, +} from "../../api/virtualHubs/options.js"; +import { + TagsObject, + VirtualHub, + VirtualHubEffectiveRouteList, + GetInboundRoutesParameters, + EffectiveRouteMapRouteList, + GetOutboundRoutesParameters, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualHubs operations. */ +export interface VirtualHubsOperations { + /** Gets the outbound routes configured for the Virtual Hub on a particular connection. */ + getOutboundRoutes: ( + resourceGroupName: string, + virtualHubName: string, + getOutboundRoutesParameters: GetOutboundRoutesParameters, + options?: VirtualHubsGetOutboundRoutesOptionalParams, + ) => PollerLike, EffectiveRouteMapRouteList>; + /** @deprecated use getOutboundRoutes instead */ + beginGetOutboundRoutes: ( + resourceGroupName: string, + virtualHubName: string, + getOutboundRoutesParameters: GetOutboundRoutesParameters, + options?: VirtualHubsGetOutboundRoutesOptionalParams, + ) => Promise< + SimplePollerLike, EffectiveRouteMapRouteList> + >; + /** @deprecated use getOutboundRoutes instead */ + beginGetOutboundRoutesAndWait: ( + resourceGroupName: string, + virtualHubName: string, + getOutboundRoutesParameters: GetOutboundRoutesParameters, + options?: VirtualHubsGetOutboundRoutesOptionalParams, + ) => Promise; + /** Gets the inbound routes configured for the Virtual Hub on a particular connection. */ + getInboundRoutes: ( + resourceGroupName: string, + virtualHubName: string, + getInboundRoutesParameters: GetInboundRoutesParameters, + options?: VirtualHubsGetInboundRoutesOptionalParams, + ) => PollerLike, EffectiveRouteMapRouteList>; + /** @deprecated use getInboundRoutes instead */ + beginGetInboundRoutes: ( + resourceGroupName: string, + virtualHubName: string, + getInboundRoutesParameters: GetInboundRoutesParameters, + options?: VirtualHubsGetInboundRoutesOptionalParams, + ) => Promise< + SimplePollerLike, EffectiveRouteMapRouteList> + >; + /** @deprecated use getInboundRoutes instead */ + beginGetInboundRoutesAndWait: ( + resourceGroupName: string, + virtualHubName: string, + getInboundRoutesParameters: GetInboundRoutesParameters, + options?: VirtualHubsGetInboundRoutesOptionalParams, + ) => Promise; + /** Gets the effective routes configured for the Virtual Hub resource or the specified resource . */ + getEffectiveVirtualHubRoutes: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, + ) => PollerLike, VirtualHubEffectiveRouteList>; + /** @deprecated use getEffectiveVirtualHubRoutes instead */ + beginGetEffectiveVirtualHubRoutes: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, + ) => Promise< + SimplePollerLike, VirtualHubEffectiveRouteList> + >; + /** @deprecated use getEffectiveVirtualHubRoutes instead */ + beginGetEffectiveVirtualHubRoutesAndWait: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, + ) => Promise; + /** Lists all the VirtualHubs in a subscription. */ + list: (options?: VirtualHubsListOptionalParams) => PagedAsyncIterableIterator; + /** Lists all the VirtualHubs in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualHubsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a VirtualHub. */ + delete: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsDeleteOptionalParams, + ) => Promise; + /** Updates VirtualHub tags. */ + updateTags: ( + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: TagsObject, + options?: VirtualHubsUpdateTagsOptionalParams, + ) => Promise; + /** Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. */ + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: VirtualHub, + options?: VirtualHubsCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualHub>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: VirtualHub, + options?: VirtualHubsCreateOrUpdateOptionalParams, + ) => Promise, VirtualHub>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: VirtualHub, + options?: VirtualHubsCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a VirtualHub. */ + get: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsGetOptionalParams, + ) => Promise; +} + +function _getVirtualHubs(context: NetworkManagementContext) { + return { + getOutboundRoutes: ( + resourceGroupName: string, + virtualHubName: string, + getOutboundRoutesParameters: GetOutboundRoutesParameters, + options?: VirtualHubsGetOutboundRoutesOptionalParams, + ) => + getOutboundRoutes( + context, + resourceGroupName, + virtualHubName, + getOutboundRoutesParameters, + options, + ), + beginGetOutboundRoutes: async ( + resourceGroupName: string, + virtualHubName: string, + getOutboundRoutesParameters: GetOutboundRoutesParameters, + options?: VirtualHubsGetOutboundRoutesOptionalParams, + ) => { + const poller = getOutboundRoutes( + context, + resourceGroupName, + virtualHubName, + getOutboundRoutesParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetOutboundRoutesAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + getOutboundRoutesParameters: GetOutboundRoutesParameters, + options?: VirtualHubsGetOutboundRoutesOptionalParams, + ) => { + return await getOutboundRoutes( + context, + resourceGroupName, + virtualHubName, + getOutboundRoutesParameters, + options, + ); + }, + getInboundRoutes: ( + resourceGroupName: string, + virtualHubName: string, + getInboundRoutesParameters: GetInboundRoutesParameters, + options?: VirtualHubsGetInboundRoutesOptionalParams, + ) => + getInboundRoutes( + context, + resourceGroupName, + virtualHubName, + getInboundRoutesParameters, + options, + ), + beginGetInboundRoutes: async ( + resourceGroupName: string, + virtualHubName: string, + getInboundRoutesParameters: GetInboundRoutesParameters, + options?: VirtualHubsGetInboundRoutesOptionalParams, + ) => { + const poller = getInboundRoutes( + context, + resourceGroupName, + virtualHubName, + getInboundRoutesParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetInboundRoutesAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + getInboundRoutesParameters: GetInboundRoutesParameters, + options?: VirtualHubsGetInboundRoutesOptionalParams, + ) => { + return await getInboundRoutes( + context, + resourceGroupName, + virtualHubName, + getInboundRoutesParameters, + options, + ); + }, + getEffectiveVirtualHubRoutes: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, + ) => getEffectiveVirtualHubRoutes(context, resourceGroupName, virtualHubName, options), + beginGetEffectiveVirtualHubRoutes: async ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, + ) => { + const poller = getEffectiveVirtualHubRoutes( + context, + resourceGroupName, + virtualHubName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetEffectiveVirtualHubRoutesAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, + ) => { + return await getEffectiveVirtualHubRoutes( + context, + resourceGroupName, + virtualHubName, + options, + ); + }, + list: (options?: VirtualHubsListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualHubsListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualHubName, options), + beginDelete: async ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualHubName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualHubName, options); + }, + updateTags: ( + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: TagsObject, + options?: VirtualHubsUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, virtualHubName, virtualHubParameters, options), + createOrUpdate: ( + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: VirtualHub, + options?: VirtualHubsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, virtualHubName, virtualHubParameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: VirtualHub, + options?: VirtualHubsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualHubName, + virtualHubParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualHubName: string, + virtualHubParameters: VirtualHub, + options?: VirtualHubsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualHubName, + virtualHubParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualHubName: string, + options?: VirtualHubsGetOptionalParams, + ) => get(context, resourceGroupName, virtualHubName, options), + }; +} + +export function _getVirtualHubsOperations( + context: NetworkManagementContext, +): VirtualHubsOperations { + return { + ..._getVirtualHubs(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualNetworkAppliances/index.ts b/sdk/network/arm-network/src/classic/virtualNetworkAppliances/index.ts new file mode 100644 index 000000000000..3d8501d1d440 --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualNetworkAppliances/index.ts @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/virtualNetworkAppliances/operations.js"; +import { + VirtualNetworkAppliancesListAllOptionalParams, + VirtualNetworkAppliancesListOptionalParams, + VirtualNetworkAppliancesDeleteOptionalParams, + VirtualNetworkAppliancesUpdateTagsOptionalParams, + VirtualNetworkAppliancesCreateOrUpdateOptionalParams, + VirtualNetworkAppliancesGetOptionalParams, +} from "../../api/virtualNetworkAppliances/options.js"; +import { TagsObject, VirtualNetworkAppliance } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualNetworkAppliances operations. */ +export interface VirtualNetworkAppliancesOperations { + /** Gets all virtual network appliances in a subscription. */ + listAll: ( + options?: VirtualNetworkAppliancesListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all virtual network appliances in a resource group. */ + list: ( + resourceGroupName: string, + options?: VirtualNetworkAppliancesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified virtual network appliance. */ + delete: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + options?: VirtualNetworkAppliancesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + options?: VirtualNetworkAppliancesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + options?: VirtualNetworkAppliancesDeleteOptionalParams, + ) => Promise; + /** Updates a virtual network appliance tags. */ + updateTags: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: TagsObject, + options?: VirtualNetworkAppliancesUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a virtual network appliance. */ + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: VirtualNetworkAppliance, + options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualNetworkAppliance>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: VirtualNetworkAppliance, + options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams, + ) => Promise, VirtualNetworkAppliance>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: VirtualNetworkAppliance, + options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets information about the specified virtual network appliance. */ + get: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + options?: VirtualNetworkAppliancesGetOptionalParams, + ) => Promise; +} + +function _getVirtualNetworkAppliances(context: NetworkManagementContext) { + return { + listAll: (options?: VirtualNetworkAppliancesListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: VirtualNetworkAppliancesListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + options?: VirtualNetworkAppliancesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualNetworkApplianceName, options), + beginDelete: async ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + options?: VirtualNetworkAppliancesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualNetworkApplianceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + options?: VirtualNetworkAppliancesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualNetworkApplianceName, options); + }, + updateTags: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: TagsObject, + options?: VirtualNetworkAppliancesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, virtualNetworkApplianceName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: VirtualNetworkAppliance, + options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, virtualNetworkApplianceName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: VirtualNetworkAppliance, + options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualNetworkApplianceName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + parameters: VirtualNetworkAppliance, + options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualNetworkApplianceName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualNetworkApplianceName: string, + options?: VirtualNetworkAppliancesGetOptionalParams, + ) => get(context, resourceGroupName, virtualNetworkApplianceName, options), + }; +} + +export function _getVirtualNetworkAppliancesOperations( + context: NetworkManagementContext, +): VirtualNetworkAppliancesOperations { + return { + ..._getVirtualNetworkAppliances(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualNetworkGatewayConnections/index.ts b/sdk/network/arm-network/src/classic/virtualNetworkGatewayConnections/index.ts new file mode 100644 index 000000000000..ead79a3b9d5c --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualNetworkGatewayConnections/index.ts @@ -0,0 +1,648 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + resetConnection, + getIkeSas, + stopPacketCapture, + startPacketCapture, + resetSharedKey, + getSharedKey, + setSharedKey, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/virtualNetworkGatewayConnections/operations.js"; +import { + VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, + VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, + VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, + VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, + VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsListOptionalParams, + VirtualNetworkGatewayConnectionsDeleteOptionalParams, + VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, + VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, + VirtualNetworkGatewayConnectionsGetOptionalParams, +} from "../../api/virtualNetworkGatewayConnections/options.js"; +import { + TagsObject, + VpnPacketCaptureStopParameters, + VirtualNetworkGatewayConnection, + ConnectionSharedKey, + ConnectionResetSharedKey, +} from "../../models/microsoft/network/models.js"; +import { + VirtualNetworkGatewayConnectionsGetIkeSasResponse, + VirtualNetworkGatewayConnectionsStopPacketCaptureResponse, + VirtualNetworkGatewayConnectionsStartPacketCaptureResponse, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualNetworkGatewayConnections operations. */ +export interface VirtualNetworkGatewayConnectionsOperations { + /** Resets the virtual network gateway connection specified. */ + resetConnection: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, + ) => PollerLike, void>; + /** @deprecated use resetConnection instead */ + beginResetConnection: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, + ) => Promise, void>>; + /** @deprecated use resetConnection instead */ + beginResetConnectionAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, + ) => Promise; + /** Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. */ + getIkeSas: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, + ) => PollerLike< + OperationState, + VirtualNetworkGatewayConnectionsGetIkeSasResponse + >; + /** @deprecated use getIkeSas instead */ + beginGetIkeSas: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewayConnectionsGetIkeSasResponse + > + >; + /** @deprecated use getIkeSas instead */ + beginGetIkeSasAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, + ) => Promise; + /** Stops packet capture on virtual network gateway connection in the specified resource group. */ + stopPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, + ) => PollerLike< + OperationState, + VirtualNetworkGatewayConnectionsStopPacketCaptureResponse + >; + /** @deprecated use stopPacketCapture instead */ + beginStopPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewayConnectionsStopPacketCaptureResponse + > + >; + /** @deprecated use stopPacketCapture instead */ + beginStopPacketCaptureAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, + ) => Promise; + /** Starts packet capture on virtual network gateway connection in the specified resource group. */ + startPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, + ) => PollerLike< + OperationState, + VirtualNetworkGatewayConnectionsStartPacketCaptureResponse + >; + /** @deprecated use startPacketCapture instead */ + beginStartPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewayConnectionsStartPacketCaptureResponse + > + >; + /** @deprecated use startPacketCapture instead */ + beginStartPacketCaptureAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, + ) => Promise; + /** The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. */ + resetSharedKey: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionResetSharedKey, + options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, + ) => PollerLike, ConnectionResetSharedKey>; + /** @deprecated use resetSharedKey instead */ + beginResetSharedKey: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionResetSharedKey, + options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, + ) => Promise< + SimplePollerLike, ConnectionResetSharedKey> + >; + /** @deprecated use resetSharedKey instead */ + beginResetSharedKeyAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionResetSharedKey, + options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, + ) => Promise; + /** The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. */ + getSharedKey: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams, + ) => Promise; + /** The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. */ + setSharedKey: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionSharedKey, + options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, + ) => PollerLike, ConnectionSharedKey>; + /** @deprecated use setSharedKey instead */ + beginSetSharedKey: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionSharedKey, + options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, + ) => Promise, ConnectionSharedKey>>; + /** @deprecated use setSharedKey instead */ + beginSetSharedKeyAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionSharedKey, + options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, + ) => Promise; + /** The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. */ + list: ( + resourceGroupName: string, + options?: VirtualNetworkGatewayConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified virtual network Gateway connection. */ + delete: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams, + ) => Promise; + /** Updates a virtual network gateway connection tags. */ + updateTags: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, + ) => PollerLike, VirtualNetworkGatewayConnection>; + /** @deprecated use updateTags instead */ + beginUpdateTags: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewayConnection + > + >; + /** @deprecated use updateTags instead */ + beginUpdateTagsAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a virtual network gateway connection in the specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VirtualNetworkGatewayConnection, + options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualNetworkGatewayConnection>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VirtualNetworkGatewayConnection, + options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewayConnection + > + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VirtualNetworkGatewayConnection, + options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified virtual network gateway connection by resource group. */ + get: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsGetOptionalParams, + ) => Promise; +} + +function _getVirtualNetworkGatewayConnections(context: NetworkManagementContext) { + return { + resetConnection: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, + ) => resetConnection(context, resourceGroupName, virtualNetworkGatewayConnectionName, options), + beginResetConnection: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, + ) => { + const poller = resetConnection( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginResetConnectionAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, + ) => { + return await resetConnection( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ); + }, + getIkeSas: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, + ) => getIkeSas(context, resourceGroupName, virtualNetworkGatewayConnectionName, options), + beginGetIkeSas: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, + ) => { + const poller = getIkeSas( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetIkeSasAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, + ) => { + return await getIkeSas( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ); + }, + stopPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, + ) => + stopPacketCapture( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ), + beginStopPacketCapture: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, + ) => { + const poller = stopPacketCapture( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStopPacketCaptureAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, + ) => { + return await stopPacketCapture( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ); + }, + startPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, + ) => + startPacketCapture(context, resourceGroupName, virtualNetworkGatewayConnectionName, options), + beginStartPacketCapture: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, + ) => { + const poller = startPacketCapture( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStartPacketCaptureAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, + ) => { + return await startPacketCapture( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ); + }, + resetSharedKey: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionResetSharedKey, + options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, + ) => + resetSharedKey( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ), + beginResetSharedKey: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionResetSharedKey, + options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, + ) => { + const poller = resetSharedKey( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginResetSharedKeyAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionResetSharedKey, + options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, + ) => { + return await resetSharedKey( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ); + }, + getSharedKey: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams, + ) => getSharedKey(context, resourceGroupName, virtualNetworkGatewayConnectionName, options), + setSharedKey: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionSharedKey, + options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, + ) => + setSharedKey( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ), + beginSetSharedKey: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionSharedKey, + options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, + ) => { + const poller = setSharedKey( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginSetSharedKeyAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: ConnectionSharedKey, + options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, + ) => { + return await setSharedKey( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ); + }, + list: ( + resourceGroupName: string, + options?: VirtualNetworkGatewayConnectionsListOptionalParams, + ) => list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualNetworkGatewayConnectionName, options), + beginDelete: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + options, + ); + }, + updateTags: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, + ) => + updateTags( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ), + beginUpdateTags: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, + ) => { + const poller = updateTags( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateTagsAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, + ) => { + return await updateTags( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VirtualNetworkGatewayConnection, + options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VirtualNetworkGatewayConnection, + options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VirtualNetworkGatewayConnection, + options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + options?: VirtualNetworkGatewayConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, virtualNetworkGatewayConnectionName, options), + }; +} + +export function _getVirtualNetworkGatewayConnectionsOperations( + context: NetworkManagementContext, +): VirtualNetworkGatewayConnectionsOperations { + return { + ..._getVirtualNetworkGatewayConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualNetworkGatewayNatRules/index.ts b/sdk/network/arm-network/src/classic/virtualNetworkGatewayNatRules/index.ts new file mode 100644 index 000000000000..8fce9f9e2c6c --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualNetworkGatewayNatRules/index.ts @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listByVirtualNetworkGateway, + $delete, + createOrUpdate, + get, +} from "../../api/virtualNetworkGatewayNatRules/operations.js"; +import { + VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, + VirtualNetworkGatewayNatRulesDeleteOptionalParams, + VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, + VirtualNetworkGatewayNatRulesGetOptionalParams, +} from "../../api/virtualNetworkGatewayNatRules/options.js"; +import { VirtualNetworkGatewayNatRule } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualNetworkGatewayNatRules operations. */ +export interface VirtualNetworkGatewayNatRulesOperations { + /** Retrieves all nat rules for a particular virtual network gateway. */ + listByVirtualNetworkGateway: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a nat rule. */ + delete: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams, + ) => Promise; + /** Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. */ + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + natRuleParameters: VirtualNetworkGatewayNatRule, + options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualNetworkGatewayNatRule>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + natRuleParameters: VirtualNetworkGatewayNatRule, + options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, VirtualNetworkGatewayNatRule> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + natRuleParameters: VirtualNetworkGatewayNatRule, + options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a nat rule. */ + get: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options?: VirtualNetworkGatewayNatRulesGetOptionalParams, + ) => Promise; +} + +function _getVirtualNetworkGatewayNatRules(context: NetworkManagementContext) { + return { + listByVirtualNetworkGateway: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, + ) => + listByVirtualNetworkGateway(context, resourceGroupName, virtualNetworkGatewayName, options), + delete: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualNetworkGatewayName, natRuleName, options), + beginDelete: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + virtualNetworkGatewayName, + natRuleName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + virtualNetworkGatewayName, + natRuleName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + natRuleParameters: VirtualNetworkGatewayNatRule, + options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualNetworkGatewayName, + natRuleName, + natRuleParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + natRuleParameters: VirtualNetworkGatewayNatRule, + options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualNetworkGatewayName, + natRuleName, + natRuleParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + natRuleParameters: VirtualNetworkGatewayNatRule, + options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualNetworkGatewayName, + natRuleName, + natRuleParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + natRuleName: string, + options?: VirtualNetworkGatewayNatRulesGetOptionalParams, + ) => get(context, resourceGroupName, virtualNetworkGatewayName, natRuleName, options), + }; +} + +export function _getVirtualNetworkGatewayNatRulesOperations( + context: NetworkManagementContext, +): VirtualNetworkGatewayNatRulesOperations { + return { + ..._getVirtualNetworkGatewayNatRules(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualNetworkGateways/index.ts b/sdk/network/arm-network/src/classic/virtualNetworkGateways/index.ts new file mode 100644 index 000000000000..de641706eeaa --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualNetworkGateways/index.ts @@ -0,0 +1,1765 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + vpnDeviceConfigurationScript, + invokeAbortMigration, + invokeCommitMigration, + invokeExecuteMigration, + invokePrepareMigration, + disconnectVirtualNetworkGatewayVpnConnections, + getVpnclientConnectionHealth, + stopExpressRouteSiteFailoverSimulation, + startExpressRouteSiteFailoverSimulation, + getFailoverSingleTestDetails, + getFailoverAllTestDetails, + stopPacketCapture, + startPacketCapture, + getVpnclientIpsecParameters, + setVpnclientIpsecParameters, + getRoutesInformation, + getResiliencyInformation, + getAdvertisedRoutes, + getLearnedRoutes, + listRadiusSecrets, + supportedVpnDevices, + getBgpPeerStatus, + getVpnProfilePackageUrl, + generateVpnProfile, + generatevpnclientpackage, + resetVpnClientSharedKey, + reset, + listConnections, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/virtualNetworkGateways/operations.js"; +import { + VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams, + VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, + VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, + VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, + VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, + VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, + VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + VirtualNetworkGatewaysStopPacketCaptureOptionalParams, + VirtualNetworkGatewaysStartPacketCaptureOptionalParams, + VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, + VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, + VirtualNetworkGatewaysGetRoutesInformationOptionalParams, + VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, + VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, + VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, + VirtualNetworkGatewaysListRadiusSecretsOptionalParams, + VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams, + VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, + VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, + VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, + VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, + VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, + VirtualNetworkGatewaysResetOptionalParams, + VirtualNetworkGatewaysListConnectionsOptionalParams, + VirtualNetworkGatewaysListOptionalParams, + VirtualNetworkGatewaysDeleteOptionalParams, + VirtualNetworkGatewaysUpdateTagsOptionalParams, + VirtualNetworkGatewaysCreateOrUpdateOptionalParams, + VirtualNetworkGatewaysGetOptionalParams, +} from "../../api/virtualNetworkGateways/options.js"; +import { + TagsObject, + VirtualNetworkGateway, + VirtualNetworkGatewayConnectionListEntity, + VpnClientParameters, + BgpPeerStatusListResult, + RadiusAuthServerListResult, + GatewayRouteListResult, + GatewayResiliencyInformation, + GatewayRouteSetsInformation, + VpnClientIPsecParameters, + VpnPacketCaptureStopParameters, + ExpressRouteFailoverTestDetails, + ExpressRouteFailoverSingleTestDetails, + ExpressRouteFailoverStopApiParameters, + VpnClientConnectionHealthDetailListResult, + P2SVpnConnectionRequest, + VirtualNetworkGatewayMigrationParameters, + VpnDeviceScriptParameters, +} from "../../models/microsoft/network/models.js"; +import { + VirtualNetworkGatewaysVpnDeviceConfigurationScriptResponse, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse, + VirtualNetworkGatewaysStopPacketCaptureResponse, + VirtualNetworkGatewaysStartPacketCaptureResponse, + VirtualNetworkGatewaysSupportedVpnDevicesResponse, + VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse, + VirtualNetworkGatewaysGenerateVpnProfileResponse, + VirtualNetworkGatewaysGeneratevpnclientpackageResponse, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualNetworkGateways operations. */ +export interface VirtualNetworkGatewaysOperations { + /** Gets a xml format representation for vpn device configuration script. */ + vpnDeviceConfigurationScript: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnDeviceScriptParameters, + options?: VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams, + ) => Promise; + /** Trigger abort migration for the virtual network gateway. */ + invokeAbortMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, + ) => PollerLike, void>; + /** @deprecated use invokeAbortMigration instead */ + beginInvokeAbortMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, + ) => Promise, void>>; + /** @deprecated use invokeAbortMigration instead */ + beginInvokeAbortMigrationAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, + ) => Promise; + /** Trigger commit migration for the virtual network gateway. */ + invokeCommitMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, + ) => PollerLike, void>; + /** @deprecated use invokeCommitMigration instead */ + beginInvokeCommitMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, + ) => Promise, void>>; + /** @deprecated use invokeCommitMigration instead */ + beginInvokeCommitMigrationAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, + ) => Promise; + /** Trigger execute migration for the virtual network gateway. */ + invokeExecuteMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, + ) => PollerLike, void>; + /** @deprecated use invokeExecuteMigration instead */ + beginInvokeExecuteMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, + ) => Promise, void>>; + /** @deprecated use invokeExecuteMigration instead */ + beginInvokeExecuteMigrationAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, + ) => Promise; + /** Trigger prepare migration for the virtual network gateway. */ + invokePrepareMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + migrationParams: VirtualNetworkGatewayMigrationParameters, + options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, + ) => PollerLike, void>; + /** @deprecated use invokePrepareMigration instead */ + beginInvokePrepareMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + migrationParams: VirtualNetworkGatewayMigrationParameters, + options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, + ) => Promise, void>>; + /** @deprecated use invokePrepareMigration instead */ + beginInvokePrepareMigrationAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + migrationParams: VirtualNetworkGatewayMigrationParameters, + options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, + ) => Promise; + /** Disconnect vpn connections of virtual network gateway in the specified resource group. */ + disconnectVirtualNetworkGatewayVpnConnections: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + request: P2SVpnConnectionRequest, + options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, + ) => PollerLike, void>; + /** @deprecated use disconnectVirtualNetworkGatewayVpnConnections instead */ + beginDisconnectVirtualNetworkGatewayVpnConnections: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + request: P2SVpnConnectionRequest, + options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, + ) => Promise, void>>; + /** @deprecated use disconnectVirtualNetworkGatewayVpnConnections instead */ + beginDisconnectVirtualNetworkGatewayVpnConnectionsAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + request: P2SVpnConnectionRequest, + options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, + ) => Promise; + /** Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. */ + getVpnclientConnectionHealth: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, + ) => PollerLike< + OperationState, + VpnClientConnectionHealthDetailListResult + >; + /** @deprecated use getVpnclientConnectionHealth instead */ + beginGetVpnclientConnectionHealth: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VpnClientConnectionHealthDetailListResult + > + >; + /** @deprecated use getVpnclientConnectionHealth instead */ + beginGetVpnclientConnectionHealthAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, + ) => Promise; + /** This operation stops failover simulation on the gateway for the specified peering location */ + stopExpressRouteSiteFailoverSimulation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + ) => PollerLike< + OperationState, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse + >; + /** @deprecated use stopExpressRouteSiteFailoverSimulation instead */ + beginStopExpressRouteSiteFailoverSimulation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse + > + >; + /** @deprecated use stopExpressRouteSiteFailoverSimulation instead */ + beginStopExpressRouteSiteFailoverSimulationAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + ) => Promise; + /** This operation starts failover simulation on the gateway for the specified peering location */ + startExpressRouteSiteFailoverSimulation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + ) => PollerLike< + OperationState, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse + >; + /** @deprecated use startExpressRouteSiteFailoverSimulation instead */ + beginStartExpressRouteSiteFailoverSimulation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse + > + >; + /** @deprecated use startExpressRouteSiteFailoverSimulation instead */ + beginStartExpressRouteSiteFailoverSimulationAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + ) => Promise; + /** This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid */ + getFailoverSingleTestDetails: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteFailoverSingleTestDetails[] + >; + /** @deprecated use getFailoverSingleTestDetails instead */ + beginGetFailoverSingleTestDetails: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteFailoverSingleTestDetails[] + > + >; + /** @deprecated use getFailoverSingleTestDetails instead */ + beginGetFailoverSingleTestDetailsAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => Promise; + /** This operation retrieves the details of all the failover tests performed on the gateway for different peering locations */ + getFailoverAllTestDetails: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteFailoverTestDetails[] + >; + /** @deprecated use getFailoverAllTestDetails instead */ + beginGetFailoverAllTestDetails: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ExpressRouteFailoverTestDetails[] + > + >; + /** @deprecated use getFailoverAllTestDetails instead */ + beginGetFailoverAllTestDetailsAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + ) => Promise; + /** Stops packet capture on virtual network gateway in the specified resource group. */ + stopPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams, + ) => PollerLike< + OperationState, + VirtualNetworkGatewaysStopPacketCaptureResponse + >; + /** @deprecated use stopPacketCapture instead */ + beginStopPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysStopPacketCaptureResponse + > + >; + /** @deprecated use stopPacketCapture instead */ + beginStopPacketCaptureAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams, + ) => Promise; + /** Starts packet capture on virtual network gateway in the specified resource group. */ + startPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams, + ) => PollerLike< + OperationState, + VirtualNetworkGatewaysStartPacketCaptureResponse + >; + /** @deprecated use startPacketCapture instead */ + beginStartPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysStartPacketCaptureResponse + > + >; + /** @deprecated use startPacketCapture instead */ + beginStartPacketCaptureAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams, + ) => Promise; + /** The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. */ + getVpnclientIpsecParameters: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, + ) => PollerLike, VpnClientIPsecParameters>; + /** @deprecated use getVpnclientIpsecParameters instead */ + beginGetVpnclientIpsecParameters: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, + ) => Promise< + SimplePollerLike, VpnClientIPsecParameters> + >; + /** @deprecated use getVpnclientIpsecParameters instead */ + beginGetVpnclientIpsecParametersAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, + ) => Promise; + /** The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. */ + setVpnclientIpsecParameters: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + vpnclientIpsecParams: VpnClientIPsecParameters, + options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, + ) => PollerLike, VpnClientIPsecParameters>; + /** @deprecated use setVpnclientIpsecParameters instead */ + beginSetVpnclientIpsecParameters: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + vpnclientIpsecParams: VpnClientIPsecParameters, + options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, + ) => Promise< + SimplePollerLike, VpnClientIPsecParameters> + >; + /** @deprecated use setVpnclientIpsecParameters instead */ + beginSetVpnclientIpsecParametersAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + vpnclientIpsecParams: VpnClientIPsecParameters, + options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, + ) => Promise; + /** This operation retrieves the route set information for an Express Route Gateway based on their resiliency */ + getRoutesInformation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams, + ) => PollerLike, GatewayRouteSetsInformation>; + /** @deprecated use getRoutesInformation instead */ + beginGetRoutesInformation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams, + ) => Promise< + SimplePollerLike, GatewayRouteSetsInformation> + >; + /** @deprecated use getRoutesInformation instead */ + beginGetRoutesInformationAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams, + ) => Promise; + /** This operation retrieves the resiliency information for an Express Route Gateway, including the gateway's current resiliency score and recommendations to further improve the score */ + getResiliencyInformation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, + ) => PollerLike, GatewayResiliencyInformation>; + /** @deprecated use getResiliencyInformation instead */ + beginGetResiliencyInformation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, + ) => Promise< + SimplePollerLike, GatewayResiliencyInformation> + >; + /** @deprecated use getResiliencyInformation instead */ + beginGetResiliencyInformationAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, + ) => Promise; + /** This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. */ + getAdvertisedRoutes: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peer: string, + options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, + ) => PollerLike, GatewayRouteListResult>; + /** @deprecated use getAdvertisedRoutes instead */ + beginGetAdvertisedRoutes: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peer: string, + options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, + ) => Promise, GatewayRouteListResult>>; + /** @deprecated use getAdvertisedRoutes instead */ + beginGetAdvertisedRoutesAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peer: string, + options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, + ) => Promise; + /** This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. */ + getLearnedRoutes: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, + ) => PollerLike, GatewayRouteListResult>; + /** @deprecated use getLearnedRoutes instead */ + beginGetLearnedRoutes: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, + ) => Promise, GatewayRouteListResult>>; + /** @deprecated use getLearnedRoutes instead */ + beginGetLearnedRoutesAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, + ) => Promise; + /** List all Radius servers with respective radius secrets from virtual network gateway VpnClientConfiguration. */ + listRadiusSecrets: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysListRadiusSecretsOptionalParams, + ) => Promise; + /** Gets a xml format representation for supported vpn devices. */ + supportedVpnDevices: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams, + ) => Promise; + /** The GetBgpPeerStatus operation retrieves the status of all BGP peers. */ + getBgpPeerStatus: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, + ) => PollerLike, BgpPeerStatusListResult>; + /** @deprecated use getBgpPeerStatus instead */ + beginGetBgpPeerStatus: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, + ) => Promise, BgpPeerStatusListResult>>; + /** @deprecated use getBgpPeerStatus instead */ + beginGetBgpPeerStatusAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, + ) => Promise; + /** Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. */ + getVpnProfilePackageUrl: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, + ) => PollerLike< + OperationState, + VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse + >; + /** @deprecated use getVpnProfilePackageUrl instead */ + beginGetVpnProfilePackageUrl: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse + > + >; + /** @deprecated use getVpnProfilePackageUrl instead */ + beginGetVpnProfilePackageUrlAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, + ) => Promise; + /** Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. */ + generateVpnProfile: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, + ) => PollerLike< + OperationState, + VirtualNetworkGatewaysGenerateVpnProfileResponse + >; + /** @deprecated use generateVpnProfile instead */ + beginGenerateVpnProfile: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysGenerateVpnProfileResponse + > + >; + /** @deprecated use generateVpnProfile instead */ + beginGenerateVpnProfileAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, + ) => Promise; + /** Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. */ + generatevpnclientpackage: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, + ) => PollerLike< + OperationState, + VirtualNetworkGatewaysGeneratevpnclientpackageResponse + >; + /** @deprecated use generatevpnclientpackage instead */ + beginGeneratevpnclientpackage: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysGeneratevpnclientpackageResponse + > + >; + /** @deprecated use generatevpnclientpackage instead */ + beginGeneratevpnclientpackageAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, + ) => Promise; + /** Resets the VPN client shared key of the virtual network gateway in the specified resource group. */ + resetVpnClientSharedKey: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, + ) => PollerLike, void>; + /** @deprecated use resetVpnClientSharedKey instead */ + beginResetVpnClientSharedKey: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, + ) => Promise, void>>; + /** @deprecated use resetVpnClientSharedKey instead */ + beginResetVpnClientSharedKeyAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, + ) => Promise; + /** Resets the primary of the virtual network gateway in the specified resource group. */ + reset: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetOptionalParams, + ) => PollerLike, VirtualNetworkGateway>; + /** @deprecated use reset instead */ + beginReset: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetOptionalParams, + ) => Promise, VirtualNetworkGateway>>; + /** @deprecated use reset instead */ + beginResetAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetOptionalParams, + ) => Promise; + /** Gets all the connections in a virtual network gateway. */ + listConnections: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysListConnectionsOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all virtual network gateways by resource group. */ + list: ( + resourceGroupName: string, + options?: VirtualNetworkGatewaysListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified virtual network gateway. */ + delete: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysDeleteOptionalParams, + ) => Promise; + /** Updates a virtual network gateway tags. */ + updateTags: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewaysUpdateTagsOptionalParams, + ) => PollerLike, VirtualNetworkGateway>; + /** @deprecated use updateTags instead */ + beginUpdateTags: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewaysUpdateTagsOptionalParams, + ) => Promise, VirtualNetworkGateway>>; + /** @deprecated use updateTags instead */ + beginUpdateTagsAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewaysUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a virtual network gateway in the specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VirtualNetworkGateway, + options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualNetworkGateway>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VirtualNetworkGateway, + options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams, + ) => Promise, VirtualNetworkGateway>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VirtualNetworkGateway, + options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified virtual network gateway by resource group. */ + get: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetOptionalParams, + ) => Promise; +} + +function _getVirtualNetworkGateways(context: NetworkManagementContext) { + return { + vpnDeviceConfigurationScript: ( + resourceGroupName: string, + virtualNetworkGatewayConnectionName: string, + parameters: VpnDeviceScriptParameters, + options?: VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams, + ) => + vpnDeviceConfigurationScript( + context, + resourceGroupName, + virtualNetworkGatewayConnectionName, + parameters, + options, + ), + invokeAbortMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, + ) => invokeAbortMigration(context, resourceGroupName, virtualNetworkGatewayName, options), + beginInvokeAbortMigration: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, + ) => { + const poller = invokeAbortMigration( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginInvokeAbortMigrationAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, + ) => { + return await invokeAbortMigration( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + }, + invokeCommitMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, + ) => invokeCommitMigration(context, resourceGroupName, virtualNetworkGatewayName, options), + beginInvokeCommitMigration: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, + ) => { + const poller = invokeCommitMigration( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginInvokeCommitMigrationAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, + ) => { + return await invokeCommitMigration( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + }, + invokeExecuteMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, + ) => invokeExecuteMigration(context, resourceGroupName, virtualNetworkGatewayName, options), + beginInvokeExecuteMigration: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, + ) => { + const poller = invokeExecuteMigration( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginInvokeExecuteMigrationAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, + ) => { + return await invokeExecuteMigration( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + }, + invokePrepareMigration: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + migrationParams: VirtualNetworkGatewayMigrationParameters, + options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, + ) => + invokePrepareMigration( + context, + resourceGroupName, + virtualNetworkGatewayName, + migrationParams, + options, + ), + beginInvokePrepareMigration: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + migrationParams: VirtualNetworkGatewayMigrationParameters, + options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, + ) => { + const poller = invokePrepareMigration( + context, + resourceGroupName, + virtualNetworkGatewayName, + migrationParams, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginInvokePrepareMigrationAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + migrationParams: VirtualNetworkGatewayMigrationParameters, + options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, + ) => { + return await invokePrepareMigration( + context, + resourceGroupName, + virtualNetworkGatewayName, + migrationParams, + options, + ); + }, + disconnectVirtualNetworkGatewayVpnConnections: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + request: P2SVpnConnectionRequest, + options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, + ) => + disconnectVirtualNetworkGatewayVpnConnections( + context, + resourceGroupName, + virtualNetworkGatewayName, + request, + options, + ), + beginDisconnectVirtualNetworkGatewayVpnConnections: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + request: P2SVpnConnectionRequest, + options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, + ) => { + const poller = disconnectVirtualNetworkGatewayVpnConnections( + context, + resourceGroupName, + virtualNetworkGatewayName, + request, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDisconnectVirtualNetworkGatewayVpnConnectionsAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + request: P2SVpnConnectionRequest, + options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, + ) => { + return await disconnectVirtualNetworkGatewayVpnConnections( + context, + resourceGroupName, + virtualNetworkGatewayName, + request, + options, + ); + }, + getVpnclientConnectionHealth: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, + ) => + getVpnclientConnectionHealth(context, resourceGroupName, virtualNetworkGatewayName, options), + beginGetVpnclientConnectionHealth: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, + ) => { + const poller = getVpnclientConnectionHealth( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetVpnclientConnectionHealthAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, + ) => { + return await getVpnclientConnectionHealth( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + }, + stopExpressRouteSiteFailoverSimulation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + ) => + stopExpressRouteSiteFailoverSimulation( + context, + resourceGroupName, + virtualNetworkGatewayName, + stopParameters, + options, + ), + beginStopExpressRouteSiteFailoverSimulation: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + ) => { + const poller = stopExpressRouteSiteFailoverSimulation( + context, + resourceGroupName, + virtualNetworkGatewayName, + stopParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStopExpressRouteSiteFailoverSimulationAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + ) => { + return await stopExpressRouteSiteFailoverSimulation( + context, + resourceGroupName, + virtualNetworkGatewayName, + stopParameters, + options, + ); + }, + startExpressRouteSiteFailoverSimulation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + ) => + startExpressRouteSiteFailoverSimulation( + context, + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + options, + ), + beginStartExpressRouteSiteFailoverSimulation: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + ) => { + const poller = startExpressRouteSiteFailoverSimulation( + context, + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStartExpressRouteSiteFailoverSimulationAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + ) => { + return await startExpressRouteSiteFailoverSimulation( + context, + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + options, + ); + }, + getFailoverSingleTestDetails: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => + getFailoverSingleTestDetails( + context, + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + failoverTestId, + options, + ), + beginGetFailoverSingleTestDetails: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => { + const poller = getFailoverSingleTestDetails( + context, + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + failoverTestId, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetFailoverSingleTestDetailsAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + ) => { + return await getFailoverSingleTestDetails( + context, + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + failoverTestId, + options, + ); + }, + getFailoverAllTestDetails: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + ) => + getFailoverAllTestDetails( + context, + resourceGroupName, + virtualNetworkGatewayName, + typeParam, + fetchLatest, + options, + ), + beginGetFailoverAllTestDetails: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + ) => { + const poller = getFailoverAllTestDetails( + context, + resourceGroupName, + virtualNetworkGatewayName, + typeParam, + fetchLatest, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetFailoverAllTestDetailsAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + ) => { + return await getFailoverAllTestDetails( + context, + resourceGroupName, + virtualNetworkGatewayName, + typeParam, + fetchLatest, + options, + ); + }, + stopPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams, + ) => + stopPacketCapture(context, resourceGroupName, virtualNetworkGatewayName, parameters, options), + beginStopPacketCapture: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams, + ) => { + const poller = stopPacketCapture( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStopPacketCaptureAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnPacketCaptureStopParameters, + options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams, + ) => { + return await stopPacketCapture( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ); + }, + startPacketCapture: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams, + ) => startPacketCapture(context, resourceGroupName, virtualNetworkGatewayName, options), + beginStartPacketCapture: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams, + ) => { + const poller = startPacketCapture( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStartPacketCaptureAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams, + ) => { + return await startPacketCapture( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + }, + getVpnclientIpsecParameters: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, + ) => + getVpnclientIpsecParameters(context, resourceGroupName, virtualNetworkGatewayName, options), + beginGetVpnclientIpsecParameters: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, + ) => { + const poller = getVpnclientIpsecParameters( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetVpnclientIpsecParametersAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, + ) => { + return await getVpnclientIpsecParameters( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + }, + setVpnclientIpsecParameters: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + vpnclientIpsecParams: VpnClientIPsecParameters, + options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, + ) => + setVpnclientIpsecParameters( + context, + resourceGroupName, + virtualNetworkGatewayName, + vpnclientIpsecParams, + options, + ), + beginSetVpnclientIpsecParameters: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + vpnclientIpsecParams: VpnClientIPsecParameters, + options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, + ) => { + const poller = setVpnclientIpsecParameters( + context, + resourceGroupName, + virtualNetworkGatewayName, + vpnclientIpsecParams, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginSetVpnclientIpsecParametersAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + vpnclientIpsecParams: VpnClientIPsecParameters, + options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, + ) => { + return await setVpnclientIpsecParameters( + context, + resourceGroupName, + virtualNetworkGatewayName, + vpnclientIpsecParams, + options, + ); + }, + getRoutesInformation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams, + ) => getRoutesInformation(context, resourceGroupName, virtualNetworkGatewayName, options), + beginGetRoutesInformation: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams, + ) => { + const poller = getRoutesInformation( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetRoutesInformationAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams, + ) => { + return await getRoutesInformation( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + }, + getResiliencyInformation: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, + ) => getResiliencyInformation(context, resourceGroupName, virtualNetworkGatewayName, options), + beginGetResiliencyInformation: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, + ) => { + const poller = getResiliencyInformation( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetResiliencyInformationAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, + ) => { + return await getResiliencyInformation( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + }, + getAdvertisedRoutes: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peer: string, + options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, + ) => getAdvertisedRoutes(context, resourceGroupName, virtualNetworkGatewayName, peer, options), + beginGetAdvertisedRoutes: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peer: string, + options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, + ) => { + const poller = getAdvertisedRoutes( + context, + resourceGroupName, + virtualNetworkGatewayName, + peer, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetAdvertisedRoutesAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peer: string, + options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, + ) => { + return await getAdvertisedRoutes( + context, + resourceGroupName, + virtualNetworkGatewayName, + peer, + options, + ); + }, + getLearnedRoutes: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, + ) => getLearnedRoutes(context, resourceGroupName, virtualNetworkGatewayName, options), + beginGetLearnedRoutes: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, + ) => { + const poller = getLearnedRoutes( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetLearnedRoutesAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, + ) => { + return await getLearnedRoutes(context, resourceGroupName, virtualNetworkGatewayName, options); + }, + listRadiusSecrets: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysListRadiusSecretsOptionalParams, + ) => listRadiusSecrets(context, resourceGroupName, virtualNetworkGatewayName, options), + supportedVpnDevices: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams, + ) => supportedVpnDevices(context, resourceGroupName, virtualNetworkGatewayName, options), + getBgpPeerStatus: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, + ) => getBgpPeerStatus(context, resourceGroupName, virtualNetworkGatewayName, options), + beginGetBgpPeerStatus: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, + ) => { + const poller = getBgpPeerStatus( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetBgpPeerStatusAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, + ) => { + return await getBgpPeerStatus(context, resourceGroupName, virtualNetworkGatewayName, options); + }, + getVpnProfilePackageUrl: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, + ) => getVpnProfilePackageUrl(context, resourceGroupName, virtualNetworkGatewayName, options), + beginGetVpnProfilePackageUrl: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, + ) => { + const poller = getVpnProfilePackageUrl( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetVpnProfilePackageUrlAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, + ) => { + return await getVpnProfilePackageUrl( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + }, + generateVpnProfile: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, + ) => + generateVpnProfile( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ), + beginGenerateVpnProfile: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, + ) => { + const poller = generateVpnProfile( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGenerateVpnProfileAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, + ) => { + return await generateVpnProfile( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ); + }, + generatevpnclientpackage: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, + ) => + generatevpnclientpackage( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ), + beginGeneratevpnclientpackage: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, + ) => { + const poller = generatevpnclientpackage( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGeneratevpnclientpackageAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VpnClientParameters, + options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, + ) => { + return await generatevpnclientpackage( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ); + }, + resetVpnClientSharedKey: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, + ) => resetVpnClientSharedKey(context, resourceGroupName, virtualNetworkGatewayName, options), + beginResetVpnClientSharedKey: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, + ) => { + const poller = resetVpnClientSharedKey( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginResetVpnClientSharedKeyAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, + ) => { + return await resetVpnClientSharedKey( + context, + resourceGroupName, + virtualNetworkGatewayName, + options, + ); + }, + reset: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetOptionalParams, + ) => reset(context, resourceGroupName, virtualNetworkGatewayName, options), + beginReset: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetOptionalParams, + ) => { + const poller = reset(context, resourceGroupName, virtualNetworkGatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginResetAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysResetOptionalParams, + ) => { + return await reset(context, resourceGroupName, virtualNetworkGatewayName, options); + }, + listConnections: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysListConnectionsOptionalParams, + ) => listConnections(context, resourceGroupName, virtualNetworkGatewayName, options), + list: (resourceGroupName: string, options?: VirtualNetworkGatewaysListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualNetworkGatewayName, options), + beginDelete: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualNetworkGatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualNetworkGatewayName, options); + }, + updateTags: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewaysUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, virtualNetworkGatewayName, parameters, options), + beginUpdateTags: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewaysUpdateTagsOptionalParams, + ) => { + const poller = updateTags( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateTagsAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: TagsObject, + options?: VirtualNetworkGatewaysUpdateTagsOptionalParams, + ) => { + return await updateTags( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VirtualNetworkGateway, + options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, virtualNetworkGatewayName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VirtualNetworkGateway, + options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + parameters: VirtualNetworkGateway, + options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualNetworkGatewayName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualNetworkGatewayName: string, + options?: VirtualNetworkGatewaysGetOptionalParams, + ) => get(context, resourceGroupName, virtualNetworkGatewayName, options), + }; +} + +export function _getVirtualNetworkGatewaysOperations( + context: NetworkManagementContext, +): VirtualNetworkGatewaysOperations { + return { + ..._getVirtualNetworkGateways(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualNetworkPeerings/index.ts b/sdk/network/arm-network/src/classic/virtualNetworkPeerings/index.ts new file mode 100644 index 000000000000..ab747b70a458 --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualNetworkPeerings/index.ts @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/virtualNetworkPeerings/operations.js"; +import { + VirtualNetworkPeeringsListOptionalParams, + VirtualNetworkPeeringsDeleteOptionalParams, + VirtualNetworkPeeringsCreateOrUpdateOptionalParams, + VirtualNetworkPeeringsGetOptionalParams, +} from "../../api/virtualNetworkPeerings/options.js"; +import { VirtualNetworkPeering } from "../../models/common/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualNetworkPeerings operations. */ +export interface VirtualNetworkPeeringsOperations { + /** Gets all virtual network peerings in a virtual network. */ + list: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworkPeeringsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified virtual network peering. */ + delete: ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options?: VirtualNetworkPeeringsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options?: VirtualNetworkPeeringsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options?: VirtualNetworkPeeringsDeleteOptionalParams, + ) => Promise; + /** Creates or updates a peering in the specified virtual network. */ + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + virtualNetworkPeeringParameters: VirtualNetworkPeering, + options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualNetworkPeering>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + virtualNetworkPeeringParameters: VirtualNetworkPeering, + options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams, + ) => Promise, VirtualNetworkPeering>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + virtualNetworkPeeringParameters: VirtualNetworkPeering, + options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified virtual network peering. */ + get: ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options?: VirtualNetworkPeeringsGetOptionalParams, + ) => Promise; +} + +function _getVirtualNetworkPeerings(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworkPeeringsListOptionalParams, + ) => list(context, resourceGroupName, virtualNetworkName, options), + delete: ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options?: VirtualNetworkPeeringsDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options), + beginDelete: async ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options?: VirtualNetworkPeeringsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + virtualNetworkName, + virtualNetworkPeeringName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options?: VirtualNetworkPeeringsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + virtualNetworkName, + virtualNetworkPeeringName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + virtualNetworkPeeringParameters: VirtualNetworkPeering, + options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualNetworkName, + virtualNetworkPeeringName, + virtualNetworkPeeringParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + virtualNetworkPeeringParameters: VirtualNetworkPeering, + options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualNetworkName, + virtualNetworkPeeringName, + virtualNetworkPeeringParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + virtualNetworkPeeringParameters: VirtualNetworkPeering, + options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualNetworkName, + virtualNetworkPeeringName, + virtualNetworkPeeringParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworkPeeringName: string, + options?: VirtualNetworkPeeringsGetOptionalParams, + ) => get(context, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options), + }; +} + +export function _getVirtualNetworkPeeringsOperations( + context: NetworkManagementContext, +): VirtualNetworkPeeringsOperations { + return { + ..._getVirtualNetworkPeerings(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualNetworkTaps/index.ts b/sdk/network/arm-network/src/classic/virtualNetworkTaps/index.ts new file mode 100644 index 000000000000..c88d9c8ab21e --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualNetworkTaps/index.ts @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/virtualNetworkTaps/operations.js"; +import { + VirtualNetworkTapsListAllOptionalParams, + VirtualNetworkTapsListByResourceGroupOptionalParams, + VirtualNetworkTapsDeleteOptionalParams, + VirtualNetworkTapsUpdateTagsOptionalParams, + VirtualNetworkTapsCreateOrUpdateOptionalParams, + VirtualNetworkTapsGetOptionalParams, +} from "../../api/virtualNetworkTaps/options.js"; +import { VirtualNetworkTap } from "../../models/common/models.js"; +import { TagsObject } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualNetworkTaps operations. */ +export interface VirtualNetworkTapsOperations { + /** Gets all the VirtualNetworkTaps in a subscription. */ + listAll: ( + options?: VirtualNetworkTapsListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all the VirtualNetworkTaps in a subscription. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualNetworkTapsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete a VirtualNetworkTap */ + delete: ( + resourceGroupName: string, + tapName: string, + options?: VirtualNetworkTapsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + tapName: string, + options?: VirtualNetworkTapsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + tapName: string, + options?: VirtualNetworkTapsDeleteOptionalParams, + ) => Promise; + /** Update a VirtualNetworkTap */ + updateTags: ( + resourceGroupName: string, + tapName: string, + tapParameters: TagsObject, + options?: VirtualNetworkTapsUpdateTagsOptionalParams, + ) => Promise; + /** Create a VirtualNetworkTap */ + createOrUpdate: ( + resourceGroupName: string, + tapName: string, + parameters: VirtualNetworkTap, + options?: VirtualNetworkTapsCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualNetworkTap>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + tapName: string, + parameters: VirtualNetworkTap, + options?: VirtualNetworkTapsCreateOrUpdateOptionalParams, + ) => Promise, VirtualNetworkTap>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + tapName: string, + parameters: VirtualNetworkTap, + options?: VirtualNetworkTapsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get a VirtualNetworkTap */ + get: ( + resourceGroupName: string, + tapName: string, + options?: VirtualNetworkTapsGetOptionalParams, + ) => Promise; +} + +function _getVirtualNetworkTaps(context: NetworkManagementContext) { + return { + listAll: (options?: VirtualNetworkTapsListAllOptionalParams) => listAll(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualNetworkTapsListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + tapName: string, + options?: VirtualNetworkTapsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, tapName, options), + beginDelete: async ( + resourceGroupName: string, + tapName: string, + options?: VirtualNetworkTapsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, tapName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + tapName: string, + options?: VirtualNetworkTapsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, tapName, options); + }, + updateTags: ( + resourceGroupName: string, + tapName: string, + tapParameters: TagsObject, + options?: VirtualNetworkTapsUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, tapName, tapParameters, options), + createOrUpdate: ( + resourceGroupName: string, + tapName: string, + parameters: VirtualNetworkTap, + options?: VirtualNetworkTapsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, tapName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + tapName: string, + parameters: VirtualNetworkTap, + options?: VirtualNetworkTapsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate(context, resourceGroupName, tapName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + tapName: string, + parameters: VirtualNetworkTap, + options?: VirtualNetworkTapsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate(context, resourceGroupName, tapName, parameters, options); + }, + get: ( + resourceGroupName: string, + tapName: string, + options?: VirtualNetworkTapsGetOptionalParams, + ) => get(context, resourceGroupName, tapName, options), + }; +} + +export function _getVirtualNetworkTapsOperations( + context: NetworkManagementContext, +): VirtualNetworkTapsOperations { + return { + ..._getVirtualNetworkTaps(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualNetworks/index.ts b/sdk/network/arm-network/src/classic/virtualNetworks/index.ts new file mode 100644 index 000000000000..e2c26ffce48d --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualNetworks/index.ts @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listDdosProtectionStatus, + listUsage, + checkIPAddressAvailability, + listAll, + list, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/virtualNetworks/operations.js"; +import { + VirtualNetworksListDdosProtectionStatusOptionalParams, + VirtualNetworksListUsageOptionalParams, + VirtualNetworksCheckIPAddressAvailabilityOptionalParams, + VirtualNetworksListAllOptionalParams, + VirtualNetworksListOptionalParams, + VirtualNetworksDeleteOptionalParams, + VirtualNetworksUpdateTagsOptionalParams, + VirtualNetworksCreateOrUpdateOptionalParams, + VirtualNetworksGetOptionalParams, +} from "../../api/virtualNetworks/options.js"; +import { VirtualNetwork } from "../../models/common/models.js"; +import { + TagsObject, + PublicIpDdosProtectionStatusResult, + IPAddressAvailabilityResult, + VirtualNetworkUsage, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualNetworks operations. */ +export interface VirtualNetworksOperations { + /** Gets the Ddos Protection Status of all IP Addresses under the Virtual Network */ + listDdosProtectionStatus: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksListDdosProtectionStatusOptionalParams, + ) => PagedAsyncIterableIterator; + /** @deprecated use listDdosProtectionStatus instead */ + beginListDdosProtectionStatusAndWait: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksListDdosProtectionStatusOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists usage stats. */ + listUsage: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksListUsageOptionalParams, + ) => PagedAsyncIterableIterator; + /** Checks whether a private IP address is available for use. */ + checkIPAddressAvailability: ( + resourceGroupName: string, + virtualNetworkName: string, + ipAddress: string, + options?: VirtualNetworksCheckIPAddressAvailabilityOptionalParams, + ) => Promise; + /** Gets all virtual networks in a subscription. */ + listAll: ( + options?: VirtualNetworksListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all virtual networks in a resource group. */ + list: ( + resourceGroupName: string, + options?: VirtualNetworksListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified virtual network. */ + delete: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams, + ) => Promise; + /** Updates a virtual network tags. */ + updateTags: ( + resourceGroupName: string, + virtualNetworkName: string, + parameters: TagsObject, + options?: VirtualNetworksUpdateTagsOptionalParams, + ) => Promise; + /** Creates or updates a virtual network in the specified resource group. */ + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkName: string, + parameters: VirtualNetwork, + options?: VirtualNetworksCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualNetwork>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualNetworkName: string, + parameters: VirtualNetwork, + options?: VirtualNetworksCreateOrUpdateOptionalParams, + ) => Promise, VirtualNetwork>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualNetworkName: string, + parameters: VirtualNetwork, + options?: VirtualNetworksCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified virtual network by resource group. */ + get: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksGetOptionalParams, + ) => Promise; +} + +function _getVirtualNetworks(context: NetworkManagementContext) { + return { + listDdosProtectionStatus: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksListDdosProtectionStatusOptionalParams, + ) => listDdosProtectionStatus(context, resourceGroupName, virtualNetworkName, options), + beginListDdosProtectionStatusAndWait: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksListDdosProtectionStatusOptionalParams, + ) => { + return listDdosProtectionStatus(context, resourceGroupName, virtualNetworkName, options); + }, + listUsage: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksListUsageOptionalParams, + ) => listUsage(context, resourceGroupName, virtualNetworkName, options), + checkIPAddressAvailability: ( + resourceGroupName: string, + virtualNetworkName: string, + ipAddress: string, + options?: VirtualNetworksCheckIPAddressAvailabilityOptionalParams, + ) => + checkIPAddressAvailability( + context, + resourceGroupName, + virtualNetworkName, + ipAddress, + options, + ), + listAll: (options?: VirtualNetworksListAllOptionalParams) => listAll(context, options), + list: (resourceGroupName: string, options?: VirtualNetworksListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualNetworkName, options), + beginDelete: async ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualNetworkName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualNetworkName, options); + }, + updateTags: ( + resourceGroupName: string, + virtualNetworkName: string, + parameters: TagsObject, + options?: VirtualNetworksUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, virtualNetworkName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkName: string, + parameters: VirtualNetwork, + options?: VirtualNetworksCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, virtualNetworkName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualNetworkName: string, + parameters: VirtualNetwork, + options?: VirtualNetworksCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualNetworkName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualNetworkName: string, + parameters: VirtualNetwork, + options?: VirtualNetworksCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualNetworkName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksGetOptionalParams, + ) => get(context, resourceGroupName, virtualNetworkName, options), + }; +} + +export function _getVirtualNetworksOperations( + context: NetworkManagementContext, +): VirtualNetworksOperations { + return { + ..._getVirtualNetworks(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualRouterPeerings/index.ts b/sdk/network/arm-network/src/classic/virtualRouterPeerings/index.ts new file mode 100644 index 000000000000..1ca461c4b9d0 --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualRouterPeerings/index.ts @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list, $delete, createOrUpdate, get } from "../../api/virtualRouterPeerings/operations.js"; +import { + VirtualRouterPeeringsListOptionalParams, + VirtualRouterPeeringsDeleteOptionalParams, + VirtualRouterPeeringsCreateOrUpdateOptionalParams, + VirtualRouterPeeringsGetOptionalParams, +} from "../../api/virtualRouterPeerings/options.js"; +import { VirtualRouterPeering } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualRouterPeerings operations. */ +export interface VirtualRouterPeeringsOperations { + /** Lists all Virtual Router Peerings in a Virtual Router resource. */ + list: ( + resourceGroupName: string, + virtualRouterName: string, + options?: VirtualRouterPeeringsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified peering from a Virtual Router. */ + delete: ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options?: VirtualRouterPeeringsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options?: VirtualRouterPeeringsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options?: VirtualRouterPeeringsDeleteOptionalParams, + ) => Promise; + /** Creates or updates the specified Virtual Router Peering. */ + createOrUpdate: ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + parameters: VirtualRouterPeering, + options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualRouterPeering>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + parameters: VirtualRouterPeering, + options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams, + ) => Promise, VirtualRouterPeering>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + parameters: VirtualRouterPeering, + options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified Virtual Router Peering. */ + get: ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options?: VirtualRouterPeeringsGetOptionalParams, + ) => Promise; +} + +function _getVirtualRouterPeerings(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualRouterName: string, + options?: VirtualRouterPeeringsListOptionalParams, + ) => list(context, resourceGroupName, virtualRouterName, options), + delete: ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options?: VirtualRouterPeeringsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualRouterName, peeringName, options), + beginDelete: async ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options?: VirtualRouterPeeringsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualRouterName, peeringName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options?: VirtualRouterPeeringsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualRouterName, peeringName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + parameters: VirtualRouterPeering, + options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualRouterName, + peeringName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + parameters: VirtualRouterPeering, + options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualRouterName, + peeringName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + parameters: VirtualRouterPeering, + options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualRouterName, + peeringName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualRouterName: string, + peeringName: string, + options?: VirtualRouterPeeringsGetOptionalParams, + ) => get(context, resourceGroupName, virtualRouterName, peeringName, options), + }; +} + +export function _getVirtualRouterPeeringsOperations( + context: NetworkManagementContext, +): VirtualRouterPeeringsOperations { + return { + ..._getVirtualRouterPeerings(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualRouters/index.ts b/sdk/network/arm-network/src/classic/virtualRouters/index.ts new file mode 100644 index 000000000000..abbf17cb5e11 --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualRouters/index.ts @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + listByResourceGroup, + $delete, + createOrUpdate, + get, +} from "../../api/virtualRouters/operations.js"; +import { + VirtualRoutersListOptionalParams, + VirtualRoutersListByResourceGroupOptionalParams, + VirtualRoutersDeleteOptionalParams, + VirtualRoutersCreateOrUpdateOptionalParams, + VirtualRoutersGetOptionalParams, +} from "../../api/virtualRouters/options.js"; +import { VirtualRouter } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualRouters operations. */ +export interface VirtualRoutersOperations { + /** Gets all the Virtual Routers in a subscription. */ + list: (options?: VirtualRoutersListOptionalParams) => PagedAsyncIterableIterator; + /** Lists all Virtual Routers in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualRoutersListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Virtual Router. */ + delete: ( + resourceGroupName: string, + virtualRouterName: string, + options?: VirtualRoutersDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualRouterName: string, + options?: VirtualRoutersDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualRouterName: string, + options?: VirtualRoutersDeleteOptionalParams, + ) => Promise; + /** Creates or updates the specified Virtual Router. */ + createOrUpdate: ( + resourceGroupName: string, + virtualRouterName: string, + parameters: VirtualRouter, + options?: VirtualRoutersCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualRouter>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualRouterName: string, + parameters: VirtualRouter, + options?: VirtualRoutersCreateOrUpdateOptionalParams, + ) => Promise, VirtualRouter>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualRouterName: string, + parameters: VirtualRouter, + options?: VirtualRoutersCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the specified Virtual Router. */ + get: ( + resourceGroupName: string, + virtualRouterName: string, + options?: VirtualRoutersGetOptionalParams, + ) => Promise; +} + +function _getVirtualRouters(context: NetworkManagementContext) { + return { + list: (options?: VirtualRoutersListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualRoutersListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + virtualRouterName: string, + options?: VirtualRoutersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualRouterName, options), + beginDelete: async ( + resourceGroupName: string, + virtualRouterName: string, + options?: VirtualRoutersDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualRouterName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualRouterName: string, + options?: VirtualRoutersDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualRouterName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualRouterName: string, + parameters: VirtualRouter, + options?: VirtualRoutersCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, virtualRouterName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualRouterName: string, + parameters: VirtualRouter, + options?: VirtualRoutersCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualRouterName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualRouterName: string, + parameters: VirtualRouter, + options?: VirtualRoutersCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualRouterName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualRouterName: string, + options?: VirtualRoutersGetOptionalParams, + ) => get(context, resourceGroupName, virtualRouterName, options), + }; +} + +export function _getVirtualRoutersOperations( + context: NetworkManagementContext, +): VirtualRoutersOperations { + return { + ..._getVirtualRouters(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/virtualWans/index.ts b/sdk/network/arm-network/src/classic/virtualWans/index.ts new file mode 100644 index 000000000000..85b44aac64e2 --- /dev/null +++ b/sdk/network/arm-network/src/classic/virtualWans/index.ts @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/virtualWans/operations.js"; +import { + VirtualWansListOptionalParams, + VirtualWansListByResourceGroupOptionalParams, + VirtualWansDeleteOptionalParams, + VirtualWansUpdateTagsOptionalParams, + VirtualWansCreateOrUpdateOptionalParams, + VirtualWansGetOptionalParams, +} from "../../api/virtualWans/options.js"; +import { TagsObject, VirtualWAN } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualWans operations. */ +export interface VirtualWansOperations { + /** Lists all the VirtualWANs in a subscription. */ + list: (options?: VirtualWansListOptionalParams) => PagedAsyncIterableIterator; + /** Lists all the VirtualWANs in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualWansListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a VirtualWAN. */ + delete: ( + resourceGroupName: string, + virtualWANName: string, + options?: VirtualWansDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualWANName: string, + options?: VirtualWansDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualWANName: string, + options?: VirtualWansDeleteOptionalParams, + ) => Promise; + /** Updates a VirtualWAN tags. */ + updateTags: ( + resourceGroupName: string, + virtualWANName: string, + wanParameters: TagsObject, + options?: VirtualWansUpdateTagsOptionalParams, + ) => Promise; + /** Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. */ + createOrUpdate: ( + resourceGroupName: string, + virtualWANName: string, + wanParameters: VirtualWAN, + options?: VirtualWansCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualWAN>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualWANName: string, + wanParameters: VirtualWAN, + options?: VirtualWansCreateOrUpdateOptionalParams, + ) => Promise, VirtualWAN>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualWANName: string, + wanParameters: VirtualWAN, + options?: VirtualWansCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a VirtualWAN. */ + get: ( + resourceGroupName: string, + virtualWANName: string, + options?: VirtualWansGetOptionalParams, + ) => Promise; +} + +function _getVirtualWans(context: NetworkManagementContext) { + return { + list: (options?: VirtualWansListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualWansListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + virtualWANName: string, + options?: VirtualWansDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualWANName, options), + beginDelete: async ( + resourceGroupName: string, + virtualWANName: string, + options?: VirtualWansDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualWANName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualWANName: string, + options?: VirtualWansDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualWANName, options); + }, + updateTags: ( + resourceGroupName: string, + virtualWANName: string, + wanParameters: TagsObject, + options?: VirtualWansUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, virtualWANName, wanParameters, options), + createOrUpdate: ( + resourceGroupName: string, + virtualWANName: string, + wanParameters: VirtualWAN, + options?: VirtualWansCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, virtualWANName, wanParameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualWANName: string, + wanParameters: VirtualWAN, + options?: VirtualWansCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualWANName, + wanParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualWANName: string, + wanParameters: VirtualWAN, + options?: VirtualWansCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualWANName, + wanParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualWANName: string, + options?: VirtualWansGetOptionalParams, + ) => get(context, resourceGroupName, virtualWANName, options), + }; +} + +export function _getVirtualWansOperations( + context: NetworkManagementContext, +): VirtualWansOperations { + return { + ..._getVirtualWans(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/vpnConnections/index.ts b/sdk/network/arm-network/src/classic/vpnConnections/index.ts new file mode 100644 index 000000000000..c6dcdf292ae7 --- /dev/null +++ b/sdk/network/arm-network/src/classic/vpnConnections/index.ts @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listByVpnGateway, + stopPacketCapture, + startPacketCapture, + $delete, + createOrUpdate, + get, +} from "../../api/vpnConnections/operations.js"; +import { + VpnConnectionsListByVpnGatewayOptionalParams, + VpnConnectionsStopPacketCaptureOptionalParams, + VpnConnectionsStartPacketCaptureOptionalParams, + VpnConnectionsDeleteOptionalParams, + VpnConnectionsCreateOrUpdateOptionalParams, + VpnConnectionsGetOptionalParams, +} from "../../api/vpnConnections/options.js"; +import { VpnConnection } from "../../models/microsoft/network/models.js"; +import { + VpnConnectionsStopPacketCaptureResponse, + VpnConnectionsStartPacketCaptureResponse, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VpnConnections operations. */ +export interface VpnConnectionsOperations { + /** Retrieves all vpn connections for a particular virtual wan vpn gateway. */ + listByVpnGateway: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnConnectionsListByVpnGatewayOptionalParams, + ) => PagedAsyncIterableIterator; + /** Stops packet capture on Vpn connection in the specified resource group. */ + stopPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStopPacketCaptureOptionalParams, + ) => PollerLike< + OperationState, + VpnConnectionsStopPacketCaptureResponse + >; + /** @deprecated use stopPacketCapture instead */ + beginStopPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStopPacketCaptureOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VpnConnectionsStopPacketCaptureResponse + > + >; + /** @deprecated use stopPacketCapture instead */ + beginStopPacketCaptureAndWait: ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStopPacketCaptureOptionalParams, + ) => Promise; + /** Starts packet capture on Vpn connection in the specified resource group. */ + startPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStartPacketCaptureOptionalParams, + ) => PollerLike< + OperationState, + VpnConnectionsStartPacketCaptureResponse + >; + /** @deprecated use startPacketCapture instead */ + beginStartPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStartPacketCaptureOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VpnConnectionsStartPacketCaptureResponse + > + >; + /** @deprecated use startPacketCapture instead */ + beginStartPacketCaptureAndWait: ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStartPacketCaptureOptionalParams, + ) => Promise; + /** Deletes a vpn connection. */ + delete: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options?: VpnConnectionsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options?: VpnConnectionsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options?: VpnConnectionsDeleteOptionalParams, + ) => Promise; + /** Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. */ + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + vpnConnectionParameters: VpnConnection, + options?: VpnConnectionsCreateOrUpdateOptionalParams, + ) => PollerLike, VpnConnection>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + vpnConnectionParameters: VpnConnection, + options?: VpnConnectionsCreateOrUpdateOptionalParams, + ) => Promise, VpnConnection>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + vpnConnectionParameters: VpnConnection, + options?: VpnConnectionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a vpn connection. */ + get: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options?: VpnConnectionsGetOptionalParams, + ) => Promise; +} + +function _getVpnConnections(context: NetworkManagementContext) { + return { + listByVpnGateway: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnConnectionsListByVpnGatewayOptionalParams, + ) => listByVpnGateway(context, resourceGroupName, gatewayName, options), + stopPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStopPacketCaptureOptionalParams, + ) => stopPacketCapture(context, resourceGroupName, gatewayName, vpnConnectionName, options), + beginStopPacketCapture: async ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStopPacketCaptureOptionalParams, + ) => { + const poller = stopPacketCapture( + context, + resourceGroupName, + gatewayName, + vpnConnectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStopPacketCaptureAndWait: async ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStopPacketCaptureOptionalParams, + ) => { + return await stopPacketCapture( + context, + resourceGroupName, + gatewayName, + vpnConnectionName, + options, + ); + }, + startPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStartPacketCaptureOptionalParams, + ) => startPacketCapture(context, resourceGroupName, gatewayName, vpnConnectionName, options), + beginStartPacketCapture: async ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStartPacketCaptureOptionalParams, + ) => { + const poller = startPacketCapture( + context, + resourceGroupName, + gatewayName, + vpnConnectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStartPacketCaptureAndWait: async ( + resourceGroupName: string, + gatewayName: string, + vpnConnectionName: string, + options?: VpnConnectionsStartPacketCaptureOptionalParams, + ) => { + return await startPacketCapture( + context, + resourceGroupName, + gatewayName, + vpnConnectionName, + options, + ); + }, + delete: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options?: VpnConnectionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, gatewayName, connectionName, options), + beginDelete: async ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options?: VpnConnectionsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, gatewayName, connectionName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options?: VpnConnectionsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, gatewayName, connectionName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + vpnConnectionParameters: VpnConnection, + options?: VpnConnectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + gatewayName, + connectionName, + vpnConnectionParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + vpnConnectionParameters: VpnConnection, + options?: VpnConnectionsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + gatewayName, + connectionName, + vpnConnectionParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + vpnConnectionParameters: VpnConnection, + options?: VpnConnectionsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + gatewayName, + connectionName, + vpnConnectionParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options?: VpnConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, gatewayName, connectionName, options), + }; +} + +export function _getVpnConnectionsOperations( + context: NetworkManagementContext, +): VpnConnectionsOperations { + return { + ..._getVpnConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/vpnGateways/index.ts b/sdk/network/arm-network/src/classic/vpnGateways/index.ts new file mode 100644 index 000000000000..36a70a9ea2ce --- /dev/null +++ b/sdk/network/arm-network/src/classic/vpnGateways/index.ts @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + stopPacketCapture, + startPacketCapture, + reset, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/vpnGateways/operations.js"; +import { + VpnGatewaysStopPacketCaptureOptionalParams, + VpnGatewaysStartPacketCaptureOptionalParams, + VpnGatewaysResetOptionalParams, + VpnGatewaysListOptionalParams, + VpnGatewaysListByResourceGroupOptionalParams, + VpnGatewaysDeleteOptionalParams, + VpnGatewaysUpdateTagsOptionalParams, + VpnGatewaysCreateOrUpdateOptionalParams, + VpnGatewaysGetOptionalParams, +} from "../../api/vpnGateways/options.js"; +import { TagsObject, VpnGateway } from "../../models/microsoft/network/models.js"; +import { + VpnGatewaysStopPacketCaptureResponse, + VpnGatewaysStartPacketCaptureResponse, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VpnGateways operations. */ +export interface VpnGatewaysOperations { + /** Stops packet capture on vpn gateway in the specified resource group. */ + stopPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStopPacketCaptureOptionalParams, + ) => PollerLike< + OperationState, + VpnGatewaysStopPacketCaptureResponse + >; + /** @deprecated use stopPacketCapture instead */ + beginStopPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStopPacketCaptureOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VpnGatewaysStopPacketCaptureResponse + > + >; + /** @deprecated use stopPacketCapture instead */ + beginStopPacketCaptureAndWait: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStopPacketCaptureOptionalParams, + ) => Promise; + /** Starts packet capture on vpn gateway in the specified resource group. */ + startPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStartPacketCaptureOptionalParams, + ) => PollerLike< + OperationState, + VpnGatewaysStartPacketCaptureResponse + >; + /** @deprecated use startPacketCapture instead */ + beginStartPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStartPacketCaptureOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VpnGatewaysStartPacketCaptureResponse + > + >; + /** @deprecated use startPacketCapture instead */ + beginStartPacketCaptureAndWait: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStartPacketCaptureOptionalParams, + ) => Promise; + /** Resets the primary of the vpn gateway in the specified resource group. */ + reset: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysResetOptionalParams, + ) => PollerLike, VpnGateway>; + /** @deprecated use reset instead */ + beginReset: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysResetOptionalParams, + ) => Promise, VpnGateway>>; + /** @deprecated use reset instead */ + beginResetAndWait: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysResetOptionalParams, + ) => Promise; + /** Lists all the VpnGateways in a subscription. */ + list: (options?: VpnGatewaysListOptionalParams) => PagedAsyncIterableIterator; + /** Lists all the VpnGateways in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VpnGatewaysListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a virtual wan vpn gateway. */ + delete: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysDeleteOptionalParams, + ) => Promise; + /** Updates virtual wan vpn gateway tags. */ + updateTags: ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: TagsObject, + options?: VpnGatewaysUpdateTagsOptionalParams, + ) => PollerLike, VpnGateway>; + /** @deprecated use updateTags instead */ + beginUpdateTags: ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: TagsObject, + options?: VpnGatewaysUpdateTagsOptionalParams, + ) => Promise, VpnGateway>>; + /** @deprecated use updateTags instead */ + beginUpdateTagsAndWait: ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: TagsObject, + options?: VpnGatewaysUpdateTagsOptionalParams, + ) => Promise; + /** Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. */ + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: VpnGateway, + options?: VpnGatewaysCreateOrUpdateOptionalParams, + ) => PollerLike, VpnGateway>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: VpnGateway, + options?: VpnGatewaysCreateOrUpdateOptionalParams, + ) => Promise, VpnGateway>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: VpnGateway, + options?: VpnGatewaysCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a virtual wan vpn gateway. */ + get: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysGetOptionalParams, + ) => Promise; +} + +function _getVpnGateways(context: NetworkManagementContext) { + return { + stopPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStopPacketCaptureOptionalParams, + ) => stopPacketCapture(context, resourceGroupName, gatewayName, options), + beginStopPacketCapture: async ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStopPacketCaptureOptionalParams, + ) => { + const poller = stopPacketCapture(context, resourceGroupName, gatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStopPacketCaptureAndWait: async ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStopPacketCaptureOptionalParams, + ) => { + return await stopPacketCapture(context, resourceGroupName, gatewayName, options); + }, + startPacketCapture: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStartPacketCaptureOptionalParams, + ) => startPacketCapture(context, resourceGroupName, gatewayName, options), + beginStartPacketCapture: async ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStartPacketCaptureOptionalParams, + ) => { + const poller = startPacketCapture(context, resourceGroupName, gatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStartPacketCaptureAndWait: async ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysStartPacketCaptureOptionalParams, + ) => { + return await startPacketCapture(context, resourceGroupName, gatewayName, options); + }, + reset: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysResetOptionalParams, + ) => reset(context, resourceGroupName, gatewayName, options), + beginReset: async ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysResetOptionalParams, + ) => { + const poller = reset(context, resourceGroupName, gatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginResetAndWait: async ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysResetOptionalParams, + ) => { + return await reset(context, resourceGroupName, gatewayName, options); + }, + list: (options?: VpnGatewaysListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VpnGatewaysListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysDeleteOptionalParams, + ) => $delete(context, resourceGroupName, gatewayName, options), + beginDelete: async ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, gatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + gatewayName: string, + options?: VpnGatewaysDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, gatewayName, options); + }, + updateTags: ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: TagsObject, + options?: VpnGatewaysUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, gatewayName, vpnGatewayParameters, options), + beginUpdateTags: async ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: TagsObject, + options?: VpnGatewaysUpdateTagsOptionalParams, + ) => { + const poller = updateTags( + context, + resourceGroupName, + gatewayName, + vpnGatewayParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateTagsAndWait: async ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: TagsObject, + options?: VpnGatewaysUpdateTagsOptionalParams, + ) => { + return await updateTags( + context, + resourceGroupName, + gatewayName, + vpnGatewayParameters, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: VpnGateway, + options?: VpnGatewaysCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, gatewayName, vpnGatewayParameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: VpnGateway, + options?: VpnGatewaysCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + gatewayName, + vpnGatewayParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + gatewayName: string, + vpnGatewayParameters: VpnGateway, + options?: VpnGatewaysCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + gatewayName, + vpnGatewayParameters, + options, + ); + }, + get: (resourceGroupName: string, gatewayName: string, options?: VpnGatewaysGetOptionalParams) => + get(context, resourceGroupName, gatewayName, options), + }; +} + +export function _getVpnGatewaysOperations( + context: NetworkManagementContext, +): VpnGatewaysOperations { + return { + ..._getVpnGateways(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/vpnLinkConnections/index.ts b/sdk/network/arm-network/src/classic/vpnLinkConnections/index.ts new file mode 100644 index 000000000000..4f36be221f8c --- /dev/null +++ b/sdk/network/arm-network/src/classic/vpnLinkConnections/index.ts @@ -0,0 +1,367 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + getIkeSas, + resetConnection, + listByVpnConnection, + listDefaultSharedKey, + listAllSharedKeys, + setOrInitDefaultSharedKey, + getDefaultSharedKey, +} from "../../api/vpnLinkConnections/operations.js"; +import { + VpnLinkConnectionsGetIkeSasOptionalParams, + VpnLinkConnectionsResetConnectionOptionalParams, + VpnLinkConnectionsListByVpnConnectionOptionalParams, + VpnLinkConnectionsListDefaultSharedKeyOptionalParams, + VpnLinkConnectionsListAllSharedKeysOptionalParams, + VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, + VpnLinkConnectionsGetDefaultSharedKeyOptionalParams, +} from "../../api/vpnLinkConnections/options.js"; +import { + VpnSiteLinkConnection, + ConnectionSharedKeyResult, +} from "../../models/microsoft/network/models.js"; +import { VpnLinkConnectionsGetIkeSasResponse } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VpnLinkConnections operations. */ +export interface VpnLinkConnectionsOperations { + /** Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. */ + getIkeSas: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsGetIkeSasOptionalParams, + ) => PollerLike< + OperationState, + VpnLinkConnectionsGetIkeSasResponse + >; + /** @deprecated use getIkeSas instead */ + beginGetIkeSas: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsGetIkeSasOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VpnLinkConnectionsGetIkeSasResponse + > + >; + /** @deprecated use getIkeSas instead */ + beginGetIkeSasAndWait: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsGetIkeSasOptionalParams, + ) => Promise; + /** Resets the VpnLink connection specified. */ + resetConnection: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsResetConnectionOptionalParams, + ) => PollerLike, void>; + /** @deprecated use resetConnection instead */ + beginResetConnection: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsResetConnectionOptionalParams, + ) => Promise, void>>; + /** @deprecated use resetConnection instead */ + beginResetConnectionAndWait: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsResetConnectionOptionalParams, + ) => Promise; + /** Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. */ + listByVpnConnection: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options?: VpnLinkConnectionsListByVpnConnectionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets the value of the shared key of VpnLink connection specified. */ + listDefaultSharedKey: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsListDefaultSharedKeyOptionalParams, + ) => Promise; + /** Lists all shared keys of VpnLink connection specified. */ + listAllSharedKeys: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsListAllSharedKeysOptionalParams, + ) => PagedAsyncIterableIterator; + /** Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. */ + setOrInitDefaultSharedKey: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + connectionSharedKeyParameters: ConnectionSharedKeyResult, + options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, + ) => PollerLike, ConnectionSharedKeyResult>; + /** @deprecated use setOrInitDefaultSharedKey instead */ + beginSetOrInitDefaultSharedKey: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + connectionSharedKeyParameters: ConnectionSharedKeyResult, + options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, + ) => Promise< + SimplePollerLike, ConnectionSharedKeyResult> + >; + /** @deprecated use setOrInitDefaultSharedKey instead */ + beginSetOrInitDefaultSharedKeyAndWait: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + connectionSharedKeyParameters: ConnectionSharedKeyResult, + options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, + ) => Promise; + /** Gets the shared key of VpnLink connection specified. */ + getDefaultSharedKey: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsGetDefaultSharedKeyOptionalParams, + ) => Promise; +} + +function _getVpnLinkConnections(context: NetworkManagementContext) { + return { + getIkeSas: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsGetIkeSasOptionalParams, + ) => + getIkeSas( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ), + beginGetIkeSas: async ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsGetIkeSasOptionalParams, + ) => { + const poller = getIkeSas( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginGetIkeSasAndWait: async ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsGetIkeSasOptionalParams, + ) => { + return await getIkeSas( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ); + }, + resetConnection: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsResetConnectionOptionalParams, + ) => + resetConnection( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ), + beginResetConnection: async ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsResetConnectionOptionalParams, + ) => { + const poller = resetConnection( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginResetConnectionAndWait: async ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsResetConnectionOptionalParams, + ) => { + return await resetConnection( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ); + }, + listByVpnConnection: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + options?: VpnLinkConnectionsListByVpnConnectionOptionalParams, + ) => listByVpnConnection(context, resourceGroupName, gatewayName, connectionName, options), + listDefaultSharedKey: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsListDefaultSharedKeyOptionalParams, + ) => + listDefaultSharedKey( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ), + listAllSharedKeys: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsListAllSharedKeysOptionalParams, + ) => + listAllSharedKeys( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ), + setOrInitDefaultSharedKey: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + connectionSharedKeyParameters: ConnectionSharedKeyResult, + options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, + ) => + setOrInitDefaultSharedKey( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + connectionSharedKeyParameters, + options, + ), + beginSetOrInitDefaultSharedKey: async ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + connectionSharedKeyParameters: ConnectionSharedKeyResult, + options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, + ) => { + const poller = setOrInitDefaultSharedKey( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + connectionSharedKeyParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginSetOrInitDefaultSharedKeyAndWait: async ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + connectionSharedKeyParameters: ConnectionSharedKeyResult, + options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, + ) => { + return await setOrInitDefaultSharedKey( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + connectionSharedKeyParameters, + options, + ); + }, + getDefaultSharedKey: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnLinkConnectionsGetDefaultSharedKeyOptionalParams, + ) => + getDefaultSharedKey( + context, + resourceGroupName, + gatewayName, + connectionName, + linkConnectionName, + options, + ), + }; +} + +export function _getVpnLinkConnectionsOperations( + context: NetworkManagementContext, +): VpnLinkConnectionsOperations { + return { + ..._getVpnLinkConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/vpnServerConfigurations/index.ts b/sdk/network/arm-network/src/classic/vpnServerConfigurations/index.ts new file mode 100644 index 000000000000..fe3abb0eade9 --- /dev/null +++ b/sdk/network/arm-network/src/classic/vpnServerConfigurations/index.ts @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listRadiusSecrets, + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/vpnServerConfigurations/operations.js"; +import { + VpnServerConfigurationsListRadiusSecretsOptionalParams, + VpnServerConfigurationsListOptionalParams, + VpnServerConfigurationsListByResourceGroupOptionalParams, + VpnServerConfigurationsDeleteOptionalParams, + VpnServerConfigurationsUpdateTagsOptionalParams, + VpnServerConfigurationsCreateOrUpdateOptionalParams, + VpnServerConfigurationsGetOptionalParams, +} from "../../api/vpnServerConfigurations/options.js"; +import { + TagsObject, + RadiusAuthServerListResult, + VpnServerConfiguration, +} from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VpnServerConfigurations operations. */ +export interface VpnServerConfigurationsOperations { + /** List all Radius servers with respective radius secrets from VpnServerConfiguration. */ + listRadiusSecrets: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: VpnServerConfigurationsListRadiusSecretsOptionalParams, + ) => Promise; + /** Lists all the VpnServerConfigurations in a subscription. */ + list: ( + options?: VpnServerConfigurationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists all the vpnServerConfigurations in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VpnServerConfigurationsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a VpnServerConfiguration. */ + delete: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: VpnServerConfigurationsDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: VpnServerConfigurationsDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: VpnServerConfigurationsDeleteOptionalParams, + ) => Promise; + /** Updates VpnServerConfiguration tags. */ + updateTags: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: TagsObject, + options?: VpnServerConfigurationsUpdateTagsOptionalParams, + ) => Promise; + /** Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. */ + createOrUpdate: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: VpnServerConfiguration, + options?: VpnServerConfigurationsCreateOrUpdateOptionalParams, + ) => PollerLike, VpnServerConfiguration>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: VpnServerConfiguration, + options?: VpnServerConfigurationsCreateOrUpdateOptionalParams, + ) => Promise, VpnServerConfiguration>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: VpnServerConfiguration, + options?: VpnServerConfigurationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a VpnServerConfiguration. */ + get: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: VpnServerConfigurationsGetOptionalParams, + ) => Promise; +} + +function _getVpnServerConfigurations(context: NetworkManagementContext) { + return { + listRadiusSecrets: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: VpnServerConfigurationsListRadiusSecretsOptionalParams, + ) => listRadiusSecrets(context, resourceGroupName, vpnServerConfigurationName, options), + list: (options?: VpnServerConfigurationsListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VpnServerConfigurationsListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: VpnServerConfigurationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, vpnServerConfigurationName, options), + beginDelete: async ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: VpnServerConfigurationsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, vpnServerConfigurationName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: VpnServerConfigurationsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, vpnServerConfigurationName, options); + }, + updateTags: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: TagsObject, + options?: VpnServerConfigurationsUpdateTagsOptionalParams, + ) => + updateTags( + context, + resourceGroupName, + vpnServerConfigurationName, + vpnServerConfigurationParameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: VpnServerConfiguration, + options?: VpnServerConfigurationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + vpnServerConfigurationName, + vpnServerConfigurationParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: VpnServerConfiguration, + options?: VpnServerConfigurationsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + vpnServerConfigurationName, + vpnServerConfigurationParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + vpnServerConfigurationName: string, + vpnServerConfigurationParameters: VpnServerConfiguration, + options?: VpnServerConfigurationsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + vpnServerConfigurationName, + vpnServerConfigurationParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: VpnServerConfigurationsGetOptionalParams, + ) => get(context, resourceGroupName, vpnServerConfigurationName, options), + }; +} + +export function _getVpnServerConfigurationsOperations( + context: NetworkManagementContext, +): VpnServerConfigurationsOperations { + return { + ..._getVpnServerConfigurations(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/vpnServerConfigurationsAssociatedWithVirtualWan/index.ts b/sdk/network/arm-network/src/classic/vpnServerConfigurationsAssociatedWithVirtualWan/index.ts new file mode 100644 index 000000000000..da16cfddc729 --- /dev/null +++ b/sdk/network/arm-network/src/classic/vpnServerConfigurationsAssociatedWithVirtualWan/index.ts @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { list } from "../../api/vpnServerConfigurationsAssociatedWithVirtualWan/operations.js"; +import { VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams } from "../../api/vpnServerConfigurationsAssociatedWithVirtualWan/options.js"; +import { VpnServerConfigurationsResponse } from "../../models/microsoft/network/models.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VpnServerConfigurationsAssociatedWithVirtualWan operations. */ +export interface VpnServerConfigurationsAssociatedWithVirtualWanOperations { + /** Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. */ + list: ( + resourceGroupName: string, + virtualWANName: string, + options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, + ) => PollerLike, VpnServerConfigurationsResponse>; + /** @deprecated use list instead */ + beginList: ( + resourceGroupName: string, + virtualWANName: string, + options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + VpnServerConfigurationsResponse + > + >; + /** @deprecated use list instead */ + beginListAndWait: ( + resourceGroupName: string, + virtualWANName: string, + options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, + ) => Promise; +} + +function _getVpnServerConfigurationsAssociatedWithVirtualWan(context: NetworkManagementContext) { + return { + list: ( + resourceGroupName: string, + virtualWANName: string, + options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, + ) => list(context, resourceGroupName, virtualWANName, options), + beginList: async ( + resourceGroupName: string, + virtualWANName: string, + options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, + ) => { + const poller = list(context, resourceGroupName, virtualWANName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginListAndWait: async ( + resourceGroupName: string, + virtualWANName: string, + options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, + ) => { + return await list(context, resourceGroupName, virtualWANName, options); + }, + }; +} + +export function _getVpnServerConfigurationsAssociatedWithVirtualWanOperations( + context: NetworkManagementContext, +): VpnServerConfigurationsAssociatedWithVirtualWanOperations { + return { + ..._getVpnServerConfigurationsAssociatedWithVirtualWan(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/vpnSiteLinkConnections/index.ts b/sdk/network/arm-network/src/classic/vpnSiteLinkConnections/index.ts new file mode 100644 index 000000000000..1d25d834e082 --- /dev/null +++ b/sdk/network/arm-network/src/classic/vpnSiteLinkConnections/index.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { get } from "../../api/vpnSiteLinkConnections/operations.js"; +import { VpnSiteLinkConnectionsGetOptionalParams } from "../../api/vpnSiteLinkConnections/options.js"; +import { VpnSiteLinkConnection } from "../../models/microsoft/network/models.js"; + +/** Interface representing a VpnSiteLinkConnections operations. */ +export interface VpnSiteLinkConnectionsOperations { + /** Retrieves the details of a vpn site link connection. */ + get: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnSiteLinkConnectionsGetOptionalParams, + ) => Promise; +} + +function _getVpnSiteLinkConnections(context: NetworkManagementContext) { + return { + get: ( + resourceGroupName: string, + gatewayName: string, + connectionName: string, + linkConnectionName: string, + options?: VpnSiteLinkConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, gatewayName, connectionName, linkConnectionName, options), + }; +} + +export function _getVpnSiteLinkConnectionsOperations( + context: NetworkManagementContext, +): VpnSiteLinkConnectionsOperations { + return { + ..._getVpnSiteLinkConnections(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/vpnSiteLinks/index.ts b/sdk/network/arm-network/src/classic/vpnSiteLinks/index.ts new file mode 100644 index 000000000000..e46f163dc174 --- /dev/null +++ b/sdk/network/arm-network/src/classic/vpnSiteLinks/index.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { listByVpnSite, get } from "../../api/vpnSiteLinks/operations.js"; +import { + VpnSiteLinksListByVpnSiteOptionalParams, + VpnSiteLinksGetOptionalParams, +} from "../../api/vpnSiteLinks/options.js"; +import { VpnSiteLink } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a VpnSiteLinks operations. */ +export interface VpnSiteLinksOperations { + /** Lists all the vpnSiteLinks in a resource group for a vpn site. */ + listByVpnSite: ( + resourceGroupName: string, + vpnSiteName: string, + options?: VpnSiteLinksListByVpnSiteOptionalParams, + ) => PagedAsyncIterableIterator; + /** Retrieves the details of a VPN site link. */ + get: ( + resourceGroupName: string, + vpnSiteName: string, + vpnSiteLinkName: string, + options?: VpnSiteLinksGetOptionalParams, + ) => Promise; +} + +function _getVpnSiteLinks(context: NetworkManagementContext) { + return { + listByVpnSite: ( + resourceGroupName: string, + vpnSiteName: string, + options?: VpnSiteLinksListByVpnSiteOptionalParams, + ) => listByVpnSite(context, resourceGroupName, vpnSiteName, options), + get: ( + resourceGroupName: string, + vpnSiteName: string, + vpnSiteLinkName: string, + options?: VpnSiteLinksGetOptionalParams, + ) => get(context, resourceGroupName, vpnSiteName, vpnSiteLinkName, options), + }; +} + +export function _getVpnSiteLinksOperations( + context: NetworkManagementContext, +): VpnSiteLinksOperations { + return { + ..._getVpnSiteLinks(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/vpnSites/index.ts b/sdk/network/arm-network/src/classic/vpnSites/index.ts new file mode 100644 index 000000000000..4978da1fd60e --- /dev/null +++ b/sdk/network/arm-network/src/classic/vpnSites/index.ts @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + list, + listByResourceGroup, + $delete, + updateTags, + createOrUpdate, + get, +} from "../../api/vpnSites/operations.js"; +import { + VpnSitesListOptionalParams, + VpnSitesListByResourceGroupOptionalParams, + VpnSitesDeleteOptionalParams, + VpnSitesUpdateTagsOptionalParams, + VpnSitesCreateOrUpdateOptionalParams, + VpnSitesGetOptionalParams, +} from "../../api/vpnSites/options.js"; +import { TagsObject, VpnSite } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VpnSites operations. */ +export interface VpnSitesOperations { + /** Lists all the VpnSites in a subscription. */ + list: (options?: VpnSitesListOptionalParams) => PagedAsyncIterableIterator; + /** Lists all the vpnSites in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VpnSitesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a VpnSite. */ + delete: ( + resourceGroupName: string, + vpnSiteName: string, + options?: VpnSitesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + vpnSiteName: string, + options?: VpnSitesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + vpnSiteName: string, + options?: VpnSitesDeleteOptionalParams, + ) => Promise; + /** Updates VpnSite tags. */ + updateTags: ( + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: TagsObject, + options?: VpnSitesUpdateTagsOptionalParams, + ) => Promise; + /** Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. */ + createOrUpdate: ( + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: VpnSite, + options?: VpnSitesCreateOrUpdateOptionalParams, + ) => PollerLike, VpnSite>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: VpnSite, + options?: VpnSitesCreateOrUpdateOptionalParams, + ) => Promise, VpnSite>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: VpnSite, + options?: VpnSitesCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieves the details of a VPN site. */ + get: ( + resourceGroupName: string, + vpnSiteName: string, + options?: VpnSitesGetOptionalParams, + ) => Promise; +} + +function _getVpnSites(context: NetworkManagementContext) { + return { + list: (options?: VpnSitesListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VpnSitesListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + vpnSiteName: string, + options?: VpnSitesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, vpnSiteName, options), + beginDelete: async ( + resourceGroupName: string, + vpnSiteName: string, + options?: VpnSitesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, vpnSiteName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + vpnSiteName: string, + options?: VpnSitesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, vpnSiteName, options); + }, + updateTags: ( + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: TagsObject, + options?: VpnSitesUpdateTagsOptionalParams, + ) => updateTags(context, resourceGroupName, vpnSiteName, vpnSiteParameters, options), + createOrUpdate: ( + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: VpnSite, + options?: VpnSitesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, vpnSiteName, vpnSiteParameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: VpnSite, + options?: VpnSitesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + vpnSiteName, + vpnSiteParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + vpnSiteName: string, + vpnSiteParameters: VpnSite, + options?: VpnSitesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + vpnSiteName, + vpnSiteParameters, + options, + ); + }, + get: (resourceGroupName: string, vpnSiteName: string, options?: VpnSitesGetOptionalParams) => + get(context, resourceGroupName, vpnSiteName, options), + }; +} + +export function _getVpnSitesOperations(context: NetworkManagementContext): VpnSitesOperations { + return { + ..._getVpnSites(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/vpnSitesConfiguration/index.ts b/sdk/network/arm-network/src/classic/vpnSitesConfiguration/index.ts new file mode 100644 index 000000000000..905d9726eb6d --- /dev/null +++ b/sdk/network/arm-network/src/classic/vpnSitesConfiguration/index.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { download } from "../../api/vpnSitesConfiguration/operations.js"; +import { VpnSitesConfigurationDownloadOptionalParams } from "../../api/vpnSitesConfiguration/options.js"; +import { GetVpnSitesConfigurationRequest } from "../../models/microsoft/network/models.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VpnSitesConfiguration operations. */ +export interface VpnSitesConfigurationOperations { + /** Gives the sas-url to download the configurations for vpn-sites in a resource group. */ + download: ( + resourceGroupName: string, + virtualWANName: string, + request: GetVpnSitesConfigurationRequest, + options?: VpnSitesConfigurationDownloadOptionalParams, + ) => PollerLike, void>; + /** @deprecated use download instead */ + beginDownload: ( + resourceGroupName: string, + virtualWANName: string, + request: GetVpnSitesConfigurationRequest, + options?: VpnSitesConfigurationDownloadOptionalParams, + ) => Promise, void>>; + /** @deprecated use download instead */ + beginDownloadAndWait: ( + resourceGroupName: string, + virtualWANName: string, + request: GetVpnSitesConfigurationRequest, + options?: VpnSitesConfigurationDownloadOptionalParams, + ) => Promise; +} + +function _getVpnSitesConfiguration(context: NetworkManagementContext) { + return { + download: ( + resourceGroupName: string, + virtualWANName: string, + request: GetVpnSitesConfigurationRequest, + options?: VpnSitesConfigurationDownloadOptionalParams, + ) => download(context, resourceGroupName, virtualWANName, request, options), + beginDownload: async ( + resourceGroupName: string, + virtualWANName: string, + request: GetVpnSitesConfigurationRequest, + options?: VpnSitesConfigurationDownloadOptionalParams, + ) => { + const poller = download(context, resourceGroupName, virtualWANName, request, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDownloadAndWait: async ( + resourceGroupName: string, + virtualWANName: string, + request: GetVpnSitesConfigurationRequest, + options?: VpnSitesConfigurationDownloadOptionalParams, + ) => { + return await download(context, resourceGroupName, virtualWANName, request, options); + }, + }; +} + +export function _getVpnSitesConfigurationOperations( + context: NetworkManagementContext, +): VpnSitesConfigurationOperations { + return { + ..._getVpnSitesConfiguration(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/webApplicationFirewallPolicies/index.ts b/sdk/network/arm-network/src/classic/webApplicationFirewallPolicies/index.ts new file mode 100644 index 000000000000..2b0893cfb5b9 --- /dev/null +++ b/sdk/network/arm-network/src/classic/webApplicationFirewallPolicies/index.ts @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { + listAll, + list, + $delete, + createOrUpdate, + get, +} from "../../api/webApplicationFirewallPolicies/operations.js"; +import { + WebApplicationFirewallPoliciesListAllOptionalParams, + WebApplicationFirewallPoliciesListOptionalParams, + WebApplicationFirewallPoliciesDeleteOptionalParams, + WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams, + WebApplicationFirewallPoliciesGetOptionalParams, +} from "../../api/webApplicationFirewallPolicies/options.js"; +import { WebApplicationFirewallPolicy } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WebApplicationFirewallPolicies operations. */ +export interface WebApplicationFirewallPoliciesOperations { + /** Gets all the WAF policies in a subscription. */ + listAll: ( + options?: WebApplicationFirewallPoliciesListAllOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists all of the protection policies within a resource group. */ + list: ( + resourceGroupName: string, + options?: WebApplicationFirewallPoliciesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes Policy. */ + delete: ( + resourceGroupName: string, + policyName: string, + options?: WebApplicationFirewallPoliciesDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + policyName: string, + options?: WebApplicationFirewallPoliciesDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + policyName: string, + options?: WebApplicationFirewallPoliciesDeleteOptionalParams, + ) => Promise; + /** Creates or update policy with specified rule set name within a resource group. */ + createOrUpdate: ( + resourceGroupName: string, + policyName: string, + parameters: WebApplicationFirewallPolicy, + options?: WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieve protection policy with specified name within a resource group. */ + get: ( + resourceGroupName: string, + policyName: string, + options?: WebApplicationFirewallPoliciesGetOptionalParams, + ) => Promise; +} + +function _getWebApplicationFirewallPolicies(context: NetworkManagementContext) { + return { + listAll: (options?: WebApplicationFirewallPoliciesListAllOptionalParams) => + listAll(context, options), + list: (resourceGroupName: string, options?: WebApplicationFirewallPoliciesListOptionalParams) => + list(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + policyName: string, + options?: WebApplicationFirewallPoliciesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, policyName, options), + beginDelete: async ( + resourceGroupName: string, + policyName: string, + options?: WebApplicationFirewallPoliciesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, policyName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + policyName: string, + options?: WebApplicationFirewallPoliciesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, policyName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + policyName: string, + parameters: WebApplicationFirewallPolicy, + options?: WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, policyName, parameters, options), + get: ( + resourceGroupName: string, + policyName: string, + options?: WebApplicationFirewallPoliciesGetOptionalParams, + ) => get(context, resourceGroupName, policyName, options), + }; +} + +export function _getWebApplicationFirewallPoliciesOperations( + context: NetworkManagementContext, +): WebApplicationFirewallPoliciesOperations { + return { + ..._getWebApplicationFirewallPolicies(context), + }; +} diff --git a/sdk/network/arm-network/src/classic/webCategories/index.ts b/sdk/network/arm-network/src/classic/webCategories/index.ts new file mode 100644 index 000000000000..dfd3e22710da --- /dev/null +++ b/sdk/network/arm-network/src/classic/webCategories/index.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementContext } from "../../api/networkManagementContext.js"; +import { listBySubscription, get } from "../../api/webCategories/operations.js"; +import { + WebCategoriesListBySubscriptionOptionalParams, + WebCategoriesGetOptionalParams, +} from "../../api/webCategories/options.js"; +import { AzureWebCategory } from "../../models/microsoft/network/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WebCategories operations. */ +export interface WebCategoriesOperations { + /** Gets all the Azure Web Categories in a subscription. */ + listBySubscription: ( + options?: WebCategoriesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets the specified Azure Web Category. */ + get: (name: string, options?: WebCategoriesGetOptionalParams) => Promise; +} + +function _getWebCategories(context: NetworkManagementContext) { + return { + listBySubscription: (options?: WebCategoriesListBySubscriptionOptionalParams) => + listBySubscription(context, options), + get: (name: string, options?: WebCategoriesGetOptionalParams) => get(context, name, options), + }; +} + +export function _getWebCategoriesOperations( + context: NetworkManagementContext, +): WebCategoriesOperations { + return { + ..._getWebCategories(context), + }; +} diff --git a/sdk/network/arm-network/src/index.ts b/sdk/network/arm-network/src/index.ts index 44304d9fae3c..abb042e18a57 100644 --- a/sdk/network/arm-network/src/index.ts +++ b/sdk/network/arm-network/src/index.ts @@ -1,11 +1,2731 @@ // 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 type { AzureSupportedClouds } from "./static-helpers/cloudSettingHelpers.js"; +import { AzureClouds } from "./static-helpers/cloudSettingHelpers.js"; +import type { + PageSettings, + ContinuablePage, + PagedAsyncIterableIterator, +} from "./static-helpers/pagingHelpers.js"; -/// -export { getContinuationToken } from "./pagingHelper.js"; -export * from "./models/index.js"; export { NetworkManagementClient } from "./networkManagementClient.js"; -export * from "./operationsInterfaces/index.js"; +export type { SimplePollerLike } from "./static-helpers/simplePollerHelpers.js"; +export type { RestorePollerOptions } from "./restorePollerHelpers.js"; +export { restorePoller } from "./restorePollerHelpers.js"; +export type { + ErrorDetail, + ErrorAdditionalInfo, + SystemData, + CreatedByType, + OperationStatusResult, + VpnLinkConnectionsGetIkeSasResponse, + VpnConnectionsStopPacketCaptureResponse, + VpnConnectionsStartPacketCaptureResponse, + ExpressRouteGatewaysStopSiteFailoverTestResponse, + ExpressRouteGatewaysStartSiteFailoverTestResponse, + VpnGatewaysStopPacketCaptureResponse, + VpnGatewaysStartPacketCaptureResponse, + VirtualNetworkGatewayConnectionsGetIkeSasResponse, + VirtualNetworkGatewayConnectionsStopPacketCaptureResponse, + VirtualNetworkGatewayConnectionsStartPacketCaptureResponse, + VirtualNetworkGatewaysVpnDeviceConfigurationScriptResponse, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse, + VirtualNetworkGatewaysStopPacketCaptureResponse, + VirtualNetworkGatewaysStartPacketCaptureResponse, + VirtualNetworkGatewaysSupportedVpnDevicesResponse, + VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse, + VirtualNetworkGatewaysGenerateVpnProfileResponse, + VirtualNetworkGatewaysGeneratevpnclientpackageResponse, + ExpressRouteCircuitsStopCircuitLinkFailoverTestResponse, + ExpressRouteCircuitsStartCircuitLinkFailoverTestResponse, + ApplicationGatewaysListAvailableResponseHeadersResponse, + ApplicationGatewaysListAvailableRequestHeadersResponse, + ApplicationGatewaysListAvailableServerVariablesResponse, +} from "./models/index.js"; +export { KnownCreatedByType } from "./models/index.js"; +export type { + Resource, + CloudError, + CloudErrorBody, + CommonProvisioningState, + ApplicationGatewayIPConfiguration, + ApplicationGatewayIPConfigurationPropertiesFormat, + SubResource, + IPAllocationMethod, + ApplicationGatewayBackendAddressPool, + ApplicationGatewayBackendAddressPoolPropertiesFormat, + NetworkInterfaceIPConfiguration, + NetworkInterfaceIPConfigurationPropertiesFormat, + VirtualNetworkTap, + VirtualNetworkTapPropertiesFormat, + NetworkInterfaceTapConfiguration, + NetworkInterfaceTapConfigurationPropertiesFormat, + FrontendIPConfiguration, + FrontendIPConfigurationPropertiesFormat, + IPVersion, + Subnet, + SubnetPropertiesFormat, + NetworkSecurityGroup, + NetworkSecurityGroupPropertiesFormat, + SecurityRule, + SecurityRulePropertiesFormat, + SecurityRuleProtocol, + ApplicationSecurityGroup, + ApplicationSecurityGroupPropertiesFormat, + SecurityRuleAccess, + SecurityRuleDirection, + NetworkInterface, + NetworkInterfacePropertiesFormat, + PrivateEndpoint, + PrivateEndpointProperties, + PrivateEndpointIPVersionType, + PrivateLinkServiceConnection, + PrivateLinkServiceConnectionProperties, + PrivateLinkServiceConnectionState, + CustomDnsConfigPropertiesFormat, + PrivateEndpointIPConfiguration, + PrivateEndpointIPConfigurationProperties, + PrivateEndpointBillingSku, + ExtendedLocation, + ExtendedLocationTypes, + NetworkInterfaceDnsSettings, + NetworkInterfaceNicType, + PrivateLinkService, + PrivateLinkServiceProperties, + PrivateLinkServiceIpConfiguration, + PrivateLinkServiceIpConfigurationProperties, + AccessMode, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkServicePropertiesVisibility, + PrivateLinkServicePropertiesAutoApproval, + NetworkInterfaceMigrationPhase, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, + FlowLog, + FlowLogPropertiesFormat, + RetentionPolicyParameters, + FlowLogFormatParameters, + FlowLogFormatType, + TrafficAnalyticsProperties, + TrafficAnalyticsConfigurationProperties, + ManagedServiceIdentity, + ResourceIdentityType, + Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, + RouteTable, + RouteTablePropertiesFormat, + Route, + RoutePropertiesFormat, + RouteNextHopType, + RouteNextHopEcmp, + DisablePeeringRoute, + ServiceEndpointPropertiesFormat, + ServiceEndpointPolicy, + ServiceEndpointPolicyPropertiesFormat, + ServiceEndpointPolicyDefinition, + ServiceEndpointPolicyDefinitionPropertiesFormat, + IPConfiguration, + IPConfigurationPropertiesFormat, + PublicIPAddress, + PublicIPAddressPropertiesFormat, + PublicIPAddressDnsSettings, + PublicIpAddressDnsSettingsDomainNameLabelScope, + DdosSettings, + DdosSettingsProtectionMode, + IpTag, + NatGateway, + NatGatewayPropertiesFormat, + Nat64State, + NatGatewaySku, + NatGatewaySkuName, + PublicIPAddressMigrationPhase, + DeleteOptions, + PublicIPAddressSku, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + IPConfigurationProfile, + IPConfigurationProfilePropertiesFormat, + ResourceNavigationLink, + ResourceNavigationLinkFormat, + ServiceAssociationLink, + ServiceAssociationLinkPropertiesFormat, + Delegation, + ServiceDelegationPropertiesFormat, + VirtualNetworkPrivateEndpointNetworkPolicies, + VirtualNetworkPrivateLinkServiceNetworkPolicies, + SharingScope, + IpamPoolPrefixAllocation, + IpamPoolPrefixAllocationPool, + DdosFrontendIpConfigurationSettings, + BackendAddressPool, + BackendAddressPoolPropertiesFormat, + GatewayLoadBalancerTunnelInterface, + GatewayLoadBalancerTunnelProtocol, + GatewayLoadBalancerTunnelInterfaceType, + LoadBalancerBackendAddress, + LoadBalancerBackendAddressPropertiesFormat, + NatRulePortMapping, + LoadBalancerBackendAddressAdminState, + SyncMode, + InboundNatRule, + InboundNatRulePropertiesFormat, + TransportProtocol, + NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties, + ApplicationGatewayBackendAddress, + SubResourceModel, + ResourceSet, + LoadBalancer, + LoadBalancerPropertiesFormat, + LoadBalancingRule, + LoadBalancingRulePropertiesFormat, + LoadDistribution, + Probe, + ProbePropertiesFormat, + ProbeProtocol, + ProbeNoHealthyBackendsBehavior, + InboundNatPool, + InboundNatPoolPropertiesFormat, + OutboundRule, + OutboundRulePropertiesFormat, + LoadBalancerOutboundRuleProtocol, + LoadBalancerScope, + LoadBalancerSku, + LoadBalancerSkuName, + LoadBalancerSkuTier, + NetworkWatcher, + NetworkWatcherPropertiesFormat, + VirtualNetwork, + VirtualNetworkPropertiesFormat, + AddressSpace, + DhcpOptions, + VirtualNetworkPeering, + VirtualNetworkPeeringPropertiesFormat, + VirtualNetworkBgpCommunities, + VirtualNetworkEncryption, + VirtualNetworkEncryptionEnforcement, + VirtualNetworkPeeringState, + VirtualNetworkPeeringLevel, + PrivateEndpointVNetPolicies, +} from "./models/common/index.js"; +export { + KnownCommonProvisioningState, + KnownIPAllocationMethod, + KnownIPVersion, + KnownSecurityRuleProtocol, + KnownSecurityRuleAccess, + KnownSecurityRuleDirection, + KnownPrivateEndpointIPVersionType, + KnownPrivateEndpointBillingSku, + KnownExtendedLocationTypes, + KnownNetworkInterfaceNicType, + KnownAccessMode, + KnownNetworkInterfaceMigrationPhase, + KnownNetworkInterfaceAuxiliaryMode, + KnownNetworkInterfaceAuxiliarySku, + KnownFlowLogFormatType, + KnownRouteNextHopType, + KnownDisablePeeringRoute, + KnownDdosSettingsProtectionMode, + KnownNat64State, + KnownNatGatewaySkuName, + KnownPublicIPAddressMigrationPhase, + KnownDeleteOptions, + KnownPublicIPAddressSkuName, + KnownPublicIPAddressSkuTier, + KnownVirtualNetworkPrivateEndpointNetworkPolicies, + KnownVirtualNetworkPrivateLinkServiceNetworkPolicies, + KnownSharingScope, + KnownGatewayLoadBalancerTunnelProtocol, + KnownGatewayLoadBalancerTunnelInterfaceType, + KnownLoadBalancerBackendAddressAdminState, + KnownSyncMode, + KnownTransportProtocol, + KnownLoadDistribution, + KnownProbeProtocol, + KnownProbeNoHealthyBackendsBehavior, + KnownLoadBalancerOutboundRuleProtocol, + KnownLoadBalancerScope, + KnownLoadBalancerSkuName, + KnownLoadBalancerSkuTier, + KnownVirtualNetworkEncryptionEnforcement, + KnownVirtualNetworkPeeringState, + KnownVirtualNetworkPeeringLevel, + KnownPrivateEndpointVNetPolicies, +} from "./models/common/index.js"; +export type { + BastionShareableLinkListRequest, + BastionShareableLink, + Vm, + BastionShareableLinkTokenListRequest, + BastionActiveSession, + BastionConnectProtocol, + SessionIds, + BastionSessionState, + ExpressRouteProviderPort, + ExpressRouteProviderPortProperties, + TrackedResourceWithOptionalLocation, + ActiveConfigurationParameter, + ActiveConnectivityConfigurationsListResult, + ActiveConnectivityConfiguration, + EffectiveConnectivityConfiguration, + ConnectivityConfigurationProperties, + ConnectivityTopology, + Hub, + IsGlobal, + ConnectivityConfigurationPropertiesConnectivityCapabilities, + ConnectedGroupPrivateEndpointsScale, + ConnectedGroupAddressOverlap, + PeeringEnforcement, + ConnectivityGroupItem, + UseHubGateway, + GroupConnectivity, + DeleteExistingPeering, + ConfigurationGroup, + NetworkGroupProperties, + GroupMemberType, + ActiveSecurityAdminRulesListResult, + ActiveBaseSecurityAdminRule, + ActiveBaseSecurityAdminRuleUnion, + NetworkManagerSecurityGroupItem, + EffectiveAdminRuleKind, + ActiveSecurityAdminRule, + AdminPropertiesFormat, + SecurityConfigurationRuleProtocol, + AddressPrefixItem, + AddressPrefixType, + SecurityConfigurationRuleAccess, + SecurityConfigurationRuleDirection, + ActiveDefaultSecurityAdminRule, + DefaultAdminPropertiesFormat, + QueryRequestOptions, + NetworkManagerEffectiveConnectivityConfigurationListResult, + NetworkManagerEffectiveSecurityAdminRulesListResult, + EffectiveBaseSecurityAdminRule, + EffectiveBaseSecurityAdminRuleUnion, + EffectiveSecurityAdminRule, + EffectiveDefaultSecurityAdminRule, + VirtualWanSecurityProviders, + VirtualWanSecurityProvider, + VirtualWanSecurityProviderType, + VirtualWanVpnProfileParameters, + AuthenticationMethod, + VpnProfileResponse, + DnsNameAvailabilityResult, + Operation, + OperationDisplay, + OperationPropertiesFormat, + OperationPropertiesFormatServiceSpecification, + MetricSpecification, + Availability, + Dimension, + LogSpecification, + ApplicationGateway, + ApplicationGatewayPropertiesFormat, + ApplicationGatewaySku, + ApplicationGatewaySkuName, + ApplicationGatewayTier, + ApplicationGatewaySkuFamily, + ApplicationGatewaySslPolicy, + ApplicationGatewaySslProtocol, + ApplicationGatewaySslPolicyType, + ApplicationGatewaySslPolicyName, + ApplicationGatewaySslCipherSuite, + ApplicationGatewayOperationalState, + ApplicationGatewayAuthenticationCertificate, + ApplicationGatewayAuthenticationCertificatePropertiesFormat, + ApplicationGatewayTrustedRootCertificate, + ApplicationGatewayTrustedRootCertificatePropertiesFormat, + ApplicationGatewayTrustedClientCertificate, + ApplicationGatewayTrustedClientCertificatePropertiesFormat, + ApplicationGatewaySslCertificate, + ApplicationGatewaySslCertificatePropertiesFormat, + ApplicationGatewayManagedHsm, + ApplicationGatewayFrontendIPConfiguration, + ApplicationGatewayFrontendIPConfigurationPropertiesFormat, + ApplicationGatewayFrontendPort, + ApplicationGatewayFrontendPortPropertiesFormat, + ApplicationGatewayProbe, + ApplicationGatewayProbePropertiesFormat, + ApplicationGatewayProtocol, + ApplicationGatewayProbeHealthResponseMatch, + ApplicationGatewayBackendHttpSettings, + ApplicationGatewayBackendHttpSettingsPropertiesFormat, + ApplicationGatewayCookieBasedAffinity, + ApplicationGatewayConnectionDraining, + ApplicationGatewayBackendSettings, + ApplicationGatewayBackendSettingsPropertiesFormat, + ApplicationGatewayHttpListener, + ApplicationGatewayHttpListenerPropertiesFormat, + ApplicationGatewayCustomError, + ApplicationGatewayCustomErrorStatusCode, + ApplicationGatewayListener, + ApplicationGatewayListenerPropertiesFormat, + ApplicationGatewaySslProfile, + ApplicationGatewaySslProfilePropertiesFormat, + ApplicationGatewayClientAuthConfiguration, + ApplicationGatewayClientRevocationOptions, + ApplicationGatewayClientAuthVerificationModes, + ApplicationGatewayUrlPathMap, + ApplicationGatewayUrlPathMapPropertiesFormat, + ApplicationGatewayPathRule, + ApplicationGatewayPathRulePropertiesFormat, + ApplicationGatewayRequestRoutingRule, + ApplicationGatewayRequestRoutingRulePropertiesFormat, + ApplicationGatewayRequestRoutingRuleType, + ApplicationGatewayRoutingRule, + ApplicationGatewayRoutingRulePropertiesFormat, + ApplicationGatewayRewriteRuleSet, + ApplicationGatewayRewriteRuleSetPropertiesFormat, + ApplicationGatewayRewriteRule, + ApplicationGatewayRewriteRuleCondition, + ApplicationGatewayRewriteRuleActionSet, + ApplicationGatewayHeaderConfiguration, + HeaderValueMatcher, + ApplicationGatewayUrlConfiguration, + ApplicationGatewayRedirectConfiguration, + ApplicationGatewayRedirectConfigurationPropertiesFormat, + ApplicationGatewayRedirectType, + ApplicationGatewayWebApplicationFirewallConfiguration, + ApplicationGatewayFirewallMode, + ApplicationGatewayFirewallDisabledRuleGroup, + ApplicationGatewayFirewallExclusion, + ApplicationGatewayAutoscaleConfiguration, + ApplicationGatewayPrivateLinkConfiguration, + ApplicationGatewayPrivateLinkConfigurationProperties, + ApplicationGatewayPrivateLinkIpConfiguration, + ApplicationGatewayPrivateLinkIpConfigurationProperties, + ApplicationGatewayPrivateEndpointConnection, + ApplicationGatewayPrivateEndpointConnectionProperties, + ApplicationGatewayLoadDistributionPolicy, + ApplicationGatewayLoadDistributionPolicyPropertiesFormat, + ApplicationGatewayLoadDistributionTarget, + ApplicationGatewayLoadDistributionTargetPropertiesFormat, + ApplicationGatewayLoadDistributionAlgorithm, + ApplicationGatewayEntraJWTValidationConfig, + ApplicationGatewayEntraJWTValidationConfigPropertiesFormat, + ApplicationGatewayUnAuthorizedRequestAction, + ApplicationGatewayGlobalConfiguration, + TagsObject, + ApplicationGatewayBackendHealth, + ApplicationGatewayBackendHealthPool, + ApplicationGatewayBackendHealthHttpSettings, + ApplicationGatewayBackendHealthServer, + ApplicationGatewayBackendHealthServerHealth, + ApplicationGatewayOnDemandProbe, + ApplicationGatewayBackendHealthOnDemand, + ApplicationGatewayAvailableSslOptions, + ApplicationGatewayAvailableSslOptionsPropertiesFormat, + ApplicationGatewaySslPredefinedPolicy, + ApplicationGatewaySslPredefinedPolicyPropertiesFormat, + ErrorModel, + ErrorDetails, + ApplicationGatewayAvailableWafRuleSetsResult, + ApplicationGatewayFirewallRuleSet, + ApplicationGatewayFirewallRuleSetPropertiesFormat, + ApplicationGatewayFirewallRuleGroup, + ApplicationGatewayFirewallRule, + ApplicationGatewayWafRuleStateTypes, + ApplicationGatewayWafRuleActionTypes, + ApplicationGatewayWafRuleSensitivityTypes, + ApplicationGatewayTierTypes, + AzureFirewall, + AzureFirewallPropertiesFormat, + AzureFirewallApplicationRuleCollection, + AzureFirewallApplicationRuleCollectionPropertiesFormat, + AzureFirewallRCAction, + AzureFirewallRCActionType, + AzureFirewallApplicationRule, + AzureFirewallApplicationRuleProtocol, + AzureFirewallApplicationRuleProtocolType, + AzureFirewallNatRuleCollection, + AzureFirewallNatRuleCollectionProperties, + AzureFirewallNatRCAction, + AzureFirewallNatRCActionType, + AzureFirewallNatRule, + AzureFirewallNetworkRuleProtocol, + AzureFirewallNetworkRuleCollection, + AzureFirewallNetworkRuleCollectionPropertiesFormat, + AzureFirewallNetworkRule, + AzureFirewallIPConfiguration, + AzureFirewallIPConfigurationPropertiesFormat, + AzureFirewallThreatIntelMode, + HubIPAddresses, + HubPublicIPAddresses, + AzureFirewallPublicIPAddress, + AzureFirewallIpGroups, + AzureFirewallSku, + AzureFirewallSkuName, + AzureFirewallSkuTier, + AzureFirewallAutoscaleConfiguration, + AfcConfiguration, + IPPrefixesList, + FirewallPacketCaptureParameters, + AzureFirewallPacketCaptureFlags, + AzureFirewallPacketCaptureFlagsType, + AzureFirewallPacketCaptureRule, + AzureFirewallPacketCaptureOperationType, + AzureFirewallPacketCaptureResponse, + AzureFirewallPacketCaptureResponseCode, + BastionHost, + BastionHostPropertiesFormat, + BastionHostIPConfiguration, + BastionHostIPConfigurationPropertiesFormat, + BastionHostPropertiesFormatNetworkAcls, + IPRule, + Sku, + BastionHostSkuName, + EffectiveRouteListResult, + EffectiveRoute, + EffectiveRouteSource, + EffectiveRouteState, + EffectiveNetworkSecurityGroupListResult, + EffectiveNetworkSecurityGroup, + EffectiveNetworkSecurityGroupAssociation, + EffectiveNetworkSecurityRule, + EffectiveSecurityRuleProtocol, + PublicIpDdosProtectionStatusResult, + IsWorkloadProtected, + ReserveCloudServicePublicIpAddressRequest, + IsRollback, + DisassociateCloudServicePublicIpRequest, + DdosCustomPolicy, + DdosCustomPolicyPropertiesFormat, + DdosDetectionRule, + DdosDetectionRulePropertiesFormat, + DdosDetectionMode, + TrafficDetectionRule, + DdosTrafficType, + DdosProtectionPlan, + DdosProtectionPlanPropertiesFormat, + ExpressRouteCircuitAuthorization, + AuthorizationPropertiesFormat, + AuthorizationUseStatus, + ExpressRouteCircuit, + ExpressRouteCircuitPropertiesFormat, + ServiceProviderProvisioningState, + ExpressRouteCircuitPeering, + ExpressRouteCircuitPeeringPropertiesFormat, + ExpressRoutePeeringType, + ExpressRoutePeeringState, + ExpressRouteCircuitPeeringConfig, + ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, + AdvertisedPublicPrefixProperties, + AdvertisedPublicPrefixPropertiesValidationState, + ExpressRouteCircuitStats, + Ipv6ExpressRouteCircuitPeeringConfig, + ExpressRouteCircuitPeeringState, + ExpressRouteConnectionId, + ExpressRouteCircuitConnection, + ExpressRouteCircuitConnectionPropertiesFormat, + Ipv6CircuitConnectionConfig, + CircuitConnectionStatus, + PeerExpressRouteCircuitConnection, + PeerExpressRouteCircuitConnectionPropertiesFormat, + ExpressRouteCircuitServiceProviderProperties, + ExpressRouteCircuitSku, + ExpressRouteCircuitSkuTier, + ExpressRouteCircuitSkuFamily, + ExpressRouteLinkFailoverAllTestsDetails, + FailoverTestStatus, + FailoverTestType, + MaintenanceTestCategory, + ExpressRouteFailoverLinkType, + ExpressRouteLinkFailoverTestBgpStatus, + ExpressRouteFailoverBgpStatusAddressFamily, + ExpressRouteLinkFailoverBgpStatus, + ExpressRouteLinkFailoverSingleTestDetails, + ExpressRouteLinkFailoverRouteList, + ExpressRouteLinkFailoverRoute, + ExpressRouteLinkFailoverStopApiParameters, + ExpressRouteCircuitsArpTableListResult, + ExpressRouteCircuitArpTable, + ExpressRouteCircuitsRoutesTableListResult, + ExpressRouteCircuitRoutesTable, + ExpressRouteCircuitsRoutesTableSummaryListResult, + ExpressRouteCircuitRoutesTableSummary, + ExpressRouteCrossConnection, + ExpressRouteCrossConnectionProperties, + ExpressRouteCircuitReference, + ExpressRouteCrossConnectionPeering, + ExpressRouteCrossConnectionPeeringProperties, + ExpressRouteCrossConnectionsRoutesTableSummaryListResult, + ExpressRouteCrossConnectionRoutesTableSummary, + ExpressRoutePortsLocation, + ExpressRoutePortsLocationPropertiesFormat, + ExpressRoutePortsLocationBandwidths, + ExpressRoutePort, + ExpressRoutePortPropertiesFormat, + ExpressRoutePortsEncapsulation, + ExpressRouteLink, + ExpressRouteLinkPropertiesFormat, + ExpressRouteLinkConnectorType, + ExpressRouteLinkAdminState, + ExpressRouteLinkMacSecConfig, + ExpressRouteLinkMacSecCipher, + ExpressRouteLinkMacSecSciState, + ExpressRoutePortsBillingType, + GenerateExpressRoutePortsLOARequest, + GenerateExpressRoutePortsLOAResult, + ExpressRoutePortAuthorization, + ExpressRoutePortAuthorizationPropertiesFormat, + ExpressRoutePortAuthorizationUseStatus, + FirewallPolicy, + FirewallPolicyPropertiesFormat, + FirewallPolicyThreatIntelWhitelist, + FirewallPolicyInsights, + FirewallPolicyLogAnalyticsResources, + FirewallPolicyLogAnalyticsWorkspace, + FirewallPolicySnat, + AutoLearnPrivateRangesMode, + FirewallPolicySQL, + DnsSettings, + ExplicitProxy, + FirewallPolicyIntrusionDetection, + FirewallPolicyIntrusionDetectionStateType, + FirewallPolicyIntrusionDetectionProfileType, + FirewallPolicyIntrusionDetectionConfiguration, + FirewallPolicyIntrusionDetectionSignatureSpecification, + FirewallPolicyIntrusionDetectionBypassTrafficSpecifications, + FirewallPolicyIntrusionDetectionProtocol, + FirewallPolicyTransportSecurity, + FirewallPolicyCertificateAuthority, + FirewallPolicySku, + FirewallPolicySkuTier, + FirewallPolicyRuleCollectionGroup, + FirewallPolicyRuleCollectionGroupProperties, + FirewallPolicyRuleCollection, + FirewallPolicyRuleCollectionUnion, + FirewallPolicyRuleCollectionType, + FirewallPolicyNatRuleCollection, + FirewallPolicyNatRuleCollectionAction, + FirewallPolicyNatRuleCollectionActionType, + FirewallPolicyRule, + FirewallPolicyRuleUnion, + FirewallPolicyRuleType, + ApplicationRule, + FirewallPolicyRuleApplicationProtocol, + FirewallPolicyRuleApplicationProtocolType, + FirewallPolicyHttpHeaderToInsert, + NatRule, + FirewallPolicyRuleNetworkProtocol, + NetworkRule, + FirewallPolicyFilterRuleCollection, + FirewallPolicyFilterRuleCollectionAction, + FirewallPolicyFilterRuleCollectionActionType, + SignaturesOverrides, + SignaturesOverridesProperties, + WritableResource, + SignaturesOverridesList, + FirewallPolicyDraft, + FirewallPolicyDraftProperties, + FirewallPolicyRuleCollectionGroupDraft, + FirewallPolicyRuleCollectionGroupDraftProperties, + IpamPool, + IpamPoolProperties, + IpType, + CommonTrackedResource, + CommonResource, + CommonErrorResponse, + CommonErrorDetail, + CommonErrorAdditionalInfo, + IpamPoolUpdate, + IpamPoolUpdateProperties, + PoolUsage, + ResourceBasics, + PoolAssociation, + NetworkManager, + NetworkManagerProperties, + NetworkManagerPropertiesNetworkManagerScopes, + CrossTenantScopes, + ConfigurationType, + PatchObject, + StaticCidr, + StaticCidrProperties, + CommonProxyResource, + IpAllocation, + IpAllocationPropertiesFormat, + IpAllocationType, + IpGroup, + IpGroupPropertiesFormat, + MigrateLoadBalancerToIpBasedRequest, + MigratedPools, + QueryInboundNatRulePortMappingRequest, + BackendAddressInboundNatRulePortMappings, + InboundNatRulePortMapping, + LoadBalancerVipSwapRequest, + LoadBalancerVipSwapRequestFrontendIPConfiguration, + LoadBalancerVipSwapRequestFrontendIPConfigurationProperties, + NetworkManagerConnection, + NetworkManagerConnectionProperties, + ScopeConnectionState, + ChildResource, + ConnectivityConfiguration, + NetworkGroup, + StaticMember, + StaticMemberProperties, + NetworkManagerRoutingConfiguration, + NetworkManagerRoutingConfigurationPropertiesFormat, + RouteTableUsageMode, + RoutingRuleCollection, + RoutingRuleCollectionPropertiesFormat, + NetworkManagerRoutingGroupItem, + DisableBgpRoutePropagation, + RoutingRule, + RoutingRulePropertiesFormat, + RoutingRuleRouteDestination, + RoutingRuleDestinationType, + RoutingRuleNextHop, + RoutingRuleNextHopType, + ScopeConnection, + ScopeConnectionProperties, + Commit, + CommitProperties, + SecurityAdminConfiguration, + SecurityAdminConfigurationPropertiesFormat, + NetworkIntentPolicyBasedService, + AddressSpaceAggregationOption, + AdminRuleCollection, + AdminRuleCollectionPropertiesFormat, + SecurityUserConfiguration, + SecurityUserConfigurationPropertiesFormat, + SecurityUserRuleCollection, + SecurityUserRuleCollectionPropertiesFormat, + SecurityUserGroupItem, + SecurityUserRule, + SecurityUserRulePropertiesFormat, + NetworkProfile, + NetworkProfilePropertiesFormat, + ContainerNetworkInterface, + ContainerNetworkInterfacePropertiesFormat, + ContainerNetworkInterfaceConfiguration, + ContainerNetworkInterfaceConfigurationPropertiesFormat, + Container, + ContainerNetworkInterfaceIpConfiguration, + ContainerNetworkInterfaceIpConfigurationPropertiesFormat, + NetworkSecurityPerimeter, + NetworkSecurityPerimeterProperties, + NspProvisioningState, + SecurityPerimeterTrackedResource, + SecurityPerimeterResource, + SecurityPerimeterSystemData, + CreatedByType as NetworkManagementClientCreatedByType, + UpdateTagsRequest, + ReachabilityAnalysisIntent, + ReachabilityAnalysisIntentProperties, + IPTraffic, + NetworkProtocol, + VerifierWorkspace, + VerifierWorkspaceProperties, + VerifierWorkspaceUpdate, + VerifierWorkspaceUpdateProperties, + ReachabilityAnalysisRun, + ReachabilityAnalysisRunProperties, + IntentContent, + NetworkVirtualApplianceConnection, + NetworkVirtualApplianceConnectionProperties, + RoutingConfiguration, + PropagatedRouteTable, + VnetRoute, + StaticRoutesConfig, + VnetLocalRouteOverrideCriteria, + StaticRoute, + NetworkVirtualAppliance, + NetworkVirtualAppliancePropertiesFormat, + VirtualApplianceSkuProperties, + VirtualApplianceNicProperties, + NicTypeInResponse, + NetworkVirtualAppliancePropertiesFormatNetworkProfile, + VirtualApplianceNetworkInterfaceConfiguration, + NicTypeInRequest, + VirtualApplianceNetworkInterfaceConfigurationProperties, + VirtualApplianceIPConfiguration, + VirtualApplianceIPConfigurationProperties, + VirtualApplianceAdditionalNicProperties, + InternetIngressPublicIpsProperties, + DelegationProperties, + PartnerManagedResourceProperties, + NvaInterfaceConfigurationsProperties, + NvaInVnetSubnetReferenceProperties, + NvaNicType, + NetworkVirtualApplianceInstanceIds, + NetworkVirtualApplianceBootDiagnosticParameters, + NetworkVirtualApplianceInstanceId, + VirtualApplianceSite, + VirtualApplianceSiteProperties, + Office365PolicyProperties, + BreakOutCategoryPolicies, + ErrorResponse, + TopologyParameters, + Topology, + TopologyResource, + TopologyAssociation, + AssociationType, + VerificationIPFlowParameters, + Direction, + IpFlowProtocol, + VerificationIPFlowResult, + Access, + NextHopParameters, + NextHopResult, + NextHopType, + SecurityGroupViewParameters, + SecurityGroupViewResult, + SecurityGroupNetworkInterface, + SecurityRuleAssociations, + NetworkInterfaceAssociation, + SubnetAssociation, + TroubleshootingParameters, + TroubleshootingProperties, + TroubleshootingResult, + TroubleshootingDetails, + TroubleshootingRecommendedActions, + QueryTroubleshootingParameters, + FlowLogInformation, + FlowLogProperties, + FlowLogStatusParameters, + ConnectivityParameters, + ConnectivitySource, + ConnectivityDestination, + Protocol, + ProtocolConfiguration, + HttpConfiguration, + HttpMethod, + HttpHeader, + ConnectivityInformation, + ConnectivityHop, + HopLink, + HopLinkProperties, + ConnectivityIssue, + Origin, + Severity, + IssueType, + ConnectionStatus, + AzureReachabilityReportParameters, + AzureReachabilityReportLocation, + AzureReachabilityReport, + AzureReachabilityReportItem, + AzureReachabilityReportLatencyInfo, + AvailableProvidersListParameters, + AvailableProvidersList, + AvailableProvidersListCountry, + AvailableProvidersListState, + AvailableProvidersListCity, + NetworkConfigurationDiagnosticParameters, + VerbosityLevel, + NetworkConfigurationDiagnosticProfile, + NetworkConfigurationDiagnosticResponse, + NetworkConfigurationDiagnosticResult, + NetworkSecurityGroupResult, + EvaluatedNetworkSecurityGroup, + MatchedRule, + NetworkSecurityRulesEvaluationResult, + CheckPrivateLinkServiceVisibilityRequest, + PrivateLinkServiceVisibility, + AutoApprovedPrivateLinkService, + PublicIPPrefix, + PublicIPPrefixPropertiesFormat, + ReferencedPublicIpAddress, + PublicIPPrefixSku, + PublicIPPrefixSkuName, + PublicIPPrefixSkuTier, + RouteFilter, + RouteFilterPropertiesFormat, + RouteFilterRule, + RouteFilterRulePropertiesFormat, + RouteFilterRuleType, + TrackedResourceWithSettableIdOptionalLocation, + SecurityPartnerProvider, + SecurityPartnerProviderPropertiesFormat, + SecurityProviderName, + SecurityPartnerProviderConnectionStatus, + IPAddressAvailabilityResult, + VirtualNetworkUsage, + VirtualNetworkUsageName, + PrepareNetworkPoliciesRequest, + NetworkIntentPolicyConfiguration, + NetworkIntentPolicy, + UnprepareNetworkPoliciesRequest, + VirtualNetworkGateway, + VirtualNetworkGatewayPropertiesFormat, + VirtualNetworkGatewayAutoScaleConfiguration, + VirtualNetworkGatewayAutoScaleBounds, + VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayIPConfigurationPropertiesFormat, + VirtualNetworkGatewayType, + VpnType, + VpnGatewayGeneration, + VirtualNetworkGatewayMigrationStatus, + VirtualNetworkGatewayMigrationState, + VirtualNetworkGatewayMigrationPhase, + VirtualNetworkGatewaySku, + VirtualNetworkGatewaySkuName, + VirtualNetworkGatewaySkuTier, + VpnClientConfiguration, + VpnClientRootCertificate, + VpnClientRootCertificatePropertiesFormat, + VpnClientRevokedCertificate, + VpnClientRevokedCertificatePropertiesFormat, + VpnClientProtocol, + VpnAuthenticationType, + IpsecPolicy, + IpsecEncryption, + IpsecIntegrity, + IkeEncryption, + IkeIntegrity, + DhGroup, + PfsGroup, + RadiusServer, + VngClientConnectionConfiguration, + VngClientConnectionConfigurationProperties, + VirtualNetworkGatewayPolicyGroup, + VirtualNetworkGatewayPolicyGroupProperties, + VirtualNetworkGatewayPolicyGroupMember, + VpnPolicyMemberAttributeType, + BgpSettings, + IPConfigurationBgpPeeringAddress, + VirtualNetworkGatewayNatRule, + VirtualNetworkGatewayNatRuleProperties, + VpnNatRuleType, + VpnNatRuleMode, + VpnNatRuleMapping, + AdminState, + ResiliencyModel, + VirtualNetworkGatewayConnectionListEntity, + VirtualNetworkGatewayConnectionListEntityPropertiesFormat, + VirtualNetworkConnectionGatewayReference, + VirtualNetworkGatewayConnectionType, + VirtualNetworkGatewayConnectionProtocol, + VirtualNetworkGatewayConnectionMode, + VirtualNetworkGatewayConnectionStatus, + TunnelConnectionHealth, + GatewayCustomBgpIpAddressIpConfiguration, + TrafficSelectorPolicy, + VpnClientParameters, + ProcessorArchitecture, + BgpPeerStatusListResult, + BgpPeerStatus, + BgpPeerState, + RadiusAuthServerListResult, + RadiusAuthServer, + GatewayRouteListResult, + GatewayRoute, + GatewayResiliencyInformation, + ResiliencyRecommendationComponents, + GatewayResiliencyRecommendation, + GatewayRouteSetsInformation, + GatewayRouteSet, + RouteSourceDetails, + CircuitMetadataMap, + VpnClientIPsecParameters, + VpnPacketCaptureStartParameters, + VpnPacketCaptureStopParameters, + ExpressRouteFailoverTestDetails, + ExpressRouteFailoverCircuitResourceDetails, + ExpressRouteFailoverConnectionResourceDetails, + FailoverConnectionStatus, + ExpressRouteFailoverSingleTestDetails, + FailoverTestStatusForSingleTest, + ExpressRouteFailoverRedundantRoute, + FailoverConnectionDetails, + ExpressRouteFailoverStopApiParameters, + VpnClientConnectionHealthDetailListResult, + VpnClientConnectionHealthDetail, + P2SVpnConnectionRequest, + VirtualNetworkGatewayMigrationParameters, + VirtualNetworkGatewayMigrationType, + VpnDeviceScriptParameters, + VirtualNetworkGatewayConnection, + VirtualNetworkGatewayConnectionPropertiesFormat, + LocalNetworkGateway, + LocalNetworkGatewayPropertiesFormat, + VirtualNetworkGatewayConnectionTunnelProperties, + ConnectionAuthenticationType, + CertificateAuthentication, + ConnectionSharedKey, + ConnectionResetSharedKey, + VirtualRouter, + VirtualRouterPropertiesFormat, + VirtualRouterPeering, + VirtualRouterPeeringProperties, + VirtualWAN, + VirtualWanProperties, + OfficeTrafficCategory, + VpnSite, + VpnSiteProperties, + DeviceProperties, + VpnSiteLink, + VpnSiteLinkProperties, + VpnLinkProviderProperties, + VpnLinkBgpSettings, + O365PolicyProperties, + O365BreakOutCategoryPolicies, + VpnServerConfiguration, + VpnServerConfigurationProperties, + VpnGatewayTunnelingProtocol, + VpnServerConfigVpnClientRootCertificate, + VpnServerConfigVpnClientRevokedCertificate, + VpnServerConfigRadiusServerRootCertificate, + VpnServerConfigRadiusClientRootCertificate, + AadAuthenticationParameters, + P2SVpnGateway, + P2SVpnGatewayProperties, + P2SConnectionConfiguration, + P2SConnectionConfigurationProperties, + VpnServerConfigurationPolicyGroup, + VpnServerConfigurationPolicyGroupProperties, + VpnServerConfigurationPolicyGroupMember, + VpnClientConnectionHealth, + TrackedResourceWithSettableName, + VirtualHub, + VirtualHubProperties, + VirtualHubRouteTable, + VirtualHubRoute, + VirtualHubRouteTableV2, + VirtualHubRouteTableV2Properties, + VirtualHubRouteV2, + RoutingState, + PreferredRoutingGateway, + HubRoutingPreference, + VirtualRouterAutoScaleConfiguration, + EffectiveRoutesParameters, + VirtualHubEffectiveRouteList, + VirtualHubEffectiveRoute, + GetInboundRoutesParameters, + EffectiveRouteMapRouteList, + EffectiveRouteMapRoute, + GetOutboundRoutesParameters, + RouteMap, + RouteMapProperties, + RouteMapRule, + Criterion, + RouteMapMatchCondition, + Action, + RouteMapActionType, + Parameter, + NextStep, + ReadOnlySubResourceModel, + VpnGateway, + VpnGatewayProperties, + VpnConnection, + VpnConnectionProperties, + VpnConnectionStatus, + VpnSiteLinkConnection, + VpnSiteLinkConnectionProperties, + VpnLinkConnectionMode, + VpnGatewayIpConfiguration, + VpnGatewayNatRule, + VpnGatewayNatRuleProperties, + VpnGatewayPacketCaptureStartParameters, + VpnGatewayPacketCaptureStopParameters, + ExpressRouteGateway, + ExpressRouteGatewayProperties, + ExpressRouteGatewayPropertiesAutoScaleConfiguration, + ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds, + ExpressRouteConnection, + ExpressRouteConnectionProperties, + ExpressRouteCircuitPeeringId, + VirtualHubId, + ExpressRouteGatewayList, + HubRouteTable, + HubRouteTableProperties, + HubRoute, + ConnectionPolicy, + ConnectionPolicyProperties, + ProxyResource, + WebApplicationFirewallPolicy, + WebApplicationFirewallPolicyPropertiesFormat, + PolicySettings, + WebApplicationFirewallEnabledState, + WebApplicationFirewallMode, + PolicySettingsLogScrubbing, + WebApplicationFirewallScrubbingState, + WebApplicationFirewallScrubbingRules, + ScrubbingRuleEntryMatchVariable, + ScrubbingRuleEntryMatchOperator, + ScrubbingRuleEntryState, + WebApplicationFirewallCustomRule, + WebApplicationFirewallState, + ApplicationGatewayFirewallRateLimitDuration, + WebApplicationFirewallRuleType, + MatchCondition, + MatchVariable, + WebApplicationFirewallMatchVariable, + WebApplicationFirewallOperator, + WebApplicationFirewallTransform, + GroupByUserSession, + GroupByVariable, + ApplicationGatewayFirewallUserSessionVariable, + WebApplicationFirewallAction, + WebApplicationFirewallPolicyResourceState, + ManagedRulesDefinition, + ExceptionEntry, + ExceptionEntryMatchVariable, + ExceptionEntryValueMatchOperator, + ExceptionEntrySelectorMatchOperator, + ExclusionManagedRuleSet, + ExclusionManagedRuleGroup, + ExclusionManagedRule, + OwaspCrsExclusionEntry, + OwaspCrsExclusionEntryMatchVariable, + OwaspCrsExclusionEntrySelectorMatchOperator, + ManagedRuleSet, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleEnabledState, + ActionType, + SensitivityType, + ManagedRuleSetRuleGroup, + ApplicationGatewayForContainersReferenceDefinition, + VirtualNetworkAppliance, + VirtualNetworkAppliancePropertiesFormat, + VirtualNetworkApplianceIpConfiguration, + VirtualNetworkApplianceIpConfigurationProperties, + VirtualNetworkApplianceIpVersionType, + ServiceGateway, + ServiceGatewayPropertiesFormat, + RouteTargetAddressPropertiesFormat, + ServiceGatewaySku, + ServiceGatewaySkuName, + ServiceGatewaySkuTier, + ServiceGatewayUpdateAddressLocationsRequest, + UpdateAction, + ServiceGatewayAddressLocation, + AddressUpdateAction, + ServiceGatewayAddress, + ServiceGatewayUpdateServicesRequest, + ServiceUpdateAction, + ServiceGatewayServiceRequest, + ServiceGatewayService, + ServiceGatewayServicePropertiesFormat, + ServiceType, + ServiceGatewayAddressLocationResponse, + InterconnectGroup, + InterconnectGroupPropertiesFormat, + InterconnectGroupScope, + Subgroup, + SubgroupProperties, + SubgroupProfile, + SubgroupProfileScope, + InterconnectGroupNodeAvailability, + SubgroupNodeAvailabilityEntry, + ApplicationGatewayPrivateLinkResource, + ApplicationGatewayPrivateLinkResourceProperties, + ApplicationGatewayWafDynamicManifestResult, + ApplicationGatewayWafDynamicManifestPropertiesResult, + DefaultRuleSetPropertyFormat, + ApplicationGatewayFirewallManifestRuleSet, + ApplicationGatewayRuleSetStatusOptions, + ProxyResourceWithSettableId, + AzureWebCategory, + AzureWebCategoryPropertiesFormat, + ExpressRouteProviderPortListResult, + SwapResource, + SwapResourceProperties, + SlotType, + ProxyResourceWithReadOnlyID, + SwapResourceListResult, + CustomIpPrefix, + CustomIpPrefixPropertiesFormat, + CommissionedState, + Geo, + CustomIpPrefixType, + DscpConfiguration, + DscpConfigurationPropertiesFormat, + QosIpRange, + QosPortRange, + ProtocolType, + QosDefinition, + IdpsQueryObject, + FilterItems, + OrderBy, + FirewallPolicyIdpsQuerySortOrder, + QueryResults, + SingleQueryResult, + FirewallPolicyIdpsSignatureMode, + FirewallPolicyIdpsSignatureSeverity, + FirewallPolicyIdpsSignatureDirection, + SignatureOverridesFilterValuesQuery, + SignatureOverridesFilterValuesResponse, + NetworkManagerCommit, + NetworkManagerDeploymentStatusParameter, + NetworkManagerDeploymentStatusListResult, + NetworkManagerDeploymentStatus, + DeploymentStatus, + LoadBalancerHealthPerRule, + LoadBalancerHealthPerRulePerBackendAddress, + BaseAdminRule, + BaseAdminRuleUnion, + AdminRuleKind, + AdminRule, + DefaultAdminRule, + NspProfile, + NspProfileProperties, + SecurityPerimeterProxyResource, + NspAccessRule, + NspAccessRuleProperties, + AccessRuleDirection, + SubscriptionId, + PerimeterBasedAccessRule, + NspAssociation, + NspAssociationProperties, + AssociationAccessMode, + NspLink, + NspLinkProperties, + NspLinkProvisioningState, + NspLinkStatus, + NspLinkReference, + NspLinkReferenceProperties, + NspLoggingConfiguration, + NspLoggingConfigurationProperties, + NetworkVirtualApplianceSku, + NetworkVirtualApplianceSkuPropertiesFormat, + NetworkVirtualApplianceSkuInstances, + InboundSecurityRule, + InboundSecurityRuleProperties, + InboundSecurityRuleType, + InboundSecurityRules, + InboundSecurityRulesProtocol, + PacketCapture, + PacketCaptureParameters, + PacketCaptureMachineScope, + PacketCaptureTargetType, + PacketCaptureStorageLocation, + PacketCaptureFilter, + PcProtocol, + PacketCaptureSettings, + PacketCaptureResult, + PacketCaptureResultProperties, + PacketCaptureQueryStatusResult, + PcStatus, + PcError, + ConnectionMonitorResult, + ConnectionMonitorResultProperties, + ConnectionMonitorType, + ConnectionMonitorParameters, + ConnectionMonitorSource, + ConnectionMonitorDestination, + ConnectionMonitorEndpoint, + EndpointType, + ConnectionMonitorEndpointFilter, + ConnectionMonitorEndpointFilterType, + ConnectionMonitorEndpointFilterItem, + ConnectionMonitorEndpointFilterItemType, + ConnectionMonitorEndpointScope, + ConnectionMonitorEndpointScopeItem, + CoverageLevel, + ConnectionMonitorEndpointLocationDetails, + ConnectionMonitorTestConfiguration, + ConnectionMonitorTestConfigurationProtocol, + PreferredIPVersion, + ConnectionMonitorHttpConfiguration, + HttpConfigurationMethod, + ConnectionMonitorTcpConfiguration, + DestinationPortBehavior, + ConnectionMonitorIcmpConfiguration, + ConnectionMonitorSuccessThreshold, + ConnectionMonitorTestGroup, + ConnectionMonitorOutput, + OutputType, + ConnectionMonitorWorkspaceSettings, + TrackedResourceWithEtag, + ConnectionMonitor, + PrivateDnsZoneGroup, + PrivateDnsZoneGroupPropertiesFormat, + PrivateDnsZoneConfig, + PrivateDnsZonePropertiesFormat, + RecordSet, + ResourceNavigationLinksListResult, + ServiceAssociationLinksListResult, + GetVpnSitesConfigurationRequest, + VpnServerConfigurationsResponse, + HubVirtualNetworkConnection, + HubVirtualNetworkConnectionProperties, + VpnConnectionPacketCaptureStartParameters, + VpnConnectionPacketCaptureStopParameters, + ConnectionSharedKeyResult, + SharedKeyProperties, + P2SVpnProfileParameters, + P2SVpnConnectionHealthRequest, + P2SVpnConnectionHealth, + ExpressRouteConnectionList, + BgpConnection, + BgpConnectionProperties, + HubBgpConnectionStatus, + PeerRoute, + HubIpConfiguration, + HubIPConfigurationPropertiesFormat, + RoutingIntent, + RoutingIntentProperties, + RoutingPolicy, + AvailableDelegation, + AvailableServiceAlias, + AzureFirewallFqdnTag, + AzureFirewallFqdnTagPropertiesFormat, + EndpointServiceResult, + ExpressRouteServiceProvider, + ExpressRouteServiceProviderPropertiesFormat, + ExpressRouteServiceProviderBandwidthsOffered, + PerimeterAssociableResource, + PerimeterAssociableResourceProperties, + NspReadinessState, + NspServiceTagsResource, + AvailablePrivateEndpointType, + BgpServiceCommunity, + BgpServiceCommunityPropertiesFormat, + BGPCommunity, + ServiceTagsListResult, + ServiceTagInformation, + ServiceTagInformationPropertiesFormat, + Usage, + UsageUnit, + UsageName, + LoadBalancerDetailLevel, + SyncRemoteAddressSpace, +} from "./models/microsoft/network/index.js"; +export { + KnownBastionConnectProtocol, + KnownConnectivityTopology, + KnownIsGlobal, + KnownConnectedGroupPrivateEndpointsScale, + KnownConnectedGroupAddressOverlap, + KnownPeeringEnforcement, + KnownUseHubGateway, + KnownGroupConnectivity, + KnownDeleteExistingPeering, + KnownGroupMemberType, + KnownEffectiveAdminRuleKind, + KnownSecurityConfigurationRuleProtocol, + KnownAddressPrefixType, + KnownSecurityConfigurationRuleAccess, + KnownSecurityConfigurationRuleDirection, + KnownVirtualWanSecurityProviderType, + KnownAuthenticationMethod, + KnownApplicationGatewaySkuName, + KnownApplicationGatewayTier, + KnownApplicationGatewaySkuFamily, + KnownApplicationGatewaySslProtocol, + KnownApplicationGatewaySslPolicyType, + KnownApplicationGatewaySslPolicyName, + KnownApplicationGatewaySslCipherSuite, + KnownApplicationGatewayOperationalState, + KnownApplicationGatewayProtocol, + KnownApplicationGatewayCookieBasedAffinity, + KnownApplicationGatewayCustomErrorStatusCode, + KnownApplicationGatewayClientRevocationOptions, + KnownApplicationGatewayClientAuthVerificationModes, + KnownApplicationGatewayRequestRoutingRuleType, + KnownApplicationGatewayRedirectType, + KnownApplicationGatewayFirewallMode, + KnownApplicationGatewayLoadDistributionAlgorithm, + KnownApplicationGatewayUnAuthorizedRequestAction, + KnownApplicationGatewayBackendHealthServerHealth, + KnownApplicationGatewayWafRuleStateTypes, + KnownApplicationGatewayWafRuleActionTypes, + KnownApplicationGatewayWafRuleSensitivityTypes, + KnownApplicationGatewayTierTypes, + KnownAzureFirewallRCActionType, + KnownAzureFirewallApplicationRuleProtocolType, + KnownAzureFirewallNatRCActionType, + KnownAzureFirewallNetworkRuleProtocol, + KnownAzureFirewallThreatIntelMode, + KnownAzureFirewallSkuName, + KnownAzureFirewallSkuTier, + KnownAzureFirewallPacketCaptureFlagsType, + KnownAzureFirewallPacketCaptureOperationType, + KnownAzureFirewallPacketCaptureResponseCode, + KnownBastionHostSkuName, + KnownEffectiveRouteSource, + KnownEffectiveRouteState, + KnownEffectiveSecurityRuleProtocol, + KnownIsWorkloadProtected, + KnownIsRollback, + KnownDdosDetectionMode, + KnownDdosTrafficType, + KnownAuthorizationUseStatus, + KnownServiceProviderProvisioningState, + KnownExpressRoutePeeringType, + KnownExpressRoutePeeringState, + KnownExpressRouteCircuitPeeringAdvertisedPublicPrefixState, + KnownAdvertisedPublicPrefixPropertiesValidationState, + KnownExpressRouteCircuitPeeringState, + KnownCircuitConnectionStatus, + KnownExpressRouteCircuitSkuTier, + KnownExpressRouteCircuitSkuFamily, + KnownFailoverTestStatus, + KnownFailoverTestType, + KnownMaintenanceTestCategory, + KnownExpressRouteFailoverLinkType, + KnownExpressRouteFailoverBgpStatusAddressFamily, + KnownExpressRouteLinkFailoverBgpStatus, + KnownExpressRoutePortsEncapsulation, + KnownExpressRouteLinkConnectorType, + KnownExpressRouteLinkAdminState, + KnownExpressRouteLinkMacSecCipher, + KnownExpressRouteLinkMacSecSciState, + KnownExpressRoutePortsBillingType, + KnownExpressRoutePortAuthorizationUseStatus, + KnownAutoLearnPrivateRangesMode, + KnownFirewallPolicyIntrusionDetectionStateType, + KnownFirewallPolicyIntrusionDetectionProfileType, + KnownFirewallPolicyIntrusionDetectionProtocol, + KnownFirewallPolicySkuTier, + KnownFirewallPolicyRuleCollectionType, + KnownFirewallPolicyNatRuleCollectionActionType, + KnownFirewallPolicyRuleType, + KnownFirewallPolicyRuleApplicationProtocolType, + KnownFirewallPolicyRuleNetworkProtocol, + KnownFirewallPolicyFilterRuleCollectionActionType, + KnownIpType, + KnownConfigurationType, + KnownIpAllocationType, + KnownScopeConnectionState, + KnownRouteTableUsageMode, + KnownDisableBgpRoutePropagation, + KnownRoutingRuleDestinationType, + KnownRoutingRuleNextHopType, + KnownNetworkIntentPolicyBasedService, + KnownAddressSpaceAggregationOption, + KnownNspProvisioningState, + KnownCreatedByType as NetworkManagementClientKnownCreatedByType, + KnownNetworkProtocol, + KnownVnetLocalRouteOverrideCriteria, + KnownNicTypeInResponse, + KnownNicTypeInRequest, + KnownNvaNicType, + KnownAssociationType, + KnownDirection, + KnownIpFlowProtocol, + KnownAccess, + KnownNextHopType, + KnownProtocol, + KnownHttpMethod, + KnownOrigin, + KnownSeverity, + KnownIssueType, + KnownConnectionStatus, + KnownVerbosityLevel, + KnownPublicIPPrefixSkuName, + KnownPublicIPPrefixSkuTier, + KnownRouteFilterRuleType, + KnownSecurityProviderName, + KnownSecurityPartnerProviderConnectionStatus, + KnownVirtualNetworkGatewayType, + KnownVpnType, + KnownVpnGatewayGeneration, + KnownVirtualNetworkGatewayMigrationState, + KnownVirtualNetworkGatewayMigrationPhase, + KnownVirtualNetworkGatewaySkuName, + KnownVirtualNetworkGatewaySkuTier, + KnownVpnClientProtocol, + KnownVpnAuthenticationType, + KnownIpsecEncryption, + KnownIpsecIntegrity, + KnownIkeEncryption, + KnownIkeIntegrity, + KnownDhGroup, + KnownPfsGroup, + KnownVpnPolicyMemberAttributeType, + KnownVpnNatRuleType, + KnownVpnNatRuleMode, + KnownAdminState, + KnownResiliencyModel, + KnownVirtualNetworkGatewayConnectionType, + KnownVirtualNetworkGatewayConnectionProtocol, + KnownVirtualNetworkGatewayConnectionMode, + KnownVirtualNetworkGatewayConnectionStatus, + KnownProcessorArchitecture, + KnownBgpPeerState, + KnownFailoverConnectionStatus, + KnownFailoverTestStatusForSingleTest, + KnownVirtualNetworkGatewayMigrationType, + KnownConnectionAuthenticationType, + KnownOfficeTrafficCategory, + KnownVpnGatewayTunnelingProtocol, + KnownRoutingState, + KnownPreferredRoutingGateway, + KnownHubRoutingPreference, + KnownRouteMapMatchCondition, + KnownRouteMapActionType, + KnownNextStep, + KnownVpnConnectionStatus, + KnownVpnLinkConnectionMode, + KnownWebApplicationFirewallEnabledState, + KnownWebApplicationFirewallMode, + KnownWebApplicationFirewallScrubbingState, + KnownScrubbingRuleEntryMatchVariable, + KnownScrubbingRuleEntryMatchOperator, + KnownScrubbingRuleEntryState, + KnownWebApplicationFirewallState, + KnownApplicationGatewayFirewallRateLimitDuration, + KnownWebApplicationFirewallRuleType, + KnownWebApplicationFirewallMatchVariable, + KnownWebApplicationFirewallOperator, + KnownWebApplicationFirewallTransform, + KnownApplicationGatewayFirewallUserSessionVariable, + KnownWebApplicationFirewallAction, + KnownWebApplicationFirewallPolicyResourceState, + KnownExceptionEntryMatchVariable, + KnownExceptionEntryValueMatchOperator, + KnownExceptionEntrySelectorMatchOperator, + KnownOwaspCrsExclusionEntryMatchVariable, + KnownOwaspCrsExclusionEntrySelectorMatchOperator, + KnownManagedRuleEnabledState, + KnownActionType, + KnownSensitivityType, + KnownVirtualNetworkApplianceIpVersionType, + KnownServiceGatewaySkuName, + KnownServiceGatewaySkuTier, + KnownUpdateAction, + KnownAddressUpdateAction, + KnownServiceUpdateAction, + KnownServiceType, + KnownInterconnectGroupScope, + KnownSubgroupProfileScope, + KnownApplicationGatewayRuleSetStatusOptions, + KnownCommissionedState, + KnownGeo, + KnownCustomIpPrefixType, + KnownProtocolType, + KnownFirewallPolicyIdpsQuerySortOrder, + KnownDeploymentStatus, + KnownAdminRuleKind, + KnownAccessRuleDirection, + KnownAssociationAccessMode, + KnownNspLinkProvisioningState, + KnownNspLinkStatus, + KnownInboundSecurityRuleType, + KnownInboundSecurityRulesProtocol, + KnownPcProtocol, + KnownPcStatus, + KnownPcError, + KnownConnectionMonitorType, + KnownEndpointType, + KnownConnectionMonitorEndpointFilterType, + KnownConnectionMonitorEndpointFilterItemType, + KnownCoverageLevel, + KnownConnectionMonitorTestConfigurationProtocol, + KnownPreferredIPVersion, + KnownHttpConfigurationMethod, + KnownDestinationPortBehavior, + KnownOutputType, + KnownHubBgpConnectionStatus, + KnownNspReadinessState, + KnownUsageUnit, + KnownLoadBalancerDetailLevel, + KnownSyncRemoteAddressSpace, +} from "./models/microsoft/network/index.js"; +export type { + NetworkManagementClientOptionalParams, + CheckDnsNameAvailabilityOptionalParams, + GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams, + SupportedSecurityProvidersOptionalParams, + ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams, + ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams, + ListActiveSecurityAdminRulesOptionalParams, + ListActiveConnectivityConfigurationsOptionalParams, + ExpressRouteProviderPortOptionalParams, + DisconnectActiveSessionsOptionalParams, + GetActiveSessionsOptionalParams, + GetBastionShareableLinkOptionalParams, + DeleteBastionShareableLinkByTokenOptionalParams, + DeleteBastionShareableLinkOptionalParams, + PutBastionShareableLinkOptionalParams, +} from "./api/index.js"; +export type { + AdminRuleCollectionsListOptionalParams, + AdminRuleCollectionsDeleteOptionalParams, + AdminRuleCollectionsCreateOrUpdateOptionalParams, + AdminRuleCollectionsGetOptionalParams, +} from "./api/adminRuleCollections/index.js"; +export type { + AdminRulesListOptionalParams, + AdminRulesDeleteOptionalParams, + AdminRulesCreateOrUpdateOptionalParams, + AdminRulesGetOptionalParams, +} from "./api/adminRules/index.js"; +export type { + ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, + ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams, +} from "./api/applicationGatewayPrivateEndpointConnections/index.js"; +export type { ApplicationGatewayPrivateLinkResourcesListOptionalParams } from "./api/applicationGatewayPrivateLinkResources/index.js"; +export type { + ApplicationGatewaysListAvailableWafRuleSetsOptionalParams, + ApplicationGatewaysListAvailableResponseHeadersOptionalParams, + ApplicationGatewaysListAvailableRequestHeadersOptionalParams, + ApplicationGatewaysListAvailableServerVariablesOptionalParams, + ApplicationGatewaysGetSslPredefinedPolicyOptionalParams, + ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, + ApplicationGatewaysListAvailableSslOptionsOptionalParams, + ApplicationGatewaysBackendHealthOnDemandOptionalParams, + ApplicationGatewaysBackendHealthOptionalParams, + ApplicationGatewaysStopOptionalParams, + ApplicationGatewaysStartOptionalParams, + ApplicationGatewaysListAllOptionalParams, + ApplicationGatewaysListOptionalParams, + ApplicationGatewaysDeleteOptionalParams, + ApplicationGatewaysUpdateTagsOptionalParams, + ApplicationGatewaysCreateOrUpdateOptionalParams, + ApplicationGatewaysGetOptionalParams, +} from "./api/applicationGateways/index.js"; +export type { ApplicationGatewayWafDynamicManifestsListOptionalParams } from "./api/applicationGatewayWafDynamicManifests/index.js"; +export type { ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams } from "./api/applicationGatewayWafDynamicManifestsDefault/index.js"; +export type { + ApplicationSecurityGroupsListAllOptionalParams, + ApplicationSecurityGroupsListOptionalParams, + ApplicationSecurityGroupsDeleteOptionalParams, + ApplicationSecurityGroupsUpdateTagsOptionalParams, + ApplicationSecurityGroupsCreateOrUpdateOptionalParams, + ApplicationSecurityGroupsGetOptionalParams, +} from "./api/applicationSecurityGroups/index.js"; +export type { AvailableDelegationsListOptionalParams } from "./api/availableDelegations/index.js"; +export type { AvailableEndpointServicesListOptionalParams } from "./api/availableEndpointServices/index.js"; +export type { + AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, + AvailablePrivateEndpointTypesListOptionalParams, +} from "./api/availablePrivateEndpointTypes/index.js"; +export type { AvailableResourceGroupDelegationsListOptionalParams } from "./api/availableResourceGroupDelegations/index.js"; +export type { + AvailableServiceAliasesListByResourceGroupOptionalParams, + AvailableServiceAliasesListOptionalParams, +} from "./api/availableServiceAliases/index.js"; +export type { AzureFirewallFqdnTagsListAllOptionalParams } from "./api/azureFirewallFqdnTags/index.js"; +export type { + AzureFirewallsPacketCaptureOperationOptionalParams, + AzureFirewallsPacketCaptureOptionalParams, + AzureFirewallsListLearnedPrefixesOptionalParams, + AzureFirewallsListAllOptionalParams, + AzureFirewallsListOptionalParams, + AzureFirewallsDeleteOptionalParams, + AzureFirewallsUpdateTagsOptionalParams, + AzureFirewallsCreateOrUpdateOptionalParams, + AzureFirewallsGetOptionalParams, +} from "./api/azureFirewalls/index.js"; +export type { + BastionHostsListOptionalParams, + BastionHostsListByResourceGroupOptionalParams, + BastionHostsDeleteOptionalParams, + BastionHostsUpdateTagsOptionalParams, + BastionHostsCreateOrUpdateOptionalParams, + BastionHostsGetOptionalParams, +} from "./api/bastionHosts/index.js"; +export type { BgpServiceCommunitiesListOptionalParams } from "./api/bgpServiceCommunities/index.js"; +export type { + CommitsListOptionalParams, + CommitsDeleteOptionalParams, + CommitsCreateOrUpdateOptionalParams, + CommitsGetOptionalParams, +} from "./api/commits/index.js"; +export type { + ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams, + ConfigurationPolicyGroupsDeleteOptionalParams, + ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ConfigurationPolicyGroupsGetOptionalParams, +} from "./api/configurationPolicyGroups/index.js"; +export type { + ConnectionMonitorsStopOptionalParams, + ConnectionMonitorsListOptionalParams, + ConnectionMonitorsDeleteOptionalParams, + ConnectionMonitorsUpdateTagsOptionalParams, + ConnectionMonitorsCreateOrUpdateOptionalParams, + ConnectionMonitorsGetOptionalParams, +} from "./api/connectionMonitors/index.js"; +export type { + ConnectionPoliciesListOptionalParams, + ConnectionPoliciesDeleteOptionalParams, + ConnectionPoliciesCreateOrUpdateOptionalParams, + ConnectionPoliciesGetOptionalParams, +} from "./api/connectionPolicies/index.js"; +export type { + ConnectivityConfigurationsListOptionalParams, + ConnectivityConfigurationsDeleteOptionalParams, + ConnectivityConfigurationsCreateOrUpdateOptionalParams, + ConnectivityConfigurationsGetOptionalParams, +} from "./api/connectivityConfigurations/index.js"; +export type { + CustomIPPrefixesListAllOptionalParams, + CustomIPPrefixesListOptionalParams, + CustomIPPrefixesDeleteOptionalParams, + CustomIPPrefixesUpdateTagsOptionalParams, + CustomIPPrefixesCreateOrUpdateOptionalParams, + CustomIPPrefixesGetOptionalParams, +} from "./api/customIPPrefixes/index.js"; +export type { + DdosCustomPoliciesListAllOptionalParams, + DdosCustomPoliciesListOptionalParams, + DdosCustomPoliciesDeleteOptionalParams, + DdosCustomPoliciesUpdateTagsOptionalParams, + DdosCustomPoliciesCreateOrUpdateOptionalParams, + DdosCustomPoliciesGetOptionalParams, +} from "./api/ddosCustomPolicies/index.js"; +export type { + DdosProtectionPlansListOptionalParams, + DdosProtectionPlansListByResourceGroupOptionalParams, + DdosProtectionPlansDeleteOptionalParams, + DdosProtectionPlansUpdateTagsOptionalParams, + DdosProtectionPlansCreateOrUpdateOptionalParams, + DdosProtectionPlansGetOptionalParams, +} from "./api/ddosProtectionPlans/index.js"; +export type { + DefaultSecurityRulesListOptionalParams, + DefaultSecurityRulesGetOptionalParams, +} from "./api/defaultSecurityRules/index.js"; +export type { + DscpConfigurationListAllOptionalParams, + DscpConfigurationListOptionalParams, + DscpConfigurationDeleteOptionalParams, + DscpConfigurationCreateOrUpdateOptionalParams, + DscpConfigurationGetOptionalParams, +} from "./api/dscpConfiguration/index.js"; +export type { + ExpressRouteCircuitAuthorizationsListOptionalParams, + ExpressRouteCircuitAuthorizationsDeleteOptionalParams, + ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, + ExpressRouteCircuitAuthorizationsGetOptionalParams, +} from "./api/expressRouteCircuitAuthorizations/index.js"; +export type { + ExpressRouteCircuitConnectionsListOptionalParams, + ExpressRouteCircuitConnectionsDeleteOptionalParams, + ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, + ExpressRouteCircuitConnectionsGetOptionalParams, +} from "./api/expressRouteCircuitConnections/index.js"; +export type { + ExpressRouteCircuitPeeringsListOptionalParams, + ExpressRouteCircuitPeeringsDeleteOptionalParams, + ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, + ExpressRouteCircuitPeeringsGetOptionalParams, +} from "./api/expressRouteCircuitPeerings/index.js"; +export type { + ExpressRouteCircuitsGetPeeringStatsOptionalParams, + ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, + ExpressRouteCircuitsListRoutesTableOptionalParams, + ExpressRouteCircuitsListArpTableOptionalParams, + ExpressRouteCircuitsStopCircuitLinkFailoverTestOptionalParams, + ExpressRouteCircuitsStartCircuitLinkFailoverTestOptionalParams, + ExpressRouteCircuitsGetCircuitLinkFailoverSingleTestDetailsOptionalParams, + ExpressRouteCircuitsGetCircuitLinkFailoverAllTestsDetailsOptionalParams, + ExpressRouteCircuitsGetStatsOptionalParams, + ExpressRouteCircuitsListAllOptionalParams, + ExpressRouteCircuitsListOptionalParams, + ExpressRouteCircuitsDeleteOptionalParams, + ExpressRouteCircuitsUpdateTagsOptionalParams, + ExpressRouteCircuitsCreateOrUpdateOptionalParams, + ExpressRouteCircuitsGetOptionalParams, +} from "./api/expressRouteCircuits/index.js"; +export type { + ExpressRouteConnectionsListOptionalParams, + ExpressRouteConnectionsDeleteOptionalParams, + ExpressRouteConnectionsGetOptionalParams, + ExpressRouteConnectionsCreateOrUpdateOptionalParams, +} from "./api/expressRouteConnections/index.js"; +export type { + ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, + ExpressRouteCrossConnectionPeeringsGetOptionalParams, + ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, + ExpressRouteCrossConnectionPeeringsListOptionalParams, +} from "./api/expressRouteCrossConnectionPeerings/index.js"; +export type { + ExpressRouteCrossConnectionsListRoutesTableOptionalParams, + ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, + ExpressRouteCrossConnectionsListArpTableOptionalParams, + ExpressRouteCrossConnectionsListOptionalParams, + ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, + ExpressRouteCrossConnectionsUpdateTagsOptionalParams, + ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, + ExpressRouteCrossConnectionsGetOptionalParams, +} from "./api/expressRouteCrossConnections/index.js"; +export type { + ExpressRouteGatewaysGetResiliencyInformationOptionalParams, + ExpressRouteGatewaysGetRoutesInformationOptionalParams, + ExpressRouteGatewaysStopSiteFailoverTestOptionalParams, + ExpressRouteGatewaysStartSiteFailoverTestOptionalParams, + ExpressRouteGatewaysGetFailoverSingleTestDetailsOptionalParams, + ExpressRouteGatewaysGetFailoverAllTestsDetailsOptionalParams, + ExpressRouteGatewaysListBySubscriptionOptionalParams, + ExpressRouteGatewaysListByResourceGroupOptionalParams, + ExpressRouteGatewaysDeleteOptionalParams, + ExpressRouteGatewaysUpdateTagsOptionalParams, + ExpressRouteGatewaysCreateOrUpdateOptionalParams, + ExpressRouteGatewaysGetOptionalParams, +} from "./api/expressRouteGateways/index.js"; +export type { + ExpressRouteLinksListOptionalParams, + ExpressRouteLinksGetOptionalParams, +} from "./api/expressRouteLinks/index.js"; +export type { + ExpressRoutePortAuthorizationsListOptionalParams, + ExpressRoutePortAuthorizationsDeleteOptionalParams, + ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ExpressRoutePortAuthorizationsGetOptionalParams, +} from "./api/expressRoutePortAuthorizations/index.js"; +export type { + ExpressRoutePortsGenerateLOAOptionalParams, + ExpressRoutePortsListOptionalParams, + ExpressRoutePortsListByResourceGroupOptionalParams, + ExpressRoutePortsDeleteOptionalParams, + ExpressRoutePortsUpdateTagsOptionalParams, + ExpressRoutePortsCreateOrUpdateOptionalParams, + ExpressRoutePortsGetOptionalParams, +} from "./api/expressRoutePorts/index.js"; +export type { + ExpressRoutePortsLocationsListOptionalParams, + ExpressRoutePortsLocationsGetOptionalParams, +} from "./api/expressRoutePortsLocations/index.js"; +export type { ExpressRouteProviderPortsLocationListOptionalParams } from "./api/expressRouteProviderPortsLocation/index.js"; +export type { ExpressRouteServiceProvidersListOptionalParams } from "./api/expressRouteServiceProviders/index.js"; +export type { + FirewallPoliciesListAllOptionalParams, + FirewallPoliciesListOptionalParams, + FirewallPoliciesDeleteOptionalParams, + FirewallPoliciesUpdateTagsOptionalParams, + FirewallPoliciesCreateOrUpdateOptionalParams, + FirewallPoliciesGetOptionalParams, +} from "./api/firewallPolicies/index.js"; +export type { FirewallPolicyDeploymentsDeployOptionalParams } from "./api/firewallPolicyDeployments/index.js"; +export type { + FirewallPolicyDraftsDeleteOptionalParams, + FirewallPolicyDraftsCreateOrUpdateOptionalParams, + FirewallPolicyDraftsGetOptionalParams, +} from "./api/firewallPolicyDrafts/index.js"; +export type { FirewallPolicyIdpsSignaturesListOptionalParams } from "./api/firewallPolicyIdpsSignatures/index.js"; +export type { FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams } from "./api/firewallPolicyIdpsSignaturesFilterValues/index.js"; +export type { + FirewallPolicyIdpsSignaturesOverridesListOptionalParams, + FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams, + FirewallPolicyIdpsSignaturesOverridesPutOptionalParams, + FirewallPolicyIdpsSignaturesOverridesGetOptionalParams, +} from "./api/firewallPolicyIdpsSignaturesOverrides/index.js"; +export type { + FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams, + FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams, + FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams, +} from "./api/firewallPolicyRuleCollectionGroupDrafts/index.js"; +export type { + FirewallPolicyRuleCollectionGroupsListOptionalParams, + FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, + FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, + FirewallPolicyRuleCollectionGroupsGetOptionalParams, +} from "./api/firewallPolicyRuleCollectionGroups/index.js"; +export type { + FlowLogsListOptionalParams, + FlowLogsDeleteOptionalParams, + FlowLogsUpdateTagsOptionalParams, + FlowLogsCreateOrUpdateOptionalParams, + FlowLogsGetOptionalParams, +} from "./api/flowLogs/index.js"; +export type { + HubRouteTablesListOptionalParams, + HubRouteTablesDeleteOptionalParams, + HubRouteTablesCreateOrUpdateOptionalParams, + HubRouteTablesGetOptionalParams, +} from "./api/hubRouteTables/index.js"; +export type { + HubVirtualNetworkConnectionsListOptionalParams, + HubVirtualNetworkConnectionsGetOptionalParams, + HubVirtualNetworkConnectionsDeleteOptionalParams, + HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, +} from "./api/hubVirtualNetworkConnections/index.js"; +export type { + InboundNatRulesListOptionalParams, + InboundNatRulesDeleteOptionalParams, + InboundNatRulesCreateOrUpdateOptionalParams, + InboundNatRulesGetOptionalParams, +} from "./api/inboundNatRules/index.js"; +export type { + InboundSecurityRuleCreateOrUpdateOptionalParams, + InboundSecurityRuleGetOptionalParams, +} from "./api/inboundSecurityRule/index.js"; +export type { + InterconnectGroupsGetNodeAvailabilityOptionalParams, + InterconnectGroupsListAllOptionalParams, + InterconnectGroupsListOptionalParams, + InterconnectGroupsDeleteOptionalParams, + InterconnectGroupsUpdateTagsOptionalParams, + InterconnectGroupsCreateOrUpdateOptionalParams, + InterconnectGroupsGetOptionalParams, +} from "./api/interconnectGroups/index.js"; +export type { + IpAllocationsListOptionalParams, + IpAllocationsListByResourceGroupOptionalParams, + IpAllocationsDeleteOptionalParams, + IpAllocationsUpdateTagsOptionalParams, + IpAllocationsCreateOrUpdateOptionalParams, + IpAllocationsGetOptionalParams, +} from "./api/ipAllocations/index.js"; +export type { + IpamPoolsListAssociatedResourcesOptionalParams, + IpamPoolsGetPoolUsageOptionalParams, + IpamPoolsListOptionalParams, + IpamPoolsDeleteOptionalParams, + IpamPoolsUpdateOptionalParams, + IpamPoolsCreateOptionalParams, + IpamPoolsGetOptionalParams, +} from "./api/ipamPools/index.js"; +export type { + IpGroupsListOptionalParams, + IpGroupsListByResourceGroupOptionalParams, + IpGroupsDeleteOptionalParams, + IpGroupsUpdateGroupsOptionalParams, + IpGroupsCreateOrUpdateOptionalParams, + IpGroupsGetOptionalParams, +} from "./api/ipGroups/index.js"; +export type { + LoadBalancerBackendAddressPoolsListOptionalParams, + LoadBalancerBackendAddressPoolsDeleteOptionalParams, + LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, + LoadBalancerBackendAddressPoolsGetOptionalParams, +} from "./api/loadBalancerBackendAddressPools/index.js"; +export type { + LoadBalancerFrontendIPConfigurationsListOptionalParams, + LoadBalancerFrontendIPConfigurationsGetOptionalParams, +} from "./api/loadBalancerFrontendIPConfigurations/index.js"; +export type { + LoadBalancerLoadBalancingRulesHealthOptionalParams, + LoadBalancerLoadBalancingRulesListOptionalParams, + LoadBalancerLoadBalancingRulesGetOptionalParams, +} from "./api/loadBalancerLoadBalancingRules/index.js"; +export type { LoadBalancerNetworkInterfacesListOptionalParams } from "./api/loadBalancerNetworkInterfaces/index.js"; +export type { + LoadBalancerOutboundRulesListOptionalParams, + LoadBalancerOutboundRulesGetOptionalParams, +} from "./api/loadBalancerOutboundRules/index.js"; +export type { + LoadBalancerProbesListOptionalParams, + LoadBalancerProbesGetOptionalParams, +} from "./api/loadBalancerProbes/index.js"; +export type { + LoadBalancersSwapPublicIpAddressesOptionalParams, + LoadBalancersListInboundNatRulePortMappingsOptionalParams, + LoadBalancersMigrateToIpBasedOptionalParams, + LoadBalancersListAllOptionalParams, + LoadBalancersListOptionalParams, + LoadBalancersDeleteOptionalParams, + LoadBalancersUpdateTagsOptionalParams, + LoadBalancersCreateOrUpdateOptionalParams, + LoadBalancersGetOptionalParams, +} from "./api/loadBalancers/index.js"; +export type { + LocalNetworkGatewaysListOptionalParams, + LocalNetworkGatewaysDeleteOptionalParams, + LocalNetworkGatewaysUpdateTagsOptionalParams, + LocalNetworkGatewaysCreateOrUpdateOptionalParams, + LocalNetworkGatewaysGetOptionalParams, +} from "./api/localNetworkGateways/index.js"; +export type { + ManagementGroupNetworkManagerConnectionsListOptionalParams, + ManagementGroupNetworkManagerConnectionsDeleteOptionalParams, + ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams, + ManagementGroupNetworkManagerConnectionsGetOptionalParams, +} from "./api/managementGroupNetworkManagerConnections/index.js"; +export type { + NatGatewaysListAllOptionalParams, + NatGatewaysListOptionalParams, + NatGatewaysDeleteOptionalParams, + NatGatewaysUpdateTagsOptionalParams, + NatGatewaysCreateOrUpdateOptionalParams, + NatGatewaysGetOptionalParams, +} from "./api/natGateways/index.js"; +export type { + NatRulesListByVpnGatewayOptionalParams, + NatRulesDeleteOptionalParams, + NatRulesCreateOrUpdateOptionalParams, + NatRulesGetOptionalParams, +} from "./api/natRules/index.js"; +export type { + NetworkGroupsListOptionalParams, + NetworkGroupsDeleteOptionalParams, + NetworkGroupsCreateOrUpdateOptionalParams, + NetworkGroupsGetOptionalParams, +} from "./api/networkGroups/index.js"; +export type { + NetworkInterfaceIPConfigurationsListOptionalParams, + NetworkInterfaceIPConfigurationsGetOptionalParams, +} from "./api/networkInterfaceIPConfigurations/index.js"; +export type { NetworkInterfaceLoadBalancersListOptionalParams } from "./api/networkInterfaceLoadBalancers/index.js"; +export type { + NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, + NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, + NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, + NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams, + NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, + NetworkInterfacesGetEffectiveRouteTableOptionalParams, + NetworkInterfacesListAllOptionalParams, + NetworkInterfacesListOptionalParams, + NetworkInterfacesDeleteOptionalParams, + NetworkInterfacesUpdateTagsOptionalParams, + NetworkInterfacesCreateOrUpdateOptionalParams, + NetworkInterfacesGetOptionalParams, + NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, + NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams, + NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, + NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams, +} from "./api/networkInterfaces/index.js"; +export type { + NetworkInterfaceTapConfigurationsListOptionalParams, + NetworkInterfaceTapConfigurationsDeleteOptionalParams, + NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, + NetworkInterfaceTapConfigurationsGetOptionalParams, +} from "./api/networkInterfaceTapConfigurations/index.js"; +export type { NetworkManagerCommitsPostOptionalParams } from "./api/networkManagerCommits/index.js"; +export type { NetworkManagerDeploymentStatusListOptionalParams } from "./api/networkManagerDeploymentStatus/index.js"; +export type { + NetworkManagerRoutingConfigurationsListOptionalParams, + NetworkManagerRoutingConfigurationsDeleteOptionalParams, + NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams, + NetworkManagerRoutingConfigurationsGetOptionalParams, +} from "./api/networkManagerRoutingConfigurations/index.js"; +export type { + NetworkManagersListBySubscriptionOptionalParams, + NetworkManagersListOptionalParams, + NetworkManagersDeleteOptionalParams, + NetworkManagersPatchOptionalParams, + NetworkManagersCreateOrUpdateOptionalParams, + NetworkManagersGetOptionalParams, +} from "./api/networkManagers/index.js"; +export type { + NetworkProfilesListAllOptionalParams, + NetworkProfilesListOptionalParams, + NetworkProfilesDeleteOptionalParams, + NetworkProfilesUpdateTagsOptionalParams, + NetworkProfilesCreateOrUpdateOptionalParams, + NetworkProfilesGetOptionalParams, +} from "./api/networkProfiles/index.js"; +export type { + NetworkSecurityGroupsListAllOptionalParams, + NetworkSecurityGroupsListOptionalParams, + NetworkSecurityGroupsDeleteOptionalParams, + NetworkSecurityGroupsUpdateTagsOptionalParams, + NetworkSecurityGroupsCreateOrUpdateOptionalParams, + NetworkSecurityGroupsGetOptionalParams, +} from "./api/networkSecurityGroups/index.js"; +export type { + NetworkSecurityPerimeterAccessRulesReconcileOptionalParams, + NetworkSecurityPerimeterAccessRulesListOptionalParams, + NetworkSecurityPerimeterAccessRulesDeleteOptionalParams, + NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterAccessRulesGetOptionalParams, +} from "./api/networkSecurityPerimeterAccessRules/index.js"; +export type { NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams } from "./api/networkSecurityPerimeterAssociableResourceTypes/index.js"; +export type { + NetworkSecurityPerimeterAssociationsReconcileOptionalParams, + NetworkSecurityPerimeterAssociationsListOptionalParams, + NetworkSecurityPerimeterAssociationsDeleteOptionalParams, + NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterAssociationsGetOptionalParams, +} from "./api/networkSecurityPerimeterAssociations/index.js"; +export type { + NetworkSecurityPerimeterLinkReferencesListOptionalParams, + NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, + NetworkSecurityPerimeterLinkReferencesGetOptionalParams, +} from "./api/networkSecurityPerimeterLinkReferences/index.js"; +export type { + NetworkSecurityPerimeterLinksListOptionalParams, + NetworkSecurityPerimeterLinksDeleteOptionalParams, + NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterLinksGetOptionalParams, +} from "./api/networkSecurityPerimeterLinks/index.js"; +export type { + NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams, +} from "./api/networkSecurityPerimeterLoggingConfigurations/index.js"; +export type { NetworkSecurityPerimeterOperationStatusesGetOptionalParams } from "./api/networkSecurityPerimeterOperationStatuses/index.js"; +export type { + NetworkSecurityPerimeterProfilesListOptionalParams, + NetworkSecurityPerimeterProfilesDeleteOptionalParams, + NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams, + NetworkSecurityPerimeterProfilesGetOptionalParams, +} from "./api/networkSecurityPerimeterProfiles/index.js"; +export type { + NetworkSecurityPerimetersListBySubscriptionOptionalParams, + NetworkSecurityPerimetersListOptionalParams, + NetworkSecurityPerimetersDeleteOptionalParams, + NetworkSecurityPerimetersPatchOptionalParams, + NetworkSecurityPerimetersCreateOrUpdateOptionalParams, + NetworkSecurityPerimetersGetOptionalParams, +} from "./api/networkSecurityPerimeters/index.js"; +export type { NetworkSecurityPerimeterServiceTagsListOptionalParams } from "./api/networkSecurityPerimeterServiceTags/index.js"; +export type { + NetworkVirtualApplianceConnectionsListOptionalParams, + NetworkVirtualApplianceConnectionsDeleteOptionalParams, + NetworkVirtualApplianceConnectionsGetOptionalParams, + NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, +} from "./api/networkVirtualApplianceConnections/index.js"; +export type { + NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, + NetworkVirtualAppliancesReimageOptionalParams, + NetworkVirtualAppliancesRestartOptionalParams, + NetworkVirtualAppliancesListOptionalParams, + NetworkVirtualAppliancesListByResourceGroupOptionalParams, + NetworkVirtualAppliancesDeleteOptionalParams, + NetworkVirtualAppliancesUpdateTagsOptionalParams, + NetworkVirtualAppliancesCreateOrUpdateOptionalParams, + NetworkVirtualAppliancesGetOptionalParams, +} from "./api/networkVirtualAppliances/index.js"; +export type { + NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, + NetworkWatchersListAvailableProvidersOptionalParams, + NetworkWatchersGetAzureReachabilityReportOptionalParams, + NetworkWatchersCheckConnectivityOptionalParams, + NetworkWatchersGetFlowLogStatusOptionalParams, + NetworkWatchersSetFlowLogConfigurationOptionalParams, + NetworkWatchersGetTroubleshootingResultOptionalParams, + NetworkWatchersGetTroubleshootingOptionalParams, + NetworkWatchersGetVMSecurityRulesOptionalParams, + NetworkWatchersGetNextHopOptionalParams, + NetworkWatchersVerifyIPFlowOptionalParams, + NetworkWatchersGetTopologyOptionalParams, + NetworkWatchersListAllOptionalParams, + NetworkWatchersListOptionalParams, + NetworkWatchersDeleteOptionalParams, + NetworkWatchersUpdateTagsOptionalParams, + NetworkWatchersCreateOrUpdateOptionalParams, + NetworkWatchersGetOptionalParams, +} from "./api/networkWatchers/index.js"; +export type { OperationsListOptionalParams } from "./api/operations/index.js"; +export type { + P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, + P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, + P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, + P2SVpnGatewaysGenerateVpnProfileOptionalParams, + P2SVpnGatewaysResetOptionalParams, + P2SVpnGatewaysListOptionalParams, + P2SVpnGatewaysListByResourceGroupOptionalParams, + P2SVpnGatewaysDeleteOptionalParams, + P2SVpnGatewaysUpdateTagsOptionalParams, + P2SVpnGatewaysCreateOrUpdateOptionalParams, + P2SVpnGatewaysGetOptionalParams, +} from "./api/p2SVpnGateways/index.js"; +export type { + PacketCapturesListOptionalParams, + PacketCapturesGetStatusOptionalParams, + PacketCapturesStopOptionalParams, + PacketCapturesDeleteOptionalParams, + PacketCapturesGetOptionalParams, + PacketCapturesCreateOptionalParams, +} from "./api/packetCaptures/index.js"; +export type { + PeerExpressRouteCircuitConnectionsListOptionalParams, + PeerExpressRouteCircuitConnectionsGetOptionalParams, +} from "./api/peerExpressRouteCircuitConnections/index.js"; +export type { + PrivateDnsZoneGroupsListOptionalParams, + PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, + PrivateDnsZoneGroupsGetOptionalParams, + PrivateDnsZoneGroupsDeleteOptionalParams, +} from "./api/privateDnsZoneGroups/index.js"; +export type { + PrivateEndpointsListBySubscriptionOptionalParams, + PrivateEndpointsListOptionalParams, + PrivateEndpointsDeleteOptionalParams, + PrivateEndpointsCreateOrUpdateOptionalParams, + PrivateEndpointsGetOptionalParams, +} from "./api/privateEndpoints/index.js"; +export type { + PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, + PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, + PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, + PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, + PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, + PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, + PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams, + PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams, + PrivateLinkServicesListBySubscriptionOptionalParams, + PrivateLinkServicesListOptionalParams, + PrivateLinkServicesDeleteOptionalParams, + PrivateLinkServicesCreateOrUpdateOptionalParams, + PrivateLinkServicesGetOptionalParams, +} from "./api/privateLinkServices/index.js"; +export type { + PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, + PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, + PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, + PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, + PublicIPAddressesDdosProtectionStatusOptionalParams, + PublicIPAddressesListAllOptionalParams, + PublicIPAddressesListOptionalParams, + PublicIPAddressesDeleteOptionalParams, + PublicIPAddressesUpdateTagsOptionalParams, + PublicIPAddressesCreateOrUpdateOptionalParams, + PublicIPAddressesGetOptionalParams, + PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, + PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams, + PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, + PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams, +} from "./api/publicIPAddresses/index.js"; +export type { + PublicIPPrefixesListAllOptionalParams, + PublicIPPrefixesListOptionalParams, + PublicIPPrefixesDeleteOptionalParams, + PublicIPPrefixesUpdateTagsOptionalParams, + PublicIPPrefixesCreateOrUpdateOptionalParams, + PublicIPPrefixesGetOptionalParams, +} from "./api/publicIPPrefixes/index.js"; +export type { + ReachabilityAnalysisIntentsListOptionalParams, + ReachabilityAnalysisIntentsDeleteOptionalParams, + ReachabilityAnalysisIntentsCreateOptionalParams, + ReachabilityAnalysisIntentsGetOptionalParams, +} from "./api/reachabilityAnalysisIntents/index.js"; +export type { + ReachabilityAnalysisRunsListOptionalParams, + ReachabilityAnalysisRunsDeleteOptionalParams, + ReachabilityAnalysisRunsCreateOptionalParams, + ReachabilityAnalysisRunsGetOptionalParams, +} from "./api/reachabilityAnalysisRuns/index.js"; +export type { ResourceNavigationLinksListOptionalParams } from "./api/resourceNavigationLinks/index.js"; +export type { + RouteFilterRulesListByRouteFilterOptionalParams, + RouteFilterRulesCreateOrUpdateOptionalParams, + RouteFilterRulesGetOptionalParams, + RouteFilterRulesDeleteOptionalParams, +} from "./api/routeFilterRules/index.js"; +export type { + RouteFiltersListOptionalParams, + RouteFiltersListByResourceGroupOptionalParams, + RouteFiltersDeleteOptionalParams, + RouteFiltersUpdateTagsOptionalParams, + RouteFiltersCreateOrUpdateOptionalParams, + RouteFiltersGetOptionalParams, +} from "./api/routeFilters/index.js"; +export type { + RouteMapsListOptionalParams, + RouteMapsDeleteOptionalParams, + RouteMapsCreateOrUpdateOptionalParams, + RouteMapsGetOptionalParams, +} from "./api/routeMaps/index.js"; +export type { + RoutesListOptionalParams, + RoutesDeleteOptionalParams, + RoutesCreateOrUpdateOptionalParams, + RoutesGetOptionalParams, +} from "./api/routes/index.js"; +export type { + RouteTablesListAllOptionalParams, + RouteTablesListOptionalParams, + RouteTablesDeleteOptionalParams, + RouteTablesUpdateTagsOptionalParams, + RouteTablesCreateOrUpdateOptionalParams, + RouteTablesGetOptionalParams, +} from "./api/routeTables/index.js"; +export type { + RoutingIntentListOptionalParams, + RoutingIntentDeleteOptionalParams, + RoutingIntentCreateOrUpdateOptionalParams, + RoutingIntentGetOptionalParams, +} from "./api/routingIntent/index.js"; +export type { + RoutingRuleCollectionsListOptionalParams, + RoutingRuleCollectionsDeleteOptionalParams, + RoutingRuleCollectionsCreateOrUpdateOptionalParams, + RoutingRuleCollectionsGetOptionalParams, +} from "./api/routingRuleCollections/index.js"; +export type { + RoutingRulesListOptionalParams, + RoutingRulesDeleteOptionalParams, + RoutingRulesCreateOrUpdateOptionalParams, + RoutingRulesGetOptionalParams, +} from "./api/routingRules/index.js"; +export type { + ScopeConnectionsListOptionalParams, + ScopeConnectionsDeleteOptionalParams, + ScopeConnectionsCreateOrUpdateOptionalParams, + ScopeConnectionsGetOptionalParams, +} from "./api/scopeConnections/index.js"; +export type { + SecurityAdminConfigurationsListOptionalParams, + SecurityAdminConfigurationsDeleteOptionalParams, + SecurityAdminConfigurationsCreateOrUpdateOptionalParams, + SecurityAdminConfigurationsGetOptionalParams, +} from "./api/securityAdminConfigurations/index.js"; +export type { + SecurityPartnerProvidersListOptionalParams, + SecurityPartnerProvidersListByResourceGroupOptionalParams, + SecurityPartnerProvidersDeleteOptionalParams, + SecurityPartnerProvidersUpdateTagsOptionalParams, + SecurityPartnerProvidersCreateOrUpdateOptionalParams, + SecurityPartnerProvidersGetOptionalParams, +} from "./api/securityPartnerProviders/index.js"; +export type { + SecurityRulesListOptionalParams, + SecurityRulesDeleteOptionalParams, + SecurityRulesCreateOrUpdateOptionalParams, + SecurityRulesGetOptionalParams, +} from "./api/securityRules/index.js"; +export type { + SecurityUserConfigurationsListOptionalParams, + SecurityUserConfigurationsDeleteOptionalParams, + SecurityUserConfigurationsCreateOrUpdateOptionalParams, + SecurityUserConfigurationsGetOptionalParams, +} from "./api/securityUserConfigurations/index.js"; +export type { + SecurityUserRuleCollectionsListOptionalParams, + SecurityUserRuleCollectionsDeleteOptionalParams, + SecurityUserRuleCollectionsCreateOrUpdateOptionalParams, + SecurityUserRuleCollectionsGetOptionalParams, +} from "./api/securityUserRuleCollections/index.js"; +export type { + SecurityUserRulesListOptionalParams, + SecurityUserRulesDeleteOptionalParams, + SecurityUserRulesCreateOrUpdateOptionalParams, + SecurityUserRulesGetOptionalParams, +} from "./api/securityUserRules/index.js"; +export type { ServiceAssociationLinksListOptionalParams } from "./api/serviceAssociationLinks/index.js"; +export type { + ServiceEndpointPoliciesListOptionalParams, + ServiceEndpointPoliciesListByResourceGroupOptionalParams, + ServiceEndpointPoliciesDeleteOptionalParams, + ServiceEndpointPoliciesUpdateTagsOptionalParams, + ServiceEndpointPoliciesCreateOrUpdateOptionalParams, + ServiceEndpointPoliciesGetOptionalParams, +} from "./api/serviceEndpointPolicies/index.js"; +export type { + ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, + ServiceEndpointPolicyDefinitionsDeleteOptionalParams, + ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, + ServiceEndpointPolicyDefinitionsGetOptionalParams, +} from "./api/serviceEndpointPolicyDefinitions/index.js"; +export type { + ServiceGatewaysListServicesOptionalParams, + ServiceGatewaysListAddressLocationsOptionalParams, + ServiceGatewaysUpdateServicesOptionalParams, + ServiceGatewaysUpdateAddressLocationsOptionalParams, + ServiceGatewaysListAllOptionalParams, + ServiceGatewaysListOptionalParams, + ServiceGatewaysDeleteOptionalParams, + ServiceGatewaysUpdateTagsOptionalParams, + ServiceGatewaysCreateOrUpdateOptionalParams, + ServiceGatewaysGetOptionalParams, +} from "./api/serviceGateways/index.js"; +export type { ServiceTagInformationListOptionalParams } from "./api/serviceTagInformation/index.js"; +export type { ServiceTagsListOptionalParams } from "./api/serviceTags/index.js"; +export type { + StaticCidrsListOptionalParams, + StaticCidrsDeleteOptionalParams, + StaticCidrsCreateOptionalParams, + StaticCidrsGetOptionalParams, +} from "./api/staticCidrs/index.js"; +export type { + StaticMembersListOptionalParams, + StaticMembersDeleteOptionalParams, + StaticMembersCreateOrUpdateOptionalParams, + StaticMembersGetOptionalParams, +} from "./api/staticMembers/index.js"; +export type { + SubgroupsListOptionalParams, + SubgroupsGetOptionalParams, +} from "./api/subgroups/index.js"; +export type { + SubnetsUnprepareNetworkPoliciesOptionalParams, + SubnetsPrepareNetworkPoliciesOptionalParams, + SubnetsListOptionalParams, + SubnetsDeleteOptionalParams, + SubnetsCreateOrUpdateOptionalParams, + SubnetsGetOptionalParams, +} from "./api/subnets/index.js"; +export type { + SubscriptionNetworkManagerConnectionsListOptionalParams, + SubscriptionNetworkManagerConnectionsDeleteOptionalParams, + SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams, + SubscriptionNetworkManagerConnectionsGetOptionalParams, +} from "./api/subscriptionNetworkManagerConnections/index.js"; +export type { UsagesListOptionalParams } from "./api/usages/index.js"; +export type { + VerifierWorkspacesListOptionalParams, + VerifierWorkspacesDeleteOptionalParams, + VerifierWorkspacesUpdateOptionalParams, + VerifierWorkspacesCreateOptionalParams, + VerifierWorkspacesGetOptionalParams, +} from "./api/verifierWorkspaces/index.js"; +export type { + VipSwapListOptionalParams, + VipSwapCreateOptionalParams, + VipSwapGetOptionalParams, +} from "./api/vipSwap/index.js"; +export type { + VirtualApplianceSitesListOptionalParams, + VirtualApplianceSitesDeleteOptionalParams, + VirtualApplianceSitesCreateOrUpdateOptionalParams, + VirtualApplianceSitesGetOptionalParams, +} from "./api/virtualApplianceSites/index.js"; +export type { + VirtualApplianceSkusListOptionalParams, + VirtualApplianceSkusGetOptionalParams, +} from "./api/virtualApplianceSkus/index.js"; +export type { + VirtualHubBgpConnectionDeleteOptionalParams, + VirtualHubBgpConnectionCreateOrUpdateOptionalParams, + VirtualHubBgpConnectionGetOptionalParams, +} from "./api/virtualHubBgpConnection/index.js"; +export type { + VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, + VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, + VirtualHubBgpConnectionsListOptionalParams, +} from "./api/virtualHubBgpConnections/index.js"; +export type { + VirtualHubIpConfigurationListOptionalParams, + VirtualHubIpConfigurationDeleteOptionalParams, + VirtualHubIpConfigurationCreateOrUpdateOptionalParams, + VirtualHubIpConfigurationGetOptionalParams, +} from "./api/virtualHubIpConfiguration/index.js"; +export type { + VirtualHubRouteTableV2SListOptionalParams, + VirtualHubRouteTableV2SDeleteOptionalParams, + VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, + VirtualHubRouteTableV2SGetOptionalParams, +} from "./api/virtualHubRouteTableV2S/index.js"; +export type { + VirtualHubsGetOutboundRoutesOptionalParams, + VirtualHubsGetInboundRoutesOptionalParams, + VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, + VirtualHubsListOptionalParams, + VirtualHubsListByResourceGroupOptionalParams, + VirtualHubsDeleteOptionalParams, + VirtualHubsUpdateTagsOptionalParams, + VirtualHubsCreateOrUpdateOptionalParams, + VirtualHubsGetOptionalParams, +} from "./api/virtualHubs/index.js"; +export type { + VirtualNetworkAppliancesListAllOptionalParams, + VirtualNetworkAppliancesListOptionalParams, + VirtualNetworkAppliancesDeleteOptionalParams, + VirtualNetworkAppliancesUpdateTagsOptionalParams, + VirtualNetworkAppliancesCreateOrUpdateOptionalParams, + VirtualNetworkAppliancesGetOptionalParams, +} from "./api/virtualNetworkAppliances/index.js"; +export type { + VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, + VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, + VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, + VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, + VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, + VirtualNetworkGatewayConnectionsListOptionalParams, + VirtualNetworkGatewayConnectionsDeleteOptionalParams, + VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, + VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, + VirtualNetworkGatewayConnectionsGetOptionalParams, +} from "./api/virtualNetworkGatewayConnections/index.js"; +export type { + VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, + VirtualNetworkGatewayNatRulesDeleteOptionalParams, + VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, + VirtualNetworkGatewayNatRulesGetOptionalParams, +} from "./api/virtualNetworkGatewayNatRules/index.js"; +export type { + VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams, + VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, + VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, + VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, + VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, + VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, + VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + VirtualNetworkGatewaysStopPacketCaptureOptionalParams, + VirtualNetworkGatewaysStartPacketCaptureOptionalParams, + VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, + VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, + VirtualNetworkGatewaysGetRoutesInformationOptionalParams, + VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, + VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, + VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, + VirtualNetworkGatewaysListRadiusSecretsOptionalParams, + VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams, + VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, + VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, + VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, + VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, + VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, + VirtualNetworkGatewaysResetOptionalParams, + VirtualNetworkGatewaysListConnectionsOptionalParams, + VirtualNetworkGatewaysListOptionalParams, + VirtualNetworkGatewaysDeleteOptionalParams, + VirtualNetworkGatewaysUpdateTagsOptionalParams, + VirtualNetworkGatewaysCreateOrUpdateOptionalParams, + VirtualNetworkGatewaysGetOptionalParams, +} from "./api/virtualNetworkGateways/index.js"; +export type { + VirtualNetworkPeeringsListOptionalParams, + VirtualNetworkPeeringsDeleteOptionalParams, + VirtualNetworkPeeringsCreateOrUpdateOptionalParams, + VirtualNetworkPeeringsGetOptionalParams, +} from "./api/virtualNetworkPeerings/index.js"; +export type { + VirtualNetworksListDdosProtectionStatusOptionalParams, + VirtualNetworksListUsageOptionalParams, + VirtualNetworksCheckIPAddressAvailabilityOptionalParams, + VirtualNetworksListAllOptionalParams, + VirtualNetworksListOptionalParams, + VirtualNetworksDeleteOptionalParams, + VirtualNetworksUpdateTagsOptionalParams, + VirtualNetworksCreateOrUpdateOptionalParams, + VirtualNetworksGetOptionalParams, +} from "./api/virtualNetworks/index.js"; +export type { + VirtualNetworkTapsListAllOptionalParams, + VirtualNetworkTapsListByResourceGroupOptionalParams, + VirtualNetworkTapsDeleteOptionalParams, + VirtualNetworkTapsUpdateTagsOptionalParams, + VirtualNetworkTapsCreateOrUpdateOptionalParams, + VirtualNetworkTapsGetOptionalParams, +} from "./api/virtualNetworkTaps/index.js"; +export type { + VirtualRouterPeeringsListOptionalParams, + VirtualRouterPeeringsDeleteOptionalParams, + VirtualRouterPeeringsCreateOrUpdateOptionalParams, + VirtualRouterPeeringsGetOptionalParams, +} from "./api/virtualRouterPeerings/index.js"; +export type { + VirtualRoutersListOptionalParams, + VirtualRoutersListByResourceGroupOptionalParams, + VirtualRoutersDeleteOptionalParams, + VirtualRoutersCreateOrUpdateOptionalParams, + VirtualRoutersGetOptionalParams, +} from "./api/virtualRouters/index.js"; +export type { + VirtualWansListOptionalParams, + VirtualWansListByResourceGroupOptionalParams, + VirtualWansDeleteOptionalParams, + VirtualWansUpdateTagsOptionalParams, + VirtualWansCreateOrUpdateOptionalParams, + VirtualWansGetOptionalParams, +} from "./api/virtualWans/index.js"; +export type { + VpnConnectionsListByVpnGatewayOptionalParams, + VpnConnectionsStopPacketCaptureOptionalParams, + VpnConnectionsStartPacketCaptureOptionalParams, + VpnConnectionsDeleteOptionalParams, + VpnConnectionsCreateOrUpdateOptionalParams, + VpnConnectionsGetOptionalParams, +} from "./api/vpnConnections/index.js"; +export type { + VpnGatewaysStopPacketCaptureOptionalParams, + VpnGatewaysStartPacketCaptureOptionalParams, + VpnGatewaysResetOptionalParams, + VpnGatewaysListOptionalParams, + VpnGatewaysListByResourceGroupOptionalParams, + VpnGatewaysDeleteOptionalParams, + VpnGatewaysUpdateTagsOptionalParams, + VpnGatewaysCreateOrUpdateOptionalParams, + VpnGatewaysGetOptionalParams, +} from "./api/vpnGateways/index.js"; +export type { + VpnLinkConnectionsGetIkeSasOptionalParams, + VpnLinkConnectionsResetConnectionOptionalParams, + VpnLinkConnectionsListByVpnConnectionOptionalParams, + VpnLinkConnectionsListDefaultSharedKeyOptionalParams, + VpnLinkConnectionsListAllSharedKeysOptionalParams, + VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, + VpnLinkConnectionsGetDefaultSharedKeyOptionalParams, +} from "./api/vpnLinkConnections/index.js"; +export type { + VpnServerConfigurationsListRadiusSecretsOptionalParams, + VpnServerConfigurationsListOptionalParams, + VpnServerConfigurationsListByResourceGroupOptionalParams, + VpnServerConfigurationsDeleteOptionalParams, + VpnServerConfigurationsUpdateTagsOptionalParams, + VpnServerConfigurationsCreateOrUpdateOptionalParams, + VpnServerConfigurationsGetOptionalParams, +} from "./api/vpnServerConfigurations/index.js"; +export type { VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams } from "./api/vpnServerConfigurationsAssociatedWithVirtualWan/index.js"; +export type { VpnSiteLinkConnectionsGetOptionalParams } from "./api/vpnSiteLinkConnections/index.js"; +export type { + VpnSiteLinksListByVpnSiteOptionalParams, + VpnSiteLinksGetOptionalParams, +} from "./api/vpnSiteLinks/index.js"; +export type { + VpnSitesListOptionalParams, + VpnSitesListByResourceGroupOptionalParams, + VpnSitesDeleteOptionalParams, + VpnSitesUpdateTagsOptionalParams, + VpnSitesCreateOrUpdateOptionalParams, + VpnSitesGetOptionalParams, +} from "./api/vpnSites/index.js"; +export type { VpnSitesConfigurationDownloadOptionalParams } from "./api/vpnSitesConfiguration/index.js"; +export type { + WebApplicationFirewallPoliciesListAllOptionalParams, + WebApplicationFirewallPoliciesListOptionalParams, + WebApplicationFirewallPoliciesDeleteOptionalParams, + WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams, + WebApplicationFirewallPoliciesGetOptionalParams, +} from "./api/webApplicationFirewallPolicies/index.js"; +export type { + WebCategoriesListBySubscriptionOptionalParams, + WebCategoriesGetOptionalParams, +} from "./api/webCategories/index.js"; +export type { + AdminRuleCollectionsOperations, + AdminRulesOperations, + ApplicationGatewayPrivateEndpointConnectionsOperations, + ApplicationGatewayPrivateLinkResourcesOperations, + ApplicationGatewaysOperations, + ApplicationGatewayWafDynamicManifestsOperations, + ApplicationGatewayWafDynamicManifestsDefaultOperations, + ApplicationSecurityGroupsOperations, + AvailableDelegationsOperations, + AvailableEndpointServicesOperations, + AvailablePrivateEndpointTypesOperations, + AvailableResourceGroupDelegationsOperations, + AvailableServiceAliasesOperations, + AzureFirewallFqdnTagsOperations, + AzureFirewallsOperations, + BastionHostsOperations, + BgpServiceCommunitiesOperations, + CommitsOperations, + ConfigurationPolicyGroupsOperations, + ConnectionMonitorsOperations, + ConnectionPoliciesOperations, + ConnectivityConfigurationsOperations, + CustomIPPrefixesOperations, + DdosCustomPoliciesOperations, + DdosProtectionPlansOperations, + DefaultSecurityRulesOperations, + DscpConfigurationOperations, + ExpressRouteCircuitAuthorizationsOperations, + ExpressRouteCircuitConnectionsOperations, + ExpressRouteCircuitPeeringsOperations, + ExpressRouteCircuitsOperations, + ExpressRouteConnectionsOperations, + ExpressRouteCrossConnectionPeeringsOperations, + ExpressRouteCrossConnectionsOperations, + ExpressRouteGatewaysOperations, + ExpressRouteLinksOperations, + ExpressRoutePortAuthorizationsOperations, + ExpressRoutePortsOperations, + ExpressRoutePortsLocationsOperations, + ExpressRouteProviderPortsLocationOperations, + ExpressRouteServiceProvidersOperations, + FirewallPoliciesOperations, + FirewallPolicyDeploymentsOperations, + FirewallPolicyDraftsOperations, + FirewallPolicyIdpsSignaturesOperations, + FirewallPolicyIdpsSignaturesFilterValuesOperations, + FirewallPolicyIdpsSignaturesOverridesOperations, + FirewallPolicyRuleCollectionGroupDraftsOperations, + FirewallPolicyRuleCollectionGroupsOperations, + FlowLogsOperations, + HubRouteTablesOperations, + HubVirtualNetworkConnectionsOperations, + InboundNatRulesOperations, + InboundSecurityRuleOperations, + InterconnectGroupsOperations, + IpAllocationsOperations, + IpamPoolsOperations, + IpGroupsOperations, + LoadBalancerBackendAddressPoolsOperations, + LoadBalancerFrontendIPConfigurationsOperations, + LoadBalancerLoadBalancingRulesOperations, + LoadBalancerNetworkInterfacesOperations, + LoadBalancerOutboundRulesOperations, + LoadBalancerProbesOperations, + LoadBalancersOperations, + LocalNetworkGatewaysOperations, + ManagementGroupNetworkManagerConnectionsOperations, + NatGatewaysOperations, + NatRulesOperations, + NetworkGroupsOperations, + NetworkInterfaceIPConfigurationsOperations, + NetworkInterfaceLoadBalancersOperations, + NetworkInterfacesOperations, + NetworkInterfaceTapConfigurationsOperations, + NetworkManagerCommitsOperations, + NetworkManagerDeploymentStatusOperations, + NetworkManagerRoutingConfigurationsOperations, + NetworkManagersOperations, + NetworkProfilesOperations, + NetworkSecurityGroupsOperations, + NetworkSecurityPerimeterAccessRulesOperations, + NetworkSecurityPerimeterAssociableResourceTypesOperations, + NetworkSecurityPerimeterAssociationsOperations, + NetworkSecurityPerimeterLinkReferencesOperations, + NetworkSecurityPerimeterLinksOperations, + NetworkSecurityPerimeterLoggingConfigurationsOperations, + NetworkSecurityPerimeterOperationStatusesOperations, + NetworkSecurityPerimeterProfilesOperations, + NetworkSecurityPerimetersOperations, + NetworkSecurityPerimeterServiceTagsOperations, + NetworkVirtualApplianceConnectionsOperations, + NetworkVirtualAppliancesOperations, + NetworkWatchersOperations, + OperationsOperations, + P2SVpnGatewaysOperations, + PacketCapturesOperations, + PeerExpressRouteCircuitConnectionsOperations, + PrivateDnsZoneGroupsOperations, + PrivateEndpointsOperations, + PrivateLinkServicesOperations, + PublicIPAddressesOperations, + PublicIPPrefixesOperations, + ReachabilityAnalysisIntentsOperations, + ReachabilityAnalysisRunsOperations, + ResourceNavigationLinksOperations, + RouteFilterRulesOperations, + RouteFiltersOperations, + RouteMapsOperations, + RoutesOperations, + RouteTablesOperations, + RoutingIntentOperations, + RoutingRuleCollectionsOperations, + RoutingRulesOperations, + ScopeConnectionsOperations, + SecurityAdminConfigurationsOperations, + SecurityPartnerProvidersOperations, + SecurityRulesOperations, + SecurityUserConfigurationsOperations, + SecurityUserRuleCollectionsOperations, + SecurityUserRulesOperations, + ServiceAssociationLinksOperations, + ServiceEndpointPoliciesOperations, + ServiceEndpointPolicyDefinitionsOperations, + ServiceGatewaysOperations, + ServiceTagInformationOperations, + ServiceTagsOperations, + StaticCidrsOperations, + StaticMembersOperations, + SubgroupsOperations, + SubnetsOperations, + SubscriptionNetworkManagerConnectionsOperations, + UsagesOperations, + VerifierWorkspacesOperations, + VipSwapOperations, + VirtualApplianceSitesOperations, + VirtualApplianceSkusOperations, + VirtualHubBgpConnectionOperations, + VirtualHubBgpConnectionsOperations, + VirtualHubIpConfigurationOperations, + VirtualHubRouteTableV2SOperations, + VirtualHubsOperations, + VirtualNetworkAppliancesOperations, + VirtualNetworkGatewayConnectionsOperations, + VirtualNetworkGatewayNatRulesOperations, + VirtualNetworkGatewaysOperations, + VirtualNetworkPeeringsOperations, + VirtualNetworksOperations, + VirtualNetworkTapsOperations, + VirtualRouterPeeringsOperations, + VirtualRoutersOperations, + VirtualWansOperations, + VpnConnectionsOperations, + VpnGatewaysOperations, + VpnLinkConnectionsOperations, + VpnServerConfigurationsOperations, + VpnServerConfigurationsAssociatedWithVirtualWanOperations, + VpnSiteLinkConnectionsOperations, + VpnSiteLinksOperations, + VpnSitesOperations, + VpnSitesConfigurationOperations, + WebApplicationFirewallPoliciesOperations, + WebCategoriesOperations, +} from "./classic/index.js"; +export type { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; +export { AzureClouds }; +export type { AzureSupportedClouds }; +export { RestError, isRestError } from "@azure/core-rest-pipeline"; diff --git a/sdk/network/arm-network/src/logger.ts b/sdk/network/arm-network/src/logger.ts new file mode 100644 index 000000000000..07a1c95daaa0 --- /dev/null +++ b/sdk/network/arm-network/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("arm-network"); diff --git a/sdk/network/arm-network/src/lroImpl.ts b/sdk/network/arm-network/src/lroImpl.ts deleted file mode 100644 index 064aab0f7c7f..000000000000 --- a/sdk/network/arm-network/src/lroImpl.ts +++ /dev/null @@ -1,34 +0,0 @@ -// 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 type { AbortSignalLike } from "@azure/abort-controller"; -import type { LongRunningOperation, LroResponse } from "@azure/core-lro"; - -export function createLroSpec(inputs: { - sendOperationFn: (args: any, spec: any) => Promise>; - args: Record; - spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record; -}): LongRunningOperation { - const { args, spec, sendOperationFn } = inputs; - return { - requestMethod: spec.httpMethod, - requestPath: spec.path!, - sendInitialRequest: () => sendOperationFn(args, spec), - sendPollRequest: (path: string, options?: { abortSignal?: AbortSignalLike }) => { - const { requestBody, ...restSpec } = spec; - return sendOperationFn(args, { - ...restSpec, - httpMethod: "GET", - path, - abortSignal: options?.abortSignal, - }); - }, - }; -} diff --git a/sdk/network/arm-network/src/models/common/index.ts b/sdk/network/arm-network/src/models/common/index.ts new file mode 100644 index 000000000000..0586cdeede9a --- /dev/null +++ b/sdk/network/arm-network/src/models/common/index.ts @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export type { + Resource, + CloudError, + CloudErrorBody, + CommonProvisioningState, + ApplicationGatewayIPConfiguration, + ApplicationGatewayIPConfigurationPropertiesFormat, + SubResource, + IPAllocationMethod, + ApplicationGatewayBackendAddressPool, + ApplicationGatewayBackendAddressPoolPropertiesFormat, + NetworkInterfaceIPConfiguration, + NetworkInterfaceIPConfigurationPropertiesFormat, + VirtualNetworkTap, + VirtualNetworkTapPropertiesFormat, + NetworkInterfaceTapConfiguration, + NetworkInterfaceTapConfigurationPropertiesFormat, + FrontendIPConfiguration, + FrontendIPConfigurationPropertiesFormat, + IPVersion, + Subnet, + SubnetPropertiesFormat, + NetworkSecurityGroup, + NetworkSecurityGroupPropertiesFormat, + SecurityRule, + SecurityRulePropertiesFormat, + SecurityRuleProtocol, + ApplicationSecurityGroup, + ApplicationSecurityGroupPropertiesFormat, + SecurityRuleAccess, + SecurityRuleDirection, + NetworkInterface, + NetworkInterfacePropertiesFormat, + PrivateEndpoint, + PrivateEndpointProperties, + PrivateEndpointIPVersionType, + PrivateLinkServiceConnection, + PrivateLinkServiceConnectionProperties, + PrivateLinkServiceConnectionState, + CustomDnsConfigPropertiesFormat, + PrivateEndpointIPConfiguration, + PrivateEndpointIPConfigurationProperties, + PrivateEndpointBillingSku, + ExtendedLocation, + ExtendedLocationTypes, + NetworkInterfaceDnsSettings, + NetworkInterfaceNicType, + PrivateLinkService, + PrivateLinkServiceProperties, + PrivateLinkServiceIpConfiguration, + PrivateLinkServiceIpConfigurationProperties, + AccessMode, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkServicePropertiesVisibility, + PrivateLinkServicePropertiesAutoApproval, + NetworkInterfaceMigrationPhase, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, + FlowLog, + FlowLogPropertiesFormat, + RetentionPolicyParameters, + FlowLogFormatParameters, + FlowLogFormatType, + TrafficAnalyticsProperties, + TrafficAnalyticsConfigurationProperties, + ManagedServiceIdentity, + ResourceIdentityType, + Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, + RouteTable, + RouteTablePropertiesFormat, + Route, + RoutePropertiesFormat, + RouteNextHopType, + RouteNextHopEcmp, + DisablePeeringRoute, + ServiceEndpointPropertiesFormat, + ServiceEndpointPolicy, + ServiceEndpointPolicyPropertiesFormat, + ServiceEndpointPolicyDefinition, + ServiceEndpointPolicyDefinitionPropertiesFormat, + IPConfiguration, + IPConfigurationPropertiesFormat, + PublicIPAddress, + PublicIPAddressPropertiesFormat, + PublicIPAddressDnsSettings, + PublicIpAddressDnsSettingsDomainNameLabelScope, + DdosSettings, + DdosSettingsProtectionMode, + IpTag, + NatGateway, + NatGatewayPropertiesFormat, + Nat64State, + NatGatewaySku, + NatGatewaySkuName, + PublicIPAddressMigrationPhase, + DeleteOptions, + PublicIPAddressSku, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + IPConfigurationProfile, + IPConfigurationProfilePropertiesFormat, + ResourceNavigationLink, + ResourceNavigationLinkFormat, + ServiceAssociationLink, + ServiceAssociationLinkPropertiesFormat, + Delegation, + ServiceDelegationPropertiesFormat, + VirtualNetworkPrivateEndpointNetworkPolicies, + VirtualNetworkPrivateLinkServiceNetworkPolicies, + SharingScope, + IpamPoolPrefixAllocation, + IpamPoolPrefixAllocationPool, + DdosFrontendIpConfigurationSettings, + BackendAddressPool, + BackendAddressPoolPropertiesFormat, + GatewayLoadBalancerTunnelInterface, + GatewayLoadBalancerTunnelProtocol, + GatewayLoadBalancerTunnelInterfaceType, + LoadBalancerBackendAddress, + LoadBalancerBackendAddressPropertiesFormat, + NatRulePortMapping, + LoadBalancerBackendAddressAdminState, + SyncMode, + InboundNatRule, + InboundNatRulePropertiesFormat, + TransportProtocol, + NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties, + ApplicationGatewayBackendAddress, + SubResourceModel, + ResourceSet, + LoadBalancer, + LoadBalancerPropertiesFormat, + LoadBalancingRule, + LoadBalancingRulePropertiesFormat, + LoadDistribution, + Probe, + ProbePropertiesFormat, + ProbeProtocol, + ProbeNoHealthyBackendsBehavior, + InboundNatPool, + InboundNatPoolPropertiesFormat, + OutboundRule, + OutboundRulePropertiesFormat, + LoadBalancerOutboundRuleProtocol, + LoadBalancerScope, + LoadBalancerSku, + LoadBalancerSkuName, + LoadBalancerSkuTier, + NetworkWatcher, + NetworkWatcherPropertiesFormat, + VirtualNetwork, + VirtualNetworkPropertiesFormat, + AddressSpace, + DhcpOptions, + VirtualNetworkPeering, + VirtualNetworkPeeringPropertiesFormat, + VirtualNetworkBgpCommunities, + VirtualNetworkEncryption, + VirtualNetworkEncryptionEnforcement, + VirtualNetworkPeeringState, + VirtualNetworkPeeringLevel, + PrivateEndpointVNetPolicies, +} from "./models.js"; +export { + KnownCommonProvisioningState, + KnownIPAllocationMethod, + KnownIPVersion, + KnownSecurityRuleProtocol, + KnownSecurityRuleAccess, + KnownSecurityRuleDirection, + KnownPrivateEndpointIPVersionType, + KnownPrivateEndpointBillingSku, + KnownExtendedLocationTypes, + KnownNetworkInterfaceNicType, + KnownAccessMode, + KnownNetworkInterfaceMigrationPhase, + KnownNetworkInterfaceAuxiliaryMode, + KnownNetworkInterfaceAuxiliarySku, + KnownFlowLogFormatType, + KnownRouteNextHopType, + KnownDisablePeeringRoute, + KnownDdosSettingsProtectionMode, + KnownNat64State, + KnownNatGatewaySkuName, + KnownPublicIPAddressMigrationPhase, + KnownDeleteOptions, + KnownPublicIPAddressSkuName, + KnownPublicIPAddressSkuTier, + KnownVirtualNetworkPrivateEndpointNetworkPolicies, + KnownVirtualNetworkPrivateLinkServiceNetworkPolicies, + KnownSharingScope, + KnownGatewayLoadBalancerTunnelProtocol, + KnownGatewayLoadBalancerTunnelInterfaceType, + KnownLoadBalancerBackendAddressAdminState, + KnownSyncMode, + KnownTransportProtocol, + KnownLoadDistribution, + KnownProbeProtocol, + KnownProbeNoHealthyBackendsBehavior, + KnownLoadBalancerOutboundRuleProtocol, + KnownLoadBalancerScope, + KnownLoadBalancerSkuName, + KnownLoadBalancerSkuTier, + KnownVirtualNetworkEncryptionEnforcement, + KnownVirtualNetworkPeeringState, + KnownVirtualNetworkPeeringLevel, + KnownPrivateEndpointVNetPolicies, +} from "./models.js"; diff --git a/sdk/network/arm-network/src/models/common/models.ts b/sdk/network/arm-network/src/models/common/models.ts new file mode 100644 index 000000000000..c982f1af78b9 --- /dev/null +++ b/sdk/network/arm-network/src/models/common/models.ts @@ -0,0 +1,8838 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { areAllPropsUndefined } from "../../static-helpers/serialization/check-prop-undefined.js"; + +/** + * This file contains only generated model types and their (de)serializers. + * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input. + */ +/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +/** Common resource representation. */ +export interface Resource { + /** Resource ID. */ + id?: string; + /** Resource name. */ + readonly name?: string; + /** Resource type. */ + readonly type?: string; + /** Resource location. */ + location?: string; + /** Resource tags. */ + tags?: Record; +} + +export function resourceSerializer(item: Resource): any { + return { id: item["id"], location: item["location"], tags: item["tags"] }; +} + +export function resourceDeserializer(item: any): Resource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + }; +} + +/** An error response from the service. */ +export interface CloudError { + /** Cloud error body. */ + error?: CloudErrorBody; +} + +export function cloudErrorDeserializer(item: any): CloudError { + return { + error: !item["error"] ? item["error"] : cloudErrorBodyDeserializer(item["error"]), + }; +} + +/** An error response from the service. */ +export interface CloudErrorBody { + /** An identifier for the error. Codes are invariant and are intended to be consumed programmatically. */ + code?: string; + /** A message describing the error, intended to be suitable for display in a user interface. */ + message?: string; + /** The target of the particular error. For example, the name of the property in error. */ + target?: string; + /** A list of additional details about the error. */ + details?: CloudErrorBody[]; +} + +export function cloudErrorBodyDeserializer(item: any): CloudErrorBody { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] ? item["details"] : cloudErrorBodyArrayDeserializer(item["details"]), + }; +} + +export function cloudErrorBodyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return cloudErrorBodyDeserializer(item); + }); +} + +/** Provisioning states of a resource. */ +export enum KnownCommonProvisioningState { + /** Failed */ + Failed = "Failed", + /** Succeeded */ + Succeeded = "Succeeded", + /** Canceled */ + Canceled = "Canceled", + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", +} + +/** + * Provisioning states of a resource. \ + * {@link KnownCommonProvisioningState} can be used interchangeably with CommonProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Failed**: Failed \ + * **Succeeded**: Succeeded \ + * **Canceled**: Canceled \ + * **Creating**: Creating \ + * **Updating**: Updating \ + * **Deleting**: Deleting + */ +export type CommonProvisioningState = string; + +export function applicationGatewayIPConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayIPConfigurationSerializer(item); + }); +} + +export function applicationGatewayIPConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayIPConfigurationDeserializer(item); + }); +} + +/** IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed. */ +export interface ApplicationGatewayIPConfiguration extends SubResource { + /** Name of the IP configuration that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Reference to the subnet resource. A subnet from where application gateway gets its private address. */ + subnet?: SubResource; + /** The provisioning state of the application gateway IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayIPConfigurationSerializer( + item: ApplicationGatewayIPConfiguration, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["subnet"]) + ? undefined + : _applicationGatewayIPConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayIPConfigurationDeserializer( + item: any, +): ApplicationGatewayIPConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayIPConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of IP configuration of an application gateway. */ +export interface ApplicationGatewayIPConfigurationPropertiesFormat { + /** Reference to the subnet resource. A subnet from where application gateway gets its private address. */ + subnet?: SubResource; + /** The provisioning state of the application gateway IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayIPConfigurationPropertiesFormatSerializer( + item: ApplicationGatewayIPConfigurationPropertiesFormat, +): any { + return { subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]) }; +} + +export function applicationGatewayIPConfigurationPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayIPConfigurationPropertiesFormat { + return { + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + provisioningState: item["provisioningState"], + }; +} + +/** Reference to another subresource. */ +export interface SubResource { + /** Resource ID. */ + id?: string; +} + +export function subResourceSerializer(item: SubResource): any { + return { id: item["id"] }; +} + +export function subResourceDeserializer(item: any): SubResource { + return { + id: item["id"], + }; +} + +/** IP address allocation method. */ +export enum KnownIPAllocationMethod { + /** Static */ + Static = "Static", + /** Dynamic */ + Dynamic = "Dynamic", +} + +/** + * IP address allocation method. \ + * {@link KnownIPAllocationMethod} can be used interchangeably with IPAllocationMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Static**: Static \ + * **Dynamic**: Dynamic + */ +export type IPAllocationMethod = string; + +export function applicationGatewayBackendAddressPoolArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayBackendAddressPoolSerializer(item); + }); +} + +export function applicationGatewayBackendAddressPoolArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayBackendAddressPoolDeserializer(item); + }); +} + +/** Backend Address Pool of an application gateway. */ +export interface ApplicationGatewayBackendAddressPool extends SubResource { + /** Name of the backend address pool that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Collection of references to IPs defined in network interfaces. */ + readonly backendIPConfigurations?: NetworkInterfaceIPConfiguration[]; + /** Backend addresses. */ + backendAddresses?: ApplicationGatewayBackendAddress[]; + /** The provisioning state of the backend address pool resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayBackendAddressPoolSerializer( + item: ApplicationGatewayBackendAddressPool, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["backendAddresses"]) + ? undefined + : _applicationGatewayBackendAddressPoolPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayBackendAddressPoolDeserializer( + item: any, +): ApplicationGatewayBackendAddressPool { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayBackendAddressPoolPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of Backend Address Pool of an application gateway. */ +export interface ApplicationGatewayBackendAddressPoolPropertiesFormat { + /** Collection of references to IPs defined in network interfaces. */ + readonly backendIPConfigurations?: NetworkInterfaceIPConfiguration[]; + /** Backend addresses. */ + backendAddresses?: ApplicationGatewayBackendAddress[]; + /** The provisioning state of the backend address pool resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayBackendAddressPoolPropertiesFormatSerializer( + item: ApplicationGatewayBackendAddressPoolPropertiesFormat, +): any { + return { + backendAddresses: !item["backendAddresses"] + ? item["backendAddresses"] + : applicationGatewayBackendAddressArraySerializer(item["backendAddresses"]), + }; +} + +export function applicationGatewayBackendAddressPoolPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayBackendAddressPoolPropertiesFormat { + return { + backendIPConfigurations: !item["backendIPConfigurations"] + ? item["backendIPConfigurations"] + : networkInterfaceIPConfigurationArrayDeserializer(item["backendIPConfigurations"]), + backendAddresses: !item["backendAddresses"] + ? item["backendAddresses"] + : applicationGatewayBackendAddressArrayDeserializer(item["backendAddresses"]), + provisioningState: item["provisioningState"], + }; +} + +export function networkInterfaceIPConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkInterfaceIPConfigurationSerializer(item); + }); +} + +export function networkInterfaceIPConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkInterfaceIPConfigurationDeserializer(item); + }); +} + +/** IPConfiguration in a network interface. */ +export interface NetworkInterfaceIPConfiguration extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The reference to gateway load balancer frontend IP. */ + gatewayLoadBalancer?: SubResource; + /** The reference to Virtual Network Taps. */ + virtualNetworkTaps?: VirtualNetworkTap[]; + /** The reference to ApplicationGatewayBackendAddressPool resource. */ + applicationGatewayBackendAddressPools?: ApplicationGatewayBackendAddressPool[]; + /** The reference to LoadBalancerBackendAddressPool resource. */ + loadBalancerBackendAddressPools?: BackendAddressPool[]; + /** A list of references of LoadBalancerInboundNatRules. */ + loadBalancerInboundNatRules?: InboundNatRule[]; + /** Private IP address of the IP configuration. It can be a single IP address or a CIDR block in the format
/. */ + privateIPAddress?: string; + /** The private IP address prefix length. If specified and the allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. */ + privateIPAddressPrefixLength?: number; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. */ + privateIPAddressVersion?: IPVersion; + /** Subnet bound to the IP configuration. */ + subnet?: Subnet; + /** Whether this is a primary customer address on the network interface. */ + primary?: boolean; + /** Public IP address bound to the IP configuration. */ + publicIPAddress?: PublicIPAddress; + /** Application security groups in which the IP configuration is included. */ + applicationSecurityGroups?: ApplicationSecurityGroup[]; + /** The provisioning state of the network interface IP configuration. */ + readonly provisioningState?: CommonProvisioningState; + /** PrivateLinkConnection properties for the network interface. */ + readonly privateLinkConnectionProperties?: NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties; +} + +export function networkInterfaceIPConfigurationSerializer( + item: NetworkInterfaceIPConfiguration, +): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "gatewayLoadBalancer", + "virtualNetworkTaps", + "applicationGatewayBackendAddressPools", + "loadBalancerBackendAddressPools", + "loadBalancerInboundNatRules", + "privateIPAddress", + "privateIPAddressPrefixLength", + "privateIPAllocationMethod", + "privateIPAddressVersion", + "subnet", + "primary", + "publicIPAddress", + "applicationSecurityGroups", + ]) + ? undefined + : _networkInterfaceIPConfigurationPropertiesSerializer(item), + }; +} + +export function networkInterfaceIPConfigurationDeserializer( + item: any, +): NetworkInterfaceIPConfiguration { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _networkInterfaceIPConfigurationPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of IP configuration. */ +export interface NetworkInterfaceIPConfigurationPropertiesFormat { + /** The reference to gateway load balancer frontend IP. */ + gatewayLoadBalancer?: SubResource; + /** The reference to Virtual Network Taps. */ + virtualNetworkTaps?: VirtualNetworkTap[]; + /** The reference to ApplicationGatewayBackendAddressPool resource. */ + applicationGatewayBackendAddressPools?: ApplicationGatewayBackendAddressPool[]; + /** The reference to LoadBalancerBackendAddressPool resource. */ + loadBalancerBackendAddressPools?: BackendAddressPool[]; + /** A list of references of LoadBalancerInboundNatRules. */ + loadBalancerInboundNatRules?: InboundNatRule[]; + /** Private IP address of the IP configuration. It can be a single IP address or a CIDR block in the format
/. */ + privateIPAddress?: string; + /** The private IP address prefix length. If specified and the allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. */ + privateIPAddressPrefixLength?: number; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. */ + privateIPAddressVersion?: IPVersion; + /** Subnet bound to the IP configuration. */ + subnet?: Subnet; + /** Whether this is a primary customer address on the network interface. */ + primary?: boolean; + /** Public IP address bound to the IP configuration. */ + publicIPAddress?: PublicIPAddress; + /** Application security groups in which the IP configuration is included. */ + applicationSecurityGroups?: ApplicationSecurityGroup[]; + /** The provisioning state of the network interface IP configuration. */ + readonly provisioningState?: CommonProvisioningState; + /** PrivateLinkConnection properties for the network interface. */ + readonly privateLinkConnectionProperties?: NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties; +} + +export function networkInterfaceIPConfigurationPropertiesFormatSerializer( + item: NetworkInterfaceIPConfigurationPropertiesFormat, +): any { + return { + gatewayLoadBalancer: !item["gatewayLoadBalancer"] + ? item["gatewayLoadBalancer"] + : subResourceSerializer(item["gatewayLoadBalancer"]), + virtualNetworkTaps: !item["virtualNetworkTaps"] + ? item["virtualNetworkTaps"] + : virtualNetworkTapArraySerializer(item["virtualNetworkTaps"]), + applicationGatewayBackendAddressPools: !item["applicationGatewayBackendAddressPools"] + ? item["applicationGatewayBackendAddressPools"] + : applicationGatewayBackendAddressPoolArraySerializer( + item["applicationGatewayBackendAddressPools"], + ), + loadBalancerBackendAddressPools: !item["loadBalancerBackendAddressPools"] + ? item["loadBalancerBackendAddressPools"] + : backendAddressPoolArraySerializer(item["loadBalancerBackendAddressPools"]), + loadBalancerInboundNatRules: !item["loadBalancerInboundNatRules"] + ? item["loadBalancerInboundNatRules"] + : inboundNatRuleArraySerializer(item["loadBalancerInboundNatRules"]), + privateIPAddress: item["privateIPAddress"], + privateIPAddressPrefixLength: item["privateIPAddressPrefixLength"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + privateIPAddressVersion: item["privateIPAddressVersion"], + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + primary: item["primary"], + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressSerializer(item["publicIPAddress"]), + applicationSecurityGroups: !item["applicationSecurityGroups"] + ? item["applicationSecurityGroups"] + : applicationSecurityGroupArraySerializer(item["applicationSecurityGroups"]), + }; +} + +export function networkInterfaceIPConfigurationPropertiesFormatDeserializer( + item: any, +): NetworkInterfaceIPConfigurationPropertiesFormat { + return { + gatewayLoadBalancer: !item["gatewayLoadBalancer"] + ? item["gatewayLoadBalancer"] + : subResourceDeserializer(item["gatewayLoadBalancer"]), + virtualNetworkTaps: !item["virtualNetworkTaps"] + ? item["virtualNetworkTaps"] + : virtualNetworkTapArrayDeserializer(item["virtualNetworkTaps"]), + applicationGatewayBackendAddressPools: !item["applicationGatewayBackendAddressPools"] + ? item["applicationGatewayBackendAddressPools"] + : applicationGatewayBackendAddressPoolArrayDeserializer( + item["applicationGatewayBackendAddressPools"], + ), + loadBalancerBackendAddressPools: !item["loadBalancerBackendAddressPools"] + ? item["loadBalancerBackendAddressPools"] + : backendAddressPoolArrayDeserializer(item["loadBalancerBackendAddressPools"]), + loadBalancerInboundNatRules: !item["loadBalancerInboundNatRules"] + ? item["loadBalancerInboundNatRules"] + : inboundNatRuleArrayDeserializer(item["loadBalancerInboundNatRules"]), + privateIPAddress: item["privateIPAddress"], + privateIPAddressPrefixLength: item["privateIPAddressPrefixLength"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + privateIPAddressVersion: item["privateIPAddressVersion"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + primary: item["primary"], + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressDeserializer(item["publicIPAddress"]), + applicationSecurityGroups: !item["applicationSecurityGroups"] + ? item["applicationSecurityGroups"] + : applicationSecurityGroupArrayDeserializer(item["applicationSecurityGroups"]), + provisioningState: item["provisioningState"], + privateLinkConnectionProperties: !item["privateLinkConnectionProperties"] + ? item["privateLinkConnectionProperties"] + : networkInterfaceIPConfigurationPrivateLinkConnectionPropertiesDeserializer( + item["privateLinkConnectionProperties"], + ), + }; +} + +export function virtualNetworkTapArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualNetworkTapSerializer(item); + }); +} + +export function virtualNetworkTapArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualNetworkTapDeserializer(item); + }); +} + +/** Virtual Network Tap resource. */ +export interface VirtualNetworkTap extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped. */ + readonly networkInterfaceTapConfigurations?: NetworkInterfaceTapConfiguration[]; + /** The resource GUID property of the virtual network tap resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the virtual network tap resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The reference to the private IP Address of the collector nic that will receive the tap. */ + destinationNetworkInterfaceIPConfiguration?: NetworkInterfaceIPConfiguration; + /** The reference to the private IP address on the internal Load Balancer that will receive the tap. */ + destinationLoadBalancerFrontEndIPConfiguration?: FrontendIPConfiguration; + /** The VXLAN destination port that will receive the tapped traffic. */ + destinationPort?: number; +} + +export function virtualNetworkTapSerializer(item: VirtualNetworkTap): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "destinationNetworkInterfaceIPConfiguration", + "destinationLoadBalancerFrontEndIPConfiguration", + "destinationPort", + ]) + ? undefined + : _virtualNetworkTapPropertiesSerializer(item), + }; +} + +export function virtualNetworkTapDeserializer(item: any): VirtualNetworkTap { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _virtualNetworkTapPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Virtual Network Tap properties. */ +export interface VirtualNetworkTapPropertiesFormat { + /** Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped. */ + readonly networkInterfaceTapConfigurations?: NetworkInterfaceTapConfiguration[]; + /** The resource GUID property of the virtual network tap resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the virtual network tap resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The reference to the private IP Address of the collector nic that will receive the tap. */ + destinationNetworkInterfaceIPConfiguration?: NetworkInterfaceIPConfiguration; + /** The reference to the private IP address on the internal Load Balancer that will receive the tap. */ + destinationLoadBalancerFrontEndIPConfiguration?: FrontendIPConfiguration; + /** The VXLAN destination port that will receive the tapped traffic. */ + destinationPort?: number; +} + +export function virtualNetworkTapPropertiesFormatSerializer( + item: VirtualNetworkTapPropertiesFormat, +): any { + return { + destinationNetworkInterfaceIPConfiguration: !item["destinationNetworkInterfaceIPConfiguration"] + ? item["destinationNetworkInterfaceIPConfiguration"] + : networkInterfaceIPConfigurationSerializer( + item["destinationNetworkInterfaceIPConfiguration"], + ), + destinationLoadBalancerFrontEndIPConfiguration: !item[ + "destinationLoadBalancerFrontEndIPConfiguration" + ] + ? item["destinationLoadBalancerFrontEndIPConfiguration"] + : frontendIPConfigurationSerializer(item["destinationLoadBalancerFrontEndIPConfiguration"]), + destinationPort: item["destinationPort"], + }; +} + +export function virtualNetworkTapPropertiesFormatDeserializer( + item: any, +): VirtualNetworkTapPropertiesFormat { + return { + networkInterfaceTapConfigurations: !item["networkInterfaceTapConfigurations"] + ? item["networkInterfaceTapConfigurations"] + : networkInterfaceTapConfigurationArrayDeserializer( + item["networkInterfaceTapConfigurations"], + ), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + destinationNetworkInterfaceIPConfiguration: !item["destinationNetworkInterfaceIPConfiguration"] + ? item["destinationNetworkInterfaceIPConfiguration"] + : networkInterfaceIPConfigurationDeserializer( + item["destinationNetworkInterfaceIPConfiguration"], + ), + destinationLoadBalancerFrontEndIPConfiguration: !item[ + "destinationLoadBalancerFrontEndIPConfiguration" + ] + ? item["destinationLoadBalancerFrontEndIPConfiguration"] + : frontendIPConfigurationDeserializer(item["destinationLoadBalancerFrontEndIPConfiguration"]), + destinationPort: item["destinationPort"], + }; +} + +export function networkInterfaceTapConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkInterfaceTapConfigurationSerializer(item); + }); +} + +export function networkInterfaceTapConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkInterfaceTapConfigurationDeserializer(item); + }); +} + +/** Tap configuration in a Network Interface. */ +export interface NetworkInterfaceTapConfiguration extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The reference to the Virtual Network Tap resource. */ + virtualNetworkTap?: VirtualNetworkTap; + /** The provisioning state of the network interface tap configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function networkInterfaceTapConfigurationSerializer( + item: NetworkInterfaceTapConfiguration, +): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["virtualNetworkTap"]) + ? undefined + : _networkInterfaceTapConfigurationPropertiesSerializer(item), + }; +} + +export function networkInterfaceTapConfigurationDeserializer( + item: any, +): NetworkInterfaceTapConfiguration { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _networkInterfaceTapConfigurationPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of Virtual Network Tap configuration. */ +export interface NetworkInterfaceTapConfigurationPropertiesFormat { + /** The reference to the Virtual Network Tap resource. */ + virtualNetworkTap?: VirtualNetworkTap; + /** The provisioning state of the network interface tap configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function networkInterfaceTapConfigurationPropertiesFormatSerializer( + item: NetworkInterfaceTapConfigurationPropertiesFormat, +): any { + return { + virtualNetworkTap: !item["virtualNetworkTap"] + ? item["virtualNetworkTap"] + : virtualNetworkTapSerializer(item["virtualNetworkTap"]), + }; +} + +export function networkInterfaceTapConfigurationPropertiesFormatDeserializer( + item: any, +): NetworkInterfaceTapConfigurationPropertiesFormat { + return { + virtualNetworkTap: !item["virtualNetworkTap"] + ? item["virtualNetworkTap"] + : virtualNetworkTapDeserializer(item["virtualNetworkTap"]), + provisioningState: item["provisioningState"], + }; +} + +/** Frontend IP address of the load balancer. */ +export interface FrontendIPConfiguration extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** A list of availability zones denoting the IP allocated for the resource needs to come from. */ + zones?: string[]; + /** An array of references to inbound rules that use this frontend IP. */ + readonly inboundNatRules?: SubResource[]; + /** An array of references to inbound pools that use this frontend IP. */ + readonly inboundNatPools?: SubResource[]; + /** An array of references to outbound rules that use this frontend IP. */ + readonly outboundRules?: SubResource[]; + /** An array of references to load balancing rules that use this frontend IP. */ + readonly loadBalancingRules?: SubResource[]; + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The Private IP allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. */ + privateIPAddressVersion?: IPVersion; + /** The reference to the subnet resource. */ + subnet?: Subnet; + /** The reference to the Public IP resource. */ + publicIPAddress?: PublicIPAddress; + /** The reference to the Public IP Prefix resource. */ + publicIPPrefix?: SubResource; + /** The reference to gateway load balancer frontend IP. */ + gatewayLoadBalancer?: SubResource; + /** The provisioning state of the frontend IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The DDoS protection settings associated with the frontend IP configuration. */ + ddosSettings?: DdosFrontendIpConfigurationSettings; +} + +export function frontendIPConfigurationSerializer(item: FrontendIPConfiguration): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "privateIPAddress", + "privateIPAllocationMethod", + "privateIPAddressVersion", + "subnet", + "publicIPAddress", + "publicIPPrefix", + "gatewayLoadBalancer", + "ddosSettings", + ]) + ? undefined + : _frontendIPConfigurationPropertiesSerializer(item), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +export function frontendIPConfigurationDeserializer(item: any): FrontendIPConfiguration { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _frontendIPConfigurationPropertiesDeserializer(item["properties"])), + etag: item["etag"], + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +/** Properties of Frontend IP Configuration of the load balancer. */ +export interface FrontendIPConfigurationPropertiesFormat { + /** An array of references to inbound rules that use this frontend IP. */ + readonly inboundNatRules?: SubResource[]; + /** An array of references to inbound pools that use this frontend IP. */ + readonly inboundNatPools?: SubResource[]; + /** An array of references to outbound rules that use this frontend IP. */ + readonly outboundRules?: SubResource[]; + /** An array of references to load balancing rules that use this frontend IP. */ + readonly loadBalancingRules?: SubResource[]; + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The Private IP allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. */ + privateIPAddressVersion?: IPVersion; + /** The reference to the subnet resource. */ + subnet?: Subnet; + /** The reference to the Public IP resource. */ + publicIPAddress?: PublicIPAddress; + /** The reference to the Public IP Prefix resource. */ + publicIPPrefix?: SubResource; + /** The reference to gateway load balancer frontend IP. */ + gatewayLoadBalancer?: SubResource; + /** The provisioning state of the frontend IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The DDoS protection settings associated with the frontend IP configuration. */ + ddosSettings?: DdosFrontendIpConfigurationSettings; +} + +export function frontendIPConfigurationPropertiesFormatSerializer( + item: FrontendIPConfigurationPropertiesFormat, +): any { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + privateIPAddressVersion: item["privateIPAddressVersion"], + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressSerializer(item["publicIPAddress"]), + publicIPPrefix: !item["publicIPPrefix"] + ? item["publicIPPrefix"] + : subResourceSerializer(item["publicIPPrefix"]), + gatewayLoadBalancer: !item["gatewayLoadBalancer"] + ? item["gatewayLoadBalancer"] + : subResourceSerializer(item["gatewayLoadBalancer"]), + ddosSettings: !item["ddosSettings"] + ? item["ddosSettings"] + : ddosFrontendIpConfigurationSettingsSerializer(item["ddosSettings"]), + }; +} + +export function frontendIPConfigurationPropertiesFormatDeserializer( + item: any, +): FrontendIPConfigurationPropertiesFormat { + return { + inboundNatRules: !item["inboundNatRules"] + ? item["inboundNatRules"] + : subResourceArrayDeserializer(item["inboundNatRules"]), + inboundNatPools: !item["inboundNatPools"] + ? item["inboundNatPools"] + : subResourceArrayDeserializer(item["inboundNatPools"]), + outboundRules: !item["outboundRules"] + ? item["outboundRules"] + : subResourceArrayDeserializer(item["outboundRules"]), + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : subResourceArrayDeserializer(item["loadBalancingRules"]), + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + privateIPAddressVersion: item["privateIPAddressVersion"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressDeserializer(item["publicIPAddress"]), + publicIPPrefix: !item["publicIPPrefix"] + ? item["publicIPPrefix"] + : subResourceDeserializer(item["publicIPPrefix"]), + gatewayLoadBalancer: !item["gatewayLoadBalancer"] + ? item["gatewayLoadBalancer"] + : subResourceDeserializer(item["gatewayLoadBalancer"]), + provisioningState: item["provisioningState"], + ddosSettings: !item["ddosSettings"] + ? item["ddosSettings"] + : ddosFrontendIpConfigurationSettingsDeserializer(item["ddosSettings"]), + }; +} + +export function subResourceArraySerializer(result: Array): any[] { + return result.map((item) => { + return subResourceSerializer(item); + }); +} + +export function subResourceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return subResourceDeserializer(item); + }); +} + +/** IP address version. */ +export enum KnownIPVersion { + /** IPv4 */ + IPv4 = "IPv4", + /** IPv6 */ + IPv6 = "IPv6", +} + +/** + * IP address version. \ + * {@link KnownIPVersion} can be used interchangeably with IPVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPv4**: IPv4 \ + * **IPv6**: IPv6 + */ +export type IPVersion = string; + +/** Subnet in a virtual network resource. */ +export interface Subnet extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The address prefix for the subnet. */ + addressPrefix?: string; + /** List of address prefixes for the subnet. */ + addressPrefixes?: string[]; + /** The reference to the NetworkSecurityGroup resource. */ + networkSecurityGroup?: NetworkSecurityGroup; + /** The reference to the RouteTable resource. */ + routeTable?: RouteTable; + /** Nat gateway associated with this subnet. */ + natGateway?: SubResource; + /** An array of service endpoints. */ + serviceEndpoints?: ServiceEndpointPropertiesFormat[]; + /** An array of service endpoint policies. */ + serviceEndpointPolicies?: ServiceEndpointPolicy[]; + /** An array of references to private endpoints. */ + readonly privateEndpoints?: PrivateEndpoint[]; + /** An array of references to the network interface IP configurations using subnet. */ + readonly ipConfigurations?: IPConfiguration[]; + /** Array of IP configuration profiles which reference this subnet. */ + readonly ipConfigurationProfiles?: IPConfigurationProfile[]; + /** Array of IpAllocation which reference this subnet. */ + ipAllocations?: SubResource[]; + /** An array of references to the external resources using subnet. */ + readonly resourceNavigationLinks?: ResourceNavigationLink[]; + /** An array of references to services injecting into this subnet. */ + readonly serviceAssociationLinks?: ServiceAssociationLink[]; + /** An array of references to the delegations on the subnet. */ + delegations?: Delegation[]; + /** A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties. */ + readonly purpose?: string; + /** The provisioning state of the subnet resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Enable or Disable apply network policies on private end point in the subnet. */ + privateEndpointNetworkPolicies?: VirtualNetworkPrivateEndpointNetworkPolicies; + /** Enable or Disable apply network policies on private link service in the subnet. */ + privateLinkServiceNetworkPolicies?: VirtualNetworkPrivateLinkServiceNetworkPolicies; + /** Application gateway IP configurations of virtual network resource. */ + applicationGatewayIPConfigurations?: ApplicationGatewayIPConfiguration[]; + /** Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property can only be set if defaultOutboundAccess is set to false, both properties can only be set if subnet is empty. */ + sharingScope?: SharingScope; + /** Set this property to false to disable default outbound connectivity for all VMs in the subnet. */ + defaultOutboundAccess?: boolean; + /** A list of IPAM Pools for allocating IP address prefixes. */ + ipamPoolPrefixAllocations?: IpamPoolPrefixAllocation[]; + /** Reference to an existing service gateway. */ + serviceGateway?: SubResource; +} + +export function subnetSerializer(item: Subnet): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "addressPrefix", + "addressPrefixes", + "networkSecurityGroup", + "routeTable", + "natGateway", + "serviceEndpoints", + "serviceEndpointPolicies", + "ipAllocations", + "delegations", + "privateEndpointNetworkPolicies", + "privateLinkServiceNetworkPolicies", + "applicationGatewayIPConfigurations", + "sharingScope", + "defaultOutboundAccess", + "ipamPoolPrefixAllocations", + "serviceGateway", + ]) + ? undefined + : _subnetPropertiesSerializer(item), + }; +} + +export function subnetDeserializer(item: any): Subnet { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _subnetPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the subnet. */ +export interface SubnetPropertiesFormat { + /** The address prefix for the subnet. */ + addressPrefix?: string; + /** List of address prefixes for the subnet. */ + addressPrefixes?: string[]; + /** The reference to the NetworkSecurityGroup resource. */ + networkSecurityGroup?: NetworkSecurityGroup; + /** The reference to the RouteTable resource. */ + routeTable?: RouteTable; + /** Nat gateway associated with this subnet. */ + natGateway?: SubResource; + /** An array of service endpoints. */ + serviceEndpoints?: ServiceEndpointPropertiesFormat[]; + /** An array of service endpoint policies. */ + serviceEndpointPolicies?: ServiceEndpointPolicy[]; + /** An array of references to private endpoints. */ + readonly privateEndpoints?: PrivateEndpoint[]; + /** An array of references to the network interface IP configurations using subnet. */ + readonly ipConfigurations?: IPConfiguration[]; + /** Array of IP configuration profiles which reference this subnet. */ + readonly ipConfigurationProfiles?: IPConfigurationProfile[]; + /** Array of IpAllocation which reference this subnet. */ + ipAllocations?: SubResource[]; + /** An array of references to the external resources using subnet. */ + readonly resourceNavigationLinks?: ResourceNavigationLink[]; + /** An array of references to services injecting into this subnet. */ + readonly serviceAssociationLinks?: ServiceAssociationLink[]; + /** An array of references to the delegations on the subnet. */ + delegations?: Delegation[]; + /** A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties. */ + readonly purpose?: string; + /** The provisioning state of the subnet resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Enable or Disable apply network policies on private end point in the subnet. */ + privateEndpointNetworkPolicies?: VirtualNetworkPrivateEndpointNetworkPolicies; + /** Enable or Disable apply network policies on private link service in the subnet. */ + privateLinkServiceNetworkPolicies?: VirtualNetworkPrivateLinkServiceNetworkPolicies; + /** Application gateway IP configurations of virtual network resource. */ + applicationGatewayIPConfigurations?: ApplicationGatewayIPConfiguration[]; + /** Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property can only be set if defaultOutboundAccess is set to false, both properties can only be set if subnet is empty. */ + sharingScope?: SharingScope; + /** Set this property to false to disable default outbound connectivity for all VMs in the subnet. */ + defaultOutboundAccess?: boolean; + /** A list of IPAM Pools for allocating IP address prefixes. */ + ipamPoolPrefixAllocations?: IpamPoolPrefixAllocation[]; + /** Reference to an existing service gateway. */ + serviceGateway?: SubResource; +} + +export function subnetPropertiesFormatSerializer(item: SubnetPropertiesFormat): any { + return { + addressPrefix: item["addressPrefix"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + networkSecurityGroup: !item["networkSecurityGroup"] + ? item["networkSecurityGroup"] + : networkSecurityGroupSerializer(item["networkSecurityGroup"]), + routeTable: !item["routeTable"] ? item["routeTable"] : routeTableSerializer(item["routeTable"]), + natGateway: !item["natGateway"] + ? item["natGateway"] + : subResourceSerializer(item["natGateway"]), + serviceEndpoints: !item["serviceEndpoints"] + ? item["serviceEndpoints"] + : serviceEndpointPropertiesFormatArraySerializer(item["serviceEndpoints"]), + serviceEndpointPolicies: !item["serviceEndpointPolicies"] + ? item["serviceEndpointPolicies"] + : serviceEndpointPolicyArraySerializer(item["serviceEndpointPolicies"]), + ipAllocations: !item["ipAllocations"] + ? item["ipAllocations"] + : subResourceArraySerializer(item["ipAllocations"]), + delegations: !item["delegations"] + ? item["delegations"] + : delegationArraySerializer(item["delegations"]), + privateEndpointNetworkPolicies: item["privateEndpointNetworkPolicies"], + privateLinkServiceNetworkPolicies: item["privateLinkServiceNetworkPolicies"], + applicationGatewayIPConfigurations: !item["applicationGatewayIPConfigurations"] + ? item["applicationGatewayIPConfigurations"] + : applicationGatewayIPConfigurationArraySerializer( + item["applicationGatewayIPConfigurations"], + ), + sharingScope: item["sharingScope"], + defaultOutboundAccess: item["defaultOutboundAccess"], + ipamPoolPrefixAllocations: !item["ipamPoolPrefixAllocations"] + ? item["ipamPoolPrefixAllocations"] + : ipamPoolPrefixAllocationArraySerializer(item["ipamPoolPrefixAllocations"]), + serviceGateway: !item["serviceGateway"] + ? item["serviceGateway"] + : subResourceSerializer(item["serviceGateway"]), + }; +} + +export function subnetPropertiesFormatDeserializer(item: any): SubnetPropertiesFormat { + return { + addressPrefix: item["addressPrefix"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + networkSecurityGroup: !item["networkSecurityGroup"] + ? item["networkSecurityGroup"] + : networkSecurityGroupDeserializer(item["networkSecurityGroup"]), + routeTable: !item["routeTable"] + ? item["routeTable"] + : routeTableDeserializer(item["routeTable"]), + natGateway: !item["natGateway"] + ? item["natGateway"] + : subResourceDeserializer(item["natGateway"]), + serviceEndpoints: !item["serviceEndpoints"] + ? item["serviceEndpoints"] + : serviceEndpointPropertiesFormatArrayDeserializer(item["serviceEndpoints"]), + serviceEndpointPolicies: !item["serviceEndpointPolicies"] + ? item["serviceEndpointPolicies"] + : serviceEndpointPolicyArrayDeserializer(item["serviceEndpointPolicies"]), + privateEndpoints: !item["privateEndpoints"] + ? item["privateEndpoints"] + : privateEndpointArrayDeserializer(item["privateEndpoints"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : ipConfigurationArrayDeserializer(item["ipConfigurations"]), + ipConfigurationProfiles: !item["ipConfigurationProfiles"] + ? item["ipConfigurationProfiles"] + : ipConfigurationProfileArrayDeserializer(item["ipConfigurationProfiles"]), + ipAllocations: !item["ipAllocations"] + ? item["ipAllocations"] + : subResourceArrayDeserializer(item["ipAllocations"]), + resourceNavigationLinks: !item["resourceNavigationLinks"] + ? item["resourceNavigationLinks"] + : resourceNavigationLinkArrayDeserializer(item["resourceNavigationLinks"]), + serviceAssociationLinks: !item["serviceAssociationLinks"] + ? item["serviceAssociationLinks"] + : serviceAssociationLinkArrayDeserializer(item["serviceAssociationLinks"]), + delegations: !item["delegations"] + ? item["delegations"] + : delegationArrayDeserializer(item["delegations"]), + purpose: item["purpose"], + provisioningState: item["provisioningState"], + privateEndpointNetworkPolicies: item["privateEndpointNetworkPolicies"], + privateLinkServiceNetworkPolicies: item["privateLinkServiceNetworkPolicies"], + applicationGatewayIPConfigurations: !item["applicationGatewayIPConfigurations"] + ? item["applicationGatewayIPConfigurations"] + : applicationGatewayIPConfigurationArrayDeserializer( + item["applicationGatewayIPConfigurations"], + ), + sharingScope: item["sharingScope"], + defaultOutboundAccess: item["defaultOutboundAccess"], + ipamPoolPrefixAllocations: !item["ipamPoolPrefixAllocations"] + ? item["ipamPoolPrefixAllocations"] + : ipamPoolPrefixAllocationArrayDeserializer(item["ipamPoolPrefixAllocations"]), + serviceGateway: !item["serviceGateway"] + ? item["serviceGateway"] + : subResourceDeserializer(item["serviceGateway"]), + }; +} + +/** NetworkSecurityGroup resource. */ +export interface NetworkSecurityGroup extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** When enabled, flows created from Network Security Group connections will be re-evaluated when rules are updates. Initial enablement will trigger re-evaluation. */ + flushConnection?: boolean; + /** A collection of security rules of the network security group. */ + securityRules?: SecurityRule[]; + /** The default security rules of network security group. */ + readonly defaultSecurityRules?: SecurityRule[]; + /** A collection of references to network interfaces. */ + readonly networkInterfaces?: NetworkInterface[]; + /** A collection of references to subnets. */ + readonly subnets?: Subnet[]; + /** A collection of references to flow log resources. */ + readonly flowLogs?: FlowLog[]; + /** The resource GUID property of the network security group resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the network security group resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function networkSecurityGroupSerializer(item: NetworkSecurityGroup): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, ["flushConnection", "securityRules"]) + ? undefined + : _networkSecurityGroupPropertiesSerializer(item), + }; +} + +export function networkSecurityGroupDeserializer(item: any): NetworkSecurityGroup { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _networkSecurityGroupPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Network Security Group resource. */ +export interface NetworkSecurityGroupPropertiesFormat { + /** When enabled, flows created from Network Security Group connections will be re-evaluated when rules are updates. Initial enablement will trigger re-evaluation. */ + flushConnection?: boolean; + /** A collection of security rules of the network security group. */ + securityRules?: SecurityRule[]; + /** The default security rules of network security group. */ + readonly defaultSecurityRules?: SecurityRule[]; + /** A collection of references to network interfaces. */ + readonly networkInterfaces?: NetworkInterface[]; + /** A collection of references to subnets. */ + readonly subnets?: Subnet[]; + /** A collection of references to flow log resources. */ + readonly flowLogs?: FlowLog[]; + /** The resource GUID property of the network security group resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the network security group resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function networkSecurityGroupPropertiesFormatSerializer( + item: NetworkSecurityGroupPropertiesFormat, +): any { + return { + flushConnection: item["flushConnection"], + securityRules: !item["securityRules"] + ? item["securityRules"] + : securityRuleArraySerializer(item["securityRules"]), + }; +} + +export function networkSecurityGroupPropertiesFormatDeserializer( + item: any, +): NetworkSecurityGroupPropertiesFormat { + return { + flushConnection: item["flushConnection"], + securityRules: !item["securityRules"] + ? item["securityRules"] + : securityRuleArrayDeserializer(item["securityRules"]), + defaultSecurityRules: !item["defaultSecurityRules"] + ? item["defaultSecurityRules"] + : securityRuleArrayDeserializer(item["defaultSecurityRules"]), + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceArrayDeserializer(item["networkInterfaces"]), + subnets: !item["subnets"] ? item["subnets"] : subnetArrayDeserializer(item["subnets"]), + flowLogs: !item["flowLogs"] ? item["flowLogs"] : flowLogArrayDeserializer(item["flowLogs"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function securityRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return securityRuleSerializer(item); + }); +} + +export function securityRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return securityRuleDeserializer(item); + }); +} + +/** Network security rule. */ +export interface SecurityRule extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** A description for this rule. Restricted to 140 chars. */ + description?: string; + /** Network protocol this rule applies to. */ + protocol?: SecurityRuleProtocol; + /** The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. */ + sourcePortRange?: string; + /** The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. */ + destinationPortRange?: string; + /** The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. */ + sourceAddressPrefix?: string; + /** The CIDR or source IP ranges. */ + sourceAddressPrefixes?: string[]; + /** The application security group specified as source. */ + sourceApplicationSecurityGroups?: ApplicationSecurityGroup[]; + /** The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. */ + destinationAddressPrefix?: string; + /** The destination address prefixes. CIDR or destination IP ranges. */ + destinationAddressPrefixes?: string[]; + /** The application security group specified as destination. */ + destinationApplicationSecurityGroups?: ApplicationSecurityGroup[]; + /** The source port ranges. */ + sourcePortRanges?: string[]; + /** The destination port ranges. */ + destinationPortRanges?: string[]; + /** The network traffic is allowed or denied. */ + access?: SecurityRuleAccess; + /** The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ + priority?: number; + /** The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. */ + direction?: SecurityRuleDirection; + /** The provisioning state of the security rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function securityRuleSerializer(item: SecurityRule): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "description", + "protocol", + "sourcePortRange", + "destinationPortRange", + "sourceAddressPrefix", + "sourceAddressPrefixes", + "sourceApplicationSecurityGroups", + "destinationAddressPrefix", + "destinationAddressPrefixes", + "destinationApplicationSecurityGroups", + "sourcePortRanges", + "destinationPortRanges", + "access", + "priority", + "direction", + ]) + ? undefined + : _securityRulePropertiesSerializer(item), + }; +} + +export function securityRuleDeserializer(item: any): SecurityRule { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _securityRulePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Security rule resource. */ +export interface SecurityRulePropertiesFormat { + /** A description for this rule. Restricted to 140 chars. */ + description?: string; + /** Network protocol this rule applies to. */ + protocol: SecurityRuleProtocol; + /** The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. */ + sourcePortRange?: string; + /** The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. */ + destinationPortRange?: string; + /** The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. */ + sourceAddressPrefix?: string; + /** The CIDR or source IP ranges. */ + sourceAddressPrefixes?: string[]; + /** The application security group specified as source. */ + sourceApplicationSecurityGroups?: ApplicationSecurityGroup[]; + /** The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. */ + destinationAddressPrefix?: string; + /** The destination address prefixes. CIDR or destination IP ranges. */ + destinationAddressPrefixes?: string[]; + /** The application security group specified as destination. */ + destinationApplicationSecurityGroups?: ApplicationSecurityGroup[]; + /** The source port ranges. */ + sourcePortRanges?: string[]; + /** The destination port ranges. */ + destinationPortRanges?: string[]; + /** The network traffic is allowed or denied. */ + access: SecurityRuleAccess; + /** The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ + priority: number; + /** The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. */ + direction: SecurityRuleDirection; + /** The provisioning state of the security rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function securityRulePropertiesFormatSerializer(item: SecurityRulePropertiesFormat): any { + return { + description: item["description"], + protocol: item["protocol"], + sourcePortRange: item["sourcePortRange"], + destinationPortRange: item["destinationPortRange"], + sourceAddressPrefix: item["sourceAddressPrefix"], + sourceAddressPrefixes: !item["sourceAddressPrefixes"] + ? item["sourceAddressPrefixes"] + : item["sourceAddressPrefixes"].map((p: any) => { + return p; + }), + sourceApplicationSecurityGroups: !item["sourceApplicationSecurityGroups"] + ? item["sourceApplicationSecurityGroups"] + : applicationSecurityGroupArraySerializer(item["sourceApplicationSecurityGroups"]), + destinationAddressPrefix: item["destinationAddressPrefix"], + destinationAddressPrefixes: !item["destinationAddressPrefixes"] + ? item["destinationAddressPrefixes"] + : item["destinationAddressPrefixes"].map((p: any) => { + return p; + }), + destinationApplicationSecurityGroups: !item["destinationApplicationSecurityGroups"] + ? item["destinationApplicationSecurityGroups"] + : applicationSecurityGroupArraySerializer(item["destinationApplicationSecurityGroups"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + }; +} + +export function securityRulePropertiesFormatDeserializer(item: any): SecurityRulePropertiesFormat { + return { + description: item["description"], + protocol: item["protocol"], + sourcePortRange: item["sourcePortRange"], + destinationPortRange: item["destinationPortRange"], + sourceAddressPrefix: item["sourceAddressPrefix"], + sourceAddressPrefixes: !item["sourceAddressPrefixes"] + ? item["sourceAddressPrefixes"] + : item["sourceAddressPrefixes"].map((p: any) => { + return p; + }), + sourceApplicationSecurityGroups: !item["sourceApplicationSecurityGroups"] + ? item["sourceApplicationSecurityGroups"] + : applicationSecurityGroupArrayDeserializer(item["sourceApplicationSecurityGroups"]), + destinationAddressPrefix: item["destinationAddressPrefix"], + destinationAddressPrefixes: !item["destinationAddressPrefixes"] + ? item["destinationAddressPrefixes"] + : item["destinationAddressPrefixes"].map((p: any) => { + return p; + }), + destinationApplicationSecurityGroups: !item["destinationApplicationSecurityGroups"] + ? item["destinationApplicationSecurityGroups"] + : applicationSecurityGroupArrayDeserializer(item["destinationApplicationSecurityGroups"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + provisioningState: item["provisioningState"], + }; +} + +/** Network protocol this rule applies to. */ +export enum KnownSecurityRuleProtocol { + /** Tcp */ + Tcp = "Tcp", + /** Udp */ + Udp = "Udp", + /** Icmp */ + Icmp = "Icmp", + /** Esp */ + Esp = "Esp", + /** * */ + Asterisk = "*", + /** Ah */ + Ah = "Ah", +} + +/** + * Network protocol this rule applies to. \ + * {@link KnownSecurityRuleProtocol} can be used interchangeably with SecurityRuleProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Tcp**: Tcp \ + * **Udp**: Udp \ + * **Icmp**: Icmp \ + * **Esp**: Esp \ + * *****: * \ + * **Ah**: Ah + */ +export type SecurityRuleProtocol = string; + +export function applicationSecurityGroupArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationSecurityGroupSerializer(item); + }); +} + +export function applicationSecurityGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationSecurityGroupDeserializer(item); + }); +} + +/** An application security group in a resource group. */ +export interface ApplicationSecurityGroup extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. */ + readonly resourceGuid?: string; + /** The provisioning state of the application security group resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationSecurityGroupSerializer(item: ApplicationSecurityGroup): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, []) + ? undefined + : _applicationSecurityGroupPropertiesSerializer(item), + }; +} + +export function applicationSecurityGroupDeserializer(item: any): ApplicationSecurityGroup { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _applicationSecurityGroupPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Application security group properties. */ +export interface ApplicationSecurityGroupPropertiesFormat { + /** The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. */ + readonly resourceGuid?: string; + /** The provisioning state of the application security group resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationSecurityGroupPropertiesFormatSerializer( + _item: ApplicationSecurityGroupPropertiesFormat, +): any { + return {}; +} + +export function applicationSecurityGroupPropertiesFormatDeserializer( + item: any, +): ApplicationSecurityGroupPropertiesFormat { + return { + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +/** Whether network traffic is allowed or denied. */ +export enum KnownSecurityRuleAccess { + /** Allow */ + Allow = "Allow", + /** Deny */ + Deny = "Deny", +} + +/** + * Whether network traffic is allowed or denied. \ + * {@link KnownSecurityRuleAccess} can be used interchangeably with SecurityRuleAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Allow**: Allow \ + * **Deny**: Deny + */ +export type SecurityRuleAccess = string; + +/** The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. */ +export enum KnownSecurityRuleDirection { + /** Inbound */ + Inbound = "Inbound", + /** Outbound */ + Outbound = "Outbound", +} + +/** + * The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. \ + * {@link KnownSecurityRuleDirection} can be used interchangeably with SecurityRuleDirection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inbound**: Inbound \ + * **Outbound**: Outbound + */ +export type SecurityRuleDirection = string; + +export function networkInterfaceArraySerializer(result: Array): any[] { + return result.map((item) => { + return networkInterfaceSerializer(item); + }); +} + +export function networkInterfaceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return networkInterfaceDeserializer(item); + }); +} + +/** A network interface in a resource group. */ +export interface NetworkInterface extends Resource { + /** The extended location of the network interface. */ + extendedLocation?: ExtendedLocation; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The reference to a virtual machine. */ + readonly virtualMachine?: SubResource; + /** The reference to the NetworkSecurityGroup resource. */ + networkSecurityGroup?: NetworkSecurityGroup; + /** A reference to the private endpoint to which the network interface is linked. */ + readonly privateEndpoint?: PrivateEndpoint; + /** A list of IPConfigurations of the network interface. */ + ipConfigurations?: NetworkInterfaceIPConfiguration[]; + /** A list of TapConfigurations of the network interface. */ + readonly tapConfigurations?: NetworkInterfaceTapConfiguration[]; + /** The DNS settings in network interface. */ + dnsSettings?: NetworkInterfaceDnsSettings; + /** The MAC address of the network interface. */ + readonly macAddress?: string; + /** Whether this is a primary network interface on a virtual machine. */ + readonly primary?: boolean; + /** Whether the virtual machine this nic is attached to supports encryption. */ + readonly vnetEncryptionSupported?: boolean; + /** Whether default outbound connectivity for nic was configured or not. */ + readonly defaultOutboundConnectivityEnabled?: boolean; + /** If the network interface is configured for accelerated networking. Not applicable to VM sizes which require accelerated networking. */ + enableAcceleratedNetworking?: boolean; + /** Indicates whether to disable tcp state tracking. */ + disableTcpStateTracking?: boolean; + /** Indicates whether IP forwarding is enabled on this network interface. */ + enableIPForwarding?: boolean; + /** A list of references to linked BareMetal resources. */ + readonly hostedWorkloads?: string[]; + /** A reference to the dscp configuration to which the network interface is linked. */ + readonly dscpConfiguration?: SubResource; + /** The resource GUID property of the network interface resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the network interface resource. */ + readonly provisioningState?: CommonProvisioningState; + /** WorkloadType of the NetworkInterface for BareMetal resources */ + workloadType?: string; + /** Type of Network Interface resource. */ + nicType?: NetworkInterfaceNicType; + /** Privatelinkservice of the network interface resource. */ + privateLinkService?: PrivateLinkService; + /** Migration phase of Network Interface resource. */ + migrationPhase?: NetworkInterfaceMigrationPhase; + /** Auxiliary mode of Network Interface resource. */ + auxiliaryMode?: NetworkInterfaceAuxiliaryMode; + /** Auxiliary sku of Network Interface resource. */ + auxiliarySku?: NetworkInterfaceAuxiliarySku; +} + +export function networkInterfaceSerializer(item: NetworkInterface): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "networkSecurityGroup", + "ipConfigurations", + "dnsSettings", + "enableAcceleratedNetworking", + "disableTcpStateTracking", + "enableIPForwarding", + "workloadType", + "nicType", + "privateLinkService", + "migrationPhase", + "auxiliaryMode", + "auxiliarySku", + ]) + ? undefined + : _networkInterfacePropertiesSerializer(item), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function networkInterfaceDeserializer(item: any): NetworkInterface { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _networkInterfacePropertiesDeserializer(item["properties"])), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationDeserializer(item["extendedLocation"]), + etag: item["etag"], + }; +} + +/** NetworkInterface properties. */ +export interface NetworkInterfacePropertiesFormat { + /** The reference to a virtual machine. */ + readonly virtualMachine?: SubResource; + /** The reference to the NetworkSecurityGroup resource. */ + networkSecurityGroup?: NetworkSecurityGroup; + /** A reference to the private endpoint to which the network interface is linked. */ + readonly privateEndpoint?: PrivateEndpoint; + /** A list of IPConfigurations of the network interface. */ + ipConfigurations?: NetworkInterfaceIPConfiguration[]; + /** A list of TapConfigurations of the network interface. */ + readonly tapConfigurations?: NetworkInterfaceTapConfiguration[]; + /** The DNS settings in network interface. */ + dnsSettings?: NetworkInterfaceDnsSettings; + /** The MAC address of the network interface. */ + readonly macAddress?: string; + /** Whether this is a primary network interface on a virtual machine. */ + readonly primary?: boolean; + /** Whether the virtual machine this nic is attached to supports encryption. */ + readonly vnetEncryptionSupported?: boolean; + /** Whether default outbound connectivity for nic was configured or not. */ + readonly defaultOutboundConnectivityEnabled?: boolean; + /** If the network interface is configured for accelerated networking. Not applicable to VM sizes which require accelerated networking. */ + enableAcceleratedNetworking?: boolean; + /** Indicates whether to disable tcp state tracking. */ + disableTcpStateTracking?: boolean; + /** Indicates whether IP forwarding is enabled on this network interface. */ + enableIPForwarding?: boolean; + /** A list of references to linked BareMetal resources. */ + readonly hostedWorkloads?: string[]; + /** A reference to the dscp configuration to which the network interface is linked. */ + readonly dscpConfiguration?: SubResource; + /** The resource GUID property of the network interface resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the network interface resource. */ + readonly provisioningState?: CommonProvisioningState; + /** WorkloadType of the NetworkInterface for BareMetal resources */ + workloadType?: string; + /** Type of Network Interface resource. */ + nicType?: NetworkInterfaceNicType; + /** Privatelinkservice of the network interface resource. */ + privateLinkService?: PrivateLinkService; + /** Migration phase of Network Interface resource. */ + migrationPhase?: NetworkInterfaceMigrationPhase; + /** Auxiliary mode of Network Interface resource. */ + auxiliaryMode?: NetworkInterfaceAuxiliaryMode; + /** Auxiliary sku of Network Interface resource. */ + auxiliarySku?: NetworkInterfaceAuxiliarySku; +} + +export function networkInterfacePropertiesFormatSerializer( + item: NetworkInterfacePropertiesFormat, +): any { + return { + networkSecurityGroup: !item["networkSecurityGroup"] + ? item["networkSecurityGroup"] + : networkSecurityGroupSerializer(item["networkSecurityGroup"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : networkInterfaceIPConfigurationArraySerializer(item["ipConfigurations"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : networkInterfaceDnsSettingsSerializer(item["dnsSettings"]), + enableAcceleratedNetworking: item["enableAcceleratedNetworking"], + disableTcpStateTracking: item["disableTcpStateTracking"], + enableIPForwarding: item["enableIPForwarding"], + workloadType: item["workloadType"], + nicType: item["nicType"], + privateLinkService: !item["privateLinkService"] + ? item["privateLinkService"] + : privateLinkServiceSerializer(item["privateLinkService"]), + migrationPhase: item["migrationPhase"], + auxiliaryMode: item["auxiliaryMode"], + auxiliarySku: item["auxiliarySku"], + }; +} + +export function networkInterfacePropertiesFormatDeserializer( + item: any, +): NetworkInterfacePropertiesFormat { + return { + virtualMachine: !item["virtualMachine"] + ? item["virtualMachine"] + : subResourceDeserializer(item["virtualMachine"]), + networkSecurityGroup: !item["networkSecurityGroup"] + ? item["networkSecurityGroup"] + : networkSecurityGroupDeserializer(item["networkSecurityGroup"]), + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : privateEndpointDeserializer(item["privateEndpoint"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : networkInterfaceIPConfigurationArrayDeserializer(item["ipConfigurations"]), + tapConfigurations: !item["tapConfigurations"] + ? item["tapConfigurations"] + : networkInterfaceTapConfigurationArrayDeserializer(item["tapConfigurations"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : networkInterfaceDnsSettingsDeserializer(item["dnsSettings"]), + macAddress: item["macAddress"], + primary: item["primary"], + vnetEncryptionSupported: item["vnetEncryptionSupported"], + defaultOutboundConnectivityEnabled: item["defaultOutboundConnectivityEnabled"], + enableAcceleratedNetworking: item["enableAcceleratedNetworking"], + disableTcpStateTracking: item["disableTcpStateTracking"], + enableIPForwarding: item["enableIPForwarding"], + hostedWorkloads: !item["hostedWorkloads"] + ? item["hostedWorkloads"] + : item["hostedWorkloads"].map((p: any) => { + return p; + }), + dscpConfiguration: !item["dscpConfiguration"] + ? item["dscpConfiguration"] + : subResourceDeserializer(item["dscpConfiguration"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + workloadType: item["workloadType"], + nicType: item["nicType"], + privateLinkService: !item["privateLinkService"] + ? item["privateLinkService"] + : privateLinkServiceDeserializer(item["privateLinkService"]), + migrationPhase: item["migrationPhase"], + auxiliaryMode: item["auxiliaryMode"], + auxiliarySku: item["auxiliarySku"], + }; +} + +/** Private endpoint resource. */ +export interface PrivateEndpoint extends Resource { + /** The extended location of the load balancer. */ + extendedLocation?: ExtendedLocation; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The ID of the subnet from which the private IP will be allocated. */ + subnet?: Subnet; + /** An array of references to the network interfaces created for this private endpoint. */ + readonly networkInterfaces?: NetworkInterface[]; + /** The provisioning state of the private endpoint resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Specifies the IP version type for the private IPs of the private endpoint. If not defined, this defaults to IPv4. */ + ipVersionType?: PrivateEndpointIPVersionType; + /** A grouping of information about the connection to the remote resource. */ + privateLinkServiceConnections?: PrivateLinkServiceConnection[]; + /** A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource. */ + manualPrivateLinkServiceConnections?: PrivateLinkServiceConnection[]; + /** An array of custom dns configurations. */ + customDnsConfigs?: CustomDnsConfigPropertiesFormat[]; + /** Application security groups in which the private endpoint IP configuration is included. */ + applicationSecurityGroups?: ApplicationSecurityGroup[]; + /** A list of IP configurations of the private endpoint. This will be used to map to the First Party Service's endpoints. */ + ipConfigurations?: PrivateEndpointIPConfiguration[]; + /** The custom name of the network interface attached to the private endpoint. */ + customNetworkInterfaceName?: string; + /** The billing sku of the private endpoint. */ + billingSku?: PrivateEndpointBillingSku; +} + +export function privateEndpointSerializer(item: PrivateEndpoint): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "subnet", + "ipVersionType", + "privateLinkServiceConnections", + "manualPrivateLinkServiceConnections", + "customDnsConfigs", + "applicationSecurityGroups", + "ipConfigurations", + "customNetworkInterfaceName", + "billingSku", + ]) + ? undefined + : _privateEndpointPropertiesSerializer(item), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function privateEndpointDeserializer(item: any): PrivateEndpoint { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _privateEndpointPropertiesDeserializer(item["properties"])), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationDeserializer(item["extendedLocation"]), + etag: item["etag"], + }; +} + +/** Properties of the private endpoint. */ +export interface PrivateEndpointProperties { + /** The ID of the subnet from which the private IP will be allocated. */ + subnet?: Subnet; + /** An array of references to the network interfaces created for this private endpoint. */ + readonly networkInterfaces?: NetworkInterface[]; + /** The provisioning state of the private endpoint resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Specifies the IP version type for the private IPs of the private endpoint. If not defined, this defaults to IPv4. */ + ipVersionType?: PrivateEndpointIPVersionType; + /** A grouping of information about the connection to the remote resource. */ + privateLinkServiceConnections?: PrivateLinkServiceConnection[]; + /** A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource. */ + manualPrivateLinkServiceConnections?: PrivateLinkServiceConnection[]; + /** An array of custom dns configurations. */ + customDnsConfigs?: CustomDnsConfigPropertiesFormat[]; + /** Application security groups in which the private endpoint IP configuration is included. */ + applicationSecurityGroups?: ApplicationSecurityGroup[]; + /** A list of IP configurations of the private endpoint. This will be used to map to the First Party Service's endpoints. */ + ipConfigurations?: PrivateEndpointIPConfiguration[]; + /** The custom name of the network interface attached to the private endpoint. */ + customNetworkInterfaceName?: string; + /** The billing sku of the private endpoint. */ + billingSku?: PrivateEndpointBillingSku; +} + +export function privateEndpointPropertiesSerializer(item: PrivateEndpointProperties): any { + return { + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + ipVersionType: item["ipVersionType"], + privateLinkServiceConnections: !item["privateLinkServiceConnections"] + ? item["privateLinkServiceConnections"] + : privateLinkServiceConnectionArraySerializer(item["privateLinkServiceConnections"]), + manualPrivateLinkServiceConnections: !item["manualPrivateLinkServiceConnections"] + ? item["manualPrivateLinkServiceConnections"] + : privateLinkServiceConnectionArraySerializer(item["manualPrivateLinkServiceConnections"]), + customDnsConfigs: !item["customDnsConfigs"] + ? item["customDnsConfigs"] + : customDnsConfigPropertiesFormatArraySerializer(item["customDnsConfigs"]), + applicationSecurityGroups: !item["applicationSecurityGroups"] + ? item["applicationSecurityGroups"] + : applicationSecurityGroupArraySerializer(item["applicationSecurityGroups"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : privateEndpointIPConfigurationArraySerializer(item["ipConfigurations"]), + customNetworkInterfaceName: item["customNetworkInterfaceName"], + billingSku: item["billingSku"], + }; +} + +export function privateEndpointPropertiesDeserializer(item: any): PrivateEndpointProperties { + return { + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceArrayDeserializer(item["networkInterfaces"]), + provisioningState: item["provisioningState"], + ipVersionType: item["ipVersionType"], + privateLinkServiceConnections: !item["privateLinkServiceConnections"] + ? item["privateLinkServiceConnections"] + : privateLinkServiceConnectionArrayDeserializer(item["privateLinkServiceConnections"]), + manualPrivateLinkServiceConnections: !item["manualPrivateLinkServiceConnections"] + ? item["manualPrivateLinkServiceConnections"] + : privateLinkServiceConnectionArrayDeserializer(item["manualPrivateLinkServiceConnections"]), + customDnsConfigs: !item["customDnsConfigs"] + ? item["customDnsConfigs"] + : customDnsConfigPropertiesFormatArrayDeserializer(item["customDnsConfigs"]), + applicationSecurityGroups: !item["applicationSecurityGroups"] + ? item["applicationSecurityGroups"] + : applicationSecurityGroupArrayDeserializer(item["applicationSecurityGroups"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : privateEndpointIPConfigurationArrayDeserializer(item["ipConfigurations"]), + customNetworkInterfaceName: item["customNetworkInterfaceName"], + billingSku: item["billingSku"], + }; +} + +/** Specifies the IP version type for the private IPs of the private endpoint. If not defined, this defaults to IPv4. */ +export enum KnownPrivateEndpointIPVersionType { + /** Indicates that the Private IPs of the private endpoint will be IPv4 only. */ + IPv4 = "IPv4", + /** Indicates that the Private IPs of the private endpoint will be IPv6 only. */ + IPv6 = "IPv6", + /** Indicates that the Private IPs of the private endpoint can be both IPv4 and IPv6. */ + DualStack = "DualStack", +} + +/** + * Specifies the IP version type for the private IPs of the private endpoint. If not defined, this defaults to IPv4. \ + * {@link KnownPrivateEndpointIPVersionType} can be used interchangeably with PrivateEndpointIPVersionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPv4**: Indicates that the Private IPs of the private endpoint will be IPv4 only. \ + * **IPv6**: Indicates that the Private IPs of the private endpoint will be IPv6 only. \ + * **DualStack**: Indicates that the Private IPs of the private endpoint can be both IPv4 and IPv6. + */ +export type PrivateEndpointIPVersionType = string; + +export function privateLinkServiceConnectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return privateLinkServiceConnectionSerializer(item); + }); +} + +export function privateLinkServiceConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return privateLinkServiceConnectionDeserializer(item); + }); +} + +/** PrivateLinkServiceConnection resource. */ +export interface PrivateLinkServiceConnection extends SubResource { + /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** The resource type. */ + readonly type?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The provisioning state of the private link service connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The resource id of private link service. */ + privateLinkServiceId?: string; + /** The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to. */ + groupIds?: string[]; + /** A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. */ + requestMessage?: string; + /** A collection of read-only information about the state of the connection to the remote resource. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; +} + +export function privateLinkServiceConnectionSerializer(item: PrivateLinkServiceConnection): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "privateLinkServiceId", + "groupIds", + "requestMessage", + "privateLinkServiceConnectionState", + ]) + ? undefined + : _privateLinkServiceConnectionPropertiesSerializer(item), + name: item["name"], + }; +} + +export function privateLinkServiceConnectionDeserializer(item: any): PrivateLinkServiceConnection { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _privateLinkServiceConnectionPropertiesDeserializer(item["properties"])), + name: item["name"], + type: item["type"], + etag: item["etag"], + }; +} + +/** Properties of the PrivateLinkServiceConnection. */ +export interface PrivateLinkServiceConnectionProperties { + /** The provisioning state of the private link service connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The resource id of private link service. */ + privateLinkServiceId?: string; + /** The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to. */ + groupIds?: string[]; + /** A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. */ + requestMessage?: string; + /** A collection of read-only information about the state of the connection to the remote resource. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; +} + +export function privateLinkServiceConnectionPropertiesSerializer( + item: PrivateLinkServiceConnectionProperties, +): any { + return { + privateLinkServiceId: item["privateLinkServiceId"], + groupIds: !item["groupIds"] + ? item["groupIds"] + : item["groupIds"].map((p: any) => { + return p; + }), + requestMessage: item["requestMessage"], + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateSerializer(item["privateLinkServiceConnectionState"]), + }; +} + +export function privateLinkServiceConnectionPropertiesDeserializer( + item: any, +): PrivateLinkServiceConnectionProperties { + return { + provisioningState: item["provisioningState"], + privateLinkServiceId: item["privateLinkServiceId"], + groupIds: !item["groupIds"] + ? item["groupIds"] + : item["groupIds"].map((p: any) => { + return p; + }), + requestMessage: item["requestMessage"], + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateDeserializer(item["privateLinkServiceConnectionState"]), + }; +} + +/** A collection of information about the state of the connection between service consumer and provider. */ +export interface PrivateLinkServiceConnectionState { + /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ + status?: string; + /** The reason for approval/rejection of the connection. */ + description?: string; + /** A message indicating if changes on the service provider require any updates on the consumer. */ + actionsRequired?: string; +} + +export function privateLinkServiceConnectionStateSerializer( + item: PrivateLinkServiceConnectionState, +): any { + return { + status: item["status"], + description: item["description"], + actionsRequired: item["actionsRequired"], + }; +} + +export function privateLinkServiceConnectionStateDeserializer( + item: any, +): PrivateLinkServiceConnectionState { + return { + status: item["status"], + description: item["description"], + actionsRequired: item["actionsRequired"], + }; +} + +export function customDnsConfigPropertiesFormatArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return customDnsConfigPropertiesFormatSerializer(item); + }); +} + +export function customDnsConfigPropertiesFormatArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return customDnsConfigPropertiesFormatDeserializer(item); + }); +} + +/** Contains custom Dns resolution configuration from customer. */ +export interface CustomDnsConfigPropertiesFormat { + /** Fqdn that resolves to private endpoint ip address. */ + fqdn?: string; + /** A list of private ip addresses of the private endpoint. */ + ipAddresses?: string[]; +} + +export function customDnsConfigPropertiesFormatSerializer( + item: CustomDnsConfigPropertiesFormat, +): any { + return { + fqdn: item["fqdn"], + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + }; +} + +export function customDnsConfigPropertiesFormatDeserializer( + item: any, +): CustomDnsConfigPropertiesFormat { + return { + fqdn: item["fqdn"], + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + }; +} + +export function privateEndpointIPConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return privateEndpointIPConfigurationSerializer(item); + }); +} + +export function privateEndpointIPConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return privateEndpointIPConfigurationDeserializer(item); + }); +} + +/** An IP Configuration of the private endpoint. */ +export interface PrivateEndpointIPConfiguration { + /** The name of the resource that is unique within a resource group. */ + name?: string; + /** The resource type. */ + readonly type?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The ID of a group obtained from the remote resource that this private endpoint should connect to. */ + groupId?: string; + /** The member name of a group obtained from the remote resource that this private endpoint should connect to. */ + memberName?: string; + /** A private ip address obtained from the private endpoint's subnet. */ + privateIPAddress?: string; +} + +export function privateEndpointIPConfigurationSerializer( + item: PrivateEndpointIPConfiguration, +): any { + return { + properties: areAllPropsUndefined(item, ["groupId", "memberName", "privateIPAddress"]) + ? undefined + : _privateEndpointIPConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function privateEndpointIPConfigurationDeserializer( + item: any, +): PrivateEndpointIPConfiguration { + return { + ...(!item["properties"] + ? item["properties"] + : _privateEndpointIPConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + type: item["type"], + etag: item["etag"], + }; +} + +/** Properties of an IP Configuration of the private endpoint. */ +export interface PrivateEndpointIPConfigurationProperties { + /** The ID of a group obtained from the remote resource that this private endpoint should connect to. */ + groupId?: string; + /** The member name of a group obtained from the remote resource that this private endpoint should connect to. */ + memberName?: string; + /** A private ip address obtained from the private endpoint's subnet. */ + privateIPAddress?: string; +} + +export function privateEndpointIPConfigurationPropertiesSerializer( + item: PrivateEndpointIPConfigurationProperties, +): any { + return { + groupId: item["groupId"], + memberName: item["memberName"], + privateIPAddress: item["privateIPAddress"], + }; +} + +export function privateEndpointIPConfigurationPropertiesDeserializer( + item: any, +): PrivateEndpointIPConfigurationProperties { + return { + groupId: item["groupId"], + memberName: item["memberName"], + privateIPAddress: item["privateIPAddress"], + }; +} + +/** The billing sku of the private endpoint. */ +export enum KnownPrivateEndpointBillingSku { + /** PayAsYouGo sku is the default price for private endpoints. */ + PayAsYouGo = "PayAsYouGo", + /** Fixed sku is best for high data processing private endpoints. */ + Fixed = "Fixed", +} + +/** + * The billing sku of the private endpoint. \ + * {@link KnownPrivateEndpointBillingSku} can be used interchangeably with PrivateEndpointBillingSku, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PayAsYouGo**: PayAsYouGo sku is the default price for private endpoints. \ + * **Fixed**: Fixed sku is best for high data processing private endpoints. + */ +export type PrivateEndpointBillingSku = string; + +/** ExtendedLocation complex type. */ +export interface ExtendedLocation { + /** The name of the extended location. */ + name?: string; + /** The type of the extended location. */ + type?: ExtendedLocationTypes; +} + +export function extendedLocationSerializer(item: ExtendedLocation): any { + return { name: item["name"], type: item["type"] }; +} + +export function extendedLocationDeserializer(item: any): ExtendedLocation { + return { + name: item["name"], + type: item["type"], + }; +} + +/** The supported ExtendedLocation types. Currently only EdgeZone is supported in Microsoft.Network resources. */ +export enum KnownExtendedLocationTypes { + /** EdgeZone */ + EdgeZone = "EdgeZone", +} + +/** + * The supported ExtendedLocation types. Currently only EdgeZone is supported in Microsoft.Network resources. \ + * {@link KnownExtendedLocationTypes} can be used interchangeably with ExtendedLocationTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **EdgeZone**: EdgeZone + */ +export type ExtendedLocationTypes = string; + +/** DNS settings of a network interface. */ +export interface NetworkInterfaceDnsSettings { + /** List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. */ + dnsServers?: string[]; + /** If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. */ + readonly appliedDnsServers?: string[]; + /** Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. */ + internalDnsNameLabel?: string; + /** Fully qualified DNS name supporting internal communications between VMs in the same virtual network. */ + readonly internalFqdn?: string; + /** Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. */ + readonly internalDomainNameSuffix?: string; +} + +export function networkInterfaceDnsSettingsSerializer(item: NetworkInterfaceDnsSettings): any { + return { + dnsServers: !item["dnsServers"] + ? item["dnsServers"] + : item["dnsServers"].map((p: any) => { + return p; + }), + internalDnsNameLabel: item["internalDnsNameLabel"], + }; +} + +export function networkInterfaceDnsSettingsDeserializer(item: any): NetworkInterfaceDnsSettings { + return { + dnsServers: !item["dnsServers"] + ? item["dnsServers"] + : item["dnsServers"].map((p: any) => { + return p; + }), + appliedDnsServers: !item["appliedDnsServers"] + ? item["appliedDnsServers"] + : item["appliedDnsServers"].map((p: any) => { + return p; + }), + internalDnsNameLabel: item["internalDnsNameLabel"], + internalFqdn: item["internalFqdn"], + internalDomainNameSuffix: item["internalDomainNameSuffix"], + }; +} + +/** Type of Network Interface resource. */ +export enum KnownNetworkInterfaceNicType { + /** Standard */ + Standard = "Standard", + /** Elastic */ + Elastic = "Elastic", +} + +/** + * Type of Network Interface resource. \ + * {@link KnownNetworkInterfaceNicType} can be used interchangeably with NetworkInterfaceNicType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard \ + * **Elastic**: Elastic + */ +export type NetworkInterfaceNicType = string; + +/** Private link service resource. */ +export interface PrivateLinkService extends Resource { + /** The extended location of the load balancer. */ + extendedLocation?: ExtendedLocation; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** An array of references to the load balancer IP configurations. */ + loadBalancerFrontendIpConfigurations?: FrontendIPConfiguration[]; + /** An array of private link service IP configurations. */ + ipConfigurations?: PrivateLinkServiceIpConfiguration[]; + /** The destination IP address of the private link service. */ + destinationIPAddress?: string; + /** The access mode of the private link service. */ + accessMode?: AccessMode; + /** An array of references to the network interfaces created for this private link service. */ + readonly networkInterfaces?: NetworkInterface[]; + /** The provisioning state of the private link service resource. */ + readonly provisioningState?: CommonProvisioningState; + /** An array of list about connections to the private endpoint. */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** The visibility list of the private link service. */ + visibility?: PrivateLinkServicePropertiesVisibility; + /** The auto-approval list of the private link service. */ + autoApproval?: PrivateLinkServicePropertiesAutoApproval; + /** The list of Fqdn. */ + fqdns?: string[]; + /** The alias of the private link service. */ + readonly alias?: string; + /** Whether the private link service is enabled for proxy protocol or not. */ + enableProxyProtocol?: boolean; +} + +export function privateLinkServiceSerializer(item: PrivateLinkService): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "loadBalancerFrontendIpConfigurations", + "ipConfigurations", + "destinationIPAddress", + "accessMode", + "visibility", + "autoApproval", + "fqdns", + "enableProxyProtocol", + ]) + ? undefined + : _privateLinkServicePropertiesSerializer(item), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function privateLinkServiceDeserializer(item: any): PrivateLinkService { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _privateLinkServicePropertiesDeserializer(item["properties"])), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationDeserializer(item["extendedLocation"]), + etag: item["etag"], + }; +} + +/** Properties of the private link service. */ +export interface PrivateLinkServiceProperties { + /** An array of references to the load balancer IP configurations. */ + loadBalancerFrontendIpConfigurations?: FrontendIPConfiguration[]; + /** An array of private link service IP configurations. */ + ipConfigurations?: PrivateLinkServiceIpConfiguration[]; + /** The destination IP address of the private link service. */ + destinationIPAddress?: string; + /** The access mode of the private link service. */ + accessMode?: AccessMode; + /** An array of references to the network interfaces created for this private link service. */ + readonly networkInterfaces?: NetworkInterface[]; + /** The provisioning state of the private link service resource. */ + readonly provisioningState?: CommonProvisioningState; + /** An array of list about connections to the private endpoint. */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** The visibility list of the private link service. */ + visibility?: PrivateLinkServicePropertiesVisibility; + /** The auto-approval list of the private link service. */ + autoApproval?: PrivateLinkServicePropertiesAutoApproval; + /** The list of Fqdn. */ + fqdns?: string[]; + /** The alias of the private link service. */ + readonly alias?: string; + /** Whether the private link service is enabled for proxy protocol or not. */ + enableProxyProtocol?: boolean; +} + +export function privateLinkServicePropertiesSerializer(item: PrivateLinkServiceProperties): any { + return { + loadBalancerFrontendIpConfigurations: !item["loadBalancerFrontendIpConfigurations"] + ? item["loadBalancerFrontendIpConfigurations"] + : frontendIPConfigurationArraySerializer(item["loadBalancerFrontendIpConfigurations"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : privateLinkServiceIpConfigurationArraySerializer(item["ipConfigurations"]), + destinationIPAddress: item["destinationIPAddress"], + accessMode: item["accessMode"], + visibility: !item["visibility"] + ? item["visibility"] + : privateLinkServicePropertiesVisibilitySerializer(item["visibility"]), + autoApproval: !item["autoApproval"] + ? item["autoApproval"] + : privateLinkServicePropertiesAutoApprovalSerializer(item["autoApproval"]), + fqdns: !item["fqdns"] + ? item["fqdns"] + : item["fqdns"].map((p: any) => { + return p; + }), + enableProxyProtocol: item["enableProxyProtocol"], + }; +} + +export function privateLinkServicePropertiesDeserializer(item: any): PrivateLinkServiceProperties { + return { + loadBalancerFrontendIpConfigurations: !item["loadBalancerFrontendIpConfigurations"] + ? item["loadBalancerFrontendIpConfigurations"] + : frontendIPConfigurationArrayDeserializer(item["loadBalancerFrontendIpConfigurations"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : privateLinkServiceIpConfigurationArrayDeserializer(item["ipConfigurations"]), + destinationIPAddress: item["destinationIPAddress"], + accessMode: item["accessMode"], + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceArrayDeserializer(item["networkInterfaces"]), + provisioningState: item["provisioningState"], + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : privateEndpointConnectionArrayDeserializer(item["privateEndpointConnections"]), + visibility: !item["visibility"] + ? item["visibility"] + : privateLinkServicePropertiesVisibilityDeserializer(item["visibility"]), + autoApproval: !item["autoApproval"] + ? item["autoApproval"] + : privateLinkServicePropertiesAutoApprovalDeserializer(item["autoApproval"]), + fqdns: !item["fqdns"] + ? item["fqdns"] + : item["fqdns"].map((p: any) => { + return p; + }), + alias: item["alias"], + enableProxyProtocol: item["enableProxyProtocol"], + }; +} + +export function frontendIPConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return frontendIPConfigurationSerializer(item); + }); +} + +export function frontendIPConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return frontendIPConfigurationDeserializer(item); + }); +} + +export function privateLinkServiceIpConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return privateLinkServiceIpConfigurationSerializer(item); + }); +} + +export function privateLinkServiceIpConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return privateLinkServiceIpConfigurationDeserializer(item); + }); +} + +/** The private link service ip configuration. */ +export interface PrivateLinkServiceIpConfiguration extends SubResource { + /** The name of private link service ip configuration. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The resource type. */ + readonly type?: string; + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** The reference to the subnet resource. */ + subnet?: Subnet; + /** Whether the ip configuration is primary or not. */ + primary?: boolean; + /** The provisioning state of the private link service IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. */ + privateIPAddressVersion?: IPVersion; +} + +export function privateLinkServiceIpConfigurationSerializer( + item: PrivateLinkServiceIpConfiguration, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "privateIPAddress", + "privateIPAllocationMethod", + "subnet", + "primary", + "privateIPAddressVersion", + ]) + ? undefined + : _privateLinkServiceIpConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function privateLinkServiceIpConfigurationDeserializer( + item: any, +): PrivateLinkServiceIpConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _privateLinkServiceIpConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of private link service IP configuration. */ +export interface PrivateLinkServiceIpConfigurationProperties { + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** The reference to the subnet resource. */ + subnet?: Subnet; + /** Whether the ip configuration is primary or not. */ + primary?: boolean; + /** The provisioning state of the private link service IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. */ + privateIPAddressVersion?: IPVersion; +} + +export function privateLinkServiceIpConfigurationPropertiesSerializer( + item: PrivateLinkServiceIpConfigurationProperties, +): any { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + primary: item["primary"], + privateIPAddressVersion: item["privateIPAddressVersion"], + }; +} + +export function privateLinkServiceIpConfigurationPropertiesDeserializer( + item: any, +): PrivateLinkServiceIpConfigurationProperties { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + primary: item["primary"], + provisioningState: item["provisioningState"], + privateIPAddressVersion: item["privateIPAddressVersion"], + }; +} + +/** The access mode of the private link service. */ +export enum KnownAccessMode { + /** Allows unrestricted access to the private link service. */ + Default = "Default", + /** Limits access to subscriptions which are inside visibility list only. */ + Restricted = "Restricted", +} + +/** + * The access mode of the private link service. \ + * {@link KnownAccessMode} can be used interchangeably with AccessMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default**: Allows unrestricted access to the private link service. \ + * **Restricted**: Limits access to subscriptions which are inside visibility list only. + */ +export type AccessMode = string; + +export function privateEndpointConnectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return privateEndpointConnectionSerializer(item); + }); +} + +export function privateEndpointConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return privateEndpointConnectionDeserializer(item); + }); +} + +/** PrivateEndpointConnection resource. */ +export interface PrivateEndpointConnection extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The resource of private end point. */ + readonly privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** The provisioning state of the private endpoint connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The consumer link id. */ + readonly linkIdentifier?: string; + /** The location of the private endpoint. */ + readonly privateEndpointLocation?: string; +} + +export function privateEndpointConnectionSerializer(item: PrivateEndpointConnection): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["privateLinkServiceConnectionState"]) + ? undefined + : _privateEndpointConnectionPropertiesSerializer(item), + }; +} + +export function privateEndpointConnectionDeserializer(item: any): PrivateEndpointConnection { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _privateEndpointConnectionPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the PrivateEndpointConnectProperties. */ +export interface PrivateEndpointConnectionProperties { + /** The resource of private end point. */ + readonly privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** The provisioning state of the private endpoint connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The consumer link id. */ + readonly linkIdentifier?: string; + /** The location of the private endpoint. */ + readonly privateEndpointLocation?: string; +} + +export function privateEndpointConnectionPropertiesSerializer( + item: PrivateEndpointConnectionProperties, +): any { + return { + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateSerializer(item["privateLinkServiceConnectionState"]), + }; +} + +export function privateEndpointConnectionPropertiesDeserializer( + item: any, +): PrivateEndpointConnectionProperties { + return { + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : privateEndpointDeserializer(item["privateEndpoint"]), + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateDeserializer(item["privateLinkServiceConnectionState"]), + provisioningState: item["provisioningState"], + linkIdentifier: item["linkIdentifier"], + privateEndpointLocation: item["privateEndpointLocation"], + }; +} + +/** The visibility list of the private link service. */ +export interface PrivateLinkServicePropertiesVisibility extends ResourceSet {} + +export function privateLinkServicePropertiesVisibilitySerializer( + item: PrivateLinkServicePropertiesVisibility, +): any { + return { + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : item["subscriptions"].map((p: any) => { + return p; + }), + }; +} + +export function privateLinkServicePropertiesVisibilityDeserializer( + item: any, +): PrivateLinkServicePropertiesVisibility { + return { + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : item["subscriptions"].map((p: any) => { + return p; + }), + }; +} + +/** The auto-approval list of the private link service. */ +export interface PrivateLinkServicePropertiesAutoApproval extends ResourceSet {} + +export function privateLinkServicePropertiesAutoApprovalSerializer( + item: PrivateLinkServicePropertiesAutoApproval, +): any { + return { + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : item["subscriptions"].map((p: any) => { + return p; + }), + }; +} + +export function privateLinkServicePropertiesAutoApprovalDeserializer( + item: any, +): PrivateLinkServicePropertiesAutoApproval { + return { + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : item["subscriptions"].map((p: any) => { + return p; + }), + }; +} + +/** Migration phase of Network Interface resource. */ +export enum KnownNetworkInterfaceMigrationPhase { + /** None */ + None = "None", + /** Prepare */ + Prepare = "Prepare", + /** Commit */ + Commit = "Commit", + /** Abort */ + Abort = "Abort", + /** Committed */ + Committed = "Committed", +} + +/** + * Migration phase of Network Interface resource. \ + * {@link KnownNetworkInterfaceMigrationPhase} can be used interchangeably with NetworkInterfaceMigrationPhase, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **Prepare**: Prepare \ + * **Commit**: Commit \ + * **Abort**: Abort \ + * **Committed**: Committed + */ +export type NetworkInterfaceMigrationPhase = string; + +/** Auxiliary mode of Network Interface resource. */ +export enum KnownNetworkInterfaceAuxiliaryMode { + /** None */ + None = "None", + /** MaxConnections */ + MaxConnections = "MaxConnections", + /** Floating */ + Floating = "Floating", + /** AcceleratedConnections */ + AcceleratedConnections = "AcceleratedConnections", +} + +/** + * Auxiliary mode of Network Interface resource. \ + * {@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**: None \ + * **MaxConnections**: MaxConnections \ + * **Floating**: Floating \ + * **AcceleratedConnections**: AcceleratedConnections + */ +export type NetworkInterfaceAuxiliaryMode = string; + +/** Auxiliary sku of Network Interface resource. */ +export enum KnownNetworkInterfaceAuxiliarySku { + /** None */ + None = "None", + /** A1 */ + A1 = "A1", + /** A2 */ + A2 = "A2", + /** A4 */ + A4 = "A4", + /** A8 */ + A8 = "A8", +} + +/** + * Auxiliary sku of Network Interface resource. \ + * {@link KnownNetworkInterfaceAuxiliarySku} can be used interchangeably with NetworkInterfaceAuxiliarySku, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **A1**: A1 \ + * **A2**: A2 \ + * **A4**: A4 \ + * **A8**: A8 + */ +export type NetworkInterfaceAuxiliarySku = string; + +export function subnetArraySerializer(result: Array): any[] { + return result.map((item) => { + return subnetSerializer(item); + }); +} + +export function subnetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return subnetDeserializer(item); + }); +} + +export function flowLogArraySerializer(result: Array): any[] { + return result.map((item) => { + return flowLogSerializer(item); + }); +} + +export function flowLogArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return flowLogDeserializer(item); + }); +} + +/** A flow log resource. */ +export interface FlowLog extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** FlowLog resource Managed Identity */ + identity?: ManagedServiceIdentity; + /** ID of network security group to which flow log will be applied. */ + targetResourceId?: string; + /** Guid of network security group to which flow log will be applied. */ + readonly targetResourceGuid?: string; + /** ID of the storage account which is used to store the flow log. */ + storageId?: string; + /** Optional field to filter network traffic logs based on SrcIP, SrcPort, DstIP, DstPort, Protocol, Encryption, Direction and Action. If not specified, all network traffic will be logged. */ + enabledFilteringCriteria?: string; + /** Optional field to filter network traffic logs based on flow states. Value of this field could be any comma separated combination string of letters B,C,E or D. B represents Begin, when a flow is created. C represents Continue for an ongoing flow generated at every five-minute interval. E represents End, when a flow is terminated. D represents Deny, when a flow is denied. If not specified, all network traffic will be logged. */ + recordTypes?: string; + /** Flag to enable/disable flow logging. */ + enabled?: boolean; + /** Parameters that define the retention policy for flow log. */ + retentionPolicy?: RetentionPolicyParameters; + /** Parameters that define the flow log format. */ + format?: FlowLogFormatParameters; + /** Parameters that define the configuration of traffic analytics. */ + flowAnalyticsConfiguration?: TrafficAnalyticsProperties; + /** The provisioning state of the flow log. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function flowLogSerializer(item: FlowLog): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "targetResourceId", + "storageId", + "enabledFilteringCriteria", + "recordTypes", + "enabled", + "retentionPolicy", + "format", + "flowAnalyticsConfiguration", + ]) + ? undefined + : _flowLogPropertiesSerializer(item), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + }; +} + +export function flowLogDeserializer(item: any): FlowLog { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _flowLogPropertiesDeserializer(item["properties"])), + etag: item["etag"], + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentityDeserializer(item["identity"]), + }; +} + +/** Parameters that define the configuration of flow log. */ +export interface FlowLogPropertiesFormat { + /** ID of network security group to which flow log will be applied. */ + targetResourceId: string; + /** Guid of network security group to which flow log will be applied. */ + readonly targetResourceGuid?: string; + /** ID of the storage account which is used to store the flow log. */ + storageId: string; + /** Optional field to filter network traffic logs based on SrcIP, SrcPort, DstIP, DstPort, Protocol, Encryption, Direction and Action. If not specified, all network traffic will be logged. */ + enabledFilteringCriteria?: string; + /** Optional field to filter network traffic logs based on flow states. Value of this field could be any comma separated combination string of letters B,C,E or D. B represents Begin, when a flow is created. C represents Continue for an ongoing flow generated at every five-minute interval. E represents End, when a flow is terminated. D represents Deny, when a flow is denied. If not specified, all network traffic will be logged. */ + recordTypes?: string; + /** Flag to enable/disable flow logging. */ + enabled?: boolean; + /** Parameters that define the retention policy for flow log. */ + retentionPolicy?: RetentionPolicyParameters; + /** Parameters that define the flow log format. */ + format?: FlowLogFormatParameters; + /** Parameters that define the configuration of traffic analytics. */ + flowAnalyticsConfiguration?: TrafficAnalyticsProperties; + /** The provisioning state of the flow log. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function flowLogPropertiesFormatSerializer(item: FlowLogPropertiesFormat): any { + return { + targetResourceId: item["targetResourceId"], + storageId: item["storageId"], + enabledFilteringCriteria: item["enabledFilteringCriteria"], + recordTypes: item["recordTypes"], + enabled: item["enabled"], + retentionPolicy: !item["retentionPolicy"] + ? item["retentionPolicy"] + : retentionPolicyParametersSerializer(item["retentionPolicy"]), + format: !item["format"] ? item["format"] : flowLogFormatParametersSerializer(item["format"]), + flowAnalyticsConfiguration: !item["flowAnalyticsConfiguration"] + ? item["flowAnalyticsConfiguration"] + : trafficAnalyticsPropertiesSerializer(item["flowAnalyticsConfiguration"]), + }; +} + +export function flowLogPropertiesFormatDeserializer(item: any): FlowLogPropertiesFormat { + return { + targetResourceId: item["targetResourceId"], + targetResourceGuid: item["targetResourceGuid"], + storageId: item["storageId"], + enabledFilteringCriteria: item["enabledFilteringCriteria"], + recordTypes: item["recordTypes"], + enabled: item["enabled"], + retentionPolicy: !item["retentionPolicy"] + ? item["retentionPolicy"] + : retentionPolicyParametersDeserializer(item["retentionPolicy"]), + format: !item["format"] ? item["format"] : flowLogFormatParametersDeserializer(item["format"]), + flowAnalyticsConfiguration: !item["flowAnalyticsConfiguration"] + ? item["flowAnalyticsConfiguration"] + : trafficAnalyticsPropertiesDeserializer(item["flowAnalyticsConfiguration"]), + provisioningState: item["provisioningState"], + }; +} + +/** Parameters that define the retention policy for flow log. */ +export interface RetentionPolicyParameters { + /** Number of days to retain flow log records. */ + days?: number; + /** Flag to enable/disable retention. */ + enabled?: boolean; +} + +export function retentionPolicyParametersSerializer(item: RetentionPolicyParameters): any { + return { days: item["days"], enabled: item["enabled"] }; +} + +export function retentionPolicyParametersDeserializer(item: any): RetentionPolicyParameters { + return { + days: item["days"], + enabled: item["enabled"], + }; +} + +/** Parameters that define the flow log format. */ +export interface FlowLogFormatParameters { + /** The file type of flow log. */ + type?: FlowLogFormatType; + /** The version (revision) of the flow log. */ + version?: number; +} + +export function flowLogFormatParametersSerializer(item: FlowLogFormatParameters): any { + return { type: item["type"], version: item["version"] }; +} + +export function flowLogFormatParametersDeserializer(item: any): FlowLogFormatParameters { + return { + type: item["type"], + version: item["version"], + }; +} + +/** The file type of flow log. */ +export enum KnownFlowLogFormatType { + /** JSON */ + Json = "JSON", +} + +/** + * The file type of flow log. \ + * {@link KnownFlowLogFormatType} can be used interchangeably with FlowLogFormatType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **JSON**: JSON + */ +export type FlowLogFormatType = string; + +/** Parameters that define the configuration of traffic analytics. */ +export interface TrafficAnalyticsProperties { + /** Parameters that define the configuration of traffic analytics. */ + networkWatcherFlowAnalyticsConfiguration?: TrafficAnalyticsConfigurationProperties; +} + +export function trafficAnalyticsPropertiesSerializer(item: TrafficAnalyticsProperties): any { + return { + networkWatcherFlowAnalyticsConfiguration: !item["networkWatcherFlowAnalyticsConfiguration"] + ? item["networkWatcherFlowAnalyticsConfiguration"] + : trafficAnalyticsConfigurationPropertiesSerializer( + item["networkWatcherFlowAnalyticsConfiguration"], + ), + }; +} + +export function trafficAnalyticsPropertiesDeserializer(item: any): TrafficAnalyticsProperties { + return { + networkWatcherFlowAnalyticsConfiguration: !item["networkWatcherFlowAnalyticsConfiguration"] + ? item["networkWatcherFlowAnalyticsConfiguration"] + : trafficAnalyticsConfigurationPropertiesDeserializer( + item["networkWatcherFlowAnalyticsConfiguration"], + ), + }; +} + +/** Parameters that define the configuration of traffic analytics. */ +export interface TrafficAnalyticsConfigurationProperties { + /** Flag to enable/disable traffic analytics. */ + enabled?: boolean; + /** The resource guid of the attached workspace. */ + workspaceId?: string; + /** The location of the attached workspace. */ + workspaceRegion?: string; + /** Resource Id of the attached workspace. */ + workspaceResourceId?: string; + /** The interval in minutes which would decide how frequently TA service should do flow analytics. */ + trafficAnalyticsInterval?: number; +} + +export function trafficAnalyticsConfigurationPropertiesSerializer( + item: TrafficAnalyticsConfigurationProperties, +): any { + return { + enabled: item["enabled"], + workspaceId: item["workspaceId"], + workspaceRegion: item["workspaceRegion"], + workspaceResourceId: item["workspaceResourceId"], + trafficAnalyticsInterval: item["trafficAnalyticsInterval"], + }; +} + +export function trafficAnalyticsConfigurationPropertiesDeserializer( + item: any, +): TrafficAnalyticsConfigurationProperties { + return { + enabled: item["enabled"], + workspaceId: item["workspaceId"], + workspaceRegion: item["workspaceRegion"], + workspaceResourceId: item["workspaceResourceId"], + trafficAnalyticsInterval: item["trafficAnalyticsInterval"], + }; +} + +/** Identity for the resource. */ +export interface ManagedServiceIdentity { + /** The principal id of the system assigned identity. This property will only be provided for a system assigned identity. */ + readonly principalId?: string; + /** The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. */ + readonly tenantId?: string; + /** The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. */ + type?: ResourceIdentityType; + /** The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + userAssignedIdentities?: Record< + string, + Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties + >; +} + +export function managedServiceIdentitySerializer(item: ManagedServiceIdentity): any { + return { + type: item["type"], + userAssignedIdentities: !item["userAssignedIdentities"] + ? item["userAssignedIdentities"] + : components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalpropertiesRecordSerializer( + item["userAssignedIdentities"], + ), + }; +} + +export function managedServiceIdentityDeserializer(item: any): ManagedServiceIdentity { + return { + principalId: item["principalId"], + tenantId: item["tenantId"], + type: item["type"], + userAssignedIdentities: !item["userAssignedIdentities"] + ? item["userAssignedIdentities"] + : components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalpropertiesRecordDeserializer( + item["userAssignedIdentities"], + ), + }; +} + +/** The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. */ +export type ResourceIdentityType = + | "SystemAssigned" + | "UserAssigned" + | "SystemAssigned, UserAssigned" + | "None"; + +export function components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalpropertiesRecordSerializer( + item: Record< + string, + Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties + >, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] + ? item[key] + : components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalpropertiesSerializer( + item[key], + ); + }); + return result; +} + +export function components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalpropertiesRecordDeserializer( + item: Record, +): Record< + string, + Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties +> { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] + ? item[key] + : components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalpropertiesDeserializer( + item[key], + ); + }); + return result; +} + +/** model interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties */ +export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { + /** The principal id of user assigned identity. */ + readonly principalId?: string; + /** The client id of user assigned identity. */ + readonly clientId?: string; +} + +export function components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalpropertiesSerializer( + _item: Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, +): any { + return {}; +} + +export function components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalpropertiesDeserializer( + item: any, +): Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { + return { + principalId: item["principalId"], + clientId: item["clientId"], + }; +} + +/** Route table resource. */ +export interface RouteTable extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Collection of routes contained within a route table. */ + routes?: Route[]; + /** A collection of references to subnets. */ + readonly subnets?: Subnet[]; + /** Whether to disable the routes learned by BGP on that route table. True means disable. */ + disableBgpRoutePropagation?: boolean; + /** Whether to disable the routes learned by peering on the route table. 'None' means peering routes are enabled, 'All' means all peering routes are disabled. */ + disablePeeringRoute?: DisablePeeringRoute; + /** The provisioning state of the route table resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The resource GUID property of the route table. */ + readonly resourceGuid?: string; +} + +export function routeTableSerializer(item: RouteTable): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "routes", + "disableBgpRoutePropagation", + "disablePeeringRoute", + ]) + ? undefined + : _routeTablePropertiesSerializer(item), + }; +} + +export function routeTableDeserializer(item: any): RouteTable { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _routeTablePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Route Table resource. */ +export interface RouteTablePropertiesFormat { + /** Collection of routes contained within a route table. */ + routes?: Route[]; + /** A collection of references to subnets. */ + readonly subnets?: Subnet[]; + /** Whether to disable the routes learned by BGP on that route table. True means disable. */ + disableBgpRoutePropagation?: boolean; + /** Whether to disable the routes learned by peering on the route table. 'None' means peering routes are enabled, 'All' means all peering routes are disabled. */ + disablePeeringRoute?: DisablePeeringRoute; + /** The provisioning state of the route table resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The resource GUID property of the route table. */ + readonly resourceGuid?: string; +} + +export function routeTablePropertiesFormatSerializer(item: RouteTablePropertiesFormat): any { + return { + routes: !item["routes"] ? item["routes"] : routeArraySerializer(item["routes"]), + disableBgpRoutePropagation: item["disableBgpRoutePropagation"], + disablePeeringRoute: item["disablePeeringRoute"], + }; +} + +export function routeTablePropertiesFormatDeserializer(item: any): RouteTablePropertiesFormat { + return { + routes: !item["routes"] ? item["routes"] : routeArrayDeserializer(item["routes"]), + subnets: !item["subnets"] ? item["subnets"] : subnetArrayDeserializer(item["subnets"]), + disableBgpRoutePropagation: item["disableBgpRoutePropagation"], + disablePeeringRoute: item["disablePeeringRoute"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function routeArraySerializer(result: Array): any[] { + return result.map((item) => { + return routeSerializer(item); + }); +} + +export function routeArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return routeDeserializer(item); + }); +} + +/** Route resource. */ +export interface Route extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The destination CIDR to which the route applies. */ + addressPrefix?: string; + /** The type of Azure hop the packet should be sent to. */ + nextHopType?: RouteNextHopType; + /** The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. */ + nextHopIpAddress?: string; + /** The next hop definition containing ECMP next hop IP addresses. Only allowed when nextHopType is VirtualApplianceEcmp. */ + nextHop?: RouteNextHopEcmp; + /** The provisioning state of the route resource. */ + readonly provisioningState?: CommonProvisioningState; + /** A value indicating whether this route overrides overlapping BGP routes regardless of LPM. */ + readonly hasBgpOverride?: boolean; +} + +export function routeSerializer(item: Route): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "addressPrefix", + "nextHopType", + "nextHopIpAddress", + "nextHop", + ]) + ? undefined + : _routePropertiesSerializer(item), + }; +} + +export function routeDeserializer(item: any): Route { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _routePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Route resource. */ +export interface RoutePropertiesFormat { + /** The destination CIDR to which the route applies. */ + addressPrefix?: string; + /** The type of Azure hop the packet should be sent to. */ + nextHopType: RouteNextHopType; + /** The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. */ + nextHopIpAddress?: string; + /** The next hop definition containing ECMP next hop IP addresses. Only allowed when nextHopType is VirtualApplianceEcmp. */ + nextHop?: RouteNextHopEcmp; + /** The provisioning state of the route resource. */ + readonly provisioningState?: CommonProvisioningState; + /** A value indicating whether this route overrides overlapping BGP routes regardless of LPM. */ + readonly hasBgpOverride?: boolean; +} + +export function routePropertiesFormatSerializer(item: RoutePropertiesFormat): any { + return { + addressPrefix: item["addressPrefix"], + nextHopType: item["nextHopType"], + nextHopIpAddress: item["nextHopIpAddress"], + nextHop: !item["nextHop"] ? item["nextHop"] : routeNextHopEcmpSerializer(item["nextHop"]), + }; +} + +export function routePropertiesFormatDeserializer(item: any): RoutePropertiesFormat { + return { + addressPrefix: item["addressPrefix"], + nextHopType: item["nextHopType"], + nextHopIpAddress: item["nextHopIpAddress"], + nextHop: !item["nextHop"] ? item["nextHop"] : routeNextHopEcmpDeserializer(item["nextHop"]), + provisioningState: item["provisioningState"], + hasBgpOverride: item["hasBgpOverride"], + }; +} + +/** The type of Azure hop the packet should be sent to. */ +export enum KnownRouteNextHopType { + /** VirtualNetworkGateway */ + VirtualNetworkGateway = "VirtualNetworkGateway", + /** VnetLocal */ + VnetLocal = "VnetLocal", + /** Internet */ + Internet = "Internet", + /** VirtualAppliance */ + VirtualAppliance = "VirtualAppliance", + /** Routes traffic to virtual appliances using Equal-Cost Multi-Path (ECMP) routing with multiple next hop IP addresses. */ + VirtualApplianceEcmp = "VirtualApplianceEcmp", + /** No next hop type. */ + None = "None", +} + +/** + * The type of Azure hop the packet should be sent to. \ + * {@link KnownRouteNextHopType} can be used interchangeably with RouteNextHopType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **VirtualNetworkGateway**: VirtualNetworkGateway \ + * **VnetLocal**: VnetLocal \ + * **Internet**: Internet \ + * **VirtualAppliance**: VirtualAppliance \ + * **VirtualApplianceEcmp**: Routes traffic to virtual appliances using Equal-Cost Multi-Path (ECMP) routing with multiple next hop IP addresses. \ + * **None**: No next hop type. + */ +export type RouteNextHopType = string; + +/** The next hop definition for ECMP routes containing multiple next hop IP addresses. */ +export interface RouteNextHopEcmp { + /** List of next hop IP addresses for ECMP routing. Must contain between 2 and 64 IP addresses. */ + nextHopIpAddresses: string[]; +} + +export function routeNextHopEcmpSerializer(item: RouteNextHopEcmp): any { + return { + nextHopIpAddresses: item["nextHopIpAddresses"].map((p: any) => { + return p; + }), + }; +} + +export function routeNextHopEcmpDeserializer(item: any): RouteNextHopEcmp { + return { + nextHopIpAddresses: item["nextHopIpAddresses"].map((p: any) => { + return p; + }), + }; +} + +/** Whether to disable the routes learned by peering on the route table. */ +export enum KnownDisablePeeringRoute { + /** Peering routes are enabled. */ + None = "None", + /** All peering routes are disabled. */ + All = "All", +} + +/** + * Whether to disable the routes learned by peering on the route table. \ + * {@link KnownDisablePeeringRoute} can be used interchangeably with DisablePeeringRoute, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: Peering routes are enabled. \ + * **All**: All peering routes are disabled. + */ +export type DisablePeeringRoute = string; + +export function serviceEndpointPropertiesFormatArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceEndpointPropertiesFormatSerializer(item); + }); +} + +export function serviceEndpointPropertiesFormatArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceEndpointPropertiesFormatDeserializer(item); + }); +} + +/** The service endpoint properties. */ +export interface ServiceEndpointPropertiesFormat { + /** The type of the endpoint service. */ + service?: string; + /** SubResource as network identifier. */ + networkIdentifier?: SubResource; + /** A list of locations. */ + locations?: string[]; + /** The provisioning state of the service endpoint resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function serviceEndpointPropertiesFormatSerializer( + item: ServiceEndpointPropertiesFormat, +): any { + return { + service: item["service"], + networkIdentifier: !item["networkIdentifier"] + ? item["networkIdentifier"] + : subResourceSerializer(item["networkIdentifier"]), + locations: !item["locations"] + ? item["locations"] + : item["locations"].map((p: any) => { + return p; + }), + }; +} + +export function serviceEndpointPropertiesFormatDeserializer( + item: any, +): ServiceEndpointPropertiesFormat { + return { + service: item["service"], + networkIdentifier: !item["networkIdentifier"] + ? item["networkIdentifier"] + : subResourceDeserializer(item["networkIdentifier"]), + locations: !item["locations"] + ? item["locations"] + : item["locations"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function serviceEndpointPolicyArraySerializer(result: Array): any[] { + return result.map((item) => { + return serviceEndpointPolicySerializer(item); + }); +} + +export function serviceEndpointPolicyArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceEndpointPolicyDeserializer(item); + }); +} + +/** Service End point policy resource. */ +export interface ServiceEndpointPolicy extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Kind of service endpoint policy. This is metadata used for the Azure portal experience. */ + readonly kind?: string; + /** A collection of service endpoint policy definitions of the service endpoint policy. */ + serviceEndpointPolicyDefinitions?: ServiceEndpointPolicyDefinition[]; + /** A collection of references to subnets. */ + readonly subnets?: Subnet[]; + /** The resource GUID property of the service endpoint policy resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the service endpoint policy resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The alias indicating if the policy belongs to a service */ + serviceAlias?: string; + /** A collection of contextual service endpoint policy. */ + contextualServiceEndpointPolicies?: string[]; +} + +export function serviceEndpointPolicySerializer(item: ServiceEndpointPolicy): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "serviceEndpointPolicyDefinitions", + "serviceAlias", + "contextualServiceEndpointPolicies", + ]) + ? undefined + : _serviceEndpointPolicyPropertiesSerializer(item), + }; +} + +export function serviceEndpointPolicyDeserializer(item: any): ServiceEndpointPolicy { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _serviceEndpointPolicyPropertiesDeserializer(item["properties"])), + etag: item["etag"], + kind: item["kind"], + }; +} + +/** Service Endpoint Policy resource. */ +export interface ServiceEndpointPolicyPropertiesFormat { + /** A collection of service endpoint policy definitions of the service endpoint policy. */ + serviceEndpointPolicyDefinitions?: ServiceEndpointPolicyDefinition[]; + /** A collection of references to subnets. */ + readonly subnets?: Subnet[]; + /** The resource GUID property of the service endpoint policy resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the service endpoint policy resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The alias indicating if the policy belongs to a service */ + serviceAlias?: string; + /** A collection of contextual service endpoint policy. */ + contextualServiceEndpointPolicies?: string[]; +} + +export function serviceEndpointPolicyPropertiesFormatSerializer( + item: ServiceEndpointPolicyPropertiesFormat, +): any { + return { + serviceEndpointPolicyDefinitions: !item["serviceEndpointPolicyDefinitions"] + ? item["serviceEndpointPolicyDefinitions"] + : serviceEndpointPolicyDefinitionArraySerializer(item["serviceEndpointPolicyDefinitions"]), + serviceAlias: item["serviceAlias"], + contextualServiceEndpointPolicies: !item["contextualServiceEndpointPolicies"] + ? item["contextualServiceEndpointPolicies"] + : item["contextualServiceEndpointPolicies"].map((p: any) => { + return p; + }), + }; +} + +export function serviceEndpointPolicyPropertiesFormatDeserializer( + item: any, +): ServiceEndpointPolicyPropertiesFormat { + return { + serviceEndpointPolicyDefinitions: !item["serviceEndpointPolicyDefinitions"] + ? item["serviceEndpointPolicyDefinitions"] + : serviceEndpointPolicyDefinitionArrayDeserializer(item["serviceEndpointPolicyDefinitions"]), + subnets: !item["subnets"] ? item["subnets"] : subnetArrayDeserializer(item["subnets"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + serviceAlias: item["serviceAlias"], + contextualServiceEndpointPolicies: !item["contextualServiceEndpointPolicies"] + ? item["contextualServiceEndpointPolicies"] + : item["contextualServiceEndpointPolicies"].map((p: any) => { + return p; + }), + }; +} + +export function serviceEndpointPolicyDefinitionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceEndpointPolicyDefinitionSerializer(item); + }); +} + +export function serviceEndpointPolicyDefinitionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceEndpointPolicyDefinitionDeserializer(item); + }); +} + +/** Service Endpoint policy definitions. */ +export interface ServiceEndpointPolicyDefinition extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** A description for this rule. Restricted to 140 chars. */ + description?: string; + /** Service endpoint name. */ + service?: string; + /** A list of service resources. */ + serviceResources?: string[]; + /** The provisioning state of the service endpoint policy definition resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function serviceEndpointPolicyDefinitionSerializer( + item: ServiceEndpointPolicyDefinition, +): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["description", "service", "serviceResources"]) + ? undefined + : _serviceEndpointPolicyDefinitionPropertiesSerializer(item), + }; +} + +export function serviceEndpointPolicyDefinitionDeserializer( + item: any, +): ServiceEndpointPolicyDefinition { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _serviceEndpointPolicyDefinitionPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Service Endpoint policy definition resource. */ +export interface ServiceEndpointPolicyDefinitionPropertiesFormat { + /** A description for this rule. Restricted to 140 chars. */ + description?: string; + /** Service endpoint name. */ + service?: string; + /** A list of service resources. */ + serviceResources?: string[]; + /** The provisioning state of the service endpoint policy definition resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function serviceEndpointPolicyDefinitionPropertiesFormatSerializer( + item: ServiceEndpointPolicyDefinitionPropertiesFormat, +): any { + return { + description: item["description"], + service: item["service"], + serviceResources: !item["serviceResources"] + ? item["serviceResources"] + : item["serviceResources"].map((p: any) => { + return p; + }), + }; +} + +export function serviceEndpointPolicyDefinitionPropertiesFormatDeserializer( + item: any, +): ServiceEndpointPolicyDefinitionPropertiesFormat { + return { + description: item["description"], + service: item["service"], + serviceResources: !item["serviceResources"] + ? item["serviceResources"] + : item["serviceResources"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function privateEndpointArraySerializer(result: Array): any[] { + return result.map((item) => { + return privateEndpointSerializer(item); + }); +} + +export function privateEndpointArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return privateEndpointDeserializer(item); + }); +} + +export function ipConfigurationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ipConfigurationDeserializer(item); + }); +} + +/** IP configuration. */ +export interface IPConfiguration extends 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. */ + readonly etag?: string; + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** The reference to the subnet resource. */ + subnet?: Subnet; + /** The reference to the public IP resource. */ + publicIPAddress?: PublicIPAddress; + /** The provisioning state of the IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function ipConfigurationDeserializer(item: any): IPConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _ipConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of IP configuration. */ +export interface IPConfigurationPropertiesFormat { + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** The reference to the subnet resource. */ + subnet?: Subnet; + /** The reference to the public IP resource. */ + publicIPAddress?: PublicIPAddress; + /** The provisioning state of the IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function ipConfigurationPropertiesFormatDeserializer( + item: any, +): IPConfigurationPropertiesFormat { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressDeserializer(item["publicIPAddress"]), + provisioningState: item["provisioningState"], + }; +} + +/** Public IP address resource. */ +export interface PublicIPAddress extends Resource { + /** The extended location of the public ip address. */ + extendedLocation?: ExtendedLocation; + /** The public IP address SKU. */ + sku?: PublicIPAddressSku; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** A list of availability zones denoting the IP allocated for the resource needs to come from. */ + zones?: string[]; + /** The public IP address allocation method. */ + publicIPAllocationMethod?: IPAllocationMethod; + /** The public IP address version. */ + publicIPAddressVersion?: IPVersion; + /** The IP configuration associated with the public IP address. */ + readonly ipConfiguration?: IPConfiguration; + /** The FQDN of the DNS record associated with the public IP address. */ + dnsSettings?: PublicIPAddressDnsSettings; + /** The DDoS protection custom policy associated with the public IP address. */ + ddosSettings?: DdosSettings; + /** The list of tags associated with the public IP address. */ + ipTags?: IpTag[]; + /** The IP address associated with the public IP address resource. */ + ipAddress?: string; + /** The Public IP Prefix this Public IP Address should be allocated from. */ + publicIPPrefix?: SubResource; + /** The idle timeout of the public IP address. */ + idleTimeoutInMinutes?: number; + /** The resource GUID property of the public IP address resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the public IP address resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The service public IP address of the public IP address resource. */ + servicePublicIPAddress?: PublicIPAddress; + /** The NatGateway for the Public IP address. */ + natGateway?: NatGateway; + /** Migration phase of Public IP Address. */ + migrationPhase?: PublicIPAddressMigrationPhase; + /** The linked public IP address of the public IP address resource. */ + linkedPublicIPAddress?: PublicIPAddress; + /** Specify what happens to the public IP address when the VM using it is deleted */ + deleteOption?: DeleteOptions; +} + +export function publicIPAddressSerializer(item: PublicIPAddress): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "publicIPAllocationMethod", + "publicIPAddressVersion", + "dnsSettings", + "ddosSettings", + "ipTags", + "ipAddress", + "publicIPPrefix", + "idleTimeoutInMinutes", + "servicePublicIPAddress", + "natGateway", + "migrationPhase", + "linkedPublicIPAddress", + "deleteOption", + ]) + ? undefined + : _publicIPAddressPropertiesSerializer(item), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationSerializer(item["extendedLocation"]), + sku: !item["sku"] ? item["sku"] : publicIPAddressSkuSerializer(item["sku"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +export function publicIPAddressDeserializer(item: any): PublicIPAddress { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _publicIPAddressPropertiesDeserializer(item["properties"])), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationDeserializer(item["extendedLocation"]), + sku: !item["sku"] ? item["sku"] : publicIPAddressSkuDeserializer(item["sku"]), + etag: item["etag"], + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +/** Public IP address properties. */ +export interface PublicIPAddressPropertiesFormat { + /** The public IP address allocation method. */ + publicIPAllocationMethod?: IPAllocationMethod; + /** The public IP address version. */ + publicIPAddressVersion?: IPVersion; + /** The IP configuration associated with the public IP address. */ + readonly ipConfiguration?: IPConfiguration; + /** The FQDN of the DNS record associated with the public IP address. */ + dnsSettings?: PublicIPAddressDnsSettings; + /** The DDoS protection custom policy associated with the public IP address. */ + ddosSettings?: DdosSettings; + /** The list of tags associated with the public IP address. */ + ipTags?: IpTag[]; + /** The IP address associated with the public IP address resource. */ + ipAddress?: string; + /** The Public IP Prefix this Public IP Address should be allocated from. */ + publicIPPrefix?: SubResource; + /** The idle timeout of the public IP address. */ + idleTimeoutInMinutes?: number; + /** The resource GUID property of the public IP address resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the public IP address resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The service public IP address of the public IP address resource. */ + servicePublicIPAddress?: PublicIPAddress; + /** The NatGateway for the Public IP address. */ + natGateway?: NatGateway; + /** Migration phase of Public IP Address. */ + migrationPhase?: PublicIPAddressMigrationPhase; + /** The linked public IP address of the public IP address resource. */ + linkedPublicIPAddress?: PublicIPAddress; + /** Specify what happens to the public IP address when the VM using it is deleted */ + deleteOption?: DeleteOptions; +} + +export function publicIPAddressPropertiesFormatSerializer( + item: PublicIPAddressPropertiesFormat, +): any { + return { + publicIPAllocationMethod: item["publicIPAllocationMethod"], + publicIPAddressVersion: item["publicIPAddressVersion"], + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : publicIPAddressDnsSettingsSerializer(item["dnsSettings"]), + ddosSettings: !item["ddosSettings"] + ? item["ddosSettings"] + : ddosSettingsSerializer(item["ddosSettings"]), + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArraySerializer(item["ipTags"]), + ipAddress: item["ipAddress"], + publicIPPrefix: !item["publicIPPrefix"] + ? item["publicIPPrefix"] + : subResourceSerializer(item["publicIPPrefix"]), + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + servicePublicIPAddress: !item["servicePublicIPAddress"] + ? item["servicePublicIPAddress"] + : publicIPAddressSerializer(item["servicePublicIPAddress"]), + natGateway: !item["natGateway"] ? item["natGateway"] : natGatewaySerializer(item["natGateway"]), + migrationPhase: item["migrationPhase"], + linkedPublicIPAddress: !item["linkedPublicIPAddress"] + ? item["linkedPublicIPAddress"] + : publicIPAddressSerializer(item["linkedPublicIPAddress"]), + deleteOption: item["deleteOption"], + }; +} + +export function publicIPAddressPropertiesFormatDeserializer( + item: any, +): PublicIPAddressPropertiesFormat { + return { + publicIPAllocationMethod: item["publicIPAllocationMethod"], + publicIPAddressVersion: item["publicIPAddressVersion"], + ipConfiguration: !item["ipConfiguration"] + ? item["ipConfiguration"] + : ipConfigurationDeserializer(item["ipConfiguration"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : publicIPAddressDnsSettingsDeserializer(item["dnsSettings"]), + ddosSettings: !item["ddosSettings"] + ? item["ddosSettings"] + : ddosSettingsDeserializer(item["ddosSettings"]), + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArrayDeserializer(item["ipTags"]), + ipAddress: item["ipAddress"], + publicIPPrefix: !item["publicIPPrefix"] + ? item["publicIPPrefix"] + : subResourceDeserializer(item["publicIPPrefix"]), + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + servicePublicIPAddress: !item["servicePublicIPAddress"] + ? item["servicePublicIPAddress"] + : publicIPAddressDeserializer(item["servicePublicIPAddress"]), + natGateway: !item["natGateway"] + ? item["natGateway"] + : natGatewayDeserializer(item["natGateway"]), + migrationPhase: item["migrationPhase"], + linkedPublicIPAddress: !item["linkedPublicIPAddress"] + ? item["linkedPublicIPAddress"] + : publicIPAddressDeserializer(item["linkedPublicIPAddress"]), + deleteOption: item["deleteOption"], + }; +} + +/** Contains FQDN of the DNS record associated with the public IP address. */ +export interface PublicIPAddressDnsSettings { + /** The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. */ + domainNameLabel?: string; + /** The domain name label scope. If a domain name label and a domain name label scope are specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. */ + domainNameLabelScope?: PublicIpAddressDnsSettingsDomainNameLabelScope; + /** The Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. */ + fqdn?: string; + /** The reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. */ + reverseFqdn?: string; +} + +export function publicIPAddressDnsSettingsSerializer(item: PublicIPAddressDnsSettings): any { + return { + domainNameLabel: item["domainNameLabel"], + domainNameLabelScope: item["domainNameLabelScope"], + fqdn: item["fqdn"], + reverseFqdn: item["reverseFqdn"], + }; +} + +export function publicIPAddressDnsSettingsDeserializer(item: any): PublicIPAddressDnsSettings { + return { + domainNameLabel: item["domainNameLabel"], + domainNameLabelScope: item["domainNameLabelScope"], + fqdn: item["fqdn"], + reverseFqdn: item["reverseFqdn"], + }; +} + +/** The domain name label scope. If a domain name label and a domain name label scope are specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. */ +export type PublicIpAddressDnsSettingsDomainNameLabelScope = + | "TenantReuse" + | "SubscriptionReuse" + | "ResourceGroupReuse" + | "NoReuse"; + +/** Contains the DDoS protection settings of the public IP. */ +export interface DdosSettings { + /** The DDoS protection mode of the public IP */ + protectionMode?: DdosSettingsProtectionMode; + /** The DDoS custom policy associated with the public IP. */ + ddosCustomPolicy?: SubResource; + /** The DDoS protection plan associated with the public IP. Can only be set if ProtectionMode is Enabled */ + ddosProtectionPlan?: SubResource; +} + +export function ddosSettingsSerializer(item: DdosSettings): any { + return { + protectionMode: item["protectionMode"], + ddosCustomPolicy: !item["ddosCustomPolicy"] + ? item["ddosCustomPolicy"] + : subResourceSerializer(item["ddosCustomPolicy"]), + ddosProtectionPlan: !item["ddosProtectionPlan"] + ? item["ddosProtectionPlan"] + : subResourceSerializer(item["ddosProtectionPlan"]), + }; +} + +export function ddosSettingsDeserializer(item: any): DdosSettings { + return { + protectionMode: item["protectionMode"], + ddosCustomPolicy: !item["ddosCustomPolicy"] + ? item["ddosCustomPolicy"] + : subResourceDeserializer(item["ddosCustomPolicy"]), + ddosProtectionPlan: !item["ddosProtectionPlan"] + ? item["ddosProtectionPlan"] + : subResourceDeserializer(item["ddosProtectionPlan"]), + }; +} + +/** The DDoS protection mode of the public IP */ +export enum KnownDdosSettingsProtectionMode { + /** VirtualNetworkInherited */ + VirtualNetworkInherited = "VirtualNetworkInherited", + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * The DDoS protection mode of the public IP \ + * {@link KnownDdosSettingsProtectionMode} can be used interchangeably with DdosSettingsProtectionMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **VirtualNetworkInherited**: VirtualNetworkInherited \ + * **Enabled**: Enabled \ + * **Disabled**: Disabled + */ +export type DdosSettingsProtectionMode = string; + +export function ipTagArraySerializer(result: Array): any[] { + return result.map((item) => { + return ipTagSerializer(item); + }); +} + +export function ipTagArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ipTagDeserializer(item); + }); +} + +/** Contains the IpTag associated with the object. */ +export interface IpTag { + /** The IP tag type. Example: FirstPartyUsage. */ + ipTagType?: string; + /** The value of the IP tag associated with the public IP. Example: SQL. */ + tag?: string; +} + +export function ipTagSerializer(item: IpTag): any { + return { ipTagType: item["ipTagType"], tag: item["tag"] }; +} + +export function ipTagDeserializer(item: any): IpTag { + return { + ipTagType: item["ipTagType"], + tag: item["tag"], + }; +} + +/** Nat Gateway resource. */ +export interface NatGateway extends Resource { + /** The nat gateway SKU. */ + sku?: NatGatewaySku; + /** A list of availability zones denoting the zone in which Nat Gateway should be deployed. */ + zones?: string[]; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The idle timeout of the nat gateway. */ + idleTimeoutInMinutes?: number; + /** An array of public ip addresses V4 associated with the nat gateway resource. */ + publicIpAddresses?: SubResource[]; + /** An array of public ip addresses V6 associated with the nat gateway resource. */ + publicIpAddressesV6?: SubResource[]; + /** An array of public ip prefixes V4 associated with the nat gateway resource. */ + publicIpPrefixes?: SubResource[]; + /** An array of public ip prefixes V6 associated with the nat gateway resource. */ + publicIpPrefixesV6?: SubResource[]; + /** An array of references to the subnets using this nat gateway resource. */ + readonly subnets?: SubResource[]; + /** A reference to the source virtual network using this nat gateway resource. */ + sourceVirtualNetwork?: SubResource; + /** Reference to an existing service gateway. */ + serviceGateway?: SubResource; + /** Whether Nat64 is enabled for the NAT gateway resource. */ + nat64?: Nat64State; + /** The resource GUID property of the NAT gateway resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the NAT gateway resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function natGatewaySerializer(item: NatGateway): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "idleTimeoutInMinutes", + "publicIpAddresses", + "publicIpAddressesV6", + "publicIpPrefixes", + "publicIpPrefixesV6", + "sourceVirtualNetwork", + "serviceGateway", + "nat64", + ]) + ? undefined + : _natGatewayPropertiesSerializer(item), + sku: !item["sku"] ? item["sku"] : natGatewaySkuSerializer(item["sku"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +export function natGatewayDeserializer(item: any): NatGateway { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _natGatewayPropertiesDeserializer(item["properties"])), + sku: !item["sku"] ? item["sku"] : natGatewaySkuDeserializer(item["sku"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + etag: item["etag"], + }; +} + +/** Nat Gateway properties. */ +export interface NatGatewayPropertiesFormat { + /** The idle timeout of the nat gateway. */ + idleTimeoutInMinutes?: number; + /** An array of public ip addresses V4 associated with the nat gateway resource. */ + publicIpAddresses?: SubResource[]; + /** An array of public ip addresses V6 associated with the nat gateway resource. */ + publicIpAddressesV6?: SubResource[]; + /** An array of public ip prefixes V4 associated with the nat gateway resource. */ + publicIpPrefixes?: SubResource[]; + /** An array of public ip prefixes V6 associated with the nat gateway resource. */ + publicIpPrefixesV6?: SubResource[]; + /** An array of references to the subnets using this nat gateway resource. */ + readonly subnets?: SubResource[]; + /** A reference to the source virtual network using this nat gateway resource. */ + sourceVirtualNetwork?: SubResource; + /** Reference to an existing service gateway. */ + serviceGateway?: SubResource; + /** Whether Nat64 is enabled for the NAT gateway resource. */ + nat64?: Nat64State; + /** The resource GUID property of the NAT gateway resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the NAT gateway resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function natGatewayPropertiesFormatSerializer(item: NatGatewayPropertiesFormat): any { + return { + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + publicIpAddresses: !item["publicIpAddresses"] + ? item["publicIpAddresses"] + : subResourceArraySerializer(item["publicIpAddresses"]), + publicIpAddressesV6: !item["publicIpAddressesV6"] + ? item["publicIpAddressesV6"] + : subResourceArraySerializer(item["publicIpAddressesV6"]), + publicIpPrefixes: !item["publicIpPrefixes"] + ? item["publicIpPrefixes"] + : subResourceArraySerializer(item["publicIpPrefixes"]), + publicIpPrefixesV6: !item["publicIpPrefixesV6"] + ? item["publicIpPrefixesV6"] + : subResourceArraySerializer(item["publicIpPrefixesV6"]), + sourceVirtualNetwork: !item["sourceVirtualNetwork"] + ? item["sourceVirtualNetwork"] + : subResourceSerializer(item["sourceVirtualNetwork"]), + serviceGateway: !item["serviceGateway"] + ? item["serviceGateway"] + : subResourceSerializer(item["serviceGateway"]), + nat64: item["nat64"], + }; +} + +export function natGatewayPropertiesFormatDeserializer(item: any): NatGatewayPropertiesFormat { + return { + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + publicIpAddresses: !item["publicIpAddresses"] + ? item["publicIpAddresses"] + : subResourceArrayDeserializer(item["publicIpAddresses"]), + publicIpAddressesV6: !item["publicIpAddressesV6"] + ? item["publicIpAddressesV6"] + : subResourceArrayDeserializer(item["publicIpAddressesV6"]), + publicIpPrefixes: !item["publicIpPrefixes"] + ? item["publicIpPrefixes"] + : subResourceArrayDeserializer(item["publicIpPrefixes"]), + publicIpPrefixesV6: !item["publicIpPrefixesV6"] + ? item["publicIpPrefixesV6"] + : subResourceArrayDeserializer(item["publicIpPrefixesV6"]), + subnets: !item["subnets"] ? item["subnets"] : subResourceArrayDeserializer(item["subnets"]), + sourceVirtualNetwork: !item["sourceVirtualNetwork"] + ? item["sourceVirtualNetwork"] + : subResourceDeserializer(item["sourceVirtualNetwork"]), + serviceGateway: !item["serviceGateway"] + ? item["serviceGateway"] + : subResourceDeserializer(item["serviceGateway"]), + nat64: item["nat64"], + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +/** Whether Nat64 is enabled for the NAT gateway resource. */ +export enum KnownNat64State { + /** Nat64 Property is not set. */ + None = "None", + /** Nat64 is enabled. */ + Enabled = "Enabled", + /** Nat64 is disabled. */ + Disabled = "Disabled", +} + +/** + * Whether Nat64 is enabled for the NAT gateway resource. \ + * {@link KnownNat64State} can be used interchangeably with Nat64State, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: Nat64 Property is not set. \ + * **Enabled**: Nat64 is enabled. \ + * **Disabled**: Nat64 is disabled. + */ +export type Nat64State = string; + +/** SKU of nat gateway. */ +export interface NatGatewaySku { + /** Name of Nat Gateway SKU. */ + name?: NatGatewaySkuName; +} + +export function natGatewaySkuSerializer(item: NatGatewaySku): any { + return { name: item["name"] }; +} + +export function natGatewaySkuDeserializer(item: any): NatGatewaySku { + return { + name: item["name"], + }; +} + +/** Name of Nat Gateway SKU. */ +export enum KnownNatGatewaySkuName { + /** Standard */ + Standard = "Standard", + /** StandardV2 */ + StandardV2 = "StandardV2", +} + +/** + * Name of Nat Gateway SKU. \ + * {@link KnownNatGatewaySkuName} can be used interchangeably with NatGatewaySkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard \ + * **StandardV2**: StandardV2 + */ +export type NatGatewaySkuName = string; + +/** Migration phase of Public IP Address. */ +export enum KnownPublicIPAddressMigrationPhase { + /** None */ + None = "None", + /** Prepare */ + Prepare = "Prepare", + /** Commit */ + Commit = "Commit", + /** Abort */ + Abort = "Abort", + /** Committed */ + Committed = "Committed", +} + +/** + * Migration phase of Public IP Address. \ + * {@link KnownPublicIPAddressMigrationPhase} can be used interchangeably with PublicIPAddressMigrationPhase, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **Prepare**: Prepare \ + * **Commit**: Commit \ + * **Abort**: Abort \ + * **Committed**: Committed + */ +export type PublicIPAddressMigrationPhase = string; + +/** Specify what happens to the public IP address when the VM using it is deleted */ +export enum KnownDeleteOptions { + /** Delete */ + Delete = "Delete", + /** Detach */ + Detach = "Detach", +} + +/** + * Specify what happens to the public IP address when the VM using it is deleted \ + * {@link KnownDeleteOptions} can be used interchangeably with DeleteOptions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Delete**: Delete \ + * **Detach**: Detach + */ +export type DeleteOptions = string; + +/** SKU of a public IP address. */ +export interface PublicIPAddressSku { + /** Name of a public IP address SKU. */ + name?: PublicIPAddressSkuName; + /** Tier of a public IP address SKU. */ + tier?: PublicIPAddressSkuTier; +} + +export function publicIPAddressSkuSerializer(item: PublicIPAddressSku): any { + return { name: item["name"], tier: item["tier"] }; +} + +export function publicIPAddressSkuDeserializer(item: any): PublicIPAddressSku { + return { + name: item["name"], + tier: item["tier"], + }; +} + +/** Name of a public IP address SKU. */ +export enum KnownPublicIPAddressSkuName { + /** Basic */ + Basic = "Basic", + /** Standard */ + Standard = "Standard", + /** StandardV2 */ + StandardV2 = "StandardV2", +} + +/** + * Name of a public IP address SKU. \ + * {@link KnownPublicIPAddressSkuName} can be used interchangeably with PublicIPAddressSkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic**: Basic \ + * **Standard**: Standard \ + * **StandardV2**: StandardV2 + */ +export type PublicIPAddressSkuName = string; + +/** Tier of a public IP address SKU. */ +export enum KnownPublicIPAddressSkuTier { + /** Regional */ + Regional = "Regional", + /** Global */ + Global = "Global", +} + +/** + * Tier of a public IP address SKU. \ + * {@link KnownPublicIPAddressSkuTier} can be used interchangeably with PublicIPAddressSkuTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Regional**: Regional \ + * **Global**: Global + */ +export type PublicIPAddressSkuTier = string; + +export function ipConfigurationProfileArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return ipConfigurationProfileSerializer(item); + }); +} + +export function ipConfigurationProfileArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return ipConfigurationProfileDeserializer(item); + }); +} + +/** IP configuration profile child resource. */ +export interface IPConfigurationProfile extends SubResource { + /** The name of the resource. This name can be used to access the resource. */ + name?: string; + /** Sub Resource type. */ + readonly type?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The reference to the subnet resource to create a container network interface ip configuration. */ + subnet?: Subnet; + /** The provisioning state of the IP configuration profile resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function ipConfigurationProfileSerializer(item: IPConfigurationProfile): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["subnet"]) + ? undefined + : _ipConfigurationProfilePropertiesSerializer(item), + name: item["name"], + }; +} + +export function ipConfigurationProfileDeserializer(item: any): IPConfigurationProfile { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _ipConfigurationProfilePropertiesDeserializer(item["properties"])), + name: item["name"], + type: item["type"], + etag: item["etag"], + }; +} + +/** IP configuration profile properties. */ +export interface IPConfigurationProfilePropertiesFormat { + /** The reference to the subnet resource to create a container network interface ip configuration. */ + subnet?: Subnet; + /** The provisioning state of the IP configuration profile resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function ipConfigurationProfilePropertiesFormatSerializer( + item: IPConfigurationProfilePropertiesFormat, +): any { + return { subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]) }; +} + +export function ipConfigurationProfilePropertiesFormatDeserializer( + item: any, +): IPConfigurationProfilePropertiesFormat { + return { + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + provisioningState: item["provisioningState"], + }; +} + +export function resourceNavigationLinkArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return resourceNavigationLinkDeserializer(item); + }); +} + +/** ResourceNavigationLink resource. */ +export interface ResourceNavigationLink extends SubResource { + /** Name of the resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** Resource navigation link identifier. */ + readonly id?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Resource type. */ + readonly type?: string; + /** Resource type of the linked resource. */ + linkedResourceType?: string; + /** Link to the external resource. */ + link?: string; + /** The provisioning state of the resource navigation link resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function resourceNavigationLinkDeserializer(item: any): ResourceNavigationLink { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _resourceNavigationLinkPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of ResourceNavigationLink. */ +export interface ResourceNavigationLinkFormat { + /** Resource type of the linked resource. */ + linkedResourceType?: string; + /** Link to the external resource. */ + link?: string; + /** The provisioning state of the resource navigation link resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function resourceNavigationLinkFormatDeserializer(item: any): ResourceNavigationLinkFormat { + return { + linkedResourceType: item["linkedResourceType"], + link: item["link"], + provisioningState: item["provisioningState"], + }; +} + +export function serviceAssociationLinkArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceAssociationLinkDeserializer(item); + }); +} + +/** ServiceAssociationLink resource. */ +export interface ServiceAssociationLink extends SubResource { + /** 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. */ + readonly etag?: string; + /** Resource type. */ + readonly type?: string; + /** Resource type of the linked resource. */ + linkedResourceType?: string; + /** Link to the external resource. */ + link?: string; + /** The provisioning state of the service association link resource. */ + readonly provisioningState?: CommonProvisioningState; + /** If true, the resource can be deleted. */ + allowDelete?: boolean; + /** A list of locations. */ + locations?: string[]; +} + +export function serviceAssociationLinkDeserializer(item: any): ServiceAssociationLink { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _serviceAssociationLinkPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of ServiceAssociationLink. */ +export interface ServiceAssociationLinkPropertiesFormat { + /** Resource type of the linked resource. */ + linkedResourceType?: string; + /** Link to the external resource. */ + link?: string; + /** The provisioning state of the service association link resource. */ + readonly provisioningState?: CommonProvisioningState; + /** If true, the resource can be deleted. */ + allowDelete?: boolean; + /** A list of locations. */ + locations?: string[]; +} + +export function serviceAssociationLinkPropertiesFormatDeserializer( + item: any, +): ServiceAssociationLinkPropertiesFormat { + return { + linkedResourceType: item["linkedResourceType"], + link: item["link"], + provisioningState: item["provisioningState"], + allowDelete: item["allowDelete"], + locations: !item["locations"] + ? item["locations"] + : item["locations"].map((p: any) => { + return p; + }), + }; +} + +export function delegationArraySerializer(result: Array): any[] { + return result.map((item) => { + return delegationSerializer(item); + }); +} + +export function delegationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return delegationDeserializer(item); + }); +} + +/** Details the service to which the subnet is delegated. */ +export interface Delegation extends SubResource { + /** The name of the resource that is unique within a subnet. This name can be used to access the resource. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Resource type. */ + type?: string; + /** The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). */ + serviceName?: string; + /** The actions permitted to the service upon delegation. */ + readonly actions?: string[]; + /** The provisioning state of the service delegation resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function delegationSerializer(item: Delegation): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["serviceName"]) + ? undefined + : _delegationPropertiesSerializer(item), + name: item["name"], + type: item["type"], + }; +} + +export function delegationDeserializer(item: any): Delegation { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _delegationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of a service delegation. */ +export interface ServiceDelegationPropertiesFormat { + /** The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). */ + serviceName?: string; + /** The actions permitted to the service upon delegation. */ + readonly actions?: string[]; + /** The provisioning state of the service delegation resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function serviceDelegationPropertiesFormatSerializer( + item: ServiceDelegationPropertiesFormat, +): any { + return { serviceName: item["serviceName"] }; +} + +export function serviceDelegationPropertiesFormatDeserializer( + item: any, +): ServiceDelegationPropertiesFormat { + return { + serviceName: item["serviceName"], + actions: !item["actions"] + ? item["actions"] + : item["actions"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +/** Enable or Disable apply network policies on private end point in the subnet. */ +export enum KnownVirtualNetworkPrivateEndpointNetworkPolicies { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", + /** NetworkSecurityGroupEnabled */ + NetworkSecurityGroupEnabled = "NetworkSecurityGroupEnabled", + /** RouteTableEnabled */ + RouteTableEnabled = "RouteTableEnabled", +} + +/** + * Enable or Disable apply network policies on private end point in the subnet. \ + * {@link KnownVirtualNetworkPrivateEndpointNetworkPolicies} can be used interchangeably with VirtualNetworkPrivateEndpointNetworkPolicies, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Enabled \ + * **Disabled**: Disabled \ + * **NetworkSecurityGroupEnabled**: NetworkSecurityGroupEnabled \ + * **RouteTableEnabled**: RouteTableEnabled + */ +export type VirtualNetworkPrivateEndpointNetworkPolicies = string; + +/** Enable or Disable apply network policies on private link service in the subnet. */ +export enum KnownVirtualNetworkPrivateLinkServiceNetworkPolicies { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Enable or Disable apply network policies on private link service in the subnet. \ + * {@link KnownVirtualNetworkPrivateLinkServiceNetworkPolicies} can be used interchangeably with VirtualNetworkPrivateLinkServiceNetworkPolicies, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Enabled \ + * **Disabled**: Disabled + */ +export type VirtualNetworkPrivateLinkServiceNetworkPolicies = string; + +/** Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property can only be set if defaultOutboundAccess is set to false, both properties can only be set if subnet is empty. */ +export enum KnownSharingScope { + /** Tenant */ + Tenant = "Tenant", + /** DelegatedServices */ + DelegatedServices = "DelegatedServices", +} + +/** + * Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property can only be set if defaultOutboundAccess is set to false, both properties can only be set if subnet is empty. \ + * {@link KnownSharingScope} can be used interchangeably with SharingScope, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Tenant**: Tenant \ + * **DelegatedServices**: DelegatedServices + */ +export type SharingScope = string; + +export function ipamPoolPrefixAllocationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return ipamPoolPrefixAllocationSerializer(item); + }); +} + +export function ipamPoolPrefixAllocationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return ipamPoolPrefixAllocationDeserializer(item); + }); +} + +/** IpamPool prefix allocation reference. */ +export interface IpamPoolPrefixAllocation { + /** Number of IP addresses to allocate. */ + numberOfIpAddresses?: string; + /** List of assigned IP address prefixes in the IpamPool of the associated resource. */ + readonly allocatedAddressPrefixes?: string[]; + /** Resource id of the associated Azure IpamPool resource. */ + id?: string; +} + +export function ipamPoolPrefixAllocationSerializer(item: IpamPoolPrefixAllocation): any { + return { + pool: areAllPropsUndefined(item, ["id"]) + ? undefined + : _ipamPoolPrefixAllocationPoolSerializer(item), + numberOfIpAddresses: item["numberOfIpAddresses"], + }; +} + +export function ipamPoolPrefixAllocationDeserializer(item: any): IpamPoolPrefixAllocation { + return { + ...(!item["pool"] ? item["pool"] : _ipamPoolPrefixAllocationPoolDeserializer(item["pool"])), + numberOfIpAddresses: item["numberOfIpAddresses"], + allocatedAddressPrefixes: !item["allocatedAddressPrefixes"] + ? item["allocatedAddressPrefixes"] + : item["allocatedAddressPrefixes"].map((p: any) => { + return p; + }), + }; +} + +/** model interface IpamPoolPrefixAllocationPool */ +export interface IpamPoolPrefixAllocationPool { + /** Resource id of the associated Azure IpamPool resource. */ + id?: string; +} + +export function ipamPoolPrefixAllocationPoolSerializer(item: IpamPoolPrefixAllocationPool): any { + return { id: item["id"] }; +} + +export function ipamPoolPrefixAllocationPoolDeserializer(item: any): IpamPoolPrefixAllocationPool { + return { + id: item["id"], + }; +} + +/** DDoS protection settings for a frontend IP configuration. */ +export interface DdosFrontendIpConfigurationSettings { + /** The reference to the DDoS Custom Policy resource. */ + ddosCustomPolicy?: SubResource; +} + +export function ddosFrontendIpConfigurationSettingsSerializer( + item: DdosFrontendIpConfigurationSettings, +): any { + return { + ddosCustomPolicy: !item["ddosCustomPolicy"] + ? item["ddosCustomPolicy"] + : subResourceSerializer(item["ddosCustomPolicy"]), + }; +} + +export function ddosFrontendIpConfigurationSettingsDeserializer( + item: any, +): DdosFrontendIpConfigurationSettings { + return { + ddosCustomPolicy: !item["ddosCustomPolicy"] + ? item["ddosCustomPolicy"] + : subResourceDeserializer(item["ddosCustomPolicy"]), + }; +} + +export function backendAddressPoolArraySerializer(result: Array): any[] { + return result.map((item) => { + return backendAddressPoolSerializer(item); + }); +} + +export function backendAddressPoolArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return backendAddressPoolDeserializer(item); + }); +} + +/** Pool of backend IP addresses. */ +export interface BackendAddressPool extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The location of the backend address pool. */ + location?: string; + /** An array of gateway load balancer tunnel interfaces. */ + tunnelInterfaces?: GatewayLoadBalancerTunnelInterface[]; + /** An array of backend addresses. */ + loadBalancerBackendAddresses?: LoadBalancerBackendAddress[]; + /** An array of references to IP addresses defined in network interfaces. */ + readonly backendIPConfigurations?: NetworkInterfaceIPConfiguration[]; + /** An array of references to load balancing rules that use this backend address pool. */ + readonly loadBalancingRules?: SubResource[]; + /** A reference to an outbound rule that uses this backend address pool. */ + readonly outboundRule?: SubResource; + /** An array of references to outbound rules that use this backend address pool. */ + readonly outboundRules?: SubResource[]; + /** An array of references to inbound NAT rules that use this backend address pool. */ + readonly inboundNatRules?: SubResource[]; + /** The provisioning state of the backend address pool resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Amount of seconds Load Balancer waits for before sending RESET to client and backend address. */ + drainPeriodInSeconds?: number; + /** A reference to a virtual network. */ + virtualNetwork?: SubResource; + /** Backend address synchronous mode for the backend pool */ + syncMode?: SyncMode; +} + +export function backendAddressPoolSerializer(item: BackendAddressPool): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "location", + "tunnelInterfaces", + "loadBalancerBackendAddresses", + "drainPeriodInSeconds", + "virtualNetwork", + "syncMode", + ]) + ? undefined + : _backendAddressPoolPropertiesSerializer(item), + }; +} + +export function backendAddressPoolDeserializer(item: any): BackendAddressPool { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _backendAddressPoolPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the backend address pool. */ +export interface BackendAddressPoolPropertiesFormat { + /** The location of the backend address pool. */ + location?: string; + /** An array of gateway load balancer tunnel interfaces. */ + tunnelInterfaces?: GatewayLoadBalancerTunnelInterface[]; + /** An array of backend addresses. */ + loadBalancerBackendAddresses?: LoadBalancerBackendAddress[]; + /** An array of references to IP addresses defined in network interfaces. */ + readonly backendIPConfigurations?: NetworkInterfaceIPConfiguration[]; + /** An array of references to load balancing rules that use this backend address pool. */ + readonly loadBalancingRules?: SubResource[]; + /** A reference to an outbound rule that uses this backend address pool. */ + readonly outboundRule?: SubResource; + /** An array of references to outbound rules that use this backend address pool. */ + readonly outboundRules?: SubResource[]; + /** An array of references to inbound NAT rules that use this backend address pool. */ + readonly inboundNatRules?: SubResource[]; + /** The provisioning state of the backend address pool resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Amount of seconds Load Balancer waits for before sending RESET to client and backend address. */ + drainPeriodInSeconds?: number; + /** A reference to a virtual network. */ + virtualNetwork?: SubResource; + /** Backend address synchronous mode for the backend pool */ + syncMode?: SyncMode; +} + +export function backendAddressPoolPropertiesFormatSerializer( + item: BackendAddressPoolPropertiesFormat, +): any { + return { + location: item["location"], + tunnelInterfaces: !item["tunnelInterfaces"] + ? item["tunnelInterfaces"] + : gatewayLoadBalancerTunnelInterfaceArraySerializer(item["tunnelInterfaces"]), + loadBalancerBackendAddresses: !item["loadBalancerBackendAddresses"] + ? item["loadBalancerBackendAddresses"] + : loadBalancerBackendAddressArraySerializer(item["loadBalancerBackendAddresses"]), + drainPeriodInSeconds: item["drainPeriodInSeconds"], + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceSerializer(item["virtualNetwork"]), + syncMode: item["syncMode"], + }; +} + +export function backendAddressPoolPropertiesFormatDeserializer( + item: any, +): BackendAddressPoolPropertiesFormat { + return { + location: item["location"], + tunnelInterfaces: !item["tunnelInterfaces"] + ? item["tunnelInterfaces"] + : gatewayLoadBalancerTunnelInterfaceArrayDeserializer(item["tunnelInterfaces"]), + loadBalancerBackendAddresses: !item["loadBalancerBackendAddresses"] + ? item["loadBalancerBackendAddresses"] + : loadBalancerBackendAddressArrayDeserializer(item["loadBalancerBackendAddresses"]), + backendIPConfigurations: !item["backendIPConfigurations"] + ? item["backendIPConfigurations"] + : networkInterfaceIPConfigurationArrayDeserializer(item["backendIPConfigurations"]), + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : subResourceArrayDeserializer(item["loadBalancingRules"]), + outboundRule: !item["outboundRule"] + ? item["outboundRule"] + : subResourceDeserializer(item["outboundRule"]), + outboundRules: !item["outboundRules"] + ? item["outboundRules"] + : subResourceArrayDeserializer(item["outboundRules"]), + inboundNatRules: !item["inboundNatRules"] + ? item["inboundNatRules"] + : subResourceArrayDeserializer(item["inboundNatRules"]), + provisioningState: item["provisioningState"], + drainPeriodInSeconds: item["drainPeriodInSeconds"], + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceDeserializer(item["virtualNetwork"]), + syncMode: item["syncMode"], + }; +} + +export function gatewayLoadBalancerTunnelInterfaceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayLoadBalancerTunnelInterfaceSerializer(item); + }); +} + +export function gatewayLoadBalancerTunnelInterfaceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayLoadBalancerTunnelInterfaceDeserializer(item); + }); +} + +/** Gateway load balancer tunnel interface of a load balancer backend address pool. */ +export interface GatewayLoadBalancerTunnelInterface { + /** Port of gateway load balancer tunnel interface. */ + port?: number; + /** Identifier of gateway load balancer tunnel interface. */ + identifier?: number; + /** Protocol of gateway load balancer tunnel interface. */ + protocol?: GatewayLoadBalancerTunnelProtocol; + /** Traffic type of gateway load balancer tunnel interface. */ + type?: GatewayLoadBalancerTunnelInterfaceType; +} + +export function gatewayLoadBalancerTunnelInterfaceSerializer( + item: GatewayLoadBalancerTunnelInterface, +): any { + return { + port: item["port"], + identifier: item["identifier"], + protocol: item["protocol"], + type: item["type"], + }; +} + +export function gatewayLoadBalancerTunnelInterfaceDeserializer( + item: any, +): GatewayLoadBalancerTunnelInterface { + return { + port: item["port"], + identifier: item["identifier"], + protocol: item["protocol"], + type: item["type"], + }; +} + +/** Protocol of gateway load balancer tunnel interface. */ +export enum KnownGatewayLoadBalancerTunnelProtocol { + /** None */ + None = "None", + /** Native */ + Native = "Native", + /** VXLAN */ + Vxlan = "VXLAN", +} + +/** + * Protocol of gateway load balancer tunnel interface. \ + * {@link KnownGatewayLoadBalancerTunnelProtocol} can be used interchangeably with GatewayLoadBalancerTunnelProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **Native**: Native \ + * **VXLAN**: VXLAN + */ +export type GatewayLoadBalancerTunnelProtocol = string; + +/** Traffic type of gateway load balancer tunnel interface. */ +export enum KnownGatewayLoadBalancerTunnelInterfaceType { + /** None */ + None = "None", + /** Internal */ + Internal = "Internal", + /** External */ + External = "External", +} + +/** + * Traffic type of gateway load balancer tunnel interface. \ + * {@link KnownGatewayLoadBalancerTunnelInterfaceType} can be used interchangeably with GatewayLoadBalancerTunnelInterfaceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **Internal**: Internal \ + * **External**: External + */ +export type GatewayLoadBalancerTunnelInterfaceType = string; + +export function loadBalancerBackendAddressArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return loadBalancerBackendAddressSerializer(item); + }); +} + +export function loadBalancerBackendAddressArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return loadBalancerBackendAddressDeserializer(item); + }); +} + +/** Load balancer backend addresses. */ +export interface LoadBalancerBackendAddress { + /** Name of the backend address. */ + name?: string; + /** Reference to an existing virtual network. */ + virtualNetwork?: SubResource; + /** Reference to an existing subnet. */ + subnet?: SubResource; + /** IP Address belonging to the referenced virtual network. */ + ipAddress?: string; + /** Reference to IP address defined in network interfaces. */ + readonly networkInterfaceIPConfiguration?: SubResource; + /** Reference to the frontend ip address configuration defined in regional loadbalancer. */ + loadBalancerFrontendIPConfiguration?: SubResource; + /** Collection of inbound NAT rule port mappings. */ + 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; +} + +export function loadBalancerBackendAddressSerializer(item: LoadBalancerBackendAddress): any { + return { + properties: areAllPropsUndefined(item, [ + "virtualNetwork", + "subnet", + "ipAddress", + "loadBalancerFrontendIPConfiguration", + "adminState", + ]) + ? undefined + : _loadBalancerBackendAddressPropertiesSerializer(item), + name: item["name"], + }; +} + +export function loadBalancerBackendAddressDeserializer(item: any): LoadBalancerBackendAddress { + return { + ...(!item["properties"] + ? item["properties"] + : _loadBalancerBackendAddressPropertiesDeserializer(item["properties"])), + name: item["name"], + }; +} + +/** Properties of the load balancer backend addresses. */ +export interface LoadBalancerBackendAddressPropertiesFormat { + /** Reference to an existing virtual network. */ + virtualNetwork?: SubResource; + /** Reference to an existing subnet. */ + subnet?: SubResource; + /** IP Address belonging to the referenced virtual network. */ + ipAddress?: string; + /** Reference to IP address defined in network interfaces. */ + readonly networkInterfaceIPConfiguration?: SubResource; + /** Reference to the frontend ip address configuration defined in regional loadbalancer. */ + loadBalancerFrontendIPConfiguration?: SubResource; + /** Collection of inbound NAT rule port mappings. */ + 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; +} + +export function loadBalancerBackendAddressPropertiesFormatSerializer( + item: LoadBalancerBackendAddressPropertiesFormat, +): any { + return { + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceSerializer(item["virtualNetwork"]), + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + ipAddress: item["ipAddress"], + loadBalancerFrontendIPConfiguration: !item["loadBalancerFrontendIPConfiguration"] + ? item["loadBalancerFrontendIPConfiguration"] + : subResourceSerializer(item["loadBalancerFrontendIPConfiguration"]), + adminState: item["adminState"], + }; +} + +export function loadBalancerBackendAddressPropertiesFormatDeserializer( + item: any, +): LoadBalancerBackendAddressPropertiesFormat { + return { + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceDeserializer(item["virtualNetwork"]), + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + ipAddress: item["ipAddress"], + networkInterfaceIPConfiguration: !item["networkInterfaceIPConfiguration"] + ? item["networkInterfaceIPConfiguration"] + : subResourceDeserializer(item["networkInterfaceIPConfiguration"]), + loadBalancerFrontendIPConfiguration: !item["loadBalancerFrontendIPConfiguration"] + ? item["loadBalancerFrontendIPConfiguration"] + : subResourceDeserializer(item["loadBalancerFrontendIPConfiguration"]), + inboundNatRulesPortMapping: !item["inboundNatRulesPortMapping"] + ? item["inboundNatRulesPortMapping"] + : natRulePortMappingArrayDeserializer(item["inboundNatRulesPortMapping"]), + adminState: item["adminState"], + }; +} + +export function natRulePortMappingArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return natRulePortMappingDeserializer(item); + }); +} + +/** Individual port mappings for inbound NAT rule created for backend pool. */ +export interface NatRulePortMapping { + /** Name of inbound NAT rule. */ + inboundNatRuleName?: string; + /** Frontend port. */ + frontendPort?: number; + /** Backend port. */ + backendPort?: number; +} + +export function natRulePortMappingDeserializer(item: any): NatRulePortMapping { + return { + inboundNatRuleName: item["inboundNatRuleName"], + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + }; +} + +/** 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. */ +export enum KnownLoadBalancerBackendAddressAdminState { + /** None */ + None = "None", + /** Up */ + Up = "Up", + /** Down */ + Down = "Down", +} + +/** + * 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. \ + * {@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**: None \ + * **Up**: Up \ + * **Down**: Down + */ +export type LoadBalancerBackendAddressAdminState = string; + +/** Backend address synchronous mode for the backend pool */ +export enum KnownSyncMode { + /** Automatic */ + Automatic = "Automatic", + /** Manual */ + Manual = "Manual", +} + +/** + * Backend address synchronous mode for the backend pool \ + * {@link KnownSyncMode} can be used interchangeably with SyncMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Automatic**: Automatic \ + * **Manual**: Manual + */ +export type SyncMode = string; + +export function inboundNatRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return inboundNatRuleSerializer(item); + }); +} + +export function inboundNatRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return inboundNatRuleDeserializer(item); + }); +} + +/** Inbound NAT rule of the load balancer. */ +export interface InboundNatRule extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** A reference to frontend IP addresses. */ + frontendIPConfiguration?: SubResource; + /** A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. */ + readonly backendIPConfiguration?: NetworkInterfaceIPConfiguration; + /** The reference to the transport protocol used by the load balancing rule. */ + protocol?: TransportProtocol; + /** The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. */ + frontendPort?: number; + /** The port used for the internal endpoint. Acceptable values range from 1 to 65535. */ + backendPort?: number; + /** The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. */ + idleTimeoutInMinutes?: number; + /** Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. */ + enableFloatingIP?: boolean; + /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ + enableTcpReset?: boolean; + /** The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534. */ + frontendPortRangeStart?: number; + /** The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534. */ + frontendPortRangeEnd?: number; + /** A reference to backendAddressPool resource. */ + backendAddressPool?: SubResource; + /** The provisioning state of the inbound NAT rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function inboundNatRuleSerializer(item: InboundNatRule): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "frontendIPConfiguration", + "protocol", + "frontendPort", + "backendPort", + "idleTimeoutInMinutes", + "enableFloatingIP", + "enableTcpReset", + "frontendPortRangeStart", + "frontendPortRangeEnd", + "backendAddressPool", + ]) + ? undefined + : _inboundNatRulePropertiesSerializer(item), + }; +} + +export function inboundNatRuleDeserializer(item: any): InboundNatRule { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _inboundNatRulePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the inbound NAT rule. */ +export interface InboundNatRulePropertiesFormat { + /** A reference to frontend IP addresses. */ + frontendIPConfiguration?: SubResource; + /** A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. */ + readonly backendIPConfiguration?: NetworkInterfaceIPConfiguration; + /** The reference to the transport protocol used by the load balancing rule. */ + protocol?: TransportProtocol; + /** The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. */ + frontendPort?: number; + /** The port used for the internal endpoint. Acceptable values range from 1 to 65535. */ + backendPort?: number; + /** The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. */ + idleTimeoutInMinutes?: number; + /** Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. */ + enableFloatingIP?: boolean; + /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ + enableTcpReset?: boolean; + /** The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534. */ + frontendPortRangeStart?: number; + /** The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534. */ + frontendPortRangeEnd?: number; + /** A reference to backendAddressPool resource. */ + backendAddressPool?: SubResource; + /** The provisioning state of the inbound NAT rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function inboundNatRulePropertiesFormatSerializer( + item: InboundNatRulePropertiesFormat, +): any { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceSerializer(item["frontendIPConfiguration"]), + protocol: item["protocol"], + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + frontendPortRangeStart: item["frontendPortRangeStart"], + frontendPortRangeEnd: item["frontendPortRangeEnd"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + }; +} + +export function inboundNatRulePropertiesFormatDeserializer( + item: any, +): InboundNatRulePropertiesFormat { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceDeserializer(item["frontendIPConfiguration"]), + backendIPConfiguration: !item["backendIPConfiguration"] + ? item["backendIPConfiguration"] + : networkInterfaceIPConfigurationDeserializer(item["backendIPConfiguration"]), + protocol: item["protocol"], + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + frontendPortRangeStart: item["frontendPortRangeStart"], + frontendPortRangeEnd: item["frontendPortRangeEnd"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + provisioningState: item["provisioningState"], + }; +} + +/** The transport protocol for the endpoint. */ +export enum KnownTransportProtocol { + /** Udp */ + Udp = "Udp", + /** Tcp */ + Tcp = "Tcp", + /** All */ + All = "All", + /** Quic */ + Quic = "Quic", +} + +/** + * The transport protocol for the endpoint. \ + * {@link KnownTransportProtocol} can be used interchangeably with TransportProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Udp**: Udp \ + * **Tcp**: Tcp \ + * **All**: All \ + * **Quic**: Quic + */ +export type TransportProtocol = string; + +/** PrivateLinkConnection properties for the network interface. */ +export interface NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties { + /** The group ID for current private link connection. */ + readonly groupId?: string; + /** The required member name for current private link connection. */ + readonly requiredMemberName?: string; + /** List of FQDNs for current private link connection. */ + readonly fqdns?: string[]; +} + +export function networkInterfaceIPConfigurationPrivateLinkConnectionPropertiesDeserializer( + item: any, +): NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties { + return { + groupId: item["groupId"], + requiredMemberName: item["requiredMemberName"], + fqdns: !item["fqdns"] + ? item["fqdns"] + : item["fqdns"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewayBackendAddressArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayBackendAddressSerializer(item); + }); +} + +export function applicationGatewayBackendAddressArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayBackendAddressDeserializer(item); + }); +} + +/** Backend address of an application gateway. */ +export interface ApplicationGatewayBackendAddress { + /** Fully qualified domain name (FQDN). */ + fqdn?: string; + /** IP address. */ + ipAddress?: string; +} + +export function applicationGatewayBackendAddressSerializer( + item: ApplicationGatewayBackendAddress, +): any { + return { fqdn: item["fqdn"], ipAddress: item["ipAddress"] }; +} + +export function applicationGatewayBackendAddressDeserializer( + item: any, +): ApplicationGatewayBackendAddress { + return { + fqdn: item["fqdn"], + ipAddress: item["ipAddress"], + }; +} + +/** Reference to another subresource. */ +export interface SubResourceModel extends SubResource { + /** Name of the resource. */ + name?: string; + /** Resource type. */ + readonly type?: string; +} + +export function subResourceModelSerializer(item: SubResourceModel): any { + return { id: item["id"], name: item["name"] }; +} + +export function subResourceModelDeserializer(item: any): SubResourceModel { + return { + id: item["id"], + name: item["name"], + type: item["type"], + }; +} + +/** The base resource set for visibility and auto-approval. */ +export interface ResourceSet { + /** The list of subscriptions. */ + subscriptions?: string[]; +} + +export function resourceSetSerializer(item: ResourceSet): any { + return { + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : item["subscriptions"].map((p: any) => { + return p; + }), + }; +} + +export function resourceSetDeserializer(item: any): ResourceSet { + return { + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : item["subscriptions"].map((p: any) => { + return p; + }), + }; +} + +export function publicIPAddressArraySerializer(result: Array): any[] { + return result.map((item) => { + return publicIPAddressSerializer(item); + }); +} + +export function publicIPAddressArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return publicIPAddressDeserializer(item); + }); +} + +/** LoadBalancer resource. */ +export interface LoadBalancer extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The extended location of the load balancer. */ + extendedLocation?: ExtendedLocation; + /** The load balancer SKU. */ + sku?: LoadBalancerSku; + /** Object representing the frontend IPs to be used for the load balancer. */ + frontendIPConfigurations?: FrontendIPConfiguration[]; + /** Collection of backend address pools used by a load balancer. */ + backendAddressPools?: BackendAddressPool[]; + /** Object collection representing the load balancing rules Gets the provisioning. */ + loadBalancingRules?: LoadBalancingRule[]; + /** Collection of probe objects used in the load balancer. */ + probes?: Probe[]; + /** Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. */ + inboundNatRules?: InboundNatRule[]; + /** Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. */ + inboundNatPools?: InboundNatPool[]; + /** The outbound rules. */ + outboundRules?: OutboundRule[]; + /** The resource GUID property of the load balancer resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the load balancer resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Indicates the scope of the load balancer: external (Public) or internal (Private). */ + scope?: LoadBalancerScope; +} + +export function loadBalancerSerializer(item: LoadBalancer): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "frontendIPConfigurations", + "backendAddressPools", + "loadBalancingRules", + "probes", + "inboundNatRules", + "inboundNatPools", + "outboundRules", + "scope", + ]) + ? undefined + : _loadBalancerPropertiesSerializer(item), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationSerializer(item["extendedLocation"]), + sku: !item["sku"] ? item["sku"] : loadBalancerSkuSerializer(item["sku"]), + }; +} + +export function loadBalancerDeserializer(item: any): LoadBalancer { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _loadBalancerPropertiesDeserializer(item["properties"])), + etag: item["etag"], + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationDeserializer(item["extendedLocation"]), + sku: !item["sku"] ? item["sku"] : loadBalancerSkuDeserializer(item["sku"]), + }; +} + +/** Properties of the load balancer. */ +export interface LoadBalancerPropertiesFormat { + /** Object representing the frontend IPs to be used for the load balancer. */ + frontendIPConfigurations?: FrontendIPConfiguration[]; + /** Collection of backend address pools used by a load balancer. */ + backendAddressPools?: BackendAddressPool[]; + /** Object collection representing the load balancing rules Gets the provisioning. */ + loadBalancingRules?: LoadBalancingRule[]; + /** Collection of probe objects used in the load balancer. */ + probes?: Probe[]; + /** Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. */ + inboundNatRules?: InboundNatRule[]; + /** Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. */ + inboundNatPools?: InboundNatPool[]; + /** The outbound rules. */ + outboundRules?: OutboundRule[]; + /** The resource GUID property of the load balancer resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the load balancer resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Indicates the scope of the load balancer: external (Public) or internal (Private). */ + scope?: LoadBalancerScope; +} + +export function loadBalancerPropertiesFormatSerializer(item: LoadBalancerPropertiesFormat): any { + return { + frontendIPConfigurations: !item["frontendIPConfigurations"] + ? item["frontendIPConfigurations"] + : frontendIPConfigurationArraySerializer(item["frontendIPConfigurations"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : backendAddressPoolArraySerializer(item["backendAddressPools"]), + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : loadBalancingRuleArraySerializer(item["loadBalancingRules"]), + probes: !item["probes"] ? item["probes"] : probeArraySerializer(item["probes"]), + inboundNatRules: !item["inboundNatRules"] + ? item["inboundNatRules"] + : inboundNatRuleArraySerializer(item["inboundNatRules"]), + inboundNatPools: !item["inboundNatPools"] + ? item["inboundNatPools"] + : inboundNatPoolArraySerializer(item["inboundNatPools"]), + outboundRules: !item["outboundRules"] + ? item["outboundRules"] + : outboundRuleArraySerializer(item["outboundRules"]), + scope: item["scope"], + }; +} + +export function loadBalancerPropertiesFormatDeserializer(item: any): LoadBalancerPropertiesFormat { + return { + frontendIPConfigurations: !item["frontendIPConfigurations"] + ? item["frontendIPConfigurations"] + : frontendIPConfigurationArrayDeserializer(item["frontendIPConfigurations"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : backendAddressPoolArrayDeserializer(item["backendAddressPools"]), + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : loadBalancingRuleArrayDeserializer(item["loadBalancingRules"]), + probes: !item["probes"] ? item["probes"] : probeArrayDeserializer(item["probes"]), + inboundNatRules: !item["inboundNatRules"] + ? item["inboundNatRules"] + : inboundNatRuleArrayDeserializer(item["inboundNatRules"]), + inboundNatPools: !item["inboundNatPools"] + ? item["inboundNatPools"] + : inboundNatPoolArrayDeserializer(item["inboundNatPools"]), + outboundRules: !item["outboundRules"] + ? item["outboundRules"] + : outboundRuleArrayDeserializer(item["outboundRules"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + scope: item["scope"], + }; +} + +export function loadBalancingRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return loadBalancingRuleSerializer(item); + }); +} + +export function loadBalancingRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return loadBalancingRuleDeserializer(item); + }); +} + +/** A load balancing rule for a load balancer. */ +export interface LoadBalancingRule extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** A reference to frontend IP addresses. */ + frontendIPConfiguration?: SubResource; + /** A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. */ + backendAddressPool?: SubResource; + /** An array of references to pool of DIPs. */ + backendAddressPools?: SubResource[]; + /** The reference to the load balancer probe used by the load balancing rule. */ + probe?: SubResource; + /** The reference to the transport protocol used by the load balancing rule. */ + protocol?: TransportProtocol; + /** The load distribution policy for this rule. */ + loadDistribution?: LoadDistribution; + /** The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port". */ + frontendPort?: number; + /** The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port". */ + backendPort?: number; + /** The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. */ + idleTimeoutInMinutes?: number; + /** Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. */ + enableFloatingIP?: boolean; + /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ + enableTcpReset?: boolean; + /** Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. */ + disableOutboundSnat?: boolean; + /** Defines whether connections between 2 communicating endpoints can be tracked and associated to the same backend VM over its lifetime when using UDP protocol. */ + enableConnectionTracking?: boolean; + /** The provisioning state of the load balancing rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function loadBalancingRuleSerializer(item: LoadBalancingRule): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "frontendIPConfiguration", + "backendAddressPool", + "backendAddressPools", + "probe", + "protocol", + "loadDistribution", + "frontendPort", + "backendPort", + "idleTimeoutInMinutes", + "enableFloatingIP", + "enableTcpReset", + "disableOutboundSnat", + "enableConnectionTracking", + ]) + ? undefined + : _loadBalancingRulePropertiesSerializer(item), + }; +} + +export function loadBalancingRuleDeserializer(item: any): LoadBalancingRule { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _loadBalancingRulePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the load balancer. */ +export interface LoadBalancingRulePropertiesFormat { + /** A reference to frontend IP addresses. */ + frontendIPConfiguration?: SubResource; + /** A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. */ + backendAddressPool?: SubResource; + /** An array of references to pool of DIPs. */ + backendAddressPools?: SubResource[]; + /** The reference to the load balancer probe used by the load balancing rule. */ + probe?: SubResource; + /** The reference to the transport protocol used by the load balancing rule. */ + protocol: TransportProtocol; + /** The load distribution policy for this rule. */ + loadDistribution?: LoadDistribution; + /** The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port". */ + frontendPort: number; + /** The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port". */ + backendPort?: number; + /** The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. */ + idleTimeoutInMinutes?: number; + /** Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. */ + enableFloatingIP?: boolean; + /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ + enableTcpReset?: boolean; + /** Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. */ + disableOutboundSnat?: boolean; + /** Defines whether connections between 2 communicating endpoints can be tracked and associated to the same backend VM over its lifetime when using UDP protocol. */ + enableConnectionTracking?: boolean; + /** The provisioning state of the load balancing rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function loadBalancingRulePropertiesFormatSerializer( + item: LoadBalancingRulePropertiesFormat, +): any { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceSerializer(item["frontendIPConfiguration"]), + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : subResourceArraySerializer(item["backendAddressPools"]), + probe: !item["probe"] ? item["probe"] : subResourceSerializer(item["probe"]), + protocol: item["protocol"], + loadDistribution: item["loadDistribution"], + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + disableOutboundSnat: item["disableOutboundSnat"], + enableConnectionTracking: item["enableConnectionTracking"], + }; +} + +export function loadBalancingRulePropertiesFormatDeserializer( + item: any, +): LoadBalancingRulePropertiesFormat { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceDeserializer(item["frontendIPConfiguration"]), + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : subResourceArrayDeserializer(item["backendAddressPools"]), + probe: !item["probe"] ? item["probe"] : subResourceDeserializer(item["probe"]), + protocol: item["protocol"], + loadDistribution: item["loadDistribution"], + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + disableOutboundSnat: item["disableOutboundSnat"], + enableConnectionTracking: item["enableConnectionTracking"], + provisioningState: item["provisioningState"], + }; +} + +/** The load distribution policy for this rule. */ +export enum KnownLoadDistribution { + /** Default */ + Default = "Default", + /** SourceIP */ + SourceIP = "SourceIP", + /** SourceIPProtocol */ + SourceIPProtocol = "SourceIPProtocol", +} + +/** + * The load distribution policy for this rule. \ + * {@link KnownLoadDistribution} can be used interchangeably with LoadDistribution, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default**: Default \ + * **SourceIP**: SourceIP \ + * **SourceIPProtocol**: SourceIPProtocol + */ +export type LoadDistribution = string; + +export function probeArraySerializer(result: Array): any[] { + return result.map((item) => { + return probeSerializer(item); + }); +} + +export function probeArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return probeDeserializer(item); + }); +} + +/** A load balancer probe. */ +export interface Probe extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The load balancer rules that use this probe. */ + readonly loadBalancingRules?: SubResource[]; + /** The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. */ + protocol?: ProbeProtocol; + /** The port for communicating the probe. Possible values range from 1 to 65535, inclusive. */ + port?: number; + /** The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. */ + intervalInSeconds?: number; + /** Determines how new connections are handled by the load balancer when all backend instances are probed down. */ + noHealthyBackendsBehavior?: ProbeNoHealthyBackendsBehavior; + /** The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. */ + numberOfProbes?: number; + /** The number of consecutive successful or failed probes in order to allow or deny traffic from being delivered to this endpoint. After failing the number of consecutive probes equal to this value, the endpoint will be taken out of rotation and require the same number of successful consecutive probes to be placed back in rotation. */ + probeThreshold?: number; + /** The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. */ + requestPath?: string; + /** The provisioning state of the probe resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function probeSerializer(item: Probe): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "protocol", + "port", + "intervalInSeconds", + "noHealthyBackendsBehavior", + "numberOfProbes", + "probeThreshold", + "requestPath", + ]) + ? undefined + : _probePropertiesSerializer(item), + }; +} + +export function probeDeserializer(item: any): Probe { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _probePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Load balancer probe resource. */ +export interface ProbePropertiesFormat { + /** The load balancer rules that use this probe. */ + readonly loadBalancingRules?: SubResource[]; + /** The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. */ + protocol: ProbeProtocol; + /** The port for communicating the probe. Possible values range from 1 to 65535, inclusive. */ + port: number; + /** The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. */ + intervalInSeconds?: number; + /** Determines how new connections are handled by the load balancer when all backend instances are probed down. */ + noHealthyBackendsBehavior?: ProbeNoHealthyBackendsBehavior; + /** The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. */ + numberOfProbes?: number; + /** The number of consecutive successful or failed probes in order to allow or deny traffic from being delivered to this endpoint. After failing the number of consecutive probes equal to this value, the endpoint will be taken out of rotation and require the same number of successful consecutive probes to be placed back in rotation. */ + probeThreshold?: number; + /** The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. */ + requestPath?: string; + /** The provisioning state of the probe resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function probePropertiesFormatSerializer(item: ProbePropertiesFormat): any { + return { + protocol: item["protocol"], + port: item["port"], + intervalInSeconds: item["intervalInSeconds"], + noHealthyBackendsBehavior: item["noHealthyBackendsBehavior"], + numberOfProbes: item["numberOfProbes"], + probeThreshold: item["probeThreshold"], + requestPath: item["requestPath"], + }; +} + +export function probePropertiesFormatDeserializer(item: any): ProbePropertiesFormat { + return { + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : subResourceArrayDeserializer(item["loadBalancingRules"]), + protocol: item["protocol"], + port: item["port"], + intervalInSeconds: item["intervalInSeconds"], + noHealthyBackendsBehavior: item["noHealthyBackendsBehavior"], + numberOfProbes: item["numberOfProbes"], + probeThreshold: item["probeThreshold"], + requestPath: item["requestPath"], + provisioningState: item["provisioningState"], + }; +} + +/** The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. */ +export enum KnownProbeProtocol { + /** Http */ + Http = "Http", + /** Tcp */ + Tcp = "Tcp", + /** Https */ + Https = "Https", +} + +/** + * The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. \ + * {@link KnownProbeProtocol} can be used interchangeably with ProbeProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Http**: Http \ + * **Tcp**: Tcp \ + * **Https**: Https + */ +export type ProbeProtocol = string; + +/** Determines how new connections are handled by the load balancer when all backend instances are probed down. */ +export enum KnownProbeNoHealthyBackendsBehavior { + /** No new flows will be sent to the backend pool. */ + AllProbedDown = "AllProbedDown", + /** When all backend instances are probed down, incoming packets will be sent to all instances. */ + AllProbedUp = "AllProbedUp", +} + +/** + * Determines how new connections are handled by the load balancer when all backend instances are probed down. \ + * {@link KnownProbeNoHealthyBackendsBehavior} can be used interchangeably with ProbeNoHealthyBackendsBehavior, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AllProbedDown**: No new flows will be sent to the backend pool. \ + * **AllProbedUp**: When all backend instances are probed down, incoming packets will be sent to all instances. + */ +export type ProbeNoHealthyBackendsBehavior = string; + +export function inboundNatPoolArraySerializer(result: Array): any[] { + return result.map((item) => { + return inboundNatPoolSerializer(item); + }); +} + +export function inboundNatPoolArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return inboundNatPoolDeserializer(item); + }); +} + +/** Inbound NAT pool of the load balancer. */ +export interface InboundNatPool extends SubResource { + /** The name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be used to access the resource. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** A reference to frontend IP addresses. */ + frontendIPConfiguration?: SubResource; + /** The reference to the transport protocol used by the inbound NAT pool. */ + protocol?: TransportProtocol; + /** The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. */ + frontendPortRangeStart?: number; + /** The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. */ + frontendPortRangeEnd?: number; + /** The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. */ + backendPort?: number; + /** The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. */ + idleTimeoutInMinutes?: number; + /** Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. */ + enableFloatingIP?: boolean; + /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ + enableTcpReset?: boolean; + /** The provisioning state of the inbound NAT pool resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function inboundNatPoolSerializer(item: InboundNatPool): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "frontendIPConfiguration", + "protocol", + "frontendPortRangeStart", + "frontendPortRangeEnd", + "backendPort", + "idleTimeoutInMinutes", + "enableFloatingIP", + "enableTcpReset", + ]) + ? undefined + : _inboundNatPoolPropertiesSerializer(item), + name: item["name"], + }; +} + +export function inboundNatPoolDeserializer(item: any): InboundNatPool { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _inboundNatPoolPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of Inbound NAT pool. */ +export interface InboundNatPoolPropertiesFormat { + /** A reference to frontend IP addresses. */ + frontendIPConfiguration?: SubResource; + /** The reference to the transport protocol used by the inbound NAT pool. */ + protocol: TransportProtocol; + /** The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. */ + frontendPortRangeStart: number; + /** The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. */ + frontendPortRangeEnd: number; + /** The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. */ + backendPort: number; + /** The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. */ + idleTimeoutInMinutes?: number; + /** Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. */ + enableFloatingIP?: boolean; + /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ + enableTcpReset?: boolean; + /** The provisioning state of the inbound NAT pool resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function inboundNatPoolPropertiesFormatSerializer( + item: InboundNatPoolPropertiesFormat, +): any { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceSerializer(item["frontendIPConfiguration"]), + protocol: item["protocol"], + frontendPortRangeStart: item["frontendPortRangeStart"], + frontendPortRangeEnd: item["frontendPortRangeEnd"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + }; +} + +export function inboundNatPoolPropertiesFormatDeserializer( + item: any, +): InboundNatPoolPropertiesFormat { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceDeserializer(item["frontendIPConfiguration"]), + protocol: item["protocol"], + frontendPortRangeStart: item["frontendPortRangeStart"], + frontendPortRangeEnd: item["frontendPortRangeEnd"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + provisioningState: item["provisioningState"], + }; +} + +export function outboundRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return outboundRuleSerializer(item); + }); +} + +export function outboundRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return outboundRuleDeserializer(item); + }); +} + +/** Outbound rule of the load balancer. */ +export interface OutboundRule extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The number of outbound ports to be used for NAT. */ + allocatedOutboundPorts?: number; + /** The Frontend IP addresses of the load balancer. */ + frontendIPConfigurations?: SubResource[]; + /** A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. */ + backendAddressPool?: SubResource; + /** The provisioning state of the outbound rule resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The protocol for the outbound rule in load balancer. */ + protocol?: LoadBalancerOutboundRuleProtocol; + /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ + enableTcpReset?: boolean; + /** The timeout for the TCP idle connection. */ + idleTimeoutInMinutes?: number; +} + +export function outboundRuleSerializer(item: OutboundRule): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "allocatedOutboundPorts", + "frontendIPConfigurations", + "backendAddressPool", + "protocol", + "enableTcpReset", + "idleTimeoutInMinutes", + ]) + ? undefined + : _outboundRulePropertiesSerializer(item), + }; +} + +export function outboundRuleDeserializer(item: any): OutboundRule { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _outboundRulePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Outbound rule of the load balancer. */ +export interface OutboundRulePropertiesFormat { + /** The number of outbound ports to be used for NAT. */ + allocatedOutboundPorts?: number; + /** The Frontend IP addresses of the load balancer. */ + frontendIPConfigurations: SubResource[]; + /** A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. */ + backendAddressPool: SubResource; + /** The provisioning state of the outbound rule resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The protocol for the outbound rule in load balancer. */ + protocol: LoadBalancerOutboundRuleProtocol; + /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ + enableTcpReset?: boolean; + /** The timeout for the TCP idle connection. */ + idleTimeoutInMinutes?: number; +} + +export function outboundRulePropertiesFormatSerializer(item: OutboundRulePropertiesFormat): any { + return { + allocatedOutboundPorts: item["allocatedOutboundPorts"], + frontendIPConfigurations: subResourceArraySerializer(item["frontendIPConfigurations"]), + backendAddressPool: subResourceSerializer(item["backendAddressPool"]), + protocol: item["protocol"], + enableTcpReset: item["enableTcpReset"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + }; +} + +export function outboundRulePropertiesFormatDeserializer(item: any): OutboundRulePropertiesFormat { + return { + allocatedOutboundPorts: item["allocatedOutboundPorts"], + frontendIPConfigurations: subResourceArrayDeserializer(item["frontendIPConfigurations"]), + backendAddressPool: subResourceDeserializer(item["backendAddressPool"]), + provisioningState: item["provisioningState"], + protocol: item["protocol"], + enableTcpReset: item["enableTcpReset"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + }; +} + +/** The protocol for the outbound rule in load balancer. */ +export enum KnownLoadBalancerOutboundRuleProtocol { + /** Tcp */ + Tcp = "Tcp", + /** Udp */ + Udp = "Udp", + /** All */ + All = "All", +} + +/** + * The protocol for the outbound rule in load balancer. \ + * {@link KnownLoadBalancerOutboundRuleProtocol} can be used interchangeably with LoadBalancerOutboundRuleProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Tcp**: Tcp \ + * **Udp**: Udp \ + * **All**: All + */ +export type LoadBalancerOutboundRuleProtocol = string; + +/** Indicates the scope of the load balancer: external (Public) or internal (Private). */ +export enum KnownLoadBalancerScope { + /** Public */ + Public = "Public", + /** Private */ + Private = "Private", +} + +/** + * Indicates the scope of the load balancer: external (Public) or internal (Private). \ + * {@link KnownLoadBalancerScope} can be used interchangeably with LoadBalancerScope, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Public**: Public \ + * **Private**: Private + */ +export type LoadBalancerScope = string; + +/** SKU of a load balancer. */ +export interface LoadBalancerSku { + /** Name of a load balancer SKU. */ + name?: LoadBalancerSkuName; + /** Tier of a load balancer SKU. */ + tier?: LoadBalancerSkuTier; +} + +export function loadBalancerSkuSerializer(item: LoadBalancerSku): any { + return { name: item["name"], tier: item["tier"] }; +} + +export function loadBalancerSkuDeserializer(item: any): LoadBalancerSku { + return { + name: item["name"], + tier: item["tier"], + }; +} + +/** Name of a load balancer SKU. */ +export enum KnownLoadBalancerSkuName { + /** Basic */ + Basic = "Basic", + /** Standard */ + Standard = "Standard", + /** Gateway */ + Gateway = "Gateway", +} + +/** + * Name of a load balancer SKU. \ + * {@link KnownLoadBalancerSkuName} can be used interchangeably with LoadBalancerSkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic**: Basic \ + * **Standard**: Standard \ + * **Gateway**: Gateway + */ +export type LoadBalancerSkuName = string; + +/** Tier of a load balancer SKU. */ +export enum KnownLoadBalancerSkuTier { + /** Regional */ + Regional = "Regional", + /** Global */ + Global = "Global", +} + +/** + * Tier of a load balancer SKU. \ + * {@link KnownLoadBalancerSkuTier} can be used interchangeably with LoadBalancerSkuTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Regional**: Regional \ + * **Global**: Global + */ +export type LoadBalancerSkuTier = string; + +export function loadBalancerArraySerializer(result: Array): any[] { + return result.map((item) => { + return loadBalancerSerializer(item); + }); +} + +export function loadBalancerArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return loadBalancerDeserializer(item); + }); +} + +export function natGatewayArraySerializer(result: Array): any[] { + return result.map((item) => { + return natGatewaySerializer(item); + }); +} + +export function natGatewayArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return natGatewayDeserializer(item); + }); +} + +export function networkSecurityGroupArraySerializer(result: Array): any[] { + return result.map((item) => { + return networkSecurityGroupSerializer(item); + }); +} + +export function networkSecurityGroupArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return networkSecurityGroupDeserializer(item); + }); +} + +/** Network watcher in a resource group. */ +export interface NetworkWatcher extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The provisioning state of the network watcher resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function networkWatcherSerializer(item: NetworkWatcher): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, []) + ? undefined + : _networkWatcherPropertiesSerializer(item), + }; +} + +export function networkWatcherDeserializer(item: any): NetworkWatcher { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _networkWatcherPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** The network watcher properties. */ +export interface NetworkWatcherPropertiesFormat { + /** The provisioning state of the network watcher resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function networkWatcherPropertiesFormatSerializer( + _item: NetworkWatcherPropertiesFormat, +): any { + return {}; +} + +export function networkWatcherPropertiesFormatDeserializer( + item: any, +): NetworkWatcherPropertiesFormat { + return { + provisioningState: item["provisioningState"], + }; +} + +export function networkWatcherArraySerializer(result: Array): any[] { + return result.map((item) => { + return networkWatcherSerializer(item); + }); +} + +export function networkWatcherArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return networkWatcherDeserializer(item); + }); +} + +export function privateLinkServiceArraySerializer(result: Array): any[] { + return result.map((item) => { + return privateLinkServiceSerializer(item); + }); +} + +export function privateLinkServiceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return privateLinkServiceDeserializer(item); + }); +} + +export function routeTableArraySerializer(result: Array): any[] { + return result.map((item) => { + return routeTableSerializer(item); + }); +} + +export function routeTableArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return routeTableDeserializer(item); + }); +} + +/** Virtual Network resource. */ +export interface VirtualNetwork extends Resource { + /** The extended location of the virtual network. */ + extendedLocation?: ExtendedLocation; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The AddressSpace that contains an array of IP address ranges that can be used by subnets. */ + addressSpace?: AddressSpace; + /** The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. */ + dhcpOptions?: DhcpOptions; + /** The FlowTimeout value (in minutes) for the Virtual Network */ + flowTimeoutInMinutes?: number; + /** A list of subnets in a Virtual Network. */ + subnets?: Subnet[]; + /** A list of peerings in a Virtual Network. */ + virtualNetworkPeerings?: VirtualNetworkPeering[]; + /** The resourceGuid property of the Virtual Network resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the virtual network resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource. */ + enableDdosProtection?: boolean; + /** Indicates if VM protection is enabled for all the subnets in the virtual network. */ + enableVmProtection?: boolean; + /** The DDoS protection plan associated with the virtual network. */ + ddosProtectionPlan?: SubResource; + /** Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. */ + bgpCommunities?: VirtualNetworkBgpCommunities; + /** Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. */ + encryption?: VirtualNetworkEncryption; + /** Array of IpAllocation which reference this VNET. */ + ipAllocations?: SubResource[]; + /** A collection of references to flow log resources. */ + readonly flowLogs?: FlowLog[]; + /** Private Endpoint VNet Policies. */ + privateEndpointVNetPolicies?: PrivateEndpointVNetPolicies; + /** A reference to the default public nat gateway being used by this virtual network resource. */ + readonly defaultPublicNatGateway?: SubResource; + /** A configurable list of summarized gateway prefixes advertised for the virtual network. */ + summarizedGatewayPrefixes?: AddressSpace; +} + +export function virtualNetworkSerializer(item: VirtualNetwork): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "addressSpace", + "dhcpOptions", + "flowTimeoutInMinutes", + "subnets", + "virtualNetworkPeerings", + "enableDdosProtection", + "enableVmProtection", + "ddosProtectionPlan", + "bgpCommunities", + "encryption", + "ipAllocations", + "privateEndpointVNetPolicies", + "summarizedGatewayPrefixes", + ]) + ? undefined + : _virtualNetworkPropertiesSerializer(item), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function virtualNetworkDeserializer(item: any): VirtualNetwork { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _virtualNetworkPropertiesDeserializer(item["properties"])), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationDeserializer(item["extendedLocation"]), + etag: item["etag"], + }; +} + +/** Properties of the virtual network. */ +export interface VirtualNetworkPropertiesFormat { + /** The AddressSpace that contains an array of IP address ranges that can be used by subnets. */ + addressSpace?: AddressSpace; + /** The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. */ + dhcpOptions?: DhcpOptions; + /** The FlowTimeout value (in minutes) for the Virtual Network */ + flowTimeoutInMinutes?: number; + /** A list of subnets in a Virtual Network. */ + subnets?: Subnet[]; + /** A list of peerings in a Virtual Network. */ + virtualNetworkPeerings?: VirtualNetworkPeering[]; + /** The resourceGuid property of the Virtual Network resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the virtual network resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource. */ + enableDdosProtection?: boolean; + /** Indicates if VM protection is enabled for all the subnets in the virtual network. */ + enableVmProtection?: boolean; + /** The DDoS protection plan associated with the virtual network. */ + ddosProtectionPlan?: SubResource; + /** Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. */ + bgpCommunities?: VirtualNetworkBgpCommunities; + /** Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. */ + encryption?: VirtualNetworkEncryption; + /** Array of IpAllocation which reference this VNET. */ + ipAllocations?: SubResource[]; + /** A collection of references to flow log resources. */ + readonly flowLogs?: FlowLog[]; + /** Private Endpoint VNet Policies. */ + privateEndpointVNetPolicies?: PrivateEndpointVNetPolicies; + /** A reference to the default public nat gateway being used by this virtual network resource. */ + readonly defaultPublicNatGateway?: SubResource; + /** A configurable list of summarized gateway prefixes advertised for the virtual network. */ + summarizedGatewayPrefixes?: AddressSpace; +} + +export function virtualNetworkPropertiesFormatSerializer( + item: VirtualNetworkPropertiesFormat, +): any { + return { + addressSpace: !item["addressSpace"] + ? item["addressSpace"] + : addressSpaceSerializer(item["addressSpace"]), + dhcpOptions: !item["dhcpOptions"] + ? item["dhcpOptions"] + : dhcpOptionsSerializer(item["dhcpOptions"]), + flowTimeoutInMinutes: item["flowTimeoutInMinutes"], + subnets: !item["subnets"] ? item["subnets"] : subnetArraySerializer(item["subnets"]), + virtualNetworkPeerings: !item["virtualNetworkPeerings"] + ? item["virtualNetworkPeerings"] + : virtualNetworkPeeringArraySerializer(item["virtualNetworkPeerings"]), + enableDdosProtection: item["enableDdosProtection"], + enableVmProtection: item["enableVmProtection"], + ddosProtectionPlan: !item["ddosProtectionPlan"] + ? item["ddosProtectionPlan"] + : subResourceSerializer(item["ddosProtectionPlan"]), + bgpCommunities: !item["bgpCommunities"] + ? item["bgpCommunities"] + : virtualNetworkBgpCommunitiesSerializer(item["bgpCommunities"]), + encryption: !item["encryption"] + ? item["encryption"] + : virtualNetworkEncryptionSerializer(item["encryption"]), + ipAllocations: !item["ipAllocations"] + ? item["ipAllocations"] + : subResourceArraySerializer(item["ipAllocations"]), + privateEndpointVNetPolicies: item["privateEndpointVNetPolicies"], + summarizedGatewayPrefixes: !item["summarizedGatewayPrefixes"] + ? item["summarizedGatewayPrefixes"] + : addressSpaceSerializer(item["summarizedGatewayPrefixes"]), + }; +} + +export function virtualNetworkPropertiesFormatDeserializer( + item: any, +): VirtualNetworkPropertiesFormat { + return { + addressSpace: !item["addressSpace"] + ? item["addressSpace"] + : addressSpaceDeserializer(item["addressSpace"]), + dhcpOptions: !item["dhcpOptions"] + ? item["dhcpOptions"] + : dhcpOptionsDeserializer(item["dhcpOptions"]), + flowTimeoutInMinutes: item["flowTimeoutInMinutes"], + subnets: !item["subnets"] ? item["subnets"] : subnetArrayDeserializer(item["subnets"]), + virtualNetworkPeerings: !item["virtualNetworkPeerings"] + ? item["virtualNetworkPeerings"] + : virtualNetworkPeeringArrayDeserializer(item["virtualNetworkPeerings"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + enableDdosProtection: item["enableDdosProtection"], + enableVmProtection: item["enableVmProtection"], + ddosProtectionPlan: !item["ddosProtectionPlan"] + ? item["ddosProtectionPlan"] + : subResourceDeserializer(item["ddosProtectionPlan"]), + bgpCommunities: !item["bgpCommunities"] + ? item["bgpCommunities"] + : virtualNetworkBgpCommunitiesDeserializer(item["bgpCommunities"]), + encryption: !item["encryption"] + ? item["encryption"] + : virtualNetworkEncryptionDeserializer(item["encryption"]), + ipAllocations: !item["ipAllocations"] + ? item["ipAllocations"] + : subResourceArrayDeserializer(item["ipAllocations"]), + flowLogs: !item["flowLogs"] ? item["flowLogs"] : flowLogArrayDeserializer(item["flowLogs"]), + privateEndpointVNetPolicies: item["privateEndpointVNetPolicies"], + defaultPublicNatGateway: !item["defaultPublicNatGateway"] + ? item["defaultPublicNatGateway"] + : subResourceDeserializer(item["defaultPublicNatGateway"]), + summarizedGatewayPrefixes: !item["summarizedGatewayPrefixes"] + ? item["summarizedGatewayPrefixes"] + : addressSpaceDeserializer(item["summarizedGatewayPrefixes"]), + }; +} + +/** AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. */ +export interface AddressSpace { + /** A list of address blocks reserved for this virtual network in CIDR notation. */ + addressPrefixes?: string[]; + /** A list of IPAM Pools allocating IP address prefixes. */ + ipamPoolPrefixAllocations?: IpamPoolPrefixAllocation[]; +} + +export function addressSpaceSerializer(item: AddressSpace): any { + return { + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + ipamPoolPrefixAllocations: !item["ipamPoolPrefixAllocations"] + ? item["ipamPoolPrefixAllocations"] + : ipamPoolPrefixAllocationArraySerializer(item["ipamPoolPrefixAllocations"]), + }; +} + +export function addressSpaceDeserializer(item: any): AddressSpace { + return { + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + ipamPoolPrefixAllocations: !item["ipamPoolPrefixAllocations"] + ? item["ipamPoolPrefixAllocations"] + : ipamPoolPrefixAllocationArrayDeserializer(item["ipamPoolPrefixAllocations"]), + }; +} + +/** DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. */ +export interface DhcpOptions { + /** The list of DNS servers IP addresses. */ + dnsServers?: string[]; +} + +export function dhcpOptionsSerializer(item: DhcpOptions): any { + return { + dnsServers: !item["dnsServers"] + ? item["dnsServers"] + : item["dnsServers"].map((p: any) => { + return p; + }), + }; +} + +export function dhcpOptionsDeserializer(item: any): DhcpOptions { + return { + dnsServers: !item["dnsServers"] + ? item["dnsServers"] + : item["dnsServers"].map((p: any) => { + return p; + }), + }; +} + +export function virtualNetworkPeeringArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualNetworkPeeringSerializer(item); + }); +} + +export function virtualNetworkPeeringArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkPeeringDeserializer(item); + }); +} + +/** Peerings in a virtual network resource. */ +export interface VirtualNetworkPeering extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. */ + allowVirtualNetworkAccess?: boolean; + /** Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. */ + allowForwardedTraffic?: boolean; + /** If gateway links can be used in remote virtual networking to link to this virtual network. */ + allowGatewayTransit?: boolean; + /** If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. */ + useRemoteGateways?: boolean; + /** The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). */ + remoteVirtualNetwork?: SubResource; + /** The local address space of the local virtual network that is peered. */ + localAddressSpace?: AddressSpace; + /** The current local address space of the local virtual network that is peered. */ + localVirtualNetworkAddressSpace?: AddressSpace; + /** The reference to the address space peered with the remote virtual network. */ + remoteAddressSpace?: AddressSpace; + /** The reference to the current address space of the remote virtual network. */ + remoteVirtualNetworkAddressSpace?: AddressSpace; + /** The reference to the remote virtual network's Bgp Communities. */ + remoteBgpCommunities?: VirtualNetworkBgpCommunities; + /** The reference to the remote virtual network's encryption */ + readonly remoteVirtualNetworkEncryption?: VirtualNetworkEncryption; + /** The status of the virtual network peering. */ + peeringState?: VirtualNetworkPeeringState; + /** The peering sync status of the virtual network peering. */ + peeringSyncLevel?: VirtualNetworkPeeringLevel; + /** The provisioning state of the virtual network peering resource. */ + readonly provisioningState?: CommonProvisioningState; + /** If we need to verify the provisioning state of the remote gateway. */ + doNotVerifyRemoteGateways?: boolean; + /** The resourceGuid property of the Virtual Network peering resource. */ + readonly resourceGuid?: string; + /** Whether complete virtual network address space is peered. */ + peerCompleteVnets?: boolean; + /** Whether only Ipv6 address space is peered for subnet peering. */ + enableOnlyIPv6Peering?: boolean; + /** List of local subnet names that are subnet peered with remote virtual network. */ + localSubnetNames?: string[]; + /** List of remote subnet names from remote virtual network that are subnet peered. */ + remoteSubnetNames?: string[]; +} + +export function virtualNetworkPeeringSerializer(item: VirtualNetworkPeering): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "allowVirtualNetworkAccess", + "allowForwardedTraffic", + "allowGatewayTransit", + "useRemoteGateways", + "remoteVirtualNetwork", + "localAddressSpace", + "localVirtualNetworkAddressSpace", + "remoteAddressSpace", + "remoteVirtualNetworkAddressSpace", + "remoteBgpCommunities", + "peeringState", + "peeringSyncLevel", + "doNotVerifyRemoteGateways", + "peerCompleteVnets", + "enableOnlyIPv6Peering", + "localSubnetNames", + "remoteSubnetNames", + ]) + ? undefined + : _virtualNetworkPeeringPropertiesSerializer(item), + }; +} + +export function virtualNetworkPeeringDeserializer(item: any): VirtualNetworkPeering { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _virtualNetworkPeeringPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the virtual network peering. */ +export interface VirtualNetworkPeeringPropertiesFormat { + /** Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. */ + allowVirtualNetworkAccess?: boolean; + /** Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. */ + allowForwardedTraffic?: boolean; + /** If gateway links can be used in remote virtual networking to link to this virtual network. */ + allowGatewayTransit?: boolean; + /** If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. */ + useRemoteGateways?: boolean; + /** The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). */ + remoteVirtualNetwork?: SubResource; + /** The local address space of the local virtual network that is peered. */ + localAddressSpace?: AddressSpace; + /** The current local address space of the local virtual network that is peered. */ + localVirtualNetworkAddressSpace?: AddressSpace; + /** The reference to the address space peered with the remote virtual network. */ + remoteAddressSpace?: AddressSpace; + /** The reference to the current address space of the remote virtual network. */ + remoteVirtualNetworkAddressSpace?: AddressSpace; + /** The reference to the remote virtual network's Bgp Communities. */ + remoteBgpCommunities?: VirtualNetworkBgpCommunities; + /** The reference to the remote virtual network's encryption */ + readonly remoteVirtualNetworkEncryption?: VirtualNetworkEncryption; + /** The status of the virtual network peering. */ + peeringState?: VirtualNetworkPeeringState; + /** The peering sync status of the virtual network peering. */ + peeringSyncLevel?: VirtualNetworkPeeringLevel; + /** The provisioning state of the virtual network peering resource. */ + readonly provisioningState?: CommonProvisioningState; + /** If we need to verify the provisioning state of the remote gateway. */ + doNotVerifyRemoteGateways?: boolean; + /** The resourceGuid property of the Virtual Network peering resource. */ + readonly resourceGuid?: string; + /** Whether complete virtual network address space is peered. */ + peerCompleteVnets?: boolean; + /** Whether only Ipv6 address space is peered for subnet peering. */ + enableOnlyIPv6Peering?: boolean; + /** List of local subnet names that are subnet peered with remote virtual network. */ + localSubnetNames?: string[]; + /** List of remote subnet names from remote virtual network that are subnet peered. */ + remoteSubnetNames?: string[]; +} + +export function virtualNetworkPeeringPropertiesFormatSerializer( + item: VirtualNetworkPeeringPropertiesFormat, +): any { + return { + allowVirtualNetworkAccess: item["allowVirtualNetworkAccess"], + allowForwardedTraffic: item["allowForwardedTraffic"], + allowGatewayTransit: item["allowGatewayTransit"], + useRemoteGateways: item["useRemoteGateways"], + remoteVirtualNetwork: !item["remoteVirtualNetwork"] + ? item["remoteVirtualNetwork"] + : subResourceSerializer(item["remoteVirtualNetwork"]), + localAddressSpace: !item["localAddressSpace"] + ? item["localAddressSpace"] + : addressSpaceSerializer(item["localAddressSpace"]), + localVirtualNetworkAddressSpace: !item["localVirtualNetworkAddressSpace"] + ? item["localVirtualNetworkAddressSpace"] + : addressSpaceSerializer(item["localVirtualNetworkAddressSpace"]), + remoteAddressSpace: !item["remoteAddressSpace"] + ? item["remoteAddressSpace"] + : addressSpaceSerializer(item["remoteAddressSpace"]), + remoteVirtualNetworkAddressSpace: !item["remoteVirtualNetworkAddressSpace"] + ? item["remoteVirtualNetworkAddressSpace"] + : addressSpaceSerializer(item["remoteVirtualNetworkAddressSpace"]), + remoteBgpCommunities: !item["remoteBgpCommunities"] + ? item["remoteBgpCommunities"] + : virtualNetworkBgpCommunitiesSerializer(item["remoteBgpCommunities"]), + peeringState: item["peeringState"], + peeringSyncLevel: item["peeringSyncLevel"], + doNotVerifyRemoteGateways: item["doNotVerifyRemoteGateways"], + peerCompleteVnets: item["peerCompleteVnets"], + enableOnlyIPv6Peering: item["enableOnlyIPv6Peering"], + localSubnetNames: !item["localSubnetNames"] + ? item["localSubnetNames"] + : item["localSubnetNames"].map((p: any) => { + return p; + }), + remoteSubnetNames: !item["remoteSubnetNames"] + ? item["remoteSubnetNames"] + : item["remoteSubnetNames"].map((p: any) => { + return p; + }), + }; +} + +export function virtualNetworkPeeringPropertiesFormatDeserializer( + item: any, +): VirtualNetworkPeeringPropertiesFormat { + return { + allowVirtualNetworkAccess: item["allowVirtualNetworkAccess"], + allowForwardedTraffic: item["allowForwardedTraffic"], + allowGatewayTransit: item["allowGatewayTransit"], + useRemoteGateways: item["useRemoteGateways"], + remoteVirtualNetwork: !item["remoteVirtualNetwork"] + ? item["remoteVirtualNetwork"] + : subResourceDeserializer(item["remoteVirtualNetwork"]), + localAddressSpace: !item["localAddressSpace"] + ? item["localAddressSpace"] + : addressSpaceDeserializer(item["localAddressSpace"]), + localVirtualNetworkAddressSpace: !item["localVirtualNetworkAddressSpace"] + ? item["localVirtualNetworkAddressSpace"] + : addressSpaceDeserializer(item["localVirtualNetworkAddressSpace"]), + remoteAddressSpace: !item["remoteAddressSpace"] + ? item["remoteAddressSpace"] + : addressSpaceDeserializer(item["remoteAddressSpace"]), + remoteVirtualNetworkAddressSpace: !item["remoteVirtualNetworkAddressSpace"] + ? item["remoteVirtualNetworkAddressSpace"] + : addressSpaceDeserializer(item["remoteVirtualNetworkAddressSpace"]), + remoteBgpCommunities: !item["remoteBgpCommunities"] + ? item["remoteBgpCommunities"] + : virtualNetworkBgpCommunitiesDeserializer(item["remoteBgpCommunities"]), + remoteVirtualNetworkEncryption: !item["remoteVirtualNetworkEncryption"] + ? item["remoteVirtualNetworkEncryption"] + : virtualNetworkEncryptionDeserializer(item["remoteVirtualNetworkEncryption"]), + peeringState: item["peeringState"], + peeringSyncLevel: item["peeringSyncLevel"], + provisioningState: item["provisioningState"], + doNotVerifyRemoteGateways: item["doNotVerifyRemoteGateways"], + resourceGuid: item["resourceGuid"], + peerCompleteVnets: item["peerCompleteVnets"], + enableOnlyIPv6Peering: item["enableOnlyIPv6Peering"], + localSubnetNames: !item["localSubnetNames"] + ? item["localSubnetNames"] + : item["localSubnetNames"].map((p: any) => { + return p; + }), + remoteSubnetNames: !item["remoteSubnetNames"] + ? item["remoteSubnetNames"] + : item["remoteSubnetNames"].map((p: any) => { + return p; + }), + }; +} + +/** Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. */ +export interface VirtualNetworkBgpCommunities { + /** The BGP community associated with the virtual network. */ + virtualNetworkCommunity: string; + /** The BGP community associated with the region of the virtual network. */ + readonly regionalCommunity?: string; +} + +export function virtualNetworkBgpCommunitiesSerializer(item: VirtualNetworkBgpCommunities): any { + return { virtualNetworkCommunity: item["virtualNetworkCommunity"] }; +} + +export function virtualNetworkBgpCommunitiesDeserializer(item: any): VirtualNetworkBgpCommunities { + return { + virtualNetworkCommunity: item["virtualNetworkCommunity"], + regionalCommunity: item["regionalCommunity"], + }; +} + +/** Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. */ +export interface VirtualNetworkEncryption { + /** Indicates if encryption is enabled on the virtual network. */ + enabled: boolean; + /** If the encrypted VNet allows VM that does not support encryption. This field is for future support, AllowUnencrypted is the only supported value at general availability. */ + enforcement?: VirtualNetworkEncryptionEnforcement; +} + +export function virtualNetworkEncryptionSerializer(item: VirtualNetworkEncryption): any { + return { enabled: item["enabled"], enforcement: item["enforcement"] }; +} + +export function virtualNetworkEncryptionDeserializer(item: any): VirtualNetworkEncryption { + return { + enabled: item["enabled"], + enforcement: item["enforcement"], + }; +} + +/** If the encrypted VNet allows VM that does not support encryption. This field is for future support, AllowUnencrypted is the only supported value at general availability. */ +export enum KnownVirtualNetworkEncryptionEnforcement { + /** DropUnencrypted */ + DropUnencrypted = "DropUnencrypted", + /** AllowUnencrypted */ + AllowUnencrypted = "AllowUnencrypted", +} + +/** + * If the encrypted VNet allows VM that does not support encryption. This field is for future support, AllowUnencrypted is the only supported value at general availability. \ + * {@link KnownVirtualNetworkEncryptionEnforcement} can be used interchangeably with VirtualNetworkEncryptionEnforcement, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DropUnencrypted**: DropUnencrypted \ + * **AllowUnencrypted**: AllowUnencrypted + */ +export type VirtualNetworkEncryptionEnforcement = string; + +/** The status of the virtual network peering. */ +export enum KnownVirtualNetworkPeeringState { + /** Initiated */ + Initiated = "Initiated", + /** Connected */ + Connected = "Connected", + /** Disconnected */ + Disconnected = "Disconnected", +} + +/** + * The status of the virtual network peering. \ + * {@link KnownVirtualNetworkPeeringState} can be used interchangeably with VirtualNetworkPeeringState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Initiated**: Initiated \ + * **Connected**: Connected \ + * **Disconnected**: Disconnected + */ +export type VirtualNetworkPeeringState = string; + +/** The peering sync status of the virtual network peering. */ +export enum KnownVirtualNetworkPeeringLevel { + /** FullyInSync */ + FullyInSync = "FullyInSync", + /** RemoteNotInSync */ + RemoteNotInSync = "RemoteNotInSync", + /** LocalNotInSync */ + LocalNotInSync = "LocalNotInSync", + /** LocalAndRemoteNotInSync */ + LocalAndRemoteNotInSync = "LocalAndRemoteNotInSync", +} + +/** + * The peering sync status of the virtual network peering. \ + * {@link KnownVirtualNetworkPeeringLevel} can be used interchangeably with VirtualNetworkPeeringLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **FullyInSync**: FullyInSync \ + * **RemoteNotInSync**: RemoteNotInSync \ + * **LocalNotInSync**: LocalNotInSync \ + * **LocalAndRemoteNotInSync**: LocalAndRemoteNotInSync + */ +export type VirtualNetworkPeeringLevel = string; + +/** Private Endpoint VNet Policies. */ +export enum KnownPrivateEndpointVNetPolicies { + /** Disabled */ + Disabled = "Disabled", + /** Basic */ + Basic = "Basic", +} + +/** + * Private Endpoint VNet Policies. \ + * {@link KnownPrivateEndpointVNetPolicies} can be used interchangeably with PrivateEndpointVNetPolicies, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled**: Disabled \ + * **Basic**: Basic + */ +export type PrivateEndpointVNetPolicies = string; + +export function virtualNetworkArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualNetworkSerializer(item); + }); +} + +export function virtualNetworkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualNetworkDeserializer(item); + }); +} + +export function _applicationGatewayIPConfigurationPropertiesSerializer( + item: ApplicationGatewayIPConfiguration, +): any { + return { subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]) }; +} + +export function _applicationGatewayIPConfigurationPropertiesDeserializer(item: any) { + return { + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + provisioningState: item["provisioningState"], + }; +} + +export function _networkInterfaceTapConfigurationPropertiesSerializer( + item: NetworkInterfaceTapConfiguration, +): any { + return { + virtualNetworkTap: !item["virtualNetworkTap"] + ? item["virtualNetworkTap"] + : virtualNetworkTapSerializer(item["virtualNetworkTap"]), + }; +} + +export function _networkInterfaceTapConfigurationPropertiesDeserializer(item: any) { + return { + virtualNetworkTap: !item["virtualNetworkTap"] + ? item["virtualNetworkTap"] + : virtualNetworkTapDeserializer(item["virtualNetworkTap"]), + provisioningState: item["provisioningState"], + }; +} + +export function _applicationSecurityGroupPropertiesSerializer( + _item: ApplicationSecurityGroup, +): any { + return {}; +} + +export function _applicationSecurityGroupPropertiesDeserializer(item: any) { + return { + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function _securityRulePropertiesSerializer(item: SecurityRule): any { + return { + description: item["description"], + protocol: item["protocol"], + sourcePortRange: item["sourcePortRange"], + destinationPortRange: item["destinationPortRange"], + sourceAddressPrefix: item["sourceAddressPrefix"], + sourceAddressPrefixes: !item["sourceAddressPrefixes"] + ? item["sourceAddressPrefixes"] + : item["sourceAddressPrefixes"].map((p: any) => { + return p; + }), + sourceApplicationSecurityGroups: !item["sourceApplicationSecurityGroups"] + ? item["sourceApplicationSecurityGroups"] + : applicationSecurityGroupArraySerializer(item["sourceApplicationSecurityGroups"]), + destinationAddressPrefix: item["destinationAddressPrefix"], + destinationAddressPrefixes: !item["destinationAddressPrefixes"] + ? item["destinationAddressPrefixes"] + : item["destinationAddressPrefixes"].map((p: any) => { + return p; + }), + destinationApplicationSecurityGroups: !item["destinationApplicationSecurityGroups"] + ? item["destinationApplicationSecurityGroups"] + : applicationSecurityGroupArraySerializer(item["destinationApplicationSecurityGroups"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + }; +} + +export function _securityRulePropertiesDeserializer(item: any) { + return { + description: item["description"], + protocol: item["protocol"], + sourcePortRange: item["sourcePortRange"], + destinationPortRange: item["destinationPortRange"], + sourceAddressPrefix: item["sourceAddressPrefix"], + sourceAddressPrefixes: !item["sourceAddressPrefixes"] + ? item["sourceAddressPrefixes"] + : item["sourceAddressPrefixes"].map((p: any) => { + return p; + }), + sourceApplicationSecurityGroups: !item["sourceApplicationSecurityGroups"] + ? item["sourceApplicationSecurityGroups"] + : applicationSecurityGroupArrayDeserializer(item["sourceApplicationSecurityGroups"]), + destinationAddressPrefix: item["destinationAddressPrefix"], + destinationAddressPrefixes: !item["destinationAddressPrefixes"] + ? item["destinationAddressPrefixes"] + : item["destinationAddressPrefixes"].map((p: any) => { + return p; + }), + destinationApplicationSecurityGroups: !item["destinationApplicationSecurityGroups"] + ? item["destinationApplicationSecurityGroups"] + : applicationSecurityGroupArrayDeserializer(item["destinationApplicationSecurityGroups"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + provisioningState: item["provisioningState"], + }; +} + +export function _privateLinkServiceConnectionPropertiesSerializer( + item: PrivateLinkServiceConnection, +): any { + return { + privateLinkServiceId: item["privateLinkServiceId"], + groupIds: !item["groupIds"] + ? item["groupIds"] + : item["groupIds"].map((p: any) => { + return p; + }), + requestMessage: item["requestMessage"], + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateSerializer(item["privateLinkServiceConnectionState"]), + }; +} + +export function _privateLinkServiceConnectionPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + privateLinkServiceId: item["privateLinkServiceId"], + groupIds: !item["groupIds"] + ? item["groupIds"] + : item["groupIds"].map((p: any) => { + return p; + }), + requestMessage: item["requestMessage"], + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateDeserializer(item["privateLinkServiceConnectionState"]), + }; +} + +export function _privateEndpointIPConfigurationPropertiesSerializer( + item: PrivateEndpointIPConfiguration, +): any { + return { + groupId: item["groupId"], + memberName: item["memberName"], + privateIPAddress: item["privateIPAddress"], + }; +} + +export function _privateEndpointIPConfigurationPropertiesDeserializer(item: any) { + return { + groupId: item["groupId"], + memberName: item["memberName"], + privateIPAddress: item["privateIPAddress"], + }; +} + +export function _privateEndpointPropertiesSerializer(item: PrivateEndpoint): any { + return { + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + ipVersionType: item["ipVersionType"], + privateLinkServiceConnections: !item["privateLinkServiceConnections"] + ? item["privateLinkServiceConnections"] + : privateLinkServiceConnectionArraySerializer(item["privateLinkServiceConnections"]), + manualPrivateLinkServiceConnections: !item["manualPrivateLinkServiceConnections"] + ? item["manualPrivateLinkServiceConnections"] + : privateLinkServiceConnectionArraySerializer(item["manualPrivateLinkServiceConnections"]), + customDnsConfigs: !item["customDnsConfigs"] + ? item["customDnsConfigs"] + : customDnsConfigPropertiesFormatArraySerializer(item["customDnsConfigs"]), + applicationSecurityGroups: !item["applicationSecurityGroups"] + ? item["applicationSecurityGroups"] + : applicationSecurityGroupArraySerializer(item["applicationSecurityGroups"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : privateEndpointIPConfigurationArraySerializer(item["ipConfigurations"]), + customNetworkInterfaceName: item["customNetworkInterfaceName"], + billingSku: item["billingSku"], + }; +} + +export function _privateEndpointPropertiesDeserializer(item: any) { + return { + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceArrayDeserializer(item["networkInterfaces"]), + provisioningState: item["provisioningState"], + ipVersionType: item["ipVersionType"], + privateLinkServiceConnections: !item["privateLinkServiceConnections"] + ? item["privateLinkServiceConnections"] + : privateLinkServiceConnectionArrayDeserializer(item["privateLinkServiceConnections"]), + manualPrivateLinkServiceConnections: !item["manualPrivateLinkServiceConnections"] + ? item["manualPrivateLinkServiceConnections"] + : privateLinkServiceConnectionArrayDeserializer(item["manualPrivateLinkServiceConnections"]), + customDnsConfigs: !item["customDnsConfigs"] + ? item["customDnsConfigs"] + : customDnsConfigPropertiesFormatArrayDeserializer(item["customDnsConfigs"]), + applicationSecurityGroups: !item["applicationSecurityGroups"] + ? item["applicationSecurityGroups"] + : applicationSecurityGroupArrayDeserializer(item["applicationSecurityGroups"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : privateEndpointIPConfigurationArrayDeserializer(item["ipConfigurations"]), + customNetworkInterfaceName: item["customNetworkInterfaceName"], + billingSku: item["billingSku"], + }; +} + +export function _privateLinkServiceIpConfigurationPropertiesSerializer( + item: PrivateLinkServiceIpConfiguration, +): any { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + primary: item["primary"], + privateIPAddressVersion: item["privateIPAddressVersion"], + }; +} + +export function _privateLinkServiceIpConfigurationPropertiesDeserializer(item: any) { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + primary: item["primary"], + provisioningState: item["provisioningState"], + privateIPAddressVersion: item["privateIPAddressVersion"], + }; +} + +export function _privateEndpointConnectionPropertiesSerializer( + item: PrivateEndpointConnection, +): any { + return { + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateSerializer(item["privateLinkServiceConnectionState"]), + }; +} + +export function _privateEndpointConnectionPropertiesDeserializer(item: any) { + return { + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : privateEndpointDeserializer(item["privateEndpoint"]), + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateDeserializer(item["privateLinkServiceConnectionState"]), + provisioningState: item["provisioningState"], + linkIdentifier: item["linkIdentifier"], + privateEndpointLocation: item["privateEndpointLocation"], + }; +} + +export function _privateLinkServicePropertiesSerializer(item: PrivateLinkService): any { + return { + loadBalancerFrontendIpConfigurations: !item["loadBalancerFrontendIpConfigurations"] + ? item["loadBalancerFrontendIpConfigurations"] + : frontendIPConfigurationArraySerializer(item["loadBalancerFrontendIpConfigurations"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : privateLinkServiceIpConfigurationArraySerializer(item["ipConfigurations"]), + destinationIPAddress: item["destinationIPAddress"], + accessMode: item["accessMode"], + visibility: !item["visibility"] + ? item["visibility"] + : privateLinkServicePropertiesVisibilitySerializer(item["visibility"]), + autoApproval: !item["autoApproval"] + ? item["autoApproval"] + : privateLinkServicePropertiesAutoApprovalSerializer(item["autoApproval"]), + fqdns: !item["fqdns"] + ? item["fqdns"] + : item["fqdns"].map((p: any) => { + return p; + }), + enableProxyProtocol: item["enableProxyProtocol"], + }; +} + +export function _privateLinkServicePropertiesDeserializer(item: any) { + return { + loadBalancerFrontendIpConfigurations: !item["loadBalancerFrontendIpConfigurations"] + ? item["loadBalancerFrontendIpConfigurations"] + : frontendIPConfigurationArrayDeserializer(item["loadBalancerFrontendIpConfigurations"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : privateLinkServiceIpConfigurationArrayDeserializer(item["ipConfigurations"]), + destinationIPAddress: item["destinationIPAddress"], + accessMode: item["accessMode"], + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceArrayDeserializer(item["networkInterfaces"]), + provisioningState: item["provisioningState"], + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : privateEndpointConnectionArrayDeserializer(item["privateEndpointConnections"]), + visibility: !item["visibility"] + ? item["visibility"] + : privateLinkServicePropertiesVisibilityDeserializer(item["visibility"]), + autoApproval: !item["autoApproval"] + ? item["autoApproval"] + : privateLinkServicePropertiesAutoApprovalDeserializer(item["autoApproval"]), + fqdns: !item["fqdns"] + ? item["fqdns"] + : item["fqdns"].map((p: any) => { + return p; + }), + alias: item["alias"], + enableProxyProtocol: item["enableProxyProtocol"], + }; +} + +export function _networkInterfacePropertiesSerializer(item: NetworkInterface): any { + return { + networkSecurityGroup: !item["networkSecurityGroup"] + ? item["networkSecurityGroup"] + : networkSecurityGroupSerializer(item["networkSecurityGroup"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : networkInterfaceIPConfigurationArraySerializer(item["ipConfigurations"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : networkInterfaceDnsSettingsSerializer(item["dnsSettings"]), + enableAcceleratedNetworking: item["enableAcceleratedNetworking"], + disableTcpStateTracking: item["disableTcpStateTracking"], + enableIPForwarding: item["enableIPForwarding"], + workloadType: item["workloadType"], + nicType: item["nicType"], + privateLinkService: !item["privateLinkService"] + ? item["privateLinkService"] + : privateLinkServiceSerializer(item["privateLinkService"]), + migrationPhase: item["migrationPhase"], + auxiliaryMode: item["auxiliaryMode"], + auxiliarySku: item["auxiliarySku"], + }; +} + +export function _networkInterfacePropertiesDeserializer(item: any) { + return { + virtualMachine: !item["virtualMachine"] + ? item["virtualMachine"] + : subResourceDeserializer(item["virtualMachine"]), + networkSecurityGroup: !item["networkSecurityGroup"] + ? item["networkSecurityGroup"] + : networkSecurityGroupDeserializer(item["networkSecurityGroup"]), + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : privateEndpointDeserializer(item["privateEndpoint"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : networkInterfaceIPConfigurationArrayDeserializer(item["ipConfigurations"]), + tapConfigurations: !item["tapConfigurations"] + ? item["tapConfigurations"] + : networkInterfaceTapConfigurationArrayDeserializer(item["tapConfigurations"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : networkInterfaceDnsSettingsDeserializer(item["dnsSettings"]), + macAddress: item["macAddress"], + primary: item["primary"], + vnetEncryptionSupported: item["vnetEncryptionSupported"], + defaultOutboundConnectivityEnabled: item["defaultOutboundConnectivityEnabled"], + enableAcceleratedNetworking: item["enableAcceleratedNetworking"], + disableTcpStateTracking: item["disableTcpStateTracking"], + enableIPForwarding: item["enableIPForwarding"], + hostedWorkloads: !item["hostedWorkloads"] + ? item["hostedWorkloads"] + : item["hostedWorkloads"].map((p: any) => { + return p; + }), + dscpConfiguration: !item["dscpConfiguration"] + ? item["dscpConfiguration"] + : subResourceDeserializer(item["dscpConfiguration"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + workloadType: item["workloadType"], + nicType: item["nicType"], + privateLinkService: !item["privateLinkService"] + ? item["privateLinkService"] + : privateLinkServiceDeserializer(item["privateLinkService"]), + migrationPhase: item["migrationPhase"], + auxiliaryMode: item["auxiliaryMode"], + auxiliarySku: item["auxiliarySku"], + }; +} + +export function _flowLogPropertiesSerializer(item: FlowLog): any { + return { + targetResourceId: item["targetResourceId"], + storageId: item["storageId"], + enabledFilteringCriteria: item["enabledFilteringCriteria"], + recordTypes: item["recordTypes"], + enabled: item["enabled"], + retentionPolicy: !item["retentionPolicy"] + ? item["retentionPolicy"] + : retentionPolicyParametersSerializer(item["retentionPolicy"]), + format: !item["format"] ? item["format"] : flowLogFormatParametersSerializer(item["format"]), + flowAnalyticsConfiguration: !item["flowAnalyticsConfiguration"] + ? item["flowAnalyticsConfiguration"] + : trafficAnalyticsPropertiesSerializer(item["flowAnalyticsConfiguration"]), + }; +} + +export function _flowLogPropertiesDeserializer(item: any) { + return { + targetResourceId: item["targetResourceId"], + targetResourceGuid: item["targetResourceGuid"], + storageId: item["storageId"], + enabledFilteringCriteria: item["enabledFilteringCriteria"], + recordTypes: item["recordTypes"], + enabled: item["enabled"], + retentionPolicy: !item["retentionPolicy"] + ? item["retentionPolicy"] + : retentionPolicyParametersDeserializer(item["retentionPolicy"]), + format: !item["format"] ? item["format"] : flowLogFormatParametersDeserializer(item["format"]), + flowAnalyticsConfiguration: !item["flowAnalyticsConfiguration"] + ? item["flowAnalyticsConfiguration"] + : trafficAnalyticsPropertiesDeserializer(item["flowAnalyticsConfiguration"]), + provisioningState: item["provisioningState"], + }; +} + +export function _networkSecurityGroupPropertiesSerializer(item: NetworkSecurityGroup): any { + return { + flushConnection: item["flushConnection"], + securityRules: !item["securityRules"] + ? item["securityRules"] + : securityRuleArraySerializer(item["securityRules"]), + }; +} + +export function _networkSecurityGroupPropertiesDeserializer(item: any) { + return { + flushConnection: item["flushConnection"], + securityRules: !item["securityRules"] + ? item["securityRules"] + : securityRuleArrayDeserializer(item["securityRules"]), + defaultSecurityRules: !item["defaultSecurityRules"] + ? item["defaultSecurityRules"] + : securityRuleArrayDeserializer(item["defaultSecurityRules"]), + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceArrayDeserializer(item["networkInterfaces"]), + subnets: !item["subnets"] ? item["subnets"] : subnetArrayDeserializer(item["subnets"]), + flowLogs: !item["flowLogs"] ? item["flowLogs"] : flowLogArrayDeserializer(item["flowLogs"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function _routePropertiesSerializer(item: Route): any { + return { + addressPrefix: item["addressPrefix"], + nextHopType: item["nextHopType"], + nextHopIpAddress: item["nextHopIpAddress"], + nextHop: !item["nextHop"] ? item["nextHop"] : routeNextHopEcmpSerializer(item["nextHop"]), + }; +} + +export function _routePropertiesDeserializer(item: any) { + return { + addressPrefix: item["addressPrefix"], + nextHopType: item["nextHopType"], + nextHopIpAddress: item["nextHopIpAddress"], + nextHop: !item["nextHop"] ? item["nextHop"] : routeNextHopEcmpDeserializer(item["nextHop"]), + provisioningState: item["provisioningState"], + hasBgpOverride: item["hasBgpOverride"], + }; +} + +export function _routeTablePropertiesSerializer(item: RouteTable): any { + return { + routes: !item["routes"] ? item["routes"] : routeArraySerializer(item["routes"]), + disableBgpRoutePropagation: item["disableBgpRoutePropagation"], + disablePeeringRoute: item["disablePeeringRoute"], + }; +} + +export function _routeTablePropertiesDeserializer(item: any) { + return { + routes: !item["routes"] ? item["routes"] : routeArrayDeserializer(item["routes"]), + subnets: !item["subnets"] ? item["subnets"] : subnetArrayDeserializer(item["subnets"]), + disableBgpRoutePropagation: item["disableBgpRoutePropagation"], + disablePeeringRoute: item["disablePeeringRoute"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _serviceEndpointPolicyDefinitionPropertiesSerializer( + item: ServiceEndpointPolicyDefinition, +): any { + return { + description: item["description"], + service: item["service"], + serviceResources: !item["serviceResources"] + ? item["serviceResources"] + : item["serviceResources"].map((p: any) => { + return p; + }), + }; +} + +export function _serviceEndpointPolicyDefinitionPropertiesDeserializer(item: any) { + return { + description: item["description"], + service: item["service"], + serviceResources: !item["serviceResources"] + ? item["serviceResources"] + : item["serviceResources"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _serviceEndpointPolicyPropertiesSerializer(item: ServiceEndpointPolicy): any { + return { + serviceEndpointPolicyDefinitions: !item["serviceEndpointPolicyDefinitions"] + ? item["serviceEndpointPolicyDefinitions"] + : serviceEndpointPolicyDefinitionArraySerializer(item["serviceEndpointPolicyDefinitions"]), + serviceAlias: item["serviceAlias"], + contextualServiceEndpointPolicies: !item["contextualServiceEndpointPolicies"] + ? item["contextualServiceEndpointPolicies"] + : item["contextualServiceEndpointPolicies"].map((p: any) => { + return p; + }), + }; +} + +export function _serviceEndpointPolicyPropertiesDeserializer(item: any) { + return { + serviceEndpointPolicyDefinitions: !item["serviceEndpointPolicyDefinitions"] + ? item["serviceEndpointPolicyDefinitions"] + : serviceEndpointPolicyDefinitionArrayDeserializer(item["serviceEndpointPolicyDefinitions"]), + subnets: !item["subnets"] ? item["subnets"] : subnetArrayDeserializer(item["subnets"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + serviceAlias: item["serviceAlias"], + contextualServiceEndpointPolicies: !item["contextualServiceEndpointPolicies"] + ? item["contextualServiceEndpointPolicies"] + : item["contextualServiceEndpointPolicies"].map((p: any) => { + return p; + }), + }; +} + +export function _natGatewayPropertiesSerializer(item: NatGateway): any { + return { + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + publicIpAddresses: !item["publicIpAddresses"] + ? item["publicIpAddresses"] + : subResourceArraySerializer(item["publicIpAddresses"]), + publicIpAddressesV6: !item["publicIpAddressesV6"] + ? item["publicIpAddressesV6"] + : subResourceArraySerializer(item["publicIpAddressesV6"]), + publicIpPrefixes: !item["publicIpPrefixes"] + ? item["publicIpPrefixes"] + : subResourceArraySerializer(item["publicIpPrefixes"]), + publicIpPrefixesV6: !item["publicIpPrefixesV6"] + ? item["publicIpPrefixesV6"] + : subResourceArraySerializer(item["publicIpPrefixesV6"]), + sourceVirtualNetwork: !item["sourceVirtualNetwork"] + ? item["sourceVirtualNetwork"] + : subResourceSerializer(item["sourceVirtualNetwork"]), + serviceGateway: !item["serviceGateway"] + ? item["serviceGateway"] + : subResourceSerializer(item["serviceGateway"]), + nat64: item["nat64"], + }; +} + +export function _natGatewayPropertiesDeserializer(item: any) { + return { + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + publicIpAddresses: !item["publicIpAddresses"] + ? item["publicIpAddresses"] + : subResourceArrayDeserializer(item["publicIpAddresses"]), + publicIpAddressesV6: !item["publicIpAddressesV6"] + ? item["publicIpAddressesV6"] + : subResourceArrayDeserializer(item["publicIpAddressesV6"]), + publicIpPrefixes: !item["publicIpPrefixes"] + ? item["publicIpPrefixes"] + : subResourceArrayDeserializer(item["publicIpPrefixes"]), + publicIpPrefixesV6: !item["publicIpPrefixesV6"] + ? item["publicIpPrefixesV6"] + : subResourceArrayDeserializer(item["publicIpPrefixesV6"]), + subnets: !item["subnets"] ? item["subnets"] : subResourceArrayDeserializer(item["subnets"]), + sourceVirtualNetwork: !item["sourceVirtualNetwork"] + ? item["sourceVirtualNetwork"] + : subResourceDeserializer(item["sourceVirtualNetwork"]), + serviceGateway: !item["serviceGateway"] + ? item["serviceGateway"] + : subResourceDeserializer(item["serviceGateway"]), + nat64: item["nat64"], + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function _publicIPAddressPropertiesSerializer(item: PublicIPAddress): any { + return { + publicIPAllocationMethod: item["publicIPAllocationMethod"], + publicIPAddressVersion: item["publicIPAddressVersion"], + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : publicIPAddressDnsSettingsSerializer(item["dnsSettings"]), + ddosSettings: !item["ddosSettings"] + ? item["ddosSettings"] + : ddosSettingsSerializer(item["ddosSettings"]), + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArraySerializer(item["ipTags"]), + ipAddress: item["ipAddress"], + publicIPPrefix: !item["publicIPPrefix"] + ? item["publicIPPrefix"] + : subResourceSerializer(item["publicIPPrefix"]), + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + servicePublicIPAddress: !item["servicePublicIPAddress"] + ? item["servicePublicIPAddress"] + : publicIPAddressSerializer(item["servicePublicIPAddress"]), + natGateway: !item["natGateway"] ? item["natGateway"] : natGatewaySerializer(item["natGateway"]), + migrationPhase: item["migrationPhase"], + linkedPublicIPAddress: !item["linkedPublicIPAddress"] + ? item["linkedPublicIPAddress"] + : publicIPAddressSerializer(item["linkedPublicIPAddress"]), + deleteOption: item["deleteOption"], + }; +} + +export function _publicIPAddressPropertiesDeserializer(item: any) { + return { + publicIPAllocationMethod: item["publicIPAllocationMethod"], + publicIPAddressVersion: item["publicIPAddressVersion"], + ipConfiguration: !item["ipConfiguration"] + ? item["ipConfiguration"] + : ipConfigurationDeserializer(item["ipConfiguration"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : publicIPAddressDnsSettingsDeserializer(item["dnsSettings"]), + ddosSettings: !item["ddosSettings"] + ? item["ddosSettings"] + : ddosSettingsDeserializer(item["ddosSettings"]), + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArrayDeserializer(item["ipTags"]), + ipAddress: item["ipAddress"], + publicIPPrefix: !item["publicIPPrefix"] + ? item["publicIPPrefix"] + : subResourceDeserializer(item["publicIPPrefix"]), + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + servicePublicIPAddress: !item["servicePublicIPAddress"] + ? item["servicePublicIPAddress"] + : publicIPAddressDeserializer(item["servicePublicIPAddress"]), + natGateway: !item["natGateway"] + ? item["natGateway"] + : natGatewayDeserializer(item["natGateway"]), + migrationPhase: item["migrationPhase"], + linkedPublicIPAddress: !item["linkedPublicIPAddress"] + ? item["linkedPublicIPAddress"] + : publicIPAddressDeserializer(item["linkedPublicIPAddress"]), + deleteOption: item["deleteOption"], + }; +} + +export function _ipConfigurationPropertiesDeserializer(item: any) { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressDeserializer(item["publicIPAddress"]), + provisioningState: item["provisioningState"], + }; +} + +export function _ipConfigurationProfilePropertiesSerializer(item: IPConfigurationProfile): any { + return { subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]) }; +} + +export function _ipConfigurationProfilePropertiesDeserializer(item: any) { + return { + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + provisioningState: item["provisioningState"], + }; +} + +export function _resourceNavigationLinkPropertiesDeserializer(item: any) { + return { + linkedResourceType: item["linkedResourceType"], + link: item["link"], + provisioningState: item["provisioningState"], + }; +} + +export function _serviceAssociationLinkPropertiesDeserializer(item: any) { + return { + linkedResourceType: item["linkedResourceType"], + link: item["link"], + provisioningState: item["provisioningState"], + allowDelete: item["allowDelete"], + locations: !item["locations"] + ? item["locations"] + : item["locations"].map((p: any) => { + return p; + }), + }; +} + +export function _delegationPropertiesSerializer(item: Delegation): any { + return { serviceName: item["serviceName"] }; +} + +export function _delegationPropertiesDeserializer(item: any) { + return { + serviceName: item["serviceName"], + actions: !item["actions"] + ? item["actions"] + : item["actions"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _ipamPoolPrefixAllocationPoolSerializer(item: IpamPoolPrefixAllocation): any { + return { id: item["id"] }; +} + +export function _ipamPoolPrefixAllocationPoolDeserializer(item: any) { + return { + id: item["id"], + }; +} + +export function _subnetPropertiesSerializer(item: Subnet): any { + return { + addressPrefix: item["addressPrefix"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + networkSecurityGroup: !item["networkSecurityGroup"] + ? item["networkSecurityGroup"] + : networkSecurityGroupSerializer(item["networkSecurityGroup"]), + routeTable: !item["routeTable"] ? item["routeTable"] : routeTableSerializer(item["routeTable"]), + natGateway: !item["natGateway"] + ? item["natGateway"] + : subResourceSerializer(item["natGateway"]), + serviceEndpoints: !item["serviceEndpoints"] + ? item["serviceEndpoints"] + : serviceEndpointPropertiesFormatArraySerializer(item["serviceEndpoints"]), + serviceEndpointPolicies: !item["serviceEndpointPolicies"] + ? item["serviceEndpointPolicies"] + : serviceEndpointPolicyArraySerializer(item["serviceEndpointPolicies"]), + ipAllocations: !item["ipAllocations"] + ? item["ipAllocations"] + : subResourceArraySerializer(item["ipAllocations"]), + delegations: !item["delegations"] + ? item["delegations"] + : delegationArraySerializer(item["delegations"]), + privateEndpointNetworkPolicies: item["privateEndpointNetworkPolicies"], + privateLinkServiceNetworkPolicies: item["privateLinkServiceNetworkPolicies"], + applicationGatewayIPConfigurations: !item["applicationGatewayIPConfigurations"] + ? item["applicationGatewayIPConfigurations"] + : applicationGatewayIPConfigurationArraySerializer( + item["applicationGatewayIPConfigurations"], + ), + sharingScope: item["sharingScope"], + defaultOutboundAccess: item["defaultOutboundAccess"], + ipamPoolPrefixAllocations: !item["ipamPoolPrefixAllocations"] + ? item["ipamPoolPrefixAllocations"] + : ipamPoolPrefixAllocationArraySerializer(item["ipamPoolPrefixAllocations"]), + serviceGateway: !item["serviceGateway"] + ? item["serviceGateway"] + : subResourceSerializer(item["serviceGateway"]), + }; +} + +export function _subnetPropertiesDeserializer(item: any) { + return { + addressPrefix: item["addressPrefix"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + networkSecurityGroup: !item["networkSecurityGroup"] + ? item["networkSecurityGroup"] + : networkSecurityGroupDeserializer(item["networkSecurityGroup"]), + routeTable: !item["routeTable"] + ? item["routeTable"] + : routeTableDeserializer(item["routeTable"]), + natGateway: !item["natGateway"] + ? item["natGateway"] + : subResourceDeserializer(item["natGateway"]), + serviceEndpoints: !item["serviceEndpoints"] + ? item["serviceEndpoints"] + : serviceEndpointPropertiesFormatArrayDeserializer(item["serviceEndpoints"]), + serviceEndpointPolicies: !item["serviceEndpointPolicies"] + ? item["serviceEndpointPolicies"] + : serviceEndpointPolicyArrayDeserializer(item["serviceEndpointPolicies"]), + privateEndpoints: !item["privateEndpoints"] + ? item["privateEndpoints"] + : privateEndpointArrayDeserializer(item["privateEndpoints"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : ipConfigurationArrayDeserializer(item["ipConfigurations"]), + ipConfigurationProfiles: !item["ipConfigurationProfiles"] + ? item["ipConfigurationProfiles"] + : ipConfigurationProfileArrayDeserializer(item["ipConfigurationProfiles"]), + ipAllocations: !item["ipAllocations"] + ? item["ipAllocations"] + : subResourceArrayDeserializer(item["ipAllocations"]), + resourceNavigationLinks: !item["resourceNavigationLinks"] + ? item["resourceNavigationLinks"] + : resourceNavigationLinkArrayDeserializer(item["resourceNavigationLinks"]), + serviceAssociationLinks: !item["serviceAssociationLinks"] + ? item["serviceAssociationLinks"] + : serviceAssociationLinkArrayDeserializer(item["serviceAssociationLinks"]), + delegations: !item["delegations"] + ? item["delegations"] + : delegationArrayDeserializer(item["delegations"]), + purpose: item["purpose"], + provisioningState: item["provisioningState"], + privateEndpointNetworkPolicies: item["privateEndpointNetworkPolicies"], + privateLinkServiceNetworkPolicies: item["privateLinkServiceNetworkPolicies"], + applicationGatewayIPConfigurations: !item["applicationGatewayIPConfigurations"] + ? item["applicationGatewayIPConfigurations"] + : applicationGatewayIPConfigurationArrayDeserializer( + item["applicationGatewayIPConfigurations"], + ), + sharingScope: item["sharingScope"], + defaultOutboundAccess: item["defaultOutboundAccess"], + ipamPoolPrefixAllocations: !item["ipamPoolPrefixAllocations"] + ? item["ipamPoolPrefixAllocations"] + : ipamPoolPrefixAllocationArrayDeserializer(item["ipamPoolPrefixAllocations"]), + serviceGateway: !item["serviceGateway"] + ? item["serviceGateway"] + : subResourceDeserializer(item["serviceGateway"]), + }; +} + +export function _frontendIPConfigurationPropertiesSerializer(item: FrontendIPConfiguration): any { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + privateIPAddressVersion: item["privateIPAddressVersion"], + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressSerializer(item["publicIPAddress"]), + publicIPPrefix: !item["publicIPPrefix"] + ? item["publicIPPrefix"] + : subResourceSerializer(item["publicIPPrefix"]), + gatewayLoadBalancer: !item["gatewayLoadBalancer"] + ? item["gatewayLoadBalancer"] + : subResourceSerializer(item["gatewayLoadBalancer"]), + ddosSettings: !item["ddosSettings"] + ? item["ddosSettings"] + : ddosFrontendIpConfigurationSettingsSerializer(item["ddosSettings"]), + }; +} + +export function _frontendIPConfigurationPropertiesDeserializer(item: any) { + return { + inboundNatRules: !item["inboundNatRules"] + ? item["inboundNatRules"] + : subResourceArrayDeserializer(item["inboundNatRules"]), + inboundNatPools: !item["inboundNatPools"] + ? item["inboundNatPools"] + : subResourceArrayDeserializer(item["inboundNatPools"]), + outboundRules: !item["outboundRules"] + ? item["outboundRules"] + : subResourceArrayDeserializer(item["outboundRules"]), + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : subResourceArrayDeserializer(item["loadBalancingRules"]), + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + privateIPAddressVersion: item["privateIPAddressVersion"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressDeserializer(item["publicIPAddress"]), + publicIPPrefix: !item["publicIPPrefix"] + ? item["publicIPPrefix"] + : subResourceDeserializer(item["publicIPPrefix"]), + gatewayLoadBalancer: !item["gatewayLoadBalancer"] + ? item["gatewayLoadBalancer"] + : subResourceDeserializer(item["gatewayLoadBalancer"]), + provisioningState: item["provisioningState"], + ddosSettings: !item["ddosSettings"] + ? item["ddosSettings"] + : ddosFrontendIpConfigurationSettingsDeserializer(item["ddosSettings"]), + }; +} + +export function _virtualNetworkTapPropertiesSerializer(item: VirtualNetworkTap): any { + return { + destinationNetworkInterfaceIPConfiguration: !item["destinationNetworkInterfaceIPConfiguration"] + ? item["destinationNetworkInterfaceIPConfiguration"] + : networkInterfaceIPConfigurationSerializer( + item["destinationNetworkInterfaceIPConfiguration"], + ), + destinationLoadBalancerFrontEndIPConfiguration: !item[ + "destinationLoadBalancerFrontEndIPConfiguration" + ] + ? item["destinationLoadBalancerFrontEndIPConfiguration"] + : frontendIPConfigurationSerializer(item["destinationLoadBalancerFrontEndIPConfiguration"]), + destinationPort: item["destinationPort"], + }; +} + +export function _virtualNetworkTapPropertiesDeserializer(item: any) { + return { + networkInterfaceTapConfigurations: !item["networkInterfaceTapConfigurations"] + ? item["networkInterfaceTapConfigurations"] + : networkInterfaceTapConfigurationArrayDeserializer( + item["networkInterfaceTapConfigurations"], + ), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + destinationNetworkInterfaceIPConfiguration: !item["destinationNetworkInterfaceIPConfiguration"] + ? item["destinationNetworkInterfaceIPConfiguration"] + : networkInterfaceIPConfigurationDeserializer( + item["destinationNetworkInterfaceIPConfiguration"], + ), + destinationLoadBalancerFrontEndIPConfiguration: !item[ + "destinationLoadBalancerFrontEndIPConfiguration" + ] + ? item["destinationLoadBalancerFrontEndIPConfiguration"] + : frontendIPConfigurationDeserializer(item["destinationLoadBalancerFrontEndIPConfiguration"]), + destinationPort: item["destinationPort"], + }; +} + +export function _loadBalancerBackendAddressPropertiesSerializer( + item: LoadBalancerBackendAddress, +): any { + return { + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceSerializer(item["virtualNetwork"]), + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + ipAddress: item["ipAddress"], + loadBalancerFrontendIPConfiguration: !item["loadBalancerFrontendIPConfiguration"] + ? item["loadBalancerFrontendIPConfiguration"] + : subResourceSerializer(item["loadBalancerFrontendIPConfiguration"]), + adminState: item["adminState"], + }; +} + +export function _loadBalancerBackendAddressPropertiesDeserializer(item: any) { + return { + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceDeserializer(item["virtualNetwork"]), + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + ipAddress: item["ipAddress"], + networkInterfaceIPConfiguration: !item["networkInterfaceIPConfiguration"] + ? item["networkInterfaceIPConfiguration"] + : subResourceDeserializer(item["networkInterfaceIPConfiguration"]), + loadBalancerFrontendIPConfiguration: !item["loadBalancerFrontendIPConfiguration"] + ? item["loadBalancerFrontendIPConfiguration"] + : subResourceDeserializer(item["loadBalancerFrontendIPConfiguration"]), + inboundNatRulesPortMapping: !item["inboundNatRulesPortMapping"] + ? item["inboundNatRulesPortMapping"] + : natRulePortMappingArrayDeserializer(item["inboundNatRulesPortMapping"]), + adminState: item["adminState"], + }; +} + +export function _backendAddressPoolPropertiesSerializer(item: BackendAddressPool): any { + return { + location: item["location"], + tunnelInterfaces: !item["tunnelInterfaces"] + ? item["tunnelInterfaces"] + : gatewayLoadBalancerTunnelInterfaceArraySerializer(item["tunnelInterfaces"]), + loadBalancerBackendAddresses: !item["loadBalancerBackendAddresses"] + ? item["loadBalancerBackendAddresses"] + : loadBalancerBackendAddressArraySerializer(item["loadBalancerBackendAddresses"]), + drainPeriodInSeconds: item["drainPeriodInSeconds"], + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceSerializer(item["virtualNetwork"]), + syncMode: item["syncMode"], + }; +} + +export function _backendAddressPoolPropertiesDeserializer(item: any) { + return { + location: item["location"], + tunnelInterfaces: !item["tunnelInterfaces"] + ? item["tunnelInterfaces"] + : gatewayLoadBalancerTunnelInterfaceArrayDeserializer(item["tunnelInterfaces"]), + loadBalancerBackendAddresses: !item["loadBalancerBackendAddresses"] + ? item["loadBalancerBackendAddresses"] + : loadBalancerBackendAddressArrayDeserializer(item["loadBalancerBackendAddresses"]), + backendIPConfigurations: !item["backendIPConfigurations"] + ? item["backendIPConfigurations"] + : networkInterfaceIPConfigurationArrayDeserializer(item["backendIPConfigurations"]), + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : subResourceArrayDeserializer(item["loadBalancingRules"]), + outboundRule: !item["outboundRule"] + ? item["outboundRule"] + : subResourceDeserializer(item["outboundRule"]), + outboundRules: !item["outboundRules"] + ? item["outboundRules"] + : subResourceArrayDeserializer(item["outboundRules"]), + inboundNatRules: !item["inboundNatRules"] + ? item["inboundNatRules"] + : subResourceArrayDeserializer(item["inboundNatRules"]), + provisioningState: item["provisioningState"], + drainPeriodInSeconds: item["drainPeriodInSeconds"], + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceDeserializer(item["virtualNetwork"]), + syncMode: item["syncMode"], + }; +} + +export function _inboundNatRulePropertiesSerializer(item: InboundNatRule): any { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceSerializer(item["frontendIPConfiguration"]), + protocol: item["protocol"], + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + frontendPortRangeStart: item["frontendPortRangeStart"], + frontendPortRangeEnd: item["frontendPortRangeEnd"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + }; +} + +export function _inboundNatRulePropertiesDeserializer(item: any) { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceDeserializer(item["frontendIPConfiguration"]), + backendIPConfiguration: !item["backendIPConfiguration"] + ? item["backendIPConfiguration"] + : networkInterfaceIPConfigurationDeserializer(item["backendIPConfiguration"]), + protocol: item["protocol"], + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + frontendPortRangeStart: item["frontendPortRangeStart"], + frontendPortRangeEnd: item["frontendPortRangeEnd"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + provisioningState: item["provisioningState"], + }; +} + +export function _networkInterfaceIPConfigurationPropertiesSerializer( + item: NetworkInterfaceIPConfiguration, +): any { + return { + gatewayLoadBalancer: !item["gatewayLoadBalancer"] + ? item["gatewayLoadBalancer"] + : subResourceSerializer(item["gatewayLoadBalancer"]), + virtualNetworkTaps: !item["virtualNetworkTaps"] + ? item["virtualNetworkTaps"] + : virtualNetworkTapArraySerializer(item["virtualNetworkTaps"]), + applicationGatewayBackendAddressPools: !item["applicationGatewayBackendAddressPools"] + ? item["applicationGatewayBackendAddressPools"] + : applicationGatewayBackendAddressPoolArraySerializer( + item["applicationGatewayBackendAddressPools"], + ), + loadBalancerBackendAddressPools: !item["loadBalancerBackendAddressPools"] + ? item["loadBalancerBackendAddressPools"] + : backendAddressPoolArraySerializer(item["loadBalancerBackendAddressPools"]), + loadBalancerInboundNatRules: !item["loadBalancerInboundNatRules"] + ? item["loadBalancerInboundNatRules"] + : inboundNatRuleArraySerializer(item["loadBalancerInboundNatRules"]), + privateIPAddress: item["privateIPAddress"], + privateIPAddressPrefixLength: item["privateIPAddressPrefixLength"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + privateIPAddressVersion: item["privateIPAddressVersion"], + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + primary: item["primary"], + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressSerializer(item["publicIPAddress"]), + applicationSecurityGroups: !item["applicationSecurityGroups"] + ? item["applicationSecurityGroups"] + : applicationSecurityGroupArraySerializer(item["applicationSecurityGroups"]), + }; +} + +export function _networkInterfaceIPConfigurationPropertiesDeserializer(item: any) { + return { + gatewayLoadBalancer: !item["gatewayLoadBalancer"] + ? item["gatewayLoadBalancer"] + : subResourceDeserializer(item["gatewayLoadBalancer"]), + virtualNetworkTaps: !item["virtualNetworkTaps"] + ? item["virtualNetworkTaps"] + : virtualNetworkTapArrayDeserializer(item["virtualNetworkTaps"]), + applicationGatewayBackendAddressPools: !item["applicationGatewayBackendAddressPools"] + ? item["applicationGatewayBackendAddressPools"] + : applicationGatewayBackendAddressPoolArrayDeserializer( + item["applicationGatewayBackendAddressPools"], + ), + loadBalancerBackendAddressPools: !item["loadBalancerBackendAddressPools"] + ? item["loadBalancerBackendAddressPools"] + : backendAddressPoolArrayDeserializer(item["loadBalancerBackendAddressPools"]), + loadBalancerInboundNatRules: !item["loadBalancerInboundNatRules"] + ? item["loadBalancerInboundNatRules"] + : inboundNatRuleArrayDeserializer(item["loadBalancerInboundNatRules"]), + privateIPAddress: item["privateIPAddress"], + privateIPAddressPrefixLength: item["privateIPAddressPrefixLength"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + privateIPAddressVersion: item["privateIPAddressVersion"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + primary: item["primary"], + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressDeserializer(item["publicIPAddress"]), + applicationSecurityGroups: !item["applicationSecurityGroups"] + ? item["applicationSecurityGroups"] + : applicationSecurityGroupArrayDeserializer(item["applicationSecurityGroups"]), + provisioningState: item["provisioningState"], + privateLinkConnectionProperties: !item["privateLinkConnectionProperties"] + ? item["privateLinkConnectionProperties"] + : networkInterfaceIPConfigurationPrivateLinkConnectionPropertiesDeserializer( + item["privateLinkConnectionProperties"], + ), + }; +} + +export function _applicationGatewayBackendAddressPoolPropertiesSerializer( + item: ApplicationGatewayBackendAddressPool, +): any { + return { + backendAddresses: !item["backendAddresses"] + ? item["backendAddresses"] + : applicationGatewayBackendAddressArraySerializer(item["backendAddresses"]), + }; +} + +export function _applicationGatewayBackendAddressPoolPropertiesDeserializer(item: any) { + return { + backendIPConfigurations: !item["backendIPConfigurations"] + ? item["backendIPConfigurations"] + : networkInterfaceIPConfigurationArrayDeserializer(item["backendIPConfigurations"]), + backendAddresses: !item["backendAddresses"] + ? item["backendAddresses"] + : applicationGatewayBackendAddressArrayDeserializer(item["backendAddresses"]), + provisioningState: item["provisioningState"], + }; +} + +export function _loadBalancingRulePropertiesSerializer(item: LoadBalancingRule): any { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceSerializer(item["frontendIPConfiguration"]), + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : subResourceArraySerializer(item["backendAddressPools"]), + probe: !item["probe"] ? item["probe"] : subResourceSerializer(item["probe"]), + protocol: item["protocol"], + loadDistribution: item["loadDistribution"], + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + disableOutboundSnat: item["disableOutboundSnat"], + enableConnectionTracking: item["enableConnectionTracking"], + }; +} + +export function _loadBalancingRulePropertiesDeserializer(item: any) { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceDeserializer(item["frontendIPConfiguration"]), + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : subResourceArrayDeserializer(item["backendAddressPools"]), + probe: !item["probe"] ? item["probe"] : subResourceDeserializer(item["probe"]), + protocol: item["protocol"], + loadDistribution: item["loadDistribution"], + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + disableOutboundSnat: item["disableOutboundSnat"], + enableConnectionTracking: item["enableConnectionTracking"], + provisioningState: item["provisioningState"], + }; +} + +export function _probePropertiesSerializer(item: Probe): any { + return { + protocol: item["protocol"], + port: item["port"], + intervalInSeconds: item["intervalInSeconds"], + noHealthyBackendsBehavior: item["noHealthyBackendsBehavior"], + numberOfProbes: item["numberOfProbes"], + probeThreshold: item["probeThreshold"], + requestPath: item["requestPath"], + }; +} + +export function _probePropertiesDeserializer(item: any) { + return { + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : subResourceArrayDeserializer(item["loadBalancingRules"]), + protocol: item["protocol"], + port: item["port"], + intervalInSeconds: item["intervalInSeconds"], + noHealthyBackendsBehavior: item["noHealthyBackendsBehavior"], + numberOfProbes: item["numberOfProbes"], + probeThreshold: item["probeThreshold"], + requestPath: item["requestPath"], + provisioningState: item["provisioningState"], + }; +} + +export function _inboundNatPoolPropertiesSerializer(item: InboundNatPool): any { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceSerializer(item["frontendIPConfiguration"]), + protocol: item["protocol"], + frontendPortRangeStart: item["frontendPortRangeStart"], + frontendPortRangeEnd: item["frontendPortRangeEnd"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + }; +} + +export function _inboundNatPoolPropertiesDeserializer(item: any) { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceDeserializer(item["frontendIPConfiguration"]), + protocol: item["protocol"], + frontendPortRangeStart: item["frontendPortRangeStart"], + frontendPortRangeEnd: item["frontendPortRangeEnd"], + backendPort: item["backendPort"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + enableFloatingIP: item["enableFloatingIP"], + enableTcpReset: item["enableTcpReset"], + provisioningState: item["provisioningState"], + }; +} + +export function _outboundRulePropertiesSerializer(item: OutboundRule): any { + return { + allocatedOutboundPorts: item["allocatedOutboundPorts"], + frontendIPConfigurations: !item["frontendIPConfigurations"] + ? item["frontendIPConfigurations"] + : subResourceArraySerializer(item["frontendIPConfigurations"]), + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + protocol: item["protocol"], + enableTcpReset: item["enableTcpReset"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + }; +} + +export function _outboundRulePropertiesDeserializer(item: any) { + return { + allocatedOutboundPorts: item["allocatedOutboundPorts"], + frontendIPConfigurations: !item["frontendIPConfigurations"] + ? item["frontendIPConfigurations"] + : subResourceArrayDeserializer(item["frontendIPConfigurations"]), + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + provisioningState: item["provisioningState"], + protocol: item["protocol"], + enableTcpReset: item["enableTcpReset"], + idleTimeoutInMinutes: item["idleTimeoutInMinutes"], + }; +} + +export function _loadBalancerPropertiesSerializer(item: LoadBalancer): any { + return { + frontendIPConfigurations: !item["frontendIPConfigurations"] + ? item["frontendIPConfigurations"] + : frontendIPConfigurationArraySerializer(item["frontendIPConfigurations"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : backendAddressPoolArraySerializer(item["backendAddressPools"]), + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : loadBalancingRuleArraySerializer(item["loadBalancingRules"]), + probes: !item["probes"] ? item["probes"] : probeArraySerializer(item["probes"]), + inboundNatRules: !item["inboundNatRules"] + ? item["inboundNatRules"] + : inboundNatRuleArraySerializer(item["inboundNatRules"]), + inboundNatPools: !item["inboundNatPools"] + ? item["inboundNatPools"] + : inboundNatPoolArraySerializer(item["inboundNatPools"]), + outboundRules: !item["outboundRules"] + ? item["outboundRules"] + : outboundRuleArraySerializer(item["outboundRules"]), + scope: item["scope"], + }; +} + +export function _loadBalancerPropertiesDeserializer(item: any) { + return { + frontendIPConfigurations: !item["frontendIPConfigurations"] + ? item["frontendIPConfigurations"] + : frontendIPConfigurationArrayDeserializer(item["frontendIPConfigurations"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : backendAddressPoolArrayDeserializer(item["backendAddressPools"]), + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : loadBalancingRuleArrayDeserializer(item["loadBalancingRules"]), + probes: !item["probes"] ? item["probes"] : probeArrayDeserializer(item["probes"]), + inboundNatRules: !item["inboundNatRules"] + ? item["inboundNatRules"] + : inboundNatRuleArrayDeserializer(item["inboundNatRules"]), + inboundNatPools: !item["inboundNatPools"] + ? item["inboundNatPools"] + : inboundNatPoolArrayDeserializer(item["inboundNatPools"]), + outboundRules: !item["outboundRules"] + ? item["outboundRules"] + : outboundRuleArrayDeserializer(item["outboundRules"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + scope: item["scope"], + }; +} + +export function _networkWatcherPropertiesSerializer(_item: NetworkWatcher): any { + return {}; +} + +export function _networkWatcherPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + }; +} + +export function _virtualNetworkPeeringPropertiesSerializer(item: VirtualNetworkPeering): any { + return { + allowVirtualNetworkAccess: item["allowVirtualNetworkAccess"], + allowForwardedTraffic: item["allowForwardedTraffic"], + allowGatewayTransit: item["allowGatewayTransit"], + useRemoteGateways: item["useRemoteGateways"], + remoteVirtualNetwork: !item["remoteVirtualNetwork"] + ? item["remoteVirtualNetwork"] + : subResourceSerializer(item["remoteVirtualNetwork"]), + localAddressSpace: !item["localAddressSpace"] + ? item["localAddressSpace"] + : addressSpaceSerializer(item["localAddressSpace"]), + localVirtualNetworkAddressSpace: !item["localVirtualNetworkAddressSpace"] + ? item["localVirtualNetworkAddressSpace"] + : addressSpaceSerializer(item["localVirtualNetworkAddressSpace"]), + remoteAddressSpace: !item["remoteAddressSpace"] + ? item["remoteAddressSpace"] + : addressSpaceSerializer(item["remoteAddressSpace"]), + remoteVirtualNetworkAddressSpace: !item["remoteVirtualNetworkAddressSpace"] + ? item["remoteVirtualNetworkAddressSpace"] + : addressSpaceSerializer(item["remoteVirtualNetworkAddressSpace"]), + remoteBgpCommunities: !item["remoteBgpCommunities"] + ? item["remoteBgpCommunities"] + : virtualNetworkBgpCommunitiesSerializer(item["remoteBgpCommunities"]), + peeringState: item["peeringState"], + peeringSyncLevel: item["peeringSyncLevel"], + doNotVerifyRemoteGateways: item["doNotVerifyRemoteGateways"], + peerCompleteVnets: item["peerCompleteVnets"], + enableOnlyIPv6Peering: item["enableOnlyIPv6Peering"], + localSubnetNames: !item["localSubnetNames"] + ? item["localSubnetNames"] + : item["localSubnetNames"].map((p: any) => { + return p; + }), + remoteSubnetNames: !item["remoteSubnetNames"] + ? item["remoteSubnetNames"] + : item["remoteSubnetNames"].map((p: any) => { + return p; + }), + }; +} + +export function _virtualNetworkPeeringPropertiesDeserializer(item: any) { + return { + allowVirtualNetworkAccess: item["allowVirtualNetworkAccess"], + allowForwardedTraffic: item["allowForwardedTraffic"], + allowGatewayTransit: item["allowGatewayTransit"], + useRemoteGateways: item["useRemoteGateways"], + remoteVirtualNetwork: !item["remoteVirtualNetwork"] + ? item["remoteVirtualNetwork"] + : subResourceDeserializer(item["remoteVirtualNetwork"]), + localAddressSpace: !item["localAddressSpace"] + ? item["localAddressSpace"] + : addressSpaceDeserializer(item["localAddressSpace"]), + localVirtualNetworkAddressSpace: !item["localVirtualNetworkAddressSpace"] + ? item["localVirtualNetworkAddressSpace"] + : addressSpaceDeserializer(item["localVirtualNetworkAddressSpace"]), + remoteAddressSpace: !item["remoteAddressSpace"] + ? item["remoteAddressSpace"] + : addressSpaceDeserializer(item["remoteAddressSpace"]), + remoteVirtualNetworkAddressSpace: !item["remoteVirtualNetworkAddressSpace"] + ? item["remoteVirtualNetworkAddressSpace"] + : addressSpaceDeserializer(item["remoteVirtualNetworkAddressSpace"]), + remoteBgpCommunities: !item["remoteBgpCommunities"] + ? item["remoteBgpCommunities"] + : virtualNetworkBgpCommunitiesDeserializer(item["remoteBgpCommunities"]), + remoteVirtualNetworkEncryption: !item["remoteVirtualNetworkEncryption"] + ? item["remoteVirtualNetworkEncryption"] + : virtualNetworkEncryptionDeserializer(item["remoteVirtualNetworkEncryption"]), + peeringState: item["peeringState"], + peeringSyncLevel: item["peeringSyncLevel"], + provisioningState: item["provisioningState"], + doNotVerifyRemoteGateways: item["doNotVerifyRemoteGateways"], + resourceGuid: item["resourceGuid"], + peerCompleteVnets: item["peerCompleteVnets"], + enableOnlyIPv6Peering: item["enableOnlyIPv6Peering"], + localSubnetNames: !item["localSubnetNames"] + ? item["localSubnetNames"] + : item["localSubnetNames"].map((p: any) => { + return p; + }), + remoteSubnetNames: !item["remoteSubnetNames"] + ? item["remoteSubnetNames"] + : item["remoteSubnetNames"].map((p: any) => { + return p; + }), + }; +} + +export function _virtualNetworkPropertiesSerializer(item: VirtualNetwork): any { + return { + addressSpace: !item["addressSpace"] + ? item["addressSpace"] + : addressSpaceSerializer(item["addressSpace"]), + dhcpOptions: !item["dhcpOptions"] + ? item["dhcpOptions"] + : dhcpOptionsSerializer(item["dhcpOptions"]), + flowTimeoutInMinutes: item["flowTimeoutInMinutes"], + subnets: !item["subnets"] ? item["subnets"] : subnetArraySerializer(item["subnets"]), + virtualNetworkPeerings: !item["virtualNetworkPeerings"] + ? item["virtualNetworkPeerings"] + : virtualNetworkPeeringArraySerializer(item["virtualNetworkPeerings"]), + enableDdosProtection: item["enableDdosProtection"], + enableVmProtection: item["enableVmProtection"], + ddosProtectionPlan: !item["ddosProtectionPlan"] + ? item["ddosProtectionPlan"] + : subResourceSerializer(item["ddosProtectionPlan"]), + bgpCommunities: !item["bgpCommunities"] + ? item["bgpCommunities"] + : virtualNetworkBgpCommunitiesSerializer(item["bgpCommunities"]), + encryption: !item["encryption"] + ? item["encryption"] + : virtualNetworkEncryptionSerializer(item["encryption"]), + ipAllocations: !item["ipAllocations"] + ? item["ipAllocations"] + : subResourceArraySerializer(item["ipAllocations"]), + privateEndpointVNetPolicies: item["privateEndpointVNetPolicies"], + summarizedGatewayPrefixes: !item["summarizedGatewayPrefixes"] + ? item["summarizedGatewayPrefixes"] + : addressSpaceSerializer(item["summarizedGatewayPrefixes"]), + }; +} + +export function _virtualNetworkPropertiesDeserializer(item: any) { + return { + addressSpace: !item["addressSpace"] + ? item["addressSpace"] + : addressSpaceDeserializer(item["addressSpace"]), + dhcpOptions: !item["dhcpOptions"] + ? item["dhcpOptions"] + : dhcpOptionsDeserializer(item["dhcpOptions"]), + flowTimeoutInMinutes: item["flowTimeoutInMinutes"], + subnets: !item["subnets"] ? item["subnets"] : subnetArrayDeserializer(item["subnets"]), + virtualNetworkPeerings: !item["virtualNetworkPeerings"] + ? item["virtualNetworkPeerings"] + : virtualNetworkPeeringArrayDeserializer(item["virtualNetworkPeerings"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + enableDdosProtection: item["enableDdosProtection"], + enableVmProtection: item["enableVmProtection"], + ddosProtectionPlan: !item["ddosProtectionPlan"] + ? item["ddosProtectionPlan"] + : subResourceDeserializer(item["ddosProtectionPlan"]), + bgpCommunities: !item["bgpCommunities"] + ? item["bgpCommunities"] + : virtualNetworkBgpCommunitiesDeserializer(item["bgpCommunities"]), + encryption: !item["encryption"] + ? item["encryption"] + : virtualNetworkEncryptionDeserializer(item["encryption"]), + ipAllocations: !item["ipAllocations"] + ? item["ipAllocations"] + : subResourceArrayDeserializer(item["ipAllocations"]), + flowLogs: !item["flowLogs"] ? item["flowLogs"] : flowLogArrayDeserializer(item["flowLogs"]), + privateEndpointVNetPolicies: item["privateEndpointVNetPolicies"], + defaultPublicNatGateway: !item["defaultPublicNatGateway"] + ? item["defaultPublicNatGateway"] + : subResourceDeserializer(item["defaultPublicNatGateway"]), + summarizedGatewayPrefixes: !item["summarizedGatewayPrefixes"] + ? item["summarizedGatewayPrefixes"] + : addressSpaceDeserializer(item["summarizedGatewayPrefixes"]), + }; +} diff --git a/sdk/network/arm-network/src/models/index.ts b/sdk/network/arm-network/src/models/index.ts index e0a988e069cb..85b5af29555c 100644 --- a/sdk/network/arm-network/src/models/index.ts +++ b/sdk/network/arm-network/src/models/index.ts @@ -1,27985 +1,35 @@ // 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 type * as coreClient from "@azure/core-client"; - -export type FirewallPolicyRuleCollectionUnion = - | FirewallPolicyRuleCollection - | FirewallPolicyNatRuleCollection - | FirewallPolicyFilterRuleCollection; -export type ActiveBaseSecurityAdminRuleUnion = - | ActiveBaseSecurityAdminRule - | ActiveSecurityAdminRule - | ActiveDefaultSecurityAdminRule; -export type EffectiveBaseSecurityAdminRuleUnion = - | EffectiveBaseSecurityAdminRule - | EffectiveSecurityAdminRule - | EffectiveDefaultSecurityAdminRule; -export type FirewallPolicyRuleUnion = FirewallPolicyRule | ApplicationRule | NatRule | NetworkRule; -export type BaseAdminRuleUnion = BaseAdminRule | AdminRule | DefaultAdminRule; - -/** An error response from the service. */ -export interface CloudError { - /** Cloud error body. */ - error?: CloudErrorBody; -} - -/** An error response from the service. */ -export interface CloudErrorBody { - /** An identifier for the error. Codes are invariant and are intended to be consumed programmatically. */ - code?: string; - /** A message describing the error, intended to be suitable for display in a user interface. */ - message?: string; - /** The target of the particular error. For example, the name of the property in error. */ - target?: string; - /** A list of additional details about the error. */ - details?: CloudErrorBody[]; -} - -/** SKU of an application gateway. */ -export interface ApplicationGatewaySku { - /** Name of an application gateway SKU. */ - name?: ApplicationGatewaySkuName; - /** Tier of an application gateway. */ - tier?: ApplicationGatewayTier; - /** Capacity (instance count) of an application gateway. */ - capacity?: number; - /** Family of an application gateway SKU. */ - family?: ApplicationGatewaySkuFamily; -} - -/** Application Gateway Ssl policy. */ -export interface ApplicationGatewaySslPolicy { - /** Ssl protocols to be disabled on application gateway. */ - disabledSslProtocols?: ApplicationGatewaySslProtocol[]; - /** Type of Ssl Policy. */ - policyType?: ApplicationGatewaySslPolicyType; - /** Name of Ssl predefined policy. */ - policyName?: ApplicationGatewaySslPolicyName; - /** Ssl cipher suites to be enabled in the specified order to application gateway. */ - cipherSuites?: ApplicationGatewaySslCipherSuite[]; - /** Minimum version of Ssl protocol to be supported on application gateway. */ - minProtocolVersion?: ApplicationGatewaySslProtocol; -} - -/** Reference to another subresource. */ -export interface SubResource { - /** Resource ID. */ - id?: string; -} - -/** Application gateway probe health response match. */ -export interface ApplicationGatewayProbeHealthResponseMatch { - /** Body that must be contained in the health response. Default value is empty. */ - body?: string; - /** Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. */ - statusCodes?: string[]; -} - -/** Common resource representation. */ -export interface Resource { - /** Resource ID. */ - id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Resource location. */ - location?: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** ExtendedLocation complex type. */ -export interface ExtendedLocation { - /** The name of the extended location. */ - name?: string; - /** The type of the extended location. */ - type?: ExtendedLocationTypes; -} - -/** A collection of information about the state of the connection between service consumer and provider. */ -export interface PrivateLinkServiceConnectionState { - /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ - status?: string; - /** The reason for approval/rejection of the connection. */ - description?: string; - /** A message indicating if changes on the service provider require any updates on the consumer. */ - actionsRequired?: string; -} - -/** Contains custom Dns resolution configuration from customer. */ -export interface CustomDnsConfigPropertiesFormat { - /** Fqdn that resolves to private endpoint ip address. */ - fqdn?: string; - /** A list of private ip addresses of the private endpoint. */ - ipAddresses?: string[]; -} - -/** An IP Configuration of the private endpoint. */ -export interface PrivateEndpointIPConfiguration { - /** The name of the resource that is unique within a resource group. */ - name?: string; - /** - * The resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: 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; - /** The ID of a group obtained from the remote resource that this private endpoint should connect to. */ - groupId?: string; - /** The member name of a group obtained from the remote resource that this private endpoint should connect to. */ - memberName?: string; - /** A private ip address obtained from the private endpoint's subnet. */ - privateIPAddress?: string; -} - -/** DNS settings of a network interface. */ -export interface NetworkInterfaceDnsSettings { - /** List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. */ - dnsServers?: string[]; - /** - * If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly appliedDnsServers?: string[]; - /** Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. */ - internalDnsNameLabel?: string; - /** - * Fully qualified DNS name supporting internal communications between VMs in the same virtual network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly internalFqdn?: string; - /** - * Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly internalDomainNameSuffix?: string; -} - -/** The base resource set for visibility and auto-approval. */ -export interface ResourceSet { - /** The list of subscriptions. */ - subscriptions?: string[]; -} - -/** Parameters that define the retention policy for flow log. */ -export interface RetentionPolicyParameters { - /** Number of days to retain flow log records. */ - days?: number; - /** Flag to enable/disable retention. */ - enabled?: boolean; -} - -/** Parameters that define the flow log format. */ -export interface FlowLogFormatParameters { - /** The file type of flow log. */ - type?: FlowLogFormatType; - /** The version (revision) of the flow log. */ - version?: number; -} - -/** Parameters that define the configuration of traffic analytics. */ -export interface TrafficAnalyticsProperties { - /** Parameters that define the configuration of traffic analytics. */ - networkWatcherFlowAnalyticsConfiguration?: TrafficAnalyticsConfigurationProperties; -} - -/** Parameters that define the configuration of traffic analytics. */ -export interface TrafficAnalyticsConfigurationProperties { - /** Flag to enable/disable traffic analytics. */ - enabled?: boolean; - /** The resource guid of the attached workspace. */ - workspaceId?: string; - /** The location of the attached workspace. */ - workspaceRegion?: string; - /** Resource Id of the attached workspace. */ - workspaceResourceId?: string; - /** The interval in minutes which would decide how frequently TA service should do flow analytics. */ - trafficAnalyticsInterval?: number; -} - -/** Identity for the resource. */ -export interface ManagedServiceIdentity { - /** - * The principal id of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. */ - type?: ResourceIdentityType; - /** The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - userAssignedIdentities?: { - [ - propertyName: string - ]: Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties; - }; -} - -export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { - /** - * The principal id of user assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client id of user assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clientId?: string; -} - -/** The service endpoint properties. */ -export interface ServiceEndpointPropertiesFormat { - /** The type of the endpoint service. */ - service?: string; - /** SubResource as network identifier. */ - networkIdentifier?: SubResource; - /** A list of locations. */ - locations?: string[]; - /** - * The provisioning state of the service endpoint resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** SKU of a public IP address. */ -export interface PublicIPAddressSku { - /** Name of a public IP address SKU. */ - name?: PublicIPAddressSkuName; - /** Tier of a public IP address SKU. */ - tier?: PublicIPAddressSkuTier; -} - -/** Contains FQDN of the DNS record associated with the public IP address. */ -export interface PublicIPAddressDnsSettings { - /** The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. */ - domainNameLabel?: string; - /** The domain name label scope. If a domain name label and a domain name label scope are specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. */ - domainNameLabelScope?: PublicIpAddressDnsSettingsDomainNameLabelScope; - /** The Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. */ - fqdn?: string; - /** The reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. */ - reverseFqdn?: string; -} - -/** Contains the DDoS protection settings of the public IP. */ -export interface DdosSettings { - /** The DDoS protection mode of the public IP */ - protectionMode?: DdosSettingsProtectionMode; - /** The DDoS protection plan associated with the public IP. Can only be set if ProtectionMode is Enabled */ - ddosProtectionPlan?: SubResource; -} - -/** Contains the IpTag associated with the object. */ -export interface IpTag { - /** The IP tag type. Example: FirstPartyUsage. */ - ipTagType?: string; - /** The value of the IP tag associated with the public IP. Example: SQL. */ - tag?: string; -} - -/** SKU of nat gateway. */ -export interface NatGatewaySku { - /** Name of Nat Gateway SKU. */ - name?: NatGatewaySkuName; -} - -/** IpamPool prefix allocation reference. */ -export interface IpamPoolPrefixAllocation { - /** Number of IP addresses to allocate. */ - numberOfIpAddresses?: string; - /** - * List of assigned IP address prefixes in the IpamPool of the associated resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly allocatedAddressPrefixes?: string[]; - /** Resource id of the associated Azure IpamPool resource. */ - id?: string; -} - -/** Gateway load balancer tunnel interface of a load balancer backend address pool. */ -export interface GatewayLoadBalancerTunnelInterface { - /** Port of gateway load balancer tunnel interface. */ - port?: number; - /** Identifier of gateway load balancer tunnel interface. */ - identifier?: number; - /** Protocol of gateway load balancer tunnel interface. */ - protocol?: GatewayLoadBalancerTunnelProtocol; - /** Traffic type of gateway load balancer tunnel interface. */ - type?: GatewayLoadBalancerTunnelInterfaceType; -} - -/** Load balancer backend addresses. */ -export interface LoadBalancerBackendAddress { - /** Name of the backend address. */ - name?: string; - /** Reference to an existing virtual network. */ - virtualNetwork?: SubResource; - /** Reference to an existing subnet. */ - subnet?: SubResource; - /** IP Address belonging to the referenced virtual network. */ - ipAddress?: string; - /** - * Reference to IP address defined in network interfaces. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkInterfaceIPConfiguration?: SubResource; - /** Reference to the frontend ip address configuration defined in regional loadbalancer. */ - loadBalancerFrontendIPConfiguration?: SubResource; - /** - * Collection of inbound NAT rule port mappings. - * 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. */ -export interface NatRulePortMapping { - /** Name of inbound NAT rule. */ - inboundNatRuleName?: string; - /** Frontend port. */ - frontendPort?: number; - /** Backend port. */ - backendPort?: number; -} - -/** PrivateLinkConnection properties for the network interface. */ -export interface NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties { - /** - * The group ID for current private link connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupId?: string; - /** - * The required member name for current private link connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredMemberName?: string; - /** - * List of FQDNs for current private link connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly fqdns?: string[]; -} - -/** Backend address of an application gateway. */ -export interface ApplicationGatewayBackendAddress { - /** Fully qualified domain name (FQDN). */ - fqdn?: string; - /** IP address. */ - ipAddress?: string; -} - -/** Connection draining allows open connections to a backend server to be active for a specified time after the backend server got removed from the configuration. */ -export interface ApplicationGatewayConnectionDraining { - /** Whether connection draining is enabled or not. */ - enabled: boolean; - /** The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. */ - drainTimeoutInSec: number; -} - -/** Custom error of an application gateway. */ -export interface ApplicationGatewayCustomError { - /** Status code of the application gateway custom error. */ - statusCode?: ApplicationGatewayCustomErrorStatusCode; - /** Error page URL of the application gateway custom error. */ - customErrorPageUrl?: string; -} - -/** Application gateway client authentication configuration. */ -export interface ApplicationGatewayClientAuthConfiguration { - /** Verify client certificate issuer name on the application gateway. */ - verifyClientCertIssuerDN?: boolean; - /** Verify client certificate revocation status. */ - verifyClientRevocation?: ApplicationGatewayClientRevocationOptions; - /** Verify client Authentication mode. */ - verifyClientAuthMode?: ApplicationGatewayClientAuthVerificationModes; -} - -/** Rewrite rule of an application gateway. */ -export interface ApplicationGatewayRewriteRule { - /** Name of the rewrite rule that is unique within an Application Gateway. */ - name?: string; - /** Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet. */ - ruleSequence?: number; - /** Conditions based on which the action set execution will be evaluated. */ - conditions?: ApplicationGatewayRewriteRuleCondition[]; - /** Set of actions to be done as part of the rewrite Rule. */ - actionSet?: ApplicationGatewayRewriteRuleActionSet; -} - -/** Set of conditions in the Rewrite Rule in Application Gateway. */ -export interface ApplicationGatewayRewriteRuleCondition { - /** The condition parameter of the RewriteRuleCondition. */ - variable?: string; - /** The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition. */ - pattern?: string; - /** Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison. */ - ignoreCase?: boolean; - /** Setting this value as truth will force to check the negation of the condition given by the user. */ - negate?: boolean; -} - -/** Set of actions in the Rewrite Rule in Application Gateway. */ -export interface ApplicationGatewayRewriteRuleActionSet { - /** Request Header Actions in the Action Set. */ - requestHeaderConfigurations?: ApplicationGatewayHeaderConfiguration[]; - /** Response Header Actions in the Action Set. */ - responseHeaderConfigurations?: ApplicationGatewayHeaderConfiguration[]; - /** Url Configuration Action in the Action Set. */ - urlConfiguration?: ApplicationGatewayUrlConfiguration; -} - -/** Header configuration of the Actions set in Application Gateway. */ -export interface ApplicationGatewayHeaderConfiguration { - /** Header name of the header configuration. */ - headerName?: string; - /** An optional field under "Rewrite Action". It lets you capture and modify the value(s) of a specific header when multiple headers with the same name exist. Currently supported for Set-Cookie Response header only. For more details, visit https://aka.ms/appgwheadercrud */ - headerValueMatcher?: HeaderValueMatcher; - /** Header value of the header configuration. */ - headerValue?: string; -} - -/** An optional field under "Rewrite Action". It lets you capture and modify the value(s) of a specific header when multiple headers with the same name exist. Currently supported for Set-Cookie Response header only. For more details, visit https://aka.ms/appgwheadercrud */ -export interface HeaderValueMatcher { - /** The pattern, either fixed string or regular expression, that evaluates if a header value should be selected for rewrite. */ - pattern?: string; - /** Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison. */ - ignoreCase?: boolean; - /** Setting this value as truth will force to check the negation of the condition given by the user in the pattern field. */ - negate?: boolean; -} - -/** Url configuration of the Actions set in Application Gateway. */ -export interface ApplicationGatewayUrlConfiguration { - /** Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null. */ - modifiedPath?: string; - /** Query string which user has provided for url rewrite. Null means no query string will be updated. Default value is null. */ - modifiedQueryString?: string; - /** If set as true, it will re-evaluate the url path map provided in path based request routing rules using modified path. Default value is false. */ - reroute?: boolean; -} - -/** Application gateway web application firewall configuration. */ -export interface ApplicationGatewayWebApplicationFirewallConfiguration { - /** Whether the web application firewall is enabled or not. */ - enabled: boolean; - /** Web application firewall mode. */ - firewallMode: ApplicationGatewayFirewallMode; - /** The type of the web application firewall rule set. Possible values are: 'OWASP'. */ - ruleSetType: string; - /** The version of the rule set type. */ - ruleSetVersion: string; - /** The disabled rule groups. */ - disabledRuleGroups?: ApplicationGatewayFirewallDisabledRuleGroup[]; - /** Whether allow WAF to check request Body. */ - requestBodyCheck?: boolean; - /** Maximum request body size for WAF. */ - maxRequestBodySize?: number; - /** Maximum request body size in Kb for WAF. */ - maxRequestBodySizeInKb?: number; - /** Maximum file upload size in Mb for WAF. */ - fileUploadLimitInMb?: number; - /** The exclusion list. */ - exclusions?: ApplicationGatewayFirewallExclusion[]; -} - -/** Allows to disable rules within a rule group or an entire rule group. */ -export interface ApplicationGatewayFirewallDisabledRuleGroup { - /** The name of the rule group that will be disabled. */ - ruleGroupName: string; - /** The list of rules that will be disabled. If null, all rules of the rule group will be disabled. */ - rules?: number[]; -} - -/** Allow to exclude some variable satisfy the condition for the WAF check. */ -export interface ApplicationGatewayFirewallExclusion { - /** The variable to be excluded. */ - matchVariable: string; - /** When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. */ - selectorMatchOperator: string; - /** When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. */ - selector: string; -} - -/** Application Gateway autoscale configuration. */ -export interface ApplicationGatewayAutoscaleConfiguration { - /** Lower bound on number of Application Gateway capacity. */ - minCapacity: number; - /** Upper bound on number of Application Gateway capacity. */ - maxCapacity?: number; -} - -/** Application Gateway global configuration. */ -export interface ApplicationGatewayGlobalConfiguration { - /** Enable request buffering. */ - enableRequestBuffering?: boolean; - /** Enable response buffering. */ - enableResponseBuffering?: boolean; -} - -/** Tags object for patch operations. */ -export interface TagsObject { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** Response for ListApplicationGateways API service call. */ -export interface ApplicationGatewayListResult { - /** List of an application gateways in a resource group. */ - value?: ApplicationGateway[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ApplicationGatewayBackendHealth API service call. */ -export interface ApplicationGatewayBackendHealth { - /** A list of ApplicationGatewayBackendHealthPool resources. */ - backendAddressPools?: ApplicationGatewayBackendHealthPool[]; -} - -/** Application gateway BackendHealth pool. */ -export interface ApplicationGatewayBackendHealthPool { - /** Reference to an ApplicationGatewayBackendAddressPool resource. */ - backendAddressPool?: ApplicationGatewayBackendAddressPool; - /** List of ApplicationGatewayBackendHealthHttpSettings resources. */ - backendHttpSettingsCollection?: ApplicationGatewayBackendHealthHttpSettings[]; -} - -/** Application gateway BackendHealthHttp settings. */ -export interface ApplicationGatewayBackendHealthHttpSettings { - /** Reference to an ApplicationGatewayBackendHttpSettings resource. */ - backendHttpSettings?: ApplicationGatewayBackendHttpSettings; - /** List of ApplicationGatewayBackendHealthServer resources. */ - servers?: ApplicationGatewayBackendHealthServer[]; -} - -/** Application gateway backendhealth http settings. */ -export interface ApplicationGatewayBackendHealthServer { - /** IP address or FQDN of backend server. */ - address?: string; - /** Reference to IP configuration of backend server. */ - ipConfiguration?: NetworkInterfaceIPConfiguration; - /** Health of backend server. */ - health?: ApplicationGatewayBackendHealthServerHealth; - /** Health Probe Log. */ - healthProbeLog?: string; -} - -/** Details of on demand test probe request. */ -export interface ApplicationGatewayOnDemandProbe { - /** The protocol used for the probe. */ - protocol?: ApplicationGatewayProtocol; - /** Host name to send the probe to. */ - host?: string; - /** Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. */ - path?: string; - /** The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. */ - timeout?: number; - /** Whether the host header should be picked from the backend http settings. Default value is false. */ - pickHostNameFromBackendHttpSettings?: boolean; - /** Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false. */ - enableProbeProxyProtocolHeader?: boolean; - /** Criterion for classifying a healthy probe response. */ - match?: ApplicationGatewayProbeHealthResponseMatch; - /** Reference to backend pool of application gateway to which probe request will be sent. */ - backendAddressPool?: SubResource; - /** Reference to backend http setting of application gateway to be used for test probe. */ - backendHttpSettings?: SubResource; -} - -/** Result of on demand test probe. */ -export interface ApplicationGatewayBackendHealthOnDemand { - /** Reference to an ApplicationGatewayBackendAddressPool resource. */ - backendAddressPool?: ApplicationGatewayBackendAddressPool; - /** Application gateway BackendHealthHttp settings. */ - backendHealthHttpSettings?: ApplicationGatewayBackendHealthHttpSettings; -} - -/** Response for ListApplicationGatewayPrivateLinkResources API service call. Gets all private link resources for an application gateway. */ -export interface ApplicationGatewayPrivateLinkResourceListResult { - /** List of private link resources of an application gateway. */ - value?: ApplicationGatewayPrivateLinkResource[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListApplicationGatewayPrivateEndpointConnection API service call. Gets all private endpoint connections for an application gateway. */ -export interface ApplicationGatewayPrivateEndpointConnectionListResult { - /** List of private endpoint connections on an application gateway. */ - value?: ApplicationGatewayPrivateEndpointConnection[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Common error representation. */ -export interface ErrorModel { - /** Error code. */ - code?: string; - /** Error message. */ - message?: string; - /** Error target. */ - target?: string; - /** Error details. */ - details?: ErrorDetails[]; - /** Inner error message. */ - innerError?: string; -} - -/** Common error details representation. */ -export interface ErrorDetails { - /** Error code. */ - code?: string; - /** Error target. */ - target?: string; - /** Error message. */ - message?: string; -} - -/** Response for ApplicationGatewayAvailableWafRuleSets API service call. */ -export interface ApplicationGatewayAvailableWafRuleSetsResult { - /** The list of application gateway rule sets. */ - value?: ApplicationGatewayFirewallRuleSet[]; -} - -/** A web application firewall rule group. */ -export interface ApplicationGatewayFirewallRuleGroup { - /** The name of the web application firewall rule group. */ - ruleGroupName: string; - /** The description of the web application firewall rule group. */ - description?: string; - /** The rules of the web application firewall rule group. */ - rules: ApplicationGatewayFirewallRule[]; -} - -/** A web application firewall rule. */ -export interface ApplicationGatewayFirewallRule { - /** The identifier of the web application firewall rule. */ - ruleId: number; - /** The string representation of the web application firewall rule identifier. */ - ruleIdString?: string; - /** The string representation of the web application firewall rule state. */ - state?: ApplicationGatewayWafRuleStateTypes; - /** The string representation of the web application firewall rule action. */ - action?: ApplicationGatewayWafRuleActionTypes; - /** The string representation of the web application firewall rule sensitivity. */ - sensitivity?: ApplicationGatewayWafRuleSensitivityTypes; - /** The description of the web application firewall rule. */ - description?: string; -} - -/** Response for ApplicationGatewayAvailableSslOptions API service call. */ -export interface ApplicationGatewayAvailableSslPredefinedPolicies { - /** List of available Ssl predefined policy. */ - value?: ApplicationGatewaySslPredefinedPolicy[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ApplicationGatewayWafDynamicManifest API service call. */ -export interface ApplicationGatewayWafDynamicManifestResult { - /** Resource ID. */ - id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The available rulesets. */ - availableRuleSets?: ApplicationGatewayFirewallManifestRuleSet[]; - /** The type of the web application firewall rule set. */ - ruleSetType?: string; - /** The version of the web application firewall rule set type. */ - ruleSetVersion?: string; -} - -/** Properties of the web application firewall rule set. */ -export interface ApplicationGatewayFirewallManifestRuleSet { - /** The type of the web application firewall rule set. */ - ruleSetType: string; - /** The version of the web application firewall rule set type. */ - ruleSetVersion: string; - /** The rule set status */ - status?: ApplicationGatewayRuleSetStatusOptions; - /** Tier of an application gateway that support the rule set. */ - tiers?: ApplicationGatewayTierTypes[]; - /** The rule groups of the web application firewall rule set. */ - ruleGroups: ApplicationGatewayFirewallRuleGroup[]; -} - -/** Response for ApplicationGatewayWafDynamicManifests API service call. */ -export interface ApplicationGatewayWafDynamicManifestResultList { - /** The list of application gateway waf manifest. */ - value?: ApplicationGatewayWafDynamicManifestResult[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** A list of application security groups. */ -export interface ApplicationSecurityGroupListResult { - /** A list of application security groups. */ - value?: ApplicationSecurityGroup[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** An array of available delegations. */ -export interface AvailableDelegationsResult { - /** An array of available delegations. */ - value?: AvailableDelegation[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The serviceName of an AvailableDelegation indicates a possible delegation for a subnet. */ -export interface AvailableDelegation { - /** The name of the AvailableDelegation resource. */ - name?: string; - /** A unique identifier of the AvailableDelegation resource. */ - id?: string; - /** Resource type. */ - type?: string; - /** The name of the service and resource. */ - serviceName?: string; - /** The actions permitted to the service upon delegation. */ - actions?: string[]; -} - -/** An array of available service aliases. */ -export interface AvailableServiceAliasesResult { - /** An array of available service aliases. */ - value?: AvailableServiceAlias[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The available service alias. */ -export interface AvailableServiceAlias { - /** The name of the service alias. */ - name?: string; - /** The ID of the service alias. */ - id?: string; - /** The type of the resource. */ - type?: string; - /** The resource name of the service alias. */ - resourceName?: string; -} - -/** Properties of the AzureFirewallRCAction. */ -export interface AzureFirewallRCAction { - /** The type of action. */ - type?: AzureFirewallRCActionType; -} - -/** Properties of an application rule. */ -export interface AzureFirewallApplicationRule { - /** Name of the application rule. */ - name?: string; - /** Description of the rule. */ - description?: string; - /** List of source IP addresses for this rule. */ - sourceAddresses?: string[]; - /** Array of ApplicationRuleProtocols. */ - protocols?: AzureFirewallApplicationRuleProtocol[]; - /** List of FQDNs for this rule. */ - targetFqdns?: string[]; - /** List of FQDN Tags for this rule. */ - fqdnTags?: string[]; - /** List of source IpGroups for this rule. */ - sourceIpGroups?: string[]; -} - -/** Properties of the application rule protocol. */ -export interface AzureFirewallApplicationRuleProtocol { - /** Protocol type. */ - protocolType?: AzureFirewallApplicationRuleProtocolType; - /** Port number for the protocol, cannot be greater than 64000. This field is optional. */ - port?: number; -} - -/** AzureFirewall NAT Rule Collection Action. */ -export interface AzureFirewallNatRCAction { - /** The type of action. */ - type?: AzureFirewallNatRCActionType; -} - -/** Properties of a NAT rule. */ -export interface AzureFirewallNatRule { - /** Name of the NAT rule. */ - name?: string; - /** Description of the rule. */ - description?: string; - /** List of source IP addresses for this rule. */ - sourceAddresses?: string[]; - /** List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags. */ - destinationAddresses?: string[]; - /** List of destination ports. */ - destinationPorts?: string[]; - /** Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. */ - protocols?: AzureFirewallNetworkRuleProtocol[]; - /** The translated address for this NAT rule. */ - translatedAddress?: string; - /** The translated port for this NAT rule. */ - translatedPort?: string; - /** The translated FQDN for this NAT rule. */ - translatedFqdn?: string; - /** List of source IpGroups for this rule. */ - sourceIpGroups?: string[]; -} - -/** Properties of the network rule. */ -export interface AzureFirewallNetworkRule { - /** Name of the network rule. */ - name?: string; - /** Description of the rule. */ - description?: string; - /** Array of AzureFirewallNetworkRuleProtocols. */ - protocols?: AzureFirewallNetworkRuleProtocol[]; - /** List of source IP addresses for this rule. */ - sourceAddresses?: string[]; - /** List of destination IP addresses. */ - destinationAddresses?: string[]; - /** List of destination ports. */ - destinationPorts?: string[]; - /** List of destination FQDNs. */ - destinationFqdns?: string[]; - /** List of source IpGroups for this rule. */ - sourceIpGroups?: string[]; - /** List of destination IpGroups for this rule. */ - destinationIpGroups?: string[]; -} - -/** IP addresses associated with azure firewall. */ -export interface HubIPAddresses { - /** Public IP addresses associated with azure firewall. */ - publicIPs?: HubPublicIPAddresses; - /** Private IP Address associated with azure firewall. */ - privateIPAddress?: string; -} - -/** Public IP addresses associated with azure firewall. */ -export interface HubPublicIPAddresses { - /** The list of Public IP addresses associated with azure firewall or IP addresses to be retained. */ - addresses?: AzureFirewallPublicIPAddress[]; - /** The number of Public IP addresses associated with azure firewall. */ - count?: number; -} - -/** Public IP Address associated with azure firewall. */ -export interface AzureFirewallPublicIPAddress { - /** Public IP Address value. */ - address?: string; -} - -/** IpGroups associated with azure firewall. */ -export interface AzureFirewallIpGroups { - /** - * Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The iteration number. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly changeNumber?: string; -} - -/** SKU of an Azure Firewall. */ -export interface AzureFirewallSku { - /** Name of an Azure Firewall SKU. */ - name?: AzureFirewallSkuName; - /** Tier of an Azure Firewall. */ - tier?: AzureFirewallSkuTier; -} - -/** Azure Firewall Autoscale Configuration parameters. */ -export interface AzureFirewallAutoscaleConfiguration { - /** The minimum number of capacity units for this azure firewall. Use null to reset the value to the service default. */ - minCapacity?: number; - /** The maximum number of capacity units for this azure firewall. Use null to reset the value to the service default. */ - maxCapacity?: number; -} - -/** Response for ListAzureFirewalls API service call. */ -export interface AzureFirewallListResult { - /** List of Azure Firewalls in a resource group. */ - value?: AzureFirewall[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** List of SNAT IP Prefixes learnt by firewall to not SNAT */ -export interface IPPrefixesList { - /** IP Prefix value. */ - ipPrefixes?: string[]; -} - -/** Azure Firewall Packet Capture Parameters. */ -export interface FirewallPacketCaptureParameters { - /** Duration of packet capture in seconds. If the field is not provided, the default value is 60. */ - durationInSeconds?: number; - /** Number of packets to be captured. If the field is not provided, the default value is 1000. */ - numberOfPacketsToCapture?: number; - /** Upload capture location */ - sasUrl?: string; - /** Name of file to be uploaded to sasURL */ - fileName?: string; - /** The protocol of packets to capture */ - protocol?: AzureFirewallNetworkRuleProtocol; - /** The tcp-flag type to be captured. Used with protocol TCP */ - flags?: AzureFirewallPacketCaptureFlags[]; - /** Rules to filter packet captures. */ - filters?: AzureFirewallPacketCaptureRule[]; - /** The Azure Firewall packet capture operation to perform */ - operation?: AzureFirewallPacketCaptureOperationType; -} - -/** Properties of the AzureFirewallRCAction. */ -export interface AzureFirewallPacketCaptureFlags { - /** Flags to capture */ - type?: AzureFirewallPacketCaptureFlagsType; -} - -/** Group of src/dest ips and ports to be captured. */ -export interface AzureFirewallPacketCaptureRule { - /** List of source IP addresses/subnets to be captured. */ - sources?: string[]; - /** List of destination IP addresses/subnets to be captured. */ - destinations?: string[]; - /** List of ports to be captured. */ - destinationPorts?: string[]; -} - -/** Response of an Azure Firewall Packet Capture Operation. */ -export interface AzureFirewallPacketCaptureResponse { - /** The response code of the performed packet capture operation */ - statusCode?: AzureFirewallPacketCaptureResponseCode; - /** Localized Message String of The Result Of The Azure Firewall Packet Capture Operation */ - message?: string; -} - -/** Response for ListAzureFirewallFqdnTags API service call. */ -export interface AzureFirewallFqdnTagListResult { - /** List of Azure Firewall FQDN Tags in a resource group. */ - value?: AzureFirewallFqdnTag[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Azure Web Category Resource. */ -export interface AzureWebCategory { - /** Resource ID. */ - id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: 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; - /** - * The name of the group that the category belongs to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly group?: string; -} - -/** Response for ListAzureWebCategories API service call. */ -export interface AzureWebCategoryListResult { - /** List of Azure Web Categories for a given Subscription. */ - value?: AzureWebCategory[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -export interface BastionHostPropertiesFormatNetworkAcls { - /** Sets the IP ACL rules for Developer Bastion Host. */ - ipRules?: IPRule[]; -} - -export interface IPRule { - /** Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. */ - addressPrefix?: string; -} - -/** The sku of this Bastion Host. */ -export interface Sku { - /** The name of the sku of this Bastion Host. */ - name?: BastionHostSkuName; -} - -/** Response for ListBastionHosts API service call. */ -export interface BastionHostListResult { - /** List of Bastion Hosts in a resource group. */ - value?: BastionHost[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Post request for Create/Delete/Get Bastion Shareable Link endpoints. */ -export interface BastionShareableLinkListRequest { - /** List of VM references. */ - vms?: BastionShareableLink[]; -} - -/** Bastion Shareable Link. */ -export interface BastionShareableLink { - /** Reference of the virtual machine resource. */ - vm: Vm; - /** - * The unique Bastion Shareable Link to the virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly bsl?: string; - /** - * The time when the link was created. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAt?: string; - /** - * Optional field indicating the warning or error message related to the vm in case of partial failure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; -} - -/** Response for all the Bastion Shareable Link endpoints. */ -export interface BastionShareableLinkListResult { - /** List of Bastion Shareable Links for the request. */ - value?: BastionShareableLink[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Post request for Delete Bastion Shareable Link By Token endpoint. */ -export interface BastionShareableLinkTokenListRequest { - /** List of Bastion Shareable Link Token. */ - tokens?: string[]; -} - -/** Response for GetActiveSessions. */ -export interface BastionActiveSessionListResult { - /** List of active sessions on the bastion. */ - value?: BastionActiveSession[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** The session detail for a target. */ -export interface BastionActiveSession { - /** - * A unique id for the session. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sessionId?: string; - /** - * The time when the session started. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startTime?: Record; - /** - * The subscription id for the target virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetSubscriptionId?: string; - /** - * The type of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * The host name of the target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetHostName?: string; - /** - * The resource group of the target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetResourceGroup?: string; - /** - * The user name who is active on this session. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly userName?: string; - /** - * The IP Address of the target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetIpAddress?: string; - /** - * The protocol used to connect to the target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly protocol?: BastionConnectProtocol; - /** - * The resource id of the target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetResourceId?: string; - /** - * Duration in mins the session has been active. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sessionDurationInMins?: number; -} - -/** List of session IDs. */ -export interface SessionIds { - /** List of session IDs. */ - sessionIds?: string[]; -} - -/** Response for DisconnectActiveSessions. */ -export interface BastionSessionDeleteResult { - /** List of sessions with their corresponding state. */ - value?: BastionSessionState[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** The session state detail for a target. */ -export interface BastionSessionState { - /** - * A unique id for the session. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sessionId?: string; - /** - * Used for extra information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The state of the session. Disconnected/Failed/NotFound. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly state?: string; -} - -/** Response for the CheckDnsNameAvailability API service call. */ -export interface DnsNameAvailabilityResult { - /** Domain availability (True/False). */ - available?: boolean; -} - -/** Response for the ListNetworkInterface API service call. */ -export interface NetworkInterfaceListResult { - /** A list of network interfaces in a resource group. */ - value?: NetworkInterface[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for ListPublicIpAddresses API service call. */ -export interface PublicIPAddressListResult { - /** A list of public IP addresses that exists in a resource group. */ - value?: PublicIPAddress[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** SwapResource to represent slot type on the specified cloud service. */ -export interface SwapResource { - /** - * Resource Id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Swap resource properties */ - properties?: SwapResourceProperties; -} - -/** Swap resource properties */ -export interface SwapResourceProperties { - /** Specifies slot info on a cloud service */ - slotType?: SlotType; -} - -/** SwapResource List with single entry to represent slot type on the specified cloud service. */ -export interface SwapResourceListResult { - value?: SwapResource[]; -} - -/** Response for ListCustomIpPrefixes API service call. */ -export interface CustomIpPrefixListResult { - /** A list of Custom IP prefixes that exists in a resource group. */ - value?: CustomIpPrefix[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Ddos Custom Policy traffic detection rule. */ -export interface TrafficDetectionRule { - /** The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon. */ - trafficType?: DdosTrafficType; - /** The customized packets per second threshold. */ - packetsPerSecond?: number; -} - -/** A DDoS protection plan in a resource group. */ -export interface DdosProtectionPlan { - /** - * Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Resource location. */ - location?: string; - /** Resource tags. */ - tags?: { [propertyName: string]: 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; - /** - * The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the DDoS protection plan resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The list of public IPs associated with the DDoS protection plan resource. This list is read-only. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: SubResource[]; - /** - * The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualNetworks?: SubResource[]; -} - -/** A list of DDoS protection plans. */ -export interface DdosProtectionPlanListResult { - /** A list of DDoS protection plans. */ - value?: DdosProtectionPlan[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Qos Traffic Profiler IP Range properties. */ -export interface QosIpRange { - /** Start IP Address. */ - startIP?: string; - /** End IP Address. */ - endIP?: string; -} - -/** Qos Traffic Profiler Port range properties. */ -export interface QosPortRange { - /** Qos Port Range start. */ - start?: number; - /** Qos Port Range end. */ - end?: number; -} - -/** Quality of Service defines the traffic configuration between endpoints. Mandatory to have one marking. */ -export interface QosDefinition { - /** List of markings to be used in the configuration. */ - markings?: number[]; - /** Source IP ranges. */ - sourceIpRanges?: QosIpRange[]; - /** Destination IP ranges. */ - destinationIpRanges?: QosIpRange[]; - /** Sources port ranges. */ - sourcePortRanges?: QosPortRange[]; - /** Destination port ranges. */ - destinationPortRanges?: QosPortRange[]; - /** RNM supported protocol types. */ - protocol?: ProtocolType; -} - -/** Response for the DscpConfigurationList API service call. */ -export interface DscpConfigurationListResult { - /** A list of dscp configurations in a resource group. */ - value?: DscpConfiguration[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for the ListAvailableEndpointServices API service call. */ -export interface EndpointServicesListResult { - /** List of available endpoint services in a region. */ - value?: EndpointServiceResult[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. */ -export interface AuthorizationListResult { - /** The authorizations in an ExpressRoute Circuit. */ - value?: ExpressRouteCircuitAuthorization[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Specifies the peering configuration. */ -export interface ExpressRouteCircuitPeeringConfig { - /** The reference to AdvertisedPublicPrefixes. */ - advertisedPublicPrefixes?: string[]; - /** The communities of bgp peering. Specified for microsoft peering. */ - advertisedCommunities?: string[]; - /** - * The advertised public prefix state of the Peering resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly advertisedPublicPrefixesState?: ExpressRouteCircuitPeeringAdvertisedPublicPrefixState; - /** The legacy mode of the peering. */ - legacyMode?: number; - /** The CustomerASN of the peering. */ - customerASN?: number; - /** The RoutingRegistryName of the configuration. */ - routingRegistryName?: string; - /** List of Prefix information required to perform validation. */ - advertisedPublicPrefixInfo?: AdvertisedPublicPrefixProperties[]; -} - -/** Prefix properties required to perform validation using openssl signature. */ -export interface AdvertisedPublicPrefixProperties { - /** Advertised Public Prefix. */ - prefix?: string; - /** Validation string that contains circuit peering info. */ - validationId?: string; - /** Signed string generated by encrypting validationId with a private key. */ - signature?: string; - /** - * Advertised Public Prefix State that denotes if the prefix is validated or not. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly validationState?: AdvertisedPublicPrefixPropertiesValidationState; -} - -/** Contains stats associated with the peering. */ -export interface ExpressRouteCircuitStats { - /** The Primary BytesIn of the peering. */ - primarybytesIn?: number; - /** The primary BytesOut of the peering. */ - primarybytesOut?: number; - /** The secondary BytesIn of the peering. */ - secondarybytesIn?: number; - /** The secondary BytesOut of the peering. */ - secondarybytesOut?: number; -} - -/** Contains IPv6 peering config. */ -export interface Ipv6ExpressRouteCircuitPeeringConfig { - /** The primary address prefix. */ - primaryPeerAddressPrefix?: string; - /** The secondary address prefix. */ - secondaryPeerAddressPrefix?: string; - /** The Microsoft peering configuration. */ - microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; - /** The reference to the RouteFilter resource. */ - routeFilter?: SubResource; - /** The state of peering. */ - state?: ExpressRouteCircuitPeeringState; -} - -/** The ID of the ExpressRouteConnection. */ -export interface ExpressRouteConnectionId { - /** - * The ID of the ExpressRouteConnection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; -} - -/** IPv6 Circuit Connection properties for global reach. */ -export interface Ipv6CircuitConnectionConfig { - /** /125 IP address space to carve out customer addresses for global reach. */ - addressPrefix?: string; - /** - * Express Route Circuit connection state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly circuitConnectionStatus?: CircuitConnectionStatus; -} - -/** Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. */ -export interface ExpressRouteCircuitPeeringListResult { - /** The peerings in an express route circuit. */ - value?: ExpressRouteCircuitPeering[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListConnections API service call retrieves all global reach connections that belongs to a Private Peering for an ExpressRouteCircuit. */ -export interface ExpressRouteCircuitConnectionListResult { - /** The global reach connection associated with Private Peering in an ExpressRoute Circuit. */ - value?: ExpressRouteCircuitConnection[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListPeeredConnections API service call retrieves all global reach peer circuit connections that belongs to a Private Peering for an ExpressRouteCircuit. */ -export interface PeerExpressRouteCircuitConnectionListResult { - /** The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit. */ - value?: PeerExpressRouteCircuitConnection[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Contains SKU in an ExpressRouteCircuit. */ -export interface ExpressRouteCircuitSku { - /** The name of the SKU. */ - name?: string; - /** The tier of the SKU. */ - tier?: ExpressRouteCircuitSkuTier; - /** The family of the SKU. */ - family?: ExpressRouteCircuitSkuFamily; -} - -/** Contains ServiceProviderProperties in an ExpressRouteCircuit. */ -export interface ExpressRouteCircuitServiceProviderProperties { - /** The serviceProviderName. */ - serviceProviderName?: string; - /** The peering location. */ - peeringLocation?: string; - /** The BandwidthInMbps. */ - bandwidthInMbps?: number; -} - -/** Response for ListArpTable associated with the Express Route Circuits API. */ -export interface ExpressRouteCircuitsArpTableListResult { - /** A list of the ARP tables. */ - value?: ExpressRouteCircuitArpTable[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** The ARP table associated with the ExpressRouteCircuit. */ -export interface ExpressRouteCircuitArpTable { - /** Entry age in minutes. */ - age?: number; - /** Interface address. */ - interface?: string; - /** The IP address. */ - ipAddress?: string; - /** The MAC address. */ - macAddress?: string; -} - -/** Response for ListRoutesTable associated with the Express Route Circuits API. */ -export interface ExpressRouteCircuitsRoutesTableListResult { - /** The list of routes table. */ - value?: ExpressRouteCircuitRoutesTable[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** The routes table associated with the ExpressRouteCircuit. */ -export interface ExpressRouteCircuitRoutesTable { - /** IP address of a network entity. */ - network?: string; - /** NextHop address. */ - nextHop?: string; - /** Local preference value as set with the set local-preference route-map configuration command. */ - locPrf?: string; - /** Route Weight. */ - weight?: number; - /** Autonomous system paths to the destination network. */ - path?: string; -} - -/** Response for ListRoutesTable associated with the Express Route Circuits API. */ -export interface ExpressRouteCircuitsRoutesTableSummaryListResult { - /** A list of the routes table. */ - value?: ExpressRouteCircuitRoutesTableSummary[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** The routes table associated with the ExpressRouteCircuit. */ -export interface ExpressRouteCircuitRoutesTableSummary { - /** IP address of the neighbor. */ - neighbor?: string; - /** BGP version number spoken to the neighbor. */ - v?: number; - /** Autonomous system number. */ - as?: number; - /** The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. */ - upDown?: string; - /** Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. */ - statePfxRcd?: string; -} - -/** Response for ListExpressRouteCircuit API service call. */ -export interface ExpressRouteCircuitListResult { - /** A list of ExpressRouteCircuits in a resource group. */ - value?: ExpressRouteCircuit[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for the ListExpressRouteServiceProvider API service call. */ -export interface ExpressRouteServiceProviderListResult { - /** A list of ExpressRouteResourceProvider resources. */ - value?: ExpressRouteServiceProvider[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Contains bandwidths offered in ExpressRouteServiceProvider resources. */ -export interface ExpressRouteServiceProviderBandwidthsOffered { - /** The OfferName. */ - offerName?: string; - /** The ValueInMbps. */ - valueInMbps?: number; -} - -/** Response for ListExpressRouteCrossConnection API service call. */ -export interface ExpressRouteCrossConnectionListResult { - /** A list of ExpressRouteCrossConnection resources. */ - value?: ExpressRouteCrossConnection[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Reference to an express route circuit. */ -export interface ExpressRouteCircuitReference { - /** Corresponding Express Route Circuit Id. */ - id?: string; -} - -/** Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCrossConnection. */ -export interface ExpressRouteCrossConnectionPeeringList { - /** The peerings in an express route cross connection. */ - value?: ExpressRouteCrossConnectionPeering[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for ListRoutesTable associated with the Express Route Cross Connections. */ -export interface ExpressRouteCrossConnectionsRoutesTableSummaryListResult { - /** A list of the routes table. */ - value?: ExpressRouteCrossConnectionRoutesTableSummary[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The routes table associated with the ExpressRouteCircuit. */ -export interface ExpressRouteCrossConnectionRoutesTableSummary { - /** IP address of Neighbor router. */ - neighbor?: string; - /** Autonomous system number. */ - asn?: number; - /** The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. */ - upDown?: string; - /** Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. */ - stateOrPrefixesReceived?: string; -} - -/** Response for ListExpressRoutePortsLocations API service call. */ -export interface ExpressRoutePortsLocationListResult { - /** The list of all ExpressRoutePort peering locations. */ - value?: ExpressRoutePortsLocation[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Real-time inventory of available ExpressRoute port bandwidths. */ -export interface ExpressRoutePortsLocationBandwidths { - /** - * Bandwidth descriptive name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly offerName?: string; - /** - * Bandwidth value in Gbps. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly valueInGbps?: number; -} - -/** ExpressRouteLink Mac Security Configuration. */ -export interface ExpressRouteLinkMacSecConfig { - /** Keyvault Secret Identifier URL containing Mac security CKN key. */ - cknSecretIdentifier?: string; - /** Keyvault Secret Identifier URL containing Mac security CAK key. */ - cakSecretIdentifier?: string; - /** Mac security cipher. */ - cipher?: ExpressRouteLinkMacSecCipher; - /** Sci mode enabled/disabled. */ - sciState?: ExpressRouteLinkMacSecSciState; -} - -/** Response for ListExpressRoutePorts API service call. */ -export interface ExpressRoutePortListResult { - /** A list of ExpressRoutePort resources. */ - value?: ExpressRoutePort[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListExpressRouteLinks API service call. */ -export interface ExpressRouteLinkListResult { - /** The list of ExpressRouteLink sub-resources. */ - value?: ExpressRouteLink[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** The customer name to be printed on a letter of authorization. */ -export interface GenerateExpressRoutePortsLOARequest { - /** The customer name. */ - customerName: string; -} - -/** Response for GenerateExpressRoutePortsLOA API service call. */ -export interface GenerateExpressRoutePortsLOAResult { - /** The content as a base64 encoded string. */ - 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; -} - -/** Response for ListExpressRouteProviderPort API service call. */ -export interface ExpressRouteProviderPortListResult { - /** A list of ExpressRouteProviderPort resources. */ - value?: ExpressRouteProviderPort[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** ThreatIntel Whitelist for Firewall Policy. */ -export interface FirewallPolicyThreatIntelWhitelist { - /** List of IP addresses for the ThreatIntel Whitelist. */ - ipAddresses?: string[]; - /** List of FQDNs for the ThreatIntel Whitelist. */ - fqdns?: string[]; -} - -/** Firewall Policy Insights. */ -export interface FirewallPolicyInsights { - /** A flag to indicate if the insights are enabled on the policy. */ - isEnabled?: boolean; - /** Number of days the insights should be enabled on the policy. */ - retentionDays?: number; - /** Workspaces needed to configure the Firewall Policy Insights. */ - logAnalyticsResources?: FirewallPolicyLogAnalyticsResources; -} - -/** Log Analytics Resources for Firewall Policy Insights. */ -export interface FirewallPolicyLogAnalyticsResources { - /** List of workspaces for Firewall Policy Insights. */ - workspaces?: FirewallPolicyLogAnalyticsWorkspace[]; - /** The default workspace Id for Firewall Policy Insights. */ - defaultWorkspaceId?: SubResource; -} - -/** Log Analytics Workspace for Firewall Policy Insights. */ -export interface FirewallPolicyLogAnalyticsWorkspace { - /** Region to configure the Workspace. */ - region?: string; - /** The workspace Id for Firewall Policy Insights. */ - workspaceId?: SubResource; -} - -/** The private IP addresses/IP ranges to which traffic will not be SNAT. */ -export interface FirewallPolicySnat { - /** List of private IP addresses/IP address ranges to not be SNAT. */ - privateRanges?: string[]; - /** The operation mode for automatically learning private ranges to not be SNAT */ - autoLearnPrivateRanges?: AutoLearnPrivateRangesMode; -} - -/** SQL Settings in Firewall Policy. */ -export interface FirewallPolicySQL { - /** A flag to indicate if SQL Redirect traffic filtering is enabled. Turning on the flag requires no rule using port 11000-11999. */ - allowSqlRedirect?: boolean; -} - -/** DNS Proxy Settings in Firewall Policy. */ -export interface DnsSettings { - /** List of Custom DNS Servers. */ - servers?: string[]; - /** Enable DNS Proxy on Firewalls attached to the Firewall Policy. */ - enableProxy?: boolean; - /** FQDNs in Network Rules are supported when set to true. */ - requireProxyForNetworkRules?: boolean; -} - -/** Explicit Proxy Settings in Firewall Policy. */ -export interface ExplicitProxy { - /** When set to true, explicit proxy mode is enabled. */ - enableExplicitProxy?: boolean; - /** Port number for explicit proxy http protocol, cannot be greater than 64000. */ - httpPort?: number; - /** Port number for explicit proxy https protocol, cannot be greater than 64000. */ - httpsPort?: number; - /** When set to true, pac file port and url needs to be provided. */ - enablePacFile?: boolean; - /** Port number for firewall to serve PAC file. */ - pacFilePort?: number; - /** SAS URL for PAC file. */ - pacFile?: string; -} - -/** Configuration for intrusion detection mode and rules. */ -export interface FirewallPolicyIntrusionDetection { - /** Intrusion detection general state. When attached to a parent policy, the firewall's effective IDPS mode is the stricter mode of the two. */ - mode?: FirewallPolicyIntrusionDetectionStateType; - /** IDPS profile name. When attached to a parent policy, the firewall's effective profile is the profile name of the parent policy. */ - profile?: FirewallPolicyIntrusionDetectionProfileType; - /** Intrusion detection configuration properties. */ - configuration?: FirewallPolicyIntrusionDetectionConfiguration; -} - -/** The operation for configuring intrusion detection. */ -export interface FirewallPolicyIntrusionDetectionConfiguration { - /** List of specific signatures states. */ - 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. */ -export interface FirewallPolicyIntrusionDetectionSignatureSpecification { - /** Signature id. */ - id?: string; - /** The signature state. */ - mode?: FirewallPolicyIntrusionDetectionStateType; -} - -/** Intrusion detection bypass traffic specification. */ -export interface FirewallPolicyIntrusionDetectionBypassTrafficSpecifications { - /** Name of the bypass traffic rule. */ - name?: string; - /** Description of the bypass traffic rule. */ - description?: string; - /** The rule bypass protocol. */ - protocol?: FirewallPolicyIntrusionDetectionProtocol; - /** List of source IP addresses or ranges for this rule. */ - sourceAddresses?: string[]; - /** List of destination IP addresses or ranges for this rule. */ - destinationAddresses?: string[]; - /** List of destination ports or ranges. */ - destinationPorts?: string[]; - /** List of source IpGroups for this rule. */ - sourceIpGroups?: string[]; - /** List of destination IpGroups for this rule. */ - destinationIpGroups?: string[]; -} - -/** Configuration needed to perform TLS termination & initiation. */ -export interface FirewallPolicyTransportSecurity { - /** The CA used for intermediate CA generation. */ - certificateAuthority?: FirewallPolicyCertificateAuthority; -} - -/** Trusted Root certificates properties for tls. */ -export interface FirewallPolicyCertificateAuthority { - /** Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. */ - keyVaultSecretId?: string; - /** Name of the CA certificate. */ - name?: string; -} - -/** SKU of Firewall policy. */ -export interface FirewallPolicySku { - /** Tier of Firewall Policy. */ - tier?: FirewallPolicySkuTier; -} - -/** Response for ListFirewallPolicies API service call. */ -export interface FirewallPolicyListResult { - /** List of Firewall Policies in a resource group. */ - value?: FirewallPolicy[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Properties of the rule collection. */ -export interface FirewallPolicyRuleCollection { - /** Polymorphic discriminator, which specifies the different types this object can be */ - ruleCollectionType: "FirewallPolicyNatRuleCollection" | "FirewallPolicyFilterRuleCollection"; - /** The name of the rule collection. */ - name?: string; - /** Priority of the Firewall Policy Rule Collection resource. */ - priority?: number; -} - -/** Response for ListFirewallPolicyRuleCollectionGroups API service call. */ -export interface FirewallPolicyRuleCollectionGroupListResult { - /** List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy. */ - value?: FirewallPolicyRuleCollectionGroup[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Will describe the query to run against the IDPS signatures DB */ -export interface IdpsQueryObject { - /** Contain all filters names and values */ - filters?: FilterItems[]; - /** Search term in all columns */ - search?: string; - /** Column to sort response by */ - orderBy?: OrderBy; - /** The number of the results to return in each page */ - resultsPerPage?: number; - /** The number of records matching the filter to skip */ - skip?: number; -} - -/** Will contain the filter name and values to operate on */ -export interface FilterItems { - /** The name of the field we would like to filter */ - field?: string; - /** List of values to filter the current field by */ - values?: string[]; -} - -/** Describes a column to sort */ -export interface OrderBy { - /** Describes the actual column name to sort by */ - field?: string; - /** Describes if results should be in ascending/descending order */ - order?: FirewallPolicyIdpsQuerySortOrder; -} - -/** Query result */ -export interface QueryResults { - /** Number of total records matching the query. */ - matchingRecordsCount?: number; - /** Array containing the results of the query */ - signatures?: SingleQueryResult[]; -} - -export interface SingleQueryResult { - /** The ID of the signature */ - signatureId?: number; - /** The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny */ - mode?: FirewallPolicyIdpsSignatureMode; - /** Describes the severity of signature: 1 - High, 2 - Medium, 3 - Low */ - severity?: FirewallPolicyIdpsSignatureSeverity; - /** Describes in which direction signature is being enforced: 0 - OutBound, 1 - InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound, 5 - InternalInbound */ - direction?: FirewallPolicyIdpsSignatureDirection; - /** Describes the groups the signature belongs to */ - group?: string; - /** Describes what is the signature enforces */ - description?: string; - /** Describes the protocol the signatures is being enforced in */ - protocol?: string; - /** Describes the list of source ports related to this signature */ - sourcePorts?: string[]; - /** Describes the list of destination ports related to this signature */ - destinationPorts?: string[]; - /** Describes the last updated time of the signature (provided from 3rd party vendor) */ - lastUpdated?: string; - /** Describes if this override is inherited from base policy or not */ - inheritedFromParentPolicy?: boolean; -} - -/** Contains all specific policy signatures overrides for the IDPS */ -export interface SignaturesOverrides { - /** Contains the name of the resource (default) */ - name?: string; - /** Will contain the resource id of the signature override resource */ - id?: string; - /** Will contain the type of the resource: Microsoft.Network/firewallPolicies/intrusionDetectionSignaturesOverrides */ - type?: string; - /** Will contain the properties of the resource (the actual signature overrides) */ - properties?: SignaturesOverridesProperties; -} - -/** Will contain the properties of the resource (the actual signature overrides) */ -export interface SignaturesOverridesProperties { - /** Dictionary of */ - signatures?: { [propertyName: string]: string }; -} - -/** Describes the filter values possibles for a given column */ -export interface SignatureOverridesFilterValuesQuery { - /** Describes the name of the column which values will be returned */ - filterName?: string; -} - -/** Describes the list of all possible values for a specific filter value */ -export interface SignatureOverridesFilterValuesResponse { - /** Describes the possible values */ - filterValues?: string[]; -} - -/** Describes an object containing an array with a single item */ -export interface SignaturesOverridesList { - /** Describes a list consisting exactly one item describing the policy's signature override status */ - value?: SignaturesOverrides[]; -} - -/** List of IpamPool */ -export interface IpamPoolList { - value?: IpamPool[]; - /** The link used to get the next page of operations. */ - nextLink?: string; -} - -/** Properties of IpamPool resource properties which are specific to the Pool resource. */ -export interface IpamPoolProperties { - description?: string; - /** String representing a friendly name for the resource. */ - displayName?: string; - /** - * List of IP address type for the IpamPool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipAddressType?: IpType[]; - /** String representing parent IpamPool resource name. If empty the IpamPool will be a root pool. */ - parentPoolName?: string; - /** List of IP address prefixes of the resource. */ - addressPrefixes: string[]; - /** Provisioning states of a resource. */ - provisioningState?: ProvisioningState; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface CommonResource { - /** - * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The type of identity that last modified the resource. */ - lastModifiedAt?: Date; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface CommonErrorResponse { - /** The error object. */ - error?: CommonErrorDetail; -} - -/** The error detail. */ -export interface CommonErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: CommonErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: CommonErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface CommonErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - -/** Represents the IpamPool update API request interface. */ -export interface IpamPoolUpdate { - /** Dictionary of */ - tags?: { [propertyName: string]: string }; - /** Represents the IpamPool update properties. */ - properties?: IpamPoolUpdateProperties; -} - -/** Represents the IpamPool update properties. */ -export interface IpamPoolUpdateProperties { - description?: string; - /** String representing a friendly name for the resource. */ - displayName?: string; -} - -/** IpamPool usage information. */ -export interface PoolUsage { - /** - * List of IP address prefixes of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly addressPrefixes?: string[]; - /** - * List of IpamPool that are children of this IpamPool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly childPools?: ResourceBasics[]; - /** - * List of assigned IP address prefixes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly allocatedAddressPrefixes?: string[]; - /** - * List of reserved IP address prefixes. These IP addresses could be reclaimed if not assigned in the given time. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reservedAddressPrefixes?: string[]; - /** - * List of available IP address prefixes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly availableAddressPrefixes?: string[]; - /** - * Total number of IP addresses managed in the IpamPool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly totalNumberOfIPAddresses?: string; - /** - * Total number of assigned IP addresses in the IpamPool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfAllocatedIPAddresses?: string; - /** - * Total number of reserved IP addresses in the IpamPool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfReservedIPAddresses?: string; - /** - * Total number of available IP addresses in the IpamPool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfAvailableIPAddresses?: string; -} - -/** Representation of basic resource information. */ -export interface ResourceBasics { - /** ResourceId of the Azure resource. */ - resourceId?: string; - /** List of IP address prefixes of the resource. */ - addressPrefixes?: string[]; -} - -/** List of PoolAssociation */ -export interface PoolAssociationList { - value?: PoolAssociation[]; - /** The link used to get the next page of operations. */ - nextLink?: string; -} - -/** IpamPool association information. */ -export interface PoolAssociation { - /** Resource id of the associated Azure resource. */ - resourceId: string; - /** IpamPool id for which the resource is associated to. */ - poolId?: string; - description?: string; - /** - * List of assigned IP address prefixes in the IpamPool of the associated resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly addressPrefixes?: string[]; - /** - * List of reserved IP address prefixes in the IpamPool of the associated resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reservedPrefixes?: string[]; - /** - * Total number of assigned IP addresses of the association. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly totalNumberOfIPAddresses?: string; - /** - * Total number of reserved IP addresses of the association. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfReservedIPAddresses?: string; - /** - * Creation time of the association. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAt?: Date; - /** - * Expire time for IP addresses reserved. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reservationExpiresAt?: Date; -} - -/** List of StaticCidr */ -export interface StaticCidrList { - value?: StaticCidr[]; - /** The link used to get the next page of operations. */ - nextLink?: string; -} - -/** Properties of static CIDR resource. */ -export interface StaticCidrProperties { - description?: string; - /** Number of IP addresses to allocate for a static CIDR resource. The IP addresses will be assigned based on IpamPools available space. */ - numberOfIPAddressesToAllocate?: string; - /** List of IP address prefixes of the resource. */ - addressPrefixes?: string[]; - /** - * Total number of IP addresses allocated for the static CIDR resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly totalNumberOfIPAddresses?: string; - /** Provisioning states of a resource. */ - provisioningState?: ProvisioningState; -} - -/** Response for the ListIpAllocations API service call. */ -export interface IpAllocationListResult { - /** A list of IpAllocation resources. */ - value?: IpAllocation[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for the ListIpGroups API service call. */ -export interface IpGroupListResult { - /** The list of IpGroups information resources. */ - value?: IpGroup[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** SKU of a load balancer. */ -export interface LoadBalancerSku { - /** Name of a load balancer SKU. */ - name?: LoadBalancerSkuName; - /** Tier of a load balancer SKU. */ - tier?: LoadBalancerSkuTier; -} - -/** Response for ListLoadBalancers API service call. */ -export interface LoadBalancerListResult { - /** A list of load balancers in a resource group. */ - value?: LoadBalancer[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for ListBackendAddressPool API service call. */ -export interface LoadBalancerBackendAddressPoolListResult { - /** A list of backend address pools in a load balancer. */ - value?: BackendAddressPool[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for ListFrontendIPConfiguration API service call. */ -export interface LoadBalancerFrontendIPConfigurationListResult { - /** A list of frontend IP configurations in a load balancer. */ - value?: FrontendIPConfiguration[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for ListInboundNatRule API service call. */ -export interface InboundNatRuleListResult { - /** A list of inbound NAT rules in a load balancer. */ - value?: InboundNatRule[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for ListLoadBalancingRule API service call. */ -export interface LoadBalancerLoadBalancingRuleListResult { - /** A list of load balancing rules in a load balancer. */ - value?: LoadBalancingRule[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for ListOutboundRule API service call. */ -export interface LoadBalancerOutboundRuleListResult { - /** A list of outbound rules in a load balancer. */ - value?: OutboundRule[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for ListProbe API service call. */ -export interface LoadBalancerProbeListResult { - /** A list of probes in a load balancer. */ - value?: Probe[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The request for a VIP swap. */ -export interface LoadBalancerVipSwapRequest { - /** A list of frontend IP configuration resources that should swap VIPs. */ - frontendIPConfigurations?: LoadBalancerVipSwapRequestFrontendIPConfiguration[]; -} - -/** VIP swap request's frontend IP configuration object. */ -export interface LoadBalancerVipSwapRequestFrontendIPConfiguration { - /** The ID of frontend IP configuration resource. */ - id?: string; - /** A reference to public IP address resource. */ - publicIPAddress?: SubResource; -} - -/** The request for a QueryInboundNatRulePortMapping API. Either IpConfiguration or IpAddress should be set */ -export interface QueryInboundNatRulePortMappingRequest { - /** NetworkInterfaceIPConfiguration set in load balancer backend address. */ - ipConfiguration?: SubResource; - /** IP address set in load balancer backend address. */ - ipAddress?: string; -} - -/** The response for a QueryInboundNatRulePortMapping API. */ -export interface BackendAddressInboundNatRulePortMappings { - /** Collection of inbound NAT rule port mappings. */ - inboundNatRulePortMappings?: InboundNatRulePortMapping[]; -} - -/** Individual port mappings for inbound NAT rule created for backend pool. */ -export interface InboundNatRulePortMapping { - /** - * Name of inbound NAT rule. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly inboundNatRuleName?: string; - /** - * The reference to the transport protocol used by the inbound NAT rule. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly protocol?: TransportProtocol; - /** - * Frontend port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly frontendPort?: number; - /** - * Backend port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly backendPort?: number; -} - -/** The response for a Health API. */ -export interface LoadBalancerHealthPerRule { - /** Number of backend instances associated to the LB rule that are considered healthy. */ - up?: number; - /** Number of backend instances associated to the LB rule that are considered unhealthy. */ - down?: number; - /** Information about the health per rule of the backend addresses. */ - loadBalancerBackendAddresses?: LoadBalancerHealthPerRulePerBackendAddress[]; -} - -/** The information about health per rule per backend address. */ -export interface LoadBalancerHealthPerRulePerBackendAddress { - /** The IP address belonging to the backend address. */ - ipAddress?: string; - /** Resource ID of the Network Interface IP Configuration. */ - networkInterfaceIPConfigurationId?: string; - /** The current health of the backend instances that is associated to the LB rule. */ - state?: string; - /** The explanation of the State */ - reason?: string; -} - -/** The request for a migrateToIpBased API. */ -export interface MigrateLoadBalancerToIpBasedRequest { - /** A list of pool names that should be migrated from Nic based to IP based pool */ - pools?: string[]; -} - -/** The response for a migrateToIpBased API. */ -export interface MigratedPools { - /** A list of pools migrated from Nic based to IP based pool */ - migratedPools?: string[]; -} - -/** Response for ListNatGateways API service call. */ -export interface NatGatewayListResult { - /** A list of Nat Gateways that exists in a resource group. */ - value?: NatGateway[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for list effective route API service call. */ -export interface EffectiveRouteListResult { - /** A list of effective routes. */ - value?: EffectiveRoute[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Effective Route. */ -export interface EffectiveRoute { - /** The name of the user defined route. This is optional. */ - name?: string; - /** If true, on-premises routes are not propagated to the network interfaces in the subnet. */ - disableBgpRoutePropagation?: boolean; - /** Who created the route. */ - source?: EffectiveRouteSource; - /** The value of effective route. */ - state?: EffectiveRouteState; - /** The address prefixes of the effective routes in CIDR notation. */ - addressPrefix?: string[]; - /** The IP address of the next hop of the effective route. */ - nextHopIpAddress?: string[]; - /** The type of Azure hop the packet should be sent to. */ - nextHopType?: RouteNextHopType; -} - -/** Response for list effective network security groups API service call. */ -export interface EffectiveNetworkSecurityGroupListResult { - /** A list of effective network security groups. */ - value?: EffectiveNetworkSecurityGroup[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Effective network security group. */ -export interface EffectiveNetworkSecurityGroup { - /** The ID of network security group that is applied. */ - networkSecurityGroup?: SubResource; - /** Associated resources. */ - association?: EffectiveNetworkSecurityGroupAssociation; - /** A collection of effective security rules. */ - effectiveSecurityRules?: EffectiveNetworkSecurityRule[]; - /** Mapping of tags to list of IP Addresses included within the tag. */ - tagMap?: string; -} - -/** The effective network security group association. */ -export interface EffectiveNetworkSecurityGroupAssociation { - /** The ID of the Azure network manager if assigned. */ - networkManager?: SubResource; - /** The ID of the subnet if assigned. */ - subnet?: SubResource; - /** The ID of the network interface if assigned. */ - networkInterface?: SubResource; -} - -/** Effective network security rules. */ -export interface EffectiveNetworkSecurityRule { - /** The name of the security rule specified by the user (if created by the user). */ - name?: string; - /** The network protocol this rule applies to. */ - protocol?: EffectiveSecurityRuleProtocol; - /** The source port or range. */ - sourcePortRange?: string; - /** The destination port or range. */ - destinationPortRange?: string; - /** The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). */ - sourcePortRanges?: string[]; - /** The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). */ - destinationPortRanges?: string[]; - /** The source address prefix. */ - sourceAddressPrefix?: string; - /** The destination address prefix. */ - destinationAddressPrefix?: string; - /** The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). */ - sourceAddressPrefixes?: string[]; - /** The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). */ - destinationAddressPrefixes?: string[]; - /** The expanded source address prefix. */ - expandedSourceAddressPrefix?: string[]; - /** Expanded destination address prefix. */ - expandedDestinationAddressPrefix?: string[]; - /** Whether network traffic is allowed or denied. */ - access?: SecurityRuleAccess; - /** The priority of the rule. */ - priority?: number; - /** The direction of the rule. */ - direction?: SecurityRuleDirection; -} - -/** Response for list ip configurations API service call. */ -export interface NetworkInterfaceIPConfigurationListResult { - /** A list of ip configurations. */ - value?: NetworkInterfaceIPConfiguration[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for list ip configurations API service call. */ -export interface NetworkInterfaceLoadBalancerListResult { - /** A list of load balancers. */ - value?: LoadBalancer[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for list tap configurations API service call. */ -export interface NetworkInterfaceTapConfigurationListResult { - /** A list of tap configurations. */ - value?: NetworkInterfaceTapConfiguration[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Scope of Network Manager. */ -export interface NetworkManagerPropertiesNetworkManagerScopes { - /** List of management groups. */ - managementGroups?: string[]; - /** List of subscriptions. */ - subscriptions?: string[]; - /** - * List of cross tenant scopes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly crossTenantScopes?: CrossTenantScopes[]; -} - -/** Cross tenant scopes. */ -export interface CrossTenantScopes { - /** - * Tenant ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** - * List of management groups. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementGroups?: string[]; - /** - * List of subscriptions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subscriptions?: string[]; -} - -/** Object for patch operations. */ -export interface PatchObject { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** Network Manager Commit. */ -export interface NetworkManagerCommit { - /** - * Commit Id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly commitId?: string; - /** List of target locations. */ - targetLocations: string[]; - /** List of configuration ids. */ - configurationIds?: string[]; - /** Commit Type. */ - commitType: ConfigurationType; -} - -/** Network Manager Deployment Status Parameter. */ -export interface NetworkManagerDeploymentStatusParameter { - /** List of locations. */ - regions?: string[]; - /** List of deployment types. */ - deploymentTypes?: ConfigurationType[]; - /** Continuation token for pagination, capturing the next page size and offset, as well as the context of the query. */ - skipToken?: string; -} - -/** A list of Network Manager Deployment Status */ -export interface NetworkManagerDeploymentStatusListResult { - /** Gets a page of Network Manager Deployment Status */ - value?: NetworkManagerDeploymentStatus[]; - /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ - skipToken?: string; -} - -/** Network Manager Deployment Status. */ -export interface NetworkManagerDeploymentStatus { - /** Commit Time. */ - commitTime?: Date; - /** Region Name. */ - region?: string; - /** Deployment Status. */ - deploymentStatus?: DeploymentStatus; - /** List of configuration ids. */ - configurationIds?: string[]; - /** Configuration Deployment Type. */ - deploymentType?: ConfigurationType; - /** Error Message. */ - errorMessage?: string; -} - -/** Result of the request to list NetworkManager. It contains a list of network managers and a URL link to get the next set of results. */ -export interface NetworkManagerListResult { - /** Gets a page of NetworkManager */ - value?: NetworkManager[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Effective Virtual Networks Parameter. */ -export interface ActiveConfigurationParameter { - /** List of regions. */ - regions?: string[]; - /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ - skipToken?: string; -} - -/** Result of the request to list active connectivity configurations. It contains a list of active connectivity configurations and a skiptoken to get the next set of results. */ -export interface ActiveConnectivityConfigurationsListResult { - /** Gets a page of active connectivity configurations. */ - value?: ActiveConnectivityConfiguration[]; - /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ - skipToken?: string; -} - -/** The network manager effective connectivity configuration */ -export interface EffectiveConnectivityConfiguration { - /** Connectivity configuration ID. */ - id?: string; - /** Effective configuration groups. */ - configurationGroups?: ConfigurationGroup[]; - /** A description of the connectivity configuration. */ - description?: string; - /** Connectivity topology type. */ - connectivityTopology?: ConnectivityTopology; - /** List of hubItems */ - hubs?: Hub[]; - /** Flag if global mesh is supported. */ - isGlobal?: IsGlobal; - /** Collection of additional settings to enhance specific topology behaviors of the connectivity configuration resource. */ - connectivityCapabilities?: ConnectivityConfigurationPropertiesConnectivityCapabilities; - /** Groups for configuration */ - appliesToGroups?: ConnectivityGroupItem[]; - /** - * The provisioning state of the connectivity configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Flag if need to remove current existing peerings. */ - deleteExistingPeering?: DeleteExistingPeering; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Hub Item. */ -export interface Hub { - /** Resource Id. */ - resourceId?: string; - /** Resource Type. */ - resourceType?: string; -} - -/** Collection of additional settings to enhance specific topology behaviors of the connectivity configuration resource. */ -export interface ConnectivityConfigurationPropertiesConnectivityCapabilities { - /** Option indicating the scale of private endpoints allowed in the connected group of the connectivity configuration. */ - connectedGroupPrivateEndpointsScale: ConnectedGroupPrivateEndpointsScale; - /** Behavior to handle overlapped IP address space among members of the connected group of the connectivity configuration. */ - connectedGroupAddressOverlap: ConnectedGroupAddressOverlap; - /** Option indicating enforcement of peerings created by the connectivity configuration. */ - peeringEnforcement: PeeringEnforcement; -} - -/** Connectivity group item. */ -export interface ConnectivityGroupItem { - /** Network group Id. */ - networkGroupId: string; - /** Flag if need to use hub gateway. */ - useHubGateway?: UseHubGateway; - /** Flag if global is supported. */ - isGlobal?: IsGlobal; - /** Group connectivity type. */ - groupConnectivity: GroupConnectivity; -} - -/** The network configuration group resource */ -export interface ConfigurationGroup { - /** Network group ID. */ - id?: string; - /** A description of the network group. */ - description?: string; - /** The type of the group member. */ - memberType?: GroupMemberType; - /** - * The provisioning state of the scope assignment resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Result of the request to list active security admin rules. It contains a list of active security admin rules and a skiptoken to get the next set of results. */ -export interface ActiveSecurityAdminRulesListResult { - /** Gets a page of active security admin rules. */ - value?: ActiveBaseSecurityAdminRuleUnion[]; - /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ - skipToken?: string; -} - -/** Network base admin rule. */ -export interface ActiveBaseSecurityAdminRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "Custom" | "Default"; - /** Resource ID. */ - id?: string; - /** Deployment time string. */ - commitTime?: Date; - /** Deployment region. */ - region?: string; - /** A description of the security admin configuration. */ - configurationDescription?: string; - /** A description of the rule collection. */ - ruleCollectionDescription?: string; - /** Groups for rule collection */ - ruleCollectionAppliesToGroups?: NetworkManagerSecurityGroupItem[]; - /** Effective configuration groups. */ - ruleGroups?: ConfigurationGroup[]; -} - -/** Network manager security group item. */ -export interface NetworkManagerSecurityGroupItem { - /** Network manager group Id. */ - networkGroupId: string; -} - -/** Proxy resource representation. */ -export interface ChildResource { - /** - * Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: 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; -} - -/** List of network manager connections. */ -export interface NetworkManagerConnectionListResult { - /** List of network manager connections. */ - value?: NetworkManagerConnection[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Result of the request to list network manager connectivity configurations. It contains a list of configurations and a link to get the next set of results. */ -export interface ConnectivityConfigurationListResult { - /** Gets a page of Connectivity Configurations */ - value?: ConnectivityConfiguration[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Query Request Options */ -export interface QueryRequestOptions { - /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ - skipToken?: string; -} - -/** Result of the request to list networkManagerEffectiveConnectivityConfiguration. It contains a list of groups and a skiptoken to get the next set of results. */ -export interface NetworkManagerEffectiveConnectivityConfigurationListResult { - /** Gets a page of NetworkManagerEffectiveConnectivityConfiguration */ - value?: EffectiveConnectivityConfiguration[]; - /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ - skipToken?: string; -} - -/** Result of the request to list networkManagerEffectiveSecurityAdminRules. It contains a list of groups and a skiptoken to get the next set of results. */ -export interface NetworkManagerEffectiveSecurityAdminRulesListResult { - /** Gets a page of NetworkManagerEffectiveSecurityAdminRules */ - value?: EffectiveBaseSecurityAdminRuleUnion[]; - /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ - skipToken?: string; -} - -/** Network base admin rule. */ -export interface EffectiveBaseSecurityAdminRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "Custom" | "Default"; - /** Resource ID. */ - id?: string; - /** A description of the security admin configuration. */ - configurationDescription?: string; - /** A description of the rule collection. */ - ruleCollectionDescription?: string; - /** Groups for rule collection */ - ruleCollectionAppliesToGroups?: NetworkManagerSecurityGroupItem[]; - /** Effective configuration groups. */ - ruleGroups?: ConfigurationGroup[]; -} - -/** Result of the request to list NetworkGroup. It contains a list of groups and a URL link to get the next set of results. */ -export interface NetworkGroupListResult { - /** Gets a page of NetworkGroup */ - value?: NetworkGroup[]; - /** Gets the URL to get the next set of results. */ - nextLink?: string; -} - -/** Result of the request to list StaticMember. It contains a list of groups and a URL link to get the next set of results. */ -export interface StaticMemberListResult { - /** Gets a page of StaticMember */ - value?: StaticMember[]; - /** Gets the URL to get the next set of results. */ - nextLink?: string; -} - -/** A list of network manager routing configurations */ -export interface NetworkManagerRoutingConfigurationListResult { - /** Gets a page of routing configurations */ - value?: NetworkManagerRoutingConfiguration[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Routing configuration rule collection list result. */ -export interface RoutingRuleCollectionListResult { - /** A list of network manager routing configuration rule collections */ - value?: RoutingRuleCollection[]; - /** Gets the URL to get the next set of results. */ - nextLink?: string; -} - -/** Network manager routing group item. */ -export interface NetworkManagerRoutingGroupItem { - /** Network manager group Id. */ - networkGroupId: string; -} - -/** Routing configuration rule list result. */ -export interface RoutingRuleListResult { - /** A list of routing rules. */ - value?: RoutingRule[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Route destination. */ -export interface RoutingRuleRouteDestination { - /** Destination type. */ - type: RoutingRuleDestinationType; - /** Destination address. */ - destinationAddress: string; -} - -/** Next hop. */ -export interface RoutingRuleNextHop { - /** Next hop type. */ - nextHopType: RoutingRuleNextHopType; - /** Next hop address. Only required if the next hop type is VirtualAppliance. */ - nextHopAddress?: string; -} - -/** List of scope connections. */ -export interface ScopeConnectionListResult { - /** List of scope connections. */ - value?: ScopeConnection[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** A list of network manager security admin configurations */ -export interface SecurityAdminConfigurationListResult { - /** Gets a page of security admin configurations */ - value?: SecurityAdminConfiguration[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Security admin configuration rule collection list result. */ -export interface AdminRuleCollectionListResult { - /** A list of network manager security admin configuration rule collections */ - value?: AdminRuleCollection[]; - /** Gets the URL to get the next set of results. */ - nextLink?: string; -} - -/** security configuration admin rule list result. */ -export interface AdminRuleListResult { - /** A list of admin rules */ - value?: BaseAdminRuleUnion[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** A list of network manager security user configurations */ -export interface SecurityUserConfigurationListResult { - /** Gets a page of security user configurations */ - value?: SecurityUserConfiguration[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Security user configuration rule collection list result. */ -export interface SecurityUserRuleCollectionListResult { - /** A list of network manager security user configuration rule collections */ - value?: SecurityUserRuleCollection[]; - /** Gets the URL to get the next set of results. */ - nextLink?: string; -} - -/** Network manager security user group item. */ -export interface SecurityUserGroupItem { - /** Network manager group Id. */ - networkGroupId: string; -} - -/** security user rule list result. */ -export interface SecurityUserRuleListResult { - /** A list of security user rules */ - value?: SecurityUserRule[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Address prefix item. */ -export interface AddressPrefixItem { - /** Address prefix. */ - addressPrefix?: string; - /** Address prefix type. */ - addressPrefixType?: AddressPrefixType; -} - -/** The ip configuration for a container network interface. */ -export interface ContainerNetworkInterfaceIpConfiguration { - /** The name of the resource. This name can be used to access the resource. */ - name?: string; - /** - * Sub Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: 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; - /** - * The provisioning state of the container network interface IP configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Response for ListNetworkProfiles API service call. */ -export interface NetworkProfileListResult { - /** A list of network profiles that exist in a resource group. */ - value?: NetworkProfile[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListNetworkSecurityGroups API service call. */ -export interface NetworkSecurityGroupListResult { - /** A list of NetworkSecurityGroup resources. */ - value?: NetworkSecurityGroup[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. */ -export interface SecurityRuleListResult { - /** The security rules in a network security group. */ - value?: SecurityRule[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface SecurityPerimeterResource { - /** - * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SecurityPerimeterSystemData; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SecurityPerimeterSystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** Update tags request. */ -export interface UpdateTagsRequest { - /** - * Network security perimeter identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** List of tags for Network Security Perimeter */ - tags?: { [propertyName: string]: string }; -} - -/** Result of the request to list NetworkSecurityPerimeter. It contains a list of network security perimeters and a URL link to get the next set of results. */ -export interface NetworkSecurityPerimeterListResult { - /** Gets a page of NetworkSecurityPerimeter */ - value?: NetworkSecurityPerimeter[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Result of the request to list NSP profiles. Contains a list of NSP profiles and a URL link to get the next set of results. */ -export interface NspProfileListResult { - /** Gets a page of NSP profile */ - value?: NspProfile[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -export interface SubscriptionId { - /** Subscription id in the ARM id format. */ - id?: string; -} - -export interface PerimeterBasedAccessRule { - /** - * NSP id in the ARM id format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource guid of the NSP supplied. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly perimeterGuid?: string; - /** - * Location of the NSP supplied. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly location?: string; -} - -/** Result of the request to list NSP access rules. Contains a list of NSP access rules and a URL link to get the next set of results. */ -export interface NspAccessRuleListResult { - /** Gets a page of NSP access rule */ - value?: NspAccessRule[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Result of the request to list NSP resource associations. Contains a list of NSP resource associations and a URL link to get the next set of results. */ -export interface NspAssociationsListResult { - /** Gets a page of NSP resource associations */ - value?: NspAssociation[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Paged list of perimeter associable resources. */ -export interface PerimeterAssociableResourcesListResult { - /** Gets paged list of perimeter associable resources. */ - value?: PerimeterAssociableResource[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Resource that is onboarded to use network security perimeter. Also referred as perimeter associable resource. */ -export interface PerimeterAssociableResource { - /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ - name?: string; - /** - * Identifier of the perimeter associable resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * A friendly name for the properties of perimeter associable resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** - * Resource type/provider name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * Public DNS zone names of the resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicDnsZones?: string[]; -} - -/** Result of the request to list NSP link resources. Contains a list of NSP link resources and a URL link to get the next set of results. */ -export interface NspLinkListResult { - /** Gets a page of NSP Link resources. */ - value?: NspLink[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Result of the request to list NSP linkReference resources. Contains a list of NSP linkReference resources and a URL link to get the next set of results. */ -export interface NspLinkReferenceListResult { - /** Gets a page of NSP LinkReference resources. */ - value?: NspLinkReference[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Result of the request to list NSP logging configuration. Contains a list of NSP logging configurations and a URL link to get the next set of results. */ -export interface NspLoggingConfigurationListResult { - /** Gets a page of NSP logging configuration */ - value?: NspLoggingConfiguration[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** The current status of an async operation. */ -export interface OperationStatusResult { - /** Fully qualified ID for the async operation. */ - id?: string; - /** - * Fully qualified ID of the resource against which the original async operation was started. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceId?: string; - /** Name of the async operation. */ - name?: string; - /** Operation status. */ - status: string; - /** Percent of the operation that is complete. */ - percentComplete?: number; - /** The start time of the operation. */ - startTime?: Date; - /** The end time of the operation. */ - endTime?: Date; - /** The operations list. */ - operations?: OperationStatusResult[]; - /** If present, details of the operation error. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - -/** Result of the request to list NSP service tags. */ -export interface NspServiceTagsListResult { - /** Gets paged list of NSP service tags. */ - value?: NspServiceTagsResource[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Resource containing list of NSP service tags. */ -export interface NspServiceTagsResource { - /** NSP service tags. */ - serviceTags?: string[]; -} - -/** A list of Reachability Analysis Intents. */ -export interface ReachabilityAnalysisIntentListResult { - /** Gets a page of Reachability Analysis Intents */ - value?: ReachabilityAnalysisIntent[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Represents the Reachability Analysis Intent properties. */ -export interface ReachabilityAnalysisIntentProperties { - /** Provisioning states of a resource. */ - provisioningState?: ProvisioningState; - description?: string; - /** Source resource id to verify the reachability path of. */ - sourceResourceId: string; - /** Destination resource id to verify the reachability path of. */ - destinationResourceId: string; - /** IP traffic information. */ - ipTraffic: IPTraffic; -} - -/** IP traffic information. */ -export interface IPTraffic { - /** List of source IP addresses of the traffic.. */ - sourceIps: string[]; - /** List of destination IP addresses of the traffic.. */ - destinationIps: string[]; - /** The source ports of the traffic. */ - sourcePorts: string[]; - /** The destination ports of the traffic. */ - destinationPorts: string[]; - protocols: NetworkProtocol[]; -} - -/** A list of Reachability Analysis Run */ -export interface ReachabilityAnalysisRunListResult { - /** Gets a page of Reachability Analysis Runs. */ - value?: ReachabilityAnalysisRun[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Represents the Reachability Analysis Run properties. */ -export interface ReachabilityAnalysisRunProperties { - description?: string; - /** Id of the intent resource to run analysis on. */ - intentId: string; - /** - * Intent information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly intentContent?: IntentContent; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly analysisResult?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorMessage?: string; - /** Provisioning states of a resource. */ - provisioningState?: ProvisioningState; -} - -/** Intent information. */ -export interface IntentContent { - description?: string; - /** Source resource id of the intent. */ - sourceResourceId: string; - /** Destination resource id of the intent. */ - destinationResourceId: string; - /** IP traffic information. */ - ipTraffic: IPTraffic; -} - -/** A list of Verifier Workspace */ -export interface VerifierWorkspaceListResult { - /** Gets a page of Verifier Workspaces. */ - value?: VerifierWorkspace[]; - /** Gets the URL to get the next page of results. */ - nextLink?: string; -} - -/** Properties of Verifier Workspace resource. */ -export interface VerifierWorkspaceProperties { - description?: string; - /** Provisioning states of a resource. */ - provisioningState?: ProvisioningState; -} - -/** Represents the VerifierWorkspace update API request interface. */ -export interface VerifierWorkspaceUpdate { - /** Dictionary of */ - tags?: { [propertyName: string]: string }; - /** Represents the VerifierWorkspace update properties. */ - properties?: VerifierWorkspaceUpdateProperties; -} - -/** Represents the VerifierWorkspace update properties. */ -export interface VerifierWorkspaceUpdateProperties { - description?: string; -} - -/** Network Virtual Appliance Sku Properties. */ -export interface VirtualApplianceSkuProperties { - /** Virtual Appliance Vendor. */ - vendor?: string; - /** Virtual Appliance Scale Unit. */ - bundledScaleUnit?: string; - /** Virtual Appliance Version. */ - marketPlaceVersion?: string; -} - -/** Network Virtual Appliance NIC properties. */ -export interface VirtualApplianceNicProperties { - /** - * NIC type - PublicNic, PrivateNic, or AdditionalNic; AdditionalPrivateNic and AdditionalPublicNic are only supported for NVAs deployed in VNets. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nicType?: NicTypeInResponse; - /** - * NIC name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Public IP address. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIpAddress?: string; - /** - * Private IP address. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIpAddress?: string; - /** - * Instance on which nic is attached. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly instanceName?: string; -} - -/** Network Profile containing configurations for Public and Private NIC. */ -export interface NetworkVirtualAppliancePropertiesFormatNetworkProfile { - networkInterfaceConfigurations?: VirtualApplianceNetworkInterfaceConfiguration[]; -} - -/** Represents a single NIC configuration. */ -export interface VirtualApplianceNetworkInterfaceConfiguration { - /** NIC type. This should be either PublicNic or PrivateNic. */ - nicType?: NicTypeInRequest; - /** Represents a single NIC configuration properties. */ - properties?: VirtualApplianceNetworkInterfaceConfigurationProperties; -} - -/** Represents a single NIC configuration properties. */ -export interface VirtualApplianceNetworkInterfaceConfigurationProperties { - ipConfigurations?: VirtualApplianceIPConfiguration[]; -} - -/** Represents a single IP configuration. */ -export interface VirtualApplianceIPConfiguration { - /** For hub NVAs, primary IP configs must be named 'privatenicipconfig' and 'publicnicipconfig', with non-primary configs using these prefixes; no naming restrictions apply for NVAs in VNets. Maximum 80 character are allowed. */ - name?: string; - /** Represents a single IP configuration properties. */ - properties?: VirtualApplianceIPConfigurationProperties; -} - -/** Represents a single IP configuration properties. */ -export interface VirtualApplianceIPConfigurationProperties { - /** Whether or not this is primary IP configuration of the NIC. */ - primary?: boolean; -} - -/** Network Virtual Appliance Additional NIC properties. */ -export interface VirtualApplianceAdditionalNicProperties { - /** Name of additional nic */ - name?: string; - /** Flag (true or false) for Intent for Public Ip on additional nic */ - hasPublicIp?: boolean; -} - -/** Resource Uri of Public Ip for Standard Load Balancer Frontend End. */ -export interface InternetIngressPublicIpsProperties { - /** Resource Uri of Public Ip */ - id?: string; -} - -/** Properties of the delegation. */ -export interface DelegationProperties { - /** The service name to which the NVA is delegated. */ - serviceName?: string; - /** - * Provisioning states of a resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Properties of the partner managed resource. Only appliable for SaaS NVA. */ -export interface PartnerManagedResourceProperties { - /** - * The partner managed resource id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The partner managed ILB resource id - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly internalLoadBalancerId?: string; - /** - * The partner managed SLB resource id - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly standardLoadBalancerId?: string; -} - -/** Specifies input parameters required NVA in VNet interface configuration. */ -export interface NvaInterfaceConfigurationsProperties { - /** A subnet resource id where the NIC will be deployed. Each subnet resource uri should be unique. */ - subnet?: NvaInVnetSubnetReferenceProperties; - /** Specifies the NIC types for the NVA interface configuration. Allowed values: PrivateNic, PublicNic, AdditionalPrivateNic, AdditionalPublicNic. Only the combination of PrivateNic and PublicNic is currently supported. */ - type?: NvaNicType[]; - /** Specifies the name of the interface. Maximum length is 70 characters. */ - name?: string; -} - -/** The resource URI of the subnets where the NVA NICS will be deployed */ -export interface NvaInVnetSubnetReferenceProperties { - /** Resource Uri of Subnet */ - id?: string; -} - -/** Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. */ -export interface NetworkVirtualApplianceInstanceIds { - /** The network virtual appliance instance ids. Omitting the network virtual appliance instance ids will result in the operation being performed on all virtual machines belonging to the network virtual appliance. */ - instanceIds?: string[]; -} - -/** Specifies input parameters required to retrieve the boot diagnostic logs for an NVA instance */ -export interface NetworkVirtualApplianceBootDiagnosticParameters { - /** The network virtual appliance instance id for which boot diagnostic logs is being requested */ - instanceId?: number; - /** Specifies the sas-url to the storage blob into which serial console logs for the requested instance will be written */ - serialConsoleStorageSasUrl?: string; - /** Specifies the sas-url to the storage blob into which console screen shot for the requested instance will be written */ - consoleScreenshotStorageSasUrl?: string; -} - -export interface NetworkVirtualApplianceInstanceId { - /** The network virtual appliance instance id for which boot diagnostic logs is being requested */ - instanceId?: number; -} - -/** Response for ListNetworkVirtualAppliances API service call. */ -export interface NetworkVirtualApplianceListResult { - /** List of Network Virtual Appliances. */ - value?: NetworkVirtualAppliance[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Network Virtual Appliance Sku Properties. */ -export interface Office365PolicyProperties { - /** Office 365 breakout categories. */ - breakOutCategories?: BreakOutCategoryPolicies; -} - -/** Network Virtual Appliance Sku Properties. */ -export interface BreakOutCategoryPolicies { - /** Flag to control breakout of o365 allow category. */ - allow?: boolean; - /** Flag to control breakout of o365 optimize category. */ - optimize?: boolean; - /** Flag to control breakout of o365 default category. */ - default?: boolean; -} - -/** Response for ListNetworkVirtualApplianceSites API service call. */ -export interface NetworkVirtualApplianceSiteListResult { - /** List of Network Virtual Appliance sites. */ - value?: VirtualApplianceSite[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListNetworkVirtualApplianceSkus API service call. */ -export interface NetworkVirtualApplianceSkuListResult { - /** List of Network Virtual Appliance Skus that are available. */ - value?: NetworkVirtualApplianceSku[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** List of available Sku and instances. */ -export interface NetworkVirtualApplianceSkuInstances { - /** - * Scale Unit. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scaleUnit?: string; - /** - * Instance Count. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly instanceCount?: number; -} - -/** Properties of the Inbound Security Rules resource. */ -export interface InboundSecurityRules { - /** Name of the rule. */ - name?: string; - /** Protocol. This should be either TCP or UDP. */ - protocol?: InboundSecurityRulesProtocol; - /** The CIDR or source IP range. */ - sourceAddressPrefix?: string; - /** NVA port ranges to be opened up. One needs to provide specific ports. */ - destinationPortRange?: number; - /** NVA port ranges to be opened up. One can provide a range of ports. Allowed port value between 0 and 65535. */ - destinationPortRanges?: string[]; - /** Public IP name in case of Permanent Rule type & Interface Name in case of Auto Expire Rule type */ - appliesOn?: string[]; -} - -/** The error object. */ -export interface ErrorResponse { - /** The error details object. */ - error?: ErrorDetails; -} - -/** Response for ListNetworkWatchers API service call. */ -export interface NetworkWatcherListResult { - /** List of network watcher resources. */ - value?: NetworkWatcher[]; -} - -/** Parameters that define the representation of topology. */ -export interface TopologyParameters { - /** The name of the target resource group to perform topology on. */ - targetResourceGroupName?: string; - /** The reference to the Virtual Network resource. */ - targetVirtualNetwork?: SubResource; - /** The reference to the Subnet resource. */ - targetSubnet?: SubResource; -} - -/** Topology of the specified resource group. */ -export interface Topology { - /** - * GUID representing the operation id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The datetime when the topology was initially created for the resource group. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDateTime?: Date; - /** - * The datetime when the topology was last modified. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastModified?: Date; - /** A list of topology resources. */ - resources?: TopologyResource[]; -} - -/** The network resource topology information for the given resource group. */ -export interface TopologyResource { - /** Name of the resource. */ - name?: string; - /** ID of the resource. */ - id?: string; - /** Resource location. */ - location?: string; - /** Holds the associations the resource has with other resources in the resource group. */ - associations?: TopologyAssociation[]; -} - -/** Resources that have an association with the parent resource. */ -export interface TopologyAssociation { - /** The name of the resource that is associated with the parent resource. */ - name?: string; - /** The ID of the resource that is associated with the parent resource. */ - resourceId?: string; - /** The association type of the child resource to the parent resource. */ - associationType?: AssociationType; -} - -/** Parameters that define the IP flow to be verified. */ -export interface VerificationIPFlowParameters { - /** The ID of the target resource to perform next-hop on. */ - targetResourceId: string; - /** The direction of the packet represented as a 5-tuple. */ - direction: Direction; - /** Protocol to be verified on. */ - protocol: IpFlowProtocol; - /** The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. */ - localPort: string; - /** The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. */ - remotePort: string; - /** The local IP address. Acceptable values are valid IPv4 addresses. */ - localIPAddress: string; - /** The remote IP address. Acceptable values are valid IPv4 addresses. */ - remoteIPAddress: string; - /** The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). */ - targetNicResourceId?: string; -} - -/** Results of IP flow verification on the target resource. */ -export interface VerificationIPFlowResult { - /** Indicates whether the traffic is allowed or denied. */ - access?: Access; - /** Name of the rule. If input is not matched against any security rule, it is not displayed. */ - ruleName?: string; -} - -/** Parameters that define the source and destination endpoint. */ -export interface NextHopParameters { - /** The resource identifier of the target resource against which the action is to be performed. */ - targetResourceId: string; - /** The source IP address. */ - sourceIPAddress: string; - /** The destination IP address. */ - destinationIPAddress: string; - /** The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). */ - targetNicResourceId?: string; -} - -/** The information about next hop from the specified VM. */ -export interface NextHopResult { - /** Next hop type. */ - nextHopType?: NextHopType; - /** Next hop IP Address. */ - nextHopIpAddress?: string; - /** The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. */ - routeTableId?: string; -} - -/** Parameters that define the VM to check security groups for. */ -export interface SecurityGroupViewParameters { - /** ID of the target VM. */ - targetResourceId: string; -} - -/** The information about security rules applied to the specified VM. */ -export interface SecurityGroupViewResult { - /** List of network interfaces on the specified VM. */ - networkInterfaces?: SecurityGroupNetworkInterface[]; -} - -/** Network interface and all its associated security rules. */ -export interface SecurityGroupNetworkInterface { - /** ID of the network interface. */ - id?: string; - /** All security rules associated with the network interface. */ - securityRuleAssociations?: SecurityRuleAssociations; -} - -/** All security rules associated with the network interface. */ -export interface SecurityRuleAssociations { - /** Network interface and it's custom security rules. */ - networkInterfaceAssociation?: NetworkInterfaceAssociation; - /** Subnet and it's custom security rules. */ - subnetAssociation?: SubnetAssociation; - /** Collection of default security rules of the network security group. */ - defaultSecurityRules?: SecurityRule[]; - /** Collection of effective security rules. */ - effectiveSecurityRules?: EffectiveNetworkSecurityRule[]; -} - -/** Network interface and its custom security rules. */ -export interface NetworkInterfaceAssociation { - /** - * Network interface ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** Collection of custom security rules. */ - securityRules?: SecurityRule[]; -} - -/** Subnet and it's custom security rules. */ -export interface SubnetAssociation { - /** - * Subnet ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** Collection of custom security rules. */ - securityRules?: SecurityRule[]; -} - -/** Parameters that define the create packet capture operation. */ -export interface PacketCapture { - /** The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported. */ - target: string; - /** A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS. */ - scope?: PacketCaptureMachineScope; - /** Target type of the resource provided. */ - targetType?: PacketCaptureTargetType; - /** Number of bytes captured per packet, the remaining bytes are truncated. */ - bytesToCapturePerPacket?: number; - /** Maximum size of the capture output. */ - totalBytesPerSession?: number; - /** Maximum duration of the capture session in seconds. */ - timeLimitInSeconds?: number; - /** The storage location for a packet capture session. */ - storageLocation: PacketCaptureStorageLocation; - /** A list of packet capture filters. */ - filters?: PacketCaptureFilter[]; - /** This continuous capture is a nullable boolean, which can hold 'null', 'true' or 'false' value. If we do not pass this parameter, it would be consider as 'null', default value is 'null'. */ - continuousCapture?: boolean; - /** The capture setting holds the 'FileCount', 'FileSizeInBytes', 'SessionTimeLimitInSeconds' values. */ - captureSettings?: PacketCaptureSettings; -} - -/** Parameters that define the create packet capture operation. */ -export interface PacketCaptureParameters { - /** The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported. */ - target: string; - /** A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS. */ - scope?: PacketCaptureMachineScope; - /** Target type of the resource provided. */ - targetType?: PacketCaptureTargetType; - /** Number of bytes captured per packet, the remaining bytes are truncated. */ - bytesToCapturePerPacket?: number; - /** Maximum size of the capture output. */ - totalBytesPerSession?: number; - /** Maximum duration of the capture session in seconds. */ - timeLimitInSeconds?: number; - /** The storage location for a packet capture session. */ - storageLocation: PacketCaptureStorageLocation; - /** A list of packet capture filters. */ - filters?: PacketCaptureFilter[]; - /** This continuous capture is a nullable boolean, which can hold 'null', 'true' or 'false' value. If we do not pass this parameter, it would be consider as 'null', default value is 'null'. */ - continuousCapture?: boolean; - /** The capture setting holds the 'FileCount', 'FileSizeInBytes', 'SessionTimeLimitInSeconds' values. */ - captureSettings?: PacketCaptureSettings; -} - -/** A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS. */ -export interface PacketCaptureMachineScope { - /** List of AzureVMSS instances to run packet capture on. */ - include?: string[]; - /** List of AzureVMSS instances which has to be excluded from the AzureVMSS from running packet capture. */ - exclude?: string[]; -} - -/** The storage location for a packet capture session. */ -export interface PacketCaptureStorageLocation { - /** The ID of the storage account to save the packet capture session. Required if no localPath or filePath is provided. */ - storageId?: string; - /** The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. */ - storagePath?: string; - /** This path is invalid if 'Continuous Capture' is provided with 'true' or 'false'. A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. */ - filePath?: string; - /** This path is valid if 'Continuous Capture' is provided with 'true' or 'false' and required if no storage ID is provided, otherwise optional. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. */ - localPath?: string; -} - -/** Filter that is applied to packet capture request. Multiple filters can be applied. */ -export interface PacketCaptureFilter { - /** Protocol to be filtered on. */ - protocol?: PcProtocol; - /** Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. */ - localIPAddress?: string; - /** Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. */ - remoteIPAddress?: string; - /** Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. */ - localPort?: string; - /** Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. */ - remotePort?: string; -} - -/** The storage location for a packet capture session. */ -export interface PacketCaptureSettings { - /** Number of file count. Default value of count is 10 and maximum number is 10000. */ - fileCount?: number; - /** Number of bytes captured per packet. Default value in bytes 104857600 (100MB) and maximum in bytes 4294967295 (4GB). */ - fileSizeInBytes?: number; - /** Maximum duration of the capture session in seconds is 604800s (7 days) for a file. Default value in second 86400s (1 day). */ - sessionTimeLimitInSeconds?: number; -} - -/** Information about packet capture session. */ -export interface PacketCaptureResult { - /** - * Name of the packet capture session. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * ID of the packet capture operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: 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; - /** The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported. */ - target?: string; - /** A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS. */ - scope?: PacketCaptureMachineScope; - /** Target type of the resource provided. */ - targetType?: PacketCaptureTargetType; - /** Number of bytes captured per packet, the remaining bytes are truncated. */ - bytesToCapturePerPacket?: number; - /** Maximum size of the capture output. */ - totalBytesPerSession?: number; - /** Maximum duration of the capture session in seconds. */ - timeLimitInSeconds?: number; - /** The storage location for a packet capture session. */ - storageLocation?: PacketCaptureStorageLocation; - /** A list of packet capture filters. */ - filters?: PacketCaptureFilter[]; - /** This continuous capture is a nullable boolean, which can hold 'null', 'true' or 'false' value. If we do not pass this parameter, it would be consider as 'null', default value is 'null'. */ - continuousCapture?: boolean; - /** The capture setting holds the 'FileCount', 'FileSizeInBytes', 'SessionTimeLimitInSeconds' values. */ - captureSettings?: PacketCaptureSettings; - /** - * The provisioning state of the packet capture session. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Status of packet capture session. */ -export interface PacketCaptureQueryStatusResult { - /** The name of the packet capture resource. */ - name?: string; - /** The ID of the packet capture resource. */ - id?: string; - /** The start time of the packet capture session. */ - captureStartTime?: Date; - /** The status of the packet capture session. */ - packetCaptureStatus?: PcStatus; - /** The reason the current packet capture session was stopped. */ - stopReason?: string; - /** List of errors of packet capture session. */ - packetCaptureError?: PcError[]; -} - -/** List of packet capture sessions. */ -export interface PacketCaptureListResult { - /** Information about packet capture sessions. */ - value?: PacketCaptureResult[]; -} - -/** Parameters that define the resource to troubleshoot. */ -export interface TroubleshootingParameters { - /** The target resource to troubleshoot. */ - targetResourceId: string; - /** The ID for the storage account to save the troubleshoot result. */ - storageId: string; - /** The path to the blob to save the troubleshoot result in. */ - storagePath: string; -} - -/** Troubleshooting information gained from specified resource. */ -export interface TroubleshootingResult { - /** The start time of the troubleshooting. */ - startTime?: Date; - /** The end time of the troubleshooting. */ - endTime?: Date; - /** The result code of the troubleshooting. */ - code?: string; - /** Information from troubleshooting. */ - results?: TroubleshootingDetails[]; -} - -/** Information gained from troubleshooting of specified resource. */ -export interface TroubleshootingDetails { - /** The id of the get troubleshoot operation. */ - id?: string; - /** Reason type of failure. */ - reasonType?: string; - /** A summary of troubleshooting. */ - summary?: string; - /** Details on troubleshooting results. */ - detail?: string; - /** List of recommended actions. */ - recommendedActions?: TroubleshootingRecommendedActions[]; -} - -/** Recommended actions based on discovered issues. */ -export interface TroubleshootingRecommendedActions { - /** ID of the recommended action. */ - actionId?: string; - /** Description of recommended actions. */ - actionText?: string; - /** The uri linking to a documentation for the recommended troubleshooting actions. */ - actionUri?: string; - /** The information from the URI for the recommended troubleshooting actions. */ - actionUriText?: string; -} - -/** Parameters that define the resource to query the troubleshooting result. */ -export interface QueryTroubleshootingParameters { - /** The target resource ID to query the troubleshooting result. */ - targetResourceId: string; -} - -/** Information on the configuration of flow log and traffic analytics (optional) . */ -export interface FlowLogInformation { - /** The ID of the resource to configure for flow log and traffic analytics (optional) . */ - targetResourceId: string; - /** Parameters that define the configuration of traffic analytics. */ - flowAnalyticsConfiguration?: TrafficAnalyticsProperties; - /** FlowLog resource Managed Identity */ - identity?: ManagedServiceIdentity; - /** ID of the storage account which is used to store the flow log. */ - storageId: string; - /** Optional field to filter network traffic logs based on SrcIP, SrcPort, DstIP, DstPort, Protocol, Encryption, Direction and Action. If not specified, all network traffic will be logged. */ - enabledFilteringCriteria?: string; - /** Optional field to filter network traffic logs based on flow states. Value of this field could be any comma separated combination string of letters B,C,E or D. B represents Begin, when a flow is created. C represents Continue for an ongoing flow generated at every five-minute interval. E represents End, when a flow is terminated. D represents Deny, when a flow is denied. If not specified, all network traffic will be logged. */ - recordTypes?: string; - /** Flag to enable/disable flow logging. */ - enabled: boolean; - /** Parameters that define the retention policy for flow log. */ - retentionPolicy?: RetentionPolicyParameters; - /** Parameters that define the flow log format. */ - format?: FlowLogFormatParameters; -} - -/** Parameters that define a resource to query flow log and traffic analytics (optional) status. */ -export interface FlowLogStatusParameters { - /** The target resource where getting the flow log and traffic analytics (optional) status. */ - targetResourceId: string; -} - -/** Parameters that determine how the connectivity check will be performed. */ -export interface ConnectivityParameters { - /** The source of the connection. */ - source: ConnectivitySource; - /** The destination of connection. */ - destination: ConnectivityDestination; - /** Network protocol. */ - protocol?: Protocol; - /** Configuration of the protocol. */ - protocolConfiguration?: ProtocolConfiguration; - /** Preferred IP version of the connection. */ - preferredIPVersion?: IPVersion; -} - -/** Parameters that define the source of the connection. */ -export interface ConnectivitySource { - /** The ID of the resource from which a connectivity check will be initiated. */ - resourceId: string; - /** The source port from which a connectivity check will be performed. */ - port?: number; -} - -/** Parameters that define destination of connection. */ -export interface ConnectivityDestination { - /** The ID of the resource to which a connection attempt will be made. */ - resourceId?: string; - /** The IP address or URI the resource to which a connection attempt will be made. */ - address?: string; - /** Port on which check connectivity will be performed. */ - port?: number; -} - -/** Configuration of the protocol. */ -export interface ProtocolConfiguration { - /** HTTP configuration of the connectivity check. */ - httpConfiguration?: HttpConfiguration; -} - -/** HTTP configuration of the connectivity check. */ -export interface HttpConfiguration { - /** HTTP method. */ - method?: HttpMethod; - /** List of HTTP headers. */ - headers?: HttpHeader[]; - /** Valid status codes. */ - validStatusCodes?: number[]; -} - -/** The HTTP header. */ -export interface HttpHeader { - /** The name in HTTP header. */ - name?: string; - /** The value in HTTP header. */ - value?: string; -} - -/** Information on the connectivity status. */ -export interface ConnectivityInformation { - /** - * List of hops between the source and the destination. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hops?: ConnectivityHop[]; - /** - * The connection status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: ConnectionStatus; - /** - * Average latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly avgLatencyInMs?: number; - /** - * Minimum latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minLatencyInMs?: number; - /** - * Maximum latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maxLatencyInMs?: number; - /** - * Total number of probes sent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly probesSent?: number; - /** - * Number of failed probes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly probesFailed?: number; -} - -/** Information about a hop between the source and the destination. */ -export interface ConnectivityHop { - /** - * The type of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The ID of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The IP address of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly address?: string; - /** - * The ID of the resource corresponding to this hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceId?: string; - /** - * List of next hop identifiers. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextHopIds?: string[]; - /** - * List of previous hop identifiers. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly previousHopIds?: string[]; - /** - * List of hop links. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly links?: HopLink[]; - /** - * List of previous hop links. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly previousLinks?: HopLink[]; - /** - * List of issues. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly issues?: ConnectivityIssue[]; -} - -/** Hop link. */ -export interface HopLink { - /** - * The ID of the next hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextHopId?: string; - /** - * Link type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly linkType?: string; - /** - * List of issues. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly issues?: ConnectivityIssue[]; - /** - * Provides additional context on links. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly context?: { [propertyName: string]: string }; - /** - * Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceId?: string; - /** - * Minimum roundtrip time in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly roundTripTimeMin?: number; - /** - * Average roundtrip time in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly roundTripTimeAvg?: number; - /** - * Maximum roundtrip time in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly roundTripTimeMax?: number; -} - -/** Information about an issue encountered in the process of checking for connectivity. */ -export interface ConnectivityIssue { - /** - * The origin of the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: Origin; - /** - * The severity of the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly severity?: Severity; - /** - * The type of issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: IssueType; - /** - * Provides additional context on the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly context?: { [propertyName: string]: string }[]; -} - -/** Geographic and time constraints for Azure reachability report. */ -export interface AzureReachabilityReportParameters { - /** Parameters that define a geographic location. */ - providerLocation: AzureReachabilityReportLocation; - /** List of Internet service providers. */ - providers?: string[]; - /** Optional Azure regions to scope the query to. */ - azureLocations?: string[]; - /** The start time for the Azure reachability report. */ - startTime: Date; - /** The end time for the Azure reachability report. */ - endTime: Date; -} - -/** Parameters that define a geographic location. */ -export interface AzureReachabilityReportLocation { - /** The name of the country. */ - country: string; - /** The name of the state. */ - state?: string; - /** The name of the city or town. */ - city?: string; -} - -/** Azure reachability report details. */ -export interface AzureReachabilityReport { - /** The aggregation level of Azure reachability report. Can be Country, State or City. */ - aggregationLevel: string; - /** Parameters that define a geographic location. */ - providerLocation: AzureReachabilityReportLocation; - /** List of Azure reachability report items. */ - reachabilityReport: AzureReachabilityReportItem[]; -} - -/** Azure reachability report details for a given provider location. */ -export interface AzureReachabilityReportItem { - /** The Internet service provider. */ - provider?: string; - /** The Azure region. */ - azureLocation?: string; - /** List of latency details for each of the time series. */ - latencies?: AzureReachabilityReportLatencyInfo[]; -} - -/** Details on latency for a time series. */ -export interface AzureReachabilityReportLatencyInfo { - /** The time stamp. */ - timeStamp?: Date; - /** The relative latency score between 1 and 100, higher values indicating a faster connection. */ - score?: number; -} - -/** Constraints that determine the list of available Internet service providers. */ -export interface AvailableProvidersListParameters { - /** A list of Azure regions. */ - azureLocations?: string[]; - /** The country for available providers list. */ - country?: string; - /** The state for available providers list. */ - state?: string; - /** The city or town for available providers list. */ - city?: string; -} - -/** List of available countries with details. */ -export interface AvailableProvidersList { - /** List of available countries. */ - countries: AvailableProvidersListCountry[]; -} - -/** Country details. */ -export interface AvailableProvidersListCountry { - /** The country name. */ - countryName?: string; - /** A list of Internet service providers. */ - providers?: string[]; - /** List of available states in the country. */ - states?: AvailableProvidersListState[]; -} - -/** State details. */ -export interface AvailableProvidersListState { - /** The state name. */ - stateName?: string; - /** A list of Internet service providers. */ - providers?: string[]; - /** List of available cities or towns in the state. */ - cities?: AvailableProvidersListCity[]; -} - -/** City or town details. */ -export interface AvailableProvidersListCity { - /** The city or town name. */ - cityName?: string; - /** A list of Internet service providers. */ - providers?: string[]; -} - -/** Parameters to get network configuration diagnostic. */ -export interface NetworkConfigurationDiagnosticParameters { - /** The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway. */ - targetResourceId: string; - /** Verbosity level. */ - verbosityLevel?: VerbosityLevel; - /** List of network configuration diagnostic profiles. */ - profiles: NetworkConfigurationDiagnosticProfile[]; -} - -/** Parameters to compare with network configuration. */ -export interface NetworkConfigurationDiagnosticProfile { - /** The direction of the traffic. */ - direction: Direction; - /** Protocol to be verified on. Accepted values are '*', TCP, UDP. */ - protocol: string; - /** Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. */ - source: string; - /** Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. */ - destination: string; - /** Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535). */ - destinationPort: string; -} - -/** Results of network configuration diagnostic on the target resource. */ -export interface NetworkConfigurationDiagnosticResponse { - /** - * List of network configuration diagnostic results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly results?: NetworkConfigurationDiagnosticResult[]; -} - -/** Network configuration diagnostic result corresponded to provided traffic query. */ -export interface NetworkConfigurationDiagnosticResult { - /** Network configuration diagnostic profile. */ - profile?: NetworkConfigurationDiagnosticProfile; - /** Network security group result. */ - networkSecurityGroupResult?: NetworkSecurityGroupResult; -} - -/** Network configuration diagnostic result corresponded provided traffic query. */ -export interface NetworkSecurityGroupResult { - /** The network traffic is allowed or denied. */ - securityRuleAccessResult?: SecurityRuleAccess; - /** - * List of results network security groups diagnostic. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly evaluatedNetworkSecurityGroups?: EvaluatedNetworkSecurityGroup[]; -} - -/** Results of network security group evaluation. */ -export interface EvaluatedNetworkSecurityGroup { - /** Network security group ID. */ - networkSecurityGroupId?: string; - /** Resource ID of nic or subnet to which network security group is applied. */ - appliedTo?: string; - /** Matched network security rule. */ - matchedRule?: MatchedRule; - /** - * List of network security rules evaluation results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rulesEvaluationResult?: NetworkSecurityRulesEvaluationResult[]; -} - -/** Matched rule. */ -export interface MatchedRule { - /** Name of the matched network security rule. */ - ruleName?: string; - /** The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. */ - action?: string; -} - -/** Network security rules evaluation result. */ -export interface NetworkSecurityRulesEvaluationResult { - /** Name of the network security rule. */ - name?: string; - /** Value indicating whether protocol is matched. */ - protocolMatched?: boolean; - /** Value indicating whether source is matched. */ - sourceMatched?: boolean; - /** Value indicating whether source port is matched. */ - sourcePortMatched?: boolean; - /** Value indicating whether destination is matched. */ - destinationMatched?: boolean; - /** Value indicating whether destination port is matched. */ - destinationPortMatched?: boolean; -} - -/** Parameters that define the operation to create a connection monitor. */ -export interface ConnectionMonitor { - /** Connection monitor location. */ - location?: string; - /** Connection monitor tags. */ - tags?: { [propertyName: string]: string }; - /** Describes the source of connection monitor. */ - source?: ConnectionMonitorSource; - /** Describes the destination of connection monitor. */ - destination?: ConnectionMonitorDestination; - /** Determines if the connection monitor will start automatically once created. */ - autoStart?: boolean; - /** Monitoring interval in seconds. */ - monitoringIntervalInSeconds?: number; - /** List of connection monitor endpoints. */ - endpoints?: ConnectionMonitorEndpoint[]; - /** List of connection monitor test configurations. */ - testConfigurations?: ConnectionMonitorTestConfiguration[]; - /** List of connection monitor test groups. */ - testGroups?: ConnectionMonitorTestGroup[]; - /** List of connection monitor outputs. */ - outputs?: ConnectionMonitorOutput[]; - /** Optional notes to be associated with the connection monitor. */ - notes?: string; -} - -/** Parameters that define the operation to create a connection monitor. */ -export interface ConnectionMonitorParameters { - /** Describes the source of connection monitor. */ - source?: ConnectionMonitorSource; - /** Describes the destination of connection monitor. */ - destination?: ConnectionMonitorDestination; - /** Determines if the connection monitor will start automatically once created. */ - autoStart?: boolean; - /** Monitoring interval in seconds. */ - monitoringIntervalInSeconds?: number; - /** List of connection monitor endpoints. */ - endpoints?: ConnectionMonitorEndpoint[]; - /** List of connection monitor test configurations. */ - testConfigurations?: ConnectionMonitorTestConfiguration[]; - /** List of connection monitor test groups. */ - testGroups?: ConnectionMonitorTestGroup[]; - /** List of connection monitor outputs. */ - outputs?: ConnectionMonitorOutput[]; - /** Optional notes to be associated with the connection monitor. */ - notes?: string; -} - -/** Describes the source of connection monitor. */ -export interface ConnectionMonitorSource { - /** The ID of the resource used as the source by connection monitor. */ - resourceId: string; - /** The source port used by connection monitor. */ - port?: number; -} - -/** Describes the destination of connection monitor. */ -export interface ConnectionMonitorDestination { - /** The ID of the resource used as the destination by connection monitor. */ - resourceId?: string; - /** Address of the connection monitor destination (IP or domain name). */ - address?: string; - /** The destination port used by connection monitor. */ - port?: number; -} - -/** Describes the connection monitor endpoint. */ -export interface ConnectionMonitorEndpoint { - /** The name of the connection monitor endpoint. */ - name: string; - /** The endpoint type. */ - type?: EndpointType; - /** Resource ID of the connection monitor endpoint are supported for AzureVM, AzureVMSS, AzureVNet, AzureSubnet, MMAWorkspaceMachine, MMAWorkspaceNetwork, AzureArcVM endpoint type. */ - resourceId?: string; - /** Address of the connection monitor endpoint. Supported for AzureVM, ExternalAddress, ArcMachine, MMAWorkspaceMachine endpoint type. */ - address?: string; - /** Filter field is getting deprecated and should not be used. Instead use Include/Exclude scope fields for it. */ - filter?: ConnectionMonitorEndpointFilter; - /** Endpoint scope defines which target resource to monitor in case of compound resource endpoints like VMSS, AzureSubnet, AzureVNet, MMAWorkspaceNetwork, AzureArcNetwork. */ - scope?: ConnectionMonitorEndpointScope; - /** Test coverage for the endpoint. */ - coverageLevel?: CoverageLevel; - /** Location details is optional and only being used for 'AzureArcNetwork' type endpoints, which contains region details. */ - locationDetails?: ConnectionMonitorEndpointLocationDetails; - /** Subscription ID for connection monitor endpoint. It's an optional parameter which is being used for 'AzureArcNetwork' type endpoint. */ - subscriptionId?: string; -} - -/** Describes the connection monitor endpoint filter. */ -export interface ConnectionMonitorEndpointFilter { - /** The behavior of the endpoint filter. Currently only 'Include' is supported. */ - type?: ConnectionMonitorEndpointFilterType; - /** List of items in the filter. */ - items?: ConnectionMonitorEndpointFilterItem[]; -} - -/** Describes the connection monitor endpoint filter item. */ -export interface ConnectionMonitorEndpointFilterItem { - /** The type of item included in the filter. Currently only 'AgentAddress' is supported. */ - type?: ConnectionMonitorEndpointFilterItemType; - /** The address of the filter item. */ - address?: string; -} - -/** Describes the connection monitor endpoint scope. */ -export interface ConnectionMonitorEndpointScope { - /** List of items which needs to be included to the endpoint scope. */ - include?: ConnectionMonitorEndpointScopeItem[]; - /** List of items which needs to be excluded from the endpoint scope. */ - exclude?: ConnectionMonitorEndpointScopeItem[]; -} - -/** Describes the connection monitor endpoint scope item. */ -export interface ConnectionMonitorEndpointScopeItem { - /** The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or IPv4/IPv6 IP address. */ - address?: string; -} - -/** Connection monitor endpoint location details only being used for 'AzureArcNetwork' type endpoints, which contains the region details. */ -export interface ConnectionMonitorEndpointLocationDetails { - /** Region for connection monitor endpoint. */ - region?: string; -} - -/** Describes a connection monitor test configuration. */ -export interface ConnectionMonitorTestConfiguration { - /** The name of the connection monitor test configuration. */ - name: string; - /** The frequency of test evaluation, in seconds. */ - testFrequencySec?: number; - /** The protocol to use in test evaluation. */ - protocol: ConnectionMonitorTestConfigurationProtocol; - /** The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters. */ - preferredIPVersion?: PreferredIPVersion; - /** The parameters used to perform test evaluation over HTTP. */ - httpConfiguration?: ConnectionMonitorHttpConfiguration; - /** The parameters used to perform test evaluation over TCP. */ - tcpConfiguration?: ConnectionMonitorTcpConfiguration; - /** The parameters used to perform test evaluation over ICMP. */ - icmpConfiguration?: ConnectionMonitorIcmpConfiguration; - /** The threshold for declaring a test successful. */ - successThreshold?: ConnectionMonitorSuccessThreshold; -} - -/** Describes the HTTP configuration. */ -export interface ConnectionMonitorHttpConfiguration { - /** The port to connect to. */ - port?: number; - /** The HTTP method to use. */ - method?: HttpConfigurationMethod; - /** The path component of the URI. For instance, "/dir1/dir2". */ - path?: string; - /** The HTTP headers to transmit with the request. */ - requestHeaders?: HttpHeader[]; - /** HTTP status codes to consider successful. For instance, "2xx,301-304,418". */ - validStatusCodeRanges?: string[]; - /** Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit. */ - preferHttps?: boolean; -} - -/** Describes the TCP configuration. */ -export interface ConnectionMonitorTcpConfiguration { - /** The port to connect to. */ - port?: number; - /** Value indicating whether path evaluation with trace route should be disabled. */ - disableTraceRoute?: boolean; - /** Destination port behavior. */ - destinationPortBehavior?: DestinationPortBehavior; -} - -/** Describes the ICMP configuration. */ -export interface ConnectionMonitorIcmpConfiguration { - /** Value indicating whether path evaluation with trace route should be disabled. */ - disableTraceRoute?: boolean; -} - -/** Describes the threshold for declaring a test successful. */ -export interface ConnectionMonitorSuccessThreshold { - /** The maximum percentage of failed checks permitted for a test to evaluate as successful. */ - checksFailedPercent?: number; - /** The maximum round-trip time in milliseconds permitted for a test to evaluate as successful. */ - roundTripTimeMs?: number; -} - -/** Describes the connection monitor test group. */ -export interface ConnectionMonitorTestGroup { - /** The name of the connection monitor test group. */ - name: string; - /** Value indicating whether test group is disabled. */ - disable?: boolean; - /** List of test configuration names. */ - testConfigurations: string[]; - /** List of source endpoint names. */ - sources: string[]; - /** List of destination endpoint names. */ - destinations: string[]; -} - -/** Describes a connection monitor output destination. */ -export interface ConnectionMonitorOutput { - /** Connection monitor output destination type. Currently, only "Workspace" is supported. */ - type?: OutputType; - /** Describes the settings for producing output into a log analytics workspace. */ - workspaceSettings?: ConnectionMonitorWorkspaceSettings; -} - -/** Describes the settings for producing output into a log analytics workspace. */ -export interface ConnectionMonitorWorkspaceSettings { - /** Log analytics workspace resource ID. */ - workspaceResourceId?: string; -} - -/** Information about the connection monitor. */ -export interface ConnectionMonitorResult { - /** - * Name of the connection monitor. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * ID of the connection monitor. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: 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; - /** - * Connection monitor type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Connection monitor location. */ - location?: string; - /** Connection monitor tags. */ - tags?: { [propertyName: string]: string }; - /** Describes the source of connection monitor. */ - source?: ConnectionMonitorSource; - /** Describes the destination of connection monitor. */ - destination?: ConnectionMonitorDestination; - /** Determines if the connection monitor will start automatically once created. */ - autoStart?: boolean; - /** Monitoring interval in seconds. */ - monitoringIntervalInSeconds?: number; - /** List of connection monitor endpoints. */ - endpoints?: ConnectionMonitorEndpoint[]; - /** List of connection monitor test configurations. */ - testConfigurations?: ConnectionMonitorTestConfiguration[]; - /** List of connection monitor test groups. */ - testGroups?: ConnectionMonitorTestGroup[]; - /** List of connection monitor outputs. */ - outputs?: ConnectionMonitorOutput[]; - /** Optional notes to be associated with the connection monitor. */ - notes?: string; - /** - * The provisioning state of the connection monitor. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The date and time when the connection monitor was started. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startTime?: Date; - /** - * The monitoring status of the connection monitor. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monitoringStatus?: string; - /** - * Type of connection monitor. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionMonitorType?: ConnectionMonitorType; -} - -/** List of connection monitors. */ -export interface ConnectionMonitorListResult { - /** Information about connection monitors. */ - value?: ConnectionMonitorResult[]; -} - -/** List of flow logs. */ -export interface FlowLogListResult { - /** Information about flow log resource. */ - value?: FlowLog[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Result of the request to list Network operations. It contains a list of operations and a URL link to get the next set of results. */ -export interface OperationListResult { - /** List of Network operations supported by the Network resource provider. */ - value?: Operation[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Network REST API operation definition. */ -export interface Operation { - /** Operation name: {provider}/{resource}/{operation}. */ - name?: string; - /** Display metadata associated with the operation. */ - display?: OperationDisplay; - /** Origin of the operation. */ - origin?: string; - /** Specification of the service. */ - serviceSpecification?: OperationPropertiesFormatServiceSpecification; -} - -/** Display metadata associated with the operation. */ -export interface OperationDisplay { - /** Service provider: Microsoft Network. */ - provider?: string; - /** Resource on which the operation is performed. */ - resource?: string; - /** Type of the operation: get, read, delete, etc. */ - operation?: string; - /** Description of the operation. */ - description?: string; -} - -/** Specification of the service. */ -export interface OperationPropertiesFormatServiceSpecification { - /** Operation service specification. */ - metricSpecifications?: MetricSpecification[]; - /** Operation log specification. */ - logSpecifications?: LogSpecification[]; -} - -/** Description of metrics specification. */ -export interface MetricSpecification { - /** The name of the metric. */ - name?: string; - /** The display name of the metric. */ - displayName?: string; - /** The description of the metric. */ - displayDescription?: string; - /** Units the metric to be displayed in. */ - unit?: string; - /** The aggregation type. */ - aggregationType?: string; - /** List of availability. */ - availabilities?: Availability[]; - /** Whether regional MDM account enabled. */ - enableRegionalMdmAccount?: boolean; - /** Whether gaps would be filled with zeros. */ - fillGapWithZero?: boolean; - /** Pattern for the filter of the metric. */ - metricFilterPattern?: string; - /** List of dimensions. */ - dimensions?: Dimension[]; - /** Whether the metric is internal. */ - isInternal?: boolean; - /** The source MDM account. */ - sourceMdmAccount?: string; - /** The source MDM namespace. */ - sourceMdmNamespace?: string; - /** The resource Id dimension name override. */ - resourceIdDimensionNameOverride?: string; -} - -/** Availability of the metric. */ -export interface Availability { - /** The time grain of the availability. */ - timeGrain?: string; - /** The retention of the availability. */ - retention?: string; - /** Duration of the availability blob. */ - blobDuration?: string; -} - -/** Dimension of the metric. */ -export interface Dimension { - /** The name of the dimension. */ - name?: string; - /** The display name of the dimension. */ - displayName?: string; - /** The internal name of the dimension. */ - internalName?: string; -} - -/** Description of logging specification. */ -export interface LogSpecification { - /** The name of the specification. */ - name?: string; - /** The display name of the specification. */ - displayName?: string; - /** Duration of the blob. */ - blobDuration?: string; -} - -/** Response for the ListPrivateEndpoints API service call. */ -export interface PrivateEndpointListResult { - /** A list of private endpoint resources in a resource group. */ - value?: PrivateEndpoint[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** An array of available PrivateEndpoint types. */ -export interface AvailablePrivateEndpointTypesResult { - /** An array of available privateEndpoint type. */ - value?: AvailablePrivateEndpointType[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The information of an AvailablePrivateEndpointType. */ -export interface AvailablePrivateEndpointType { - /** The name of the service and resource. */ - name?: string; - /** A unique identifier of the AvailablePrivateEndpoint Type resource. */ - id?: string; - /** Resource type. */ - type?: string; - /** The name of the service and resource. */ - resourceName?: string; - /** Display name of the resource. */ - displayName?: string; -} - -/** PrivateDnsZoneConfig resource. */ -export interface PrivateDnsZoneConfig { - /** Name of the resource that is unique within a resource group. This name can be used to access the resource. */ - name?: string; - /** The resource id of the private dns zone. */ - privateDnsZoneId?: string; - /** - * A collection of information regarding a recordSet, holding information to identify private resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly recordSets?: RecordSet[]; -} - -/** A collective group of information about the record set information. */ -export interface RecordSet { - /** Resource record type. */ - recordType?: string; - /** Recordset name. */ - recordSetName?: string; - /** Fqdn that resolves to private endpoint ip address. */ - fqdn?: string; - /** - * The provisioning state of the recordset. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Recordset time to live. */ - ttl?: number; - /** The private ip address of the private endpoint. */ - ipAddresses?: string[]; -} - -/** Response for the ListPrivateDnsZoneGroups API service call. */ -export interface PrivateDnsZoneGroupListResult { - /** A list of private dns zone group resources in a private endpoint. */ - value?: PrivateDnsZoneGroup[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for the ListPrivateLinkService API service call. */ -export interface PrivateLinkServiceListResult { - /** A list of PrivateLinkService resources in a resource group. */ - value?: PrivateLinkService[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for the ListPrivateEndpointConnection API service call. */ -export interface PrivateEndpointConnectionListResult { - /** A list of PrivateEndpointConnection resources for a specific private link service. */ - value?: PrivateEndpointConnection[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Request body of the CheckPrivateLinkServiceVisibility API service call. */ -export interface CheckPrivateLinkServiceVisibilityRequest { - /** The alias of the private link service. */ - privateLinkServiceAlias?: string; -} - -/** Response for the CheckPrivateLinkServiceVisibility API service call. */ -export interface PrivateLinkServiceVisibility { - /** Private Link Service Visibility (True/False). */ - visible?: boolean; -} - -/** An array of private link service id that can be linked to a private end point with auto approved. */ -export interface AutoApprovedPrivateLinkServicesResult { - /** An array of auto approved private link service. */ - value?: AutoApprovedPrivateLinkService[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The information of an AutoApprovedPrivateLinkService. */ -export interface AutoApprovedPrivateLinkService { - /** The id of the private link service resource. */ - privateLinkService?: string; -} - -/** Response for GetPublicIpAddressDdosProtectionStatusOperation API service call. */ -export interface PublicIpDdosProtectionStatusResult { - /** Public IP ARM resource ID */ - publicIpAddressId?: string; - /** IP Address of the Public IP Resource */ - publicIpAddress?: string; - /** Value indicating whether the IP address is DDoS workload protected or not. */ - isWorkloadProtected?: IsWorkloadProtected; - /** DDoS protection plan Resource Id of a if IP address is protected through a plan. */ - ddosProtectionPlanId?: string; -} - -/** The request for ReserveCloudServicePublicIpAddressOperation. */ -export interface ReserveCloudServicePublicIpAddressRequest { - /** When true, reverts from Static to Dynamic allocation (undo reservation). */ - isRollback: IsRollback; -} - -/** The request for DisassociateCloudServicePublicIpOperation. */ -export interface DisassociateCloudServicePublicIpRequest { - /** ARM ID of the Standalone Public IP to associate. This is of the form : /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName} */ - publicIpArmId: string; -} - -/** SKU of a public IP prefix. */ -export interface PublicIPPrefixSku { - /** Name of a public IP prefix SKU. */ - name?: PublicIPPrefixSkuName; - /** Tier of a public IP prefix SKU. */ - tier?: PublicIPPrefixSkuTier; -} - -/** Reference to a public IP address. */ -export interface ReferencedPublicIpAddress { - /** The PublicIPAddress Reference. */ - id?: string; -} - -/** Response for ListPublicIpPrefixes API service call. */ -export interface PublicIPPrefixListResult { - /** A list of public IP prefixes that exists in a resource group. */ - value?: PublicIPPrefix[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for the ListRouteFilters API service call. */ -export interface RouteFilterListResult { - /** A list of route filters in a resource group. */ - value?: RouteFilter[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for the ListRouteFilterRules API service call. */ -export interface RouteFilterRuleListResult { - /** A list of RouteFilterRules in a resource group. */ - value?: RouteFilterRule[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for the ListRouteTable API service call. */ -export interface RouteTableListResult { - /** A list of route tables in a resource group. */ - value?: RouteTable[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for the ListRoute API service call. */ -export interface RouteListResult { - /** A list of routes in a resource group. */ - value?: Route[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListSecurityPartnerProviders API service call. */ -export interface SecurityPartnerProviderListResult { - /** List of Security Partner Providers in a resource group. */ - value?: SecurityPartnerProvider[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for the ListServiceCommunity API service call. */ -export interface BgpServiceCommunityListResult { - /** A list of service community resources. */ - value?: BgpServiceCommunity[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Contains bgp community information offered in Service Community resources. */ -export interface BGPCommunity { - /** The region which the service support. e.g. For O365, region is Global. */ - serviceSupportedRegion?: string; - /** The name of the bgp community. e.g. Skype. */ - communityName?: string; - /** The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. */ - communityValue?: string; - /** The prefixes that the bgp community contains. */ - communityPrefixes?: string[]; - /** Customer is authorized to use bgp community or not. */ - isAuthorizedToUse?: boolean; - /** The service group of the bgp community contains. */ - serviceGroup?: string; -} - -/** Response for ListServiceEndpointPolicies API service call. */ -export interface ServiceEndpointPolicyListResult { - /** A list of ServiceEndpointPolicy resources. */ - value?: ServiceEndpointPolicy[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for ListServiceEndpointPolicyDefinition API service call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy. */ -export interface ServiceEndpointPolicyDefinitionListResult { - /** The service endpoint policy definition in a service endpoint policy. */ - value?: ServiceEndpointPolicyDefinition[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. */ -export interface AddressSpace { - /** A list of address blocks reserved for this virtual network in CIDR notation. */ - addressPrefixes?: string[]; - /** A list of IPAM Pools allocating IP address prefixes. */ - ipamPoolPrefixAllocations?: IpamPoolPrefixAllocation[]; -} - -/** DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. */ -export interface DhcpOptions { - /** The list of DNS servers IP addresses. */ - dnsServers?: string[]; -} - -/** Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. */ -export interface VirtualNetworkBgpCommunities { - /** The BGP community associated with the virtual network. */ - virtualNetworkCommunity: string; - /** - * The BGP community associated with the region of the virtual network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly regionalCommunity?: string; -} - -/** Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. */ -export interface VirtualNetworkEncryption { - /** Indicates if encryption is enabled on the virtual network. */ - enabled: boolean; - /** If the encrypted VNet allows VM that does not support encryption. This field is for future support, AllowUnencrypted is the only supported value at general availability. */ - enforcement?: VirtualNetworkEncryptionEnforcement; -} - -/** Properties of route target address */ -export interface RouteTargetAddressPropertiesFormat { - /** The reference to the subnet resource. */ - subnet?: Subnet; - /** The private IPv4 or IPv6 address of the service gateway route target address. */ - privateIPAddress?: string; - /** The Private IP allocation method. */ - privateIPAllocationMethod?: IPAllocationMethod; -} - -/** SKU of a service gateway. */ -export interface ServiceGatewaySku { - /** Name of a service gateway SKU. */ - name?: ServiceGatewaySkuName; - /** Tier of a service gateway SKU. */ - tier?: ServiceGatewaySkuTier; -} - -/** Response for ListServiceGateways API service call. */ -export interface ServiceGatewayListResult { - /** A list of service gateway in a resource group. */ - value?: ServiceGateway[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Properties of the service gateway update address locations request. */ -export interface ServiceGatewayUpdateAddressLocationsRequest { - /** - * Specifies the type of update operation to perform on address locations within the service gateway. - * - * - FullUpdate: Replaces all existing address location data with the new list provided in the request. Any previously defined locations not included will be removed. - * - PartialUpdate: Updates only the specified address locations. - */ - action?: UpdateAction; - /** An array of address locations to create or update. */ - addressLocations?: ServiceGatewayAddressLocation[]; -} - -/** Properties of the service gateway address location. */ -export interface ServiceGatewayAddressLocation { - /** Location to update */ - addressLocation?: string; - /** - * Specifies the type of update operation to perform on addresses within the address location of service gateway. - * - * - FullUpdate: Replaces all existing address data with the new list provided in the request. Any previously defined addresses not included will be removed. - * - PartialUpdate: Updates only the specified addresses. - */ - addressUpdateAction?: AddressUpdateAction; - /** An array of addresses to create or update in locations. */ - addresses?: ServiceGatewayAddress[]; -} - -/** Properties of the service gateway address. */ -export interface ServiceGatewayAddress { - /** Address to update */ - address?: string; - /** Collection of services in address. */ - services?: string[]; -} - -/** Properties of the service gateway update services request. */ -export interface ServiceGatewayUpdateServicesRequest { - /** - * Specifies the type of update operation to perform on services within the service gateway. - * - * - FullUpdate: Replaces all existing services with the new list provided in the request. Any previously defined services not included will be removed. - * - PartialUpdate: Updates only the specified services. - */ - action?: ServiceUpdateAction; - /** Collection of service updates. */ - serviceRequests?: ServiceGatewayServiceRequest[]; -} - -/** Properties of the service gateway services request. */ -export interface ServiceGatewayServiceRequest { - /** Set to true to mark the service for deletion. */ - isDelete?: boolean; - /** Service of service gateway. */ - service?: ServiceGatewayService; -} - -/** Properties of the service gateway service. */ -export interface ServiceGatewayService { - /** Name of the service */ - name?: string; - /** Name of the service. */ - serviceType?: ServiceType; - /** Set to true to mark default service for inbound or outbound. */ - isDefault?: boolean; - /** An array of load balancer backend address pools. */ - loadBalancerBackendPools?: BackendAddressPool[]; - /** Azure Resource Id of public natgateway. */ - publicNatGatewayId?: string; -} - -/** Response for get service gateway address locations. */ -export interface GetServiceGatewayAddressLocationsResult { - /** A list of address locations of service gateway. */ - value?: ServiceGatewayAddressLocationResponse[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Properties of the service gateway address location. */ -export interface ServiceGatewayAddressLocationResponse { - /** Location to update */ - addressLocation?: string; - /** An array of addresses to create or update in locations. */ - addresses?: ServiceGatewayAddress[]; -} - -/** Response for get service gateway services. */ -export interface GetServiceGatewayServicesResult { - /** A list of services of service gateway. */ - value?: ServiceGatewayService[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for the ListServiceTags API service call. */ -export interface ServiceTagsListResult { - /** - * The name of the cloud. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The ID of the cloud. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The azure resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The iteration number. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly changeNumber?: string; - /** - * The name of the cloud. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly cloud?: string; - /** - * The list of service tag information resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly values?: ServiceTagInformation[]; - /** - * The URL to get next page of service tag information resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The service tag information. */ -export interface ServiceTagInformation { - /** - * Properties of the service tag information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly properties?: ServiceTagInformationPropertiesFormat; - /** - * The name of service tag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The ID of service tag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The iteration number of service tag object for region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceTagChangeNumber?: string; -} - -/** Properties of the service tag information. */ -export interface ServiceTagInformationPropertiesFormat { - /** - * The iteration number of service tag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly changeNumber?: string; - /** - * The region of service tag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly region?: string; - /** - * The name of system service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemService?: string; - /** - * The list of IP address prefixes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly addressPrefixes?: string[]; - /** - * The state of the service tag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly state?: string; -} - -/** Response for Get ServiceTagInformation API service call. Retrieves the list of service tag information resources. */ -export interface ServiceTagInformationListResult { - /** The list of service tag information resources. */ - value?: ServiceTagInformation[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The list usages operation response. */ -export interface UsagesListResult { - /** The list network resource usages. */ - value?: Usage[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** The network resource usage. */ -export interface Usage { - /** - * Resource identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** An enum describing the unit of measurement. */ - unit: UsageUnit; - /** The current value of the usage. */ - currentValue: number; - /** The limit of usage. */ - limit: number; - /** The name of the type of usage. */ - name: UsageName; -} - -/** The usage names. */ -export interface UsageName { - /** A string describing the resource name. */ - value?: string; - /** A localized string describing the resource name. */ - localizedValue?: string; -} - -/** Response for the ListVirtualNetworks API service call. */ -export interface VirtualNetworkListResult { - /** A list of VirtualNetwork resources in a resource group. */ - value?: VirtualNetwork[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Details of PrepareNetworkPolicies for Subnet. */ -export interface PrepareNetworkPoliciesRequest { - /** The name of the service for which subnet is being prepared for. */ - serviceName?: string; - /** A list of NetworkIntentPolicyConfiguration. */ - networkIntentPolicyConfigurations?: NetworkIntentPolicyConfiguration[]; -} - -/** Details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest. */ -export interface NetworkIntentPolicyConfiguration { - /** The name of the Network Intent Policy for storing in target subscription. */ - networkIntentPolicyName?: string; - /** Source network intent policy. */ - sourceNetworkIntentPolicy?: NetworkIntentPolicy; -} - -/** Details of UnprepareNetworkPolicies for Subnet. */ -export interface UnprepareNetworkPoliciesRequest { - /** The name of the service for which subnet is being unprepared for. */ - serviceName?: string; -} - -/** Response for ResourceNavigationLinks_List operation. */ -export interface ResourceNavigationLinksListResult { - /** The resource navigation links in a subnet. */ - value?: ResourceNavigationLink[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for ServiceAssociationLinks_List operation. */ -export interface ServiceAssociationLinksListResult { - /** The service association links in a subnet. */ - value?: ServiceAssociationLink[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. */ -export interface SubnetListResult { - /** The subnets in a virtual network. */ - value?: Subnet[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. */ -export interface VirtualNetworkPeeringListResult { - /** The peerings in a virtual network. */ - value?: VirtualNetworkPeering[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for CheckIPAddressAvailability API service call. */ -export interface IPAddressAvailabilityResult { - /** Private IP address availability. */ - available?: boolean; - /** Contains other available private IP addresses if the asked for address is taken. */ - availableIPAddresses?: string[]; - /** Private IP address platform reserved. */ - isPlatformReserved?: boolean; -} - -/** Response for the virtual networks GetUsage API service call. */ -export interface VirtualNetworkListUsageResult { - /** - * VirtualNetwork usage stats. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: VirtualNetworkUsage[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Usage details for subnet. */ -export interface VirtualNetworkUsage { - /** - * Indicates number of IPs used from the Subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly currentValue?: number; - /** - * Subnet identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Indicates the size of the subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly limit?: number; - /** - * The name containing common and localized value for usage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: VirtualNetworkUsageName; - /** - * Usage units. Returns 'Count'. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly unit?: string; -} - -/** Usage strings container. */ -export interface VirtualNetworkUsageName { - /** - * Localized subnet size and usage string. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly localizedValue?: string; - /** - * Subnet size and usage string. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: string; -} - -/** Response for GetVirtualNetworkDdosProtectionStatusOperation. */ -export interface VirtualNetworkDdosProtectionStatusResult { - /** The Ddos Protection Status Result for each public ip under a virtual network. */ - value?: PublicIpDdosProtectionStatusResult[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for the ListVirtualNetworkAppliance API service call. */ -export interface VirtualNetworkApplianceListResult { - /** A list of virtual network appliances in a resource group. */ - value?: VirtualNetworkAppliance[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Virtual Network Gateway Autoscale Configuration details */ -export interface VirtualNetworkGatewayAutoScaleConfiguration { - /** The bounds of the autoscale configuration */ - bounds?: VirtualNetworkGatewayAutoScaleBounds; -} - -export interface VirtualNetworkGatewayAutoScaleBounds { - /** Minimum scale Units for Autoscale configuration */ - min?: number; - /** Maximum Scale Units for Autoscale configuration */ - max?: number; -} - -/** Migration status for the Virtual Network Gateway. */ -export interface VirtualNetworkGatewayMigrationStatus { - /** Represent the current state of gateway migration. */ - state?: VirtualNetworkGatewayMigrationState; - /** Represent the current migration phase of gateway. */ - phase?: VirtualNetworkGatewayMigrationPhase; - /** Error if any occurs during migration. */ - errorMessage?: string; -} - -/** VirtualNetworkGatewaySku details. */ -export interface VirtualNetworkGatewaySku { - /** Gateway SKU name. */ - name?: VirtualNetworkGatewaySkuName; - /** Gateway SKU tier. */ - tier?: VirtualNetworkGatewaySkuTier; - /** - * The capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacity?: number; -} - -/** VpnClientConfiguration for P2S client. */ -export interface VpnClientConfiguration { - /** The reference to the address space resource which represents Address space for P2S VpnClient. */ - vpnClientAddressPool?: AddressSpace; - /** VpnClientRootCertificate for virtual network gateway. */ - vpnClientRootCertificates?: VpnClientRootCertificate[]; - /** VpnClientRevokedCertificate for Virtual network gateway. */ - vpnClientRevokedCertificates?: VpnClientRevokedCertificate[]; - /** VpnClientProtocols for Virtual network gateway. */ - vpnClientProtocols?: VpnClientProtocol[]; - /** VPN authentication types for the virtual network gateway.. */ - vpnAuthenticationTypes?: VpnAuthenticationType[]; - /** VpnClientIpsecPolicies for virtual network gateway P2S client. */ - vpnClientIpsecPolicies?: IpsecPolicy[]; - /** The radius server address property of the VirtualNetworkGateway resource for vpn client connection. */ - radiusServerAddress?: string; - /** The radius secret property of the VirtualNetworkGateway resource for vpn client connection. We will no longer return radiusServerSecret in VirtualNetworkGateway Create/Update/Get/List/UpdateTags APIs response. Please use VirtualNetworkGateway ListRadiusSecrets API to fetch radius server secrets. */ - radiusServerSecret?: string; - /** The radiusServers property for multiple radius server configuration. */ - radiusServers?: RadiusServer[]; - /** The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. */ - aadTenant?: string; - /** The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. */ - aadAudience?: string; - /** The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. */ - aadIssuer?: string; - /** per ip address pool connection policy for virtual network gateway P2S client. */ - vngClientConnectionConfigurations?: VngClientConnectionConfiguration[]; -} - -/** An IPSec Policy configuration for a virtual network gateway connection. */ -export interface IpsecPolicy { - /** The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. */ - saLifeTimeSeconds: number; - /** The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. */ - saDataSizeKilobytes: number; - /** The IPSec encryption algorithm (IKE phase 1). */ - ipsecEncryption: IpsecEncryption; - /** The IPSec integrity algorithm (IKE phase 1). */ - ipsecIntegrity: IpsecIntegrity; - /** The IKE encryption algorithm (IKE phase 2). */ - ikeEncryption: IkeEncryption; - /** The IKE integrity algorithm (IKE phase 2). */ - ikeIntegrity: IkeIntegrity; - /** The DH Group used in IKE Phase 1 for initial SA. */ - dhGroup: DhGroup; - /** The Pfs Group used in IKE Phase 2 for new child SA. */ - pfsGroup: PfsGroup; -} - -/** Radius Server Settings. */ -export interface RadiusServer { - /** The address of this radius server. */ - radiusServerAddress: string; - /** The initial score assigned to this radius server. */ - radiusServerScore?: number; - /** The secret used for this radius server. We will no longer return radiusServerSecret in VirtualNetworkGateway Create/Update/Get/List/UpdateTags APIs response. Please use VirtualNetworkGateway ListRadiusSecrets API to fetch radius server secrets. */ - radiusServerSecret?: string; -} - -/** Vpn Client Connection configuration PolicyGroup member */ -export interface VirtualNetworkGatewayPolicyGroupMember { - /** Name of the VirtualNetworkGatewayPolicyGroupMember. */ - name?: string; - /** The Vpn Policy member attribute type. */ - attributeType?: VpnPolicyMemberAttributeType; - /** The value of Attribute used for this VirtualNetworkGatewayPolicyGroupMember. */ - attributeValue?: string; -} - -/** BGP settings details. */ -export interface BgpSettings { - /** The BGP speaker's ASN. */ - asn?: number; - /** The BGP peering address and BGP identifier of this BGP speaker. */ - bgpPeeringAddress?: string; - /** The weight added to routes learned from this BGP speaker. */ - peerWeight?: number; - /** BGP peering address with IP configuration ID for virtual network gateway. */ - bgpPeeringAddresses?: IPConfigurationBgpPeeringAddress[]; -} - -/** Properties of IPConfigurationBgpPeeringAddress. */ -export interface IPConfigurationBgpPeeringAddress { - /** The ID of IP configuration which belongs to gateway. */ - ipconfigurationId?: string; - /** - * The list of default BGP peering addresses which belong to IP configuration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly defaultBgpIpAddresses?: string[]; - /** The list of custom BGP peering addresses which belong to IP configuration. */ - customBgpIpAddresses?: string[]; - /** - * The list of tunnel public IP addresses which belong to IP configuration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tunnelIpAddresses?: string[]; -} - -/** Vpn NatRule mapping. */ -export interface VpnNatRuleMapping { - /** Address space for Vpn NatRule mapping. */ - addressSpace?: string; - /** Port range for Vpn NatRule mapping. */ - portRange?: string; -} - -/** Response for the ListVirtualNetworkGateways API service call. */ -export interface VirtualNetworkGatewayListResult { - /** A list of VirtualNetworkGateway resources that exists in a resource group. */ - value?: VirtualNetworkGateway[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Response for the VirtualNetworkGatewayListConnections API service call. */ -export interface VirtualNetworkGatewayListConnectionsResult { - /** A list of VirtualNetworkGatewayConnection resources that exists in a resource group. */ - value?: VirtualNetworkGatewayConnectionListEntity[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** A reference to VirtualNetworkGateway or LocalNetworkGateway resource. */ -export interface VirtualNetworkConnectionGatewayReference { - /** The ID of VirtualNetworkGateway or LocalNetworkGateway resource. */ - id: string; -} - -/** VirtualNetworkGatewayConnection properties. */ -export interface TunnelConnectionHealth { - /** - * Tunnel name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tunnel?: string; - /** - * Virtual Network Gateway connection status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: VirtualNetworkGatewayConnectionStatus; - /** - * The Ingress Bytes Transferred in this connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ingressBytesTransferred?: number; - /** - * The Egress Bytes Transferred in this connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly egressBytesTransferred?: number; - /** - * The time at which connection was established in Utc format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - 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. */ - localAddressRanges: string[]; - /** A collection of remote address spaces in CIDR format. */ - remoteAddressRanges: string[]; -} - -/** Vpn Client Parameters for package generation. */ -export interface VpnClientParameters { - /** VPN client Processor Architecture. */ - processorArchitecture?: ProcessorArchitecture; - /** VPN client authentication method. */ - authenticationMethod?: AuthenticationMethod; - /** The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. */ - radiusServerAuthCertificate?: string; - /** A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. */ - clientRootCertificates?: string[]; -} - -/** Response for list BGP peer status API service call. */ -export interface BgpPeerStatusListResult { - /** List of BGP peers. */ - value?: BgpPeerStatus[]; -} - -/** BGP peer status details. */ -export interface BgpPeerStatus { - /** - * The virtual network gateway's local address. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly localAddress?: string; - /** - * The remote BGP peer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly neighbor?: string; - /** - * The autonomous system number of the remote BGP peer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly asn?: number; - /** - * The BGP peer state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly state?: BgpPeerState; - /** - * For how long the peering has been up. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectedDuration?: string; - /** - * The number of routes learned from this peer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly routesReceived?: number; - /** - * The number of BGP messages sent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly messagesSent?: number; - /** - * The number of BGP messages received. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly messagesReceived?: number; -} - -/** List of Radius servers with respective radius secrets. */ -export interface RadiusAuthServerListResult { - /** List of Radius servers with respective radius secrets. */ - value?: RadiusAuthServer[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Gateway or VpnServerConfiguration Radius server with radius secret details */ -export interface RadiusAuthServer { - /** Radius server IPAddress */ - radiusServerAddress?: string; - /** Radius server secret */ - radiusServerSecret?: string; -} - -/** List of virtual network gateway routes. */ -export interface GatewayRouteListResult { - /** List of gateway routes. */ - value?: GatewayRoute[]; -} - -/** Gateway routing details. */ -export interface GatewayRoute { - /** - * The gateway's local address. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly localAddress?: string; - /** - * The route's network prefix. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly network?: string; - /** - * The route's next hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextHop?: string; - /** - * The peer this route was learned from. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sourcePeer?: string; - /** - * The source this route was learned from. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: string; - /** - * The route's AS path sequence. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly asPath?: string; - /** - * The route's weight. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly weight?: number; -} - -/** Gateway Resiliency Information */ -export interface GatewayResiliencyInformation { - /** Current Resiliency Score for the gateway */ - overallScore?: string; - /** Update in the Resiliency Score for the gateway from the last computed score */ - scoreChange?: string; - /** Minimum increase expected in the score if the at least one of the recommendations is applied for the gateway */ - minScoreFromRecommendations?: string; - /** Maximum increase expected in the score if all of the recommendations are applied for the gateway */ - maxScoreFromRecommendations?: string; - /** Timestamp denoting the last time when the resiliency score was computed for the gateway */ - lastComputedTime?: Date; - /** Timestamp denoting the next eligible time to re-compute the resiliency score for the gateway */ - nextEligibleComputeTime?: Date; - /** List of Resiliency based Recommendation Components for the gateway */ - components?: ResiliencyRecommendationComponents[]; -} - -/** Gateway Resiliency based Recommendations */ -export interface ResiliencyRecommendationComponents { - /** Name of the Resiliency based Recommendation Component */ - name?: string; - /** Current Score of the gateway */ - currentScore?: string; - /** Max score that the gateway can achieve if the specified recommendation is applied */ - maxScore?: string; - /** List of Gateway Resiliency based Recommendations */ - recommendations?: GatewayResiliencyRecommendation[]; -} - -/** Resiliency Recommendation details */ -export interface GatewayResiliencyRecommendation { - /** Recommendation Title */ - recommendationTitle?: string; - /** Recommendation Id */ - recommendationId?: string; - /** Impact associated with the recommendation */ - severity?: string; - /** Recommendation details */ - recommendationText?: string; - /** Acton items to apply the recommendation */ - callToActionText?: string; - /** Link to the public documentation for the associated recommendation */ - callToActionLink?: string; -} - -/** Gateway Route Sets Information */ -export interface GatewayRouteSetsInformation { - /** Timestamp denoting the last time when the route sets were computed for the gateway */ - lastComputedTime?: Date; - /** Timestamp denoting the next eligible time to re-compute the route sets for the gateway */ - nextEligibleComputeTime?: Date; - /** Version for the route set */ - routeSetVersion?: string; - /** List of Gateway Route Sets */ - routeSets?: GatewayRouteSet[]; - /** Dictionary containing map of the circuit id and circuit details */ - circuitsMetadataMap?: { [propertyName: string]: CircuitMetadataMap }; -} - -export interface GatewayRouteSet { - /** Route Set name */ - name?: string; - /** List of different locations from where the routes are learned */ - locations?: string[]; - /** List of different Route Sources */ - details?: { [propertyName: string]: RouteSourceDetails[] }; -} - -export interface RouteSourceDetails { - /** Express Route Circuit identifier */ - circuit?: string; - /** Flag to indicate if the route learned from the primary device is active or passive */ - pri?: string; - /** Flag to indicate if the route learned from the secondary device is active or passive */ - sec?: string; -} - -export interface CircuitMetadataMap { - /** Express Route Circuit Name */ - name?: string; - /** Link to the Express Route circuit */ - link?: string; - /** Peering location of the Express Route Circuit */ - location?: string; -} - -/** An IPSec parameters for a virtual network gateway P2S connection. */ -export interface VpnClientIPsecParameters { - /** The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. */ - saLifeTimeSeconds: number; - /** The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. */ - saDataSizeKilobytes: number; - /** The IPSec encryption algorithm (IKE phase 1). */ - ipsecEncryption: IpsecEncryption; - /** The IPSec integrity algorithm (IKE phase 1). */ - ipsecIntegrity: IpsecIntegrity; - /** The IKE encryption algorithm (IKE phase 2). */ - ikeEncryption: IkeEncryption; - /** The IKE integrity algorithm (IKE phase 2). */ - ikeIntegrity: IkeIntegrity; - /** The DH Group used in IKE Phase 1 for initial SA. */ - dhGroup: DhGroup; - /** The Pfs Group used in IKE Phase 2 for new child SA. */ - pfsGroup: PfsGroup; -} - -/** Vpn device configuration script generation parameters. */ -export interface VpnDeviceScriptParameters { - /** The vendor for the vpn device. */ - vendor?: string; - /** The device family for the vpn device. */ - deviceFamily?: string; - /** The firmware version for the vpn device. */ - firmwareVersion?: string; -} - -/** Start packet capture parameters on virtual network gateway. */ -export interface VpnPacketCaptureStartParameters { - /** Start Packet capture parameters. */ - filterData?: string; -} - -/** Stop packet capture parameters. */ -export interface VpnPacketCaptureStopParameters { - /** SAS url for packet capture on virtual network gateway. */ - sasUrl?: string; -} - -/** ExpressRoute failover test details */ -export interface ExpressRouteFailoverTestDetails { - /** Peering location of the test */ - peeringLocation?: string; - /** All circuits in the peering location */ - circuits?: ExpressRouteFailoverCircuitResourceDetails[]; - /** The current status of the test */ - status?: FailoverTestStatus; - /** Time when the test was started */ - startTime?: string; - /** Time when the test was completed */ - endTime?: string; - /** All connections to the circuits in the peering location */ - connections?: ExpressRouteFailoverConnectionResourceDetails[]; - /** The unique GUID associated with the test */ - testGuid?: string; - /** The type of failover test */ - testType?: FailoverTestType; - /** A list of all issues with the test */ - issues?: string[]; -} - -export interface ExpressRouteFailoverCircuitResourceDetails { - /** NRP Resource URI of the circuit */ - nrpResourceUri?: string; - /** Circuit Name */ - name?: string; - /** Connection name associated with the circuit */ - connectionName?: string; -} - -export interface ExpressRouteFailoverConnectionResourceDetails { - /** NRP Resource URI of the connection */ - nrpResourceUri?: string; - /** Connection Name */ - name?: string; - /** The current status of the connection */ - status?: FailoverConnectionStatus; - /** Time when the connection was last updated */ - lastUpdatedTime?: string; -} - -/** ExpressRoute failover single test details */ -export interface ExpressRouteFailoverSingleTestDetails { - /** Peering location of the test */ - peeringLocation?: string; - /** The current status of the test */ - status?: FailoverTestStatusForSingleTest; - /** Time when the test was started */ - startTimeUtc?: string; - /** Time when the test was completed */ - endTimeUtc?: string; - /** List of routes received from this peering as well as some other peering location */ - redundantRoutes?: ExpressRouteFailoverRedundantRoute[]; - /** List of al the routes that were received only from this peering location */ - nonRedundantRoutes?: string[]; - /** Whether the failover simulation was successful or not */ - wasSimulationSuccessful?: boolean; - /** List of all the failover connections for this peering location */ - failoverConnectionDetails?: FailoverConnectionDetails[]; -} - -export interface ExpressRouteFailoverRedundantRoute { - /** A list of all the peering locations for the redundant routes */ - peeringLocations?: string[]; - /** A list of all the redundant routes in the peering locations */ - routes?: string[]; -} - -export interface FailoverConnectionDetails { - /** Name of the failover connection */ - failoverConnectionName?: string; - /** Location of the failover connection */ - failoverLocation?: string; - /** Whether the customer was able to establish connectivity through this failover connection or not */ - isVerified?: boolean; -} - -/** Start packet capture parameters on virtual network gateway. */ -export interface ExpressRouteFailoverStopApiParameters { - /** Peering location of the test */ - peeringLocation?: string; - /** Whether the failover simulation was successful or not */ - wasSimulationSuccessful?: boolean; - /** List of all the failover connections for this peering location */ - details?: FailoverConnectionDetails[]; -} - -export interface VirtualNetworkGatewayConnectionTunnelProperties { - /** Tunnel remote IP address */ - tunnelIpAddress?: string; - /** Tunnel BGP peering address */ - bgpPeeringAddress?: string; -} - -/** Certificate Authentication information for a certificate based authentication connection. */ -export interface CertificateAuthentication { - /** Keyvault secret ID for outbound authentication certificate. */ - outboundAuthCertificate?: string; - /** Inbound authentication certificate subject name. */ - inboundAuthCertificateSubjectName?: string; - /** Inbound authentication certificate public keys. */ - inboundAuthCertificateChain?: string[]; -} - -/** Response for the ListVirtualNetworkGatewayConnections API service call. */ -export interface VirtualNetworkGatewayConnectionListResult { - /** A list of VirtualNetworkGatewayConnection resources that exists in a resource group. */ - value?: VirtualNetworkGatewayConnection[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The virtual network connection reset shared key. */ -export interface ConnectionResetSharedKey { - /** The virtual network connection reset shared key length, should between 1 and 128. */ - keyLength: number; -} - -/** Response for ListLocalNetworkGateways API service call. */ -export interface LocalNetworkGatewayListResult { - /** A list of local network gateways that exists in a resource group. */ - value?: LocalNetworkGateway[]; - /** - * The URL to get the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** List of virtual network gateway vpn client connection health. */ -export interface VpnClientConnectionHealthDetailListResult { - /** List of vpn client connection health. */ - value?: VpnClientConnectionHealthDetail[]; -} - -/** VPN client connection health detail. */ -export interface VpnClientConnectionHealthDetail { - /** - * The vpn client Id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vpnConnectionId?: string; - /** - * The duration time of a connected vpn client. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vpnConnectionDuration?: number; - /** - * The start time of a connected vpn client. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vpnConnectionTime?: string; - /** - * The public Ip of a connected vpn client. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIpAddress?: string; - /** - * The assigned private Ip of a connected vpn client. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIpAddress?: string; - /** - * The user name of a connected vpn client. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vpnUserName?: string; - /** - * The max band width. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maxBandwidth?: number; - /** - * The egress packets per second. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly egressPacketsTransferred?: number; - /** - * The egress bytes per second. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly egressBytesTransferred?: number; - /** - * The ingress packets per second. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ingressPacketsTransferred?: number; - /** - * The ingress bytes per second. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ingressBytesTransferred?: number; - /** - * The max packets transferred per second. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maxPacketsPerSecond?: number; -} - -/** List of p2s vpn connections to be disconnected. */ -export interface P2SVpnConnectionRequest { - /** List of p2s vpn connection Ids. */ - vpnConnectionIds?: string[]; -} - -/** Result of the request to list all nat rules to a virtual network gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. */ -export interface ListVirtualNetworkGatewayNatRulesResult { - /** List of Nat Rules. */ - value?: VirtualNetworkGatewayNatRule[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Virtual network gateway migration parameters. */ -export interface VirtualNetworkGatewayMigrationParameters { - /** MigrationType for the virtual network gateway. */ - migrationType: VirtualNetworkGatewayMigrationType; - /** Resource url that needs to be passed in to migration. */ - resourceUrl?: string; -} - -/** Response for ListVirtualNetworkTap API service call. */ -export interface VirtualNetworkTapListResult { - /** A list of VirtualNetworkTaps in a resource group. */ - value?: VirtualNetworkTap[]; - /** The URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListVirtualRouters API service call. */ -export interface VirtualRouterListResult { - /** List of Virtual Routers. */ - value?: VirtualRouter[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Response for ListVirtualRouterPeerings API service call. */ -export interface VirtualRouterPeeringListResult { - /** List of VirtualRouterPeerings in a VirtualRouter. */ - value?: VirtualRouterPeering[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink to get the next set of results. */ -export interface ListVirtualWANsResult { - /** List of VirtualWANs. */ - value?: VirtualWAN[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** List of properties of the device. */ -export interface DeviceProperties { - /** Name of the device Vendor. */ - deviceVendor?: string; - /** Model of the device. */ - deviceModel?: string; - /** Link speed. */ - linkSpeedInMbps?: number; -} - -/** List of properties of a link provider. */ -export interface VpnLinkProviderProperties { - /** Name of the link provider. */ - linkProviderName?: string; - /** Link speed. */ - linkSpeedInMbps?: number; -} - -/** BGP settings details for a link. */ -export interface VpnLinkBgpSettings { - /** The BGP speaker's ASN. */ - asn?: number; - /** The BGP peering address and BGP identifier of this BGP speaker. */ - bgpPeeringAddress?: string; -} - -/** The Office365 breakout policy. */ -export interface O365PolicyProperties { - /** Office365 breakout categories. */ - breakOutCategories?: O365BreakOutCategoryPolicies; -} - -/** Office365 breakout categories. */ -export interface O365BreakOutCategoryPolicies { - /** Flag to control allow category. */ - allow?: boolean; - /** Flag to control optimize category. */ - optimize?: boolean; - /** Flag to control default category. */ - default?: boolean; -} - -/** Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the next set of results. */ -export interface ListVpnSitesResult { - /** List of VpnSites. */ - value?: VpnSite[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks and a URL nextLink to get the next set of results. */ -export interface ListVpnSiteLinksResult { - /** List of VpnSitesLinks. */ - value?: VpnSiteLink[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** List of Vpn-Sites. */ -export interface GetVpnSitesConfigurationRequest { - /** List of resource-ids of the vpn-sites for which config is to be downloaded. */ - vpnSites?: string[]; - /** The sas-url to download the configurations for vpn-sites. */ - outputBlobSasUrl: string; -} - -/** Collection of SecurityProviders. */ -export interface VirtualWanSecurityProviders { - /** List of VirtualWAN security providers. */ - supportedProviders?: VirtualWanSecurityProvider[]; -} - -/** Collection of SecurityProviders. */ -export interface VirtualWanSecurityProvider { - /** Name of the security provider. */ - name?: string; - /** Url of the security provider. */ - url?: string; - /** - * Name of the security provider. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: VirtualWanSecurityProviderType; -} - -/** Properties of VPN client root certificate of VpnServerConfiguration. */ -export interface VpnServerConfigVpnClientRootCertificate { - /** The certificate name. */ - name?: string; - /** The certificate public data. */ - publicCertData?: string; -} - -/** Properties of the revoked VPN client certificate of VpnServerConfiguration. */ -export interface VpnServerConfigVpnClientRevokedCertificate { - /** The certificate name. */ - name?: string; - /** The revoked VPN client certificate thumbprint. */ - thumbprint?: string; -} - -/** Properties of Radius Server root certificate of VpnServerConfiguration. */ -export interface VpnServerConfigRadiusServerRootCertificate { - /** The certificate name. */ - name?: string; - /** The certificate public data. */ - publicCertData?: string; -} - -/** Properties of the Radius client root certificate of VpnServerConfiguration. */ -export interface VpnServerConfigRadiusClientRootCertificate { - /** The certificate name. */ - name?: string; - /** The Radius client root certificate thumbprint. */ - thumbprint?: string; -} - -/** AAD Vpn authentication type related parameters. */ -export interface AadAuthenticationParameters { - /** AAD Vpn authentication parameter AAD tenant. */ - aadTenant?: string; - /** AAD Vpn authentication parameter AAD audience. */ - aadAudience?: string; - /** AAD Vpn authentication parameter AAD issuer. */ - aadIssuer?: string; -} - -/** Routing Configuration indicating the associated and propagated route tables for this connection. */ -export interface RoutingConfiguration { - /** The resource id RouteTable associated with this RoutingConfiguration. */ - associatedRouteTable?: SubResource; - /** The list of RouteTables to advertise the routes to. */ - propagatedRouteTables?: PropagatedRouteTable; - /** List of routes that control routing from VirtualHub into a virtual network connection. */ - vnetRoutes?: VnetRoute; - /** The resource id of the RouteMap associated with this RoutingConfiguration for inbound learned routes. */ - inboundRouteMap?: SubResource; - /** The resource id of theRouteMap associated with this RoutingConfiguration for outbound advertised routes. */ - outboundRouteMap?: SubResource; -} - -/** The list of RouteTables to advertise the routes to. */ -export interface PropagatedRouteTable { - /** The list of labels. */ - labels?: string[]; - /** The list of resource ids of all the RouteTables. */ - ids?: SubResource[]; -} - -/** List of routes that control routing from VirtualHub into a virtual network connection. */ -export interface VnetRoute { - /** Configuration for static routes on this HubVnetConnection. */ - staticRoutesConfig?: StaticRoutesConfig; - /** List of all Static Routes. */ - staticRoutes?: StaticRoute[]; - /** - * The list of references to HubBgpConnection objects. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly bgpConnections?: SubResource[]; -} - -/** Configuration for static routes on this HubVnetConnectionConfiguration for static routes on this HubVnetConnection. */ -export interface StaticRoutesConfig { - /** - * Boolean indicating whether static routes on this connection are automatically propagate to route tables which this connection propagates to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly propagateStaticRoutes?: boolean; - /** Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke. */ - vnetLocalRouteOverrideCriteria?: VnetLocalRouteOverrideCriteria; -} - -/** List of all Static Routes. */ -export interface StaticRoute { - /** The name of the StaticRoute that is unique within a VnetRoute. */ - name?: string; - /** List of all address prefixes. */ - addressPrefixes?: string[]; - /** The ip address of the next hop. */ - 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 { - /** - * Total of the Ingress Bytes Transferred in this P2S Vpn connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly totalIngressBytesTransferred?: number; - /** - * Total of the Egress Bytes Transferred in this connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly totalEgressBytesTransferred?: number; - /** The total of p2s vpn clients connected at this time to this P2SVpnGateway. */ - vpnClientConnectionsCount?: number; - /** List of allocated ip addresses to the connected p2s vpn clients. */ - allocatedIpAddresses?: string[]; -} - -/** Result of the request to list all VpnServerConfigurations. It contains a list of VpnServerConfigurations and a URL nextLink to get the next set of results. */ -export interface ListVpnServerConfigurationsResult { - /** List of VpnServerConfigurations. */ - value?: VpnServerConfiguration[]; - /** URL to get the next set of operation list results if there are any. */ - 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. */ - routes?: VirtualHubRoute[]; -} - -/** VirtualHub route. */ -export interface VirtualHubRoute { - /** List of all addressPrefixes. */ - addressPrefixes?: string[]; - /** NextHop ip address. */ - nextHopIpAddress?: string; -} - -/** VirtualHubRouteTableV2 route. */ -export interface VirtualHubRouteV2 { - /** The type of destinations. */ - destinationType?: string; - /** List of all destinations. */ - destinations?: string[]; - /** The type of next hops. */ - nextHopType?: string; - /** NextHops ip address. */ - nextHops?: string[]; -} - -/** The VirtualHub Router autoscale configuration. */ -export interface VirtualRouterAutoScaleConfiguration { - /** The minimum number of scale units for VirtualHub Router. */ - minCapacity?: number; -} - -/** Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of results. */ -export interface ListVirtualHubsResult { - /** List of VirtualHubs. */ - value?: VirtualHub[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** A RouteMap Rule. */ -export interface RouteMapRule { - /** The unique name for the rule. */ - name?: string; - /** List of matching criterion which will be applied to traffic. */ - matchCriteria?: Criterion[]; - /** List of actions which will be applied on a match. */ - actions?: Action[]; - /** Next step after rule is evaluated. Current supported behaviors are 'Continue'(to next rule) and 'Terminate'. */ - nextStepIfMatched?: NextStep; -} - -/** A matching criteria which matches routes based on route prefix, community, and AS path. */ -export interface Criterion { - /** List of route prefixes which this criteria matches. */ - routePrefix?: string[]; - /** List of BGP communities which this criteria matches. */ - community?: string[]; - /** List of AS paths which this criteria matches. */ - asPath?: string[]; - /** Match condition to apply RouteMap rules. */ - matchCondition?: RouteMapMatchCondition; -} - -/** Action to be taken on a route matching a RouteMap criterion. */ -export interface Action { - /** Type of action to be taken. Supported types are 'Remove', 'Add', 'Replace', and 'Drop.' */ - type?: RouteMapActionType; - /** List of parameters relevant to the action.For instance if type is drop then parameters has list of prefixes to be dropped.If type is add, parameters would have list of ASN numbers to be added */ - parameters?: Parameter[]; -} - -/** Parameters for an Action. */ -export interface Parameter { - /** List of route prefixes. */ - routePrefix?: string[]; - /** List of BGP communities. */ - community?: string[]; - /** List of AS paths. */ - asPath?: string[]; -} - -/** List of RouteMaps and a URL nextLink to get the next set of results. */ -export interface ListRouteMapsResult { - /** List of RouteMaps. */ - value?: RouteMap[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** List of HubVirtualNetworkConnections and a URL nextLink to get the next set of results. */ -export interface ListHubVirtualNetworkConnectionsResult { - /** List of HubVirtualNetworkConnections. */ - value?: HubVirtualNetworkConnection[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** IP Configuration of a VPN Gateway Resource. */ -export interface VpnGatewayIpConfiguration { - /** The identifier of the IP configuration for a VPN Gateway. */ - id?: string; - /** The public IP address of this IP configuration. */ - publicIpAddress?: string; - /** The private IP address of this IP configuration. */ - privateIpAddress?: string; -} - -/** Start packet capture parameters. */ -export interface VpnGatewayPacketCaptureStartParameters { - /** Start Packet capture parameters on vpn gateway. */ - filterData?: string; -} - -/** Stop packet capture parameters. */ -export interface VpnGatewayPacketCaptureStopParameters { - /** SAS url for packet capture on vpn gateway. */ - sasUrl?: string; -} - -/** The list of shared keys for the vpn link connection. It should only contain one shared key for each vpn link connection. */ -export interface ConnectionSharedKeyResultList { - /** List of SharedKeys. */ - value?: ConnectionSharedKeyResult[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Parameters for SharedKey. */ -export interface SharedKeyProperties { - /** The value of the shared key for the vpn link connection. */ - sharedKey?: string; - /** The length of the shared key for the vpn link connection. */ - sharedKeyLength?: number; - /** - * The provisioning state of the SharedKey resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink to get the next set of results. */ -export interface ListVpnGatewaysResult { - /** List of VpnGateways. */ - value?: VpnGateway[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Vpn Connection packet capture parameters supplied to start packet capture on gateway connection. */ -export interface VpnConnectionPacketCaptureStartParameters { - /** Start Packet capture parameters on vpn connection. */ - filterData?: string; - /** List of site link connection names. */ - linkConnectionNames?: string[]; -} - -/** Vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. */ -export interface VpnConnectionPacketCaptureStopParameters { - /** SAS url for packet capture on vpn connection. */ - sasUrl?: string; - /** List of site link connection names. */ - linkConnectionNames?: string[]; -} - -/** Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. */ -export interface ListVpnConnectionsResult { - /** List of Vpn Connections. */ - value?: VpnConnection[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. */ -export interface ListVpnSiteLinkConnectionsResult { - /** List of VpnSiteLinkConnections. */ - value?: VpnSiteLinkConnection[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Result of the request to list all nat rules to a virtual wan vpn gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. */ -export interface ListVpnGatewayNatRulesResult { - /** List of Nat Rules. */ - value?: VpnGatewayNatRule[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL nextLink to get the next set of results. */ -export interface ListP2SVpnGatewaysResult { - /** List of P2SVpnGateways. */ - value?: P2SVpnGateway[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Vpn Client Parameters for package generation. */ -export interface P2SVpnProfileParameters { - /** VPN client authentication method. */ - authenticationMethod?: AuthenticationMethod; -} - -/** Vpn Profile Response for package generation. */ -export interface VpnProfileResponse { - /** URL to the VPN profile. */ - profileUrl?: string; -} - -/** List of P2S Vpn connection health request. */ -export interface P2SVpnConnectionHealthRequest { - /** The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for. */ - vpnUserNamesFilter?: string[]; - /** The sas-url to download the P2S Vpn connection health detail. */ - outputBlobSasUrl?: string; -} - -/** P2S Vpn connection detailed health written to sas url. */ -export interface P2SVpnConnectionHealth { - /** Returned sas url of the blob to which the p2s vpn connection detailed health will be written. */ - sasUrl?: string; -} - -/** VpnServerConfigurations list associated with VirtualWan Response. */ -export interface VpnServerConfigurationsResponse { - /** List of VpnServerConfigurations associated with VirtualWan. */ - vpnServerConfigurationResourceIds?: string[]; -} - -/** Virtual Wan Vpn profile parameters Vpn profile generation. */ -export interface VirtualWanVpnProfileParameters { - /** VpnServerConfiguration partial resource uri with which VirtualWan is associated to. */ - vpnServerConfigurationResourceId?: string; - /** VPN client authentication method. */ - authenticationMethod?: AuthenticationMethod; -} - -/** List of VirtualHubRouteTableV2s and a URL nextLink to get the next set of results. */ -export interface ListVirtualHubRouteTableV2SResult { - /** List of VirtualHubRouteTableV2s. */ - value?: VirtualHubRouteTableV2[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** List of ExpressRoute gateways. */ -export interface ExpressRouteGatewayList { - /** List of ExpressRoute gateways. */ - value?: ExpressRouteGateway[]; -} - -/** Configuration for auto scaling. */ -export interface ExpressRouteGatewayPropertiesAutoScaleConfiguration { - /** Minimum and maximum number of scale units to deploy. */ - bounds?: ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds; -} - -/** Minimum and maximum number of scale units to deploy. */ -export interface ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds { - /** Minimum number of scale units deployed for ExpressRoute gateway. */ - min?: number; - /** Maximum number of scale units deployed for ExpressRoute gateway. */ - max?: number; -} - -/** ExpressRoute circuit peering identifier. */ -export interface ExpressRouteCircuitPeeringId { - /** The ID of the ExpressRoute circuit peering. */ - id?: string; -} - -/** Virtual Hub identifier. */ -export interface VirtualHubId { - /** The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same subscription. */ - id?: string; -} - -/** ExpressRouteConnection list. */ -export interface ExpressRouteConnectionList { - /** The list of ExpressRoute connections. */ - value?: ExpressRouteConnection[]; -} - -/** NetworkVirtualApplianceConnection list. */ -export interface NetworkVirtualApplianceConnectionList { - /** The list of NetworkVirtualAppliance connections. */ - value?: NetworkVirtualApplianceConnection[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** VirtualHubBgpConnections list. */ -export interface ListVirtualHubBgpConnectionResults { - /** The list of VirtualHubBgpConnections. */ - value?: BgpConnection[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** Peer routing details. */ -export interface PeerRoute { - /** - * The peer's local address. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly localAddress?: string; - /** - * The route's network prefix. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly network?: string; - /** - * The route's next hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextHop?: string; - /** - * The peer this route was learned from. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sourcePeer?: string; - /** - * The source this route was learned from. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: string; - /** - * The route's AS path sequence. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly asPath?: string; - /** - * The route's weight. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly weight?: number; -} - -/** VirtualHubIpConfigurations list. */ -export interface ListVirtualHubIpConfigurationResults { - /** The list of VirtualHubIpConfigurations. */ - value?: HubIpConfiguration[]; - /** URL to get the next set of results. */ - nextLink?: string; -} - -/** RouteTable route. */ -export interface HubRoute { - /** The name of the Route that is unique within a RouteTable. This name can be used to access this route. */ - name: string; - /** The type of destinations (eg: CIDR, ResourceId, Service). */ - destinationType: string; - /** List of all destinations. */ - destinations: string[]; - /** The type of next hop (eg: ResourceId). */ - nextHopType: string; - /** NextHop resource ID. */ - nextHop: string; -} - -/** List of RouteTables and a URL nextLink to get the next set of results. */ -export interface ListHubRouteTablesResult { - /** List of RouteTables. */ - value?: HubRouteTable[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** The parameters specifying the resource whose effective routes are being requested. */ -export interface EffectiveRoutesParameters { - /** The resource whose effective routes are being requested. */ - resourceId?: string; - /** The type of the specified resource like RouteTable, ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection. */ - virtualWanResourceType?: string; -} - -/** EffectiveRoutes List. */ -export interface VirtualHubEffectiveRouteList { - /** The list of effective routes configured on the virtual hub or the specified resource. */ - value?: VirtualHubEffectiveRoute[]; -} - -/** The effective route configured on the virtual hub or specified resource. */ -export interface VirtualHubEffectiveRoute { - /** The list of address prefixes. */ - addressPrefixes?: string[]; - /** The list of next hops. */ - nextHops?: string[]; - /** The type of the next hop. */ - nextHopType?: string; - /** The ASPath of this route. */ - asPath?: string; - /** The origin of this route. */ - routeOrigin?: string; -} - -/** The parameters specifying the connection resource whose inbound routes are being requested. */ -export interface GetInboundRoutesParameters { - /** The connection resource whose inbound routes are being requested. */ - resourceUri?: string; - /** The type of the specified connection resource like ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection. */ - connectionType?: string; -} - -/** EffectiveRouteMapRoute List. */ -export interface EffectiveRouteMapRouteList { - /** The list of Effective RouteMap Routes configured on the connection resource. */ - value?: EffectiveRouteMapRoute[]; -} - -/** The effective RouteMap route configured on the connection resource. */ -export interface EffectiveRouteMapRoute { - /** The address prefix of the route. */ - prefix?: string; - /** BGP communities of the route. */ - bgpCommunities?: string; - /** The ASPath of this route. */ - asPath?: string; -} - -/** The parameters specifying the connection resource whose outbound routes are being requested. */ -export interface GetOutboundRoutesParameters { - /** The connection resource whose outbound routes are being requested. */ - resourceUri?: string; - /** The type of the specified connection resource like ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection. */ - connectionType?: string; -} - -/** The routing policy object used in a RoutingIntent resource. */ -export interface RoutingPolicy { - /** The unique name for the routing policy. */ - name: string; - /** List of all destinations which this routing policy is applicable to (for example: Internet, PrivateTraffic). */ - destinations: string[]; - /** The next hop resource id on which this routing policy is applicable to. */ - nextHop: string; -} - -/** List of the routing intent result and a URL nextLink to get the next set of results. */ -export interface ListRoutingIntentResult { - /** List of RoutingIntent resource. */ - value?: RoutingIntent[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Result of the request to list WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. */ -export interface WebApplicationFirewallPolicyListResult { - /** - * List of WebApplicationFirewallPolicies within a resource group. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: WebApplicationFirewallPolicy[]; - /** - * URL to get the next set of WebApplicationFirewallPolicy objects if there are any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Defines contents of a web application firewall global configuration. */ -export interface PolicySettings { - /** The state of the policy. */ - state?: WebApplicationFirewallEnabledState; - /** The mode of the policy. */ - mode?: WebApplicationFirewallMode; - /** Whether to allow WAF to check request Body. */ - requestBodyCheck?: boolean; - /** Max inspection limit in KB for request body inspection for WAF. */ - requestBodyInspectLimitInKB?: number; - /** Whether allow WAF to enforce request body limits. */ - requestBodyEnforcement?: boolean; - /** Maximum request body size in Kb for WAF. */ - maxRequestBodySizeInKb?: number; - /** Whether allow WAF to enforce file upload limits. */ - fileUploadEnforcement?: boolean; - /** Maximum file upload size in Mb for WAF. */ - fileUploadLimitInMb?: number; - /** If the action type is block, customer can override the response status code. */ - customBlockResponseStatusCode?: number; - /** If the action type is block, customer can override the response body. The body must be specified in base64 encoding. */ - customBlockResponseBody?: string; - /** To scrub sensitive log fields */ - logScrubbing?: PolicySettingsLogScrubbing; - /** Web Application Firewall JavaScript Challenge Cookie Expiration time in minutes. */ - jsChallengeCookieExpirationInMins?: number; - /** Web Application Firewall CAPTCHA Cookie Expiration time in minutes. */ - captchaCookieExpirationInMins?: number; -} - -/** To scrub sensitive log fields */ -export interface PolicySettingsLogScrubbing { - /** State of the log scrubbing config. Default value is Enabled. */ - state?: WebApplicationFirewallScrubbingState; - /** The rules that are applied to the logs for scrubbing. */ - scrubbingRules?: WebApplicationFirewallScrubbingRules[]; -} - -/** Allow certain variables to be scrubbed on WAF logs */ -export interface WebApplicationFirewallScrubbingRules { - /** The variable to be scrubbed from the logs. */ - matchVariable: ScrubbingRuleEntryMatchVariable; - /** When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. */ - selectorMatchOperator: ScrubbingRuleEntryMatchOperator; - /** When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to. */ - selector?: string; - /** Defines the state of log scrubbing rule. Default value is Enabled. */ - state?: ScrubbingRuleEntryState; -} - -/** Defines contents of a web application rule. */ -export interface WebApplicationFirewallCustomRule { - /** The name of the resource that is unique within a policy. 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; - /** Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. */ - priority: number; - /** Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. */ - state?: WebApplicationFirewallState; - /** Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule. */ - rateLimitDuration?: ApplicationGatewayFirewallRateLimitDuration; - /** Rate Limit threshold to apply in case ruleType is RateLimitRule. Must be greater than or equal to 1 */ - rateLimitThreshold?: number; - /** The rule type. */ - ruleType: WebApplicationFirewallRuleType; - /** List of match conditions. */ - matchConditions: MatchCondition[]; - /** List of user session identifier group by clauses. */ - groupByUserSession?: GroupByUserSession[]; - /** Type of Actions. */ - action: WebApplicationFirewallAction; -} - -/** Define match conditions. */ -export interface MatchCondition { - /** List of match variables. */ - matchVariables: MatchVariable[]; - /** The operator to be matched. */ - operator: WebApplicationFirewallOperator; - /** Whether this is negate condition or not. */ - negationConditon?: boolean; - /** Match value. */ - matchValues: string[]; - /** List of transforms. */ - transforms?: WebApplicationFirewallTransform[]; -} - -/** Define match variables. */ -export interface MatchVariable { - /** Match Variable. */ - variableName: WebApplicationFirewallMatchVariable; - /** The selector of match variable. */ - selector?: string; -} - -/** Define user session identifier group by clauses. */ -export interface GroupByUserSession { - /** List of group by clause variables. */ - groupByVariables: GroupByVariable[]; -} - -/** Define user session group by clause variables. */ -export interface GroupByVariable { - /** User Session clause variable. */ - variableName: ApplicationGatewayFirewallUserSessionVariable; -} - -/** Allow to exclude some variable satisfy the condition for the WAF check. */ -export interface ManagedRulesDefinition { - /** The exceptions that are applied on the policy. */ - exceptions?: ExceptionEntry[]; - /** The Exclusions that are applied on the policy. */ - exclusions?: OwaspCrsExclusionEntry[]; - /** The managed rule sets that are associated with the policy. */ - managedRuleSets: ManagedRuleSet[]; -} - -/** Adds exception to allow a request when the condition is satisfied. */ -export interface ExceptionEntry { - /** The variable on which we evaluate the exception condition */ - matchVariable: ExceptionEntryMatchVariable; - /** Allowed values for the matchVariable */ - values?: string[]; - /** Operates on the allowed values for the matchVariable */ - valueMatchOperator: ExceptionEntryValueMatchOperator; - /** When the matchVariable points to a key-value pair (e.g, RequestHeader), this operates on the selector */ - selectorMatchOperator?: ExceptionEntrySelectorMatchOperator; - /** When the matchVariable points to a key-value pair (e.g, RequestHeader), this identifies the key. */ - selector?: string; - /** The managed rule sets that are associated with the exception. */ - exceptionManagedRuleSets?: ExclusionManagedRuleSet[]; -} - -/** Defines a managed rule set for Exclusions. */ -export interface ExclusionManagedRuleSet { - /** Defines the rule set type to use. */ - ruleSetType: string; - /** Defines the version of the rule set to use. */ - ruleSetVersion: string; - /** Defines the rule groups to apply to the rule set. */ - ruleGroups?: ExclusionManagedRuleGroup[]; -} - -/** Defines a managed rule group to use for exclusion. */ -export interface ExclusionManagedRuleGroup { - /** The managed rule group for exclusion. */ - ruleGroupName: string; - /** List of rules that will be excluded. If none specified, all rules in the group will be excluded. */ - rules?: ExclusionManagedRule[]; -} - -/** Defines a managed rule to use for exclusion. */ -export interface ExclusionManagedRule { - /** Identifier for the managed rule. */ - ruleId: string; -} - -/** Allow to exclude some variable satisfy the condition for the WAF check. */ -export interface OwaspCrsExclusionEntry { - /** The variable to be excluded. */ - matchVariable: OwaspCrsExclusionEntryMatchVariable; - /** When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. */ - selectorMatchOperator: OwaspCrsExclusionEntrySelectorMatchOperator; - /** When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. */ - selector: string; - /** The managed rule sets that are associated with the exclusion. */ - exclusionManagedRuleSets?: ExclusionManagedRuleSet[]; -} - -/** Defines a managed rule set. */ -export interface ManagedRuleSet { - /** Defines the rule set type to use. */ - ruleSetType: string; - /** Defines the version of the rule set to use. */ - ruleSetVersion: string; - /** Defines the rule group overrides to apply to the rule set. */ - ruleGroupOverrides?: ManagedRuleGroupOverride[]; - /** - * Stores the final list of disabled rule groups - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly computedDisabledRules?: ManagedRuleSetRuleGroup[]; -} - -/** Defines a managed rule group override setting. */ -export interface ManagedRuleGroupOverride { - /** The managed rule group to override. */ - ruleGroupName: string; - /** List of rules that will be disabled. If none specified, all rules in the group will be disabled. */ - rules?: ManagedRuleOverride[]; -} - -/** Defines a managed rule group override setting. */ -export interface ManagedRuleOverride { - /** Identifier for the managed rule. */ - ruleId: string; - /** The state of the managed rule. Defaults to Disabled if not specified. */ - state?: ManagedRuleEnabledState; - /** Describes the override action to be applied when rule matches. */ - action?: ActionType; - /** Describes the override sensitivity to be applied when rule matches. */ - sensitivity?: SensitivityType; -} - -/** Defines a managed rule set rule group */ -export interface ManagedRuleSetRuleGroup { - /** Name of the rule group */ - ruleGroupName: string; - /** List of rules within the rule group */ - rules?: string[]; -} - -/** Defines an application gateway for containers reference. */ -export interface ApplicationGatewayForContainersReferenceDefinition { - /** Resource Id of the application gateway for containers. */ - id: string; -} - -/** Properties of the FirewallPolicyNatRuleCollectionAction. */ -export interface FirewallPolicyNatRuleCollectionAction { - /** The type of action. */ - type?: FirewallPolicyNatRuleCollectionActionType; -} - -/** Properties of a rule. */ -export interface FirewallPolicyRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - ruleType: "ApplicationRule" | "NatRule" | "NetworkRule"; - /** Name of the rule. */ - name?: string; - /** Description of the rule. */ - description?: string; -} - -/** Properties of the FirewallPolicyFilterRuleCollectionAction. */ -export interface FirewallPolicyFilterRuleCollectionAction { - /** The type of action. */ - type?: FirewallPolicyFilterRuleCollectionActionType; -} - -/** Properties of the application rule protocol. */ -export interface FirewallPolicyRuleApplicationProtocol { - /** Protocol type. */ - protocolType?: FirewallPolicyRuleApplicationProtocolType; - /** Port number for the protocol, cannot be greater than 64000. */ - port?: number; -} - -/** name and value of HTTP/S header to insert */ -export interface FirewallPolicyHttpHeaderToInsert { - /** Contains the name of the header */ - headerName?: string; - /** Contains the value of the header */ - headerValue?: string; -} - -/** The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. */ -export interface AzureAsyncOperationResult { - /** Status of the Azure async operation. */ - status?: NetworkOperationStatus; - /** Details of the error occurred during specified asynchronous operation. */ - error?: ErrorModel; -} - -/** Proxy resource representation. */ -export interface ProxyResource { - /** - * Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: 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; -} - -/** Connection state snapshot. */ -export interface ConnectionStateSnapshot { - /** The connection state. */ - connectionState?: ConnectionState; - /** The start time of the connection snapshot. */ - startTime?: Date; - /** The end time of the connection snapshot. */ - endTime?: Date; - /** Connectivity analysis evaluation state. */ - evaluationState?: EvaluationState; - /** Average latency in ms. */ - avgLatencyInMs?: number; - /** Minimum latency in ms. */ - minLatencyInMs?: number; - /** Maximum latency in ms. */ - maxLatencyInMs?: number; - /** The number of sent probes. */ - probesSent?: number; - /** The number of failed probes. */ - probesFailed?: number; - /** - * List of hops between the source and the destination. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hops?: ConnectivityHop[]; -} - -/** List of connection states snapshots. */ -export interface ConnectionMonitorQueryResult { - /** Status of connection monitor source. */ - sourceStatus?: ConnectionMonitorSourceStatus; - /** Information about connection states. */ - states?: ConnectionStateSnapshot[]; -} - -/** VpnSite Resource. */ -export interface VpnSiteId { - /** - * The resource-uri of the vpn-site for which config is to be fetched. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vpnSite?: string; -} - -/** IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed. */ -export interface ApplicationGatewayIPConfiguration extends SubResource { - /** Name of the IP configuration 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; - /** Reference to the subnet resource. A subnet from where application gateway gets its private address. */ - subnet?: SubResource; - /** - * The provisioning state of the application gateway IP configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Authentication certificates of an application gateway. */ -export interface ApplicationGatewayAuthenticationCertificate extends SubResource { - /** Name of the authentication certificate 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; - /** Certificate public data. */ - data?: string; - /** - * The provisioning state of the authentication certificate resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Trusted Root certificates of an application gateway. */ -export interface ApplicationGatewayTrustedRootCertificate extends SubResource { - /** Name of the trusted root certificate 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; - /** Certificate public data. */ - data?: string; - /** Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. */ - keyVaultSecretId?: string; - /** - * The provisioning state of the trusted root certificate resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Trusted client certificates of an application gateway. */ -export interface ApplicationGatewayTrustedClientCertificate extends SubResource { - /** Name of the trusted client certificate 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; - /** Certificate public data. */ - data?: string; - /** - * Validated certificate data. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly validatedCertData?: string; - /** - * Distinguished name of client certificate issuer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clientCertIssuerDN?: string; - /** - * The provisioning state of the trusted client certificate resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** SSL certificates of an application gateway. */ -export interface ApplicationGatewaySslCertificate extends SubResource { - /** Name of the SSL certificate 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; - /** Base-64 encoded pfx certificate. Only applicable in PUT Request. */ - data?: string; - /** Password for the pfx file specified in data. Only applicable in PUT request. */ - password?: string; - /** - * Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicCertData?: string; - /** Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. */ - keyVaultSecretId?: string; - /** - * The provisioning state of the SSL certificate resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Frontend IP configuration of an application gateway. */ -export interface ApplicationGatewayFrontendIPConfiguration extends SubResource { - /** Name of the frontend IP configuration 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; - /** PrivateIPAddress of the network interface IP Configuration. */ - privateIPAddress?: string; - /** The private IP address allocation method. */ - privateIPAllocationMethod?: IPAllocationMethod; - /** Reference to the subnet resource. */ - subnet?: SubResource; - /** Reference to the PublicIP resource. */ - publicIPAddress?: SubResource; - /** Reference to the application gateway private link configuration. */ - privateLinkConfiguration?: SubResource; - /** - * The provisioning state of the frontend IP configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Frontend port of an application gateway. */ -export interface ApplicationGatewayFrontendPort extends SubResource { - /** Name of the frontend port 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 port. */ - port?: number; - /** - * The provisioning state of the frontend port resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Probe of the application gateway. */ -export interface ApplicationGatewayProbe extends SubResource { - /** Name of the probe 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 protocol used for the probe. */ - protocol?: ApplicationGatewayProtocol; - /** Host name to send the probe to. */ - host?: string; - /** Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. */ - path?: string; - /** The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. */ - interval?: number; - /** The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. */ - timeout?: number; - /** The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. */ - 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. */ - match?: ApplicationGatewayProbeHealthResponseMatch; - /** Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false. */ - enableProbeProxyProtocolHeader?: boolean; - /** - * The provisioning state of the probe resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Basic, Standard_v2 and WAF_v2 only. */ - port?: number; -} - -/** Tap configuration in a Network Interface. */ -export interface NetworkInterfaceTapConfiguration extends 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; - /** - * Sub Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The reference to the Virtual Network Tap resource. */ - virtualNetworkTap?: VirtualNetworkTap; - /** - * The provisioning state of the network interface tap configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Network security rule. */ -export interface SecurityRule extends 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; - /** The type of the resource. */ - type?: string; - /** A description for this rule. Restricted to 140 chars. */ - description?: string; - /** Network protocol this rule applies to. */ - protocol?: SecurityRuleProtocol; - /** The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. */ - sourcePortRange?: string; - /** The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. */ - destinationPortRange?: string; - /** The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. */ - sourceAddressPrefix?: string; - /** The CIDR or source IP ranges. */ - sourceAddressPrefixes?: string[]; - /** The application security group specified as source. */ - sourceApplicationSecurityGroups?: ApplicationSecurityGroup[]; - /** The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. */ - destinationAddressPrefix?: string; - /** The destination address prefixes. CIDR or destination IP ranges. */ - destinationAddressPrefixes?: string[]; - /** The application security group specified as destination. */ - destinationApplicationSecurityGroups?: ApplicationSecurityGroup[]; - /** The source port ranges. */ - sourcePortRanges?: string[]; - /** The destination port ranges. */ - destinationPortRanges?: string[]; - /** The network traffic is allowed or denied. */ - access?: SecurityRuleAccess; - /** The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ - priority?: number; - /** The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. */ - direction?: SecurityRuleDirection; - /** - * The provisioning state of the security rule resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** PrivateLinkServiceConnection resource. */ -export interface PrivateLinkServiceConnection extends SubResource { - /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ - name?: string; - /** - * The resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: 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; - /** - * The provisioning state of the private link service connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The resource id of private link service. */ - privateLinkServiceId?: string; - /** The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to. */ - groupIds?: string[]; - /** A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. */ - requestMessage?: string; - /** A collection of read-only information about the state of the connection to the remote resource. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; -} - -/** The private link service ip configuration. */ -export interface PrivateLinkServiceIpConfiguration extends SubResource { - /** The name of private link service ip configuration. */ - 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; - /** - * The resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The private IP address of the IP configuration. */ - privateIPAddress?: string; - /** The private IP address allocation method. */ - privateIPAllocationMethod?: IPAllocationMethod; - /** The reference to the subnet resource. */ - subnet?: Subnet; - /** Whether the ip configuration is primary or not. */ - primary?: boolean; - /** - * The provisioning state of the private link service IP configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. */ - privateIPAddressVersion?: IPVersion; -} - -/** PrivateEndpointConnection resource. */ -export interface PrivateEndpointConnection extends SubResource { - /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ - name?: string; - /** - * The resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: 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; - /** - * The resource of private end point. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateEndpoint?: PrivateEndpoint; - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - /** - * The provisioning state of the private endpoint connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The consumer link id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly linkIdentifier?: string; - /** - * The location of the private endpoint. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateEndpointLocation?: string; -} - -/** Route resource. */ -export interface Route extends 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; - /** The type of the resource. */ - type?: string; - /** The destination CIDR to which the route applies. */ - addressPrefix?: string; - /** The type of Azure hop the packet should be sent to. */ - nextHopType?: RouteNextHopType; - /** The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. */ - nextHopIpAddress?: string; - /** - * The provisioning state of the route resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * A value indicating whether this route overrides overlapping BGP routes regardless of LPM. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hasBgpOverride?: boolean; -} - -/** Service Endpoint policy definitions. */ -export interface ServiceEndpointPolicyDefinition extends 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; - /** The type of the resource. */ - type?: string; - /** A description for this rule. Restricted to 140 chars. */ - description?: string; - /** Service endpoint name. */ - service?: string; - /** A list of service resources. */ - serviceResources?: string[]; - /** - * The provisioning state of the service endpoint policy definition resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** IP configuration. */ -export interface IPConfiguration extends 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; - /** The private IP address of the IP configuration. */ - privateIPAddress?: string; - /** The private IP address allocation method. */ - privateIPAllocationMethod?: IPAllocationMethod; - /** The reference to the subnet resource. */ - subnet?: Subnet; - /** The reference to the public IP resource. */ - publicIPAddress?: PublicIPAddress; - /** - * The provisioning state of the IP configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** IP configuration profile child resource. */ -export interface IPConfigurationProfile extends SubResource { - /** The name of the resource. This name can be used to access the resource. */ - name?: string; - /** - * Sub Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: 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; - /** The reference to the subnet resource to create a container network interface ip configuration. */ - subnet?: Subnet; - /** - * The provisioning state of the IP configuration profile resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** ResourceNavigationLink resource. */ -export interface ResourceNavigationLink extends SubResource { - /** 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; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Resource type of the linked resource. */ - linkedResourceType?: string; - /** Link to the external resource. */ - link?: string; - /** - * The provisioning state of the resource navigation link resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** ServiceAssociationLink resource. */ -export interface ServiceAssociationLink extends SubResource { - /** 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; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Resource type of the linked resource. */ - linkedResourceType?: string; - /** Link to the external resource. */ - link?: string; - /** - * The provisioning state of the service association link resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** If true, the resource can be deleted. */ - allowDelete?: boolean; - /** A list of locations. */ - locations?: string[]; -} - -/** Details the service to which the subnet is delegated. */ -export interface Delegation extends SubResource { - /** The name of the resource that is unique within a subnet. 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; - /** Resource type. */ - type?: string; - /** The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). */ - serviceName?: string; - /** - * The actions permitted to the service upon delegation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actions?: string[]; - /** - * The provisioning state of the service delegation resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Subnet in a virtual network resource. */ -export interface Subnet extends 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; - /** Resource type. */ - type?: string; - /** The address prefix for the subnet. */ - addressPrefix?: string; - /** List of address prefixes for the subnet. */ - addressPrefixes?: string[]; - /** The reference to the NetworkSecurityGroup resource. */ - networkSecurityGroup?: NetworkSecurityGroup; - /** The reference to the RouteTable resource. */ - routeTable?: RouteTable; - /** Nat gateway associated with this subnet. */ - natGateway?: SubResource; - /** An array of service endpoints. */ - serviceEndpoints?: ServiceEndpointPropertiesFormat[]; - /** An array of service endpoint policies. */ - serviceEndpointPolicies?: ServiceEndpointPolicy[]; - /** - * An array of references to private endpoints. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateEndpoints?: PrivateEndpoint[]; - /** - * An array of references to the network interface IP configurations using subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipConfigurations?: IPConfiguration[]; - /** - * Array of IP configuration profiles which reference this subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipConfigurationProfiles?: IPConfigurationProfile[]; - /** Array of IpAllocation which reference this subnet. */ - ipAllocations?: SubResource[]; - /** - * An array of references to the external resources using subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceNavigationLinks?: ResourceNavigationLink[]; - /** - * An array of references to services injecting into this subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceAssociationLinks?: ServiceAssociationLink[]; - /** An array of references to the delegations on the subnet. */ - delegations?: Delegation[]; - /** - * A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly purpose?: string; - /** - * The provisioning state of the subnet resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Enable or Disable apply network policies on private end point in the subnet. */ - privateEndpointNetworkPolicies?: VirtualNetworkPrivateEndpointNetworkPolicies; - /** Enable or Disable apply network policies on private link service in the subnet. */ - privateLinkServiceNetworkPolicies?: VirtualNetworkPrivateLinkServiceNetworkPolicies; - /** Application gateway IP configurations of virtual network resource. */ - applicationGatewayIPConfigurations?: ApplicationGatewayIPConfiguration[]; - /** Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property can only be set if defaultOutboundAccess is set to false, both properties can only be set if subnet is empty. */ - sharingScope?: SharingScope; - /** Set this property to false to disable default outbound connectivity for all VMs in the subnet. */ - defaultOutboundAccess?: boolean; - /** A list of IPAM Pools for allocating IP address prefixes. */ - ipamPoolPrefixAllocations?: IpamPoolPrefixAllocation[]; - /** Reference to an existing service gateway. */ - serviceGateway?: SubResource; -} - -/** Frontend IP address of the load balancer. */ -export interface FrontendIPConfiguration extends SubResource { - /** The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. 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; - /** A list of availability zones denoting the IP allocated for the resource needs to come from. */ - zones?: string[]; - /** - * An array of references to inbound rules that use this frontend IP. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly inboundNatRules?: SubResource[]; - /** - * An array of references to inbound pools that use this frontend IP. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly inboundNatPools?: SubResource[]; - /** - * An array of references to outbound rules that use this frontend IP. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundRules?: SubResource[]; - /** - * An array of references to load balancing rules that use this frontend IP. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly loadBalancingRules?: SubResource[]; - /** The private IP address of the IP configuration. */ - privateIPAddress?: string; - /** The Private IP allocation method. */ - privateIPAllocationMethod?: IPAllocationMethod; - /** Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. */ - privateIPAddressVersion?: IPVersion; - /** The reference to the subnet resource. */ - subnet?: Subnet; - /** The reference to the Public IP resource. */ - publicIPAddress?: PublicIPAddress; - /** The reference to the Public IP Prefix resource. */ - publicIPPrefix?: SubResource; - /** The reference to gateway load balancer frontend IP. */ - gatewayLoadBalancer?: SubResource; - /** - * The provisioning state of the frontend IP configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Pool of backend IP addresses. */ -export interface BackendAddressPool extends SubResource { - /** The name of the resource that is unique within the set of backend address pools used by the load balancer. 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 location of the backend address pool. */ - location?: string; - /** An array of gateway load balancer tunnel interfaces. */ - tunnelInterfaces?: GatewayLoadBalancerTunnelInterface[]; - /** An array of backend addresses. */ - loadBalancerBackendAddresses?: LoadBalancerBackendAddress[]; - /** - * An array of references to IP addresses defined in network interfaces. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly backendIPConfigurations?: NetworkInterfaceIPConfiguration[]; - /** - * An array of references to load balancing rules that use this backend address pool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly loadBalancingRules?: SubResource[]; - /** - * A reference to an outbound rule that uses this backend address pool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundRule?: SubResource; - /** - * An array of references to outbound rules that use this backend address pool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundRules?: SubResource[]; - /** - * An array of references to inbound NAT rules that use this backend address pool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly inboundNatRules?: SubResource[]; - /** - * The provisioning state of the backend address pool resource. - * 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; - /** A reference to a virtual network. */ - virtualNetwork?: SubResource; - /** Backend address synchronous mode for the backend pool */ - syncMode?: SyncMode; -} - -/** Inbound NAT rule of the load balancer. */ -export interface InboundNatRule extends SubResource { - /** The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. 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; - /** A reference to frontend IP addresses. */ - frontendIPConfiguration?: SubResource; - /** - * A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly backendIPConfiguration?: NetworkInterfaceIPConfiguration; - /** The reference to the transport protocol used by the load balancing rule. */ - protocol?: TransportProtocol; - /** The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. */ - frontendPort?: number; - /** The port used for the internal endpoint. Acceptable values range from 1 to 65535. */ - backendPort?: number; - /** The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. */ - idleTimeoutInMinutes?: number; - /** Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. */ - enableFloatingIP?: boolean; - /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ - enableTcpReset?: boolean; - /** The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534. */ - frontendPortRangeStart?: number; - /** The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534. */ - frontendPortRangeEnd?: number; - /** A reference to backendAddressPool resource. */ - backendAddressPool?: SubResource; - /** - * The provisioning state of the inbound NAT rule resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** IPConfiguration in a network interface. */ -export interface NetworkInterfaceIPConfiguration extends 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; - /** Resource type. */ - type?: string; - /** The reference to gateway load balancer frontend IP. */ - gatewayLoadBalancer?: SubResource; - /** The reference to Virtual Network Taps. */ - virtualNetworkTaps?: VirtualNetworkTap[]; - /** The reference to ApplicationGatewayBackendAddressPool resource. */ - applicationGatewayBackendAddressPools?: ApplicationGatewayBackendAddressPool[]; - /** The reference to LoadBalancerBackendAddressPool resource. */ - loadBalancerBackendAddressPools?: BackendAddressPool[]; - /** A list of references of LoadBalancerInboundNatRules. */ - loadBalancerInboundNatRules?: InboundNatRule[]; - /** Private IP address of the IP configuration. It can be a single IP address or a CIDR block in the format
/. */ - privateIPAddress?: string; - /** The private IP address prefix length. If specified and the allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. */ - privateIPAddressPrefixLength?: number; - /** The private IP address allocation method. */ - privateIPAllocationMethod?: IPAllocationMethod; - /** Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. */ - privateIPAddressVersion?: IPVersion; - /** Subnet bound to the IP configuration. */ - subnet?: Subnet; - /** Whether this is a primary customer address on the network interface. */ - primary?: boolean; - /** Public IP address bound to the IP configuration. */ - publicIPAddress?: PublicIPAddress; - /** Application security groups in which the IP configuration is included. */ - applicationSecurityGroups?: ApplicationSecurityGroup[]; - /** - * The provisioning state of the network interface IP configuration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * PrivateLinkConnection properties for the network interface. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateLinkConnectionProperties?: NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties; -} - -/** Backend Address Pool of an application gateway. */ -export interface ApplicationGatewayBackendAddressPool extends SubResource { - /** Name of the backend address pool 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; - /** - * Collection of references to IPs defined in network interfaces. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly backendIPConfigurations?: NetworkInterfaceIPConfiguration[]; - /** Backend addresses. */ - backendAddresses?: ApplicationGatewayBackendAddress[]; - /** - * The provisioning state of the backend address pool resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Backend address pool settings of an application gateway. */ -export interface ApplicationGatewayBackendHttpSettings extends SubResource { - /** Name of the backend http 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; - /** Cookie based affinity. */ - cookieBasedAffinity?: ApplicationGatewayCookieBasedAffinity; - /** Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds. */ - requestTimeout?: number; - /** Probe resource of an application gateway. */ - probe?: SubResource; - /** Array of references to application gateway authentication certificates. */ - authenticationCertificates?: SubResource[]; - /** Array of references to application gateway trusted root certificates. */ - trustedRootCertificates?: SubResource[]; - /** Connection draining of the backend http settings resource. */ - connectionDraining?: ApplicationGatewayConnectionDraining; - /** Host header to be sent to the backend servers. */ - hostName?: string; - /** Whether to pick host header should be picked from the host name of the backend server. Default value is false. */ - pickHostNameFromBackendAddress?: boolean; - /** Cookie name to use for the affinity cookie. */ - affinityCookieName?: string; - /** Whether the probe is enabled. Default value is false. */ - probeEnabled?: boolean; - /** Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. */ - path?: string; - /** Enable or disable dedicated connection per backend server. Default is set to false. */ - dedicatedBackendConnection?: boolean; - /** Verify or skip both chain and expiry validations of the certificate on the backend server. Default is set to true. */ - validateCertChainAndExpiry?: boolean; - /** When enabled, verifies if the Common Name of the certificate provided by the backend server matches the Server Name Indication (SNI) value. Default value is true. */ - validateSNI?: boolean; - /** Specify an SNI value to match the common name of the certificate on the backend. By default, the application gateway uses the incoming request’s host header as the SNI. Default value is null. */ - sniName?: string; - /** - * 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; -} - -/** Backend address pool settings of an application gateway. */ -export interface ApplicationGatewayBackendSettings extends 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; - /** Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false. */ - enableL4ClientIpPreservation?: 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 interface ApplicationGatewayHttpListener extends SubResource { - /** Name of the HTTP 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 HTTP listener. */ - protocol?: ApplicationGatewayProtocol; - /** Host name of HTTP listener. */ - hostName?: string; - /** SSL certificate resource of an application gateway. */ - sslCertificate?: SubResource; - /** SSL profile resource of the application gateway. */ - sslProfile?: SubResource; - /** Applicable only if protocol is https. Enables SNI for multi-hosting. */ - requireServerNameIndication?: boolean; - /** - * The provisioning state of the HTTP listener resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Custom error configurations of the HTTP listener. */ - customErrorConfigurations?: ApplicationGatewayCustomError[]; - /** Reference to the FirewallPolicy resource. */ - firewallPolicy?: SubResource; - /** List of Host names for HTTP Listener that allows special wildcard characters as well. */ - hostNames?: string[]; -} - -/** Listener of an application gateway. */ -export interface ApplicationGatewayListener extends 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; - /** List of Server Name Indications(SNI) for TLS Multi-site Listener that allows special wildcard characters as well. */ - hostNames?: string[]; -} - -/** SSL profile of an application gateway. */ -export interface ApplicationGatewaySslProfile extends SubResource { - /** Name of the SSL profile 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; - /** Array of references to application gateway trusted client certificates. */ - trustedClientCertificates?: SubResource[]; - /** SSL policy of the application gateway resource. */ - sslPolicy?: ApplicationGatewaySslPolicy; - /** Client authentication configuration of the application gateway resource. */ - clientAuthConfiguration?: ApplicationGatewayClientAuthConfiguration; - /** - * The provisioning state of the HTTP listener resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Path rule of URL path map of an application gateway. */ -export interface ApplicationGatewayPathRule extends SubResource { - /** Name of the path 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; - /** Path rules of URL path map. */ - paths?: string[]; - /** Backend address pool resource of URL path map path rule. */ - backendAddressPool?: SubResource; - /** Backend http settings resource of URL path map path rule. */ - backendHttpSettings?: SubResource; - /** Redirect configuration resource of URL path map path rule. */ - redirectConfiguration?: SubResource; - /** Rewrite rule set resource of URL path map path rule. */ - rewriteRuleSet?: SubResource; - /** Load Distribution Policy resource of URL path map path rule. */ - loadDistributionPolicy?: SubResource; - /** - * The provisioning state of the path rule resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Reference to the FirewallPolicy resource. */ - firewallPolicy?: SubResource; -} - -/** UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. */ -export interface ApplicationGatewayUrlPathMap extends SubResource { - /** Name of the URL path map 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; - /** Default backend address pool resource of URL path map. */ - defaultBackendAddressPool?: SubResource; - /** Default backend http settings resource of URL path map. */ - defaultBackendHttpSettings?: SubResource; - /** Default Rewrite rule set resource of URL path map. */ - defaultRewriteRuleSet?: SubResource; - /** Default redirect configuration resource of URL path map. */ - defaultRedirectConfiguration?: SubResource; - /** Default Load Distribution Policy resource of URL path map. */ - defaultLoadDistributionPolicy?: SubResource; - /** Path rule of URL path map resource. */ - pathRules?: ApplicationGatewayPathRule[]; - /** - * The provisioning state of the URL path map resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Request routing rule of an application gateway. */ -export interface ApplicationGatewayRequestRoutingRule extends SubResource { - /** Name of the request 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; - /** Priority of the request routing rule. */ - priority?: number; - /** Backend address pool resource of the application gateway. */ - backendAddressPool?: SubResource; - /** Backend http settings resource of the application gateway. */ - backendHttpSettings?: SubResource; - /** Http listener resource of the application gateway. */ - httpListener?: SubResource; - /** URL path map resource of the application gateway. */ - urlPathMap?: SubResource; - /** Rewrite Rule Set resource in Basic rule of the application gateway. */ - rewriteRuleSet?: SubResource; - /** Redirect configuration resource of the application gateway. */ - redirectConfiguration?: SubResource; - /** Load Distribution Policy resource of the application gateway. */ - loadDistributionPolicy?: SubResource; - /** Entra JWT validation configuration resource of the application gateway. */ - entraJWTValidationConfig?: 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; -} - -/** Routing rule of an application gateway. */ -export interface ApplicationGatewayRoutingRule extends 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; - /** Priority of the routing rule. */ - priority?: number; - /** 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 interface ApplicationGatewayRewriteRuleSet extends SubResource { - /** Name of the rewrite rule set 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; - /** Rewrite rules in the rewrite rule set. */ - rewriteRules?: ApplicationGatewayRewriteRule[]; - /** - * The provisioning state of the rewrite rule set resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Redirect configuration of an application gateway. */ -export interface ApplicationGatewayRedirectConfiguration extends SubResource { - /** Name of the redirect configuration 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; - /** HTTP redirection type. */ - redirectType?: ApplicationGatewayRedirectType; - /** Reference to a listener to redirect the request to. */ - targetListener?: SubResource; - /** Url to redirect the request to. */ - targetUrl?: string; - /** Include path in the redirected url. */ - includePath?: boolean; - /** Include query string in the redirected url. */ - includeQueryString?: boolean; - /** Request routing specifying redirect configuration. */ - requestRoutingRules?: SubResource[]; - /** Url path maps specifying default redirect configuration. */ - urlPathMaps?: SubResource[]; - /** Path rules specifying redirect configuration. */ - pathRules?: SubResource[]; -} - -/** The application gateway private link ip configuration. */ -export interface ApplicationGatewayPrivateLinkIpConfiguration extends SubResource { - /** The name of application gateway private link ip configuration. */ - 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; - /** - * The resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The private IP address of the IP configuration. */ - privateIPAddress?: string; - /** The private IP address allocation method. */ - privateIPAllocationMethod?: IPAllocationMethod; - /** Reference to the subnet resource. */ - subnet?: SubResource; - /** Whether the ip configuration is primary or not. */ - primary?: boolean; - /** - * The provisioning state of the application gateway private link IP configuration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Private Link Configuration on an application gateway. */ -export interface ApplicationGatewayPrivateLinkConfiguration extends SubResource { - /** Name of the private link configuration 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; - /** An array of application gateway private link ip configurations. */ - ipConfigurations?: ApplicationGatewayPrivateLinkIpConfiguration[]; - /** - * The provisioning state of the application gateway private link configuration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Private Endpoint connection on an application gateway. */ -export interface ApplicationGatewayPrivateEndpointConnection extends SubResource { - /** Name of the private endpoint connection on 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 resource of private end point. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateEndpoint?: PrivateEndpoint; - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - /** - * The provisioning state of the application gateway private endpoint connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The consumer link id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly linkIdentifier?: string; -} - -/** Load Distribution Target of an application gateway. */ -export interface ApplicationGatewayLoadDistributionTarget extends SubResource { - /** Name of the load distribution policy 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; - /** Weight per server. Range between 1 and 100. */ - weightPerServer?: number; - /** Backend address pool resource of the application gateway. */ - backendAddressPool?: SubResource; -} - -/** Load Distribution Policy of an application gateway. */ -export interface ApplicationGatewayLoadDistributionPolicy extends SubResource { - /** Name of the load distribution policy 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; - /** Load Distribution Targets resource of an application gateway. */ - loadDistributionTargets?: ApplicationGatewayLoadDistributionTarget[]; - /** Load Distribution Targets resource of an application gateway. */ - loadDistributionAlgorithm?: ApplicationGatewayLoadDistributionAlgorithm; - /** - * The provisioning state of the Load Distribution Policy resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Entra JWT Validation Configuration of an application gateway. */ -export interface ApplicationGatewayEntraJWTValidationConfig extends SubResource { - /** Name of the entra jwt validation configuration 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; - /** Unauthorized request action. */ - unAuthorizedRequestAction?: ApplicationGatewayUnAuthorizedRequestAction; - /** The Tenant ID of the Microsoft Entra ID application. */ - tenantId?: string; - /** The Client ID of the Microsoft Entra ID application. */ - clientId?: string; - /** List of acceptable audience claims that can be present in the token (aud claim). A maximum of 5 audiences are permitted. */ - audiences?: string[]; - /** - * The provisioning state of the entra jwt validation configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** PrivateLink Resource of an application gateway. */ -export interface ApplicationGatewayPrivateLinkResource extends SubResource { - /** Name of the private link resource 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; - /** - * Group identifier of private link resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupId?: string; - /** - * Required member names of private link resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredMembers?: string[]; - /** Required DNS zone names of the the private link resource. */ - requiredZoneNames?: string[]; -} - -/** An Ssl predefined policy. */ -export interface ApplicationGatewaySslPredefinedPolicy extends SubResource { - /** Name of the Ssl predefined policy. */ - name?: string; - /** Ssl cipher suites to be enabled in the specified order for application gateway. */ - cipherSuites?: ApplicationGatewaySslCipherSuite[]; - /** Minimum version of Ssl protocol to be supported on application gateway. */ - minProtocolVersion?: ApplicationGatewaySslProtocol; -} - -/** Application rule collection resource. */ -export interface AzureFirewallApplicationRuleCollection extends SubResource { - /** The name of the resource that is unique within the Azure firewall. 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; - /** Priority of the application rule collection resource. */ - priority?: number; - /** The action type of a rule collection. */ - action?: AzureFirewallRCAction; - /** Collection of rules used by a application rule collection. */ - rules?: AzureFirewallApplicationRule[]; - /** - * The provisioning state of the application rule collection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** NAT rule collection resource. */ -export interface AzureFirewallNatRuleCollection extends SubResource { - /** The name of the resource that is unique within the Azure firewall. 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; - /** Priority of the NAT rule collection resource. */ - priority?: number; - /** The action type of a NAT rule collection. */ - action?: AzureFirewallNatRCAction; - /** Collection of rules used by a NAT rule collection. */ - rules?: AzureFirewallNatRule[]; - /** - * The provisioning state of the NAT rule collection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Network rule collection resource. */ -export interface AzureFirewallNetworkRuleCollection extends SubResource { - /** The name of the resource that is unique within the Azure firewall. 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; - /** Priority of the network rule collection resource. */ - priority?: number; - /** The action type of a rule collection. */ - action?: AzureFirewallRCAction; - /** Collection of rules used by a network rule collection. */ - rules?: AzureFirewallNetworkRule[]; - /** - * The provisioning state of the network rule collection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** IP configuration of an Azure Firewall. */ -export interface AzureFirewallIPConfiguration extends SubResource { - /** 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 Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddress?: string; - /** Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'. */ - subnet?: SubResource; - /** Reference to the PublicIP resource. This field is a mandatory input if subnet is not null. */ - publicIPAddress?: SubResource; - /** - * The provisioning state of the Azure firewall IP configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** IP configuration of an Bastion Host. */ -export interface BastionHostIPConfiguration extends SubResource { - /** 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; - /** - * Ip configuration type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Reference of the subnet resource. */ - subnet?: SubResource; - /** Reference of the PublicIP resource. Null for private only bastion */ - publicIPAddress?: SubResource; - /** - * The provisioning state of the bastion host IP configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Private IP allocation method. */ - privateIPAllocationMethod?: IPAllocationMethod; -} - -/** A DDoS detection rule resource. */ -export interface DdosDetectionRule extends SubResource { - /** The name of the DDoS detection rule. */ - 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; - /** - * The resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The provisioning state of the DDoS detection rule. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The detection mode for the DDoS detection rule. */ - detectionMode?: DdosDetectionMode; - /** The traffic detection rule details. */ - trafficDetectionRule?: TrafficDetectionRule; -} - -/** Endpoint service. */ -export interface EndpointServiceResult extends SubResource { - /** - * Name of the endpoint service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Type of the endpoint service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; -} - -/** Authorization in an ExpressRouteCircuit resource. */ -export interface ExpressRouteCircuitAuthorization extends 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. */ - authorizationKey?: string; - /** The authorization use status. */ - authorizationUseStatus?: AuthorizationUseStatus; - /** - * The reference to the ExpressRoute connection resource using the authorization. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionResourceUri?: 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; -} - -/** Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. */ -export interface ExpressRouteCircuitConnection extends 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; - /** Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. */ - expressRouteCircuitPeering?: SubResource; - /** Reference to Express Route Circuit Private Peering Resource of the peered circuit. */ - peerExpressRouteCircuitPeering?: SubResource; - /** /29 IP address space to carve out Customer addresses for tunnels. */ - addressPrefix?: string; - /** The authorization key. */ - authorizationKey?: string; - /** IPv6 Address PrefixProperties of the express route circuit connection. */ - ipv6CircuitConnectionConfig?: Ipv6CircuitConnectionConfig; - /** - * Express Route Circuit connection state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly circuitConnectionStatus?: CircuitConnectionStatus; - /** - * The provisioning state of the express route circuit connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Peer Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. */ -export interface PeerExpressRouteCircuitConnection extends 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; - /** Reference to Express Route Circuit Private Peering Resource of the circuit. */ - expressRouteCircuitPeering?: SubResource; - /** Reference to Express Route Circuit Private Peering Resource of the peered circuit. */ - peerExpressRouteCircuitPeering?: SubResource; - /** /29 IP address space to carve out Customer addresses for tunnels. */ - addressPrefix?: string; - /** - * Express Route Circuit connection state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly circuitConnectionStatus?: CircuitConnectionStatus; - /** The name of the express route circuit connection resource. */ - connectionName?: string; - /** The resource guid of the authorization used for the express route circuit connection. */ - authResourceGuid?: string; - /** - * The provisioning state of the peer express route circuit connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Peering in an ExpressRouteCircuit resource. */ -export interface ExpressRouteCircuitPeering extends 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 peering type. */ - peeringType?: ExpressRoutePeeringType; - /** The peering state. */ - state?: ExpressRoutePeeringState; - /** The Azure ASN. */ - azureASN?: number; - /** The peer ASN. */ - peerASN?: number; - /** The primary address prefix. */ - primaryPeerAddressPrefix?: string; - /** The secondary address prefix. */ - secondaryPeerAddressPrefix?: string; - /** The primary port. */ - primaryAzurePort?: string; - /** The secondary port. */ - secondaryAzurePort?: string; - /** The shared key. */ - sharedKey?: string; - /** The VLAN ID. */ - vlanId?: number; - /** The Microsoft peering configuration. */ - microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; - /** The peering stats of express route circuit. */ - stats?: ExpressRouteCircuitStats; - /** - * The provisioning state of the express route circuit peering resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The GatewayManager Etag. */ - gatewayManagerEtag?: string; - /** - * Who was the last to modify the peering. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastModifiedBy?: string; - /** The reference to the RouteFilter resource. */ - routeFilter?: SubResource; - /** The IPv6 peering configuration. */ - ipv6PeeringConfig?: Ipv6ExpressRouteCircuitPeeringConfig; - /** The ExpressRoute connection. */ - expressRouteConnection?: ExpressRouteConnectionId; - /** The list of circuit connections associated with Azure Private Peering for this circuit. */ - connections?: ExpressRouteCircuitConnection[]; - /** - * The list of peered circuit connections associated with Azure Private Peering for this circuit. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly peeredConnections?: PeerExpressRouteCircuitConnection[]; -} - -/** Peering in an ExpressRoute Cross Connection resource. */ -export interface ExpressRouteCrossConnectionPeering extends 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; - /** The peering type. */ - peeringType?: ExpressRoutePeeringType; - /** The peering state. */ - state?: ExpressRoutePeeringState; - /** - * The Azure ASN. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly azureASN?: number; - /** The peer ASN. */ - peerASN?: number; - /** The primary address prefix. */ - primaryPeerAddressPrefix?: string; - /** The secondary address prefix. */ - secondaryPeerAddressPrefix?: string; - /** - * The primary port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly primaryAzurePort?: string; - /** - * The secondary port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly secondaryAzurePort?: string; - /** The shared key. */ - sharedKey?: string; - /** The VLAN ID. */ - vlanId?: number; - /** The Microsoft peering configuration. */ - microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; - /** - * The provisioning state of the express route cross connection peering resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The GatewayManager Etag. */ - gatewayManagerEtag?: string; - /** - * Who was the last to modify the peering. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastModifiedBy?: string; - /** The IPv6 peering configuration. */ - ipv6PeeringConfig?: Ipv6ExpressRouteCircuitPeeringConfig; -} - -/** ExpressRouteLink child resource definition. */ -export interface ExpressRouteLink extends SubResource { - /** Name of child port resource that is unique among child port resources of the parent. */ - 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; - /** - * Name of Azure router associated with physical port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly routerName?: string; - /** - * Name of Azure router interface. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly interfaceName?: string; - /** - * Mapping between physical port to patch panel port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly patchPanelId?: string; - /** - * Mapping of physical patch panel to rack. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rackId?: string; - /** - * Cololocation for ExpressRoute Hybrid Direct. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly coloLocation?: string; - /** - * Physical fiber port type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectorType?: ExpressRouteLinkConnectorType; - /** Administrative state of the physical port. */ - adminState?: ExpressRouteLinkAdminState; - /** - * The provisioning state of the express route link resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** MacSec configuration. */ - macSecConfig?: ExpressRouteLinkMacSecConfig; -} - -/** ExpressRoutePort Authorization resource definition. */ -export interface ExpressRoutePortAuthorization extends 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 interface FirewallPolicyRuleCollectionGroup extends 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; - /** - * Rule Group type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * A read-only string that represents the size of the FirewallPolicyRuleCollectionGroupProperties in MB. (ex 1.2MB) - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly size?: string; - /** Priority of the Firewall Policy Rule Collection Group resource. */ - priority?: number; - /** Group of Firewall Policy rule collections. */ - ruleCollections?: FirewallPolicyRuleCollectionUnion[]; - /** - * The provisioning state of the firewall policy rule collection group resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Rule Collection Group resource. */ -export interface FirewallPolicyRuleCollectionGroupDraft extends SubResource { - /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ - name?: string; - /** - * Rule Group type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * A read-only string that represents the size of the FirewallPolicyRuleCollectionGroupProperties in MB. (ex 1.2MB) - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly size?: string; - /** Priority of the Firewall Policy Rule Collection Group resource. */ - priority?: number; - /** Group of Firewall Policy rule collections. */ - ruleCollections?: FirewallPolicyRuleCollectionUnion[]; -} - -/** A load balancing rule for a load balancer. */ -export interface LoadBalancingRule extends SubResource { - /** The name of the resource that is unique within the set of load balancing rules used by the load balancer. 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; - /** A reference to frontend IP addresses. */ - frontendIPConfiguration?: SubResource; - /** A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. */ - backendAddressPool?: SubResource; - /** An array of references to pool of DIPs. */ - backendAddressPools?: SubResource[]; - /** The reference to the load balancer probe used by the load balancing rule. */ - probe?: SubResource; - /** The reference to the transport protocol used by the load balancing rule. */ - protocol?: TransportProtocol; - /** The load distribution policy for this rule. */ - loadDistribution?: LoadDistribution; - /** The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port". */ - frontendPort?: number; - /** The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port". */ - backendPort?: number; - /** The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. */ - idleTimeoutInMinutes?: number; - /** Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. */ - enableFloatingIP?: boolean; - /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ - enableTcpReset?: boolean; - /** Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. */ - disableOutboundSnat?: boolean; - /** Defines whether connections between 2 communicating endpoints can be tracked and associated to the same backend VM over its lifetime when using UDP protocol. */ - enableConnectionTracking?: boolean; - /** - * The provisioning state of the load balancing rule resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** A load balancer probe. */ -export interface Probe extends SubResource { - /** The name of the resource that is unique within the set of probes used by the load balancer. 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 load balancer rules that use this probe. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly loadBalancingRules?: SubResource[]; - /** The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. */ - protocol?: ProbeProtocol; - /** The port for communicating the probe. Possible values range from 1 to 65535, inclusive. */ - port?: number; - /** The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. */ - intervalInSeconds?: number; - /** Determines how new connections are handled by the load balancer when all backend instances are probed down. */ - noHealthyBackendsBehavior?: ProbeNoHealthyBackendsBehavior; - /** The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. */ - numberOfProbes?: number; - /** The number of consecutive successful or failed probes in order to allow or deny traffic from being delivered to this endpoint. After failing the number of consecutive probes equal to this value, the endpoint will be taken out of rotation and require the same number of successful consecutive probes to be placed back in rotation. */ - probeThreshold?: number; - /** The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. */ - requestPath?: string; - /** - * The provisioning state of the probe resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Inbound NAT pool of the load balancer. */ -export interface InboundNatPool extends SubResource { - /** The name of the resource that is unique within the set of inbound NAT pools used by the load balancer. 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; - /** A reference to frontend IP addresses. */ - frontendIPConfiguration?: SubResource; - /** The reference to the transport protocol used by the inbound NAT pool. */ - protocol?: TransportProtocol; - /** The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. */ - frontendPortRangeStart?: number; - /** The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. */ - frontendPortRangeEnd?: number; - /** The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. */ - backendPort?: number; - /** The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. */ - idleTimeoutInMinutes?: number; - /** Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. */ - enableFloatingIP?: boolean; - /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ - enableTcpReset?: boolean; - /** - * The provisioning state of the inbound NAT pool resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Outbound rule of the load balancer. */ -export interface OutboundRule extends SubResource { - /** The name of the resource that is unique within the set of outbound rules used by the load balancer. 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 number of outbound ports to be used for NAT. */ - allocatedOutboundPorts?: number; - /** The Frontend IP addresses of the load balancer. */ - frontendIPConfigurations?: SubResource[]; - /** A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. */ - backendAddressPool?: SubResource; - /** - * The provisioning state of the outbound rule resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The protocol for the outbound rule in load balancer. */ - protocol?: LoadBalancerOutboundRuleProtocol; - /** Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ - enableTcpReset?: boolean; - /** The timeout for the TCP idle connection. */ - idleTimeoutInMinutes?: number; -} - -/** Container network interface configuration child resource. */ -export interface ContainerNetworkInterfaceConfiguration extends SubResource { - /** The name of the resource. This name can be used to access the resource. */ - name?: string; - /** - * Sub Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: 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; - /** A list of ip configurations of the container network interface configuration. */ - ipConfigurations?: IPConfigurationProfile[]; - /** A list of container network interfaces created from this container network interface configuration. */ - containerNetworkInterfaces?: SubResource[]; - /** - * The provisioning state of the container network interface configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Reference to container resource in remote resource provider. */ -export interface Container extends SubResource {} - -/** Container network interface child resource. */ -export interface ContainerNetworkInterface extends SubResource { - /** The name of the resource. This name can be used to access the resource. */ - name?: string; - /** - * Sub Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: 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; - /** - * Container network interface configuration from which this container network interface is created. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly containerNetworkInterfaceConfiguration?: ContainerNetworkInterfaceConfiguration; - /** Reference to the container to which this container network interface is attached. */ - container?: Container; - /** - * Reference to the ip configuration on this container nic. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipConfigurations?: ContainerNetworkInterfaceIpConfiguration[]; - /** - * The provisioning state of the container network interface resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Virtual Appliance Site resource. */ -export interface VirtualApplianceSite extends SubResource { - /** Name of the virtual appliance site. */ - 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; - /** - * Site type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Address Prefix. */ - addressPrefix?: string; - /** Office 365 Policy. */ - o365Policy?: Office365PolicyProperties; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** NVA Inbound Security Rule resource. */ -export interface InboundSecurityRule extends SubResource { - /** Name of security rule collection. */ - 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; - /** - * NVA inbound security rule type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates NSG rule and SLB LB Rule. */ - ruleType?: InboundSecurityRuleType; - /** List of allowed rules. */ - rules?: InboundSecurityRules[]; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Private dns zone group resource. */ -export interface PrivateDnsZoneGroup extends SubResource { - /** 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; - /** - * The provisioning state of the private dns zone group resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** A collection of private dns zone configurations of the private dns zone group. */ - privateDnsZoneConfigs?: PrivateDnsZoneConfig[]; -} - -/** Route Filter Rule Resource. */ -export interface RouteFilterRule extends SubResource { - /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ - name?: string; - /** Resource location. */ - location?: 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; - /** The access type of the rule. */ - access?: Access; - /** The rule type of the rule. */ - routeFilterRuleType?: RouteFilterRuleType; - /** The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. */ - communities?: string[]; - /** - * The provisioning state of the route filter rule resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Peerings in a virtual network resource. */ -export interface VirtualNetworkPeering extends 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; - /** Resource type. */ - type?: string; - /** Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. */ - allowVirtualNetworkAccess?: boolean; - /** Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. */ - allowForwardedTraffic?: boolean; - /** If gateway links can be used in remote virtual networking to link to this virtual network. */ - allowGatewayTransit?: boolean; - /** If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. */ - useRemoteGateways?: boolean; - /** The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). */ - remoteVirtualNetwork?: SubResource; - /** The local address space of the local virtual network that is peered. */ - localAddressSpace?: AddressSpace; - /** The current local address space of the local virtual network that is peered. */ - localVirtualNetworkAddressSpace?: AddressSpace; - /** The reference to the address space peered with the remote virtual network. */ - remoteAddressSpace?: AddressSpace; - /** The reference to the current address space of the remote virtual network. */ - remoteVirtualNetworkAddressSpace?: AddressSpace; - /** The reference to the remote virtual network's Bgp Communities. */ - remoteBgpCommunities?: VirtualNetworkBgpCommunities; - /** - * The reference to the remote virtual network's encryption - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remoteVirtualNetworkEncryption?: VirtualNetworkEncryption; - /** The status of the virtual network peering. */ - peeringState?: VirtualNetworkPeeringState; - /** The peering sync status of the virtual network peering. */ - peeringSyncLevel?: VirtualNetworkPeeringLevel; - /** - * The provisioning state of the virtual network peering resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** If we need to verify the provisioning state of the remote gateway. */ - doNotVerifyRemoteGateways?: boolean; - /** - * The resourceGuid property of the Virtual Network peering resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** Whether complete virtual network address space is peered. */ - peerCompleteVnets?: boolean; - /** Whether only Ipv6 address space is peered for subnet peering. */ - enableOnlyIPv6Peering?: boolean; - /** List of local subnet names that are subnet peered with remote virtual network. */ - localSubnetNames?: string[]; - /** List of remote subnet names from remote virtual network that are subnet peered. */ - remoteSubnetNames?: string[]; -} - -/** The virtual network appliance ip configuration. */ -export interface VirtualNetworkApplianceIpConfiguration extends SubResource { - /** The name of virtual network appliance ip configuration. */ - 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; - /** - * The resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The private IP address of the IP configuration. */ - privateIPAddress?: string; - /** The private IP address allocation method. */ - privateIPAllocationMethod?: IPAllocationMethod; - /** Whether the ip configuration is primary or not. */ - primary?: boolean; - /** - * The provisioning state of the private link service IP configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. */ - privateIPAddressVersion?: IPVersion; -} - -/** IP configuration for virtual network gateway. */ -export interface VirtualNetworkGatewayIPConfiguration extends 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; - /** The private IP address allocation method. */ - privateIPAllocationMethod?: IPAllocationMethod; - /** The reference to the subnet resource. */ - subnet?: SubResource; - /** The reference to the public IP resource. */ - publicIPAddress?: SubResource; - /** - * Private IP Address for this gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddress?: string; - /** - * The provisioning state of the virtual network gateway IP configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** VPN client root certificate of virtual network gateway. */ -export interface VpnClientRootCertificate extends 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; - /** The certificate public data. */ - publicCertData: string; - /** - * The provisioning state of the VPN client root certificate resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** VPN client revoked certificate of virtual network gateway. */ -export interface VpnClientRevokedCertificate extends 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; - /** The revoked VPN client certificate thumbprint. */ - thumbprint?: string; - /** - * The provisioning state of the VPN client revoked certificate resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** A vpn client connection configuration for client connection configuration. */ -export interface VngClientConnectionConfiguration extends 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; - /** The reference to the address space resource which represents Address space for P2S VpnClient. */ - vpnClientAddressPool?: AddressSpace; - /** List of references to virtualNetworkGatewayPolicyGroups */ - virtualNetworkGatewayPolicyGroups?: SubResource[]; - /** - * The provisioning state of the VngClientConnectionConfiguration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Parameters for VirtualNetworkGatewayPolicyGroup. */ -export interface VirtualNetworkGatewayPolicyGroup extends 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; - /** Shows if this is a Default VirtualNetworkGatewayPolicyGroup or not. */ - isDefault?: boolean; - /** Priority for VirtualNetworkGatewayPolicyGroup. */ - priority?: number; - /** Multiple PolicyMembers for VirtualNetworkGatewayPolicyGroup. */ - policyMembers?: VirtualNetworkGatewayPolicyGroupMember[]; - /** - * List of references to vngClientConnectionConfigurations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vngClientConnectionConfigurations?: SubResource[]; - /** - * The provisioning state of the VirtualNetworkGatewayPolicyGroup resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** VirtualNetworkGatewayNatRule Resource. */ -export interface VirtualNetworkGatewayNatRule extends 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; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The provisioning state of the NAT Rule resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The type of NAT rule for VPN NAT. */ - typePropertiesType?: VpnNatRuleType; - /** The Source NAT direction of a VPN NAT. */ - mode?: VpnNatRuleMode; - /** The private IP address internal mapping for NAT. */ - internalMappings?: VpnNatRuleMapping[]; - /** The private IP address external mapping for NAT. */ - externalMappings?: VpnNatRuleMapping[]; - /** The IP Configuration ID this NAT rule applies to. */ - ipConfigurationId?: string; -} - -/** Response for GetConnectionSharedKey API service call. */ -export interface ConnectionSharedKey extends SubResource { - /** The virtual network connection shared key value. */ - value: string; -} - -/** Virtual Router Peering resource. */ -export interface VirtualRouterPeering extends SubResource { - /** Name of the virtual router peering that is unique within a virtual router. */ - 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; - /** - * Peering type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Peer ASN. */ - peerAsn?: number; - /** Peer IP. */ - peerIp?: string; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** VpnSiteLink Resource. */ -export interface VpnSiteLink extends 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; - /** The link provider properties. */ - linkProperties?: VpnLinkProviderProperties; - /** The ip-address for the vpn-site-link. */ - ipAddress?: string; - /** FQDN of vpn-site-link. */ - fqdn?: string; - /** The set of bgp properties. */ - bgpProperties?: VpnLinkBgpSettings; - /** - * The provisioning state of the VPN site link resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** VpnServerConfigurationPolicyGroup Resource. */ -export interface VpnServerConfigurationPolicyGroup extends 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 interface P2SConnectionConfiguration extends 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; - /** The reference to the address space resource which represents Address space for P2S VpnClient. */ - vpnClientAddressPool?: AddressSpace; - /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ - 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. */ - 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. - */ - readonly provisioningState?: ProvisioningState; -} - -/** VirtualHubRouteTableV2 Resource. */ -export interface VirtualHubRouteTableV2 extends 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; - /** List of all routes. */ - routes?: VirtualHubRouteV2[]; - /** List of all connections attached to this route table v2. */ - attachedConnections?: string[]; - /** - * The provisioning state of the virtual hub route table v2 resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** The RouteMap child resource of a Virtual hub. */ -export interface RouteMap extends SubResource { - /** - * The name of the resource that is unique within a resource group. This name can be used to access the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly 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; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** List of connections which have this RoutMap associated for inbound traffic. */ - associatedInboundConnections?: string[]; - /** List of connections which have this RoutMap associated for outbound traffic. */ - associatedOutboundConnections?: string[]; - /** List of RouteMap rules to be applied. */ - rules?: RouteMapRule[]; - /** - * The provisioning state of the RouteMap resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** HubVirtualNetworkConnection Resource. */ -export interface HubVirtualNetworkConnection extends 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; - /** Reference to the remote virtual network. */ - remoteVirtualNetwork?: SubResource; - /** Deprecated: VirtualHub to RemoteVnet transit to enabled or not. */ - allowHubToRemoteVnetTransit?: boolean; - /** Deprecated: Allow RemoteVnet to use Virtual Hub's gateways. */ - allowRemoteVnetToUseHubVnetGateways?: boolean; - /** Enable internet security. */ - enableInternetSecurity?: boolean; - /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ - routingConfiguration?: RoutingConfiguration; - /** - * The provisioning state of the hub virtual network connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** VpnSiteLinkConnection Resource. */ -export interface VpnSiteLinkConnection extends 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; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Id of the connected vpn site link. */ - vpnSiteLink?: SubResource; - /** Routing weight for vpn connection. */ - routingWeight?: number; - /** Vpn link connection mode. */ - vpnLinkConnectionMode?: VpnLinkConnectionMode; - /** - * The connection status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: VpnConnectionStatus; - /** Connection protocol used for this connection. */ - vpnConnectionProtocolType?: VirtualNetworkGatewayConnectionProtocol; - /** - * Ingress bytes transferred. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ingressBytesTransferred?: number; - /** - * Egress bytes transferred. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly egressBytesTransferred?: number; - /** Expected bandwidth in MBPS. */ - connectionBandwidth?: number; - /** SharedKey for the vpn link connection. We will no longer return sharedKey in any Create/Update/Get/List/UpdateTags VpnGateway/VpnConnection/VpnLinkConnection APIs response. Please use 'Vpn Link Connections - List Default Shared Key' API to fetch Vpn link connection sharedKey. */ - 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. */ - ipsecPolicies?: IpsecPolicy[]; - /** EnableBgp flag. */ - enableRateLimiting?: boolean; - /** Use local azure ip to initiate connection. */ - useLocalAzureIpAddress?: boolean; - /** - * The provisioning state of the VPN site link connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** List of ingress NatRules. */ - ingressNatRules?: SubResource[]; - /** List of egress NatRules. */ - egressNatRules?: SubResource[]; - /** Dead Peer Detection timeout in seconds for VpnLink connection. */ - dpdTimeoutSeconds?: number; -} - -/** VpnConnection Resource. */ -export interface VpnConnection extends 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; - /** Id of the connected vpn site. */ - remoteVpnSite?: SubResource; - /** Routing weight for vpn connection. */ - routingWeight?: number; - /** DPD timeout in seconds for vpn connection. */ - dpdTimeoutSeconds?: number; - /** - * The connection status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: VpnConnectionStatus; - /** Connection protocol used for this connection. */ - vpnConnectionProtocolType?: VirtualNetworkGatewayConnectionProtocol; - /** - * Ingress bytes transferred. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ingressBytesTransferred?: number; - /** - * Egress bytes transferred. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly egressBytesTransferred?: number; - /** Expected bandwidth in MBPS. */ - connectionBandwidth?: number; - /** Deprecated: SharedKey for the vpn connection. This is no more used. */ - sharedKey?: string; - /** EnableBgp flag. */ - enableBgp?: boolean; - /** Enable policy-based traffic selectors. */ - usePolicyBasedTrafficSelectors?: boolean; - /** The IPSec Policies to be considered by this connection. */ - ipsecPolicies?: IpsecPolicy[]; - /** The Traffic Selector Policies to be considered by this connection. */ - trafficSelectorPolicies?: TrafficSelectorPolicy[]; - /** EnableBgp flag. */ - enableRateLimiting?: boolean; - /** Enable internet security. */ - enableInternetSecurity?: boolean; - /** Use local azure ip to initiate connection. */ - useLocalAzureIpAddress?: boolean; - /** - * The provisioning state of the VPN connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** List of all vpn site link connections to the gateway. */ - vpnLinkConnections?: VpnSiteLinkConnection[]; - /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ - routingConfiguration?: RoutingConfiguration; -} - -/** VpnGatewayNatRule Resource. */ -export interface VpnGatewayNatRule extends 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; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The provisioning state of the NAT Rule resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The type of NAT rule for VPN NAT. */ - typePropertiesType?: VpnNatRuleType; - /** The Source NAT direction of a VPN NAT. */ - mode?: VpnNatRuleMode; - /** The private IP address internal mapping for NAT. */ - internalMappings?: VpnNatRuleMapping[]; - /** The private IP address external mapping for NAT. */ - externalMappings?: VpnNatRuleMapping[]; - /** The IP Configuration ID this NAT rule applies to. */ - ipConfigurationId?: string; - /** - * List of egress VpnSiteLinkConnections. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly egressVpnSiteLinkConnections?: SubResource[]; - /** - * List of ingress VpnSiteLinkConnections. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ingressVpnSiteLinkConnections?: SubResource[]; -} - -/** SharedKey Resource . */ -export interface ConnectionSharedKeyResult extends SubResource { - /** Properties of the shared key. */ - properties?: SharedKeyProperties; - /** 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; -} - -/** ExpressRouteConnection resource. */ -export interface ExpressRouteConnection extends SubResource { - /** The name of the resource. */ - name: string; - /** - * The provisioning state of the express route connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The ExpressRoute circuit peering. */ - expressRouteCircuitPeering?: ExpressRouteCircuitPeeringId; - /** Authorization key to establish the connection. */ - authorizationKey?: string; - /** The routing weight associated to the connection. */ - routingWeight?: number; - /** Enable internet security. */ - enableInternetSecurity?: boolean; - /** Enable FastPath to vWan Firewall hub. */ - expressRouteGatewayBypass?: boolean; - /** Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled. */ - enablePrivateLinkFastPath?: boolean; - /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ - routingConfiguration?: RoutingConfiguration; -} - -/** NetworkVirtualApplianceConnection resource. */ -export interface NetworkVirtualApplianceConnection extends SubResource { - /** The name of the resource. */ - name?: string; - /** The name of the resource. */ - namePropertiesName?: string; - /** - * The provisioning state of the NetworkVirtualApplianceConnection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Network Virtual Appliance ASN. */ - asn?: number; - /** Unique identifier for the connection. */ - tunnelIdentifier?: number; - /** List of bgpPeerAddresses for the NVA instances */ - bgpPeerAddress?: string[]; - /** Enable internet security. */ - enableInternetSecurity?: boolean; - /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ - routingConfiguration?: RoutingConfiguration; -} - -/** Virtual Appliance Site resource. */ -export interface BgpConnection extends SubResource { - /** Name of the connection. */ - 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; - /** - * Connection type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Peer ASN. */ - peerAsn?: number; - /** Peer IP. */ - peerIp?: string; - /** The reference to the HubVirtualNetworkConnection resource. */ - hubVirtualNetworkConnection?: SubResource; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The current state of the VirtualHub to Peer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionState?: HubBgpConnectionStatus; -} - -/** IpConfigurations. */ -export interface HubIpConfiguration extends SubResource { - /** Name of the Ip Configuration. */ - 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; - /** - * Ipconfiguration type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The private IP address of the IP configuration. */ - privateIPAddress?: string; - /** The private IP address allocation method. */ - privateIPAllocationMethod?: IPAllocationMethod; - /** The reference to the subnet resource. */ - subnet?: Subnet; - /** The reference to the public IP resource. */ - publicIPAddress?: PublicIPAddress; - /** - * The provisioning state of the IP configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** RouteTable resource in a virtual hub. */ -export interface HubRouteTable extends 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; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** List of all routes. */ - routes?: HubRoute[]; - /** List of labels associated with this route table. */ - labels?: string[]; - /** - * List of all connections associated with this route table. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly associatedConnections?: string[]; - /** - * List of all connections that advertise to this route table. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly propagatingConnections?: string[]; - /** - * The provisioning state of the RouteTable resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** The routing intent child resource of a Virtual hub. */ -export interface RoutingIntent extends 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; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** List of routing policies. */ - routingPolicies?: RoutingPolicy[]; - /** - * The provisioning state of the RoutingIntent resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Route Filter Rule Resource. */ -export interface PatchRouteFilterRule extends SubResource { - /** - * The name of the resource that is unique within a resource group. This name can be used to access the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly 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; - /** The access type of the rule. */ - access?: Access; - /** The rule type of the rule. */ - routeFilterRuleType?: RouteFilterRuleType; - /** The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. */ - communities?: string[]; - /** - * The provisioning state of the route filter rule resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Route Filter Resource. */ -export interface PatchRouteFilter extends SubResource { - /** - * The name of the resource that is unique within a resource group. This name can be used to access the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly 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; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** Collection of RouteFilterRules contained within a route filter. */ - rules?: RouteFilterRule[]; - /** - * A collection of references to express route circuit peerings. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly peerings?: ExpressRouteCircuitPeering[]; - /** - * A collection of references to express route circuit ipv6 peerings. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipv6Peerings?: ExpressRouteCircuitPeering[]; - /** - * The provisioning state of the route filter resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** An application security group in a resource group. */ -export interface ApplicationSecurityGroup extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the application security group resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Private endpoint resource. */ -export interface PrivateEndpoint extends Resource { - /** The extended location of the load balancer. */ - extendedLocation?: ExtendedLocation; - /** - * 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 ID of the subnet from which the private IP will be allocated. */ - subnet?: Subnet; - /** - * An array of references to the network interfaces created for this private endpoint. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkInterfaces?: NetworkInterface[]; - /** - * The provisioning state of the private endpoint resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Specifies the IP version type for the private IPs of the private endpoint. If not defined, this defaults to IPv4. */ - ipVersionType?: PrivateEndpointIPVersionType; - /** A grouping of information about the connection to the remote resource. */ - privateLinkServiceConnections?: PrivateLinkServiceConnection[]; - /** A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource. */ - manualPrivateLinkServiceConnections?: PrivateLinkServiceConnection[]; - /** An array of custom dns configurations. */ - customDnsConfigs?: CustomDnsConfigPropertiesFormat[]; - /** Application security groups in which the private endpoint IP configuration is included. */ - applicationSecurityGroups?: ApplicationSecurityGroup[]; - /** A list of IP configurations of the private endpoint. This will be used to map to the First Party Service's endpoints. */ - ipConfigurations?: PrivateEndpointIPConfiguration[]; - /** The custom name of the network interface attached to the private endpoint. */ - customNetworkInterfaceName?: string; -} - -/** Private link service resource. */ -export interface PrivateLinkService extends Resource { - /** The extended location of the load balancer. */ - extendedLocation?: ExtendedLocation; - /** - * 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; - /** An array of references to the load balancer IP configurations. */ - loadBalancerFrontendIpConfigurations?: FrontendIPConfiguration[]; - /** An array of private link service IP configurations. */ - ipConfigurations?: PrivateLinkServiceIpConfiguration[]; - /** The destination IP address of the private link service. */ - destinationIPAddress?: string; - /** The access mode of the private link service. */ - accessMode?: AccessMode; - /** - * An array of references to the network interfaces created for this private link service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkInterfaces?: NetworkInterface[]; - /** - * The provisioning state of the private link service resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * An array of list about connections to the private endpoint. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateEndpointConnections?: PrivateEndpointConnection[]; - /** The visibility list of the private link service. */ - visibility?: PrivateLinkServicePropertiesVisibility; - /** The auto-approval list of the private link service. */ - autoApproval?: PrivateLinkServicePropertiesAutoApproval; - /** The list of Fqdn. */ - fqdns?: string[]; - /** - * The alias of the private link service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly alias?: string; - /** Whether the private link service is enabled for proxy protocol or not. */ - enableProxyProtocol?: boolean; -} - -/** A network interface in a resource group. */ -export interface NetworkInterface extends Resource { - /** The extended location of the network interface. */ - extendedLocation?: ExtendedLocation; - /** - * 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 reference to a virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualMachine?: SubResource; - /** The reference to the NetworkSecurityGroup resource. */ - networkSecurityGroup?: NetworkSecurityGroup; - /** - * A reference to the private endpoint to which the network interface is linked. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateEndpoint?: PrivateEndpoint; - /** A list of IPConfigurations of the network interface. */ - ipConfigurations?: NetworkInterfaceIPConfiguration[]; - /** - * A list of TapConfigurations of the network interface. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tapConfigurations?: NetworkInterfaceTapConfiguration[]; - /** The DNS settings in network interface. */ - dnsSettings?: NetworkInterfaceDnsSettings; - /** - * The MAC address of the network interface. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly macAddress?: string; - /** - * Whether this is a primary network interface on a virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly primary?: boolean; - /** - * Whether the virtual machine this nic is attached to supports encryption. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vnetEncryptionSupported?: boolean; - /** - * Whether default outbound connectivity for nic was configured or not. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly defaultOutboundConnectivityEnabled?: boolean; - /** If the network interface is configured for accelerated networking. Not applicable to VM sizes which require accelerated networking. */ - enableAcceleratedNetworking?: boolean; - /** Indicates whether to disable tcp state tracking. */ - disableTcpStateTracking?: boolean; - /** Indicates whether IP forwarding is enabled on this network interface. */ - enableIPForwarding?: boolean; - /** - * A list of references to linked BareMetal resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hostedWorkloads?: string[]; - /** - * A reference to the dscp configuration to which the network interface is linked. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly dscpConfiguration?: SubResource; - /** - * The resource GUID property of the network interface resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the network interface resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** WorkloadType of the NetworkInterface for BareMetal resources */ - workloadType?: string; - /** Type of Network Interface resource. */ - nicType?: NetworkInterfaceNicType; - /** Privatelinkservice of the network interface resource. */ - privateLinkService?: PrivateLinkService; - /** Migration phase of Network Interface resource. */ - migrationPhase?: NetworkInterfaceMigrationPhase; - /** Auxiliary mode of Network Interface resource. */ - auxiliaryMode?: NetworkInterfaceAuxiliaryMode; - /** Auxiliary sku of Network Interface resource. */ - auxiliarySku?: NetworkInterfaceAuxiliarySku; -} - -/** A flow log resource. */ -export interface FlowLog extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** FlowLog resource Managed Identity */ - identity?: ManagedServiceIdentity; - /** ID of network security group to which flow log will be applied. */ - targetResourceId?: string; - /** - * Guid of network security group to which flow log will be applied. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetResourceGuid?: string; - /** ID of the storage account which is used to store the flow log. */ - storageId?: string; - /** Optional field to filter network traffic logs based on SrcIP, SrcPort, DstIP, DstPort, Protocol, Encryption, Direction and Action. If not specified, all network traffic will be logged. */ - enabledFilteringCriteria?: string; - /** Optional field to filter network traffic logs based on flow states. Value of this field could be any comma separated combination string of letters B,C,E or D. B represents Begin, when a flow is created. C represents Continue for an ongoing flow generated at every five-minute interval. E represents End, when a flow is terminated. D represents Deny, when a flow is denied. If not specified, all network traffic will be logged. */ - recordTypes?: string; - /** Flag to enable/disable flow logging. */ - enabled?: boolean; - /** Parameters that define the retention policy for flow log. */ - retentionPolicy?: RetentionPolicyParameters; - /** Parameters that define the flow log format. */ - format?: FlowLogFormatParameters; - /** Parameters that define the configuration of traffic analytics. */ - flowAnalyticsConfiguration?: TrafficAnalyticsProperties; - /** - * The provisioning state of the flow log. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** NetworkSecurityGroup resource. */ -export interface NetworkSecurityGroup extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** When enabled, flows created from Network Security Group connections will be re-evaluated when rules are updates. Initial enablement will trigger re-evaluation. */ - flushConnection?: boolean; - /** A collection of security rules of the network security group. */ - securityRules?: SecurityRule[]; - /** - * The default security rules of network security group. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly defaultSecurityRules?: SecurityRule[]; - /** - * A collection of references to network interfaces. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkInterfaces?: NetworkInterface[]; - /** - * A collection of references to subnets. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subnets?: Subnet[]; - /** - * A collection of references to flow log resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly flowLogs?: FlowLog[]; - /** - * The resource GUID property of the network security group resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the network security group resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Route table resource. */ -export interface RouteTable extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** Collection of routes contained within a route table. */ - routes?: Route[]; - /** - * A collection of references to subnets. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subnets?: Subnet[]; - /** Whether to disable the routes learned by BGP on that route table. True means disable. */ - disableBgpRoutePropagation?: boolean; - /** - * The provisioning state of the route table resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The resource GUID property of the route table. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Service End point policy resource. */ -export interface ServiceEndpointPolicy extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * Kind of service endpoint policy. This is metadata used for the Azure portal experience. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kind?: string; - /** A collection of service endpoint policy definitions of the service endpoint policy. */ - serviceEndpointPolicyDefinitions?: ServiceEndpointPolicyDefinition[]; - /** - * A collection of references to subnets. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subnets?: Subnet[]; - /** - * The resource GUID property of the service endpoint policy resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the service endpoint policy resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The alias indicating if the policy belongs to a service */ - serviceAlias?: string; - /** A collection of contextual service endpoint policy. */ - contextualServiceEndpointPolicies?: string[]; -} - -/** Nat Gateway resource. */ -export interface NatGateway extends Resource { - /** The nat gateway SKU. */ - sku?: NatGatewaySku; - /** A list of availability zones denoting the zone in which Nat Gateway should be deployed. */ - zones?: 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; - /** The idle timeout of the nat gateway. */ - idleTimeoutInMinutes?: number; - /** An array of public ip addresses V4 associated with the nat gateway resource. */ - publicIpAddresses?: SubResource[]; - /** An array of public ip addresses V6 associated with the nat gateway resource. */ - publicIpAddressesV6?: SubResource[]; - /** An array of public ip prefixes V4 associated with the nat gateway resource. */ - publicIpPrefixes?: SubResource[]; - /** An array of public ip prefixes V6 associated with the nat gateway resource. */ - publicIpPrefixesV6?: SubResource[]; - /** - * An array of references to the subnets using this nat gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subnets?: SubResource[]; - /** A reference to the source virtual network using this nat gateway resource. */ - sourceVirtualNetwork?: SubResource; - /** Reference to an existing service gateway. */ - serviceGateway?: SubResource; - /** - * The resource GUID property of the NAT gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the NAT gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Public IP address resource. */ -export interface PublicIPAddress extends Resource { - /** The extended location of the public ip address. */ - extendedLocation?: ExtendedLocation; - /** The public IP address SKU. */ - sku?: PublicIPAddressSku; - /** - * 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; - /** A list of availability zones denoting the IP allocated for the resource needs to come from. */ - zones?: string[]; - /** The public IP address allocation method. */ - publicIPAllocationMethod?: IPAllocationMethod; - /** The public IP address version. */ - publicIPAddressVersion?: IPVersion; - /** - * The IP configuration associated with the public IP address. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipConfiguration?: IPConfiguration; - /** The FQDN of the DNS record associated with the public IP address. */ - dnsSettings?: PublicIPAddressDnsSettings; - /** The DDoS protection custom policy associated with the public IP address. */ - ddosSettings?: DdosSettings; - /** The list of tags associated with the public IP address. */ - ipTags?: IpTag[]; - /** The IP address associated with the public IP address resource. */ - ipAddress?: string; - /** The Public IP Prefix this Public IP Address should be allocated from. */ - publicIPPrefix?: SubResource; - /** The idle timeout of the public IP address. */ - idleTimeoutInMinutes?: number; - /** - * The resource GUID property of the public IP address resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the public IP address resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The service public IP address of the public IP address resource. */ - servicePublicIPAddress?: PublicIPAddress; - /** The NatGateway for the Public IP address. */ - natGateway?: NatGateway; - /** Migration phase of Public IP Address. */ - migrationPhase?: PublicIPAddressMigrationPhase; - /** The linked public IP address of the public IP address resource. */ - linkedPublicIPAddress?: PublicIPAddress; - /** Specify what happens to the public IP address when the VM using it is deleted */ - deleteOption?: DeleteOptions; -} - -/** Virtual Network Tap resource. */ -export interface VirtualNetworkTap extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkInterfaceTapConfigurations?: NetworkInterfaceTapConfiguration[]; - /** - * The resource GUID property of the virtual network tap resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the virtual network tap resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The reference to the private IP Address of the collector nic that will receive the tap. */ - destinationNetworkInterfaceIPConfiguration?: NetworkInterfaceIPConfiguration; - /** The reference to the private IP address on the internal Load Balancer that will receive the tap. */ - destinationLoadBalancerFrontEndIPConfiguration?: FrontendIPConfiguration; - /** The VXLAN destination port that will receive the tapped traffic. */ - destinationPort?: number; -} - -/** Application gateway resource. */ -export interface ApplicationGateway extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: string[]; - /** The identity of the application gateway, if configured. */ - identity?: ManagedServiceIdentity; - /** SKU of the application gateway resource. */ - sku?: ApplicationGatewaySku; - /** SSL policy of the application gateway resource. */ - sslPolicy?: ApplicationGatewaySslPolicy; - /** - * Operational state of the application gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operationalState?: ApplicationGatewayOperationalState; - /** Subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ - gatewayIPConfigurations?: ApplicationGatewayIPConfiguration[]; - /** Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ - authenticationCertificates?: ApplicationGatewayAuthenticationCertificate[]; - /** Trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ - trustedRootCertificates?: ApplicationGatewayTrustedRootCertificate[]; - /** Trusted client certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ - trustedClientCertificates?: ApplicationGatewayTrustedClientCertificate[]; - /** SSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ - sslCertificates?: ApplicationGatewaySslCertificate[]; - /** Frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ - frontendIPConfigurations?: ApplicationGatewayFrontendIPConfiguration[]; - /** Frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ - frontendPorts?: ApplicationGatewayFrontendPort[]; - /** Probes of the application gateway resource. */ - probes?: ApplicationGatewayProbe[]; - /** Backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ - 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). */ - redirectConfigurations?: ApplicationGatewayRedirectConfiguration[]; - /** Web application firewall configuration. */ - webApplicationFirewallConfiguration?: ApplicationGatewayWebApplicationFirewallConfiguration; - /** Reference to the FirewallPolicy resource. */ - firewallPolicy?: SubResource; - /** Whether HTTP2 is enabled on the application gateway resource. */ - enableHttp2?: boolean; - /** Whether FIPS is enabled on the application gateway resource. */ - enableFips?: boolean; - /** Autoscale Configuration. */ - autoscaleConfiguration?: ApplicationGatewayAutoscaleConfiguration; - /** PrivateLink configurations on application gateway. */ - privateLinkConfigurations?: ApplicationGatewayPrivateLinkConfiguration[]; - /** - * Private Endpoint connections on application gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateEndpointConnections?: ApplicationGatewayPrivateEndpointConnection[]; - /** - * The resource GUID property of the application gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the application gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Custom error configurations of the application gateway resource. */ - customErrorConfigurations?: ApplicationGatewayCustomError[]; - /** If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config. */ - forceFirewallPolicyAssociation?: boolean; - /** Load distribution policies of the application gateway resource. */ - loadDistributionPolicies?: ApplicationGatewayLoadDistributionPolicy[]; - /** Entra JWT validation configurations for the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ - entraJWTValidationConfigs?: ApplicationGatewayEntraJWTValidationConfig[]; - /** Global Configuration. */ - globalConfiguration?: ApplicationGatewayGlobalConfiguration; - /** - * The default predefined SSL Policy applied on the application gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly defaultPredefinedSslPolicy?: ApplicationGatewaySslPolicyName; -} - -/** A web application firewall rule set. */ -export interface ApplicationGatewayFirewallRuleSet extends Resource { - /** - * The provisioning state of the web application firewall rule set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The type of the web application firewall rule set. */ - ruleSetType?: string; - /** The version of the web application firewall rule set type. */ - ruleSetVersion?: string; - /** The rule groups of the web application firewall rule set. */ - ruleGroups?: ApplicationGatewayFirewallRuleGroup[]; - /** Tier of an application gateway that support the rule set. */ - tiers?: ApplicationGatewayTierTypes[]; -} - -/** Response for ApplicationGatewayAvailableSslOptions API service call. */ -export interface ApplicationGatewayAvailableSslOptions extends Resource { - /** List of available Ssl predefined policy. */ - predefinedPolicies?: SubResource[]; - /** Name of the Ssl predefined policy applied by default to application gateway. */ - defaultPolicy?: ApplicationGatewaySslPolicyName; - /** List of available Ssl cipher suites. */ - availableCipherSuites?: ApplicationGatewaySslCipherSuite[]; - /** List of available Ssl protocols. */ - availableProtocols?: ApplicationGatewaySslProtocol[]; -} - -/** Azure Firewall resource. */ -export interface AzureFirewall extends Resource { - /** The extended location of type local virtual network gateway. */ - extendedLocation?: ExtendedLocation; - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: 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; - /** Collection of application rule collections used by Azure Firewall. */ - applicationRuleCollections?: AzureFirewallApplicationRuleCollection[]; - /** Collection of NAT rule collections used by Azure Firewall. */ - natRuleCollections?: AzureFirewallNatRuleCollection[]; - /** Collection of network rule collections used by Azure Firewall. */ - networkRuleCollections?: AzureFirewallNetworkRuleCollection[]; - /** IP configuration of the Azure Firewall resource. */ - ipConfigurations?: AzureFirewallIPConfiguration[]; - /** IP configuration of the Azure Firewall used for management traffic. */ - managementIpConfiguration?: AzureFirewallIPConfiguration; - /** - * The provisioning state of the Azure firewall resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The operation mode for Threat Intelligence. */ - threatIntelMode?: AzureFirewallThreatIntelMode; - /** The virtualHub to which the firewall belongs. */ - virtualHub?: SubResource; - /** The firewallPolicy associated with this azure firewall. */ - firewallPolicy?: SubResource; - /** IP addresses associated with AzureFirewall. */ - hubIPAddresses?: HubIPAddresses; - /** - * IpGroups associated with AzureFirewall. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipGroups?: AzureFirewallIpGroups[]; - /** The Azure Firewall Resource SKU. */ - sku?: AzureFirewallSku; - /** The additional properties used to further config this azure firewall. */ - additionalProperties?: { [propertyName: string]: string }; - /** Properties to provide a custom autoscale configuration to this azure firewall. */ - autoscaleConfiguration?: AzureFirewallAutoscaleConfiguration; -} - -/** Azure Firewall FQDN Tag Resource. */ -export interface AzureFirewallFqdnTag extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The provisioning state of the Azure firewall FQDN tag resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The name of this FQDN Tag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly fqdnTagName?: string; -} - -/** Bastion Host resource. */ -export interface BastionHost extends Resource { - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: 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; - /** The sku of this Bastion Host. */ - sku?: Sku; - /** IP configuration of the Bastion Host resource. */ - ipConfigurations?: BastionHostIPConfiguration[]; - /** FQDN for the endpoint on which bastion host is accessible. */ - dnsName?: string; - /** Reference to an existing virtual network required for Developer Bastion Host only. */ - virtualNetwork?: SubResource; - networkAcls?: BastionHostPropertiesFormatNetworkAcls; - /** - * The provisioning state of the bastion host resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The scale units for the Bastion Host resource. */ - scaleUnits?: number; - /** Enable/Disable Copy/Paste feature of the Bastion Host resource. */ - disableCopyPaste?: boolean; - /** Enable/Disable File Copy feature of the Bastion Host resource. */ - enableFileCopy?: boolean; - /** Enable/Disable IP Connect feature of the Bastion Host resource. */ - enableIpConnect?: boolean; - /** Enable/Disable Shareable Link of the Bastion Host resource. */ - enableShareableLink?: boolean; - /** Enable/Disable Tunneling feature of the Bastion Host resource. */ - enableTunneling?: boolean; - /** Enable/Disable Kerberos feature of the Bastion Host resource. */ - enableKerberos?: boolean; - /** Enable/Disable Session Recording feature of the Bastion Host resource. */ - enableSessionRecording?: boolean; - /** Enable/Disable Private Only feature of the Bastion Host resource. */ - enablePrivateOnlyBastion?: boolean; -} - -/** Describes a Virtual Machine. */ -export interface Vm extends Resource {} - -/** Custom IP prefix resource. */ -export interface CustomIpPrefix extends Resource { - /** The extended location of the custom IP prefix. */ - extendedLocation?: ExtendedLocation; - /** - * 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; - /** A list of availability zones denoting the IP allocated for the resource needs to come from. */ - zones?: string[]; - /** The ASN for CIDR advertising. Should be an integer as string. */ - asn?: string; - /** The prefix range in CIDR notation. Should include the start address and the prefix length. */ - cidr?: string; - /** Signed message for WAN validation. */ - signedMessage?: string; - /** Authorization message for WAN validation. */ - authorizationMessage?: string; - /** The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. */ - customIpPrefixParent?: SubResource; - /** - * The list of all Children for IPv6 /48 CustomIpPrefix. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly childCustomIpPrefixes?: SubResource[]; - /** The commissioned state of the Custom IP Prefix. */ - commissionedState?: CommissionedState; - /** Whether to do express route advertise. */ - expressRouteAdvertise?: boolean; - /** The Geo for CIDR advertising. Should be an Geo code. */ - geo?: Geo; - /** Whether to Advertise the range to Internet. */ - noInternetAdvertise?: boolean; - /** Type of custom IP prefix. Should be Singular, Parent, or Child. */ - prefixType?: CustomIpPrefixType; - /** - * The list of all referenced PublicIpPrefixes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIpPrefixes?: SubResource[]; - /** - * The resource GUID property of the custom IP prefix resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The reason why resource is in failed state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly failedReason?: string; - /** - * The provisioning state of the custom IP prefix resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** A DDoS custom policy in a resource group. */ -export interface DdosCustomPolicy extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the DDoS custom policy resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The list of DDoS detection rules associated with the custom policy. */ - detectionRules?: DdosDetectionRule[]; - /** The list of frontend IP configurations associated with the custom policy. */ - frontEndIpConfiguration?: SubResource[]; -} - -/** Differentiated Services Code Point configuration for any given network interface */ -export interface DscpConfiguration extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** List of markings to be used in the configuration. */ - markings?: number[]; - /** Source IP ranges. */ - sourceIpRanges?: QosIpRange[]; - /** Destination IP ranges. */ - destinationIpRanges?: QosIpRange[]; - /** Sources port ranges. */ - sourcePortRanges?: QosPortRange[]; - /** Destination port ranges. */ - destinationPortRanges?: QosPortRange[]; - /** RNM supported protocol types. */ - protocol?: ProtocolType; - /** QoS object definitions */ - qosDefinitionCollection?: QosDefinition[]; - /** - * Qos Collection ID generated by RNM. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly qosCollectionId?: string; - /** - * Associated Network Interfaces to the DSCP Configuration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly associatedNetworkInterfaces?: NetworkInterface[]; - /** - * The resource GUID property of the DSCP Configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the DSCP Configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** ExpressRouteCircuit resource. */ -export interface ExpressRouteCircuit extends Resource { - /** The SKU. */ - sku?: ExpressRouteCircuitSku; - /** - * 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; - /** Allow classic operations. */ - allowClassicOperations?: boolean; - /** The CircuitProvisioningState state of the resource. */ - circuitProvisioningState?: string; - /** The ServiceProviderProvisioningState state of the resource. */ - serviceProviderProvisioningState?: ServiceProviderProvisioningState; - /** The list of authorizations. */ - authorizations?: ExpressRouteCircuitAuthorization[]; - /** The list of peerings. */ - peerings?: ExpressRouteCircuitPeering[]; - /** The ServiceKey. */ - serviceKey?: string; - /** The ServiceProviderNotes. */ - serviceProviderNotes?: string; - /** The ServiceProviderProperties. */ - serviceProviderProperties?: ExpressRouteCircuitServiceProviderProperties; - /** The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. */ - expressRoutePort?: SubResource; - /** The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. */ - bandwidthInGbps?: number; - /** - * The identifier of the circuit traffic. Outer tag for QinQ encapsulation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly stag?: number; - /** - * The provisioning state of the express route circuit resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The GatewayManager Etag. */ - gatewayManagerEtag?: string; - /** Flag denoting global reach status. */ - globalReachEnabled?: boolean; - /** The authorizationKey. */ - authorizationKey?: string; - /** - * The authorization status of the Circuit. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly authorizationStatus?: string; - /** Flag denoting rate-limiting status of the ExpressRoute direct-port circuit. */ - enableDirectPortRateLimit?: boolean; -} - -/** A ExpressRouteResourceProvider object. */ -export interface ExpressRouteServiceProvider extends Resource { - /** A list of peering locations. */ - peeringLocations?: string[]; - /** A list of bandwidths offered. */ - bandwidthsOffered?: ExpressRouteServiceProviderBandwidthsOffered[]; - /** - * The provisioning state of the express route service provider resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** ExpressRouteCrossConnection resource. */ -export interface ExpressRouteCrossConnection extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The name of the primary port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly primaryAzurePort?: string; - /** - * The name of the secondary port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly secondaryAzurePort?: string; - /** - * The identifier of the circuit traffic. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sTag?: number; - /** - * The peering location of the ExpressRoute circuit. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly peeringLocation?: string; - /** - * The circuit bandwidth In Mbps. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly bandwidthInMbps?: number; - /** The ExpressRouteCircuit. */ - expressRouteCircuit?: ExpressRouteCircuitReference; - /** The provisioning state of the circuit in the connectivity provider system. */ - serviceProviderProvisioningState?: ServiceProviderProvisioningState; - /** Additional read only notes set by the connectivity provider. */ - serviceProviderNotes?: string; - /** - * The provisioning state of the express route cross connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The list of peerings. */ - peerings?: ExpressRouteCrossConnectionPeering[]; -} - -/** Definition of the ExpressRoutePorts peering location resource. */ -export interface ExpressRoutePortsLocation extends Resource { - /** - * Address of peering location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly address?: string; - /** - * Contact details of peering locations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly contact?: string; - /** The inventory of available ExpressRoutePort bandwidths. */ - availableBandwidths?: ExpressRoutePortsLocationBandwidths[]; - /** - * The provisioning state of the express route port location resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** ExpressRoutePort resource definition. */ -export interface ExpressRoutePort extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The identity of ExpressRoutePort, if configured. */ - identity?: ManagedServiceIdentity; - /** The name of the peering location that the ExpressRoutePort is mapped to physically. */ - peeringLocation?: string; - /** Bandwidth of procured ports in Gbps. */ - bandwidthInGbps?: number; - /** - * Aggregate Gbps of associated circuit bandwidths. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisionedBandwidthInGbps?: number; - /** - * Maximum transmission unit of the physical port pair(s). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly mtu?: string; - /** Encapsulation method on physical ports. */ - encapsulation?: ExpressRoutePortsEncapsulation; - /** - * Ether type of the physical port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etherType?: string; - /** - * Date of the physical port allocation to be used in Letter of Authorization. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly allocationDate?: string; - /** The set of physical links of the ExpressRoutePort resource. */ - links?: ExpressRouteLink[]; - /** - * Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly circuits?: SubResource[]; - /** - * The provisioning state of the express route port resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The resource GUID property of the express route port resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** The billing type of the ExpressRoutePort resource. */ - billingType?: ExpressRoutePortsBillingType; -} - -/** ExpressRouteProviderPort resource. */ -export interface ExpressRouteProviderPort extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The name of the port pair. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portPairDescriptor?: string; - /** - * The name of the primary port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly primaryAzurePort?: string; - /** - * The name of the secondary port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly secondaryAzurePort?: string; - /** The peering location of the port pair. */ - peeringLocation?: string; - /** Overprovisioning factor for the port pair. */ - overprovisionFactor?: number; - /** Bandwidth of the port in Mbps */ - portBandwidthInMbps?: number; - /** Used Bandwidth of the port in Mbps */ - usedBandwidthInMbps?: number; - /** Remaining Bandwidth of the port in Mbps */ - remainingBandwidthInMbps?: number; -} - -/** FirewallPolicy Resource. */ -export interface FirewallPolicy extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The identity of the firewall policy. */ - identity?: ManagedServiceIdentity; - /** - * A read-only string that represents the size of the FirewallPolicyPropertiesFormat in MB. (ex 0.5MB) - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly size?: string; - /** - * List of references to FirewallPolicyRuleCollectionGroups. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ruleCollectionGroups?: SubResource[]; - /** - * The provisioning state of the firewall policy resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The parent firewall policy from which rules are inherited. */ - basePolicy?: SubResource; - /** - * List of references to Azure Firewalls that this Firewall Policy is associated with. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly firewalls?: SubResource[]; - /** - * List of references to Child Firewall Policies. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly childPolicies?: SubResource[]; - /** The operation mode for Threat Intelligence. */ - threatIntelMode?: AzureFirewallThreatIntelMode; - /** ThreatIntel Whitelist for Firewall Policy. */ - threatIntelWhitelist?: FirewallPolicyThreatIntelWhitelist; - /** Insights on Firewall Policy. */ - insights?: FirewallPolicyInsights; - /** The private IP addresses/IP ranges to which traffic will not be SNAT. */ - snat?: FirewallPolicySnat; - /** SQL Settings definition. */ - sql?: FirewallPolicySQL; - /** DNS Proxy Settings definition. */ - dnsSettings?: DnsSettings; - /** Explicit Proxy Settings definition. */ - explicitProxy?: ExplicitProxy; - /** The configuration for Intrusion detection. */ - intrusionDetection?: FirewallPolicyIntrusionDetection; - /** TLS Configuration definition. */ - transportSecurity?: FirewallPolicyTransportSecurity; - /** The Firewall Policy SKU. */ - sku?: FirewallPolicySku; -} - -/** FirewallPolicy Resource. */ -export interface FirewallPolicyDraft extends Resource { - /** The parent firewall policy from which rules are inherited. */ - basePolicy?: SubResource; - /** The operation mode for Threat Intelligence. */ - threatIntelMode?: AzureFirewallThreatIntelMode; - /** ThreatIntel Whitelist for Firewall Policy. */ - threatIntelWhitelist?: FirewallPolicyThreatIntelWhitelist; - /** Insights on Firewall Policy. */ - insights?: FirewallPolicyInsights; - /** The private IP addresses/IP ranges to which traffic will not be SNAT. */ - snat?: FirewallPolicySnat; - /** SQL Settings definition. */ - sql?: FirewallPolicySQL; - /** DNS Proxy Settings definition. */ - dnsSettings?: DnsSettings; - /** Explicit Proxy Settings definition. */ - explicitProxy?: ExplicitProxy; - /** The configuration for Intrusion detection. */ - intrusionDetection?: FirewallPolicyIntrusionDetection; -} - -/** IpAllocation resource. */ -export interface IpAllocation extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The Subnet that using the prefix of this IpAllocation resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subnet?: SubResource; - /** - * The VirtualNetwork that using the prefix of this IpAllocation resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualNetwork?: SubResource; - /** The type for the IpAllocation. */ - typePropertiesType?: IpAllocationType; - /** The address prefix for the IpAllocation. */ - prefix?: string; - /** The address prefix length for the IpAllocation. */ - prefixLength?: number; - /** The address prefix Type for the IpAllocation. */ - prefixType?: IPVersion; - /** The IPAM allocation ID. */ - ipamAllocationId?: string; - /** IpAllocation tags. */ - allocationTags?: { [propertyName: string]: string }; -} - -/** The IpGroups resource information. */ -export interface IpGroup extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The provisioning state of the IpGroups resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** IpAddresses/IpAddressPrefixes in the IpGroups resource. */ - ipAddresses?: string[]; - /** - * List of references to Firewall resources that this IpGroups is associated with. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly firewalls?: SubResource[]; - /** - * List of references to Firewall Policies resources that this IpGroups is associated with. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly firewallPolicies?: SubResource[]; -} - -/** LoadBalancer resource. */ -export interface LoadBalancer extends Resource { - /** The extended location of the load balancer. */ - extendedLocation?: ExtendedLocation; - /** The load balancer SKU. */ - sku?: LoadBalancerSku; - /** - * 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; - /** Object representing the frontend IPs to be used for the load balancer. */ - frontendIPConfigurations?: FrontendIPConfiguration[]; - /** Collection of backend address pools used by a load balancer. */ - backendAddressPools?: BackendAddressPool[]; - /** Object collection representing the load balancing rules Gets the provisioning. */ - loadBalancingRules?: LoadBalancingRule[]; - /** Collection of probe objects used in the load balancer. */ - probes?: Probe[]; - /** Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. */ - inboundNatRules?: InboundNatRule[]; - /** Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. */ - inboundNatPools?: InboundNatPool[]; - /** The outbound rules. */ - outboundRules?: OutboundRule[]; - /** - * The resource GUID property of the load balancer resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the load balancer resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Indicates the scope of the load balancer: external (Public) or internal (Private). */ - scope?: LoadBalancerScope; -} - -/** The Managed Network resource */ -export interface NetworkManager extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description of the network manager. */ - description?: string; - /** Scope of Network Manager. */ - networkManagerScopes?: NetworkManagerPropertiesNetworkManagerScopes; - /** Scope Access. */ - networkManagerScopeAccesses?: ConfigurationType[]; - /** - * The provisioning state of the network manager resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Network profile resource. */ -export interface NetworkProfile extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * List of child container network interfaces. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly containerNetworkInterfaces?: ContainerNetworkInterface[]; - /** List of chid container network interface configurations. */ - containerNetworkInterfaceConfigurations?: ContainerNetworkInterfaceConfiguration[]; - /** - * The resource GUID property of the network profile resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the network profile resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** NetworkVirtualAppliance Resource. */ -export interface NetworkVirtualAppliance extends Resource { - /** The service principal that has read access to cloud-init and config blob. */ - identity?: ManagedServiceIdentity; - /** - * 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; - /** Network Virtual Appliance SKU. */ - nvaSku?: VirtualApplianceSkuProperties; - /** - * Address Prefix. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly addressPrefix?: string; - /** BootStrapConfigurationBlobs storage URLs. */ - bootStrapConfigurationBlobs?: string[]; - /** The Virtual Hub where Network Virtual Appliance is being deployed. */ - virtualHub?: SubResource; - /** CloudInitConfigurationBlob storage URLs. */ - cloudInitConfigurationBlobs?: string[]; - /** CloudInitConfiguration string in plain text. */ - cloudInitConfiguration?: string; - /** VirtualAppliance ASN. Microsoft private, public and IANA reserved ASN are not supported. */ - virtualApplianceAsn?: number; - /** Public key for SSH login. */ - sshPublicKey?: string; - /** - * List of Virtual Appliance Network Interfaces. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualApplianceNics?: VirtualApplianceNicProperties[]; - /** Network Profile containing configurations for Public and Private NIC. */ - networkProfile?: NetworkVirtualAppliancePropertiesFormatNetworkProfile; - /** Details required for Additional Network Interface. This property is not compatible with the NVA deployed in VNets. */ - additionalNics?: VirtualApplianceAdditionalNicProperties[]; - /** List of Resource Uri of Public IPs for Internet Ingress Scenario. */ - internetIngressPublicIps?: InternetIngressPublicIpsProperties[]; - /** - * List of references to VirtualApplianceSite. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualApplianceSites?: SubResource[]; - /** - * List of references to VirtualApplianceConnections. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualApplianceConnections?: SubResource[]; - /** - * List of references to InboundSecurityRules. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly inboundSecurityRules?: SubResource[]; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The deployment type. PartnerManaged for the SaaS NVA - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly deploymentType?: string; - /** The delegation for the Virtual Appliance. Only appliable for SaaS NVA. */ - delegation?: DelegationProperties; - /** The delegation for the Virtual Appliance */ - partnerManagedResource?: PartnerManagedResourceProperties; - /** The NVA in VNet interface configurations */ - nvaInterfaceConfigurations?: NvaInterfaceConfigurationsProperties[]; - /** - * A Internal Load Balancer's HA port frontend IP address. Can be used to set routes & UDR to load balance traffic between NVA instances - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIpAddress?: string; -} - -/** Definition of the NetworkVirtualApplianceSkus resource. */ -export interface NetworkVirtualApplianceSku extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * Network Virtual Appliance Sku vendor. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vendor?: string; - /** - * Available Network Virtual Appliance versions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly availableVersions?: string[]; - /** The list of scale units available. */ - availableScaleUnits?: NetworkVirtualApplianceSkuInstances[]; -} - -/** Network watcher in a resource group. */ -export interface NetworkWatcher extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The provisioning state of the network watcher resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Public IP prefix resource. */ -export interface PublicIPPrefix extends Resource { - /** The extended location of the public ip address. */ - extendedLocation?: ExtendedLocation; - /** The public IP prefix SKU. */ - sku?: PublicIPPrefixSku; - /** - * 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; - /** A list of availability zones denoting the IP allocated for the resource needs to come from. */ - zones?: string[]; - /** The public IP address version. */ - publicIPAddressVersion?: IPVersion; - /** The list of tags associated with the public IP prefix. */ - ipTags?: IpTag[]; - /** The Length of the Public IP Prefix. */ - prefixLength?: number; - /** - * The allocated Prefix. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipPrefix?: string; - /** - * The list of all referenced PublicIPAddresses. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: ReferencedPublicIpAddress[]; - /** - * The reference to load balancer frontend IP configuration associated with the public IP prefix. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly loadBalancerFrontendIpConfiguration?: SubResource; - /** The customIpPrefix that this prefix is associated with. */ - customIPPrefix?: SubResource; - /** - * The resource GUID property of the public IP prefix resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the public IP prefix resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** NatGateway of Public IP Prefix. */ - natGateway?: NatGateway; -} - -/** Route Filter Resource. */ -export interface RouteFilter extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** Collection of RouteFilterRules contained within a route filter. */ - rules?: RouteFilterRule[]; - /** - * A collection of references to express route circuit peerings. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly peerings?: ExpressRouteCircuitPeering[]; - /** - * A collection of references to express route circuit ipv6 peerings. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipv6Peerings?: ExpressRouteCircuitPeering[]; - /** - * The provisioning state of the route filter resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Security Partner Provider resource. */ -export interface SecurityPartnerProvider extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The provisioning state of the Security Partner Provider resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The security provider name. */ - securityProviderName?: SecurityProviderName; - /** - * The connection status with the Security Partner Provider. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: SecurityPartnerProviderConnectionStatus; - /** The virtualHub to which the Security Partner Provider belongs. */ - virtualHub?: SubResource; -} - -/** Service Community Properties. */ -export interface BgpServiceCommunity extends Resource { - /** The name of the bgp community. e.g. Skype. */ - serviceName?: string; - /** A list of bgp communities. */ - bgpCommunities?: BGPCommunity[]; -} - -/** Virtual Network resource. */ -export interface VirtualNetwork extends Resource { - /** The extended location of the virtual network. */ - extendedLocation?: ExtendedLocation; - /** - * 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 AddressSpace that contains an array of IP address ranges that can be used by subnets. */ - addressSpace?: AddressSpace; - /** The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. */ - dhcpOptions?: DhcpOptions; - /** The FlowTimeout value (in minutes) for the Virtual Network */ - flowTimeoutInMinutes?: number; - /** A list of subnets in a Virtual Network. */ - subnets?: Subnet[]; - /** A list of peerings in a Virtual Network. */ - virtualNetworkPeerings?: VirtualNetworkPeering[]; - /** - * The resourceGuid property of the Virtual Network resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the virtual network resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource. */ - enableDdosProtection?: boolean; - /** Indicates if VM protection is enabled for all the subnets in the virtual network. */ - enableVmProtection?: boolean; - /** The DDoS protection plan associated with the virtual network. */ - ddosProtectionPlan?: SubResource; - /** Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. */ - bgpCommunities?: VirtualNetworkBgpCommunities; - /** Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. */ - encryption?: VirtualNetworkEncryption; - /** Array of IpAllocation which reference this VNET. */ - ipAllocations?: SubResource[]; - /** - * A collection of references to flow log resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly flowLogs?: FlowLog[]; - /** Private Endpoint VNet Policies. */ - privateEndpointVNetPolicies?: PrivateEndpointVNetPolicies; - /** - * A reference to the default public nat gateway being used by this virtual network resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly defaultPublicNatGateway?: SubResource; -} - -/** Network Intent Policy resource. */ -export interface NetworkIntentPolicy extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; -} - -/** A virtual network appliance in a resource group. */ -export interface VirtualNetworkAppliance extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** Bandwidth of the VirtualNetworkAppliance resource in Gbps. */ - bandwidthInGbps?: string; - /** - * A list of IPConfigurations of the virtual network appliance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipConfigurations?: VirtualNetworkApplianceIpConfiguration[]; - /** - * The provisioning state of the virtual network appliance resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The resource GUID property of the virtual network appliance resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** The reference to the subnet resource. */ - subnet?: Subnet; -} - -/** A common class for general resource information. */ -export interface VirtualNetworkGateway extends Resource { - /** The extended location of type local virtual network gateway. */ - extendedLocation?: ExtendedLocation; - /** - * 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 identity of the virtual network gateway, if configured. */ - identity?: ManagedServiceIdentity; - /** Autoscale configuration for virutal network gateway */ - autoScaleConfiguration?: VirtualNetworkGatewayAutoScaleConfiguration; - /** IP configurations for virtual network gateway. */ - ipConfigurations?: VirtualNetworkGatewayIPConfiguration[]; - /** The type of this virtual network gateway. */ - gatewayType?: VirtualNetworkGatewayType; - /** The type of this virtual network gateway. */ - vpnType?: VpnType; - /** The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. */ - vpnGatewayGeneration?: VpnGatewayGeneration; - /** Whether BGP is enabled for this virtual network gateway or not. */ - enableBgp?: boolean; - /** Whether private IP needs to be enabled on this gateway for connections or not. */ - enablePrivateIpAddress?: boolean; - /** The reference to the VirtualNetworkGatewayMigrationStatus which represents the status of migration. */ - virtualNetworkGatewayMigrationStatus?: VirtualNetworkGatewayMigrationStatus; - /** ActiveActive flag. */ - active?: boolean; - /** To enable Advanced Connectivity feature for VPN gateway */ - enableHighBandwidthVpnGateway?: boolean; - /** disableIPSecReplayProtection flag. */ - disableIPSecReplayProtection?: boolean; - /** The reference to the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. */ - gatewayDefaultSite?: SubResource; - /** The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. */ - sku?: VirtualNetworkGatewaySku; - /** The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations. */ - vpnClientConfiguration?: VpnClientConfiguration; - /** The reference to the VirtualNetworkGatewayPolicyGroup resource which represents the available VirtualNetworkGatewayPolicyGroup for the gateway. */ - virtualNetworkGatewayPolicyGroups?: VirtualNetworkGatewayPolicyGroup[]; - /** Virtual network gateway's BGP speaker settings. */ - bgpSettings?: BgpSettings; - /** The reference to the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. */ - customRoutes?: AddressSpace; - /** - * The resource GUID property of the virtual network gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the virtual network gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Whether dns forwarding is enabled or not. */ - enableDnsForwarding?: boolean; - /** - * The IP address allocated by the gateway to which dns requests can be sent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly inboundDnsForwardingEndpoint?: string; - /** Customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet. */ - vNetExtendedLocationResourceId?: string; - /** NatRules for virtual network gateway. */ - natRules?: VirtualNetworkGatewayNatRule[]; - /** EnableBgpRouteTranslationForNat flag. */ - enableBgpRouteTranslationForNat?: boolean; - /** Configures this gateway to accept traffic from remote Virtual WAN networks. */ - allowVirtualWanTraffic?: boolean; - /** Configure this gateway to accept traffic from other Azure Virtual Networks. This configuration does not support connectivity to Azure Virtual WAN. */ - allowRemoteVnetTraffic?: boolean; - /** Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the vnet */ - adminState?: AdminState; - /** Property to indicate if the Express Route Gateway has resiliency model of MultiHomed or SingleHomed */ - resiliencyModel?: ResiliencyModel; -} - -/** A common class for general resource information. */ -export interface VirtualNetworkGatewayConnectionListEntity extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The authorizationKey. */ - authorizationKey?: string; - /** The reference to virtual network gateway resource. */ - virtualNetworkGateway1: VirtualNetworkConnectionGatewayReference; - /** The reference to virtual network gateway resource. */ - virtualNetworkGateway2?: VirtualNetworkConnectionGatewayReference; - /** The reference to local network gateway resource. */ - localNetworkGateway2?: VirtualNetworkConnectionGatewayReference; - /** Gateway connection type. */ - connectionType: VirtualNetworkGatewayConnectionType; - /** Connection protocol used for this connection. */ - connectionProtocol?: VirtualNetworkGatewayConnectionProtocol; - /** The routing weight. */ - routingWeight?: number; - /** The connection mode for this connection. */ - connectionMode?: VirtualNetworkGatewayConnectionMode; - /** The IPSec shared key. We will no longer return sharedKey in VirtualNetworkGatewayConnection Create/Update/Get/List/UpdateTags APIs response. Please use VirtualNetworkGatewayConnection GetSharedKey API to fetch connection sharedKey. */ - sharedKey?: string; - /** - * Virtual Network Gateway connection status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: VirtualNetworkGatewayConnectionStatus; - /** - * Collection of all tunnels' connection health status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tunnelConnectionStatus?: TunnelConnectionHealth[]; - /** - * The egress bytes transferred in this connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly egressBytesTransferred?: number; - /** - * The ingress bytes transferred in this connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ingressBytesTransferred?: number; - /** The reference to peerings 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. */ - ipsecPolicies?: IpsecPolicy[]; - /** The Traffic Selector Policies to be considered by this connection. */ - trafficSelectorPolicies?: TrafficSelectorPolicy[]; - /** - * The resource GUID property of the virtual network gateway connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the virtual network gateway connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Bypass ExpressRoute Gateway for data forwarding. */ - expressRouteGatewayBypass?: boolean; - /** Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled. */ - enablePrivateLinkFastPath?: boolean; -} - -/** A common class for general resource information. */ -export interface LocalNetworkGateway extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** Local network site address space. */ - localNetworkAddressSpace?: AddressSpace; - /** IP address of local network gateway. */ - gatewayIpAddress?: string; - /** FQDN of local network gateway. */ - fqdn?: string; - /** Local network gateway's BGP speaker settings. */ - bgpSettings?: BgpSettings; - /** - * The resource GUID property of the local network gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the local network gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** A common class for general resource information. */ -export interface VirtualNetworkGatewayConnection extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The authorizationKey. */ - authorizationKey?: string; - /** The reference to virtual network gateway resource. */ - virtualNetworkGateway1: VirtualNetworkGateway; - /** The reference to virtual network gateway resource. */ - virtualNetworkGateway2?: VirtualNetworkGateway; - /** The reference to local network gateway resource. */ - localNetworkGateway2?: LocalNetworkGateway; - /** List of ingress NatRules. */ - ingressNatRules?: SubResource[]; - /** List of egress NatRules. */ - egressNatRules?: SubResource[]; - /** Gateway connection type. */ - connectionType: VirtualNetworkGatewayConnectionType; - /** Connection protocol used for this connection. */ - connectionProtocol?: VirtualNetworkGatewayConnectionProtocol; - /** The routing weight. */ - routingWeight?: number; - /** The dead peer detection timeout of this connection in seconds. */ - dpdTimeoutSeconds?: number; - /** The connection mode for this connection. */ - connectionMode?: VirtualNetworkGatewayConnectionMode; - /** Tunnel properties for virtual network gateway connection */ - tunnelProperties?: VirtualNetworkGatewayConnectionTunnelProperties[]; - /** The IPSec shared key. */ - sharedKey?: string; - /** - * Virtual Network Gateway connection status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: VirtualNetworkGatewayConnectionStatus; - /** - * Collection of all tunnels' connection health status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tunnelConnectionStatus?: TunnelConnectionHealth[]; - /** - * The egress bytes transferred in this connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly egressBytesTransferred?: number; - /** - * The ingress bytes transferred in this connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ingressBytesTransferred?: number; - /** The reference to peerings 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. */ - usePolicyBasedTrafficSelectors?: boolean; - /** The IPSec Policies to be considered by this connection. */ - ipsecPolicies?: IpsecPolicy[]; - /** The Traffic Selector Policies to be considered by this connection. */ - trafficSelectorPolicies?: TrafficSelectorPolicy[]; - /** - * The resource GUID property of the virtual network gateway connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the virtual network gateway connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Bypass ExpressRoute Gateway for data forwarding. */ - expressRouteGatewayBypass?: boolean; - /** Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled. */ - enablePrivateLinkFastPath?: boolean; - /** Gateway connection authentication type. */ - authenticationType?: ConnectionAuthenticationType; - /** Certificate Authentication information for a certificate based authentication connection. */ - certificateAuthentication?: CertificateAuthentication; -} - -/** VirtualRouter Resource. */ -export interface VirtualRouter extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** VirtualRouter ASN. */ - virtualRouterAsn?: number; - /** VirtualRouter IPs. */ - virtualRouterIps?: string[]; - /** The Subnet on which VirtualRouter is hosted. */ - hostedSubnet?: SubResource; - /** The Gateway on which VirtualRouter is hosted. */ - hostedGateway?: SubResource; - /** - * List of references to VirtualRouterPeerings. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly peerings?: SubResource[]; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** VirtualWAN Resource. */ -export interface VirtualWAN extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** Vpn encryption to be disabled or not. */ - disableVpnEncryption?: boolean; - /** - * List of VirtualHubs in the VirtualWAN. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualHubs?: SubResource[]; - /** - * List of VpnSites in the VirtualWAN. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vpnSites?: SubResource[]; - /** True if branch to branch traffic is allowed. */ - allowBranchToBranchTraffic?: boolean; - /** True if Vnet to Vnet traffic is allowed. */ - allowVnetToVnetTraffic?: boolean; - /** - * The office local breakout category. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly office365LocalBreakoutCategory?: OfficeTrafficCategory; - /** - * The provisioning state of the virtual WAN resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The type of the VirtualWAN. */ - typePropertiesType?: string; -} - -/** VpnSite Resource. */ -export interface VpnSite extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The VirtualWAN to which the vpnSite belongs. */ - virtualWan?: SubResource; - /** The device properties. */ - deviceProperties?: DeviceProperties; - /** The ip-address for the vpn-site. */ - ipAddress?: string; - /** The key for vpn-site that can be used for connections. */ - siteKey?: string; - /** The AddressSpace that contains an array of IP address ranges. */ - addressSpace?: AddressSpace; - /** The set of bgp properties. */ - bgpProperties?: BgpSettings; - /** - * The provisioning state of the VPN site resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** IsSecuritySite flag. */ - isSecuritySite?: boolean; - /** List of all vpn site links. */ - vpnSiteLinks?: VpnSiteLink[]; - /** Office365 Policy. */ - o365Policy?: O365PolicyProperties; -} - -/** P2SVpnGateway Resource. */ -export interface P2SVpnGateway extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The VirtualHub to which the gateway belongs. */ - virtualHub?: SubResource; - /** List of all p2s connection configurations of the gateway. */ - p2SConnectionConfigurations?: P2SConnectionConfiguration[]; - /** - * The provisioning state of the P2S VPN gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The scale unit for this p2s vpn gateway. */ - vpnGatewayScaleUnit?: number; - /** The VpnServerConfiguration to which the p2sVpnGateway is attached to. */ - vpnServerConfiguration?: SubResource; - /** - * All P2S VPN clients' connection health status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vpnClientConnectionHealth?: VpnClientConnectionHealth; - /** List of all customer specified DNS servers IP addresses. */ - customDnsServers?: string[]; - /** Enable Routing Preference property for the Public IP Interface of the P2SVpnGateway. */ - isRoutingPreferenceInternet?: boolean; -} - -/** VpnServerConfiguration Resource. */ -export interface VpnServerConfiguration extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The name of the VpnServerConfiguration that is unique within a resource group. */ - namePropertiesName?: string; - /** VPN protocols for the VpnServerConfiguration. */ - vpnProtocols?: VpnGatewayTunnelingProtocol[]; - /** VPN authentication types for the VpnServerConfiguration. */ - vpnAuthenticationTypes?: VpnAuthenticationType[]; - /** VPN client root certificate of VpnServerConfiguration. */ - vpnClientRootCertificates?: VpnServerConfigVpnClientRootCertificate[]; - /** VPN client revoked certificate of VpnServerConfiguration. */ - vpnClientRevokedCertificates?: VpnServerConfigVpnClientRevokedCertificate[]; - /** Radius Server root certificate of VpnServerConfiguration. */ - radiusServerRootCertificates?: VpnServerConfigRadiusServerRootCertificate[]; - /** Radius client root certificate of VpnServerConfiguration. */ - radiusClientRootCertificates?: VpnServerConfigRadiusClientRootCertificate[]; - /** VpnClientIpsecPolicies for VpnServerConfiguration. */ - vpnClientIpsecPolicies?: IpsecPolicy[]; - /** The radius server address property of the VpnServerConfiguration resource for point to site client connection. */ - radiusServerAddress?: string; - /** The radius secret property of the VpnServerConfiguration resource for point to site client connection. We will no longer return radiusServerSecret in VpnServerConfiguration Create/Update/Get/List/UpdateTags APIs response. Please use VpnServerConfiguration ListRadiusSecrets API to fetch radius server secrets. */ - radiusServerSecret?: string; - /** Multiple Radius Server configuration for VpnServerConfiguration. */ - radiusServers?: RadiusServer[]; - /** The set of aad vpn authentication parameters. */ - aadAuthenticationParameters?: AadAuthenticationParameters; - /** - * The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * List of references to P2SVpnGateways. - * 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. - */ - readonly etagPropertiesEtag?: string; -} - -/** VirtualHub Resource. */ -export interface VirtualHub extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * Kind of service virtual hub. This is metadata used for the Azure portal experience for Route Server. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kind?: string; - /** The VirtualWAN to which the VirtualHub belongs. */ - virtualWan?: SubResource; - /** The VpnGateway associated with this VirtualHub. */ - vpnGateway?: SubResource; - /** The P2SVpnGateway associated with this VirtualHub. */ - p2SVpnGateway?: SubResource; - /** The expressRouteGateway associated with this VirtualHub. */ - expressRouteGateway?: SubResource; - /** The azureFirewall associated with this VirtualHub. */ - azureFirewall?: SubResource; - /** The securityPartnerProvider associated with this VirtualHub. */ - securityPartnerProvider?: SubResource; - /** Address-prefix for this VirtualHub. */ - addressPrefix?: string; - /** The routeTable associated with this virtual hub. */ - routeTable?: VirtualHubRouteTable; - /** - * The provisioning state of the virtual hub resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The Security Provider name. */ - securityProviderName?: string; - /** List of all virtual hub route table v2s associated with this VirtualHub. */ - virtualHubRouteTableV2S?: VirtualHubRouteTableV2[]; - /** The sku of this VirtualHub. */ - sku?: string; - /** - * The routing state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly routingState?: RoutingState; - /** - * List of references to Bgp Connections. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly bgpConnections?: SubResource[]; - /** - * List of references to IpConfigurations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipConfigurations?: SubResource[]; - /** - * List of references to RouteMaps. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly routeMaps?: SubResource[]; - /** VirtualRouter ASN. */ - virtualRouterAsn?: number; - /** VirtualRouter IPs. */ - virtualRouterIps?: string[]; - /** Flag to control transit for VirtualRouter hub. */ - allowBranchToBranchTraffic?: boolean; - /** The preferred gateway to route on-prem traffic */ - preferredRoutingGateway?: PreferredRoutingGateway; - /** The hubRoutingPreference of this VirtualHub. */ - hubRoutingPreference?: HubRoutingPreference; - /** The VirtualHub Router autoscale configuration. */ - virtualRouterAutoScaleConfiguration?: VirtualRouterAutoScaleConfiguration; -} - -/** VpnGateway Resource. */ -export interface VpnGateway extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The VirtualHub to which the gateway belongs. */ - virtualHub?: SubResource; - /** List of all vpn connections to the gateway. */ - connections?: VpnConnection[]; - /** Local network gateway's BGP speaker settings. */ - bgpSettings?: BgpSettings; - /** - * The provisioning state of the VPN gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** The scale unit for this vpn gateway. */ - vpnGatewayScaleUnit?: number; - /** - * List of all IPs configured on the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipConfigurations?: VpnGatewayIpConfiguration[]; - /** Enable BGP routes translation for NAT on this VpnGateway. */ - enableBgpRouteTranslationForNat?: boolean; - /** Enable Routing Preference property for the Public IP Interface of the VpnGateway. */ - isRoutingPreferenceInternet?: boolean; - /** List of all the nat Rules associated with the gateway. */ - natRules?: VpnGatewayNatRule[]; -} - -/** ExpressRoute gateway resource. */ -export interface ExpressRouteGateway extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** Configuration for auto scaling. */ - autoScaleConfiguration?: ExpressRouteGatewayPropertiesAutoScaleConfiguration; - /** 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. - */ - readonly provisioningState?: ProvisioningState; - /** The Virtual Hub where the ExpressRoute gateway is or will be deployed. */ - virtualHub?: VirtualHubId; - /** Configures this gateway to accept traffic from non Virtual WAN networks. */ - allowNonVirtualWanTraffic?: boolean; -} - -/** Defines web application firewall policy. */ -export interface WebApplicationFirewallPolicy extends Resource { - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The PolicySettings for policy. */ - policySettings?: PolicySettings; - /** The custom rules inside the policy. */ - customRules?: WebApplicationFirewallCustomRule[]; - /** - * A collection of references to application gateways. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly applicationGateways?: ApplicationGateway[]; - /** - * The provisioning state of the web application firewall policy resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Resource status of the policy. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceState?: WebApplicationFirewallPolicyResourceState; - /** Describes the managedRules structure. */ - managedRules?: ManagedRulesDefinition; - /** - * A collection of references to application gateway http listeners. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly httpListeners?: SubResource[]; - /** - * A collection of references to application gateway path rules. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly pathBasedRules?: SubResource[]; - /** - * A collection of references to application gateway for containers. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly applicationGatewayForContainers?: ApplicationGatewayForContainersReferenceDefinition[]; -} - -/** The visibility list of the private link service. */ -export interface PrivateLinkServicePropertiesVisibility extends ResourceSet {} - -/** The auto-approval list of the private link service. */ -export interface PrivateLinkServicePropertiesAutoApproval extends ResourceSet {} - -/** Firewall Policy NAT Rule Collection. */ -export interface FirewallPolicyNatRuleCollection extends FirewallPolicyRuleCollection { - /** Polymorphic discriminator, which specifies the different types this object can be */ - ruleCollectionType: "FirewallPolicyNatRuleCollection"; - /** The action type of a Nat rule collection. */ - action?: FirewallPolicyNatRuleCollectionAction; - /** List of rules included in a rule collection. */ - rules?: FirewallPolicyRuleUnion[]; -} - -/** Firewall Policy Filter Rule Collection. */ -export interface FirewallPolicyFilterRuleCollection extends FirewallPolicyRuleCollection { - /** Polymorphic discriminator, which specifies the different types this object can be */ - ruleCollectionType: "FirewallPolicyFilterRuleCollection"; - /** The action type of a Filter rule collection. */ - action?: FirewallPolicyFilterRuleCollectionAction; - /** List of rules included in a rule collection. */ - rules?: FirewallPolicyRuleUnion[]; -} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface CommonTrackedResource extends CommonResource { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface CommonProxyResource extends CommonResource {} - -/** Active connectivity configuration. */ -export interface ActiveConnectivityConfiguration extends EffectiveConnectivityConfiguration { - /** Deployment time string. */ - commitTime?: Date; - /** Deployment region. */ - region?: string; -} - -/** Network admin rule. */ -export interface ActiveSecurityAdminRule extends ActiveBaseSecurityAdminRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "Custom"; - /** A description for this rule. Restricted to 140 chars. */ - description?: string; - /** Network protocol this rule applies to. */ - protocol?: SecurityConfigurationRuleProtocol; - /** The CIDR or source IP ranges. */ - sources?: AddressPrefixItem[]; - /** The destination address prefixes. CIDR or destination IP ranges. */ - destinations?: AddressPrefixItem[]; - /** The source port ranges. */ - sourcePortRanges?: string[]; - /** The destination port ranges. */ - destinationPortRanges?: string[]; - /** Indicates the access allowed for this particular rule */ - access?: SecurityConfigurationRuleAccess; - /** The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ - priority?: number; - /** Indicates if the traffic matched against the rule in inbound or outbound. */ - direction?: SecurityConfigurationRuleDirection; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Network default admin rule. */ -export interface ActiveDefaultSecurityAdminRule extends ActiveBaseSecurityAdminRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "Default"; - /** - * A description for this rule. Restricted to 140 chars. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** Default rule flag. */ - flag?: string; - /** - * Network protocol this rule applies to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly protocol?: SecurityConfigurationRuleProtocol; - /** - * The CIDR or source IP ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sources?: AddressPrefixItem[]; - /** - * The destination address prefixes. CIDR or destination IP ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly destinations?: AddressPrefixItem[]; - /** - * The source port ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sourcePortRanges?: string[]; - /** - * The destination port ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly destinationPortRanges?: string[]; - /** - * Indicates the access allowed for this particular rule - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly access?: SecurityConfigurationRuleAccess; - /** - * The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly priority?: number; - /** - * Indicates if the traffic matched against the rule in inbound or outbound. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly direction?: SecurityConfigurationRuleDirection; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** The Network Manager Connection resource */ -export interface NetworkManagerConnection extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** Network Manager Id. */ - networkManagerId?: string; - /** - * Connection state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionState?: ScopeConnectionState; - /** A description of the network manager connection. */ - description?: string; -} - -/** The network manager connectivity configuration resource */ -export interface ConnectivityConfiguration extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description of the connectivity configuration. */ - description?: string; - /** Connectivity topology type. */ - connectivityTopology?: ConnectivityTopology; - /** List of hubItems */ - hubs?: Hub[]; - /** Flag if global mesh is supported. */ - isGlobal?: IsGlobal; - /** Collection of additional settings to enhance specific topology behaviors of the connectivity configuration resource. */ - connectivityCapabilities?: ConnectivityConfigurationPropertiesConnectivityCapabilities; - /** Groups for configuration */ - appliesToGroups?: ConnectivityGroupItem[]; - /** - * The provisioning state of the connectivity configuration resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** Flag if need to remove current existing peerings. */ - deleteExistingPeering?: DeleteExistingPeering; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** The network group resource */ -export interface NetworkGroup extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description of the network group. */ - description?: string; - /** The type of the group member. */ - memberType?: GroupMemberType; - /** - * The provisioning state of the scope assignment resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** StaticMember Item. */ -export interface StaticMember extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** Resource Id. */ - resourceId?: string; - /** - * Resource region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly region?: string; - /** - * The provisioning state of the scope assignment resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Defines the routing configuration */ -export interface NetworkManagerRoutingConfiguration extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description of the routing configuration. */ - description?: string; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** Route table usage mode defines which route table will be used by the configuration. If not defined, this will default to 'ManagedOnly'. */ - routeTableUsageMode?: RouteTableUsageMode; -} - -/** Defines the routing rule collection. */ -export interface RoutingRuleCollection extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description of the routing rule collection. */ - description?: string; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** Groups for configuration */ - appliesTo?: NetworkManagerRoutingGroupItem[]; - /** Determines whether BGP route propagation is enabled. Defaults to true. */ - disableBgpRoutePropagation?: DisableBgpRoutePropagation; -} - -/** Network routing rule. */ -export interface RoutingRule extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description for this rule. */ - description?: string; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** Indicates the destination for this particular rule. */ - destination?: RoutingRuleRouteDestination; - /** Indicates the next hop for this particular rule. */ - nextHop?: RoutingRuleNextHop; -} - -/** The Scope Connections resource */ -export interface ScopeConnection extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** Tenant ID. */ - tenantId?: string; - /** Resource ID. */ - resourceId?: string; - /** - * Connection State - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionState?: ScopeConnectionState; - /** A description of the scope connection. */ - description?: string; -} - -/** Defines the security admin configuration */ -export interface SecurityAdminConfiguration extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description of the security configuration. */ - description?: string; - /** Enum list of network intent policy based services. */ - applyOnNetworkIntentPolicyBasedServices?: NetworkIntentPolicyBasedService[]; - /** Determine update behavior for changes to network groups referenced within the rules in this configuration. */ - networkGroupAddressSpaceAggregationOption?: AddressSpaceAggregationOption; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Defines the admin rule collection. */ -export interface AdminRuleCollection extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description of the admin rule collection. */ - description?: string; - /** Groups for configuration */ - appliesToGroups?: NetworkManagerSecurityGroupItem[]; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Network base admin rule. */ -export interface BaseAdminRule extends ChildResource { - /** Whether the rule is custom or default. */ - kind: AdminRuleKind; - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Defines the security user configuration */ -export interface SecurityUserConfiguration extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description of the security user configuration. */ - description?: string; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Defines the security user rule collection. */ -export interface SecurityUserRuleCollection extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description of the security user rule collection. */ - description?: string; - /** Groups for configuration */ - appliesToGroups?: SecurityUserGroupItem[]; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Network security user rule. */ -export interface SecurityUserRule extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description for this rule. */ - description?: string; - /** Network protocol this rule applies to. */ - protocol?: SecurityConfigurationRuleProtocol; - /** The CIDR or source IP ranges. */ - sources?: AddressPrefixItem[]; - /** The destination address prefixes. CIDR or destination IP ranges. */ - destinations?: AddressPrefixItem[]; - /** The source port ranges. */ - sourcePortRanges?: string[]; - /** The destination port ranges. */ - destinationPortRanges?: string[]; - /** Indicates if the traffic matched against the rule in inbound or outbound. */ - direction?: SecurityConfigurationRuleDirection; - /** - * The provisioning state of the security configuration user rule resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Network admin rule. */ -export interface EffectiveSecurityAdminRule extends EffectiveBaseSecurityAdminRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "Custom"; - /** A description for this rule. Restricted to 140 chars. */ - description?: string; - /** Network protocol this rule applies to. */ - protocol?: SecurityConfigurationRuleProtocol; - /** The CIDR or source IP ranges. */ - sources?: AddressPrefixItem[]; - /** The destination address prefixes. CIDR or destination IP ranges. */ - destinations?: AddressPrefixItem[]; - /** The source port ranges. */ - sourcePortRanges?: string[]; - /** The destination port ranges. */ - destinationPortRanges?: string[]; - /** Indicates the access allowed for this particular rule */ - access?: SecurityConfigurationRuleAccess; - /** The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ - priority?: number; - /** Indicates if the traffic matched against the rule in inbound or outbound. */ - direction?: SecurityConfigurationRuleDirection; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Network default admin rule. */ -export interface EffectiveDefaultSecurityAdminRule extends EffectiveBaseSecurityAdminRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "Default"; - /** - * A description for this rule. Restricted to 140 chars. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** Default rule flag. */ - flag?: string; - /** - * Network protocol this rule applies to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly protocol?: SecurityConfigurationRuleProtocol; - /** - * The CIDR or source IP ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sources?: AddressPrefixItem[]; - /** - * The destination address prefixes. CIDR or destination IP ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly destinations?: AddressPrefixItem[]; - /** - * The source port ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sourcePortRanges?: string[]; - /** - * The destination port ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly destinationPortRanges?: string[]; - /** - * Indicates the access allowed for this particular rule - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly access?: SecurityConfigurationRuleAccess; - /** - * The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly priority?: number; - /** - * Indicates if the traffic matched against the rule in inbound or outbound. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly direction?: SecurityConfigurationRuleDirection; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends SecurityPerimeterResource { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface SecurityPerimeterProxyResource extends SecurityPerimeterResource {} - -/** The properties of a packet capture session. */ -export interface PacketCaptureResultProperties extends PacketCaptureParameters { - /** - * The provisioning state of the packet capture session. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Describes the properties of a connection monitor. */ -export interface ConnectionMonitorResultProperties extends ConnectionMonitorParameters { - /** - * The provisioning state of the connection monitor. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The date and time when the connection monitor was started. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startTime?: Date; - /** - * The monitoring status of the connection monitor. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monitoringStatus?: string; - /** - * Type of connection monitor. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionMonitorType?: ConnectionMonitorType; -} - -/** Rule of type application. */ -export interface ApplicationRule extends FirewallPolicyRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - ruleType: "ApplicationRule"; - /** List of source IP addresses for this rule. */ - sourceAddresses?: string[]; - /** List of destination IP addresses or Service Tags. */ - destinationAddresses?: string[]; - /** Array of Application Protocols. */ - protocols?: FirewallPolicyRuleApplicationProtocol[]; - /** List of FQDNs for this rule. */ - targetFqdns?: string[]; - /** List of Urls for this rule condition. */ - targetUrls?: string[]; - /** List of FQDN Tags for this rule. */ - fqdnTags?: string[]; - /** List of source IpGroups for this rule. */ - sourceIpGroups?: string[]; - /** Terminate TLS connections for this rule. */ - terminateTLS?: boolean; - /** List of destination azure web categories. */ - webCategories?: string[]; - /** List of HTTP/S headers to insert. */ - httpHeadersToInsert?: FirewallPolicyHttpHeaderToInsert[]; -} - -/** Rule of type nat. */ -export interface NatRule extends FirewallPolicyRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - ruleType: "NatRule"; - /** Array of FirewallPolicyRuleNetworkProtocols. */ - ipProtocols?: FirewallPolicyRuleNetworkProtocol[]; - /** List of source IP addresses for this rule. */ - sourceAddresses?: string[]; - /** List of destination IP addresses or Service Tags. */ - destinationAddresses?: string[]; - /** List of destination ports. */ - destinationPorts?: string[]; - /** The translated address for this NAT rule. */ - translatedAddress?: string; - /** The translated port for this NAT rule. */ - translatedPort?: string; - /** List of source IpGroups for this rule. */ - sourceIpGroups?: string[]; - /** The translated FQDN for this NAT rule. */ - translatedFqdn?: string; -} - -/** Rule of type network. */ -export interface NetworkRule extends FirewallPolicyRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - ruleType: "NetworkRule"; - /** Array of FirewallPolicyRuleNetworkProtocols. */ - ipProtocols?: FirewallPolicyRuleNetworkProtocol[]; - /** List of source IP addresses for this rule. */ - sourceAddresses?: string[]; - /** List of destination IP addresses or Service Tags. */ - destinationAddresses?: string[]; - /** List of destination ports. */ - destinationPorts?: string[]; - /** List of source IpGroups for this rule. */ - sourceIpGroups?: string[]; - /** List of destination IpGroups for this rule. */ - destinationIpGroups?: string[]; - /** List of destination FQDNs. */ - destinationFqdns?: string[]; -} - -/** Instance of Pool resource. */ -export interface IpamPool extends CommonTrackedResource { - /** Properties of IpamPool resource properties which are specific to the Pool resource. */ - properties: IpamPoolProperties; - /** - * String representing unique etag for the resource document. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; -} - -/** Instance of Verifier Workspace. */ -export interface VerifierWorkspace extends CommonTrackedResource { - /** Properties of Verifier Workspace resource. */ - properties?: VerifierWorkspaceProperties; - /** - * String representing unique etag for the resource document. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; -} - -/** Instance of StaticCidr resource. */ -export interface StaticCidr extends CommonProxyResource { - /** Properties of static CIDR resource. */ - properties?: StaticCidrProperties; -} - -/** Configuration information or intent on which to do the analysis on. */ -export interface ReachabilityAnalysisIntent extends CommonProxyResource { - /** Represents the Reachability Analysis Intent properties. */ - properties: ReachabilityAnalysisIntentProperties; -} - -/** Configuration information for analysis run. */ -export interface ReachabilityAnalysisRun extends CommonProxyResource { - /** Represents the Reachability Analysis Run properties. */ - properties: ReachabilityAnalysisRunProperties; -} - -/** Network admin rule. */ -export interface AdminRule extends BaseAdminRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "Custom"; - /** A description for this rule. Restricted to 140 chars. */ - description?: string; - /** Network protocol this rule applies to. */ - protocol?: SecurityConfigurationRuleProtocol; - /** The CIDR or source IP ranges. */ - sources?: AddressPrefixItem[]; - /** The destination address prefixes. CIDR or destination IP ranges. */ - destinations?: AddressPrefixItem[]; - /** The source port ranges. */ - sourcePortRanges?: string[]; - /** The destination port ranges. */ - destinationPortRanges?: string[]; - /** Indicates the access allowed for this particular rule */ - access?: SecurityConfigurationRuleAccess; - /** The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ - priority?: number; - /** Indicates if the traffic matched against the rule in inbound or outbound. */ - direction?: SecurityConfigurationRuleDirection; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Network default admin rule. */ -export interface DefaultAdminRule extends BaseAdminRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "Default"; - /** - * A description for this rule. Restricted to 140 chars. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** Default rule flag. */ - flag?: string; - /** - * Network protocol this rule applies to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly protocol?: SecurityConfigurationRuleProtocol; - /** - * The CIDR or source IP ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sources?: AddressPrefixItem[]; - /** - * The destination address prefixes. CIDR or destination IP ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly destinations?: AddressPrefixItem[]; - /** - * The source port ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sourcePortRanges?: string[]; - /** - * The destination port ranges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly destinationPortRanges?: string[]; - /** - * Indicates the access allowed for this particular rule - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly access?: SecurityConfigurationRuleAccess; - /** - * The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly priority?: number; - /** - * Indicates if the traffic matched against the rule in inbound or outbound. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly direction?: SecurityConfigurationRuleDirection; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** The Network Security Perimeter resource */ -export interface NetworkSecurityPerimeter extends TrackedResource { - /** - * The provisioning state of the scope assignment resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: NspProvisioningState; - /** - * perimeter guid of the network security perimeter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly perimeterGuid?: string; -} - -/** ServiceGateway resource. */ -export interface ServiceGateway extends TrackedResource { - /** - * 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 service gateway SKU. */ - sku?: ServiceGatewaySku; - /** - * A list of availability zones denoting the zone in which service gateway should be deployed. - * - * - The zone values must be provided as strings representing numeric identifiers like "1", "2", "3" etc. - */ - zones?: string[]; - /** Reference to an existing virtual network. */ - virtualNetwork?: VirtualNetwork; - /** Route Target address of Service gateway */ - routeTargetAddress?: RouteTargetAddressPropertiesFormat; - /** Route Target address V6 of Service gateway */ - routeTargetAddressV6?: RouteTargetAddressPropertiesFormat; - /** - * The resource GUID property of the service gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** - * The provisioning state of the service gateway resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** The network security perimeter profile resource */ -export interface NspProfile extends SecurityPerimeterProxyResource { - /** - * Version number that increases with every update to access rules within the profile. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly accessRulesVersion?: string; - /** - * Version number that increases with every update to diagnostic settings within the profile. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly diagnosticSettingsVersion?: string; -} - -/** The NSP access rule resource */ -export interface NspAccessRule extends SecurityPerimeterProxyResource { - /** - * The provisioning state of the scope assignment resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: NspProvisioningState; - /** Direction that specifies whether the access rules is inbound/outbound. */ - direction?: AccessRuleDirection; - /** Inbound address prefixes (IPv4/IPv6) */ - addressPrefixes?: string[]; - /** Outbound rules in fully qualified domain name format. */ - fullyQualifiedDomainNames?: string[]; - /** List of subscription ids */ - subscriptions?: SubscriptionId[]; - /** - * Rule specified by the perimeter id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkSecurityPerimeters?: PerimeterBasedAccessRule[]; - /** Outbound rules in email address format. This access rule type is currently unavailable for use. */ - emailAddresses?: string[]; - /** Outbound rules in phone number format. This access rule type is currently unavailable for use. */ - phoneNumbers?: string[]; - /** Inbound rules of type service tag. This access rule type is currently unavailable for use. */ - serviceTags?: string[]; -} - -/** The NSP resource association resource */ -export interface NspAssociation extends SecurityPerimeterProxyResource { - /** - * The provisioning state of the resource association resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: NspProvisioningState; - /** The PaaS resource to be associated. */ - privateLinkResource?: SubResource; - /** Profile id to which the PaaS resource is associated. */ - profile?: SubResource; - /** Access mode on the association. */ - accessMode?: AssociationAccessMode; - /** - * Specifies if there are provisioning issues - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hasProvisioningIssues?: string; -} - -/** The network security perimeter link resource */ -export interface NspLink extends SecurityPerimeterProxyResource { - /** - * The provisioning state of the NSP Link resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: NspLinkProvisioningState; - /** Perimeter ARM Id for the remote NSP with which the link gets created in Auto-approval mode. It should be used when the NSP admin have Microsoft.Network/networkSecurityPerimeters/linkPerimeter/action permission on the remote NSP resource. */ - autoApprovedRemotePerimeterResourceId?: string; - /** - * Remote NSP Guid with which the link gets created. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remotePerimeterGuid?: string; - /** - * Remote NSP location with which the link gets created. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remotePerimeterLocation?: string; - /** Local Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. */ - localInboundProfiles?: string[]; - /** - * Local Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly localOutboundProfiles?: string[]; - /** Remote Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. This property can only be updated in auto-approval mode. */ - remoteInboundProfiles?: string[]; - /** - * Remote Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remoteOutboundProfiles?: string[]; - /** A message passed to the owner of the remote NSP link resource with this connection request. In case of Auto-approved flow, it is default to 'Auto Approved'. Restricted to 140 chars. */ - description?: string; - /** - * The NSP link state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: NspLinkStatus; -} - -/** The network security perimeter linkReference resource */ -export interface NspLinkReference extends SecurityPerimeterProxyResource { - /** - * The provisioning state of the NSP LinkReference resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: NspLinkProvisioningState; - /** - * Perimeter ARM Id for the remote NSP with which the link is created. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remotePerimeterResourceId?: string; - /** - * Remote NSP Guid with which the link is created. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remotePerimeterGuid?: string; - /** - * Remote NSP location with which the link gets created. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remotePerimeterLocation?: string; - /** Local Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. */ - localInboundProfiles?: string[]; - /** - * Local Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly localOutboundProfiles?: string[]; - /** - * Remote Inbound profile names to which Inbound is allowed. ['*'] value implies inbound is allowed to all profiles at remote perimeter. This property can only be updated from corresponding link resource present in remote perimeter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remoteInboundProfiles?: string[]; - /** - * Remote Outbound profile names from which Outbound is allowed. ['*'] value implies outbound is allowed from all profiles at remote perimeter. This property can only be updated from corresponding link resource present in remote perimeter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remoteOutboundProfiles?: string[]; - /** - * A message sent by the remote NSP link admin for connection request. In case of Auto-approved flow, it is default to 'Auto Approved'. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** The NSP linkReference state. It cannot be changed if link is created in auto-approval mode. */ - status?: NspLinkStatus; -} - -/** The NSP logging configuration */ -export interface NspLoggingConfiguration extends SecurityPerimeterProxyResource { - /** The log categories to enable in the NSP logging configuration. */ - enabledLogCategories?: string[]; - /** The version of the NSP logging configuration. */ - version?: string; -} - -/** Defines headers for AzureFirewalls_packetCapture operation. */ -export interface AzureFirewallsPacketCaptureHeaders { - location?: string; -} - -/** Defines headers for AzureFirewalls_packetCaptureOperation operation. */ -export interface AzureFirewallsPacketCaptureOperationHeaders { - location?: string; -} - -/** Defines headers for NetworkManagementClient_deleteBastionShareableLinkByToken operation. */ -export interface NetworkManagementClientDeleteBastionShareableLinkByTokenHeaders { - location?: string; -} - -/** Defines headers for PublicIPAddresses_delete operation. */ -export interface PublicIPAddressesDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for PublicIPAddresses_ddosProtectionStatus operation. */ -export interface PublicIPAddressesDdosProtectionStatusHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for PublicIPAddresses_reserveCloudServicePublicIpAddress operation. */ -export interface PublicIPAddressesReserveCloudServicePublicIpAddressHeaders { - /** - * URL for determining when an operation has completed. Send a GET request to the URL in Location header. - * The URI should return a 202 until the operation reaches a terminal state and 200 once it reaches a terminal state. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#202-accepted-and-location-headers - */ - location?: string; - /** - * URL for checking the ongoing status of the operation. - * To get the status of the asynchronous operation, send a GET request to the URL in Azure-AsyncOperation header value. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#asynchronous-operations - */ - azureAsyncOperation?: string; -} - -/** Defines headers for PublicIPAddresses_disassociateCloudServiceReservedPublicIp operation. */ -export interface PublicIPAddressesDisassociateCloudServiceReservedPublicIpHeaders { - /** - * URL for determining when an operation has completed. Send a GET request to the URL in Location header. - * The URI should return a 202 until the operation reaches a terminal state and 200 once it reaches a terminal state. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#202-accepted-and-location-headers - */ - location?: string; - /** - * URL for checking the ongoing status of the operation. - * To get the status of the asynchronous operation, send a GET request to the URL in Azure-AsyncOperation header value. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#asynchronous-operations - */ - azureAsyncOperation?: string; -} - -/** Defines headers for DdosCustomPolicies_delete operation. */ -export interface DdosCustomPoliciesDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for DdosProtectionPlans_delete operation. */ -export interface DdosProtectionPlansDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for ExpressRoutePorts_delete operation. */ -export interface ExpressRoutePortsDeleteHeaders { - /** - * URL for determining when an operation has completed. Send a GET request to the URL in Location header. - * The URI should return a 202 until the operation reaches a terminal state and 200 once it reaches a terminal state. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#202-accepted-and-location-headers - */ - location?: string; - /** - * URL for checking the ongoing status of the operation. - * To get the status of the asynchronous operation, send a GET request to the URL in Azure-AsyncOperation header value. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#asynchronous-operations - */ - azureAsyncOperation?: string; -} - -/** Defines headers for ExpressRoutePortAuthorizations_delete operation. */ -export interface ExpressRoutePortAuthorizationsDeleteHeaders { - /** - * URL for determining when an operation has completed. Send a GET request to the URL in Location header. - * The URI should return a 202 until the operation reaches a terminal state and 200 once it reaches a terminal state. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#202-accepted-and-location-headers - */ - location?: string; - /** - * URL for checking the ongoing status of the operation. - * To get the status of the asynchronous operation, send a GET request to the URL in Azure-AsyncOperation header value. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#asynchronous-operations - */ - azureAsyncOperation?: string; -} - -/** Defines headers for FirewallPolicyDeployments_deploy operation. */ -export interface FirewallPolicyDeploymentsDeployHeaders { - /** URL to get the status of the operation. */ - location?: string; - /** URL to get the status of the operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for IpamPools_create operation. */ -export interface IpamPoolsCreateHeaders { - azureAsyncOperation?: string; -} - -/** Defines headers for IpamPools_delete operation. */ -export interface IpamPoolsDeleteHeaders { - location?: string; -} - -/** Defines headers for StaticCidrs_delete operation. */ -export interface StaticCidrsDeleteHeaders { - location?: string; -} - -/** Defines headers for IpAllocations_delete operation. */ -export interface IpAllocationsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for LoadBalancerLoadBalancingRules_health operation. */ -export interface LoadBalancerLoadBalancingRulesHealthHeaders { - /** URI to query the status of the long-running operation. */ - location?: string; -} - -/** Defines headers for NetworkManagers_delete operation. */ -export interface NetworkManagersDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for NetworkManagerCommits_post operation. */ -export interface NetworkManagerCommitsPostHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for ConnectivityConfigurations_delete operation. */ -export interface ConnectivityConfigurationsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for NetworkGroups_createOrUpdate operation. */ -export interface NetworkGroupsCreateOrUpdateHeaders { - /** The current entity tag. */ - eTag?: string; -} - -/** Defines headers for NetworkGroups_delete operation. */ -export interface NetworkGroupsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for NetworkManagerRoutingConfigurations_delete operation. */ -export interface NetworkManagerRoutingConfigurationsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for RoutingRuleCollections_delete operation. */ -export interface RoutingRuleCollectionsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for RoutingRules_delete operation. */ -export interface RoutingRulesDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for SecurityAdminConfigurations_delete operation. */ -export interface SecurityAdminConfigurationsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for AdminRuleCollections_delete operation. */ -export interface AdminRuleCollectionsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for AdminRules_delete operation. */ -export interface AdminRulesDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for SecurityUserConfigurations_delete operation. */ -export interface SecurityUserConfigurationsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for SecurityUserRuleCollections_delete operation. */ -export interface SecurityUserRuleCollectionsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for SecurityUserRules_delete operation. */ -export interface SecurityUserRulesDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for NetworkSecurityPerimeters_delete operation. */ -export interface NetworkSecurityPerimetersDeleteHeaders { - /** Azure async operation header */ - azureAsyncOperation?: string; -} - -/** Defines headers for NetworkSecurityPerimeterAssociations_createOrUpdate operation. */ -export interface NetworkSecurityPerimeterAssociationsCreateOrUpdateHeaders { - /** Azure async operation header */ - azureAsyncOperation?: string; -} - -/** Defines headers for NetworkSecurityPerimeterAssociations_delete operation. */ -export interface NetworkSecurityPerimeterAssociationsDeleteHeaders { - /** Azure async operation header */ - azureAsyncOperation?: string; -} - -/** Defines headers for NetworkSecurityPerimeterLinks_delete operation. */ -export interface NetworkSecurityPerimeterLinksDeleteHeaders { - /** location header */ - location?: string; -} - -/** Defines headers for NetworkSecurityPerimeterLinkReferences_delete operation. */ -export interface NetworkSecurityPerimeterLinkReferencesDeleteHeaders { - /** location header */ - location?: string; -} - -/** Defines headers for ReachabilityAnalysisRuns_delete operation. */ -export interface ReachabilityAnalysisRunsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for VerifierWorkspaces_delete operation. */ -export interface VerifierWorkspacesDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for NetworkVirtualAppliances_delete operation. */ -export interface NetworkVirtualAppliancesDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for NetworkVirtualAppliances_createOrUpdate operation. */ -export interface NetworkVirtualAppliancesCreateOrUpdateHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for NetworkVirtualAppliances_restart operation. */ -export interface NetworkVirtualAppliancesRestartHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for NetworkVirtualAppliances_reimage operation. */ -export interface NetworkVirtualAppliancesReimageHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for NetworkVirtualAppliances_getBootDiagnosticLogs operation. */ -export interface NetworkVirtualAppliancesGetBootDiagnosticLogsHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for RouteFilters_delete operation. */ -export interface RouteFiltersDeleteHeaders { - /** - * URL for determining when an operation has completed. Send a GET request to the URL in Location header. - * The URI should return a 202 until the operation reaches a terminal state and 200 once it reaches a terminal state. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#202-accepted-and-location-headers - */ - location?: string; - /** - * URL for checking the ongoing status of the operation. - * To get the status of the asynchronous operation, send a GET request to the URL in Azure-AsyncOperation header value. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#asynchronous-operations - */ - azureAsyncOperation?: string; -} - -/** Defines headers for RouteFilterRules_delete operation. */ -export interface RouteFilterRulesDeleteHeaders { - /** - * URL for determining when an operation has completed. Send a GET request to the URL in Location header. - * The URI should return a 202 until the operation reaches a terminal state and 200 once it reaches a terminal state. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#202-accepted-and-location-headers - */ - location?: string; - /** - * URL for checking the ongoing status of the operation. - * To get the status of the asynchronous operation, send a GET request to the URL in Azure-AsyncOperation header value. - * - * For more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#asynchronous-operations - */ - azureAsyncOperation?: string; -} - -/** Defines headers for ServiceGateways_delete operation. */ -export interface ServiceGatewaysDeleteHeaders { - /** URL for determining when an operation has completed. Send a GET request to the URL in Location header. */ - location?: string; -} - -/** Defines headers for ServiceGateways_updateAddressLocations operation. */ -export interface ServiceGatewaysUpdateAddressLocationsHeaders { - /** URL for determining when an operation has completed. Send a GET request to the URL in Location header. */ - location?: string; -} - -/** Defines headers for ServiceGateways_updateServices operation. */ -export interface ServiceGatewaysUpdateServicesHeaders { - /** URL for determining when an operation has completed. Send a GET request to the URL in Location header. */ - location?: string; -} - -/** Defines headers for VirtualNetworkAppliances_delete operation. */ -export interface VirtualNetworkAppliancesDeleteHeaders { - location?: string; -} - -/** Defines headers for VirtualNetworkGateways_getResiliencyInformation operation. */ -export interface VirtualNetworkGatewaysGetResiliencyInformationHeaders { - location?: string; -} - -/** Defines headers for VirtualNetworkGateways_getRoutesInformation operation. */ -export interface VirtualNetworkGatewaysGetRoutesInformationHeaders { - location?: string; -} - -/** Defines headers for VirtualNetworkGateways_getFailoverAllTestDetails operation. */ -export interface VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders { - location?: string; -} - -/** Defines headers for VirtualNetworkGateways_getFailoverSingleTestDetails operation. */ -export interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders { - location?: string; -} - -/** Defines headers for VirtualNetworkGateways_startExpressRouteSiteFailoverSimulation operation. */ -export interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders { - location?: string; -} - -/** Defines headers for VirtualNetworkGateways_stopExpressRouteSiteFailoverSimulation operation. */ -export interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders { - location?: string; -} - -/** Defines headers for VirtualNetworkGateways_invokePrepareMigration operation. */ -export interface VirtualNetworkGatewaysInvokePrepareMigrationHeaders { - location?: string; -} - -/** Defines headers for VirtualNetworkGateways_invokeExecuteMigration operation. */ -export interface VirtualNetworkGatewaysInvokeExecuteMigrationHeaders { - location?: string; -} - -/** Defines headers for VirtualNetworkGateways_invokeCommitMigration operation. */ -export interface VirtualNetworkGatewaysInvokeCommitMigrationHeaders { - location?: string; -} - -/** Defines headers for VirtualNetworkGateways_invokeAbortMigration operation. */ -export interface VirtualNetworkGatewaysInvokeAbortMigrationHeaders { - location?: string; -} - -/** Defines headers for NetworkVirtualApplianceConnections_delete operation. */ -export interface NetworkVirtualApplianceConnectionsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Known values of {@link ApplicationGatewaySkuName} that the service accepts. */ -export enum KnownApplicationGatewaySkuName { - /** StandardSmall */ - StandardSmall = "Standard_Small", - /** StandardMedium */ - StandardMedium = "Standard_Medium", - /** StandardLarge */ - StandardLarge = "Standard_Large", - /** WAFMedium */ - WAFMedium = "WAF_Medium", - /** WAFLarge */ - WAFLarge = "WAF_Large", - /** StandardV2 */ - StandardV2 = "Standard_v2", - /** WAFV2 */ - WAFV2 = "WAF_v2", - /** Basic */ - Basic = "Basic", -} - -/** - * Defines values for ApplicationGatewaySkuName. \ - * {@link KnownApplicationGatewaySkuName} can be used interchangeably with ApplicationGatewaySkuName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard_Small** \ - * **Standard_Medium** \ - * **Standard_Large** \ - * **WAF_Medium** \ - * **WAF_Large** \ - * **Standard_v2** \ - * **WAF_v2** \ - * **Basic** - */ -export type ApplicationGatewaySkuName = string; - -/** Known values of {@link ApplicationGatewayTier} that the service accepts. */ -export enum KnownApplicationGatewayTier { - /** Standard */ - Standard = "Standard", - /** WAF */ - WAF = "WAF", - /** StandardV2 */ - StandardV2 = "Standard_v2", - /** WAFV2 */ - WAFV2 = "WAF_v2", - /** Basic */ - Basic = "Basic", -} - -/** - * Defines values for ApplicationGatewayTier. \ - * {@link KnownApplicationGatewayTier} can be used interchangeably with ApplicationGatewayTier, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard** \ - * **WAF** \ - * **Standard_v2** \ - * **WAF_v2** \ - * **Basic** - */ -export type ApplicationGatewayTier = string; - -/** Known values of {@link ApplicationGatewaySkuFamily} that the service accepts. */ -export enum KnownApplicationGatewaySkuFamily { - /** Generation1 */ - Generation1 = "Generation_1", - /** Generation2 */ - Generation2 = "Generation_2", -} - -/** - * Defines values for ApplicationGatewaySkuFamily. \ - * {@link KnownApplicationGatewaySkuFamily} can be used interchangeably with ApplicationGatewaySkuFamily, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Generation_1** \ - * **Generation_2** - */ -export type ApplicationGatewaySkuFamily = string; - -/** Known values of {@link ApplicationGatewaySslProtocol} that the service accepts. */ -export enum KnownApplicationGatewaySslProtocol { - /** TLSv10 */ - TLSv10 = "TLSv1_0", - /** TLSv11 */ - TLSv11 = "TLSv1_1", - /** TLSv12 */ - TLSv12 = "TLSv1_2", - /** TLSv13 */ - TLSv13 = "TLSv1_3", -} - -/** - * Defines values for ApplicationGatewaySslProtocol. \ - * {@link KnownApplicationGatewaySslProtocol} can be used interchangeably with ApplicationGatewaySslProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TLSv1_0** \ - * **TLSv1_1** \ - * **TLSv1_2** \ - * **TLSv1_3** - */ -export type ApplicationGatewaySslProtocol = string; - -/** Known values of {@link ApplicationGatewaySslPolicyType} that the service accepts. */ -export enum KnownApplicationGatewaySslPolicyType { - /** Predefined */ - Predefined = "Predefined", - /** Custom */ - Custom = "Custom", - /** CustomV2 */ - CustomV2 = "CustomV2", -} - -/** - * Defines values for ApplicationGatewaySslPolicyType. \ - * {@link KnownApplicationGatewaySslPolicyType} can be used interchangeably with ApplicationGatewaySslPolicyType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Predefined** \ - * **Custom** \ - * **CustomV2** - */ -export type ApplicationGatewaySslPolicyType = string; - -/** Known values of {@link ApplicationGatewaySslPolicyName} that the service accepts. */ -export enum KnownApplicationGatewaySslPolicyName { - /** AppGwSslPolicy20150501 */ - AppGwSslPolicy20150501 = "AppGwSslPolicy20150501", - /** AppGwSslPolicy20170401 */ - AppGwSslPolicy20170401 = "AppGwSslPolicy20170401", - /** AppGwSslPolicy20170401S */ - AppGwSslPolicy20170401S = "AppGwSslPolicy20170401S", - /** AppGwSslPolicy20220101 */ - AppGwSslPolicy20220101 = "AppGwSslPolicy20220101", - /** AppGwSslPolicy20220101S */ - AppGwSslPolicy20220101S = "AppGwSslPolicy20220101S", -} - -/** - * Defines values for ApplicationGatewaySslPolicyName. \ - * {@link KnownApplicationGatewaySslPolicyName} can be used interchangeably with ApplicationGatewaySslPolicyName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AppGwSslPolicy20150501** \ - * **AppGwSslPolicy20170401** \ - * **AppGwSslPolicy20170401S** \ - * **AppGwSslPolicy20220101** \ - * **AppGwSslPolicy20220101S** - */ -export type ApplicationGatewaySslPolicyName = string; - -/** Known values of {@link ApplicationGatewaySslCipherSuite} that the service accepts. */ -export enum KnownApplicationGatewaySslCipherSuite { - /** TLSEcdheRSAWithAES256CBCSHA384 */ - TLSEcdheRSAWithAES256CBCSHA384 = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", - /** TLSEcdheRSAWithAES128CBCSHA256 */ - TLSEcdheRSAWithAES128CBCSHA256 = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", - /** TLSEcdheRSAWithAES256CBCSHA */ - TLSEcdheRSAWithAES256CBCSHA = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", - /** TLSEcdheRSAWithAES128CBCSHA */ - TLSEcdheRSAWithAES128CBCSHA = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", - /** TLSDHERSAWithAES256GCMSHA384 */ - TLSDHERSAWithAES256GCMSHA384 = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", - /** TLSDHERSAWithAES128GCMSHA256 */ - TLSDHERSAWithAES128GCMSHA256 = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", - /** TLSDHERSAWithAES256CBCSHA */ - TLSDHERSAWithAES256CBCSHA = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA", - /** TLSDHERSAWithAES128CBCSHA */ - TLSDHERSAWithAES128CBCSHA = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", - /** TLSRSAWithAES256GCMSHA384 */ - TLSRSAWithAES256GCMSHA384 = "TLS_RSA_WITH_AES_256_GCM_SHA384", - /** TLSRSAWithAES128GCMSHA256 */ - TLSRSAWithAES128GCMSHA256 = "TLS_RSA_WITH_AES_128_GCM_SHA256", - /** TLSRSAWithAES256CBCSHA256 */ - TLSRSAWithAES256CBCSHA256 = "TLS_RSA_WITH_AES_256_CBC_SHA256", - /** TLSRSAWithAES128CBCSHA256 */ - TLSRSAWithAES128CBCSHA256 = "TLS_RSA_WITH_AES_128_CBC_SHA256", - /** TLSRSAWithAES256CBCSHA */ - TLSRSAWithAES256CBCSHA = "TLS_RSA_WITH_AES_256_CBC_SHA", - /** TLSRSAWithAES128CBCSHA */ - TLSRSAWithAES128CBCSHA = "TLS_RSA_WITH_AES_128_CBC_SHA", - /** TLSEcdheEcdsaWithAES256GCMSHA384 */ - TLSEcdheEcdsaWithAES256GCMSHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", - /** TLSEcdheEcdsaWithAES128GCMSHA256 */ - TLSEcdheEcdsaWithAES128GCMSHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", - /** TLSEcdheEcdsaWithAES256CBCSHA384 */ - TLSEcdheEcdsaWithAES256CBCSHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", - /** TLSEcdheEcdsaWithAES128CBCSHA256 */ - TLSEcdheEcdsaWithAES128CBCSHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", - /** TLSEcdheEcdsaWithAES256CBCSHA */ - TLSEcdheEcdsaWithAES256CBCSHA = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", - /** TLSEcdheEcdsaWithAES128CBCSHA */ - TLSEcdheEcdsaWithAES128CBCSHA = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", - /** TLSDHEDSSWithAES256CBCSHA256 */ - TLSDHEDSSWithAES256CBCSHA256 = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", - /** TLSDHEDSSWithAES128CBCSHA256 */ - TLSDHEDSSWithAES128CBCSHA256 = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", - /** TLSDHEDSSWithAES256CBCSHA */ - TLSDHEDSSWithAES256CBCSHA = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA", - /** TLSDHEDSSWithAES128CBCSHA */ - TLSDHEDSSWithAES128CBCSHA = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA", - /** TLSRSAWith3DESEDECBCSHA */ - TLSRSAWith3DESEDECBCSHA = "TLS_RSA_WITH_3DES_EDE_CBC_SHA", - /** TLSDHEDSSWith3DESEDECBCSHA */ - TLSDHEDSSWith3DESEDECBCSHA = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA", - /** TLSEcdheRSAWithAES128GCMSHA256 */ - TLSEcdheRSAWithAES128GCMSHA256 = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", - /** TLSEcdheRSAWithAES256GCMSHA384 */ - TLSEcdheRSAWithAES256GCMSHA384 = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", -} - -/** - * Defines values for ApplicationGatewaySslCipherSuite. \ - * {@link KnownApplicationGatewaySslCipherSuite} can be used interchangeably with ApplicationGatewaySslCipherSuite, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384** \ - * **TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256** \ - * **TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA** \ - * **TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA** \ - * **TLS_DHE_RSA_WITH_AES_256_GCM_SHA384** \ - * **TLS_DHE_RSA_WITH_AES_128_GCM_SHA256** \ - * **TLS_DHE_RSA_WITH_AES_256_CBC_SHA** \ - * **TLS_DHE_RSA_WITH_AES_128_CBC_SHA** \ - * **TLS_RSA_WITH_AES_256_GCM_SHA384** \ - * **TLS_RSA_WITH_AES_128_GCM_SHA256** \ - * **TLS_RSA_WITH_AES_256_CBC_SHA256** \ - * **TLS_RSA_WITH_AES_128_CBC_SHA256** \ - * **TLS_RSA_WITH_AES_256_CBC_SHA** \ - * **TLS_RSA_WITH_AES_128_CBC_SHA** \ - * **TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384** \ - * **TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256** \ - * **TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384** \ - * **TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256** \ - * **TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA** \ - * **TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA** \ - * **TLS_DHE_DSS_WITH_AES_256_CBC_SHA256** \ - * **TLS_DHE_DSS_WITH_AES_128_CBC_SHA256** \ - * **TLS_DHE_DSS_WITH_AES_256_CBC_SHA** \ - * **TLS_DHE_DSS_WITH_AES_128_CBC_SHA** \ - * **TLS_RSA_WITH_3DES_EDE_CBC_SHA** \ - * **TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA** \ - * **TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256** \ - * **TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384** - */ -export type ApplicationGatewaySslCipherSuite = string; - -/** Known values of {@link ApplicationGatewayOperationalState} that the service accepts. */ -export enum KnownApplicationGatewayOperationalState { - /** Stopped */ - Stopped = "Stopped", - /** Starting */ - Starting = "Starting", - /** Running */ - Running = "Running", - /** Stopping */ - Stopping = "Stopping", -} - -/** - * Defines values for ApplicationGatewayOperationalState. \ - * {@link KnownApplicationGatewayOperationalState} can be used interchangeably with ApplicationGatewayOperationalState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Stopped** \ - * **Starting** \ - * **Running** \ - * **Stopping** - */ -export type ApplicationGatewayOperationalState = string; - -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - /** Failed */ - Failed = "Failed", - /** Succeeded */ - Succeeded = "Succeeded", - /** Canceled */ - Canceled = "Canceled", - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", -} - -/** - * Defines values for ProvisioningState. \ - * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Failed** \ - * **Succeeded** \ - * **Canceled** \ - * **Creating** \ - * **Updating** \ - * **Deleting** - */ -export type ProvisioningState = string; - -/** Known values of {@link IPAllocationMethod} that the service accepts. */ -export enum KnownIPAllocationMethod { - /** Static */ - Static = "Static", - /** Dynamic */ - Dynamic = "Dynamic", -} - -/** - * Defines values for IPAllocationMethod. \ - * {@link KnownIPAllocationMethod} can be used interchangeably with IPAllocationMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Static** \ - * **Dynamic** - */ -export type IPAllocationMethod = string; - -/** Known values of {@link ApplicationGatewayProtocol} that the service accepts. */ -export enum KnownApplicationGatewayProtocol { - /** Supported for httpListeners and backendHttpSettingsCollection properties. */ - Http = "Http", - /** Supported for httpListeners and backendHttpSettingsCollection properties. */ - Https = "Https", - /** Supported for listeners and backendSettingsCollection properties. */ - Tcp = "Tcp", - /** Supported for listeners and backendSettingsCollection properties. */ - Tls = "Tls", -} - -/** - * Defines values for ApplicationGatewayProtocol. \ - * {@link KnownApplicationGatewayProtocol} can be used interchangeably with ApplicationGatewayProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Http**: Supported for httpListeners and backendHttpSettingsCollection properties. \ - * **Https**: Supported for httpListeners and backendHttpSettingsCollection properties. \ - * **Tcp**: Supported for listeners and backendSettingsCollection properties. \ - * **Tls**: Supported for listeners and backendSettingsCollection properties. - */ -export type ApplicationGatewayProtocol = string; - -/** Known values of {@link IPVersion} that the service accepts. */ -export enum KnownIPVersion { - /** IPv4 */ - IPv4 = "IPv4", - /** IPv6 */ - IPv6 = "IPv6", -} - -/** - * Defines values for IPVersion. \ - * {@link KnownIPVersion} can be used interchangeably with IPVersion, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPv4** \ - * **IPv6** - */ -export type IPVersion = string; - -/** Known values of {@link SecurityRuleProtocol} that the service accepts. */ -export enum KnownSecurityRuleProtocol { - /** Tcp */ - Tcp = "Tcp", - /** Udp */ - Udp = "Udp", - /** Icmp */ - Icmp = "Icmp", - /** Esp */ - Esp = "Esp", - /** Asterisk */ - Asterisk = "*", - /** Ah */ - Ah = "Ah", -} - -/** - * Defines values for SecurityRuleProtocol. \ - * {@link KnownSecurityRuleProtocol} can be used interchangeably with SecurityRuleProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Tcp** \ - * **Udp** \ - * **Icmp** \ - * **Esp** \ - * ***** \ - * **Ah** - */ -export type SecurityRuleProtocol = string; - -/** Known values of {@link SecurityRuleAccess} that the service accepts. */ -export enum KnownSecurityRuleAccess { - /** Allow */ - Allow = "Allow", - /** Deny */ - Deny = "Deny", -} - -/** - * Defines values for SecurityRuleAccess. \ - * {@link KnownSecurityRuleAccess} can be used interchangeably with SecurityRuleAccess, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Allow** \ - * **Deny** - */ -export type SecurityRuleAccess = string; - -/** Known values of {@link SecurityRuleDirection} that the service accepts. */ -export enum KnownSecurityRuleDirection { - /** Inbound */ - Inbound = "Inbound", - /** Outbound */ - Outbound = "Outbound", -} - -/** - * Defines values for SecurityRuleDirection. \ - * {@link KnownSecurityRuleDirection} can be used interchangeably with SecurityRuleDirection, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Inbound** \ - * **Outbound** - */ -export type SecurityRuleDirection = string; - -/** Known values of {@link ExtendedLocationTypes} that the service accepts. */ -export enum KnownExtendedLocationTypes { - /** EdgeZone */ - EdgeZone = "EdgeZone", -} - -/** - * Defines values for ExtendedLocationTypes. \ - * {@link KnownExtendedLocationTypes} can be used interchangeably with ExtendedLocationTypes, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **EdgeZone** - */ -export type ExtendedLocationTypes = string; - -/** Known values of {@link PrivateEndpointIPVersionType} that the service accepts. */ -export enum KnownPrivateEndpointIPVersionType { - /** Indicates that the Private IPs of the private endpoint will be IPv4 only. */ - IPv4 = "IPv4", - /** Indicates that the Private IPs of the private endpoint will be IPv6 only. */ - IPv6 = "IPv6", - /** Indicates that the Private IPs of the private endpoint can be both IPv4 and IPv6. */ - DualStack = "DualStack", -} - -/** - * Defines values for PrivateEndpointIPVersionType. \ - * {@link KnownPrivateEndpointIPVersionType} can be used interchangeably with PrivateEndpointIPVersionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPv4**: Indicates that the Private IPs of the private endpoint will be IPv4 only. \ - * **IPv6**: Indicates that the Private IPs of the private endpoint will be IPv6 only. \ - * **DualStack**: Indicates that the Private IPs of the private endpoint can be both IPv4 and IPv6. - */ -export type PrivateEndpointIPVersionType = string; - -/** Known values of {@link NetworkInterfaceNicType} that the service accepts. */ -export enum KnownNetworkInterfaceNicType { - /** Standard */ - Standard = "Standard", - /** Elastic */ - Elastic = "Elastic", -} - -/** - * Defines values for NetworkInterfaceNicType. \ - * {@link KnownNetworkInterfaceNicType} can be used interchangeably with NetworkInterfaceNicType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard** \ - * **Elastic** - */ -export type NetworkInterfaceNicType = string; - -/** Known values of {@link AccessMode} that the service accepts. */ -export enum KnownAccessMode { - /** Allows unrestricted access to the private link service. */ - Default = "Default", - /** Limits access to subscriptions which are inside visibility list only. */ - Restricted = "Restricted", -} - -/** - * Defines values for AccessMode. \ - * {@link KnownAccessMode} can be used interchangeably with AccessMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default**: Allows unrestricted access to the private link service. \ - * **Restricted**: Limits access to subscriptions which are inside visibility list only. - */ -export type AccessMode = string; - -/** Known values of {@link NetworkInterfaceMigrationPhase} that the service accepts. */ -export enum KnownNetworkInterfaceMigrationPhase { - /** None */ - None = "None", - /** Prepare */ - Prepare = "Prepare", - /** Commit */ - Commit = "Commit", - /** Abort */ - Abort = "Abort", - /** Committed */ - Committed = "Committed", -} - -/** - * Defines values for NetworkInterfaceMigrationPhase. \ - * {@link KnownNetworkInterfaceMigrationPhase} can be used interchangeably with NetworkInterfaceMigrationPhase, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Prepare** \ - * **Commit** \ - * **Abort** \ - * **Committed** - */ -export type NetworkInterfaceMigrationPhase = string; - -/** Known values of {@link NetworkInterfaceAuxiliaryMode} that the service accepts. */ -export enum KnownNetworkInterfaceAuxiliaryMode { - /** None */ - None = "None", - /** MaxConnections */ - MaxConnections = "MaxConnections", - /** Floating */ - Floating = "Floating", - /** AcceleratedConnections */ - AcceleratedConnections = "AcceleratedConnections", -} - -/** - * 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** \ - * **AcceleratedConnections** - */ -export type NetworkInterfaceAuxiliaryMode = string; - -/** Known values of {@link NetworkInterfaceAuxiliarySku} that the service accepts. */ -export enum KnownNetworkInterfaceAuxiliarySku { - /** None */ - None = "None", - /** A1 */ - A1 = "A1", - /** A2 */ - A2 = "A2", - /** A4 */ - A4 = "A4", - /** A8 */ - A8 = "A8", -} - -/** - * Defines values for NetworkInterfaceAuxiliarySku. \ - * {@link KnownNetworkInterfaceAuxiliarySku} can be used interchangeably with NetworkInterfaceAuxiliarySku, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **A1** \ - * **A2** \ - * **A4** \ - * **A8** - */ -export type NetworkInterfaceAuxiliarySku = string; - -/** Known values of {@link FlowLogFormatType} that the service accepts. */ -export enum KnownFlowLogFormatType { - /** Json */ - Json = "JSON", -} - -/** - * Defines values for FlowLogFormatType. \ - * {@link KnownFlowLogFormatType} can be used interchangeably with FlowLogFormatType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **JSON** - */ -export type FlowLogFormatType = string; - -/** Known values of {@link RouteNextHopType} that the service accepts. */ -export enum KnownRouteNextHopType { - /** VirtualNetworkGateway */ - VirtualNetworkGateway = "VirtualNetworkGateway", - /** VnetLocal */ - VnetLocal = "VnetLocal", - /** Internet */ - Internet = "Internet", - /** VirtualAppliance */ - VirtualAppliance = "VirtualAppliance", - /** None */ - None = "None", -} - -/** - * Defines values for RouteNextHopType. \ - * {@link KnownRouteNextHopType} can be used interchangeably with RouteNextHopType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **VirtualNetworkGateway** \ - * **VnetLocal** \ - * **Internet** \ - * **VirtualAppliance** \ - * **None** - */ -export type RouteNextHopType = string; - -/** Known values of {@link PublicIPAddressSkuName} that the service accepts. */ -export enum KnownPublicIPAddressSkuName { - /** Basic */ - Basic = "Basic", - /** Standard */ - Standard = "Standard", - /** StandardV2 */ - StandardV2 = "StandardV2", -} - -/** - * Defines values for PublicIPAddressSkuName. \ - * {@link KnownPublicIPAddressSkuName} can be used interchangeably with PublicIPAddressSkuName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Basic** \ - * **Standard** \ - * **StandardV2** - */ -export type PublicIPAddressSkuName = string; - -/** Known values of {@link PublicIPAddressSkuTier} that the service accepts. */ -export enum KnownPublicIPAddressSkuTier { - /** Regional */ - Regional = "Regional", - /** Global */ - Global = "Global", -} - -/** - * Defines values for PublicIPAddressSkuTier. \ - * {@link KnownPublicIPAddressSkuTier} can be used interchangeably with PublicIPAddressSkuTier, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Regional** \ - * **Global** - */ -export type PublicIPAddressSkuTier = string; - -/** Known values of {@link DdosSettingsProtectionMode} that the service accepts. */ -export enum KnownDdosSettingsProtectionMode { - /** VirtualNetworkInherited */ - VirtualNetworkInherited = "VirtualNetworkInherited", - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for DdosSettingsProtectionMode. \ - * {@link KnownDdosSettingsProtectionMode} can be used interchangeably with DdosSettingsProtectionMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **VirtualNetworkInherited** \ - * **Enabled** \ - * **Disabled** - */ -export type DdosSettingsProtectionMode = string; - -/** Known values of {@link NatGatewaySkuName} that the service accepts. */ -export enum KnownNatGatewaySkuName { - /** Standard */ - Standard = "Standard", - /** StandardV2 */ - StandardV2 = "StandardV2", -} - -/** - * Defines values for NatGatewaySkuName. \ - * {@link KnownNatGatewaySkuName} can be used interchangeably with NatGatewaySkuName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard** \ - * **StandardV2** - */ -export type NatGatewaySkuName = string; - -/** Known values of {@link PublicIPAddressMigrationPhase} that the service accepts. */ -export enum KnownPublicIPAddressMigrationPhase { - /** None */ - None = "None", - /** Prepare */ - Prepare = "Prepare", - /** Commit */ - Commit = "Commit", - /** Abort */ - Abort = "Abort", - /** Committed */ - Committed = "Committed", -} - -/** - * Defines values for PublicIPAddressMigrationPhase. \ - * {@link KnownPublicIPAddressMigrationPhase} can be used interchangeably with PublicIPAddressMigrationPhase, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Prepare** \ - * **Commit** \ - * **Abort** \ - * **Committed** - */ -export type PublicIPAddressMigrationPhase = string; - -/** Known values of {@link DeleteOptions} that the service accepts. */ -export enum KnownDeleteOptions { - /** Delete */ - Delete = "Delete", - /** Detach */ - Detach = "Detach", -} - -/** - * Defines values for DeleteOptions. \ - * {@link KnownDeleteOptions} can be used interchangeably with DeleteOptions, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Delete** \ - * **Detach** - */ -export type DeleteOptions = string; - -/** Known values of {@link VirtualNetworkPrivateEndpointNetworkPolicies} that the service accepts. */ -export enum KnownVirtualNetworkPrivateEndpointNetworkPolicies { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", - /** NetworkSecurityGroupEnabled */ - NetworkSecurityGroupEnabled = "NetworkSecurityGroupEnabled", - /** RouteTableEnabled */ - RouteTableEnabled = "RouteTableEnabled", -} - -/** - * Defines values for VirtualNetworkPrivateEndpointNetworkPolicies. \ - * {@link KnownVirtualNetworkPrivateEndpointNetworkPolicies} can be used interchangeably with VirtualNetworkPrivateEndpointNetworkPolicies, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** \ - * **NetworkSecurityGroupEnabled** \ - * **RouteTableEnabled** - */ -export type VirtualNetworkPrivateEndpointNetworkPolicies = string; - -/** Known values of {@link VirtualNetworkPrivateLinkServiceNetworkPolicies} that the service accepts. */ -export enum KnownVirtualNetworkPrivateLinkServiceNetworkPolicies { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for VirtualNetworkPrivateLinkServiceNetworkPolicies. \ - * {@link KnownVirtualNetworkPrivateLinkServiceNetworkPolicies} can be used interchangeably with VirtualNetworkPrivateLinkServiceNetworkPolicies, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type VirtualNetworkPrivateLinkServiceNetworkPolicies = string; - -/** Known values of {@link SharingScope} that the service accepts. */ -export enum KnownSharingScope { - /** Tenant */ - Tenant = "Tenant", - /** DelegatedServices */ - DelegatedServices = "DelegatedServices", -} - -/** - * Defines values for SharingScope. \ - * {@link KnownSharingScope} can be used interchangeably with SharingScope, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Tenant** \ - * **DelegatedServices** - */ -export type SharingScope = string; - -/** Known values of {@link GatewayLoadBalancerTunnelProtocol} that the service accepts. */ -export enum KnownGatewayLoadBalancerTunnelProtocol { - /** None */ - None = "None", - /** Native */ - Native = "Native", - /** Vxlan */ - Vxlan = "VXLAN", -} - -/** - * Defines values for GatewayLoadBalancerTunnelProtocol. \ - * {@link KnownGatewayLoadBalancerTunnelProtocol} can be used interchangeably with GatewayLoadBalancerTunnelProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Native** \ - * **VXLAN** - */ -export type GatewayLoadBalancerTunnelProtocol = string; - -/** Known values of {@link GatewayLoadBalancerTunnelInterfaceType} that the service accepts. */ -export enum KnownGatewayLoadBalancerTunnelInterfaceType { - /** None */ - None = "None", - /** Internal */ - Internal = "Internal", - /** External */ - External = "External", -} - -/** - * Defines values for GatewayLoadBalancerTunnelInterfaceType. \ - * {@link KnownGatewayLoadBalancerTunnelInterfaceType} can be used interchangeably with GatewayLoadBalancerTunnelInterfaceType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Internal** \ - * **External** - */ -export type GatewayLoadBalancerTunnelInterfaceType = string; - -/** Known values of {@link LoadBalancerBackendAddressAdminState} that the service accepts. */ -export enum KnownLoadBalancerBackendAddressAdminState { - /** None */ - None = "None", - /** Up */ - Up = "Up", - /** Down */ - Down = "Down", -} - -/** - * 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** - */ -export type LoadBalancerBackendAddressAdminState = string; - -/** Known values of {@link SyncMode} that the service accepts. */ -export enum KnownSyncMode { - /** Automatic */ - Automatic = "Automatic", - /** Manual */ - Manual = "Manual", -} - -/** - * Defines values for SyncMode. \ - * {@link KnownSyncMode} can be used interchangeably with SyncMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Automatic** \ - * **Manual** - */ -export type SyncMode = string; - -/** Known values of {@link TransportProtocol} that the service accepts. */ -export enum KnownTransportProtocol { - /** Udp */ - Udp = "Udp", - /** Tcp */ - Tcp = "Tcp", - /** All */ - All = "All", - /** Quic */ - Quic = "Quic", -} - -/** - * Defines values for TransportProtocol. \ - * {@link KnownTransportProtocol} can be used interchangeably with TransportProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Udp** \ - * **Tcp** \ - * **All** \ - * **Quic** - */ -export type TransportProtocol = string; - -/** Known values of {@link ApplicationGatewayCookieBasedAffinity} that the service accepts. */ -export enum KnownApplicationGatewayCookieBasedAffinity { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for ApplicationGatewayCookieBasedAffinity. \ - * {@link KnownApplicationGatewayCookieBasedAffinity} can be used interchangeably with ApplicationGatewayCookieBasedAffinity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type ApplicationGatewayCookieBasedAffinity = string; - -/** Known values of {@link ApplicationGatewayCustomErrorStatusCode} that the service accepts. */ -export enum KnownApplicationGatewayCustomErrorStatusCode { - /** HttpStatus400 */ - HttpStatus400 = "HttpStatus400", - /** HttpStatus403 */ - HttpStatus403 = "HttpStatus403", - /** HttpStatus404 */ - HttpStatus404 = "HttpStatus404", - /** HttpStatus405 */ - HttpStatus405 = "HttpStatus405", - /** HttpStatus408 */ - HttpStatus408 = "HttpStatus408", - /** HttpStatus500 */ - HttpStatus500 = "HttpStatus500", - /** HttpStatus502 */ - HttpStatus502 = "HttpStatus502", - /** HttpStatus503 */ - HttpStatus503 = "HttpStatus503", - /** HttpStatus504 */ - HttpStatus504 = "HttpStatus504", -} - -/** - * Defines values for ApplicationGatewayCustomErrorStatusCode. \ - * {@link KnownApplicationGatewayCustomErrorStatusCode} can be used interchangeably with ApplicationGatewayCustomErrorStatusCode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **HttpStatus400** \ - * **HttpStatus403** \ - * **HttpStatus404** \ - * **HttpStatus405** \ - * **HttpStatus408** \ - * **HttpStatus500** \ - * **HttpStatus502** \ - * **HttpStatus503** \ - * **HttpStatus504** - */ -export type ApplicationGatewayCustomErrorStatusCode = string; - -/** Known values of {@link ApplicationGatewayClientRevocationOptions} that the service accepts. */ -export enum KnownApplicationGatewayClientRevocationOptions { - /** None */ - None = "None", - /** Ocsp */ - Ocsp = "OCSP", -} - -/** - * Defines values for ApplicationGatewayClientRevocationOptions. \ - * {@link KnownApplicationGatewayClientRevocationOptions} can be used interchangeably with ApplicationGatewayClientRevocationOptions, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **OCSP** - */ -export type ApplicationGatewayClientRevocationOptions = string; - -/** Known values of {@link ApplicationGatewayClientAuthVerificationModes} that the service accepts. */ -export enum KnownApplicationGatewayClientAuthVerificationModes { - /** Strict */ - Strict = "Strict", - /** Passthrough */ - Passthrough = "Passthrough", -} - -/** - * Defines values for ApplicationGatewayClientAuthVerificationModes. \ - * {@link KnownApplicationGatewayClientAuthVerificationModes} can be used interchangeably with ApplicationGatewayClientAuthVerificationModes, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Strict** \ - * **Passthrough** - */ -export type ApplicationGatewayClientAuthVerificationModes = string; - -/** Known values of {@link ApplicationGatewayRequestRoutingRuleType} that the service accepts. */ -export enum KnownApplicationGatewayRequestRoutingRuleType { - /** Basic */ - Basic = "Basic", - /** PathBasedRouting */ - PathBasedRouting = "PathBasedRouting", -} - -/** - * Defines values for ApplicationGatewayRequestRoutingRuleType. \ - * {@link KnownApplicationGatewayRequestRoutingRuleType} can be used interchangeably with ApplicationGatewayRequestRoutingRuleType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Basic** \ - * **PathBasedRouting** - */ -export type ApplicationGatewayRequestRoutingRuleType = string; - -/** Known values of {@link ApplicationGatewayRedirectType} that the service accepts. */ -export enum KnownApplicationGatewayRedirectType { - /** Permanent */ - Permanent = "Permanent", - /** Found */ - Found = "Found", - /** SeeOther */ - SeeOther = "SeeOther", - /** Temporary */ - Temporary = "Temporary", -} - -/** - * Defines values for ApplicationGatewayRedirectType. \ - * {@link KnownApplicationGatewayRedirectType} can be used interchangeably with ApplicationGatewayRedirectType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Permanent** \ - * **Found** \ - * **SeeOther** \ - * **Temporary** - */ -export type ApplicationGatewayRedirectType = string; - -/** Known values of {@link ApplicationGatewayFirewallMode} that the service accepts. */ -export enum KnownApplicationGatewayFirewallMode { - /** Detection */ - Detection = "Detection", - /** Prevention */ - Prevention = "Prevention", -} - -/** - * Defines values for ApplicationGatewayFirewallMode. \ - * {@link KnownApplicationGatewayFirewallMode} can be used interchangeably with ApplicationGatewayFirewallMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Detection** \ - * **Prevention** - */ -export type ApplicationGatewayFirewallMode = string; - -/** Known values of {@link ApplicationGatewayLoadDistributionAlgorithm} that the service accepts. */ -export enum KnownApplicationGatewayLoadDistributionAlgorithm { - /** RoundRobin */ - RoundRobin = "RoundRobin", - /** LeastConnections */ - LeastConnections = "LeastConnections", - /** IpHash */ - IpHash = "IpHash", -} - -/** - * Defines values for ApplicationGatewayLoadDistributionAlgorithm. \ - * {@link KnownApplicationGatewayLoadDistributionAlgorithm} can be used interchangeably with ApplicationGatewayLoadDistributionAlgorithm, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **RoundRobin** \ - * **LeastConnections** \ - * **IpHash** - */ -export type ApplicationGatewayLoadDistributionAlgorithm = string; - -/** Known values of {@link ApplicationGatewayUnAuthorizedRequestAction} that the service accepts. */ -export enum KnownApplicationGatewayUnAuthorizedRequestAction { - /** Deny */ - Deny = "Deny", - /** Allow */ - Allow = "Allow", -} - -/** - * Defines values for ApplicationGatewayUnAuthorizedRequestAction. \ - * {@link KnownApplicationGatewayUnAuthorizedRequestAction} can be used interchangeably with ApplicationGatewayUnAuthorizedRequestAction, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Deny** \ - * **Allow** - */ -export type ApplicationGatewayUnAuthorizedRequestAction = string; - -/** Known values of {@link ApplicationGatewayBackendHealthServerHealth} that the service accepts. */ -export enum KnownApplicationGatewayBackendHealthServerHealth { - /** Unknown */ - Unknown = "Unknown", - /** Up */ - Up = "Up", - /** Down */ - Down = "Down", - /** Partial */ - Partial = "Partial", - /** Draining */ - Draining = "Draining", -} - -/** - * Defines values for ApplicationGatewayBackendHealthServerHealth. \ - * {@link KnownApplicationGatewayBackendHealthServerHealth} can be used interchangeably with ApplicationGatewayBackendHealthServerHealth, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Up** \ - * **Down** \ - * **Partial** \ - * **Draining** - */ -export type ApplicationGatewayBackendHealthServerHealth = string; - -/** Known values of {@link ApplicationGatewayWafRuleStateTypes} that the service accepts. */ -export enum KnownApplicationGatewayWafRuleStateTypes { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for ApplicationGatewayWafRuleStateTypes. \ - * {@link KnownApplicationGatewayWafRuleStateTypes} can be used interchangeably with ApplicationGatewayWafRuleStateTypes, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type ApplicationGatewayWafRuleStateTypes = string; - -/** Known values of {@link ApplicationGatewayWafRuleActionTypes} that the service accepts. */ -export enum KnownApplicationGatewayWafRuleActionTypes { - /** None */ - None = "None", - /** AnomalyScoring */ - AnomalyScoring = "AnomalyScoring", - /** Allow */ - Allow = "Allow", - /** Block */ - Block = "Block", - /** Log */ - Log = "Log", -} - -/** - * Defines values for ApplicationGatewayWafRuleActionTypes. \ - * {@link KnownApplicationGatewayWafRuleActionTypes} can be used interchangeably with ApplicationGatewayWafRuleActionTypes, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **AnomalyScoring** \ - * **Allow** \ - * **Block** \ - * **Log** - */ -export type ApplicationGatewayWafRuleActionTypes = string; - -/** Known values of {@link ApplicationGatewayWafRuleSensitivityTypes} that the service accepts. */ -export enum KnownApplicationGatewayWafRuleSensitivityTypes { - /** Low */ - Low = "Low", - /** Medium */ - Medium = "Medium", - /** High */ - High = "High", -} - -/** - * Defines values for ApplicationGatewayWafRuleSensitivityTypes. \ - * {@link KnownApplicationGatewayWafRuleSensitivityTypes} can be used interchangeably with ApplicationGatewayWafRuleSensitivityTypes, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Low** \ - * **Medium** \ - * **High** - */ -export type ApplicationGatewayWafRuleSensitivityTypes = string; - -/** Known values of {@link ApplicationGatewayTierTypes} that the service accepts. */ -export enum KnownApplicationGatewayTierTypes { - /** Standard */ - Standard = "Standard", - /** WAF */ - WAF = "WAF", - /** StandardV2 */ - StandardV2 = "Standard_v2", - /** WAFV2 */ - WAFV2 = "WAF_v2", -} - -/** - * Defines values for ApplicationGatewayTierTypes. \ - * {@link KnownApplicationGatewayTierTypes} can be used interchangeably with ApplicationGatewayTierTypes, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard** \ - * **WAF** \ - * **Standard_v2** \ - * **WAF_v2** - */ -export type ApplicationGatewayTierTypes = string; - -/** Known values of {@link ApplicationGatewayRuleSetStatusOptions} that the service accepts. */ -export enum KnownApplicationGatewayRuleSetStatusOptions { - /** Preview */ - Preview = "Preview", - /** GA */ - GA = "GA", - /** Supported */ - Supported = "Supported", - /** Deprecated */ - Deprecated = "Deprecated", -} - -/** - * Defines values for ApplicationGatewayRuleSetStatusOptions. \ - * {@link KnownApplicationGatewayRuleSetStatusOptions} can be used interchangeably with ApplicationGatewayRuleSetStatusOptions, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Preview** \ - * **GA** \ - * **Supported** \ - * **Deprecated** - */ -export type ApplicationGatewayRuleSetStatusOptions = string; - -/** Known values of {@link AzureFirewallRCActionType} that the service accepts. */ -export enum KnownAzureFirewallRCActionType { - /** Allow */ - Allow = "Allow", - /** Deny */ - Deny = "Deny", -} - -/** - * Defines values for AzureFirewallRCActionType. \ - * {@link KnownAzureFirewallRCActionType} can be used interchangeably with AzureFirewallRCActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Allow** \ - * **Deny** - */ -export type AzureFirewallRCActionType = string; - -/** Known values of {@link AzureFirewallApplicationRuleProtocolType} that the service accepts. */ -export enum KnownAzureFirewallApplicationRuleProtocolType { - /** Http */ - Http = "Http", - /** Https */ - Https = "Https", - /** Mssql */ - Mssql = "Mssql", -} - -/** - * Defines values for AzureFirewallApplicationRuleProtocolType. \ - * {@link KnownAzureFirewallApplicationRuleProtocolType} can be used interchangeably with AzureFirewallApplicationRuleProtocolType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Http** \ - * **Https** \ - * **Mssql** - */ -export type AzureFirewallApplicationRuleProtocolType = string; - -/** Known values of {@link AzureFirewallNatRCActionType} that the service accepts. */ -export enum KnownAzureFirewallNatRCActionType { - /** Snat */ - Snat = "Snat", - /** Dnat */ - Dnat = "Dnat", -} - -/** - * Defines values for AzureFirewallNatRCActionType. \ - * {@link KnownAzureFirewallNatRCActionType} can be used interchangeably with AzureFirewallNatRCActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Snat** \ - * **Dnat** - */ -export type AzureFirewallNatRCActionType = string; - -/** Known values of {@link AzureFirewallNetworkRuleProtocol} that the service accepts. */ -export enum KnownAzureFirewallNetworkRuleProtocol { - /** TCP */ - TCP = "TCP", - /** UDP */ - UDP = "UDP", - /** Any */ - Any = "Any", - /** Icmp */ - Icmp = "ICMP", -} - -/** - * Defines values for AzureFirewallNetworkRuleProtocol. \ - * {@link KnownAzureFirewallNetworkRuleProtocol} can be used interchangeably with AzureFirewallNetworkRuleProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TCP** \ - * **UDP** \ - * **Any** \ - * **ICMP** - */ -export type AzureFirewallNetworkRuleProtocol = string; - -/** Known values of {@link AzureFirewallThreatIntelMode} that the service accepts. */ -export enum KnownAzureFirewallThreatIntelMode { - /** Alert */ - Alert = "Alert", - /** Deny */ - Deny = "Deny", - /** Off */ - Off = "Off", -} - -/** - * Defines values for AzureFirewallThreatIntelMode. \ - * {@link KnownAzureFirewallThreatIntelMode} can be used interchangeably with AzureFirewallThreatIntelMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Alert** \ - * **Deny** \ - * **Off** - */ -export type AzureFirewallThreatIntelMode = string; - -/** Known values of {@link AzureFirewallSkuName} that the service accepts. */ -export enum KnownAzureFirewallSkuName { - /** AzfwVnet */ - AzfwVnet = "AZFW_VNet", - /** AzfwHub */ - AzfwHub = "AZFW_Hub", -} - -/** - * Defines values for AzureFirewallSkuName. \ - * {@link KnownAzureFirewallSkuName} can be used interchangeably with AzureFirewallSkuName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AZFW_VNet** \ - * **AZFW_Hub** - */ -export type AzureFirewallSkuName = string; - -/** Known values of {@link AzureFirewallSkuTier} that the service accepts. */ -export enum KnownAzureFirewallSkuTier { - /** Standard */ - Standard = "Standard", - /** Premium */ - Premium = "Premium", - /** Basic */ - Basic = "Basic", -} - -/** - * Defines values for AzureFirewallSkuTier. \ - * {@link KnownAzureFirewallSkuTier} can be used interchangeably with AzureFirewallSkuTier, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard** \ - * **Premium** \ - * **Basic** - */ -export type AzureFirewallSkuTier = string; - -/** Known values of {@link AzureFirewallPacketCaptureFlagsType} that the service accepts. */ -export enum KnownAzureFirewallPacketCaptureFlagsType { - /** Fin */ - Fin = "fin", - /** Syn */ - Syn = "syn", - /** Rst */ - Rst = "rst", - /** Push */ - Push = "push", - /** Ack */ - Ack = "ack", - /** Urg */ - Urg = "urg", -} - -/** - * Defines values for AzureFirewallPacketCaptureFlagsType. \ - * {@link KnownAzureFirewallPacketCaptureFlagsType} can be used interchangeably with AzureFirewallPacketCaptureFlagsType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **fin** \ - * **syn** \ - * **rst** \ - * **push** \ - * **ack** \ - * **urg** - */ -export type AzureFirewallPacketCaptureFlagsType = string; - -/** Known values of {@link AzureFirewallPacketCaptureOperationType} that the service accepts. */ -export enum KnownAzureFirewallPacketCaptureOperationType { - /** Start */ - Start = "Start", - /** Status */ - Status = "Status", - /** Stop */ - Stop = "Stop", -} - -/** - * Defines values for AzureFirewallPacketCaptureOperationType. \ - * {@link KnownAzureFirewallPacketCaptureOperationType} can be used interchangeably with AzureFirewallPacketCaptureOperationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Start** \ - * **Status** \ - * **Stop** - */ -export type AzureFirewallPacketCaptureOperationType = string; - -/** Known values of {@link AzureFirewallPacketCaptureResponseCode} that the service accepts. */ -export enum KnownAzureFirewallPacketCaptureResponseCode { - /** NotImplemented */ - NotImplemented = "NotImplemented", - /** AzureFirewallPacketCaptureStartSucceeded */ - AzureFirewallPacketCaptureStartSucceeded = "AzureFirewallPacketCaptureStartSucceeded", - /** AzureFirewallPacketCaptureStartFailed */ - AzureFirewallPacketCaptureStartFailed = "AzureFirewallPacketCaptureStartFailed", - /** AzureFirewallPacketCaptureStartFailedToUpload */ - AzureFirewallPacketCaptureStartFailedToUpload = "AzureFirewallPacketCaptureStartFailedToUpload", - /** AzureFirewallPacketCaptureStartFailure */ - AzureFirewallPacketCaptureStartFailure = "AzureFirewallPacketCaptureStartFailure", - /** AzureFirewallPacketCaptureInProgress */ - AzureFirewallPacketCaptureInProgress = "AzureFirewallPacketCaptureInProgress", - /** AzureFirewallPacketCaptureNotInProgress */ - AzureFirewallPacketCaptureNotInProgress = "AzureFirewallPacketCaptureNotInProgress", - /** AzureFirewallPacketCaptureStopSucceeded */ - AzureFirewallPacketCaptureStopSucceeded = "AzureFirewallPacketCaptureStopSucceeded", - /** AzureFirewallPacketCaptureFailed */ - AzureFirewallPacketCaptureFailed = "AzureFirewallPacketCaptureFailed", - /** AzureFirewallPacketCaptureCompleted */ - AzureFirewallPacketCaptureCompleted = "AzureFirewallPacketCaptureCompleted", -} - -/** - * Defines values for AzureFirewallPacketCaptureResponseCode. \ - * {@link KnownAzureFirewallPacketCaptureResponseCode} can be used interchangeably with AzureFirewallPacketCaptureResponseCode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotImplemented** \ - * **AzureFirewallPacketCaptureStartSucceeded** \ - * **AzureFirewallPacketCaptureStartFailed** \ - * **AzureFirewallPacketCaptureStartFailedToUpload** \ - * **AzureFirewallPacketCaptureStartFailure** \ - * **AzureFirewallPacketCaptureInProgress** \ - * **AzureFirewallPacketCaptureNotInProgress** \ - * **AzureFirewallPacketCaptureStopSucceeded** \ - * **AzureFirewallPacketCaptureFailed** \ - * **AzureFirewallPacketCaptureCompleted** - */ -export type AzureFirewallPacketCaptureResponseCode = string; - -/** Known values of {@link BastionHostSkuName} that the service accepts. */ -export enum KnownBastionHostSkuName { - /** Basic */ - Basic = "Basic", - /** Standard */ - Standard = "Standard", - /** Developer */ - Developer = "Developer", - /** Premium */ - Premium = "Premium", -} - -/** - * Defines values for BastionHostSkuName. \ - * {@link KnownBastionHostSkuName} can be used interchangeably with BastionHostSkuName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Basic** \ - * **Standard** \ - * **Developer** \ - * **Premium** - */ -export type BastionHostSkuName = string; - -/** Known values of {@link BastionConnectProtocol} that the service accepts. */ -export enum KnownBastionConnectProtocol { - /** SSH */ - SSH = "SSH", - /** RDP */ - RDP = "RDP", -} - -/** - * Defines values for BastionConnectProtocol. \ - * {@link KnownBastionConnectProtocol} can be used interchangeably with BastionConnectProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SSH** \ - * **RDP** - */ -export type BastionConnectProtocol = string; - -/** Known values of {@link CommissionedState} that the service accepts. */ -export enum KnownCommissionedState { - /** Provisioning */ - Provisioning = "Provisioning", - /** Provisioned */ - Provisioned = "Provisioned", - /** Commissioning */ - Commissioning = "Commissioning", - /** CommissionedNoInternetAdvertise */ - CommissionedNoInternetAdvertise = "CommissionedNoInternetAdvertise", - /** Commissioned */ - Commissioned = "Commissioned", - /** Decommissioning */ - Decommissioning = "Decommissioning", - /** Deprovisioning */ - Deprovisioning = "Deprovisioning", - /** Deprovisioned */ - Deprovisioned = "Deprovisioned", -} - -/** - * Defines values for CommissionedState. \ - * {@link KnownCommissionedState} can be used interchangeably with CommissionedState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Provisioning** \ - * **Provisioned** \ - * **Commissioning** \ - * **CommissionedNoInternetAdvertise** \ - * **Commissioned** \ - * **Decommissioning** \ - * **Deprovisioning** \ - * **Deprovisioned** - */ -export type CommissionedState = string; - -/** Known values of {@link Geo} that the service accepts. */ -export enum KnownGeo { - /** Global */ - Global = "GLOBAL", - /** Afri */ - Afri = "AFRI", - /** Apac */ - Apac = "APAC", - /** Euro */ - Euro = "EURO", - /** Latam */ - Latam = "LATAM", - /** NAM */ - NAM = "NAM", - /** ME */ - ME = "ME", - /** Oceania */ - Oceania = "OCEANIA", - /** AQ */ - AQ = "AQ", -} - -/** - * Defines values for Geo. \ - * {@link KnownGeo} can be used interchangeably with Geo, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **GLOBAL** \ - * **AFRI** \ - * **APAC** \ - * **EURO** \ - * **LATAM** \ - * **NAM** \ - * **ME** \ - * **OCEANIA** \ - * **AQ** - */ -export type Geo = string; - -/** Known values of {@link CustomIpPrefixType} that the service accepts. */ -export enum KnownCustomIpPrefixType { - /** Singular */ - Singular = "Singular", - /** Parent */ - Parent = "Parent", - /** Child */ - Child = "Child", -} - -/** - * Defines values for CustomIpPrefixType. \ - * {@link KnownCustomIpPrefixType} can be used interchangeably with CustomIpPrefixType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Singular** \ - * **Parent** \ - * **Child** - */ -export type CustomIpPrefixType = string; - -/** Known values of {@link DdosDetectionMode} that the service accepts. */ -export enum KnownDdosDetectionMode { - /** TrafficThreshold */ - TrafficThreshold = "TrafficThreshold", -} - -/** - * Defines values for DdosDetectionMode. \ - * {@link KnownDdosDetectionMode} can be used interchangeably with DdosDetectionMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TrafficThreshold** - */ -export type DdosDetectionMode = string; - -/** Known values of {@link DdosTrafficType} that the service accepts. */ -export enum KnownDdosTrafficType { - /** Tcp */ - Tcp = "Tcp", - /** Udp */ - Udp = "Udp", - /** TcpSyn */ - TcpSyn = "TcpSyn", -} - -/** - * Defines values for DdosTrafficType. \ - * {@link KnownDdosTrafficType} can be used interchangeably with DdosTrafficType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Tcp** \ - * **Udp** \ - * **TcpSyn** - */ -export type DdosTrafficType = string; - -/** Known values of {@link ProtocolType} that the service accepts. */ -export enum KnownProtocolType { - /** DoNotUse */ - DoNotUse = "DoNotUse", - /** Icmp */ - Icmp = "Icmp", - /** Tcp */ - Tcp = "Tcp", - /** Udp */ - Udp = "Udp", - /** Gre */ - Gre = "Gre", - /** Esp */ - Esp = "Esp", - /** Ah */ - Ah = "Ah", - /** Vxlan */ - Vxlan = "Vxlan", - /** All */ - All = "All", -} - -/** - * Defines values for ProtocolType. \ - * {@link KnownProtocolType} can be used interchangeably with ProtocolType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **DoNotUse** \ - * **Icmp** \ - * **Tcp** \ - * **Udp** \ - * **Gre** \ - * **Esp** \ - * **Ah** \ - * **Vxlan** \ - * **All** - */ -export type ProtocolType = string; - -/** Known values of {@link AuthorizationUseStatus} that the service accepts. */ -export enum KnownAuthorizationUseStatus { - /** Available */ - Available = "Available", - /** InUse */ - InUse = "InUse", -} - -/** - * Defines values for AuthorizationUseStatus. \ - * {@link KnownAuthorizationUseStatus} can be used interchangeably with AuthorizationUseStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Available** \ - * **InUse** - */ -export type AuthorizationUseStatus = string; - -/** Known values of {@link ExpressRoutePeeringType} that the service accepts. */ -export enum KnownExpressRoutePeeringType { - /** AzurePublicPeering */ - AzurePublicPeering = "AzurePublicPeering", - /** AzurePrivatePeering */ - AzurePrivatePeering = "AzurePrivatePeering", - /** MicrosoftPeering */ - MicrosoftPeering = "MicrosoftPeering", -} - -/** - * Defines values for ExpressRoutePeeringType. \ - * {@link KnownExpressRoutePeeringType} can be used interchangeably with ExpressRoutePeeringType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AzurePublicPeering** \ - * **AzurePrivatePeering** \ - * **MicrosoftPeering** - */ -export type ExpressRoutePeeringType = string; - -/** Known values of {@link ExpressRoutePeeringState} that the service accepts. */ -export enum KnownExpressRoutePeeringState { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled", -} - -/** - * Defines values for ExpressRoutePeeringState. \ - * {@link KnownExpressRoutePeeringState} can be used interchangeably with ExpressRoutePeeringState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type ExpressRoutePeeringState = string; - -/** Known values of {@link ExpressRouteCircuitPeeringAdvertisedPublicPrefixState} that the service accepts. */ -export enum KnownExpressRouteCircuitPeeringAdvertisedPublicPrefixState { - /** NotConfigured */ - NotConfigured = "NotConfigured", - /** Configuring */ - Configuring = "Configuring", - /** Configured */ - Configured = "Configured", - /** ValidationNeeded */ - ValidationNeeded = "ValidationNeeded", -} - -/** - * Defines values for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. \ - * {@link KnownExpressRouteCircuitPeeringAdvertisedPublicPrefixState} can be used interchangeably with ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotConfigured** \ - * **Configuring** \ - * **Configured** \ - * **ValidationNeeded** - */ -export type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = string; - -/** Known values of {@link AdvertisedPublicPrefixPropertiesValidationState} that the service accepts. */ -export enum KnownAdvertisedPublicPrefixPropertiesValidationState { - /** NotConfigured */ - NotConfigured = "NotConfigured", - /** Configuring */ - Configuring = "Configuring", - /** Configured */ - Configured = "Configured", - /** ValidationNeeded */ - ValidationNeeded = "ValidationNeeded", - /** ValidationFailed */ - ValidationFailed = "ValidationFailed", - /** ManualValidationNeeded */ - ManualValidationNeeded = "ManualValidationNeeded", - /** AsnValidationFailed */ - AsnValidationFailed = "AsnValidationFailed", - /** CertificateMissingInRoutingRegistry */ - CertificateMissingInRoutingRegistry = "CertificateMissingInRoutingRegistry", - /** InvalidSignatureEncoding */ - InvalidSignatureEncoding = "InvalidSignatureEncoding", - /** SignatureVerificationFailed */ - SignatureVerificationFailed = "SignatureVerificationFailed", -} - -/** - * Defines values for AdvertisedPublicPrefixPropertiesValidationState. \ - * {@link KnownAdvertisedPublicPrefixPropertiesValidationState} can be used interchangeably with AdvertisedPublicPrefixPropertiesValidationState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotConfigured** \ - * **Configuring** \ - * **Configured** \ - * **ValidationNeeded** \ - * **ValidationFailed** \ - * **ManualValidationNeeded** \ - * **AsnValidationFailed** \ - * **CertificateMissingInRoutingRegistry** \ - * **InvalidSignatureEncoding** \ - * **SignatureVerificationFailed** - */ -export type AdvertisedPublicPrefixPropertiesValidationState = string; - -/** Known values of {@link ExpressRouteCircuitPeeringState} that the service accepts. */ -export enum KnownExpressRouteCircuitPeeringState { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled", -} - -/** - * Defines values for ExpressRouteCircuitPeeringState. \ - * {@link KnownExpressRouteCircuitPeeringState} can be used interchangeably with ExpressRouteCircuitPeeringState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type ExpressRouteCircuitPeeringState = string; - -/** Known values of {@link CircuitConnectionStatus} that the service accepts. */ -export enum KnownCircuitConnectionStatus { - /** Connected */ - Connected = "Connected", - /** Connecting */ - Connecting = "Connecting", - /** Disconnected */ - Disconnected = "Disconnected", -} - -/** - * Defines values for CircuitConnectionStatus. \ - * {@link KnownCircuitConnectionStatus} can be used interchangeably with CircuitConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connected** \ - * **Connecting** \ - * **Disconnected** - */ -export type CircuitConnectionStatus = string; - -/** Known values of {@link ExpressRouteCircuitSkuTier} that the service accepts. */ -export enum KnownExpressRouteCircuitSkuTier { - /** Standard */ - Standard = "Standard", - /** Premium */ - Premium = "Premium", - /** Basic */ - Basic = "Basic", - /** Local */ - Local = "Local", -} - -/** - * Defines values for ExpressRouteCircuitSkuTier. \ - * {@link KnownExpressRouteCircuitSkuTier} can be used interchangeably with ExpressRouteCircuitSkuTier, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard** \ - * **Premium** \ - * **Basic** \ - * **Local** - */ -export type ExpressRouteCircuitSkuTier = string; - -/** Known values of {@link ExpressRouteCircuitSkuFamily} that the service accepts. */ -export enum KnownExpressRouteCircuitSkuFamily { - /** UnlimitedData */ - UnlimitedData = "UnlimitedData", - /** MeteredData */ - MeteredData = "MeteredData", -} - -/** - * Defines values for ExpressRouteCircuitSkuFamily. \ - * {@link KnownExpressRouteCircuitSkuFamily} can be used interchangeably with ExpressRouteCircuitSkuFamily, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **UnlimitedData** \ - * **MeteredData** - */ -export type ExpressRouteCircuitSkuFamily = string; - -/** Known values of {@link ServiceProviderProvisioningState} that the service accepts. */ -export enum KnownServiceProviderProvisioningState { - /** NotProvisioned */ - NotProvisioned = "NotProvisioned", - /** Provisioning */ - Provisioning = "Provisioning", - /** Provisioned */ - Provisioned = "Provisioned", - /** Deprovisioning */ - Deprovisioning = "Deprovisioning", -} - -/** - * Defines values for ServiceProviderProvisioningState. \ - * {@link KnownServiceProviderProvisioningState} can be used interchangeably with ServiceProviderProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotProvisioned** \ - * **Provisioning** \ - * **Provisioned** \ - * **Deprovisioning** - */ -export type ServiceProviderProvisioningState = string; - -/** Known values of {@link ExpressRoutePortsEncapsulation} that the service accepts. */ -export enum KnownExpressRoutePortsEncapsulation { - /** Dot1Q */ - Dot1Q = "Dot1Q", - /** QinQ */ - QinQ = "QinQ", -} - -/** - * Defines values for ExpressRoutePortsEncapsulation. \ - * {@link KnownExpressRoutePortsEncapsulation} can be used interchangeably with ExpressRoutePortsEncapsulation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Dot1Q** \ - * **QinQ** - */ -export type ExpressRoutePortsEncapsulation = string; - -/** Known values of {@link ExpressRouteLinkConnectorType} that the service accepts. */ -export enum KnownExpressRouteLinkConnectorType { - /** LC */ - LC = "LC", - /** SC */ - SC = "SC", -} - -/** - * Defines values for ExpressRouteLinkConnectorType. \ - * {@link KnownExpressRouteLinkConnectorType} can be used interchangeably with ExpressRouteLinkConnectorType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **LC** \ - * **SC** - */ -export type ExpressRouteLinkConnectorType = string; - -/** Known values of {@link ExpressRouteLinkAdminState} that the service accepts. */ -export enum KnownExpressRouteLinkAdminState { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for ExpressRouteLinkAdminState. \ - * {@link KnownExpressRouteLinkAdminState} can be used interchangeably with ExpressRouteLinkAdminState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type ExpressRouteLinkAdminState = string; - -/** Known values of {@link ExpressRouteLinkMacSecCipher} that the service accepts. */ -export enum KnownExpressRouteLinkMacSecCipher { - /** GcmAes256 */ - GcmAes256 = "GcmAes256", - /** GcmAes128 */ - GcmAes128 = "GcmAes128", - /** GcmAesXpn128 */ - GcmAesXpn128 = "GcmAesXpn128", - /** GcmAesXpn256 */ - GcmAesXpn256 = "GcmAesXpn256", -} - -/** - * Defines values for ExpressRouteLinkMacSecCipher. \ - * {@link KnownExpressRouteLinkMacSecCipher} can be used interchangeably with ExpressRouteLinkMacSecCipher, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **GcmAes256** \ - * **GcmAes128** \ - * **GcmAesXpn128** \ - * **GcmAesXpn256** - */ -export type ExpressRouteLinkMacSecCipher = string; - -/** Known values of {@link ExpressRouteLinkMacSecSciState} that the service accepts. */ -export enum KnownExpressRouteLinkMacSecSciState { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled", -} - -/** - * Defines values for ExpressRouteLinkMacSecSciState. \ - * {@link KnownExpressRouteLinkMacSecSciState} can be used interchangeably with ExpressRouteLinkMacSecSciState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type ExpressRouteLinkMacSecSciState = string; - -/** Known values of {@link ExpressRoutePortsBillingType} that the service accepts. */ -export enum KnownExpressRoutePortsBillingType { - /** MeteredData */ - MeteredData = "MeteredData", - /** UnlimitedData */ - UnlimitedData = "UnlimitedData", -} - -/** - * Defines values for ExpressRoutePortsBillingType. \ - * {@link KnownExpressRoutePortsBillingType} can be used interchangeably with ExpressRoutePortsBillingType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **MeteredData** \ - * **UnlimitedData** - */ -export type ExpressRoutePortsBillingType = string; - -/** Known values of {@link ExpressRoutePortAuthorizationUseStatus} that the service accepts. */ -export enum KnownExpressRoutePortAuthorizationUseStatus { - /** Available */ - Available = "Available", - /** InUse */ - 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 AutoLearnPrivateRangesMode} that the service accepts. */ -export enum KnownAutoLearnPrivateRangesMode { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for AutoLearnPrivateRangesMode. \ - * {@link KnownAutoLearnPrivateRangesMode} can be used interchangeably with AutoLearnPrivateRangesMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type AutoLearnPrivateRangesMode = string; - -/** Known values of {@link FirewallPolicyIntrusionDetectionStateType} that the service accepts. */ -export enum KnownFirewallPolicyIntrusionDetectionStateType { - /** Off */ - Off = "Off", - /** Alert */ - Alert = "Alert", - /** Deny */ - Deny = "Deny", -} - -/** - * Defines values for FirewallPolicyIntrusionDetectionStateType. \ - * {@link KnownFirewallPolicyIntrusionDetectionStateType} can be used interchangeably with FirewallPolicyIntrusionDetectionStateType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Off** \ - * **Alert** \ - * **Deny** - */ -export type FirewallPolicyIntrusionDetectionStateType = string; - -/** Known values of {@link FirewallPolicyIntrusionDetectionProfileType} that the service accepts. */ -export enum KnownFirewallPolicyIntrusionDetectionProfileType { - /** Off */ - Off = "Off", - /** Emerging */ - Emerging = "Emerging", - /** Core */ - Core = "Core", - /** Extended */ - Extended = "Extended", -} - -/** - * Defines values for FirewallPolicyIntrusionDetectionProfileType. \ - * {@link KnownFirewallPolicyIntrusionDetectionProfileType} can be used interchangeably with FirewallPolicyIntrusionDetectionProfileType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Off** \ - * **Emerging** \ - * **Core** \ - * **Extended** - */ -export type FirewallPolicyIntrusionDetectionProfileType = string; - -/** Known values of {@link FirewallPolicyIntrusionDetectionProtocol} that the service accepts. */ -export enum KnownFirewallPolicyIntrusionDetectionProtocol { - /** TCP */ - TCP = "TCP", - /** UDP */ - UDP = "UDP", - /** Icmp */ - Icmp = "ICMP", - /** ANY */ - ANY = "ANY", -} - -/** - * Defines values for FirewallPolicyIntrusionDetectionProtocol. \ - * {@link KnownFirewallPolicyIntrusionDetectionProtocol} can be used interchangeably with FirewallPolicyIntrusionDetectionProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TCP** \ - * **UDP** \ - * **ICMP** \ - * **ANY** - */ -export type FirewallPolicyIntrusionDetectionProtocol = string; - -/** Known values of {@link FirewallPolicySkuTier} that the service accepts. */ -export enum KnownFirewallPolicySkuTier { - /** Standard */ - Standard = "Standard", - /** Premium */ - Premium = "Premium", - /** Basic */ - Basic = "Basic", -} - -/** - * Defines values for FirewallPolicySkuTier. \ - * {@link KnownFirewallPolicySkuTier} can be used interchangeably with FirewallPolicySkuTier, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard** \ - * **Premium** \ - * **Basic** - */ -export type FirewallPolicySkuTier = string; - -/** Known values of {@link FirewallPolicyRuleCollectionType} that the service accepts. */ -export enum KnownFirewallPolicyRuleCollectionType { - /** FirewallPolicyNatRuleCollection */ - FirewallPolicyNatRuleCollection = "FirewallPolicyNatRuleCollection", - /** FirewallPolicyFilterRuleCollection */ - FirewallPolicyFilterRuleCollection = "FirewallPolicyFilterRuleCollection", -} - -/** - * Defines values for FirewallPolicyRuleCollectionType. \ - * {@link KnownFirewallPolicyRuleCollectionType} can be used interchangeably with FirewallPolicyRuleCollectionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **FirewallPolicyNatRuleCollection** \ - * **FirewallPolicyFilterRuleCollection** - */ -export type FirewallPolicyRuleCollectionType = string; - -/** Known values of {@link FirewallPolicyIdpsQuerySortOrder} that the service accepts. */ -export enum KnownFirewallPolicyIdpsQuerySortOrder { - /** Ascending */ - Ascending = "Ascending", - /** Descending */ - Descending = "Descending", -} - -/** - * 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 FirewallPolicyIdpsQuerySortOrder = string; - -/** Known values of {@link IpType} that the service accepts. */ -export enum KnownIpType { - /** IPv4 */ - IPv4 = "IPv4", - /** IPv6 */ - IPv6 = "IPv6", -} - -/** - * Defines values for IpType. \ - * {@link KnownIpType} can be used interchangeably with IpType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPv4** \ - * **IPv6** - */ -export type IpType = string; - -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key", -} - -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; - -/** Known values of {@link IpAllocationType} that the service accepts. */ -export enum KnownIpAllocationType { - /** Undefined */ - Undefined = "Undefined", - /** Hypernet */ - Hypernet = "Hypernet", -} - -/** - * Defines values for IpAllocationType. \ - * {@link KnownIpAllocationType} can be used interchangeably with IpAllocationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Undefined** \ - * **Hypernet** - */ -export type IpAllocationType = string; - -/** Known values of {@link LoadBalancerSkuName} that the service accepts. */ -export enum KnownLoadBalancerSkuName { - /** Basic */ - Basic = "Basic", - /** Standard */ - Standard = "Standard", - /** Gateway */ - Gateway = "Gateway", -} - -/** - * Defines values for LoadBalancerSkuName. \ - * {@link KnownLoadBalancerSkuName} can be used interchangeably with LoadBalancerSkuName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Basic** \ - * **Standard** \ - * **Gateway** - */ -export type LoadBalancerSkuName = string; - -/** Known values of {@link LoadBalancerSkuTier} that the service accepts. */ -export enum KnownLoadBalancerSkuTier { - /** Regional */ - Regional = "Regional", - /** Global */ - Global = "Global", -} - -/** - * Defines values for LoadBalancerSkuTier. \ - * {@link KnownLoadBalancerSkuTier} can be used interchangeably with LoadBalancerSkuTier, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Regional** \ - * **Global** - */ -export type LoadBalancerSkuTier = string; - -/** Known values of {@link LoadDistribution} that the service accepts. */ -export enum KnownLoadDistribution { - /** Default */ - Default = "Default", - /** SourceIP */ - SourceIP = "SourceIP", - /** SourceIPProtocol */ - SourceIPProtocol = "SourceIPProtocol", -} - -/** - * Defines values for LoadDistribution. \ - * {@link KnownLoadDistribution} can be used interchangeably with LoadDistribution, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default** \ - * **SourceIP** \ - * **SourceIPProtocol** - */ -export type LoadDistribution = string; - -/** Known values of {@link ProbeProtocol} that the service accepts. */ -export enum KnownProbeProtocol { - /** Http */ - Http = "Http", - /** Tcp */ - Tcp = "Tcp", - /** Https */ - Https = "Https", -} - -/** - * Defines values for ProbeProtocol. \ - * {@link KnownProbeProtocol} can be used interchangeably with ProbeProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Http** \ - * **Tcp** \ - * **Https** - */ -export type ProbeProtocol = string; - -/** Known values of {@link ProbeNoHealthyBackendsBehavior} that the service accepts. */ -export enum KnownProbeNoHealthyBackendsBehavior { - /** No new flows will be sent to the backend pool. */ - AllProbedDown = "AllProbedDown", - /** When all backend instances are probed down, incoming packets will be sent to all instances. */ - AllProbedUp = "AllProbedUp", -} - -/** - * Defines values for ProbeNoHealthyBackendsBehavior. \ - * {@link KnownProbeNoHealthyBackendsBehavior} can be used interchangeably with ProbeNoHealthyBackendsBehavior, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AllProbedDown**: No new flows will be sent to the backend pool. \ - * **AllProbedUp**: When all backend instances are probed down, incoming packets will be sent to all instances. - */ -export type ProbeNoHealthyBackendsBehavior = string; - -/** Known values of {@link LoadBalancerOutboundRuleProtocol} that the service accepts. */ -export enum KnownLoadBalancerOutboundRuleProtocol { - /** Tcp */ - Tcp = "Tcp", - /** Udp */ - Udp = "Udp", - /** All */ - All = "All", -} - -/** - * Defines values for LoadBalancerOutboundRuleProtocol. \ - * {@link KnownLoadBalancerOutboundRuleProtocol} can be used interchangeably with LoadBalancerOutboundRuleProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Tcp** \ - * **Udp** \ - * **All** - */ -export type LoadBalancerOutboundRuleProtocol = string; - -/** Known values of {@link LoadBalancerScope} that the service accepts. */ -export enum KnownLoadBalancerScope { - /** Public */ - Public = "Public", - /** Private */ - Private = "Private", -} - -/** - * Defines values for LoadBalancerScope. \ - * {@link KnownLoadBalancerScope} can be used interchangeably with LoadBalancerScope, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Public** \ - * **Private** - */ -export type LoadBalancerScope = string; - -/** Known values of {@link EffectiveRouteSource} that the service accepts. */ -export enum KnownEffectiveRouteSource { - /** Unknown */ - Unknown = "Unknown", - /** User */ - User = "User", - /** VirtualNetworkGateway */ - VirtualNetworkGateway = "VirtualNetworkGateway", - /** Default */ - Default = "Default", -} - -/** - * Defines values for EffectiveRouteSource. \ - * {@link KnownEffectiveRouteSource} can be used interchangeably with EffectiveRouteSource, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **User** \ - * **VirtualNetworkGateway** \ - * **Default** - */ -export type EffectiveRouteSource = string; - -/** Known values of {@link EffectiveRouteState} that the service accepts. */ -export enum KnownEffectiveRouteState { - /** Active */ - Active = "Active", - /** Invalid */ - Invalid = "Invalid", -} - -/** - * Defines values for EffectiveRouteState. \ - * {@link KnownEffectiveRouteState} can be used interchangeably with EffectiveRouteState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Active** \ - * **Invalid** - */ -export type EffectiveRouteState = string; - -/** Known values of {@link EffectiveSecurityRuleProtocol} that the service accepts. */ -export enum KnownEffectiveSecurityRuleProtocol { - /** Tcp */ - Tcp = "Tcp", - /** Udp */ - Udp = "Udp", - /** All */ - All = "All", -} - -/** - * Defines values for EffectiveSecurityRuleProtocol. \ - * {@link KnownEffectiveSecurityRuleProtocol} can be used interchangeably with EffectiveSecurityRuleProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Tcp** \ - * **Udp** \ - * **All** - */ -export type EffectiveSecurityRuleProtocol = string; - -/** Known values of {@link ConfigurationType} that the service accepts. */ -export enum KnownConfigurationType { - /** SecurityAdmin */ - SecurityAdmin = "SecurityAdmin", - /** Connectivity */ - Connectivity = "Connectivity", - /** SecurityUser */ - SecurityUser = "SecurityUser", - /** Routing */ - Routing = "Routing", -} - -/** - * Defines values for ConfigurationType. \ - * {@link KnownConfigurationType} can be used interchangeably with ConfigurationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SecurityAdmin** \ - * **Connectivity** \ - * **SecurityUser** \ - * **Routing** - */ -export type ConfigurationType = string; - -/** Known values of {@link DeploymentStatus} that the service accepts. */ -export enum KnownDeploymentStatus { - /** NotStarted */ - NotStarted = "NotStarted", - /** Deploying */ - Deploying = "Deploying", - /** Deployed */ - Deployed = "Deployed", - /** Failed */ - Failed = "Failed", -} - -/** - * Defines values for DeploymentStatus. \ - * {@link KnownDeploymentStatus} can be used interchangeably with DeploymentStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotStarted** \ - * **Deploying** \ - * **Deployed** \ - * **Failed** - */ -export type DeploymentStatus = string; - -/** Known values of {@link ConnectivityTopology} that the service accepts. */ -export enum KnownConnectivityTopology { - /** HubAndSpoke */ - HubAndSpoke = "HubAndSpoke", - /** Mesh */ - Mesh = "Mesh", -} - -/** - * Defines values for ConnectivityTopology. \ - * {@link KnownConnectivityTopology} can be used interchangeably with ConnectivityTopology, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **HubAndSpoke** \ - * **Mesh** - */ -export type ConnectivityTopology = string; - -/** Known values of {@link IsGlobal} that the service accepts. */ -export enum KnownIsGlobal { - /** False */ - False = "False", - /** True */ - True = "True", -} - -/** - * Defines values for IsGlobal. \ - * {@link KnownIsGlobal} can be used interchangeably with IsGlobal, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **False** \ - * **True** - */ -export type IsGlobal = string; - -/** Known values of {@link ConnectedGroupPrivateEndpointsScale} that the service accepts. */ -export enum KnownConnectedGroupPrivateEndpointsScale { - /** Default. Allows for up to 2K private endpoints in the connected group. */ - Standard = "Standard", - /** Allows for up to 20K private endpoints in the connected group. */ - HighScale = "HighScale", -} - -/** - * Defines values for ConnectedGroupPrivateEndpointsScale. \ - * {@link KnownConnectedGroupPrivateEndpointsScale} can be used interchangeably with ConnectedGroupPrivateEndpointsScale, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard**: Default. Allows for up to 2K private endpoints in the connected group. \ - * **HighScale**: Allows for up to 20K private endpoints in the connected group. - */ -export type ConnectedGroupPrivateEndpointsScale = string; - -/** Known values of {@link ConnectedGroupAddressOverlap} that the service accepts. */ -export enum KnownConnectedGroupAddressOverlap { - /** Default. Allows connected group members to have overlapping IP address space. */ - Allowed = "Allowed", - /** Strictly disallows connected group members from having overlapping IP address space. Prevents the addition of a virtual network with overlapping address to the connected group, blocks peering between a virtual network and a connected group member if any connected group member has an overlapping range, and restricts address space modifications that would introduce overlap. */ - Disallowed = "Disallowed", -} - -/** - * Defines values for ConnectedGroupAddressOverlap. \ - * {@link KnownConnectedGroupAddressOverlap} can be used interchangeably with ConnectedGroupAddressOverlap, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Allowed**: Default. Allows connected group members to have overlapping IP address space. \ - * **Disallowed**: Strictly disallows connected group members from having overlapping IP address space. Prevents the addition of a virtual network with overlapping address to the connected group, blocks peering between a virtual network and a connected group member if any connected group member has an overlapping range, and restricts address space modifications that would introduce overlap. - */ -export type ConnectedGroupAddressOverlap = string; - -/** Known values of {@link PeeringEnforcement} that the service accepts. */ -export enum KnownPeeringEnforcement { - /** Default. Peerings created by the connectivity configuration may be modified or deleted outside of the network manager. */ - Unenforced = "Unenforced", - /** Peerings created by the connectivity configuration will not be modifiable or deletable outside of the network manager. */ - Enforced = "Enforced", -} - -/** - * Defines values for PeeringEnforcement. \ - * {@link KnownPeeringEnforcement} can be used interchangeably with PeeringEnforcement, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unenforced**: Default. Peerings created by the connectivity configuration may be modified or deleted outside of the network manager. \ - * **Enforced**: Peerings created by the connectivity configuration will not be modifiable or deletable outside of the network manager. - */ -export type PeeringEnforcement = string; - -/** Known values of {@link UseHubGateway} that the service accepts. */ -export enum KnownUseHubGateway { - /** False */ - False = "False", - /** True */ - True = "True", -} - -/** - * Defines values for UseHubGateway. \ - * {@link KnownUseHubGateway} can be used interchangeably with UseHubGateway, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **False** \ - * **True** - */ -export type UseHubGateway = string; - -/** Known values of {@link GroupConnectivity} that the service accepts. */ -export enum KnownGroupConnectivity { - /** None */ - None = "None", - /** DirectlyConnected */ - DirectlyConnected = "DirectlyConnected", -} - -/** - * Defines values for GroupConnectivity. \ - * {@link KnownGroupConnectivity} can be used interchangeably with GroupConnectivity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **DirectlyConnected** - */ -export type GroupConnectivity = string; - -/** Known values of {@link DeleteExistingPeering} that the service accepts. */ -export enum KnownDeleteExistingPeering { - /** False */ - False = "False", - /** True */ - True = "True", -} - -/** - * Defines values for DeleteExistingPeering. \ - * {@link KnownDeleteExistingPeering} can be used interchangeably with DeleteExistingPeering, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **False** \ - * **True** - */ -export type DeleteExistingPeering = string; - -/** Known values of {@link GroupMemberType} that the service accepts. */ -export enum KnownGroupMemberType { - /** VirtualNetwork */ - VirtualNetwork = "VirtualNetwork", - /** Subnet */ - Subnet = "Subnet", -} - -/** - * Defines values for GroupMemberType. \ - * {@link KnownGroupMemberType} can be used interchangeably with GroupMemberType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **VirtualNetwork** \ - * **Subnet** - */ -export type GroupMemberType = string; - -/** Known values of {@link EffectiveAdminRuleKind} that the service accepts. */ -export enum KnownEffectiveAdminRuleKind { - /** Custom */ - Custom = "Custom", - /** Default */ - Default = "Default", -} - -/** - * Defines values for EffectiveAdminRuleKind. \ - * {@link KnownEffectiveAdminRuleKind} can be used interchangeably with EffectiveAdminRuleKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Custom** \ - * **Default** - */ -export type EffectiveAdminRuleKind = string; - -/** Known values of {@link ScopeConnectionState} that the service accepts. */ -export enum KnownScopeConnectionState { - /** Connected */ - Connected = "Connected", - /** Pending */ - Pending = "Pending", - /** Conflict */ - Conflict = "Conflict", - /** Revoked */ - Revoked = "Revoked", - /** Rejected */ - Rejected = "Rejected", -} - -/** - * Defines values for ScopeConnectionState. \ - * {@link KnownScopeConnectionState} can be used interchangeably with ScopeConnectionState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connected** \ - * **Pending** \ - * **Conflict** \ - * **Revoked** \ - * **Rejected** - */ -export type ScopeConnectionState = string; - -/** Known values of {@link RouteTableUsageMode} that the service accepts. */ -export enum KnownRouteTableUsageMode { - /** Only route tables managed by the routing configuration will be used. */ - ManagedOnly = "ManagedOnly", - /** Use existing user-defined route tables already associated with resources. */ - UseExisting = "UseExisting", -} - -/** - * Defines values for RouteTableUsageMode. \ - * {@link KnownRouteTableUsageMode} can be used interchangeably with RouteTableUsageMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ManagedOnly**: Only route tables managed by the routing configuration will be used. \ - * **UseExisting**: Use existing user-defined route tables already associated with resources. - */ -export type RouteTableUsageMode = string; - -/** Known values of {@link DisableBgpRoutePropagation} that the service accepts. */ -export enum KnownDisableBgpRoutePropagation { - /** BGP route propagation is enabled. */ - False = "False", - /** BGP route propagation is disabled. */ - True = "True", -} - -/** - * Defines values for DisableBgpRoutePropagation. \ - * {@link KnownDisableBgpRoutePropagation} can be used interchangeably with DisableBgpRoutePropagation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **False**: BGP route propagation is enabled. \ - * **True**: BGP route propagation is disabled. - */ -export type DisableBgpRoutePropagation = string; - -/** Known values of {@link RoutingRuleDestinationType} that the service accepts. */ -export enum KnownRoutingRuleDestinationType { - /** Destination specified as an IP address prefix (CIDR). */ - AddressPrefix = "AddressPrefix", - /** Destination specified as an Azure service tag. */ - ServiceTag = "ServiceTag", -} - -/** - * Defines values for RoutingRuleDestinationType. \ - * {@link KnownRoutingRuleDestinationType} can be used interchangeably with RoutingRuleDestinationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AddressPrefix**: Destination specified as an IP address prefix (CIDR). \ - * **ServiceTag**: Destination specified as an Azure service tag. - */ -export type RoutingRuleDestinationType = string; - -/** Known values of {@link RoutingRuleNextHopType} that the service accepts. */ -export enum KnownRoutingRuleNextHopType { - /** Forward traffic to the Internet. */ - Internet = "Internet", - /** No next hop will be used. */ - NoNextHop = "NoNextHop", - /** Forward traffic to a specified virtual appliance IP address. */ - VirtualAppliance = "VirtualAppliance", - /** Forward traffic to the virtual network gateway. */ - VirtualNetworkGateway = "VirtualNetworkGateway", - /** Keep traffic within the local virtual network */ - VnetLocal = "VnetLocal", -} - -/** - * Defines values for RoutingRuleNextHopType. \ - * {@link KnownRoutingRuleNextHopType} can be used interchangeably with RoutingRuleNextHopType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internet**: Forward traffic to the Internet. \ - * **NoNextHop**: No next hop will be used. \ - * **VirtualAppliance**: Forward traffic to a specified virtual appliance IP address. \ - * **VirtualNetworkGateway**: Forward traffic to the virtual network gateway. \ - * **VnetLocal**: Keep traffic within the local virtual network - */ -export type RoutingRuleNextHopType = string; - -/** Known values of {@link NetworkIntentPolicyBasedService} that the service accepts. */ -export enum KnownNetworkIntentPolicyBasedService { - /** None */ - None = "None", - /** All */ - All = "All", - /** AllowRulesOnly */ - AllowRulesOnly = "AllowRulesOnly", -} - -/** - * Defines values for NetworkIntentPolicyBasedService. \ - * {@link KnownNetworkIntentPolicyBasedService} can be used interchangeably with NetworkIntentPolicyBasedService, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **All** \ - * **AllowRulesOnly** - */ -export type NetworkIntentPolicyBasedService = string; - -/** Known values of {@link AddressSpaceAggregationOption} that the service accepts. */ -export enum KnownAddressSpaceAggregationOption { - /** None */ - None = "None", - /** Manual */ - Manual = "Manual", -} - -/** - * Defines values for AddressSpaceAggregationOption. \ - * {@link KnownAddressSpaceAggregationOption} can be used interchangeably with AddressSpaceAggregationOption, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Manual** - */ -export type AddressSpaceAggregationOption = string; - -/** Known values of {@link AdminRuleKind} that the service accepts. */ -export enum KnownAdminRuleKind { - /** Custom */ - Custom = "Custom", - /** Default */ - Default = "Default", -} - -/** - * Defines values for AdminRuleKind. \ - * {@link KnownAdminRuleKind} can be used interchangeably with AdminRuleKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Custom** \ - * **Default** - */ -export type AdminRuleKind = string; - -/** Known values of {@link SecurityConfigurationRuleProtocol} that the service accepts. */ -export enum KnownSecurityConfigurationRuleProtocol { - /** Tcp */ - Tcp = "Tcp", - /** Udp */ - Udp = "Udp", - /** Icmp */ - Icmp = "Icmp", - /** Esp */ - Esp = "Esp", - /** Any */ - Any = "Any", - /** Ah */ - Ah = "Ah", -} - -/** - * Defines values for SecurityConfigurationRuleProtocol. \ - * {@link KnownSecurityConfigurationRuleProtocol} can be used interchangeably with SecurityConfigurationRuleProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Tcp** \ - * **Udp** \ - * **Icmp** \ - * **Esp** \ - * **Any** \ - * **Ah** - */ -export type SecurityConfigurationRuleProtocol = string; - -/** Known values of {@link AddressPrefixType} that the service accepts. */ -export enum KnownAddressPrefixType { - /** IPPrefix */ - IPPrefix = "IPPrefix", - /** ServiceTag */ - ServiceTag = "ServiceTag", - /** NetworkGroup */ - NetworkGroup = "NetworkGroup", -} - -/** - * Defines values for AddressPrefixType. \ - * {@link KnownAddressPrefixType} can be used interchangeably with AddressPrefixType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPPrefix** \ - * **ServiceTag** \ - * **NetworkGroup** - */ -export type AddressPrefixType = string; - -/** Known values of {@link SecurityConfigurationRuleDirection} that the service accepts. */ -export enum KnownSecurityConfigurationRuleDirection { - /** Inbound */ - Inbound = "Inbound", - /** Outbound */ - Outbound = "Outbound", -} - -/** - * Defines values for SecurityConfigurationRuleDirection. \ - * {@link KnownSecurityConfigurationRuleDirection} can be used interchangeably with SecurityConfigurationRuleDirection, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Inbound** \ - * **Outbound** - */ -export type SecurityConfigurationRuleDirection = string; - -/** Known values of {@link NspProvisioningState} that the service accepts. */ -export enum KnownNspProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Accepted */ - Accepted = "Accepted", - /** Failed */ - Failed = "Failed", -} - -/** - * Defines values for NspProvisioningState. \ - * {@link KnownNspProvisioningState} can be used interchangeably with NspProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Accepted** \ - * **Failed** - */ -export type NspProvisioningState = string; - -/** Known values of {@link AccessRuleDirection} that the service accepts. */ -export enum KnownAccessRuleDirection { - /** Inbound */ - Inbound = "Inbound", - /** Outbound */ - Outbound = "Outbound", -} - -/** - * Defines values for AccessRuleDirection. \ - * {@link KnownAccessRuleDirection} can be used interchangeably with AccessRuleDirection, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Inbound** \ - * **Outbound** - */ -export type AccessRuleDirection = string; - -/** Known values of {@link AssociationAccessMode} that the service accepts. */ -export enum KnownAssociationAccessMode { - /** Learning */ - Learning = "Learning", - /** Enforced */ - Enforced = "Enforced", - /** Audit */ - Audit = "Audit", -} - -/** - * Defines values for AssociationAccessMode. \ - * {@link KnownAssociationAccessMode} can be used interchangeably with AssociationAccessMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Learning** \ - * **Enforced** \ - * **Audit** - */ -export type AssociationAccessMode = string; - -/** Known values of {@link NspLinkProvisioningState} that the service accepts. */ -export enum KnownNspLinkProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Accepted */ - Accepted = "Accepted", - /** Failed */ - Failed = "Failed", - /** WaitForRemoteCompletion */ - WaitForRemoteCompletion = "WaitForRemoteCompletion", -} - -/** - * Defines values for NspLinkProvisioningState. \ - * {@link KnownNspLinkProvisioningState} can be used interchangeably with NspLinkProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Accepted** \ - * **Failed** \ - * **WaitForRemoteCompletion** - */ -export type NspLinkProvisioningState = string; - -/** Known values of {@link NspLinkStatus} that the service accepts. */ -export enum KnownNspLinkStatus { - /** Approved */ - Approved = "Approved", - /** Pending */ - Pending = "Pending", - /** Rejected */ - Rejected = "Rejected", - /** Disconnected */ - Disconnected = "Disconnected", -} - -/** - * Defines values for NspLinkStatus. \ - * {@link KnownNspLinkStatus} can be used interchangeably with NspLinkStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Approved** \ - * **Pending** \ - * **Rejected** \ - * **Disconnected** - */ -export type NspLinkStatus = string; - -/** Known values of {@link NetworkProtocol} that the service accepts. */ -export enum KnownNetworkProtocol { - /** Any */ - Any = "Any", - /** TCP */ - TCP = "TCP", - /** UDP */ - UDP = "UDP", - /** Icmp */ - Icmp = "ICMP", -} - -/** - * Defines values for NetworkProtocol. \ - * {@link KnownNetworkProtocol} can be used interchangeably with NetworkProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Any** \ - * **TCP** \ - * **UDP** \ - * **ICMP** - */ -export type NetworkProtocol = string; - -/** Known values of {@link NicTypeInResponse} that the service accepts. */ -export enum KnownNicTypeInResponse { - /** PublicNic */ - PublicNic = "PublicNic", - /** PrivateNic */ - PrivateNic = "PrivateNic", - /** AdditionalNic */ - AdditionalNic = "AdditionalNic", -} - -/** - * Defines values for NicTypeInResponse. \ - * {@link KnownNicTypeInResponse} can be used interchangeably with NicTypeInResponse, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PublicNic** \ - * **PrivateNic** \ - * **AdditionalNic** - */ -export type NicTypeInResponse = string; - -/** Known values of {@link NicTypeInRequest} that the service accepts. */ -export enum KnownNicTypeInRequest { - /** PublicNic */ - PublicNic = "PublicNic", - /** PrivateNic */ - PrivateNic = "PrivateNic", -} - -/** - * Defines values for NicTypeInRequest. \ - * {@link KnownNicTypeInRequest} can be used interchangeably with NicTypeInRequest, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PublicNic** \ - * **PrivateNic** - */ -export type NicTypeInRequest = string; - -/** Known values of {@link NvaNicType} that the service accepts. */ -export enum KnownNvaNicType { - /** The private NIC type */ - PrivateNic = "PrivateNic", - /** The public NIC type */ - PublicNic = "PublicNic", - /** An additional private NIC type */ - AdditionalPrivateNic = "AdditionalPrivateNic", - /** An additional public NIC type */ - AdditionalPublicNic = "AdditionalPublicNic", -} - -/** - * Defines values for NvaNicType. \ - * {@link KnownNvaNicType} can be used interchangeably with NvaNicType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PrivateNic**: The private NIC type \ - * **PublicNic**: The public NIC type \ - * **AdditionalPrivateNic**: An additional private NIC type \ - * **AdditionalPublicNic**: An additional public NIC type - */ -export type NvaNicType = string; - -/** Known values of {@link InboundSecurityRuleType} that the service accepts. */ -export enum KnownInboundSecurityRuleType { - /** AutoExpire */ - AutoExpire = "AutoExpire", - /** Permanent */ - Permanent = "Permanent", -} - -/** - * Defines values for InboundSecurityRuleType. \ - * {@link KnownInboundSecurityRuleType} can be used interchangeably with InboundSecurityRuleType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AutoExpire** \ - * **Permanent** - */ -export type InboundSecurityRuleType = string; - -/** Known values of {@link InboundSecurityRulesProtocol} that the service accepts. */ -export enum KnownInboundSecurityRulesProtocol { - /** TCP */ - TCP = "TCP", - /** UDP */ - UDP = "UDP", -} - -/** - * Defines values for InboundSecurityRulesProtocol. \ - * {@link KnownInboundSecurityRulesProtocol} can be used interchangeably with InboundSecurityRulesProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TCP** \ - * **UDP** - */ -export type InboundSecurityRulesProtocol = string; - -/** Known values of {@link AssociationType} that the service accepts. */ -export enum KnownAssociationType { - /** Associated */ - Associated = "Associated", - /** Contains */ - Contains = "Contains", -} - -/** - * Defines values for AssociationType. \ - * {@link KnownAssociationType} can be used interchangeably with AssociationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Associated** \ - * **Contains** - */ -export type AssociationType = string; - -/** Known values of {@link Direction} that the service accepts. */ -export enum KnownDirection { - /** Inbound */ - Inbound = "Inbound", - /** Outbound */ - Outbound = "Outbound", -} - -/** - * Defines values for Direction. \ - * {@link KnownDirection} can be used interchangeably with Direction, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Inbound** \ - * **Outbound** - */ -export type Direction = string; - -/** Known values of {@link IpFlowProtocol} that the service accepts. */ -export enum KnownIpFlowProtocol { - /** TCP */ - TCP = "TCP", - /** UDP */ - UDP = "UDP", -} - -/** - * Defines values for IpFlowProtocol. \ - * {@link KnownIpFlowProtocol} can be used interchangeably with IpFlowProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TCP** \ - * **UDP** - */ -export type IpFlowProtocol = string; - -/** Known values of {@link Access} that the service accepts. */ -export enum KnownAccess { - /** Allow */ - Allow = "Allow", - /** Deny */ - Deny = "Deny", -} - -/** - * Defines values for Access. \ - * {@link KnownAccess} can be used interchangeably with Access, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Allow** \ - * **Deny** - */ -export type Access = string; - -/** Known values of {@link NextHopType} that the service accepts. */ -export enum KnownNextHopType { - /** Internet */ - Internet = "Internet", - /** VirtualAppliance */ - VirtualAppliance = "VirtualAppliance", - /** VirtualNetworkGateway */ - VirtualNetworkGateway = "VirtualNetworkGateway", - /** VnetLocal */ - VnetLocal = "VnetLocal", - /** HyperNetGateway */ - HyperNetGateway = "HyperNetGateway", - /** None */ - None = "None", -} - -/** - * Defines values for NextHopType. \ - * {@link KnownNextHopType} can be used interchangeably with NextHopType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internet** \ - * **VirtualAppliance** \ - * **VirtualNetworkGateway** \ - * **VnetLocal** \ - * **HyperNetGateway** \ - * **None** - */ -export type NextHopType = string; - -/** Known values of {@link PcProtocol} that the service accepts. */ -export enum KnownPcProtocol { - /** TCP */ - TCP = "TCP", - /** UDP */ - UDP = "UDP", - /** Any */ - Any = "Any", -} - -/** - * Defines values for PcProtocol. \ - * {@link KnownPcProtocol} can be used interchangeably with PcProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TCP** \ - * **UDP** \ - * **Any** - */ -export type PcProtocol = string; - -/** Known values of {@link PcStatus} that the service accepts. */ -export enum KnownPcStatus { - /** NotStarted */ - NotStarted = "NotStarted", - /** Running */ - Running = "Running", - /** Stopped */ - Stopped = "Stopped", - /** Error */ - Error = "Error", - /** Unknown */ - Unknown = "Unknown", -} - -/** - * Defines values for PcStatus. \ - * {@link KnownPcStatus} can be used interchangeably with PcStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotStarted** \ - * **Running** \ - * **Stopped** \ - * **Error** \ - * **Unknown** - */ -export type PcStatus = string; - -/** Known values of {@link PcError} that the service accepts. */ -export enum KnownPcError { - /** InternalError */ - InternalError = "InternalError", - /** AgentStopped */ - AgentStopped = "AgentStopped", - /** CaptureFailed */ - CaptureFailed = "CaptureFailed", - /** LocalFileFailed */ - LocalFileFailed = "LocalFileFailed", - /** StorageFailed */ - StorageFailed = "StorageFailed", -} - -/** - * Defines values for PcError. \ - * {@link KnownPcError} can be used interchangeably with PcError, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **InternalError** \ - * **AgentStopped** \ - * **CaptureFailed** \ - * **LocalFileFailed** \ - * **StorageFailed** - */ -export type PcError = string; - -/** Known values of {@link Protocol} that the service accepts. */ -export enum KnownProtocol { - /** Tcp */ - Tcp = "Tcp", - /** Http */ - Http = "Http", - /** Https */ - Https = "Https", - /** Icmp */ - Icmp = "Icmp", -} - -/** - * Defines values for Protocol. \ - * {@link KnownProtocol} can be used interchangeably with Protocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Tcp** \ - * **Http** \ - * **Https** \ - * **Icmp** - */ -export type Protocol = string; - -/** Known values of {@link HttpMethod} that the service accepts. */ -export enum KnownHttpMethod { - /** Get */ - Get = "Get", -} - -/** - * Defines values for HttpMethod. \ - * {@link KnownHttpMethod} can be used interchangeably with HttpMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Get** - */ -export type HttpMethod = string; - -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** Local */ - Local = "Local", - /** Inbound */ - Inbound = "Inbound", - /** Outbound */ - Outbound = "Outbound", -} - -/** - * Defines values for Origin. \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Local** \ - * **Inbound** \ - * **Outbound** - */ -export type Origin = string; - -/** Known values of {@link Severity} that the service accepts. */ -export enum KnownSeverity { - /** Error */ - Error = "Error", - /** Warning */ - Warning = "Warning", -} - -/** - * Defines values for Severity. \ - * {@link KnownSeverity} can be used interchangeably with Severity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Error** \ - * **Warning** - */ -export type Severity = string; - -/** Known values of {@link IssueType} that the service accepts. */ -export enum KnownIssueType { - /** Unknown */ - Unknown = "Unknown", - /** AgentStopped */ - AgentStopped = "AgentStopped", - /** GuestFirewall */ - GuestFirewall = "GuestFirewall", - /** DnsResolution */ - DnsResolution = "DnsResolution", - /** SocketBind */ - SocketBind = "SocketBind", - /** NetworkSecurityRule */ - NetworkSecurityRule = "NetworkSecurityRule", - /** UserDefinedRoute */ - UserDefinedRoute = "UserDefinedRoute", - /** PortThrottled */ - PortThrottled = "PortThrottled", - /** Platform */ - Platform = "Platform", -} - -/** - * Defines values for IssueType. \ - * {@link KnownIssueType} can be used interchangeably with IssueType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **AgentStopped** \ - * **GuestFirewall** \ - * **DnsResolution** \ - * **SocketBind** \ - * **NetworkSecurityRule** \ - * **UserDefinedRoute** \ - * **PortThrottled** \ - * **Platform** - */ -export type IssueType = string; - -/** Known values of {@link ConnectionStatus} that the service accepts. */ -export enum KnownConnectionStatus { - /** Unknown */ - Unknown = "Unknown", - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Degraded */ - Degraded = "Degraded", -} - -/** - * Defines values for ConnectionStatus. \ - * {@link KnownConnectionStatus} can be used interchangeably with ConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Connected** \ - * **Disconnected** \ - * **Degraded** - */ -export type ConnectionStatus = string; - -/** Known values of {@link VerbosityLevel} that the service accepts. */ -export enum KnownVerbosityLevel { - /** Normal */ - Normal = "Normal", - /** Minimum */ - Minimum = "Minimum", - /** Full */ - Full = "Full", -} - -/** - * Defines values for VerbosityLevel. \ - * {@link KnownVerbosityLevel} can be used interchangeably with VerbosityLevel, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Normal** \ - * **Minimum** \ - * **Full** - */ -export type VerbosityLevel = string; - -/** Known values of {@link EndpointType} that the service accepts. */ -export enum KnownEndpointType { - /** AzureVM */ - AzureVM = "AzureVM", - /** AzureVNet */ - AzureVNet = "AzureVNet", - /** AzureSubnet */ - AzureSubnet = "AzureSubnet", - /** ExternalAddress */ - ExternalAddress = "ExternalAddress", - /** MMAWorkspaceMachine */ - MMAWorkspaceMachine = "MMAWorkspaceMachine", - /** MMAWorkspaceNetwork */ - MMAWorkspaceNetwork = "MMAWorkspaceNetwork", - /** AzureArcVM */ - AzureArcVM = "AzureArcVM", - /** AzureVmss */ - AzureVmss = "AzureVMSS", - /** AzureArcNetwork */ - AzureArcNetwork = "AzureArcNetwork", -} - -/** - * Defines values for EndpointType. \ - * {@link KnownEndpointType} can be used interchangeably with EndpointType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AzureVM** \ - * **AzureVNet** \ - * **AzureSubnet** \ - * **ExternalAddress** \ - * **MMAWorkspaceMachine** \ - * **MMAWorkspaceNetwork** \ - * **AzureArcVM** \ - * **AzureVMSS** \ - * **AzureArcNetwork** - */ -export type EndpointType = string; - -/** Known values of {@link ConnectionMonitorEndpointFilterType} that the service accepts. */ -export enum KnownConnectionMonitorEndpointFilterType { - /** Include */ - Include = "Include", -} - -/** - * Defines values for ConnectionMonitorEndpointFilterType. \ - * {@link KnownConnectionMonitorEndpointFilterType} can be used interchangeably with ConnectionMonitorEndpointFilterType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Include** - */ -export type ConnectionMonitorEndpointFilterType = string; - -/** Known values of {@link ConnectionMonitorEndpointFilterItemType} that the service accepts. */ -export enum KnownConnectionMonitorEndpointFilterItemType { - /** AgentAddress */ - AgentAddress = "AgentAddress", -} - -/** - * Defines values for ConnectionMonitorEndpointFilterItemType. \ - * {@link KnownConnectionMonitorEndpointFilterItemType} can be used interchangeably with ConnectionMonitorEndpointFilterItemType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AgentAddress** - */ -export type ConnectionMonitorEndpointFilterItemType = string; - -/** Known values of {@link CoverageLevel} that the service accepts. */ -export enum KnownCoverageLevel { - /** Default */ - Default = "Default", - /** Low */ - Low = "Low", - /** BelowAverage */ - BelowAverage = "BelowAverage", - /** Average */ - Average = "Average", - /** AboveAverage */ - AboveAverage = "AboveAverage", - /** Full */ - Full = "Full", -} - -/** - * Defines values for CoverageLevel. \ - * {@link KnownCoverageLevel} can be used interchangeably with CoverageLevel, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default** \ - * **Low** \ - * **BelowAverage** \ - * **Average** \ - * **AboveAverage** \ - * **Full** - */ -export type CoverageLevel = string; - -/** Known values of {@link ConnectionMonitorTestConfigurationProtocol} that the service accepts. */ -export enum KnownConnectionMonitorTestConfigurationProtocol { - /** Tcp */ - Tcp = "Tcp", - /** Http */ - Http = "Http", - /** Icmp */ - Icmp = "Icmp", -} - -/** - * Defines values for ConnectionMonitorTestConfigurationProtocol. \ - * {@link KnownConnectionMonitorTestConfigurationProtocol} can be used interchangeably with ConnectionMonitorTestConfigurationProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Tcp** \ - * **Http** \ - * **Icmp** - */ -export type ConnectionMonitorTestConfigurationProtocol = string; - -/** Known values of {@link PreferredIPVersion} that the service accepts. */ -export enum KnownPreferredIPVersion { - /** IPv4 */ - IPv4 = "IPv4", - /** IPv6 */ - IPv6 = "IPv6", -} - -/** - * Defines values for PreferredIPVersion. \ - * {@link KnownPreferredIPVersion} can be used interchangeably with PreferredIPVersion, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPv4** \ - * **IPv6** - */ -export type PreferredIPVersion = string; - -/** Known values of {@link HttpConfigurationMethod} that the service accepts. */ -export enum KnownHttpConfigurationMethod { - /** Get */ - Get = "Get", - /** Post */ - Post = "Post", -} - -/** - * Defines values for HttpConfigurationMethod. \ - * {@link KnownHttpConfigurationMethod} can be used interchangeably with HttpConfigurationMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Get** \ - * **Post** - */ -export type HttpConfigurationMethod = string; - -/** Known values of {@link DestinationPortBehavior} that the service accepts. */ -export enum KnownDestinationPortBehavior { - /** None */ - None = "None", - /** ListenIfAvailable */ - ListenIfAvailable = "ListenIfAvailable", -} - -/** - * Defines values for DestinationPortBehavior. \ - * {@link KnownDestinationPortBehavior} can be used interchangeably with DestinationPortBehavior, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **ListenIfAvailable** - */ -export type DestinationPortBehavior = string; - -/** Known values of {@link OutputType} that the service accepts. */ -export enum KnownOutputType { - /** Workspace */ - Workspace = "Workspace", -} - -/** - * Defines values for OutputType. \ - * {@link KnownOutputType} can be used interchangeably with OutputType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Workspace** - */ -export type OutputType = string; - -/** Known values of {@link ConnectionMonitorType} that the service accepts. */ -export enum KnownConnectionMonitorType { - /** MultiEndpoint */ - MultiEndpoint = "MultiEndpoint", - /** SingleSourceDestination */ - SingleSourceDestination = "SingleSourceDestination", -} - -/** - * Defines values for ConnectionMonitorType. \ - * {@link KnownConnectionMonitorType} can be used interchangeably with ConnectionMonitorType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **MultiEndpoint** \ - * **SingleSourceDestination** - */ -export type ConnectionMonitorType = string; - -/** Known values of {@link IsWorkloadProtected} that the service accepts. */ -export enum KnownIsWorkloadProtected { - /** False */ - False = "False", - /** True */ - True = "True", -} - -/** - * Defines values for IsWorkloadProtected. \ - * {@link KnownIsWorkloadProtected} can be used interchangeably with IsWorkloadProtected, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **False** \ - * **True** - */ -export type IsWorkloadProtected = string; - -/** Known values of {@link IsRollback} that the service accepts. */ -export enum KnownIsRollback { - /** True */ - True = "true", - /** False */ - False = "false", -} - -/** - * Defines values for IsRollback. \ - * {@link KnownIsRollback} can be used interchangeably with IsRollback, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true** \ - * **false** - */ -export type IsRollback = string; - -/** Known values of {@link PublicIPPrefixSkuName} that the service accepts. */ -export enum KnownPublicIPPrefixSkuName { - /** Standard */ - Standard = "Standard", - /** StandardV2 */ - StandardV2 = "StandardV2", -} - -/** - * Defines values for PublicIPPrefixSkuName. \ - * {@link KnownPublicIPPrefixSkuName} can be used interchangeably with PublicIPPrefixSkuName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard** \ - * **StandardV2** - */ -export type PublicIPPrefixSkuName = string; - -/** Known values of {@link PublicIPPrefixSkuTier} that the service accepts. */ -export enum KnownPublicIPPrefixSkuTier { - /** Regional */ - Regional = "Regional", - /** Global */ - Global = "Global", -} - -/** - * Defines values for PublicIPPrefixSkuTier. \ - * {@link KnownPublicIPPrefixSkuTier} can be used interchangeably with PublicIPPrefixSkuTier, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Regional** \ - * **Global** - */ -export type PublicIPPrefixSkuTier = string; - -/** Known values of {@link RouteFilterRuleType} that the service accepts. */ -export enum KnownRouteFilterRuleType { - /** Community */ - Community = "Community", -} - -/** - * Defines values for RouteFilterRuleType. \ - * {@link KnownRouteFilterRuleType} can be used interchangeably with RouteFilterRuleType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Community** - */ -export type RouteFilterRuleType = string; - -/** Known values of {@link SecurityProviderName} that the service accepts. */ -export enum KnownSecurityProviderName { - /** ZScaler */ - ZScaler = "ZScaler", - /** IBoss */ - IBoss = "IBoss", - /** Checkpoint */ - Checkpoint = "Checkpoint", -} - -/** - * Defines values for SecurityProviderName. \ - * {@link KnownSecurityProviderName} can be used interchangeably with SecurityProviderName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ZScaler** \ - * **IBoss** \ - * **Checkpoint** - */ -export type SecurityProviderName = string; - -/** Known values of {@link SecurityPartnerProviderConnectionStatus} that the service accepts. */ -export enum KnownSecurityPartnerProviderConnectionStatus { - /** Unknown */ - Unknown = "Unknown", - /** PartiallyConnected */ - PartiallyConnected = "PartiallyConnected", - /** Connected */ - Connected = "Connected", - /** NotConnected */ - NotConnected = "NotConnected", -} - -/** - * Defines values for SecurityPartnerProviderConnectionStatus. \ - * {@link KnownSecurityPartnerProviderConnectionStatus} can be used interchangeably with SecurityPartnerProviderConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **PartiallyConnected** \ - * **Connected** \ - * **NotConnected** - */ -export type SecurityPartnerProviderConnectionStatus = string; - -/** Known values of {@link VirtualNetworkEncryptionEnforcement} that the service accepts. */ -export enum KnownVirtualNetworkEncryptionEnforcement { - /** DropUnencrypted */ - DropUnencrypted = "DropUnencrypted", - /** AllowUnencrypted */ - AllowUnencrypted = "AllowUnencrypted", -} - -/** - * Defines values for VirtualNetworkEncryptionEnforcement. \ - * {@link KnownVirtualNetworkEncryptionEnforcement} can be used interchangeably with VirtualNetworkEncryptionEnforcement, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **DropUnencrypted** \ - * **AllowUnencrypted** - */ -export type VirtualNetworkEncryptionEnforcement = string; - -/** Known values of {@link VirtualNetworkPeeringState} that the service accepts. */ -export enum KnownVirtualNetworkPeeringState { - /** Initiated */ - Initiated = "Initiated", - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", -} - -/** - * Defines values for VirtualNetworkPeeringState. \ - * {@link KnownVirtualNetworkPeeringState} can be used interchangeably with VirtualNetworkPeeringState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Initiated** \ - * **Connected** \ - * **Disconnected** - */ -export type VirtualNetworkPeeringState = string; - -/** Known values of {@link VirtualNetworkPeeringLevel} that the service accepts. */ -export enum KnownVirtualNetworkPeeringLevel { - /** FullyInSync */ - FullyInSync = "FullyInSync", - /** RemoteNotInSync */ - RemoteNotInSync = "RemoteNotInSync", - /** LocalNotInSync */ - LocalNotInSync = "LocalNotInSync", - /** LocalAndRemoteNotInSync */ - LocalAndRemoteNotInSync = "LocalAndRemoteNotInSync", -} - -/** - * Defines values for VirtualNetworkPeeringLevel. \ - * {@link KnownVirtualNetworkPeeringLevel} can be used interchangeably with VirtualNetworkPeeringLevel, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **FullyInSync** \ - * **RemoteNotInSync** \ - * **LocalNotInSync** \ - * **LocalAndRemoteNotInSync** - */ -export type VirtualNetworkPeeringLevel = string; - -/** Known values of {@link PrivateEndpointVNetPolicies} that the service accepts. */ -export enum KnownPrivateEndpointVNetPolicies { - /** Disabled */ - Disabled = "Disabled", - /** Basic */ - Basic = "Basic", -} - -/** - * Defines values for PrivateEndpointVNetPolicies. \ - * {@link KnownPrivateEndpointVNetPolicies} can be used interchangeably with PrivateEndpointVNetPolicies, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Basic** - */ -export type PrivateEndpointVNetPolicies = string; - -/** Known values of {@link ServiceGatewaySkuName} that the service accepts. */ -export enum KnownServiceGatewaySkuName { - /** Standard */ - Standard = "Standard", -} - -/** - * Defines values for ServiceGatewaySkuName. \ - * {@link KnownServiceGatewaySkuName} can be used interchangeably with ServiceGatewaySkuName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard** - */ -export type ServiceGatewaySkuName = string; - -/** Known values of {@link ServiceGatewaySkuTier} that the service accepts. */ -export enum KnownServiceGatewaySkuTier { - /** Regional */ - Regional = "Regional", -} - -/** - * Defines values for ServiceGatewaySkuTier. \ - * {@link KnownServiceGatewaySkuTier} can be used interchangeably with ServiceGatewaySkuTier, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Regional** - */ -export type ServiceGatewaySkuTier = string; - -/** Known values of {@link UpdateAction} that the service accepts. */ -export enum KnownUpdateAction { - /** FullUpdate */ - FullUpdate = "FullUpdate", - /** PartialUpdate */ - PartialUpdate = "PartialUpdate", -} - -/** - * Defines values for UpdateAction. \ - * {@link KnownUpdateAction} can be used interchangeably with UpdateAction, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **FullUpdate** \ - * **PartialUpdate** - */ -export type UpdateAction = string; - -/** Known values of {@link AddressUpdateAction} that the service accepts. */ -export enum KnownAddressUpdateAction { - /** FullUpdate */ - FullUpdate = "FullUpdate", - /** PartialUpdate */ - PartialUpdate = "PartialUpdate", -} - -/** - * Defines values for AddressUpdateAction. \ - * {@link KnownAddressUpdateAction} can be used interchangeably with AddressUpdateAction, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **FullUpdate** \ - * **PartialUpdate** - */ -export type AddressUpdateAction = string; - -/** Known values of {@link ServiceUpdateAction} that the service accepts. */ -export enum KnownServiceUpdateAction { - /** FullUpdate */ - FullUpdate = "FullUpdate", - /** PartialUpdate */ - PartialUpdate = "PartialUpdate", -} - -/** - * Defines values for ServiceUpdateAction. \ - * {@link KnownServiceUpdateAction} can be used interchangeably with ServiceUpdateAction, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **FullUpdate** \ - * **PartialUpdate** - */ -export type ServiceUpdateAction = string; - -/** Known values of {@link ServiceType} that the service accepts. */ -export enum KnownServiceType { - /** Inbound */ - Inbound = "Inbound", - /** Outbound */ - Outbound = "Outbound", - /** InboundOutbound */ - InboundOutbound = "InboundOutbound", -} - -/** - * Defines values for ServiceType. \ - * {@link KnownServiceType} can be used interchangeably with ServiceType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Inbound** \ - * **Outbound** \ - * **InboundOutbound** - */ -export type ServiceType = string; - -/** Known values of {@link UsageUnit} that the service accepts. */ -export enum KnownUsageUnit { - /** Count */ - Count = "Count", -} - -/** - * Defines values for UsageUnit. \ - * {@link KnownUsageUnit} can be used interchangeably with UsageUnit, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Count** - */ -export type UsageUnit = string; - -/** Known values of {@link SyncRemoteAddressSpace} that the service accepts. */ -export enum KnownSyncRemoteAddressSpace { - /** True */ - True = "true", -} - -/** - * Defines values for SyncRemoteAddressSpace. \ - * {@link KnownSyncRemoteAddressSpace} can be used interchangeably with SyncRemoteAddressSpace, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true** - */ -export type SyncRemoteAddressSpace = string; - -/** Known values of {@link VirtualNetworkGatewayType} that the service accepts. */ -export enum KnownVirtualNetworkGatewayType { - /** Vpn */ - Vpn = "Vpn", - /** ExpressRoute */ - ExpressRoute = "ExpressRoute", - /** LocalGateway */ - LocalGateway = "LocalGateway", -} - -/** - * Defines values for VirtualNetworkGatewayType. \ - * {@link KnownVirtualNetworkGatewayType} can be used interchangeably with VirtualNetworkGatewayType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Vpn** \ - * **ExpressRoute** \ - * **LocalGateway** - */ -export type VirtualNetworkGatewayType = string; - -/** Known values of {@link VpnType} that the service accepts. */ -export enum KnownVpnType { - /** PolicyBased */ - PolicyBased = "PolicyBased", - /** RouteBased */ - RouteBased = "RouteBased", -} - -/** - * Defines values for VpnType. \ - * {@link KnownVpnType} can be used interchangeably with VpnType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PolicyBased** \ - * **RouteBased** - */ -export type VpnType = string; - -/** Known values of {@link VpnGatewayGeneration} that the service accepts. */ -export enum KnownVpnGatewayGeneration { - /** None */ - None = "None", - /** Generation1 */ - Generation1 = "Generation1", - /** Generation2 */ - Generation2 = "Generation2", -} - -/** - * Defines values for VpnGatewayGeneration. \ - * {@link KnownVpnGatewayGeneration} can be used interchangeably with VpnGatewayGeneration, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Generation1** \ - * **Generation2** - */ -export type VpnGatewayGeneration = string; - -/** Known values of {@link VirtualNetworkGatewayMigrationState} that the service accepts. */ -export enum KnownVirtualNetworkGatewayMigrationState { - /** None */ - None = "None", - /** InProgress */ - InProgress = "InProgress", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", -} - -/** - * Defines values for VirtualNetworkGatewayMigrationState. \ - * {@link KnownVirtualNetworkGatewayMigrationState} can be used interchangeably with VirtualNetworkGatewayMigrationState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **InProgress** \ - * **Succeeded** \ - * **Failed** - */ -export type VirtualNetworkGatewayMigrationState = string; - -/** Known values of {@link VirtualNetworkGatewayMigrationPhase} that the service accepts. */ -export enum KnownVirtualNetworkGatewayMigrationPhase { - /** No migration phase set on gateway. */ - None = "None", - /** Gateway is going through prepare migration or prepare has failed. Please see state and error details for more information. */ - Prepare = "Prepare", - /** Prepare succeeded on gateway. */ - PrepareSucceeded = "PrepareSucceeded", - /** Gateway is going through execute migration or execute has failed. Please see state and error details for more information. */ - Execute = "Execute", - /** Execute succeeded on gateway. */ - ExecuteSucceeded = "ExecuteSucceeded", - /** Gateway is going through commit migration or commit has failed. Please see state and error details for more information. */ - Commit = "Commit", - /** Commit succeeded, represent migration is complete for the gateway. */ - CommitSucceeded = "CommitSucceeded", - /** Represent abort succeeded on gateway, start with prepare to retrigger migration. */ - AbortSucceeded = "AbortSucceeded", - /** Gateway is going through abort migration or abort has failed. Please see state and error details for more information. */ - Abort = "Abort", -} - -/** - * Defines values for VirtualNetworkGatewayMigrationPhase. \ - * {@link KnownVirtualNetworkGatewayMigrationPhase} can be used interchangeably with VirtualNetworkGatewayMigrationPhase, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None**: No migration phase set on gateway. \ - * **Prepare**: Gateway is going through prepare migration or prepare has failed. Please see state and error details for more information. \ - * **PrepareSucceeded**: Prepare succeeded on gateway. \ - * **Execute**: Gateway is going through execute migration or execute has failed. Please see state and error details for more information. \ - * **ExecuteSucceeded**: Execute succeeded on gateway. \ - * **Commit**: Gateway is going through commit migration or commit has failed. Please see state and error details for more information. \ - * **CommitSucceeded**: Commit succeeded, represent migration is complete for the gateway. \ - * **AbortSucceeded**: Represent abort succeeded on gateway, start with prepare to retrigger migration. \ - * **Abort**: Gateway is going through abort migration or abort has failed. Please see state and error details for more information. - */ -export type VirtualNetworkGatewayMigrationPhase = string; - -/** Known values of {@link VirtualNetworkGatewaySkuName} that the service accepts. */ -export enum KnownVirtualNetworkGatewaySkuName { - /** Basic */ - Basic = "Basic", - /** HighPerformance */ - HighPerformance = "HighPerformance", - /** Standard */ - Standard = "Standard", - /** UltraPerformance */ - UltraPerformance = "UltraPerformance", - /** VpnGw1 */ - VpnGw1 = "VpnGw1", - /** VpnGw2 */ - VpnGw2 = "VpnGw2", - /** VpnGw3 */ - VpnGw3 = "VpnGw3", - /** VpnGw4 */ - VpnGw4 = "VpnGw4", - /** VpnGw5 */ - VpnGw5 = "VpnGw5", - /** VpnGw1AZ */ - VpnGw1AZ = "VpnGw1AZ", - /** VpnGw2AZ */ - VpnGw2AZ = "VpnGw2AZ", - /** VpnGw3AZ */ - VpnGw3AZ = "VpnGw3AZ", - /** VpnGw4AZ */ - VpnGw4AZ = "VpnGw4AZ", - /** VpnGw5AZ */ - VpnGw5AZ = "VpnGw5AZ", - /** ErGw1AZ */ - ErGw1AZ = "ErGw1AZ", - /** ErGw2AZ */ - ErGw2AZ = "ErGw2AZ", - /** ErGw3AZ */ - ErGw3AZ = "ErGw3AZ", - /** ErGwScale */ - ErGwScale = "ErGwScale", -} - -/** - * Defines values for VirtualNetworkGatewaySkuName. \ - * {@link KnownVirtualNetworkGatewaySkuName} can be used interchangeably with VirtualNetworkGatewaySkuName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Basic** \ - * **HighPerformance** \ - * **Standard** \ - * **UltraPerformance** \ - * **VpnGw1** \ - * **VpnGw2** \ - * **VpnGw3** \ - * **VpnGw4** \ - * **VpnGw5** \ - * **VpnGw1AZ** \ - * **VpnGw2AZ** \ - * **VpnGw3AZ** \ - * **VpnGw4AZ** \ - * **VpnGw5AZ** \ - * **ErGw1AZ** \ - * **ErGw2AZ** \ - * **ErGw3AZ** \ - * **ErGwScale** - */ -export type VirtualNetworkGatewaySkuName = string; - -/** Known values of {@link VirtualNetworkGatewaySkuTier} that the service accepts. */ -export enum KnownVirtualNetworkGatewaySkuTier { - /** Basic */ - Basic = "Basic", - /** HighPerformance */ - HighPerformance = "HighPerformance", - /** Standard */ - Standard = "Standard", - /** UltraPerformance */ - UltraPerformance = "UltraPerformance", - /** VpnGw1 */ - VpnGw1 = "VpnGw1", - /** VpnGw2 */ - VpnGw2 = "VpnGw2", - /** VpnGw3 */ - VpnGw3 = "VpnGw3", - /** VpnGw4 */ - VpnGw4 = "VpnGw4", - /** VpnGw5 */ - VpnGw5 = "VpnGw5", - /** VpnGw1AZ */ - VpnGw1AZ = "VpnGw1AZ", - /** VpnGw2AZ */ - VpnGw2AZ = "VpnGw2AZ", - /** VpnGw3AZ */ - VpnGw3AZ = "VpnGw3AZ", - /** VpnGw4AZ */ - VpnGw4AZ = "VpnGw4AZ", - /** VpnGw5AZ */ - VpnGw5AZ = "VpnGw5AZ", - /** ErGw1AZ */ - ErGw1AZ = "ErGw1AZ", - /** ErGw2AZ */ - ErGw2AZ = "ErGw2AZ", - /** ErGw3AZ */ - ErGw3AZ = "ErGw3AZ", - /** ErGwScale */ - ErGwScale = "ErGwScale", -} - -/** - * Defines values for VirtualNetworkGatewaySkuTier. \ - * {@link KnownVirtualNetworkGatewaySkuTier} can be used interchangeably with VirtualNetworkGatewaySkuTier, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Basic** \ - * **HighPerformance** \ - * **Standard** \ - * **UltraPerformance** \ - * **VpnGw1** \ - * **VpnGw2** \ - * **VpnGw3** \ - * **VpnGw4** \ - * **VpnGw5** \ - * **VpnGw1AZ** \ - * **VpnGw2AZ** \ - * **VpnGw3AZ** \ - * **VpnGw4AZ** \ - * **VpnGw5AZ** \ - * **ErGw1AZ** \ - * **ErGw2AZ** \ - * **ErGw3AZ** \ - * **ErGwScale** - */ -export type VirtualNetworkGatewaySkuTier = string; - -/** Known values of {@link VpnClientProtocol} that the service accepts. */ -export enum KnownVpnClientProtocol { - /** IkeV2 */ - IkeV2 = "IkeV2", - /** Sstp */ - Sstp = "SSTP", - /** OpenVPN */ - OpenVPN = "OpenVPN", -} - -/** - * Defines values for VpnClientProtocol. \ - * {@link KnownVpnClientProtocol} can be used interchangeably with VpnClientProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IkeV2** \ - * **SSTP** \ - * **OpenVPN** - */ -export type VpnClientProtocol = string; - -/** Known values of {@link VpnAuthenticationType} that the service accepts. */ -export enum KnownVpnAuthenticationType { - /** Certificate */ - Certificate = "Certificate", - /** Radius */ - Radius = "Radius", - /** AAD */ - AAD = "AAD", -} - -/** - * Defines values for VpnAuthenticationType. \ - * {@link KnownVpnAuthenticationType} can be used interchangeably with VpnAuthenticationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Certificate** \ - * **Radius** \ - * **AAD** - */ -export type VpnAuthenticationType = string; - -/** Known values of {@link IpsecEncryption} that the service accepts. */ -export enum KnownIpsecEncryption { - /** None */ - None = "None", - /** DES */ - DES = "DES", - /** DES3 */ - DES3 = "DES3", - /** AES128 */ - AES128 = "AES128", - /** AES192 */ - AES192 = "AES192", - /** AES256 */ - AES256 = "AES256", - /** Gcmaes128 */ - Gcmaes128 = "GCMAES128", - /** Gcmaes192 */ - Gcmaes192 = "GCMAES192", - /** Gcmaes256 */ - Gcmaes256 = "GCMAES256", -} - -/** - * Defines values for IpsecEncryption. \ - * {@link KnownIpsecEncryption} can be used interchangeably with IpsecEncryption, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **DES** \ - * **DES3** \ - * **AES128** \ - * **AES192** \ - * **AES256** \ - * **GCMAES128** \ - * **GCMAES192** \ - * **GCMAES256** - */ -export type IpsecEncryption = string; - -/** Known values of {@link IpsecIntegrity} that the service accepts. */ -export enum KnownIpsecIntegrity { - /** MD5 */ - MD5 = "MD5", - /** SHA1 */ - SHA1 = "SHA1", - /** SHA256 */ - SHA256 = "SHA256", - /** Gcmaes128 */ - Gcmaes128 = "GCMAES128", - /** Gcmaes192 */ - Gcmaes192 = "GCMAES192", - /** Gcmaes256 */ - Gcmaes256 = "GCMAES256", -} - -/** - * Defines values for IpsecIntegrity. \ - * {@link KnownIpsecIntegrity} can be used interchangeably with IpsecIntegrity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **MD5** \ - * **SHA1** \ - * **SHA256** \ - * **GCMAES128** \ - * **GCMAES192** \ - * **GCMAES256** - */ -export type IpsecIntegrity = string; - -/** Known values of {@link IkeEncryption} that the service accepts. */ -export enum KnownIkeEncryption { - /** DES */ - DES = "DES", - /** DES3 */ - DES3 = "DES3", - /** AES128 */ - AES128 = "AES128", - /** AES192 */ - AES192 = "AES192", - /** AES256 */ - AES256 = "AES256", - /** Gcmaes256 */ - Gcmaes256 = "GCMAES256", - /** Gcmaes128 */ - Gcmaes128 = "GCMAES128", -} - -/** - * Defines values for IkeEncryption. \ - * {@link KnownIkeEncryption} can be used interchangeably with IkeEncryption, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **DES** \ - * **DES3** \ - * **AES128** \ - * **AES192** \ - * **AES256** \ - * **GCMAES256** \ - * **GCMAES128** - */ -export type IkeEncryption = string; - -/** Known values of {@link IkeIntegrity} that the service accepts. */ -export enum KnownIkeIntegrity { - /** MD5 */ - MD5 = "MD5", - /** SHA1 */ - SHA1 = "SHA1", - /** SHA256 */ - SHA256 = "SHA256", - /** SHA384 */ - SHA384 = "SHA384", - /** Gcmaes256 */ - Gcmaes256 = "GCMAES256", - /** Gcmaes128 */ - Gcmaes128 = "GCMAES128", -} - -/** - * Defines values for IkeIntegrity. \ - * {@link KnownIkeIntegrity} can be used interchangeably with IkeIntegrity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **MD5** \ - * **SHA1** \ - * **SHA256** \ - * **SHA384** \ - * **GCMAES256** \ - * **GCMAES128** - */ -export type IkeIntegrity = string; - -/** Known values of {@link DhGroup} that the service accepts. */ -export enum KnownDhGroup { - /** None */ - None = "None", - /** DHGroup1 */ - DHGroup1 = "DHGroup1", - /** DHGroup2 */ - DHGroup2 = "DHGroup2", - /** DHGroup14 */ - DHGroup14 = "DHGroup14", - /** DHGroup2048 */ - DHGroup2048 = "DHGroup2048", - /** ECP256 */ - ECP256 = "ECP256", - /** ECP384 */ - ECP384 = "ECP384", - /** DHGroup24 */ - DHGroup24 = "DHGroup24", -} - -/** - * Defines values for DhGroup. \ - * {@link KnownDhGroup} can be used interchangeably with DhGroup, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **DHGroup1** \ - * **DHGroup2** \ - * **DHGroup14** \ - * **DHGroup2048** \ - * **ECP256** \ - * **ECP384** \ - * **DHGroup24** - */ -export type DhGroup = string; - -/** Known values of {@link PfsGroup} that the service accepts. */ -export enum KnownPfsGroup { - /** None */ - None = "None", - /** PFS1 */ - PFS1 = "PFS1", - /** PFS2 */ - PFS2 = "PFS2", - /** PFS2048 */ - PFS2048 = "PFS2048", - /** ECP256 */ - ECP256 = "ECP256", - /** ECP384 */ - ECP384 = "ECP384", - /** PFS24 */ - PFS24 = "PFS24", - /** PFS14 */ - PFS14 = "PFS14", - /** Pfsmm */ - Pfsmm = "PFSMM", -} - -/** - * Defines values for PfsGroup. \ - * {@link KnownPfsGroup} can be used interchangeably with PfsGroup, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **PFS1** \ - * **PFS2** \ - * **PFS2048** \ - * **ECP256** \ - * **ECP384** \ - * **PFS24** \ - * **PFS14** \ - * **PFSMM** - */ -export type PfsGroup = string; - -/** Known values of {@link VpnPolicyMemberAttributeType} that the service accepts. */ -export enum KnownVpnPolicyMemberAttributeType { - /** CertificateGroupId */ - CertificateGroupId = "CertificateGroupId", - /** AADGroupId */ - AADGroupId = "AADGroupId", - /** RadiusAzureGroupId */ - 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 VpnNatRuleType} that the service accepts. */ -export enum KnownVpnNatRuleType { - /** Static */ - Static = "Static", - /** Dynamic */ - Dynamic = "Dynamic", -} - -/** - * Defines values for VpnNatRuleType. \ - * {@link KnownVpnNatRuleType} can be used interchangeably with VpnNatRuleType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Static** \ - * **Dynamic** - */ -export type VpnNatRuleType = string; - -/** Known values of {@link VpnNatRuleMode} that the service accepts. */ -export enum KnownVpnNatRuleMode { - /** EgressSnat */ - EgressSnat = "EgressSnat", - /** IngressSnat */ - IngressSnat = "IngressSnat", -} - -/** - * Defines values for VpnNatRuleMode. \ - * {@link KnownVpnNatRuleMode} can be used interchangeably with VpnNatRuleMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **EgressSnat** \ - * **IngressSnat** - */ -export type VpnNatRuleMode = string; - -/** Known values of {@link AdminState} that the service accepts. */ -export enum KnownAdminState { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for AdminState. \ - * {@link KnownAdminState} can be used interchangeably with AdminState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type AdminState = string; - -/** Known values of {@link ResiliencyModel} that the service accepts. */ -export enum KnownResiliencyModel { - /** SingleHomed */ - SingleHomed = "SingleHomed", - /** MultiHomed */ - MultiHomed = "MultiHomed", -} - -/** - * Defines values for ResiliencyModel. \ - * {@link KnownResiliencyModel} can be used interchangeably with ResiliencyModel, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SingleHomed** \ - * **MultiHomed** - */ -export type ResiliencyModel = string; - -/** Known values of {@link VirtualNetworkGatewayConnectionType} that the service accepts. */ -export enum KnownVirtualNetworkGatewayConnectionType { - /** IPsec */ - IPsec = "IPsec", - /** Vnet2Vnet */ - Vnet2Vnet = "Vnet2Vnet", - /** ExpressRoute */ - ExpressRoute = "ExpressRoute", - /** VPNClient */ - VPNClient = "VPNClient", -} - -/** - * Defines values for VirtualNetworkGatewayConnectionType. \ - * {@link KnownVirtualNetworkGatewayConnectionType} can be used interchangeably with VirtualNetworkGatewayConnectionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPsec** \ - * **Vnet2Vnet** \ - * **ExpressRoute** \ - * **VPNClient** - */ -export type VirtualNetworkGatewayConnectionType = string; - -/** Known values of {@link VirtualNetworkGatewayConnectionProtocol} that the service accepts. */ -export enum KnownVirtualNetworkGatewayConnectionProtocol { - /** IKEv2 */ - IKEv2 = "IKEv2", - /** IKEv1 */ - IKEv1 = "IKEv1", -} - -/** - * Defines values for VirtualNetworkGatewayConnectionProtocol. \ - * {@link KnownVirtualNetworkGatewayConnectionProtocol} can be used interchangeably with VirtualNetworkGatewayConnectionProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IKEv2** \ - * **IKEv1** - */ -export type VirtualNetworkGatewayConnectionProtocol = string; - -/** Known values of {@link VirtualNetworkGatewayConnectionMode} that the service accepts. */ -export enum KnownVirtualNetworkGatewayConnectionMode { - /** Default */ - Default = "Default", - /** ResponderOnly */ - ResponderOnly = "ResponderOnly", - /** InitiatorOnly */ - InitiatorOnly = "InitiatorOnly", -} - -/** - * Defines values for VirtualNetworkGatewayConnectionMode. \ - * {@link KnownVirtualNetworkGatewayConnectionMode} can be used interchangeably with VirtualNetworkGatewayConnectionMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default** \ - * **ResponderOnly** \ - * **InitiatorOnly** - */ -export type VirtualNetworkGatewayConnectionMode = string; - -/** Known values of {@link VirtualNetworkGatewayConnectionStatus} that the service accepts. */ -export enum KnownVirtualNetworkGatewayConnectionStatus { - /** Unknown */ - Unknown = "Unknown", - /** Connecting */ - Connecting = "Connecting", - /** Connected */ - Connected = "Connected", - /** NotConnected */ - NotConnected = "NotConnected", -} - -/** - * Defines values for VirtualNetworkGatewayConnectionStatus. \ - * {@link KnownVirtualNetworkGatewayConnectionStatus} can be used interchangeably with VirtualNetworkGatewayConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Connecting** \ - * **Connected** \ - * **NotConnected** - */ -export type VirtualNetworkGatewayConnectionStatus = string; - -/** Known values of {@link ProcessorArchitecture} that the service accepts. */ -export enum KnownProcessorArchitecture { - /** Amd64 */ - Amd64 = "Amd64", - /** X86 */ - X86 = "X86", -} - -/** - * Defines values for ProcessorArchitecture. \ - * {@link KnownProcessorArchitecture} can be used interchangeably with ProcessorArchitecture, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Amd64** \ - * **X86** - */ -export type ProcessorArchitecture = string; - -/** Known values of {@link AuthenticationMethod} that the service accepts. */ -export enum KnownAuthenticationMethod { - /** Eaptls */ - Eaptls = "EAPTLS", - /** EapmschaPv2 */ - EapmschaPv2 = "EAPMSCHAPv2", -} - -/** - * Defines values for AuthenticationMethod. \ - * {@link KnownAuthenticationMethod} can be used interchangeably with AuthenticationMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **EAPTLS** \ - * **EAPMSCHAPv2** - */ -export type AuthenticationMethod = string; - -/** Known values of {@link BgpPeerState} that the service accepts. */ -export enum KnownBgpPeerState { - /** Unknown */ - Unknown = "Unknown", - /** Stopped */ - Stopped = "Stopped", - /** Idle */ - Idle = "Idle", - /** Connecting */ - Connecting = "Connecting", - /** Connected */ - Connected = "Connected", -} - -/** - * Defines values for BgpPeerState. \ - * {@link KnownBgpPeerState} can be used interchangeably with BgpPeerState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Stopped** \ - * **Idle** \ - * **Connecting** \ - * **Connected** - */ -export type BgpPeerState = string; - -/** Known values of {@link FailoverTestStatus} that the service accepts. */ -export enum KnownFailoverTestStatus { - /** NotStarted */ - NotStarted = "NotStarted", - /** Starting */ - Starting = "Starting", - /** Running */ - Running = "Running", - /** StartFailed */ - StartFailed = "StartFailed", - /** Stopping */ - Stopping = "Stopping", - /** Completed */ - Completed = "Completed", - /** StopFailed */ - StopFailed = "StopFailed", - /** Invalid */ - Invalid = "Invalid", - /** Expired */ - Expired = "Expired", -} - -/** - * Defines values for FailoverTestStatus. \ - * {@link KnownFailoverTestStatus} can be used interchangeably with FailoverTestStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotStarted** \ - * **Starting** \ - * **Running** \ - * **StartFailed** \ - * **Stopping** \ - * **Completed** \ - * **StopFailed** \ - * **Invalid** \ - * **Expired** - */ -export type FailoverTestStatus = string; - -/** Known values of {@link FailoverConnectionStatus} that the service accepts. */ -export enum KnownFailoverConnectionStatus { - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", -} - -/** - * Defines values for FailoverConnectionStatus. \ - * {@link KnownFailoverConnectionStatus} can be used interchangeably with FailoverConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connected** \ - * **Disconnected** - */ -export type FailoverConnectionStatus = string; - -/** Known values of {@link FailoverTestType} that the service accepts. */ -export enum KnownFailoverTestType { - /** SingleSiteFailover */ - SingleSiteFailover = "SingleSiteFailover", - /** MultiSiteFailover */ - MultiSiteFailover = "MultiSiteFailover", - /** All */ - All = "All", -} - -/** - * Defines values for FailoverTestType. \ - * {@link KnownFailoverTestType} can be used interchangeably with FailoverTestType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SingleSiteFailover** \ - * **MultiSiteFailover** \ - * **All** - */ -export type FailoverTestType = string; - -/** Known values of {@link FailoverTestStatusForSingleTest} that the service accepts. */ -export enum KnownFailoverTestStatusForSingleTest { - /** NotStarted */ - NotStarted = "NotStarted", - /** Starting */ - Starting = "Starting", - /** Running */ - Running = "Running", - /** StartFailed */ - StartFailed = "StartFailed", - /** Stopping */ - Stopping = "Stopping", - /** Completed */ - Completed = "Completed", - /** StopFailed */ - StopFailed = "StopFailed", - /** Invalid */ - Invalid = "Invalid", - /** Expired */ - Expired = "Expired", -} - -/** - * Defines values for FailoverTestStatusForSingleTest. \ - * {@link KnownFailoverTestStatusForSingleTest} can be used interchangeably with FailoverTestStatusForSingleTest, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotStarted** \ - * **Starting** \ - * **Running** \ - * **StartFailed** \ - * **Stopping** \ - * **Completed** \ - * **StopFailed** \ - * **Invalid** \ - * **Expired** - */ -export type FailoverTestStatusForSingleTest = string; - -/** Known values of {@link ConnectionAuthenticationType} that the service accepts. */ -export enum KnownConnectionAuthenticationType { - /** Pre-shared key authentication method for VPN gateway connections. */ - PSK = "PSK", - /** Certificate-based authentication method for VPN gateway connections. */ - Certificate = "Certificate", -} - -/** - * Defines values for ConnectionAuthenticationType. \ - * {@link KnownConnectionAuthenticationType} can be used interchangeably with ConnectionAuthenticationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PSK**: Pre-shared key authentication method for VPN gateway connections. \ - * **Certificate**: Certificate-based authentication method for VPN gateway connections. - */ -export type ConnectionAuthenticationType = string; - -/** Known values of {@link VirtualNetworkGatewayMigrationType} that the service accepts. */ -export enum KnownVirtualNetworkGatewayMigrationType { - /** Indicates that it is a migration process from basic IP CSES to standard IP VMSS. */ - UpgradeDeploymentToStandardIP = "UpgradeDeploymentToStandardIP", -} - -/** - * Defines values for VirtualNetworkGatewayMigrationType. \ - * {@link KnownVirtualNetworkGatewayMigrationType} can be used interchangeably with VirtualNetworkGatewayMigrationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **UpgradeDeploymentToStandardIP**: Indicates that it is a migration process from basic IP CSES to standard IP VMSS. - */ -export type VirtualNetworkGatewayMigrationType = string; - -/** Known values of {@link OfficeTrafficCategory} that the service accepts. */ -export enum KnownOfficeTrafficCategory { - /** Optimize */ - Optimize = "Optimize", - /** OptimizeAndAllow */ - OptimizeAndAllow = "OptimizeAndAllow", - /** All */ - All = "All", - /** None */ - None = "None", -} - -/** - * Defines values for OfficeTrafficCategory. \ - * {@link KnownOfficeTrafficCategory} can be used interchangeably with OfficeTrafficCategory, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Optimize** \ - * **OptimizeAndAllow** \ - * **All** \ - * **None** - */ -export type OfficeTrafficCategory = string; - -/** Known values of {@link VirtualWanSecurityProviderType} that the service accepts. */ -export enum KnownVirtualWanSecurityProviderType { - /** External */ - External = "External", - /** Native */ - Native = "Native", -} - -/** - * Defines values for VirtualWanSecurityProviderType. \ - * {@link KnownVirtualWanSecurityProviderType} can be used interchangeably with VirtualWanSecurityProviderType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **External** \ - * **Native** - */ -export type VirtualWanSecurityProviderType = string; - -/** Known values of {@link VpnGatewayTunnelingProtocol} that the service accepts. */ -export enum KnownVpnGatewayTunnelingProtocol { - /** IkeV2 */ - IkeV2 = "IkeV2", - /** OpenVPN */ - OpenVPN = "OpenVPN", -} - -/** - * Defines values for VpnGatewayTunnelingProtocol. \ - * {@link KnownVpnGatewayTunnelingProtocol} can be used interchangeably with VpnGatewayTunnelingProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IkeV2** \ - * **OpenVPN** - */ -export type VpnGatewayTunnelingProtocol = string; - -/** Known values of {@link VnetLocalRouteOverrideCriteria} that the service accepts. */ -export enum KnownVnetLocalRouteOverrideCriteria { - /** Contains */ - Contains = "Contains", - /** Equal */ - Equal = "Equal", -} - -/** - * Defines values for VnetLocalRouteOverrideCriteria. \ - * {@link KnownVnetLocalRouteOverrideCriteria} can be used interchangeably with VnetLocalRouteOverrideCriteria, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Contains** \ - * **Equal** - */ -export type VnetLocalRouteOverrideCriteria = string; - -/** Known values of {@link RoutingState} that the service accepts. */ -export enum KnownRoutingState { - /** None */ - None = "None", - /** Provisioned */ - Provisioned = "Provisioned", - /** Provisioning */ - Provisioning = "Provisioning", - /** Failed */ - Failed = "Failed", -} - -/** - * Defines values for RoutingState. \ - * {@link KnownRoutingState} can be used interchangeably with RoutingState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Provisioned** \ - * **Provisioning** \ - * **Failed** - */ -export type RoutingState = string; - -/** Known values of {@link PreferredRoutingGateway} that the service accepts. */ -export enum KnownPreferredRoutingGateway { - /** ExpressRoute */ - ExpressRoute = "ExpressRoute", - /** VpnGateway */ - VpnGateway = "VpnGateway", - /** None */ - None = "None", -} - -/** - * Defines values for PreferredRoutingGateway. \ - * {@link KnownPreferredRoutingGateway} can be used interchangeably with PreferredRoutingGateway, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ExpressRoute** \ - * **VpnGateway** \ - * **None** - */ -export type PreferredRoutingGateway = string; - -/** Known values of {@link HubRoutingPreference} that the service accepts. */ -export enum KnownHubRoutingPreference { - /** ExpressRoute */ - ExpressRoute = "ExpressRoute", - /** VpnGateway */ - VpnGateway = "VpnGateway", - /** ASPath */ - 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 RouteMapMatchCondition} that the service accepts. */ -export enum KnownRouteMapMatchCondition { - /** Unknown */ - Unknown = "Unknown", - /** Contains */ - Contains = "Contains", - /** Equals */ - Equals = "Equals", - /** NotContains */ - NotContains = "NotContains", - /** NotEquals */ - NotEquals = "NotEquals", -} - -/** - * Defines values for RouteMapMatchCondition. \ - * {@link KnownRouteMapMatchCondition} can be used interchangeably with RouteMapMatchCondition, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Contains** \ - * **Equals** \ - * **NotContains** \ - * **NotEquals** - */ -export type RouteMapMatchCondition = string; - -/** Known values of {@link RouteMapActionType} that the service accepts. */ -export enum KnownRouteMapActionType { - /** Unknown */ - Unknown = "Unknown", - /** Remove */ - Remove = "Remove", - /** Add */ - Add = "Add", - /** Replace */ - Replace = "Replace", - /** Drop */ - Drop = "Drop", -} - -/** - * Defines values for RouteMapActionType. \ - * {@link KnownRouteMapActionType} can be used interchangeably with RouteMapActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Remove** \ - * **Add** \ - * **Replace** \ - * **Drop** - */ -export type RouteMapActionType = string; - -/** Known values of {@link NextStep} that the service accepts. */ -export enum KnownNextStep { - /** Unknown */ - Unknown = "Unknown", - /** Continue */ - Continue = "Continue", - /** Terminate */ - Terminate = "Terminate", -} - -/** - * Defines values for NextStep. \ - * {@link KnownNextStep} can be used interchangeably with NextStep, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Continue** \ - * **Terminate** - */ -export type NextStep = string; - -/** Known values of {@link VpnConnectionStatus} that the service accepts. */ -export enum KnownVpnConnectionStatus { - /** Unknown */ - Unknown = "Unknown", - /** Connecting */ - Connecting = "Connecting", - /** Connected */ - Connected = "Connected", - /** NotConnected */ - NotConnected = "NotConnected", -} - -/** - * Defines values for VpnConnectionStatus. \ - * {@link KnownVpnConnectionStatus} can be used interchangeably with VpnConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Connecting** \ - * **Connected** \ - * **NotConnected** - */ -export type VpnConnectionStatus = string; - -/** Known values of {@link VpnLinkConnectionMode} that the service accepts. */ -export enum KnownVpnLinkConnectionMode { - /** Default */ - Default = "Default", - /** ResponderOnly */ - ResponderOnly = "ResponderOnly", - /** InitiatorOnly */ - InitiatorOnly = "InitiatorOnly", -} - -/** - * Defines values for VpnLinkConnectionMode. \ - * {@link KnownVpnLinkConnectionMode} can be used interchangeably with VpnLinkConnectionMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default** \ - * **ResponderOnly** \ - * **InitiatorOnly** - */ -export type VpnLinkConnectionMode = string; - -/** Known values of {@link HubBgpConnectionStatus} that the service accepts. */ -export enum KnownHubBgpConnectionStatus { - /** Unknown */ - Unknown = "Unknown", - /** Connecting */ - Connecting = "Connecting", - /** Connected */ - Connected = "Connected", - /** NotConnected */ - NotConnected = "NotConnected", -} - -/** - * Defines values for HubBgpConnectionStatus. \ - * {@link KnownHubBgpConnectionStatus} can be used interchangeably with HubBgpConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Connecting** \ - * **Connected** \ - * **NotConnected** - */ -export type HubBgpConnectionStatus = string; - -/** Known values of {@link WebApplicationFirewallEnabledState} that the service accepts. */ -export enum KnownWebApplicationFirewallEnabledState { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled", -} - -/** - * Defines values for WebApplicationFirewallEnabledState. \ - * {@link KnownWebApplicationFirewallEnabledState} can be used interchangeably with WebApplicationFirewallEnabledState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type WebApplicationFirewallEnabledState = string; - -/** Known values of {@link WebApplicationFirewallMode} that the service accepts. */ -export enum KnownWebApplicationFirewallMode { - /** Prevention */ - Prevention = "Prevention", - /** Detection */ - Detection = "Detection", -} - -/** - * Defines values for WebApplicationFirewallMode. \ - * {@link KnownWebApplicationFirewallMode} can be used interchangeably with WebApplicationFirewallMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Prevention** \ - * **Detection** - */ -export type WebApplicationFirewallMode = string; - -/** Known values of {@link WebApplicationFirewallScrubbingState} that the service accepts. */ -export enum KnownWebApplicationFirewallScrubbingState { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled", -} - -/** - * Defines values for WebApplicationFirewallScrubbingState. \ - * {@link KnownWebApplicationFirewallScrubbingState} can be used interchangeably with WebApplicationFirewallScrubbingState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type WebApplicationFirewallScrubbingState = string; - -/** Known values of {@link ScrubbingRuleEntryMatchVariable} that the service accepts. */ -export enum KnownScrubbingRuleEntryMatchVariable { - /** RequestHeaderNames */ - RequestHeaderNames = "RequestHeaderNames", - /** RequestCookieNames */ - RequestCookieNames = "RequestCookieNames", - /** RequestArgNames */ - RequestArgNames = "RequestArgNames", - /** RequestPostArgNames */ - RequestPostArgNames = "RequestPostArgNames", - /** RequestJsonArgNames */ - RequestJsonArgNames = "RequestJSONArgNames", - /** RequestIPAddress */ - RequestIPAddress = "RequestIPAddress", -} - -/** - * Defines values for ScrubbingRuleEntryMatchVariable. \ - * {@link KnownScrubbingRuleEntryMatchVariable} can be used interchangeably with ScrubbingRuleEntryMatchVariable, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **RequestHeaderNames** \ - * **RequestCookieNames** \ - * **RequestArgNames** \ - * **RequestPostArgNames** \ - * **RequestJSONArgNames** \ - * **RequestIPAddress** - */ -export type ScrubbingRuleEntryMatchVariable = string; - -/** Known values of {@link ScrubbingRuleEntryMatchOperator} that the service accepts. */ -export enum KnownScrubbingRuleEntryMatchOperator { - /** Equals */ - Equals = "Equals", - /** EqualsAny */ - EqualsAny = "EqualsAny", -} - -/** - * Defines values for ScrubbingRuleEntryMatchOperator. \ - * {@link KnownScrubbingRuleEntryMatchOperator} can be used interchangeably with ScrubbingRuleEntryMatchOperator, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Equals** \ - * **EqualsAny** - */ -export type ScrubbingRuleEntryMatchOperator = string; - -/** Known values of {@link ScrubbingRuleEntryState} that the service accepts. */ -export enum KnownScrubbingRuleEntryState { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for ScrubbingRuleEntryState. \ - * {@link KnownScrubbingRuleEntryState} can be used interchangeably with ScrubbingRuleEntryState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type ScrubbingRuleEntryState = string; - -/** Known values of {@link WebApplicationFirewallState} that the service accepts. */ -export enum KnownWebApplicationFirewallState { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled", -} - -/** - * Defines values for WebApplicationFirewallState. \ - * {@link KnownWebApplicationFirewallState} can be used interchangeably with WebApplicationFirewallState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type WebApplicationFirewallState = string; - -/** Known values of {@link ApplicationGatewayFirewallRateLimitDuration} that the service accepts. */ -export enum KnownApplicationGatewayFirewallRateLimitDuration { - /** OneMin */ - OneMin = "OneMin", - /** FiveMins */ - FiveMins = "FiveMins", -} - -/** - * Defines values for ApplicationGatewayFirewallRateLimitDuration. \ - * {@link KnownApplicationGatewayFirewallRateLimitDuration} can be used interchangeably with ApplicationGatewayFirewallRateLimitDuration, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **OneMin** \ - * **FiveMins** - */ -export type ApplicationGatewayFirewallRateLimitDuration = string; - -/** Known values of {@link WebApplicationFirewallRuleType} that the service accepts. */ -export enum KnownWebApplicationFirewallRuleType { - /** MatchRule */ - MatchRule = "MatchRule", - /** RateLimitRule */ - RateLimitRule = "RateLimitRule", - /** Invalid */ - Invalid = "Invalid", -} - -/** - * Defines values for WebApplicationFirewallRuleType. \ - * {@link KnownWebApplicationFirewallRuleType} can be used interchangeably with WebApplicationFirewallRuleType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **MatchRule** \ - * **RateLimitRule** \ - * **Invalid** - */ -export type WebApplicationFirewallRuleType = string; - -/** Known values of {@link WebApplicationFirewallMatchVariable} that the service accepts. */ -export enum KnownWebApplicationFirewallMatchVariable { - /** RemoteAddr */ - RemoteAddr = "RemoteAddr", - /** RequestMethod */ - RequestMethod = "RequestMethod", - /** QueryString */ - QueryString = "QueryString", - /** PostArgs */ - PostArgs = "PostArgs", - /** RequestUri */ - RequestUri = "RequestUri", - /** RequestHeaders */ - RequestHeaders = "RequestHeaders", - /** RequestBody */ - RequestBody = "RequestBody", - /** RequestCookies */ - RequestCookies = "RequestCookies", -} - -/** - * Defines values for WebApplicationFirewallMatchVariable. \ - * {@link KnownWebApplicationFirewallMatchVariable} can be used interchangeably with WebApplicationFirewallMatchVariable, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **RemoteAddr** \ - * **RequestMethod** \ - * **QueryString** \ - * **PostArgs** \ - * **RequestUri** \ - * **RequestHeaders** \ - * **RequestBody** \ - * **RequestCookies** - */ -export type WebApplicationFirewallMatchVariable = string; - -/** Known values of {@link WebApplicationFirewallOperator} that the service accepts. */ -export enum KnownWebApplicationFirewallOperator { - /** IPMatch */ - IPMatch = "IPMatch", - /** Equal */ - Equal = "Equal", - /** Contains */ - Contains = "Contains", - /** LessThan */ - LessThan = "LessThan", - /** GreaterThan */ - GreaterThan = "GreaterThan", - /** LessThanOrEqual */ - LessThanOrEqual = "LessThanOrEqual", - /** GreaterThanOrEqual */ - GreaterThanOrEqual = "GreaterThanOrEqual", - /** BeginsWith */ - BeginsWith = "BeginsWith", - /** EndsWith */ - EndsWith = "EndsWith", - /** Regex */ - Regex = "Regex", - /** GeoMatch */ - GeoMatch = "GeoMatch", - /** Any */ - Any = "Any", -} - -/** - * Defines values for WebApplicationFirewallOperator. \ - * {@link KnownWebApplicationFirewallOperator} can be used interchangeably with WebApplicationFirewallOperator, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPMatch** \ - * **Equal** \ - * **Contains** \ - * **LessThan** \ - * **GreaterThan** \ - * **LessThanOrEqual** \ - * **GreaterThanOrEqual** \ - * **BeginsWith** \ - * **EndsWith** \ - * **Regex** \ - * **GeoMatch** \ - * **Any** - */ -export type WebApplicationFirewallOperator = string; - -/** Known values of {@link WebApplicationFirewallTransform} that the service accepts. */ -export enum KnownWebApplicationFirewallTransform { - /** Uppercase */ - Uppercase = "Uppercase", - /** Lowercase */ - Lowercase = "Lowercase", - /** Trim */ - Trim = "Trim", - /** UrlDecode */ - UrlDecode = "UrlDecode", - /** UrlEncode */ - UrlEncode = "UrlEncode", - /** RemoveNulls */ - RemoveNulls = "RemoveNulls", - /** HtmlEntityDecode */ - HtmlEntityDecode = "HtmlEntityDecode", -} - -/** - * Defines values for WebApplicationFirewallTransform. \ - * {@link KnownWebApplicationFirewallTransform} can be used interchangeably with WebApplicationFirewallTransform, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Uppercase** \ - * **Lowercase** \ - * **Trim** \ - * **UrlDecode** \ - * **UrlEncode** \ - * **RemoveNulls** \ - * **HtmlEntityDecode** - */ -export type WebApplicationFirewallTransform = string; - -/** Known values of {@link ApplicationGatewayFirewallUserSessionVariable} that the service accepts. */ -export enum KnownApplicationGatewayFirewallUserSessionVariable { - /** ClientAddr */ - ClientAddr = "ClientAddr", - /** GeoLocation */ - GeoLocation = "GeoLocation", - /** None */ - None = "None", - /** ClientAddrXFFHeader */ - ClientAddrXFFHeader = "ClientAddrXFFHeader", - /** GeoLocationXFFHeader */ - GeoLocationXFFHeader = "GeoLocationXFFHeader", -} - -/** - * Defines values for ApplicationGatewayFirewallUserSessionVariable. \ - * {@link KnownApplicationGatewayFirewallUserSessionVariable} can be used interchangeably with ApplicationGatewayFirewallUserSessionVariable, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ClientAddr** \ - * **GeoLocation** \ - * **None** \ - * **ClientAddrXFFHeader** \ - * **GeoLocationXFFHeader** - */ -export type ApplicationGatewayFirewallUserSessionVariable = string; - -/** Known values of {@link WebApplicationFirewallAction} that the service accepts. */ -export enum KnownWebApplicationFirewallAction { - /** Allow */ - Allow = "Allow", - /** Block */ - Block = "Block", - /** Log */ - Log = "Log", - /** JSChallenge */ - JSChallenge = "JSChallenge", - /** Captcha */ - Captcha = "CAPTCHA", -} - -/** - * Defines values for WebApplicationFirewallAction. \ - * {@link KnownWebApplicationFirewallAction} can be used interchangeably with WebApplicationFirewallAction, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Allow** \ - * **Block** \ - * **Log** \ - * **JSChallenge** \ - * **CAPTCHA** - */ -export type WebApplicationFirewallAction = string; - -/** Known values of {@link WebApplicationFirewallPolicyResourceState} that the service accepts. */ -export enum KnownWebApplicationFirewallPolicyResourceState { - /** Creating */ - Creating = "Creating", - /** Enabling */ - Enabling = "Enabling", - /** Enabled */ - Enabled = "Enabled", - /** Disabling */ - Disabling = "Disabling", - /** Disabled */ - Disabled = "Disabled", - /** Deleting */ - Deleting = "Deleting", -} - -/** - * Defines values for WebApplicationFirewallPolicyResourceState. \ - * {@link KnownWebApplicationFirewallPolicyResourceState} can be used interchangeably with WebApplicationFirewallPolicyResourceState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Enabling** \ - * **Enabled** \ - * **Disabling** \ - * **Disabled** \ - * **Deleting** - */ -export type WebApplicationFirewallPolicyResourceState = string; - -/** Known values of {@link ExceptionEntryMatchVariable} that the service accepts. */ -export enum KnownExceptionEntryMatchVariable { - /** RequestURI */ - RequestURI = "RequestURI", - /** RemoteAddr */ - RemoteAddr = "RemoteAddr", - /** RequestHeader */ - RequestHeader = "RequestHeader", -} - -/** - * Defines values for ExceptionEntryMatchVariable. \ - * {@link KnownExceptionEntryMatchVariable} can be used interchangeably with ExceptionEntryMatchVariable, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **RequestURI** \ - * **RemoteAddr** \ - * **RequestHeader** - */ -export type ExceptionEntryMatchVariable = string; - -/** Known values of {@link ExceptionEntryValueMatchOperator} that the service accepts. */ -export enum KnownExceptionEntryValueMatchOperator { - /** Equals */ - Equals = "Equals", - /** Contains */ - Contains = "Contains", - /** StartsWith */ - StartsWith = "StartsWith", - /** EndsWith */ - EndsWith = "EndsWith", - /** IPMatch */ - IPMatch = "IPMatch", -} - -/** - * Defines values for ExceptionEntryValueMatchOperator. \ - * {@link KnownExceptionEntryValueMatchOperator} can be used interchangeably with ExceptionEntryValueMatchOperator, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Equals** \ - * **Contains** \ - * **StartsWith** \ - * **EndsWith** \ - * **IPMatch** - */ -export type ExceptionEntryValueMatchOperator = string; - -/** Known values of {@link ExceptionEntrySelectorMatchOperator} that the service accepts. */ -export enum KnownExceptionEntrySelectorMatchOperator { - /** Equals */ - Equals = "Equals", - /** Contains */ - Contains = "Contains", - /** StartsWith */ - StartsWith = "StartsWith", - /** EndsWith */ - EndsWith = "EndsWith", -} - -/** - * Defines values for ExceptionEntrySelectorMatchOperator. \ - * {@link KnownExceptionEntrySelectorMatchOperator} can be used interchangeably with ExceptionEntrySelectorMatchOperator, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Equals** \ - * **Contains** \ - * **StartsWith** \ - * **EndsWith** - */ -export type ExceptionEntrySelectorMatchOperator = string; - -/** Known values of {@link OwaspCrsExclusionEntryMatchVariable} that the service accepts. */ -export enum KnownOwaspCrsExclusionEntryMatchVariable { - /** RequestHeaderNames */ - RequestHeaderNames = "RequestHeaderNames", - /** RequestCookieNames */ - RequestCookieNames = "RequestCookieNames", - /** RequestArgNames */ - RequestArgNames = "RequestArgNames", - /** RequestHeaderKeys */ - RequestHeaderKeys = "RequestHeaderKeys", - /** RequestHeaderValues */ - RequestHeaderValues = "RequestHeaderValues", - /** RequestCookieKeys */ - RequestCookieKeys = "RequestCookieKeys", - /** RequestCookieValues */ - RequestCookieValues = "RequestCookieValues", - /** RequestArgKeys */ - RequestArgKeys = "RequestArgKeys", - /** RequestArgValues */ - RequestArgValues = "RequestArgValues", -} - -/** - * Defines values for OwaspCrsExclusionEntryMatchVariable. \ - * {@link KnownOwaspCrsExclusionEntryMatchVariable} can be used interchangeably with OwaspCrsExclusionEntryMatchVariable, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **RequestHeaderNames** \ - * **RequestCookieNames** \ - * **RequestArgNames** \ - * **RequestHeaderKeys** \ - * **RequestHeaderValues** \ - * **RequestCookieKeys** \ - * **RequestCookieValues** \ - * **RequestArgKeys** \ - * **RequestArgValues** - */ -export type OwaspCrsExclusionEntryMatchVariable = string; - -/** Known values of {@link OwaspCrsExclusionEntrySelectorMatchOperator} that the service accepts. */ -export enum KnownOwaspCrsExclusionEntrySelectorMatchOperator { - /** Equals */ - Equals = "Equals", - /** Contains */ - Contains = "Contains", - /** StartsWith */ - StartsWith = "StartsWith", - /** EndsWith */ - EndsWith = "EndsWith", - /** EqualsAny */ - EqualsAny = "EqualsAny", -} - -/** - * Defines values for OwaspCrsExclusionEntrySelectorMatchOperator. \ - * {@link KnownOwaspCrsExclusionEntrySelectorMatchOperator} can be used interchangeably with OwaspCrsExclusionEntrySelectorMatchOperator, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Equals** \ - * **Contains** \ - * **StartsWith** \ - * **EndsWith** \ - * **EqualsAny** - */ -export type OwaspCrsExclusionEntrySelectorMatchOperator = string; - -/** Known values of {@link ManagedRuleEnabledState} that the service accepts. */ -export enum KnownManagedRuleEnabledState { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled", -} - -/** - * Defines values for ManagedRuleEnabledState. \ - * {@link KnownManagedRuleEnabledState} can be used interchangeably with ManagedRuleEnabledState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type ManagedRuleEnabledState = string; - -/** Known values of {@link ActionType} that the service accepts. */ -export enum KnownActionType { - /** AnomalyScoring */ - AnomalyScoring = "AnomalyScoring", - /** Allow */ - Allow = "Allow", - /** Block */ - Block = "Block", - /** Log */ - Log = "Log", - /** JSChallenge */ - JSChallenge = "JSChallenge", - /** Captcha */ - Captcha = "CAPTCHA", -} - -/** - * Defines values for ActionType. \ - * {@link KnownActionType} can be used interchangeably with ActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AnomalyScoring** \ - * **Allow** \ - * **Block** \ - * **Log** \ - * **JSChallenge** \ - * **CAPTCHA** - */ -export type ActionType = string; - -/** Known values of {@link SensitivityType} that the service accepts. */ -export enum KnownSensitivityType { - /** Low */ - Low = "Low", - /** Medium */ - Medium = "Medium", - /** High */ - High = "High", -} - -/** - * Defines values for SensitivityType. \ - * {@link KnownSensitivityType} can be used interchangeably with SensitivityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Low** \ - * **Medium** \ - * **High** - */ -export type SensitivityType = string; - -/** Known values of {@link FirewallPolicyNatRuleCollectionActionType} that the service accepts. */ -export enum KnownFirewallPolicyNatRuleCollectionActionType { - /** Dnat */ - Dnat = "DNAT", -} - -/** - * Defines values for FirewallPolicyNatRuleCollectionActionType. \ - * {@link KnownFirewallPolicyNatRuleCollectionActionType} can be used interchangeably with FirewallPolicyNatRuleCollectionActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **DNAT** - */ -export type FirewallPolicyNatRuleCollectionActionType = string; - -/** Known values of {@link FirewallPolicyRuleType} that the service accepts. */ -export enum KnownFirewallPolicyRuleType { - /** ApplicationRule */ - ApplicationRule = "ApplicationRule", - /** NetworkRule */ - NetworkRule = "NetworkRule", - /** NatRule */ - NatRule = "NatRule", -} - -/** - * Defines values for FirewallPolicyRuleType. \ - * {@link KnownFirewallPolicyRuleType} can be used interchangeably with FirewallPolicyRuleType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ApplicationRule** \ - * **NetworkRule** \ - * **NatRule** - */ -export type FirewallPolicyRuleType = string; - -/** Known values of {@link FirewallPolicyFilterRuleCollectionActionType} that the service accepts. */ -export enum KnownFirewallPolicyFilterRuleCollectionActionType { - /** Allow */ - Allow = "Allow", - /** Deny */ - Deny = "Deny", -} - -/** - * Defines values for FirewallPolicyFilterRuleCollectionActionType. \ - * {@link KnownFirewallPolicyFilterRuleCollectionActionType} can be used interchangeably with FirewallPolicyFilterRuleCollectionActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Allow** \ - * **Deny** - */ -export type FirewallPolicyFilterRuleCollectionActionType = string; - -/** Known values of {@link FirewallPolicyRuleApplicationProtocolType} that the service accepts. */ -export enum KnownFirewallPolicyRuleApplicationProtocolType { - /** Http */ - Http = "Http", - /** Https */ - Https = "Https", -} - -/** - * Defines values for FirewallPolicyRuleApplicationProtocolType. \ - * {@link KnownFirewallPolicyRuleApplicationProtocolType} can be used interchangeably with FirewallPolicyRuleApplicationProtocolType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Http** \ - * **Https** - */ -export type FirewallPolicyRuleApplicationProtocolType = string; - -/** Known values of {@link FirewallPolicyRuleNetworkProtocol} that the service accepts. */ -export enum KnownFirewallPolicyRuleNetworkProtocol { - /** TCP */ - TCP = "TCP", - /** UDP */ - UDP = "UDP", - /** Any */ - Any = "Any", - /** Icmp */ - Icmp = "ICMP", -} - -/** - * Defines values for FirewallPolicyRuleNetworkProtocol. \ - * {@link KnownFirewallPolicyRuleNetworkProtocol} can be used interchangeably with FirewallPolicyRuleNetworkProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TCP** \ - * **UDP** \ - * **Any** \ - * **ICMP** - */ -export type FirewallPolicyRuleNetworkProtocol = string; - -/** Known values of {@link NetworkOperationStatus} that the service accepts. */ -export enum KnownNetworkOperationStatus { - /** InProgress */ - InProgress = "InProgress", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", -} - -/** - * Defines values for NetworkOperationStatus. \ - * {@link KnownNetworkOperationStatus} can be used interchangeably with NetworkOperationStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **InProgress** \ - * **Succeeded** \ - * **Failed** - */ -export type NetworkOperationStatus = string; - -/** Known values of {@link SecurityConfigurationRuleAccess} that the service accepts. */ -export enum KnownSecurityConfigurationRuleAccess { - /** Allow */ - Allow = "Allow", - /** Deny */ - Deny = "Deny", - /** AlwaysAllow */ - AlwaysAllow = "AlwaysAllow", -} - -/** - * Defines values for SecurityConfigurationRuleAccess. \ - * {@link KnownSecurityConfigurationRuleAccess} can be used interchangeably with SecurityConfigurationRuleAccess, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Allow** \ - * **Deny** \ - * **AlwaysAllow** - */ -export type SecurityConfigurationRuleAccess = string; - -/** Known values of {@link ConnectionState} that the service accepts. */ -export enum KnownConnectionState { - /** Reachable */ - Reachable = "Reachable", - /** Unreachable */ - Unreachable = "Unreachable", - /** Unknown */ - Unknown = "Unknown", -} - -/** - * Defines values for ConnectionState. \ - * {@link KnownConnectionState} can be used interchangeably with ConnectionState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Reachable** \ - * **Unreachable** \ - * **Unknown** - */ -export type ConnectionState = string; - -/** Known values of {@link EvaluationState} that the service accepts. */ -export enum KnownEvaluationState { - /** NotStarted */ - NotStarted = "NotStarted", - /** InProgress */ - InProgress = "InProgress", - /** Completed */ - Completed = "Completed", -} - -/** - * Defines values for EvaluationState. \ - * {@link KnownEvaluationState} can be used interchangeably with EvaluationState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotStarted** \ - * **InProgress** \ - * **Completed** - */ -export type EvaluationState = string; - -/** Known values of {@link ConnectionMonitorSourceStatus} that the service accepts. */ -export enum KnownConnectionMonitorSourceStatus { - /** Unknown */ - Unknown = "Unknown", - /** Active */ - Active = "Active", - /** Inactive */ - Inactive = "Inactive", -} - -/** - * Defines values for ConnectionMonitorSourceStatus. \ - * {@link KnownConnectionMonitorSourceStatus} can be used interchangeably with ConnectionMonitorSourceStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Active** \ - * **Inactive** - */ -export type ConnectionMonitorSourceStatus = string; - -/** Known values of {@link TunnelConnectionStatus} that the service accepts. */ -export enum KnownTunnelConnectionStatus { - /** Unknown */ - Unknown = "Unknown", - /** Connecting */ - Connecting = "Connecting", - /** Connected */ - Connected = "Connected", - /** NotConnected */ - NotConnected = "NotConnected", -} - -/** - * Defines values for TunnelConnectionStatus. \ - * {@link KnownTunnelConnectionStatus} can be used interchangeably with TunnelConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Connecting** \ - * **Connected** \ - * **NotConnected** - */ -export type TunnelConnectionStatus = string; - -/** Known values of {@link HubVirtualNetworkConnectionStatus} that the service accepts. */ -export enum KnownHubVirtualNetworkConnectionStatus { - /** Unknown */ - Unknown = "Unknown", - /** Connecting */ - Connecting = "Connecting", - /** Connected */ - Connected = "Connected", - /** NotConnected */ - NotConnected = "NotConnected", -} - -/** - * Defines values for HubVirtualNetworkConnectionStatus. \ - * {@link KnownHubVirtualNetworkConnectionStatus} can be used interchangeably with HubVirtualNetworkConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Connecting** \ - * **Connected** \ - * **NotConnected** - */ -export type HubVirtualNetworkConnectionStatus = string; -/** Defines values for ResourceIdentityType. */ -export type ResourceIdentityType = - | "SystemAssigned" - | "UserAssigned" - | "SystemAssigned, UserAssigned" - | "None"; -/** Defines values for PublicIpAddressDnsSettingsDomainNameLabelScope. */ -export type PublicIpAddressDnsSettingsDomainNameLabelScope = - | "TenantReuse" - | "SubscriptionReuse" - | "ResourceGroupReuse" - | "NoReuse"; -/** Defines values for SlotType. */ -export type SlotType = "Production" | "Staging"; -/** 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 | 3 | 4 | 5; -/** Defines values for PacketCaptureTargetType. */ -export type PacketCaptureTargetType = "AzureVM" | "AzureVMSS"; - -/** Optional parameters. */ -export interface ApplicationGatewaysDeleteOptionalParams 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 ApplicationGatewaysGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApplicationGatewaysGetResponse = ApplicationGateway; - -/** Optional parameters. */ -export interface ApplicationGatewaysCreateOrUpdateOptionalParams - 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 ApplicationGatewaysCreateOrUpdateResponse = ApplicationGateway; - -/** Optional parameters. */ -export interface ApplicationGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type ApplicationGatewaysUpdateTagsResponse = ApplicationGateway; - -/** Optional parameters. */ -export interface ApplicationGatewaysListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ApplicationGatewaysListResponse = ApplicationGatewayListResult; - -/** Optional parameters. */ -export interface ApplicationGatewaysListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type ApplicationGatewaysListAllResponse = ApplicationGatewayListResult; - -/** Optional parameters. */ -export interface ApplicationGatewaysStartOptionalParams 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 ApplicationGatewaysStopOptionalParams 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 ApplicationGatewaysBackendHealthOptionalParams - extends coreClient.OperationOptions { - /** Expands BackendAddressPool and BackendHttpSettings referenced in backend health. */ - expand?: string; - /** 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 backendHealth operation. */ -export type ApplicationGatewaysBackendHealthResponse = ApplicationGatewayBackendHealth; - -/** Optional parameters. */ -export interface ApplicationGatewaysBackendHealthOnDemandOptionalParams - extends coreClient.OperationOptions { - /** Expands BackendAddressPool and BackendHttpSettings referenced in backend health. */ - expand?: string; - /** 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 backendHealthOnDemand operation. */ -export type ApplicationGatewaysBackendHealthOnDemandResponse = - ApplicationGatewayBackendHealthOnDemand; - -/** Optional parameters. */ -export interface ApplicationGatewaysListAvailableServerVariablesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAvailableServerVariables operation. */ -export type ApplicationGatewaysListAvailableServerVariablesResponse = { - /** The parsed response body. */ - body: string[]; -}; - -/** Optional parameters. */ -export interface ApplicationGatewaysListAvailableRequestHeadersOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAvailableRequestHeaders operation. */ -export type ApplicationGatewaysListAvailableRequestHeadersResponse = { - /** The parsed response body. */ - body: string[]; -}; - -/** Optional parameters. */ -export interface ApplicationGatewaysListAvailableResponseHeadersOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAvailableResponseHeaders operation. */ -export type ApplicationGatewaysListAvailableResponseHeadersResponse = { - /** The parsed response body. */ - body: string[]; -}; - -/** Optional parameters. */ -export interface ApplicationGatewaysListAvailableWafRuleSetsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAvailableWafRuleSets operation. */ -export type ApplicationGatewaysListAvailableWafRuleSetsResponse = - ApplicationGatewayAvailableWafRuleSetsResult; - -/** Optional parameters. */ -export interface ApplicationGatewaysListAvailableSslOptionsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAvailableSslOptions operation. */ -export type ApplicationGatewaysListAvailableSslOptionsResponse = - ApplicationGatewayAvailableSslOptions; - -/** Optional parameters. */ -export interface ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAvailableSslPredefinedPolicies operation. */ -export type ApplicationGatewaysListAvailableSslPredefinedPoliciesResponse = - ApplicationGatewayAvailableSslPredefinedPolicies; - -/** Optional parameters. */ -export interface ApplicationGatewaysGetSslPredefinedPolicyOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getSslPredefinedPolicy operation. */ -export type ApplicationGatewaysGetSslPredefinedPolicyResponse = - ApplicationGatewaySslPredefinedPolicy; - -/** Optional parameters. */ -export interface ApplicationGatewaysListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ApplicationGatewaysListNextResponse = ApplicationGatewayListResult; - -/** Optional parameters. */ -export interface ApplicationGatewaysListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type ApplicationGatewaysListAllNextResponse = ApplicationGatewayListResult; - -/** Optional parameters. */ -export interface ApplicationGatewaysListAvailableSslPredefinedPoliciesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAvailableSslPredefinedPoliciesNext operation. */ -export type ApplicationGatewaysListAvailableSslPredefinedPoliciesNextResponse = - ApplicationGatewayAvailableSslPredefinedPolicies; - -/** Optional parameters. */ -export interface ApplicationGatewayPrivateLinkResourcesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ApplicationGatewayPrivateLinkResourcesListResponse = - ApplicationGatewayPrivateLinkResourceListResult; - -/** Optional parameters. */ -export interface ApplicationGatewayPrivateLinkResourcesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ApplicationGatewayPrivateLinkResourcesListNextResponse = - ApplicationGatewayPrivateLinkResourceListResult; - -/** Optional parameters. */ -export interface ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams - 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 ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams - 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 update operation. */ -export type ApplicationGatewayPrivateEndpointConnectionsUpdateResponse = - ApplicationGatewayPrivateEndpointConnection; - -/** Optional parameters. */ -export interface ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApplicationGatewayPrivateEndpointConnectionsGetResponse = - ApplicationGatewayPrivateEndpointConnection; - -/** Optional parameters. */ -export interface ApplicationGatewayPrivateEndpointConnectionsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ApplicationGatewayPrivateEndpointConnectionsListResponse = - ApplicationGatewayPrivateEndpointConnectionListResult; - -/** Optional parameters. */ -export interface ApplicationGatewayPrivateEndpointConnectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ApplicationGatewayPrivateEndpointConnectionsListNextResponse = - ApplicationGatewayPrivateEndpointConnectionListResult; - -/** Optional parameters. */ -export interface ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApplicationGatewayWafDynamicManifestsDefaultGetResponse = - ApplicationGatewayWafDynamicManifestResult; - -/** Optional parameters. */ -export interface ApplicationGatewayWafDynamicManifestsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApplicationGatewayWafDynamicManifestsGetResponse = - ApplicationGatewayWafDynamicManifestResultList; - -/** Optional parameters. */ -export interface ApplicationGatewayWafDynamicManifestsGetNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getNext operation. */ -export type ApplicationGatewayWafDynamicManifestsGetNextResponse = - ApplicationGatewayWafDynamicManifestResultList; - -/** Optional parameters. */ -export interface ApplicationSecurityGroupsDeleteOptionalParams 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 ApplicationSecurityGroupsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApplicationSecurityGroupsGetResponse = ApplicationSecurityGroup; - -/** Optional parameters. */ -export interface ApplicationSecurityGroupsCreateOrUpdateOptionalParams - 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 ApplicationSecurityGroupsCreateOrUpdateResponse = ApplicationSecurityGroup; - -/** Optional parameters. */ -export interface ApplicationSecurityGroupsUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type ApplicationSecurityGroupsUpdateTagsResponse = ApplicationSecurityGroup; - -/** Optional parameters. */ -export interface ApplicationSecurityGroupsListAllOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type ApplicationSecurityGroupsListAllResponse = ApplicationSecurityGroupListResult; - -/** Optional parameters. */ -export interface ApplicationSecurityGroupsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ApplicationSecurityGroupsListResponse = ApplicationSecurityGroupListResult; - -/** Optional parameters. */ -export interface ApplicationSecurityGroupsListAllNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type ApplicationSecurityGroupsListAllNextResponse = ApplicationSecurityGroupListResult; - -/** Optional parameters. */ -export interface ApplicationSecurityGroupsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ApplicationSecurityGroupsListNextResponse = ApplicationSecurityGroupListResult; - -/** Optional parameters. */ -export interface AvailableDelegationsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type AvailableDelegationsListResponse = AvailableDelegationsResult; - -/** Optional parameters. */ -export interface AvailableDelegationsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type AvailableDelegationsListNextResponse = AvailableDelegationsResult; - -/** Optional parameters. */ -export interface AvailableResourceGroupDelegationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type AvailableResourceGroupDelegationsListResponse = AvailableDelegationsResult; - -/** Optional parameters. */ -export interface AvailableResourceGroupDelegationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type AvailableResourceGroupDelegationsListNextResponse = AvailableDelegationsResult; - -/** Optional parameters. */ -export interface AvailableServiceAliasesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type AvailableServiceAliasesListResponse = AvailableServiceAliasesResult; - -/** Optional parameters. */ -export interface AvailableServiceAliasesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type AvailableServiceAliasesListByResourceGroupResponse = AvailableServiceAliasesResult; - -/** Optional parameters. */ -export interface AvailableServiceAliasesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type AvailableServiceAliasesListNextResponse = AvailableServiceAliasesResult; - -/** Optional parameters. */ -export interface AvailableServiceAliasesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type AvailableServiceAliasesListByResourceGroupNextResponse = AvailableServiceAliasesResult; - -/** Optional parameters. */ -export interface AzureFirewallsDeleteOptionalParams 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 AzureFirewallsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AzureFirewallsGetResponse = AzureFirewall; - -/** Optional parameters. */ -export interface AzureFirewallsCreateOrUpdateOptionalParams 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 AzureFirewallsCreateOrUpdateResponse = AzureFirewall; - -/** Optional parameters. */ -export interface AzureFirewallsUpdateTagsOptionalParams 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 updateTags operation. */ -export type AzureFirewallsUpdateTagsResponse = AzureFirewall; - -/** Optional parameters. */ -export interface AzureFirewallsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type AzureFirewallsListResponse = AzureFirewallListResult; - -/** Optional parameters. */ -export interface AzureFirewallsListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type AzureFirewallsListAllResponse = AzureFirewallListResult; - -/** Optional parameters. */ -export interface AzureFirewallsListLearnedPrefixesOptionalParams - 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 listLearnedPrefixes operation. */ -export type AzureFirewallsListLearnedPrefixesResponse = IPPrefixesList; - -/** Optional parameters. */ -export interface AzureFirewallsPacketCaptureOptionalParams 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 packetCapture operation. */ -export type AzureFirewallsPacketCaptureResponse = AzureFirewallsPacketCaptureHeaders; - -/** Optional parameters. */ -export interface AzureFirewallsPacketCaptureOperationOptionalParams - 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 packetCaptureOperation operation. */ -export type AzureFirewallsPacketCaptureOperationResponse = AzureFirewallPacketCaptureResponse; - -/** Optional parameters. */ -export interface AzureFirewallsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type AzureFirewallsListNextResponse = AzureFirewallListResult; - -/** Optional parameters. */ -export interface AzureFirewallsListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type AzureFirewallsListAllNextResponse = AzureFirewallListResult; - -/** Optional parameters. */ -export interface AzureFirewallFqdnTagsListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type AzureFirewallFqdnTagsListAllResponse = AzureFirewallFqdnTagListResult; - -/** Optional parameters. */ -export interface AzureFirewallFqdnTagsListAllNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type AzureFirewallFqdnTagsListAllNextResponse = AzureFirewallFqdnTagListResult; - -/** Optional parameters. */ -export interface WebCategoriesGetOptionalParams extends coreClient.OperationOptions { - /** Expands resourceIds back referenced by the azureWebCategory resource. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type WebCategoriesGetResponse = AzureWebCategory; - -/** Optional parameters. */ -export interface WebCategoriesListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type WebCategoriesListBySubscriptionResponse = AzureWebCategoryListResult; - -/** Optional parameters. */ -export interface WebCategoriesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type WebCategoriesListBySubscriptionNextResponse = AzureWebCategoryListResult; - -/** Optional parameters. */ -export interface BastionHostsDeleteOptionalParams 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 BastionHostsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type BastionHostsGetResponse = BastionHost; - -/** Optional parameters. */ -export interface BastionHostsCreateOrUpdateOptionalParams 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 BastionHostsCreateOrUpdateResponse = BastionHost; - -/** Optional parameters. */ -export interface BastionHostsUpdateTagsOptionalParams 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 updateTags operation. */ -export type BastionHostsUpdateTagsResponse = BastionHost; - -/** Optional parameters. */ -export interface BastionHostsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type BastionHostsListResponse = BastionHostListResult; - -/** Optional parameters. */ -export interface BastionHostsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type BastionHostsListByResourceGroupResponse = BastionHostListResult; - -/** Optional parameters. */ -export interface BastionHostsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type BastionHostsListNextResponse = BastionHostListResult; - -/** Optional parameters. */ -export interface BastionHostsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type BastionHostsListByResourceGroupNextResponse = BastionHostListResult; - -/** Optional parameters. */ -export interface PutBastionShareableLinkOptionalParams 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 putBastionShareableLink operation. */ -export type PutBastionShareableLinkResponse = BastionShareableLinkListResult; - -/** Optional parameters. */ -export interface DeleteBastionShareableLinkOptionalParams 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 DeleteBastionShareableLinkByTokenOptionalParams - 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 deleteBastionShareableLinkByToken operation. */ -export type DeleteBastionShareableLinkByTokenResponse = - NetworkManagementClientDeleteBastionShareableLinkByTokenHeaders; - -/** Optional parameters. */ -export interface GetBastionShareableLinkOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the getBastionShareableLink operation. */ -export type GetBastionShareableLinkResponse = BastionShareableLinkListResult; - -/** Optional parameters. */ -export interface GetActiveSessionsOptionalParams 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 getActiveSessions operation. */ -export type GetActiveSessionsResponse = BastionActiveSessionListResult; - -/** Optional parameters. */ -export interface DisconnectActiveSessionsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the disconnectActiveSessions operation. */ -export type DisconnectActiveSessionsResponse = BastionSessionDeleteResult; - -/** Optional parameters. */ -export interface CheckDnsNameAvailabilityOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the checkDnsNameAvailability operation. */ -export type CheckDnsNameAvailabilityResponse = DnsNameAvailabilityResult; - -/** Optional parameters. */ -export interface ExpressRouteProviderPortOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the expressRouteProviderPort operation. */ -export type ExpressRouteProviderPortResponse = ExpressRouteProviderPort; - -/** Optional parameters. */ -export interface ListActiveConnectivityConfigurationsOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; -} - -/** Contains response data for the listActiveConnectivityConfigurations operation. */ -export type ListActiveConnectivityConfigurationsResponse = - ActiveConnectivityConfigurationsListResult; - -/** Optional parameters. */ -export interface ListActiveSecurityAdminRulesOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; -} - -/** Contains response data for the listActiveSecurityAdminRules operation. */ -export type ListActiveSecurityAdminRulesResponse = ActiveSecurityAdminRulesListResult; - -/** Optional parameters. */ -export interface ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; -} - -/** Contains response data for the listNetworkManagerEffectiveConnectivityConfigurations operation. */ -export type ListNetworkManagerEffectiveConnectivityConfigurationsResponse = - NetworkManagerEffectiveConnectivityConfigurationListResult; - -/** Optional parameters. */ -export interface ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; -} - -/** Contains response data for the listNetworkManagerEffectiveSecurityAdminRules operation. */ -export type ListNetworkManagerEffectiveSecurityAdminRulesResponse = - NetworkManagerEffectiveSecurityAdminRulesListResult; - -/** Optional parameters. */ -export interface SupportedSecurityProvidersOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the supportedSecurityProviders operation. */ -export type SupportedSecurityProvidersResponse = VirtualWanSecurityProviders; - -/** Optional parameters. */ -export interface GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams - 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 generatevirtualwanvpnserverconfigurationvpnprofile operation. */ -export type GeneratevirtualwanvpnserverconfigurationvpnprofileResponse = VpnProfileResponse; - -/** Optional parameters. */ -export interface PutBastionShareableLinkNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the putBastionShareableLinkNext operation. */ -export type PutBastionShareableLinkNextResponse = BastionShareableLinkListResult; - -/** Optional parameters. */ -export interface GetBastionShareableLinkNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the getBastionShareableLinkNext operation. */ -export type GetBastionShareableLinkNextResponse = BastionShareableLinkListResult; - -/** Optional parameters. */ -export interface GetActiveSessionsNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the getActiveSessionsNext operation. */ -export type GetActiveSessionsNextResponse = BastionActiveSessionListResult; - -/** Optional parameters. */ -export interface DisconnectActiveSessionsNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the disconnectActiveSessionsNext operation. */ -export type DisconnectActiveSessionsNextResponse = BastionSessionDeleteResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listCloudServiceRoleInstanceNetworkInterfaces operation. */ -export type NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesResponse = - NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listCloudServiceNetworkInterfaces operation. */ -export type NetworkInterfacesListCloudServiceNetworkInterfacesResponse = NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams - extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the getCloudServiceNetworkInterface operation. */ -export type NetworkInterfacesGetCloudServiceNetworkInterfaceResponse = NetworkInterface; - -/** Optional parameters. */ -export interface NetworkInterfacesDeleteOptionalParams 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 NetworkInterfacesGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type NetworkInterfacesGetResponse = NetworkInterface; - -/** Optional parameters. */ -export interface NetworkInterfacesCreateOrUpdateOptionalParams 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 NetworkInterfacesCreateOrUpdateResponse = NetworkInterface; - -/** Optional parameters. */ -export interface NetworkInterfacesUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type NetworkInterfacesUpdateTagsResponse = NetworkInterface; - -/** Optional parameters. */ -export interface NetworkInterfacesListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type NetworkInterfacesListAllResponse = NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkInterfacesListResponse = NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesGetEffectiveRouteTableOptionalParams - 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 getEffectiveRouteTable operation. */ -export type NetworkInterfacesGetEffectiveRouteTableResponse = EffectiveRouteListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams - 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 listEffectiveNetworkSecurityGroups operation. */ -export type NetworkInterfacesListEffectiveNetworkSecurityGroupsResponse = - EffectiveNetworkSecurityGroupListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVirtualMachineScaleSetVMNetworkInterfaces operation. */ -export type NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesResponse = - NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVirtualMachineScaleSetNetworkInterfaces operation. */ -export type NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesResponse = - NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams - extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the getVirtualMachineScaleSetNetworkInterface operation. */ -export type NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceResponse = NetworkInterface; - -/** Optional parameters. */ -export interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams - extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the listVirtualMachineScaleSetIpConfigurations operation. */ -export type NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsResponse = - NetworkInterfaceIPConfigurationListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams - extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the getVirtualMachineScaleSetIpConfiguration operation. */ -export type NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationResponse = - NetworkInterfaceIPConfiguration; - -/** Optional parameters. */ -export interface NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listCloudServiceRoleInstanceNetworkInterfacesNext operation. */ -export type NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesNextResponse = - NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListCloudServiceNetworkInterfacesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listCloudServiceNetworkInterfacesNext operation. */ -export type NetworkInterfacesListCloudServiceNetworkInterfacesNextResponse = - NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type NetworkInterfacesListAllNextResponse = NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkInterfacesListNextResponse = NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVirtualMachineScaleSetVMNetworkInterfacesNext operation. */ -export type NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesNextResponse = - NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVirtualMachineScaleSetNetworkInterfacesNext operation. */ -export type NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesNextResponse = - NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVirtualMachineScaleSetIpConfigurationsNext operation. */ -export type NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsNextResponse = - NetworkInterfaceIPConfigurationListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listCloudServicePublicIPAddresses operation. */ -export type PublicIPAddressesListCloudServicePublicIPAddressesResponse = PublicIPAddressListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listCloudServiceRoleInstancePublicIPAddresses operation. */ -export type PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesResponse = - PublicIPAddressListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams - extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the getCloudServicePublicIPAddress operation. */ -export type PublicIPAddressesGetCloudServicePublicIPAddressResponse = PublicIPAddress; - -/** Optional parameters. */ -export interface PublicIPAddressesDeleteOptionalParams 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 PublicIPAddressesGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type PublicIPAddressesGetResponse = PublicIPAddress; - -/** Optional parameters. */ -export interface PublicIPAddressesCreateOrUpdateOptionalParams 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 PublicIPAddressesCreateOrUpdateResponse = PublicIPAddress; - -/** Optional parameters. */ -export interface PublicIPAddressesUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type PublicIPAddressesUpdateTagsResponse = PublicIPAddress; - -/** Optional parameters. */ -export interface PublicIPAddressesListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type PublicIPAddressesListAllResponse = PublicIPAddressListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type PublicIPAddressesListResponse = PublicIPAddressListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesDdosProtectionStatusOptionalParams - 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 ddosProtectionStatus operation. */ -export type PublicIPAddressesDdosProtectionStatusResponse = PublicIpDdosProtectionStatusResult; - -/** Optional parameters. */ -export interface PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams - 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 reserveCloudServicePublicIpAddress operation. */ -export type PublicIPAddressesReserveCloudServicePublicIpAddressResponse = PublicIPAddress; - -/** Optional parameters. */ -export interface PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams - 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 disassociateCloudServiceReservedPublicIp operation. */ -export type PublicIPAddressesDisassociateCloudServiceReservedPublicIpResponse = PublicIPAddress; - -/** Optional parameters. */ -export interface PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVirtualMachineScaleSetPublicIPAddresses operation. */ -export type PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesResponse = - PublicIPAddressListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVirtualMachineScaleSetVMPublicIPAddresses operation. */ -export type PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesResponse = - PublicIPAddressListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams - extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the getVirtualMachineScaleSetPublicIPAddress operation. */ -export type PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressResponse = PublicIPAddress; - -/** Optional parameters. */ -export interface PublicIPAddressesListCloudServicePublicIPAddressesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listCloudServicePublicIPAddressesNext operation. */ -export type PublicIPAddressesListCloudServicePublicIPAddressesNextResponse = - PublicIPAddressListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listCloudServiceRoleInstancePublicIPAddressesNext operation. */ -export type PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesNextResponse = - PublicIPAddressListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type PublicIPAddressesListAllNextResponse = PublicIPAddressListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type PublicIPAddressesListNextResponse = PublicIPAddressListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVirtualMachineScaleSetPublicIPAddressesNext operation. */ -export type PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesNextResponse = - PublicIPAddressListResult; - -/** Optional parameters. */ -export interface PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVirtualMachineScaleSetVMPublicIPAddressesNext operation. */ -export type PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesNextResponse = - PublicIPAddressListResult; - -/** Optional parameters. */ -export interface VipSwapGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VipSwapGetResponse = SwapResource; - -/** Optional parameters. */ -export interface VipSwapCreateOptionalParams 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 VipSwapListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VipSwapListResponse = SwapResourceListResult; - -/** Optional parameters. */ -export interface CustomIPPrefixesDeleteOptionalParams 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 CustomIPPrefixesGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type CustomIPPrefixesGetResponse = CustomIpPrefix; - -/** Optional parameters. */ -export interface CustomIPPrefixesCreateOrUpdateOptionalParams 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 CustomIPPrefixesCreateOrUpdateResponse = CustomIpPrefix; - -/** Optional parameters. */ -export interface CustomIPPrefixesUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type CustomIPPrefixesUpdateTagsResponse = CustomIpPrefix; - -/** Optional parameters. */ -export interface CustomIPPrefixesListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type CustomIPPrefixesListAllResponse = CustomIpPrefixListResult; - -/** Optional parameters. */ -export interface CustomIPPrefixesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type CustomIPPrefixesListResponse = CustomIpPrefixListResult; - -/** Optional parameters. */ -export interface CustomIPPrefixesListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type CustomIPPrefixesListAllNextResponse = CustomIpPrefixListResult; - -/** Optional parameters. */ -export interface CustomIPPrefixesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type CustomIPPrefixesListNextResponse = CustomIpPrefixListResult; - -/** Optional parameters. */ -export interface DdosCustomPoliciesDeleteOptionalParams 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 DdosCustomPoliciesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DdosCustomPoliciesGetResponse = DdosCustomPolicy; - -/** Optional parameters. */ -export interface DdosCustomPoliciesCreateOrUpdateOptionalParams - 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 DdosCustomPoliciesCreateOrUpdateResponse = DdosCustomPolicy; - -/** Optional parameters. */ -export interface DdosCustomPoliciesUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type DdosCustomPoliciesUpdateTagsResponse = DdosCustomPolicy; - -/** Optional parameters. */ -export interface DdosProtectionPlansDeleteOptionalParams 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 DdosProtectionPlansGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DdosProtectionPlansGetResponse = DdosProtectionPlan; - -/** Optional parameters. */ -export interface DdosProtectionPlansCreateOrUpdateOptionalParams - 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 DdosProtectionPlansCreateOrUpdateResponse = DdosProtectionPlan; - -/** Optional parameters. */ -export interface DdosProtectionPlansUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type DdosProtectionPlansUpdateTagsResponse = DdosProtectionPlan; - -/** Optional parameters. */ -export interface DdosProtectionPlansListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type DdosProtectionPlansListResponse = DdosProtectionPlanListResult; - -/** Optional parameters. */ -export interface DdosProtectionPlansListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type DdosProtectionPlansListByResourceGroupResponse = DdosProtectionPlanListResult; - -/** Optional parameters. */ -export interface DdosProtectionPlansListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type DdosProtectionPlansListNextResponse = DdosProtectionPlanListResult; - -/** Optional parameters. */ -export interface DdosProtectionPlansListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type DdosProtectionPlansListByResourceGroupNextResponse = DdosProtectionPlanListResult; - -/** Optional parameters. */ -export interface DscpConfigurationCreateOrUpdateOptionalParams 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 DscpConfigurationCreateOrUpdateResponse = DscpConfiguration; - -/** Optional parameters. */ -export interface DscpConfigurationDeleteOptionalParams 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 DscpConfigurationGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DscpConfigurationGetResponse = DscpConfiguration; - -/** Optional parameters. */ -export interface DscpConfigurationListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type DscpConfigurationListResponse = DscpConfigurationListResult; - -/** Optional parameters. */ -export interface DscpConfigurationListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type DscpConfigurationListAllResponse = DscpConfigurationListResult; - -/** Optional parameters. */ -export interface DscpConfigurationListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type DscpConfigurationListNextResponse = DscpConfigurationListResult; - -/** Optional parameters. */ -export interface DscpConfigurationListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type DscpConfigurationListAllNextResponse = DscpConfigurationListResult; - -/** Optional parameters. */ -export interface AvailableEndpointServicesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type AvailableEndpointServicesListResponse = EndpointServicesListResult; - -/** Optional parameters. */ -export interface AvailableEndpointServicesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type AvailableEndpointServicesListNextResponse = EndpointServicesListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitAuthorizationsDeleteOptionalParams - 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 ExpressRouteCircuitAuthorizationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExpressRouteCircuitAuthorizationsGetResponse = ExpressRouteCircuitAuthorization; - -/** Optional parameters. */ -export interface ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams - 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 ExpressRouteCircuitAuthorizationsCreateOrUpdateResponse = - ExpressRouteCircuitAuthorization; - -/** Optional parameters. */ -export interface ExpressRouteCircuitAuthorizationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ExpressRouteCircuitAuthorizationsListResponse = AuthorizationListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitAuthorizationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ExpressRouteCircuitAuthorizationsListNextResponse = AuthorizationListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitPeeringsDeleteOptionalParams - 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 ExpressRouteCircuitPeeringsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExpressRouteCircuitPeeringsGetResponse = ExpressRouteCircuitPeering; - -/** Optional parameters. */ -export interface ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams - 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 ExpressRouteCircuitPeeringsCreateOrUpdateResponse = ExpressRouteCircuitPeering; - -/** Optional parameters. */ -export interface ExpressRouteCircuitPeeringsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ExpressRouteCircuitPeeringsListResponse = ExpressRouteCircuitPeeringListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitPeeringsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ExpressRouteCircuitPeeringsListNextResponse = ExpressRouteCircuitPeeringListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitConnectionsDeleteOptionalParams - 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 ExpressRouteCircuitConnectionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExpressRouteCircuitConnectionsGetResponse = ExpressRouteCircuitConnection; - -/** Optional parameters. */ -export interface ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams - 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 ExpressRouteCircuitConnectionsCreateOrUpdateResponse = ExpressRouteCircuitConnection; - -/** Optional parameters. */ -export interface ExpressRouteCircuitConnectionsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ExpressRouteCircuitConnectionsListResponse = ExpressRouteCircuitConnectionListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitConnectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ExpressRouteCircuitConnectionsListNextResponse = - ExpressRouteCircuitConnectionListResult; - -/** Optional parameters. */ -export interface PeerExpressRouteCircuitConnectionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PeerExpressRouteCircuitConnectionsGetResponse = PeerExpressRouteCircuitConnection; - -/** Optional parameters. */ -export interface PeerExpressRouteCircuitConnectionsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type PeerExpressRouteCircuitConnectionsListResponse = - PeerExpressRouteCircuitConnectionListResult; - -/** Optional parameters. */ -export interface PeerExpressRouteCircuitConnectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type PeerExpressRouteCircuitConnectionsListNextResponse = - PeerExpressRouteCircuitConnectionListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsDeleteOptionalParams 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 ExpressRouteCircuitsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExpressRouteCircuitsGetResponse = ExpressRouteCircuit; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsCreateOrUpdateOptionalParams - 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 ExpressRouteCircuitsCreateOrUpdateResponse = ExpressRouteCircuit; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type ExpressRouteCircuitsUpdateTagsResponse = ExpressRouteCircuit; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsListArpTableOptionalParams - 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 listArpTable operation. */ -export type ExpressRouteCircuitsListArpTableResponse = ExpressRouteCircuitsArpTableListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsListRoutesTableOptionalParams - 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 listRoutesTable operation. */ -export type ExpressRouteCircuitsListRoutesTableResponse = ExpressRouteCircuitsRoutesTableListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsListRoutesTableSummaryOptionalParams - 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 listRoutesTableSummary operation. */ -export type ExpressRouteCircuitsListRoutesTableSummaryResponse = - ExpressRouteCircuitsRoutesTableSummaryListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsGetStatsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the getStats operation. */ -export type ExpressRouteCircuitsGetStatsResponse = ExpressRouteCircuitStats; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsGetPeeringStatsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getPeeringStats operation. */ -export type ExpressRouteCircuitsGetPeeringStatsResponse = ExpressRouteCircuitStats; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ExpressRouteCircuitsListResponse = ExpressRouteCircuitListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type ExpressRouteCircuitsListAllResponse = ExpressRouteCircuitListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ExpressRouteCircuitsListNextResponse = ExpressRouteCircuitListResult; - -/** Optional parameters. */ -export interface ExpressRouteCircuitsListAllNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type ExpressRouteCircuitsListAllNextResponse = ExpressRouteCircuitListResult; - -/** Optional parameters. */ -export interface ExpressRouteServiceProvidersListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ExpressRouteServiceProvidersListResponse = ExpressRouteServiceProviderListResult; - -/** Optional parameters. */ -export interface ExpressRouteServiceProvidersListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ExpressRouteServiceProvidersListNextResponse = ExpressRouteServiceProviderListResult; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionsListOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. For example, you can use $filter=name eq '{circuitServiceKey}'. */ - filter?: string; -} - -/** Contains response data for the list operation. */ -export type ExpressRouteCrossConnectionsListResponse = ExpressRouteCrossConnectionListResult; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ExpressRouteCrossConnectionsListByResourceGroupResponse = - ExpressRouteCrossConnectionListResult; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExpressRouteCrossConnectionsGetResponse = ExpressRouteCrossConnection; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams - 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 ExpressRouteCrossConnectionsCreateOrUpdateResponse = ExpressRouteCrossConnection; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionsUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type ExpressRouteCrossConnectionsUpdateTagsResponse = ExpressRouteCrossConnection; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionsListArpTableOptionalParams - 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 listArpTable operation. */ -export type ExpressRouteCrossConnectionsListArpTableResponse = - ExpressRouteCircuitsArpTableListResult; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams - 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 listRoutesTableSummary operation. */ -export type ExpressRouteCrossConnectionsListRoutesTableSummaryResponse = - ExpressRouteCrossConnectionsRoutesTableSummaryListResult; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionsListRoutesTableOptionalParams - 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 listRoutesTable operation. */ -export type ExpressRouteCrossConnectionsListRoutesTableResponse = - ExpressRouteCircuitsRoutesTableListResult; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ExpressRouteCrossConnectionsListNextResponse = ExpressRouteCrossConnectionListResult; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ExpressRouteCrossConnectionsListByResourceGroupNextResponse = - ExpressRouteCrossConnectionListResult; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionPeeringsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ExpressRouteCrossConnectionPeeringsListResponse = - ExpressRouteCrossConnectionPeeringList; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionPeeringsDeleteOptionalParams - 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 ExpressRouteCrossConnectionPeeringsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExpressRouteCrossConnectionPeeringsGetResponse = ExpressRouteCrossConnectionPeering; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams - 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 ExpressRouteCrossConnectionPeeringsCreateOrUpdateResponse = - ExpressRouteCrossConnectionPeering; - -/** Optional parameters. */ -export interface ExpressRouteCrossConnectionPeeringsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ExpressRouteCrossConnectionPeeringsListNextResponse = - ExpressRouteCrossConnectionPeeringList; - -/** Optional parameters. */ -export interface ExpressRoutePortsLocationsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ExpressRoutePortsLocationsListResponse = ExpressRoutePortsLocationListResult; - -/** Optional parameters. */ -export interface ExpressRoutePortsLocationsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExpressRoutePortsLocationsGetResponse = ExpressRoutePortsLocation; - -/** Optional parameters. */ -export interface ExpressRoutePortsLocationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ExpressRoutePortsLocationsListNextResponse = ExpressRoutePortsLocationListResult; - -/** Optional parameters. */ -export interface ExpressRoutePortsDeleteOptionalParams 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 ExpressRoutePortsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExpressRoutePortsGetResponse = ExpressRoutePort; - -/** Optional parameters. */ -export interface ExpressRoutePortsCreateOrUpdateOptionalParams 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 ExpressRoutePortsCreateOrUpdateResponse = ExpressRoutePort; - -/** Optional parameters. */ -export interface ExpressRoutePortsUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type ExpressRoutePortsUpdateTagsResponse = ExpressRoutePort; - -/** Optional parameters. */ -export interface ExpressRoutePortsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ExpressRoutePortsListByResourceGroupResponse = ExpressRoutePortListResult; - -/** Optional parameters. */ -export interface ExpressRoutePortsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ExpressRoutePortsListResponse = ExpressRoutePortListResult; - -/** Optional parameters. */ -export interface ExpressRoutePortsGenerateLOAOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the generateLOA operation. */ -export type ExpressRoutePortsGenerateLOAResponse = GenerateExpressRoutePortsLOAResult; - -/** Optional parameters. */ -export interface ExpressRoutePortsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ExpressRoutePortsListByResourceGroupNextResponse = ExpressRoutePortListResult; - -/** Optional parameters. */ -export interface ExpressRoutePortsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ExpressRoutePortsListNextResponse = ExpressRoutePortListResult; - -/** Optional parameters. */ -export interface ExpressRouteLinksGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExpressRouteLinksGetResponse = ExpressRouteLink; - -/** Optional parameters. */ -export interface ExpressRouteLinksListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ExpressRouteLinksListResponse = ExpressRouteLinkListResult; - -/** Optional parameters. */ -export interface ExpressRouteLinksListNextOptionalParams extends coreClient.OperationOptions {} - -/** 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 ExpressRouteProviderPortsLocationListOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. For example, you can use $filter=location eq '{state}'. */ - filter?: string; -} - -/** Contains response data for the list operation. */ -export type ExpressRouteProviderPortsLocationListResponse = ExpressRouteProviderPortListResult; - -/** Optional parameters. */ -export interface FirewallPoliciesDeleteOptionalParams 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 FirewallPoliciesGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type FirewallPoliciesGetResponse = FirewallPolicy; - -/** Optional parameters. */ -export interface FirewallPoliciesCreateOrUpdateOptionalParams 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 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 {} - -/** Contains response data for the list operation. */ -export type FirewallPoliciesListResponse = FirewallPolicyListResult; - -/** Optional parameters. */ -export interface FirewallPoliciesListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type FirewallPoliciesListAllResponse = FirewallPolicyListResult; - -/** Optional parameters. */ -export interface FirewallPoliciesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type FirewallPoliciesListNextResponse = FirewallPolicyListResult; - -/** Optional parameters. */ -export interface FirewallPoliciesListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type FirewallPoliciesListAllNextResponse = FirewallPolicyListResult; - -/** Optional parameters. */ -export interface FirewallPolicyRuleCollectionGroupsDeleteOptionalParams - 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 FirewallPolicyRuleCollectionGroupsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type FirewallPolicyRuleCollectionGroupsGetResponse = FirewallPolicyRuleCollectionGroup; - -/** Optional parameters. */ -export interface FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams - 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 FirewallPolicyRuleCollectionGroupsCreateOrUpdateResponse = - FirewallPolicyRuleCollectionGroup; - -/** Optional parameters. */ -export interface FirewallPolicyRuleCollectionGroupsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type FirewallPolicyRuleCollectionGroupsListResponse = - FirewallPolicyRuleCollectionGroupListResult; - -/** Optional parameters. */ -export interface FirewallPolicyRuleCollectionGroupsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type FirewallPolicyRuleCollectionGroupsListNextResponse = - FirewallPolicyRuleCollectionGroupListResult; - -/** Optional parameters. */ -export interface FirewallPolicyIdpsSignaturesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type FirewallPolicyIdpsSignaturesListResponse = QueryResults; - -/** Optional parameters. */ -export interface FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the patch operation. */ -export type FirewallPolicyIdpsSignaturesOverridesPatchResponse = SignaturesOverrides; - -/** Optional parameters. */ -export interface FirewallPolicyIdpsSignaturesOverridesPutOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the put operation. */ -export type FirewallPolicyIdpsSignaturesOverridesPutResponse = SignaturesOverrides; - -/** Optional parameters. */ -export interface FirewallPolicyIdpsSignaturesOverridesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type FirewallPolicyIdpsSignaturesOverridesGetResponse = SignaturesOverrides; - -/** Optional parameters. */ -export interface FirewallPolicyIdpsSignaturesOverridesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type FirewallPolicyIdpsSignaturesOverridesListResponse = SignaturesOverridesList; - -/** Optional parameters. */ -export interface FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type FirewallPolicyIdpsSignaturesFilterValuesListResponse = - SignatureOverridesFilterValuesResponse; - -/** Optional parameters. */ -export interface FirewallPolicyDraftsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type FirewallPolicyDraftsCreateOrUpdateResponse = FirewallPolicyDraft; - -/** Optional parameters. */ -export interface FirewallPolicyDraftsDeleteOptionalParams extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface FirewallPolicyDraftsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type FirewallPolicyDraftsGetResponse = FirewallPolicyDraft; - -/** Optional parameters. */ -export interface FirewallPolicyDeploymentsDeployOptionalParams 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 deploy operation. */ -export type FirewallPolicyDeploymentsDeployResponse = FirewallPolicyDeploymentsDeployHeaders; - -/** Optional parameters. */ -export interface FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateResponse = - FirewallPolicyRuleCollectionGroupDraft; - -/** Optional parameters. */ -export interface FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type FirewallPolicyRuleCollectionGroupDraftsGetResponse = - FirewallPolicyRuleCollectionGroupDraft; - -/** Optional parameters. */ -export interface IpamPoolsListOptionalParams extends coreClient.OperationOptions { - /** Optional skip token. */ - skipToken?: string; - /** Optional num entries to skip. */ - skip?: number; - /** Optional num entries to show. */ - top?: number; - /** Optional key by which to sort. */ - sortKey?: string; - /** Optional sort value for pagination. */ - sortValue?: string; -} - -/** Contains response data for the list operation. */ -export type IpamPoolsListResponse = IpamPoolList; - -/** Optional parameters. */ -export interface IpamPoolsCreateOptionalParams extends coreClient.OperationOptions { - /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ - ifMatch?: string; - /** 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 create operation. */ -export type IpamPoolsCreateResponse = IpamPool; - -/** Optional parameters. */ -export interface IpamPoolsUpdateOptionalParams extends coreClient.OperationOptions { - /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ - ifMatch?: string; - /** Pool resource object to update partially. */ - body?: IpamPoolUpdate; -} - -/** Contains response data for the update operation. */ -export type IpamPoolsUpdateResponse = IpamPool; - -/** Optional parameters. */ -export interface IpamPoolsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type IpamPoolsGetResponse = IpamPool; - -/** Optional parameters. */ -export interface IpamPoolsDeleteOptionalParams extends coreClient.OperationOptions { - /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ - ifMatch?: string; - /** 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 delete operation. */ -export type IpamPoolsDeleteResponse = IpamPoolsDeleteHeaders; - -/** Optional parameters. */ -export interface IpamPoolsGetPoolUsageOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the getPoolUsage operation. */ -export type IpamPoolsGetPoolUsageResponse = PoolUsage; - -/** Optional parameters. */ -export interface IpamPoolsListAssociatedResourcesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAssociatedResources operation. */ -export type IpamPoolsListAssociatedResourcesResponse = PoolAssociationList; - -/** Optional parameters. */ -export interface IpamPoolsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type IpamPoolsListNextResponse = IpamPoolList; - -/** Optional parameters. */ -export interface IpamPoolsListAssociatedResourcesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAssociatedResourcesNext operation. */ -export type IpamPoolsListAssociatedResourcesNextResponse = PoolAssociationList; - -/** Optional parameters. */ -export interface StaticCidrsListOptionalParams extends coreClient.OperationOptions { - /** Optional skip token. */ - skipToken?: string; - /** Optional num entries to skip. */ - skip?: number; - /** Optional num entries to show. */ - top?: number; - /** Optional key by which to sort. */ - sortKey?: string; - /** Optional sort value for pagination. */ - sortValue?: string; -} - -/** Contains response data for the list operation. */ -export type StaticCidrsListResponse = StaticCidrList; - -/** Optional parameters. */ -export interface StaticCidrsCreateOptionalParams extends coreClient.OperationOptions { - /** StaticCidr resource object to create/update. */ - body?: StaticCidr; -} - -/** Contains response data for the create operation. */ -export type StaticCidrsCreateResponse = StaticCidr; - -/** Optional parameters. */ -export interface StaticCidrsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type StaticCidrsGetResponse = StaticCidr; - -/** Optional parameters. */ -export interface StaticCidrsDeleteOptionalParams 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 delete operation. */ -export type StaticCidrsDeleteResponse = StaticCidrsDeleteHeaders; - -/** Optional parameters. */ -export interface StaticCidrsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type StaticCidrsListNextResponse = StaticCidrList; - -/** Optional parameters. */ -export interface IpAllocationsDeleteOptionalParams 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 IpAllocationsGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type IpAllocationsGetResponse = IpAllocation; - -/** Optional parameters. */ -export interface IpAllocationsCreateOrUpdateOptionalParams 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 IpAllocationsCreateOrUpdateResponse = IpAllocation; - -/** Optional parameters. */ -export interface IpAllocationsUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type IpAllocationsUpdateTagsResponse = IpAllocation; - -/** Optional parameters. */ -export interface IpAllocationsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type IpAllocationsListResponse = IpAllocationListResult; - -/** Optional parameters. */ -export interface IpAllocationsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type IpAllocationsListByResourceGroupResponse = IpAllocationListResult; - -/** Optional parameters. */ -export interface IpAllocationsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type IpAllocationsListNextResponse = IpAllocationListResult; - -/** Optional parameters. */ -export interface IpAllocationsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type IpAllocationsListByResourceGroupNextResponse = IpAllocationListResult; - -/** Optional parameters. */ -export interface IpGroupsGetOptionalParams extends coreClient.OperationOptions { - /** Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups resource. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type IpGroupsGetResponse = IpGroup; - -/** Optional parameters. */ -export interface IpGroupsCreateOrUpdateOptionalParams 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 IpGroupsCreateOrUpdateResponse = IpGroup; - -/** Optional parameters. */ -export interface IpGroupsUpdateGroupsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateGroups operation. */ -export type IpGroupsUpdateGroupsResponse = IpGroup; - -/** Optional parameters. */ -export interface IpGroupsDeleteOptionalParams 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 IpGroupsListByResourceGroupOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type IpGroupsListByResourceGroupResponse = IpGroupListResult; - -/** Optional parameters. */ -export interface IpGroupsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type IpGroupsListResponse = IpGroupListResult; - -/** Optional parameters. */ -export interface IpGroupsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type IpGroupsListByResourceGroupNextResponse = IpGroupListResult; - -/** Optional parameters. */ -export interface IpGroupsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type IpGroupsListNextResponse = IpGroupListResult; - -/** Optional parameters. */ -export interface LoadBalancersDeleteOptionalParams 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 LoadBalancersGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type LoadBalancersGetResponse = LoadBalancer; - -/** Optional parameters. */ -export interface LoadBalancersCreateOrUpdateOptionalParams 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 LoadBalancersCreateOrUpdateResponse = LoadBalancer; - -/** Optional parameters. */ -export interface LoadBalancersUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type LoadBalancersUpdateTagsResponse = LoadBalancer; - -/** Optional parameters. */ -export interface LoadBalancersListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type LoadBalancersListAllResponse = LoadBalancerListResult; - -/** Optional parameters. */ -export interface LoadBalancersListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type LoadBalancersListResponse = LoadBalancerListResult; - -/** Optional parameters. */ -export interface LoadBalancersSwapPublicIpAddressesOptionalParams - 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 LoadBalancersListInboundNatRulePortMappingsOptionalParams - 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 listInboundNatRulePortMappings operation. */ -export type LoadBalancersListInboundNatRulePortMappingsResponse = - BackendAddressInboundNatRulePortMappings; - -/** Optional parameters. */ -export interface LoadBalancersMigrateToIpBasedOptionalParams extends coreClient.OperationOptions { - /** Parameters supplied to the migrateToIpBased Api. */ - parameters?: MigrateLoadBalancerToIpBasedRequest; -} - -/** Contains response data for the migrateToIpBased operation. */ -export type LoadBalancersMigrateToIpBasedResponse = MigratedPools; - -/** Optional parameters. */ -export interface LoadBalancersListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type LoadBalancersListAllNextResponse = LoadBalancerListResult; - -/** Optional parameters. */ -export interface LoadBalancersListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type LoadBalancersListNextResponse = LoadBalancerListResult; - -/** Optional parameters. */ -export interface LoadBalancerBackendAddressPoolsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type LoadBalancerBackendAddressPoolsListResponse = LoadBalancerBackendAddressPoolListResult; - -/** Optional parameters. */ -export interface LoadBalancerBackendAddressPoolsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LoadBalancerBackendAddressPoolsGetResponse = BackendAddressPool; - -/** Optional parameters. */ -export interface LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams - 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 LoadBalancerBackendAddressPoolsCreateOrUpdateResponse = BackendAddressPool; - -/** Optional parameters. */ -export interface LoadBalancerBackendAddressPoolsDeleteOptionalParams - 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 LoadBalancerBackendAddressPoolsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type LoadBalancerBackendAddressPoolsListNextResponse = - LoadBalancerBackendAddressPoolListResult; - -/** Optional parameters. */ -export interface LoadBalancerFrontendIPConfigurationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type LoadBalancerFrontendIPConfigurationsListResponse = - LoadBalancerFrontendIPConfigurationListResult; - -/** Optional parameters. */ -export interface LoadBalancerFrontendIPConfigurationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LoadBalancerFrontendIPConfigurationsGetResponse = FrontendIPConfiguration; - -/** Optional parameters. */ -export interface LoadBalancerFrontendIPConfigurationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type LoadBalancerFrontendIPConfigurationsListNextResponse = - LoadBalancerFrontendIPConfigurationListResult; - -/** Optional parameters. */ -export interface InboundNatRulesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type InboundNatRulesListResponse = InboundNatRuleListResult; - -/** Optional parameters. */ -export interface InboundNatRulesDeleteOptionalParams 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 InboundNatRulesGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type InboundNatRulesGetResponse = InboundNatRule; - -/** Optional parameters. */ -export interface InboundNatRulesCreateOrUpdateOptionalParams 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 InboundNatRulesCreateOrUpdateResponse = InboundNatRule; - -/** Optional parameters. */ -export interface InboundNatRulesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type InboundNatRulesListNextResponse = InboundNatRuleListResult; - -/** Optional parameters. */ -export interface LoadBalancerLoadBalancingRulesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type LoadBalancerLoadBalancingRulesListResponse = LoadBalancerLoadBalancingRuleListResult; - -/** Optional parameters. */ -export interface LoadBalancerLoadBalancingRulesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LoadBalancerLoadBalancingRulesGetResponse = LoadBalancingRule; - -/** Optional parameters. */ -export interface LoadBalancerLoadBalancingRulesHealthOptionalParams - 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 health operation. */ -export type LoadBalancerLoadBalancingRulesHealthResponse = LoadBalancerHealthPerRule; - -/** Optional parameters. */ -export interface LoadBalancerLoadBalancingRulesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type LoadBalancerLoadBalancingRulesListNextResponse = - LoadBalancerLoadBalancingRuleListResult; - -/** Optional parameters. */ -export interface LoadBalancerOutboundRulesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type LoadBalancerOutboundRulesListResponse = LoadBalancerOutboundRuleListResult; - -/** Optional parameters. */ -export interface LoadBalancerOutboundRulesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LoadBalancerOutboundRulesGetResponse = OutboundRule; - -/** Optional parameters. */ -export interface LoadBalancerOutboundRulesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type LoadBalancerOutboundRulesListNextResponse = LoadBalancerOutboundRuleListResult; - -/** Optional parameters. */ -export interface LoadBalancerNetworkInterfacesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type LoadBalancerNetworkInterfacesListResponse = NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface LoadBalancerNetworkInterfacesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type LoadBalancerNetworkInterfacesListNextResponse = NetworkInterfaceListResult; - -/** Optional parameters. */ -export interface LoadBalancerProbesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type LoadBalancerProbesListResponse = LoadBalancerProbeListResult; - -/** Optional parameters. */ -export interface LoadBalancerProbesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LoadBalancerProbesGetResponse = Probe; - -/** Optional parameters. */ -export interface LoadBalancerProbesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type LoadBalancerProbesListNextResponse = LoadBalancerProbeListResult; - -/** Optional parameters. */ -export interface NatGatewaysDeleteOptionalParams 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 NatGatewaysGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type NatGatewaysGetResponse = NatGateway; - -/** Optional parameters. */ -export interface NatGatewaysCreateOrUpdateOptionalParams 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 NatGatewaysCreateOrUpdateResponse = NatGateway; - -/** Optional parameters. */ -export interface NatGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type NatGatewaysUpdateTagsResponse = NatGateway; - -/** Optional parameters. */ -export interface NatGatewaysListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type NatGatewaysListAllResponse = NatGatewayListResult; - -/** Optional parameters. */ -export interface NatGatewaysListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NatGatewaysListResponse = NatGatewayListResult; - -/** Optional parameters. */ -export interface NatGatewaysListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type NatGatewaysListAllNextResponse = NatGatewayListResult; - -/** Optional parameters. */ -export interface NatGatewaysListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NatGatewaysListNextResponse = NatGatewayListResult; - -/** Optional parameters. */ -export interface NetworkInterfaceIPConfigurationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkInterfaceIPConfigurationsListResponse = - NetworkInterfaceIPConfigurationListResult; - -/** Optional parameters. */ -export interface NetworkInterfaceIPConfigurationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkInterfaceIPConfigurationsGetResponse = NetworkInterfaceIPConfiguration; - -/** Optional parameters. */ -export interface NetworkInterfaceIPConfigurationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkInterfaceIPConfigurationsListNextResponse = - NetworkInterfaceIPConfigurationListResult; - -/** Optional parameters. */ -export interface NetworkInterfaceLoadBalancersListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkInterfaceLoadBalancersListResponse = NetworkInterfaceLoadBalancerListResult; - -/** Optional parameters. */ -export interface NetworkInterfaceLoadBalancersListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkInterfaceLoadBalancersListNextResponse = NetworkInterfaceLoadBalancerListResult; - -/** Optional parameters. */ -export interface NetworkInterfaceTapConfigurationsDeleteOptionalParams - 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 NetworkInterfaceTapConfigurationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkInterfaceTapConfigurationsGetResponse = NetworkInterfaceTapConfiguration; - -/** Optional parameters. */ -export interface NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams - 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 NetworkInterfaceTapConfigurationsCreateOrUpdateResponse = - NetworkInterfaceTapConfiguration; - -/** Optional parameters. */ -export interface NetworkInterfaceTapConfigurationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkInterfaceTapConfigurationsListResponse = - NetworkInterfaceTapConfigurationListResult; - -/** Optional parameters. */ -export interface NetworkInterfaceTapConfigurationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkInterfaceTapConfigurationsListNextResponse = - NetworkInterfaceTapConfigurationListResult; - -/** Optional parameters. */ -export interface NetworkManagersGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkManagersGetResponse = NetworkManager; - -/** Optional parameters. */ -export interface NetworkManagersCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type NetworkManagersCreateOrUpdateResponse = NetworkManager; - -/** Optional parameters. */ -export interface NetworkManagersDeleteOptionalParams extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 NetworkManagersPatchOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the patch operation. */ -export type NetworkManagersPatchResponse = NetworkManager; - -/** Optional parameters. */ -export interface NetworkManagersListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type NetworkManagersListBySubscriptionResponse = NetworkManagerListResult; - -/** Optional parameters. */ -export interface NetworkManagersListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type NetworkManagersListResponse = NetworkManagerListResult; - -/** Optional parameters. */ -export interface NetworkManagersListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type NetworkManagersListBySubscriptionNextResponse = NetworkManagerListResult; - -/** Optional parameters. */ -export interface NetworkManagersListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkManagersListNextResponse = NetworkManagerListResult; - -/** Optional parameters. */ -export interface NetworkManagerCommitsPostOptionalParams 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 post operation. */ -export type NetworkManagerCommitsPostResponse = NetworkManagerCommit; - -/** Optional parameters. */ -export interface NetworkManagerDeploymentStatusListOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; -} - -/** Contains response data for the list operation. */ -export type NetworkManagerDeploymentStatusListResponse = NetworkManagerDeploymentStatusListResult; - -/** Optional parameters. */ -export interface SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type SubscriptionNetworkManagerConnectionsCreateOrUpdateResponse = NetworkManagerConnection; - -/** Optional parameters. */ -export interface SubscriptionNetworkManagerConnectionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SubscriptionNetworkManagerConnectionsGetResponse = NetworkManagerConnection; - -/** Optional parameters. */ -export interface SubscriptionNetworkManagerConnectionsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface SubscriptionNetworkManagerConnectionsListOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type SubscriptionNetworkManagerConnectionsListResponse = NetworkManagerConnectionListResult; - -/** Optional parameters. */ -export interface SubscriptionNetworkManagerConnectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SubscriptionNetworkManagerConnectionsListNextResponse = - NetworkManagerConnectionListResult; - -/** Optional parameters. */ -export interface ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ManagementGroupNetworkManagerConnectionsCreateOrUpdateResponse = - NetworkManagerConnection; - -/** Optional parameters. */ -export interface ManagementGroupNetworkManagerConnectionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ManagementGroupNetworkManagerConnectionsGetResponse = NetworkManagerConnection; - -/** Optional parameters. */ -export interface ManagementGroupNetworkManagerConnectionsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ManagementGroupNetworkManagerConnectionsListOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type ManagementGroupNetworkManagerConnectionsListResponse = - NetworkManagerConnectionListResult; - -/** Optional parameters. */ -export interface ManagementGroupNetworkManagerConnectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ManagementGroupNetworkManagerConnectionsListNextResponse = - NetworkManagerConnectionListResult; - -/** Optional parameters. */ -export interface ConnectivityConfigurationsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ConnectivityConfigurationsGetResponse = ConnectivityConfiguration; - -/** Optional parameters. */ -export interface ConnectivityConfigurationsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ConnectivityConfigurationsCreateOrUpdateResponse = ConnectivityConfiguration; - -/** Optional parameters. */ -export interface ConnectivityConfigurationsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 ConnectivityConfigurationsListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type ConnectivityConfigurationsListResponse = ConnectivityConfigurationListResult; - -/** Optional parameters. */ -export interface ConnectivityConfigurationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ConnectivityConfigurationsListNextResponse = ConnectivityConfigurationListResult; - -/** Optional parameters. */ -export interface NetworkGroupsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkGroupsGetResponse = NetworkGroup; - -/** Optional parameters. */ -export interface NetworkGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type NetworkGroupsCreateOrUpdateResponse = NetworkGroupsCreateOrUpdateHeaders & NetworkGroup; - -/** Optional parameters. */ -export interface NetworkGroupsDeleteOptionalParams extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 NetworkGroupsListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type NetworkGroupsListResponse = NetworkGroupListResult; - -/** Optional parameters. */ -export interface NetworkGroupsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkGroupsListNextResponse = NetworkGroupListResult; - -/** Optional parameters. */ -export interface StaticMembersGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type StaticMembersGetResponse = StaticMember; - -/** Optional parameters. */ -export interface StaticMembersCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type StaticMembersCreateOrUpdateResponse = StaticMember; - -/** Optional parameters. */ -export interface StaticMembersDeleteOptionalParams extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface StaticMembersListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type StaticMembersListResponse = StaticMemberListResult; - -/** Optional parameters. */ -export interface StaticMembersListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type StaticMembersListNextResponse = StaticMemberListResult; - -/** Optional parameters. */ -export interface NetworkManagerRoutingConfigurationsListOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type NetworkManagerRoutingConfigurationsListResponse = - NetworkManagerRoutingConfigurationListResult; - -/** Optional parameters. */ -export interface NetworkManagerRoutingConfigurationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkManagerRoutingConfigurationsGetResponse = NetworkManagerRoutingConfiguration; - -/** Optional parameters. */ -export interface NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type NetworkManagerRoutingConfigurationsCreateOrUpdateResponse = - NetworkManagerRoutingConfiguration; - -/** Optional parameters. */ -export interface NetworkManagerRoutingConfigurationsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 NetworkManagerRoutingConfigurationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkManagerRoutingConfigurationsListNextResponse = - NetworkManagerRoutingConfigurationListResult; - -/** Optional parameters. */ -export interface RoutingRuleCollectionsListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type RoutingRuleCollectionsListResponse = RoutingRuleCollectionListResult; - -/** Optional parameters. */ -export interface RoutingRuleCollectionsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type RoutingRuleCollectionsGetResponse = RoutingRuleCollection; - -/** Optional parameters. */ -export interface RoutingRuleCollectionsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type RoutingRuleCollectionsCreateOrUpdateResponse = RoutingRuleCollection; - -/** Optional parameters. */ -export interface RoutingRuleCollectionsDeleteOptionalParams extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 RoutingRuleCollectionsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type RoutingRuleCollectionsListNextResponse = RoutingRuleCollectionListResult; - -/** Optional parameters. */ -export interface RoutingRulesListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type RoutingRulesListResponse = RoutingRuleListResult; - -/** Optional parameters. */ -export interface RoutingRulesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type RoutingRulesGetResponse = RoutingRule; - -/** Optional parameters. */ -export interface RoutingRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type RoutingRulesCreateOrUpdateResponse = RoutingRule; - -/** Optional parameters. */ -export interface RoutingRulesDeleteOptionalParams extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 RoutingRulesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type RoutingRulesListNextResponse = RoutingRuleListResult; - -/** Optional parameters. */ -export interface ScopeConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ScopeConnectionsCreateOrUpdateResponse = ScopeConnection; - -/** Optional parameters. */ -export interface ScopeConnectionsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ScopeConnectionsGetResponse = ScopeConnection; - -/** Optional parameters. */ -export interface ScopeConnectionsDeleteOptionalParams extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ScopeConnectionsListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type ScopeConnectionsListResponse = ScopeConnectionListResult; - -/** Optional parameters. */ -export interface ScopeConnectionsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ScopeConnectionsListNextResponse = ScopeConnectionListResult; - -/** Optional parameters. */ -export interface SecurityAdminConfigurationsListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type SecurityAdminConfigurationsListResponse = SecurityAdminConfigurationListResult; - -/** Optional parameters. */ -export interface SecurityAdminConfigurationsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SecurityAdminConfigurationsGetResponse = SecurityAdminConfiguration; - -/** Optional parameters. */ -export interface SecurityAdminConfigurationsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type SecurityAdminConfigurationsCreateOrUpdateResponse = SecurityAdminConfiguration; - -/** Optional parameters. */ -export interface SecurityAdminConfigurationsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 SecurityAdminConfigurationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SecurityAdminConfigurationsListNextResponse = SecurityAdminConfigurationListResult; - -/** Optional parameters. */ -export interface AdminRuleCollectionsListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type AdminRuleCollectionsListResponse = AdminRuleCollectionListResult; - -/** Optional parameters. */ -export interface AdminRuleCollectionsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AdminRuleCollectionsGetResponse = AdminRuleCollection; - -/** Optional parameters. */ -export interface AdminRuleCollectionsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type AdminRuleCollectionsCreateOrUpdateResponse = AdminRuleCollection; - -/** Optional parameters. */ -export interface AdminRuleCollectionsDeleteOptionalParams extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 AdminRuleCollectionsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type AdminRuleCollectionsListNextResponse = AdminRuleCollectionListResult; - -/** Optional parameters. */ -export interface AdminRulesListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type AdminRulesListResponse = AdminRuleListResult; - -/** Optional parameters. */ -export interface AdminRulesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AdminRulesGetResponse = BaseAdminRuleUnion; - -/** Optional parameters. */ -export interface AdminRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type AdminRulesCreateOrUpdateResponse = BaseAdminRuleUnion; - -/** Optional parameters. */ -export interface AdminRulesDeleteOptionalParams extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 AdminRulesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type AdminRulesListNextResponse = AdminRuleListResult; - -/** Optional parameters. */ -export interface SecurityUserConfigurationsListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type SecurityUserConfigurationsListResponse = SecurityUserConfigurationListResult; - -/** Optional parameters. */ -export interface SecurityUserConfigurationsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SecurityUserConfigurationsGetResponse = SecurityUserConfiguration; - -/** Optional parameters. */ -export interface SecurityUserConfigurationsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type SecurityUserConfigurationsCreateOrUpdateResponse = SecurityUserConfiguration; - -/** Optional parameters. */ -export interface SecurityUserConfigurationsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 SecurityUserConfigurationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SecurityUserConfigurationsListNextResponse = SecurityUserConfigurationListResult; - -/** Optional parameters. */ -export interface SecurityUserRuleCollectionsListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type SecurityUserRuleCollectionsListResponse = SecurityUserRuleCollectionListResult; - -/** Optional parameters. */ -export interface SecurityUserRuleCollectionsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SecurityUserRuleCollectionsGetResponse = SecurityUserRuleCollection; - -/** Optional parameters. */ -export interface SecurityUserRuleCollectionsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type SecurityUserRuleCollectionsCreateOrUpdateResponse = SecurityUserRuleCollection; - -/** Optional parameters. */ -export interface SecurityUserRuleCollectionsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 SecurityUserRuleCollectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SecurityUserRuleCollectionsListNextResponse = SecurityUserRuleCollectionListResult; - -/** Optional parameters. */ -export interface SecurityUserRulesListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type SecurityUserRulesListResponse = SecurityUserRuleListResult; - -/** Optional parameters. */ -export interface SecurityUserRulesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SecurityUserRulesGetResponse = SecurityUserRule; - -/** Optional parameters. */ -export interface SecurityUserRulesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type SecurityUserRulesCreateOrUpdateResponse = SecurityUserRule; - -/** Optional parameters. */ -export interface SecurityUserRulesDeleteOptionalParams extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** 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 SecurityUserRulesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SecurityUserRulesListNextResponse = SecurityUserRuleListResult; - -/** Optional parameters. */ -export interface NetworkProfilesDeleteOptionalParams 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 NetworkProfilesGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type NetworkProfilesGetResponse = NetworkProfile; - -/** Optional parameters. */ -export interface NetworkProfilesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type NetworkProfilesCreateOrUpdateResponse = NetworkProfile; - -/** Optional parameters. */ -export interface NetworkProfilesUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type NetworkProfilesUpdateTagsResponse = NetworkProfile; - -/** Optional parameters. */ -export interface NetworkProfilesListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type NetworkProfilesListAllResponse = NetworkProfileListResult; - -/** Optional parameters. */ -export interface NetworkProfilesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkProfilesListResponse = NetworkProfileListResult; - -/** Optional parameters. */ -export interface NetworkProfilesListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type NetworkProfilesListAllNextResponse = NetworkProfileListResult; - -/** Optional parameters. */ -export interface NetworkProfilesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkProfilesListNextResponse = NetworkProfileListResult; - -/** Optional parameters. */ -export interface NetworkSecurityGroupsDeleteOptionalParams 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 NetworkSecurityGroupsGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type NetworkSecurityGroupsGetResponse = NetworkSecurityGroup; - -/** Optional parameters. */ -export interface NetworkSecurityGroupsCreateOrUpdateOptionalParams - 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 NetworkSecurityGroupsCreateOrUpdateResponse = NetworkSecurityGroup; - -/** Optional parameters. */ -export interface NetworkSecurityGroupsUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type NetworkSecurityGroupsUpdateTagsResponse = NetworkSecurityGroup; - -/** Optional parameters. */ -export interface NetworkSecurityGroupsListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type NetworkSecurityGroupsListAllResponse = NetworkSecurityGroupListResult; - -/** Optional parameters. */ -export interface NetworkSecurityGroupsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkSecurityGroupsListResponse = NetworkSecurityGroupListResult; - -/** Optional parameters. */ -export interface NetworkSecurityGroupsListAllNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type NetworkSecurityGroupsListAllNextResponse = NetworkSecurityGroupListResult; - -/** Optional parameters. */ -export interface NetworkSecurityGroupsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkSecurityGroupsListNextResponse = NetworkSecurityGroupListResult; - -/** Optional parameters. */ -export interface SecurityRulesDeleteOptionalParams 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 SecurityRulesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SecurityRulesGetResponse = SecurityRule; - -/** Optional parameters. */ -export interface SecurityRulesCreateOrUpdateOptionalParams 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 SecurityRulesCreateOrUpdateResponse = SecurityRule; - -/** Optional parameters. */ -export interface SecurityRulesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type SecurityRulesListResponse = SecurityRuleListResult; - -/** Optional parameters. */ -export interface SecurityRulesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SecurityRulesListNextResponse = SecurityRuleListResult; - -/** Optional parameters. */ -export interface DefaultSecurityRulesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type DefaultSecurityRulesListResponse = SecurityRuleListResult; - -/** Optional parameters. */ -export interface DefaultSecurityRulesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DefaultSecurityRulesGetResponse = SecurityRule; - -/** Optional parameters. */ -export interface DefaultSecurityRulesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type DefaultSecurityRulesListNextResponse = SecurityRuleListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimetersGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkSecurityPerimetersGetResponse = NetworkSecurityPerimeter; - -/** Optional parameters. */ -export interface NetworkSecurityPerimetersCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type NetworkSecurityPerimetersCreateOrUpdateResponse = NetworkSecurityPerimeter; - -/** Optional parameters. */ -export interface NetworkSecurityPerimetersDeleteOptionalParams extends coreClient.OperationOptions { - /** Deletes the resource even if it contains any child associations. */ - forceDeletion?: boolean; - /** 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 NetworkSecurityPerimetersPatchOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the patch operation. */ -export type NetworkSecurityPerimetersPatchResponse = NetworkSecurityPerimeter; - -/** Optional parameters. */ -export interface NetworkSecurityPerimetersListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type NetworkSecurityPerimetersListBySubscriptionResponse = - NetworkSecurityPerimeterListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimetersListOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type NetworkSecurityPerimetersListResponse = NetworkSecurityPerimeterListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimetersListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type NetworkSecurityPerimetersListBySubscriptionNextResponse = - NetworkSecurityPerimeterListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimetersListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkSecurityPerimetersListNextResponse = NetworkSecurityPerimeterListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterProfilesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkSecurityPerimeterProfilesGetResponse = NspProfile; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type NetworkSecurityPerimeterProfilesCreateOrUpdateResponse = NspProfile; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterProfilesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterProfilesListOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type NetworkSecurityPerimeterProfilesListResponse = NspProfileListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterProfilesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkSecurityPerimeterProfilesListNextResponse = NspProfileListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAccessRulesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkSecurityPerimeterAccessRulesGetResponse = NspAccessRule; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type NetworkSecurityPerimeterAccessRulesCreateOrUpdateResponse = NspAccessRule; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAccessRulesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAccessRulesListOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type NetworkSecurityPerimeterAccessRulesListResponse = NspAccessRuleListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAccessRulesReconcileOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the reconcile operation. */ -export type NetworkSecurityPerimeterAccessRulesReconcileResponse = Record; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAccessRulesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkSecurityPerimeterAccessRulesListNextResponse = NspAccessRuleListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAssociationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkSecurityPerimeterAssociationsGetResponse = NspAssociation; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams - 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 NetworkSecurityPerimeterAssociationsCreateOrUpdateResponse = NspAssociation; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAssociationsDeleteOptionalParams - 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 NetworkSecurityPerimeterAssociationsListOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type NetworkSecurityPerimeterAssociationsListResponse = NspAssociationsListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAssociationsReconcileOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the reconcile operation. */ -export type NetworkSecurityPerimeterAssociationsReconcileResponse = Record; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAssociationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkSecurityPerimeterAssociationsListNextResponse = NspAssociationsListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkSecurityPerimeterAssociableResourceTypesListResponse = - PerimeterAssociableResourcesListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterAssociableResourceTypesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkSecurityPerimeterAssociableResourceTypesListNextResponse = - PerimeterAssociableResourcesListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLinksGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkSecurityPerimeterLinksGetResponse = NspLink; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type NetworkSecurityPerimeterLinksCreateOrUpdateResponse = NspLink; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLinksDeleteOptionalParams - 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 NetworkSecurityPerimeterLinksListOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type NetworkSecurityPerimeterLinksListResponse = NspLinkListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLinksListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkSecurityPerimeterLinksListNextResponse = NspLinkListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLinkReferencesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkSecurityPerimeterLinkReferencesGetResponse = NspLinkReference; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams - 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 NetworkSecurityPerimeterLinkReferencesListOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} - -/** Contains response data for the list operation. */ -export type NetworkSecurityPerimeterLinkReferencesListResponse = NspLinkReferenceListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLinkReferencesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkSecurityPerimeterLinkReferencesListNextResponse = NspLinkReferenceListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkSecurityPerimeterLoggingConfigurationsGetResponse = NspLoggingConfiguration; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateResponse = - NspLoggingConfiguration; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkSecurityPerimeterLoggingConfigurationsListResponse = - NspLoggingConfigurationListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterLoggingConfigurationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkSecurityPerimeterLoggingConfigurationsListNextResponse = - NspLoggingConfigurationListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterOperationStatusesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkSecurityPerimeterOperationStatusesGetResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterServiceTagsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkSecurityPerimeterServiceTagsListResponse = NspServiceTagsListResult; - -/** Optional parameters. */ -export interface NetworkSecurityPerimeterServiceTagsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkSecurityPerimeterServiceTagsListNextResponse = NspServiceTagsListResult; - -/** Optional parameters. */ -export interface ReachabilityAnalysisIntentsListOptionalParams extends coreClient.OperationOptions { - /** Optional skip token. */ - skipToken?: string; - /** Optional num entries to skip. */ - skip?: number; - /** Optional num entries to show. */ - top?: number; - /** Optional key by which to sort. */ - sortKey?: string; - /** Optional sort value for pagination. */ - sortValue?: string; -} - -/** Contains response data for the list operation. */ -export type ReachabilityAnalysisIntentsListResponse = ReachabilityAnalysisIntentListResult; - -/** Optional parameters. */ -export interface ReachabilityAnalysisIntentsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ReachabilityAnalysisIntentsGetResponse = ReachabilityAnalysisIntent; - -/** Optional parameters. */ -export interface ReachabilityAnalysisIntentsCreateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the create operation. */ -export type ReachabilityAnalysisIntentsCreateResponse = ReachabilityAnalysisIntent; - -/** Optional parameters. */ -export interface ReachabilityAnalysisIntentsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ReachabilityAnalysisIntentsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ReachabilityAnalysisIntentsListNextResponse = ReachabilityAnalysisIntentListResult; - -/** Optional parameters. */ -export interface ReachabilityAnalysisRunsListOptionalParams extends coreClient.OperationOptions { - /** Optional skip token. */ - skipToken?: string; - /** Optional num entries to skip. */ - skip?: number; - /** Optional num entries to show. */ - top?: number; - /** Optional key by which to sort. */ - sortKey?: string; - /** Optional sort value for pagination. */ - sortValue?: string; -} - -/** Contains response data for the list operation. */ -export type ReachabilityAnalysisRunsListResponse = ReachabilityAnalysisRunListResult; - -/** Optional parameters. */ -export interface ReachabilityAnalysisRunsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ReachabilityAnalysisRunsGetResponse = ReachabilityAnalysisRun; - -/** Optional parameters. */ -export interface ReachabilityAnalysisRunsCreateOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the create operation. */ -export type ReachabilityAnalysisRunsCreateResponse = ReachabilityAnalysisRun; - -/** Optional parameters. */ -export interface ReachabilityAnalysisRunsDeleteOptionalParams 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 delete operation. */ -export type ReachabilityAnalysisRunsDeleteResponse = ReachabilityAnalysisRunsDeleteHeaders; - -/** Optional parameters. */ -export interface ReachabilityAnalysisRunsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ReachabilityAnalysisRunsListNextResponse = ReachabilityAnalysisRunListResult; - -/** Optional parameters. */ -export interface VerifierWorkspacesListOptionalParams extends coreClient.OperationOptions { - /** Optional skip token. */ - skipToken?: string; - /** Optional num entries to skip. */ - skip?: number; - /** Optional num entries to show. */ - top?: number; - /** Optional key by which to sort. */ - sortKey?: string; - /** Optional sort value for pagination. */ - sortValue?: string; -} - -/** Contains response data for the list operation. */ -export type VerifierWorkspacesListResponse = VerifierWorkspaceListResult; - -/** Optional parameters. */ -export interface VerifierWorkspacesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VerifierWorkspacesGetResponse = VerifierWorkspace; - -/** Optional parameters. */ -export interface VerifierWorkspacesCreateOptionalParams extends coreClient.OperationOptions { - /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ - ifMatch?: string; -} - -/** Contains response data for the create operation. */ -export type VerifierWorkspacesCreateResponse = VerifierWorkspace; - -/** Optional parameters. */ -export interface VerifierWorkspacesUpdateOptionalParams extends coreClient.OperationOptions { - /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ - ifMatch?: string; - /** Verifier Workspace object to create/update. */ - body?: VerifierWorkspaceUpdate; -} - -/** Contains response data for the update operation. */ -export type VerifierWorkspacesUpdateResponse = VerifierWorkspace; - -/** Optional parameters. */ -export interface VerifierWorkspacesDeleteOptionalParams extends coreClient.OperationOptions { - /** The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. */ - ifMatch?: string; - /** 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 delete operation. */ -export type VerifierWorkspacesDeleteResponse = VerifierWorkspacesDeleteHeaders; - -/** Optional parameters. */ -export interface VerifierWorkspacesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VerifierWorkspacesListNextResponse = VerifierWorkspaceListResult; - -/** Optional parameters. */ -export interface NetworkVirtualAppliancesDeleteOptionalParams 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 NetworkVirtualAppliancesGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type NetworkVirtualAppliancesGetResponse = NetworkVirtualAppliance; - -/** Optional parameters. */ -export interface NetworkVirtualAppliancesUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type NetworkVirtualAppliancesUpdateTagsResponse = NetworkVirtualAppliance; - -/** Optional parameters. */ -export interface NetworkVirtualAppliancesCreateOrUpdateOptionalParams - 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 NetworkVirtualAppliancesCreateOrUpdateResponse = NetworkVirtualAppliance; - -/** Optional parameters. */ -export interface NetworkVirtualAppliancesRestartOptionalParams extends coreClient.OperationOptions { - /** Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. */ - networkVirtualApplianceInstanceIds?: NetworkVirtualApplianceInstanceIds; - /** 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 restart operation. */ -export type NetworkVirtualAppliancesRestartResponse = NetworkVirtualApplianceInstanceIds; - -/** Optional parameters. */ -export interface NetworkVirtualAppliancesReimageOptionalParams extends coreClient.OperationOptions { - /** Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. */ - networkVirtualApplianceInstanceIds?: NetworkVirtualApplianceInstanceIds; - /** 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 reimage operation. */ -export type NetworkVirtualAppliancesReimageResponse = NetworkVirtualApplianceInstanceIds; - -/** Optional parameters. */ -export interface NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams - 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 getBootDiagnosticLogs operation. */ -export type NetworkVirtualAppliancesGetBootDiagnosticLogsResponse = - NetworkVirtualApplianceInstanceId; - -/** Optional parameters. */ -export interface NetworkVirtualAppliancesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type NetworkVirtualAppliancesListByResourceGroupResponse = NetworkVirtualApplianceListResult; - -/** Optional parameters. */ -export interface NetworkVirtualAppliancesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkVirtualAppliancesListResponse = NetworkVirtualApplianceListResult; - -/** Optional parameters. */ -export interface NetworkVirtualAppliancesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type NetworkVirtualAppliancesListByResourceGroupNextResponse = - NetworkVirtualApplianceListResult; - -/** Optional parameters. */ -export interface NetworkVirtualAppliancesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkVirtualAppliancesListNextResponse = NetworkVirtualApplianceListResult; - -/** Optional parameters. */ -export interface VirtualApplianceSitesDeleteOptionalParams 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 VirtualApplianceSitesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualApplianceSitesGetResponse = VirtualApplianceSite; - -/** Optional parameters. */ -export interface VirtualApplianceSitesCreateOrUpdateOptionalParams - 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 VirtualApplianceSitesCreateOrUpdateResponse = VirtualApplianceSite; - -/** Optional parameters. */ -export interface VirtualApplianceSitesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualApplianceSitesListResponse = NetworkVirtualApplianceSiteListResult; - -/** Optional parameters. */ -export interface VirtualApplianceSitesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualApplianceSitesListNextResponse = NetworkVirtualApplianceSiteListResult; - -/** Optional parameters. */ -export interface VirtualApplianceSkusListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualApplianceSkusListResponse = NetworkVirtualApplianceSkuListResult; - -/** Optional parameters. */ -export interface VirtualApplianceSkusGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualApplianceSkusGetResponse = NetworkVirtualApplianceSku; - -/** Optional parameters. */ -export interface VirtualApplianceSkusListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualApplianceSkusListNextResponse = NetworkVirtualApplianceSkuListResult; - -/** Optional parameters. */ -export interface InboundSecurityRuleCreateOrUpdateOptionalParams - 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 InboundSecurityRuleCreateOrUpdateResponse = InboundSecurityRule; - -/** Optional parameters. */ -export interface InboundSecurityRuleGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type InboundSecurityRuleGetResponse = InboundSecurityRule; - -/** Optional parameters. */ -export interface NetworkWatchersCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type NetworkWatchersCreateOrUpdateResponse = NetworkWatcher; - -/** Optional parameters. */ -export interface NetworkWatchersGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkWatchersGetResponse = NetworkWatcher; - -/** Optional parameters. */ -export interface NetworkWatchersDeleteOptionalParams 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 NetworkWatchersUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type NetworkWatchersUpdateTagsResponse = NetworkWatcher; - -/** Optional parameters. */ -export interface NetworkWatchersListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkWatchersListResponse = NetworkWatcherListResult; - -/** Optional parameters. */ -export interface NetworkWatchersListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type NetworkWatchersListAllResponse = NetworkWatcherListResult; - -/** Optional parameters. */ -export interface NetworkWatchersGetTopologyOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the getTopology operation. */ -export type NetworkWatchersGetTopologyResponse = Topology; - -/** Optional parameters. */ -export interface NetworkWatchersVerifyIPFlowOptionalParams 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 verifyIPFlow operation. */ -export type NetworkWatchersVerifyIPFlowResponse = VerificationIPFlowResult; - -/** Optional parameters. */ -export interface NetworkWatchersGetNextHopOptionalParams 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 getNextHop operation. */ -export type NetworkWatchersGetNextHopResponse = NextHopResult; - -/** Optional parameters. */ -export interface NetworkWatchersGetVMSecurityRulesOptionalParams - 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 getVMSecurityRules operation. */ -export type NetworkWatchersGetVMSecurityRulesResponse = SecurityGroupViewResult; - -/** Optional parameters. */ -export interface NetworkWatchersGetTroubleshootingOptionalParams - 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 getTroubleshooting operation. */ -export type NetworkWatchersGetTroubleshootingResponse = TroubleshootingResult; - -/** Optional parameters. */ -export interface NetworkWatchersGetTroubleshootingResultOptionalParams - 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 getTroubleshootingResult operation. */ -export type NetworkWatchersGetTroubleshootingResultResponse = TroubleshootingResult; - -/** Optional parameters. */ -export interface NetworkWatchersSetFlowLogConfigurationOptionalParams - 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 setFlowLogConfiguration operation. */ -export type NetworkWatchersSetFlowLogConfigurationResponse = FlowLogInformation; - -/** Optional parameters. */ -export interface NetworkWatchersGetFlowLogStatusOptionalParams 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 getFlowLogStatus operation. */ -export type NetworkWatchersGetFlowLogStatusResponse = FlowLogInformation; - -/** Optional parameters. */ -export interface NetworkWatchersCheckConnectivityOptionalParams - 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 checkConnectivity operation. */ -export type NetworkWatchersCheckConnectivityResponse = ConnectivityInformation; - -/** Optional parameters. */ -export interface NetworkWatchersGetAzureReachabilityReportOptionalParams - 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 getAzureReachabilityReport operation. */ -export type NetworkWatchersGetAzureReachabilityReportResponse = AzureReachabilityReport; - -/** Optional parameters. */ -export interface NetworkWatchersListAvailableProvidersOptionalParams - 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 listAvailableProviders operation. */ -export type NetworkWatchersListAvailableProvidersResponse = AvailableProvidersList; - -/** Optional parameters. */ -export interface NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams - 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 getNetworkConfigurationDiagnostic operation. */ -export type NetworkWatchersGetNetworkConfigurationDiagnosticResponse = - NetworkConfigurationDiagnosticResponse; - -/** Optional parameters. */ -export interface PacketCapturesCreateOptionalParams 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 create operation. */ -export type PacketCapturesCreateResponse = PacketCaptureResult; - -/** Optional parameters. */ -export interface PacketCapturesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PacketCapturesGetResponse = PacketCaptureResult; - -/** Optional parameters. */ -export interface PacketCapturesDeleteOptionalParams 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 PacketCapturesStopOptionalParams 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 PacketCapturesGetStatusOptionalParams 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 getStatus operation. */ -export type PacketCapturesGetStatusResponse = PacketCaptureQueryStatusResult; - -/** Optional parameters. */ -export interface PacketCapturesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type PacketCapturesListResponse = PacketCaptureListResult; - -/** Optional parameters. */ -export interface ConnectionMonitorsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Value indicating whether connection monitor V1 should be migrated to V2 format. */ - migrate?: string; - /** 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 ConnectionMonitorsCreateOrUpdateResponse = ConnectionMonitorResult; - -/** Optional parameters. */ -export interface ConnectionMonitorsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ConnectionMonitorsGetResponse = ConnectionMonitorResult; - -/** Optional parameters. */ -export interface ConnectionMonitorsDeleteOptionalParams 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 ConnectionMonitorsUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type ConnectionMonitorsUpdateTagsResponse = ConnectionMonitorResult; - -/** Optional parameters. */ -export interface ConnectionMonitorsStopOptionalParams 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 ConnectionMonitorsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ConnectionMonitorsListResponse = ConnectionMonitorListResult; - -/** Optional parameters. */ -export interface FlowLogsCreateOrUpdateOptionalParams 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 FlowLogsCreateOrUpdateResponse = FlowLog; - -/** Optional parameters. */ -export interface FlowLogsUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type FlowLogsUpdateTagsResponse = FlowLog; - -/** Optional parameters. */ -export interface FlowLogsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type FlowLogsGetResponse = FlowLog; - -/** Optional parameters. */ -export interface FlowLogsDeleteOptionalParams 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 FlowLogsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type FlowLogsListResponse = FlowLogListResult; - -/** Optional parameters. */ -export interface FlowLogsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type FlowLogsListNextResponse = FlowLogListResult; - -/** Optional parameters. */ -export interface OperationsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; - -/** Optional parameters. */ -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult; - -/** Optional parameters. */ -export interface PrivateEndpointsDeleteOptionalParams 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 PrivateEndpointsGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type PrivateEndpointsGetResponse = PrivateEndpoint; - -/** Optional parameters. */ -export interface PrivateEndpointsCreateOrUpdateOptionalParams 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 PrivateEndpointsCreateOrUpdateResponse = PrivateEndpoint; - -/** Optional parameters. */ -export interface PrivateEndpointsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type PrivateEndpointsListResponse = PrivateEndpointListResult; - -/** Optional parameters. */ -export interface PrivateEndpointsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type PrivateEndpointsListBySubscriptionResponse = PrivateEndpointListResult; - -/** Optional parameters. */ -export interface PrivateEndpointsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type PrivateEndpointsListNextResponse = PrivateEndpointListResult; - -/** Optional parameters. */ -export interface PrivateEndpointsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type PrivateEndpointsListBySubscriptionNextResponse = PrivateEndpointListResult; - -/** Optional parameters. */ -export interface AvailablePrivateEndpointTypesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type AvailablePrivateEndpointTypesListResponse = AvailablePrivateEndpointTypesResult; - -/** Optional parameters. */ -export interface AvailablePrivateEndpointTypesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type AvailablePrivateEndpointTypesListByResourceGroupResponse = - AvailablePrivateEndpointTypesResult; - -/** Optional parameters. */ -export interface AvailablePrivateEndpointTypesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type AvailablePrivateEndpointTypesListNextResponse = AvailablePrivateEndpointTypesResult; - -/** Optional parameters. */ -export interface AvailablePrivateEndpointTypesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type AvailablePrivateEndpointTypesListByResourceGroupNextResponse = - AvailablePrivateEndpointTypesResult; - -/** Optional parameters. */ -export interface PrivateDnsZoneGroupsDeleteOptionalParams 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 PrivateDnsZoneGroupsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PrivateDnsZoneGroupsGetResponse = PrivateDnsZoneGroup; - -/** Optional parameters. */ -export interface PrivateDnsZoneGroupsCreateOrUpdateOptionalParams - 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 PrivateDnsZoneGroupsCreateOrUpdateResponse = PrivateDnsZoneGroup; - -/** Optional parameters. */ -export interface PrivateDnsZoneGroupsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type PrivateDnsZoneGroupsListResponse = PrivateDnsZoneGroupListResult; - -/** Optional parameters. */ -export interface PrivateDnsZoneGroupsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type PrivateDnsZoneGroupsListNextResponse = PrivateDnsZoneGroupListResult; - -/** Optional parameters. */ -export interface PrivateLinkServicesDeleteOptionalParams 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 PrivateLinkServicesGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type PrivateLinkServicesGetResponse = PrivateLinkService; - -/** Optional parameters. */ -export interface PrivateLinkServicesCreateOrUpdateOptionalParams - 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 PrivateLinkServicesCreateOrUpdateResponse = PrivateLinkService; - -/** Optional parameters. */ -export interface PrivateLinkServicesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type PrivateLinkServicesListResponse = PrivateLinkServiceListResult; - -/** Optional parameters. */ -export interface PrivateLinkServicesListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type PrivateLinkServicesListBySubscriptionResponse = PrivateLinkServiceListResult; - -/** Optional parameters. */ -export interface PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams - extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the getPrivateEndpointConnection operation. */ -export type PrivateLinkServicesGetPrivateEndpointConnectionResponse = PrivateEndpointConnection; - -/** Optional parameters. */ -export interface PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updatePrivateEndpointConnection operation. */ -export type PrivateLinkServicesUpdatePrivateEndpointConnectionResponse = PrivateEndpointConnection; - -/** Optional parameters. */ -export interface PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams - 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 PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listPrivateEndpointConnections operation. */ -export type PrivateLinkServicesListPrivateEndpointConnectionsResponse = - PrivateEndpointConnectionListResult; - -/** Optional parameters. */ -export interface PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams - 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 checkPrivateLinkServiceVisibility operation. */ -export type PrivateLinkServicesCheckPrivateLinkServiceVisibilityResponse = - PrivateLinkServiceVisibility; - -/** Optional parameters. */ -export interface PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams - 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 checkPrivateLinkServiceVisibilityByResourceGroup operation. */ -export type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupResponse = - PrivateLinkServiceVisibility; - -/** Optional parameters. */ -export interface PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAutoApprovedPrivateLinkServices operation. */ -export type PrivateLinkServicesListAutoApprovedPrivateLinkServicesResponse = - AutoApprovedPrivateLinkServicesResult; - -/** Optional parameters. */ -export interface PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAutoApprovedPrivateLinkServicesByResourceGroup operation. */ -export type PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupResponse = - AutoApprovedPrivateLinkServicesResult; - -/** Optional parameters. */ -export interface PrivateLinkServicesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type PrivateLinkServicesListNextResponse = PrivateLinkServiceListResult; - -/** Optional parameters. */ -export interface PrivateLinkServicesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type PrivateLinkServicesListBySubscriptionNextResponse = PrivateLinkServiceListResult; - -/** Optional parameters. */ -export interface PrivateLinkServicesListPrivateEndpointConnectionsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listPrivateEndpointConnectionsNext operation. */ -export type PrivateLinkServicesListPrivateEndpointConnectionsNextResponse = - PrivateEndpointConnectionListResult; - -/** Optional parameters. */ -export interface PrivateLinkServicesListAutoApprovedPrivateLinkServicesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAutoApprovedPrivateLinkServicesNext operation. */ -export type PrivateLinkServicesListAutoApprovedPrivateLinkServicesNextResponse = - AutoApprovedPrivateLinkServicesResult; - -/** Optional parameters. */ -export interface PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAutoApprovedPrivateLinkServicesByResourceGroupNext operation. */ -export type PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupNextResponse = - AutoApprovedPrivateLinkServicesResult; - -/** Optional parameters. */ -export interface PublicIPPrefixesDeleteOptionalParams 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 PublicIPPrefixesGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type PublicIPPrefixesGetResponse = PublicIPPrefix; - -/** Optional parameters. */ -export interface PublicIPPrefixesCreateOrUpdateOptionalParams 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 PublicIPPrefixesCreateOrUpdateResponse = PublicIPPrefix; - -/** Optional parameters. */ -export interface PublicIPPrefixesUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type PublicIPPrefixesUpdateTagsResponse = PublicIPPrefix; - -/** Optional parameters. */ -export interface PublicIPPrefixesListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type PublicIPPrefixesListAllResponse = PublicIPPrefixListResult; - -/** Optional parameters. */ -export interface PublicIPPrefixesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type PublicIPPrefixesListResponse = PublicIPPrefixListResult; - -/** Optional parameters. */ -export interface PublicIPPrefixesListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type PublicIPPrefixesListAllNextResponse = PublicIPPrefixListResult; - -/** Optional parameters. */ -export interface PublicIPPrefixesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type PublicIPPrefixesListNextResponse = PublicIPPrefixListResult; - -/** Optional parameters. */ -export interface RouteFiltersDeleteOptionalParams 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 RouteFiltersGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced express route bgp peering resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type RouteFiltersGetResponse = RouteFilter; - -/** Optional parameters. */ -export interface RouteFiltersCreateOrUpdateOptionalParams 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 RouteFiltersCreateOrUpdateResponse = RouteFilter; - -/** Optional parameters. */ -export interface RouteFiltersUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type RouteFiltersUpdateTagsResponse = RouteFilter; - -/** Optional parameters. */ -export interface RouteFiltersListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type RouteFiltersListByResourceGroupResponse = RouteFilterListResult; - -/** Optional parameters. */ -export interface RouteFiltersListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type RouteFiltersListResponse = RouteFilterListResult; - -/** Optional parameters. */ -export interface RouteFiltersListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type RouteFiltersListByResourceGroupNextResponse = RouteFilterListResult; - -/** Optional parameters. */ -export interface RouteFiltersListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type RouteFiltersListNextResponse = RouteFilterListResult; - -/** Optional parameters. */ -export interface RouteFilterRulesDeleteOptionalParams 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 RouteFilterRulesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type RouteFilterRulesGetResponse = RouteFilterRule; - -/** Optional parameters. */ -export interface RouteFilterRulesCreateOrUpdateOptionalParams 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 RouteFilterRulesCreateOrUpdateResponse = RouteFilterRule; - -/** Optional parameters. */ -export interface RouteFilterRulesListByRouteFilterOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByRouteFilter operation. */ -export type RouteFilterRulesListByRouteFilterResponse = RouteFilterRuleListResult; - -/** Optional parameters. */ -export interface RouteFilterRulesListByRouteFilterNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByRouteFilterNext operation. */ -export type RouteFilterRulesListByRouteFilterNextResponse = RouteFilterRuleListResult; - -/** Optional parameters. */ -export interface RouteTablesDeleteOptionalParams 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 RouteTablesGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type RouteTablesGetResponse = RouteTable; - -/** Optional parameters. */ -export interface RouteTablesCreateOrUpdateOptionalParams 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 RouteTablesCreateOrUpdateResponse = RouteTable; - -/** Optional parameters. */ -export interface RouteTablesUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type RouteTablesUpdateTagsResponse = RouteTable; - -/** Optional parameters. */ -export interface RouteTablesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type RouteTablesListResponse = RouteTableListResult; - -/** Optional parameters. */ -export interface RouteTablesListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type RouteTablesListAllResponse = RouteTableListResult; - -/** Optional parameters. */ -export interface RouteTablesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type RouteTablesListNextResponse = RouteTableListResult; - -/** Optional parameters. */ -export interface RouteTablesListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type RouteTablesListAllNextResponse = RouteTableListResult; - -/** Optional parameters. */ -export interface RoutesDeleteOptionalParams 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 RoutesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type RoutesGetResponse = Route; - -/** Optional parameters. */ -export interface RoutesCreateOrUpdateOptionalParams 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 RoutesCreateOrUpdateResponse = Route; - -/** Optional parameters. */ -export interface RoutesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type RoutesListResponse = RouteListResult; - -/** Optional parameters. */ -export interface RoutesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type RoutesListNextResponse = RouteListResult; - -/** Optional parameters. */ -export interface SecurityPartnerProvidersDeleteOptionalParams 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 SecurityPartnerProvidersGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SecurityPartnerProvidersGetResponse = SecurityPartnerProvider; - -/** Optional parameters. */ -export interface SecurityPartnerProvidersCreateOrUpdateOptionalParams - 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 SecurityPartnerProvidersCreateOrUpdateResponse = SecurityPartnerProvider; - -/** Optional parameters. */ -export interface SecurityPartnerProvidersUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type SecurityPartnerProvidersUpdateTagsResponse = SecurityPartnerProvider; - -/** Optional parameters. */ -export interface SecurityPartnerProvidersListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type SecurityPartnerProvidersListByResourceGroupResponse = SecurityPartnerProviderListResult; - -/** Optional parameters. */ -export interface SecurityPartnerProvidersListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type SecurityPartnerProvidersListResponse = SecurityPartnerProviderListResult; - -/** Optional parameters. */ -export interface SecurityPartnerProvidersListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type SecurityPartnerProvidersListByResourceGroupNextResponse = - SecurityPartnerProviderListResult; - -/** Optional parameters. */ -export interface SecurityPartnerProvidersListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SecurityPartnerProvidersListNextResponse = SecurityPartnerProviderListResult; - -/** Optional parameters. */ -export interface BgpServiceCommunitiesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type BgpServiceCommunitiesListResponse = BgpServiceCommunityListResult; - -/** Optional parameters. */ -export interface BgpServiceCommunitiesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type BgpServiceCommunitiesListNextResponse = BgpServiceCommunityListResult; - -/** Optional parameters. */ -export interface ServiceEndpointPoliciesDeleteOptionalParams 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 ServiceEndpointPoliciesGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type ServiceEndpointPoliciesGetResponse = ServiceEndpointPolicy; - -/** Optional parameters. */ -export interface ServiceEndpointPoliciesCreateOrUpdateOptionalParams - 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 ServiceEndpointPoliciesCreateOrUpdateResponse = ServiceEndpointPolicy; - -/** Optional parameters. */ -export interface ServiceEndpointPoliciesUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type ServiceEndpointPoliciesUpdateTagsResponse = ServiceEndpointPolicy; - -/** Optional parameters. */ -export interface ServiceEndpointPoliciesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ServiceEndpointPoliciesListResponse = ServiceEndpointPolicyListResult; - -/** Optional parameters. */ -export interface ServiceEndpointPoliciesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ServiceEndpointPoliciesListByResourceGroupResponse = ServiceEndpointPolicyListResult; - -/** Optional parameters. */ -export interface ServiceEndpointPoliciesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ServiceEndpointPoliciesListNextResponse = ServiceEndpointPolicyListResult; - -/** Optional parameters. */ -export interface ServiceEndpointPoliciesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ServiceEndpointPoliciesListByResourceGroupNextResponse = - ServiceEndpointPolicyListResult; - -/** Optional parameters. */ -export interface ServiceEndpointPolicyDefinitionsDeleteOptionalParams - 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 ServiceEndpointPolicyDefinitionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ServiceEndpointPolicyDefinitionsGetResponse = ServiceEndpointPolicyDefinition; - -/** Optional parameters. */ -export interface ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams - 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 ServiceEndpointPolicyDefinitionsCreateOrUpdateResponse = - ServiceEndpointPolicyDefinition; - -/** Optional parameters. */ -export interface ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ServiceEndpointPolicyDefinitionsListByResourceGroupResponse = - ServiceEndpointPolicyDefinitionListResult; - -/** Optional parameters. */ -export interface ServiceEndpointPolicyDefinitionsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ServiceEndpointPolicyDefinitionsListByResourceGroupNextResponse = - ServiceEndpointPolicyDefinitionListResult; - -/** Optional parameters. */ -export interface ServiceGatewaysDeleteOptionalParams 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 delete operation. */ -export type ServiceGatewaysDeleteResponse = ServiceGatewaysDeleteHeaders; - -/** Optional parameters. */ -export interface ServiceGatewaysGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ServiceGatewaysGetResponse = ServiceGateway; - -/** Optional parameters. */ -export interface ServiceGatewaysCreateOrUpdateOptionalParams 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 ServiceGatewaysCreateOrUpdateResponse = ServiceGateway; - -/** Optional parameters. */ -export interface ServiceGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type ServiceGatewaysUpdateTagsResponse = ServiceGateway; - -/** Optional parameters. */ -export interface ServiceGatewaysListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type ServiceGatewaysListAllResponse = ServiceGatewayListResult; - -/** Optional parameters. */ -export interface ServiceGatewaysListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ServiceGatewaysListResponse = ServiceGatewayListResult; - -/** Optional parameters. */ -export interface ServiceGatewaysUpdateAddressLocationsOptionalParams - 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 updateAddressLocations operation. */ -export type ServiceGatewaysUpdateAddressLocationsResponse = - ServiceGatewaysUpdateAddressLocationsHeaders; - -/** Optional parameters. */ -export interface ServiceGatewaysUpdateServicesOptionalParams 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 updateServices operation. */ -export type ServiceGatewaysUpdateServicesResponse = ServiceGatewaysUpdateServicesHeaders; - -/** Optional parameters. */ -export interface ServiceGatewaysGetAddressLocationsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getAddressLocations operation. */ -export type ServiceGatewaysGetAddressLocationsResponse = GetServiceGatewayAddressLocationsResult; - -/** Optional parameters. */ -export interface ServiceGatewaysGetServicesOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the getServices operation. */ -export type ServiceGatewaysGetServicesResponse = GetServiceGatewayServicesResult; - -/** Optional parameters. */ -export interface ServiceGatewaysListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type ServiceGatewaysListAllNextResponse = ServiceGatewayListResult; - -/** Optional parameters. */ -export interface ServiceGatewaysListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ServiceGatewaysListNextResponse = ServiceGatewayListResult; - -/** Optional parameters. */ -export interface ServiceGatewaysGetAddressLocationsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getAddressLocationsNext operation. */ -export type ServiceGatewaysGetAddressLocationsNextResponse = - GetServiceGatewayAddressLocationsResult; - -/** Optional parameters. */ -export interface ServiceGatewaysGetServicesNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the getServicesNext operation. */ -export type ServiceGatewaysGetServicesNextResponse = GetServiceGatewayServicesResult; - -/** Optional parameters. */ -export interface ServiceTagsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ServiceTagsListResponse = ServiceTagsListResult; - -/** Optional parameters. */ -export interface ServiceTagInformationListOptionalParams extends coreClient.OperationOptions { - /** Do not return address prefixes for the tag(s). */ - noAddressPrefixes?: boolean; - /** Return tag information for a particular tag. */ - tagName?: string; -} - -/** Contains response data for the list operation. */ -export type ServiceTagInformationListResponse = ServiceTagInformationListResult; - -/** Optional parameters. */ -export interface ServiceTagInformationListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ServiceTagInformationListNextResponse = ServiceTagInformationListResult; - -/** Optional parameters. */ -export interface UsagesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type UsagesListResponse = UsagesListResult; - -/** Optional parameters. */ -export interface UsagesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type UsagesListNextResponse = UsagesListResult; - -/** Optional parameters. */ -export interface VirtualNetworksDeleteOptionalParams 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 VirtualNetworksGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type VirtualNetworksGetResponse = VirtualNetwork; - -/** Optional parameters. */ -export interface VirtualNetworksCreateOrUpdateOptionalParams 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 VirtualNetworksCreateOrUpdateResponse = VirtualNetwork; - -/** Optional parameters. */ -export interface VirtualNetworksUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type VirtualNetworksUpdateTagsResponse = VirtualNetwork; - -/** Optional parameters. */ -export interface VirtualNetworksListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type VirtualNetworksListAllResponse = VirtualNetworkListResult; - -/** Optional parameters. */ -export interface VirtualNetworksListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualNetworksListResponse = VirtualNetworkListResult; - -/** Optional parameters. */ -export interface VirtualNetworksCheckIPAddressAvailabilityOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkIPAddressAvailability operation. */ -export type VirtualNetworksCheckIPAddressAvailabilityResponse = IPAddressAvailabilityResult; - -/** Optional parameters. */ -export interface VirtualNetworksListUsageOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listUsage operation. */ -export type VirtualNetworksListUsageResponse = VirtualNetworkListUsageResult; - -/** Optional parameters. */ -export interface VirtualNetworksListDdosProtectionStatusOptionalParams - extends coreClient.OperationOptions { - /** The skipToken that is given with nextLink. */ - skipToken?: string; - /** The max number of ip addresses to return. */ - top?: number; - /** 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 listDdosProtectionStatus operation. */ -export type VirtualNetworksListDdosProtectionStatusResponse = - VirtualNetworkDdosProtectionStatusResult; - -/** Optional parameters. */ -export interface VirtualNetworksListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type VirtualNetworksListAllNextResponse = VirtualNetworkListResult; - -/** Optional parameters. */ -export interface VirtualNetworksListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualNetworksListNextResponse = VirtualNetworkListResult; - -/** Optional parameters. */ -export interface VirtualNetworksListUsageNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listUsageNext operation. */ -export type VirtualNetworksListUsageNextResponse = VirtualNetworkListUsageResult; - -/** Optional parameters. */ -export interface VirtualNetworksListDdosProtectionStatusNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listDdosProtectionStatusNext operation. */ -export type VirtualNetworksListDdosProtectionStatusNextResponse = - VirtualNetworkDdosProtectionStatusResult; - -/** Optional parameters. */ -export interface SubnetsDeleteOptionalParams 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 SubnetsGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type SubnetsGetResponse = Subnet; - -/** Optional parameters. */ -export interface SubnetsCreateOrUpdateOptionalParams 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 SubnetsCreateOrUpdateResponse = Subnet; - -/** Optional parameters. */ -export interface SubnetsPrepareNetworkPoliciesOptionalParams 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 SubnetsUnprepareNetworkPoliciesOptionalParams 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 SubnetsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type SubnetsListResponse = SubnetListResult; - -/** Optional parameters. */ -export interface SubnetsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SubnetsListNextResponse = SubnetListResult; - -/** Optional parameters. */ -export interface ResourceNavigationLinksListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ResourceNavigationLinksListResponse = ResourceNavigationLinksListResult; - -/** Optional parameters. */ -export interface ServiceAssociationLinksListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ServiceAssociationLinksListResponse = ServiceAssociationLinksListResult; - -/** Optional parameters. */ -export interface VirtualNetworkPeeringsDeleteOptionalParams 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 VirtualNetworkPeeringsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualNetworkPeeringsGetResponse = VirtualNetworkPeering; - -/** Optional parameters. */ -export interface VirtualNetworkPeeringsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Parameter indicates the intention to sync the peering with the current address space on the remote vNet after it's updated. */ - syncRemoteAddressSpace?: SyncRemoteAddressSpace; - /** 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 VirtualNetworkPeeringsCreateOrUpdateResponse = VirtualNetworkPeering; - -/** Optional parameters. */ -export interface VirtualNetworkPeeringsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualNetworkPeeringsListResponse = VirtualNetworkPeeringListResult; - -/** Optional parameters. */ -export interface VirtualNetworkPeeringsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualNetworkPeeringsListNextResponse = VirtualNetworkPeeringListResult; - -/** Optional parameters. */ -export interface VirtualNetworkAppliancesDeleteOptionalParams 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 delete operation. */ -export type VirtualNetworkAppliancesDeleteResponse = VirtualNetworkAppliancesDeleteHeaders; - -/** Optional parameters. */ -export interface VirtualNetworkAppliancesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualNetworkAppliancesGetResponse = VirtualNetworkAppliance; - -/** Optional parameters. */ -export interface VirtualNetworkAppliancesCreateOrUpdateOptionalParams - 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 VirtualNetworkAppliancesCreateOrUpdateResponse = VirtualNetworkAppliance; - -/** Optional parameters. */ -export interface VirtualNetworkAppliancesUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type VirtualNetworkAppliancesUpdateTagsResponse = VirtualNetworkAppliance; - -/** Optional parameters. */ -export interface VirtualNetworkAppliancesListAllOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type VirtualNetworkAppliancesListAllResponse = VirtualNetworkApplianceListResult; - -/** Optional parameters. */ -export interface VirtualNetworkAppliancesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualNetworkAppliancesListResponse = VirtualNetworkApplianceListResult; - -/** Optional parameters. */ -export interface VirtualNetworkAppliancesListAllNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type VirtualNetworkAppliancesListAllNextResponse = VirtualNetworkApplianceListResult; - -/** Optional parameters. */ -export interface VirtualNetworkAppliancesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualNetworkAppliancesListNextResponse = VirtualNetworkApplianceListResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysCreateOrUpdateOptionalParams - 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 VirtualNetworkGatewaysCreateOrUpdateResponse = VirtualNetworkGateway; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualNetworkGatewaysGetResponse = VirtualNetworkGateway; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysDeleteOptionalParams 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 VirtualNetworkGatewaysUpdateTagsOptionalParams - 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 updateTags operation. */ -export type VirtualNetworkGatewaysUpdateTagsResponse = VirtualNetworkGateway; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualNetworkGatewaysListResponse = VirtualNetworkGatewayListResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysListConnectionsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listConnections operation. */ -export type VirtualNetworkGatewaysListConnectionsResponse = - VirtualNetworkGatewayListConnectionsResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysResetOptionalParams extends coreClient.OperationOptions { - /** Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. */ - gatewayVip?: string; - /** 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 reset operation. */ -export type VirtualNetworkGatewaysResetResponse = VirtualNetworkGateway; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams - 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 VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams - 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 generatevpnclientpackage operation. */ -export type VirtualNetworkGatewaysGeneratevpnclientpackageResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGenerateVpnProfileOptionalParams - 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 generateVpnProfile operation. */ -export type VirtualNetworkGatewaysGenerateVpnProfileResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams - 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 getVpnProfilePackageUrl operation. */ -export type VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams - extends coreClient.OperationOptions { - /** The IP address of the peer to retrieve the status of. */ - peer?: string; - /** 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 getBgpPeerStatus operation. */ -export type VirtualNetworkGatewaysGetBgpPeerStatusResponse = BgpPeerStatusListResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the supportedVpnDevices operation. */ -export type VirtualNetworkGatewaysSupportedVpnDevicesResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysListRadiusSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listRadiusSecrets operation. */ -export type VirtualNetworkGatewaysListRadiusSecretsResponse = RadiusAuthServerListResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGetLearnedRoutesOptionalParams - 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 getLearnedRoutes operation. */ -export type VirtualNetworkGatewaysGetLearnedRoutesResponse = GatewayRouteListResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams - 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 getAdvertisedRoutes operation. */ -export type VirtualNetworkGatewaysGetAdvertisedRoutesResponse = GatewayRouteListResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGetResiliencyInformationOptionalParams - extends coreClient.OperationOptions { - /** Attempt to recalculate the Resiliency Information for the gateway */ - attemptRefresh?: boolean; - /** 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 getResiliencyInformation operation. */ -export type VirtualNetworkGatewaysGetResiliencyInformationResponse = GatewayResiliencyInformation; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGetRoutesInformationOptionalParams - extends coreClient.OperationOptions { - /** Attempt to recalculate the Route Sets Information for the gateway */ - attemptRefresh?: boolean; - /** 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 getRoutesInformation operation. */ -export type VirtualNetworkGatewaysGetRoutesInformationResponse = GatewayRouteSetsInformation; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams - 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 setVpnclientIpsecParameters operation. */ -export type VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse = VpnClientIPsecParameters; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams - 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 getVpnclientIpsecParameters operation. */ -export type VirtualNetworkGatewaysGetVpnclientIpsecParametersResponse = VpnClientIPsecParameters; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the vpnDeviceConfigurationScript operation. */ -export type VirtualNetworkGatewaysVpnDeviceConfigurationScriptResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysStartPacketCaptureOptionalParams - extends coreClient.OperationOptions { - /** Virtual network gateway packet capture parameters supplied to start packet capture on gateway. */ - parameters?: VpnPacketCaptureStartParameters; - /** 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 startPacketCapture operation. */ -export type VirtualNetworkGatewaysStartPacketCaptureResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysStopPacketCaptureOptionalParams - 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 stopPacketCapture operation. */ -export type VirtualNetworkGatewaysStopPacketCaptureResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams - 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 getFailoverAllTestDetails operation. */ -export type VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse = - ExpressRouteFailoverTestDetails[]; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams - 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 getFailoverSingleTestDetails operation. */ -export type VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse = - ExpressRouteFailoverSingleTestDetails[]; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams - 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 startExpressRouteSiteFailoverSimulation operation. */ -export type VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams - 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 stopExpressRouteSiteFailoverSimulation operation. */ -export type VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams - 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 getVpnclientConnectionHealth operation. */ -export type VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse = - VpnClientConnectionHealthDetailListResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams - 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 VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams - 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 invokePrepareMigration operation. */ -export type VirtualNetworkGatewaysInvokePrepareMigrationResponse = - VirtualNetworkGatewaysInvokePrepareMigrationHeaders; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams - 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 invokeExecuteMigration operation. */ -export type VirtualNetworkGatewaysInvokeExecuteMigrationResponse = - VirtualNetworkGatewaysInvokeExecuteMigrationHeaders; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams - 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 invokeCommitMigration operation. */ -export type VirtualNetworkGatewaysInvokeCommitMigrationResponse = - VirtualNetworkGatewaysInvokeCommitMigrationHeaders; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams - 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 invokeAbortMigration operation. */ -export type VirtualNetworkGatewaysInvokeAbortMigrationResponse = - VirtualNetworkGatewaysInvokeAbortMigrationHeaders; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualNetworkGatewaysListNextResponse = VirtualNetworkGatewayListResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewaysListConnectionsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listConnectionsNext operation. */ -export type VirtualNetworkGatewaysListConnectionsNextResponse = - VirtualNetworkGatewayListConnectionsResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams - 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 VirtualNetworkGatewayConnectionsCreateOrUpdateResponse = - VirtualNetworkGatewayConnection; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayConnectionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualNetworkGatewayConnectionsGetResponse = VirtualNetworkGatewayConnection; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayConnectionsDeleteOptionalParams - 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 VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams - 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 updateTags operation. */ -export type VirtualNetworkGatewayConnectionsUpdateTagsResponse = VirtualNetworkGatewayConnection; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams - 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 setSharedKey operation. */ -export type VirtualNetworkGatewayConnectionsSetSharedKeyResponse = ConnectionSharedKey; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getSharedKey operation. */ -export type VirtualNetworkGatewayConnectionsGetSharedKeyResponse = ConnectionSharedKey; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayConnectionsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualNetworkGatewayConnectionsListResponse = - VirtualNetworkGatewayConnectionListResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams - 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 resetSharedKey operation. */ -export type VirtualNetworkGatewayConnectionsResetSharedKeyResponse = ConnectionResetSharedKey; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams - extends coreClient.OperationOptions { - /** Virtual network gateway packet capture parameters supplied to start packet capture on gateway connection. */ - parameters?: VpnPacketCaptureStartParameters; - /** 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 startPacketCapture operation. */ -export type VirtualNetworkGatewayConnectionsStartPacketCaptureResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams - 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 stopPacketCapture operation. */ -export type VirtualNetworkGatewayConnectionsStopPacketCaptureResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams - 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 getIkeSas operation. */ -export type VirtualNetworkGatewayConnectionsGetIkeSasResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayConnectionsResetConnectionOptionalParams - 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 VirtualNetworkGatewayConnectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualNetworkGatewayConnectionsListNextResponse = - VirtualNetworkGatewayConnectionListResult; - -/** Optional parameters. */ -export interface LocalNetworkGatewaysCreateOrUpdateOptionalParams - 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 LocalNetworkGatewaysCreateOrUpdateResponse = LocalNetworkGateway; - -/** Optional parameters. */ -export interface LocalNetworkGatewaysGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LocalNetworkGatewaysGetResponse = LocalNetworkGateway; - -/** Optional parameters. */ -export interface LocalNetworkGatewaysDeleteOptionalParams 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 LocalNetworkGatewaysUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type LocalNetworkGatewaysUpdateTagsResponse = LocalNetworkGateway; - -/** Optional parameters. */ -export interface LocalNetworkGatewaysListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type LocalNetworkGatewaysListResponse = LocalNetworkGatewayListResult; - -/** Optional parameters. */ -export interface LocalNetworkGatewaysListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type LocalNetworkGatewaysListNextResponse = LocalNetworkGatewayListResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayNatRulesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualNetworkGatewayNatRulesGetResponse = VirtualNetworkGatewayNatRule; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams - 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 VirtualNetworkGatewayNatRulesCreateOrUpdateResponse = VirtualNetworkGatewayNatRule; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayNatRulesDeleteOptionalParams - 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 VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVirtualNetworkGateway operation. */ -export type VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayResponse = - ListVirtualNetworkGatewayNatRulesResult; - -/** Optional parameters. */ -export interface VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVirtualNetworkGatewayNext operation. */ -export type VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayNextResponse = - ListVirtualNetworkGatewayNatRulesResult; - -/** Optional parameters. */ -export interface VirtualNetworkTapsDeleteOptionalParams 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 VirtualNetworkTapsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualNetworkTapsGetResponse = VirtualNetworkTap; - -/** Optional parameters. */ -export interface VirtualNetworkTapsCreateOrUpdateOptionalParams - 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 VirtualNetworkTapsCreateOrUpdateResponse = VirtualNetworkTap; - -/** Optional parameters. */ -export interface VirtualNetworkTapsUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type VirtualNetworkTapsUpdateTagsResponse = VirtualNetworkTap; - -/** Optional parameters. */ -export interface VirtualNetworkTapsListAllOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type VirtualNetworkTapsListAllResponse = VirtualNetworkTapListResult; - -/** Optional parameters. */ -export interface VirtualNetworkTapsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VirtualNetworkTapsListByResourceGroupResponse = VirtualNetworkTapListResult; - -/** Optional parameters. */ -export interface VirtualNetworkTapsListAllNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type VirtualNetworkTapsListAllNextResponse = VirtualNetworkTapListResult; - -/** Optional parameters. */ -export interface VirtualNetworkTapsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VirtualNetworkTapsListByResourceGroupNextResponse = VirtualNetworkTapListResult; - -/** Optional parameters. */ -export interface VirtualRoutersDeleteOptionalParams 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 VirtualRoutersGetOptionalParams extends coreClient.OperationOptions { - /** Expands referenced resources. */ - expand?: string; -} - -/** Contains response data for the get operation. */ -export type VirtualRoutersGetResponse = VirtualRouter; - -/** Optional parameters. */ -export interface VirtualRoutersCreateOrUpdateOptionalParams 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 VirtualRoutersCreateOrUpdateResponse = VirtualRouter; - -/** Optional parameters. */ -export interface VirtualRoutersListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VirtualRoutersListByResourceGroupResponse = VirtualRouterListResult; - -/** Optional parameters. */ -export interface VirtualRoutersListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualRoutersListResponse = VirtualRouterListResult; - -/** Optional parameters. */ -export interface VirtualRoutersListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VirtualRoutersListByResourceGroupNextResponse = VirtualRouterListResult; - -/** Optional parameters. */ -export interface VirtualRoutersListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualRoutersListNextResponse = VirtualRouterListResult; - -/** Optional parameters. */ -export interface VirtualRouterPeeringsDeleteOptionalParams 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 VirtualRouterPeeringsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualRouterPeeringsGetResponse = VirtualRouterPeering; - -/** Optional parameters. */ -export interface VirtualRouterPeeringsCreateOrUpdateOptionalParams - 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 VirtualRouterPeeringsCreateOrUpdateResponse = VirtualRouterPeering; - -/** Optional parameters. */ -export interface VirtualRouterPeeringsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualRouterPeeringsListResponse = VirtualRouterPeeringListResult; - -/** Optional parameters. */ -export interface VirtualRouterPeeringsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualRouterPeeringsListNextResponse = VirtualRouterPeeringListResult; - -/** Optional parameters. */ -export interface VirtualWansGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualWansGetResponse = VirtualWAN; - -/** Optional parameters. */ -export interface VirtualWansCreateOrUpdateOptionalParams 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 VirtualWansCreateOrUpdateResponse = VirtualWAN; - -/** Optional parameters. */ -export interface VirtualWansUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type VirtualWansUpdateTagsResponse = VirtualWAN; - -/** Optional parameters. */ -export interface VirtualWansDeleteOptionalParams 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 VirtualWansListByResourceGroupOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VirtualWansListByResourceGroupResponse = ListVirtualWANsResult; - -/** Optional parameters. */ -export interface VirtualWansListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualWansListResponse = ListVirtualWANsResult; - -/** Optional parameters. */ -export interface VirtualWansListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VirtualWansListByResourceGroupNextResponse = ListVirtualWANsResult; - -/** Optional parameters. */ -export interface VirtualWansListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualWansListNextResponse = ListVirtualWANsResult; - -/** Optional parameters. */ -export interface VpnSitesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VpnSitesGetResponse = VpnSite; - -/** Optional parameters. */ -export interface VpnSitesCreateOrUpdateOptionalParams 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 VpnSitesCreateOrUpdateResponse = VpnSite; - -/** Optional parameters. */ -export interface VpnSitesUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type VpnSitesUpdateTagsResponse = VpnSite; - -/** Optional parameters. */ -export interface VpnSitesDeleteOptionalParams 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 VpnSitesListByResourceGroupOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VpnSitesListByResourceGroupResponse = ListVpnSitesResult; - -/** Optional parameters. */ -export interface VpnSitesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VpnSitesListResponse = ListVpnSitesResult; - -/** Optional parameters. */ -export interface VpnSitesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VpnSitesListByResourceGroupNextResponse = ListVpnSitesResult; - -/** Optional parameters. */ -export interface VpnSitesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VpnSitesListNextResponse = ListVpnSitesResult; - -/** Optional parameters. */ -export interface VpnSiteLinksGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VpnSiteLinksGetResponse = VpnSiteLink; - -/** Optional parameters. */ -export interface VpnSiteLinksListByVpnSiteOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByVpnSite operation. */ -export type VpnSiteLinksListByVpnSiteResponse = ListVpnSiteLinksResult; - -/** Optional parameters. */ -export interface VpnSiteLinksListByVpnSiteNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByVpnSiteNext operation. */ -export type VpnSiteLinksListByVpnSiteNextResponse = ListVpnSiteLinksResult; - -/** Optional parameters. */ -export interface VpnSitesConfigurationDownloadOptionalParams 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 VpnServerConfigurationsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VpnServerConfigurationsGetResponse = VpnServerConfiguration; - -/** Optional parameters. */ -export interface VpnServerConfigurationsCreateOrUpdateOptionalParams - 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 VpnServerConfigurationsCreateOrUpdateResponse = VpnServerConfiguration; - -/** Optional parameters. */ -export interface VpnServerConfigurationsUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type VpnServerConfigurationsUpdateTagsResponse = VpnServerConfiguration; - -/** Optional parameters. */ -export interface VpnServerConfigurationsDeleteOptionalParams 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 VpnServerConfigurationsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VpnServerConfigurationsListByResourceGroupResponse = ListVpnServerConfigurationsResult; - -/** Optional parameters. */ -export interface VpnServerConfigurationsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VpnServerConfigurationsListResponse = ListVpnServerConfigurationsResult; - -/** Optional parameters. */ -export interface VpnServerConfigurationsListRadiusSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listRadiusSecrets operation. */ -export type VpnServerConfigurationsListRadiusSecretsResponse = RadiusAuthServerListResult; - -/** Optional parameters. */ -export interface VpnServerConfigurationsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VpnServerConfigurationsListByResourceGroupNextResponse = - ListVpnServerConfigurationsResult; - -/** Optional parameters. */ -export interface VpnServerConfigurationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** 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 {} - -/** Contains response data for the get operation. */ -export type VirtualHubsGetResponse = VirtualHub; - -/** Optional parameters. */ -export interface VirtualHubsCreateOrUpdateOptionalParams 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 VirtualHubsCreateOrUpdateResponse = VirtualHub; - -/** Optional parameters. */ -export interface VirtualHubsUpdateTagsOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type VirtualHubsUpdateTagsResponse = VirtualHub; - -/** Optional parameters. */ -export interface VirtualHubsDeleteOptionalParams 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 VirtualHubsListByResourceGroupOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VirtualHubsListByResourceGroupResponse = ListVirtualHubsResult; - -/** Optional parameters. */ -export interface VirtualHubsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualHubsListResponse = ListVirtualHubsResult; - -/** Optional parameters. */ -export interface VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams - extends coreClient.OperationOptions { - /** Parameters supplied to get the effective routes for a specific resource. */ - effectiveRoutesParameters?: EffectiveRoutesParameters; - /** 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 getEffectiveVirtualHubRoutes operation. */ -export type VirtualHubsGetEffectiveVirtualHubRoutesResponse = VirtualHubEffectiveRouteList; - -/** Optional parameters. */ -export interface VirtualHubsGetInboundRoutesOptionalParams 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 getInboundRoutes operation. */ -export type VirtualHubsGetInboundRoutesResponse = EffectiveRouteMapRouteList; - -/** Optional parameters. */ -export interface VirtualHubsGetOutboundRoutesOptionalParams 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 getOutboundRoutes operation. */ -export type VirtualHubsGetOutboundRoutesResponse = EffectiveRouteMapRouteList; - -/** Optional parameters. */ -export interface VirtualHubsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VirtualHubsListByResourceGroupNextResponse = ListVirtualHubsResult; - -/** Optional parameters. */ -export interface VirtualHubsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualHubsListNextResponse = ListVirtualHubsResult; - -/** Optional parameters. */ -export interface RouteMapsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type RouteMapsGetResponse = RouteMap; - -/** Optional parameters. */ -export interface RouteMapsCreateOrUpdateOptionalParams 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 RouteMapsCreateOrUpdateResponse = RouteMap; - -/** Optional parameters. */ -export interface RouteMapsDeleteOptionalParams 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 RouteMapsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type RouteMapsListResponse = ListRouteMapsResult; - -/** Optional parameters. */ -export interface RouteMapsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type RouteMapsListNextResponse = ListRouteMapsResult; - -/** Optional parameters. */ -export interface HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams - 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 HubVirtualNetworkConnectionsCreateOrUpdateResponse = HubVirtualNetworkConnection; - -/** Optional parameters. */ -export interface HubVirtualNetworkConnectionsDeleteOptionalParams - 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 HubVirtualNetworkConnectionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type HubVirtualNetworkConnectionsGetResponse = HubVirtualNetworkConnection; - -/** Optional parameters. */ -export interface HubVirtualNetworkConnectionsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type HubVirtualNetworkConnectionsListResponse = ListHubVirtualNetworkConnectionsResult; - -/** Optional parameters. */ -export interface HubVirtualNetworkConnectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type HubVirtualNetworkConnectionsListNextResponse = ListHubVirtualNetworkConnectionsResult; - -/** Optional parameters. */ -export interface VpnGatewaysGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VpnGatewaysGetResponse = VpnGateway; - -/** Optional parameters. */ -export interface VpnGatewaysCreateOrUpdateOptionalParams 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 VpnGatewaysCreateOrUpdateResponse = VpnGateway; - -/** Optional parameters. */ -export interface VpnGatewaysUpdateTagsOptionalParams 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 updateTags operation. */ -export type VpnGatewaysUpdateTagsResponse = VpnGateway; - -/** Optional parameters. */ -export interface VpnGatewaysDeleteOptionalParams 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 VpnGatewaysResetOptionalParams extends coreClient.OperationOptions { - /** VpnGateway ipConfigurationId to specify the gateway instance. */ - ipConfigurationId?: string; - /** 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 reset operation. */ -export type VpnGatewaysResetResponse = VpnGateway; - -/** Optional parameters. */ -export interface VpnGatewaysStartPacketCaptureOptionalParams extends coreClient.OperationOptions { - /** Vpn gateway packet capture parameters supplied to start packet capture on vpn gateway. */ - parameters?: VpnGatewayPacketCaptureStartParameters; - /** 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 startPacketCapture operation. */ -export type VpnGatewaysStartPacketCaptureResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VpnGatewaysStopPacketCaptureOptionalParams extends coreClient.OperationOptions { - /** Vpn gateway packet capture parameters supplied to stop packet capture on vpn gateway. */ - parameters?: VpnGatewayPacketCaptureStopParameters; - /** 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 stopPacketCapture operation. */ -export type VpnGatewaysStopPacketCaptureResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VpnGatewaysListByResourceGroupOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VpnGatewaysListByResourceGroupResponse = ListVpnGatewaysResult; - -/** Optional parameters. */ -export interface VpnGatewaysListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VpnGatewaysListResponse = ListVpnGatewaysResult; - -/** Optional parameters. */ -export interface VpnGatewaysListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VpnGatewaysListByResourceGroupNextResponse = ListVpnGatewaysResult; - -/** Optional parameters. */ -export interface VpnGatewaysListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VpnGatewaysListNextResponse = ListVpnGatewaysResult; - -/** Optional parameters. */ -export interface VpnLinkConnectionsResetConnectionOptionalParams - 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 VpnLinkConnectionsGetAllSharedKeysOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getAllSharedKeys operation. */ -export type VpnLinkConnectionsGetAllSharedKeysResponse = ConnectionSharedKeyResultList; - -/** Optional parameters. */ -export interface VpnLinkConnectionsGetDefaultSharedKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getDefaultSharedKey operation. */ -export type VpnLinkConnectionsGetDefaultSharedKeyResponse = ConnectionSharedKeyResult; - -/** Optional parameters. */ -export interface VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams - 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 setOrInitDefaultSharedKey operation. */ -export type VpnLinkConnectionsSetOrInitDefaultSharedKeyResponse = ConnectionSharedKeyResult; - -/** Optional parameters. */ -export interface VpnLinkConnectionsListDefaultSharedKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listDefaultSharedKey operation. */ -export type VpnLinkConnectionsListDefaultSharedKeyResponse = ConnectionSharedKeyResult; - -/** Optional parameters. */ -export interface VpnLinkConnectionsGetIkeSasOptionalParams 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 getIkeSas operation. */ -export type VpnLinkConnectionsGetIkeSasResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VpnLinkConnectionsListByVpnConnectionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVpnConnection operation. */ -export type VpnLinkConnectionsListByVpnConnectionResponse = ListVpnSiteLinkConnectionsResult; - -/** Optional parameters. */ -export interface VpnLinkConnectionsGetAllSharedKeysNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getAllSharedKeysNext operation. */ -export type VpnLinkConnectionsGetAllSharedKeysNextResponse = ConnectionSharedKeyResultList; - -/** Optional parameters. */ -export interface VpnLinkConnectionsListByVpnConnectionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVpnConnectionNext operation. */ -export type VpnLinkConnectionsListByVpnConnectionNextResponse = ListVpnSiteLinkConnectionsResult; - -/** Optional parameters. */ -export interface VpnConnectionsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VpnConnectionsGetResponse = VpnConnection; - -/** Optional parameters. */ -export interface VpnConnectionsCreateOrUpdateOptionalParams 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 VpnConnectionsCreateOrUpdateResponse = VpnConnection; - -/** Optional parameters. */ -export interface VpnConnectionsDeleteOptionalParams 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 VpnConnectionsStartPacketCaptureOptionalParams - extends coreClient.OperationOptions { - /** Vpn Connection packet capture parameters supplied to start packet capture on gateway connection. */ - parameters?: VpnConnectionPacketCaptureStartParameters; - /** 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 startPacketCapture operation. */ -export type VpnConnectionsStartPacketCaptureResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VpnConnectionsStopPacketCaptureOptionalParams extends coreClient.OperationOptions { - /** Vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. */ - parameters?: VpnConnectionPacketCaptureStopParameters; - /** 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 stopPacketCapture operation. */ -export type VpnConnectionsStopPacketCaptureResponse = { - /** The parsed response body. */ - body: string; -}; - -/** Optional parameters. */ -export interface VpnConnectionsListByVpnGatewayOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByVpnGateway operation. */ -export type VpnConnectionsListByVpnGatewayResponse = ListVpnConnectionsResult; - -/** Optional parameters. */ -export interface VpnConnectionsListByVpnGatewayNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVpnGatewayNext operation. */ -export type VpnConnectionsListByVpnGatewayNextResponse = ListVpnConnectionsResult; - -/** Optional parameters. */ -export interface VpnSiteLinkConnectionsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VpnSiteLinkConnectionsGetResponse = VpnSiteLinkConnection; - -/** Optional parameters. */ -export interface NatRulesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NatRulesGetResponse = VpnGatewayNatRule; - -/** Optional parameters. */ -export interface NatRulesCreateOrUpdateOptionalParams 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 NatRulesCreateOrUpdateResponse = VpnGatewayNatRule; - -/** Optional parameters. */ -export interface NatRulesDeleteOptionalParams 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 NatRulesListByVpnGatewayOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByVpnGateway operation. */ -export type NatRulesListByVpnGatewayResponse = ListVpnGatewayNatRulesResult; - -/** Optional parameters. */ -export interface NatRulesListByVpnGatewayNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByVpnGatewayNext operation. */ -export type NatRulesListByVpnGatewayNextResponse = ListVpnGatewayNatRulesResult; - -/** Optional parameters. */ -export interface P2SVpnGatewaysGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type P2SVpnGatewaysGetResponse = P2SVpnGateway; - -/** Optional parameters. */ -export interface P2SVpnGatewaysCreateOrUpdateOptionalParams 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 P2SVpnGatewaysCreateOrUpdateResponse = P2SVpnGateway; - -/** Optional parameters. */ -export interface P2SVpnGatewaysUpdateTagsOptionalParams 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 updateTags operation. */ -export type P2SVpnGatewaysUpdateTagsResponse = P2SVpnGateway; - -/** Optional parameters. */ -export interface P2SVpnGatewaysDeleteOptionalParams 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 P2SVpnGatewaysListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type P2SVpnGatewaysListByResourceGroupResponse = ListP2SVpnGatewaysResult; - -/** Optional parameters. */ -export interface P2SVpnGatewaysListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type P2SVpnGatewaysListResponse = ListP2SVpnGatewaysResult; - -/** Optional parameters. */ -export interface P2SVpnGatewaysResetOptionalParams 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 reset operation. */ -export type P2SVpnGatewaysResetResponse = P2SVpnGateway; - -/** Optional parameters. */ -export interface P2SVpnGatewaysGenerateVpnProfileOptionalParams - 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 generateVpnProfile operation. */ -export type P2SVpnGatewaysGenerateVpnProfileResponse = VpnProfileResponse; - -/** Optional parameters. */ -export interface P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams - 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 getP2SVpnConnectionHealth operation. */ -export type P2SVpnGatewaysGetP2SVpnConnectionHealthResponse = P2SVpnGateway; - -/** Optional parameters. */ -export interface P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams - 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 getP2SVpnConnectionHealthDetailed operation. */ -export type P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedResponse = P2SVpnConnectionHealth; - -/** Optional parameters. */ -export interface P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams - 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 P2SVpnGatewaysListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type P2SVpnGatewaysListByResourceGroupNextResponse = ListP2SVpnGatewaysResult; - -/** Optional parameters. */ -export interface P2SVpnGatewaysListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type P2SVpnGatewaysListNextResponse = ListP2SVpnGatewaysResult; - -/** Optional parameters. */ -export interface VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams - 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 list operation. */ -export type VpnServerConfigurationsAssociatedWithVirtualWanListResponse = - VpnServerConfigurationsResponse; - -/** Optional parameters. */ -export interface VirtualHubRouteTableV2SGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualHubRouteTableV2SGetResponse = VirtualHubRouteTableV2; - -/** Optional parameters. */ -export interface VirtualHubRouteTableV2SCreateOrUpdateOptionalParams - 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 VirtualHubRouteTableV2SCreateOrUpdateResponse = VirtualHubRouteTableV2; - -/** Optional parameters. */ -export interface VirtualHubRouteTableV2SDeleteOptionalParams 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 VirtualHubRouteTableV2SListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualHubRouteTableV2SListResponse = ListVirtualHubRouteTableV2SResult; - -/** Optional parameters. */ -export interface VirtualHubRouteTableV2SListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualHubRouteTableV2SListNextResponse = ListVirtualHubRouteTableV2SResult; - -/** Optional parameters. */ -export interface ExpressRouteGatewaysListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type ExpressRouteGatewaysListBySubscriptionResponse = ExpressRouteGatewayList; - -/** Optional parameters. */ -export interface ExpressRouteGatewaysListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ExpressRouteGatewaysListByResourceGroupResponse = ExpressRouteGatewayList; - -/** Optional parameters. */ -export interface ExpressRouteGatewaysCreateOrUpdateOptionalParams - 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 ExpressRouteGatewaysCreateOrUpdateResponse = ExpressRouteGateway; - -/** Optional parameters. */ -export interface ExpressRouteGatewaysUpdateTagsOptionalParams 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 updateTags operation. */ -export type ExpressRouteGatewaysUpdateTagsResponse = ExpressRouteGateway; - -/** Optional parameters. */ -export interface ExpressRouteGatewaysGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExpressRouteGatewaysGetResponse = ExpressRouteGateway; - -/** Optional parameters. */ -export interface ExpressRouteGatewaysDeleteOptionalParams 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 ExpressRouteConnectionsCreateOrUpdateOptionalParams - 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 ExpressRouteConnectionsCreateOrUpdateResponse = ExpressRouteConnection; - -/** Optional parameters. */ -export interface ExpressRouteConnectionsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExpressRouteConnectionsGetResponse = ExpressRouteConnection; - -/** Optional parameters. */ -export interface ExpressRouteConnectionsDeleteOptionalParams 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 ExpressRouteConnectionsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ExpressRouteConnectionsListResponse = ExpressRouteConnectionList; - -/** Optional parameters. */ -export interface NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams - 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 NetworkVirtualApplianceConnectionsCreateOrUpdateResponse = - NetworkVirtualApplianceConnection; - -/** Optional parameters. */ -export interface NetworkVirtualApplianceConnectionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NetworkVirtualApplianceConnectionsGetResponse = NetworkVirtualApplianceConnection; - -/** Optional parameters. */ -export interface NetworkVirtualApplianceConnectionsDeleteOptionalParams - 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 NetworkVirtualApplianceConnectionsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NetworkVirtualApplianceConnectionsListResponse = NetworkVirtualApplianceConnectionList; - -/** Optional parameters. */ -export interface NetworkVirtualApplianceConnectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NetworkVirtualApplianceConnectionsListNextResponse = - NetworkVirtualApplianceConnectionList; - -/** Optional parameters. */ -export interface VirtualHubBgpConnectionGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualHubBgpConnectionGetResponse = BgpConnection; - -/** Optional parameters. */ -export interface VirtualHubBgpConnectionCreateOrUpdateOptionalParams - 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 VirtualHubBgpConnectionCreateOrUpdateResponse = BgpConnection; - -/** Optional parameters. */ -export interface VirtualHubBgpConnectionDeleteOptionalParams 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 VirtualHubBgpConnectionsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualHubBgpConnectionsListResponse = ListVirtualHubBgpConnectionResults; - -/** Optional parameters. */ -export interface VirtualHubBgpConnectionsListLearnedRoutesOptionalParams - 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 listLearnedRoutes operation. */ -export type VirtualHubBgpConnectionsListLearnedRoutesResponse = { - [propertyName: string]: PeerRoute[]; -}; - -/** Optional parameters. */ -export interface VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams - 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 listAdvertisedRoutes operation. */ -export type VirtualHubBgpConnectionsListAdvertisedRoutesResponse = { - [propertyName: string]: PeerRoute[]; -}; - -/** Optional parameters. */ -export interface VirtualHubBgpConnectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualHubBgpConnectionsListNextResponse = ListVirtualHubBgpConnectionResults; - -/** Optional parameters. */ -export interface VirtualHubIpConfigurationGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualHubIpConfigurationGetResponse = HubIpConfiguration; - -/** Optional parameters. */ -export interface VirtualHubIpConfigurationCreateOrUpdateOptionalParams - 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 VirtualHubIpConfigurationCreateOrUpdateResponse = HubIpConfiguration; - -/** Optional parameters. */ -export interface VirtualHubIpConfigurationDeleteOptionalParams 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 VirtualHubIpConfigurationListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualHubIpConfigurationListResponse = ListVirtualHubIpConfigurationResults; - -/** Optional parameters. */ -export interface VirtualHubIpConfigurationListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualHubIpConfigurationListNextResponse = ListVirtualHubIpConfigurationResults; - -/** Optional parameters. */ -export interface HubRouteTablesCreateOrUpdateOptionalParams 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 HubRouteTablesCreateOrUpdateResponse = HubRouteTable; - -/** Optional parameters. */ -export interface HubRouteTablesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type HubRouteTablesGetResponse = HubRouteTable; - -/** Optional parameters. */ -export interface HubRouteTablesDeleteOptionalParams 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 HubRouteTablesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type HubRouteTablesListResponse = ListHubRouteTablesResult; - -/** Optional parameters. */ -export interface HubRouteTablesListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type HubRouteTablesListNextResponse = ListHubRouteTablesResult; - -/** Optional parameters. */ -export interface RoutingIntentCreateOrUpdateOptionalParams 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 RoutingIntentCreateOrUpdateResponse = RoutingIntent; - -/** Optional parameters. */ -export interface RoutingIntentGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type RoutingIntentGetResponse = RoutingIntent; - -/** Optional parameters. */ -export interface RoutingIntentDeleteOptionalParams 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 RoutingIntentListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type RoutingIntentListResponse = ListRoutingIntentResult; - -/** Optional parameters. */ -export interface RoutingIntentListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type RoutingIntentListNextResponse = ListRoutingIntentResult; - -/** Optional parameters. */ -export interface WebApplicationFirewallPoliciesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type WebApplicationFirewallPoliciesListResponse = WebApplicationFirewallPolicyListResult; - -/** Optional parameters. */ -export interface WebApplicationFirewallPoliciesListAllOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAll operation. */ -export type WebApplicationFirewallPoliciesListAllResponse = WebApplicationFirewallPolicyListResult; - -/** Optional parameters. */ -export interface WebApplicationFirewallPoliciesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WebApplicationFirewallPoliciesGetResponse = WebApplicationFirewallPolicy; - -/** Optional parameters. */ -export interface WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type WebApplicationFirewallPoliciesCreateOrUpdateResponse = WebApplicationFirewallPolicy; - -/** Optional parameters. */ -export interface WebApplicationFirewallPoliciesDeleteOptionalParams - 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 WebApplicationFirewallPoliciesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type WebApplicationFirewallPoliciesListNextResponse = WebApplicationFirewallPolicyListResult; - -/** Optional parameters. */ -export interface WebApplicationFirewallPoliciesListAllNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAllNext operation. */ -export type WebApplicationFirewallPoliciesListAllNextResponse = - WebApplicationFirewallPolicyListResult; - -/** Optional parameters. */ -export interface NetworkManagementClientOptionalParams extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Overrides client endpoint. */ - endpoint?: string; -} +export type { + ErrorDetail, + ErrorAdditionalInfo, + SystemData, + CreatedByType, + OperationStatusResult, + VpnLinkConnectionsGetIkeSasResponse, + VpnConnectionsStopPacketCaptureResponse, + VpnConnectionsStartPacketCaptureResponse, + ExpressRouteGatewaysStopSiteFailoverTestResponse, + ExpressRouteGatewaysStartSiteFailoverTestResponse, + VpnGatewaysStopPacketCaptureResponse, + VpnGatewaysStartPacketCaptureResponse, + VirtualNetworkGatewayConnectionsGetIkeSasResponse, + VirtualNetworkGatewayConnectionsStopPacketCaptureResponse, + VirtualNetworkGatewayConnectionsStartPacketCaptureResponse, + VirtualNetworkGatewaysVpnDeviceConfigurationScriptResponse, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse, + VirtualNetworkGatewaysStopPacketCaptureResponse, + VirtualNetworkGatewaysStartPacketCaptureResponse, + VirtualNetworkGatewaysSupportedVpnDevicesResponse, + VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse, + VirtualNetworkGatewaysGenerateVpnProfileResponse, + VirtualNetworkGatewaysGeneratevpnclientpackageResponse, + ExpressRouteCircuitsStopCircuitLinkFailoverTestResponse, + ExpressRouteCircuitsStartCircuitLinkFailoverTestResponse, + ApplicationGatewaysListAvailableResponseHeadersResponse, + ApplicationGatewaysListAvailableRequestHeadersResponse, + ApplicationGatewaysListAvailableServerVariablesResponse, +} from "./models.js"; +export { KnownCreatedByType } from "./models.js"; diff --git a/sdk/network/arm-network/src/models/mappers.ts b/sdk/network/arm-network/src/models/mappers.ts deleted file mode 100644 index b5f06a92832e..000000000000 --- a/sdk/network/arm-network/src/models/mappers.ts +++ /dev/null @@ -1,37592 +0,0 @@ -// 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 type * as coreClient from "@azure/core-client"; - -export const CloudError: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudError", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "CloudErrorBody", - }, - }, - }, - }, -}; - -export const CloudErrorBody: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudErrorBody", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CloudErrorBody", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewaySku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewaySku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - type: { - name: "String", - }, - }, - capacity: { - serializedName: "capacity", - type: { - name: "Number", - }, - }, - family: { - serializedName: "family", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewaySslPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewaySslPolicy", - modelProperties: { - disabledSslProtocols: { - serializedName: "disabledSslProtocols", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - policyType: { - serializedName: "policyType", - type: { - name: "String", - }, - }, - policyName: { - serializedName: "policyName", - type: { - name: "String", - }, - }, - cipherSuites: { - serializedName: "cipherSuites", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - minProtocolVersion: { - serializedName: "minProtocolVersion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SubResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SubResource", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayProbeHealthResponseMatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayProbeHealthResponseMatch", - modelProperties: { - body: { - serializedName: "body", - type: { - name: "String", - }, - }, - statusCodes: { - serializedName: "statusCodes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const Resource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const ExtendedLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtendedLocation", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - modelProperties: { - status: { - serializedName: "status", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - actionsRequired: { - serializedName: "actionsRequired", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CustomDnsConfigPropertiesFormat: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CustomDnsConfigPropertiesFormat", - modelProperties: { - fqdn: { - serializedName: "fqdn", - type: { - name: "String", - }, - }, - ipAddresses: { - serializedName: "ipAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const PrivateEndpointIPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointIPConfiguration", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - groupId: { - serializedName: "properties.groupId", - type: { - name: "String", - }, - }, - memberName: { - serializedName: "properties.memberName", - type: { - name: "String", - }, - }, - privateIPAddress: { - serializedName: "properties.privateIPAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkInterfaceDnsSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceDnsSettings", - modelProperties: { - dnsServers: { - serializedName: "dnsServers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - appliedDnsServers: { - serializedName: "appliedDnsServers", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - internalDnsNameLabel: { - serializedName: "internalDnsNameLabel", - type: { - name: "String", - }, - }, - internalFqdn: { - serializedName: "internalFqdn", - readOnly: true, - type: { - name: "String", - }, - }, - internalDomainNameSuffix: { - serializedName: "internalDomainNameSuffix", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResourceSet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceSet", - modelProperties: { - subscriptions: { - serializedName: "subscriptions", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const RetentionPolicyParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RetentionPolicyParameters", - modelProperties: { - days: { - defaultValue: 0, - serializedName: "days", - type: { - name: "Number", - }, - }, - enabled: { - defaultValue: false, - serializedName: "enabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const FlowLogFormatParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FlowLogFormatParameters", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - version: { - defaultValue: 0, - serializedName: "version", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const TrafficAnalyticsProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrafficAnalyticsProperties", - modelProperties: { - networkWatcherFlowAnalyticsConfiguration: { - serializedName: "networkWatcherFlowAnalyticsConfiguration", - type: { - name: "Composite", - className: "TrafficAnalyticsConfigurationProperties", - }, - }, - }, - }, -}; - -export const TrafficAnalyticsConfigurationProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrafficAnalyticsConfigurationProperties", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean", - }, - }, - workspaceId: { - serializedName: "workspaceId", - type: { - name: "String", - }, - }, - workspaceRegion: { - serializedName: "workspaceRegion", - type: { - name: "String", - }, - }, - workspaceResourceId: { - serializedName: "workspaceResourceId", - type: { - name: "String", - }, - }, - trafficAnalyticsInterval: { - serializedName: "trafficAnalyticsInterval", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ManagedServiceIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedServiceIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String", - }, - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "Enum", - allowedValues: ["SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None"], - }, - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: - "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", - }, - }, - }, - }, - }, - }, -}; - -export const Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: - "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String", - }, - }, - clientId: { - serializedName: "clientId", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ServiceEndpointPropertiesFormat: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceEndpointPropertiesFormat", - modelProperties: { - service: { - serializedName: "service", - type: { - name: "String", - }, - }, - networkIdentifier: { - serializedName: "networkIdentifier", - type: { - name: "Composite", - className: "SubResource", - }, - }, - locations: { - serializedName: "locations", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PublicIPAddressSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PublicIPAddressSku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PublicIPAddressDnsSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PublicIPAddressDnsSettings", - modelProperties: { - domainNameLabel: { - serializedName: "domainNameLabel", - type: { - name: "String", - }, - }, - domainNameLabelScope: { - serializedName: "domainNameLabelScope", - type: { - name: "Enum", - allowedValues: ["TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", "NoReuse"], - }, - }, - fqdn: { - serializedName: "fqdn", - type: { - name: "String", - }, - }, - reverseFqdn: { - serializedName: "reverseFqdn", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DdosSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DdosSettings", - modelProperties: { - protectionMode: { - serializedName: "protectionMode", - type: { - name: "String", - }, - }, - ddosProtectionPlan: { - serializedName: "ddosProtectionPlan", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const IpTag: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpTag", - modelProperties: { - ipTagType: { - serializedName: "ipTagType", - type: { - name: "String", - }, - }, - tag: { - serializedName: "tag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NatGatewaySku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NatGatewaySku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IpamPoolPrefixAllocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpamPoolPrefixAllocation", - modelProperties: { - numberOfIpAddresses: { - serializedName: "numberOfIpAddresses", - type: { - name: "String", - }, - }, - allocatedAddressPrefixes: { - serializedName: "allocatedAddressPrefixes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - id: { - serializedName: "pool.id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayLoadBalancerTunnelInterface: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GatewayLoadBalancerTunnelInterface", - modelProperties: { - port: { - serializedName: "port", - type: { - name: "Number", - }, - }, - identifier: { - serializedName: "identifier", - type: { - name: "Number", - }, - }, - protocol: { - serializedName: "protocol", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancerBackendAddress: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerBackendAddress", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - virtualNetwork: { - serializedName: "properties.virtualNetwork", - type: { - name: "Composite", - className: "SubResource", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - ipAddress: { - serializedName: "properties.ipAddress", - type: { - name: "String", - }, - }, - networkInterfaceIPConfiguration: { - serializedName: "properties.networkInterfaceIPConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - loadBalancerFrontendIPConfiguration: { - serializedName: "properties.loadBalancerFrontendIPConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - inboundNatRulesPortMapping: { - serializedName: "properties.inboundNatRulesPortMapping", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NatRulePortMapping", - }, - }, - }, - }, - adminState: { - serializedName: "properties.adminState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NatRulePortMapping: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NatRulePortMapping", - modelProperties: { - inboundNatRuleName: { - serializedName: "inboundNatRuleName", - type: { - name: "String", - }, - }, - frontendPort: { - serializedName: "frontendPort", - type: { - name: "Number", - }, - }, - backendPort: { - serializedName: "backendPort", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties", - modelProperties: { - groupId: { - serializedName: "groupId", - readOnly: true, - type: { - name: "String", - }, - }, - requiredMemberName: { - serializedName: "requiredMemberName", - readOnly: true, - type: { - name: "String", - }, - }, - fqdns: { - serializedName: "fqdns", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, - }; - -export const ApplicationGatewayBackendAddress: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayBackendAddress", - modelProperties: { - fqdn: { - serializedName: "fqdn", - type: { - name: "String", - }, - }, - ipAddress: { - serializedName: "ipAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayConnectionDraining: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayConnectionDraining", - modelProperties: { - enabled: { - serializedName: "enabled", - required: true, - type: { - name: "Boolean", - }, - }, - drainTimeoutInSec: { - constraints: { - InclusiveMaximum: 3600, - InclusiveMinimum: 1, - }, - serializedName: "drainTimeoutInSec", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ApplicationGatewayCustomError: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayCustomError", - modelProperties: { - statusCode: { - serializedName: "statusCode", - type: { - name: "String", - }, - }, - customErrorPageUrl: { - serializedName: "customErrorPageUrl", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayClientAuthConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayClientAuthConfiguration", - modelProperties: { - verifyClientCertIssuerDN: { - serializedName: "verifyClientCertIssuerDN", - type: { - name: "Boolean", - }, - }, - verifyClientRevocation: { - serializedName: "verifyClientRevocation", - type: { - name: "String", - }, - }, - verifyClientAuthMode: { - serializedName: "verifyClientAuthMode", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayRewriteRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayRewriteRule", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - ruleSequence: { - serializedName: "ruleSequence", - type: { - name: "Number", - }, - }, - conditions: { - serializedName: "conditions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayRewriteRuleCondition", - }, - }, - }, - }, - actionSet: { - serializedName: "actionSet", - type: { - name: "Composite", - className: "ApplicationGatewayRewriteRuleActionSet", - }, - }, - }, - }, -}; - -export const ApplicationGatewayRewriteRuleCondition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayRewriteRuleCondition", - modelProperties: { - variable: { - serializedName: "variable", - type: { - name: "String", - }, - }, - pattern: { - serializedName: "pattern", - type: { - name: "String", - }, - }, - ignoreCase: { - serializedName: "ignoreCase", - type: { - name: "Boolean", - }, - }, - negate: { - serializedName: "negate", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ApplicationGatewayRewriteRuleActionSet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayRewriteRuleActionSet", - modelProperties: { - requestHeaderConfigurations: { - serializedName: "requestHeaderConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayHeaderConfiguration", - }, - }, - }, - }, - responseHeaderConfigurations: { - serializedName: "responseHeaderConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayHeaderConfiguration", - }, - }, - }, - }, - urlConfiguration: { - serializedName: "urlConfiguration", - type: { - name: "Composite", - className: "ApplicationGatewayUrlConfiguration", - }, - }, - }, - }, -}; - -export const ApplicationGatewayHeaderConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayHeaderConfiguration", - modelProperties: { - headerName: { - serializedName: "headerName", - type: { - name: "String", - }, - }, - headerValueMatcher: { - serializedName: "headerValueMatcher", - type: { - name: "Composite", - className: "HeaderValueMatcher", - }, - }, - headerValue: { - serializedName: "headerValue", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HeaderValueMatcher: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HeaderValueMatcher", - modelProperties: { - pattern: { - serializedName: "pattern", - type: { - name: "String", - }, - }, - ignoreCase: { - serializedName: "ignoreCase", - type: { - name: "Boolean", - }, - }, - negate: { - serializedName: "negate", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ApplicationGatewayUrlConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayUrlConfiguration", - modelProperties: { - modifiedPath: { - serializedName: "modifiedPath", - type: { - name: "String", - }, - }, - modifiedQueryString: { - serializedName: "modifiedQueryString", - type: { - name: "String", - }, - }, - reroute: { - serializedName: "reroute", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ApplicationGatewayWebApplicationFirewallConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayWebApplicationFirewallConfiguration", - modelProperties: { - enabled: { - serializedName: "enabled", - required: true, - type: { - name: "Boolean", - }, - }, - firewallMode: { - serializedName: "firewallMode", - required: true, - type: { - name: "String", - }, - }, - ruleSetType: { - serializedName: "ruleSetType", - required: true, - type: { - name: "String", - }, - }, - ruleSetVersion: { - serializedName: "ruleSetVersion", - required: true, - type: { - name: "String", - }, - }, - disabledRuleGroups: { - serializedName: "disabledRuleGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallDisabledRuleGroup", - }, - }, - }, - }, - requestBodyCheck: { - serializedName: "requestBodyCheck", - type: { - name: "Boolean", - }, - }, - maxRequestBodySize: { - constraints: { - InclusiveMaximum: 128, - InclusiveMinimum: 8, - }, - serializedName: "maxRequestBodySize", - type: { - name: "Number", - }, - }, - maxRequestBodySizeInKb: { - constraints: { - InclusiveMaximum: 128, - InclusiveMinimum: 8, - }, - serializedName: "maxRequestBodySizeInKb", - type: { - name: "Number", - }, - }, - fileUploadLimitInMb: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "fileUploadLimitInMb", - type: { - name: "Number", - }, - }, - exclusions: { - serializedName: "exclusions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallExclusion", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayFirewallDisabledRuleGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallDisabledRuleGroup", - modelProperties: { - ruleGroupName: { - serializedName: "ruleGroupName", - required: true, - type: { - name: "String", - }, - }, - rules: { - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "Number", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayFirewallExclusion: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallExclusion", - modelProperties: { - matchVariable: { - serializedName: "matchVariable", - required: true, - type: { - name: "String", - }, - }, - selectorMatchOperator: { - serializedName: "selectorMatchOperator", - required: true, - type: { - name: "String", - }, - }, - selector: { - serializedName: "selector", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayAutoscaleConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayAutoscaleConfiguration", - modelProperties: { - minCapacity: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "minCapacity", - required: true, - type: { - name: "Number", - }, - }, - maxCapacity: { - constraints: { - InclusiveMinimum: 2, - }, - serializedName: "maxCapacity", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ApplicationGatewayGlobalConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayGlobalConfiguration", - modelProperties: { - enableRequestBuffering: { - serializedName: "enableRequestBuffering", - type: { - name: "Boolean", - }, - }, - enableResponseBuffering: { - serializedName: "enableResponseBuffering", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const TagsObject: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TagsObject", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGateway", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayBackendHealth: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayBackendHealth", - modelProperties: { - backendAddressPools: { - serializedName: "backendAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayBackendHealthPool", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayBackendHealthPool: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayBackendHealthPool", - modelProperties: { - backendAddressPool: { - serializedName: "backendAddressPool", - type: { - name: "Composite", - className: "ApplicationGatewayBackendAddressPool", - }, - }, - backendHttpSettingsCollection: { - serializedName: "backendHttpSettingsCollection", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayBackendHealthHttpSettings", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayBackendHealthHttpSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayBackendHealthHttpSettings", - modelProperties: { - backendHttpSettings: { - serializedName: "backendHttpSettings", - type: { - name: "Composite", - className: "ApplicationGatewayBackendHttpSettings", - }, - }, - servers: { - serializedName: "servers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayBackendHealthServer", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayBackendHealthServer: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayBackendHealthServer", - modelProperties: { - address: { - serializedName: "address", - type: { - name: "String", - }, - }, - ipConfiguration: { - serializedName: "ipConfiguration", - type: { - name: "Composite", - className: "NetworkInterfaceIPConfiguration", - }, - }, - health: { - serializedName: "health", - type: { - name: "String", - }, - }, - healthProbeLog: { - serializedName: "healthProbeLog", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayOnDemandProbe: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayOnDemandProbe", - modelProperties: { - protocol: { - serializedName: "protocol", - type: { - name: "String", - }, - }, - host: { - serializedName: "host", - type: { - name: "String", - }, - }, - path: { - serializedName: "path", - type: { - name: "String", - }, - }, - timeout: { - serializedName: "timeout", - type: { - name: "Number", - }, - }, - pickHostNameFromBackendHttpSettings: { - serializedName: "pickHostNameFromBackendHttpSettings", - type: { - name: "Boolean", - }, - }, - enableProbeProxyProtocolHeader: { - serializedName: "enableProbeProxyProtocolHeader", - type: { - name: "Boolean", - }, - }, - match: { - serializedName: "match", - type: { - name: "Composite", - className: "ApplicationGatewayProbeHealthResponseMatch", - }, - }, - backendAddressPool: { - serializedName: "backendAddressPool", - type: { - name: "Composite", - className: "SubResource", - }, - }, - backendHttpSettings: { - serializedName: "backendHttpSettings", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const ApplicationGatewayBackendHealthOnDemand: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayBackendHealthOnDemand", - modelProperties: { - backendAddressPool: { - serializedName: "backendAddressPool", - type: { - name: "Composite", - className: "ApplicationGatewayBackendAddressPool", - }, - }, - backendHealthHttpSettings: { - serializedName: "backendHealthHttpSettings", - type: { - name: "Composite", - className: "ApplicationGatewayBackendHealthHttpSettings", - }, - }, - }, - }, -}; - -export const ApplicationGatewayPrivateLinkResourceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayPrivateLinkResourceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayPrivateLinkResource", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayPrivateEndpointConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayPrivateEndpointConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayPrivateEndpointConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ErrorModel: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorModel", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetails", - }, - }, - }, - }, - innerError: { - serializedName: "innerError", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ErrorDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetails", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayAvailableWafRuleSetsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayAvailableWafRuleSetsResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallRuleSet", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayFirewallRuleGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallRuleGroup", - modelProperties: { - ruleGroupName: { - serializedName: "ruleGroupName", - required: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - rules: { - serializedName: "rules", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallRule", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayFirewallRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallRule", - modelProperties: { - ruleId: { - serializedName: "ruleId", - required: true, - type: { - name: "Number", - }, - }, - ruleIdString: { - serializedName: "ruleIdString", - type: { - name: "String", - }, - }, - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - action: { - serializedName: "action", - type: { - name: "String", - }, - }, - sensitivity: { - serializedName: "sensitivity", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayAvailableSslPredefinedPolicies: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayAvailableSslPredefinedPolicies", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewaySslPredefinedPolicy", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayWafDynamicManifestResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayWafDynamicManifestResult", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - availableRuleSets: { - serializedName: "properties.availableRuleSets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallManifestRuleSet", - }, - }, - }, - }, - ruleSetType: { - serializedName: "properties.defaultRuleSet.ruleSetType", - type: { - name: "String", - }, - }, - ruleSetVersion: { - serializedName: "properties.defaultRuleSet.ruleSetVersion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayFirewallManifestRuleSet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallManifestRuleSet", - modelProperties: { - ruleSetType: { - serializedName: "ruleSetType", - required: true, - type: { - name: "String", - }, - }, - ruleSetVersion: { - serializedName: "ruleSetVersion", - required: true, - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - type: { - name: "String", - }, - }, - tiers: { - serializedName: "tiers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - ruleGroups: { - serializedName: "ruleGroups", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallRuleGroup", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayWafDynamicManifestResultList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayWafDynamicManifestResultList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayWafDynamicManifestResult", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationSecurityGroupListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationSecurityGroupListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationSecurityGroup", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailableDelegationsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableDelegationsResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailableDelegation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailableDelegation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableDelegation", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - serviceName: { - serializedName: "serviceName", - type: { - name: "String", - }, - }, - actions: { - serializedName: "actions", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const AvailableServiceAliasesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableServiceAliasesResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailableServiceAlias", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailableServiceAlias: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableServiceAlias", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - resourceName: { - serializedName: "resourceName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallRCAction: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallRCAction", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallApplicationRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallApplicationRule", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - sourceAddresses: { - serializedName: "sourceAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - protocols: { - serializedName: "protocols", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallApplicationRuleProtocol", - }, - }, - }, - }, - targetFqdns: { - serializedName: "targetFqdns", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - fqdnTags: { - serializedName: "fqdnTags", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceIpGroups: { - serializedName: "sourceIpGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const AzureFirewallApplicationRuleProtocol: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallApplicationRuleProtocol", - modelProperties: { - protocolType: { - serializedName: "protocolType", - type: { - name: "String", - }, - }, - port: { - constraints: { - InclusiveMaximum: 64000, - InclusiveMinimum: 0, - }, - serializedName: "port", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AzureFirewallNatRCAction: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallNatRCAction", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallNatRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallNatRule", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - sourceAddresses: { - serializedName: "sourceAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationAddresses: { - serializedName: "destinationAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPorts: { - serializedName: "destinationPorts", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - protocols: { - serializedName: "protocols", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - translatedAddress: { - serializedName: "translatedAddress", - type: { - name: "String", - }, - }, - translatedPort: { - serializedName: "translatedPort", - type: { - name: "String", - }, - }, - translatedFqdn: { - serializedName: "translatedFqdn", - type: { - name: "String", - }, - }, - sourceIpGroups: { - serializedName: "sourceIpGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const AzureFirewallNetworkRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallNetworkRule", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - protocols: { - serializedName: "protocols", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceAddresses: { - serializedName: "sourceAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationAddresses: { - serializedName: "destinationAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPorts: { - serializedName: "destinationPorts", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationFqdns: { - serializedName: "destinationFqdns", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceIpGroups: { - serializedName: "sourceIpGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationIpGroups: { - serializedName: "destinationIpGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const HubIPAddresses: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HubIPAddresses", - modelProperties: { - publicIPs: { - serializedName: "publicIPs", - type: { - name: "Composite", - className: "HubPublicIPAddresses", - }, - }, - privateIPAddress: { - serializedName: "privateIPAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HubPublicIPAddresses: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HubPublicIPAddresses", - modelProperties: { - addresses: { - serializedName: "addresses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallPublicIPAddress", - }, - }, - }, - }, - count: { - serializedName: "count", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AzureFirewallPublicIPAddress: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallPublicIPAddress", - modelProperties: { - address: { - serializedName: "address", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallIpGroups: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallIpGroups", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - changeNumber: { - serializedName: "changeNumber", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallSku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallAutoscaleConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallAutoscaleConfiguration", - modelProperties: { - minCapacity: { - constraints: { - InclusiveMinimum: 2, - }, - serializedName: "minCapacity", - nullable: true, - type: { - name: "Number", - }, - }, - maxCapacity: { - constraints: { - InclusiveMinimum: 2, - }, - serializedName: "maxCapacity", - nullable: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AzureFirewallListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewall", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IPPrefixesList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IPPrefixesList", - modelProperties: { - ipPrefixes: { - serializedName: "ipPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const FirewallPacketCaptureParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPacketCaptureParameters", - modelProperties: { - durationInSeconds: { - defaultValue: 60, - constraints: { - InclusiveMaximum: 1800, - InclusiveMinimum: 30, - }, - serializedName: "durationInSeconds", - type: { - name: "Number", - }, - }, - numberOfPacketsToCapture: { - defaultValue: 1000, - constraints: { - InclusiveMaximum: 90000, - InclusiveMinimum: 100, - }, - serializedName: "numberOfPacketsToCapture", - type: { - name: "Number", - }, - }, - sasUrl: { - serializedName: "sasUrl", - type: { - name: "String", - }, - }, - fileName: { - serializedName: "fileName", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - type: { - name: "String", - }, - }, - flags: { - serializedName: "flags", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallPacketCaptureFlags", - }, - }, - }, - }, - filters: { - serializedName: "filters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallPacketCaptureRule", - }, - }, - }, - }, - operation: { - defaultValue: "Start", - serializedName: "operation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallPacketCaptureFlags: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallPacketCaptureFlags", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallPacketCaptureRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallPacketCaptureRule", - modelProperties: { - sources: { - serializedName: "sources", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinations: { - serializedName: "destinations", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPorts: { - serializedName: "destinationPorts", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const AzureFirewallPacketCaptureResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallPacketCaptureResponse", - modelProperties: { - statusCode: { - serializedName: "statusCode", - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallFqdnTagListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallFqdnTagListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallFqdnTag", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureWebCategory: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureWebCategory", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - group: { - serializedName: "properties.group", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureWebCategoryListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureWebCategoryListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureWebCategory", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BastionHostPropertiesFormatNetworkAcls: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionHostPropertiesFormatNetworkAcls", - modelProperties: { - ipRules: { - serializedName: "ipRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IPRule", - }, - }, - }, - }, - }, - }, -}; - -export const IPRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IPRule", - modelProperties: { - addressPrefix: { - serializedName: "addressPrefix", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Sku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Sku", - modelProperties: { - name: { - defaultValue: "Standard", - serializedName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BastionHostListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionHostListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BastionHost", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BastionShareableLinkListRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionShareableLinkListRequest", - modelProperties: { - vms: { - serializedName: "vms", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BastionShareableLink", - }, - }, - }, - }, - }, - }, -}; - -export const BastionShareableLink: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionShareableLink", - modelProperties: { - vm: { - serializedName: "vm", - type: { - name: "Composite", - className: "Vm", - }, - }, - bsl: { - serializedName: "bsl", - readOnly: true, - type: { - name: "String", - }, - }, - createdAt: { - serializedName: "createdAt", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BastionShareableLinkListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionShareableLinkListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BastionShareableLink", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BastionShareableLinkTokenListRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionShareableLinkTokenListRequest", - modelProperties: { - tokens: { - serializedName: "tokens", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const BastionActiveSessionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionActiveSessionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BastionActiveSession", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BastionActiveSession: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionActiveSession", - modelProperties: { - sessionId: { - serializedName: "sessionId", - readOnly: true, - type: { - name: "String", - }, - }, - startTime: { - serializedName: "startTime", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - targetSubscriptionId: { - serializedName: "targetSubscriptionId", - readOnly: true, - type: { - name: "String", - }, - }, - resourceType: { - serializedName: "resourceType", - readOnly: true, - type: { - name: "String", - }, - }, - targetHostName: { - serializedName: "targetHostName", - readOnly: true, - type: { - name: "String", - }, - }, - targetResourceGroup: { - serializedName: "targetResourceGroup", - readOnly: true, - type: { - name: "String", - }, - }, - userName: { - serializedName: "userName", - readOnly: true, - type: { - name: "String", - }, - }, - targetIpAddress: { - serializedName: "targetIpAddress", - readOnly: true, - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - readOnly: true, - type: { - name: "String", - }, - }, - targetResourceId: { - serializedName: "targetResourceId", - readOnly: true, - type: { - name: "String", - }, - }, - sessionDurationInMins: { - serializedName: "sessionDurationInMins", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const SessionIds: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SessionIds", - modelProperties: { - sessionIds: { - serializedName: "sessionIds", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const BastionSessionDeleteResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionSessionDeleteResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BastionSessionState", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BastionSessionState: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionSessionState", - modelProperties: { - sessionId: { - serializedName: "sessionId", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - state: { - serializedName: "state", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DnsNameAvailabilityResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DnsNameAvailabilityResult", - modelProperties: { - available: { - serializedName: "available", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const NetworkInterfaceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterface", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PublicIPAddressListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PublicIPAddressListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PublicIPAddress", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SwapResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SwapResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "SwapResourceProperties", - }, - }, - }, - }, -}; - -export const SwapResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SwapResourceProperties", - modelProperties: { - slotType: { - serializedName: "slotType", - type: { - name: "Enum", - allowedValues: ["Production", "Staging"], - }, - }, - }, - }, -}; - -export const SwapResourceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SwapResourceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SwapResource", - }, - }, - }, - }, - }, - }, -}; - -export const CustomIpPrefixListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CustomIpPrefixListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CustomIpPrefix", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TrafficDetectionRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrafficDetectionRule", - modelProperties: { - trafficType: { - serializedName: "trafficType", - type: { - name: "String", - }, - }, - packetsPerSecond: { - serializedName: "packetsPerSecond", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const DdosProtectionPlan: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DdosProtectionPlan", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - publicIPAddresses: { - serializedName: "properties.publicIPAddresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - virtualNetworks: { - serializedName: "properties.virtualNetworks", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - }, - }, -}; - -export const DdosProtectionPlanListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DdosProtectionPlanListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DdosProtectionPlan", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const QosIpRange: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QosIpRange", - modelProperties: { - startIP: { - serializedName: "startIP", - type: { - name: "String", - }, - }, - endIP: { - serializedName: "endIP", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const QosPortRange: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QosPortRange", - modelProperties: { - start: { - serializedName: "start", - type: { - name: "Number", - }, - }, - end: { - serializedName: "end", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const QosDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QosDefinition", - modelProperties: { - markings: { - serializedName: "markings", - type: { - name: "Sequence", - element: { - type: { - name: "Number", - }, - }, - }, - }, - sourceIpRanges: { - serializedName: "sourceIpRanges", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QosIpRange", - }, - }, - }, - }, - destinationIpRanges: { - serializedName: "destinationIpRanges", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QosIpRange", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "sourcePortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QosPortRange", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "destinationPortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QosPortRange", - }, - }, - }, - }, - protocol: { - serializedName: "protocol", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DscpConfigurationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DscpConfigurationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DscpConfiguration", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EndpointServicesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EndpointServicesListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EndpointServiceResult", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AuthorizationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitAuthorization", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitPeeringConfig: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitPeeringConfig", - modelProperties: { - advertisedPublicPrefixes: { - serializedName: "advertisedPublicPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - advertisedCommunities: { - serializedName: "advertisedCommunities", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - advertisedPublicPrefixesState: { - serializedName: "advertisedPublicPrefixesState", - readOnly: true, - type: { - name: "String", - }, - }, - legacyMode: { - serializedName: "legacyMode", - type: { - name: "Number", - }, - }, - customerASN: { - serializedName: "customerASN", - type: { - name: "Number", - }, - }, - routingRegistryName: { - serializedName: "routingRegistryName", - type: { - name: "String", - }, - }, - advertisedPublicPrefixInfo: { - serializedName: "advertisedPublicPrefixInfo", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdvertisedPublicPrefixProperties", - }, - }, - }, - }, - }, - }, -}; - -export const AdvertisedPublicPrefixProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdvertisedPublicPrefixProperties", - modelProperties: { - prefix: { - serializedName: "prefix", - type: { - name: "String", - }, - }, - validationId: { - serializedName: "validationId", - type: { - name: "String", - }, - }, - signature: { - serializedName: "signature", - type: { - name: "String", - }, - }, - validationState: { - serializedName: "validationState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitStats: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitStats", - modelProperties: { - primarybytesIn: { - serializedName: "primarybytesIn", - type: { - name: "Number", - }, - }, - primarybytesOut: { - serializedName: "primarybytesOut", - type: { - name: "Number", - }, - }, - secondarybytesIn: { - serializedName: "secondarybytesIn", - type: { - name: "Number", - }, - }, - secondarybytesOut: { - serializedName: "secondarybytesOut", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const Ipv6ExpressRouteCircuitPeeringConfig: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Ipv6ExpressRouteCircuitPeeringConfig", - modelProperties: { - primaryPeerAddressPrefix: { - serializedName: "primaryPeerAddressPrefix", - type: { - name: "String", - }, - }, - secondaryPeerAddressPrefix: { - serializedName: "secondaryPeerAddressPrefix", - type: { - name: "String", - }, - }, - microsoftPeeringConfig: { - serializedName: "microsoftPeeringConfig", - type: { - name: "Composite", - className: "ExpressRouteCircuitPeeringConfig", - }, - }, - routeFilter: { - serializedName: "routeFilter", - type: { - name: "Composite", - className: "SubResource", - }, - }, - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteConnectionId: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteConnectionId", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Ipv6CircuitConnectionConfig: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Ipv6CircuitConnectionConfig", - modelProperties: { - addressPrefix: { - serializedName: "addressPrefix", - type: { - name: "String", - }, - }, - circuitConnectionStatus: { - serializedName: "circuitConnectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitPeeringListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitPeeringListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitPeering", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PeerExpressRouteCircuitConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PeerExpressRouteCircuitConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PeerExpressRouteCircuitConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitSku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - type: { - name: "String", - }, - }, - family: { - serializedName: "family", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitServiceProviderProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitServiceProviderProperties", - modelProperties: { - serviceProviderName: { - serializedName: "serviceProviderName", - type: { - name: "String", - }, - }, - peeringLocation: { - serializedName: "peeringLocation", - type: { - name: "String", - }, - }, - bandwidthInMbps: { - serializedName: "bandwidthInMbps", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitsArpTableListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitsArpTableListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitArpTable", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitArpTable: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitArpTable", - modelProperties: { - age: { - serializedName: "age", - type: { - name: "Number", - }, - }, - interface: { - serializedName: "interface", - type: { - name: "String", - }, - }, - ipAddress: { - serializedName: "ipAddress", - type: { - name: "String", - }, - }, - macAddress: { - serializedName: "macAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitsRoutesTableListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitsRoutesTableListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitRoutesTable", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitRoutesTable: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitRoutesTable", - modelProperties: { - network: { - serializedName: "network", - type: { - name: "String", - }, - }, - nextHop: { - serializedName: "nextHop", - type: { - name: "String", - }, - }, - locPrf: { - serializedName: "locPrf", - type: { - name: "String", - }, - }, - weight: { - serializedName: "weight", - type: { - name: "Number", - }, - }, - path: { - serializedName: "path", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitsRoutesTableSummaryListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitsRoutesTableSummaryListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitRoutesTableSummary", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitRoutesTableSummary: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitRoutesTableSummary", - modelProperties: { - neighbor: { - serializedName: "neighbor", - type: { - name: "String", - }, - }, - v: { - serializedName: "v", - type: { - name: "Number", - }, - }, - as: { - serializedName: "as", - type: { - name: "Number", - }, - }, - upDown: { - serializedName: "upDown", - type: { - name: "String", - }, - }, - statePfxRcd: { - serializedName: "statePfxRcd", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuit", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteServiceProviderListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteServiceProviderListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteServiceProvider", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteServiceProviderBandwidthsOffered: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteServiceProviderBandwidthsOffered", - modelProperties: { - offerName: { - serializedName: "offerName", - type: { - name: "String", - }, - }, - valueInMbps: { - serializedName: "valueInMbps", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ExpressRouteCrossConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCrossConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCrossConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitReference: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitReference", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCrossConnectionPeeringList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCrossConnectionPeeringList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCrossConnectionPeering", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCrossConnectionsRoutesTableSummaryListResult: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ExpressRouteCrossConnectionsRoutesTableSummaryListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCrossConnectionRoutesTableSummary", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ExpressRouteCrossConnectionRoutesTableSummary: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCrossConnectionRoutesTableSummary", - modelProperties: { - neighbor: { - serializedName: "neighbor", - type: { - name: "String", - }, - }, - asn: { - serializedName: "asn", - type: { - name: "Number", - }, - }, - upDown: { - serializedName: "upDown", - type: { - name: "String", - }, - }, - stateOrPrefixesReceived: { - serializedName: "stateOrPrefixesReceived", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRoutePortsLocationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRoutePortsLocationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRoutePortsLocation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRoutePortsLocationBandwidths: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRoutePortsLocationBandwidths", - modelProperties: { - offerName: { - serializedName: "offerName", - readOnly: true, - type: { - name: "String", - }, - }, - valueInGbps: { - serializedName: "valueInGbps", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ExpressRouteLinkMacSecConfig: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteLinkMacSecConfig", - modelProperties: { - cknSecretIdentifier: { - serializedName: "cknSecretIdentifier", - type: { - name: "String", - }, - }, - cakSecretIdentifier: { - serializedName: "cakSecretIdentifier", - type: { - name: "String", - }, - }, - cipher: { - serializedName: "cipher", - type: { - name: "String", - }, - }, - sciState: { - serializedName: "sciState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRoutePortListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRoutePortListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRoutePort", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteLinkListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteLinkListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteLink", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GenerateExpressRoutePortsLOARequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GenerateExpressRoutePortsLOARequest", - modelProperties: { - customerName: { - serializedName: "customerName", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GenerateExpressRoutePortsLOAResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GenerateExpressRoutePortsLOAResult", - modelProperties: { - encodedContent: { - serializedName: "encodedContent", - type: { - name: "String", - }, - }, - }, - }, -}; - -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 ExpressRouteProviderPortListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteProviderPortListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteProviderPort", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicyThreatIntelWhitelist: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyThreatIntelWhitelist", - modelProperties: { - ipAddresses: { - serializedName: "ipAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - fqdns: { - serializedName: "fqdns", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const FirewallPolicyInsights: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyInsights", - modelProperties: { - isEnabled: { - serializedName: "isEnabled", - type: { - name: "Boolean", - }, - }, - retentionDays: { - serializedName: "retentionDays", - type: { - name: "Number", - }, - }, - logAnalyticsResources: { - serializedName: "logAnalyticsResources", - type: { - name: "Composite", - className: "FirewallPolicyLogAnalyticsResources", - }, - }, - }, - }, -}; - -export const FirewallPolicyLogAnalyticsResources: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyLogAnalyticsResources", - modelProperties: { - workspaces: { - serializedName: "workspaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FirewallPolicyLogAnalyticsWorkspace", - }, - }, - }, - }, - defaultWorkspaceId: { - serializedName: "defaultWorkspaceId", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const FirewallPolicyLogAnalyticsWorkspace: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyLogAnalyticsWorkspace", - modelProperties: { - region: { - serializedName: "region", - type: { - name: "String", - }, - }, - workspaceId: { - serializedName: "workspaceId", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const FirewallPolicySnat: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicySnat", - modelProperties: { - privateRanges: { - serializedName: "privateRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - autoLearnPrivateRanges: { - serializedName: "autoLearnPrivateRanges", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicySQL: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicySQL", - modelProperties: { - allowSqlRedirect: { - serializedName: "allowSqlRedirect", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const DnsSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DnsSettings", - modelProperties: { - servers: { - serializedName: "servers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - enableProxy: { - serializedName: "enableProxy", - type: { - name: "Boolean", - }, - }, - requireProxyForNetworkRules: { - serializedName: "requireProxyForNetworkRules", - nullable: true, - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ExplicitProxy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExplicitProxy", - modelProperties: { - enableExplicitProxy: { - serializedName: "enableExplicitProxy", - nullable: true, - type: { - name: "Boolean", - }, - }, - httpPort: { - constraints: { - InclusiveMaximum: 64000, - InclusiveMinimum: 0, - }, - serializedName: "httpPort", - type: { - name: "Number", - }, - }, - httpsPort: { - constraints: { - InclusiveMaximum: 64000, - InclusiveMinimum: 0, - }, - serializedName: "httpsPort", - type: { - name: "Number", - }, - }, - enablePacFile: { - serializedName: "enablePacFile", - nullable: true, - type: { - name: "Boolean", - }, - }, - pacFilePort: { - constraints: { - InclusiveMaximum: 64000, - InclusiveMinimum: 0, - }, - serializedName: "pacFilePort", - type: { - name: "Number", - }, - }, - pacFile: { - serializedName: "pacFile", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicyIntrusionDetection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyIntrusionDetection", - modelProperties: { - mode: { - serializedName: "mode", - type: { - name: "String", - }, - }, - profile: { - serializedName: "profile", - type: { - name: "String", - }, - }, - configuration: { - serializedName: "configuration", - type: { - name: "Composite", - className: "FirewallPolicyIntrusionDetectionConfiguration", - }, - }, - }, - }, -}; - -export const FirewallPolicyIntrusionDetectionConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyIntrusionDetectionConfiguration", - modelProperties: { - signatureOverrides: { - serializedName: "signatureOverrides", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FirewallPolicyIntrusionDetectionSignatureSpecification", - }, - }, - }, - }, - bypassTrafficSettings: { - serializedName: "bypassTrafficSettings", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FirewallPolicyIntrusionDetectionBypassTrafficSpecifications", - }, - }, - }, - }, - privateRanges: { - serializedName: "privateRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const FirewallPolicyIntrusionDetectionSignatureSpecification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyIntrusionDetectionSignatureSpecification", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - mode: { - serializedName: "mode", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicyIntrusionDetectionBypassTrafficSpecifications: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "FirewallPolicyIntrusionDetectionBypassTrafficSpecifications", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - type: { - name: "String", - }, - }, - sourceAddresses: { - serializedName: "sourceAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationAddresses: { - serializedName: "destinationAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPorts: { - serializedName: "destinationPorts", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceIpGroups: { - serializedName: "sourceIpGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationIpGroups: { - serializedName: "destinationIpGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, - }; - -export const FirewallPolicyTransportSecurity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyTransportSecurity", - modelProperties: { - certificateAuthority: { - serializedName: "certificateAuthority", - type: { - name: "Composite", - className: "FirewallPolicyCertificateAuthority", - }, - }, - }, - }, -}; - -export const FirewallPolicyCertificateAuthority: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyCertificateAuthority", - modelProperties: { - keyVaultSecretId: { - serializedName: "keyVaultSecretId", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicySku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicySku", - modelProperties: { - tier: { - serializedName: "tier", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicyListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FirewallPolicy", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicyRuleCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyRuleCollection", - uberParent: "FirewallPolicyRuleCollection", - polymorphicDiscriminator: { - serializedName: "ruleCollectionType", - clientName: "ruleCollectionType", - }, - modelProperties: { - ruleCollectionType: { - serializedName: "ruleCollectionType", - required: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 65000, - InclusiveMinimum: 100, - }, - serializedName: "priority", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const FirewallPolicyRuleCollectionGroupListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyRuleCollectionGroupListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FirewallPolicyRuleCollectionGroup", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdpsQueryObject: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IdpsQueryObject", - modelProperties: { - filters: { - serializedName: "filters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FilterItems", - }, - }, - }, - }, - search: { - serializedName: "search", - type: { - name: "String", - }, - }, - orderBy: { - serializedName: "orderBy", - type: { - name: "Composite", - className: "OrderBy", - }, - }, - resultsPerPage: { - constraints: { - InclusiveMaximum: 1000, - InclusiveMinimum: 1, - }, - serializedName: "resultsPerPage", - type: { - name: "Number", - }, - }, - skip: { - serializedName: "skip", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const FilterItems: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FilterItems", - modelProperties: { - field: { - serializedName: "field", - type: { - name: "String", - }, - }, - values: { - serializedName: "values", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const OrderBy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OrderBy", - modelProperties: { - field: { - serializedName: "field", - type: { - name: "String", - }, - }, - order: { - serializedName: "order", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const QueryResults: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QueryResults", - modelProperties: { - matchingRecordsCount: { - serializedName: "matchingRecordsCount", - type: { - name: "Number", - }, - }, - signatures: { - serializedName: "signatures", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SingleQueryResult", - }, - }, - }, - }, - }, - }, -}; - -export const SingleQueryResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SingleQueryResult", - modelProperties: { - signatureId: { - serializedName: "signatureId", - type: { - name: "Number", - }, - }, - mode: { - serializedName: "mode", - type: { - name: "Enum", - allowedValues: [0, 1, 2], - }, - }, - severity: { - serializedName: "severity", - type: { - name: "Enum", - allowedValues: [1, 2, 3], - }, - }, - direction: { - serializedName: "direction", - type: { - name: "Enum", - allowedValues: [0, 1, 2, 3, 4, 5], - }, - }, - group: { - serializedName: "group", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - type: { - name: "String", - }, - }, - sourcePorts: { - serializedName: "sourcePorts", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPorts: { - serializedName: "destinationPorts", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - lastUpdated: { - serializedName: "lastUpdated", - type: { - name: "String", - }, - }, - inheritedFromParentPolicy: { - serializedName: "inheritedFromParentPolicy", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const SignaturesOverrides: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SignaturesOverrides", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "SignaturesOverridesProperties", - }, - }, - }, - }, -}; - -export const SignaturesOverridesProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SignaturesOverridesProperties", - modelProperties: { - signatures: { - serializedName: "signatures", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const SignatureOverridesFilterValuesQuery: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SignatureOverridesFilterValuesQuery", - modelProperties: { - filterName: { - serializedName: "filterName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SignatureOverridesFilterValuesResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SignatureOverridesFilterValuesResponse", - modelProperties: { - filterValues: { - serializedName: "filterValues", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const SignaturesOverridesList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SignaturesOverridesList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SignaturesOverrides", - }, - }, - }, - }, - }, - }, -}; - -export const IpamPoolList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpamPoolList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpamPool", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IpamPoolProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpamPoolProperties", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - displayName: { - serializedName: "displayName", - type: { - name: "String", - }, - }, - ipAddressType: { - serializedName: "ipAddressType", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - parentPoolName: { - serializedName: "parentPoolName", - type: { - name: "String", - }, - }, - addressPrefixes: { - serializedName: "addressPrefixes", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CommonResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CommonResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - }, - }, -}; - -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String", - }, - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String", - }, - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime", - }, - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String", - }, - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String", - }, - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const CommonErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CommonErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "CommonErrorDetail", - }, - }, - }, - }, -}; - -export const CommonErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CommonErrorDetail", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CommonErrorDetail", - }, - }, - }, - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CommonErrorAdditionalInfo", - }, - }, - }, - }, - }, - }, -}; - -export const CommonErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CommonErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const IpamPoolUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpamPoolUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "IpamPoolUpdateProperties", - }, - }, - }, - }, -}; - -export const IpamPoolUpdateProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpamPoolUpdateProperties", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - displayName: { - serializedName: "displayName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PoolUsage: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PoolUsage", - modelProperties: { - addressPrefixes: { - serializedName: "addressPrefixes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - childPools: { - serializedName: "childPools", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceBasics", - }, - }, - }, - }, - allocatedAddressPrefixes: { - serializedName: "allocatedAddressPrefixes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - reservedAddressPrefixes: { - serializedName: "reservedAddressPrefixes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - availableAddressPrefixes: { - serializedName: "availableAddressPrefixes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - totalNumberOfIPAddresses: { - serializedName: "totalNumberOfIPAddresses", - readOnly: true, - type: { - name: "String", - }, - }, - numberOfAllocatedIPAddresses: { - serializedName: "numberOfAllocatedIPAddresses", - readOnly: true, - type: { - name: "String", - }, - }, - numberOfReservedIPAddresses: { - serializedName: "numberOfReservedIPAddresses", - readOnly: true, - type: { - name: "String", - }, - }, - numberOfAvailableIPAddresses: { - serializedName: "numberOfAvailableIPAddresses", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResourceBasics: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceBasics", - modelProperties: { - resourceId: { - serializedName: "resourceId", - type: { - name: "String", - }, - }, - addressPrefixes: { - serializedName: "addressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const PoolAssociationList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PoolAssociationList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PoolAssociation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PoolAssociation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PoolAssociation", - modelProperties: { - resourceId: { - serializedName: "resourceId", - required: true, - type: { - name: "String", - }, - }, - poolId: { - serializedName: "poolId", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - addressPrefixes: { - serializedName: "addressPrefixes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - reservedPrefixes: { - serializedName: "reservedPrefixes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - totalNumberOfIPAddresses: { - serializedName: "totalNumberOfIPAddresses", - readOnly: true, - type: { - name: "String", - }, - }, - numberOfReservedIPAddresses: { - serializedName: "numberOfReservedIPAddresses", - readOnly: true, - type: { - name: "String", - }, - }, - createdAt: { - serializedName: "createdAt", - readOnly: true, - type: { - name: "DateTime", - }, - }, - reservationExpiresAt: { - serializedName: "reservationExpiresAt", - readOnly: true, - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const StaticCidrList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StaticCidrList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StaticCidr", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StaticCidrProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StaticCidrProperties", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - numberOfIPAddressesToAllocate: { - serializedName: "numberOfIPAddressesToAllocate", - type: { - name: "String", - }, - }, - addressPrefixes: { - serializedName: "addressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - totalNumberOfIPAddresses: { - serializedName: "totalNumberOfIPAddresses", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IpAllocationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpAllocationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpAllocation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IpGroupListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpGroupListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpGroup", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancerSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerSku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancerListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoadBalancer", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancerBackendAddressPoolListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerBackendAddressPoolListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BackendAddressPool", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancerFrontendIPConfigurationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerFrontendIPConfigurationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FrontendIPConfiguration", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const InboundNatRuleListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InboundNatRuleListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InboundNatRule", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancerLoadBalancingRuleListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerLoadBalancingRuleListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoadBalancingRule", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancerOutboundRuleListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerOutboundRuleListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OutboundRule", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancerProbeListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerProbeListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Probe", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancerVipSwapRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerVipSwapRequest", - modelProperties: { - frontendIPConfigurations: { - serializedName: "frontendIPConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoadBalancerVipSwapRequestFrontendIPConfiguration", - }, - }, - }, - }, - }, - }, -}; - -export const LoadBalancerVipSwapRequestFrontendIPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerVipSwapRequestFrontendIPConfiguration", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - publicIPAddress: { - serializedName: "properties.publicIPAddress", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const QueryInboundNatRulePortMappingRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QueryInboundNatRulePortMappingRequest", - modelProperties: { - ipConfiguration: { - serializedName: "ipConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - ipAddress: { - serializedName: "ipAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendAddressInboundNatRulePortMappings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BackendAddressInboundNatRulePortMappings", - modelProperties: { - inboundNatRulePortMappings: { - serializedName: "inboundNatRulePortMappings", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InboundNatRulePortMapping", - }, - }, - }, - }, - }, - }, -}; - -export const InboundNatRulePortMapping: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InboundNatRulePortMapping", - modelProperties: { - inboundNatRuleName: { - serializedName: "inboundNatRuleName", - readOnly: true, - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - readOnly: true, - type: { - name: "String", - }, - }, - frontendPort: { - serializedName: "frontendPort", - readOnly: true, - type: { - name: "Number", - }, - }, - backendPort: { - serializedName: "backendPort", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const LoadBalancerHealthPerRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerHealthPerRule", - modelProperties: { - up: { - serializedName: "up", - type: { - name: "Number", - }, - }, - down: { - serializedName: "down", - type: { - name: "Number", - }, - }, - loadBalancerBackendAddresses: { - serializedName: "loadBalancerBackendAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoadBalancerHealthPerRulePerBackendAddress", - }, - }, - }, - }, - }, - }, -}; - -export const LoadBalancerHealthPerRulePerBackendAddress: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerHealthPerRulePerBackendAddress", - modelProperties: { - ipAddress: { - serializedName: "ipAddress", - type: { - name: "String", - }, - }, - networkInterfaceIPConfigurationId: { - serializedName: "networkInterfaceIPConfigurationId", - type: { - name: "String", - }, - }, - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - reason: { - serializedName: "reason", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const MigrateLoadBalancerToIpBasedRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MigrateLoadBalancerToIpBasedRequest", - modelProperties: { - pools: { - serializedName: "pools", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const MigratedPools: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MigratedPools", - modelProperties: { - migratedPools: { - serializedName: "migratedPools", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const NatGatewayListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NatGatewayListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NatGateway", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EffectiveRouteListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EffectiveRouteListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EffectiveRoute", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EffectiveRoute: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EffectiveRoute", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - disableBgpRoutePropagation: { - serializedName: "disableBgpRoutePropagation", - type: { - name: "Boolean", - }, - }, - source: { - serializedName: "source", - type: { - name: "String", - }, - }, - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - addressPrefix: { - serializedName: "addressPrefix", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - nextHopIpAddress: { - serializedName: "nextHopIpAddress", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - nextHopType: { - serializedName: "nextHopType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EffectiveNetworkSecurityGroupListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EffectiveNetworkSecurityGroupListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EffectiveNetworkSecurityGroup", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EffectiveNetworkSecurityGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EffectiveNetworkSecurityGroup", - modelProperties: { - networkSecurityGroup: { - serializedName: "networkSecurityGroup", - type: { - name: "Composite", - className: "SubResource", - }, - }, - association: { - serializedName: "association", - type: { - name: "Composite", - className: "EffectiveNetworkSecurityGroupAssociation", - }, - }, - effectiveSecurityRules: { - serializedName: "effectiveSecurityRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EffectiveNetworkSecurityRule", - }, - }, - }, - }, - tagMap: { - serializedName: "tagMap", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EffectiveNetworkSecurityGroupAssociation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EffectiveNetworkSecurityGroupAssociation", - modelProperties: { - networkManager: { - serializedName: "networkManager", - type: { - name: "Composite", - className: "SubResource", - }, - }, - subnet: { - serializedName: "subnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - networkInterface: { - serializedName: "networkInterface", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const EffectiveNetworkSecurityRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EffectiveNetworkSecurityRule", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - type: { - name: "String", - }, - }, - sourcePortRange: { - serializedName: "sourcePortRange", - type: { - name: "String", - }, - }, - destinationPortRange: { - serializedName: "destinationPortRange", - type: { - name: "String", - }, - }, - sourcePortRanges: { - serializedName: "sourcePortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "destinationPortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceAddressPrefix: { - serializedName: "sourceAddressPrefix", - type: { - name: "String", - }, - }, - destinationAddressPrefix: { - serializedName: "destinationAddressPrefix", - type: { - name: "String", - }, - }, - sourceAddressPrefixes: { - serializedName: "sourceAddressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationAddressPrefixes: { - serializedName: "destinationAddressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - expandedSourceAddressPrefix: { - serializedName: "expandedSourceAddressPrefix", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - expandedDestinationAddressPrefix: { - serializedName: "expandedDestinationAddressPrefix", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - access: { - serializedName: "access", - type: { - name: "String", - }, - }, - priority: { - serializedName: "priority", - type: { - name: "Number", - }, - }, - direction: { - serializedName: "direction", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkInterfaceIPConfigurationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceIPConfigurationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfaceIPConfiguration", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkInterfaceLoadBalancerListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceLoadBalancerListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoadBalancer", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkInterfaceTapConfigurationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceTapConfigurationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfaceTapConfiguration", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerPropertiesNetworkManagerScopes: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerPropertiesNetworkManagerScopes", - modelProperties: { - managementGroups: { - serializedName: "managementGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - subscriptions: { - serializedName: "subscriptions", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - crossTenantScopes: { - serializedName: "crossTenantScopes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CrossTenantScopes", - }, - }, - }, - }, - }, - }, -}; - -export const CrossTenantScopes: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CrossTenantScopes", - modelProperties: { - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String", - }, - }, - managementGroups: { - serializedName: "managementGroups", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - subscriptions: { - serializedName: "subscriptions", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const PatchObject: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PatchObject", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const NetworkManagerCommit: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerCommit", - modelProperties: { - commitId: { - serializedName: "commitId", - readOnly: true, - type: { - name: "String", - }, - }, - targetLocations: { - serializedName: "targetLocations", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - configurationIds: { - serializedName: "configurationIds", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - commitType: { - serializedName: "commitType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerDeploymentStatusParameter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerDeploymentStatusParameter", - modelProperties: { - regions: { - serializedName: "regions", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - deploymentTypes: { - serializedName: "deploymentTypes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - skipToken: { - serializedName: "skipToken", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerDeploymentStatusListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerDeploymentStatusListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkManagerDeploymentStatus", - }, - }, - }, - }, - skipToken: { - serializedName: "skipToken", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerDeploymentStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerDeploymentStatus", - modelProperties: { - commitTime: { - serializedName: "commitTime", - type: { - name: "DateTime", - }, - }, - region: { - serializedName: "region", - type: { - name: "String", - }, - }, - deploymentStatus: { - serializedName: "deploymentStatus", - type: { - name: "String", - }, - }, - configurationIds: { - serializedName: "configurationIds", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - deploymentType: { - serializedName: "deploymentType", - type: { - name: "String", - }, - }, - errorMessage: { - serializedName: "errorMessage", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkManager", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ActiveConfigurationParameter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActiveConfigurationParameter", - modelProperties: { - regions: { - serializedName: "regions", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - skipToken: { - serializedName: "skipToken", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ActiveConnectivityConfigurationsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActiveConnectivityConfigurationsListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActiveConnectivityConfiguration", - }, - }, - }, - }, - skipToken: { - serializedName: "skipToken", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EffectiveConnectivityConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EffectiveConnectivityConfiguration", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - configurationGroups: { - serializedName: "configurationGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConfigurationGroup", - }, - }, - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - connectivityTopology: { - serializedName: "properties.connectivityTopology", - type: { - name: "String", - }, - }, - hubs: { - serializedName: "properties.hubs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Hub", - }, - }, - }, - }, - isGlobal: { - serializedName: "properties.isGlobal", - type: { - name: "String", - }, - }, - connectivityCapabilities: { - serializedName: "properties.connectivityCapabilities", - type: { - name: "Composite", - className: "ConnectivityConfigurationPropertiesConnectivityCapabilities", - }, - }, - appliesToGroups: { - serializedName: "properties.appliesToGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityGroupItem", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - deleteExistingPeering: { - serializedName: "properties.deleteExistingPeering", - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Hub: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Hub", - modelProperties: { - resourceId: { - serializedName: "resourceId", - type: { - name: "String", - }, - }, - resourceType: { - serializedName: "resourceType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectivityConfigurationPropertiesConnectivityCapabilities: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ConnectivityConfigurationPropertiesConnectivityCapabilities", - modelProperties: { - connectedGroupPrivateEndpointsScale: { - defaultValue: "Standard", - serializedName: "connectedGroupPrivateEndpointsScale", - required: true, - type: { - name: "String", - }, - }, - connectedGroupAddressOverlap: { - defaultValue: "Allowed", - serializedName: "connectedGroupAddressOverlap", - required: true, - type: { - name: "String", - }, - }, - peeringEnforcement: { - defaultValue: "Unenforced", - serializedName: "peeringEnforcement", - required: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ConnectivityGroupItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectivityGroupItem", - modelProperties: { - networkGroupId: { - serializedName: "networkGroupId", - required: true, - type: { - name: "String", - }, - }, - useHubGateway: { - serializedName: "useHubGateway", - type: { - name: "String", - }, - }, - isGlobal: { - serializedName: "isGlobal", - type: { - name: "String", - }, - }, - groupConnectivity: { - serializedName: "groupConnectivity", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConfigurationGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConfigurationGroup", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - memberType: { - serializedName: "properties.memberType", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ActiveSecurityAdminRulesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActiveSecurityAdminRulesListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActiveBaseSecurityAdminRule", - }, - }, - }, - }, - skipToken: { - serializedName: "skipToken", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ActiveBaseSecurityAdminRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActiveBaseSecurityAdminRule", - uberParent: "ActiveBaseSecurityAdminRule", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind", - }, - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - commitTime: { - serializedName: "commitTime", - type: { - name: "DateTime", - }, - }, - region: { - serializedName: "region", - type: { - name: "String", - }, - }, - configurationDescription: { - serializedName: "configurationDescription", - type: { - name: "String", - }, - }, - ruleCollectionDescription: { - serializedName: "ruleCollectionDescription", - type: { - name: "String", - }, - }, - ruleCollectionAppliesToGroups: { - serializedName: "ruleCollectionAppliesToGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkManagerSecurityGroupItem", - }, - }, - }, - }, - ruleGroups: { - serializedName: "ruleGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConfigurationGroup", - }, - }, - }, - }, - kind: { - serializedName: "kind", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerSecurityGroupItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerSecurityGroupItem", - modelProperties: { - networkGroupId: { - serializedName: "networkGroupId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ChildResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ChildResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkManagerConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectivityConfigurationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectivityConfigurationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityConfiguration", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const QueryRequestOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QueryRequestOptions", - modelProperties: { - skipToken: { - serializedName: "skipToken", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerEffectiveConnectivityConfigurationListResult: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "NetworkManagerEffectiveConnectivityConfigurationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EffectiveConnectivityConfiguration", - }, - }, - }, - }, - skipToken: { - serializedName: "skipToken", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const NetworkManagerEffectiveSecurityAdminRulesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerEffectiveSecurityAdminRulesListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EffectiveBaseSecurityAdminRule", - }, - }, - }, - }, - skipToken: { - serializedName: "skipToken", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EffectiveBaseSecurityAdminRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EffectiveBaseSecurityAdminRule", - uberParent: "EffectiveBaseSecurityAdminRule", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind", - }, - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - configurationDescription: { - serializedName: "configurationDescription", - type: { - name: "String", - }, - }, - ruleCollectionDescription: { - serializedName: "ruleCollectionDescription", - type: { - name: "String", - }, - }, - ruleCollectionAppliesToGroups: { - serializedName: "ruleCollectionAppliesToGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkManagerSecurityGroupItem", - }, - }, - }, - }, - ruleGroups: { - serializedName: "ruleGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConfigurationGroup", - }, - }, - }, - }, - kind: { - serializedName: "kind", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkGroupListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkGroupListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkGroup", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StaticMemberListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StaticMemberListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StaticMember", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerRoutingConfigurationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerRoutingConfigurationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkManagerRoutingConfiguration", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingRuleCollectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRuleCollectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RoutingRuleCollection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerRoutingGroupItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerRoutingGroupItem", - modelProperties: { - networkGroupId: { - serializedName: "networkGroupId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingRuleListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRuleListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RoutingRule", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingRuleRouteDestination: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRuleRouteDestination", - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - destinationAddress: { - serializedName: "destinationAddress", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingRuleNextHop: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRuleNextHop", - modelProperties: { - nextHopType: { - serializedName: "nextHopType", - required: true, - type: { - name: "String", - }, - }, - nextHopAddress: { - serializedName: "nextHopAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ScopeConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScopeConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScopeConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityAdminConfigurationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityAdminConfigurationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityAdminConfiguration", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AdminRuleCollectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdminRuleCollectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdminRuleCollection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AdminRuleListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdminRuleListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BaseAdminRule", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityUserConfigurationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityUserConfigurationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityUserConfiguration", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityUserRuleCollectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityUserRuleCollectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityUserRuleCollection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityUserGroupItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityUserGroupItem", - modelProperties: { - networkGroupId: { - serializedName: "networkGroupId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityUserRuleListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityUserRuleListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityUserRule", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AddressPrefixItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AddressPrefixItem", - modelProperties: { - addressPrefix: { - serializedName: "addressPrefix", - type: { - name: "String", - }, - }, - addressPrefixType: { - serializedName: "addressPrefixType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ContainerNetworkInterfaceIpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ContainerNetworkInterfaceIpConfiguration", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkProfileListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkProfileListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkProfile", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkSecurityGroupListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkSecurityGroupListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkSecurityGroup", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityRuleListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityRuleListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityRule", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityPerimeterResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityPerimeterResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SecurityPerimeterSystemData", - }, - }, - }, - }, -}; - -export const SecurityPerimeterSystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityPerimeterSystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String", - }, - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String", - }, - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime", - }, - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String", - }, - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String", - }, - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const UpdateTagsRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UpdateTagsRequest", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const NetworkSecurityPerimeterListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkSecurityPerimeterListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkSecurityPerimeter", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NspProfileListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspProfileListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NspProfile", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SubscriptionId: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SubscriptionId", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PerimeterBasedAccessRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PerimeterBasedAccessRule", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - perimeterGuid: { - serializedName: "perimeterGuid", - readOnly: true, - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NspAccessRuleListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspAccessRuleListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NspAccessRule", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NspAssociationsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspAssociationsListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NspAssociation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PerimeterAssociableResourcesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PerimeterAssociableResourcesListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PerimeterAssociableResource", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PerimeterAssociableResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PerimeterAssociableResource", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - displayName: { - serializedName: "properties.displayName", - readOnly: true, - type: { - name: "String", - }, - }, - resourceType: { - serializedName: "properties.resourceType", - readOnly: true, - type: { - name: "String", - }, - }, - publicDnsZones: { - serializedName: "properties.publicDnsZones", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const NspLinkListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspLinkListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NspLink", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NspLinkReferenceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspLinkReferenceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NspLinkReference", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NspLoggingConfigurationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspLoggingConfigurationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NspLoggingConfiguration", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationStatusResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationStatusResult", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "resourceId", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - required: true, - type: { - name: "String", - }, - }, - percentComplete: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "percentComplete", - type: { - name: "Number", - }, - }, - startTime: { - serializedName: "startTime", - type: { - name: "DateTime", - }, - }, - endTime: { - serializedName: "endTime", - type: { - name: "DateTime", - }, - }, - operations: { - serializedName: "operations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationStatusResult", - }, - }, - }, - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, -}; - -export const ErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetail", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - }, - }, - }, - }, - }, - }, -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const NspServiceTagsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspServiceTagsListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NspServiceTagsResource", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NspServiceTagsResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspServiceTagsResource", - modelProperties: { - serviceTags: { - serializedName: "serviceTags", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ReachabilityAnalysisIntentListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReachabilityAnalysisIntentListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReachabilityAnalysisIntent", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ReachabilityAnalysisIntentProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReachabilityAnalysisIntentProperties", - modelProperties: { - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - sourceResourceId: { - serializedName: "sourceResourceId", - required: true, - type: { - name: "String", - }, - }, - destinationResourceId: { - serializedName: "destinationResourceId", - required: true, - type: { - name: "String", - }, - }, - ipTraffic: { - serializedName: "ipTraffic", - type: { - name: "Composite", - className: "IPTraffic", - }, - }, - }, - }, -}; - -export const IPTraffic: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IPTraffic", - modelProperties: { - sourceIps: { - serializedName: "sourceIps", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationIps: { - serializedName: "destinationIps", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourcePorts: { - serializedName: "sourcePorts", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPorts: { - serializedName: "destinationPorts", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - protocols: { - serializedName: "protocols", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ReachabilityAnalysisRunListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReachabilityAnalysisRunListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReachabilityAnalysisRun", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ReachabilityAnalysisRunProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReachabilityAnalysisRunProperties", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - intentId: { - serializedName: "intentId", - required: true, - type: { - name: "String", - }, - }, - intentContent: { - serializedName: "intentContent", - type: { - name: "Composite", - className: "IntentContent", - }, - }, - analysisResult: { - serializedName: "analysisResult", - readOnly: true, - type: { - name: "String", - }, - }, - errorMessage: { - serializedName: "errorMessage", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IntentContent: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IntentContent", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - sourceResourceId: { - serializedName: "sourceResourceId", - required: true, - type: { - name: "String", - }, - }, - destinationResourceId: { - serializedName: "destinationResourceId", - required: true, - type: { - name: "String", - }, - }, - ipTraffic: { - serializedName: "ipTraffic", - type: { - name: "Composite", - className: "IPTraffic", - }, - }, - }, - }, -}; - -export const VerifierWorkspaceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VerifierWorkspaceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VerifierWorkspace", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VerifierWorkspaceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VerifierWorkspaceProperties", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VerifierWorkspaceUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VerifierWorkspaceUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VerifierWorkspaceUpdateProperties", - }, - }, - }, - }, -}; - -export const VerifierWorkspaceUpdateProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VerifierWorkspaceUpdateProperties", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualApplianceSkuProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualApplianceSkuProperties", - modelProperties: { - vendor: { - serializedName: "vendor", - type: { - name: "String", - }, - }, - bundledScaleUnit: { - serializedName: "bundledScaleUnit", - type: { - name: "String", - }, - }, - marketPlaceVersion: { - serializedName: "marketPlaceVersion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualApplianceNicProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualApplianceNicProperties", - modelProperties: { - nicType: { - serializedName: "nicType", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - publicIpAddress: { - serializedName: "publicIpAddress", - readOnly: true, - type: { - name: "String", - }, - }, - privateIpAddress: { - serializedName: "privateIpAddress", - readOnly: true, - type: { - name: "String", - }, - }, - instanceName: { - serializedName: "instanceName", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualAppliancePropertiesFormatNetworkProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualAppliancePropertiesFormatNetworkProfile", - modelProperties: { - networkInterfaceConfigurations: { - serializedName: "networkInterfaceConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualApplianceNetworkInterfaceConfiguration", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualApplianceNetworkInterfaceConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualApplianceNetworkInterfaceConfiguration", - modelProperties: { - nicType: { - serializedName: "type", - type: { - name: "String", - }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VirtualApplianceNetworkInterfaceConfigurationProperties", - }, - }, - }, - }, -}; - -export const VirtualApplianceNetworkInterfaceConfigurationProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualApplianceNetworkInterfaceConfigurationProperties", - modelProperties: { - ipConfigurations: { - serializedName: "ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualApplianceIPConfiguration", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualApplianceIPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualApplianceIPConfiguration", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VirtualApplianceIPConfigurationProperties", - }, - }, - }, - }, -}; - -export const VirtualApplianceIPConfigurationProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualApplianceIPConfigurationProperties", - modelProperties: { - primary: { - serializedName: "primary", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const VirtualApplianceAdditionalNicProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualApplianceAdditionalNicProperties", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - hasPublicIp: { - serializedName: "hasPublicIp", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const InternetIngressPublicIpsProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InternetIngressPublicIpsProperties", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DelegationProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DelegationProperties", - modelProperties: { - serviceName: { - serializedName: "serviceName", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PartnerManagedResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PartnerManagedResourceProperties", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - internalLoadBalancerId: { - serializedName: "internalLoadBalancerId", - readOnly: true, - type: { - name: "String", - }, - }, - standardLoadBalancerId: { - serializedName: "standardLoadBalancerId", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NvaInterfaceConfigurationsProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NvaInterfaceConfigurationsProperties", - modelProperties: { - subnet: { - serializedName: "subnet", - type: { - name: "Composite", - className: "NvaInVnetSubnetReferenceProperties", - }, - }, - type: { - serializedName: "type", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - name: { - constraints: { - MaxLength: 70, - }, - serializedName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NvaInVnetSubnetReferenceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NvaInVnetSubnetReferenceProperties", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualApplianceInstanceIds: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualApplianceInstanceIds", - modelProperties: { - instanceIds: { - serializedName: "instanceIds", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const NetworkVirtualApplianceBootDiagnosticParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualApplianceBootDiagnosticParameters", - modelProperties: { - instanceId: { - serializedName: "instanceId", - type: { - name: "Number", - }, - }, - serialConsoleStorageSasUrl: { - serializedName: "serialConsoleStorageSasUrl", - type: { - name: "String", - }, - }, - consoleScreenshotStorageSasUrl: { - serializedName: "consoleScreenshotStorageSasUrl", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualApplianceInstanceId: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualApplianceInstanceId", - modelProperties: { - instanceId: { - serializedName: "instanceId", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const NetworkVirtualApplianceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualApplianceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkVirtualAppliance", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Office365PolicyProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Office365PolicyProperties", - modelProperties: { - breakOutCategories: { - serializedName: "breakOutCategories", - type: { - name: "Composite", - className: "BreakOutCategoryPolicies", - }, - }, - }, - }, -}; - -export const BreakOutCategoryPolicies: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BreakOutCategoryPolicies", - modelProperties: { - allow: { - serializedName: "allow", - type: { - name: "Boolean", - }, - }, - optimize: { - serializedName: "optimize", - type: { - name: "Boolean", - }, - }, - default: { - serializedName: "default", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const NetworkVirtualApplianceSiteListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualApplianceSiteListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualApplianceSite", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualApplianceSkuListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualApplianceSkuListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkVirtualApplianceSku", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualApplianceSkuInstances: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualApplianceSkuInstances", - modelProperties: { - scaleUnit: { - serializedName: "scaleUnit", - readOnly: true, - type: { - name: "String", - }, - }, - instanceCount: { - serializedName: "instanceCount", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const InboundSecurityRules: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InboundSecurityRules", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - type: { - name: "String", - }, - }, - sourceAddressPrefix: { - serializedName: "sourceAddressPrefix", - type: { - name: "String", - }, - }, - destinationPortRange: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 0, - }, - serializedName: "destinationPortRange", - type: { - name: "Number", - }, - }, - destinationPortRanges: { - serializedName: "destinationPortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - appliesOn: { - serializedName: "appliesOn", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetails", - }, - }, - }, - }, -}; - -export const NetworkWatcherListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkWatcherListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkWatcher", - }, - }, - }, - }, - }, - }, -}; - -export const TopologyParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TopologyParameters", - modelProperties: { - targetResourceGroupName: { - serializedName: "targetResourceGroupName", - type: { - name: "String", - }, - }, - targetVirtualNetwork: { - serializedName: "targetVirtualNetwork", - type: { - name: "Composite", - className: "SubResource", - }, - }, - targetSubnet: { - serializedName: "targetSubnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const Topology: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Topology", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - createdDateTime: { - serializedName: "createdDateTime", - readOnly: true, - type: { - name: "DateTime", - }, - }, - lastModified: { - serializedName: "lastModified", - readOnly: true, - type: { - name: "DateTime", - }, - }, - resources: { - serializedName: "resources", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TopologyResource", - }, - }, - }, - }, - }, - }, -}; - -export const TopologyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TopologyResource", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - associations: { - serializedName: "associations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TopologyAssociation", - }, - }, - }, - }, - }, - }, -}; - -export const TopologyAssociation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TopologyAssociation", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "resourceId", - type: { - name: "String", - }, - }, - associationType: { - serializedName: "associationType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VerificationIPFlowParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VerificationIPFlowParameters", - modelProperties: { - targetResourceId: { - serializedName: "targetResourceId", - required: true, - type: { - name: "String", - }, - }, - direction: { - serializedName: "direction", - required: true, - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - required: true, - type: { - name: "String", - }, - }, - localPort: { - serializedName: "localPort", - required: true, - type: { - name: "String", - }, - }, - remotePort: { - serializedName: "remotePort", - required: true, - type: { - name: "String", - }, - }, - localIPAddress: { - serializedName: "localIPAddress", - required: true, - type: { - name: "String", - }, - }, - remoteIPAddress: { - serializedName: "remoteIPAddress", - required: true, - type: { - name: "String", - }, - }, - targetNicResourceId: { - serializedName: "targetNicResourceId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VerificationIPFlowResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VerificationIPFlowResult", - modelProperties: { - access: { - serializedName: "access", - type: { - name: "String", - }, - }, - ruleName: { - serializedName: "ruleName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NextHopParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NextHopParameters", - modelProperties: { - targetResourceId: { - serializedName: "targetResourceId", - required: true, - type: { - name: "String", - }, - }, - sourceIPAddress: { - serializedName: "sourceIPAddress", - required: true, - type: { - name: "String", - }, - }, - destinationIPAddress: { - serializedName: "destinationIPAddress", - required: true, - type: { - name: "String", - }, - }, - targetNicResourceId: { - serializedName: "targetNicResourceId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NextHopResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NextHopResult", - modelProperties: { - nextHopType: { - serializedName: "nextHopType", - type: { - name: "String", - }, - }, - nextHopIpAddress: { - serializedName: "nextHopIpAddress", - type: { - name: "String", - }, - }, - routeTableId: { - serializedName: "routeTableId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityGroupViewParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityGroupViewParameters", - modelProperties: { - targetResourceId: { - serializedName: "targetResourceId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityGroupViewResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityGroupViewResult", - modelProperties: { - networkInterfaces: { - serializedName: "networkInterfaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityGroupNetworkInterface", - }, - }, - }, - }, - }, - }, -}; - -export const SecurityGroupNetworkInterface: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityGroupNetworkInterface", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - securityRuleAssociations: { - serializedName: "securityRuleAssociations", - type: { - name: "Composite", - className: "SecurityRuleAssociations", - }, - }, - }, - }, -}; - -export const SecurityRuleAssociations: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityRuleAssociations", - modelProperties: { - networkInterfaceAssociation: { - serializedName: "networkInterfaceAssociation", - type: { - name: "Composite", - className: "NetworkInterfaceAssociation", - }, - }, - subnetAssociation: { - serializedName: "subnetAssociation", - type: { - name: "Composite", - className: "SubnetAssociation", - }, - }, - defaultSecurityRules: { - serializedName: "defaultSecurityRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityRule", - }, - }, - }, - }, - effectiveSecurityRules: { - serializedName: "effectiveSecurityRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EffectiveNetworkSecurityRule", - }, - }, - }, - }, - }, - }, -}; - -export const NetworkInterfaceAssociation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceAssociation", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - securityRules: { - serializedName: "securityRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityRule", - }, - }, - }, - }, - }, - }, -}; - -export const SubnetAssociation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SubnetAssociation", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - securityRules: { - serializedName: "securityRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityRule", - }, - }, - }, - }, - }, - }, -}; - -export const PacketCapture: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCapture", - modelProperties: { - target: { - serializedName: "properties.target", - required: true, - type: { - name: "String", - }, - }, - scope: { - serializedName: "properties.scope", - type: { - name: "Composite", - className: "PacketCaptureMachineScope", - }, - }, - targetType: { - serializedName: "properties.targetType", - type: { - name: "Enum", - allowedValues: ["AzureVM", "AzureVMSS"], - }, - }, - bytesToCapturePerPacket: { - defaultValue: 0, - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.bytesToCapturePerPacket", - type: { - name: "Number", - }, - }, - totalBytesPerSession: { - defaultValue: 1073741824, - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.totalBytesPerSession", - type: { - name: "Number", - }, - }, - timeLimitInSeconds: { - defaultValue: 18000, - constraints: { - InclusiveMaximum: 18000, - InclusiveMinimum: 0, - }, - serializedName: "properties.timeLimitInSeconds", - type: { - name: "Number", - }, - }, - storageLocation: { - serializedName: "properties.storageLocation", - type: { - name: "Composite", - className: "PacketCaptureStorageLocation", - }, - }, - filters: { - serializedName: "properties.filters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PacketCaptureFilter", - }, - }, - }, - }, - continuousCapture: { - serializedName: "properties.continuousCapture", - type: { - name: "Boolean", - }, - }, - captureSettings: { - serializedName: "properties.captureSettings", - type: { - name: "Composite", - className: "PacketCaptureSettings", - }, - }, - }, - }, -}; - -export const PacketCaptureParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCaptureParameters", - modelProperties: { - target: { - serializedName: "target", - required: true, - type: { - name: "String", - }, - }, - scope: { - serializedName: "scope", - type: { - name: "Composite", - className: "PacketCaptureMachineScope", - }, - }, - targetType: { - serializedName: "targetType", - type: { - name: "Enum", - allowedValues: ["AzureVM", "AzureVMSS"], - }, - }, - bytesToCapturePerPacket: { - defaultValue: 0, - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "bytesToCapturePerPacket", - type: { - name: "Number", - }, - }, - totalBytesPerSession: { - defaultValue: 1073741824, - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "totalBytesPerSession", - type: { - name: "Number", - }, - }, - timeLimitInSeconds: { - defaultValue: 18000, - constraints: { - InclusiveMaximum: 18000, - InclusiveMinimum: 0, - }, - serializedName: "timeLimitInSeconds", - type: { - name: "Number", - }, - }, - storageLocation: { - serializedName: "storageLocation", - type: { - name: "Composite", - className: "PacketCaptureStorageLocation", - }, - }, - filters: { - serializedName: "filters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PacketCaptureFilter", - }, - }, - }, - }, - continuousCapture: { - serializedName: "continuousCapture", - type: { - name: "Boolean", - }, - }, - captureSettings: { - serializedName: "captureSettings", - type: { - name: "Composite", - className: "PacketCaptureSettings", - }, - }, - }, - }, -}; - -export const PacketCaptureMachineScope: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCaptureMachineScope", - modelProperties: { - include: { - serializedName: "include", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - exclude: { - serializedName: "exclude", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const PacketCaptureStorageLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCaptureStorageLocation", - modelProperties: { - storageId: { - serializedName: "storageId", - type: { - name: "String", - }, - }, - storagePath: { - serializedName: "storagePath", - type: { - name: "String", - }, - }, - filePath: { - serializedName: "filePath", - type: { - name: "String", - }, - }, - localPath: { - serializedName: "localPath", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PacketCaptureFilter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCaptureFilter", - modelProperties: { - protocol: { - defaultValue: "Any", - serializedName: "protocol", - type: { - name: "String", - }, - }, - localIPAddress: { - serializedName: "localIPAddress", - type: { - name: "String", - }, - }, - remoteIPAddress: { - serializedName: "remoteIPAddress", - type: { - name: "String", - }, - }, - localPort: { - serializedName: "localPort", - type: { - name: "String", - }, - }, - remotePort: { - serializedName: "remotePort", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PacketCaptureSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCaptureSettings", - modelProperties: { - fileCount: { - defaultValue: 10, - constraints: { - InclusiveMaximum: 10000, - InclusiveMinimum: 0, - }, - serializedName: "fileCount", - type: { - name: "Number", - }, - }, - fileSizeInBytes: { - defaultValue: 104857600, - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "fileSizeInBytes", - type: { - name: "Number", - }, - }, - sessionTimeLimitInSeconds: { - defaultValue: 86400, - constraints: { - InclusiveMaximum: 604800, - InclusiveMinimum: 0, - }, - serializedName: "sessionTimeLimitInSeconds", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PacketCaptureResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCaptureResult", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - target: { - serializedName: "properties.target", - type: { - name: "String", - }, - }, - scope: { - serializedName: "properties.scope", - type: { - name: "Composite", - className: "PacketCaptureMachineScope", - }, - }, - targetType: { - serializedName: "properties.targetType", - type: { - name: "Enum", - allowedValues: ["AzureVM", "AzureVMSS"], - }, - }, - bytesToCapturePerPacket: { - defaultValue: 0, - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.bytesToCapturePerPacket", - type: { - name: "Number", - }, - }, - totalBytesPerSession: { - defaultValue: 1073741824, - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.totalBytesPerSession", - type: { - name: "Number", - }, - }, - timeLimitInSeconds: { - defaultValue: 18000, - constraints: { - InclusiveMaximum: 18000, - InclusiveMinimum: 0, - }, - serializedName: "properties.timeLimitInSeconds", - type: { - name: "Number", - }, - }, - storageLocation: { - serializedName: "properties.storageLocation", - type: { - name: "Composite", - className: "PacketCaptureStorageLocation", - }, - }, - filters: { - serializedName: "properties.filters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PacketCaptureFilter", - }, - }, - }, - }, - continuousCapture: { - serializedName: "properties.continuousCapture", - type: { - name: "Boolean", - }, - }, - captureSettings: { - serializedName: "properties.captureSettings", - type: { - name: "Composite", - className: "PacketCaptureSettings", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PacketCaptureQueryStatusResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCaptureQueryStatusResult", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - captureStartTime: { - serializedName: "captureStartTime", - type: { - name: "DateTime", - }, - }, - packetCaptureStatus: { - serializedName: "packetCaptureStatus", - type: { - name: "String", - }, - }, - stopReason: { - serializedName: "stopReason", - type: { - name: "String", - }, - }, - packetCaptureError: { - serializedName: "packetCaptureError", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const PacketCaptureListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCaptureListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PacketCaptureResult", - }, - }, - }, - }, - }, - }, -}; - -export const TroubleshootingParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TroubleshootingParameters", - modelProperties: { - targetResourceId: { - serializedName: "targetResourceId", - required: true, - type: { - name: "String", - }, - }, - storageId: { - serializedName: "properties.storageId", - required: true, - type: { - name: "String", - }, - }, - storagePath: { - serializedName: "properties.storagePath", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TroubleshootingResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TroubleshootingResult", - modelProperties: { - startTime: { - serializedName: "startTime", - type: { - name: "DateTime", - }, - }, - endTime: { - serializedName: "endTime", - type: { - name: "DateTime", - }, - }, - code: { - serializedName: "code", - type: { - name: "String", - }, - }, - results: { - serializedName: "results", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TroubleshootingDetails", - }, - }, - }, - }, - }, - }, -}; - -export const TroubleshootingDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TroubleshootingDetails", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - reasonType: { - serializedName: "reasonType", - type: { - name: "String", - }, - }, - summary: { - serializedName: "summary", - type: { - name: "String", - }, - }, - detail: { - serializedName: "detail", - type: { - name: "String", - }, - }, - recommendedActions: { - serializedName: "recommendedActions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TroubleshootingRecommendedActions", - }, - }, - }, - }, - }, - }, -}; - -export const TroubleshootingRecommendedActions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TroubleshootingRecommendedActions", - modelProperties: { - actionId: { - serializedName: "actionId", - type: { - name: "String", - }, - }, - actionText: { - serializedName: "actionText", - type: { - name: "String", - }, - }, - actionUri: { - serializedName: "actionUri", - type: { - name: "String", - }, - }, - actionUriText: { - serializedName: "actionUriText", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const QueryTroubleshootingParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QueryTroubleshootingParameters", - modelProperties: { - targetResourceId: { - serializedName: "targetResourceId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FlowLogInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FlowLogInformation", - modelProperties: { - targetResourceId: { - serializedName: "targetResourceId", - required: true, - type: { - name: "String", - }, - }, - flowAnalyticsConfiguration: { - serializedName: "flowAnalyticsConfiguration", - type: { - name: "Composite", - className: "TrafficAnalyticsProperties", - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - storageId: { - serializedName: "properties.storageId", - required: true, - type: { - name: "String", - }, - }, - enabledFilteringCriteria: { - serializedName: "properties.enabledFilteringCriteria", - type: { - name: "String", - }, - }, - recordTypes: { - serializedName: "properties.recordTypes", - type: { - name: "String", - }, - }, - enabled: { - serializedName: "properties.enabled", - required: true, - type: { - name: "Boolean", - }, - }, - retentionPolicy: { - serializedName: "properties.retentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicyParameters", - }, - }, - format: { - serializedName: "properties.format", - type: { - name: "Composite", - className: "FlowLogFormatParameters", - }, - }, - }, - }, -}; - -export const FlowLogStatusParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FlowLogStatusParameters", - modelProperties: { - targetResourceId: { - serializedName: "targetResourceId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectivityParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectivityParameters", - modelProperties: { - source: { - serializedName: "source", - type: { - name: "Composite", - className: "ConnectivitySource", - }, - }, - destination: { - serializedName: "destination", - type: { - name: "Composite", - className: "ConnectivityDestination", - }, - }, - protocol: { - serializedName: "protocol", - type: { - name: "String", - }, - }, - protocolConfiguration: { - serializedName: "protocolConfiguration", - type: { - name: "Composite", - className: "ProtocolConfiguration", - }, - }, - preferredIPVersion: { - serializedName: "preferredIPVersion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectivitySource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectivitySource", - modelProperties: { - resourceId: { - serializedName: "resourceId", - required: true, - type: { - name: "String", - }, - }, - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 0, - }, - serializedName: "port", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ConnectivityDestination: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectivityDestination", - modelProperties: { - resourceId: { - serializedName: "resourceId", - type: { - name: "String", - }, - }, - address: { - serializedName: "address", - type: { - name: "String", - }, - }, - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 0, - }, - serializedName: "port", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ProtocolConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProtocolConfiguration", - modelProperties: { - httpConfiguration: { - serializedName: "HTTPConfiguration", - type: { - name: "Composite", - className: "HttpConfiguration", - }, - }, - }, - }, -}; - -export const HttpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HttpConfiguration", - modelProperties: { - method: { - serializedName: "method", - type: { - name: "String", - }, - }, - headers: { - serializedName: "headers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HttpHeader", - }, - }, - }, - }, - validStatusCodes: { - serializedName: "validStatusCodes", - type: { - name: "Sequence", - element: { - type: { - name: "Number", - }, - }, - }, - }, - }, - }, -}; - -export const HttpHeader: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HttpHeader", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectivityInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectivityInformation", - modelProperties: { - hops: { - serializedName: "hops", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityHop", - }, - }, - }, - }, - connectionStatus: { - serializedName: "connectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - avgLatencyInMs: { - serializedName: "avgLatencyInMs", - readOnly: true, - type: { - name: "Number", - }, - }, - minLatencyInMs: { - serializedName: "minLatencyInMs", - readOnly: true, - type: { - name: "Number", - }, - }, - maxLatencyInMs: { - serializedName: "maxLatencyInMs", - readOnly: true, - type: { - name: "Number", - }, - }, - probesSent: { - serializedName: "probesSent", - readOnly: true, - type: { - name: "Number", - }, - }, - probesFailed: { - serializedName: "probesFailed", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ConnectivityHop: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectivityHop", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - address: { - serializedName: "address", - readOnly: true, - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "resourceId", - readOnly: true, - type: { - name: "String", - }, - }, - nextHopIds: { - serializedName: "nextHopIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - previousHopIds: { - serializedName: "previousHopIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - links: { - serializedName: "links", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HopLink", - }, - }, - }, - }, - previousLinks: { - serializedName: "previousLinks", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HopLink", - }, - }, - }, - }, - issues: { - serializedName: "issues", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityIssue", - }, - }, - }, - }, - }, - }, -}; - -export const HopLink: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HopLink", - modelProperties: { - nextHopId: { - serializedName: "nextHopId", - readOnly: true, - type: { - name: "String", - }, - }, - linkType: { - serializedName: "linkType", - readOnly: true, - type: { - name: "String", - }, - }, - issues: { - serializedName: "issues", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityIssue", - }, - }, - }, - }, - context: { - serializedName: "context", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - resourceId: { - serializedName: "resourceId", - readOnly: true, - type: { - name: "String", - }, - }, - roundTripTimeMin: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.roundTripTimeMin", - readOnly: true, - type: { - name: "Number", - }, - }, - roundTripTimeAvg: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.roundTripTimeAvg", - readOnly: true, - type: { - name: "Number", - }, - }, - roundTripTimeMax: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.roundTripTimeMax", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ConnectivityIssue: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectivityIssue", - modelProperties: { - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String", - }, - }, - severity: { - serializedName: "severity", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - context: { - serializedName: "context", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, - }, - }, -}; - -export const AzureReachabilityReportParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureReachabilityReportParameters", - modelProperties: { - providerLocation: { - serializedName: "providerLocation", - type: { - name: "Composite", - className: "AzureReachabilityReportLocation", - }, - }, - providers: { - serializedName: "providers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - azureLocations: { - serializedName: "azureLocations", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - startTime: { - serializedName: "startTime", - required: true, - type: { - name: "DateTime", - }, - }, - endTime: { - serializedName: "endTime", - required: true, - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const AzureReachabilityReportLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureReachabilityReportLocation", - modelProperties: { - country: { - serializedName: "country", - required: true, - type: { - name: "String", - }, - }, - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - city: { - serializedName: "city", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureReachabilityReport: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureReachabilityReport", - modelProperties: { - aggregationLevel: { - serializedName: "aggregationLevel", - required: true, - type: { - name: "String", - }, - }, - providerLocation: { - serializedName: "providerLocation", - type: { - name: "Composite", - className: "AzureReachabilityReportLocation", - }, - }, - reachabilityReport: { - serializedName: "reachabilityReport", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureReachabilityReportItem", - }, - }, - }, - }, - }, - }, -}; - -export const AzureReachabilityReportItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureReachabilityReportItem", - modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String", - }, - }, - azureLocation: { - serializedName: "azureLocation", - type: { - name: "String", - }, - }, - latencies: { - serializedName: "latencies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureReachabilityReportLatencyInfo", - }, - }, - }, - }, - }, - }, -}; - -export const AzureReachabilityReportLatencyInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureReachabilityReportLatencyInfo", - modelProperties: { - timeStamp: { - serializedName: "timeStamp", - type: { - name: "DateTime", - }, - }, - score: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 1, - }, - serializedName: "score", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AvailableProvidersListParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableProvidersListParameters", - modelProperties: { - azureLocations: { - serializedName: "azureLocations", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - country: { - serializedName: "country", - type: { - name: "String", - }, - }, - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - city: { - serializedName: "city", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailableProvidersList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableProvidersList", - modelProperties: { - countries: { - serializedName: "countries", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailableProvidersListCountry", - }, - }, - }, - }, - }, - }, -}; - -export const AvailableProvidersListCountry: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableProvidersListCountry", - modelProperties: { - countryName: { - serializedName: "countryName", - type: { - name: "String", - }, - }, - providers: { - serializedName: "providers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - states: { - serializedName: "states", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailableProvidersListState", - }, - }, - }, - }, - }, - }, -}; - -export const AvailableProvidersListState: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableProvidersListState", - modelProperties: { - stateName: { - serializedName: "stateName", - type: { - name: "String", - }, - }, - providers: { - serializedName: "providers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - cities: { - serializedName: "cities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailableProvidersListCity", - }, - }, - }, - }, - }, - }, -}; - -export const AvailableProvidersListCity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableProvidersListCity", - modelProperties: { - cityName: { - serializedName: "cityName", - type: { - name: "String", - }, - }, - providers: { - serializedName: "providers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const NetworkConfigurationDiagnosticParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkConfigurationDiagnosticParameters", - modelProperties: { - targetResourceId: { - serializedName: "targetResourceId", - required: true, - type: { - name: "String", - }, - }, - verbosityLevel: { - serializedName: "verbosityLevel", - type: { - name: "String", - }, - }, - profiles: { - serializedName: "profiles", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkConfigurationDiagnosticProfile", - }, - }, - }, - }, - }, - }, -}; - -export const NetworkConfigurationDiagnosticProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkConfigurationDiagnosticProfile", - modelProperties: { - direction: { - serializedName: "direction", - required: true, - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - required: true, - type: { - name: "String", - }, - }, - source: { - serializedName: "source", - required: true, - type: { - name: "String", - }, - }, - destination: { - serializedName: "destination", - required: true, - type: { - name: "String", - }, - }, - destinationPort: { - serializedName: "destinationPort", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkConfigurationDiagnosticResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkConfigurationDiagnosticResponse", - modelProperties: { - results: { - serializedName: "results", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkConfigurationDiagnosticResult", - }, - }, - }, - }, - }, - }, -}; - -export const NetworkConfigurationDiagnosticResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkConfigurationDiagnosticResult", - modelProperties: { - profile: { - serializedName: "profile", - type: { - name: "Composite", - className: "NetworkConfigurationDiagnosticProfile", - }, - }, - networkSecurityGroupResult: { - serializedName: "networkSecurityGroupResult", - type: { - name: "Composite", - className: "NetworkSecurityGroupResult", - }, - }, - }, - }, -}; - -export const NetworkSecurityGroupResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkSecurityGroupResult", - modelProperties: { - securityRuleAccessResult: { - serializedName: "securityRuleAccessResult", - type: { - name: "String", - }, - }, - evaluatedNetworkSecurityGroups: { - serializedName: "evaluatedNetworkSecurityGroups", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EvaluatedNetworkSecurityGroup", - }, - }, - }, - }, - }, - }, -}; - -export const EvaluatedNetworkSecurityGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EvaluatedNetworkSecurityGroup", - modelProperties: { - networkSecurityGroupId: { - serializedName: "networkSecurityGroupId", - type: { - name: "String", - }, - }, - appliedTo: { - serializedName: "appliedTo", - type: { - name: "String", - }, - }, - matchedRule: { - serializedName: "matchedRule", - type: { - name: "Composite", - className: "MatchedRule", - }, - }, - rulesEvaluationResult: { - serializedName: "rulesEvaluationResult", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkSecurityRulesEvaluationResult", - }, - }, - }, - }, - }, - }, -}; - -export const MatchedRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MatchedRule", - modelProperties: { - ruleName: { - serializedName: "ruleName", - type: { - name: "String", - }, - }, - action: { - serializedName: "action", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkSecurityRulesEvaluationResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkSecurityRulesEvaluationResult", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - protocolMatched: { - serializedName: "protocolMatched", - type: { - name: "Boolean", - }, - }, - sourceMatched: { - serializedName: "sourceMatched", - type: { - name: "Boolean", - }, - }, - sourcePortMatched: { - serializedName: "sourcePortMatched", - type: { - name: "Boolean", - }, - }, - destinationMatched: { - serializedName: "destinationMatched", - type: { - name: "Boolean", - }, - }, - destinationPortMatched: { - serializedName: "destinationPortMatched", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ConnectionMonitor: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitor", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - source: { - serializedName: "properties.source", - type: { - name: "Composite", - className: "ConnectionMonitorSource", - }, - }, - destination: { - serializedName: "properties.destination", - type: { - name: "Composite", - className: "ConnectionMonitorDestination", - }, - }, - autoStart: { - defaultValue: true, - serializedName: "properties.autoStart", - type: { - name: "Boolean", - }, - }, - monitoringIntervalInSeconds: { - defaultValue: 60, - constraints: { - InclusiveMaximum: 1800, - InclusiveMinimum: 30, - }, - serializedName: "properties.monitoringIntervalInSeconds", - type: { - name: "Number", - }, - }, - endpoints: { - serializedName: "properties.endpoints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorEndpoint", - }, - }, - }, - }, - testConfigurations: { - serializedName: "properties.testConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorTestConfiguration", - }, - }, - }, - }, - testGroups: { - serializedName: "properties.testGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorTestGroup", - }, - }, - }, - }, - outputs: { - serializedName: "properties.outputs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorOutput", - }, - }, - }, - }, - notes: { - serializedName: "properties.notes", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionMonitorParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorParameters", - modelProperties: { - source: { - serializedName: "source", - type: { - name: "Composite", - className: "ConnectionMonitorSource", - }, - }, - destination: { - serializedName: "destination", - type: { - name: "Composite", - className: "ConnectionMonitorDestination", - }, - }, - autoStart: { - defaultValue: true, - serializedName: "autoStart", - type: { - name: "Boolean", - }, - }, - monitoringIntervalInSeconds: { - defaultValue: 60, - constraints: { - InclusiveMaximum: 1800, - InclusiveMinimum: 30, - }, - serializedName: "monitoringIntervalInSeconds", - type: { - name: "Number", - }, - }, - endpoints: { - serializedName: "endpoints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorEndpoint", - }, - }, - }, - }, - testConfigurations: { - serializedName: "testConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorTestConfiguration", - }, - }, - }, - }, - testGroups: { - serializedName: "testGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorTestGroup", - }, - }, - }, - }, - outputs: { - serializedName: "outputs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorOutput", - }, - }, - }, - }, - notes: { - serializedName: "notes", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionMonitorSource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorSource", - modelProperties: { - resourceId: { - serializedName: "resourceId", - required: true, - type: { - name: "String", - }, - }, - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 0, - }, - serializedName: "port", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ConnectionMonitorDestination: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorDestination", - modelProperties: { - resourceId: { - serializedName: "resourceId", - type: { - name: "String", - }, - }, - address: { - serializedName: "address", - type: { - name: "String", - }, - }, - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 0, - }, - serializedName: "port", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ConnectionMonitorEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorEndpoint", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "resourceId", - type: { - name: "String", - }, - }, - address: { - serializedName: "address", - type: { - name: "String", - }, - }, - filter: { - serializedName: "filter", - type: { - name: "Composite", - className: "ConnectionMonitorEndpointFilter", - }, - }, - scope: { - serializedName: "scope", - type: { - name: "Composite", - className: "ConnectionMonitorEndpointScope", - }, - }, - coverageLevel: { - serializedName: "coverageLevel", - type: { - name: "String", - }, - }, - locationDetails: { - serializedName: "locationDetails", - type: { - name: "Composite", - className: "ConnectionMonitorEndpointLocationDetails", - }, - }, - subscriptionId: { - serializedName: "subscriptionId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionMonitorEndpointFilter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorEndpointFilter", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - items: { - serializedName: "items", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorEndpointFilterItem", - }, - }, - }, - }, - }, - }, -}; - -export const ConnectionMonitorEndpointFilterItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorEndpointFilterItem", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - address: { - serializedName: "address", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionMonitorEndpointScope: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorEndpointScope", - modelProperties: { - include: { - serializedName: "include", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorEndpointScopeItem", - }, - }, - }, - }, - exclude: { - serializedName: "exclude", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorEndpointScopeItem", - }, - }, - }, - }, - }, - }, -}; - -export const ConnectionMonitorEndpointScopeItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorEndpointScopeItem", - modelProperties: { - address: { - serializedName: "address", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionMonitorEndpointLocationDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorEndpointLocationDetails", - modelProperties: { - region: { - serializedName: "region", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionMonitorTestConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorTestConfiguration", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - testFrequencySec: { - serializedName: "testFrequencySec", - type: { - name: "Number", - }, - }, - protocol: { - serializedName: "protocol", - required: true, - type: { - name: "String", - }, - }, - preferredIPVersion: { - serializedName: "preferredIPVersion", - type: { - name: "String", - }, - }, - httpConfiguration: { - serializedName: "httpConfiguration", - type: { - name: "Composite", - className: "ConnectionMonitorHttpConfiguration", - }, - }, - tcpConfiguration: { - serializedName: "tcpConfiguration", - type: { - name: "Composite", - className: "ConnectionMonitorTcpConfiguration", - }, - }, - icmpConfiguration: { - serializedName: "icmpConfiguration", - type: { - name: "Composite", - className: "ConnectionMonitorIcmpConfiguration", - }, - }, - successThreshold: { - serializedName: "successThreshold", - type: { - name: "Composite", - className: "ConnectionMonitorSuccessThreshold", - }, - }, - }, - }, -}; - -export const ConnectionMonitorHttpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorHttpConfiguration", - modelProperties: { - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 0, - }, - serializedName: "port", - type: { - name: "Number", - }, - }, - method: { - serializedName: "method", - type: { - name: "String", - }, - }, - path: { - serializedName: "path", - type: { - name: "String", - }, - }, - requestHeaders: { - serializedName: "requestHeaders", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HttpHeader", - }, - }, - }, - }, - validStatusCodeRanges: { - serializedName: "validStatusCodeRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - preferHttps: { - serializedName: "preferHTTPS", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ConnectionMonitorTcpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorTcpConfiguration", - modelProperties: { - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 0, - }, - serializedName: "port", - type: { - name: "Number", - }, - }, - disableTraceRoute: { - serializedName: "disableTraceRoute", - type: { - name: "Boolean", - }, - }, - destinationPortBehavior: { - serializedName: "destinationPortBehavior", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionMonitorIcmpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorIcmpConfiguration", - modelProperties: { - disableTraceRoute: { - serializedName: "disableTraceRoute", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ConnectionMonitorSuccessThreshold: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorSuccessThreshold", - modelProperties: { - checksFailedPercent: { - serializedName: "checksFailedPercent", - type: { - name: "Number", - }, - }, - roundTripTimeMs: { - serializedName: "roundTripTimeMs", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ConnectionMonitorTestGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorTestGroup", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - disable: { - serializedName: "disable", - type: { - name: "Boolean", - }, - }, - testConfigurations: { - serializedName: "testConfigurations", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sources: { - serializedName: "sources", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinations: { - serializedName: "destinations", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ConnectionMonitorOutput: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorOutput", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - workspaceSettings: { - serializedName: "workspaceSettings", - type: { - name: "Composite", - className: "ConnectionMonitorWorkspaceSettings", - }, - }, - }, - }, -}; - -export const ConnectionMonitorWorkspaceSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorWorkspaceSettings", - modelProperties: { - workspaceResourceId: { - serializedName: "workspaceResourceId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionMonitorResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorResult", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - source: { - serializedName: "properties.source", - type: { - name: "Composite", - className: "ConnectionMonitorSource", - }, - }, - destination: { - serializedName: "properties.destination", - type: { - name: "Composite", - className: "ConnectionMonitorDestination", - }, - }, - autoStart: { - defaultValue: true, - serializedName: "properties.autoStart", - type: { - name: "Boolean", - }, - }, - monitoringIntervalInSeconds: { - defaultValue: 60, - constraints: { - InclusiveMaximum: 1800, - InclusiveMinimum: 30, - }, - serializedName: "properties.monitoringIntervalInSeconds", - type: { - name: "Number", - }, - }, - endpoints: { - serializedName: "properties.endpoints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorEndpoint", - }, - }, - }, - }, - testConfigurations: { - serializedName: "properties.testConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorTestConfiguration", - }, - }, - }, - }, - testGroups: { - serializedName: "properties.testGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorTestGroup", - }, - }, - }, - }, - outputs: { - serializedName: "properties.outputs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorOutput", - }, - }, - }, - }, - notes: { - serializedName: "properties.notes", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - startTime: { - serializedName: "properties.startTime", - readOnly: true, - type: { - name: "DateTime", - }, - }, - monitoringStatus: { - serializedName: "properties.monitoringStatus", - readOnly: true, - type: { - name: "String", - }, - }, - connectionMonitorType: { - serializedName: "properties.connectionMonitorType", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionMonitorListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionMonitorResult", - }, - }, - }, - }, - }, - }, -}; - -export const FlowLogListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FlowLogListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FlowLog", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Operation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay", - }, - }, - origin: { - serializedName: "origin", - type: { - name: "String", - }, - }, - serviceSpecification: { - serializedName: "properties.serviceSpecification", - type: { - name: "Composite", - className: "OperationPropertiesFormatServiceSpecification", - }, - }, - }, - }, -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String", - }, - }, - resource: { - serializedName: "resource", - type: { - name: "String", - }, - }, - operation: { - serializedName: "operation", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationPropertiesFormatServiceSpecification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationPropertiesFormatServiceSpecification", - modelProperties: { - metricSpecifications: { - serializedName: "metricSpecifications", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricSpecification", - }, - }, - }, - }, - logSpecifications: { - serializedName: "logSpecifications", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogSpecification", - }, - }, - }, - }, - }, - }, -}; - -export const MetricSpecification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricSpecification", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - displayName: { - serializedName: "displayName", - type: { - name: "String", - }, - }, - displayDescription: { - serializedName: "displayDescription", - type: { - name: "String", - }, - }, - unit: { - serializedName: "unit", - type: { - name: "String", - }, - }, - aggregationType: { - serializedName: "aggregationType", - type: { - name: "String", - }, - }, - availabilities: { - serializedName: "availabilities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Availability", - }, - }, - }, - }, - enableRegionalMdmAccount: { - serializedName: "enableRegionalMdmAccount", - type: { - name: "Boolean", - }, - }, - fillGapWithZero: { - serializedName: "fillGapWithZero", - type: { - name: "Boolean", - }, - }, - metricFilterPattern: { - serializedName: "metricFilterPattern", - type: { - name: "String", - }, - }, - dimensions: { - serializedName: "dimensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Dimension", - }, - }, - }, - }, - isInternal: { - serializedName: "isInternal", - type: { - name: "Boolean", - }, - }, - sourceMdmAccount: { - serializedName: "sourceMdmAccount", - type: { - name: "String", - }, - }, - sourceMdmNamespace: { - serializedName: "sourceMdmNamespace", - type: { - name: "String", - }, - }, - resourceIdDimensionNameOverride: { - serializedName: "resourceIdDimensionNameOverride", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Availability: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Availability", - modelProperties: { - timeGrain: { - serializedName: "timeGrain", - type: { - name: "String", - }, - }, - retention: { - serializedName: "retention", - type: { - name: "String", - }, - }, - blobDuration: { - serializedName: "blobDuration", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Dimension: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Dimension", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - displayName: { - serializedName: "displayName", - type: { - name: "String", - }, - }, - internalName: { - serializedName: "internalName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LogSpecification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogSpecification", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - displayName: { - serializedName: "displayName", - type: { - name: "String", - }, - }, - blobDuration: { - serializedName: "blobDuration", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateEndpointListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpoint", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailablePrivateEndpointTypesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailablePrivateEndpointTypesResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailablePrivateEndpointType", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailablePrivateEndpointType: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailablePrivateEndpointType", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - resourceName: { - serializedName: "resourceName", - type: { - name: "String", - }, - }, - displayName: { - serializedName: "displayName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateDnsZoneConfig: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateDnsZoneConfig", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - privateDnsZoneId: { - serializedName: "properties.privateDnsZoneId", - type: { - name: "String", - }, - }, - recordSets: { - serializedName: "properties.recordSets", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecordSet", - }, - }, - }, - }, - }, - }, -}; - -export const RecordSet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RecordSet", - modelProperties: { - recordType: { - serializedName: "recordType", - type: { - name: "String", - }, - }, - recordSetName: { - serializedName: "recordSetName", - type: { - name: "String", - }, - }, - fqdn: { - serializedName: "fqdn", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - ttl: { - serializedName: "ttl", - type: { - name: "Number", - }, - }, - ipAddresses: { - serializedName: "ipAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const PrivateDnsZoneGroupListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateDnsZoneGroupListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateDnsZoneGroup", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateLinkServiceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkServiceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkService", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CheckPrivateLinkServiceVisibilityRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CheckPrivateLinkServiceVisibilityRequest", - modelProperties: { - privateLinkServiceAlias: { - serializedName: "privateLinkServiceAlias", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateLinkServiceVisibility: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkServiceVisibility", - modelProperties: { - visible: { - serializedName: "visible", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const AutoApprovedPrivateLinkServicesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AutoApprovedPrivateLinkServicesResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoApprovedPrivateLinkService", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AutoApprovedPrivateLinkService: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AutoApprovedPrivateLinkService", - modelProperties: { - privateLinkService: { - serializedName: "privateLinkService", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PublicIpDdosProtectionStatusResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PublicIpDdosProtectionStatusResult", - modelProperties: { - publicIpAddressId: { - serializedName: "publicIpAddressId", - type: { - name: "String", - }, - }, - publicIpAddress: { - serializedName: "publicIpAddress", - type: { - name: "String", - }, - }, - isWorkloadProtected: { - serializedName: "isWorkloadProtected", - type: { - name: "String", - }, - }, - ddosProtectionPlanId: { - serializedName: "ddosProtectionPlanId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ReserveCloudServicePublicIpAddressRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReserveCloudServicePublicIpAddressRequest", - modelProperties: { - isRollback: { - serializedName: "isRollback", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DisassociateCloudServicePublicIpRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DisassociateCloudServicePublicIpRequest", - modelProperties: { - publicIpArmId: { - serializedName: "publicIpArmId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PublicIPPrefixSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PublicIPPrefixSku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ReferencedPublicIpAddress: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReferencedPublicIpAddress", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PublicIPPrefixListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PublicIPPrefixListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PublicIPPrefix", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RouteFilterListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteFilterListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RouteFilter", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RouteFilterRuleListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteFilterRuleListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RouteFilterRule", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RouteTableListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteTableListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RouteTable", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RouteListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Route", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityPartnerProviderListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityPartnerProviderListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityPartnerProvider", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BgpServiceCommunityListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BgpServiceCommunityListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BgpServiceCommunity", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BGPCommunity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BGPCommunity", - modelProperties: { - serviceSupportedRegion: { - serializedName: "serviceSupportedRegion", - type: { - name: "String", - }, - }, - communityName: { - serializedName: "communityName", - type: { - name: "String", - }, - }, - communityValue: { - serializedName: "communityValue", - type: { - name: "String", - }, - }, - communityPrefixes: { - serializedName: "communityPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - isAuthorizedToUse: { - serializedName: "isAuthorizedToUse", - type: { - name: "Boolean", - }, - }, - serviceGroup: { - serializedName: "serviceGroup", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceEndpointPolicyListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceEndpointPolicyListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceEndpointPolicy", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceEndpointPolicyDefinitionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceEndpointPolicyDefinitionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceEndpointPolicyDefinition", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AddressSpace: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AddressSpace", - modelProperties: { - addressPrefixes: { - serializedName: "addressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - ipamPoolPrefixAllocations: { - serializedName: "ipamPoolPrefixAllocations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpamPoolPrefixAllocation", - }, - }, - }, - }, - }, - }, -}; - -export const DhcpOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DhcpOptions", - modelProperties: { - dnsServers: { - serializedName: "dnsServers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualNetworkBgpCommunities: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkBgpCommunities", - modelProperties: { - virtualNetworkCommunity: { - serializedName: "virtualNetworkCommunity", - required: true, - type: { - name: "String", - }, - }, - regionalCommunity: { - serializedName: "regionalCommunity", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkEncryption: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkEncryption", - modelProperties: { - enabled: { - serializedName: "enabled", - required: true, - type: { - name: "Boolean", - }, - }, - enforcement: { - serializedName: "enforcement", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RouteTargetAddressPropertiesFormat: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteTargetAddressPropertiesFormat", - modelProperties: { - subnet: { - serializedName: "subnet", - type: { - name: "Composite", - className: "Subnet", - }, - }, - privateIPAddress: { - serializedName: "privateIPAddress", - type: { - name: "String", - }, - }, - privateIPAllocationMethod: { - serializedName: "privateIPAllocationMethod", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceGatewaySku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewaySku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceGatewayListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewayListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceGateway", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceGatewayUpdateAddressLocationsRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewayUpdateAddressLocationsRequest", - modelProperties: { - action: { - serializedName: "action", - type: { - name: "String", - }, - }, - addressLocations: { - serializedName: "addressLocations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceGatewayAddressLocation", - }, - }, - }, - }, - }, - }, -}; - -export const ServiceGatewayAddressLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewayAddressLocation", - modelProperties: { - addressLocation: { - serializedName: "addressLocation", - type: { - name: "String", - }, - }, - addressUpdateAction: { - serializedName: "addressUpdateAction", - type: { - name: "String", - }, - }, - addresses: { - serializedName: "addresses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceGatewayAddress", - }, - }, - }, - }, - }, - }, -}; - -export const ServiceGatewayAddress: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewayAddress", - modelProperties: { - address: { - serializedName: "address", - type: { - name: "String", - }, - }, - services: { - serializedName: "services", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ServiceGatewayUpdateServicesRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewayUpdateServicesRequest", - modelProperties: { - action: { - serializedName: "action", - type: { - name: "String", - }, - }, - serviceRequests: { - serializedName: "serviceRequests", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceGatewayServiceRequest", - }, - }, - }, - }, - }, - }, -}; - -export const ServiceGatewayServiceRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewayServiceRequest", - modelProperties: { - isDelete: { - serializedName: "isDelete", - type: { - name: "Boolean", - }, - }, - service: { - serializedName: "service", - type: { - name: "Composite", - className: "ServiceGatewayService", - }, - }, - }, - }, -}; - -export const ServiceGatewayService: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewayService", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - serviceType: { - serializedName: "properties.serviceType", - type: { - name: "String", - }, - }, - isDefault: { - serializedName: "properties.isDefault", - type: { - name: "Boolean", - }, - }, - loadBalancerBackendPools: { - serializedName: "properties.loadBalancerBackendPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BackendAddressPool", - }, - }, - }, - }, - publicNatGatewayId: { - serializedName: "properties.publicNatGatewayId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GetServiceGatewayAddressLocationsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GetServiceGatewayAddressLocationsResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceGatewayAddressLocationResponse", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceGatewayAddressLocationResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewayAddressLocationResponse", - modelProperties: { - addressLocation: { - serializedName: "addressLocation", - type: { - name: "String", - }, - }, - addresses: { - serializedName: "addresses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceGatewayAddress", - }, - }, - }, - }, - }, - }, -}; - -export const GetServiceGatewayServicesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GetServiceGatewayServicesResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceGatewayService", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceTagsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceTagsListResult", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - changeNumber: { - serializedName: "changeNumber", - readOnly: true, - type: { - name: "String", - }, - }, - cloud: { - serializedName: "cloud", - readOnly: true, - type: { - name: "String", - }, - }, - values: { - serializedName: "values", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceTagInformation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceTagInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceTagInformation", - modelProperties: { - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ServiceTagInformationPropertiesFormat", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - serviceTagChangeNumber: { - serializedName: "serviceTagChangeNumber", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceTagInformationPropertiesFormat: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceTagInformationPropertiesFormat", - modelProperties: { - changeNumber: { - serializedName: "changeNumber", - readOnly: true, - type: { - name: "String", - }, - }, - region: { - serializedName: "region", - readOnly: true, - type: { - name: "String", - }, - }, - systemService: { - serializedName: "systemService", - readOnly: true, - type: { - name: "String", - }, - }, - addressPrefixes: { - serializedName: "addressPrefixes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - state: { - serializedName: "state", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceTagInformationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceTagInformationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceTagInformation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UsagesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UsagesListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Usage", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Usage: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Usage", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - unit: { - serializedName: "unit", - required: true, - type: { - name: "String", - }, - }, - currentValue: { - serializedName: "currentValue", - required: true, - type: { - name: "Number", - }, - }, - limit: { - serializedName: "limit", - required: true, - type: { - name: "Number", - }, - }, - name: { - serializedName: "name", - type: { - name: "Composite", - className: "UsageName", - }, - }, - }, - }, -}; - -export const UsageName: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UsageName", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "String", - }, - }, - localizedValue: { - serializedName: "localizedValue", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetwork", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrepareNetworkPoliciesRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrepareNetworkPoliciesRequest", - modelProperties: { - serviceName: { - serializedName: "serviceName", - type: { - name: "String", - }, - }, - networkIntentPolicyConfigurations: { - serializedName: "networkIntentPolicyConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkIntentPolicyConfiguration", - }, - }, - }, - }, - }, - }, -}; - -export const NetworkIntentPolicyConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkIntentPolicyConfiguration", - modelProperties: { - networkIntentPolicyName: { - serializedName: "networkIntentPolicyName", - type: { - name: "String", - }, - }, - sourceNetworkIntentPolicy: { - serializedName: "sourceNetworkIntentPolicy", - type: { - name: "Composite", - className: "NetworkIntentPolicy", - }, - }, - }, - }, -}; - -export const UnprepareNetworkPoliciesRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UnprepareNetworkPoliciesRequest", - modelProperties: { - serviceName: { - serializedName: "serviceName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResourceNavigationLinksListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceNavigationLinksListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceNavigationLink", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceAssociationLinksListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceAssociationLinksListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceAssociationLink", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SubnetListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SubnetListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Subnet", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkPeeringListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkPeeringListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkPeering", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IPAddressAvailabilityResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IPAddressAvailabilityResult", - modelProperties: { - available: { - serializedName: "available", - type: { - name: "Boolean", - }, - }, - availableIPAddresses: { - serializedName: "availableIPAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - isPlatformReserved: { - serializedName: "isPlatformReserved", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const VirtualNetworkListUsageResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkListUsageResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkUsage", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkUsage: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkUsage", - modelProperties: { - currentValue: { - serializedName: "currentValue", - readOnly: true, - type: { - name: "Number", - }, - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - limit: { - serializedName: "limit", - readOnly: true, - type: { - name: "Number", - }, - }, - name: { - serializedName: "name", - type: { - name: "Composite", - className: "VirtualNetworkUsageName", - }, - }, - unit: { - serializedName: "unit", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkUsageName: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkUsageName", - modelProperties: { - localizedValue: { - serializedName: "localizedValue", - readOnly: true, - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkDdosProtectionStatusResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkDdosProtectionStatusResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PublicIpDdosProtectionStatusResult", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkApplianceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkApplianceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkAppliance", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayAutoScaleConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayAutoScaleConfiguration", - modelProperties: { - bounds: { - serializedName: "bounds", - type: { - name: "Composite", - className: "VirtualNetworkGatewayAutoScaleBounds", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayAutoScaleBounds: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayAutoScaleBounds", - modelProperties: { - min: { - serializedName: "min", - type: { - name: "Number", - }, - }, - max: { - serializedName: "max", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayMigrationStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayMigrationStatus", - modelProperties: { - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - phase: { - serializedName: "phase", - type: { - name: "String", - }, - }, - errorMessage: { - serializedName: "errorMessage", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewaySku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewaySku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - type: { - name: "String", - }, - }, - capacity: { - serializedName: "capacity", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VpnClientConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnClientConfiguration", - modelProperties: { - vpnClientAddressPool: { - serializedName: "vpnClientAddressPool", - type: { - name: "Composite", - className: "AddressSpace", - }, - }, - vpnClientRootCertificates: { - serializedName: "vpnClientRootCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnClientRootCertificate", - }, - }, - }, - }, - vpnClientRevokedCertificates: { - serializedName: "vpnClientRevokedCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnClientRevokedCertificate", - }, - }, - }, - }, - vpnClientProtocols: { - serializedName: "vpnClientProtocols", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - vpnAuthenticationTypes: { - serializedName: "vpnAuthenticationTypes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - vpnClientIpsecPolicies: { - serializedName: "vpnClientIpsecPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpsecPolicy", - }, - }, - }, - }, - radiusServerAddress: { - serializedName: "radiusServerAddress", - type: { - name: "String", - }, - }, - radiusServerSecret: { - serializedName: "radiusServerSecret", - type: { - name: "String", - }, - }, - radiusServers: { - serializedName: "radiusServers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RadiusServer", - }, - }, - }, - }, - aadTenant: { - serializedName: "aadTenant", - type: { - name: "String", - }, - }, - aadAudience: { - serializedName: "aadAudience", - type: { - name: "String", - }, - }, - aadIssuer: { - serializedName: "aadIssuer", - type: { - name: "String", - }, - }, - vngClientConnectionConfigurations: { - serializedName: "vngClientConnectionConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VngClientConnectionConfiguration", - }, - }, - }, - }, - }, - }, -}; - -export const IpsecPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpsecPolicy", - modelProperties: { - saLifeTimeSeconds: { - serializedName: "saLifeTimeSeconds", - required: true, - type: { - name: "Number", - }, - }, - saDataSizeKilobytes: { - serializedName: "saDataSizeKilobytes", - required: true, - type: { - name: "Number", - }, - }, - ipsecEncryption: { - serializedName: "ipsecEncryption", - required: true, - type: { - name: "String", - }, - }, - ipsecIntegrity: { - serializedName: "ipsecIntegrity", - required: true, - type: { - name: "String", - }, - }, - ikeEncryption: { - serializedName: "ikeEncryption", - required: true, - type: { - name: "String", - }, - }, - ikeIntegrity: { - serializedName: "ikeIntegrity", - required: true, - type: { - name: "String", - }, - }, - dhGroup: { - serializedName: "dhGroup", - required: true, - type: { - name: "String", - }, - }, - pfsGroup: { - serializedName: "pfsGroup", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RadiusServer: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RadiusServer", - modelProperties: { - radiusServerAddress: { - serializedName: "radiusServerAddress", - required: true, - type: { - name: "String", - }, - }, - radiusServerScore: { - serializedName: "radiusServerScore", - type: { - name: "Number", - }, - }, - radiusServerSecret: { - serializedName: "radiusServerSecret", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayPolicyGroupMember: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayPolicyGroupMember", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - attributeType: { - serializedName: "attributeType", - type: { - name: "String", - }, - }, - attributeValue: { - serializedName: "attributeValue", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BgpSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BgpSettings", - modelProperties: { - asn: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "asn", - type: { - name: "Number", - }, - }, - bgpPeeringAddress: { - serializedName: "bgpPeeringAddress", - type: { - name: "String", - }, - }, - peerWeight: { - serializedName: "peerWeight", - type: { - name: "Number", - }, - }, - bgpPeeringAddresses: { - serializedName: "bgpPeeringAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IPConfigurationBgpPeeringAddress", - }, - }, - }, - }, - }, - }, -}; - -export const IPConfigurationBgpPeeringAddress: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IPConfigurationBgpPeeringAddress", - modelProperties: { - ipconfigurationId: { - serializedName: "ipconfigurationId", - type: { - name: "String", - }, - }, - defaultBgpIpAddresses: { - serializedName: "defaultBgpIpAddresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - customBgpIpAddresses: { - serializedName: "customBgpIpAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - tunnelIpAddresses: { - serializedName: "tunnelIpAddresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const VpnNatRuleMapping: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnNatRuleMapping", - modelProperties: { - addressSpace: { - serializedName: "addressSpace", - type: { - name: "String", - }, - }, - portRange: { - serializedName: "portRange", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkGateway", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayListConnectionsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayListConnectionsResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkGatewayConnectionListEntity", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkConnectionGatewayReference: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkConnectionGatewayReference", - modelProperties: { - id: { - serializedName: "id", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TunnelConnectionHealth: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TunnelConnectionHealth", - modelProperties: { - tunnel: { - serializedName: "tunnel", - readOnly: true, - type: { - name: "String", - }, - }, - connectionStatus: { - serializedName: "connectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - ingressBytesTransferred: { - serializedName: "ingressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - egressBytesTransferred: { - serializedName: "egressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - lastConnectionEstablishedUtcTime: { - serializedName: "lastConnectionEstablishedUtcTime", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -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", - className: "TrafficSelectorPolicy", - modelProperties: { - localAddressRanges: { - serializedName: "localAddressRanges", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - remoteAddressRanges: { - serializedName: "remoteAddressRanges", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const VpnClientParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnClientParameters", - modelProperties: { - processorArchitecture: { - serializedName: "processorArchitecture", - type: { - name: "String", - }, - }, - authenticationMethod: { - serializedName: "authenticationMethod", - type: { - name: "String", - }, - }, - radiusServerAuthCertificate: { - serializedName: "radiusServerAuthCertificate", - type: { - name: "String", - }, - }, - clientRootCertificates: { - serializedName: "clientRootCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const BgpPeerStatusListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BgpPeerStatusListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BgpPeerStatus", - }, - }, - }, - }, - }, - }, -}; - -export const BgpPeerStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BgpPeerStatus", - modelProperties: { - localAddress: { - serializedName: "localAddress", - readOnly: true, - type: { - name: "String", - }, - }, - neighbor: { - serializedName: "neighbor", - readOnly: true, - type: { - name: "String", - }, - }, - asn: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "asn", - readOnly: true, - type: { - name: "Number", - }, - }, - state: { - serializedName: "state", - readOnly: true, - type: { - name: "String", - }, - }, - connectedDuration: { - serializedName: "connectedDuration", - readOnly: true, - type: { - name: "String", - }, - }, - routesReceived: { - serializedName: "routesReceived", - readOnly: true, - type: { - name: "Number", - }, - }, - messagesSent: { - serializedName: "messagesSent", - readOnly: true, - type: { - name: "Number", - }, - }, - messagesReceived: { - serializedName: "messagesReceived", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const RadiusAuthServerListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RadiusAuthServerListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RadiusAuthServer", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RadiusAuthServer: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RadiusAuthServer", - modelProperties: { - radiusServerAddress: { - serializedName: "radiusServerAddress", - type: { - name: "String", - }, - }, - radiusServerSecret: { - serializedName: "radiusServerSecret", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayRouteListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GatewayRouteListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayRoute", - }, - }, - }, - }, - }, - }, -}; - -export const GatewayRoute: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GatewayRoute", - modelProperties: { - localAddress: { - serializedName: "localAddress", - readOnly: true, - type: { - name: "String", - }, - }, - network: { - serializedName: "network", - readOnly: true, - type: { - name: "String", - }, - }, - nextHop: { - serializedName: "nextHop", - readOnly: true, - type: { - name: "String", - }, - }, - sourcePeer: { - serializedName: "sourcePeer", - readOnly: true, - type: { - name: "String", - }, - }, - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String", - }, - }, - asPath: { - serializedName: "asPath", - readOnly: true, - type: { - name: "String", - }, - }, - weight: { - serializedName: "weight", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const GatewayResiliencyInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GatewayResiliencyInformation", - modelProperties: { - overallScore: { - serializedName: "overallScore", - type: { - name: "String", - }, - }, - scoreChange: { - serializedName: "scoreChange", - type: { - name: "String", - }, - }, - minScoreFromRecommendations: { - serializedName: "minScoreFromRecommendations", - type: { - name: "String", - }, - }, - maxScoreFromRecommendations: { - serializedName: "maxScoreFromRecommendations", - type: { - name: "String", - }, - }, - lastComputedTime: { - serializedName: "lastComputedTime", - type: { - name: "DateTime", - }, - }, - nextEligibleComputeTime: { - serializedName: "nextEligibleComputeTime", - type: { - name: "DateTime", - }, - }, - components: { - serializedName: "components", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResiliencyRecommendationComponents", - }, - }, - }, - }, - }, - }, -}; - -export const ResiliencyRecommendationComponents: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResiliencyRecommendationComponents", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - currentScore: { - serializedName: "currentScore", - type: { - name: "String", - }, - }, - maxScore: { - serializedName: "maxScore", - type: { - name: "String", - }, - }, - recommendations: { - serializedName: "recommendations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayResiliencyRecommendation", - }, - }, - }, - }, - }, - }, -}; - -export const GatewayResiliencyRecommendation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GatewayResiliencyRecommendation", - modelProperties: { - recommendationTitle: { - serializedName: "recommendationTitle", - type: { - name: "String", - }, - }, - recommendationId: { - serializedName: "recommendationId", - type: { - name: "String", - }, - }, - severity: { - serializedName: "severity", - type: { - name: "String", - }, - }, - recommendationText: { - serializedName: "recommendationText", - type: { - name: "String", - }, - }, - callToActionText: { - serializedName: "callToActionText", - type: { - name: "String", - }, - }, - callToActionLink: { - serializedName: "callToActionLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayRouteSetsInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GatewayRouteSetsInformation", - modelProperties: { - lastComputedTime: { - serializedName: "lastComputedTime", - type: { - name: "DateTime", - }, - }, - nextEligibleComputeTime: { - serializedName: "nextEligibleComputeTime", - type: { - name: "DateTime", - }, - }, - routeSetVersion: { - serializedName: "routeSetVersion", - type: { - name: "String", - }, - }, - routeSets: { - serializedName: "routeSets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayRouteSet", - }, - }, - }, - }, - circuitsMetadataMap: { - serializedName: "circuitsMetadataMap", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "CircuitMetadataMap" }, - }, - }, - }, - }, - }, -}; - -export const GatewayRouteSet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GatewayRouteSet", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - locations: { - serializedName: "locations", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - details: { - serializedName: "details", - type: { - name: "Dictionary", - value: { - type: { - name: "Sequence", - element: { - type: { name: "Composite", className: "RouteSourceDetails" }, - }, - }, - }, - }, - }, - }, - }, -}; - -export const RouteSourceDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteSourceDetails", - modelProperties: { - circuit: { - serializedName: "circuit", - type: { - name: "String", - }, - }, - pri: { - serializedName: "pri", - type: { - name: "String", - }, - }, - sec: { - serializedName: "sec", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CircuitMetadataMap: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CircuitMetadataMap", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - link: { - serializedName: "link", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnClientIPsecParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnClientIPsecParameters", - modelProperties: { - saLifeTimeSeconds: { - serializedName: "saLifeTimeSeconds", - required: true, - type: { - name: "Number", - }, - }, - saDataSizeKilobytes: { - serializedName: "saDataSizeKilobytes", - required: true, - type: { - name: "Number", - }, - }, - ipsecEncryption: { - serializedName: "ipsecEncryption", - required: true, - type: { - name: "String", - }, - }, - ipsecIntegrity: { - serializedName: "ipsecIntegrity", - required: true, - type: { - name: "String", - }, - }, - ikeEncryption: { - serializedName: "ikeEncryption", - required: true, - type: { - name: "String", - }, - }, - ikeIntegrity: { - serializedName: "ikeIntegrity", - required: true, - type: { - name: "String", - }, - }, - dhGroup: { - serializedName: "dhGroup", - required: true, - type: { - name: "String", - }, - }, - pfsGroup: { - serializedName: "pfsGroup", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnDeviceScriptParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnDeviceScriptParameters", - modelProperties: { - vendor: { - serializedName: "vendor", - type: { - name: "String", - }, - }, - deviceFamily: { - serializedName: "deviceFamily", - type: { - name: "String", - }, - }, - firmwareVersion: { - serializedName: "firmwareVersion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnPacketCaptureStartParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnPacketCaptureStartParameters", - modelProperties: { - filterData: { - serializedName: "filterData", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnPacketCaptureStopParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnPacketCaptureStopParameters", - modelProperties: { - sasUrl: { - serializedName: "sasUrl", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteFailoverTestDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteFailoverTestDetails", - modelProperties: { - peeringLocation: { - serializedName: "peeringLocation", - type: { - name: "String", - }, - }, - circuits: { - serializedName: "circuits", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteFailoverCircuitResourceDetails", - }, - }, - }, - }, - status: { - serializedName: "status", - type: { - name: "String", - }, - }, - startTime: { - serializedName: "startTime", - type: { - name: "String", - }, - }, - endTime: { - serializedName: "endTime", - type: { - name: "String", - }, - }, - connections: { - serializedName: "connections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteFailoverConnectionResourceDetails", - }, - }, - }, - }, - testGuid: { - serializedName: "testGuid", - type: { - name: "String", - }, - }, - testType: { - serializedName: "testType", - type: { - name: "String", - }, - }, - issues: { - serializedName: "issues", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ExpressRouteFailoverCircuitResourceDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteFailoverCircuitResourceDetails", - modelProperties: { - nrpResourceUri: { - serializedName: "nrpResourceUri", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - connectionName: { - serializedName: "connectionName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteFailoverConnectionResourceDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteFailoverConnectionResourceDetails", - modelProperties: { - nrpResourceUri: { - serializedName: "nrpResourceUri", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - type: { - name: "String", - }, - }, - lastUpdatedTime: { - serializedName: "lastUpdatedTime", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteFailoverSingleTestDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteFailoverSingleTestDetails", - modelProperties: { - peeringLocation: { - serializedName: "peeringLocation", - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - type: { - name: "String", - }, - }, - startTimeUtc: { - serializedName: "startTimeUtc", - type: { - name: "String", - }, - }, - endTimeUtc: { - serializedName: "endTimeUtc", - type: { - name: "String", - }, - }, - redundantRoutes: { - serializedName: "redundantRoutes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteFailoverRedundantRoute", - }, - }, - }, - }, - nonRedundantRoutes: { - serializedName: "nonRedundantRoutes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - wasSimulationSuccessful: { - serializedName: "wasSimulationSuccessful", - type: { - name: "Boolean", - }, - }, - failoverConnectionDetails: { - serializedName: "failoverConnectionDetails", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FailoverConnectionDetails", - }, - }, - }, - }, - }, - }, -}; - -export const ExpressRouteFailoverRedundantRoute: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteFailoverRedundantRoute", - modelProperties: { - peeringLocations: { - serializedName: "peeringLocations", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - routes: { - serializedName: "routes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const FailoverConnectionDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FailoverConnectionDetails", - modelProperties: { - failoverConnectionName: { - serializedName: "failoverConnectionName", - type: { - name: "String", - }, - }, - failoverLocation: { - serializedName: "failoverLocation", - type: { - name: "String", - }, - }, - isVerified: { - serializedName: "isVerified", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ExpressRouteFailoverStopApiParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteFailoverStopApiParameters", - modelProperties: { - peeringLocation: { - serializedName: "peeringLocation", - type: { - name: "String", - }, - }, - wasSimulationSuccessful: { - serializedName: "wasSimulationSuccessful", - type: { - name: "Boolean", - }, - }, - details: { - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FailoverConnectionDetails", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayConnectionTunnelProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayConnectionTunnelProperties", - modelProperties: { - tunnelIpAddress: { - serializedName: "tunnelIpAddress", - type: { - name: "String", - }, - }, - bgpPeeringAddress: { - serializedName: "bgpPeeringAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CertificateAuthentication: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CertificateAuthentication", - modelProperties: { - outboundAuthCertificate: { - serializedName: "outboundAuthCertificate", - type: { - name: "String", - }, - }, - inboundAuthCertificateSubjectName: { - serializedName: "inboundAuthCertificateSubjectName", - type: { - name: "String", - }, - }, - inboundAuthCertificateChain: { - serializedName: "inboundAuthCertificateChain", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkGatewayConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionResetSharedKey: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionResetSharedKey", - modelProperties: { - keyLength: { - constraints: { - InclusiveMaximum: 128, - InclusiveMinimum: 1, - }, - serializedName: "keyLength", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const LocalNetworkGatewayListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LocalNetworkGatewayListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LocalNetworkGateway", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnClientConnectionHealthDetailListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnClientConnectionHealthDetailListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnClientConnectionHealthDetail", - }, - }, - }, - }, - }, - }, -}; - -export const VpnClientConnectionHealthDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnClientConnectionHealthDetail", - modelProperties: { - vpnConnectionId: { - serializedName: "vpnConnectionId", - readOnly: true, - type: { - name: "String", - }, - }, - vpnConnectionDuration: { - serializedName: "vpnConnectionDuration", - readOnly: true, - type: { - name: "Number", - }, - }, - vpnConnectionTime: { - serializedName: "vpnConnectionTime", - readOnly: true, - type: { - name: "String", - }, - }, - publicIpAddress: { - serializedName: "publicIpAddress", - readOnly: true, - type: { - name: "String", - }, - }, - privateIpAddress: { - serializedName: "privateIpAddress", - readOnly: true, - type: { - name: "String", - }, - }, - vpnUserName: { - serializedName: "vpnUserName", - readOnly: true, - type: { - name: "String", - }, - }, - maxBandwidth: { - serializedName: "maxBandwidth", - readOnly: true, - type: { - name: "Number", - }, - }, - egressPacketsTransferred: { - serializedName: "egressPacketsTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - egressBytesTransferred: { - serializedName: "egressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - ingressPacketsTransferred: { - serializedName: "ingressPacketsTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - ingressBytesTransferred: { - serializedName: "ingressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - maxPacketsPerSecond: { - serializedName: "maxPacketsPerSecond", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const P2SVpnConnectionRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "P2SVpnConnectionRequest", - modelProperties: { - vpnConnectionIds: { - serializedName: "vpnConnectionIds", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ListVirtualNetworkGatewayNatRulesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVirtualNetworkGatewayNatRulesResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkGatewayNatRule", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayMigrationParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayMigrationParameters", - modelProperties: { - migrationType: { - serializedName: "migrationType", - required: true, - type: { - name: "String", - }, - }, - resourceUrl: { - serializedName: "resourceUrl", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkTapListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkTapListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkTap", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualRouterListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualRouterListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualRouter", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualRouterPeeringListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualRouterPeeringListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualRouterPeering", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListVirtualWANsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVirtualWANsResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualWAN", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DeviceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DeviceProperties", - modelProperties: { - deviceVendor: { - serializedName: "deviceVendor", - type: { - name: "String", - }, - }, - deviceModel: { - serializedName: "deviceModel", - type: { - name: "String", - }, - }, - linkSpeedInMbps: { - serializedName: "linkSpeedInMbps", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VpnLinkProviderProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnLinkProviderProperties", - modelProperties: { - linkProviderName: { - serializedName: "linkProviderName", - type: { - name: "String", - }, - }, - linkSpeedInMbps: { - serializedName: "linkSpeedInMbps", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VpnLinkBgpSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnLinkBgpSettings", - modelProperties: { - asn: { - serializedName: "asn", - type: { - name: "Number", - }, - }, - bgpPeeringAddress: { - serializedName: "bgpPeeringAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const O365PolicyProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "O365PolicyProperties", - modelProperties: { - breakOutCategories: { - serializedName: "breakOutCategories", - type: { - name: "Composite", - className: "O365BreakOutCategoryPolicies", - }, - }, - }, - }, -}; - -export const O365BreakOutCategoryPolicies: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "O365BreakOutCategoryPolicies", - modelProperties: { - allow: { - serializedName: "allow", - type: { - name: "Boolean", - }, - }, - optimize: { - serializedName: "optimize", - type: { - name: "Boolean", - }, - }, - default: { - serializedName: "default", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ListVpnSitesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVpnSitesResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnSite", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListVpnSiteLinksResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVpnSiteLinksResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnSiteLink", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GetVpnSitesConfigurationRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GetVpnSitesConfigurationRequest", - modelProperties: { - vpnSites: { - serializedName: "vpnSites", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - outputBlobSasUrl: { - serializedName: "outputBlobSasUrl", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualWanSecurityProviders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualWanSecurityProviders", - modelProperties: { - supportedProviders: { - serializedName: "supportedProviders", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualWanSecurityProvider", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualWanSecurityProvider: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualWanSecurityProvider", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - url: { - serializedName: "url", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnServerConfigVpnClientRootCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnServerConfigVpnClientRootCertificate", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - publicCertData: { - serializedName: "publicCertData", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnServerConfigVpnClientRevokedCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnServerConfigVpnClientRevokedCertificate", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - thumbprint: { - serializedName: "thumbprint", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnServerConfigRadiusServerRootCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnServerConfigRadiusServerRootCertificate", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - publicCertData: { - serializedName: "publicCertData", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnServerConfigRadiusClientRootCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnServerConfigRadiusClientRootCertificate", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - thumbprint: { - serializedName: "thumbprint", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AadAuthenticationParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AadAuthenticationParameters", - modelProperties: { - aadTenant: { - serializedName: "aadTenant", - type: { - name: "String", - }, - }, - aadAudience: { - serializedName: "aadAudience", - type: { - name: "String", - }, - }, - aadIssuer: { - serializedName: "aadIssuer", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingConfiguration", - modelProperties: { - associatedRouteTable: { - serializedName: "associatedRouteTable", - type: { - name: "Composite", - className: "SubResource", - }, - }, - propagatedRouteTables: { - serializedName: "propagatedRouteTables", - type: { - name: "Composite", - className: "PropagatedRouteTable", - }, - }, - vnetRoutes: { - serializedName: "vnetRoutes", - type: { - name: "Composite", - className: "VnetRoute", - }, - }, - inboundRouteMap: { - serializedName: "inboundRouteMap", - type: { - name: "Composite", - className: "SubResource", - }, - }, - outboundRouteMap: { - serializedName: "outboundRouteMap", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const PropagatedRouteTable: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PropagatedRouteTable", - modelProperties: { - labels: { - serializedName: "labels", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - ids: { - serializedName: "ids", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - }, - }, -}; - -export const VnetRoute: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VnetRoute", - modelProperties: { - staticRoutesConfig: { - serializedName: "staticRoutesConfig", - type: { - name: "Composite", - className: "StaticRoutesConfig", - }, - }, - staticRoutes: { - serializedName: "staticRoutes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StaticRoute", - }, - }, - }, - }, - bgpConnections: { - serializedName: "bgpConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - }, - }, -}; - -export const StaticRoutesConfig: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StaticRoutesConfig", - modelProperties: { - propagateStaticRoutes: { - serializedName: "propagateStaticRoutes", - readOnly: true, - type: { - name: "Boolean", - }, - }, - vnetLocalRouteOverrideCriteria: { - serializedName: "vnetLocalRouteOverrideCriteria", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StaticRoute: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StaticRoute", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - addressPrefixes: { - serializedName: "addressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - nextHopIpAddress: { - serializedName: "nextHopIpAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -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", - className: "VpnClientConnectionHealth", - modelProperties: { - totalIngressBytesTransferred: { - serializedName: "totalIngressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - totalEgressBytesTransferred: { - serializedName: "totalEgressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - vpnClientConnectionsCount: { - serializedName: "vpnClientConnectionsCount", - type: { - name: "Number", - }, - }, - allocatedIpAddresses: { - serializedName: "allocatedIpAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ListVpnServerConfigurationsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVpnServerConfigurationsResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnServerConfiguration", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -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", - className: "VirtualHubRouteTable", - modelProperties: { - routes: { - serializedName: "routes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualHubRoute", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualHubRoute: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualHubRoute", - modelProperties: { - addressPrefixes: { - serializedName: "addressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - nextHopIpAddress: { - serializedName: "nextHopIpAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualHubRouteV2: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualHubRouteV2", - modelProperties: { - destinationType: { - serializedName: "destinationType", - type: { - name: "String", - }, - }, - destinations: { - serializedName: "destinations", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - nextHopType: { - serializedName: "nextHopType", - type: { - name: "String", - }, - }, - nextHops: { - serializedName: "nextHops", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualRouterAutoScaleConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualRouterAutoScaleConfiguration", - modelProperties: { - minCapacity: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "minCapacity", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ListVirtualHubsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVirtualHubsResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualHub", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RouteMapRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteMapRule", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - matchCriteria: { - serializedName: "matchCriteria", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Criterion", - }, - }, - }, - }, - actions: { - serializedName: "actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Action", - }, - }, - }, - }, - nextStepIfMatched: { - serializedName: "nextStepIfMatched", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Criterion: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Criterion", - modelProperties: { - routePrefix: { - serializedName: "routePrefix", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - community: { - serializedName: "community", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - asPath: { - serializedName: "asPath", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - matchCondition: { - serializedName: "matchCondition", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Action: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Action", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - parameters: { - serializedName: "parameters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Parameter", - }, - }, - }, - }, - }, - }, -}; - -export const Parameter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Parameter", - modelProperties: { - routePrefix: { - serializedName: "routePrefix", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - community: { - serializedName: "community", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - asPath: { - serializedName: "asPath", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ListRouteMapsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListRouteMapsResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RouteMap", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListHubVirtualNetworkConnectionsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListHubVirtualNetworkConnectionsResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HubVirtualNetworkConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnGatewayIpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnGatewayIpConfiguration", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - publicIpAddress: { - serializedName: "publicIpAddress", - type: { - name: "String", - }, - }, - privateIpAddress: { - serializedName: "privateIpAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnGatewayPacketCaptureStartParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnGatewayPacketCaptureStartParameters", - modelProperties: { - filterData: { - serializedName: "filterData", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnGatewayPacketCaptureStopParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnGatewayPacketCaptureStopParameters", - modelProperties: { - sasUrl: { - serializedName: "sasUrl", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionSharedKeyResultList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionSharedKeyResultList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionSharedKeyResult", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SharedKeyProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SharedKeyProperties", - modelProperties: { - sharedKey: { - serializedName: "sharedKey", - type: { - name: "String", - }, - }, - sharedKeyLength: { - constraints: { - InclusiveMaximum: 128, - InclusiveMinimum: 1, - }, - serializedName: "sharedKeyLength", - type: { - name: "Number", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListVpnGatewaysResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVpnGatewaysResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnGateway", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnConnectionPacketCaptureStartParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnConnectionPacketCaptureStartParameters", - modelProperties: { - filterData: { - serializedName: "filterData", - type: { - name: "String", - }, - }, - linkConnectionNames: { - serializedName: "linkConnectionNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const VpnConnectionPacketCaptureStopParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnConnectionPacketCaptureStopParameters", - modelProperties: { - sasUrl: { - serializedName: "sasUrl", - type: { - name: "String", - }, - }, - linkConnectionNames: { - serializedName: "linkConnectionNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ListVpnConnectionsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVpnConnectionsResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListVpnSiteLinkConnectionsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVpnSiteLinkConnectionsResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnSiteLinkConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListVpnGatewayNatRulesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVpnGatewayNatRulesResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnGatewayNatRule", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListP2SVpnGatewaysResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListP2SVpnGatewaysResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "P2SVpnGateway", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const P2SVpnProfileParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "P2SVpnProfileParameters", - modelProperties: { - authenticationMethod: { - serializedName: "authenticationMethod", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnProfileResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnProfileResponse", - modelProperties: { - profileUrl: { - serializedName: "profileUrl", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const P2SVpnConnectionHealthRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "P2SVpnConnectionHealthRequest", - modelProperties: { - vpnUserNamesFilter: { - serializedName: "vpnUserNamesFilter", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - outputBlobSasUrl: { - serializedName: "outputBlobSasUrl", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const P2SVpnConnectionHealth: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "P2SVpnConnectionHealth", - modelProperties: { - sasUrl: { - serializedName: "sasUrl", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnServerConfigurationsResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnServerConfigurationsResponse", - modelProperties: { - vpnServerConfigurationResourceIds: { - serializedName: "vpnServerConfigurationResourceIds", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualWanVpnProfileParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualWanVpnProfileParameters", - modelProperties: { - vpnServerConfigurationResourceId: { - serializedName: "vpnServerConfigurationResourceId", - type: { - name: "String", - }, - }, - authenticationMethod: { - serializedName: "authenticationMethod", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListVirtualHubRouteTableV2SResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVirtualHubRouteTableV2SResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualHubRouteTableV2", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteGatewayList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteGatewayList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteGateway", - }, - }, - }, - }, - }, - }, -}; - -export const ExpressRouteGatewayPropertiesAutoScaleConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteGatewayPropertiesAutoScaleConfiguration", - modelProperties: { - bounds: { - serializedName: "bounds", - type: { - name: "Composite", - className: "ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds", - }, - }, - }, - }, -}; - -export const ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds", - modelProperties: { - min: { - serializedName: "min", - type: { - name: "Number", - }, - }, - max: { - serializedName: "max", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const ExpressRouteCircuitPeeringId: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitPeeringId", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualHubId: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualHubId", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteConnectionList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteConnectionList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteConnection", - }, - }, - }, - }, - }, - }, -}; - -export const NetworkVirtualApplianceConnectionList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualApplianceConnectionList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkVirtualApplianceConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListVirtualHubBgpConnectionResults: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVirtualHubBgpConnectionResults", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BgpConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PeerRoute: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PeerRoute", - modelProperties: { - localAddress: { - serializedName: "localAddress", - readOnly: true, - type: { - name: "String", - }, - }, - network: { - serializedName: "network", - readOnly: true, - type: { - name: "String", - }, - }, - nextHop: { - serializedName: "nextHop", - readOnly: true, - type: { - name: "String", - }, - }, - sourcePeer: { - serializedName: "sourcePeer", - readOnly: true, - type: { - name: "String", - }, - }, - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String", - }, - }, - asPath: { - serializedName: "asPath", - readOnly: true, - type: { - name: "String", - }, - }, - weight: { - serializedName: "weight", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ListVirtualHubIpConfigurationResults: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListVirtualHubIpConfigurationResults", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HubIpConfiguration", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HubRoute: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HubRoute", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - destinationType: { - serializedName: "destinationType", - required: true, - type: { - name: "String", - }, - }, - destinations: { - serializedName: "destinations", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - nextHopType: { - serializedName: "nextHopType", - required: true, - type: { - name: "String", - }, - }, - nextHop: { - serializedName: "nextHop", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListHubRouteTablesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListHubRouteTablesResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HubRouteTable", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EffectiveRoutesParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EffectiveRoutesParameters", - modelProperties: { - resourceId: { - serializedName: "resourceId", - type: { - name: "String", - }, - }, - virtualWanResourceType: { - serializedName: "virtualWanResourceType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualHubEffectiveRouteList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualHubEffectiveRouteList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualHubEffectiveRoute", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualHubEffectiveRoute: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualHubEffectiveRoute", - modelProperties: { - addressPrefixes: { - serializedName: "addressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - nextHops: { - serializedName: "nextHops", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - nextHopType: { - serializedName: "nextHopType", - type: { - name: "String", - }, - }, - asPath: { - serializedName: "asPath", - type: { - name: "String", - }, - }, - routeOrigin: { - serializedName: "routeOrigin", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GetInboundRoutesParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GetInboundRoutesParameters", - modelProperties: { - resourceUri: { - serializedName: "resourceUri", - type: { - name: "String", - }, - }, - connectionType: { - serializedName: "connectionType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EffectiveRouteMapRouteList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EffectiveRouteMapRouteList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EffectiveRouteMapRoute", - }, - }, - }, - }, - }, - }, -}; - -export const EffectiveRouteMapRoute: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EffectiveRouteMapRoute", - modelProperties: { - prefix: { - serializedName: "prefix", - type: { - name: "String", - }, - }, - bgpCommunities: { - serializedName: "bgpCommunities", - type: { - name: "String", - }, - }, - asPath: { - serializedName: "asPath", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GetOutboundRoutesParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GetOutboundRoutesParameters", - modelProperties: { - resourceUri: { - serializedName: "resourceUri", - type: { - name: "String", - }, - }, - connectionType: { - serializedName: "connectionType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingPolicy", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - destinations: { - serializedName: "destinations", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - nextHop: { - serializedName: "nextHop", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListRoutingIntentResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListRoutingIntentResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RoutingIntent", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WebApplicationFirewallPolicyListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WebApplicationFirewallPolicyListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WebApplicationFirewallPolicy", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicySettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PolicySettings", - modelProperties: { - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - mode: { - serializedName: "mode", - type: { - name: "String", - }, - }, - requestBodyCheck: { - serializedName: "requestBodyCheck", - type: { - name: "Boolean", - }, - }, - requestBodyInspectLimitInKB: { - serializedName: "requestBodyInspectLimitInKB", - type: { - name: "Number", - }, - }, - requestBodyEnforcement: { - defaultValue: true, - serializedName: "requestBodyEnforcement", - type: { - name: "Boolean", - }, - }, - maxRequestBodySizeInKb: { - constraints: { - InclusiveMinimum: 8, - }, - serializedName: "maxRequestBodySizeInKb", - type: { - name: "Number", - }, - }, - fileUploadEnforcement: { - defaultValue: true, - serializedName: "fileUploadEnforcement", - type: { - name: "Boolean", - }, - }, - fileUploadLimitInMb: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "fileUploadLimitInMb", - type: { - name: "Number", - }, - }, - customBlockResponseStatusCode: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "customBlockResponseStatusCode", - type: { - name: "Number", - }, - }, - customBlockResponseBody: { - constraints: { - Pattern: new RegExp( - "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", - ), - MaxLength: 32768, - }, - serializedName: "customBlockResponseBody", - type: { - name: "String", - }, - }, - logScrubbing: { - serializedName: "logScrubbing", - type: { - name: "Composite", - className: "PolicySettingsLogScrubbing", - }, - }, - jsChallengeCookieExpirationInMins: { - constraints: { - InclusiveMaximum: 1440, - InclusiveMinimum: 5, - }, - serializedName: "jsChallengeCookieExpirationInMins", - type: { - name: "Number", - }, - }, - captchaCookieExpirationInMins: { - constraints: { - InclusiveMaximum: 1440, - InclusiveMinimum: 5, - }, - serializedName: "captchaCookieExpirationInMins", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PolicySettingsLogScrubbing: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PolicySettingsLogScrubbing", - modelProperties: { - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - scrubbingRules: { - serializedName: "scrubbingRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WebApplicationFirewallScrubbingRules", - }, - }, - }, - }, - }, - }, -}; - -export const WebApplicationFirewallScrubbingRules: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WebApplicationFirewallScrubbingRules", - modelProperties: { - matchVariable: { - serializedName: "matchVariable", - required: true, - type: { - name: "String", - }, - }, - selectorMatchOperator: { - serializedName: "selectorMatchOperator", - required: true, - type: { - name: "String", - }, - }, - selector: { - serializedName: "selector", - type: { - name: "String", - }, - }, - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WebApplicationFirewallCustomRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WebApplicationFirewallCustomRule", - modelProperties: { - name: { - constraints: { - MaxLength: 128, - }, - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - priority: { - serializedName: "priority", - required: true, - type: { - name: "Number", - }, - }, - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - rateLimitDuration: { - serializedName: "rateLimitDuration", - type: { - name: "String", - }, - }, - rateLimitThreshold: { - serializedName: "rateLimitThreshold", - type: { - name: "Number", - }, - }, - ruleType: { - serializedName: "ruleType", - required: true, - type: { - name: "String", - }, - }, - matchConditions: { - serializedName: "matchConditions", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MatchCondition", - }, - }, - }, - }, - groupByUserSession: { - serializedName: "groupByUserSession", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GroupByUserSession", - }, - }, - }, - }, - action: { - serializedName: "action", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const MatchCondition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MatchCondition", - modelProperties: { - matchVariables: { - serializedName: "matchVariables", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MatchVariable", - }, - }, - }, - }, - operator: { - serializedName: "operator", - required: true, - type: { - name: "String", - }, - }, - negationConditon: { - serializedName: "negationConditon", - type: { - name: "Boolean", - }, - }, - matchValues: { - serializedName: "matchValues", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - transforms: { - serializedName: "transforms", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const MatchVariable: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MatchVariable", - modelProperties: { - variableName: { - serializedName: "variableName", - required: true, - type: { - name: "String", - }, - }, - selector: { - serializedName: "selector", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GroupByUserSession: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GroupByUserSession", - modelProperties: { - groupByVariables: { - serializedName: "groupByVariables", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GroupByVariable", - }, - }, - }, - }, - }, - }, -}; - -export const GroupByVariable: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GroupByVariable", - modelProperties: { - variableName: { - serializedName: "variableName", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ManagedRulesDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedRulesDefinition", - modelProperties: { - exceptions: { - serializedName: "exceptions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExceptionEntry", - }, - }, - }, - }, - exclusions: { - serializedName: "exclusions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OwaspCrsExclusionEntry", - }, - }, - }, - }, - managedRuleSets: { - serializedName: "managedRuleSets", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedRuleSet", - }, - }, - }, - }, - }, - }, -}; - -export const ExceptionEntry: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExceptionEntry", - modelProperties: { - matchVariable: { - serializedName: "matchVariable", - required: true, - type: { - name: "String", - }, - }, - values: { - serializedName: "values", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - valueMatchOperator: { - serializedName: "valueMatchOperator", - required: true, - type: { - name: "String", - }, - }, - selectorMatchOperator: { - serializedName: "selectorMatchOperator", - type: { - name: "String", - }, - }, - selector: { - serializedName: "selector", - type: { - name: "String", - }, - }, - exceptionManagedRuleSets: { - serializedName: "exceptionManagedRuleSets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExclusionManagedRuleSet", - }, - }, - }, - }, - }, - }, -}; - -export const ExclusionManagedRuleSet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExclusionManagedRuleSet", - modelProperties: { - ruleSetType: { - serializedName: "ruleSetType", - required: true, - type: { - name: "String", - }, - }, - ruleSetVersion: { - serializedName: "ruleSetVersion", - required: true, - type: { - name: "String", - }, - }, - ruleGroups: { - serializedName: "ruleGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExclusionManagedRuleGroup", - }, - }, - }, - }, - }, - }, -}; - -export const ExclusionManagedRuleGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExclusionManagedRuleGroup", - modelProperties: { - ruleGroupName: { - serializedName: "ruleGroupName", - required: true, - type: { - name: "String", - }, - }, - rules: { - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExclusionManagedRule", - }, - }, - }, - }, - }, - }, -}; - -export const ExclusionManagedRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExclusionManagedRule", - modelProperties: { - ruleId: { - serializedName: "ruleId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OwaspCrsExclusionEntry: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OwaspCrsExclusionEntry", - modelProperties: { - matchVariable: { - serializedName: "matchVariable", - required: true, - type: { - name: "String", - }, - }, - selectorMatchOperator: { - serializedName: "selectorMatchOperator", - required: true, - type: { - name: "String", - }, - }, - selector: { - serializedName: "selector", - required: true, - type: { - name: "String", - }, - }, - exclusionManagedRuleSets: { - serializedName: "exclusionManagedRuleSets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExclusionManagedRuleSet", - }, - }, - }, - }, - }, - }, -}; - -export const ManagedRuleSet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedRuleSet", - modelProperties: { - ruleSetType: { - serializedName: "ruleSetType", - required: true, - type: { - name: "String", - }, - }, - ruleSetVersion: { - serializedName: "ruleSetVersion", - required: true, - type: { - name: "String", - }, - }, - ruleGroupOverrides: { - serializedName: "ruleGroupOverrides", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedRuleGroupOverride", - }, - }, - }, - }, - computedDisabledRules: { - serializedName: "computedDisabledRules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedRuleSetRuleGroup", - }, - }, - }, - }, - }, - }, -}; - -export const ManagedRuleGroupOverride: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedRuleGroupOverride", - modelProperties: { - ruleGroupName: { - serializedName: "ruleGroupName", - required: true, - type: { - name: "String", - }, - }, - rules: { - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedRuleOverride", - }, - }, - }, - }, - }, - }, -}; - -export const ManagedRuleOverride: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedRuleOverride", - modelProperties: { - ruleId: { - serializedName: "ruleId", - required: true, - type: { - name: "String", - }, - }, - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - action: { - serializedName: "action", - type: { - name: "String", - }, - }, - sensitivity: { - serializedName: "sensitivity", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ManagedRuleSetRuleGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedRuleSetRuleGroup", - modelProperties: { - ruleGroupName: { - serializedName: "ruleGroupName", - required: true, - type: { - name: "String", - }, - }, - rules: { - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayForContainersReferenceDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayForContainersReferenceDefinition", - modelProperties: { - id: { - serializedName: "id", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicyNatRuleCollectionAction: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyNatRuleCollectionAction", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicyRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyRule", - uberParent: "FirewallPolicyRule", - polymorphicDiscriminator: { - serializedName: "ruleType", - clientName: "ruleType", - }, - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - ruleType: { - serializedName: "ruleType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicyFilterRuleCollectionAction: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyFilterRuleCollectionAction", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicyRuleApplicationProtocol: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyRuleApplicationProtocol", - modelProperties: { - protocolType: { - serializedName: "protocolType", - type: { - name: "String", - }, - }, - port: { - constraints: { - InclusiveMaximum: 64000, - InclusiveMinimum: 0, - }, - serializedName: "port", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const FirewallPolicyHttpHeaderToInsert: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyHttpHeaderToInsert", - modelProperties: { - headerName: { - serializedName: "headerName", - type: { - name: "String", - }, - }, - headerValue: { - serializedName: "headerValue", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureAsyncOperationResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureAsyncOperationResult", - modelProperties: { - status: { - serializedName: "status", - type: { - name: "String", - }, - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorModel", - }, - }, - }, - }, -}; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionStateSnapshot: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionStateSnapshot", - modelProperties: { - connectionState: { - serializedName: "connectionState", - type: { - name: "String", - }, - }, - startTime: { - serializedName: "startTime", - type: { - name: "DateTime", - }, - }, - endTime: { - serializedName: "endTime", - type: { - name: "DateTime", - }, - }, - evaluationState: { - serializedName: "evaluationState", - type: { - name: "String", - }, - }, - avgLatencyInMs: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "avgLatencyInMs", - type: { - name: "Number", - }, - }, - minLatencyInMs: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "minLatencyInMs", - type: { - name: "Number", - }, - }, - maxLatencyInMs: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "maxLatencyInMs", - type: { - name: "Number", - }, - }, - probesSent: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "probesSent", - type: { - name: "Number", - }, - }, - probesFailed: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "probesFailed", - type: { - name: "Number", - }, - }, - hops: { - serializedName: "hops", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityHop", - }, - }, - }, - }, - }, - }, -}; - -export const ConnectionMonitorQueryResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorQueryResult", - modelProperties: { - sourceStatus: { - serializedName: "sourceStatus", - type: { - name: "String", - }, - }, - states: { - serializedName: "states", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionStateSnapshot", - }, - }, - }, - }, - }, - }, -}; - -export const VpnSiteId: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnSiteId", - modelProperties: { - vpnSite: { - serializedName: "vpnSite", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayIPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayIPConfiguration", - 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", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayAuthenticationCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayAuthenticationCertificate", - 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", - }, - }, - data: { - serializedName: "properties.data", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayTrustedRootCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayTrustedRootCertificate", - 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", - }, - }, - data: { - serializedName: "properties.data", - type: { - name: "String", - }, - }, - keyVaultSecretId: { - serializedName: "properties.keyVaultSecretId", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayTrustedClientCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayTrustedClientCertificate", - 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", - }, - }, - data: { - serializedName: "properties.data", - type: { - name: "String", - }, - }, - validatedCertData: { - serializedName: "properties.validatedCertData", - readOnly: true, - type: { - name: "String", - }, - }, - clientCertIssuerDN: { - serializedName: "properties.clientCertIssuerDN", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewaySslCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewaySslCertificate", - 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", - }, - }, - data: { - serializedName: "properties.data", - type: { - name: "String", - }, - }, - password: { - serializedName: "properties.password", - type: { - name: "String", - }, - }, - publicCertData: { - serializedName: "properties.publicCertData", - readOnly: true, - type: { - name: "String", - }, - }, - keyVaultSecretId: { - serializedName: "properties.keyVaultSecretId", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayFrontendIPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayFrontendIPConfiguration", - 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", - }, - }, - privateIPAddress: { - serializedName: "properties.privateIPAddress", - type: { - name: "String", - }, - }, - privateIPAllocationMethod: { - serializedName: "properties.privateIPAllocationMethod", - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - publicIPAddress: { - serializedName: "properties.publicIPAddress", - type: { - name: "Composite", - className: "SubResource", - }, - }, - privateLinkConfiguration: { - serializedName: "properties.privateLinkConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayFrontendPort: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayFrontendPort", - 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", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayProbe: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayProbe", - 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", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - host: { - serializedName: "properties.host", - type: { - name: "String", - }, - }, - path: { - serializedName: "properties.path", - type: { - name: "String", - }, - }, - interval: { - serializedName: "properties.interval", - type: { - name: "Number", - }, - }, - timeout: { - serializedName: "properties.timeout", - type: { - name: "Number", - }, - }, - unhealthyThreshold: { - serializedName: "properties.unhealthyThreshold", - type: { - name: "Number", - }, - }, - pickHostNameFromBackendHttpSettings: { - serializedName: "properties.pickHostNameFromBackendHttpSettings", - type: { - name: "Boolean", - }, - }, - pickHostNameFromBackendSettings: { - serializedName: "properties.pickHostNameFromBackendSettings", - type: { - name: "Boolean", - }, - }, - minServers: { - serializedName: "properties.minServers", - type: { - name: "Number", - }, - }, - match: { - serializedName: "properties.match", - type: { - name: "Composite", - className: "ApplicationGatewayProbeHealthResponseMatch", - }, - }, - enableProbeProxyProtocolHeader: { - serializedName: "properties.enableProbeProxyProtocolHeader", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1, - }, - serializedName: "properties.port", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const NetworkInterfaceTapConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceTapConfiguration", - 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", - }, - }, - virtualNetworkTap: { - serializedName: "properties.virtualNetworkTap", - type: { - name: "Composite", - className: "VirtualNetworkTap", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityRule", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - sourcePortRange: { - serializedName: "properties.sourcePortRange", - type: { - name: "String", - }, - }, - destinationPortRange: { - serializedName: "properties.destinationPortRange", - type: { - name: "String", - }, - }, - sourceAddressPrefix: { - serializedName: "properties.sourceAddressPrefix", - type: { - name: "String", - }, - }, - sourceAddressPrefixes: { - serializedName: "properties.sourceAddressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceApplicationSecurityGroups: { - serializedName: "properties.sourceApplicationSecurityGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationSecurityGroup", - }, - }, - }, - }, - destinationAddressPrefix: { - serializedName: "properties.destinationAddressPrefix", - type: { - name: "String", - }, - }, - destinationAddressPrefixes: { - serializedName: "properties.destinationAddressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationApplicationSecurityGroups: { - serializedName: "properties.destinationApplicationSecurityGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationSecurityGroup", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "properties.sourcePortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "properties.destinationPortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - access: { - serializedName: "properties.access", - type: { - name: "String", - }, - }, - priority: { - serializedName: "properties.priority", - type: { - name: "Number", - }, - }, - direction: { - serializedName: "properties.direction", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateLinkServiceConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkServiceConnection", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - privateLinkServiceId: { - serializedName: "properties.privateLinkServiceId", - type: { - name: "String", - }, - }, - groupIds: { - serializedName: "properties.groupIds", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - requestMessage: { - serializedName: "properties.requestMessage", - type: { - name: "String", - }, - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - }, - }, - }, - }, -}; - -export const PrivateLinkServiceIpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkServiceIpConfiguration", - 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", - }, - }, - privateIPAddress: { - serializedName: "properties.privateIPAddress", - type: { - name: "String", - }, - }, - privateIPAllocationMethod: { - serializedName: "properties.privateIPAllocationMethod", - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "Subnet", - }, - }, - primary: { - serializedName: "properties.primary", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - privateIPAddressVersion: { - serializedName: "properties.privateIPAddressVersion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateEndpointConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint", - }, - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - linkIdentifier: { - serializedName: "properties.linkIdentifier", - readOnly: true, - type: { - name: "String", - }, - }, - privateEndpointLocation: { - serializedName: "properties.privateEndpointLocation", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Route: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Route", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - addressPrefix: { - serializedName: "properties.addressPrefix", - type: { - name: "String", - }, - }, - nextHopType: { - serializedName: "properties.nextHopType", - type: { - name: "String", - }, - }, - nextHopIpAddress: { - serializedName: "properties.nextHopIpAddress", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - hasBgpOverride: { - serializedName: "properties.hasBgpOverride", - readOnly: true, - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ServiceEndpointPolicyDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceEndpointPolicyDefinition", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - service: { - serializedName: "properties.service", - type: { - name: "String", - }, - }, - serviceResources: { - serializedName: "properties.serviceResources", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IPConfiguration", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - privateIPAddress: { - serializedName: "properties.privateIPAddress", - type: { - name: "String", - }, - }, - privateIPAllocationMethod: { - serializedName: "properties.privateIPAllocationMethod", - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "Subnet", - }, - }, - publicIPAddress: { - serializedName: "properties.publicIPAddress", - type: { - name: "Composite", - className: "PublicIPAddress", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IPConfigurationProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IPConfigurationProfile", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "Subnet", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResourceNavigationLink: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceNavigationLink", - 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", - }, - }, - linkedResourceType: { - serializedName: "properties.linkedResourceType", - type: { - name: "String", - }, - }, - link: { - serializedName: "properties.link", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceAssociationLink: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceAssociationLink", - 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", - }, - }, - linkedResourceType: { - serializedName: "properties.linkedResourceType", - type: { - name: "String", - }, - }, - link: { - serializedName: "properties.link", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - allowDelete: { - serializedName: "properties.allowDelete", - type: { - name: "Boolean", - }, - }, - locations: { - serializedName: "properties.locations", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const Delegation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Delegation", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - serviceName: { - serializedName: "properties.serviceName", - type: { - name: "String", - }, - }, - actions: { - serializedName: "properties.actions", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Subnet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Subnet", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - addressPrefix: { - serializedName: "properties.addressPrefix", - type: { - name: "String", - }, - }, - addressPrefixes: { - serializedName: "properties.addressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - networkSecurityGroup: { - serializedName: "properties.networkSecurityGroup", - type: { - name: "Composite", - className: "NetworkSecurityGroup", - }, - }, - routeTable: { - serializedName: "properties.routeTable", - type: { - name: "Composite", - className: "RouteTable", - }, - }, - natGateway: { - serializedName: "properties.natGateway", - type: { - name: "Composite", - className: "SubResource", - }, - }, - serviceEndpoints: { - serializedName: "properties.serviceEndpoints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceEndpointPropertiesFormat", - }, - }, - }, - }, - serviceEndpointPolicies: { - serializedName: "properties.serviceEndpointPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceEndpointPolicy", - }, - }, - }, - }, - privateEndpoints: { - serializedName: "properties.privateEndpoints", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpoint", - }, - }, - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IPConfiguration", - }, - }, - }, - }, - ipConfigurationProfiles: { - serializedName: "properties.ipConfigurationProfiles", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IPConfigurationProfile", - }, - }, - }, - }, - ipAllocations: { - serializedName: "properties.ipAllocations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - resourceNavigationLinks: { - serializedName: "properties.resourceNavigationLinks", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceNavigationLink", - }, - }, - }, - }, - serviceAssociationLinks: { - serializedName: "properties.serviceAssociationLinks", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceAssociationLink", - }, - }, - }, - }, - delegations: { - serializedName: "properties.delegations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Delegation", - }, - }, - }, - }, - purpose: { - serializedName: "properties.purpose", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - privateEndpointNetworkPolicies: { - defaultValue: "Disabled", - serializedName: "properties.privateEndpointNetworkPolicies", - type: { - name: "String", - }, - }, - privateLinkServiceNetworkPolicies: { - defaultValue: "Enabled", - serializedName: "properties.privateLinkServiceNetworkPolicies", - type: { - name: "String", - }, - }, - applicationGatewayIPConfigurations: { - serializedName: "properties.applicationGatewayIPConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayIPConfiguration", - }, - }, - }, - }, - sharingScope: { - serializedName: "properties.sharingScope", - type: { - name: "String", - }, - }, - defaultOutboundAccess: { - serializedName: "properties.defaultOutboundAccess", - type: { - name: "Boolean", - }, - }, - ipamPoolPrefixAllocations: { - serializedName: "properties.ipamPoolPrefixAllocations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpamPoolPrefixAllocation", - }, - }, - }, - }, - serviceGateway: { - serializedName: "properties.serviceGateway", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const FrontendIPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FrontendIPConfiguration", - 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", - }, - }, - zones: { - serializedName: "zones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - inboundNatRules: { - serializedName: "properties.inboundNatRules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - inboundNatPools: { - serializedName: "properties.inboundNatPools", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - outboundRules: { - serializedName: "properties.outboundRules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - loadBalancingRules: { - serializedName: "properties.loadBalancingRules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - privateIPAddress: { - serializedName: "properties.privateIPAddress", - type: { - name: "String", - }, - }, - privateIPAllocationMethod: { - serializedName: "properties.privateIPAllocationMethod", - type: { - name: "String", - }, - }, - privateIPAddressVersion: { - serializedName: "properties.privateIPAddressVersion", - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "Subnet", - }, - }, - publicIPAddress: { - serializedName: "properties.publicIPAddress", - type: { - name: "Composite", - className: "PublicIPAddress", - }, - }, - publicIPPrefix: { - serializedName: "properties.publicIPPrefix", - type: { - name: "Composite", - className: "SubResource", - }, - }, - gatewayLoadBalancer: { - serializedName: "properties.gatewayLoadBalancer", - type: { - name: "Composite", - className: "SubResource", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendAddressPool: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BackendAddressPool", - 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", - }, - }, - location: { - serializedName: "properties.location", - type: { - name: "String", - }, - }, - tunnelInterfaces: { - serializedName: "properties.tunnelInterfaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayLoadBalancerTunnelInterface", - }, - }, - }, - }, - loadBalancerBackendAddresses: { - serializedName: "properties.loadBalancerBackendAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoadBalancerBackendAddress", - }, - }, - }, - }, - backendIPConfigurations: { - serializedName: "properties.backendIPConfigurations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfaceIPConfiguration", - }, - }, - }, - }, - loadBalancingRules: { - serializedName: "properties.loadBalancingRules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - outboundRule: { - serializedName: "properties.outboundRule", - type: { - name: "Composite", - className: "SubResource", - }, - }, - outboundRules: { - serializedName: "properties.outboundRules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - inboundNatRules: { - serializedName: "properties.inboundNatRules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - drainPeriodInSeconds: { - serializedName: "properties.drainPeriodInSeconds", - type: { - name: "Number", - }, - }, - virtualNetwork: { - serializedName: "properties.virtualNetwork", - type: { - name: "Composite", - className: "SubResource", - }, - }, - syncMode: { - serializedName: "properties.syncMode", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const InboundNatRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InboundNatRule", - 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", - }, - }, - frontendIPConfiguration: { - serializedName: "properties.frontendIPConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - backendIPConfiguration: { - serializedName: "properties.backendIPConfiguration", - type: { - name: "Composite", - className: "NetworkInterfaceIPConfiguration", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - frontendPort: { - serializedName: "properties.frontendPort", - type: { - name: "Number", - }, - }, - backendPort: { - serializedName: "properties.backendPort", - type: { - name: "Number", - }, - }, - idleTimeoutInMinutes: { - serializedName: "properties.idleTimeoutInMinutes", - type: { - name: "Number", - }, - }, - enableFloatingIP: { - serializedName: "properties.enableFloatingIP", - type: { - name: "Boolean", - }, - }, - enableTcpReset: { - serializedName: "properties.enableTcpReset", - type: { - name: "Boolean", - }, - }, - frontendPortRangeStart: { - serializedName: "properties.frontendPortRangeStart", - type: { - name: "Number", - }, - }, - frontendPortRangeEnd: { - serializedName: "properties.frontendPortRangeEnd", - type: { - name: "Number", - }, - }, - backendAddressPool: { - serializedName: "properties.backendAddressPool", - type: { - name: "Composite", - className: "SubResource", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkInterfaceIPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceIPConfiguration", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - gatewayLoadBalancer: { - serializedName: "properties.gatewayLoadBalancer", - type: { - name: "Composite", - className: "SubResource", - }, - }, - virtualNetworkTaps: { - serializedName: "properties.virtualNetworkTaps", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkTap", - }, - }, - }, - }, - applicationGatewayBackendAddressPools: { - serializedName: "properties.applicationGatewayBackendAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayBackendAddressPool", - }, - }, - }, - }, - loadBalancerBackendAddressPools: { - serializedName: "properties.loadBalancerBackendAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BackendAddressPool", - }, - }, - }, - }, - loadBalancerInboundNatRules: { - serializedName: "properties.loadBalancerInboundNatRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InboundNatRule", - }, - }, - }, - }, - privateIPAddress: { - serializedName: "properties.privateIPAddress", - type: { - name: "String", - }, - }, - privateIPAddressPrefixLength: { - constraints: { - InclusiveMaximum: 128, - InclusiveMinimum: 1, - }, - serializedName: "properties.privateIPAddressPrefixLength", - nullable: true, - type: { - name: "Number", - }, - }, - privateIPAllocationMethod: { - serializedName: "properties.privateIPAllocationMethod", - type: { - name: "String", - }, - }, - privateIPAddressVersion: { - serializedName: "properties.privateIPAddressVersion", - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "Subnet", - }, - }, - primary: { - serializedName: "properties.primary", - type: { - name: "Boolean", - }, - }, - publicIPAddress: { - serializedName: "properties.publicIPAddress", - type: { - name: "Composite", - className: "PublicIPAddress", - }, - }, - applicationSecurityGroups: { - serializedName: "properties.applicationSecurityGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationSecurityGroup", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - privateLinkConnectionProperties: { - serializedName: "properties.privateLinkConnectionProperties", - type: { - name: "Composite", - className: "NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties", - }, - }, - }, - }, -}; - -export const ApplicationGatewayBackendAddressPool: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayBackendAddressPool", - 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", - }, - }, - backendIPConfigurations: { - serializedName: "properties.backendIPConfigurations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfaceIPConfiguration", - }, - }, - }, - }, - backendAddresses: { - serializedName: "properties.backendAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayBackendAddress", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayBackendHttpSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayBackendHttpSettings", - 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", - }, - }, - cookieBasedAffinity: { - serializedName: "properties.cookieBasedAffinity", - type: { - name: "String", - }, - }, - requestTimeout: { - serializedName: "properties.requestTimeout", - type: { - name: "Number", - }, - }, - probe: { - serializedName: "properties.probe", - type: { - name: "Composite", - className: "SubResource", - }, - }, - authenticationCertificates: { - serializedName: "properties.authenticationCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - trustedRootCertificates: { - serializedName: "properties.trustedRootCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - connectionDraining: { - serializedName: "properties.connectionDraining", - type: { - name: "Composite", - className: "ApplicationGatewayConnectionDraining", - }, - }, - hostName: { - serializedName: "properties.hostName", - type: { - name: "String", - }, - }, - pickHostNameFromBackendAddress: { - serializedName: "properties.pickHostNameFromBackendAddress", - type: { - name: "Boolean", - }, - }, - affinityCookieName: { - serializedName: "properties.affinityCookieName", - type: { - name: "String", - }, - }, - probeEnabled: { - serializedName: "properties.probeEnabled", - type: { - name: "Boolean", - }, - }, - path: { - serializedName: "properties.path", - type: { - name: "String", - }, - }, - dedicatedBackendConnection: { - serializedName: "properties.dedicatedBackendConnection", - type: { - name: "Boolean", - }, - }, - validateCertChainAndExpiry: { - defaultValue: true, - serializedName: "properties.validateCertChainAndExpiry", - type: { - name: "Boolean", - }, - }, - validateSNI: { - defaultValue: true, - serializedName: "properties.validateSNI", - type: { - name: "Boolean", - }, - }, - sniName: { - serializedName: "properties.sniName", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -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", - }, - }, - enableL4ClientIpPreservation: { - serializedName: "properties.enableL4ClientIpPreservation", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayHttpListener: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayHttpListener", - 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", - }, - }, - frontendIPConfiguration: { - serializedName: "properties.frontendIPConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - frontendPort: { - serializedName: "properties.frontendPort", - type: { - name: "Composite", - className: "SubResource", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - hostName: { - serializedName: "properties.hostName", - type: { - name: "String", - }, - }, - sslCertificate: { - serializedName: "properties.sslCertificate", - type: { - name: "Composite", - className: "SubResource", - }, - }, - sslProfile: { - serializedName: "properties.sslProfile", - type: { - name: "Composite", - className: "SubResource", - }, - }, - requireServerNameIndication: { - serializedName: "properties.requireServerNameIndication", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - customErrorConfigurations: { - serializedName: "properties.customErrorConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayCustomError", - }, - }, - }, - }, - firewallPolicy: { - serializedName: "properties.firewallPolicy", - type: { - name: "Composite", - className: "SubResource", - }, - }, - hostNames: { - serializedName: "properties.hostNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayListener: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayListener", - 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", - }, - }, - frontendIPConfiguration: { - serializedName: "properties.frontendIPConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - frontendPort: { - serializedName: "properties.frontendPort", - type: { - name: "Composite", - className: "SubResource", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - sslCertificate: { - serializedName: "properties.sslCertificate", - type: { - name: "Composite", - className: "SubResource", - }, - }, - sslProfile: { - serializedName: "properties.sslProfile", - type: { - name: "Composite", - className: "SubResource", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - hostNames: { - serializedName: "properties.hostNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewaySslProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewaySslProfile", - 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", - }, - }, - trustedClientCertificates: { - serializedName: "properties.trustedClientCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - 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", - }, - }, - backendHttpSettings: { - serializedName: "properties.backendHttpSettings", - type: { - name: "Composite", - className: "SubResource", - }, - }, - redirectConfiguration: { - serializedName: "properties.redirectConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - rewriteRuleSet: { - serializedName: "properties.rewriteRuleSet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - loadDistributionPolicy: { - serializedName: "properties.loadDistributionPolicy", - type: { - name: "Composite", - className: "SubResource", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - firewallPolicy: { - serializedName: "properties.firewallPolicy", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const ApplicationGatewayUrlPathMap: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayUrlPathMap", - 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", - }, - }, - defaultBackendAddressPool: { - serializedName: "properties.defaultBackendAddressPool", - type: { - name: "Composite", - className: "SubResource", - }, - }, - defaultBackendHttpSettings: { - serializedName: "properties.defaultBackendHttpSettings", - type: { - name: "Composite", - className: "SubResource", - }, - }, - defaultRewriteRuleSet: { - serializedName: "properties.defaultRewriteRuleSet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - defaultRedirectConfiguration: { - serializedName: "properties.defaultRedirectConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - defaultLoadDistributionPolicy: { - serializedName: "properties.defaultLoadDistributionPolicy", - type: { - name: "Composite", - className: "SubResource", - }, - }, - pathRules: { - serializedName: "properties.pathRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayPathRule", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayRequestRoutingRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayRequestRoutingRule", - 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", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 20000, - InclusiveMinimum: 1, - }, - serializedName: "properties.priority", - type: { - name: "Number", - }, - }, - backendAddressPool: { - serializedName: "properties.backendAddressPool", - type: { - name: "Composite", - className: "SubResource", - }, - }, - backendHttpSettings: { - serializedName: "properties.backendHttpSettings", - type: { - name: "Composite", - className: "SubResource", - }, - }, - httpListener: { - serializedName: "properties.httpListener", - type: { - name: "Composite", - className: "SubResource", - }, - }, - urlPathMap: { - serializedName: "properties.urlPathMap", - type: { - name: "Composite", - className: "SubResource", - }, - }, - rewriteRuleSet: { - serializedName: "properties.rewriteRuleSet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - redirectConfiguration: { - serializedName: "properties.redirectConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - loadDistributionPolicy: { - serializedName: "properties.loadDistributionPolicy", - type: { - name: "Composite", - className: "SubResource", - }, - }, - entraJWTValidationConfig: { - serializedName: "properties.entraJWTValidationConfig", - type: { - name: "Composite", - className: "SubResource", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -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", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 20000, - InclusiveMinimum: 1, - }, - serializedName: "properties.priority", - type: { - name: "Number", - }, - }, - 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", - className: "ApplicationGatewayRewriteRuleSet", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - rewriteRules: { - serializedName: "properties.rewriteRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayRewriteRule", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayRedirectConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayRedirectConfiguration", - 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", - }, - }, - redirectType: { - serializedName: "properties.redirectType", - type: { - name: "String", - }, - }, - targetListener: { - serializedName: "properties.targetListener", - type: { - name: "Composite", - className: "SubResource", - }, - }, - targetUrl: { - serializedName: "properties.targetUrl", - type: { - name: "String", - }, - }, - includePath: { - serializedName: "properties.includePath", - type: { - name: "Boolean", - }, - }, - includeQueryString: { - serializedName: "properties.includeQueryString", - type: { - name: "Boolean", - }, - }, - requestRoutingRules: { - serializedName: "properties.requestRoutingRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - urlPathMaps: { - serializedName: "properties.urlPathMaps", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - pathRules: { - serializedName: "properties.pathRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayPrivateLinkIpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayPrivateLinkIpConfiguration", - 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", - }, - }, - privateIPAddress: { - serializedName: "properties.privateIPAddress", - type: { - name: "String", - }, - }, - privateIPAllocationMethod: { - serializedName: "properties.privateIPAllocationMethod", - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - primary: { - serializedName: "properties.primary", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayPrivateLinkConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayPrivateLinkConfiguration", - 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", - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayPrivateLinkIpConfiguration", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayPrivateEndpointConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayPrivateEndpointConnection", - 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", - }, - }, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint", - }, - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - linkIdentifier: { - serializedName: "properties.linkIdentifier", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayLoadDistributionTarget: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayLoadDistributionTarget", - 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", - }, - }, - weightPerServer: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 1, - }, - serializedName: "properties.weightPerServer", - type: { - name: "Number", - }, - }, - backendAddressPool: { - serializedName: "properties.backendAddressPool", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const ApplicationGatewayLoadDistributionPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayLoadDistributionPolicy", - 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", - }, - }, - loadDistributionTargets: { - serializedName: "properties.loadDistributionTargets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayLoadDistributionTarget", - }, - }, - }, - }, - loadDistributionAlgorithm: { - serializedName: "properties.loadDistributionAlgorithm", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayEntraJWTValidationConfig: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayEntraJWTValidationConfig", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - unAuthorizedRequestAction: { - serializedName: "properties.unAuthorizedRequestAction", - type: { - name: "String", - }, - }, - tenantId: { - serializedName: "properties.tenantId", - type: { - name: "String", - }, - }, - clientId: { - serializedName: "properties.clientId", - type: { - name: "String", - }, - }, - audiences: { - serializedName: "properties.audiences", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayPrivateLinkResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayPrivateLinkResource", - 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", - }, - }, - groupId: { - serializedName: "properties.groupId", - readOnly: true, - type: { - name: "String", - }, - }, - requiredMembers: { - serializedName: "properties.requiredMembers", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - requiredZoneNames: { - serializedName: "properties.requiredZoneNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewaySslPredefinedPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewaySslPredefinedPolicy", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - cipherSuites: { - serializedName: "properties.cipherSuites", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - minProtocolVersion: { - serializedName: "properties.minProtocolVersion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallApplicationRuleCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallApplicationRuleCollection", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 65000, - InclusiveMinimum: 100, - }, - serializedName: "properties.priority", - type: { - name: "Number", - }, - }, - action: { - serializedName: "properties.action", - type: { - name: "Composite", - className: "AzureFirewallRCAction", - }, - }, - rules: { - serializedName: "properties.rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallApplicationRule", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallNatRuleCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallNatRuleCollection", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 65000, - InclusiveMinimum: 100, - }, - serializedName: "properties.priority", - type: { - name: "Number", - }, - }, - action: { - serializedName: "properties.action", - type: { - name: "Composite", - className: "AzureFirewallNatRCAction", - }, - }, - rules: { - serializedName: "properties.rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallNatRule", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallNetworkRuleCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallNetworkRuleCollection", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 65000, - InclusiveMinimum: 100, - }, - serializedName: "properties.priority", - type: { - name: "Number", - }, - }, - action: { - serializedName: "properties.action", - type: { - name: "Composite", - className: "AzureFirewallRCAction", - }, - }, - rules: { - serializedName: "properties.rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallNetworkRule", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallIPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallIPConfiguration", - 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", - }, - }, - privateIPAddress: { - serializedName: "properties.privateIPAddress", - readOnly: true, - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - publicIPAddress: { - serializedName: "properties.publicIPAddress", - type: { - name: "Composite", - className: "SubResource", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BastionHostIPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionHostIPConfiguration", - 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", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - publicIPAddress: { - serializedName: "properties.publicIPAddress", - type: { - name: "Composite", - className: "SubResource", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - privateIPAllocationMethod: { - serializedName: "properties.privateIPAllocationMethod", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DdosDetectionRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DdosDetectionRule", - 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", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - detectionMode: { - serializedName: "properties.detectionMode", - type: { - name: "String", - }, - }, - trafficDetectionRule: { - serializedName: "properties.trafficDetectionRule", - type: { - name: "Composite", - className: "TrafficDetectionRule", - }, - }, - }, - }, -}; - -export const EndpointServiceResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EndpointServiceResult", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitAuthorization: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitAuthorization", - 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", - type: { - name: "String", - }, - }, - authorizationUseStatus: { - serializedName: "properties.authorizationUseStatus", - type: { - name: "String", - }, - }, - connectionResourceUri: { - serializedName: "properties.connectionResourceUri", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitConnection", - 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", - }, - }, - expressRouteCircuitPeering: { - serializedName: "properties.expressRouteCircuitPeering", - type: { - name: "Composite", - className: "SubResource", - }, - }, - peerExpressRouteCircuitPeering: { - serializedName: "properties.peerExpressRouteCircuitPeering", - type: { - name: "Composite", - className: "SubResource", - }, - }, - addressPrefix: { - serializedName: "properties.addressPrefix", - type: { - name: "String", - }, - }, - authorizationKey: { - serializedName: "properties.authorizationKey", - type: { - name: "String", - }, - }, - ipv6CircuitConnectionConfig: { - serializedName: "properties.ipv6CircuitConnectionConfig", - type: { - name: "Composite", - className: "Ipv6CircuitConnectionConfig", - }, - }, - circuitConnectionStatus: { - serializedName: "properties.circuitConnectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PeerExpressRouteCircuitConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PeerExpressRouteCircuitConnection", - 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", - }, - }, - expressRouteCircuitPeering: { - serializedName: "properties.expressRouteCircuitPeering", - type: { - name: "Composite", - className: "SubResource", - }, - }, - peerExpressRouteCircuitPeering: { - serializedName: "properties.peerExpressRouteCircuitPeering", - type: { - name: "Composite", - className: "SubResource", - }, - }, - addressPrefix: { - serializedName: "properties.addressPrefix", - type: { - name: "String", - }, - }, - circuitConnectionStatus: { - serializedName: "properties.circuitConnectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - connectionName: { - serializedName: "properties.connectionName", - type: { - name: "String", - }, - }, - authResourceGuid: { - serializedName: "properties.authResourceGuid", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuitPeering: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuitPeering", - 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", - }, - }, - peeringType: { - serializedName: "properties.peeringType", - type: { - name: "String", - }, - }, - state: { - serializedName: "properties.state", - type: { - name: "String", - }, - }, - azureASN: { - serializedName: "properties.azureASN", - type: { - name: "Number", - }, - }, - peerASN: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 1, - }, - serializedName: "properties.peerASN", - type: { - name: "Number", - }, - }, - primaryPeerAddressPrefix: { - serializedName: "properties.primaryPeerAddressPrefix", - type: { - name: "String", - }, - }, - secondaryPeerAddressPrefix: { - serializedName: "properties.secondaryPeerAddressPrefix", - type: { - name: "String", - }, - }, - primaryAzurePort: { - serializedName: "properties.primaryAzurePort", - type: { - name: "String", - }, - }, - secondaryAzurePort: { - serializedName: "properties.secondaryAzurePort", - type: { - name: "String", - }, - }, - sharedKey: { - serializedName: "properties.sharedKey", - type: { - name: "String", - }, - }, - vlanId: { - serializedName: "properties.vlanId", - type: { - name: "Number", - }, - }, - microsoftPeeringConfig: { - serializedName: "properties.microsoftPeeringConfig", - type: { - name: "Composite", - className: "ExpressRouteCircuitPeeringConfig", - }, - }, - stats: { - serializedName: "properties.stats", - type: { - name: "Composite", - className: "ExpressRouteCircuitStats", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - gatewayManagerEtag: { - serializedName: "properties.gatewayManagerEtag", - type: { - name: "String", - }, - }, - lastModifiedBy: { - serializedName: "properties.lastModifiedBy", - readOnly: true, - type: { - name: "String", - }, - }, - routeFilter: { - serializedName: "properties.routeFilter", - type: { - name: "Composite", - className: "SubResource", - }, - }, - ipv6PeeringConfig: { - serializedName: "properties.ipv6PeeringConfig", - type: { - name: "Composite", - className: "Ipv6ExpressRouteCircuitPeeringConfig", - }, - }, - expressRouteConnection: { - serializedName: "properties.expressRouteConnection", - type: { - name: "Composite", - className: "ExpressRouteConnectionId", - }, - }, - connections: { - serializedName: "properties.connections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitConnection", - }, - }, - }, - }, - peeredConnections: { - serializedName: "properties.peeredConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PeerExpressRouteCircuitConnection", - }, - }, - }, - }, - }, - }, -}; - -export const ExpressRouteCrossConnectionPeering: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCrossConnectionPeering", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - peeringType: { - serializedName: "properties.peeringType", - type: { - name: "String", - }, - }, - state: { - serializedName: "properties.state", - type: { - name: "String", - }, - }, - azureASN: { - serializedName: "properties.azureASN", - readOnly: true, - type: { - name: "Number", - }, - }, - peerASN: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 1, - }, - serializedName: "properties.peerASN", - type: { - name: "Number", - }, - }, - primaryPeerAddressPrefix: { - serializedName: "properties.primaryPeerAddressPrefix", - type: { - name: "String", - }, - }, - secondaryPeerAddressPrefix: { - serializedName: "properties.secondaryPeerAddressPrefix", - type: { - name: "String", - }, - }, - primaryAzurePort: { - serializedName: "properties.primaryAzurePort", - readOnly: true, - type: { - name: "String", - }, - }, - secondaryAzurePort: { - serializedName: "properties.secondaryAzurePort", - readOnly: true, - type: { - name: "String", - }, - }, - sharedKey: { - serializedName: "properties.sharedKey", - type: { - name: "String", - }, - }, - vlanId: { - serializedName: "properties.vlanId", - type: { - name: "Number", - }, - }, - microsoftPeeringConfig: { - serializedName: "properties.microsoftPeeringConfig", - type: { - name: "Composite", - className: "ExpressRouteCircuitPeeringConfig", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - gatewayManagerEtag: { - serializedName: "properties.gatewayManagerEtag", - type: { - name: "String", - }, - }, - lastModifiedBy: { - serializedName: "properties.lastModifiedBy", - readOnly: true, - type: { - name: "String", - }, - }, - ipv6PeeringConfig: { - serializedName: "properties.ipv6PeeringConfig", - type: { - name: "Composite", - className: "Ipv6ExpressRouteCircuitPeeringConfig", - }, - }, - }, - }, -}; - -export const ExpressRouteLink: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteLink", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - routerName: { - serializedName: "properties.routerName", - readOnly: true, - type: { - name: "String", - }, - }, - interfaceName: { - serializedName: "properties.interfaceName", - readOnly: true, - type: { - name: "String", - }, - }, - patchPanelId: { - serializedName: "properties.patchPanelId", - readOnly: true, - type: { - name: "String", - }, - }, - rackId: { - serializedName: "properties.rackId", - readOnly: true, - type: { - name: "String", - }, - }, - coloLocation: { - serializedName: "properties.coloLocation", - readOnly: true, - type: { - name: "String", - }, - }, - connectorType: { - serializedName: "properties.connectorType", - readOnly: true, - type: { - name: "String", - }, - }, - adminState: { - serializedName: "properties.adminState", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - macSecConfig: { - serializedName: "properties.macSecConfig", - type: { - name: "Composite", - className: "ExpressRouteLinkMacSecConfig", - }, - }, - }, - }, -}; - -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", - className: "FirewallPolicyRuleCollectionGroup", - 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", - }, - }, - size: { - serializedName: "properties.size", - readOnly: true, - type: { - name: "String", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 65000, - InclusiveMinimum: 100, - }, - serializedName: "properties.priority", - type: { - name: "Number", - }, - }, - ruleCollections: { - serializedName: "properties.ruleCollections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FirewallPolicyRuleCollection", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicyRuleCollectionGroupDraft: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyRuleCollectionGroupDraft", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - size: { - serializedName: "properties.size", - readOnly: true, - type: { - name: "String", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 65000, - InclusiveMinimum: 100, - }, - serializedName: "properties.priority", - type: { - name: "Number", - }, - }, - ruleCollections: { - serializedName: "properties.ruleCollections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FirewallPolicyRuleCollection", - }, - }, - }, - }, - }, - }, -}; - -export const LoadBalancingRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancingRule", - 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", - }, - }, - frontendIPConfiguration: { - serializedName: "properties.frontendIPConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - backendAddressPool: { - serializedName: "properties.backendAddressPool", - type: { - name: "Composite", - className: "SubResource", - }, - }, - backendAddressPools: { - serializedName: "properties.backendAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - probe: { - serializedName: "properties.probe", - type: { - name: "Composite", - className: "SubResource", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - loadDistribution: { - serializedName: "properties.loadDistribution", - type: { - name: "String", - }, - }, - frontendPort: { - serializedName: "properties.frontendPort", - type: { - name: "Number", - }, - }, - backendPort: { - serializedName: "properties.backendPort", - type: { - name: "Number", - }, - }, - idleTimeoutInMinutes: { - serializedName: "properties.idleTimeoutInMinutes", - type: { - name: "Number", - }, - }, - enableFloatingIP: { - serializedName: "properties.enableFloatingIP", - type: { - name: "Boolean", - }, - }, - enableTcpReset: { - serializedName: "properties.enableTcpReset", - type: { - name: "Boolean", - }, - }, - disableOutboundSnat: { - serializedName: "properties.disableOutboundSnat", - type: { - name: "Boolean", - }, - }, - enableConnectionTracking: { - serializedName: "properties.enableConnectionTracking", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Probe: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Probe", - 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", - }, - }, - loadBalancingRules: { - serializedName: "properties.loadBalancingRules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - port: { - serializedName: "properties.port", - type: { - name: "Number", - }, - }, - intervalInSeconds: { - serializedName: "properties.intervalInSeconds", - type: { - name: "Number", - }, - }, - noHealthyBackendsBehavior: { - serializedName: "properties.noHealthyBackendsBehavior", - type: { - name: "String", - }, - }, - numberOfProbes: { - serializedName: "properties.numberOfProbes", - type: { - name: "Number", - }, - }, - probeThreshold: { - serializedName: "properties.probeThreshold", - type: { - name: "Number", - }, - }, - requestPath: { - serializedName: "properties.requestPath", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const InboundNatPool: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InboundNatPool", - 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", - }, - }, - frontendIPConfiguration: { - serializedName: "properties.frontendIPConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - frontendPortRangeStart: { - serializedName: "properties.frontendPortRangeStart", - type: { - name: "Number", - }, - }, - frontendPortRangeEnd: { - serializedName: "properties.frontendPortRangeEnd", - type: { - name: "Number", - }, - }, - backendPort: { - serializedName: "properties.backendPort", - type: { - name: "Number", - }, - }, - idleTimeoutInMinutes: { - serializedName: "properties.idleTimeoutInMinutes", - type: { - name: "Number", - }, - }, - enableFloatingIP: { - serializedName: "properties.enableFloatingIP", - type: { - name: "Boolean", - }, - }, - enableTcpReset: { - serializedName: "properties.enableTcpReset", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OutboundRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OutboundRule", - 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", - }, - }, - allocatedOutboundPorts: { - serializedName: "properties.allocatedOutboundPorts", - type: { - name: "Number", - }, - }, - frontendIPConfigurations: { - serializedName: "properties.frontendIPConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - backendAddressPool: { - serializedName: "properties.backendAddressPool", - type: { - name: "Composite", - className: "SubResource", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - enableTcpReset: { - serializedName: "properties.enableTcpReset", - type: { - name: "Boolean", - }, - }, - idleTimeoutInMinutes: { - serializedName: "properties.idleTimeoutInMinutes", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ContainerNetworkInterfaceConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ContainerNetworkInterfaceConfiguration", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IPConfigurationProfile", - }, - }, - }, - }, - containerNetworkInterfaces: { - serializedName: "properties.containerNetworkInterfaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Container: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Container", - modelProperties: { - ...SubResource.type.modelProperties, - }, - }, -}; - -export const ContainerNetworkInterface: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ContainerNetworkInterface", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - containerNetworkInterfaceConfiguration: { - serializedName: "properties.containerNetworkInterfaceConfiguration", - type: { - name: "Composite", - className: "ContainerNetworkInterfaceConfiguration", - }, - }, - container: { - serializedName: "properties.container", - type: { - name: "Composite", - className: "Container", - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerNetworkInterfaceIpConfiguration", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualApplianceSite: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualApplianceSite", - 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", - }, - }, - addressPrefix: { - serializedName: "properties.addressPrefix", - type: { - name: "String", - }, - }, - o365Policy: { - serializedName: "properties.o365Policy", - type: { - name: "Composite", - className: "Office365PolicyProperties", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const InboundSecurityRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InboundSecurityRule", - 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", - }, - }, - rules: { - serializedName: "properties.rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InboundSecurityRules", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateDnsZoneGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateDnsZoneGroup", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - privateDnsZoneConfigs: { - serializedName: "properties.privateDnsZoneConfigs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateDnsZoneConfig", - }, - }, - }, - }, - }, - }, -}; - -export const RouteFilterRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteFilterRule", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - access: { - serializedName: "properties.access", - type: { - name: "String", - }, - }, - routeFilterRuleType: { - serializedName: "properties.routeFilterRuleType", - type: { - name: "String", - }, - }, - communities: { - serializedName: "properties.communities", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkPeering: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkPeering", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - allowVirtualNetworkAccess: { - serializedName: "properties.allowVirtualNetworkAccess", - type: { - name: "Boolean", - }, - }, - allowForwardedTraffic: { - serializedName: "properties.allowForwardedTraffic", - type: { - name: "Boolean", - }, - }, - allowGatewayTransit: { - serializedName: "properties.allowGatewayTransit", - type: { - name: "Boolean", - }, - }, - useRemoteGateways: { - serializedName: "properties.useRemoteGateways", - type: { - name: "Boolean", - }, - }, - remoteVirtualNetwork: { - serializedName: "properties.remoteVirtualNetwork", - type: { - name: "Composite", - className: "SubResource", - }, - }, - localAddressSpace: { - serializedName: "properties.localAddressSpace", - type: { - name: "Composite", - className: "AddressSpace", - }, - }, - localVirtualNetworkAddressSpace: { - serializedName: "properties.localVirtualNetworkAddressSpace", - type: { - name: "Composite", - className: "AddressSpace", - }, - }, - remoteAddressSpace: { - serializedName: "properties.remoteAddressSpace", - type: { - name: "Composite", - className: "AddressSpace", - }, - }, - remoteVirtualNetworkAddressSpace: { - serializedName: "properties.remoteVirtualNetworkAddressSpace", - type: { - name: "Composite", - className: "AddressSpace", - }, - }, - remoteBgpCommunities: { - serializedName: "properties.remoteBgpCommunities", - type: { - name: "Composite", - className: "VirtualNetworkBgpCommunities", - }, - }, - remoteVirtualNetworkEncryption: { - serializedName: "properties.remoteVirtualNetworkEncryption", - type: { - name: "Composite", - className: "VirtualNetworkEncryption", - }, - }, - peeringState: { - serializedName: "properties.peeringState", - type: { - name: "String", - }, - }, - peeringSyncLevel: { - serializedName: "properties.peeringSyncLevel", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - doNotVerifyRemoteGateways: { - serializedName: "properties.doNotVerifyRemoteGateways", - type: { - name: "Boolean", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - peerCompleteVnets: { - serializedName: "properties.peerCompleteVnets", - type: { - name: "Boolean", - }, - }, - enableOnlyIPv6Peering: { - serializedName: "properties.enableOnlyIPv6Peering", - type: { - name: "Boolean", - }, - }, - localSubnetNames: { - serializedName: "properties.localSubnetNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - remoteSubnetNames: { - serializedName: "properties.remoteSubnetNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualNetworkApplianceIpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkApplianceIpConfiguration", - 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", - }, - }, - privateIPAddress: { - serializedName: "properties.privateIPAddress", - type: { - name: "String", - }, - }, - privateIPAllocationMethod: { - serializedName: "properties.privateIPAllocationMethod", - type: { - name: "String", - }, - }, - primary: { - serializedName: "properties.primary", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - privateIPAddressVersion: { - serializedName: "properties.privateIPAddressVersion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayIPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayIPConfiguration", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - privateIPAllocationMethod: { - serializedName: "properties.privateIPAllocationMethod", - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - publicIPAddress: { - serializedName: "properties.publicIPAddress", - type: { - name: "Composite", - className: "SubResource", - }, - }, - privateIPAddress: { - serializedName: "properties.privateIPAddress", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnClientRootCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnClientRootCertificate", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - publicCertData: { - serializedName: "properties.publicCertData", - required: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnClientRevokedCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnClientRevokedCertificate", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - thumbprint: { - serializedName: "properties.thumbprint", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VngClientConnectionConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VngClientConnectionConfiguration", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - vpnClientAddressPool: { - serializedName: "properties.vpnClientAddressPool", - type: { - name: "Composite", - className: "AddressSpace", - }, - }, - virtualNetworkGatewayPolicyGroups: { - serializedName: "properties.virtualNetworkGatewayPolicyGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayPolicyGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayPolicyGroup", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - 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: "VirtualNetworkGatewayPolicyGroupMember", - }, - }, - }, - }, - vngClientConnectionConfigurations: { - serializedName: "properties.vngClientConnectionConfigurations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayNatRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayNatRule", - 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", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - typePropertiesType: { - serializedName: "properties.type", - type: { - name: "String", - }, - }, - mode: { - serializedName: "properties.mode", - type: { - name: "String", - }, - }, - internalMappings: { - serializedName: "properties.internalMappings", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnNatRuleMapping", - }, - }, - }, - }, - externalMappings: { - serializedName: "properties.externalMappings", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnNatRuleMapping", - }, - }, - }, - }, - ipConfigurationId: { - serializedName: "properties.ipConfigurationId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionSharedKey: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionSharedKey", - modelProperties: { - ...SubResource.type.modelProperties, - value: { - serializedName: "value", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualRouterPeering: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualRouterPeering", - 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", - }, - }, - peerAsn: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.peerAsn", - type: { - name: "Number", - }, - }, - peerIp: { - serializedName: "properties.peerIp", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnSiteLink: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnSiteLink", - 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", - }, - }, - linkProperties: { - serializedName: "properties.linkProperties", - type: { - name: "Composite", - className: "VpnLinkProviderProperties", - }, - }, - ipAddress: { - serializedName: "properties.ipAddress", - type: { - name: "String", - }, - }, - fqdn: { - serializedName: "properties.fqdn", - type: { - name: "String", - }, - }, - bgpProperties: { - serializedName: "properties.bgpProperties", - type: { - name: "Composite", - className: "VpnLinkBgpSettings", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -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", - className: "P2SConnectionConfiguration", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - vpnClientAddressPool: { - serializedName: "properties.vpnClientAddressPool", - type: { - name: "Composite", - className: "AddressSpace", - }, - }, - routingConfiguration: { - serializedName: "properties.routingConfiguration", - type: { - name: "Composite", - className: "RoutingConfiguration", - }, - }, - enableInternetSecurity: { - serializedName: "properties.enableInternetSecurity", - type: { - name: "Boolean", - }, - }, - configurationPolicyGroupAssociations: { - serializedName: "properties.configurationPolicyGroupAssociations", - 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, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualHubRouteTableV2: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualHubRouteTableV2", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - routes: { - serializedName: "properties.routes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualHubRouteV2", - }, - }, - }, - }, - attachedConnections: { - serializedName: "properties.attachedConnections", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RouteMap: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteMap", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - associatedInboundConnections: { - serializedName: "properties.associatedInboundConnections", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - associatedOutboundConnections: { - serializedName: "properties.associatedOutboundConnections", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - rules: { - serializedName: "properties.rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RouteMapRule", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HubVirtualNetworkConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HubVirtualNetworkConnection", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - remoteVirtualNetwork: { - serializedName: "properties.remoteVirtualNetwork", - type: { - name: "Composite", - className: "SubResource", - }, - }, - allowHubToRemoteVnetTransit: { - serializedName: "properties.allowHubToRemoteVnetTransit", - type: { - name: "Boolean", - }, - }, - allowRemoteVnetToUseHubVnetGateways: { - serializedName: "properties.allowRemoteVnetToUseHubVnetGateways", - type: { - name: "Boolean", - }, - }, - enableInternetSecurity: { - serializedName: "properties.enableInternetSecurity", - type: { - name: "Boolean", - }, - }, - routingConfiguration: { - serializedName: "properties.routingConfiguration", - type: { - name: "Composite", - className: "RoutingConfiguration", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnSiteLinkConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnSiteLinkConnection", - 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", - }, - }, - vpnSiteLink: { - serializedName: "properties.vpnSiteLink", - type: { - name: "Composite", - className: "SubResource", - }, - }, - routingWeight: { - serializedName: "properties.routingWeight", - type: { - name: "Number", - }, - }, - vpnLinkConnectionMode: { - serializedName: "properties.vpnLinkConnectionMode", - type: { - name: "String", - }, - }, - connectionStatus: { - serializedName: "properties.connectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - vpnConnectionProtocolType: { - serializedName: "properties.vpnConnectionProtocolType", - type: { - name: "String", - }, - }, - ingressBytesTransferred: { - serializedName: "properties.ingressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - egressBytesTransferred: { - serializedName: "properties.egressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - connectionBandwidth: { - serializedName: "properties.connectionBandwidth", - type: { - name: "Number", - }, - }, - sharedKey: { - serializedName: "properties.sharedKey", - type: { - name: "String", - }, - }, - enableBgp: { - serializedName: "properties.enableBgp", - type: { - name: "Boolean", - }, - }, - vpnGatewayCustomBgpAddresses: { - serializedName: "properties.vpnGatewayCustomBgpAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayCustomBgpIpAddressIpConfiguration", - }, - }, - }, - }, - usePolicyBasedTrafficSelectors: { - serializedName: "properties.usePolicyBasedTrafficSelectors", - type: { - name: "Boolean", - }, - }, - ipsecPolicies: { - serializedName: "properties.ipsecPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpsecPolicy", - }, - }, - }, - }, - enableRateLimiting: { - serializedName: "properties.enableRateLimiting", - type: { - name: "Boolean", - }, - }, - useLocalAzureIpAddress: { - serializedName: "properties.useLocalAzureIpAddress", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - ingressNatRules: { - serializedName: "properties.ingressNatRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - egressNatRules: { - serializedName: "properties.egressNatRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - dpdTimeoutSeconds: { - serializedName: "properties.dpdTimeoutSeconds", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VpnConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnConnection", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - remoteVpnSite: { - serializedName: "properties.remoteVpnSite", - type: { - name: "Composite", - className: "SubResource", - }, - }, - routingWeight: { - serializedName: "properties.routingWeight", - type: { - name: "Number", - }, - }, - dpdTimeoutSeconds: { - serializedName: "properties.dpdTimeoutSeconds", - type: { - name: "Number", - }, - }, - connectionStatus: { - serializedName: "properties.connectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - vpnConnectionProtocolType: { - serializedName: "properties.vpnConnectionProtocolType", - type: { - name: "String", - }, - }, - ingressBytesTransferred: { - serializedName: "properties.ingressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - egressBytesTransferred: { - serializedName: "properties.egressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - connectionBandwidth: { - serializedName: "properties.connectionBandwidth", - type: { - name: "Number", - }, - }, - sharedKey: { - serializedName: "properties.sharedKey", - type: { - name: "String", - }, - }, - enableBgp: { - serializedName: "properties.enableBgp", - type: { - name: "Boolean", - }, - }, - usePolicyBasedTrafficSelectors: { - serializedName: "properties.usePolicyBasedTrafficSelectors", - type: { - name: "Boolean", - }, - }, - ipsecPolicies: { - serializedName: "properties.ipsecPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpsecPolicy", - }, - }, - }, - }, - trafficSelectorPolicies: { - serializedName: "properties.trafficSelectorPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TrafficSelectorPolicy", - }, - }, - }, - }, - enableRateLimiting: { - serializedName: "properties.enableRateLimiting", - type: { - name: "Boolean", - }, - }, - enableInternetSecurity: { - serializedName: "properties.enableInternetSecurity", - type: { - name: "Boolean", - }, - }, - useLocalAzureIpAddress: { - serializedName: "properties.useLocalAzureIpAddress", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - vpnLinkConnections: { - serializedName: "properties.vpnLinkConnections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnSiteLinkConnection", - }, - }, - }, - }, - routingConfiguration: { - serializedName: "properties.routingConfiguration", - type: { - name: "Composite", - className: "RoutingConfiguration", - }, - }, - }, - }, -}; - -export const VpnGatewayNatRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnGatewayNatRule", - 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", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - typePropertiesType: { - serializedName: "properties.type", - type: { - name: "String", - }, - }, - mode: { - serializedName: "properties.mode", - type: { - name: "String", - }, - }, - internalMappings: { - serializedName: "properties.internalMappings", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnNatRuleMapping", - }, - }, - }, - }, - externalMappings: { - serializedName: "properties.externalMappings", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnNatRuleMapping", - }, - }, - }, - }, - ipConfigurationId: { - serializedName: "properties.ipConfigurationId", - type: { - name: "String", - }, - }, - egressVpnSiteLinkConnections: { - serializedName: "properties.egressVpnSiteLinkConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - ingressVpnSiteLinkConnections: { - serializedName: "properties.ingressVpnSiteLinkConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - }, - }, -}; - -export const ConnectionSharedKeyResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionSharedKeyResult", - modelProperties: { - ...SubResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "SharedKeyProperties", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteConnection", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - expressRouteCircuitPeering: { - serializedName: "properties.expressRouteCircuitPeering", - type: { - name: "Composite", - className: "ExpressRouteCircuitPeeringId", - }, - }, - authorizationKey: { - serializedName: "properties.authorizationKey", - type: { - name: "String", - }, - }, - routingWeight: { - serializedName: "properties.routingWeight", - type: { - name: "Number", - }, - }, - enableInternetSecurity: { - serializedName: "properties.enableInternetSecurity", - type: { - name: "Boolean", - }, - }, - expressRouteGatewayBypass: { - serializedName: "properties.expressRouteGatewayBypass", - type: { - name: "Boolean", - }, - }, - enablePrivateLinkFastPath: { - serializedName: "properties.enablePrivateLinkFastPath", - type: { - name: "Boolean", - }, - }, - routingConfiguration: { - serializedName: "properties.routingConfiguration", - type: { - name: "Composite", - className: "RoutingConfiguration", - }, - }, - }, - }, -}; - -export const NetworkVirtualApplianceConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualApplianceConnection", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - namePropertiesName: { - serializedName: "properties.name", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - asn: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.asn", - type: { - name: "Number", - }, - }, - tunnelIdentifier: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.tunnelIdentifier", - type: { - name: "Number", - }, - }, - bgpPeerAddress: { - serializedName: "properties.bgpPeerAddress", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - enableInternetSecurity: { - serializedName: "properties.enableInternetSecurity", - type: { - name: "Boolean", - }, - }, - routingConfiguration: { - serializedName: "properties.routingConfiguration", - type: { - name: "Composite", - className: "RoutingConfiguration", - }, - }, - }, - }, -}; - -export const BgpConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BgpConnection", - 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", - }, - }, - peerAsn: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.peerAsn", - type: { - name: "Number", - }, - }, - peerIp: { - serializedName: "properties.peerIp", - type: { - name: "String", - }, - }, - hubVirtualNetworkConnection: { - serializedName: "properties.hubVirtualNetworkConnection", - type: { - name: "Composite", - className: "SubResource", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - connectionState: { - serializedName: "properties.connectionState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HubIpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HubIpConfiguration", - 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", - }, - }, - privateIPAddress: { - serializedName: "properties.privateIPAddress", - type: { - name: "String", - }, - }, - privateIPAllocationMethod: { - serializedName: "properties.privateIPAllocationMethod", - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "Subnet", - }, - }, - publicIPAddress: { - serializedName: "properties.publicIPAddress", - type: { - name: "Composite", - className: "PublicIPAddress", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HubRouteTable: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HubRouteTable", - 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", - }, - }, - routes: { - serializedName: "properties.routes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HubRoute", - }, - }, - }, - }, - labels: { - serializedName: "properties.labels", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - associatedConnections: { - serializedName: "properties.associatedConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - propagatingConnections: { - serializedName: "properties.propagatingConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingIntent: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingIntent", - 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", - }, - }, - routingPolicies: { - serializedName: "properties.routingPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RoutingPolicy", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PatchRouteFilterRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PatchRouteFilterRule", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - access: { - serializedName: "properties.access", - type: { - name: "String", - }, - }, - routeFilterRuleType: { - serializedName: "properties.routeFilterRuleType", - type: { - name: "String", - }, - }, - communities: { - serializedName: "properties.communities", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PatchRouteFilter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PatchRouteFilter", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - rules: { - serializedName: "properties.rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RouteFilterRule", - }, - }, - }, - }, - peerings: { - serializedName: "properties.peerings", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitPeering", - }, - }, - }, - }, - ipv6Peerings: { - serializedName: "properties.ipv6Peerings", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitPeering", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationSecurityGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationSecurityGroup", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpoint", - modelProperties: { - ...Resource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "Subnet", - }, - }, - networkInterfaces: { - serializedName: "properties.networkInterfaces", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterface", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - ipVersionType: { - defaultValue: "IPv4", - serializedName: "properties.ipVersionType", - type: { - name: "String", - }, - }, - privateLinkServiceConnections: { - serializedName: "properties.privateLinkServiceConnections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkServiceConnection", - }, - }, - }, - }, - manualPrivateLinkServiceConnections: { - serializedName: "properties.manualPrivateLinkServiceConnections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkServiceConnection", - }, - }, - }, - }, - customDnsConfigs: { - serializedName: "properties.customDnsConfigs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CustomDnsConfigPropertiesFormat", - }, - }, - }, - }, - applicationSecurityGroups: { - serializedName: "properties.applicationSecurityGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationSecurityGroup", - }, - }, - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointIPConfiguration", - }, - }, - }, - }, - customNetworkInterfaceName: { - serializedName: "properties.customNetworkInterfaceName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateLinkService: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkService", - modelProperties: { - ...Resource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - loadBalancerFrontendIpConfigurations: { - serializedName: "properties.loadBalancerFrontendIpConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FrontendIPConfiguration", - }, - }, - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkServiceIpConfiguration", - }, - }, - }, - }, - destinationIPAddress: { - serializedName: "properties.destinationIPAddress", - type: { - name: "String", - }, - }, - accessMode: { - serializedName: "properties.accessMode", - type: { - name: "String", - }, - }, - networkInterfaces: { - serializedName: "properties.networkInterfaces", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterface", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - }, - }, - }, - }, - visibility: { - serializedName: "properties.visibility", - type: { - name: "Composite", - className: "PrivateLinkServicePropertiesVisibility", - }, - }, - autoApproval: { - serializedName: "properties.autoApproval", - type: { - name: "Composite", - className: "PrivateLinkServicePropertiesAutoApproval", - }, - }, - fqdns: { - serializedName: "properties.fqdns", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - alias: { - serializedName: "properties.alias", - readOnly: true, - type: { - name: "String", - }, - }, - enableProxyProtocol: { - serializedName: "properties.enableProxyProtocol", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const NetworkInterface: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterface", - modelProperties: { - ...Resource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - virtualMachine: { - serializedName: "properties.virtualMachine", - type: { - name: "Composite", - className: "SubResource", - }, - }, - networkSecurityGroup: { - serializedName: "properties.networkSecurityGroup", - type: { - name: "Composite", - className: "NetworkSecurityGroup", - }, - }, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint", - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfaceIPConfiguration", - }, - }, - }, - }, - tapConfigurations: { - serializedName: "properties.tapConfigurations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfaceTapConfiguration", - }, - }, - }, - }, - dnsSettings: { - serializedName: "properties.dnsSettings", - type: { - name: "Composite", - className: "NetworkInterfaceDnsSettings", - }, - }, - macAddress: { - serializedName: "properties.macAddress", - readOnly: true, - type: { - name: "String", - }, - }, - primary: { - serializedName: "properties.primary", - readOnly: true, - type: { - name: "Boolean", - }, - }, - vnetEncryptionSupported: { - serializedName: "properties.vnetEncryptionSupported", - readOnly: true, - type: { - name: "Boolean", - }, - }, - defaultOutboundConnectivityEnabled: { - serializedName: "properties.defaultOutboundConnectivityEnabled", - readOnly: true, - type: { - name: "Boolean", - }, - }, - enableAcceleratedNetworking: { - serializedName: "properties.enableAcceleratedNetworking", - type: { - name: "Boolean", - }, - }, - disableTcpStateTracking: { - serializedName: "properties.disableTcpStateTracking", - type: { - name: "Boolean", - }, - }, - enableIPForwarding: { - serializedName: "properties.enableIPForwarding", - type: { - name: "Boolean", - }, - }, - hostedWorkloads: { - serializedName: "properties.hostedWorkloads", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - dscpConfiguration: { - serializedName: "properties.dscpConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - workloadType: { - serializedName: "properties.workloadType", - type: { - name: "String", - }, - }, - nicType: { - serializedName: "properties.nicType", - type: { - name: "String", - }, - }, - privateLinkService: { - serializedName: "properties.privateLinkService", - type: { - name: "Composite", - className: "PrivateLinkService", - }, - }, - migrationPhase: { - serializedName: "properties.migrationPhase", - type: { - name: "String", - }, - }, - auxiliaryMode: { - serializedName: "properties.auxiliaryMode", - type: { - name: "String", - }, - }, - auxiliarySku: { - serializedName: "properties.auxiliarySku", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FlowLog: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FlowLog", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - targetResourceId: { - serializedName: "properties.targetResourceId", - type: { - name: "String", - }, - }, - targetResourceGuid: { - serializedName: "properties.targetResourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - storageId: { - serializedName: "properties.storageId", - type: { - name: "String", - }, - }, - enabledFilteringCriteria: { - serializedName: "properties.enabledFilteringCriteria", - type: { - name: "String", - }, - }, - recordTypes: { - serializedName: "properties.recordTypes", - type: { - name: "String", - }, - }, - enabled: { - serializedName: "properties.enabled", - type: { - name: "Boolean", - }, - }, - retentionPolicy: { - serializedName: "properties.retentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicyParameters", - }, - }, - format: { - serializedName: "properties.format", - type: { - name: "Composite", - className: "FlowLogFormatParameters", - }, - }, - flowAnalyticsConfiguration: { - serializedName: "properties.flowAnalyticsConfiguration", - type: { - name: "Composite", - className: "TrafficAnalyticsProperties", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkSecurityGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkSecurityGroup", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - flushConnection: { - serializedName: "properties.flushConnection", - type: { - name: "Boolean", - }, - }, - securityRules: { - serializedName: "properties.securityRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityRule", - }, - }, - }, - }, - defaultSecurityRules: { - serializedName: "properties.defaultSecurityRules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityRule", - }, - }, - }, - }, - networkInterfaces: { - serializedName: "properties.networkInterfaces", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterface", - }, - }, - }, - }, - subnets: { - serializedName: "properties.subnets", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Subnet", - }, - }, - }, - }, - flowLogs: { - serializedName: "properties.flowLogs", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FlowLog", - }, - }, - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RouteTable: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteTable", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - routes: { - serializedName: "properties.routes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Route", - }, - }, - }, - }, - subnets: { - serializedName: "properties.subnets", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Subnet", - }, - }, - }, - }, - disableBgpRoutePropagation: { - serializedName: "properties.disableBgpRoutePropagation", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceEndpointPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceEndpointPolicy", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - kind: { - serializedName: "kind", - readOnly: true, - type: { - name: "String", - }, - }, - serviceEndpointPolicyDefinitions: { - serializedName: "properties.serviceEndpointPolicyDefinitions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceEndpointPolicyDefinition", - }, - }, - }, - }, - subnets: { - serializedName: "properties.subnets", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Subnet", - }, - }, - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - serviceAlias: { - serializedName: "properties.serviceAlias", - type: { - name: "String", - }, - }, - contextualServiceEndpointPolicies: { - serializedName: "properties.contextualServiceEndpointPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const NatGateway: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NatGateway", - modelProperties: { - ...Resource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "NatGatewaySku", - }, - }, - zones: { - serializedName: "zones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - idleTimeoutInMinutes: { - serializedName: "properties.idleTimeoutInMinutes", - type: { - name: "Number", - }, - }, - publicIpAddresses: { - serializedName: "properties.publicIpAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - publicIpAddressesV6: { - serializedName: "properties.publicIpAddressesV6", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - publicIpPrefixes: { - serializedName: "properties.publicIpPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - publicIpPrefixesV6: { - serializedName: "properties.publicIpPrefixesV6", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - subnets: { - serializedName: "properties.subnets", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - sourceVirtualNetwork: { - serializedName: "properties.sourceVirtualNetwork", - type: { - name: "Composite", - className: "SubResource", - }, - }, - serviceGateway: { - serializedName: "properties.serviceGateway", - type: { - name: "Composite", - className: "SubResource", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PublicIPAddress: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PublicIPAddress", - modelProperties: { - ...Resource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "PublicIPAddressSku", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - zones: { - serializedName: "zones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - publicIPAllocationMethod: { - serializedName: "properties.publicIPAllocationMethod", - type: { - name: "String", - }, - }, - publicIPAddressVersion: { - serializedName: "properties.publicIPAddressVersion", - type: { - name: "String", - }, - }, - ipConfiguration: { - serializedName: "properties.ipConfiguration", - type: { - name: "Composite", - className: "IPConfiguration", - }, - }, - dnsSettings: { - serializedName: "properties.dnsSettings", - type: { - name: "Composite", - className: "PublicIPAddressDnsSettings", - }, - }, - ddosSettings: { - serializedName: "properties.ddosSettings", - type: { - name: "Composite", - className: "DdosSettings", - }, - }, - ipTags: { - serializedName: "properties.ipTags", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpTag", - }, - }, - }, - }, - ipAddress: { - serializedName: "properties.ipAddress", - type: { - name: "String", - }, - }, - publicIPPrefix: { - serializedName: "properties.publicIPPrefix", - type: { - name: "Composite", - className: "SubResource", - }, - }, - idleTimeoutInMinutes: { - serializedName: "properties.idleTimeoutInMinutes", - type: { - name: "Number", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - servicePublicIPAddress: { - serializedName: "properties.servicePublicIPAddress", - type: { - name: "Composite", - className: "PublicIPAddress", - }, - }, - natGateway: { - serializedName: "properties.natGateway", - type: { - name: "Composite", - className: "NatGateway", - }, - }, - migrationPhase: { - serializedName: "properties.migrationPhase", - type: { - name: "String", - }, - }, - linkedPublicIPAddress: { - serializedName: "properties.linkedPublicIPAddress", - type: { - name: "Composite", - className: "PublicIPAddress", - }, - }, - deleteOption: { - serializedName: "properties.deleteOption", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkTap: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkTap", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - networkInterfaceTapConfigurations: { - serializedName: "properties.networkInterfaceTapConfigurations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfaceTapConfiguration", - }, - }, - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - destinationNetworkInterfaceIPConfiguration: { - serializedName: "properties.destinationNetworkInterfaceIPConfiguration", - type: { - name: "Composite", - className: "NetworkInterfaceIPConfiguration", - }, - }, - destinationLoadBalancerFrontEndIPConfiguration: { - serializedName: "properties.destinationLoadBalancerFrontEndIPConfiguration", - type: { - name: "Composite", - className: "FrontendIPConfiguration", - }, - }, - destinationPort: { - serializedName: "properties.destinationPort", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ApplicationGateway: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGateway", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - zones: { - serializedName: "zones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - sku: { - serializedName: "properties.sku", - type: { - name: "Composite", - className: "ApplicationGatewaySku", - }, - }, - sslPolicy: { - serializedName: "properties.sslPolicy", - type: { - name: "Composite", - className: "ApplicationGatewaySslPolicy", - }, - }, - operationalState: { - serializedName: "properties.operationalState", - readOnly: true, - type: { - name: "String", - }, - }, - gatewayIPConfigurations: { - serializedName: "properties.gatewayIPConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayIPConfiguration", - }, - }, - }, - }, - authenticationCertificates: { - serializedName: "properties.authenticationCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayAuthenticationCertificate", - }, - }, - }, - }, - trustedRootCertificates: { - serializedName: "properties.trustedRootCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayTrustedRootCertificate", - }, - }, - }, - }, - trustedClientCertificates: { - serializedName: "properties.trustedClientCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayTrustedClientCertificate", - }, - }, - }, - }, - sslCertificates: { - serializedName: "properties.sslCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewaySslCertificate", - }, - }, - }, - }, - frontendIPConfigurations: { - serializedName: "properties.frontendIPConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayFrontendIPConfiguration", - }, - }, - }, - }, - frontendPorts: { - serializedName: "properties.frontendPorts", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayFrontendPort", - }, - }, - }, - }, - probes: { - serializedName: "properties.probes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayProbe", - }, - }, - }, - }, - backendAddressPools: { - serializedName: "properties.backendAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayBackendAddressPool", - }, - }, - }, - }, - backendHttpSettingsCollection: { - serializedName: "properties.backendHttpSettingsCollection", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayBackendHttpSettings", - }, - }, - }, - }, - backendSettingsCollection: { - serializedName: "properties.backendSettingsCollection", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayBackendSettings", - }, - }, - }, - }, - httpListeners: { - serializedName: "properties.httpListeners", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayHttpListener", - }, - }, - }, - }, - listeners: { - serializedName: "properties.listeners", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayListener", - }, - }, - }, - }, - sslProfiles: { - serializedName: "properties.sslProfiles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewaySslProfile", - }, - }, - }, - }, - urlPathMaps: { - serializedName: "properties.urlPathMaps", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayUrlPathMap", - }, - }, - }, - }, - requestRoutingRules: { - serializedName: "properties.requestRoutingRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayRequestRoutingRule", - }, - }, - }, - }, - routingRules: { - serializedName: "properties.routingRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayRoutingRule", - }, - }, - }, - }, - rewriteRuleSets: { - serializedName: "properties.rewriteRuleSets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayRewriteRuleSet", - }, - }, - }, - }, - redirectConfigurations: { - serializedName: "properties.redirectConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayRedirectConfiguration", - }, - }, - }, - }, - webApplicationFirewallConfiguration: { - serializedName: "properties.webApplicationFirewallConfiguration", - type: { - name: "Composite", - className: "ApplicationGatewayWebApplicationFirewallConfiguration", - }, - }, - firewallPolicy: { - serializedName: "properties.firewallPolicy", - type: { - name: "Composite", - className: "SubResource", - }, - }, - enableHttp2: { - serializedName: "properties.enableHttp2", - type: { - name: "Boolean", - }, - }, - enableFips: { - serializedName: "properties.enableFips", - type: { - name: "Boolean", - }, - }, - autoscaleConfiguration: { - serializedName: "properties.autoscaleConfiguration", - type: { - name: "Composite", - className: "ApplicationGatewayAutoscaleConfiguration", - }, - }, - privateLinkConfigurations: { - serializedName: "properties.privateLinkConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayPrivateLinkConfiguration", - }, - }, - }, - }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayPrivateEndpointConnection", - }, - }, - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - customErrorConfigurations: { - serializedName: "properties.customErrorConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayCustomError", - }, - }, - }, - }, - forceFirewallPolicyAssociation: { - serializedName: "properties.forceFirewallPolicyAssociation", - type: { - name: "Boolean", - }, - }, - loadDistributionPolicies: { - serializedName: "properties.loadDistributionPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayLoadDistributionPolicy", - }, - }, - }, - }, - entraJWTValidationConfigs: { - serializedName: "properties.entraJWTValidationConfigs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayEntraJWTValidationConfig", - }, - }, - }, - }, - globalConfiguration: { - serializedName: "properties.globalConfiguration", - type: { - name: "Composite", - className: "ApplicationGatewayGlobalConfiguration", - }, - }, - defaultPredefinedSslPolicy: { - serializedName: "properties.defaultPredefinedSslPolicy", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationGatewayFirewallRuleSet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallRuleSet", - modelProperties: { - ...Resource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - ruleSetType: { - serializedName: "properties.ruleSetType", - type: { - name: "String", - }, - }, - ruleSetVersion: { - serializedName: "properties.ruleSetVersion", - type: { - name: "String", - }, - }, - ruleGroups: { - serializedName: "properties.ruleGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayFirewallRuleGroup", - }, - }, - }, - }, - tiers: { - serializedName: "properties.tiers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationGatewayAvailableSslOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationGatewayAvailableSslOptions", - modelProperties: { - ...Resource.type.modelProperties, - predefinedPolicies: { - serializedName: "properties.predefinedPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - defaultPolicy: { - serializedName: "properties.defaultPolicy", - type: { - name: "String", - }, - }, - availableCipherSuites: { - serializedName: "properties.availableCipherSuites", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - availableProtocols: { - serializedName: "properties.availableProtocols", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const AzureFirewall: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewall", - modelProperties: { - ...Resource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - zones: { - serializedName: "zones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - applicationRuleCollections: { - serializedName: "properties.applicationRuleCollections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallApplicationRuleCollection", - }, - }, - }, - }, - natRuleCollections: { - serializedName: "properties.natRuleCollections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallNatRuleCollection", - }, - }, - }, - }, - networkRuleCollections: { - serializedName: "properties.networkRuleCollections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallNetworkRuleCollection", - }, - }, - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallIPConfiguration", - }, - }, - }, - }, - managementIpConfiguration: { - serializedName: "properties.managementIpConfiguration", - type: { - name: "Composite", - className: "AzureFirewallIPConfiguration", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - threatIntelMode: { - serializedName: "properties.threatIntelMode", - type: { - name: "String", - }, - }, - virtualHub: { - serializedName: "properties.virtualHub", - type: { - name: "Composite", - className: "SubResource", - }, - }, - firewallPolicy: { - serializedName: "properties.firewallPolicy", - type: { - name: "Composite", - className: "SubResource", - }, - }, - hubIPAddresses: { - serializedName: "properties.hubIPAddresses", - type: { - name: "Composite", - className: "HubIPAddresses", - }, - }, - ipGroups: { - serializedName: "properties.ipGroups", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFirewallIpGroups", - }, - }, - }, - }, - sku: { - serializedName: "properties.sku", - type: { - name: "Composite", - className: "AzureFirewallSku", - }, - }, - additionalProperties: { - serializedName: "properties.additionalProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - autoscaleConfiguration: { - serializedName: "properties.autoscaleConfiguration", - type: { - name: "Composite", - className: "AzureFirewallAutoscaleConfiguration", - }, - }, - }, - }, -}; - -export const AzureFirewallFqdnTag: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallFqdnTag", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - fqdnTagName: { - serializedName: "properties.fqdnTagName", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BastionHost: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BastionHost", - modelProperties: { - ...Resource.type.modelProperties, - zones: { - serializedName: "zones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku", - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BastionHostIPConfiguration", - }, - }, - }, - }, - dnsName: { - serializedName: "properties.dnsName", - type: { - name: "String", - }, - }, - virtualNetwork: { - serializedName: "properties.virtualNetwork", - type: { - name: "Composite", - className: "SubResource", - }, - }, - networkAcls: { - serializedName: "properties.networkAcls", - type: { - name: "Composite", - className: "BastionHostPropertiesFormatNetworkAcls", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - scaleUnits: { - constraints: { - InclusiveMaximum: 50, - InclusiveMinimum: 2, - }, - serializedName: "properties.scaleUnits", - type: { - name: "Number", - }, - }, - disableCopyPaste: { - defaultValue: false, - serializedName: "properties.disableCopyPaste", - type: { - name: "Boolean", - }, - }, - enableFileCopy: { - defaultValue: false, - serializedName: "properties.enableFileCopy", - type: { - name: "Boolean", - }, - }, - enableIpConnect: { - defaultValue: false, - serializedName: "properties.enableIpConnect", - type: { - name: "Boolean", - }, - }, - enableShareableLink: { - defaultValue: false, - serializedName: "properties.enableShareableLink", - type: { - name: "Boolean", - }, - }, - enableTunneling: { - defaultValue: false, - serializedName: "properties.enableTunneling", - type: { - name: "Boolean", - }, - }, - enableKerberos: { - defaultValue: false, - serializedName: "properties.enableKerberos", - type: { - name: "Boolean", - }, - }, - enableSessionRecording: { - defaultValue: false, - serializedName: "properties.enableSessionRecording", - type: { - name: "Boolean", - }, - }, - enablePrivateOnlyBastion: { - defaultValue: false, - serializedName: "properties.enablePrivateOnlyBastion", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const Vm: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Vm", - modelProperties: { - ...Resource.type.modelProperties, - }, - }, -}; - -export const CustomIpPrefix: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CustomIpPrefix", - modelProperties: { - ...Resource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - zones: { - serializedName: "zones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - asn: { - serializedName: "properties.asn", - type: { - name: "String", - }, - }, - cidr: { - serializedName: "properties.cidr", - type: { - name: "String", - }, - }, - signedMessage: { - serializedName: "properties.signedMessage", - type: { - name: "String", - }, - }, - authorizationMessage: { - serializedName: "properties.authorizationMessage", - type: { - name: "String", - }, - }, - customIpPrefixParent: { - serializedName: "properties.customIpPrefixParent", - type: { - name: "Composite", - className: "SubResource", - }, - }, - childCustomIpPrefixes: { - serializedName: "properties.childCustomIpPrefixes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - commissionedState: { - serializedName: "properties.commissionedState", - type: { - name: "String", - }, - }, - expressRouteAdvertise: { - serializedName: "properties.expressRouteAdvertise", - type: { - name: "Boolean", - }, - }, - geo: { - serializedName: "properties.geo", - type: { - name: "String", - }, - }, - noInternetAdvertise: { - serializedName: "properties.noInternetAdvertise", - type: { - name: "Boolean", - }, - }, - prefixType: { - serializedName: "properties.prefixType", - type: { - name: "String", - }, - }, - publicIpPrefixes: { - serializedName: "properties.publicIpPrefixes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - failedReason: { - serializedName: "properties.failedReason", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DdosCustomPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DdosCustomPolicy", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - detectionRules: { - serializedName: "properties.detectionRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DdosDetectionRule", - }, - }, - }, - }, - frontEndIpConfiguration: { - serializedName: "properties.frontEndIpConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - }, - }, -}; - -export const DscpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DscpConfiguration", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - markings: { - serializedName: "properties.markings", - type: { - name: "Sequence", - element: { - type: { - name: "Number", - }, - }, - }, - }, - sourceIpRanges: { - serializedName: "properties.sourceIpRanges", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QosIpRange", - }, - }, - }, - }, - destinationIpRanges: { - serializedName: "properties.destinationIpRanges", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QosIpRange", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "properties.sourcePortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QosPortRange", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "properties.destinationPortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QosPortRange", - }, - }, - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - qosDefinitionCollection: { - serializedName: "properties.qosDefinitionCollection", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QosDefinition", - }, - }, - }, - }, - qosCollectionId: { - serializedName: "properties.qosCollectionId", - readOnly: true, - type: { - name: "String", - }, - }, - associatedNetworkInterfaces: { - serializedName: "properties.associatedNetworkInterfaces", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterface", - }, - }, - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCircuit: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCircuit", - modelProperties: { - ...Resource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "ExpressRouteCircuitSku", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - allowClassicOperations: { - serializedName: "properties.allowClassicOperations", - type: { - name: "Boolean", - }, - }, - circuitProvisioningState: { - serializedName: "properties.circuitProvisioningState", - type: { - name: "String", - }, - }, - serviceProviderProvisioningState: { - serializedName: "properties.serviceProviderProvisioningState", - type: { - name: "String", - }, - }, - authorizations: { - serializedName: "properties.authorizations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitAuthorization", - }, - }, - }, - }, - peerings: { - serializedName: "properties.peerings", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitPeering", - }, - }, - }, - }, - serviceKey: { - serializedName: "properties.serviceKey", - type: { - name: "String", - }, - }, - serviceProviderNotes: { - serializedName: "properties.serviceProviderNotes", - type: { - name: "String", - }, - }, - serviceProviderProperties: { - serializedName: "properties.serviceProviderProperties", - type: { - name: "Composite", - className: "ExpressRouteCircuitServiceProviderProperties", - }, - }, - expressRoutePort: { - serializedName: "properties.expressRoutePort", - type: { - name: "Composite", - className: "SubResource", - }, - }, - bandwidthInGbps: { - serializedName: "properties.bandwidthInGbps", - type: { - name: "Number", - }, - }, - stag: { - serializedName: "properties.stag", - readOnly: true, - type: { - name: "Number", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - gatewayManagerEtag: { - serializedName: "properties.gatewayManagerEtag", - type: { - name: "String", - }, - }, - globalReachEnabled: { - serializedName: "properties.globalReachEnabled", - type: { - name: "Boolean", - }, - }, - authorizationKey: { - serializedName: "properties.authorizationKey", - type: { - name: "String", - }, - }, - authorizationStatus: { - serializedName: "properties.authorizationStatus", - readOnly: true, - type: { - name: "String", - }, - }, - enableDirectPortRateLimit: { - serializedName: "properties.enableDirectPortRateLimit", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ExpressRouteServiceProvider: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteServiceProvider", - modelProperties: { - ...Resource.type.modelProperties, - peeringLocations: { - serializedName: "properties.peeringLocations", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - bandwidthsOffered: { - serializedName: "properties.bandwidthsOffered", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteServiceProviderBandwidthsOffered", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteCrossConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteCrossConnection", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - primaryAzurePort: { - serializedName: "properties.primaryAzurePort", - readOnly: true, - type: { - name: "String", - }, - }, - secondaryAzurePort: { - serializedName: "properties.secondaryAzurePort", - readOnly: true, - type: { - name: "String", - }, - }, - sTag: { - serializedName: "properties.sTag", - readOnly: true, - type: { - name: "Number", - }, - }, - peeringLocation: { - serializedName: "properties.peeringLocation", - readOnly: true, - type: { - name: "String", - }, - }, - bandwidthInMbps: { - serializedName: "properties.bandwidthInMbps", - readOnly: true, - type: { - name: "Number", - }, - }, - expressRouteCircuit: { - serializedName: "properties.expressRouteCircuit", - type: { - name: "Composite", - className: "ExpressRouteCircuitReference", - }, - }, - serviceProviderProvisioningState: { - serializedName: "properties.serviceProviderProvisioningState", - type: { - name: "String", - }, - }, - serviceProviderNotes: { - serializedName: "properties.serviceProviderNotes", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - peerings: { - serializedName: "properties.peerings", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCrossConnectionPeering", - }, - }, - }, - }, - }, - }, -}; - -export const ExpressRoutePortsLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRoutePortsLocation", - modelProperties: { - ...Resource.type.modelProperties, - address: { - serializedName: "properties.address", - readOnly: true, - type: { - name: "String", - }, - }, - contact: { - serializedName: "properties.contact", - readOnly: true, - type: { - name: "String", - }, - }, - availableBandwidths: { - serializedName: "properties.availableBandwidths", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRoutePortsLocationBandwidths", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRoutePort: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRoutePort", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - peeringLocation: { - serializedName: "properties.peeringLocation", - type: { - name: "String", - }, - }, - bandwidthInGbps: { - serializedName: "properties.bandwidthInGbps", - type: { - name: "Number", - }, - }, - provisionedBandwidthInGbps: { - serializedName: "properties.provisionedBandwidthInGbps", - readOnly: true, - type: { - name: "Number", - }, - }, - mtu: { - serializedName: "properties.mtu", - readOnly: true, - type: { - name: "String", - }, - }, - encapsulation: { - serializedName: "properties.encapsulation", - type: { - name: "String", - }, - }, - etherType: { - serializedName: "properties.etherType", - readOnly: true, - type: { - name: "String", - }, - }, - allocationDate: { - serializedName: "properties.allocationDate", - readOnly: true, - type: { - name: "String", - }, - }, - links: { - serializedName: "properties.links", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteLink", - }, - }, - }, - }, - circuits: { - serializedName: "properties.circuits", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - billingType: { - serializedName: "properties.billingType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteProviderPort: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteProviderPort", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - portPairDescriptor: { - serializedName: "properties.portPairDescriptor", - readOnly: true, - type: { - name: "String", - }, - }, - primaryAzurePort: { - serializedName: "properties.primaryAzurePort", - readOnly: true, - type: { - name: "String", - }, - }, - secondaryAzurePort: { - serializedName: "properties.secondaryAzurePort", - readOnly: true, - type: { - name: "String", - }, - }, - peeringLocation: { - serializedName: "properties.peeringLocation", - type: { - name: "String", - }, - }, - overprovisionFactor: { - serializedName: "properties.overprovisionFactor", - type: { - name: "Number", - }, - }, - portBandwidthInMbps: { - serializedName: "properties.portBandwidthInMbps", - type: { - name: "Number", - }, - }, - usedBandwidthInMbps: { - serializedName: "properties.usedBandwidthInMbps", - type: { - name: "Number", - }, - }, - remainingBandwidthInMbps: { - serializedName: "properties.remainingBandwidthInMbps", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const FirewallPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicy", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - size: { - serializedName: "properties.size", - readOnly: true, - type: { - name: "String", - }, - }, - ruleCollectionGroups: { - serializedName: "properties.ruleCollectionGroups", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - basePolicy: { - serializedName: "properties.basePolicy", - type: { - name: "Composite", - className: "SubResource", - }, - }, - firewalls: { - serializedName: "properties.firewalls", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - childPolicies: { - serializedName: "properties.childPolicies", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - threatIntelMode: { - serializedName: "properties.threatIntelMode", - type: { - name: "String", - }, - }, - threatIntelWhitelist: { - serializedName: "properties.threatIntelWhitelist", - type: { - name: "Composite", - className: "FirewallPolicyThreatIntelWhitelist", - }, - }, - insights: { - serializedName: "properties.insights", - type: { - name: "Composite", - className: "FirewallPolicyInsights", - }, - }, - snat: { - serializedName: "properties.snat", - type: { - name: "Composite", - className: "FirewallPolicySnat", - }, - }, - sql: { - serializedName: "properties.sql", - type: { - name: "Composite", - className: "FirewallPolicySQL", - }, - }, - dnsSettings: { - serializedName: "properties.dnsSettings", - type: { - name: "Composite", - className: "DnsSettings", - }, - }, - explicitProxy: { - serializedName: "properties.explicitProxy", - type: { - name: "Composite", - className: "ExplicitProxy", - }, - }, - intrusionDetection: { - serializedName: "properties.intrusionDetection", - type: { - name: "Composite", - className: "FirewallPolicyIntrusionDetection", - }, - }, - transportSecurity: { - serializedName: "properties.transportSecurity", - type: { - name: "Composite", - className: "FirewallPolicyTransportSecurity", - }, - }, - sku: { - serializedName: "properties.sku", - type: { - name: "Composite", - className: "FirewallPolicySku", - }, - }, - }, - }, -}; - -export const FirewallPolicyDraft: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyDraft", - modelProperties: { - ...Resource.type.modelProperties, - basePolicy: { - serializedName: "properties.basePolicy", - type: { - name: "Composite", - className: "SubResource", - }, - }, - threatIntelMode: { - serializedName: "properties.threatIntelMode", - type: { - name: "String", - }, - }, - threatIntelWhitelist: { - serializedName: "properties.threatIntelWhitelist", - type: { - name: "Composite", - className: "FirewallPolicyThreatIntelWhitelist", - }, - }, - insights: { - serializedName: "properties.insights", - type: { - name: "Composite", - className: "FirewallPolicyInsights", - }, - }, - snat: { - serializedName: "properties.snat", - type: { - name: "Composite", - className: "FirewallPolicySnat", - }, - }, - sql: { - serializedName: "properties.sql", - type: { - name: "Composite", - className: "FirewallPolicySQL", - }, - }, - dnsSettings: { - serializedName: "properties.dnsSettings", - type: { - name: "Composite", - className: "DnsSettings", - }, - }, - explicitProxy: { - serializedName: "properties.explicitProxy", - type: { - name: "Composite", - className: "ExplicitProxy", - }, - }, - intrusionDetection: { - serializedName: "properties.intrusionDetection", - type: { - name: "Composite", - className: "FirewallPolicyIntrusionDetection", - }, - }, - }, - }, -}; - -export const IpAllocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpAllocation", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - virtualNetwork: { - serializedName: "properties.virtualNetwork", - type: { - name: "Composite", - className: "SubResource", - }, - }, - typePropertiesType: { - serializedName: "properties.type", - type: { - name: "String", - }, - }, - prefix: { - serializedName: "properties.prefix", - type: { - name: "String", - }, - }, - prefixLength: { - defaultValue: 0, - serializedName: "properties.prefixLength", - nullable: true, - type: { - name: "Number", - }, - }, - prefixType: { - serializedName: "properties.prefixType", - type: { - name: "String", - }, - }, - ipamAllocationId: { - serializedName: "properties.ipamAllocationId", - type: { - name: "String", - }, - }, - allocationTags: { - serializedName: "properties.allocationTags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const IpGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpGroup", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - ipAddresses: { - serializedName: "properties.ipAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - firewalls: { - serializedName: "properties.firewalls", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - firewallPolicies: { - serializedName: "properties.firewallPolicies", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - }, - }, -}; - -export const LoadBalancer: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancer", - modelProperties: { - ...Resource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "LoadBalancerSku", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - frontendIPConfigurations: { - serializedName: "properties.frontendIPConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FrontendIPConfiguration", - }, - }, - }, - }, - backendAddressPools: { - serializedName: "properties.backendAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BackendAddressPool", - }, - }, - }, - }, - loadBalancingRules: { - serializedName: "properties.loadBalancingRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoadBalancingRule", - }, - }, - }, - }, - probes: { - serializedName: "properties.probes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Probe", - }, - }, - }, - }, - inboundNatRules: { - serializedName: "properties.inboundNatRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InboundNatRule", - }, - }, - }, - }, - inboundNatPools: { - serializedName: "properties.inboundNatPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InboundNatPool", - }, - }, - }, - }, - outboundRules: { - serializedName: "properties.outboundRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OutboundRule", - }, - }, - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - scope: { - serializedName: "properties.scope", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManager: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManager", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - networkManagerScopes: { - serializedName: "properties.networkManagerScopes", - type: { - name: "Composite", - className: "NetworkManagerPropertiesNetworkManagerScopes", - }, - }, - networkManagerScopeAccesses: { - serializedName: "properties.networkManagerScopeAccesses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkProfile", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - containerNetworkInterfaces: { - serializedName: "properties.containerNetworkInterfaces", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerNetworkInterface", - }, - }, - }, - }, - containerNetworkInterfaceConfigurations: { - serializedName: "properties.containerNetworkInterfaceConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerNetworkInterfaceConfiguration", - }, - }, - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualAppliance: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualAppliance", - modelProperties: { - ...Resource.type.modelProperties, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - nvaSku: { - serializedName: "properties.nvaSku", - type: { - name: "Composite", - className: "VirtualApplianceSkuProperties", - }, - }, - addressPrefix: { - serializedName: "properties.addressPrefix", - readOnly: true, - type: { - name: "String", - }, - }, - bootStrapConfigurationBlobs: { - serializedName: "properties.bootStrapConfigurationBlobs", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - virtualHub: { - serializedName: "properties.virtualHub", - type: { - name: "Composite", - className: "SubResource", - }, - }, - cloudInitConfigurationBlobs: { - serializedName: "properties.cloudInitConfigurationBlobs", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - cloudInitConfiguration: { - serializedName: "properties.cloudInitConfiguration", - type: { - name: "String", - }, - }, - virtualApplianceAsn: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.virtualApplianceAsn", - type: { - name: "Number", - }, - }, - sshPublicKey: { - serializedName: "properties.sshPublicKey", - type: { - name: "String", - }, - }, - virtualApplianceNics: { - serializedName: "properties.virtualApplianceNics", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualApplianceNicProperties", - }, - }, - }, - }, - networkProfile: { - serializedName: "properties.networkProfile", - type: { - name: "Composite", - className: "NetworkVirtualAppliancePropertiesFormatNetworkProfile", - }, - }, - additionalNics: { - serializedName: "properties.additionalNics", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualApplianceAdditionalNicProperties", - }, - }, - }, - }, - internetIngressPublicIps: { - serializedName: "properties.internetIngressPublicIps", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InternetIngressPublicIpsProperties", - }, - }, - }, - }, - virtualApplianceSites: { - serializedName: "properties.virtualApplianceSites", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - virtualApplianceConnections: { - serializedName: "properties.virtualApplianceConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - inboundSecurityRules: { - serializedName: "properties.inboundSecurityRules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - deploymentType: { - serializedName: "properties.deploymentType", - readOnly: true, - type: { - name: "String", - }, - }, - delegation: { - serializedName: "properties.delegation", - type: { - name: "Composite", - className: "DelegationProperties", - }, - }, - partnerManagedResource: { - serializedName: "properties.partnerManagedResource", - type: { - name: "Composite", - className: "PartnerManagedResourceProperties", - }, - }, - nvaInterfaceConfigurations: { - constraints: { - MaxItems: 3, - }, - serializedName: "properties.nvaInterfaceConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NvaInterfaceConfigurationsProperties", - }, - }, - }, - }, - privateIpAddress: { - serializedName: "properties.privateIpAddress", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualApplianceSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualApplianceSku", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - vendor: { - serializedName: "properties.vendor", - readOnly: true, - type: { - name: "String", - }, - }, - availableVersions: { - serializedName: "properties.availableVersions", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - availableScaleUnits: { - serializedName: "properties.availableScaleUnits", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkVirtualApplianceSkuInstances", - }, - }, - }, - }, - }, - }, -}; - -export const NetworkWatcher: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkWatcher", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PublicIPPrefix: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PublicIPPrefix", - modelProperties: { - ...Resource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "PublicIPPrefixSku", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - zones: { - serializedName: "zones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - publicIPAddressVersion: { - serializedName: "properties.publicIPAddressVersion", - type: { - name: "String", - }, - }, - ipTags: { - serializedName: "properties.ipTags", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpTag", - }, - }, - }, - }, - prefixLength: { - serializedName: "properties.prefixLength", - type: { - name: "Number", - }, - }, - ipPrefix: { - serializedName: "properties.ipPrefix", - readOnly: true, - type: { - name: "String", - }, - }, - publicIPAddresses: { - serializedName: "properties.publicIPAddresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReferencedPublicIpAddress", - }, - }, - }, - }, - loadBalancerFrontendIpConfiguration: { - serializedName: "properties.loadBalancerFrontendIpConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - customIPPrefix: { - serializedName: "properties.customIPPrefix", - type: { - name: "Composite", - className: "SubResource", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - natGateway: { - serializedName: "properties.natGateway", - type: { - name: "Composite", - className: "NatGateway", - }, - }, - }, - }, -}; - -export const RouteFilter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteFilter", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - rules: { - serializedName: "properties.rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RouteFilterRule", - }, - }, - }, - }, - peerings: { - serializedName: "properties.peerings", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitPeering", - }, - }, - }, - }, - ipv6Peerings: { - serializedName: "properties.ipv6Peerings", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteCircuitPeering", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityPartnerProvider: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityPartnerProvider", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - securityProviderName: { - serializedName: "properties.securityProviderName", - type: { - name: "String", - }, - }, - connectionStatus: { - serializedName: "properties.connectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - virtualHub: { - serializedName: "properties.virtualHub", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const BgpServiceCommunity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BgpServiceCommunity", - modelProperties: { - ...Resource.type.modelProperties, - serviceName: { - serializedName: "properties.serviceName", - type: { - name: "String", - }, - }, - bgpCommunities: { - serializedName: "properties.bgpCommunities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BGPCommunity", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualNetwork: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetwork", - modelProperties: { - ...Resource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - addressSpace: { - serializedName: "properties.addressSpace", - type: { - name: "Composite", - className: "AddressSpace", - }, - }, - dhcpOptions: { - serializedName: "properties.dhcpOptions", - type: { - name: "Composite", - className: "DhcpOptions", - }, - }, - flowTimeoutInMinutes: { - serializedName: "properties.flowTimeoutInMinutes", - type: { - name: "Number", - }, - }, - subnets: { - serializedName: "properties.subnets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Subnet", - }, - }, - }, - }, - virtualNetworkPeerings: { - serializedName: "properties.virtualNetworkPeerings", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkPeering", - }, - }, - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - enableDdosProtection: { - defaultValue: false, - serializedName: "properties.enableDdosProtection", - type: { - name: "Boolean", - }, - }, - enableVmProtection: { - defaultValue: false, - serializedName: "properties.enableVmProtection", - type: { - name: "Boolean", - }, - }, - ddosProtectionPlan: { - serializedName: "properties.ddosProtectionPlan", - type: { - name: "Composite", - className: "SubResource", - }, - }, - bgpCommunities: { - serializedName: "properties.bgpCommunities", - type: { - name: "Composite", - className: "VirtualNetworkBgpCommunities", - }, - }, - encryption: { - serializedName: "properties.encryption", - type: { - name: "Composite", - className: "VirtualNetworkEncryption", - }, - }, - ipAllocations: { - serializedName: "properties.ipAllocations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - flowLogs: { - serializedName: "properties.flowLogs", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FlowLog", - }, - }, - }, - }, - privateEndpointVNetPolicies: { - serializedName: "properties.privateEndpointVNetPolicies", - type: { - name: "String", - }, - }, - defaultPublicNatGateway: { - serializedName: "properties.defaultPublicNatGateway", - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, -}; - -export const NetworkIntentPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkIntentPolicy", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkAppliance: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkAppliance", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - bandwidthInGbps: { - serializedName: "properties.bandwidthInGbps", - type: { - name: "String", - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkApplianceIpConfiguration", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "Subnet", - }, - }, - }, - }, -}; - -export const VirtualNetworkGateway: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGateway", - modelProperties: { - ...Resource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - autoScaleConfiguration: { - serializedName: "properties.autoScaleConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkGatewayAutoScaleConfiguration", - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkGatewayIPConfiguration", - }, - }, - }, - }, - gatewayType: { - serializedName: "properties.gatewayType", - type: { - name: "String", - }, - }, - vpnType: { - serializedName: "properties.vpnType", - type: { - name: "String", - }, - }, - vpnGatewayGeneration: { - serializedName: "properties.vpnGatewayGeneration", - type: { - name: "String", - }, - }, - enableBgp: { - serializedName: "properties.enableBgp", - type: { - name: "Boolean", - }, - }, - enablePrivateIpAddress: { - serializedName: "properties.enablePrivateIpAddress", - type: { - name: "Boolean", - }, - }, - virtualNetworkGatewayMigrationStatus: { - serializedName: "properties.virtualNetworkGatewayMigrationStatus", - type: { - name: "Composite", - className: "VirtualNetworkGatewayMigrationStatus", - }, - }, - active: { - serializedName: "properties.activeActive", - type: { - name: "Boolean", - }, - }, - enableHighBandwidthVpnGateway: { - serializedName: "properties.enableHighBandwidthVpnGateway", - type: { - name: "Boolean", - }, - }, - disableIPSecReplayProtection: { - serializedName: "properties.disableIPSecReplayProtection", - type: { - name: "Boolean", - }, - }, - gatewayDefaultSite: { - serializedName: "properties.gatewayDefaultSite", - type: { - name: "Composite", - className: "SubResource", - }, - }, - sku: { - serializedName: "properties.sku", - type: { - name: "Composite", - className: "VirtualNetworkGatewaySku", - }, - }, - vpnClientConfiguration: { - serializedName: "properties.vpnClientConfiguration", - type: { - name: "Composite", - className: "VpnClientConfiguration", - }, - }, - virtualNetworkGatewayPolicyGroups: { - serializedName: "properties.virtualNetworkGatewayPolicyGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkGatewayPolicyGroup", - }, - }, - }, - }, - bgpSettings: { - serializedName: "properties.bgpSettings", - type: { - name: "Composite", - className: "BgpSettings", - }, - }, - customRoutes: { - serializedName: "properties.customRoutes", - type: { - name: "Composite", - className: "AddressSpace", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - enableDnsForwarding: { - serializedName: "properties.enableDnsForwarding", - type: { - name: "Boolean", - }, - }, - inboundDnsForwardingEndpoint: { - serializedName: "properties.inboundDnsForwardingEndpoint", - readOnly: true, - type: { - name: "String", - }, - }, - vNetExtendedLocationResourceId: { - serializedName: "properties.vNetExtendedLocationResourceId", - type: { - name: "String", - }, - }, - natRules: { - serializedName: "properties.natRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkGatewayNatRule", - }, - }, - }, - }, - enableBgpRouteTranslationForNat: { - serializedName: "properties.enableBgpRouteTranslationForNat", - type: { - name: "Boolean", - }, - }, - allowVirtualWanTraffic: { - serializedName: "properties.allowVirtualWanTraffic", - type: { - name: "Boolean", - }, - }, - allowRemoteVnetTraffic: { - serializedName: "properties.allowRemoteVnetTraffic", - type: { - name: "Boolean", - }, - }, - adminState: { - serializedName: "properties.adminState", - type: { - name: "String", - }, - }, - resiliencyModel: { - serializedName: "properties.resiliencyModel", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayConnectionListEntity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayConnectionListEntity", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - authorizationKey: { - serializedName: "properties.authorizationKey", - type: { - name: "String", - }, - }, - virtualNetworkGateway1: { - serializedName: "properties.virtualNetworkGateway1", - type: { - name: "Composite", - className: "VirtualNetworkConnectionGatewayReference", - }, - }, - virtualNetworkGateway2: { - serializedName: "properties.virtualNetworkGateway2", - type: { - name: "Composite", - className: "VirtualNetworkConnectionGatewayReference", - }, - }, - localNetworkGateway2: { - serializedName: "properties.localNetworkGateway2", - type: { - name: "Composite", - className: "VirtualNetworkConnectionGatewayReference", - }, - }, - connectionType: { - serializedName: "properties.connectionType", - required: true, - type: { - name: "String", - }, - }, - connectionProtocol: { - serializedName: "properties.connectionProtocol", - type: { - name: "String", - }, - }, - routingWeight: { - serializedName: "properties.routingWeight", - type: { - name: "Number", - }, - }, - connectionMode: { - serializedName: "properties.connectionMode", - type: { - name: "String", - }, - }, - sharedKey: { - serializedName: "properties.sharedKey", - type: { - name: "String", - }, - }, - connectionStatus: { - serializedName: "properties.connectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - tunnelConnectionStatus: { - serializedName: "properties.tunnelConnectionStatus", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TunnelConnectionHealth", - }, - }, - }, - }, - egressBytesTransferred: { - serializedName: "properties.egressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - ingressBytesTransferred: { - serializedName: "properties.ingressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - peer: { - serializedName: "properties.peer", - type: { - name: "Composite", - className: "SubResource", - }, - }, - enableBgp: { - serializedName: "properties.enableBgp", - type: { - name: "Boolean", - }, - }, - gatewayCustomBgpIpAddresses: { - serializedName: "properties.gatewayCustomBgpIpAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayCustomBgpIpAddressIpConfiguration", - }, - }, - }, - }, - usePolicyBasedTrafficSelectors: { - serializedName: "properties.usePolicyBasedTrafficSelectors", - type: { - name: "Boolean", - }, - }, - ipsecPolicies: { - serializedName: "properties.ipsecPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpsecPolicy", - }, - }, - }, - }, - trafficSelectorPolicies: { - serializedName: "properties.trafficSelectorPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TrafficSelectorPolicy", - }, - }, - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - expressRouteGatewayBypass: { - serializedName: "properties.expressRouteGatewayBypass", - type: { - name: "Boolean", - }, - }, - enablePrivateLinkFastPath: { - serializedName: "properties.enablePrivateLinkFastPath", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const LocalNetworkGateway: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LocalNetworkGateway", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - localNetworkAddressSpace: { - serializedName: "properties.localNetworkAddressSpace", - type: { - name: "Composite", - className: "AddressSpace", - }, - }, - gatewayIpAddress: { - serializedName: "properties.gatewayIpAddress", - type: { - name: "String", - }, - }, - fqdn: { - serializedName: "properties.fqdn", - type: { - name: "String", - }, - }, - bgpSettings: { - serializedName: "properties.bgpSettings", - type: { - name: "Composite", - className: "BgpSettings", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewayConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewayConnection", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - authorizationKey: { - serializedName: "properties.authorizationKey", - type: { - name: "String", - }, - }, - virtualNetworkGateway1: { - serializedName: "properties.virtualNetworkGateway1", - type: { - name: "Composite", - className: "VirtualNetworkGateway", - }, - }, - virtualNetworkGateway2: { - serializedName: "properties.virtualNetworkGateway2", - type: { - name: "Composite", - className: "VirtualNetworkGateway", - }, - }, - localNetworkGateway2: { - serializedName: "properties.localNetworkGateway2", - type: { - name: "Composite", - className: "LocalNetworkGateway", - }, - }, - ingressNatRules: { - serializedName: "properties.ingressNatRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - egressNatRules: { - serializedName: "properties.egressNatRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - connectionType: { - serializedName: "properties.connectionType", - required: true, - type: { - name: "String", - }, - }, - connectionProtocol: { - serializedName: "properties.connectionProtocol", - type: { - name: "String", - }, - }, - routingWeight: { - serializedName: "properties.routingWeight", - type: { - name: "Number", - }, - }, - dpdTimeoutSeconds: { - serializedName: "properties.dpdTimeoutSeconds", - type: { - name: "Number", - }, - }, - connectionMode: { - serializedName: "properties.connectionMode", - type: { - name: "String", - }, - }, - tunnelProperties: { - serializedName: "properties.tunnelProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkGatewayConnectionTunnelProperties", - }, - }, - }, - }, - sharedKey: { - serializedName: "properties.sharedKey", - type: { - name: "String", - }, - }, - connectionStatus: { - serializedName: "properties.connectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - tunnelConnectionStatus: { - serializedName: "properties.tunnelConnectionStatus", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TunnelConnectionHealth", - }, - }, - }, - }, - egressBytesTransferred: { - serializedName: "properties.egressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - ingressBytesTransferred: { - serializedName: "properties.ingressBytesTransferred", - readOnly: true, - type: { - name: "Number", - }, - }, - peer: { - serializedName: "properties.peer", - type: { - name: "Composite", - className: "SubResource", - }, - }, - enableBgp: { - serializedName: "properties.enableBgp", - type: { - name: "Boolean", - }, - }, - gatewayCustomBgpIpAddresses: { - serializedName: "properties.gatewayCustomBgpIpAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayCustomBgpIpAddressIpConfiguration", - }, - }, - }, - }, - useLocalAzureIpAddress: { - serializedName: "properties.useLocalAzureIpAddress", - type: { - name: "Boolean", - }, - }, - usePolicyBasedTrafficSelectors: { - serializedName: "properties.usePolicyBasedTrafficSelectors", - type: { - name: "Boolean", - }, - }, - ipsecPolicies: { - serializedName: "properties.ipsecPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpsecPolicy", - }, - }, - }, - }, - trafficSelectorPolicies: { - serializedName: "properties.trafficSelectorPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TrafficSelectorPolicy", - }, - }, - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - expressRouteGatewayBypass: { - serializedName: "properties.expressRouteGatewayBypass", - type: { - name: "Boolean", - }, - }, - enablePrivateLinkFastPath: { - serializedName: "properties.enablePrivateLinkFastPath", - type: { - name: "Boolean", - }, - }, - authenticationType: { - serializedName: "properties.authenticationType", - type: { - name: "String", - }, - }, - certificateAuthentication: { - serializedName: "properties.certificateAuthentication", - type: { - name: "Composite", - className: "CertificateAuthentication", - }, - }, - }, - }, -}; - -export const VirtualRouter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualRouter", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - virtualRouterAsn: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.virtualRouterAsn", - type: { - name: "Number", - }, - }, - virtualRouterIps: { - serializedName: "properties.virtualRouterIps", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - hostedSubnet: { - serializedName: "properties.hostedSubnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - hostedGateway: { - serializedName: "properties.hostedGateway", - type: { - name: "Composite", - className: "SubResource", - }, - }, - peerings: { - serializedName: "properties.peerings", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualWAN: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualWAN", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - disableVpnEncryption: { - serializedName: "properties.disableVpnEncryption", - type: { - name: "Boolean", - }, - }, - virtualHubs: { - serializedName: "properties.virtualHubs", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - vpnSites: { - serializedName: "properties.vpnSites", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - allowBranchToBranchTraffic: { - serializedName: "properties.allowBranchToBranchTraffic", - type: { - name: "Boolean", - }, - }, - allowVnetToVnetTraffic: { - serializedName: "properties.allowVnetToVnetTraffic", - type: { - name: "Boolean", - }, - }, - office365LocalBreakoutCategory: { - serializedName: "properties.office365LocalBreakoutCategory", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - typePropertiesType: { - serializedName: "properties.type", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VpnSite: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnSite", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - virtualWan: { - serializedName: "properties.virtualWan", - type: { - name: "Composite", - className: "SubResource", - }, - }, - deviceProperties: { - serializedName: "properties.deviceProperties", - type: { - name: "Composite", - className: "DeviceProperties", - }, - }, - ipAddress: { - serializedName: "properties.ipAddress", - type: { - name: "String", - }, - }, - siteKey: { - serializedName: "properties.siteKey", - type: { - name: "String", - }, - }, - addressSpace: { - serializedName: "properties.addressSpace", - type: { - name: "Composite", - className: "AddressSpace", - }, - }, - bgpProperties: { - serializedName: "properties.bgpProperties", - type: { - name: "Composite", - className: "BgpSettings", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - isSecuritySite: { - serializedName: "properties.isSecuritySite", - type: { - name: "Boolean", - }, - }, - vpnSiteLinks: { - serializedName: "properties.vpnSiteLinks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnSiteLink", - }, - }, - }, - }, - o365Policy: { - serializedName: "properties.o365Policy", - type: { - name: "Composite", - className: "O365PolicyProperties", - }, - }, - }, - }, -}; - -export const P2SVpnGateway: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "P2SVpnGateway", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - virtualHub: { - serializedName: "properties.virtualHub", - type: { - name: "Composite", - className: "SubResource", - }, - }, - p2SConnectionConfigurations: { - serializedName: "properties.p2SConnectionConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "P2SConnectionConfiguration", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - vpnGatewayScaleUnit: { - serializedName: "properties.vpnGatewayScaleUnit", - type: { - name: "Number", - }, - }, - vpnServerConfiguration: { - serializedName: "properties.vpnServerConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - vpnClientConnectionHealth: { - serializedName: "properties.vpnClientConnectionHealth", - type: { - name: "Composite", - className: "VpnClientConnectionHealth", - }, - }, - customDnsServers: { - serializedName: "properties.customDnsServers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - isRoutingPreferenceInternet: { - serializedName: "properties.isRoutingPreferenceInternet", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const VpnServerConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnServerConfiguration", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - namePropertiesName: { - serializedName: "properties.name", - type: { - name: "String", - }, - }, - vpnProtocols: { - serializedName: "properties.vpnProtocols", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - vpnAuthenticationTypes: { - serializedName: "properties.vpnAuthenticationTypes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - vpnClientRootCertificates: { - serializedName: "properties.vpnClientRootCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnServerConfigVpnClientRootCertificate", - }, - }, - }, - }, - vpnClientRevokedCertificates: { - serializedName: "properties.vpnClientRevokedCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnServerConfigVpnClientRevokedCertificate", - }, - }, - }, - }, - radiusServerRootCertificates: { - serializedName: "properties.radiusServerRootCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnServerConfigRadiusServerRootCertificate", - }, - }, - }, - }, - radiusClientRootCertificates: { - serializedName: "properties.radiusClientRootCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnServerConfigRadiusClientRootCertificate", - }, - }, - }, - }, - vpnClientIpsecPolicies: { - serializedName: "properties.vpnClientIpsecPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpsecPolicy", - }, - }, - }, - }, - radiusServerAddress: { - serializedName: "properties.radiusServerAddress", - type: { - name: "String", - }, - }, - radiusServerSecret: { - serializedName: "properties.radiusServerSecret", - type: { - name: "String", - }, - }, - radiusServers: { - serializedName: "properties.radiusServers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RadiusServer", - }, - }, - }, - }, - aadAuthenticationParameters: { - serializedName: "properties.aadAuthenticationParameters", - type: { - name: "Composite", - className: "AadAuthenticationParameters", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - p2SVpnGateways: { - serializedName: "properties.p2SVpnGateways", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "P2SVpnGateway", - }, - }, - }, - }, - configurationPolicyGroups: { - serializedName: "properties.configurationPolicyGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnServerConfigurationPolicyGroup", - }, - }, - }, - }, - etagPropertiesEtag: { - serializedName: "properties.etag", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualHub: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualHub", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - kind: { - serializedName: "kind", - readOnly: true, - type: { - name: "String", - }, - }, - virtualWan: { - serializedName: "properties.virtualWan", - type: { - name: "Composite", - className: "SubResource", - }, - }, - vpnGateway: { - serializedName: "properties.vpnGateway", - type: { - name: "Composite", - className: "SubResource", - }, - }, - p2SVpnGateway: { - serializedName: "properties.p2SVpnGateway", - type: { - name: "Composite", - className: "SubResource", - }, - }, - expressRouteGateway: { - serializedName: "properties.expressRouteGateway", - type: { - name: "Composite", - className: "SubResource", - }, - }, - azureFirewall: { - serializedName: "properties.azureFirewall", - type: { - name: "Composite", - className: "SubResource", - }, - }, - securityPartnerProvider: { - serializedName: "properties.securityPartnerProvider", - type: { - name: "Composite", - className: "SubResource", - }, - }, - addressPrefix: { - serializedName: "properties.addressPrefix", - type: { - name: "String", - }, - }, - routeTable: { - serializedName: "properties.routeTable", - type: { - name: "Composite", - className: "VirtualHubRouteTable", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - securityProviderName: { - serializedName: "properties.securityProviderName", - type: { - name: "String", - }, - }, - virtualHubRouteTableV2S: { - serializedName: "properties.virtualHubRouteTableV2s", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualHubRouteTableV2", - }, - }, - }, - }, - sku: { - serializedName: "properties.sku", - type: { - name: "String", - }, - }, - routingState: { - serializedName: "properties.routingState", - readOnly: true, - type: { - name: "String", - }, - }, - bgpConnections: { - serializedName: "properties.bgpConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - routeMaps: { - serializedName: "properties.routeMaps", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - virtualRouterAsn: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "properties.virtualRouterAsn", - type: { - name: "Number", - }, - }, - virtualRouterIps: { - serializedName: "properties.virtualRouterIps", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - allowBranchToBranchTraffic: { - serializedName: "properties.allowBranchToBranchTraffic", - type: { - name: "Boolean", - }, - }, - preferredRoutingGateway: { - serializedName: "properties.preferredRoutingGateway", - type: { - name: "String", - }, - }, - hubRoutingPreference: { - serializedName: "properties.hubRoutingPreference", - type: { - name: "String", - }, - }, - virtualRouterAutoScaleConfiguration: { - serializedName: "properties.virtualRouterAutoScaleConfiguration", - type: { - name: "Composite", - className: "VirtualRouterAutoScaleConfiguration", - }, - }, - }, - }, -}; - -export const VpnGateway: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VpnGateway", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - virtualHub: { - serializedName: "properties.virtualHub", - type: { - name: "Composite", - className: "SubResource", - }, - }, - connections: { - serializedName: "properties.connections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnConnection", - }, - }, - }, - }, - bgpSettings: { - serializedName: "properties.bgpSettings", - type: { - name: "Composite", - className: "BgpSettings", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - vpnGatewayScaleUnit: { - serializedName: "properties.vpnGatewayScaleUnit", - type: { - name: "Number", - }, - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnGatewayIpConfiguration", - }, - }, - }, - }, - enableBgpRouteTranslationForNat: { - serializedName: "properties.enableBgpRouteTranslationForNat", - type: { - name: "Boolean", - }, - }, - isRoutingPreferenceInternet: { - serializedName: "properties.isRoutingPreferenceInternet", - type: { - name: "Boolean", - }, - }, - natRules: { - serializedName: "properties.natRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VpnGatewayNatRule", - }, - }, - }, - }, - }, - }, -}; - -export const ExpressRouteGateway: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteGateway", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - autoScaleConfiguration: { - serializedName: "properties.autoScaleConfiguration", - type: { - name: "Composite", - className: "ExpressRouteGatewayPropertiesAutoScaleConfiguration", - }, - }, - expressRouteConnections: { - serializedName: "properties.expressRouteConnections", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteConnection", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - virtualHub: { - serializedName: "properties.virtualHub", - type: { - name: "Composite", - className: "VirtualHubId", - }, - }, - allowNonVirtualWanTraffic: { - serializedName: "properties.allowNonVirtualWanTraffic", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const WebApplicationFirewallPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WebApplicationFirewallPolicy", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - policySettings: { - serializedName: "properties.policySettings", - type: { - name: "Composite", - className: "PolicySettings", - }, - }, - customRules: { - serializedName: "properties.customRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WebApplicationFirewallCustomRule", - }, - }, - }, - }, - applicationGateways: { - serializedName: "properties.applicationGateways", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGateway", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceState: { - serializedName: "properties.resourceState", - readOnly: true, - type: { - name: "String", - }, - }, - managedRules: { - serializedName: "properties.managedRules", - type: { - name: "Composite", - className: "ManagedRulesDefinition", - }, - }, - httpListeners: { - serializedName: "properties.httpListeners", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - pathBasedRules: { - serializedName: "properties.pathBasedRules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - applicationGatewayForContainers: { - serializedName: "properties.applicationGatewayForContainers", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationGatewayForContainersReferenceDefinition", - }, - }, - }, - }, - }, - }, -}; - -export const PrivateLinkServicePropertiesVisibility: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkServicePropertiesVisibility", - modelProperties: { - ...ResourceSet.type.modelProperties, - }, - }, -}; - -export const PrivateLinkServicePropertiesAutoApproval: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkServicePropertiesAutoApproval", - modelProperties: { - ...ResourceSet.type.modelProperties, - }, - }, -}; - -export const FirewallPolicyNatRuleCollection: coreClient.CompositeMapper = { - serializedName: "FirewallPolicyNatRuleCollection", - type: { - name: "Composite", - className: "FirewallPolicyNatRuleCollection", - uberParent: "FirewallPolicyRuleCollection", - polymorphicDiscriminator: FirewallPolicyRuleCollection.type.polymorphicDiscriminator, - modelProperties: { - ...FirewallPolicyRuleCollection.type.modelProperties, - action: { - serializedName: "action", - type: { - name: "Composite", - className: "FirewallPolicyNatRuleCollectionAction", - }, - }, - rules: { - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FirewallPolicyRule", - }, - }, - }, - }, - }, - }, -}; - -export const FirewallPolicyFilterRuleCollection: coreClient.CompositeMapper = { - serializedName: "FirewallPolicyFilterRuleCollection", - type: { - name: "Composite", - className: "FirewallPolicyFilterRuleCollection", - uberParent: "FirewallPolicyRuleCollection", - polymorphicDiscriminator: FirewallPolicyRuleCollection.type.polymorphicDiscriminator, - modelProperties: { - ...FirewallPolicyRuleCollection.type.modelProperties, - action: { - serializedName: "action", - type: { - name: "Composite", - className: "FirewallPolicyFilterRuleCollectionAction", - }, - }, - rules: { - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FirewallPolicyRule", - }, - }, - }, - }, - }, - }, -}; - -export const CommonTrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CommonTrackedResource", - modelProperties: { - ...CommonResource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CommonProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CommonProxyResource", - modelProperties: { - ...CommonResource.type.modelProperties, - }, - }, -}; - -export const ActiveConnectivityConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActiveConnectivityConfiguration", - modelProperties: { - ...EffectiveConnectivityConfiguration.type.modelProperties, - commitTime: { - serializedName: "commitTime", - type: { - name: "DateTime", - }, - }, - region: { - serializedName: "region", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ActiveSecurityAdminRule: coreClient.CompositeMapper = { - serializedName: "Custom", - type: { - name: "Composite", - className: "ActiveSecurityAdminRule", - uberParent: "ActiveBaseSecurityAdminRule", - polymorphicDiscriminator: ActiveBaseSecurityAdminRule.type.polymorphicDiscriminator, - modelProperties: { - ...ActiveBaseSecurityAdminRule.type.modelProperties, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - sources: { - serializedName: "properties.sources", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - destinations: { - serializedName: "properties.destinations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "properties.sourcePortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "properties.destinationPortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - access: { - serializedName: "properties.access", - type: { - name: "String", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 4096, - InclusiveMinimum: 1, - }, - serializedName: "properties.priority", - type: { - name: "Number", - }, - }, - direction: { - serializedName: "properties.direction", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ActiveDefaultSecurityAdminRule: coreClient.CompositeMapper = { - serializedName: "Default", - type: { - name: "Composite", - className: "ActiveDefaultSecurityAdminRule", - uberParent: "ActiveBaseSecurityAdminRule", - polymorphicDiscriminator: ActiveBaseSecurityAdminRule.type.polymorphicDiscriminator, - modelProperties: { - ...ActiveBaseSecurityAdminRule.type.modelProperties, - description: { - serializedName: "properties.description", - readOnly: true, - type: { - name: "String", - }, - }, - flag: { - serializedName: "properties.flag", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", - readOnly: true, - type: { - name: "String", - }, - }, - sources: { - serializedName: "properties.sources", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - destinations: { - serializedName: "properties.destinations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "properties.sourcePortRanges", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "properties.destinationPortRanges", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - access: { - serializedName: "properties.access", - readOnly: true, - type: { - name: "String", - }, - }, - priority: { - serializedName: "properties.priority", - readOnly: true, - type: { - name: "Number", - }, - }, - direction: { - serializedName: "properties.direction", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerConnection", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - networkManagerId: { - serializedName: "properties.networkManagerId", - type: { - name: "String", - }, - }, - connectionState: { - serializedName: "properties.connectionState", - readOnly: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectivityConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectivityConfiguration", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - connectivityTopology: { - serializedName: "properties.connectivityTopology", - type: { - name: "String", - }, - }, - hubs: { - serializedName: "properties.hubs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Hub", - }, - }, - }, - }, - isGlobal: { - serializedName: "properties.isGlobal", - type: { - name: "String", - }, - }, - connectivityCapabilities: { - serializedName: "properties.connectivityCapabilities", - type: { - name: "Composite", - className: "ConnectivityConfigurationPropertiesConnectivityCapabilities", - }, - }, - appliesToGroups: { - serializedName: "properties.appliesToGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityGroupItem", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - deleteExistingPeering: { - serializedName: "properties.deleteExistingPeering", - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkGroup", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - memberType: { - serializedName: "properties.memberType", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StaticMember: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StaticMember", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - resourceId: { - serializedName: "properties.resourceId", - type: { - name: "String", - }, - }, - region: { - serializedName: "properties.region", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerRoutingConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerRoutingConfiguration", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - routeTableUsageMode: { - defaultValue: "ManagedOnly", - serializedName: "properties.routeTableUsageMode", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingRuleCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRuleCollection", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - appliesTo: { - serializedName: "properties.appliesTo", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkManagerRoutingGroupItem", - }, - }, - }, - }, - disableBgpRoutePropagation: { - serializedName: "properties.disableBgpRoutePropagation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRule", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - destination: { - serializedName: "properties.destination", - type: { - name: "Composite", - className: "RoutingRuleRouteDestination", - }, - }, - nextHop: { - serializedName: "properties.nextHop", - type: { - name: "Composite", - className: "RoutingRuleNextHop", - }, - }, - }, - }, -}; - -export const ScopeConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScopeConnection", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - tenantId: { - serializedName: "properties.tenantId", - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "properties.resourceId", - type: { - name: "String", - }, - }, - connectionState: { - serializedName: "properties.connectionState", - readOnly: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityAdminConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityAdminConfiguration", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - applyOnNetworkIntentPolicyBasedServices: { - serializedName: "properties.applyOnNetworkIntentPolicyBasedServices", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - networkGroupAddressSpaceAggregationOption: { - serializedName: "properties.networkGroupAddressSpaceAggregationOption", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AdminRuleCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdminRuleCollection", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - appliesToGroups: { - serializedName: "properties.appliesToGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkManagerSecurityGroupItem", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BaseAdminRule: coreClient.CompositeMapper = { - serializedName: "BaseAdminRule", - type: { - name: "Composite", - className: "BaseAdminRule", - uberParent: "ChildResource", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind", - }, - modelProperties: { - ...ChildResource.type.modelProperties, - kind: { - serializedName: "kind", - required: true, - type: { - name: "String", - }, - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - }, - }, -}; - -export const SecurityUserConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityUserConfiguration", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityUserRuleCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityUserRuleCollection", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - appliesToGroups: { - serializedName: "properties.appliesToGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityUserGroupItem", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityUserRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityUserRule", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - sources: { - serializedName: "properties.sources", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - destinations: { - serializedName: "properties.destinations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "properties.sourcePortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "properties.destinationPortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - direction: { - serializedName: "properties.direction", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EffectiveSecurityAdminRule: coreClient.CompositeMapper = { - serializedName: "Custom", - type: { - name: "Composite", - className: "EffectiveSecurityAdminRule", - uberParent: "EffectiveBaseSecurityAdminRule", - polymorphicDiscriminator: EffectiveBaseSecurityAdminRule.type.polymorphicDiscriminator, - modelProperties: { - ...EffectiveBaseSecurityAdminRule.type.modelProperties, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - sources: { - serializedName: "properties.sources", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - destinations: { - serializedName: "properties.destinations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "properties.sourcePortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "properties.destinationPortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - access: { - serializedName: "properties.access", - type: { - name: "String", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 4096, - InclusiveMinimum: 1, - }, - serializedName: "properties.priority", - type: { - name: "Number", - }, - }, - direction: { - serializedName: "properties.direction", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EffectiveDefaultSecurityAdminRule: coreClient.CompositeMapper = { - serializedName: "Default", - type: { - name: "Composite", - className: "EffectiveDefaultSecurityAdminRule", - uberParent: "EffectiveBaseSecurityAdminRule", - polymorphicDiscriminator: EffectiveBaseSecurityAdminRule.type.polymorphicDiscriminator, - modelProperties: { - ...EffectiveBaseSecurityAdminRule.type.modelProperties, - description: { - serializedName: "properties.description", - readOnly: true, - type: { - name: "String", - }, - }, - flag: { - serializedName: "properties.flag", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", - readOnly: true, - type: { - name: "String", - }, - }, - sources: { - serializedName: "properties.sources", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - destinations: { - serializedName: "properties.destinations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "properties.sourcePortRanges", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "properties.destinationPortRanges", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - access: { - serializedName: "properties.access", - readOnly: true, - type: { - name: "String", - }, - }, - priority: { - serializedName: "properties.priority", - readOnly: true, - type: { - name: "Number", - }, - }, - direction: { - serializedName: "properties.direction", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...SecurityPerimeterResource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityPerimeterProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityPerimeterProxyResource", - modelProperties: { - ...SecurityPerimeterResource.type.modelProperties, - }, - }, -}; - -export const PacketCaptureResultProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCaptureResultProperties", - modelProperties: { - ...PacketCaptureParameters.type.modelProperties, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectionMonitorResultProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionMonitorResultProperties", - modelProperties: { - ...ConnectionMonitorParameters.type.modelProperties, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - startTime: { - serializedName: "startTime", - readOnly: true, - type: { - name: "DateTime", - }, - }, - monitoringStatus: { - serializedName: "monitoringStatus", - readOnly: true, - type: { - name: "String", - }, - }, - connectionMonitorType: { - serializedName: "connectionMonitorType", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationRule: coreClient.CompositeMapper = { - serializedName: "ApplicationRule", - type: { - name: "Composite", - className: "ApplicationRule", - uberParent: "FirewallPolicyRule", - polymorphicDiscriminator: FirewallPolicyRule.type.polymorphicDiscriminator, - modelProperties: { - ...FirewallPolicyRule.type.modelProperties, - sourceAddresses: { - serializedName: "sourceAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationAddresses: { - serializedName: "destinationAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - protocols: { - serializedName: "protocols", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FirewallPolicyRuleApplicationProtocol", - }, - }, - }, - }, - targetFqdns: { - serializedName: "targetFqdns", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - targetUrls: { - serializedName: "targetUrls", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - fqdnTags: { - serializedName: "fqdnTags", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceIpGroups: { - serializedName: "sourceIpGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - terminateTLS: { - serializedName: "terminateTLS", - type: { - name: "Boolean", - }, - }, - webCategories: { - serializedName: "webCategories", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - httpHeadersToInsert: { - serializedName: "httpHeadersToInsert", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FirewallPolicyHttpHeaderToInsert", - }, - }, - }, - }, - }, - }, -}; - -export const NatRule: coreClient.CompositeMapper = { - serializedName: "NatRule", - type: { - name: "Composite", - className: "NatRule", - uberParent: "FirewallPolicyRule", - polymorphicDiscriminator: FirewallPolicyRule.type.polymorphicDiscriminator, - modelProperties: { - ...FirewallPolicyRule.type.modelProperties, - ipProtocols: { - serializedName: "ipProtocols", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceAddresses: { - serializedName: "sourceAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationAddresses: { - serializedName: "destinationAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPorts: { - serializedName: "destinationPorts", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - translatedAddress: { - serializedName: "translatedAddress", - type: { - name: "String", - }, - }, - translatedPort: { - serializedName: "translatedPort", - type: { - name: "String", - }, - }, - sourceIpGroups: { - serializedName: "sourceIpGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - translatedFqdn: { - serializedName: "translatedFqdn", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkRule: coreClient.CompositeMapper = { - serializedName: "NetworkRule", - type: { - name: "Composite", - className: "NetworkRule", - uberParent: "FirewallPolicyRule", - polymorphicDiscriminator: FirewallPolicyRule.type.polymorphicDiscriminator, - modelProperties: { - ...FirewallPolicyRule.type.modelProperties, - ipProtocols: { - serializedName: "ipProtocols", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceAddresses: { - serializedName: "sourceAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationAddresses: { - serializedName: "destinationAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPorts: { - serializedName: "destinationPorts", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceIpGroups: { - serializedName: "sourceIpGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationIpGroups: { - serializedName: "destinationIpGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationFqdns: { - serializedName: "destinationFqdns", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const IpamPool: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpamPool", - modelProperties: { - ...CommonTrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "IpamPoolProperties", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VerifierWorkspace: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VerifierWorkspace", - modelProperties: { - ...CommonTrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VerifierWorkspaceProperties", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StaticCidr: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StaticCidr", - modelProperties: { - ...CommonProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "StaticCidrProperties", - }, - }, - }, - }, -}; - -export const ReachabilityAnalysisIntent: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReachabilityAnalysisIntent", - modelProperties: { - ...CommonProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ReachabilityAnalysisIntentProperties", - }, - }, - }, - }, -}; - -export const ReachabilityAnalysisRun: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReachabilityAnalysisRun", - modelProperties: { - ...CommonProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ReachabilityAnalysisRunProperties", - }, - }, - }, - }, -}; - -export const AdminRule: coreClient.CompositeMapper = { - serializedName: "Custom", - type: { - name: "Composite", - className: "AdminRule", - uberParent: "BaseAdminRule", - polymorphicDiscriminator: BaseAdminRule.type.polymorphicDiscriminator, - modelProperties: { - ...BaseAdminRule.type.modelProperties, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", - type: { - name: "String", - }, - }, - sources: { - serializedName: "properties.sources", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - destinations: { - serializedName: "properties.destinations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "properties.sourcePortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "properties.destinationPortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - access: { - serializedName: "properties.access", - type: { - name: "String", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 4096, - InclusiveMinimum: 1, - }, - serializedName: "properties.priority", - type: { - name: "Number", - }, - }, - direction: { - serializedName: "properties.direction", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DefaultAdminRule: coreClient.CompositeMapper = { - serializedName: "Default", - type: { - name: "Composite", - className: "DefaultAdminRule", - uberParent: "BaseAdminRule", - polymorphicDiscriminator: BaseAdminRule.type.polymorphicDiscriminator, - modelProperties: { - ...BaseAdminRule.type.modelProperties, - description: { - serializedName: "properties.description", - readOnly: true, - type: { - name: "String", - }, - }, - flag: { - serializedName: "properties.flag", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", - readOnly: true, - type: { - name: "String", - }, - }, - sources: { - serializedName: "properties.sources", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - destinations: { - serializedName: "properties.destinations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "properties.sourcePortRanges", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "properties.destinationPortRanges", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - access: { - serializedName: "properties.access", - readOnly: true, - type: { - name: "String", - }, - }, - priority: { - serializedName: "properties.priority", - readOnly: true, - type: { - name: "Number", - }, - }, - direction: { - serializedName: "properties.direction", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkSecurityPerimeter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkSecurityPerimeter", - modelProperties: { - ...TrackedResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - perimeterGuid: { - serializedName: "properties.perimeterGuid", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceGateway: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGateway", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "ServiceGatewaySku", - }, - }, - zones: { - serializedName: "zones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - virtualNetwork: { - serializedName: "properties.virtualNetwork", - type: { - name: "Composite", - className: "VirtualNetwork", - }, - }, - routeTargetAddress: { - serializedName: "properties.routeTargetAddress", - type: { - name: "Composite", - className: "RouteTargetAddressPropertiesFormat", - }, - }, - routeTargetAddressV6: { - serializedName: "properties.routeTargetAddressV6", - type: { - name: "Composite", - className: "RouteTargetAddressPropertiesFormat", - }, - }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NspProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspProfile", - modelProperties: { - ...SecurityPerimeterProxyResource.type.modelProperties, - accessRulesVersion: { - serializedName: "properties.accessRulesVersion", - readOnly: true, - type: { - name: "String", - }, - }, - diagnosticSettingsVersion: { - serializedName: "properties.diagnosticSettingsVersion", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NspAccessRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspAccessRule", - modelProperties: { - ...SecurityPerimeterProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - direction: { - serializedName: "properties.direction", - type: { - name: "String", - }, - }, - addressPrefixes: { - serializedName: "properties.addressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - fullyQualifiedDomainNames: { - serializedName: "properties.fullyQualifiedDomainNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - subscriptions: { - serializedName: "properties.subscriptions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubscriptionId", - }, - }, - }, - }, - networkSecurityPerimeters: { - serializedName: "properties.networkSecurityPerimeters", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PerimeterBasedAccessRule", - }, - }, - }, - }, - emailAddresses: { - serializedName: "properties.emailAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - phoneNumbers: { - serializedName: "properties.phoneNumbers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - serviceTags: { - serializedName: "properties.serviceTags", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const NspAssociation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspAssociation", - modelProperties: { - ...SecurityPerimeterProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - privateLinkResource: { - serializedName: "properties.privateLinkResource", - type: { - name: "Composite", - className: "SubResource", - }, - }, - profile: { - serializedName: "properties.profile", - type: { - name: "Composite", - className: "SubResource", - }, - }, - accessMode: { - serializedName: "properties.accessMode", - type: { - name: "String", - }, - }, - hasProvisioningIssues: { - serializedName: "properties.hasProvisioningIssues", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NspLink: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspLink", - modelProperties: { - ...SecurityPerimeterProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - autoApprovedRemotePerimeterResourceId: { - serializedName: "properties.autoApprovedRemotePerimeterResourceId", - type: { - name: "String", - }, - }, - remotePerimeterGuid: { - serializedName: "properties.remotePerimeterGuid", - readOnly: true, - type: { - name: "String", - }, - }, - remotePerimeterLocation: { - serializedName: "properties.remotePerimeterLocation", - readOnly: true, - type: { - name: "String", - }, - }, - localInboundProfiles: { - constraints: { - UniqueItems: true, - }, - serializedName: "properties.localInboundProfiles", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - localOutboundProfiles: { - constraints: { - UniqueItems: true, - }, - serializedName: "properties.localOutboundProfiles", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - remoteInboundProfiles: { - constraints: { - UniqueItems: true, - }, - serializedName: "properties.remoteInboundProfiles", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - remoteOutboundProfiles: { - constraints: { - UniqueItems: true, - }, - serializedName: "properties.remoteOutboundProfiles", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - status: { - serializedName: "properties.status", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NspLinkReference: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspLinkReference", - modelProperties: { - ...SecurityPerimeterProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - remotePerimeterResourceId: { - serializedName: "properties.remotePerimeterResourceId", - readOnly: true, - type: { - name: "String", - }, - }, - remotePerimeterGuid: { - serializedName: "properties.remotePerimeterGuid", - readOnly: true, - type: { - name: "String", - }, - }, - remotePerimeterLocation: { - serializedName: "properties.remotePerimeterLocation", - readOnly: true, - type: { - name: "String", - }, - }, - localInboundProfiles: { - constraints: { - UniqueItems: true, - }, - serializedName: "properties.localInboundProfiles", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - localOutboundProfiles: { - constraints: { - UniqueItems: true, - }, - serializedName: "properties.localOutboundProfiles", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - remoteInboundProfiles: { - serializedName: "properties.remoteInboundProfiles", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - remoteOutboundProfiles: { - serializedName: "properties.remoteOutboundProfiles", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - description: { - serializedName: "properties.description", - readOnly: true, - type: { - name: "String", - }, - }, - status: { - serializedName: "properties.status", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NspLoggingConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NspLoggingConfiguration", - modelProperties: { - ...SecurityPerimeterProxyResource.type.modelProperties, - enabledLogCategories: { - serializedName: "properties.enabledLogCategories", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - version: { - serializedName: "properties.version", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallsPacketCaptureHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallsPacketCaptureHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureFirewallsPacketCaptureOperationHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFirewallsPacketCaptureOperationHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagementClientDeleteBastionShareableLinkByTokenHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "NetworkManagementClientDeleteBastionShareableLinkByTokenHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const PublicIPAddressesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PublicIPAddressesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PublicIPAddressesDdosProtectionStatusHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PublicIPAddressesDdosProtectionStatusHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PublicIPAddressesReserveCloudServicePublicIpAddressHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "PublicIPAddressesReserveCloudServicePublicIpAddressHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const PublicIPAddressesDisassociateCloudServiceReservedPublicIpHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "PublicIPAddressesDisassociateCloudServiceReservedPublicIpHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const DdosCustomPoliciesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DdosCustomPoliciesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DdosProtectionPlansDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DdosProtectionPlansDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRoutePortsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRoutePortsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRoutePortAuthorizationsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRoutePortAuthorizationsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FirewallPolicyDeploymentsDeployHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirewallPolicyDeploymentsDeployHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IpamPoolsCreateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpamPoolsCreateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IpamPoolsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpamPoolsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StaticCidrsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StaticCidrsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IpAllocationsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpAllocationsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancerLoadBalancingRulesHealthHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerLoadBalancingRulesHealthHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagersDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagersDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerCommitsPostHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerCommitsPostHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectivityConfigurationsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectivityConfigurationsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkGroupsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkGroupsCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkGroupsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkGroupsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerRoutingConfigurationsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkManagerRoutingConfigurationsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingRuleCollectionsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRuleCollectionsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingRulesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRulesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityAdminConfigurationsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityAdminConfigurationsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AdminRuleCollectionsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdminRuleCollectionsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AdminRulesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdminRulesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityUserConfigurationsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityUserConfigurationsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityUserRuleCollectionsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityUserRuleCollectionsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityUserRulesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityUserRulesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkSecurityPerimetersDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkSecurityPerimetersDeleteHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkSecurityPerimeterAssociationsCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "NetworkSecurityPerimeterAssociationsCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const NetworkSecurityPerimeterAssociationsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkSecurityPerimeterAssociationsDeleteHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkSecurityPerimeterLinksDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkSecurityPerimeterLinksDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkSecurityPerimeterLinkReferencesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkSecurityPerimeterLinkReferencesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ReachabilityAnalysisRunsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReachabilityAnalysisRunsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VerifierWorkspacesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VerifierWorkspacesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualAppliancesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualAppliancesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualAppliancesCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualAppliancesCreateOrUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualAppliancesRestartHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualAppliancesRestartHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualAppliancesReimageHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualAppliancesReimageHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualAppliancesGetBootDiagnosticLogsHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualAppliancesGetBootDiagnosticLogsHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RouteFiltersDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteFiltersDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RouteFilterRulesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RouteFilterRulesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceGatewaysDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewaysDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceGatewaysUpdateAddressLocationsHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewaysUpdateAddressLocationsHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceGatewaysUpdateServicesHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceGatewaysUpdateServicesHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkAppliancesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkAppliancesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewaysGetResiliencyInformationHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewaysGetResiliencyInformationHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewaysGetRoutesInformationHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewaysGetRoutesInformationHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const VirtualNetworkGatewaysInvokePrepareMigrationHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewaysInvokePrepareMigrationHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewaysInvokeExecuteMigrationHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewaysInvokeExecuteMigrationHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewaysInvokeCommitMigrationHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewaysInvokeCommitMigrationHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkGatewaysInvokeAbortMigrationHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkGatewaysInvokeAbortMigrationHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkVirtualApplianceConnectionsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkVirtualApplianceConnectionsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const discriminators = { - FirewallPolicyRuleCollection: FirewallPolicyRuleCollection, - ActiveBaseSecurityAdminRule: ActiveBaseSecurityAdminRule, - EffectiveBaseSecurityAdminRule: EffectiveBaseSecurityAdminRule, - FirewallPolicyRule: FirewallPolicyRule, - "FirewallPolicyRuleCollection.FirewallPolicyNatRuleCollection": FirewallPolicyNatRuleCollection, - "FirewallPolicyRuleCollection.FirewallPolicyFilterRuleCollection": - FirewallPolicyFilterRuleCollection, - "ActiveBaseSecurityAdminRule.Custom": ActiveSecurityAdminRule, - "ActiveBaseSecurityAdminRule.Default": ActiveDefaultSecurityAdminRule, - "ChildResource.BaseAdminRule": BaseAdminRule, - "EffectiveBaseSecurityAdminRule.Custom": EffectiveSecurityAdminRule, - "EffectiveBaseSecurityAdminRule.Default": EffectiveDefaultSecurityAdminRule, - "FirewallPolicyRule.ApplicationRule": ApplicationRule, - "FirewallPolicyRule.NatRule": NatRule, - "FirewallPolicyRule.NetworkRule": NetworkRule, - "BaseAdminRule.Custom": AdminRule, - "BaseAdminRule.Default": DefaultAdminRule, -}; diff --git a/sdk/network/arm-network/src/models/microsoft/network/index.ts b/sdk/network/arm-network/src/models/microsoft/network/index.ts new file mode 100644 index 000000000000..0a09777b2675 --- /dev/null +++ b/sdk/network/arm-network/src/models/microsoft/network/index.ts @@ -0,0 +1,1265 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export type { + BastionShareableLinkListRequest, + BastionShareableLink, + Vm, + BastionShareableLinkTokenListRequest, + BastionActiveSession, + BastionConnectProtocol, + SessionIds, + BastionSessionState, + ExpressRouteProviderPort, + ExpressRouteProviderPortProperties, + TrackedResourceWithOptionalLocation, + ActiveConfigurationParameter, + ActiveConnectivityConfigurationsListResult, + ActiveConnectivityConfiguration, + EffectiveConnectivityConfiguration, + ConnectivityConfigurationProperties, + ConnectivityTopology, + Hub, + IsGlobal, + ConnectivityConfigurationPropertiesConnectivityCapabilities, + ConnectedGroupPrivateEndpointsScale, + ConnectedGroupAddressOverlap, + PeeringEnforcement, + ConnectivityGroupItem, + UseHubGateway, + GroupConnectivity, + DeleteExistingPeering, + ConfigurationGroup, + NetworkGroupProperties, + GroupMemberType, + ActiveSecurityAdminRulesListResult, + ActiveBaseSecurityAdminRule, + ActiveBaseSecurityAdminRuleUnion, + NetworkManagerSecurityGroupItem, + EffectiveAdminRuleKind, + ActiveSecurityAdminRule, + AdminPropertiesFormat, + SecurityConfigurationRuleProtocol, + AddressPrefixItem, + AddressPrefixType, + SecurityConfigurationRuleAccess, + SecurityConfigurationRuleDirection, + ActiveDefaultSecurityAdminRule, + DefaultAdminPropertiesFormat, + QueryRequestOptions, + NetworkManagerEffectiveConnectivityConfigurationListResult, + NetworkManagerEffectiveSecurityAdminRulesListResult, + EffectiveBaseSecurityAdminRule, + EffectiveBaseSecurityAdminRuleUnion, + EffectiveSecurityAdminRule, + EffectiveDefaultSecurityAdminRule, + VirtualWanSecurityProviders, + VirtualWanSecurityProvider, + VirtualWanSecurityProviderType, + VirtualWanVpnProfileParameters, + AuthenticationMethod, + VpnProfileResponse, + DnsNameAvailabilityResult, + Operation, + OperationDisplay, + OperationPropertiesFormat, + OperationPropertiesFormatServiceSpecification, + MetricSpecification, + Availability, + Dimension, + LogSpecification, + ApplicationGateway, + ApplicationGatewayPropertiesFormat, + ApplicationGatewaySku, + ApplicationGatewaySkuName, + ApplicationGatewayTier, + ApplicationGatewaySkuFamily, + ApplicationGatewaySslPolicy, + ApplicationGatewaySslProtocol, + ApplicationGatewaySslPolicyType, + ApplicationGatewaySslPolicyName, + ApplicationGatewaySslCipherSuite, + ApplicationGatewayOperationalState, + ApplicationGatewayAuthenticationCertificate, + ApplicationGatewayAuthenticationCertificatePropertiesFormat, + ApplicationGatewayTrustedRootCertificate, + ApplicationGatewayTrustedRootCertificatePropertiesFormat, + ApplicationGatewayTrustedClientCertificate, + ApplicationGatewayTrustedClientCertificatePropertiesFormat, + ApplicationGatewaySslCertificate, + ApplicationGatewaySslCertificatePropertiesFormat, + ApplicationGatewayManagedHsm, + ApplicationGatewayFrontendIPConfiguration, + ApplicationGatewayFrontendIPConfigurationPropertiesFormat, + ApplicationGatewayFrontendPort, + ApplicationGatewayFrontendPortPropertiesFormat, + ApplicationGatewayProbe, + ApplicationGatewayProbePropertiesFormat, + ApplicationGatewayProtocol, + ApplicationGatewayProbeHealthResponseMatch, + ApplicationGatewayBackendHttpSettings, + ApplicationGatewayBackendHttpSettingsPropertiesFormat, + ApplicationGatewayCookieBasedAffinity, + ApplicationGatewayConnectionDraining, + ApplicationGatewayBackendSettings, + ApplicationGatewayBackendSettingsPropertiesFormat, + ApplicationGatewayHttpListener, + ApplicationGatewayHttpListenerPropertiesFormat, + ApplicationGatewayCustomError, + ApplicationGatewayCustomErrorStatusCode, + ApplicationGatewayListener, + ApplicationGatewayListenerPropertiesFormat, + ApplicationGatewaySslProfile, + ApplicationGatewaySslProfilePropertiesFormat, + ApplicationGatewayClientAuthConfiguration, + ApplicationGatewayClientRevocationOptions, + ApplicationGatewayClientAuthVerificationModes, + ApplicationGatewayUrlPathMap, + ApplicationGatewayUrlPathMapPropertiesFormat, + ApplicationGatewayPathRule, + ApplicationGatewayPathRulePropertiesFormat, + ApplicationGatewayRequestRoutingRule, + ApplicationGatewayRequestRoutingRulePropertiesFormat, + ApplicationGatewayRequestRoutingRuleType, + ApplicationGatewayRoutingRule, + ApplicationGatewayRoutingRulePropertiesFormat, + ApplicationGatewayRewriteRuleSet, + ApplicationGatewayRewriteRuleSetPropertiesFormat, + ApplicationGatewayRewriteRule, + ApplicationGatewayRewriteRuleCondition, + ApplicationGatewayRewriteRuleActionSet, + ApplicationGatewayHeaderConfiguration, + HeaderValueMatcher, + ApplicationGatewayUrlConfiguration, + ApplicationGatewayRedirectConfiguration, + ApplicationGatewayRedirectConfigurationPropertiesFormat, + ApplicationGatewayRedirectType, + ApplicationGatewayWebApplicationFirewallConfiguration, + ApplicationGatewayFirewallMode, + ApplicationGatewayFirewallDisabledRuleGroup, + ApplicationGatewayFirewallExclusion, + ApplicationGatewayAutoscaleConfiguration, + ApplicationGatewayPrivateLinkConfiguration, + ApplicationGatewayPrivateLinkConfigurationProperties, + ApplicationGatewayPrivateLinkIpConfiguration, + ApplicationGatewayPrivateLinkIpConfigurationProperties, + ApplicationGatewayPrivateEndpointConnection, + ApplicationGatewayPrivateEndpointConnectionProperties, + ApplicationGatewayLoadDistributionPolicy, + ApplicationGatewayLoadDistributionPolicyPropertiesFormat, + ApplicationGatewayLoadDistributionTarget, + ApplicationGatewayLoadDistributionTargetPropertiesFormat, + ApplicationGatewayLoadDistributionAlgorithm, + ApplicationGatewayEntraJWTValidationConfig, + ApplicationGatewayEntraJWTValidationConfigPropertiesFormat, + ApplicationGatewayUnAuthorizedRequestAction, + ApplicationGatewayGlobalConfiguration, + TagsObject, + ApplicationGatewayBackendHealth, + ApplicationGatewayBackendHealthPool, + ApplicationGatewayBackendHealthHttpSettings, + ApplicationGatewayBackendHealthServer, + ApplicationGatewayBackendHealthServerHealth, + ApplicationGatewayOnDemandProbe, + ApplicationGatewayBackendHealthOnDemand, + ApplicationGatewayAvailableSslOptions, + ApplicationGatewayAvailableSslOptionsPropertiesFormat, + ApplicationGatewaySslPredefinedPolicy, + ApplicationGatewaySslPredefinedPolicyPropertiesFormat, + ErrorModel, + ErrorDetails, + ApplicationGatewayAvailableWafRuleSetsResult, + ApplicationGatewayFirewallRuleSet, + ApplicationGatewayFirewallRuleSetPropertiesFormat, + ApplicationGatewayFirewallRuleGroup, + ApplicationGatewayFirewallRule, + ApplicationGatewayWafRuleStateTypes, + ApplicationGatewayWafRuleActionTypes, + ApplicationGatewayWafRuleSensitivityTypes, + ApplicationGatewayTierTypes, + AzureFirewall, + AzureFirewallPropertiesFormat, + AzureFirewallApplicationRuleCollection, + AzureFirewallApplicationRuleCollectionPropertiesFormat, + AzureFirewallRCAction, + AzureFirewallRCActionType, + AzureFirewallApplicationRule, + AzureFirewallApplicationRuleProtocol, + AzureFirewallApplicationRuleProtocolType, + AzureFirewallNatRuleCollection, + AzureFirewallNatRuleCollectionProperties, + AzureFirewallNatRCAction, + AzureFirewallNatRCActionType, + AzureFirewallNatRule, + AzureFirewallNetworkRuleProtocol, + AzureFirewallNetworkRuleCollection, + AzureFirewallNetworkRuleCollectionPropertiesFormat, + AzureFirewallNetworkRule, + AzureFirewallIPConfiguration, + AzureFirewallIPConfigurationPropertiesFormat, + AzureFirewallThreatIntelMode, + HubIPAddresses, + HubPublicIPAddresses, + AzureFirewallPublicIPAddress, + AzureFirewallIpGroups, + AzureFirewallSku, + AzureFirewallSkuName, + AzureFirewallSkuTier, + AzureFirewallAutoscaleConfiguration, + AfcConfiguration, + IPPrefixesList, + FirewallPacketCaptureParameters, + AzureFirewallPacketCaptureFlags, + AzureFirewallPacketCaptureFlagsType, + AzureFirewallPacketCaptureRule, + AzureFirewallPacketCaptureOperationType, + AzureFirewallPacketCaptureResponse, + AzureFirewallPacketCaptureResponseCode, + BastionHost, + BastionHostPropertiesFormat, + BastionHostIPConfiguration, + BastionHostIPConfigurationPropertiesFormat, + BastionHostPropertiesFormatNetworkAcls, + IPRule, + Sku, + BastionHostSkuName, + EffectiveRouteListResult, + EffectiveRoute, + EffectiveRouteSource, + EffectiveRouteState, + EffectiveNetworkSecurityGroupListResult, + EffectiveNetworkSecurityGroup, + EffectiveNetworkSecurityGroupAssociation, + EffectiveNetworkSecurityRule, + EffectiveSecurityRuleProtocol, + PublicIpDdosProtectionStatusResult, + IsWorkloadProtected, + ReserveCloudServicePublicIpAddressRequest, + IsRollback, + DisassociateCloudServicePublicIpRequest, + DdosCustomPolicy, + DdosCustomPolicyPropertiesFormat, + DdosDetectionRule, + DdosDetectionRulePropertiesFormat, + DdosDetectionMode, + TrafficDetectionRule, + DdosTrafficType, + DdosProtectionPlan, + DdosProtectionPlanPropertiesFormat, + ExpressRouteCircuitAuthorization, + AuthorizationPropertiesFormat, + AuthorizationUseStatus, + ExpressRouteCircuit, + ExpressRouteCircuitPropertiesFormat, + ServiceProviderProvisioningState, + ExpressRouteCircuitPeering, + ExpressRouteCircuitPeeringPropertiesFormat, + ExpressRoutePeeringType, + ExpressRoutePeeringState, + ExpressRouteCircuitPeeringConfig, + ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, + AdvertisedPublicPrefixProperties, + AdvertisedPublicPrefixPropertiesValidationState, + ExpressRouteCircuitStats, + Ipv6ExpressRouteCircuitPeeringConfig, + ExpressRouteCircuitPeeringState, + ExpressRouteConnectionId, + ExpressRouteCircuitConnection, + ExpressRouteCircuitConnectionPropertiesFormat, + Ipv6CircuitConnectionConfig, + CircuitConnectionStatus, + PeerExpressRouteCircuitConnection, + PeerExpressRouteCircuitConnectionPropertiesFormat, + ExpressRouteCircuitServiceProviderProperties, + ExpressRouteCircuitSku, + ExpressRouteCircuitSkuTier, + ExpressRouteCircuitSkuFamily, + ExpressRouteLinkFailoverAllTestsDetails, + FailoverTestStatus, + FailoverTestType, + MaintenanceTestCategory, + ExpressRouteFailoverLinkType, + ExpressRouteLinkFailoverTestBgpStatus, + ExpressRouteFailoverBgpStatusAddressFamily, + ExpressRouteLinkFailoverBgpStatus, + ExpressRouteLinkFailoverSingleTestDetails, + ExpressRouteLinkFailoverRouteList, + ExpressRouteLinkFailoverRoute, + ExpressRouteLinkFailoverStopApiParameters, + ExpressRouteCircuitsArpTableListResult, + ExpressRouteCircuitArpTable, + ExpressRouteCircuitsRoutesTableListResult, + ExpressRouteCircuitRoutesTable, + ExpressRouteCircuitsRoutesTableSummaryListResult, + ExpressRouteCircuitRoutesTableSummary, + ExpressRouteCrossConnection, + ExpressRouteCrossConnectionProperties, + ExpressRouteCircuitReference, + ExpressRouteCrossConnectionPeering, + ExpressRouteCrossConnectionPeeringProperties, + ExpressRouteCrossConnectionsRoutesTableSummaryListResult, + ExpressRouteCrossConnectionRoutesTableSummary, + ExpressRoutePortsLocation, + ExpressRoutePortsLocationPropertiesFormat, + ExpressRoutePortsLocationBandwidths, + ExpressRoutePort, + ExpressRoutePortPropertiesFormat, + ExpressRoutePortsEncapsulation, + ExpressRouteLink, + ExpressRouteLinkPropertiesFormat, + ExpressRouteLinkConnectorType, + ExpressRouteLinkAdminState, + ExpressRouteLinkMacSecConfig, + ExpressRouteLinkMacSecCipher, + ExpressRouteLinkMacSecSciState, + ExpressRoutePortsBillingType, + GenerateExpressRoutePortsLOARequest, + GenerateExpressRoutePortsLOAResult, + ExpressRoutePortAuthorization, + ExpressRoutePortAuthorizationPropertiesFormat, + ExpressRoutePortAuthorizationUseStatus, + FirewallPolicy, + FirewallPolicyPropertiesFormat, + FirewallPolicyThreatIntelWhitelist, + FirewallPolicyInsights, + FirewallPolicyLogAnalyticsResources, + FirewallPolicyLogAnalyticsWorkspace, + FirewallPolicySnat, + AutoLearnPrivateRangesMode, + FirewallPolicySQL, + DnsSettings, + ExplicitProxy, + FirewallPolicyIntrusionDetection, + FirewallPolicyIntrusionDetectionStateType, + FirewallPolicyIntrusionDetectionProfileType, + FirewallPolicyIntrusionDetectionConfiguration, + FirewallPolicyIntrusionDetectionSignatureSpecification, + FirewallPolicyIntrusionDetectionBypassTrafficSpecifications, + FirewallPolicyIntrusionDetectionProtocol, + FirewallPolicyTransportSecurity, + FirewallPolicyCertificateAuthority, + FirewallPolicySku, + FirewallPolicySkuTier, + FirewallPolicyRuleCollectionGroup, + FirewallPolicyRuleCollectionGroupProperties, + FirewallPolicyRuleCollection, + FirewallPolicyRuleCollectionUnion, + FirewallPolicyRuleCollectionType, + FirewallPolicyNatRuleCollection, + FirewallPolicyNatRuleCollectionAction, + FirewallPolicyNatRuleCollectionActionType, + FirewallPolicyRule, + FirewallPolicyRuleUnion, + FirewallPolicyRuleType, + ApplicationRule, + FirewallPolicyRuleApplicationProtocol, + FirewallPolicyRuleApplicationProtocolType, + FirewallPolicyHttpHeaderToInsert, + NatRule, + FirewallPolicyRuleNetworkProtocol, + NetworkRule, + FirewallPolicyFilterRuleCollection, + FirewallPolicyFilterRuleCollectionAction, + FirewallPolicyFilterRuleCollectionActionType, + SignaturesOverrides, + SignaturesOverridesProperties, + WritableResource, + SignaturesOverridesList, + FirewallPolicyDraft, + FirewallPolicyDraftProperties, + FirewallPolicyRuleCollectionGroupDraft, + FirewallPolicyRuleCollectionGroupDraftProperties, + IpamPool, + IpamPoolProperties, + IpType, + CommonTrackedResource, + CommonResource, + CommonErrorResponse, + CommonErrorDetail, + CommonErrorAdditionalInfo, + IpamPoolUpdate, + IpamPoolUpdateProperties, + PoolUsage, + ResourceBasics, + PoolAssociation, + NetworkManager, + NetworkManagerProperties, + NetworkManagerPropertiesNetworkManagerScopes, + CrossTenantScopes, + ConfigurationType, + PatchObject, + StaticCidr, + StaticCidrProperties, + CommonProxyResource, + IpAllocation, + IpAllocationPropertiesFormat, + IpAllocationType, + IpGroup, + IpGroupPropertiesFormat, + MigrateLoadBalancerToIpBasedRequest, + MigratedPools, + QueryInboundNatRulePortMappingRequest, + BackendAddressInboundNatRulePortMappings, + InboundNatRulePortMapping, + LoadBalancerVipSwapRequest, + LoadBalancerVipSwapRequestFrontendIPConfiguration, + LoadBalancerVipSwapRequestFrontendIPConfigurationProperties, + NetworkManagerConnection, + NetworkManagerConnectionProperties, + ScopeConnectionState, + ChildResource, + ConnectivityConfiguration, + NetworkGroup, + StaticMember, + StaticMemberProperties, + NetworkManagerRoutingConfiguration, + NetworkManagerRoutingConfigurationPropertiesFormat, + RouteTableUsageMode, + RoutingRuleCollection, + RoutingRuleCollectionPropertiesFormat, + NetworkManagerRoutingGroupItem, + DisableBgpRoutePropagation, + RoutingRule, + RoutingRulePropertiesFormat, + RoutingRuleRouteDestination, + RoutingRuleDestinationType, + RoutingRuleNextHop, + RoutingRuleNextHopType, + ScopeConnection, + ScopeConnectionProperties, + Commit, + CommitProperties, + SecurityAdminConfiguration, + SecurityAdminConfigurationPropertiesFormat, + NetworkIntentPolicyBasedService, + AddressSpaceAggregationOption, + AdminRuleCollection, + AdminRuleCollectionPropertiesFormat, + SecurityUserConfiguration, + SecurityUserConfigurationPropertiesFormat, + SecurityUserRuleCollection, + SecurityUserRuleCollectionPropertiesFormat, + SecurityUserGroupItem, + SecurityUserRule, + SecurityUserRulePropertiesFormat, + NetworkProfile, + NetworkProfilePropertiesFormat, + ContainerNetworkInterface, + ContainerNetworkInterfacePropertiesFormat, + ContainerNetworkInterfaceConfiguration, + ContainerNetworkInterfaceConfigurationPropertiesFormat, + Container, + ContainerNetworkInterfaceIpConfiguration, + ContainerNetworkInterfaceIpConfigurationPropertiesFormat, + NetworkSecurityPerimeter, + NetworkSecurityPerimeterProperties, + NspProvisioningState, + SecurityPerimeterTrackedResource, + SecurityPerimeterResource, + SecurityPerimeterSystemData, + CreatedByType, + UpdateTagsRequest, + ReachabilityAnalysisIntent, + ReachabilityAnalysisIntentProperties, + IPTraffic, + NetworkProtocol, + VerifierWorkspace, + VerifierWorkspaceProperties, + VerifierWorkspaceUpdate, + VerifierWorkspaceUpdateProperties, + ReachabilityAnalysisRun, + ReachabilityAnalysisRunProperties, + IntentContent, + NetworkVirtualApplianceConnection, + NetworkVirtualApplianceConnectionProperties, + RoutingConfiguration, + PropagatedRouteTable, + VnetRoute, + StaticRoutesConfig, + VnetLocalRouteOverrideCriteria, + StaticRoute, + NetworkVirtualAppliance, + NetworkVirtualAppliancePropertiesFormat, + VirtualApplianceSkuProperties, + VirtualApplianceNicProperties, + NicTypeInResponse, + NetworkVirtualAppliancePropertiesFormatNetworkProfile, + VirtualApplianceNetworkInterfaceConfiguration, + NicTypeInRequest, + VirtualApplianceNetworkInterfaceConfigurationProperties, + VirtualApplianceIPConfiguration, + VirtualApplianceIPConfigurationProperties, + VirtualApplianceAdditionalNicProperties, + InternetIngressPublicIpsProperties, + DelegationProperties, + PartnerManagedResourceProperties, + NvaInterfaceConfigurationsProperties, + NvaInVnetSubnetReferenceProperties, + NvaNicType, + NetworkVirtualApplianceInstanceIds, + NetworkVirtualApplianceBootDiagnosticParameters, + NetworkVirtualApplianceInstanceId, + VirtualApplianceSite, + VirtualApplianceSiteProperties, + Office365PolicyProperties, + BreakOutCategoryPolicies, + ErrorResponse, + TopologyParameters, + Topology, + TopologyResource, + TopologyAssociation, + AssociationType, + VerificationIPFlowParameters, + Direction, + IpFlowProtocol, + VerificationIPFlowResult, + Access, + NextHopParameters, + NextHopResult, + NextHopType, + SecurityGroupViewParameters, + SecurityGroupViewResult, + SecurityGroupNetworkInterface, + SecurityRuleAssociations, + NetworkInterfaceAssociation, + SubnetAssociation, + TroubleshootingParameters, + TroubleshootingProperties, + TroubleshootingResult, + TroubleshootingDetails, + TroubleshootingRecommendedActions, + QueryTroubleshootingParameters, + FlowLogInformation, + FlowLogProperties, + FlowLogStatusParameters, + ConnectivityParameters, + ConnectivitySource, + ConnectivityDestination, + Protocol, + ProtocolConfiguration, + HttpConfiguration, + HttpMethod, + HttpHeader, + ConnectivityInformation, + ConnectivityHop, + HopLink, + HopLinkProperties, + ConnectivityIssue, + Origin, + Severity, + IssueType, + ConnectionStatus, + AzureReachabilityReportParameters, + AzureReachabilityReportLocation, + AzureReachabilityReport, + AzureReachabilityReportItem, + AzureReachabilityReportLatencyInfo, + AvailableProvidersListParameters, + AvailableProvidersList, + AvailableProvidersListCountry, + AvailableProvidersListState, + AvailableProvidersListCity, + NetworkConfigurationDiagnosticParameters, + VerbosityLevel, + NetworkConfigurationDiagnosticProfile, + NetworkConfigurationDiagnosticResponse, + NetworkConfigurationDiagnosticResult, + NetworkSecurityGroupResult, + EvaluatedNetworkSecurityGroup, + MatchedRule, + NetworkSecurityRulesEvaluationResult, + CheckPrivateLinkServiceVisibilityRequest, + PrivateLinkServiceVisibility, + AutoApprovedPrivateLinkService, + PublicIPPrefix, + PublicIPPrefixPropertiesFormat, + ReferencedPublicIpAddress, + PublicIPPrefixSku, + PublicIPPrefixSkuName, + PublicIPPrefixSkuTier, + RouteFilter, + RouteFilterPropertiesFormat, + RouteFilterRule, + RouteFilterRulePropertiesFormat, + RouteFilterRuleType, + TrackedResourceWithSettableIdOptionalLocation, + SecurityPartnerProvider, + SecurityPartnerProviderPropertiesFormat, + SecurityProviderName, + SecurityPartnerProviderConnectionStatus, + IPAddressAvailabilityResult, + VirtualNetworkUsage, + VirtualNetworkUsageName, + PrepareNetworkPoliciesRequest, + NetworkIntentPolicyConfiguration, + NetworkIntentPolicy, + UnprepareNetworkPoliciesRequest, + VirtualNetworkGateway, + VirtualNetworkGatewayPropertiesFormat, + VirtualNetworkGatewayAutoScaleConfiguration, + VirtualNetworkGatewayAutoScaleBounds, + VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayIPConfigurationPropertiesFormat, + VirtualNetworkGatewayType, + VpnType, + VpnGatewayGeneration, + VirtualNetworkGatewayMigrationStatus, + VirtualNetworkGatewayMigrationState, + VirtualNetworkGatewayMigrationPhase, + VirtualNetworkGatewaySku, + VirtualNetworkGatewaySkuName, + VirtualNetworkGatewaySkuTier, + VpnClientConfiguration, + VpnClientRootCertificate, + VpnClientRootCertificatePropertiesFormat, + VpnClientRevokedCertificate, + VpnClientRevokedCertificatePropertiesFormat, + VpnClientProtocol, + VpnAuthenticationType, + IpsecPolicy, + IpsecEncryption, + IpsecIntegrity, + IkeEncryption, + IkeIntegrity, + DhGroup, + PfsGroup, + RadiusServer, + VngClientConnectionConfiguration, + VngClientConnectionConfigurationProperties, + VirtualNetworkGatewayPolicyGroup, + VirtualNetworkGatewayPolicyGroupProperties, + VirtualNetworkGatewayPolicyGroupMember, + VpnPolicyMemberAttributeType, + BgpSettings, + IPConfigurationBgpPeeringAddress, + VirtualNetworkGatewayNatRule, + VirtualNetworkGatewayNatRuleProperties, + VpnNatRuleType, + VpnNatRuleMode, + VpnNatRuleMapping, + AdminState, + ResiliencyModel, + VirtualNetworkGatewayConnectionListEntity, + VirtualNetworkGatewayConnectionListEntityPropertiesFormat, + VirtualNetworkConnectionGatewayReference, + VirtualNetworkGatewayConnectionType, + VirtualNetworkGatewayConnectionProtocol, + VirtualNetworkGatewayConnectionMode, + VirtualNetworkGatewayConnectionStatus, + TunnelConnectionHealth, + GatewayCustomBgpIpAddressIpConfiguration, + TrafficSelectorPolicy, + VpnClientParameters, + ProcessorArchitecture, + BgpPeerStatusListResult, + BgpPeerStatus, + BgpPeerState, + RadiusAuthServerListResult, + RadiusAuthServer, + GatewayRouteListResult, + GatewayRoute, + GatewayResiliencyInformation, + ResiliencyRecommendationComponents, + GatewayResiliencyRecommendation, + GatewayRouteSetsInformation, + GatewayRouteSet, + RouteSourceDetails, + CircuitMetadataMap, + VpnClientIPsecParameters, + VpnPacketCaptureStartParameters, + VpnPacketCaptureStopParameters, + ExpressRouteFailoverTestDetails, + ExpressRouteFailoverCircuitResourceDetails, + ExpressRouteFailoverConnectionResourceDetails, + FailoverConnectionStatus, + ExpressRouteFailoverSingleTestDetails, + FailoverTestStatusForSingleTest, + ExpressRouteFailoverRedundantRoute, + FailoverConnectionDetails, + ExpressRouteFailoverStopApiParameters, + VpnClientConnectionHealthDetailListResult, + VpnClientConnectionHealthDetail, + P2SVpnConnectionRequest, + VirtualNetworkGatewayMigrationParameters, + VirtualNetworkGatewayMigrationType, + VpnDeviceScriptParameters, + VirtualNetworkGatewayConnection, + VirtualNetworkGatewayConnectionPropertiesFormat, + LocalNetworkGateway, + LocalNetworkGatewayPropertiesFormat, + VirtualNetworkGatewayConnectionTunnelProperties, + ConnectionAuthenticationType, + CertificateAuthentication, + ConnectionSharedKey, + ConnectionResetSharedKey, + VirtualRouter, + VirtualRouterPropertiesFormat, + VirtualRouterPeering, + VirtualRouterPeeringProperties, + VirtualWAN, + VirtualWanProperties, + OfficeTrafficCategory, + VpnSite, + VpnSiteProperties, + DeviceProperties, + VpnSiteLink, + VpnSiteLinkProperties, + VpnLinkProviderProperties, + VpnLinkBgpSettings, + O365PolicyProperties, + O365BreakOutCategoryPolicies, + VpnServerConfiguration, + VpnServerConfigurationProperties, + VpnGatewayTunnelingProtocol, + VpnServerConfigVpnClientRootCertificate, + VpnServerConfigVpnClientRevokedCertificate, + VpnServerConfigRadiusServerRootCertificate, + VpnServerConfigRadiusClientRootCertificate, + AadAuthenticationParameters, + P2SVpnGateway, + P2SVpnGatewayProperties, + P2SConnectionConfiguration, + P2SConnectionConfigurationProperties, + VpnServerConfigurationPolicyGroup, + VpnServerConfigurationPolicyGroupProperties, + VpnServerConfigurationPolicyGroupMember, + VpnClientConnectionHealth, + TrackedResourceWithSettableName, + VirtualHub, + VirtualHubProperties, + VirtualHubRouteTable, + VirtualHubRoute, + VirtualHubRouteTableV2, + VirtualHubRouteTableV2Properties, + VirtualHubRouteV2, + RoutingState, + PreferredRoutingGateway, + HubRoutingPreference, + VirtualRouterAutoScaleConfiguration, + EffectiveRoutesParameters, + VirtualHubEffectiveRouteList, + VirtualHubEffectiveRoute, + GetInboundRoutesParameters, + EffectiveRouteMapRouteList, + EffectiveRouteMapRoute, + GetOutboundRoutesParameters, + RouteMap, + RouteMapProperties, + RouteMapRule, + Criterion, + RouteMapMatchCondition, + Action, + RouteMapActionType, + Parameter, + NextStep, + ReadOnlySubResourceModel, + VpnGateway, + VpnGatewayProperties, + VpnConnection, + VpnConnectionProperties, + VpnConnectionStatus, + VpnSiteLinkConnection, + VpnSiteLinkConnectionProperties, + VpnLinkConnectionMode, + VpnGatewayIpConfiguration, + VpnGatewayNatRule, + VpnGatewayNatRuleProperties, + VpnGatewayPacketCaptureStartParameters, + VpnGatewayPacketCaptureStopParameters, + ExpressRouteGateway, + ExpressRouteGatewayProperties, + ExpressRouteGatewayPropertiesAutoScaleConfiguration, + ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds, + ExpressRouteConnection, + ExpressRouteConnectionProperties, + ExpressRouteCircuitPeeringId, + VirtualHubId, + ExpressRouteGatewayList, + HubRouteTable, + HubRouteTableProperties, + HubRoute, + ConnectionPolicy, + ConnectionPolicyProperties, + ProxyResource, + WebApplicationFirewallPolicy, + WebApplicationFirewallPolicyPropertiesFormat, + PolicySettings, + WebApplicationFirewallEnabledState, + WebApplicationFirewallMode, + PolicySettingsLogScrubbing, + WebApplicationFirewallScrubbingState, + WebApplicationFirewallScrubbingRules, + ScrubbingRuleEntryMatchVariable, + ScrubbingRuleEntryMatchOperator, + ScrubbingRuleEntryState, + WebApplicationFirewallCustomRule, + WebApplicationFirewallState, + ApplicationGatewayFirewallRateLimitDuration, + WebApplicationFirewallRuleType, + MatchCondition, + MatchVariable, + WebApplicationFirewallMatchVariable, + WebApplicationFirewallOperator, + WebApplicationFirewallTransform, + GroupByUserSession, + GroupByVariable, + ApplicationGatewayFirewallUserSessionVariable, + WebApplicationFirewallAction, + WebApplicationFirewallPolicyResourceState, + ManagedRulesDefinition, + ExceptionEntry, + ExceptionEntryMatchVariable, + ExceptionEntryValueMatchOperator, + ExceptionEntrySelectorMatchOperator, + ExclusionManagedRuleSet, + ExclusionManagedRuleGroup, + ExclusionManagedRule, + OwaspCrsExclusionEntry, + OwaspCrsExclusionEntryMatchVariable, + OwaspCrsExclusionEntrySelectorMatchOperator, + ManagedRuleSet, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleEnabledState, + ActionType, + SensitivityType, + ManagedRuleSetRuleGroup, + ApplicationGatewayForContainersReferenceDefinition, + VirtualNetworkAppliance, + VirtualNetworkAppliancePropertiesFormat, + VirtualNetworkApplianceIpConfiguration, + VirtualNetworkApplianceIpConfigurationProperties, + VirtualNetworkApplianceIpVersionType, + ServiceGateway, + ServiceGatewayPropertiesFormat, + RouteTargetAddressPropertiesFormat, + ServiceGatewaySku, + ServiceGatewaySkuName, + ServiceGatewaySkuTier, + ServiceGatewayUpdateAddressLocationsRequest, + UpdateAction, + ServiceGatewayAddressLocation, + AddressUpdateAction, + ServiceGatewayAddress, + ServiceGatewayUpdateServicesRequest, + ServiceUpdateAction, + ServiceGatewayServiceRequest, + ServiceGatewayService, + ServiceGatewayServicePropertiesFormat, + ServiceType, + ServiceGatewayAddressLocationResponse, + InterconnectGroup, + InterconnectGroupPropertiesFormat, + InterconnectGroupScope, + Subgroup, + SubgroupProperties, + SubgroupProfile, + SubgroupProfileScope, + InterconnectGroupNodeAvailability, + SubgroupNodeAvailabilityEntry, + ApplicationGatewayPrivateLinkResource, + ApplicationGatewayPrivateLinkResourceProperties, + ApplicationGatewayWafDynamicManifestResult, + ApplicationGatewayWafDynamicManifestPropertiesResult, + DefaultRuleSetPropertyFormat, + ApplicationGatewayFirewallManifestRuleSet, + ApplicationGatewayRuleSetStatusOptions, + ProxyResourceWithSettableId, + AzureWebCategory, + AzureWebCategoryPropertiesFormat, + ExpressRouteProviderPortListResult, + SwapResource, + SwapResourceProperties, + SlotType, + ProxyResourceWithReadOnlyID, + SwapResourceListResult, + CustomIpPrefix, + CustomIpPrefixPropertiesFormat, + CommissionedState, + Geo, + CustomIpPrefixType, + DscpConfiguration, + DscpConfigurationPropertiesFormat, + QosIpRange, + QosPortRange, + ProtocolType, + QosDefinition, + IdpsQueryObject, + FilterItems, + OrderBy, + FirewallPolicyIdpsQuerySortOrder, + QueryResults, + SingleQueryResult, + FirewallPolicyIdpsSignatureMode, + FirewallPolicyIdpsSignatureSeverity, + FirewallPolicyIdpsSignatureDirection, + SignatureOverridesFilterValuesQuery, + SignatureOverridesFilterValuesResponse, + NetworkManagerCommit, + NetworkManagerDeploymentStatusParameter, + NetworkManagerDeploymentStatusListResult, + NetworkManagerDeploymentStatus, + DeploymentStatus, + LoadBalancerHealthPerRule, + LoadBalancerHealthPerRulePerBackendAddress, + BaseAdminRule, + BaseAdminRuleUnion, + AdminRuleKind, + AdminRule, + DefaultAdminRule, + NspProfile, + NspProfileProperties, + SecurityPerimeterProxyResource, + NspAccessRule, + NspAccessRuleProperties, + AccessRuleDirection, + SubscriptionId, + PerimeterBasedAccessRule, + NspAssociation, + NspAssociationProperties, + AssociationAccessMode, + NspLink, + NspLinkProperties, + NspLinkProvisioningState, + NspLinkStatus, + NspLinkReference, + NspLinkReferenceProperties, + NspLoggingConfiguration, + NspLoggingConfigurationProperties, + NetworkVirtualApplianceSku, + NetworkVirtualApplianceSkuPropertiesFormat, + NetworkVirtualApplianceSkuInstances, + InboundSecurityRule, + InboundSecurityRuleProperties, + InboundSecurityRuleType, + InboundSecurityRules, + InboundSecurityRulesProtocol, + PacketCapture, + PacketCaptureParameters, + PacketCaptureMachineScope, + PacketCaptureTargetType, + PacketCaptureStorageLocation, + PacketCaptureFilter, + PcProtocol, + PacketCaptureSettings, + PacketCaptureResult, + PacketCaptureResultProperties, + PacketCaptureQueryStatusResult, + PcStatus, + PcError, + ConnectionMonitorResult, + ConnectionMonitorResultProperties, + ConnectionMonitorType, + ConnectionMonitorParameters, + ConnectionMonitorSource, + ConnectionMonitorDestination, + ConnectionMonitorEndpoint, + EndpointType, + ConnectionMonitorEndpointFilter, + ConnectionMonitorEndpointFilterType, + ConnectionMonitorEndpointFilterItem, + ConnectionMonitorEndpointFilterItemType, + ConnectionMonitorEndpointScope, + ConnectionMonitorEndpointScopeItem, + CoverageLevel, + ConnectionMonitorEndpointLocationDetails, + ConnectionMonitorTestConfiguration, + ConnectionMonitorTestConfigurationProtocol, + PreferredIPVersion, + ConnectionMonitorHttpConfiguration, + HttpConfigurationMethod, + ConnectionMonitorTcpConfiguration, + DestinationPortBehavior, + ConnectionMonitorIcmpConfiguration, + ConnectionMonitorSuccessThreshold, + ConnectionMonitorTestGroup, + ConnectionMonitorOutput, + OutputType, + ConnectionMonitorWorkspaceSettings, + TrackedResourceWithEtag, + ConnectionMonitor, + PrivateDnsZoneGroup, + PrivateDnsZoneGroupPropertiesFormat, + PrivateDnsZoneConfig, + PrivateDnsZonePropertiesFormat, + RecordSet, + ResourceNavigationLinksListResult, + ServiceAssociationLinksListResult, + GetVpnSitesConfigurationRequest, + VpnServerConfigurationsResponse, + HubVirtualNetworkConnection, + HubVirtualNetworkConnectionProperties, + VpnConnectionPacketCaptureStartParameters, + VpnConnectionPacketCaptureStopParameters, + ConnectionSharedKeyResult, + SharedKeyProperties, + P2SVpnProfileParameters, + P2SVpnConnectionHealthRequest, + P2SVpnConnectionHealth, + ExpressRouteConnectionList, + BgpConnection, + BgpConnectionProperties, + HubBgpConnectionStatus, + PeerRoute, + HubIpConfiguration, + HubIPConfigurationPropertiesFormat, + RoutingIntent, + RoutingIntentProperties, + RoutingPolicy, + AvailableDelegation, + AvailableServiceAlias, + AzureFirewallFqdnTag, + AzureFirewallFqdnTagPropertiesFormat, + EndpointServiceResult, + ExpressRouteServiceProvider, + ExpressRouteServiceProviderPropertiesFormat, + ExpressRouteServiceProviderBandwidthsOffered, + PerimeterAssociableResource, + PerimeterAssociableResourceProperties, + NspReadinessState, + NspServiceTagsResource, + AvailablePrivateEndpointType, + BgpServiceCommunity, + BgpServiceCommunityPropertiesFormat, + BGPCommunity, + ServiceTagsListResult, + ServiceTagInformation, + ServiceTagInformationPropertiesFormat, + Usage, + UsageUnit, + UsageName, + LoadBalancerDetailLevel, + SyncRemoteAddressSpace, +} from "./models.js"; +export { + KnownBastionConnectProtocol, + KnownConnectivityTopology, + KnownIsGlobal, + KnownConnectedGroupPrivateEndpointsScale, + KnownConnectedGroupAddressOverlap, + KnownPeeringEnforcement, + KnownUseHubGateway, + KnownGroupConnectivity, + KnownDeleteExistingPeering, + KnownGroupMemberType, + KnownEffectiveAdminRuleKind, + KnownSecurityConfigurationRuleProtocol, + KnownAddressPrefixType, + KnownSecurityConfigurationRuleAccess, + KnownSecurityConfigurationRuleDirection, + KnownVirtualWanSecurityProviderType, + KnownAuthenticationMethod, + KnownApplicationGatewaySkuName, + KnownApplicationGatewayTier, + KnownApplicationGatewaySkuFamily, + KnownApplicationGatewaySslProtocol, + KnownApplicationGatewaySslPolicyType, + KnownApplicationGatewaySslPolicyName, + KnownApplicationGatewaySslCipherSuite, + KnownApplicationGatewayOperationalState, + KnownApplicationGatewayProtocol, + KnownApplicationGatewayCookieBasedAffinity, + KnownApplicationGatewayCustomErrorStatusCode, + KnownApplicationGatewayClientRevocationOptions, + KnownApplicationGatewayClientAuthVerificationModes, + KnownApplicationGatewayRequestRoutingRuleType, + KnownApplicationGatewayRedirectType, + KnownApplicationGatewayFirewallMode, + KnownApplicationGatewayLoadDistributionAlgorithm, + KnownApplicationGatewayUnAuthorizedRequestAction, + KnownApplicationGatewayBackendHealthServerHealth, + KnownApplicationGatewayWafRuleStateTypes, + KnownApplicationGatewayWafRuleActionTypes, + KnownApplicationGatewayWafRuleSensitivityTypes, + KnownApplicationGatewayTierTypes, + KnownAzureFirewallRCActionType, + KnownAzureFirewallApplicationRuleProtocolType, + KnownAzureFirewallNatRCActionType, + KnownAzureFirewallNetworkRuleProtocol, + KnownAzureFirewallThreatIntelMode, + KnownAzureFirewallSkuName, + KnownAzureFirewallSkuTier, + KnownAzureFirewallPacketCaptureFlagsType, + KnownAzureFirewallPacketCaptureOperationType, + KnownAzureFirewallPacketCaptureResponseCode, + KnownBastionHostSkuName, + KnownEffectiveRouteSource, + KnownEffectiveRouteState, + KnownEffectiveSecurityRuleProtocol, + KnownIsWorkloadProtected, + KnownIsRollback, + KnownDdosDetectionMode, + KnownDdosTrafficType, + KnownAuthorizationUseStatus, + KnownServiceProviderProvisioningState, + KnownExpressRoutePeeringType, + KnownExpressRoutePeeringState, + KnownExpressRouteCircuitPeeringAdvertisedPublicPrefixState, + KnownAdvertisedPublicPrefixPropertiesValidationState, + KnownExpressRouteCircuitPeeringState, + KnownCircuitConnectionStatus, + KnownExpressRouteCircuitSkuTier, + KnownExpressRouteCircuitSkuFamily, + KnownFailoverTestStatus, + KnownFailoverTestType, + KnownMaintenanceTestCategory, + KnownExpressRouteFailoverLinkType, + KnownExpressRouteFailoverBgpStatusAddressFamily, + KnownExpressRouteLinkFailoverBgpStatus, + KnownExpressRoutePortsEncapsulation, + KnownExpressRouteLinkConnectorType, + KnownExpressRouteLinkAdminState, + KnownExpressRouteLinkMacSecCipher, + KnownExpressRouteLinkMacSecSciState, + KnownExpressRoutePortsBillingType, + KnownExpressRoutePortAuthorizationUseStatus, + KnownAutoLearnPrivateRangesMode, + KnownFirewallPolicyIntrusionDetectionStateType, + KnownFirewallPolicyIntrusionDetectionProfileType, + KnownFirewallPolicyIntrusionDetectionProtocol, + KnownFirewallPolicySkuTier, + KnownFirewallPolicyRuleCollectionType, + KnownFirewallPolicyNatRuleCollectionActionType, + KnownFirewallPolicyRuleType, + KnownFirewallPolicyRuleApplicationProtocolType, + KnownFirewallPolicyRuleNetworkProtocol, + KnownFirewallPolicyFilterRuleCollectionActionType, + KnownIpType, + KnownConfigurationType, + KnownIpAllocationType, + KnownScopeConnectionState, + KnownRouteTableUsageMode, + KnownDisableBgpRoutePropagation, + KnownRoutingRuleDestinationType, + KnownRoutingRuleNextHopType, + KnownNetworkIntentPolicyBasedService, + KnownAddressSpaceAggregationOption, + KnownNspProvisioningState, + KnownCreatedByType, + KnownNetworkProtocol, + KnownVnetLocalRouteOverrideCriteria, + KnownNicTypeInResponse, + KnownNicTypeInRequest, + KnownNvaNicType, + KnownAssociationType, + KnownDirection, + KnownIpFlowProtocol, + KnownAccess, + KnownNextHopType, + KnownProtocol, + KnownHttpMethod, + KnownOrigin, + KnownSeverity, + KnownIssueType, + KnownConnectionStatus, + KnownVerbosityLevel, + KnownPublicIPPrefixSkuName, + KnownPublicIPPrefixSkuTier, + KnownRouteFilterRuleType, + KnownSecurityProviderName, + KnownSecurityPartnerProviderConnectionStatus, + KnownVirtualNetworkGatewayType, + KnownVpnType, + KnownVpnGatewayGeneration, + KnownVirtualNetworkGatewayMigrationState, + KnownVirtualNetworkGatewayMigrationPhase, + KnownVirtualNetworkGatewaySkuName, + KnownVirtualNetworkGatewaySkuTier, + KnownVpnClientProtocol, + KnownVpnAuthenticationType, + KnownIpsecEncryption, + KnownIpsecIntegrity, + KnownIkeEncryption, + KnownIkeIntegrity, + KnownDhGroup, + KnownPfsGroup, + KnownVpnPolicyMemberAttributeType, + KnownVpnNatRuleType, + KnownVpnNatRuleMode, + KnownAdminState, + KnownResiliencyModel, + KnownVirtualNetworkGatewayConnectionType, + KnownVirtualNetworkGatewayConnectionProtocol, + KnownVirtualNetworkGatewayConnectionMode, + KnownVirtualNetworkGatewayConnectionStatus, + KnownProcessorArchitecture, + KnownBgpPeerState, + KnownFailoverConnectionStatus, + KnownFailoverTestStatusForSingleTest, + KnownVirtualNetworkGatewayMigrationType, + KnownConnectionAuthenticationType, + KnownOfficeTrafficCategory, + KnownVpnGatewayTunnelingProtocol, + KnownRoutingState, + KnownPreferredRoutingGateway, + KnownHubRoutingPreference, + KnownRouteMapMatchCondition, + KnownRouteMapActionType, + KnownNextStep, + KnownVpnConnectionStatus, + KnownVpnLinkConnectionMode, + KnownWebApplicationFirewallEnabledState, + KnownWebApplicationFirewallMode, + KnownWebApplicationFirewallScrubbingState, + KnownScrubbingRuleEntryMatchVariable, + KnownScrubbingRuleEntryMatchOperator, + KnownScrubbingRuleEntryState, + KnownWebApplicationFirewallState, + KnownApplicationGatewayFirewallRateLimitDuration, + KnownWebApplicationFirewallRuleType, + KnownWebApplicationFirewallMatchVariable, + KnownWebApplicationFirewallOperator, + KnownWebApplicationFirewallTransform, + KnownApplicationGatewayFirewallUserSessionVariable, + KnownWebApplicationFirewallAction, + KnownWebApplicationFirewallPolicyResourceState, + KnownExceptionEntryMatchVariable, + KnownExceptionEntryValueMatchOperator, + KnownExceptionEntrySelectorMatchOperator, + KnownOwaspCrsExclusionEntryMatchVariable, + KnownOwaspCrsExclusionEntrySelectorMatchOperator, + KnownManagedRuleEnabledState, + KnownActionType, + KnownSensitivityType, + KnownVirtualNetworkApplianceIpVersionType, + KnownServiceGatewaySkuName, + KnownServiceGatewaySkuTier, + KnownUpdateAction, + KnownAddressUpdateAction, + KnownServiceUpdateAction, + KnownServiceType, + KnownInterconnectGroupScope, + KnownSubgroupProfileScope, + KnownApplicationGatewayRuleSetStatusOptions, + KnownCommissionedState, + KnownGeo, + KnownCustomIpPrefixType, + KnownProtocolType, + KnownFirewallPolicyIdpsQuerySortOrder, + KnownDeploymentStatus, + KnownAdminRuleKind, + KnownAccessRuleDirection, + KnownAssociationAccessMode, + KnownNspLinkProvisioningState, + KnownNspLinkStatus, + KnownInboundSecurityRuleType, + KnownInboundSecurityRulesProtocol, + KnownPcProtocol, + KnownPcStatus, + KnownPcError, + KnownConnectionMonitorType, + KnownEndpointType, + KnownConnectionMonitorEndpointFilterType, + KnownConnectionMonitorEndpointFilterItemType, + KnownCoverageLevel, + KnownConnectionMonitorTestConfigurationProtocol, + KnownPreferredIPVersion, + KnownHttpConfigurationMethod, + KnownDestinationPortBehavior, + KnownOutputType, + KnownHubBgpConnectionStatus, + KnownNspReadinessState, + KnownUsageUnit, + KnownLoadBalancerDetailLevel, + KnownSyncRemoteAddressSpace, +} from "./models.js"; diff --git a/sdk/network/arm-network/src/models/microsoft/network/models.ts b/sdk/network/arm-network/src/models/microsoft/network/models.ts new file mode 100644 index 000000000000..e9b08b9b84cb --- /dev/null +++ b/sdk/network/arm-network/src/models/microsoft/network/models.ts @@ -0,0 +1,43521 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { areAllPropsUndefined } from "../../../static-helpers/serialization/check-prop-undefined.js"; +import { + Resource, + CommonProvisioningState, + applicationGatewayIPConfigurationArraySerializer, + applicationGatewayIPConfigurationArrayDeserializer, + ApplicationGatewayIPConfiguration, + SubResource, + subResourceSerializer, + subResourceDeserializer, + IPAllocationMethod, + applicationGatewayBackendAddressPoolArraySerializer, + applicationGatewayBackendAddressPoolArrayDeserializer, + ApplicationGatewayBackendAddressPool, + applicationGatewayBackendAddressPoolDeserializer, + NetworkInterfaceIPConfiguration, + networkInterfaceIPConfigurationDeserializer, + FrontendIPConfiguration, + subResourceArraySerializer, + subResourceArrayDeserializer, + IPVersion, + Subnet, + subnetSerializer, + subnetDeserializer, + securityRuleArrayDeserializer, + SecurityRule, + SecurityRuleAccess, + SecurityRuleDirection, + networkInterfaceArrayDeserializer, + NetworkInterface, + PrivateEndpoint, + privateEndpointDeserializer, + PrivateLinkServiceConnectionState, + privateLinkServiceConnectionStateSerializer, + privateLinkServiceConnectionStateDeserializer, + ExtendedLocation, + extendedLocationSerializer, + extendedLocationDeserializer, + frontendIPConfigurationArrayDeserializer, + RetentionPolicyParameters, + retentionPolicyParametersSerializer, + retentionPolicyParametersDeserializer, + FlowLogFormatParameters, + flowLogFormatParametersSerializer, + flowLogFormatParametersDeserializer, + TrafficAnalyticsProperties, + trafficAnalyticsPropertiesSerializer, + trafficAnalyticsPropertiesDeserializer, + ManagedServiceIdentity, + managedServiceIdentitySerializer, + managedServiceIdentityDeserializer, + RouteNextHopType, + PublicIPAddress, + publicIPAddressSerializer, + publicIPAddressDeserializer, + ipTagArraySerializer, + ipTagArrayDeserializer, + IpTag, + NatGateway, + natGatewaySerializer, + natGatewayDeserializer, + ipConfigurationProfileArraySerializer, + ipConfigurationProfileArrayDeserializer, + IPConfigurationProfile, + resourceNavigationLinkArrayDeserializer, + ResourceNavigationLink, + serviceAssociationLinkArrayDeserializer, + ServiceAssociationLink, + backendAddressPoolArraySerializer, + backendAddressPoolArrayDeserializer, + BackendAddressPool, + TransportProtocol, + SubResourceModel, + LoadBalancer, + loadBalancingRuleArrayDeserializer, + LoadBalancingRule, + probeArrayDeserializer, + Probe, + outboundRuleArrayDeserializer, + OutboundRule, + loadBalancerArrayDeserializer, + NetworkWatcher, + networkWatcherArrayDeserializer, + VirtualNetwork, + virtualNetworkSerializer, + virtualNetworkDeserializer, + AddressSpace, + addressSpaceSerializer, + addressSpaceDeserializer, +} from "../../common/models.js"; +import { SystemData, systemDataDeserializer } from "../../models.js"; + +/** + * This file contains only generated model types and their (de)serializers. + * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input. + */ +/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +/** Post request for Create/Delete/Get Bastion Shareable Link endpoints. */ +export interface BastionShareableLinkListRequest { + /** List of VM references. */ + vms?: BastionShareableLink[]; +} + +export function bastionShareableLinkListRequestSerializer( + item: BastionShareableLinkListRequest, +): any { + return { vms: !item["vms"] ? item["vms"] : bastionShareableLinkArraySerializer(item["vms"]) }; +} + +export function bastionShareableLinkArraySerializer(result: Array): any[] { + return result.map((item) => { + return bastionShareableLinkSerializer(item); + }); +} + +export function bastionShareableLinkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return bastionShareableLinkDeserializer(item); + }); +} + +/** Bastion Shareable Link. */ +export interface BastionShareableLink { + /** Reference of the virtual machine resource. */ + vm: Vm; + /** The unique Bastion Shareable Link to the virtual machine. */ + readonly bsl?: string; + /** The time when the link was created. */ + readonly createdAt?: string; + /** Optional field indicating the warning or error message related to the vm in case of partial failure. */ + readonly message?: string; +} + +export function bastionShareableLinkSerializer(item: BastionShareableLink): any { + return { vm: vmSerializer(item["vm"]) }; +} + +export function bastionShareableLinkDeserializer(item: any): BastionShareableLink { + return { + vm: vmDeserializer(item["vm"]), + bsl: item["bsl"], + createdAt: item["createdAt"], + message: item["message"], + }; +} + +/** Describes a Virtual Machine. */ +export interface Vm extends Resource {} + +export function vmSerializer(item: Vm): any { + return { id: item["id"], location: item["location"], tags: item["tags"] }; +} + +export function vmDeserializer(item: any): Vm { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + }; +} + +/** Response for all the Bastion Shareable Link endpoints. */ +export interface _BastionShareableLinkListResult { + /** The BastionShareableLink items on this page */ + value: BastionShareableLink[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _bastionShareableLinkListResultDeserializer( + item: any, +): _BastionShareableLinkListResult { + return { + value: bastionShareableLinkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Post request for Delete Bastion Shareable Link By Token endpoint. */ +export interface BastionShareableLinkTokenListRequest { + /** List of Bastion Shareable Link Token. */ + tokens?: string[]; +} + +export function bastionShareableLinkTokenListRequestSerializer( + item: BastionShareableLinkTokenListRequest, +): any { + return { + tokens: !item["tokens"] + ? item["tokens"] + : item["tokens"].map((p: any) => { + return p; + }), + }; +} + +/** Response for GetActiveSessions. */ +export interface _BastionActiveSessionListResult { + /** The BastionActiveSession items on this page */ + value: BastionActiveSession[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _bastionActiveSessionListResultDeserializer( + item: any, +): _BastionActiveSessionListResult { + return { + value: bastionActiveSessionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function bastionActiveSessionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return bastionActiveSessionDeserializer(item); + }); +} + +/** The session detail for a target. */ +export interface BastionActiveSession { + /** A unique id for the session. */ + readonly sessionId?: string; + /** The time when the session started. */ + readonly startTime?: Record; + /** The subscription id for the target virtual machine. */ + readonly targetSubscriptionId?: string; + /** The type of the resource. */ + readonly resourceType?: string; + /** The host name of the target. */ + readonly targetHostName?: string; + /** The resource group of the target. */ + readonly targetResourceGroup?: string; + /** The user name who is active on this session. */ + readonly userName?: string; + /** The IP Address of the target. */ + readonly targetIpAddress?: string; + /** The protocol used to connect to the target. */ + readonly protocol?: BastionConnectProtocol; + /** The resource id of the target. */ + readonly targetResourceId?: string; + /** Duration in mins the session has been active. */ + readonly sessionDurationInMins?: number; +} + +export function bastionActiveSessionDeserializer(item: any): BastionActiveSession { + return { + sessionId: item["sessionId"], + startTime: item["startTime"], + targetSubscriptionId: item["targetSubscriptionId"], + resourceType: item["resourceType"], + targetHostName: item["targetHostName"], + targetResourceGroup: item["targetResourceGroup"], + userName: item["userName"], + targetIpAddress: item["targetIpAddress"], + protocol: item["protocol"], + targetResourceId: item["targetResourceId"], + sessionDurationInMins: item["sessionDurationInMins"], + }; +} + +/** The protocol used to connect to the target. */ +export enum KnownBastionConnectProtocol { + /** SSH */ + SSH = "SSH", + /** RDP */ + RDP = "RDP", +} + +/** + * The protocol used to connect to the target. \ + * {@link KnownBastionConnectProtocol} can be used interchangeably with BastionConnectProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SSH**: SSH \ + * **RDP**: RDP + */ +export type BastionConnectProtocol = string; + +/** List of session IDs. */ +export interface SessionIds { + /** List of session IDs. */ + sessionIds?: string[]; +} + +export function sessionIdsSerializer(item: SessionIds): any { + return { + sessionIds: !item["sessionIds"] + ? item["sessionIds"] + : item["sessionIds"].map((p: any) => { + return p; + }), + }; +} + +/** Response for DisconnectActiveSessions. */ +export interface _BastionSessionDeleteResult { + /** The BastionSessionState items on this page */ + value: BastionSessionState[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _bastionSessionDeleteResultDeserializer(item: any): _BastionSessionDeleteResult { + return { + value: bastionSessionStateArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function bastionSessionStateArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return bastionSessionStateDeserializer(item); + }); +} + +/** The session state detail for a target. */ +export interface BastionSessionState { + /** A unique id for the session. */ + readonly sessionId?: string; + /** Used for extra information. */ + readonly message?: string; + /** The state of the session. Disconnected/Failed/NotFound. */ + readonly state?: string; +} + +export function bastionSessionStateDeserializer(item: any): BastionSessionState { + return { + sessionId: item["sessionId"], + message: item["message"], + state: item["state"], + }; +} + +/** ExpressRouteProviderPort resource. */ +export interface ExpressRouteProviderPort extends TrackedResourceWithOptionalLocation { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The name of the port pair. */ + readonly portPairDescriptor?: string; + /** The name of the primary port. */ + readonly primaryAzurePort?: string; + /** The name of the secondary port. */ + readonly secondaryAzurePort?: string; + /** The peering location of the port pair. */ + peeringLocation?: string; + /** Overprovisioning factor for the port pair. */ + overprovisionFactor?: number; + /** Bandwidth of the port in Mbps */ + portBandwidthInMbps?: number; + /** Used Bandwidth of the port in Mbps */ + usedBandwidthInMbps?: number; + /** Remaining Bandwidth of the port in Mbps */ + remainingBandwidthInMbps?: number; +} + +export function expressRouteProviderPortDeserializer(item: any): ExpressRouteProviderPort { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _expressRouteProviderPortPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of ExpressRouteProviderPort. */ +export interface ExpressRouteProviderPortProperties { + /** The name of the port pair. */ + readonly portPairDescriptor?: string; + /** The name of the primary port. */ + readonly primaryAzurePort?: string; + /** The name of the secondary port. */ + readonly secondaryAzurePort?: string; + /** The peering location of the port pair. */ + peeringLocation?: string; + /** Overprovisioning factor for the port pair. */ + overprovisionFactor?: number; + /** Bandwidth of the port in Mbps */ + portBandwidthInMbps?: number; + /** Used Bandwidth of the port in Mbps */ + usedBandwidthInMbps?: number; + /** Remaining Bandwidth of the port in Mbps */ + remainingBandwidthInMbps?: number; +} + +export function expressRouteProviderPortPropertiesDeserializer( + item: any, +): ExpressRouteProviderPortProperties { + return { + portPairDescriptor: item["portPairDescriptor"], + primaryAzurePort: item["primaryAzurePort"], + secondaryAzurePort: item["secondaryAzurePort"], + peeringLocation: item["peeringLocation"], + overprovisionFactor: item["overprovisionFactor"], + portBandwidthInMbps: item["portBandwidthInMbps"], + usedBandwidthInMbps: item["usedBandwidthInMbps"], + remainingBandwidthInMbps: item["remainingBandwidthInMbps"], + }; +} + +/** Common resource representation. */ +export interface TrackedResourceWithOptionalLocation { + /** Resource ID. */ + readonly id?: string; + /** Resource name. */ + readonly name?: string; + /** Resource type. */ + readonly type?: string; + /** Resource location. */ + location?: string; + /** Resource tags. */ + tags?: Record; +} + +export function trackedResourceWithOptionalLocationSerializer( + item: TrackedResourceWithOptionalLocation, +): any { + return { location: item["location"], tags: item["tags"] }; +} + +export function trackedResourceWithOptionalLocationDeserializer( + item: any, +): TrackedResourceWithOptionalLocation { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + }; +} + +/** Effective Virtual Networks Parameter. */ +export interface ActiveConfigurationParameter { + /** List of regions. */ + regions?: string[]; + /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ + skipToken?: string; +} + +export function activeConfigurationParameterSerializer(item: ActiveConfigurationParameter): any { + return { + regions: !item["regions"] + ? item["regions"] + : item["regions"].map((p: any) => { + return p; + }), + skipToken: item["skipToken"], + }; +} + +/** Result of the request to list active connectivity configurations. It contains a list of active connectivity configurations and a skiptoken to get the next set of results. */ +export interface ActiveConnectivityConfigurationsListResult { + /** Gets a page of active connectivity configurations. */ + value?: ActiveConnectivityConfiguration[]; + /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ + skipToken?: string; +} + +export function activeConnectivityConfigurationsListResultDeserializer( + item: any, +): ActiveConnectivityConfigurationsListResult { + return { + value: !item["value"] + ? item["value"] + : activeConnectivityConfigurationArrayDeserializer(item["value"]), + skipToken: item["skipToken"], + }; +} + +export function activeConnectivityConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return activeConnectivityConfigurationDeserializer(item); + }); +} + +/** Active connectivity configuration. */ +export interface ActiveConnectivityConfiguration extends EffectiveConnectivityConfiguration { + /** Deployment time string. */ + commitTime?: Date; + /** Deployment region. */ + region?: string; +} + +export function activeConnectivityConfigurationDeserializer( + item: any, +): ActiveConnectivityConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _effectiveConnectivityConfigurationPropertiesDeserializer(item["properties"])), + configurationGroups: !item["configurationGroups"] + ? item["configurationGroups"] + : configurationGroupArrayDeserializer(item["configurationGroups"]), + commitTime: !item["commitTime"] ? item["commitTime"] : new Date(item["commitTime"]), + region: item["region"], + }; +} + +/** The network manager effective connectivity configuration */ +export interface EffectiveConnectivityConfiguration { + /** Connectivity configuration ID. */ + id?: string; + /** Effective configuration groups. */ + configurationGroups?: ConfigurationGroup[]; + /** A description of the connectivity configuration. */ + description?: string; + /** Connectivity topology type. */ + connectivityTopology?: ConnectivityTopology; + /** List of hubItems */ + hubs?: Hub[]; + /** Flag if global mesh is supported. */ + isGlobal?: IsGlobal; + /** Collection of additional settings to enhance specific topology behaviors of the connectivity configuration resource. */ + connectivityCapabilities?: ConnectivityConfigurationPropertiesConnectivityCapabilities; + /** Groups for configuration */ + appliesToGroups?: ConnectivityGroupItem[]; + /** The provisioning state of the connectivity configuration resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Flag if need to remove current existing peerings. */ + deleteExistingPeering?: DeleteExistingPeering; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function effectiveConnectivityConfigurationDeserializer( + item: any, +): EffectiveConnectivityConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _effectiveConnectivityConfigurationPropertiesDeserializer(item["properties"])), + configurationGroups: !item["configurationGroups"] + ? item["configurationGroups"] + : configurationGroupArrayDeserializer(item["configurationGroups"]), + }; +} + +/** Properties of network manager connectivity configuration */ +export interface ConnectivityConfigurationProperties { + /** A description of the connectivity configuration. */ + description?: string; + /** Connectivity topology type. */ + connectivityTopology: ConnectivityTopology; + /** List of hubItems */ + hubs?: Hub[]; + /** Flag if global mesh is supported. */ + isGlobal?: IsGlobal; + /** Collection of additional settings to enhance specific topology behaviors of the connectivity configuration resource. */ + connectivityCapabilities?: ConnectivityConfigurationPropertiesConnectivityCapabilities; + /** Groups for configuration */ + appliesToGroups: ConnectivityGroupItem[]; + /** The provisioning state of the connectivity configuration resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Flag if need to remove current existing peerings. */ + deleteExistingPeering?: DeleteExistingPeering; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function connectivityConfigurationPropertiesSerializer( + item: ConnectivityConfigurationProperties, +): any { + return { + description: item["description"], + connectivityTopology: item["connectivityTopology"], + hubs: !item["hubs"] ? item["hubs"] : hubArraySerializer(item["hubs"]), + isGlobal: item["isGlobal"], + connectivityCapabilities: !item["connectivityCapabilities"] + ? item["connectivityCapabilities"] + : connectivityConfigurationPropertiesConnectivityCapabilitiesSerializer( + item["connectivityCapabilities"], + ), + appliesToGroups: connectivityGroupItemArraySerializer(item["appliesToGroups"]), + deleteExistingPeering: item["deleteExistingPeering"], + }; +} + +export function connectivityConfigurationPropertiesDeserializer( + item: any, +): ConnectivityConfigurationProperties { + return { + description: item["description"], + connectivityTopology: item["connectivityTopology"], + hubs: !item["hubs"] ? item["hubs"] : hubArrayDeserializer(item["hubs"]), + isGlobal: item["isGlobal"], + connectivityCapabilities: !item["connectivityCapabilities"] + ? item["connectivityCapabilities"] + : connectivityConfigurationPropertiesConnectivityCapabilitiesDeserializer( + item["connectivityCapabilities"], + ), + appliesToGroups: connectivityGroupItemArrayDeserializer(item["appliesToGroups"]), + provisioningState: item["provisioningState"], + deleteExistingPeering: item["deleteExistingPeering"], + resourceGuid: item["resourceGuid"], + }; +} + +/** Connectivity topology type. */ +export enum KnownConnectivityTopology { + /** HubAndSpoke */ + HubAndSpoke = "HubAndSpoke", + /** Mesh */ + Mesh = "Mesh", +} + +/** + * Connectivity topology type. \ + * {@link KnownConnectivityTopology} can be used interchangeably with ConnectivityTopology, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **HubAndSpoke**: HubAndSpoke \ + * **Mesh**: Mesh + */ +export type ConnectivityTopology = string; + +export function hubArraySerializer(result: Array): any[] { + return result.map((item) => { + return hubSerializer(item); + }); +} + +export function hubArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return hubDeserializer(item); + }); +} + +/** Hub Item. */ +export interface Hub { + /** Resource Id. */ + resourceId?: string; + /** Resource Type. */ + resourceType?: string; +} + +export function hubSerializer(item: Hub): any { + return { resourceId: item["resourceId"], resourceType: item["resourceType"] }; +} + +export function hubDeserializer(item: any): Hub { + return { + resourceId: item["resourceId"], + resourceType: item["resourceType"], + }; +} + +/** Flag if global mesh is supported. */ +export enum KnownIsGlobal { + /** False */ + False = "False", + /** True */ + True = "True", +} + +/** + * Flag if global mesh is supported. \ + * {@link KnownIsGlobal} can be used interchangeably with IsGlobal, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **False**: False \ + * **True**: True + */ +export type IsGlobal = string; + +/** Collection of additional settings to enhance specific topology behaviors of the connectivity configuration resource. */ +export interface ConnectivityConfigurationPropertiesConnectivityCapabilities { + /** Option indicating the scale of private endpoints allowed in the connected group of the connectivity configuration. */ + connectedGroupPrivateEndpointsScale: ConnectedGroupPrivateEndpointsScale; + /** Behavior to handle overlapped IP address space among members of the connected group of the connectivity configuration. */ + connectedGroupAddressOverlap: ConnectedGroupAddressOverlap; + /** Option indicating enforcement of peerings created by the connectivity configuration. */ + peeringEnforcement: PeeringEnforcement; +} + +export function connectivityConfigurationPropertiesConnectivityCapabilitiesSerializer( + item: ConnectivityConfigurationPropertiesConnectivityCapabilities, +): any { + return { + connectedGroupPrivateEndpointsScale: item["connectedGroupPrivateEndpointsScale"], + connectedGroupAddressOverlap: item["connectedGroupAddressOverlap"], + peeringEnforcement: item["peeringEnforcement"], + }; +} + +export function connectivityConfigurationPropertiesConnectivityCapabilitiesDeserializer( + item: any, +): ConnectivityConfigurationPropertiesConnectivityCapabilities { + return { + connectedGroupPrivateEndpointsScale: item["connectedGroupPrivateEndpointsScale"], + connectedGroupAddressOverlap: item["connectedGroupAddressOverlap"], + peeringEnforcement: item["peeringEnforcement"], + }; +} + +/** Option indicating the scale of private endpoints allowed in the connected group of the connectivity configuration. */ +export enum KnownConnectedGroupPrivateEndpointsScale { + /** Default. Allows for up to 2K private endpoints in the connected group. */ + Standard = "Standard", + /** Allows for up to 20K private endpoints in the connected group. */ + HighScale = "HighScale", +} + +/** + * Option indicating the scale of private endpoints allowed in the connected group of the connectivity configuration. \ + * {@link KnownConnectedGroupPrivateEndpointsScale} can be used interchangeably with ConnectedGroupPrivateEndpointsScale, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Default. Allows for up to 2K private endpoints in the connected group. \ + * **HighScale**: Allows for up to 20K private endpoints in the connected group. + */ +export type ConnectedGroupPrivateEndpointsScale = string; + +/** Behavior to handle overlapped IP address space among members of the connected group of the connectivity configuration. */ +export enum KnownConnectedGroupAddressOverlap { + /** Default. Allows connected group members to have overlapping IP address space. */ + Allowed = "Allowed", + /** Strictly disallows connected group members from having overlapping IP address space. Prevents the addition of a virtual network with overlapping address to the connected group, blocks peering between a virtual network and a connected group member if any connected group member has an overlapping range, and restricts address space modifications that would introduce overlap. */ + Disallowed = "Disallowed", +} + +/** + * Behavior to handle overlapped IP address space among members of the connected group of the connectivity configuration. \ + * {@link KnownConnectedGroupAddressOverlap} can be used interchangeably with ConnectedGroupAddressOverlap, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Allowed**: Default. Allows connected group members to have overlapping IP address space. \ + * **Disallowed**: Strictly disallows connected group members from having overlapping IP address space. Prevents the addition of a virtual network with overlapping address to the connected group, blocks peering between a virtual network and a connected group member if any connected group member has an overlapping range, and restricts address space modifications that would introduce overlap. + */ +export type ConnectedGroupAddressOverlap = string; + +/** Option indicating enforcement of peerings created by the connectivity configuration. */ +export enum KnownPeeringEnforcement { + /** Default. Peerings created by the connectivity configuration may be modified or deleted outside of the network manager. */ + Unenforced = "Unenforced", + /** Peerings created by the connectivity configuration will not be modifiable or deletable outside of the network manager. */ + Enforced = "Enforced", +} + +/** + * Option indicating enforcement of peerings created by the connectivity configuration. \ + * {@link KnownPeeringEnforcement} can be used interchangeably with PeeringEnforcement, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unenforced**: Default. Peerings created by the connectivity configuration may be modified or deleted outside of the network manager. \ + * **Enforced**: Peerings created by the connectivity configuration will not be modifiable or deletable outside of the network manager. + */ +export type PeeringEnforcement = string; + +export function connectivityGroupItemArraySerializer(result: Array): any[] { + return result.map((item) => { + return connectivityGroupItemSerializer(item); + }); +} + +export function connectivityGroupItemArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return connectivityGroupItemDeserializer(item); + }); +} + +/** Connectivity group item. */ +export interface ConnectivityGroupItem { + /** Network group Id. */ + networkGroupId: string; + /** Flag if need to use hub gateway. */ + useHubGateway?: UseHubGateway; + /** Flag if global is supported. */ + isGlobal?: IsGlobal; + /** Group connectivity type. */ + groupConnectivity: GroupConnectivity; +} + +export function connectivityGroupItemSerializer(item: ConnectivityGroupItem): any { + return { + networkGroupId: item["networkGroupId"], + useHubGateway: item["useHubGateway"], + isGlobal: item["isGlobal"], + groupConnectivity: item["groupConnectivity"], + }; +} + +export function connectivityGroupItemDeserializer(item: any): ConnectivityGroupItem { + return { + networkGroupId: item["networkGroupId"], + useHubGateway: item["useHubGateway"], + isGlobal: item["isGlobal"], + groupConnectivity: item["groupConnectivity"], + }; +} + +/** Flag if need to use hub gateway. */ +export enum KnownUseHubGateway { + /** False */ + False = "False", + /** True */ + True = "True", +} + +/** + * Flag if need to use hub gateway. \ + * {@link KnownUseHubGateway} can be used interchangeably with UseHubGateway, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **False**: False \ + * **True**: True + */ +export type UseHubGateway = string; + +/** Group connectivity type. */ +export enum KnownGroupConnectivity { + /** None */ + None = "None", + /** DirectlyConnected */ + DirectlyConnected = "DirectlyConnected", +} + +/** + * Group connectivity type. \ + * {@link KnownGroupConnectivity} can be used interchangeably with GroupConnectivity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **DirectlyConnected**: DirectlyConnected + */ +export type GroupConnectivity = string; + +/** Flag if need to remove current existing peerings. */ +export enum KnownDeleteExistingPeering { + /** False */ + False = "False", + /** True */ + True = "True", +} + +/** + * Flag if need to remove current existing peerings. \ + * {@link KnownDeleteExistingPeering} can be used interchangeably with DeleteExistingPeering, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **False**: False \ + * **True**: True + */ +export type DeleteExistingPeering = string; + +export function configurationGroupArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return configurationGroupDeserializer(item); + }); +} + +/** The network configuration group resource */ +export interface ConfigurationGroup { + /** Network group ID. */ + id?: string; + /** A description of the network group. */ + description?: string; + /** The type of the group member. */ + memberType?: GroupMemberType; + /** The provisioning state of the scope assignment resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function configurationGroupDeserializer(item: any): ConfigurationGroup { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _configurationGroupPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of network group */ +export interface NetworkGroupProperties { + /** A description of the network group. */ + description?: string; + /** The type of the group member. */ + memberType?: GroupMemberType; + /** The provisioning state of the scope assignment resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function networkGroupPropertiesSerializer(item: NetworkGroupProperties): any { + return { description: item["description"], memberType: item["memberType"] }; +} + +export function networkGroupPropertiesDeserializer(item: any): NetworkGroupProperties { + return { + description: item["description"], + memberType: item["memberType"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +/** Network Group member type */ +export enum KnownGroupMemberType { + /** VirtualNetwork */ + VirtualNetwork = "VirtualNetwork", + /** Subnet */ + Subnet = "Subnet", +} + +/** + * Network Group member type \ + * {@link KnownGroupMemberType} can be used interchangeably with GroupMemberType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **VirtualNetwork**: VirtualNetwork \ + * **Subnet**: Subnet + */ +export type GroupMemberType = string; + +/** Result of the request to list active security admin rules. It contains a list of active security admin rules and a skiptoken to get the next set of results. */ +export interface ActiveSecurityAdminRulesListResult { + /** Gets a page of active security admin rules. */ + value?: ActiveBaseSecurityAdminRuleUnion[]; + /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ + skipToken?: string; +} + +export function activeSecurityAdminRulesListResultDeserializer( + item: any, +): ActiveSecurityAdminRulesListResult { + return { + value: !item["value"] + ? item["value"] + : activeBaseSecurityAdminRuleUnionArrayDeserializer(item["value"]), + skipToken: item["skipToken"], + }; +} + +export function activeBaseSecurityAdminRuleUnionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return activeBaseSecurityAdminRuleUnionDeserializer(item); + }); +} + +/** Network base admin rule. */ +export interface ActiveBaseSecurityAdminRule { + /** Resource ID. */ + id?: string; + /** Deployment time string. */ + commitTime?: Date; + /** Deployment region. */ + region?: string; + /** A description of the security admin configuration. */ + configurationDescription?: string; + /** A description of the rule collection. */ + ruleCollectionDescription?: string; + /** Groups for rule collection */ + ruleCollectionAppliesToGroups?: NetworkManagerSecurityGroupItem[]; + /** Effective configuration groups. */ + ruleGroups?: ConfigurationGroup[]; + /** Whether the rule is custom or default. */ + /** The discriminator possible values: Custom, Default */ + kind: EffectiveAdminRuleKind; +} + +export function activeBaseSecurityAdminRuleDeserializer(item: any): ActiveBaseSecurityAdminRule { + return { + id: item["id"], + commitTime: !item["commitTime"] ? item["commitTime"] : new Date(item["commitTime"]), + region: item["region"], + configurationDescription: item["configurationDescription"], + ruleCollectionDescription: item["ruleCollectionDescription"], + ruleCollectionAppliesToGroups: !item["ruleCollectionAppliesToGroups"] + ? item["ruleCollectionAppliesToGroups"] + : networkManagerSecurityGroupItemArrayDeserializer(item["ruleCollectionAppliesToGroups"]), + ruleGroups: !item["ruleGroups"] + ? item["ruleGroups"] + : configurationGroupArrayDeserializer(item["ruleGroups"]), + kind: item["kind"], + }; +} + +/** Alias for ActiveBaseSecurityAdminRuleUnion */ +export type ActiveBaseSecurityAdminRuleUnion = + | ActiveSecurityAdminRule + | ActiveDefaultSecurityAdminRule + | ActiveBaseSecurityAdminRule; + +export function activeBaseSecurityAdminRuleUnionDeserializer( + item: any, +): ActiveBaseSecurityAdminRuleUnion { + switch (item["kind"]) { + case "Custom": + return activeSecurityAdminRuleDeserializer(item as ActiveSecurityAdminRule); + + case "Default": + return activeDefaultSecurityAdminRuleDeserializer(item as ActiveDefaultSecurityAdminRule); + + default: + return activeBaseSecurityAdminRuleDeserializer(item); + } +} + +export function networkManagerSecurityGroupItemArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkManagerSecurityGroupItemSerializer(item); + }); +} + +export function networkManagerSecurityGroupItemArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkManagerSecurityGroupItemDeserializer(item); + }); +} + +/** Network manager security group item. */ +export interface NetworkManagerSecurityGroupItem { + /** Network manager group Id. */ + networkGroupId: string; +} + +export function networkManagerSecurityGroupItemSerializer( + item: NetworkManagerSecurityGroupItem, +): any { + return { networkGroupId: item["networkGroupId"] }; +} + +export function networkManagerSecurityGroupItemDeserializer( + item: any, +): NetworkManagerSecurityGroupItem { + return { + networkGroupId: item["networkGroupId"], + }; +} + +/** Whether the rule is custom or default. */ +export enum KnownEffectiveAdminRuleKind { + /** Custom */ + Custom = "Custom", + /** Default */ + Default = "Default", +} + +/** + * Whether the rule is custom or default. \ + * {@link KnownEffectiveAdminRuleKind} can be used interchangeably with EffectiveAdminRuleKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Custom**: Custom \ + * **Default**: Default + */ +export type EffectiveAdminRuleKind = string; + +/** Network admin rule. */ +export interface ActiveSecurityAdminRule extends ActiveBaseSecurityAdminRule { + /** Whether the rule is custom or default. */ + kind: "Custom"; + /** A description for this rule. Restricted to 140 chars. */ + description?: string; + /** Network protocol this rule applies to. */ + protocol?: SecurityConfigurationRuleProtocol; + /** The CIDR or source IP ranges. */ + sources?: AddressPrefixItem[]; + /** The destination address prefixes. CIDR or destination IP ranges. */ + destinations?: AddressPrefixItem[]; + /** The source port ranges. */ + sourcePortRanges?: string[]; + /** The destination port ranges. */ + destinationPortRanges?: string[]; + /** Indicates the access allowed for this particular rule */ + access?: SecurityConfigurationRuleAccess; + /** The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ + priority?: number; + /** Indicates if the traffic matched against the rule in inbound or outbound. */ + direction?: SecurityConfigurationRuleDirection; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function activeSecurityAdminRuleDeserializer(item: any): ActiveSecurityAdminRule { + return { + id: item["id"], + commitTime: !item["commitTime"] ? item["commitTime"] : new Date(item["commitTime"]), + region: item["region"], + configurationDescription: item["configurationDescription"], + ruleCollectionDescription: item["ruleCollectionDescription"], + ruleCollectionAppliesToGroups: !item["ruleCollectionAppliesToGroups"] + ? item["ruleCollectionAppliesToGroups"] + : networkManagerSecurityGroupItemArrayDeserializer(item["ruleCollectionAppliesToGroups"]), + ruleGroups: !item["ruleGroups"] + ? item["ruleGroups"] + : configurationGroupArrayDeserializer(item["ruleGroups"]), + kind: item["kind"], + ...(!item["properties"] + ? item["properties"] + : _activeSecurityAdminRulePropertiesDeserializer(item["properties"])), + }; +} + +/** Security admin rule resource. */ +export interface AdminPropertiesFormat { + /** A description for this rule. Restricted to 140 chars. */ + description?: string; + /** Network protocol this rule applies to. */ + protocol: SecurityConfigurationRuleProtocol; + /** The CIDR or source IP ranges. */ + sources?: AddressPrefixItem[]; + /** The destination address prefixes. CIDR or destination IP ranges. */ + destinations?: AddressPrefixItem[]; + /** The source port ranges. */ + sourcePortRanges?: string[]; + /** The destination port ranges. */ + destinationPortRanges?: string[]; + /** Indicates the access allowed for this particular rule */ + access: SecurityConfigurationRuleAccess; + /** The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ + priority: number; + /** Indicates if the traffic matched against the rule in inbound or outbound. */ + direction: SecurityConfigurationRuleDirection; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function adminPropertiesFormatSerializer(item: AdminPropertiesFormat): any { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] ? item["sources"] : addressPrefixItemArraySerializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArraySerializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + }; +} + +export function adminPropertiesFormatDeserializer(item: any): AdminPropertiesFormat { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] + ? item["sources"] + : addressPrefixItemArrayDeserializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArrayDeserializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +/** Network protocol this rule applies to. */ +export enum KnownSecurityConfigurationRuleProtocol { + /** Tcp */ + Tcp = "Tcp", + /** Udp */ + Udp = "Udp", + /** Icmp */ + Icmp = "Icmp", + /** Esp */ + Esp = "Esp", + /** Any */ + Any = "Any", + /** Ah */ + Ah = "Ah", +} + +/** + * Network protocol this rule applies to. \ + * {@link KnownSecurityConfigurationRuleProtocol} can be used interchangeably with SecurityConfigurationRuleProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Tcp**: Tcp \ + * **Udp**: Udp \ + * **Icmp**: Icmp \ + * **Esp**: Esp \ + * **Any**: Any \ + * **Ah**: Ah + */ +export type SecurityConfigurationRuleProtocol = string; + +export function addressPrefixItemArraySerializer(result: Array): any[] { + return result.map((item) => { + return addressPrefixItemSerializer(item); + }); +} + +export function addressPrefixItemArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return addressPrefixItemDeserializer(item); + }); +} + +/** Address prefix item. */ +export interface AddressPrefixItem { + /** Address prefix. */ + addressPrefix?: string; + /** Address prefix type. */ + addressPrefixType?: AddressPrefixType; +} + +export function addressPrefixItemSerializer(item: AddressPrefixItem): any { + return { addressPrefix: item["addressPrefix"], addressPrefixType: item["addressPrefixType"] }; +} + +export function addressPrefixItemDeserializer(item: any): AddressPrefixItem { + return { + addressPrefix: item["addressPrefix"], + addressPrefixType: item["addressPrefixType"], + }; +} + +/** Address prefix type. */ +export enum KnownAddressPrefixType { + /** IPPrefix */ + IPPrefix = "IPPrefix", + /** ServiceTag */ + ServiceTag = "ServiceTag", + /** NetworkGroup */ + NetworkGroup = "NetworkGroup", +} + +/** + * Address prefix type. \ + * {@link KnownAddressPrefixType} can be used interchangeably with AddressPrefixType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPPrefix**: IPPrefix \ + * **ServiceTag**: ServiceTag \ + * **NetworkGroup**: NetworkGroup + */ +export type AddressPrefixType = string; + +/** Whether network traffic is allowed or denied. */ +export enum KnownSecurityConfigurationRuleAccess { + /** Allow */ + Allow = "Allow", + /** Deny */ + Deny = "Deny", + /** AlwaysAllow */ + AlwaysAllow = "AlwaysAllow", +} + +/** + * Whether network traffic is allowed or denied. \ + * {@link KnownSecurityConfigurationRuleAccess} can be used interchangeably with SecurityConfigurationRuleAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Allow**: Allow \ + * **Deny**: Deny \ + * **AlwaysAllow**: AlwaysAllow + */ +export type SecurityConfigurationRuleAccess = string; + +/** The direction of the rule. The direction specifies if the rule will be evaluated on incoming or outgoing traffic. */ +export enum KnownSecurityConfigurationRuleDirection { + /** Inbound */ + Inbound = "Inbound", + /** Outbound */ + Outbound = "Outbound", +} + +/** + * The direction of the rule. The direction specifies if the rule will be evaluated on incoming or outgoing traffic. \ + * {@link KnownSecurityConfigurationRuleDirection} can be used interchangeably with SecurityConfigurationRuleDirection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inbound**: Inbound \ + * **Outbound**: Outbound + */ +export type SecurityConfigurationRuleDirection = string; + +/** Network default admin rule. */ +export interface ActiveDefaultSecurityAdminRule extends ActiveBaseSecurityAdminRule { + /** Whether the rule is custom or default. */ + kind: "Default"; + /** A description for this rule. Restricted to 140 chars. */ + readonly description?: string; + /** Default rule flag. */ + flag?: string; + /** Network protocol this rule applies to. */ + readonly protocol?: SecurityConfigurationRuleProtocol; + /** The CIDR or source IP ranges. */ + readonly sources?: AddressPrefixItem[]; + /** The destination address prefixes. CIDR or destination IP ranges. */ + readonly destinations?: AddressPrefixItem[]; + /** The source port ranges. */ + readonly sourcePortRanges?: string[]; + /** The destination port ranges. */ + readonly destinationPortRanges?: string[]; + /** Indicates the access allowed for this particular rule */ + readonly access?: SecurityConfigurationRuleAccess; + /** The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ + readonly priority?: number; + /** Indicates if the traffic matched against the rule in inbound or outbound. */ + readonly direction?: SecurityConfigurationRuleDirection; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function activeDefaultSecurityAdminRuleDeserializer( + item: any, +): ActiveDefaultSecurityAdminRule { + return { + id: item["id"], + commitTime: !item["commitTime"] ? item["commitTime"] : new Date(item["commitTime"]), + region: item["region"], + configurationDescription: item["configurationDescription"], + ruleCollectionDescription: item["ruleCollectionDescription"], + ruleCollectionAppliesToGroups: !item["ruleCollectionAppliesToGroups"] + ? item["ruleCollectionAppliesToGroups"] + : networkManagerSecurityGroupItemArrayDeserializer(item["ruleCollectionAppliesToGroups"]), + ruleGroups: !item["ruleGroups"] + ? item["ruleGroups"] + : configurationGroupArrayDeserializer(item["ruleGroups"]), + kind: item["kind"], + ...(!item["properties"] + ? item["properties"] + : _activeDefaultSecurityAdminRulePropertiesDeserializer(item["properties"])), + }; +} + +/** Security default admin rule resource. */ +export interface DefaultAdminPropertiesFormat { + /** A description for this rule. Restricted to 140 chars. */ + readonly description?: string; + /** Default rule flag. */ + flag?: string; + /** Network protocol this rule applies to. */ + readonly protocol?: SecurityConfigurationRuleProtocol; + /** The CIDR or source IP ranges. */ + readonly sources?: AddressPrefixItem[]; + /** The destination address prefixes. CIDR or destination IP ranges. */ + readonly destinations?: AddressPrefixItem[]; + /** The source port ranges. */ + readonly sourcePortRanges?: string[]; + /** The destination port ranges. */ + readonly destinationPortRanges?: string[]; + /** Indicates the access allowed for this particular rule */ + readonly access?: SecurityConfigurationRuleAccess; + /** The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ + readonly priority?: number; + /** Indicates if the traffic matched against the rule in inbound or outbound. */ + readonly direction?: SecurityConfigurationRuleDirection; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function defaultAdminPropertiesFormatSerializer(item: DefaultAdminPropertiesFormat): any { + return { flag: item["flag"] }; +} + +export function defaultAdminPropertiesFormatDeserializer(item: any): DefaultAdminPropertiesFormat { + return { + description: item["description"], + flag: item["flag"], + protocol: item["protocol"], + sources: !item["sources"] + ? item["sources"] + : addressPrefixItemArrayDeserializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArrayDeserializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +/** Query Request Options */ +export interface QueryRequestOptions { + /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ + skipToken?: string; +} + +export function queryRequestOptionsSerializer(item: QueryRequestOptions): any { + return { skipToken: item["skipToken"] }; +} + +/** Result of the request to list networkManagerEffectiveConnectivityConfiguration. It contains a list of groups and a skiptoken to get the next set of results. */ +export interface NetworkManagerEffectiveConnectivityConfigurationListResult { + /** Gets a page of NetworkManagerEffectiveConnectivityConfiguration */ + value?: EffectiveConnectivityConfiguration[]; + /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ + skipToken?: string; +} + +export function networkManagerEffectiveConnectivityConfigurationListResultDeserializer( + item: any, +): NetworkManagerEffectiveConnectivityConfigurationListResult { + return { + value: !item["value"] + ? item["value"] + : effectiveConnectivityConfigurationArrayDeserializer(item["value"]), + skipToken: item["skipToken"], + }; +} + +export function effectiveConnectivityConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return effectiveConnectivityConfigurationDeserializer(item); + }); +} + +/** Result of the request to list networkManagerEffectiveSecurityAdminRules. It contains a list of groups and a skiptoken to get the next set of results. */ +export interface NetworkManagerEffectiveSecurityAdminRulesListResult { + /** Gets a page of NetworkManagerEffectiveSecurityAdminRules */ + value?: EffectiveBaseSecurityAdminRuleUnion[]; + /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ + skipToken?: string; +} + +export function networkManagerEffectiveSecurityAdminRulesListResultDeserializer( + item: any, +): NetworkManagerEffectiveSecurityAdminRulesListResult { + return { + value: !item["value"] + ? item["value"] + : effectiveBaseSecurityAdminRuleUnionArrayDeserializer(item["value"]), + skipToken: item["skipToken"], + }; +} + +export function effectiveBaseSecurityAdminRuleUnionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return effectiveBaseSecurityAdminRuleUnionDeserializer(item); + }); +} + +/** Network base admin rule. */ +export interface EffectiveBaseSecurityAdminRule { + /** Resource ID. */ + id?: string; + /** A description of the security admin configuration. */ + configurationDescription?: string; + /** A description of the rule collection. */ + ruleCollectionDescription?: string; + /** Groups for rule collection */ + ruleCollectionAppliesToGroups?: NetworkManagerSecurityGroupItem[]; + /** Effective configuration groups. */ + ruleGroups?: ConfigurationGroup[]; + /** Whether the rule is custom or default. */ + /** The discriminator possible values: Custom, Default */ + kind: EffectiveAdminRuleKind; +} + +export function effectiveBaseSecurityAdminRuleDeserializer( + item: any, +): EffectiveBaseSecurityAdminRule { + return { + id: item["id"], + configurationDescription: item["configurationDescription"], + ruleCollectionDescription: item["ruleCollectionDescription"], + ruleCollectionAppliesToGroups: !item["ruleCollectionAppliesToGroups"] + ? item["ruleCollectionAppliesToGroups"] + : networkManagerSecurityGroupItemArrayDeserializer(item["ruleCollectionAppliesToGroups"]), + ruleGroups: !item["ruleGroups"] + ? item["ruleGroups"] + : configurationGroupArrayDeserializer(item["ruleGroups"]), + kind: item["kind"], + }; +} + +/** Alias for EffectiveBaseSecurityAdminRuleUnion */ +export type EffectiveBaseSecurityAdminRuleUnion = + | EffectiveSecurityAdminRule + | EffectiveDefaultSecurityAdminRule + | EffectiveBaseSecurityAdminRule; + +export function effectiveBaseSecurityAdminRuleUnionDeserializer( + item: any, +): EffectiveBaseSecurityAdminRuleUnion { + switch (item["kind"]) { + case "Custom": + return effectiveSecurityAdminRuleDeserializer(item as EffectiveSecurityAdminRule); + + case "Default": + return effectiveDefaultSecurityAdminRuleDeserializer( + item as EffectiveDefaultSecurityAdminRule, + ); + + default: + return effectiveBaseSecurityAdminRuleDeserializer(item); + } +} + +/** Network admin rule. */ +export interface EffectiveSecurityAdminRule extends EffectiveBaseSecurityAdminRule { + /** Whether the rule is custom or default. */ + kind: "Custom"; + /** A description for this rule. Restricted to 140 chars. */ + description?: string; + /** Network protocol this rule applies to. */ + protocol?: SecurityConfigurationRuleProtocol; + /** The CIDR or source IP ranges. */ + sources?: AddressPrefixItem[]; + /** The destination address prefixes. CIDR or destination IP ranges. */ + destinations?: AddressPrefixItem[]; + /** The source port ranges. */ + sourcePortRanges?: string[]; + /** The destination port ranges. */ + destinationPortRanges?: string[]; + /** Indicates the access allowed for this particular rule */ + access?: SecurityConfigurationRuleAccess; + /** The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ + priority?: number; + /** Indicates if the traffic matched against the rule in inbound or outbound. */ + direction?: SecurityConfigurationRuleDirection; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function effectiveSecurityAdminRuleDeserializer(item: any): EffectiveSecurityAdminRule { + return { + id: item["id"], + configurationDescription: item["configurationDescription"], + ruleCollectionDescription: item["ruleCollectionDescription"], + ruleCollectionAppliesToGroups: !item["ruleCollectionAppliesToGroups"] + ? item["ruleCollectionAppliesToGroups"] + : networkManagerSecurityGroupItemArrayDeserializer(item["ruleCollectionAppliesToGroups"]), + ruleGroups: !item["ruleGroups"] + ? item["ruleGroups"] + : configurationGroupArrayDeserializer(item["ruleGroups"]), + kind: item["kind"], + ...(!item["properties"] + ? item["properties"] + : _effectiveSecurityAdminRulePropertiesDeserializer(item["properties"])), + }; +} + +/** Network default admin rule. */ +export interface EffectiveDefaultSecurityAdminRule extends EffectiveBaseSecurityAdminRule { + /** Whether the rule is custom or default. */ + kind: "Default"; + /** A description for this rule. Restricted to 140 chars. */ + readonly description?: string; + /** Default rule flag. */ + flag?: string; + /** Network protocol this rule applies to. */ + readonly protocol?: SecurityConfigurationRuleProtocol; + /** The CIDR or source IP ranges. */ + readonly sources?: AddressPrefixItem[]; + /** The destination address prefixes. CIDR or destination IP ranges. */ + readonly destinations?: AddressPrefixItem[]; + /** The source port ranges. */ + readonly sourcePortRanges?: string[]; + /** The destination port ranges. */ + readonly destinationPortRanges?: string[]; + /** Indicates the access allowed for this particular rule */ + readonly access?: SecurityConfigurationRuleAccess; + /** The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ + readonly priority?: number; + /** Indicates if the traffic matched against the rule in inbound or outbound. */ + readonly direction?: SecurityConfigurationRuleDirection; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function effectiveDefaultSecurityAdminRuleDeserializer( + item: any, +): EffectiveDefaultSecurityAdminRule { + return { + id: item["id"], + configurationDescription: item["configurationDescription"], + ruleCollectionDescription: item["ruleCollectionDescription"], + ruleCollectionAppliesToGroups: !item["ruleCollectionAppliesToGroups"] + ? item["ruleCollectionAppliesToGroups"] + : networkManagerSecurityGroupItemArrayDeserializer(item["ruleCollectionAppliesToGroups"]), + ruleGroups: !item["ruleGroups"] + ? item["ruleGroups"] + : configurationGroupArrayDeserializer(item["ruleGroups"]), + kind: item["kind"], + ...(!item["properties"] + ? item["properties"] + : _effectiveDefaultSecurityAdminRulePropertiesDeserializer(item["properties"])), + }; +} + +/** Collection of SecurityProviders. */ +export interface VirtualWanSecurityProviders { + /** List of VirtualWAN security providers. */ + supportedProviders?: VirtualWanSecurityProvider[]; +} + +export function virtualWanSecurityProvidersDeserializer(item: any): VirtualWanSecurityProviders { + return { + supportedProviders: !item["supportedProviders"] + ? item["supportedProviders"] + : virtualWanSecurityProviderArrayDeserializer(item["supportedProviders"]), + }; +} + +export function virtualWanSecurityProviderArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualWanSecurityProviderDeserializer(item); + }); +} + +/** Collection of SecurityProviders. */ +export interface VirtualWanSecurityProvider { + /** Name of the security provider. */ + name?: string; + /** Url of the security provider. */ + url?: string; + /** Name of the security provider. */ + readonly type?: VirtualWanSecurityProviderType; +} + +export function virtualWanSecurityProviderDeserializer(item: any): VirtualWanSecurityProvider { + return { + name: item["name"], + url: item["url"], + type: item["type"], + }; +} + +/** The virtual wan security provider type. */ +export enum KnownVirtualWanSecurityProviderType { + /** External */ + External = "External", + /** Native */ + Native = "Native", +} + +/** + * The virtual wan security provider type. \ + * {@link KnownVirtualWanSecurityProviderType} can be used interchangeably with VirtualWanSecurityProviderType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **External**: External \ + * **Native**: Native + */ +export type VirtualWanSecurityProviderType = string; + +/** Virtual Wan Vpn profile parameters Vpn profile generation. */ +export interface VirtualWanVpnProfileParameters { + /** VpnServerConfiguration partial resource uri with which VirtualWan is associated to. */ + vpnServerConfigurationResourceId?: string; + /** VPN client authentication method. */ + authenticationMethod?: AuthenticationMethod; +} + +export function virtualWanVpnProfileParametersSerializer( + item: VirtualWanVpnProfileParameters, +): any { + return { + vpnServerConfigurationResourceId: item["vpnServerConfigurationResourceId"], + authenticationMethod: item["authenticationMethod"], + }; +} + +/** VPN client authentication method. */ +export enum KnownAuthenticationMethod { + /** EAPTLS */ + Eaptls = "EAPTLS", + /** EAPMSCHAPv2 */ + EapmschaPv2 = "EAPMSCHAPv2", +} + +/** + * VPN client authentication method. \ + * {@link KnownAuthenticationMethod} can be used interchangeably with AuthenticationMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **EAPTLS**: EAPTLS \ + * **EAPMSCHAPv2**: EAPMSCHAPv2 + */ +export type AuthenticationMethod = string; + +/** Vpn Profile Response for package generation. */ +export interface VpnProfileResponse { + /** URL to the VPN profile. */ + profileUrl?: string; +} + +export function vpnProfileResponseDeserializer(item: any): VpnProfileResponse { + return { + profileUrl: item["profileUrl"], + }; +} + +/** Response for the CheckDnsNameAvailability API service call. */ +export interface DnsNameAvailabilityResult { + /** Domain availability (True/False). */ + available?: boolean; +} + +export function dnsNameAvailabilityResultDeserializer(item: any): DnsNameAvailabilityResult { + return { + available: item["available"], + }; +} + +/** Paged collection of Operation items */ +export interface _OperationListResult { + /** The Operation items on this page */ + value: Operation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _operationListResultDeserializer(item: any): _OperationListResult { + return { + value: operationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function operationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationDeserializer(item); + }); +} + +/** Network REST API operation definition. */ +export interface Operation { + /** Operation name: {provider}/{resource}/{operation}. */ + name?: string; + /** Display metadata associated with the operation. */ + display?: OperationDisplay; + /** Origin of the operation. */ + origin?: string; + /** Specification of the service. */ + serviceSpecification?: OperationPropertiesFormatServiceSpecification; +} + +export function operationDeserializer(item: any): Operation { + return { + name: item["name"], + display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), + origin: item["origin"], + ...(!item["properties"] + ? item["properties"] + : _operationPropertiesDeserializer(item["properties"])), + }; +} + +/** Display metadata associated with the operation. */ +export interface OperationDisplay { + /** Service provider: Microsoft Network. */ + provider?: string; + /** Resource on which the operation is performed. */ + resource?: string; + /** Type of the operation: get, read, delete, etc. */ + operation?: string; + /** Description of the operation. */ + description?: string; +} + +export function operationDisplayDeserializer(item: any): OperationDisplay { + return { + provider: item["provider"], + resource: item["resource"], + operation: item["operation"], + description: item["description"], + }; +} + +/** Description of operation properties format. */ +export interface OperationPropertiesFormat { + /** Specification of the service. */ + serviceSpecification?: OperationPropertiesFormatServiceSpecification; +} + +export function operationPropertiesFormatDeserializer(item: any): OperationPropertiesFormat { + return { + serviceSpecification: !item["serviceSpecification"] + ? item["serviceSpecification"] + : operationPropertiesFormatServiceSpecificationDeserializer(item["serviceSpecification"]), + }; +} + +/** Specification of the service. */ +export interface OperationPropertiesFormatServiceSpecification { + /** Operation service specification. */ + metricSpecifications?: MetricSpecification[]; + /** Operation log specification. */ + logSpecifications?: LogSpecification[]; +} + +export function operationPropertiesFormatServiceSpecificationDeserializer( + item: any, +): OperationPropertiesFormatServiceSpecification { + return { + metricSpecifications: !item["metricSpecifications"] + ? item["metricSpecifications"] + : metricSpecificationArrayDeserializer(item["metricSpecifications"]), + logSpecifications: !item["logSpecifications"] + ? item["logSpecifications"] + : logSpecificationArrayDeserializer(item["logSpecifications"]), + }; +} + +export function metricSpecificationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return metricSpecificationDeserializer(item); + }); +} + +/** Description of metrics specification. */ +export interface MetricSpecification { + /** The name of the metric. */ + name?: string; + /** The display name of the metric. */ + displayName?: string; + /** The description of the metric. */ + displayDescription?: string; + /** Units the metric to be displayed in. */ + unit?: string; + /** The aggregation type. */ + aggregationType?: string; + /** List of availability. */ + availabilities?: Availability[]; + /** Whether regional MDM account enabled. */ + enableRegionalMdmAccount?: boolean; + /** Whether gaps would be filled with zeros. */ + fillGapWithZero?: boolean; + /** Pattern for the filter of the metric. */ + metricFilterPattern?: string; + /** List of dimensions. */ + dimensions?: Dimension[]; + /** Whether the metric is internal. */ + isInternal?: boolean; + /** The source MDM account. */ + sourceMdmAccount?: string; + /** The source MDM namespace. */ + sourceMdmNamespace?: string; + /** The resource Id dimension name override. */ + resourceIdDimensionNameOverride?: string; +} + +export function metricSpecificationDeserializer(item: any): MetricSpecification { + return { + name: item["name"], + displayName: item["displayName"], + displayDescription: item["displayDescription"], + unit: item["unit"], + aggregationType: item["aggregationType"], + availabilities: !item["availabilities"] + ? item["availabilities"] + : availabilityArrayDeserializer(item["availabilities"]), + enableRegionalMdmAccount: item["enableRegionalMdmAccount"], + fillGapWithZero: item["fillGapWithZero"], + metricFilterPattern: item["metricFilterPattern"], + dimensions: !item["dimensions"] + ? item["dimensions"] + : dimensionArrayDeserializer(item["dimensions"]), + isInternal: item["isInternal"], + sourceMdmAccount: item["sourceMdmAccount"], + sourceMdmNamespace: item["sourceMdmNamespace"], + resourceIdDimensionNameOverride: item["resourceIdDimensionNameOverride"], + }; +} + +export function availabilityArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return availabilityDeserializer(item); + }); +} + +/** Availability of the metric. */ +export interface Availability { + /** The time grain of the availability. */ + timeGrain?: string; + /** The retention of the availability. */ + retention?: string; + /** Duration of the availability blob. */ + blobDuration?: string; +} + +export function availabilityDeserializer(item: any): Availability { + return { + timeGrain: item["timeGrain"], + retention: item["retention"], + blobDuration: item["blobDuration"], + }; +} + +export function dimensionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return dimensionDeserializer(item); + }); +} + +/** Dimension of the metric. */ +export interface Dimension { + /** The name of the dimension. */ + name?: string; + /** The display name of the dimension. */ + displayName?: string; + /** The internal name of the dimension. */ + internalName?: string; +} + +export function dimensionDeserializer(item: any): Dimension { + return { + name: item["name"], + displayName: item["displayName"], + internalName: item["internalName"], + }; +} + +export function logSpecificationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return logSpecificationDeserializer(item); + }); +} + +/** Description of logging specification. */ +export interface LogSpecification { + /** The name of the specification. */ + name?: string; + /** The display name of the specification. */ + displayName?: string; + /** Duration of the blob. */ + blobDuration?: string; +} + +export function logSpecificationDeserializer(item: any): LogSpecification { + return { + name: item["name"], + displayName: item["displayName"], + blobDuration: item["blobDuration"], + }; +} + +/** Application gateway resource. */ +export interface ApplicationGateway extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** The identity of the application gateway, if configured. */ + identity?: ManagedServiceIdentity; + /** SKU of the application gateway resource. */ + sku?: ApplicationGatewaySku; + /** SSL policy of the application gateway resource. */ + sslPolicy?: ApplicationGatewaySslPolicy; + /** Operational state of the application gateway resource. */ + readonly operationalState?: ApplicationGatewayOperationalState; + /** Subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + gatewayIPConfigurations?: ApplicationGatewayIPConfiguration[]; + /** Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + authenticationCertificates?: ApplicationGatewayAuthenticationCertificate[]; + /** Trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + trustedRootCertificates?: ApplicationGatewayTrustedRootCertificate[]; + /** Trusted client certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + trustedClientCertificates?: ApplicationGatewayTrustedClientCertificate[]; + /** SSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + sslCertificates?: ApplicationGatewaySslCertificate[]; + /** Frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + frontendIPConfigurations?: ApplicationGatewayFrontendIPConfiguration[]; + /** Frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + frontendPorts?: ApplicationGatewayFrontendPort[]; + /** Probes of the application gateway resource. */ + probes?: ApplicationGatewayProbe[]; + /** Backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + 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). */ + redirectConfigurations?: ApplicationGatewayRedirectConfiguration[]; + /** Web application firewall configuration. */ + webApplicationFirewallConfiguration?: ApplicationGatewayWebApplicationFirewallConfiguration; + /** Reference to the FirewallPolicy resource. */ + firewallPolicy?: SubResource; + /** Whether HTTP2 is enabled on the application gateway resource. */ + enableHttp2?: boolean; + /** Whether FIPS is enabled on the application gateway resource. */ + enableFips?: boolean; + /** Autoscale Configuration. */ + autoscaleConfiguration?: ApplicationGatewayAutoscaleConfiguration; + /** PrivateLink configurations on application gateway. */ + privateLinkConfigurations?: ApplicationGatewayPrivateLinkConfiguration[]; + /** Private Endpoint connections on application gateway. */ + readonly privateEndpointConnections?: ApplicationGatewayPrivateEndpointConnection[]; + /** The resource GUID property of the application gateway resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the application gateway resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Custom error configurations of the application gateway resource. */ + customErrorConfigurations?: ApplicationGatewayCustomError[]; + /** If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config. */ + forceFirewallPolicyAssociation?: boolean; + /** Load distribution policies of the application gateway resource. */ + loadDistributionPolicies?: ApplicationGatewayLoadDistributionPolicy[]; + /** Entra JWT validation configurations for the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + entraJWTValidationConfigs?: ApplicationGatewayEntraJWTValidationConfig[]; + /** Global Configuration. */ + globalConfiguration?: ApplicationGatewayGlobalConfiguration; + /** The default predefined SSL Policy applied on the application gateway resource. */ + readonly defaultPredefinedSslPolicy?: ApplicationGatewaySslPolicyName; +} + +export function applicationGatewaySerializer(item: ApplicationGateway): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "sku", + "sslPolicy", + "gatewayIPConfigurations", + "authenticationCertificates", + "trustedRootCertificates", + "trustedClientCertificates", + "sslCertificates", + "frontendIPConfigurations", + "frontendPorts", + "probes", + "backendAddressPools", + "backendHttpSettingsCollection", + "backendSettingsCollection", + "httpListeners", + "listeners", + "sslProfiles", + "urlPathMaps", + "requestRoutingRules", + "routingRules", + "rewriteRuleSets", + "redirectConfigurations", + "webApplicationFirewallConfiguration", + "firewallPolicy", + "enableHttp2", + "enableFips", + "autoscaleConfiguration", + "privateLinkConfigurations", + "customErrorConfigurations", + "forceFirewallPolicyAssociation", + "loadDistributionPolicies", + "entraJWTValidationConfigs", + "globalConfiguration", + ]) + ? undefined + : _applicationGatewayPropertiesSerializer(item), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + }; +} + +export function applicationGatewayDeserializer(item: any): ApplicationGateway { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayPropertiesDeserializer(item["properties"])), + etag: item["etag"], + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentityDeserializer(item["identity"]), + }; +} + +/** Properties of the application gateway. */ +export interface ApplicationGatewayPropertiesFormat { + /** SKU of the application gateway resource. */ + sku?: ApplicationGatewaySku; + /** SSL policy of the application gateway resource. */ + sslPolicy?: ApplicationGatewaySslPolicy; + /** Operational state of the application gateway resource. */ + readonly operationalState?: ApplicationGatewayOperationalState; + /** Subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + gatewayIPConfigurations?: ApplicationGatewayIPConfiguration[]; + /** Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + authenticationCertificates?: ApplicationGatewayAuthenticationCertificate[]; + /** Trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + trustedRootCertificates?: ApplicationGatewayTrustedRootCertificate[]; + /** Trusted client certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + trustedClientCertificates?: ApplicationGatewayTrustedClientCertificate[]; + /** SSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + sslCertificates?: ApplicationGatewaySslCertificate[]; + /** Frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + frontendIPConfigurations?: ApplicationGatewayFrontendIPConfiguration[]; + /** Frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + frontendPorts?: ApplicationGatewayFrontendPort[]; + /** Probes of the application gateway resource. */ + probes?: ApplicationGatewayProbe[]; + /** Backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + 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). */ + redirectConfigurations?: ApplicationGatewayRedirectConfiguration[]; + /** Web application firewall configuration. */ + webApplicationFirewallConfiguration?: ApplicationGatewayWebApplicationFirewallConfiguration; + /** Reference to the FirewallPolicy resource. */ + firewallPolicy?: SubResource; + /** Whether HTTP2 is enabled on the application gateway resource. */ + enableHttp2?: boolean; + /** Whether FIPS is enabled on the application gateway resource. */ + enableFips?: boolean; + /** Autoscale Configuration. */ + autoscaleConfiguration?: ApplicationGatewayAutoscaleConfiguration; + /** PrivateLink configurations on application gateway. */ + privateLinkConfigurations?: ApplicationGatewayPrivateLinkConfiguration[]; + /** Private Endpoint connections on application gateway. */ + readonly privateEndpointConnections?: ApplicationGatewayPrivateEndpointConnection[]; + /** The resource GUID property of the application gateway resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the application gateway resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Custom error configurations of the application gateway resource. */ + customErrorConfigurations?: ApplicationGatewayCustomError[]; + /** If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config. */ + forceFirewallPolicyAssociation?: boolean; + /** Load distribution policies of the application gateway resource. */ + loadDistributionPolicies?: ApplicationGatewayLoadDistributionPolicy[]; + /** Entra JWT validation configurations for the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + entraJWTValidationConfigs?: ApplicationGatewayEntraJWTValidationConfig[]; + /** Global Configuration. */ + globalConfiguration?: ApplicationGatewayGlobalConfiguration; + /** The default predefined SSL Policy applied on the application gateway resource. */ + readonly defaultPredefinedSslPolicy?: ApplicationGatewaySslPolicyName; +} + +export function applicationGatewayPropertiesFormatSerializer( + item: ApplicationGatewayPropertiesFormat, +): any { + return { + sku: !item["sku"] ? item["sku"] : applicationGatewaySkuSerializer(item["sku"]), + sslPolicy: !item["sslPolicy"] + ? item["sslPolicy"] + : applicationGatewaySslPolicySerializer(item["sslPolicy"]), + gatewayIPConfigurations: !item["gatewayIPConfigurations"] + ? item["gatewayIPConfigurations"] + : applicationGatewayIPConfigurationArraySerializer(item["gatewayIPConfigurations"]), + authenticationCertificates: !item["authenticationCertificates"] + ? item["authenticationCertificates"] + : applicationGatewayAuthenticationCertificateArraySerializer( + item["authenticationCertificates"], + ), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : applicationGatewayTrustedRootCertificateArraySerializer(item["trustedRootCertificates"]), + trustedClientCertificates: !item["trustedClientCertificates"] + ? item["trustedClientCertificates"] + : applicationGatewayTrustedClientCertificateArraySerializer( + item["trustedClientCertificates"], + ), + sslCertificates: !item["sslCertificates"] + ? item["sslCertificates"] + : applicationGatewaySslCertificateArraySerializer(item["sslCertificates"]), + frontendIPConfigurations: !item["frontendIPConfigurations"] + ? item["frontendIPConfigurations"] + : applicationGatewayFrontendIPConfigurationArraySerializer(item["frontendIPConfigurations"]), + frontendPorts: !item["frontendPorts"] + ? item["frontendPorts"] + : applicationGatewayFrontendPortArraySerializer(item["frontendPorts"]), + probes: !item["probes"] + ? item["probes"] + : applicationGatewayProbeArraySerializer(item["probes"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : applicationGatewayBackendAddressPoolArraySerializer(item["backendAddressPools"]), + backendHttpSettingsCollection: !item["backendHttpSettingsCollection"] + ? item["backendHttpSettingsCollection"] + : applicationGatewayBackendHttpSettingsArraySerializer(item["backendHttpSettingsCollection"]), + backendSettingsCollection: !item["backendSettingsCollection"] + ? item["backendSettingsCollection"] + : applicationGatewayBackendSettingsArraySerializer(item["backendSettingsCollection"]), + httpListeners: !item["httpListeners"] + ? item["httpListeners"] + : applicationGatewayHttpListenerArraySerializer(item["httpListeners"]), + listeners: !item["listeners"] + ? item["listeners"] + : applicationGatewayListenerArraySerializer(item["listeners"]), + sslProfiles: !item["sslProfiles"] + ? item["sslProfiles"] + : applicationGatewaySslProfileArraySerializer(item["sslProfiles"]), + urlPathMaps: !item["urlPathMaps"] + ? item["urlPathMaps"] + : applicationGatewayUrlPathMapArraySerializer(item["urlPathMaps"]), + requestRoutingRules: !item["requestRoutingRules"] + ? item["requestRoutingRules"] + : applicationGatewayRequestRoutingRuleArraySerializer(item["requestRoutingRules"]), + routingRules: !item["routingRules"] + ? item["routingRules"] + : applicationGatewayRoutingRuleArraySerializer(item["routingRules"]), + rewriteRuleSets: !item["rewriteRuleSets"] + ? item["rewriteRuleSets"] + : applicationGatewayRewriteRuleSetArraySerializer(item["rewriteRuleSets"]), + redirectConfigurations: !item["redirectConfigurations"] + ? item["redirectConfigurations"] + : applicationGatewayRedirectConfigurationArraySerializer(item["redirectConfigurations"]), + webApplicationFirewallConfiguration: !item["webApplicationFirewallConfiguration"] + ? item["webApplicationFirewallConfiguration"] + : applicationGatewayWebApplicationFirewallConfigurationSerializer( + item["webApplicationFirewallConfiguration"], + ), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceSerializer(item["firewallPolicy"]), + enableHttp2: item["enableHttp2"], + enableFips: item["enableFips"], + autoscaleConfiguration: !item["autoscaleConfiguration"] + ? item["autoscaleConfiguration"] + : applicationGatewayAutoscaleConfigurationSerializer(item["autoscaleConfiguration"]), + privateLinkConfigurations: !item["privateLinkConfigurations"] + ? item["privateLinkConfigurations"] + : applicationGatewayPrivateLinkConfigurationArraySerializer( + item["privateLinkConfigurations"], + ), + customErrorConfigurations: !item["customErrorConfigurations"] + ? item["customErrorConfigurations"] + : applicationGatewayCustomErrorArraySerializer(item["customErrorConfigurations"]), + forceFirewallPolicyAssociation: item["forceFirewallPolicyAssociation"], + loadDistributionPolicies: !item["loadDistributionPolicies"] + ? item["loadDistributionPolicies"] + : applicationGatewayLoadDistributionPolicyArraySerializer(item["loadDistributionPolicies"]), + entraJWTValidationConfigs: !item["entraJWTValidationConfigs"] + ? item["entraJWTValidationConfigs"] + : applicationGatewayEntraJWTValidationConfigArraySerializer( + item["entraJWTValidationConfigs"], + ), + globalConfiguration: !item["globalConfiguration"] + ? item["globalConfiguration"] + : applicationGatewayGlobalConfigurationSerializer(item["globalConfiguration"]), + }; +} + +export function applicationGatewayPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayPropertiesFormat { + return { + sku: !item["sku"] ? item["sku"] : applicationGatewaySkuDeserializer(item["sku"]), + sslPolicy: !item["sslPolicy"] + ? item["sslPolicy"] + : applicationGatewaySslPolicyDeserializer(item["sslPolicy"]), + operationalState: item["operationalState"], + gatewayIPConfigurations: !item["gatewayIPConfigurations"] + ? item["gatewayIPConfigurations"] + : applicationGatewayIPConfigurationArrayDeserializer(item["gatewayIPConfigurations"]), + authenticationCertificates: !item["authenticationCertificates"] + ? item["authenticationCertificates"] + : applicationGatewayAuthenticationCertificateArrayDeserializer( + item["authenticationCertificates"], + ), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : applicationGatewayTrustedRootCertificateArrayDeserializer(item["trustedRootCertificates"]), + trustedClientCertificates: !item["trustedClientCertificates"] + ? item["trustedClientCertificates"] + : applicationGatewayTrustedClientCertificateArrayDeserializer( + item["trustedClientCertificates"], + ), + sslCertificates: !item["sslCertificates"] + ? item["sslCertificates"] + : applicationGatewaySslCertificateArrayDeserializer(item["sslCertificates"]), + frontendIPConfigurations: !item["frontendIPConfigurations"] + ? item["frontendIPConfigurations"] + : applicationGatewayFrontendIPConfigurationArrayDeserializer( + item["frontendIPConfigurations"], + ), + frontendPorts: !item["frontendPorts"] + ? item["frontendPorts"] + : applicationGatewayFrontendPortArrayDeserializer(item["frontendPorts"]), + probes: !item["probes"] + ? item["probes"] + : applicationGatewayProbeArrayDeserializer(item["probes"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : applicationGatewayBackendAddressPoolArrayDeserializer(item["backendAddressPools"]), + backendHttpSettingsCollection: !item["backendHttpSettingsCollection"] + ? item["backendHttpSettingsCollection"] + : applicationGatewayBackendHttpSettingsArrayDeserializer( + item["backendHttpSettingsCollection"], + ), + backendSettingsCollection: !item["backendSettingsCollection"] + ? item["backendSettingsCollection"] + : applicationGatewayBackendSettingsArrayDeserializer(item["backendSettingsCollection"]), + httpListeners: !item["httpListeners"] + ? item["httpListeners"] + : applicationGatewayHttpListenerArrayDeserializer(item["httpListeners"]), + listeners: !item["listeners"] + ? item["listeners"] + : applicationGatewayListenerArrayDeserializer(item["listeners"]), + sslProfiles: !item["sslProfiles"] + ? item["sslProfiles"] + : applicationGatewaySslProfileArrayDeserializer(item["sslProfiles"]), + urlPathMaps: !item["urlPathMaps"] + ? item["urlPathMaps"] + : applicationGatewayUrlPathMapArrayDeserializer(item["urlPathMaps"]), + requestRoutingRules: !item["requestRoutingRules"] + ? item["requestRoutingRules"] + : applicationGatewayRequestRoutingRuleArrayDeserializer(item["requestRoutingRules"]), + routingRules: !item["routingRules"] + ? item["routingRules"] + : applicationGatewayRoutingRuleArrayDeserializer(item["routingRules"]), + rewriteRuleSets: !item["rewriteRuleSets"] + ? item["rewriteRuleSets"] + : applicationGatewayRewriteRuleSetArrayDeserializer(item["rewriteRuleSets"]), + redirectConfigurations: !item["redirectConfigurations"] + ? item["redirectConfigurations"] + : applicationGatewayRedirectConfigurationArrayDeserializer(item["redirectConfigurations"]), + webApplicationFirewallConfiguration: !item["webApplicationFirewallConfiguration"] + ? item["webApplicationFirewallConfiguration"] + : applicationGatewayWebApplicationFirewallConfigurationDeserializer( + item["webApplicationFirewallConfiguration"], + ), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceDeserializer(item["firewallPolicy"]), + enableHttp2: item["enableHttp2"], + enableFips: item["enableFips"], + autoscaleConfiguration: !item["autoscaleConfiguration"] + ? item["autoscaleConfiguration"] + : applicationGatewayAutoscaleConfigurationDeserializer(item["autoscaleConfiguration"]), + privateLinkConfigurations: !item["privateLinkConfigurations"] + ? item["privateLinkConfigurations"] + : applicationGatewayPrivateLinkConfigurationArrayDeserializer( + item["privateLinkConfigurations"], + ), + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : applicationGatewayPrivateEndpointConnectionArrayDeserializer( + item["privateEndpointConnections"], + ), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + customErrorConfigurations: !item["customErrorConfigurations"] + ? item["customErrorConfigurations"] + : applicationGatewayCustomErrorArrayDeserializer(item["customErrorConfigurations"]), + forceFirewallPolicyAssociation: item["forceFirewallPolicyAssociation"], + loadDistributionPolicies: !item["loadDistributionPolicies"] + ? item["loadDistributionPolicies"] + : applicationGatewayLoadDistributionPolicyArrayDeserializer(item["loadDistributionPolicies"]), + entraJWTValidationConfigs: !item["entraJWTValidationConfigs"] + ? item["entraJWTValidationConfigs"] + : applicationGatewayEntraJWTValidationConfigArrayDeserializer( + item["entraJWTValidationConfigs"], + ), + globalConfiguration: !item["globalConfiguration"] + ? item["globalConfiguration"] + : applicationGatewayGlobalConfigurationDeserializer(item["globalConfiguration"]), + defaultPredefinedSslPolicy: item["defaultPredefinedSslPolicy"], + }; +} + +/** SKU of an application gateway. */ +export interface ApplicationGatewaySku { + /** Name of an application gateway SKU. */ + name?: ApplicationGatewaySkuName; + /** Tier of an application gateway. */ + tier?: ApplicationGatewayTier; + /** Capacity (instance count) of an application gateway. */ + capacity?: number; + /** Family of an application gateway SKU. */ + family?: ApplicationGatewaySkuFamily; +} + +export function applicationGatewaySkuSerializer(item: ApplicationGatewaySku): any { + return { + name: item["name"], + tier: item["tier"], + capacity: item["capacity"], + family: item["family"], + }; +} + +export function applicationGatewaySkuDeserializer(item: any): ApplicationGatewaySku { + return { + name: item["name"], + tier: item["tier"], + capacity: item["capacity"], + family: item["family"], + }; +} + +/** Name of an application gateway SKU. */ +export enum KnownApplicationGatewaySkuName { + /** Standard_Small */ + StandardSmall = "Standard_Small", + /** Standard_Medium */ + StandardMedium = "Standard_Medium", + /** Standard_Large */ + StandardLarge = "Standard_Large", + /** WAF_Medium */ + WAFMedium = "WAF_Medium", + /** WAF_Large */ + WAFLarge = "WAF_Large", + /** Standard_v2 */ + StandardV2 = "Standard_v2", + /** WAF_v2 */ + WAFV2 = "WAF_v2", + /** Basic */ + Basic = "Basic", +} + +/** + * Name of an application gateway SKU. \ + * {@link KnownApplicationGatewaySkuName} can be used interchangeably with ApplicationGatewaySkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard_Small**: Standard_Small \ + * **Standard_Medium**: Standard_Medium \ + * **Standard_Large**: Standard_Large \ + * **WAF_Medium**: WAF_Medium \ + * **WAF_Large**: WAF_Large \ + * **Standard_v2**: Standard_v2 \ + * **WAF_v2**: WAF_v2 \ + * **Basic**: Basic + */ +export type ApplicationGatewaySkuName = string; + +/** Tier of an application gateway. */ +export enum KnownApplicationGatewayTier { + /** Standard */ + Standard = "Standard", + /** WAF */ + WAF = "WAF", + /** Standard_v2 */ + StandardV2 = "Standard_v2", + /** WAF_v2 */ + WAFV2 = "WAF_v2", + /** Basic */ + Basic = "Basic", +} + +/** + * Tier of an application gateway. \ + * {@link KnownApplicationGatewayTier} can be used interchangeably with ApplicationGatewayTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard \ + * **WAF**: WAF \ + * **Standard_v2**: Standard_v2 \ + * **WAF_v2**: WAF_v2 \ + * **Basic**: Basic + */ +export type ApplicationGatewayTier = string; + +/** Family of an application gateway SKU. */ +export enum KnownApplicationGatewaySkuFamily { + /** Generation_1 */ + Generation1 = "Generation_1", + /** Generation_2 */ + Generation2 = "Generation_2", +} + +/** + * Family of an application gateway SKU. \ + * {@link KnownApplicationGatewaySkuFamily} can be used interchangeably with ApplicationGatewaySkuFamily, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Generation_1**: Generation_1 \ + * **Generation_2**: Generation_2 + */ +export type ApplicationGatewaySkuFamily = string; + +/** Application Gateway Ssl policy. */ +export interface ApplicationGatewaySslPolicy { + /** Ssl protocols to be disabled on application gateway. */ + disabledSslProtocols?: ApplicationGatewaySslProtocol[]; + /** Type of Ssl Policy. */ + policyType?: ApplicationGatewaySslPolicyType; + /** Name of Ssl predefined policy. */ + policyName?: ApplicationGatewaySslPolicyName; + /** Ssl cipher suites to be enabled in the specified order to application gateway. */ + cipherSuites?: ApplicationGatewaySslCipherSuite[]; + /** Minimum version of Ssl protocol to be supported on application gateway. */ + minProtocolVersion?: ApplicationGatewaySslProtocol; +} + +export function applicationGatewaySslPolicySerializer(item: ApplicationGatewaySslPolicy): any { + return { + disabledSslProtocols: !item["disabledSslProtocols"] + ? item["disabledSslProtocols"] + : item["disabledSslProtocols"].map((p: any) => { + return p; + }), + policyType: item["policyType"], + policyName: item["policyName"], + cipherSuites: !item["cipherSuites"] + ? item["cipherSuites"] + : item["cipherSuites"].map((p: any) => { + return p; + }), + minProtocolVersion: item["minProtocolVersion"], + }; +} + +export function applicationGatewaySslPolicyDeserializer(item: any): ApplicationGatewaySslPolicy { + return { + disabledSslProtocols: !item["disabledSslProtocols"] + ? item["disabledSslProtocols"] + : item["disabledSslProtocols"].map((p: any) => { + return p; + }), + policyType: item["policyType"], + policyName: item["policyName"], + cipherSuites: !item["cipherSuites"] + ? item["cipherSuites"] + : item["cipherSuites"].map((p: any) => { + return p; + }), + minProtocolVersion: item["minProtocolVersion"], + }; +} + +/** Ssl protocol enums. */ +export enum KnownApplicationGatewaySslProtocol { + /** TLSv1_0 */ + TLSv10 = "TLSv1_0", + /** TLSv1_1 */ + TLSv11 = "TLSv1_1", + /** TLSv1_2 */ + TLSv12 = "TLSv1_2", + /** TLSv1_3 */ + TLSv13 = "TLSv1_3", +} + +/** + * Ssl protocol enums. \ + * {@link KnownApplicationGatewaySslProtocol} can be used interchangeably with ApplicationGatewaySslProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TLSv1_0**: TLSv1_0 \ + * **TLSv1_1**: TLSv1_1 \ + * **TLSv1_2**: TLSv1_2 \ + * **TLSv1_3**: TLSv1_3 + */ +export type ApplicationGatewaySslProtocol = string; + +/** Type of Ssl Policy. */ +export enum KnownApplicationGatewaySslPolicyType { + /** Predefined */ + Predefined = "Predefined", + /** Custom */ + Custom = "Custom", + /** CustomV2 */ + CustomV2 = "CustomV2", +} + +/** + * Type of Ssl Policy. \ + * {@link KnownApplicationGatewaySslPolicyType} can be used interchangeably with ApplicationGatewaySslPolicyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Predefined**: Predefined \ + * **Custom**: Custom \ + * **CustomV2**: CustomV2 + */ +export type ApplicationGatewaySslPolicyType = string; + +/** Ssl predefined policy name enums. */ +export enum KnownApplicationGatewaySslPolicyName { + /** AppGwSslPolicy20150501 */ + AppGwSslPolicy20150501 = "AppGwSslPolicy20150501", + /** AppGwSslPolicy20170401 */ + AppGwSslPolicy20170401 = "AppGwSslPolicy20170401", + /** AppGwSslPolicy20170401S */ + AppGwSslPolicy20170401S = "AppGwSslPolicy20170401S", + /** AppGwSslPolicy20220101 */ + AppGwSslPolicy20220101 = "AppGwSslPolicy20220101", + /** AppGwSslPolicy20220101S */ + AppGwSslPolicy20220101S = "AppGwSslPolicy20220101S", +} + +/** + * Ssl predefined policy name enums. \ + * {@link KnownApplicationGatewaySslPolicyName} can be used interchangeably with ApplicationGatewaySslPolicyName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AppGwSslPolicy20150501**: AppGwSslPolicy20150501 \ + * **AppGwSslPolicy20170401**: AppGwSslPolicy20170401 \ + * **AppGwSslPolicy20170401S**: AppGwSslPolicy20170401S \ + * **AppGwSslPolicy20220101**: AppGwSslPolicy20220101 \ + * **AppGwSslPolicy20220101S**: AppGwSslPolicy20220101S + */ +export type ApplicationGatewaySslPolicyName = string; + +/** Ssl cipher suites enums. */ +export enum KnownApplicationGatewaySslCipherSuite { + /** TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 */ + TLSEcdheRSAWithAES256CBCSHA384 = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", + /** TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ + TLSEcdheRSAWithAES128CBCSHA256 = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", + /** TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA */ + TLSEcdheRSAWithAES256CBCSHA = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", + /** TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA */ + TLSEcdheRSAWithAES128CBCSHA = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", + /** TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 */ + TLSDHERSAWithAES256GCMSHA384 = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", + /** TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 */ + TLSDHERSAWithAES128GCMSHA256 = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", + /** TLS_DHE_RSA_WITH_AES_256_CBC_SHA */ + TLSDHERSAWithAES256CBCSHA = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA", + /** TLS_DHE_RSA_WITH_AES_128_CBC_SHA */ + TLSDHERSAWithAES128CBCSHA = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", + /** TLS_RSA_WITH_AES_256_GCM_SHA384 */ + TLSRSAWithAES256GCMSHA384 = "TLS_RSA_WITH_AES_256_GCM_SHA384", + /** TLS_RSA_WITH_AES_128_GCM_SHA256 */ + TLSRSAWithAES128GCMSHA256 = "TLS_RSA_WITH_AES_128_GCM_SHA256", + /** TLS_RSA_WITH_AES_256_CBC_SHA256 */ + TLSRSAWithAES256CBCSHA256 = "TLS_RSA_WITH_AES_256_CBC_SHA256", + /** TLS_RSA_WITH_AES_128_CBC_SHA256 */ + TLSRSAWithAES128CBCSHA256 = "TLS_RSA_WITH_AES_128_CBC_SHA256", + /** TLS_RSA_WITH_AES_256_CBC_SHA */ + TLSRSAWithAES256CBCSHA = "TLS_RSA_WITH_AES_256_CBC_SHA", + /** TLS_RSA_WITH_AES_128_CBC_SHA */ + TLSRSAWithAES128CBCSHA = "TLS_RSA_WITH_AES_128_CBC_SHA", + /** TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 */ + TLSEcdheEcdsaWithAES256GCMSHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", + /** TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 */ + TLSEcdheEcdsaWithAES128GCMSHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", + /** TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 */ + TLSEcdheEcdsaWithAES256CBCSHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", + /** TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 */ + TLSEcdheEcdsaWithAES128CBCSHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", + /** TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA */ + TLSEcdheEcdsaWithAES256CBCSHA = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", + /** TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA */ + TLSEcdheEcdsaWithAES128CBCSHA = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", + /** TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 */ + TLSDHEDSSWithAES256CBCSHA256 = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", + /** TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 */ + TLSDHEDSSWithAES128CBCSHA256 = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", + /** TLS_DHE_DSS_WITH_AES_256_CBC_SHA */ + TLSDHEDSSWithAES256CBCSHA = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA", + /** TLS_DHE_DSS_WITH_AES_128_CBC_SHA */ + TLSDHEDSSWithAES128CBCSHA = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA", + /** TLS_RSA_WITH_3DES_EDE_CBC_SHA */ + TLSRSAWith3DESEDECBCSHA = "TLS_RSA_WITH_3DES_EDE_CBC_SHA", + /** TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA */ + TLSDHEDSSWith3DESEDECBCSHA = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA", + /** TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 */ + TLSEcdheRSAWithAES128GCMSHA256 = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", + /** TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 */ + TLSEcdheRSAWithAES256GCMSHA384 = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", +} + +/** + * Ssl cipher suites enums. \ + * {@link KnownApplicationGatewaySslCipherSuite} can be used interchangeably with ApplicationGatewaySslCipherSuite, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384**: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 \ + * **TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256**: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 \ + * **TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA**: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA \ + * **TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA**: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA \ + * **TLS_DHE_RSA_WITH_AES_256_GCM_SHA384**: TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 \ + * **TLS_DHE_RSA_WITH_AES_128_GCM_SHA256**: TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 \ + * **TLS_DHE_RSA_WITH_AES_256_CBC_SHA**: TLS_DHE_RSA_WITH_AES_256_CBC_SHA \ + * **TLS_DHE_RSA_WITH_AES_128_CBC_SHA**: TLS_DHE_RSA_WITH_AES_128_CBC_SHA \ + * **TLS_RSA_WITH_AES_256_GCM_SHA384**: TLS_RSA_WITH_AES_256_GCM_SHA384 \ + * **TLS_RSA_WITH_AES_128_GCM_SHA256**: TLS_RSA_WITH_AES_128_GCM_SHA256 \ + * **TLS_RSA_WITH_AES_256_CBC_SHA256**: TLS_RSA_WITH_AES_256_CBC_SHA256 \ + * **TLS_RSA_WITH_AES_128_CBC_SHA256**: TLS_RSA_WITH_AES_128_CBC_SHA256 \ + * **TLS_RSA_WITH_AES_256_CBC_SHA**: TLS_RSA_WITH_AES_256_CBC_SHA \ + * **TLS_RSA_WITH_AES_128_CBC_SHA**: TLS_RSA_WITH_AES_128_CBC_SHA \ + * **TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384**: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 \ + * **TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256**: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 \ + * **TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384**: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 \ + * **TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256**: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 \ + * **TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA**: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA \ + * **TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA**: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA \ + * **TLS_DHE_DSS_WITH_AES_256_CBC_SHA256**: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 \ + * **TLS_DHE_DSS_WITH_AES_128_CBC_SHA256**: TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 \ + * **TLS_DHE_DSS_WITH_AES_256_CBC_SHA**: TLS_DHE_DSS_WITH_AES_256_CBC_SHA \ + * **TLS_DHE_DSS_WITH_AES_128_CBC_SHA**: TLS_DHE_DSS_WITH_AES_128_CBC_SHA \ + * **TLS_RSA_WITH_3DES_EDE_CBC_SHA**: TLS_RSA_WITH_3DES_EDE_CBC_SHA \ + * **TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA**: TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA \ + * **TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256**: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 \ + * **TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384**: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + */ +export type ApplicationGatewaySslCipherSuite = string; + +/** Operational state of the application gateway resource. */ +export enum KnownApplicationGatewayOperationalState { + /** Stopped */ + Stopped = "Stopped", + /** Starting */ + Starting = "Starting", + /** Running */ + Running = "Running", + /** Stopping */ + Stopping = "Stopping", +} + +/** + * Operational state of the application gateway resource. \ + * {@link KnownApplicationGatewayOperationalState} can be used interchangeably with ApplicationGatewayOperationalState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Stopped**: Stopped \ + * **Starting**: Starting \ + * **Running**: Running \ + * **Stopping**: Stopping + */ +export type ApplicationGatewayOperationalState = string; + +export function applicationGatewayAuthenticationCertificateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayAuthenticationCertificateSerializer(item); + }); +} + +export function applicationGatewayAuthenticationCertificateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayAuthenticationCertificateDeserializer(item); + }); +} + +/** Authentication certificates of an application gateway. */ +export interface ApplicationGatewayAuthenticationCertificate extends SubResource { + /** Name of the authentication certificate that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Certificate public data. */ + data?: string; + /** The provisioning state of the authentication certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayAuthenticationCertificateSerializer( + item: ApplicationGatewayAuthenticationCertificate, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["data"]) + ? undefined + : _applicationGatewayAuthenticationCertificatePropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayAuthenticationCertificateDeserializer( + item: any, +): ApplicationGatewayAuthenticationCertificate { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayAuthenticationCertificatePropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Authentication certificates properties of an application gateway. */ +export interface ApplicationGatewayAuthenticationCertificatePropertiesFormat { + /** Certificate public data. */ + data?: string; + /** The provisioning state of the authentication certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayAuthenticationCertificatePropertiesFormatSerializer( + item: ApplicationGatewayAuthenticationCertificatePropertiesFormat, +): any { + return { data: item["data"] }; +} + +export function applicationGatewayAuthenticationCertificatePropertiesFormatDeserializer( + item: any, +): ApplicationGatewayAuthenticationCertificatePropertiesFormat { + return { + data: item["data"], + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewayTrustedRootCertificateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayTrustedRootCertificateSerializer(item); + }); +} + +export function applicationGatewayTrustedRootCertificateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayTrustedRootCertificateDeserializer(item); + }); +} + +/** Trusted Root certificates of an application gateway. */ +export interface ApplicationGatewayTrustedRootCertificate extends SubResource { + /** Name of the trusted root certificate that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Certificate public data. */ + data?: string; + /** Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. */ + keyVaultSecretId?: string; + /** The provisioning state of the trusted root certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayTrustedRootCertificateSerializer( + item: ApplicationGatewayTrustedRootCertificate, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["data", "keyVaultSecretId"]) + ? undefined + : _applicationGatewayTrustedRootCertificatePropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayTrustedRootCertificateDeserializer( + item: any, +): ApplicationGatewayTrustedRootCertificate { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayTrustedRootCertificatePropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Trusted Root certificates properties of an application gateway. */ +export interface ApplicationGatewayTrustedRootCertificatePropertiesFormat { + /** Certificate public data. */ + data?: string; + /** Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. */ + keyVaultSecretId?: string; + /** The provisioning state of the trusted root certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayTrustedRootCertificatePropertiesFormatSerializer( + item: ApplicationGatewayTrustedRootCertificatePropertiesFormat, +): any { + return { data: item["data"], keyVaultSecretId: item["keyVaultSecretId"] }; +} + +export function applicationGatewayTrustedRootCertificatePropertiesFormatDeserializer( + item: any, +): ApplicationGatewayTrustedRootCertificatePropertiesFormat { + return { + data: item["data"], + keyVaultSecretId: item["keyVaultSecretId"], + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewayTrustedClientCertificateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayTrustedClientCertificateSerializer(item); + }); +} + +export function applicationGatewayTrustedClientCertificateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayTrustedClientCertificateDeserializer(item); + }); +} + +/** Trusted client certificates of an application gateway. */ +export interface ApplicationGatewayTrustedClientCertificate extends SubResource { + /** Name of the trusted client certificate that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Certificate public data. */ + data?: string; + /** Validated certificate data. */ + readonly validatedCertData?: string; + /** Distinguished name of client certificate issuer. */ + readonly clientCertIssuerDN?: string; + /** The provisioning state of the trusted client certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayTrustedClientCertificateSerializer( + item: ApplicationGatewayTrustedClientCertificate, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["data"]) + ? undefined + : _applicationGatewayTrustedClientCertificatePropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayTrustedClientCertificateDeserializer( + item: any, +): ApplicationGatewayTrustedClientCertificate { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayTrustedClientCertificatePropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Trusted client certificates properties of an application gateway. */ +export interface ApplicationGatewayTrustedClientCertificatePropertiesFormat { + /** Certificate public data. */ + data?: string; + /** Validated certificate data. */ + readonly validatedCertData?: string; + /** Distinguished name of client certificate issuer. */ + readonly clientCertIssuerDN?: string; + /** The provisioning state of the trusted client certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayTrustedClientCertificatePropertiesFormatSerializer( + item: ApplicationGatewayTrustedClientCertificatePropertiesFormat, +): any { + return { data: item["data"] }; +} + +export function applicationGatewayTrustedClientCertificatePropertiesFormatDeserializer( + item: any, +): ApplicationGatewayTrustedClientCertificatePropertiesFormat { + return { + data: item["data"], + validatedCertData: item["validatedCertData"], + clientCertIssuerDN: item["clientCertIssuerDN"], + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewaySslCertificateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewaySslCertificateSerializer(item); + }); +} + +export function applicationGatewaySslCertificateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewaySslCertificateDeserializer(item); + }); +} + +/** SSL certificates of an application gateway. */ +export interface ApplicationGatewaySslCertificate extends SubResource { + /** Name of the SSL certificate that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Base-64 encoded pfx certificate. Only applicable in PUT Request. */ + data?: string; + /** Password for the pfx file specified in data. Only applicable in PUT request. */ + password?: string; + /** Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. */ + readonly publicCertData?: string; + /** Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. */ + keyVaultSecretId?: string; + /** Managed HSM properties of the Application Gateway resource. */ + hsm?: ApplicationGatewayManagedHsm; + /** The provisioning state of the SSL certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewaySslCertificateSerializer( + item: ApplicationGatewaySslCertificate, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["data", "password", "keyVaultSecretId", "hsm"]) + ? undefined + : _applicationGatewaySslCertificatePropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewaySslCertificateDeserializer( + item: any, +): ApplicationGatewaySslCertificate { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewaySslCertificatePropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of SSL certificates of an application gateway. */ +export interface ApplicationGatewaySslCertificatePropertiesFormat { + /** Base-64 encoded pfx certificate. Only applicable in PUT Request. */ + data?: string; + /** Password for the pfx file specified in data. Only applicable in PUT request. */ + password?: string; + /** Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. */ + readonly publicCertData?: string; + /** Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. */ + keyVaultSecretId?: string; + /** Managed HSM properties of the Application Gateway resource. */ + hsm?: ApplicationGatewayManagedHsm; + /** The provisioning state of the SSL certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewaySslCertificatePropertiesFormatSerializer( + item: ApplicationGatewaySslCertificatePropertiesFormat, +): any { + return { + data: item["data"], + password: item["password"], + keyVaultSecretId: item["keyVaultSecretId"], + hsm: !item["hsm"] ? item["hsm"] : applicationGatewayManagedHsmSerializer(item["hsm"]), + }; +} + +export function applicationGatewaySslCertificatePropertiesFormatDeserializer( + item: any, +): ApplicationGatewaySslCertificatePropertiesFormat { + return { + data: item["data"], + password: item["password"], + publicCertData: item["publicCertData"], + keyVaultSecretId: item["keyVaultSecretId"], + hsm: !item["hsm"] ? item["hsm"] : applicationGatewayManagedHsmDeserializer(item["hsm"]), + provisioningState: item["provisioningState"], + }; +} + +/** Managed HSM properties of an application gateway. */ +export interface ApplicationGatewayManagedHsm { + /** Key identifier of a key stored in Managed HSM. */ + keyId?: string; + /** Base-64 encoded value of a base-64 public certificate. */ + publicCertData?: string; +} + +export function applicationGatewayManagedHsmSerializer(item: ApplicationGatewayManagedHsm): any { + return { keyId: item["keyId"], publicCertData: item["publicCertData"] }; +} + +export function applicationGatewayManagedHsmDeserializer(item: any): ApplicationGatewayManagedHsm { + return { + keyId: item["keyId"], + publicCertData: item["publicCertData"], + }; +} + +export function applicationGatewayFrontendIPConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFrontendIPConfigurationSerializer(item); + }); +} + +export function applicationGatewayFrontendIPConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFrontendIPConfigurationDeserializer(item); + }); +} + +/** Frontend IP configuration of an application gateway. */ +export interface ApplicationGatewayFrontendIPConfiguration extends SubResource { + /** Name of the frontend IP configuration that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** PrivateIPAddress of the network interface IP Configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** Reference to the subnet resource. */ + subnet?: SubResource; + /** Reference to the PublicIP resource. */ + publicIPAddress?: SubResource; + /** Reference to the application gateway private link configuration. */ + privateLinkConfiguration?: SubResource; + /** The provisioning state of the frontend IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayFrontendIPConfigurationSerializer( + item: ApplicationGatewayFrontendIPConfiguration, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "privateIPAddress", + "privateIPAllocationMethod", + "subnet", + "publicIPAddress", + "privateLinkConfiguration", + ]) + ? undefined + : _applicationGatewayFrontendIPConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayFrontendIPConfigurationDeserializer( + item: any, +): ApplicationGatewayFrontendIPConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayFrontendIPConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of Frontend IP configuration of an application gateway. */ +export interface ApplicationGatewayFrontendIPConfigurationPropertiesFormat { + /** PrivateIPAddress of the network interface IP Configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** Reference to the subnet resource. */ + subnet?: SubResource; + /** Reference to the PublicIP resource. */ + publicIPAddress?: SubResource; + /** Reference to the application gateway private link configuration. */ + privateLinkConfiguration?: SubResource; + /** The provisioning state of the frontend IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayFrontendIPConfigurationPropertiesFormatSerializer( + item: ApplicationGatewayFrontendIPConfigurationPropertiesFormat, +): any { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceSerializer(item["publicIPAddress"]), + privateLinkConfiguration: !item["privateLinkConfiguration"] + ? item["privateLinkConfiguration"] + : subResourceSerializer(item["privateLinkConfiguration"]), + }; +} + +export function applicationGatewayFrontendIPConfigurationPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayFrontendIPConfigurationPropertiesFormat { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceDeserializer(item["publicIPAddress"]), + privateLinkConfiguration: !item["privateLinkConfiguration"] + ? item["privateLinkConfiguration"] + : subResourceDeserializer(item["privateLinkConfiguration"]), + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewayFrontendPortArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFrontendPortSerializer(item); + }); +} + +export function applicationGatewayFrontendPortArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFrontendPortDeserializer(item); + }); +} + +/** Frontend port of an application gateway. */ +export interface ApplicationGatewayFrontendPort extends SubResource { + /** Name of the frontend port that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Frontend port. */ + port?: number; + /** The provisioning state of the frontend port resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayFrontendPortSerializer( + item: ApplicationGatewayFrontendPort, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["port"]) + ? undefined + : _applicationGatewayFrontendPortPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayFrontendPortDeserializer( + item: any, +): ApplicationGatewayFrontendPort { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayFrontendPortPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of Frontend port of an application gateway. */ +export interface ApplicationGatewayFrontendPortPropertiesFormat { + /** Frontend port. */ + port?: number; + /** The provisioning state of the frontend port resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayFrontendPortPropertiesFormatSerializer( + item: ApplicationGatewayFrontendPortPropertiesFormat, +): any { + return { port: item["port"] }; +} + +export function applicationGatewayFrontendPortPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayFrontendPortPropertiesFormat { + return { + port: item["port"], + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewayProbeArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayProbeSerializer(item); + }); +} + +export function applicationGatewayProbeArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayProbeDeserializer(item); + }); +} + +/** Probe of the application gateway. */ +export interface ApplicationGatewayProbe extends SubResource { + /** Name of the probe that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** The protocol used for the probe. */ + protocol?: ApplicationGatewayProtocol; + /** Host name to send the probe to. */ + host?: string; + /** Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. */ + path?: string; + /** The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. */ + interval?: number; + /** The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. */ + timeout?: number; + /** The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. */ + 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. */ + match?: ApplicationGatewayProbeHealthResponseMatch; + /** Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false. */ + enableProbeProxyProtocolHeader?: boolean; + /** The provisioning state of the probe resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Basic, Standard_v2 and WAF_v2 only. */ + port?: number; +} + +export function applicationGatewayProbeSerializer(item: ApplicationGatewayProbe): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "protocol", + "host", + "path", + "interval", + "timeout", + "unhealthyThreshold", + "pickHostNameFromBackendHttpSettings", + "pickHostNameFromBackendSettings", + "minServers", + "match", + "enableProbeProxyProtocolHeader", + "port", + ]) + ? undefined + : _applicationGatewayProbePropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayProbeDeserializer(item: any): ApplicationGatewayProbe { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayProbePropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of probe of an application gateway. */ +export interface ApplicationGatewayProbePropertiesFormat { + /** The protocol used for the probe. */ + protocol?: ApplicationGatewayProtocol; + /** Host name to send the probe to. */ + host?: string; + /** Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. */ + path?: string; + /** The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. */ + interval?: number; + /** The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. */ + timeout?: number; + /** The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. */ + 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. */ + match?: ApplicationGatewayProbeHealthResponseMatch; + /** Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false. */ + enableProbeProxyProtocolHeader?: boolean; + /** The provisioning state of the probe resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Basic, Standard_v2 and WAF_v2 only. */ + port?: number; +} + +export function applicationGatewayProbePropertiesFormatSerializer( + item: ApplicationGatewayProbePropertiesFormat, +): any { + return { + protocol: item["protocol"], + host: item["host"], + path: item["path"], + interval: item["interval"], + timeout: item["timeout"], + unhealthyThreshold: item["unhealthyThreshold"], + pickHostNameFromBackendHttpSettings: item["pickHostNameFromBackendHttpSettings"], + pickHostNameFromBackendSettings: item["pickHostNameFromBackendSettings"], + minServers: item["minServers"], + match: !item["match"] + ? item["match"] + : applicationGatewayProbeHealthResponseMatchSerializer(item["match"]), + enableProbeProxyProtocolHeader: item["enableProbeProxyProtocolHeader"], + port: item["port"], + }; +} + +export function applicationGatewayProbePropertiesFormatDeserializer( + item: any, +): ApplicationGatewayProbePropertiesFormat { + return { + protocol: item["protocol"], + host: item["host"], + path: item["path"], + interval: item["interval"], + timeout: item["timeout"], + unhealthyThreshold: item["unhealthyThreshold"], + pickHostNameFromBackendHttpSettings: item["pickHostNameFromBackendHttpSettings"], + pickHostNameFromBackendSettings: item["pickHostNameFromBackendSettings"], + minServers: item["minServers"], + match: !item["match"] + ? item["match"] + : applicationGatewayProbeHealthResponseMatchDeserializer(item["match"]), + enableProbeProxyProtocolHeader: item["enableProbeProxyProtocolHeader"], + provisioningState: item["provisioningState"], + port: item["port"], + }; +} + +/** Application Gateway protocol. */ +export enum KnownApplicationGatewayProtocol { + /** Supported for httpListeners and backendHttpSettingsCollection properties. */ + Http = "Http", + /** Supported for httpListeners and backendHttpSettingsCollection properties. */ + Https = "Https", + /** Supported for listeners and backendSettingsCollection properties. */ + Tcp = "Tcp", + /** Supported for listeners and backendSettingsCollection properties. */ + Tls = "Tls", +} + +/** + * Application Gateway protocol. \ + * {@link KnownApplicationGatewayProtocol} can be used interchangeably with ApplicationGatewayProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Http**: Supported for httpListeners and backendHttpSettingsCollection properties. \ + * **Https**: Supported for httpListeners and backendHttpSettingsCollection properties. \ + * **Tcp**: Supported for listeners and backendSettingsCollection properties. \ + * **Tls**: Supported for listeners and backendSettingsCollection properties. + */ +export type ApplicationGatewayProtocol = string; + +/** Application gateway probe health response match. */ +export interface ApplicationGatewayProbeHealthResponseMatch { + /** Body that must be contained in the health response. Default value is empty. */ + body?: string; + /** Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. */ + statusCodes?: string[]; +} + +export function applicationGatewayProbeHealthResponseMatchSerializer( + item: ApplicationGatewayProbeHealthResponseMatch, +): any { + return { + body: item["body"], + statusCodes: !item["statusCodes"] + ? item["statusCodes"] + : item["statusCodes"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewayProbeHealthResponseMatchDeserializer( + item: any, +): ApplicationGatewayProbeHealthResponseMatch { + return { + body: item["body"], + statusCodes: !item["statusCodes"] + ? item["statusCodes"] + : item["statusCodes"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewayBackendHttpSettingsArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayBackendHttpSettingsSerializer(item); + }); +} + +export function applicationGatewayBackendHttpSettingsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayBackendHttpSettingsDeserializer(item); + }); +} + +/** Backend address pool settings of an application gateway. */ +export interface ApplicationGatewayBackendHttpSettings extends SubResource { + /** Name of the backend http settings that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** The destination port on the backend. */ + port?: number; + /** The protocol used to communicate with the backend. */ + protocol?: ApplicationGatewayProtocol; + /** Cookie based affinity. */ + cookieBasedAffinity?: ApplicationGatewayCookieBasedAffinity; + /** Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds. */ + requestTimeout?: number; + /** Probe resource of an application gateway. */ + probe?: SubResource; + /** Array of references to application gateway authentication certificates. */ + authenticationCertificates?: SubResource[]; + /** Array of references to application gateway trusted root certificates. */ + trustedRootCertificates?: SubResource[]; + /** Connection draining of the backend http settings resource. */ + connectionDraining?: ApplicationGatewayConnectionDraining; + /** Host header to be sent to the backend servers. */ + hostName?: string; + /** Whether to pick host header should be picked from the host name of the backend server. Default value is false. */ + pickHostNameFromBackendAddress?: boolean; + /** Cookie name to use for the affinity cookie. */ + affinityCookieName?: string; + /** Whether the probe is enabled. Default value is false. */ + probeEnabled?: boolean; + /** Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. */ + path?: string; + /** Enable or disable dedicated connection per backend server. Default is set to false. */ + dedicatedBackendConnection?: boolean; + /** Verify or skip both chain and expiry validations of the certificate on the backend server. Default is set to true. */ + validateCertChainAndExpiry?: boolean; + /** When enabled, verifies if the Common Name of the certificate provided by the backend server matches the Server Name Indication (SNI) value. Default value is true. */ + validateSNI?: boolean; + /** Specify an SNI value to match the common name of the certificate on the backend. By default, the application gateway uses the incoming request’s host header as the SNI. Default value is null. */ + sniName?: string; + /** The provisioning state of the backend HTTP settings resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayBackendHttpSettingsSerializer( + item: ApplicationGatewayBackendHttpSettings, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "port", + "protocol", + "cookieBasedAffinity", + "requestTimeout", + "probe", + "authenticationCertificates", + "trustedRootCertificates", + "connectionDraining", + "hostName", + "pickHostNameFromBackendAddress", + "affinityCookieName", + "probeEnabled", + "path", + "dedicatedBackendConnection", + "validateCertChainAndExpiry", + "validateSNI", + "sniName", + ]) + ? undefined + : _applicationGatewayBackendHttpSettingsPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayBackendHttpSettingsDeserializer( + item: any, +): ApplicationGatewayBackendHttpSettings { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayBackendHttpSettingsPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of Backend address pool settings of an application gateway. */ +export interface ApplicationGatewayBackendHttpSettingsPropertiesFormat { + /** The destination port on the backend. */ + port?: number; + /** The protocol used to communicate with the backend. */ + protocol?: ApplicationGatewayProtocol; + /** Cookie based affinity. */ + cookieBasedAffinity?: ApplicationGatewayCookieBasedAffinity; + /** Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds. */ + requestTimeout?: number; + /** Probe resource of an application gateway. */ + probe?: SubResource; + /** Array of references to application gateway authentication certificates. */ + authenticationCertificates?: SubResource[]; + /** Array of references to application gateway trusted root certificates. */ + trustedRootCertificates?: SubResource[]; + /** Connection draining of the backend http settings resource. */ + connectionDraining?: ApplicationGatewayConnectionDraining; + /** Host header to be sent to the backend servers. */ + hostName?: string; + /** Whether to pick host header should be picked from the host name of the backend server. Default value is false. */ + pickHostNameFromBackendAddress?: boolean; + /** Cookie name to use for the affinity cookie. */ + affinityCookieName?: string; + /** Whether the probe is enabled. Default value is false. */ + probeEnabled?: boolean; + /** Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. */ + path?: string; + /** Enable or disable dedicated connection per backend server. Default is set to false. */ + dedicatedBackendConnection?: boolean; + /** Verify or skip both chain and expiry validations of the certificate on the backend server. Default is set to true. */ + validateCertChainAndExpiry?: boolean; + /** When enabled, verifies if the Common Name of the certificate provided by the backend server matches the Server Name Indication (SNI) value. Default value is true. */ + validateSNI?: boolean; + /** Specify an SNI value to match the common name of the certificate on the backend. By default, the application gateway uses the incoming request’s host header as the SNI. Default value is null. */ + sniName?: string; + /** The provisioning state of the backend HTTP settings resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayBackendHttpSettingsPropertiesFormatSerializer( + item: ApplicationGatewayBackendHttpSettingsPropertiesFormat, +): any { + return { + port: item["port"], + protocol: item["protocol"], + cookieBasedAffinity: item["cookieBasedAffinity"], + requestTimeout: item["requestTimeout"], + probe: !item["probe"] ? item["probe"] : subResourceSerializer(item["probe"]), + authenticationCertificates: !item["authenticationCertificates"] + ? item["authenticationCertificates"] + : subResourceArraySerializer(item["authenticationCertificates"]), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : subResourceArraySerializer(item["trustedRootCertificates"]), + connectionDraining: !item["connectionDraining"] + ? item["connectionDraining"] + : applicationGatewayConnectionDrainingSerializer(item["connectionDraining"]), + hostName: item["hostName"], + pickHostNameFromBackendAddress: item["pickHostNameFromBackendAddress"], + affinityCookieName: item["affinityCookieName"], + probeEnabled: item["probeEnabled"], + path: item["path"], + dedicatedBackendConnection: item["dedicatedBackendConnection"], + validateCertChainAndExpiry: item["validateCertChainAndExpiry"], + validateSNI: item["validateSNI"], + sniName: item["sniName"], + }; +} + +export function applicationGatewayBackendHttpSettingsPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayBackendHttpSettingsPropertiesFormat { + return { + port: item["port"], + protocol: item["protocol"], + cookieBasedAffinity: item["cookieBasedAffinity"], + requestTimeout: item["requestTimeout"], + probe: !item["probe"] ? item["probe"] : subResourceDeserializer(item["probe"]), + authenticationCertificates: !item["authenticationCertificates"] + ? item["authenticationCertificates"] + : subResourceArrayDeserializer(item["authenticationCertificates"]), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : subResourceArrayDeserializer(item["trustedRootCertificates"]), + connectionDraining: !item["connectionDraining"] + ? item["connectionDraining"] + : applicationGatewayConnectionDrainingDeserializer(item["connectionDraining"]), + hostName: item["hostName"], + pickHostNameFromBackendAddress: item["pickHostNameFromBackendAddress"], + affinityCookieName: item["affinityCookieName"], + probeEnabled: item["probeEnabled"], + path: item["path"], + dedicatedBackendConnection: item["dedicatedBackendConnection"], + validateCertChainAndExpiry: item["validateCertChainAndExpiry"], + validateSNI: item["validateSNI"], + sniName: item["sniName"], + provisioningState: item["provisioningState"], + }; +} + +/** Cookie based affinity. */ +export enum KnownApplicationGatewayCookieBasedAffinity { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Cookie based affinity. \ + * {@link KnownApplicationGatewayCookieBasedAffinity} can be used interchangeably with ApplicationGatewayCookieBasedAffinity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Enabled \ + * **Disabled**: Disabled + */ +export type ApplicationGatewayCookieBasedAffinity = string; + +/** Connection draining allows open connections to a backend server to be active for a specified time after the backend server got removed from the configuration. */ +export interface ApplicationGatewayConnectionDraining { + /** Whether connection draining is enabled or not. */ + enabled: boolean; + /** The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. */ + drainTimeoutInSec: number; +} + +export function applicationGatewayConnectionDrainingSerializer( + item: ApplicationGatewayConnectionDraining, +): any { + return { enabled: item["enabled"], drainTimeoutInSec: item["drainTimeoutInSec"] }; +} + +export function applicationGatewayConnectionDrainingDeserializer( + item: any, +): ApplicationGatewayConnectionDraining { + return { + enabled: item["enabled"], + drainTimeoutInSec: item["drainTimeoutInSec"], + }; +} + +export function applicationGatewayBackendSettingsArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayBackendSettingsSerializer(item); + }); +} + +export function applicationGatewayBackendSettingsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayBackendSettingsDeserializer(item); + }); +} + +/** Backend address pool settings of an application gateway. */ +export interface ApplicationGatewayBackendSettings extends 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. */ + readonly etag?: string; + /** Type of the resource. */ + 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; + /** Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false. */ + enableL4ClientIpPreservation?: boolean; + /** The provisioning state of the backend HTTP settings resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayBackendSettingsSerializer( + item: ApplicationGatewayBackendSettings, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "port", + "protocol", + "timeout", + "probe", + "trustedRootCertificates", + "hostName", + "pickHostNameFromBackendAddress", + "enableL4ClientIpPreservation", + ]) + ? undefined + : _applicationGatewayBackendSettingsPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayBackendSettingsDeserializer( + item: any, +): ApplicationGatewayBackendSettings { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayBackendSettingsPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of Backend address pool settings of an application gateway. */ +export interface ApplicationGatewayBackendSettingsPropertiesFormat { + /** 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; + /** Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false. */ + enableL4ClientIpPreservation?: boolean; + /** The provisioning state of the backend HTTP settings resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayBackendSettingsPropertiesFormatSerializer( + item: ApplicationGatewayBackendSettingsPropertiesFormat, +): any { + return { + port: item["port"], + protocol: item["protocol"], + timeout: item["timeout"], + probe: !item["probe"] ? item["probe"] : subResourceSerializer(item["probe"]), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : subResourceArraySerializer(item["trustedRootCertificates"]), + hostName: item["hostName"], + pickHostNameFromBackendAddress: item["pickHostNameFromBackendAddress"], + enableL4ClientIpPreservation: item["enableL4ClientIpPreservation"], + }; +} + +export function applicationGatewayBackendSettingsPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayBackendSettingsPropertiesFormat { + return { + port: item["port"], + protocol: item["protocol"], + timeout: item["timeout"], + probe: !item["probe"] ? item["probe"] : subResourceDeserializer(item["probe"]), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : subResourceArrayDeserializer(item["trustedRootCertificates"]), + hostName: item["hostName"], + pickHostNameFromBackendAddress: item["pickHostNameFromBackendAddress"], + enableL4ClientIpPreservation: item["enableL4ClientIpPreservation"], + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewayHttpListenerArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayHttpListenerSerializer(item); + }); +} + +export function applicationGatewayHttpListenerArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayHttpListenerDeserializer(item); + }); +} + +/** Http listener of an application gateway. */ +export interface ApplicationGatewayHttpListener extends SubResource { + /** Name of the HTTP listener that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + 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 HTTP listener. */ + protocol?: ApplicationGatewayProtocol; + /** Host name of HTTP listener. */ + hostName?: string; + /** SSL certificate resource of an application gateway. */ + sslCertificate?: SubResource; + /** SSL profile resource of the application gateway. */ + sslProfile?: SubResource; + /** Applicable only if protocol is https. Enables SNI for multi-hosting. */ + requireServerNameIndication?: boolean; + /** The provisioning state of the HTTP listener resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Custom error configurations of the HTTP listener. */ + customErrorConfigurations?: ApplicationGatewayCustomError[]; + /** Reference to the FirewallPolicy resource. */ + firewallPolicy?: SubResource; + /** List of Host names for HTTP Listener that allows special wildcard characters as well. */ + hostNames?: string[]; +} + +export function applicationGatewayHttpListenerSerializer( + item: ApplicationGatewayHttpListener, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "frontendIPConfiguration", + "frontendPort", + "protocol", + "hostName", + "sslCertificate", + "sslProfile", + "requireServerNameIndication", + "customErrorConfigurations", + "firewallPolicy", + "hostNames", + ]) + ? undefined + : _applicationGatewayHttpListenerPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayHttpListenerDeserializer( + item: any, +): ApplicationGatewayHttpListener { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayHttpListenerPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of HTTP listener of an application gateway. */ +export interface ApplicationGatewayHttpListenerPropertiesFormat { + /** Frontend IP configuration resource of an application gateway. */ + frontendIPConfiguration?: SubResource; + /** Frontend port resource of an application gateway. */ + frontendPort?: SubResource; + /** Protocol of the HTTP listener. */ + protocol?: ApplicationGatewayProtocol; + /** Host name of HTTP listener. */ + hostName?: string; + /** SSL certificate resource of an application gateway. */ + sslCertificate?: SubResource; + /** SSL profile resource of the application gateway. */ + sslProfile?: SubResource; + /** Applicable only if protocol is https. Enables SNI for multi-hosting. */ + requireServerNameIndication?: boolean; + /** The provisioning state of the HTTP listener resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Custom error configurations of the HTTP listener. */ + customErrorConfigurations?: ApplicationGatewayCustomError[]; + /** Reference to the FirewallPolicy resource. */ + firewallPolicy?: SubResource; + /** List of Host names for HTTP Listener that allows special wildcard characters as well. */ + hostNames?: string[]; +} + +export function applicationGatewayHttpListenerPropertiesFormatSerializer( + item: ApplicationGatewayHttpListenerPropertiesFormat, +): any { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceSerializer(item["frontendIPConfiguration"]), + frontendPort: !item["frontendPort"] + ? item["frontendPort"] + : subResourceSerializer(item["frontendPort"]), + protocol: item["protocol"], + hostName: item["hostName"], + sslCertificate: !item["sslCertificate"] + ? item["sslCertificate"] + : subResourceSerializer(item["sslCertificate"]), + sslProfile: !item["sslProfile"] + ? item["sslProfile"] + : subResourceSerializer(item["sslProfile"]), + requireServerNameIndication: item["requireServerNameIndication"], + customErrorConfigurations: !item["customErrorConfigurations"] + ? item["customErrorConfigurations"] + : applicationGatewayCustomErrorArraySerializer(item["customErrorConfigurations"]), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceSerializer(item["firewallPolicy"]), + hostNames: !item["hostNames"] + ? item["hostNames"] + : item["hostNames"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewayHttpListenerPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayHttpListenerPropertiesFormat { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceDeserializer(item["frontendIPConfiguration"]), + frontendPort: !item["frontendPort"] + ? item["frontendPort"] + : subResourceDeserializer(item["frontendPort"]), + protocol: item["protocol"], + hostName: item["hostName"], + sslCertificate: !item["sslCertificate"] + ? item["sslCertificate"] + : subResourceDeserializer(item["sslCertificate"]), + sslProfile: !item["sslProfile"] + ? item["sslProfile"] + : subResourceDeserializer(item["sslProfile"]), + requireServerNameIndication: item["requireServerNameIndication"], + provisioningState: item["provisioningState"], + customErrorConfigurations: !item["customErrorConfigurations"] + ? item["customErrorConfigurations"] + : applicationGatewayCustomErrorArrayDeserializer(item["customErrorConfigurations"]), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceDeserializer(item["firewallPolicy"]), + hostNames: !item["hostNames"] + ? item["hostNames"] + : item["hostNames"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewayCustomErrorArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayCustomErrorSerializer(item); + }); +} + +export function applicationGatewayCustomErrorArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayCustomErrorDeserializer(item); + }); +} + +/** Custom error of an application gateway. */ +export interface ApplicationGatewayCustomError { + /** Status code of the application gateway custom error. */ + statusCode?: ApplicationGatewayCustomErrorStatusCode; + /** Error page URL of the application gateway custom error. */ + customErrorPageUrl?: string; +} + +export function applicationGatewayCustomErrorSerializer(item: ApplicationGatewayCustomError): any { + return { statusCode: item["statusCode"], customErrorPageUrl: item["customErrorPageUrl"] }; +} + +export function applicationGatewayCustomErrorDeserializer( + item: any, +): ApplicationGatewayCustomError { + return { + statusCode: item["statusCode"], + customErrorPageUrl: item["customErrorPageUrl"], + }; +} + +/** Status code of the application gateway custom error. */ +export enum KnownApplicationGatewayCustomErrorStatusCode { + /** HttpStatus400 */ + HttpStatus400 = "HttpStatus400", + /** HttpStatus403 */ + HttpStatus403 = "HttpStatus403", + /** HttpStatus404 */ + HttpStatus404 = "HttpStatus404", + /** HttpStatus405 */ + HttpStatus405 = "HttpStatus405", + /** HttpStatus408 */ + HttpStatus408 = "HttpStatus408", + /** HttpStatus500 */ + HttpStatus500 = "HttpStatus500", + /** HttpStatus502 */ + HttpStatus502 = "HttpStatus502", + /** HttpStatus503 */ + HttpStatus503 = "HttpStatus503", + /** HttpStatus504 */ + HttpStatus504 = "HttpStatus504", +} + +/** + * Status code of the application gateway custom error. \ + * {@link KnownApplicationGatewayCustomErrorStatusCode} can be used interchangeably with ApplicationGatewayCustomErrorStatusCode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **HttpStatus400**: HttpStatus400 \ + * **HttpStatus403**: HttpStatus403 \ + * **HttpStatus404**: HttpStatus404 \ + * **HttpStatus405**: HttpStatus405 \ + * **HttpStatus408**: HttpStatus408 \ + * **HttpStatus500**: HttpStatus500 \ + * **HttpStatus502**: HttpStatus502 \ + * **HttpStatus503**: HttpStatus503 \ + * **HttpStatus504**: HttpStatus504 + */ +export type ApplicationGatewayCustomErrorStatusCode = string; + +export function applicationGatewayListenerArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayListenerSerializer(item); + }); +} + +export function applicationGatewayListenerArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayListenerDeserializer(item); + }); +} + +/** Listener of an application gateway. */ +export interface ApplicationGatewayListener extends 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. */ + readonly etag?: string; + /** Type of the resource. */ + 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. */ + readonly provisioningState?: CommonProvisioningState; + /** List of Server Name Indications(SNI) for TLS Multi-site Listener that allows special wildcard characters as well. */ + hostNames?: string[]; +} + +export function applicationGatewayListenerSerializer(item: ApplicationGatewayListener): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "frontendIPConfiguration", + "frontendPort", + "protocol", + "sslCertificate", + "sslProfile", + "hostNames", + ]) + ? undefined + : _applicationGatewayListenerPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayListenerDeserializer(item: any): ApplicationGatewayListener { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayListenerPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of listener of an application gateway. */ +export interface ApplicationGatewayListenerPropertiesFormat { + /** 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. */ + readonly provisioningState?: CommonProvisioningState; + /** List of Server Name Indications(SNI) for TLS Multi-site Listener that allows special wildcard characters as well. */ + hostNames?: string[]; +} + +export function applicationGatewayListenerPropertiesFormatSerializer( + item: ApplicationGatewayListenerPropertiesFormat, +): any { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceSerializer(item["frontendIPConfiguration"]), + frontendPort: !item["frontendPort"] + ? item["frontendPort"] + : subResourceSerializer(item["frontendPort"]), + protocol: item["protocol"], + sslCertificate: !item["sslCertificate"] + ? item["sslCertificate"] + : subResourceSerializer(item["sslCertificate"]), + sslProfile: !item["sslProfile"] + ? item["sslProfile"] + : subResourceSerializer(item["sslProfile"]), + hostNames: !item["hostNames"] + ? item["hostNames"] + : item["hostNames"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewayListenerPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayListenerPropertiesFormat { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceDeserializer(item["frontendIPConfiguration"]), + frontendPort: !item["frontendPort"] + ? item["frontendPort"] + : subResourceDeserializer(item["frontendPort"]), + protocol: item["protocol"], + sslCertificate: !item["sslCertificate"] + ? item["sslCertificate"] + : subResourceDeserializer(item["sslCertificate"]), + sslProfile: !item["sslProfile"] + ? item["sslProfile"] + : subResourceDeserializer(item["sslProfile"]), + provisioningState: item["provisioningState"], + hostNames: !item["hostNames"] + ? item["hostNames"] + : item["hostNames"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewaySslProfileArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewaySslProfileSerializer(item); + }); +} + +export function applicationGatewaySslProfileArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewaySslProfileDeserializer(item); + }); +} + +/** SSL profile of an application gateway. */ +export interface ApplicationGatewaySslProfile extends SubResource { + /** Name of the SSL profile that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Array of references to application gateway trusted client certificates. */ + trustedClientCertificates?: SubResource[]; + /** SSL policy of the application gateway resource. */ + sslPolicy?: ApplicationGatewaySslPolicy; + /** Client authentication configuration of the application gateway resource. */ + clientAuthConfiguration?: ApplicationGatewayClientAuthConfiguration; + /** The provisioning state of the HTTP listener resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewaySslProfileSerializer(item: ApplicationGatewaySslProfile): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "trustedClientCertificates", + "sslPolicy", + "clientAuthConfiguration", + ]) + ? undefined + : _applicationGatewaySslProfilePropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewaySslProfileDeserializer(item: any): ApplicationGatewaySslProfile { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewaySslProfilePropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of SSL profile of an application gateway. */ +export interface ApplicationGatewaySslProfilePropertiesFormat { + /** Array of references to application gateway trusted client certificates. */ + trustedClientCertificates?: SubResource[]; + /** SSL policy of the application gateway resource. */ + sslPolicy?: ApplicationGatewaySslPolicy; + /** Client authentication configuration of the application gateway resource. */ + clientAuthConfiguration?: ApplicationGatewayClientAuthConfiguration; + /** The provisioning state of the HTTP listener resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewaySslProfilePropertiesFormatSerializer( + item: ApplicationGatewaySslProfilePropertiesFormat, +): any { + return { + trustedClientCertificates: !item["trustedClientCertificates"] + ? item["trustedClientCertificates"] + : subResourceArraySerializer(item["trustedClientCertificates"]), + sslPolicy: !item["sslPolicy"] + ? item["sslPolicy"] + : applicationGatewaySslPolicySerializer(item["sslPolicy"]), + clientAuthConfiguration: !item["clientAuthConfiguration"] + ? item["clientAuthConfiguration"] + : applicationGatewayClientAuthConfigurationSerializer(item["clientAuthConfiguration"]), + }; +} + +export function applicationGatewaySslProfilePropertiesFormatDeserializer( + item: any, +): ApplicationGatewaySslProfilePropertiesFormat { + return { + trustedClientCertificates: !item["trustedClientCertificates"] + ? item["trustedClientCertificates"] + : subResourceArrayDeserializer(item["trustedClientCertificates"]), + sslPolicy: !item["sslPolicy"] + ? item["sslPolicy"] + : applicationGatewaySslPolicyDeserializer(item["sslPolicy"]), + clientAuthConfiguration: !item["clientAuthConfiguration"] + ? item["clientAuthConfiguration"] + : applicationGatewayClientAuthConfigurationDeserializer(item["clientAuthConfiguration"]), + provisioningState: item["provisioningState"], + }; +} + +/** Application gateway client authentication configuration. */ +export interface ApplicationGatewayClientAuthConfiguration { + /** Verify client certificate issuer name on the application gateway. */ + verifyClientCertIssuerDN?: boolean; + /** Verify client certificate revocation status. */ + verifyClientRevocation?: ApplicationGatewayClientRevocationOptions; + /** Verify client Authentication mode. */ + verifyClientAuthMode?: ApplicationGatewayClientAuthVerificationModes; +} + +export function applicationGatewayClientAuthConfigurationSerializer( + item: ApplicationGatewayClientAuthConfiguration, +): any { + return { + verifyClientCertIssuerDN: item["verifyClientCertIssuerDN"], + verifyClientRevocation: item["verifyClientRevocation"], + verifyClientAuthMode: item["verifyClientAuthMode"], + }; +} + +export function applicationGatewayClientAuthConfigurationDeserializer( + item: any, +): ApplicationGatewayClientAuthConfiguration { + return { + verifyClientCertIssuerDN: item["verifyClientCertIssuerDN"], + verifyClientRevocation: item["verifyClientRevocation"], + verifyClientAuthMode: item["verifyClientAuthMode"], + }; +} + +/** Verify client certificate revocation status. */ +export enum KnownApplicationGatewayClientRevocationOptions { + /** None */ + None = "None", + /** OCSP */ + Ocsp = "OCSP", +} + +/** + * Verify client certificate revocation status. \ + * {@link KnownApplicationGatewayClientRevocationOptions} can be used interchangeably with ApplicationGatewayClientRevocationOptions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **OCSP**: OCSP + */ +export type ApplicationGatewayClientRevocationOptions = string; + +/** Verify client Authentication mode. */ +export enum KnownApplicationGatewayClientAuthVerificationModes { + /** Strict */ + Strict = "Strict", + /** Passthrough */ + Passthrough = "Passthrough", +} + +/** + * Verify client Authentication mode. \ + * {@link KnownApplicationGatewayClientAuthVerificationModes} can be used interchangeably with ApplicationGatewayClientAuthVerificationModes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Strict**: Strict \ + * **Passthrough**: Passthrough + */ +export type ApplicationGatewayClientAuthVerificationModes = string; + +export function applicationGatewayUrlPathMapArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayUrlPathMapSerializer(item); + }); +} + +export function applicationGatewayUrlPathMapArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayUrlPathMapDeserializer(item); + }); +} + +/** UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. */ +export interface ApplicationGatewayUrlPathMap extends SubResource { + /** Name of the URL path map that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Default backend address pool resource of URL path map. */ + defaultBackendAddressPool?: SubResource; + /** Default backend http settings resource of URL path map. */ + defaultBackendHttpSettings?: SubResource; + /** Default Rewrite rule set resource of URL path map. */ + defaultRewriteRuleSet?: SubResource; + /** Default redirect configuration resource of URL path map. */ + defaultRedirectConfiguration?: SubResource; + /** Default Load Distribution Policy resource of URL path map. */ + defaultLoadDistributionPolicy?: SubResource; + /** Path rule of URL path map resource. */ + pathRules?: ApplicationGatewayPathRule[]; + /** The provisioning state of the URL path map resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayUrlPathMapSerializer(item: ApplicationGatewayUrlPathMap): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "defaultBackendAddressPool", + "defaultBackendHttpSettings", + "defaultRewriteRuleSet", + "defaultRedirectConfiguration", + "defaultLoadDistributionPolicy", + "pathRules", + ]) + ? undefined + : _applicationGatewayUrlPathMapPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayUrlPathMapDeserializer(item: any): ApplicationGatewayUrlPathMap { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayUrlPathMapPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of UrlPathMap of the application gateway. */ +export interface ApplicationGatewayUrlPathMapPropertiesFormat { + /** Default backend address pool resource of URL path map. */ + defaultBackendAddressPool?: SubResource; + /** Default backend http settings resource of URL path map. */ + defaultBackendHttpSettings?: SubResource; + /** Default Rewrite rule set resource of URL path map. */ + defaultRewriteRuleSet?: SubResource; + /** Default redirect configuration resource of URL path map. */ + defaultRedirectConfiguration?: SubResource; + /** Default Load Distribution Policy resource of URL path map. */ + defaultLoadDistributionPolicy?: SubResource; + /** Path rule of URL path map resource. */ + pathRules?: ApplicationGatewayPathRule[]; + /** The provisioning state of the URL path map resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayUrlPathMapPropertiesFormatSerializer( + item: ApplicationGatewayUrlPathMapPropertiesFormat, +): any { + return { + defaultBackendAddressPool: !item["defaultBackendAddressPool"] + ? item["defaultBackendAddressPool"] + : subResourceSerializer(item["defaultBackendAddressPool"]), + defaultBackendHttpSettings: !item["defaultBackendHttpSettings"] + ? item["defaultBackendHttpSettings"] + : subResourceSerializer(item["defaultBackendHttpSettings"]), + defaultRewriteRuleSet: !item["defaultRewriteRuleSet"] + ? item["defaultRewriteRuleSet"] + : subResourceSerializer(item["defaultRewriteRuleSet"]), + defaultRedirectConfiguration: !item["defaultRedirectConfiguration"] + ? item["defaultRedirectConfiguration"] + : subResourceSerializer(item["defaultRedirectConfiguration"]), + defaultLoadDistributionPolicy: !item["defaultLoadDistributionPolicy"] + ? item["defaultLoadDistributionPolicy"] + : subResourceSerializer(item["defaultLoadDistributionPolicy"]), + pathRules: !item["pathRules"] + ? item["pathRules"] + : applicationGatewayPathRuleArraySerializer(item["pathRules"]), + }; +} + +export function applicationGatewayUrlPathMapPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayUrlPathMapPropertiesFormat { + return { + defaultBackendAddressPool: !item["defaultBackendAddressPool"] + ? item["defaultBackendAddressPool"] + : subResourceDeserializer(item["defaultBackendAddressPool"]), + defaultBackendHttpSettings: !item["defaultBackendHttpSettings"] + ? item["defaultBackendHttpSettings"] + : subResourceDeserializer(item["defaultBackendHttpSettings"]), + defaultRewriteRuleSet: !item["defaultRewriteRuleSet"] + ? item["defaultRewriteRuleSet"] + : subResourceDeserializer(item["defaultRewriteRuleSet"]), + defaultRedirectConfiguration: !item["defaultRedirectConfiguration"] + ? item["defaultRedirectConfiguration"] + : subResourceDeserializer(item["defaultRedirectConfiguration"]), + defaultLoadDistributionPolicy: !item["defaultLoadDistributionPolicy"] + ? item["defaultLoadDistributionPolicy"] + : subResourceDeserializer(item["defaultLoadDistributionPolicy"]), + pathRules: !item["pathRules"] + ? item["pathRules"] + : applicationGatewayPathRuleArrayDeserializer(item["pathRules"]), + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewayPathRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayPathRuleSerializer(item); + }); +} + +export function applicationGatewayPathRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayPathRuleDeserializer(item); + }); +} + +/** Path rule of URL path map of an application gateway. */ +export interface ApplicationGatewayPathRule extends SubResource { + /** Name of the path rule that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Path rules of URL path map. */ + paths?: string[]; + /** Backend address pool resource of URL path map path rule. */ + backendAddressPool?: SubResource; + /** Backend http settings resource of URL path map path rule. */ + backendHttpSettings?: SubResource; + /** Redirect configuration resource of URL path map path rule. */ + redirectConfiguration?: SubResource; + /** Rewrite rule set resource of URL path map path rule. */ + rewriteRuleSet?: SubResource; + /** Load Distribution Policy resource of URL path map path rule. */ + loadDistributionPolicy?: SubResource; + /** The provisioning state of the path rule resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Reference to the FirewallPolicy resource. */ + firewallPolicy?: SubResource; +} + +export function applicationGatewayPathRuleSerializer(item: ApplicationGatewayPathRule): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "paths", + "backendAddressPool", + "backendHttpSettings", + "redirectConfiguration", + "rewriteRuleSet", + "loadDistributionPolicy", + "firewallPolicy", + ]) + ? undefined + : _applicationGatewayPathRulePropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayPathRuleDeserializer(item: any): ApplicationGatewayPathRule { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayPathRulePropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of path rule of an application gateway. */ +export interface ApplicationGatewayPathRulePropertiesFormat { + /** Path rules of URL path map. */ + paths?: string[]; + /** Backend address pool resource of URL path map path rule. */ + backendAddressPool?: SubResource; + /** Backend http settings resource of URL path map path rule. */ + backendHttpSettings?: SubResource; + /** Redirect configuration resource of URL path map path rule. */ + redirectConfiguration?: SubResource; + /** Rewrite rule set resource of URL path map path rule. */ + rewriteRuleSet?: SubResource; + /** Load Distribution Policy resource of URL path map path rule. */ + loadDistributionPolicy?: SubResource; + /** The provisioning state of the path rule resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Reference to the FirewallPolicy resource. */ + firewallPolicy?: SubResource; +} + +export function applicationGatewayPathRulePropertiesFormatSerializer( + item: ApplicationGatewayPathRulePropertiesFormat, +): any { + return { + paths: !item["paths"] + ? item["paths"] + : item["paths"].map((p: any) => { + return p; + }), + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + backendHttpSettings: !item["backendHttpSettings"] + ? item["backendHttpSettings"] + : subResourceSerializer(item["backendHttpSettings"]), + redirectConfiguration: !item["redirectConfiguration"] + ? item["redirectConfiguration"] + : subResourceSerializer(item["redirectConfiguration"]), + rewriteRuleSet: !item["rewriteRuleSet"] + ? item["rewriteRuleSet"] + : subResourceSerializer(item["rewriteRuleSet"]), + loadDistributionPolicy: !item["loadDistributionPolicy"] + ? item["loadDistributionPolicy"] + : subResourceSerializer(item["loadDistributionPolicy"]), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceSerializer(item["firewallPolicy"]), + }; +} + +export function applicationGatewayPathRulePropertiesFormatDeserializer( + item: any, +): ApplicationGatewayPathRulePropertiesFormat { + return { + paths: !item["paths"] + ? item["paths"] + : item["paths"].map((p: any) => { + return p; + }), + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + backendHttpSettings: !item["backendHttpSettings"] + ? item["backendHttpSettings"] + : subResourceDeserializer(item["backendHttpSettings"]), + redirectConfiguration: !item["redirectConfiguration"] + ? item["redirectConfiguration"] + : subResourceDeserializer(item["redirectConfiguration"]), + rewriteRuleSet: !item["rewriteRuleSet"] + ? item["rewriteRuleSet"] + : subResourceDeserializer(item["rewriteRuleSet"]), + loadDistributionPolicy: !item["loadDistributionPolicy"] + ? item["loadDistributionPolicy"] + : subResourceDeserializer(item["loadDistributionPolicy"]), + provisioningState: item["provisioningState"], + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceDeserializer(item["firewallPolicy"]), + }; +} + +export function applicationGatewayRequestRoutingRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRequestRoutingRuleSerializer(item); + }); +} + +export function applicationGatewayRequestRoutingRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRequestRoutingRuleDeserializer(item); + }); +} + +/** Request routing rule of an application gateway. */ +export interface ApplicationGatewayRequestRoutingRule extends SubResource { + /** Name of the request routing rule that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Rule type. */ + ruleType?: ApplicationGatewayRequestRoutingRuleType; + /** Priority of the request routing rule. */ + priority?: number; + /** Backend address pool resource of the application gateway. */ + backendAddressPool?: SubResource; + /** Backend http settings resource of the application gateway. */ + backendHttpSettings?: SubResource; + /** Http listener resource of the application gateway. */ + httpListener?: SubResource; + /** URL path map resource of the application gateway. */ + urlPathMap?: SubResource; + /** Rewrite Rule Set resource in Basic rule of the application gateway. */ + rewriteRuleSet?: SubResource; + /** Redirect configuration resource of the application gateway. */ + redirectConfiguration?: SubResource; + /** Load Distribution Policy resource of the application gateway. */ + loadDistributionPolicy?: SubResource; + /** Entra JWT validation configuration resource of the application gateway. */ + entraJWTValidationConfig?: SubResource; + /** The provisioning state of the request routing rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayRequestRoutingRuleSerializer( + item: ApplicationGatewayRequestRoutingRule, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "ruleType", + "priority", + "backendAddressPool", + "backendHttpSettings", + "httpListener", + "urlPathMap", + "rewriteRuleSet", + "redirectConfiguration", + "loadDistributionPolicy", + "entraJWTValidationConfig", + ]) + ? undefined + : _applicationGatewayRequestRoutingRulePropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayRequestRoutingRuleDeserializer( + item: any, +): ApplicationGatewayRequestRoutingRule { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayRequestRoutingRulePropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of request routing rule of the application gateway. */ +export interface ApplicationGatewayRequestRoutingRulePropertiesFormat { + /** Rule type. */ + ruleType?: ApplicationGatewayRequestRoutingRuleType; + /** Priority of the request routing rule. */ + priority?: number; + /** Backend address pool resource of the application gateway. */ + backendAddressPool?: SubResource; + /** Backend http settings resource of the application gateway. */ + backendHttpSettings?: SubResource; + /** Http listener resource of the application gateway. */ + httpListener?: SubResource; + /** URL path map resource of the application gateway. */ + urlPathMap?: SubResource; + /** Rewrite Rule Set resource in Basic rule of the application gateway. */ + rewriteRuleSet?: SubResource; + /** Redirect configuration resource of the application gateway. */ + redirectConfiguration?: SubResource; + /** Load Distribution Policy resource of the application gateway. */ + loadDistributionPolicy?: SubResource; + /** Entra JWT validation configuration resource of the application gateway. */ + entraJWTValidationConfig?: SubResource; + /** The provisioning state of the request routing rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayRequestRoutingRulePropertiesFormatSerializer( + item: ApplicationGatewayRequestRoutingRulePropertiesFormat, +): any { + return { + ruleType: item["ruleType"], + priority: item["priority"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + backendHttpSettings: !item["backendHttpSettings"] + ? item["backendHttpSettings"] + : subResourceSerializer(item["backendHttpSettings"]), + httpListener: !item["httpListener"] + ? item["httpListener"] + : subResourceSerializer(item["httpListener"]), + urlPathMap: !item["urlPathMap"] + ? item["urlPathMap"] + : subResourceSerializer(item["urlPathMap"]), + rewriteRuleSet: !item["rewriteRuleSet"] + ? item["rewriteRuleSet"] + : subResourceSerializer(item["rewriteRuleSet"]), + redirectConfiguration: !item["redirectConfiguration"] + ? item["redirectConfiguration"] + : subResourceSerializer(item["redirectConfiguration"]), + loadDistributionPolicy: !item["loadDistributionPolicy"] + ? item["loadDistributionPolicy"] + : subResourceSerializer(item["loadDistributionPolicy"]), + entraJWTValidationConfig: !item["entraJWTValidationConfig"] + ? item["entraJWTValidationConfig"] + : subResourceSerializer(item["entraJWTValidationConfig"]), + }; +} + +export function applicationGatewayRequestRoutingRulePropertiesFormatDeserializer( + item: any, +): ApplicationGatewayRequestRoutingRulePropertiesFormat { + return { + ruleType: item["ruleType"], + priority: item["priority"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + backendHttpSettings: !item["backendHttpSettings"] + ? item["backendHttpSettings"] + : subResourceDeserializer(item["backendHttpSettings"]), + httpListener: !item["httpListener"] + ? item["httpListener"] + : subResourceDeserializer(item["httpListener"]), + urlPathMap: !item["urlPathMap"] + ? item["urlPathMap"] + : subResourceDeserializer(item["urlPathMap"]), + rewriteRuleSet: !item["rewriteRuleSet"] + ? item["rewriteRuleSet"] + : subResourceDeserializer(item["rewriteRuleSet"]), + redirectConfiguration: !item["redirectConfiguration"] + ? item["redirectConfiguration"] + : subResourceDeserializer(item["redirectConfiguration"]), + loadDistributionPolicy: !item["loadDistributionPolicy"] + ? item["loadDistributionPolicy"] + : subResourceDeserializer(item["loadDistributionPolicy"]), + entraJWTValidationConfig: !item["entraJWTValidationConfig"] + ? item["entraJWTValidationConfig"] + : subResourceDeserializer(item["entraJWTValidationConfig"]), + provisioningState: item["provisioningState"], + }; +} + +/** Rule type. */ +export enum KnownApplicationGatewayRequestRoutingRuleType { + /** Basic */ + Basic = "Basic", + /** PathBasedRouting */ + PathBasedRouting = "PathBasedRouting", +} + +/** + * Rule type. \ + * {@link KnownApplicationGatewayRequestRoutingRuleType} can be used interchangeably with ApplicationGatewayRequestRoutingRuleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic**: Basic \ + * **PathBasedRouting**: PathBasedRouting + */ +export type ApplicationGatewayRequestRoutingRuleType = string; + +export function applicationGatewayRoutingRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRoutingRuleSerializer(item); + }); +} + +export function applicationGatewayRoutingRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRoutingRuleDeserializer(item); + }); +} + +/** Routing rule of an application gateway. */ +export interface ApplicationGatewayRoutingRule extends 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. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Rule type. */ + ruleType?: ApplicationGatewayRequestRoutingRuleType; + /** Priority of the routing rule. */ + priority?: number; + /** Backend address pool resource of the application gateway. */ + backendAddressPool?: SubResource; + /** Backend settings resource of the application gateway. */ + backendSettings?: SubResource; + /** Listener resource of the application gateway. */ + listener?: SubResource; + /** The provisioning state of the request routing rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayRoutingRuleSerializer(item: ApplicationGatewayRoutingRule): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "ruleType", + "priority", + "backendAddressPool", + "backendSettings", + "listener", + ]) + ? undefined + : _applicationGatewayRoutingRulePropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayRoutingRuleDeserializer( + item: any, +): ApplicationGatewayRoutingRule { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayRoutingRulePropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of routing rule of the application gateway. */ +export interface ApplicationGatewayRoutingRulePropertiesFormat { + /** Rule type. */ + ruleType?: ApplicationGatewayRequestRoutingRuleType; + /** Priority of the routing rule. */ + priority: number; + /** Backend address pool resource of the application gateway. */ + backendAddressPool?: SubResource; + /** Backend settings resource of the application gateway. */ + backendSettings?: SubResource; + /** Listener resource of the application gateway. */ + listener?: SubResource; + /** The provisioning state of the request routing rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayRoutingRulePropertiesFormatSerializer( + item: ApplicationGatewayRoutingRulePropertiesFormat, +): any { + return { + ruleType: item["ruleType"], + priority: item["priority"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + backendSettings: !item["backendSettings"] + ? item["backendSettings"] + : subResourceSerializer(item["backendSettings"]), + listener: !item["listener"] ? item["listener"] : subResourceSerializer(item["listener"]), + }; +} + +export function applicationGatewayRoutingRulePropertiesFormatDeserializer( + item: any, +): ApplicationGatewayRoutingRulePropertiesFormat { + return { + ruleType: item["ruleType"], + priority: item["priority"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + backendSettings: !item["backendSettings"] + ? item["backendSettings"] + : subResourceDeserializer(item["backendSettings"]), + listener: !item["listener"] ? item["listener"] : subResourceDeserializer(item["listener"]), + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewayRewriteRuleSetArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRewriteRuleSetSerializer(item); + }); +} + +export function applicationGatewayRewriteRuleSetArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRewriteRuleSetDeserializer(item); + }); +} + +/** Rewrite rule set of an application gateway. */ +export interface ApplicationGatewayRewriteRuleSet extends SubResource { + /** Name of the rewrite rule set that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Rewrite rules in the rewrite rule set. */ + rewriteRules?: ApplicationGatewayRewriteRule[]; + /** The provisioning state of the rewrite rule set resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayRewriteRuleSetSerializer( + item: ApplicationGatewayRewriteRuleSet, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["rewriteRules"]) + ? undefined + : _applicationGatewayRewriteRuleSetPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayRewriteRuleSetDeserializer( + item: any, +): ApplicationGatewayRewriteRuleSet { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayRewriteRuleSetPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of rewrite rule set of the application gateway. */ +export interface ApplicationGatewayRewriteRuleSetPropertiesFormat { + /** Rewrite rules in the rewrite rule set. */ + rewriteRules?: ApplicationGatewayRewriteRule[]; + /** The provisioning state of the rewrite rule set resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayRewriteRuleSetPropertiesFormatSerializer( + item: ApplicationGatewayRewriteRuleSetPropertiesFormat, +): any { + return { + rewriteRules: !item["rewriteRules"] + ? item["rewriteRules"] + : applicationGatewayRewriteRuleArraySerializer(item["rewriteRules"]), + }; +} + +export function applicationGatewayRewriteRuleSetPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayRewriteRuleSetPropertiesFormat { + return { + rewriteRules: !item["rewriteRules"] + ? item["rewriteRules"] + : applicationGatewayRewriteRuleArrayDeserializer(item["rewriteRules"]), + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewayRewriteRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRewriteRuleSerializer(item); + }); +} + +export function applicationGatewayRewriteRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRewriteRuleDeserializer(item); + }); +} + +/** Rewrite rule of an application gateway. */ +export interface ApplicationGatewayRewriteRule { + /** Name of the rewrite rule that is unique within an Application Gateway. */ + name?: string; + /** Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet. */ + ruleSequence?: number; + /** Conditions based on which the action set execution will be evaluated. */ + conditions?: ApplicationGatewayRewriteRuleCondition[]; + /** Set of actions to be done as part of the rewrite Rule. */ + actionSet?: ApplicationGatewayRewriteRuleActionSet; +} + +export function applicationGatewayRewriteRuleSerializer(item: ApplicationGatewayRewriteRule): any { + return { + name: item["name"], + ruleSequence: item["ruleSequence"], + conditions: !item["conditions"] + ? item["conditions"] + : applicationGatewayRewriteRuleConditionArraySerializer(item["conditions"]), + actionSet: !item["actionSet"] + ? item["actionSet"] + : applicationGatewayRewriteRuleActionSetSerializer(item["actionSet"]), + }; +} + +export function applicationGatewayRewriteRuleDeserializer( + item: any, +): ApplicationGatewayRewriteRule { + return { + name: item["name"], + ruleSequence: item["ruleSequence"], + conditions: !item["conditions"] + ? item["conditions"] + : applicationGatewayRewriteRuleConditionArrayDeserializer(item["conditions"]), + actionSet: !item["actionSet"] + ? item["actionSet"] + : applicationGatewayRewriteRuleActionSetDeserializer(item["actionSet"]), + }; +} + +export function applicationGatewayRewriteRuleConditionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRewriteRuleConditionSerializer(item); + }); +} + +export function applicationGatewayRewriteRuleConditionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRewriteRuleConditionDeserializer(item); + }); +} + +/** Set of conditions in the Rewrite Rule in Application Gateway. */ +export interface ApplicationGatewayRewriteRuleCondition { + /** The condition parameter of the RewriteRuleCondition. */ + variable?: string; + /** The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition. */ + pattern?: string; + /** Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison. */ + ignoreCase?: boolean; + /** Setting this value as truth will force to check the negation of the condition given by the user. */ + negate?: boolean; +} + +export function applicationGatewayRewriteRuleConditionSerializer( + item: ApplicationGatewayRewriteRuleCondition, +): any { + return { + variable: item["variable"], + pattern: item["pattern"], + ignoreCase: item["ignoreCase"], + negate: item["negate"], + }; +} + +export function applicationGatewayRewriteRuleConditionDeserializer( + item: any, +): ApplicationGatewayRewriteRuleCondition { + return { + variable: item["variable"], + pattern: item["pattern"], + ignoreCase: item["ignoreCase"], + negate: item["negate"], + }; +} + +/** Set of actions in the Rewrite Rule in Application Gateway. */ +export interface ApplicationGatewayRewriteRuleActionSet { + /** Request Header Actions in the Action Set. */ + requestHeaderConfigurations?: ApplicationGatewayHeaderConfiguration[]; + /** Response Header Actions in the Action Set. */ + responseHeaderConfigurations?: ApplicationGatewayHeaderConfiguration[]; + /** Url Configuration Action in the Action Set. */ + urlConfiguration?: ApplicationGatewayUrlConfiguration; +} + +export function applicationGatewayRewriteRuleActionSetSerializer( + item: ApplicationGatewayRewriteRuleActionSet, +): any { + return { + requestHeaderConfigurations: !item["requestHeaderConfigurations"] + ? item["requestHeaderConfigurations"] + : applicationGatewayHeaderConfigurationArraySerializer(item["requestHeaderConfigurations"]), + responseHeaderConfigurations: !item["responseHeaderConfigurations"] + ? item["responseHeaderConfigurations"] + : applicationGatewayHeaderConfigurationArraySerializer(item["responseHeaderConfigurations"]), + urlConfiguration: !item["urlConfiguration"] + ? item["urlConfiguration"] + : applicationGatewayUrlConfigurationSerializer(item["urlConfiguration"]), + }; +} + +export function applicationGatewayRewriteRuleActionSetDeserializer( + item: any, +): ApplicationGatewayRewriteRuleActionSet { + return { + requestHeaderConfigurations: !item["requestHeaderConfigurations"] + ? item["requestHeaderConfigurations"] + : applicationGatewayHeaderConfigurationArrayDeserializer(item["requestHeaderConfigurations"]), + responseHeaderConfigurations: !item["responseHeaderConfigurations"] + ? item["responseHeaderConfigurations"] + : applicationGatewayHeaderConfigurationArrayDeserializer( + item["responseHeaderConfigurations"], + ), + urlConfiguration: !item["urlConfiguration"] + ? item["urlConfiguration"] + : applicationGatewayUrlConfigurationDeserializer(item["urlConfiguration"]), + }; +} + +export function applicationGatewayHeaderConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayHeaderConfigurationSerializer(item); + }); +} + +export function applicationGatewayHeaderConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayHeaderConfigurationDeserializer(item); + }); +} + +/** Header configuration of the Actions set in Application Gateway. */ +export interface ApplicationGatewayHeaderConfiguration { + /** Header name of the header configuration. */ + headerName?: string; + /** An optional field under "Rewrite Action". It lets you capture and modify the value(s) of a specific header when multiple headers with the same name exist. Currently supported for Set-Cookie Response header only. For more details, visit https://aka.ms/appgwheadercrud */ + headerValueMatcher?: HeaderValueMatcher; + /** Header value of the header configuration. */ + headerValue?: string; +} + +export function applicationGatewayHeaderConfigurationSerializer( + item: ApplicationGatewayHeaderConfiguration, +): any { + return { + headerName: item["headerName"], + headerValueMatcher: !item["headerValueMatcher"] + ? item["headerValueMatcher"] + : headerValueMatcherSerializer(item["headerValueMatcher"]), + headerValue: item["headerValue"], + }; +} + +export function applicationGatewayHeaderConfigurationDeserializer( + item: any, +): ApplicationGatewayHeaderConfiguration { + return { + headerName: item["headerName"], + headerValueMatcher: !item["headerValueMatcher"] + ? item["headerValueMatcher"] + : headerValueMatcherDeserializer(item["headerValueMatcher"]), + headerValue: item["headerValue"], + }; +} + +/** An optional field under "Rewrite Action". It lets you capture and modify the value(s) of a specific header when multiple headers with the same name exist. Currently supported for Set-Cookie Response header only. For more details, visit https://aka.ms/appgwheadercrud */ +export interface HeaderValueMatcher { + /** The pattern, either fixed string or regular expression, that evaluates if a header value should be selected for rewrite. */ + pattern?: string; + /** Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison. */ + ignoreCase?: boolean; + /** Setting this value as truth will force to check the negation of the condition given by the user in the pattern field. */ + negate?: boolean; +} + +export function headerValueMatcherSerializer(item: HeaderValueMatcher): any { + return { pattern: item["pattern"], ignoreCase: item["ignoreCase"], negate: item["negate"] }; +} + +export function headerValueMatcherDeserializer(item: any): HeaderValueMatcher { + return { + pattern: item["pattern"], + ignoreCase: item["ignoreCase"], + negate: item["negate"], + }; +} + +/** Url configuration of the Actions set in Application Gateway. */ +export interface ApplicationGatewayUrlConfiguration { + /** Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null. */ + modifiedPath?: string; + /** Query string which user has provided for url rewrite. Null means no query string will be updated. Default value is null. */ + modifiedQueryString?: string; + /** If set as true, it will re-evaluate the url path map provided in path based request routing rules using modified path. Default value is false. */ + reroute?: boolean; +} + +export function applicationGatewayUrlConfigurationSerializer( + item: ApplicationGatewayUrlConfiguration, +): any { + return { + modifiedPath: item["modifiedPath"], + modifiedQueryString: item["modifiedQueryString"], + reroute: item["reroute"], + }; +} + +export function applicationGatewayUrlConfigurationDeserializer( + item: any, +): ApplicationGatewayUrlConfiguration { + return { + modifiedPath: item["modifiedPath"], + modifiedQueryString: item["modifiedQueryString"], + reroute: item["reroute"], + }; +} + +export function applicationGatewayRedirectConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRedirectConfigurationSerializer(item); + }); +} + +export function applicationGatewayRedirectConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayRedirectConfigurationDeserializer(item); + }); +} + +/** Redirect configuration of an application gateway. */ +export interface ApplicationGatewayRedirectConfiguration extends SubResource { + /** Name of the redirect configuration that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** HTTP redirection type. */ + redirectType?: ApplicationGatewayRedirectType; + /** Reference to a listener to redirect the request to. */ + targetListener?: SubResource; + /** Url to redirect the request to. */ + targetUrl?: string; + /** Include path in the redirected url. */ + includePath?: boolean; + /** Include query string in the redirected url. */ + includeQueryString?: boolean; + /** Request routing specifying redirect configuration. */ + requestRoutingRules?: SubResource[]; + /** Url path maps specifying default redirect configuration. */ + urlPathMaps?: SubResource[]; + /** Path rules specifying redirect configuration. */ + pathRules?: SubResource[]; +} + +export function applicationGatewayRedirectConfigurationSerializer( + item: ApplicationGatewayRedirectConfiguration, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "redirectType", + "targetListener", + "targetUrl", + "includePath", + "includeQueryString", + "requestRoutingRules", + "urlPathMaps", + "pathRules", + ]) + ? undefined + : _applicationGatewayRedirectConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayRedirectConfigurationDeserializer( + item: any, +): ApplicationGatewayRedirectConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayRedirectConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of redirect configuration of the application gateway. */ +export interface ApplicationGatewayRedirectConfigurationPropertiesFormat { + /** HTTP redirection type. */ + redirectType?: ApplicationGatewayRedirectType; + /** Reference to a listener to redirect the request to. */ + targetListener?: SubResource; + /** Url to redirect the request to. */ + targetUrl?: string; + /** Include path in the redirected url. */ + includePath?: boolean; + /** Include query string in the redirected url. */ + includeQueryString?: boolean; + /** Request routing specifying redirect configuration. */ + requestRoutingRules?: SubResource[]; + /** Url path maps specifying default redirect configuration. */ + urlPathMaps?: SubResource[]; + /** Path rules specifying redirect configuration. */ + pathRules?: SubResource[]; +} + +export function applicationGatewayRedirectConfigurationPropertiesFormatSerializer( + item: ApplicationGatewayRedirectConfigurationPropertiesFormat, +): any { + return { + redirectType: item["redirectType"], + targetListener: !item["targetListener"] + ? item["targetListener"] + : subResourceSerializer(item["targetListener"]), + targetUrl: item["targetUrl"], + includePath: item["includePath"], + includeQueryString: item["includeQueryString"], + requestRoutingRules: !item["requestRoutingRules"] + ? item["requestRoutingRules"] + : subResourceArraySerializer(item["requestRoutingRules"]), + urlPathMaps: !item["urlPathMaps"] + ? item["urlPathMaps"] + : subResourceArraySerializer(item["urlPathMaps"]), + pathRules: !item["pathRules"] + ? item["pathRules"] + : subResourceArraySerializer(item["pathRules"]), + }; +} + +export function applicationGatewayRedirectConfigurationPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayRedirectConfigurationPropertiesFormat { + return { + redirectType: item["redirectType"], + targetListener: !item["targetListener"] + ? item["targetListener"] + : subResourceDeserializer(item["targetListener"]), + targetUrl: item["targetUrl"], + includePath: item["includePath"], + includeQueryString: item["includeQueryString"], + requestRoutingRules: !item["requestRoutingRules"] + ? item["requestRoutingRules"] + : subResourceArrayDeserializer(item["requestRoutingRules"]), + urlPathMaps: !item["urlPathMaps"] + ? item["urlPathMaps"] + : subResourceArrayDeserializer(item["urlPathMaps"]), + pathRules: !item["pathRules"] + ? item["pathRules"] + : subResourceArrayDeserializer(item["pathRules"]), + }; +} + +/** Redirect type enum. */ +export enum KnownApplicationGatewayRedirectType { + /** Permanent */ + Permanent = "Permanent", + /** Found */ + Found = "Found", + /** SeeOther */ + SeeOther = "SeeOther", + /** Temporary */ + Temporary = "Temporary", +} + +/** + * Redirect type enum. \ + * {@link KnownApplicationGatewayRedirectType} can be used interchangeably with ApplicationGatewayRedirectType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Permanent**: Permanent \ + * **Found**: Found \ + * **SeeOther**: SeeOther \ + * **Temporary**: Temporary + */ +export type ApplicationGatewayRedirectType = string; + +/** Application gateway web application firewall configuration. */ +export interface ApplicationGatewayWebApplicationFirewallConfiguration { + /** Whether the web application firewall is enabled or not. */ + enabled: boolean; + /** Web application firewall mode. */ + firewallMode: ApplicationGatewayFirewallMode; + /** The type of the web application firewall rule set. Possible values are: 'OWASP'. */ + ruleSetType: string; + /** The version of the rule set type. */ + ruleSetVersion: string; + /** The disabled rule groups. */ + disabledRuleGroups?: ApplicationGatewayFirewallDisabledRuleGroup[]; + /** Whether allow WAF to check request Body. */ + requestBodyCheck?: boolean; + /** Maximum request body size for WAF. */ + maxRequestBodySize?: number; + /** Maximum request body size in Kb for WAF. */ + maxRequestBodySizeInKb?: number; + /** Maximum file upload size in Mb for WAF. */ + fileUploadLimitInMb?: number; + /** The exclusion list. */ + exclusions?: ApplicationGatewayFirewallExclusion[]; +} + +export function applicationGatewayWebApplicationFirewallConfigurationSerializer( + item: ApplicationGatewayWebApplicationFirewallConfiguration, +): any { + return { + enabled: item["enabled"], + firewallMode: item["firewallMode"], + ruleSetType: item["ruleSetType"], + ruleSetVersion: item["ruleSetVersion"], + disabledRuleGroups: !item["disabledRuleGroups"] + ? item["disabledRuleGroups"] + : applicationGatewayFirewallDisabledRuleGroupArraySerializer(item["disabledRuleGroups"]), + requestBodyCheck: item["requestBodyCheck"], + maxRequestBodySize: item["maxRequestBodySize"], + maxRequestBodySizeInKb: item["maxRequestBodySizeInKb"], + fileUploadLimitInMb: item["fileUploadLimitInMb"], + exclusions: !item["exclusions"] + ? item["exclusions"] + : applicationGatewayFirewallExclusionArraySerializer(item["exclusions"]), + }; +} + +export function applicationGatewayWebApplicationFirewallConfigurationDeserializer( + item: any, +): ApplicationGatewayWebApplicationFirewallConfiguration { + return { + enabled: item["enabled"], + firewallMode: item["firewallMode"], + ruleSetType: item["ruleSetType"], + ruleSetVersion: item["ruleSetVersion"], + disabledRuleGroups: !item["disabledRuleGroups"] + ? item["disabledRuleGroups"] + : applicationGatewayFirewallDisabledRuleGroupArrayDeserializer(item["disabledRuleGroups"]), + requestBodyCheck: item["requestBodyCheck"], + maxRequestBodySize: item["maxRequestBodySize"], + maxRequestBodySizeInKb: item["maxRequestBodySizeInKb"], + fileUploadLimitInMb: item["fileUploadLimitInMb"], + exclusions: !item["exclusions"] + ? item["exclusions"] + : applicationGatewayFirewallExclusionArrayDeserializer(item["exclusions"]), + }; +} + +/** Web application firewall mode. */ +export enum KnownApplicationGatewayFirewallMode { + /** Detection */ + Detection = "Detection", + /** Prevention */ + Prevention = "Prevention", +} + +/** + * Web application firewall mode. \ + * {@link KnownApplicationGatewayFirewallMode} can be used interchangeably with ApplicationGatewayFirewallMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Detection**: Detection \ + * **Prevention**: Prevention + */ +export type ApplicationGatewayFirewallMode = string; + +export function applicationGatewayFirewallDisabledRuleGroupArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFirewallDisabledRuleGroupSerializer(item); + }); +} + +export function applicationGatewayFirewallDisabledRuleGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFirewallDisabledRuleGroupDeserializer(item); + }); +} + +/** Allows to disable rules within a rule group or an entire rule group. */ +export interface ApplicationGatewayFirewallDisabledRuleGroup { + /** The name of the rule group that will be disabled. */ + ruleGroupName: string; + /** The list of rules that will be disabled. If null, all rules of the rule group will be disabled. */ + rules?: number[]; +} + +export function applicationGatewayFirewallDisabledRuleGroupSerializer( + item: ApplicationGatewayFirewallDisabledRuleGroup, +): any { + return { + ruleGroupName: item["ruleGroupName"], + rules: !item["rules"] + ? item["rules"] + : item["rules"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewayFirewallDisabledRuleGroupDeserializer( + item: any, +): ApplicationGatewayFirewallDisabledRuleGroup { + return { + ruleGroupName: item["ruleGroupName"], + rules: !item["rules"] + ? item["rules"] + : item["rules"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewayFirewallExclusionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFirewallExclusionSerializer(item); + }); +} + +export function applicationGatewayFirewallExclusionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFirewallExclusionDeserializer(item); + }); +} + +/** Allow to exclude some variable satisfy the condition for the WAF check. */ +export interface ApplicationGatewayFirewallExclusion { + /** The variable to be excluded. */ + matchVariable: string; + /** When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. */ + selectorMatchOperator: string; + /** When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. */ + selector: string; +} + +export function applicationGatewayFirewallExclusionSerializer( + item: ApplicationGatewayFirewallExclusion, +): any { + return { + matchVariable: item["matchVariable"], + selectorMatchOperator: item["selectorMatchOperator"], + selector: item["selector"], + }; +} + +export function applicationGatewayFirewallExclusionDeserializer( + item: any, +): ApplicationGatewayFirewallExclusion { + return { + matchVariable: item["matchVariable"], + selectorMatchOperator: item["selectorMatchOperator"], + selector: item["selector"], + }; +} + +/** Application Gateway autoscale configuration. */ +export interface ApplicationGatewayAutoscaleConfiguration { + /** Lower bound on number of Application Gateway capacity. */ + minCapacity: number; + /** Upper bound on number of Application Gateway capacity. */ + maxCapacity?: number; +} + +export function applicationGatewayAutoscaleConfigurationSerializer( + item: ApplicationGatewayAutoscaleConfiguration, +): any { + return { minCapacity: item["minCapacity"], maxCapacity: item["maxCapacity"] }; +} + +export function applicationGatewayAutoscaleConfigurationDeserializer( + item: any, +): ApplicationGatewayAutoscaleConfiguration { + return { + minCapacity: item["minCapacity"], + maxCapacity: item["maxCapacity"], + }; +} + +export function applicationGatewayPrivateLinkConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayPrivateLinkConfigurationSerializer(item); + }); +} + +export function applicationGatewayPrivateLinkConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayPrivateLinkConfigurationDeserializer(item); + }); +} + +/** Private Link Configuration on an application gateway. */ +export interface ApplicationGatewayPrivateLinkConfiguration extends SubResource { + /** Name of the private link configuration that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** An array of application gateway private link ip configurations. */ + ipConfigurations?: ApplicationGatewayPrivateLinkIpConfiguration[]; + /** The provisioning state of the application gateway private link configuration. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayPrivateLinkConfigurationSerializer( + item: ApplicationGatewayPrivateLinkConfiguration, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["ipConfigurations"]) + ? undefined + : _applicationGatewayPrivateLinkConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayPrivateLinkConfigurationDeserializer( + item: any, +): ApplicationGatewayPrivateLinkConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayPrivateLinkConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of private link configuration on an application gateway. */ +export interface ApplicationGatewayPrivateLinkConfigurationProperties { + /** An array of application gateway private link ip configurations. */ + ipConfigurations?: ApplicationGatewayPrivateLinkIpConfiguration[]; + /** The provisioning state of the application gateway private link configuration. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayPrivateLinkConfigurationPropertiesSerializer( + item: ApplicationGatewayPrivateLinkConfigurationProperties, +): any { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : applicationGatewayPrivateLinkIpConfigurationArraySerializer(item["ipConfigurations"]), + }; +} + +export function applicationGatewayPrivateLinkConfigurationPropertiesDeserializer( + item: any, +): ApplicationGatewayPrivateLinkConfigurationProperties { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : applicationGatewayPrivateLinkIpConfigurationArrayDeserializer(item["ipConfigurations"]), + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewayPrivateLinkIpConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayPrivateLinkIpConfigurationSerializer(item); + }); +} + +export function applicationGatewayPrivateLinkIpConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayPrivateLinkIpConfigurationDeserializer(item); + }); +} + +/** The application gateway private link ip configuration. */ +export interface ApplicationGatewayPrivateLinkIpConfiguration extends SubResource { + /** The name of application gateway private link ip configuration. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The resource type. */ + readonly type?: string; + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** Reference to the subnet resource. */ + subnet?: SubResource; + /** Whether the ip configuration is primary or not. */ + primary?: boolean; + /** The provisioning state of the application gateway private link IP configuration. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayPrivateLinkIpConfigurationSerializer( + item: ApplicationGatewayPrivateLinkIpConfiguration, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "privateIPAddress", + "privateIPAllocationMethod", + "subnet", + "primary", + ]) + ? undefined + : _applicationGatewayPrivateLinkIpConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayPrivateLinkIpConfigurationDeserializer( + item: any, +): ApplicationGatewayPrivateLinkIpConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayPrivateLinkIpConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of an application gateway private link IP configuration. */ +export interface ApplicationGatewayPrivateLinkIpConfigurationProperties { + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** Reference to the subnet resource. */ + subnet?: SubResource; + /** Whether the ip configuration is primary or not. */ + primary?: boolean; + /** The provisioning state of the application gateway private link IP configuration. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayPrivateLinkIpConfigurationPropertiesSerializer( + item: ApplicationGatewayPrivateLinkIpConfigurationProperties, +): any { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + primary: item["primary"], + }; +} + +export function applicationGatewayPrivateLinkIpConfigurationPropertiesDeserializer( + item: any, +): ApplicationGatewayPrivateLinkIpConfigurationProperties { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + primary: item["primary"], + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewayPrivateEndpointConnectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayPrivateEndpointConnectionSerializer(item); + }); +} + +export function applicationGatewayPrivateEndpointConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayPrivateEndpointConnectionDeserializer(item); + }); +} + +/** Private Endpoint connection on an application gateway. */ +export interface ApplicationGatewayPrivateEndpointConnection extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The resource of private end point. */ + readonly privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** The provisioning state of the application gateway private endpoint connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The consumer link id. */ + readonly linkIdentifier?: string; +} + +export function applicationGatewayPrivateEndpointConnectionSerializer( + item: ApplicationGatewayPrivateEndpointConnection, +): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["privateLinkServiceConnectionState"]) + ? undefined + : _applicationGatewayPrivateEndpointConnectionPropertiesSerializer(item), + }; +} + +export function applicationGatewayPrivateEndpointConnectionDeserializer( + item: any, +): ApplicationGatewayPrivateEndpointConnection { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayPrivateEndpointConnectionPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of Private Link Resource of an application gateway. */ +export interface ApplicationGatewayPrivateEndpointConnectionProperties { + /** The resource of private end point. */ + readonly privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** The provisioning state of the application gateway private endpoint connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The consumer link id. */ + readonly linkIdentifier?: string; +} + +export function applicationGatewayPrivateEndpointConnectionPropertiesSerializer( + item: ApplicationGatewayPrivateEndpointConnectionProperties, +): any { + return { + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateSerializer(item["privateLinkServiceConnectionState"]), + }; +} + +export function applicationGatewayPrivateEndpointConnectionPropertiesDeserializer( + item: any, +): ApplicationGatewayPrivateEndpointConnectionProperties { + return { + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : privateEndpointDeserializer(item["privateEndpoint"]), + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateDeserializer(item["privateLinkServiceConnectionState"]), + provisioningState: item["provisioningState"], + linkIdentifier: item["linkIdentifier"], + }; +} + +export function applicationGatewayLoadDistributionPolicyArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayLoadDistributionPolicySerializer(item); + }); +} + +export function applicationGatewayLoadDistributionPolicyArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayLoadDistributionPolicyDeserializer(item); + }); +} + +/** Load Distribution Policy of an application gateway. */ +export interface ApplicationGatewayLoadDistributionPolicy extends SubResource { + /** Name of the load distribution policy that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Load Distribution Targets resource of an application gateway. */ + loadDistributionTargets?: ApplicationGatewayLoadDistributionTarget[]; + /** Load Distribution Targets resource of an application gateway. */ + loadDistributionAlgorithm?: ApplicationGatewayLoadDistributionAlgorithm; + /** The provisioning state of the Load Distribution Policy resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayLoadDistributionPolicySerializer( + item: ApplicationGatewayLoadDistributionPolicy, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["loadDistributionTargets", "loadDistributionAlgorithm"]) + ? undefined + : _applicationGatewayLoadDistributionPolicyPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayLoadDistributionPolicyDeserializer( + item: any, +): ApplicationGatewayLoadDistributionPolicy { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayLoadDistributionPolicyPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of Load Distribution Policy of an application gateway. */ +export interface ApplicationGatewayLoadDistributionPolicyPropertiesFormat { + /** Load Distribution Targets resource of an application gateway. */ + loadDistributionTargets?: ApplicationGatewayLoadDistributionTarget[]; + /** Load Distribution Targets resource of an application gateway. */ + loadDistributionAlgorithm?: ApplicationGatewayLoadDistributionAlgorithm; + /** The provisioning state of the Load Distribution Policy resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayLoadDistributionPolicyPropertiesFormatSerializer( + item: ApplicationGatewayLoadDistributionPolicyPropertiesFormat, +): any { + return { + loadDistributionTargets: !item["loadDistributionTargets"] + ? item["loadDistributionTargets"] + : applicationGatewayLoadDistributionTargetArraySerializer(item["loadDistributionTargets"]), + loadDistributionAlgorithm: item["loadDistributionAlgorithm"], + }; +} + +export function applicationGatewayLoadDistributionPolicyPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayLoadDistributionPolicyPropertiesFormat { + return { + loadDistributionTargets: !item["loadDistributionTargets"] + ? item["loadDistributionTargets"] + : applicationGatewayLoadDistributionTargetArrayDeserializer(item["loadDistributionTargets"]), + loadDistributionAlgorithm: item["loadDistributionAlgorithm"], + provisioningState: item["provisioningState"], + }; +} + +export function applicationGatewayLoadDistributionTargetArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayLoadDistributionTargetSerializer(item); + }); +} + +export function applicationGatewayLoadDistributionTargetArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayLoadDistributionTargetDeserializer(item); + }); +} + +/** Load Distribution Target of an application gateway. */ +export interface ApplicationGatewayLoadDistributionTarget extends SubResource { + /** Name of the load distribution policy that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Weight per server. Range between 1 and 100. */ + weightPerServer?: number; + /** Backend address pool resource of the application gateway. */ + backendAddressPool?: SubResource; +} + +export function applicationGatewayLoadDistributionTargetSerializer( + item: ApplicationGatewayLoadDistributionTarget, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["weightPerServer", "backendAddressPool"]) + ? undefined + : _applicationGatewayLoadDistributionTargetPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayLoadDistributionTargetDeserializer( + item: any, +): ApplicationGatewayLoadDistributionTarget { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayLoadDistributionTargetPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** model interface ApplicationGatewayLoadDistributionTargetPropertiesFormat */ +export interface ApplicationGatewayLoadDistributionTargetPropertiesFormat { + /** Weight per server. Range between 1 and 100. */ + weightPerServer?: number; + /** Backend address pool resource of the application gateway. */ + backendAddressPool?: SubResource; +} + +export function applicationGatewayLoadDistributionTargetPropertiesFormatSerializer( + item: ApplicationGatewayLoadDistributionTargetPropertiesFormat, +): any { + return { + weightPerServer: item["weightPerServer"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + }; +} + +export function applicationGatewayLoadDistributionTargetPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayLoadDistributionTargetPropertiesFormat { + return { + weightPerServer: item["weightPerServer"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + }; +} + +/** Load Distribution Algorithm enums. */ +export enum KnownApplicationGatewayLoadDistributionAlgorithm { + /** RoundRobin */ + RoundRobin = "RoundRobin", + /** LeastConnections */ + LeastConnections = "LeastConnections", + /** IpHash */ + IpHash = "IpHash", +} + +/** + * Load Distribution Algorithm enums. \ + * {@link KnownApplicationGatewayLoadDistributionAlgorithm} can be used interchangeably with ApplicationGatewayLoadDistributionAlgorithm, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RoundRobin**: RoundRobin \ + * **LeastConnections**: LeastConnections \ + * **IpHash**: IpHash + */ +export type ApplicationGatewayLoadDistributionAlgorithm = string; + +export function applicationGatewayEntraJWTValidationConfigArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayEntraJWTValidationConfigSerializer(item); + }); +} + +export function applicationGatewayEntraJWTValidationConfigArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayEntraJWTValidationConfigDeserializer(item); + }); +} + +/** Entra JWT Validation Configuration of an application gateway. */ +export interface ApplicationGatewayEntraJWTValidationConfig extends SubResource { + /** Name of the entra jwt validation configuration that is unique within an application gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Unauthorized request action. */ + unAuthorizedRequestAction?: ApplicationGatewayUnAuthorizedRequestAction; + /** The Tenant ID of the Microsoft Entra ID application. */ + tenantId?: string; + /** The Client ID of the Microsoft Entra ID application. */ + clientId?: string; + /** List of acceptable audience claims that can be present in the token (aud claim). A maximum of 5 audiences are permitted. */ + audiences?: string[]; + /** The provisioning state of the entra jwt validation configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayEntraJWTValidationConfigSerializer( + item: ApplicationGatewayEntraJWTValidationConfig, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "unAuthorizedRequestAction", + "tenantId", + "clientId", + "audiences", + ]) + ? undefined + : _applicationGatewayEntraJWTValidationConfigPropertiesSerializer(item), + name: item["name"], + }; +} + +export function applicationGatewayEntraJWTValidationConfigDeserializer( + item: any, +): ApplicationGatewayEntraJWTValidationConfig { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayEntraJWTValidationConfigPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of entra jwt validation configuration of the application gateway. */ +export interface ApplicationGatewayEntraJWTValidationConfigPropertiesFormat { + /** Unauthorized request action. */ + unAuthorizedRequestAction?: ApplicationGatewayUnAuthorizedRequestAction; + /** The Tenant ID of the Microsoft Entra ID application. */ + tenantId?: string; + /** The Client ID of the Microsoft Entra ID application. */ + clientId?: string; + /** List of acceptable audience claims that can be present in the token (aud claim). A maximum of 5 audiences are permitted. */ + audiences?: string[]; + /** The provisioning state of the entra jwt validation configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function applicationGatewayEntraJWTValidationConfigPropertiesFormatSerializer( + item: ApplicationGatewayEntraJWTValidationConfigPropertiesFormat, +): any { + return { + unAuthorizedRequestAction: item["unAuthorizedRequestAction"], + tenantId: item["tenantId"], + clientId: item["clientId"], + audiences: !item["audiences"] + ? item["audiences"] + : item["audiences"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewayEntraJWTValidationConfigPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayEntraJWTValidationConfigPropertiesFormat { + return { + unAuthorizedRequestAction: item["unAuthorizedRequestAction"], + tenantId: item["tenantId"], + clientId: item["clientId"], + audiences: !item["audiences"] + ? item["audiences"] + : item["audiences"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +/** Unauthorized request action. */ +export enum KnownApplicationGatewayUnAuthorizedRequestAction { + /** Deny */ + Deny = "Deny", + /** Allow */ + Allow = "Allow", +} + +/** + * Unauthorized request action. \ + * {@link KnownApplicationGatewayUnAuthorizedRequestAction} can be used interchangeably with ApplicationGatewayUnAuthorizedRequestAction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Deny**: Deny \ + * **Allow**: Allow + */ +export type ApplicationGatewayUnAuthorizedRequestAction = string; + +/** Application Gateway global configuration. */ +export interface ApplicationGatewayGlobalConfiguration { + /** Enable request buffering. */ + enableRequestBuffering?: boolean; + /** Enable response buffering. */ + enableResponseBuffering?: boolean; +} + +export function applicationGatewayGlobalConfigurationSerializer( + item: ApplicationGatewayGlobalConfiguration, +): any { + return { + enableRequestBuffering: item["enableRequestBuffering"], + enableResponseBuffering: item["enableResponseBuffering"], + }; +} + +export function applicationGatewayGlobalConfigurationDeserializer( + item: any, +): ApplicationGatewayGlobalConfiguration { + return { + enableRequestBuffering: item["enableRequestBuffering"], + enableResponseBuffering: item["enableResponseBuffering"], + }; +} + +/** Tags object for patch operations. */ +export interface TagsObject { + /** Resource tags. */ + tags?: Record; +} + +export function tagsObjectSerializer(item: TagsObject): any { + return { tags: item["tags"] }; +} + +export function applicationGatewayArraySerializer(result: Array): any[] { + return result.map((item) => { + return applicationGatewaySerializer(item); + }); +} + +export function applicationGatewayArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return applicationGatewayDeserializer(item); + }); +} + +/** Response for ApplicationGatewayBackendHealth API service call. */ +export interface ApplicationGatewayBackendHealth { + /** A list of ApplicationGatewayBackendHealthPool resources. */ + backendAddressPools?: ApplicationGatewayBackendHealthPool[]; +} + +export function applicationGatewayBackendHealthDeserializer( + item: any, +): ApplicationGatewayBackendHealth { + return { + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : applicationGatewayBackendHealthPoolArrayDeserializer(item["backendAddressPools"]), + }; +} + +export function applicationGatewayBackendHealthPoolArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayBackendHealthPoolDeserializer(item); + }); +} + +/** Application gateway BackendHealth pool. */ +export interface ApplicationGatewayBackendHealthPool { + /** Reference to an ApplicationGatewayBackendAddressPool resource. */ + backendAddressPool?: ApplicationGatewayBackendAddressPool; + /** List of ApplicationGatewayBackendHealthHttpSettings resources. */ + backendHttpSettingsCollection?: ApplicationGatewayBackendHealthHttpSettings[]; +} + +export function applicationGatewayBackendHealthPoolDeserializer( + item: any, +): ApplicationGatewayBackendHealthPool { + return { + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : applicationGatewayBackendAddressPoolDeserializer(item["backendAddressPool"]), + backendHttpSettingsCollection: !item["backendHttpSettingsCollection"] + ? item["backendHttpSettingsCollection"] + : applicationGatewayBackendHealthHttpSettingsArrayDeserializer( + item["backendHttpSettingsCollection"], + ), + }; +} + +export function applicationGatewayBackendHealthHttpSettingsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayBackendHealthHttpSettingsDeserializer(item); + }); +} + +/** Application gateway BackendHealthHttp settings. */ +export interface ApplicationGatewayBackendHealthHttpSettings { + /** Reference to an ApplicationGatewayBackendHttpSettings resource. */ + backendHttpSettings?: ApplicationGatewayBackendHttpSettings; + /** List of ApplicationGatewayBackendHealthServer resources. */ + servers?: ApplicationGatewayBackendHealthServer[]; +} + +export function applicationGatewayBackendHealthHttpSettingsDeserializer( + item: any, +): ApplicationGatewayBackendHealthHttpSettings { + return { + backendHttpSettings: !item["backendHttpSettings"] + ? item["backendHttpSettings"] + : applicationGatewayBackendHttpSettingsDeserializer(item["backendHttpSettings"]), + servers: !item["servers"] + ? item["servers"] + : applicationGatewayBackendHealthServerArrayDeserializer(item["servers"]), + }; +} + +export function applicationGatewayBackendHealthServerArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayBackendHealthServerDeserializer(item); + }); +} + +/** Application gateway backendhealth http settings. */ +export interface ApplicationGatewayBackendHealthServer { + /** IP address or FQDN of backend server. */ + address?: string; + /** Reference to IP configuration of backend server. */ + ipConfiguration?: NetworkInterfaceIPConfiguration; + /** Health of backend server. */ + health?: ApplicationGatewayBackendHealthServerHealth; + /** Health Probe Log. */ + healthProbeLog?: string; +} + +export function applicationGatewayBackendHealthServerDeserializer( + item: any, +): ApplicationGatewayBackendHealthServer { + return { + address: item["address"], + ipConfiguration: !item["ipConfiguration"] + ? item["ipConfiguration"] + : networkInterfaceIPConfigurationDeserializer(item["ipConfiguration"]), + health: item["health"], + healthProbeLog: item["healthProbeLog"], + }; +} + +/** Health of backend server. */ +export enum KnownApplicationGatewayBackendHealthServerHealth { + /** Unknown */ + Unknown = "Unknown", + /** Up */ + Up = "Up", + /** Down */ + Down = "Down", + /** Partial */ + Partial = "Partial", + /** Draining */ + Draining = "Draining", +} + +/** + * Health of backend server. \ + * {@link KnownApplicationGatewayBackendHealthServerHealth} can be used interchangeably with ApplicationGatewayBackendHealthServerHealth, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **Up**: Up \ + * **Down**: Down \ + * **Partial**: Partial \ + * **Draining**: Draining + */ +export type ApplicationGatewayBackendHealthServerHealth = string; + +/** Details of on demand test probe request. */ +export interface ApplicationGatewayOnDemandProbe { + /** The protocol used for the probe. */ + protocol?: ApplicationGatewayProtocol; + /** Host name to send the probe to. */ + host?: string; + /** Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. */ + path?: string; + /** The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. */ + timeout?: number; + /** Whether the host header should be picked from the backend http settings. Default value is false. */ + pickHostNameFromBackendHttpSettings?: boolean; + /** Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false. */ + enableProbeProxyProtocolHeader?: boolean; + /** Criterion for classifying a healthy probe response. */ + match?: ApplicationGatewayProbeHealthResponseMatch; + /** Reference to backend pool of application gateway to which probe request will be sent. */ + backendAddressPool?: SubResource; + /** Reference to backend http setting of application gateway to be used for test probe. */ + backendHttpSettings?: SubResource; +} + +export function applicationGatewayOnDemandProbeSerializer( + item: ApplicationGatewayOnDemandProbe, +): any { + return { + protocol: item["protocol"], + host: item["host"], + path: item["path"], + timeout: item["timeout"], + pickHostNameFromBackendHttpSettings: item["pickHostNameFromBackendHttpSettings"], + enableProbeProxyProtocolHeader: item["enableProbeProxyProtocolHeader"], + match: !item["match"] + ? item["match"] + : applicationGatewayProbeHealthResponseMatchSerializer(item["match"]), + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + backendHttpSettings: !item["backendHttpSettings"] + ? item["backendHttpSettings"] + : subResourceSerializer(item["backendHttpSettings"]), + }; +} + +/** Result of on demand test probe. */ +export interface ApplicationGatewayBackendHealthOnDemand { + /** Reference to an ApplicationGatewayBackendAddressPool resource. */ + backendAddressPool?: ApplicationGatewayBackendAddressPool; + /** Application gateway BackendHealthHttp settings. */ + backendHealthHttpSettings?: ApplicationGatewayBackendHealthHttpSettings; +} + +export function applicationGatewayBackendHealthOnDemandDeserializer( + item: any, +): ApplicationGatewayBackendHealthOnDemand { + return { + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : applicationGatewayBackendAddressPoolDeserializer(item["backendAddressPool"]), + backendHealthHttpSettings: !item["backendHealthHttpSettings"] + ? item["backendHealthHttpSettings"] + : applicationGatewayBackendHealthHttpSettingsDeserializer(item["backendHealthHttpSettings"]), + }; +} + +/** Response for ApplicationGatewayAvailableSslOptions API service call. */ +export interface ApplicationGatewayAvailableSslOptions extends Resource { + /** List of available Ssl predefined policy. */ + predefinedPolicies?: SubResource[]; + /** Name of the Ssl predefined policy applied by default to application gateway. */ + defaultPolicy?: ApplicationGatewaySslPolicyName; + /** List of available Ssl cipher suites. */ + availableCipherSuites?: ApplicationGatewaySslCipherSuite[]; + /** List of available Ssl protocols. */ + availableProtocols?: ApplicationGatewaySslProtocol[]; +} + +export function applicationGatewayAvailableSslOptionsDeserializer( + item: any, +): ApplicationGatewayAvailableSslOptions { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayAvailableSslOptionsPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of ApplicationGatewayAvailableSslOptions. */ +export interface ApplicationGatewayAvailableSslOptionsPropertiesFormat { + /** List of available Ssl predefined policy. */ + predefinedPolicies?: SubResource[]; + /** Name of the Ssl predefined policy applied by default to application gateway. */ + defaultPolicy?: ApplicationGatewaySslPolicyName; + /** List of available Ssl cipher suites. */ + availableCipherSuites?: ApplicationGatewaySslCipherSuite[]; + /** List of available Ssl protocols. */ + availableProtocols?: ApplicationGatewaySslProtocol[]; +} + +export function applicationGatewayAvailableSslOptionsPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayAvailableSslOptionsPropertiesFormat { + return { + predefinedPolicies: !item["predefinedPolicies"] + ? item["predefinedPolicies"] + : subResourceArrayDeserializer(item["predefinedPolicies"]), + defaultPolicy: item["defaultPolicy"], + availableCipherSuites: !item["availableCipherSuites"] + ? item["availableCipherSuites"] + : item["availableCipherSuites"].map((p: any) => { + return p; + }), + availableProtocols: !item["availableProtocols"] + ? item["availableProtocols"] + : item["availableProtocols"].map((p: any) => { + return p; + }), + }; +} + +/** Response for ApplicationGatewayAvailableSslOptions API service call. */ +export interface _ApplicationGatewayAvailableSslPredefinedPolicies { + /** The ApplicationGatewaySslPredefinedPolicy items on this page */ + value: ApplicationGatewaySslPredefinedPolicy[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _applicationGatewayAvailableSslPredefinedPoliciesDeserializer( + item: any, +): _ApplicationGatewayAvailableSslPredefinedPolicies { + return { + value: applicationGatewaySslPredefinedPolicyArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function applicationGatewaySslPredefinedPolicyArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewaySslPredefinedPolicyDeserializer(item); + }); +} + +/** An Ssl predefined policy. */ +export interface ApplicationGatewaySslPredefinedPolicy extends SubResource { + /** Name of the Ssl predefined policy. */ + name?: string; + /** Ssl cipher suites to be enabled in the specified order for application gateway. */ + cipherSuites?: ApplicationGatewaySslCipherSuite[]; + /** Minimum version of Ssl protocol to be supported on application gateway. */ + minProtocolVersion?: ApplicationGatewaySslProtocol; +} + +export function applicationGatewaySslPredefinedPolicyDeserializer( + item: any, +): ApplicationGatewaySslPredefinedPolicy { + return { + id: item["id"], + name: item["name"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewaySslPredefinedPolicyPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of ApplicationGatewaySslPredefinedPolicy. */ +export interface ApplicationGatewaySslPredefinedPolicyPropertiesFormat { + /** Ssl cipher suites to be enabled in the specified order for application gateway. */ + cipherSuites?: ApplicationGatewaySslCipherSuite[]; + /** Minimum version of Ssl protocol to be supported on application gateway. */ + minProtocolVersion?: ApplicationGatewaySslProtocol; +} + +export function applicationGatewaySslPredefinedPolicyPropertiesFormatDeserializer( + item: any, +): ApplicationGatewaySslPredefinedPolicyPropertiesFormat { + return { + cipherSuites: !item["cipherSuites"] + ? item["cipherSuites"] + : item["cipherSuites"].map((p: any) => { + return p; + }), + minProtocolVersion: item["minProtocolVersion"], + }; +} + +/** Common error representation. */ +export interface ErrorModel { + /** Error code. */ + code?: string; + /** Error message. */ + message?: string; + /** Error target. */ + target?: string; + /** Error details. */ + details?: ErrorDetails[]; + /** Inner error message. */ + innerError?: string; +} + +export function errorDeserializer(item: any): ErrorModel { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] ? item["details"] : errorDetailsArrayDeserializer(item["details"]), + innerError: item["innerError"], + }; +} + +export function errorDetailsArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorDetailsDeserializer(item); + }); +} + +/** Common error details representation. */ +export interface ErrorDetails { + /** Error code. */ + code?: string; + /** Error target. */ + target?: string; + /** Error message. */ + message?: string; +} + +export function errorDetailsDeserializer(item: any): ErrorDetails { + return { + code: item["code"], + target: item["target"], + message: item["message"], + }; +} + +/** Response for ApplicationGatewayAvailableWafRuleSets API service call. */ +export interface ApplicationGatewayAvailableWafRuleSetsResult { + /** The list of application gateway rule sets. */ + value?: ApplicationGatewayFirewallRuleSet[]; +} + +export function applicationGatewayAvailableWafRuleSetsResultDeserializer( + item: any, +): ApplicationGatewayAvailableWafRuleSetsResult { + return { + value: !item["value"] + ? item["value"] + : applicationGatewayFirewallRuleSetArrayDeserializer(item["value"]), + }; +} + +export function applicationGatewayFirewallRuleSetArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFirewallRuleSetDeserializer(item); + }); +} + +/** A web application firewall rule set. */ +export interface ApplicationGatewayFirewallRuleSet extends Resource { + /** The provisioning state of the web application firewall rule set. */ + readonly provisioningState?: CommonProvisioningState; + /** The type of the web application firewall rule set. */ + ruleSetType?: string; + /** The version of the web application firewall rule set type. */ + ruleSetVersion?: string; + /** The rule groups of the web application firewall rule set. */ + ruleGroups?: ApplicationGatewayFirewallRuleGroup[]; + /** Tier of an application gateway that support the rule set. */ + tiers?: ApplicationGatewayTierTypes[]; +} + +export function applicationGatewayFirewallRuleSetDeserializer( + item: any, +): ApplicationGatewayFirewallRuleSet { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayFirewallRuleSetPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of the web application firewall rule set. */ +export interface ApplicationGatewayFirewallRuleSetPropertiesFormat { + /** The provisioning state of the web application firewall rule set. */ + readonly provisioningState?: CommonProvisioningState; + /** The type of the web application firewall rule set. */ + ruleSetType: string; + /** The version of the web application firewall rule set type. */ + ruleSetVersion: string; + /** The rule groups of the web application firewall rule set. */ + ruleGroups: ApplicationGatewayFirewallRuleGroup[]; + /** Tier of an application gateway that support the rule set. */ + tiers?: ApplicationGatewayTierTypes[]; +} + +export function applicationGatewayFirewallRuleSetPropertiesFormatDeserializer( + item: any, +): ApplicationGatewayFirewallRuleSetPropertiesFormat { + return { + provisioningState: item["provisioningState"], + ruleSetType: item["ruleSetType"], + ruleSetVersion: item["ruleSetVersion"], + ruleGroups: applicationGatewayFirewallRuleGroupArrayDeserializer(item["ruleGroups"]), + tiers: !item["tiers"] + ? item["tiers"] + : item["tiers"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewayFirewallRuleGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFirewallRuleGroupDeserializer(item); + }); +} + +/** A web application firewall rule group. */ +export interface ApplicationGatewayFirewallRuleGroup { + /** The name of the web application firewall rule group. */ + ruleGroupName: string; + /** The description of the web application firewall rule group. */ + description?: string; + /** The rules of the web application firewall rule group. */ + rules: ApplicationGatewayFirewallRule[]; +} + +export function applicationGatewayFirewallRuleGroupDeserializer( + item: any, +): ApplicationGatewayFirewallRuleGroup { + return { + ruleGroupName: item["ruleGroupName"], + description: item["description"], + rules: applicationGatewayFirewallRuleArrayDeserializer(item["rules"]), + }; +} + +export function applicationGatewayFirewallRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFirewallRuleDeserializer(item); + }); +} + +/** A web application firewall rule. */ +export interface ApplicationGatewayFirewallRule { + /** The identifier of the web application firewall rule. */ + ruleId: number; + /** The string representation of the web application firewall rule identifier. */ + ruleIdString?: string; + /** The string representation of the web application firewall rule state. */ + state?: ApplicationGatewayWafRuleStateTypes; + /** The string representation of the web application firewall rule action. */ + action?: ApplicationGatewayWafRuleActionTypes; + /** The string representation of the web application firewall rule sensitivity. */ + sensitivity?: ApplicationGatewayWafRuleSensitivityTypes; + /** The description of the web application firewall rule. */ + description?: string; +} + +export function applicationGatewayFirewallRuleDeserializer( + item: any, +): ApplicationGatewayFirewallRule { + return { + ruleId: item["ruleId"], + ruleIdString: item["ruleIdString"], + state: item["state"], + action: item["action"], + sensitivity: item["sensitivity"], + description: item["description"], + }; +} + +/** The string representation of the web application firewall rule state. */ +export enum KnownApplicationGatewayWafRuleStateTypes { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * The string representation of the web application firewall rule state. \ + * {@link KnownApplicationGatewayWafRuleStateTypes} can be used interchangeably with ApplicationGatewayWafRuleStateTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Enabled \ + * **Disabled**: Disabled + */ +export type ApplicationGatewayWafRuleStateTypes = string; + +/** The string representation of the web application firewall rule action. */ +export enum KnownApplicationGatewayWafRuleActionTypes { + /** None */ + None = "None", + /** AnomalyScoring */ + AnomalyScoring = "AnomalyScoring", + /** Allow */ + Allow = "Allow", + /** Block */ + Block = "Block", + /** Log */ + Log = "Log", +} + +/** + * The string representation of the web application firewall rule action. \ + * {@link KnownApplicationGatewayWafRuleActionTypes} can be used interchangeably with ApplicationGatewayWafRuleActionTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **AnomalyScoring**: AnomalyScoring \ + * **Allow**: Allow \ + * **Block**: Block \ + * **Log**: Log + */ +export type ApplicationGatewayWafRuleActionTypes = string; + +/** The string representation of the web application firewall rule sensitivity. */ +export enum KnownApplicationGatewayWafRuleSensitivityTypes { + /** Low */ + Low = "Low", + /** Medium */ + Medium = "Medium", + /** High */ + High = "High", +} + +/** + * The string representation of the web application firewall rule sensitivity. \ + * {@link KnownApplicationGatewayWafRuleSensitivityTypes} can be used interchangeably with ApplicationGatewayWafRuleSensitivityTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Low**: Low \ + * **Medium**: Medium \ + * **High**: High + */ +export type ApplicationGatewayWafRuleSensitivityTypes = string; + +/** Known values of {@link ApplicationGatewayTierTypes} that the service accepts. */ +export enum KnownApplicationGatewayTierTypes { + /** Standard */ + Standard = "Standard", + /** WAF */ + WAF = "WAF", + /** Standard_v2 */ + StandardV2 = "Standard_v2", + /** WAF_v2 */ + WAFV2 = "WAF_v2", +} + +/** Type of ApplicationGatewayTierTypes */ +export type ApplicationGatewayTierTypes = string; + +/** Azure Firewall resource. */ +export interface AzureFirewall extends Resource { + /** The extended location of type local virtual network gateway. */ + extendedLocation?: ExtendedLocation; + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Collection of application rule collections used by Azure Firewall. */ + applicationRuleCollections?: AzureFirewallApplicationRuleCollection[]; + /** Collection of NAT rule collections used by Azure Firewall. */ + natRuleCollections?: AzureFirewallNatRuleCollection[]; + /** Collection of network rule collections used by Azure Firewall. */ + networkRuleCollections?: AzureFirewallNetworkRuleCollection[]; + /** IP configuration of the Azure Firewall resource. */ + ipConfigurations?: AzureFirewallIPConfiguration[]; + /** IP configuration of the Azure Firewall used for management traffic. */ + managementIpConfiguration?: AzureFirewallIPConfiguration; + /** The provisioning state of the Azure firewall resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The operation mode for Threat Intelligence. */ + threatIntelMode?: AzureFirewallThreatIntelMode; + /** The virtualHub to which the firewall belongs. */ + virtualHub?: SubResource; + /** The firewallPolicy associated with this azure firewall. */ + firewallPolicy?: SubResource; + /** IP addresses associated with AzureFirewall. */ + hubIPAddresses?: HubIPAddresses; + /** IpGroups associated with AzureFirewall. */ + readonly ipGroups?: AzureFirewallIpGroups[]; + /** The Azure Firewall Resource SKU. */ + sku?: AzureFirewallSku; + /** The additional properties used to further config this azure firewall. */ + additionalProperties?: Record; + /** Properties to provide a custom autoscale configuration to this azure firewall. */ + autoscaleConfiguration?: AzureFirewallAutoscaleConfiguration; + /** AFC configuration for the Azure Firewall. */ + readonly afcConfiguration?: AfcConfiguration; +} + +export function azureFirewallSerializer(item: AzureFirewall): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "applicationRuleCollections", + "natRuleCollections", + "networkRuleCollections", + "ipConfigurations", + "managementIpConfiguration", + "threatIntelMode", + "virtualHub", + "firewallPolicy", + "hubIPAddresses", + "sku", + "additionalProperties", + "autoscaleConfiguration", + ]) + ? undefined + : _azureFirewallPropertiesSerializer(item), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationSerializer(item["extendedLocation"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +export function azureFirewallDeserializer(item: any): AzureFirewall { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _azureFirewallPropertiesDeserializer(item["properties"])), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationDeserializer(item["extendedLocation"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + etag: item["etag"], + }; +} + +/** Properties of the Azure Firewall. */ +export interface AzureFirewallPropertiesFormat { + /** Collection of application rule collections used by Azure Firewall. */ + applicationRuleCollections?: AzureFirewallApplicationRuleCollection[]; + /** Collection of NAT rule collections used by Azure Firewall. */ + natRuleCollections?: AzureFirewallNatRuleCollection[]; + /** Collection of network rule collections used by Azure Firewall. */ + networkRuleCollections?: AzureFirewallNetworkRuleCollection[]; + /** IP configuration of the Azure Firewall resource. */ + ipConfigurations?: AzureFirewallIPConfiguration[]; + /** IP configuration of the Azure Firewall used for management traffic. */ + managementIpConfiguration?: AzureFirewallIPConfiguration; + /** The provisioning state of the Azure firewall resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The operation mode for Threat Intelligence. */ + threatIntelMode?: AzureFirewallThreatIntelMode; + /** The virtualHub to which the firewall belongs. */ + virtualHub?: SubResource; + /** The firewallPolicy associated with this azure firewall. */ + firewallPolicy?: SubResource; + /** IP addresses associated with AzureFirewall. */ + hubIPAddresses?: HubIPAddresses; + /** IpGroups associated with AzureFirewall. */ + readonly ipGroups?: AzureFirewallIpGroups[]; + /** The Azure Firewall Resource SKU. */ + sku?: AzureFirewallSku; + /** The additional properties used to further config this azure firewall. */ + additionalProperties?: Record; + /** Properties to provide a custom autoscale configuration to this azure firewall. */ + autoscaleConfiguration?: AzureFirewallAutoscaleConfiguration; + /** AFC configuration for the Azure Firewall. */ + readonly afcConfiguration?: AfcConfiguration; +} + +export function azureFirewallPropertiesFormatSerializer(item: AzureFirewallPropertiesFormat): any { + return { + applicationRuleCollections: !item["applicationRuleCollections"] + ? item["applicationRuleCollections"] + : azureFirewallApplicationRuleCollectionArraySerializer(item["applicationRuleCollections"]), + natRuleCollections: !item["natRuleCollections"] + ? item["natRuleCollections"] + : azureFirewallNatRuleCollectionArraySerializer(item["natRuleCollections"]), + networkRuleCollections: !item["networkRuleCollections"] + ? item["networkRuleCollections"] + : azureFirewallNetworkRuleCollectionArraySerializer(item["networkRuleCollections"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : azureFirewallIPConfigurationArraySerializer(item["ipConfigurations"]), + managementIpConfiguration: !item["managementIpConfiguration"] + ? item["managementIpConfiguration"] + : azureFirewallIPConfigurationSerializer(item["managementIpConfiguration"]), + threatIntelMode: item["threatIntelMode"], + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceSerializer(item["virtualHub"]), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceSerializer(item["firewallPolicy"]), + hubIPAddresses: !item["hubIPAddresses"] + ? item["hubIPAddresses"] + : hubIPAddressesSerializer(item["hubIPAddresses"]), + sku: !item["sku"] ? item["sku"] : azureFirewallSkuSerializer(item["sku"]), + additionalProperties: item["additionalProperties"], + autoscaleConfiguration: !item["autoscaleConfiguration"] + ? item["autoscaleConfiguration"] + : azureFirewallAutoscaleConfigurationSerializer(item["autoscaleConfiguration"]), + }; +} + +export function azureFirewallPropertiesFormatDeserializer( + item: any, +): AzureFirewallPropertiesFormat { + return { + applicationRuleCollections: !item["applicationRuleCollections"] + ? item["applicationRuleCollections"] + : azureFirewallApplicationRuleCollectionArrayDeserializer(item["applicationRuleCollections"]), + natRuleCollections: !item["natRuleCollections"] + ? item["natRuleCollections"] + : azureFirewallNatRuleCollectionArrayDeserializer(item["natRuleCollections"]), + networkRuleCollections: !item["networkRuleCollections"] + ? item["networkRuleCollections"] + : azureFirewallNetworkRuleCollectionArrayDeserializer(item["networkRuleCollections"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : azureFirewallIPConfigurationArrayDeserializer(item["ipConfigurations"]), + managementIpConfiguration: !item["managementIpConfiguration"] + ? item["managementIpConfiguration"] + : azureFirewallIPConfigurationDeserializer(item["managementIpConfiguration"]), + provisioningState: item["provisioningState"], + threatIntelMode: item["threatIntelMode"], + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceDeserializer(item["virtualHub"]), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceDeserializer(item["firewallPolicy"]), + hubIPAddresses: !item["hubIPAddresses"] + ? item["hubIPAddresses"] + : hubIPAddressesDeserializer(item["hubIPAddresses"]), + ipGroups: !item["ipGroups"] + ? item["ipGroups"] + : azureFirewallIpGroupsArrayDeserializer(item["ipGroups"]), + sku: !item["sku"] ? item["sku"] : azureFirewallSkuDeserializer(item["sku"]), + additionalProperties: !item["additionalProperties"] + ? item["additionalProperties"] + : Object.fromEntries( + Object.entries(item["additionalProperties"]).map(([k, p]: [string, any]) => [k, p]), + ), + autoscaleConfiguration: !item["autoscaleConfiguration"] + ? item["autoscaleConfiguration"] + : azureFirewallAutoscaleConfigurationDeserializer(item["autoscaleConfiguration"]), + afcConfiguration: !item["afcConfiguration"] + ? item["afcConfiguration"] + : afcConfigurationDeserializer(item["afcConfiguration"]), + }; +} + +export function azureFirewallApplicationRuleCollectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallApplicationRuleCollectionSerializer(item); + }); +} + +export function azureFirewallApplicationRuleCollectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallApplicationRuleCollectionDeserializer(item); + }); +} + +/** Application rule collection resource. */ +export interface AzureFirewallApplicationRuleCollection extends SubResource { + /** The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Priority of the application rule collection resource. */ + priority?: number; + /** The action type of a rule collection. */ + action?: AzureFirewallRCAction; + /** Collection of rules used by a application rule collection. */ + rules?: AzureFirewallApplicationRule[]; + /** The provisioning state of the application rule collection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function azureFirewallApplicationRuleCollectionSerializer( + item: AzureFirewallApplicationRuleCollection, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["priority", "action", "rules"]) + ? undefined + : _azureFirewallApplicationRuleCollectionPropertiesSerializer(item), + name: item["name"], + }; +} + +export function azureFirewallApplicationRuleCollectionDeserializer( + item: any, +): AzureFirewallApplicationRuleCollection { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _azureFirewallApplicationRuleCollectionPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of the application rule collection. */ +export interface AzureFirewallApplicationRuleCollectionPropertiesFormat { + /** Priority of the application rule collection resource. */ + priority?: number; + /** The action type of a rule collection. */ + action?: AzureFirewallRCAction; + /** Collection of rules used by a application rule collection. */ + rules?: AzureFirewallApplicationRule[]; + /** The provisioning state of the application rule collection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function azureFirewallApplicationRuleCollectionPropertiesFormatSerializer( + item: AzureFirewallApplicationRuleCollectionPropertiesFormat, +): any { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallRCActionSerializer(item["action"]), + rules: !item["rules"] + ? item["rules"] + : azureFirewallApplicationRuleArraySerializer(item["rules"]), + }; +} + +export function azureFirewallApplicationRuleCollectionPropertiesFormatDeserializer( + item: any, +): AzureFirewallApplicationRuleCollectionPropertiesFormat { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallRCActionDeserializer(item["action"]), + rules: !item["rules"] + ? item["rules"] + : azureFirewallApplicationRuleArrayDeserializer(item["rules"]), + provisioningState: item["provisioningState"], + }; +} + +/** Properties of the AzureFirewallRCAction. */ +export interface AzureFirewallRCAction { + /** The type of action. */ + type?: AzureFirewallRCActionType; +} + +export function azureFirewallRCActionSerializer(item: AzureFirewallRCAction): any { + return { type: item["type"] }; +} + +export function azureFirewallRCActionDeserializer(item: any): AzureFirewallRCAction { + return { + type: item["type"], + }; +} + +/** The action type of a rule collection. */ +export enum KnownAzureFirewallRCActionType { + /** Allow */ + Allow = "Allow", + /** Deny */ + Deny = "Deny", +} + +/** + * The action type of a rule collection. \ + * {@link KnownAzureFirewallRCActionType} can be used interchangeably with AzureFirewallRCActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Allow**: Allow \ + * **Deny**: Deny + */ +export type AzureFirewallRCActionType = string; + +export function azureFirewallApplicationRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallApplicationRuleSerializer(item); + }); +} + +export function azureFirewallApplicationRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallApplicationRuleDeserializer(item); + }); +} + +/** Properties of an application rule. */ +export interface AzureFirewallApplicationRule { + /** Name of the application rule. */ + name?: string; + /** Description of the rule. */ + description?: string; + /** List of source IP addresses for this rule. */ + sourceAddresses?: string[]; + /** Array of ApplicationRuleProtocols. */ + protocols?: AzureFirewallApplicationRuleProtocol[]; + /** List of FQDNs for this rule. */ + targetFqdns?: string[]; + /** List of FQDN Tags for this rule. */ + fqdnTags?: string[]; + /** List of source IpGroups for this rule. */ + sourceIpGroups?: string[]; +} + +export function azureFirewallApplicationRuleSerializer(item: AzureFirewallApplicationRule): any { + return { + name: item["name"], + description: item["description"], + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + protocols: !item["protocols"] + ? item["protocols"] + : azureFirewallApplicationRuleProtocolArraySerializer(item["protocols"]), + targetFqdns: !item["targetFqdns"] + ? item["targetFqdns"] + : item["targetFqdns"].map((p: any) => { + return p; + }), + fqdnTags: !item["fqdnTags"] + ? item["fqdnTags"] + : item["fqdnTags"].map((p: any) => { + return p; + }), + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + }; +} + +export function azureFirewallApplicationRuleDeserializer(item: any): AzureFirewallApplicationRule { + return { + name: item["name"], + description: item["description"], + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + protocols: !item["protocols"] + ? item["protocols"] + : azureFirewallApplicationRuleProtocolArrayDeserializer(item["protocols"]), + targetFqdns: !item["targetFqdns"] + ? item["targetFqdns"] + : item["targetFqdns"].map((p: any) => { + return p; + }), + fqdnTags: !item["fqdnTags"] + ? item["fqdnTags"] + : item["fqdnTags"].map((p: any) => { + return p; + }), + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + }; +} + +export function azureFirewallApplicationRuleProtocolArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallApplicationRuleProtocolSerializer(item); + }); +} + +export function azureFirewallApplicationRuleProtocolArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallApplicationRuleProtocolDeserializer(item); + }); +} + +/** Properties of the application rule protocol. */ +export interface AzureFirewallApplicationRuleProtocol { + /** Protocol type. */ + protocolType?: AzureFirewallApplicationRuleProtocolType; + /** Port number for the protocol, cannot be greater than 64000. This field is optional. */ + port?: number; +} + +export function azureFirewallApplicationRuleProtocolSerializer( + item: AzureFirewallApplicationRuleProtocol, +): any { + return { protocolType: item["protocolType"], port: item["port"] }; +} + +export function azureFirewallApplicationRuleProtocolDeserializer( + item: any, +): AzureFirewallApplicationRuleProtocol { + return { + protocolType: item["protocolType"], + port: item["port"], + }; +} + +/** The protocol type of a Application Rule resource. */ +export enum KnownAzureFirewallApplicationRuleProtocolType { + /** Http */ + Http = "Http", + /** Https */ + Https = "Https", + /** Mssql */ + Mssql = "Mssql", +} + +/** + * The protocol type of a Application Rule resource. \ + * {@link KnownAzureFirewallApplicationRuleProtocolType} can be used interchangeably with AzureFirewallApplicationRuleProtocolType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Http**: Http \ + * **Https**: Https \ + * **Mssql**: Mssql + */ +export type AzureFirewallApplicationRuleProtocolType = string; + +export function azureFirewallNatRuleCollectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallNatRuleCollectionSerializer(item); + }); +} + +export function azureFirewallNatRuleCollectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallNatRuleCollectionDeserializer(item); + }); +} + +/** NAT rule collection resource. */ +export interface AzureFirewallNatRuleCollection extends SubResource { + /** The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Priority of the NAT rule collection resource. */ + priority?: number; + /** The action type of a NAT rule collection. */ + action?: AzureFirewallNatRCAction; + /** Collection of rules used by a NAT rule collection. */ + rules?: AzureFirewallNatRule[]; + /** The provisioning state of the NAT rule collection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function azureFirewallNatRuleCollectionSerializer( + item: AzureFirewallNatRuleCollection, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["priority", "action", "rules"]) + ? undefined + : _azureFirewallNatRuleCollectionPropertiesSerializer(item), + name: item["name"], + }; +} + +export function azureFirewallNatRuleCollectionDeserializer( + item: any, +): AzureFirewallNatRuleCollection { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _azureFirewallNatRuleCollectionPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of the NAT rule collection. */ +export interface AzureFirewallNatRuleCollectionProperties { + /** Priority of the NAT rule collection resource. */ + priority?: number; + /** The action type of a NAT rule collection. */ + action?: AzureFirewallNatRCAction; + /** Collection of rules used by a NAT rule collection. */ + rules?: AzureFirewallNatRule[]; + /** The provisioning state of the NAT rule collection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function azureFirewallNatRuleCollectionPropertiesSerializer( + item: AzureFirewallNatRuleCollectionProperties, +): any { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallNatRCActionSerializer(item["action"]), + rules: !item["rules"] ? item["rules"] : azureFirewallNatRuleArraySerializer(item["rules"]), + }; +} + +export function azureFirewallNatRuleCollectionPropertiesDeserializer( + item: any, +): AzureFirewallNatRuleCollectionProperties { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallNatRCActionDeserializer(item["action"]), + rules: !item["rules"] ? item["rules"] : azureFirewallNatRuleArrayDeserializer(item["rules"]), + provisioningState: item["provisioningState"], + }; +} + +/** AzureFirewall NAT Rule Collection Action. */ +export interface AzureFirewallNatRCAction { + /** The type of action. */ + type?: AzureFirewallNatRCActionType; +} + +export function azureFirewallNatRCActionSerializer(item: AzureFirewallNatRCAction): any { + return { type: item["type"] }; +} + +export function azureFirewallNatRCActionDeserializer(item: any): AzureFirewallNatRCAction { + return { + type: item["type"], + }; +} + +/** The action type of a NAT rule collection. */ +export enum KnownAzureFirewallNatRCActionType { + /** Snat */ + Snat = "Snat", + /** Dnat */ + Dnat = "Dnat", +} + +/** + * The action type of a NAT rule collection. \ + * {@link KnownAzureFirewallNatRCActionType} can be used interchangeably with AzureFirewallNatRCActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Snat**: Snat \ + * **Dnat**: Dnat + */ +export type AzureFirewallNatRCActionType = string; + +export function azureFirewallNatRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return azureFirewallNatRuleSerializer(item); + }); +} + +export function azureFirewallNatRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return azureFirewallNatRuleDeserializer(item); + }); +} + +/** Properties of a NAT rule. */ +export interface AzureFirewallNatRule { + /** Name of the NAT rule. */ + name?: string; + /** Description of the rule. */ + description?: string; + /** List of source IP addresses for this rule. */ + sourceAddresses?: string[]; + /** List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags. */ + destinationAddresses?: string[]; + /** List of destination ports. */ + destinationPorts?: string[]; + /** Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. */ + protocols?: AzureFirewallNetworkRuleProtocol[]; + /** The translated address for this NAT rule. */ + translatedAddress?: string; + /** The translated port for this NAT rule. */ + translatedPort?: string; + /** The translated FQDN for this NAT rule. */ + translatedFqdn?: string; + /** List of source IpGroups for this rule. */ + sourceIpGroups?: string[]; +} + +export function azureFirewallNatRuleSerializer(item: AzureFirewallNatRule): any { + return { + name: item["name"], + description: item["description"], + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + translatedAddress: item["translatedAddress"], + translatedPort: item["translatedPort"], + translatedFqdn: item["translatedFqdn"], + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + }; +} + +export function azureFirewallNatRuleDeserializer(item: any): AzureFirewallNatRule { + return { + name: item["name"], + description: item["description"], + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + translatedAddress: item["translatedAddress"], + translatedPort: item["translatedPort"], + translatedFqdn: item["translatedFqdn"], + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + }; +} + +/** The protocol of a Network Rule resource. */ +export enum KnownAzureFirewallNetworkRuleProtocol { + /** TCP */ + TCP = "TCP", + /** UDP */ + UDP = "UDP", + /** Any */ + Any = "Any", + /** ICMP */ + Icmp = "ICMP", +} + +/** + * The protocol of a Network Rule resource. \ + * {@link KnownAzureFirewallNetworkRuleProtocol} can be used interchangeably with AzureFirewallNetworkRuleProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TCP**: TCP \ + * **UDP**: UDP \ + * **Any**: Any \ + * **ICMP**: ICMP + */ +export type AzureFirewallNetworkRuleProtocol = string; + +export function azureFirewallNetworkRuleCollectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallNetworkRuleCollectionSerializer(item); + }); +} + +export function azureFirewallNetworkRuleCollectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallNetworkRuleCollectionDeserializer(item); + }); +} + +/** Network rule collection resource. */ +export interface AzureFirewallNetworkRuleCollection extends SubResource { + /** The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Priority of the network rule collection resource. */ + priority?: number; + /** The action type of a rule collection. */ + action?: AzureFirewallRCAction; + /** Collection of rules used by a network rule collection. */ + rules?: AzureFirewallNetworkRule[]; + /** The provisioning state of the network rule collection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function azureFirewallNetworkRuleCollectionSerializer( + item: AzureFirewallNetworkRuleCollection, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["priority", "action", "rules"]) + ? undefined + : _azureFirewallNetworkRuleCollectionPropertiesSerializer(item), + name: item["name"], + }; +} + +export function azureFirewallNetworkRuleCollectionDeserializer( + item: any, +): AzureFirewallNetworkRuleCollection { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _azureFirewallNetworkRuleCollectionPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of the network rule collection. */ +export interface AzureFirewallNetworkRuleCollectionPropertiesFormat { + /** Priority of the network rule collection resource. */ + priority?: number; + /** The action type of a rule collection. */ + action?: AzureFirewallRCAction; + /** Collection of rules used by a network rule collection. */ + rules?: AzureFirewallNetworkRule[]; + /** The provisioning state of the network rule collection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function azureFirewallNetworkRuleCollectionPropertiesFormatSerializer( + item: AzureFirewallNetworkRuleCollectionPropertiesFormat, +): any { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallRCActionSerializer(item["action"]), + rules: !item["rules"] ? item["rules"] : azureFirewallNetworkRuleArraySerializer(item["rules"]), + }; +} + +export function azureFirewallNetworkRuleCollectionPropertiesFormatDeserializer( + item: any, +): AzureFirewallNetworkRuleCollectionPropertiesFormat { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallRCActionDeserializer(item["action"]), + rules: !item["rules"] + ? item["rules"] + : azureFirewallNetworkRuleArrayDeserializer(item["rules"]), + provisioningState: item["provisioningState"], + }; +} + +export function azureFirewallNetworkRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallNetworkRuleSerializer(item); + }); +} + +export function azureFirewallNetworkRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallNetworkRuleDeserializer(item); + }); +} + +/** Properties of the network rule. */ +export interface AzureFirewallNetworkRule { + /** Name of the network rule. */ + name?: string; + /** Description of the rule. */ + description?: string; + /** Array of AzureFirewallNetworkRuleProtocols. */ + protocols?: AzureFirewallNetworkRuleProtocol[]; + /** List of source IP addresses for this rule. */ + sourceAddresses?: string[]; + /** List of destination IP addresses. */ + destinationAddresses?: string[]; + /** List of destination ports. */ + destinationPorts?: string[]; + /** List of destination FQDNs. */ + destinationFqdns?: string[]; + /** List of source IpGroups for this rule. */ + sourceIpGroups?: string[]; + /** List of destination IpGroups for this rule. */ + destinationIpGroups?: string[]; +} + +export function azureFirewallNetworkRuleSerializer(item: AzureFirewallNetworkRule): any { + return { + name: item["name"], + description: item["description"], + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + destinationFqdns: !item["destinationFqdns"] + ? item["destinationFqdns"] + : item["destinationFqdns"].map((p: any) => { + return p; + }), + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + destinationIpGroups: !item["destinationIpGroups"] + ? item["destinationIpGroups"] + : item["destinationIpGroups"].map((p: any) => { + return p; + }), + }; +} + +export function azureFirewallNetworkRuleDeserializer(item: any): AzureFirewallNetworkRule { + return { + name: item["name"], + description: item["description"], + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + destinationFqdns: !item["destinationFqdns"] + ? item["destinationFqdns"] + : item["destinationFqdns"].map((p: any) => { + return p; + }), + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + destinationIpGroups: !item["destinationIpGroups"] + ? item["destinationIpGroups"] + : item["destinationIpGroups"].map((p: any) => { + return p; + }), + }; +} + +export function azureFirewallIPConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallIPConfigurationSerializer(item); + }); +} + +export function azureFirewallIPConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallIPConfigurationDeserializer(item); + }); +} + +/** IP configuration of an Azure Firewall. */ +export interface AzureFirewallIPConfiguration extends SubResource { + /** 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. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. */ + readonly privateIPAddress?: string; + /** Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'. */ + subnet?: SubResource; + /** Reference to the PublicIP resource. This field is a mandatory input if subnet is not null. */ + publicIPAddress?: SubResource; + /** The provisioning state of the Azure firewall IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function azureFirewallIPConfigurationSerializer(item: AzureFirewallIPConfiguration): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["subnet", "publicIPAddress"]) + ? undefined + : _azureFirewallIPConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function azureFirewallIPConfigurationDeserializer(item: any): AzureFirewallIPConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _azureFirewallIPConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of IP configuration of an Azure Firewall. */ +export interface AzureFirewallIPConfigurationPropertiesFormat { + /** The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. */ + readonly privateIPAddress?: string; + /** Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'. */ + subnet?: SubResource; + /** Reference to the PublicIP resource. This field is a mandatory input if subnet is not null. */ + publicIPAddress?: SubResource; + /** The provisioning state of the Azure firewall IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function azureFirewallIPConfigurationPropertiesFormatSerializer( + item: AzureFirewallIPConfigurationPropertiesFormat, +): any { + return { + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceSerializer(item["publicIPAddress"]), + }; +} + +export function azureFirewallIPConfigurationPropertiesFormatDeserializer( + item: any, +): AzureFirewallIPConfigurationPropertiesFormat { + return { + privateIPAddress: item["privateIPAddress"], + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceDeserializer(item["publicIPAddress"]), + provisioningState: item["provisioningState"], + }; +} + +/** The operation mode for Threat Intel. */ +export enum KnownAzureFirewallThreatIntelMode { + /** Alert */ + Alert = "Alert", + /** Deny */ + Deny = "Deny", + /** Off */ + Off = "Off", +} + +/** + * The operation mode for Threat Intel. \ + * {@link KnownAzureFirewallThreatIntelMode} can be used interchangeably with AzureFirewallThreatIntelMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Alert**: Alert \ + * **Deny**: Deny \ + * **Off**: Off + */ +export type AzureFirewallThreatIntelMode = string; + +/** IP addresses associated with azure firewall. */ +export interface HubIPAddresses { + /** Public IP addresses associated with azure firewall. */ + publicIPs?: HubPublicIPAddresses; + /** Private IP Address associated with azure firewall. */ + privateIPAddress?: string; +} + +export function hubIPAddressesSerializer(item: HubIPAddresses): any { + return { + publicIPs: !item["publicIPs"] + ? item["publicIPs"] + : hubPublicIPAddressesSerializer(item["publicIPs"]), + privateIPAddress: item["privateIPAddress"], + }; +} + +export function hubIPAddressesDeserializer(item: any): HubIPAddresses { + return { + publicIPs: !item["publicIPs"] + ? item["publicIPs"] + : hubPublicIPAddressesDeserializer(item["publicIPs"]), + privateIPAddress: item["privateIPAddress"], + }; +} + +/** Public IP addresses associated with azure firewall. */ +export interface HubPublicIPAddresses { + /** The list of Public IP addresses associated with azure firewall or IP addresses to be retained. */ + addresses?: AzureFirewallPublicIPAddress[]; + /** The number of Public IP addresses associated with azure firewall. */ + count?: number; +} + +export function hubPublicIPAddressesSerializer(item: HubPublicIPAddresses): any { + return { + addresses: !item["addresses"] + ? item["addresses"] + : azureFirewallPublicIPAddressArraySerializer(item["addresses"]), + count: item["count"], + }; +} + +export function hubPublicIPAddressesDeserializer(item: any): HubPublicIPAddresses { + return { + addresses: !item["addresses"] + ? item["addresses"] + : azureFirewallPublicIPAddressArrayDeserializer(item["addresses"]), + count: item["count"], + }; +} + +export function azureFirewallPublicIPAddressArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallPublicIPAddressSerializer(item); + }); +} + +export function azureFirewallPublicIPAddressArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallPublicIPAddressDeserializer(item); + }); +} + +/** Public IP Address associated with azure firewall. */ +export interface AzureFirewallPublicIPAddress { + /** Public IP Address value. */ + address?: string; +} + +export function azureFirewallPublicIPAddressSerializer(item: AzureFirewallPublicIPAddress): any { + return { address: item["address"] }; +} + +export function azureFirewallPublicIPAddressDeserializer(item: any): AzureFirewallPublicIPAddress { + return { + address: item["address"], + }; +} + +export function azureFirewallIpGroupsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallIpGroupsDeserializer(item); + }); +} + +/** IpGroups associated with azure firewall. */ +export interface AzureFirewallIpGroups { + /** Resource ID. */ + readonly id?: string; + /** The iteration number. */ + readonly changeNumber?: string; +} + +export function azureFirewallIpGroupsDeserializer(item: any): AzureFirewallIpGroups { + return { + id: item["id"], + changeNumber: item["changeNumber"], + }; +} + +/** SKU of an Azure Firewall. */ +export interface AzureFirewallSku { + /** Name of an Azure Firewall SKU. */ + name?: AzureFirewallSkuName; + /** Tier of an Azure Firewall. */ + tier?: AzureFirewallSkuTier; +} + +export function azureFirewallSkuSerializer(item: AzureFirewallSku): any { + return { name: item["name"], tier: item["tier"] }; +} + +export function azureFirewallSkuDeserializer(item: any): AzureFirewallSku { + return { + name: item["name"], + tier: item["tier"], + }; +} + +/** Name of an Azure Firewall SKU. */ +export enum KnownAzureFirewallSkuName { + /** AZFW_VNet */ + AzfwVnet = "AZFW_VNet", + /** AZFW_Hub */ + AzfwHub = "AZFW_Hub", +} + +/** + * Name of an Azure Firewall SKU. \ + * {@link KnownAzureFirewallSkuName} can be used interchangeably with AzureFirewallSkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AZFW_VNet**: AZFW_VNet \ + * **AZFW_Hub**: AZFW_Hub + */ +export type AzureFirewallSkuName = string; + +/** Tier of an Azure Firewall. */ +export enum KnownAzureFirewallSkuTier { + /** Standard */ + Standard = "Standard", + /** Premium */ + Premium = "Premium", + /** Basic */ + Basic = "Basic", +} + +/** + * Tier of an Azure Firewall. \ + * {@link KnownAzureFirewallSkuTier} can be used interchangeably with AzureFirewallSkuTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard \ + * **Premium**: Premium \ + * **Basic**: Basic + */ +export type AzureFirewallSkuTier = string; + +/** Azure Firewall Autoscale Configuration parameters. */ +export interface AzureFirewallAutoscaleConfiguration { + /** The minimum number of capacity units for this azure firewall. Use null to reset the value to the service default. */ + minCapacity?: number; + /** The maximum number of capacity units for this azure firewall. Use null to reset the value to the service default. */ + maxCapacity?: number; +} + +export function azureFirewallAutoscaleConfigurationSerializer( + item: AzureFirewallAutoscaleConfiguration, +): any { + return { minCapacity: item["minCapacity"], maxCapacity: item["maxCapacity"] }; +} + +export function azureFirewallAutoscaleConfigurationDeserializer( + item: any, +): AzureFirewallAutoscaleConfiguration { + return { + minCapacity: item["minCapacity"], + maxCapacity: item["maxCapacity"], + }; +} + +/** AFC configuration for the Azure Firewall. */ +export interface AfcConfiguration { + /** The endpoint URL of the AFC control plane associated with this Azure Firewall. */ + readonly serviceEndpoint?: string; +} + +export function afcConfigurationDeserializer(item: any): AfcConfiguration { + return { + serviceEndpoint: item["serviceEndpoint"], + }; +} + +export function azureFirewallArraySerializer(result: Array): any[] { + return result.map((item) => { + return azureFirewallSerializer(item); + }); +} + +export function azureFirewallArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return azureFirewallDeserializer(item); + }); +} + +/** List of SNAT IP Prefixes learnt by firewall to not SNAT */ +export interface IPPrefixesList { + /** IP Prefix value. */ + ipPrefixes?: string[]; +} + +export function ipPrefixesListDeserializer(item: any): IPPrefixesList { + return { + ipPrefixes: !item["ipPrefixes"] + ? item["ipPrefixes"] + : item["ipPrefixes"].map((p: any) => { + return p; + }), + }; +} + +/** Azure Firewall Packet Capture Parameters. */ +export interface FirewallPacketCaptureParameters { + /** Duration of packet capture in seconds. If the field is not provided, the default value is 60. */ + durationInSeconds?: number; + /** Number of packets to be captured. If the field is not provided, the default value is 1000. */ + numberOfPacketsToCapture?: number; + /** Upload capture location */ + sasUrl?: string; + /** Name of file to be uploaded to sasURL */ + fileName?: string; + /** The protocol of packets to capture */ + protocol?: AzureFirewallNetworkRuleProtocol; + /** The tcp-flag type to be captured. Used with protocol TCP */ + flags?: AzureFirewallPacketCaptureFlags[]; + /** Rules to filter packet captures. */ + filters?: AzureFirewallPacketCaptureRule[]; + /** The packet capture operation to perform. If the Start operation is selected, please provide all the fields in the firewallPacketCaptureParameters to successfully initiate the packet capture. If the Status or Stop operation is selected, only the operation field is required; all other fields in the firewallPacketCaptureParameters can be omitted to successfully retrieve the capture status or stop the capture. */ + operation?: AzureFirewallPacketCaptureOperationType; +} + +export function firewallPacketCaptureParametersSerializer( + item: FirewallPacketCaptureParameters, +): any { + return { + durationInSeconds: item["durationInSeconds"], + numberOfPacketsToCapture: item["numberOfPacketsToCapture"], + sasUrl: item["sasUrl"], + fileName: item["fileName"], + protocol: item["protocol"], + flags: !item["flags"] + ? item["flags"] + : azureFirewallPacketCaptureFlagsArraySerializer(item["flags"]), + filters: !item["filters"] + ? item["filters"] + : azureFirewallPacketCaptureRuleArraySerializer(item["filters"]), + operation: item["operation"], + }; +} + +export function azureFirewallPacketCaptureFlagsArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallPacketCaptureFlagsSerializer(item); + }); +} + +/** Properties of the AzureFirewallRCAction. */ +export interface AzureFirewallPacketCaptureFlags { + /** Flags to capture */ + type?: AzureFirewallPacketCaptureFlagsType; +} + +export function azureFirewallPacketCaptureFlagsSerializer( + item: AzureFirewallPacketCaptureFlags, +): any { + return { type: item["type"] }; +} + +/** The flags type to be captured. */ +export enum KnownAzureFirewallPacketCaptureFlagsType { + /** fin */ + Fin = "fin", + /** syn */ + Syn = "syn", + /** rst */ + Rst = "rst", + /** push */ + Push = "push", + /** ack */ + Ack = "ack", + /** urg */ + Urg = "urg", +} + +/** + * The flags type to be captured. \ + * {@link KnownAzureFirewallPacketCaptureFlagsType} can be used interchangeably with AzureFirewallPacketCaptureFlagsType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **fin**: fin \ + * **syn**: syn \ + * **rst**: rst \ + * **push**: push \ + * **ack**: ack \ + * **urg**: urg + */ +export type AzureFirewallPacketCaptureFlagsType = string; + +export function azureFirewallPacketCaptureRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return azureFirewallPacketCaptureRuleSerializer(item); + }); +} + +/** Group of src/dest ips and ports to be captured. */ +export interface AzureFirewallPacketCaptureRule { + /** List of source IP addresses/subnets to be captured. */ + sources?: string[]; + /** List of destination IP addresses/subnets to be captured. */ + destinations?: string[]; + /** List of ports to be captured. */ + destinationPorts?: string[]; +} + +export function azureFirewallPacketCaptureRuleSerializer( + item: AzureFirewallPacketCaptureRule, +): any { + return { + sources: !item["sources"] + ? item["sources"] + : item["sources"].map((p: any) => { + return p; + }), + destinations: !item["destinations"] + ? item["destinations"] + : item["destinations"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + }; +} + +/** The packet capture operation to perform. If the Start operation is selected, please provide all the fields in the firewallPacketCaptureParameters to successfully initiate the packet capture. If the Status or Stop operation is selected, only the operation field is required; all other fields in the firewallPacketCaptureParameters can be omitted to successfully retrieve the capture status or stop the capture. */ +export enum KnownAzureFirewallPacketCaptureOperationType { + /** Start */ + Start = "Start", + /** Status */ + Status = "Status", + /** Stop */ + Stop = "Stop", +} + +/** + * The packet capture operation to perform. If the Start operation is selected, please provide all the fields in the firewallPacketCaptureParameters to successfully initiate the packet capture. If the Status or Stop operation is selected, only the operation field is required; all other fields in the firewallPacketCaptureParameters can be omitted to successfully retrieve the capture status or stop the capture. \ + * {@link KnownAzureFirewallPacketCaptureOperationType} can be used interchangeably with AzureFirewallPacketCaptureOperationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Start**: Start \ + * **Status**: Status \ + * **Stop**: Stop + */ +export type AzureFirewallPacketCaptureOperationType = string; + +/** Response of an Azure Firewall Packet Capture Operation. */ +export interface AzureFirewallPacketCaptureResponse { + /** The response code of the performed packet capture operation */ + statusCode?: AzureFirewallPacketCaptureResponseCode; + /** Localized Message String of The Result Of The Azure Firewall Packet Capture Operation */ + message?: string; +} + +export function azureFirewallPacketCaptureResponseDeserializer( + item: any, +): AzureFirewallPacketCaptureResponse { + return { + statusCode: item["statusCode"], + message: item["message"], + }; +} + +/** The packet capture operation response codes. */ +export enum KnownAzureFirewallPacketCaptureResponseCode { + /** NotImplemented */ + NotImplemented = "NotImplemented", + /** AzureFirewallPacketCaptureStartSucceeded */ + AzureFirewallPacketCaptureStartSucceeded = "AzureFirewallPacketCaptureStartSucceeded", + /** AzureFirewallPacketCaptureStartFailed */ + AzureFirewallPacketCaptureStartFailed = "AzureFirewallPacketCaptureStartFailed", + /** AzureFirewallPacketCaptureStartFailedToUpload */ + AzureFirewallPacketCaptureStartFailedToUpload = "AzureFirewallPacketCaptureStartFailedToUpload", + /** AzureFirewallPacketCaptureStartFailure */ + AzureFirewallPacketCaptureStartFailure = "AzureFirewallPacketCaptureStartFailure", + /** AzureFirewallPacketCaptureInProgress */ + AzureFirewallPacketCaptureInProgress = "AzureFirewallPacketCaptureInProgress", + /** AzureFirewallPacketCaptureNotInProgress */ + AzureFirewallPacketCaptureNotInProgress = "AzureFirewallPacketCaptureNotInProgress", + /** AzureFirewallPacketCaptureStopSucceeded */ + AzureFirewallPacketCaptureStopSucceeded = "AzureFirewallPacketCaptureStopSucceeded", + /** AzureFirewallPacketCaptureFailed */ + AzureFirewallPacketCaptureFailed = "AzureFirewallPacketCaptureFailed", + /** AzureFirewallPacketCaptureCompleted */ + AzureFirewallPacketCaptureCompleted = "AzureFirewallPacketCaptureCompleted", +} + +/** + * The packet capture operation response codes. \ + * {@link KnownAzureFirewallPacketCaptureResponseCode} can be used interchangeably with AzureFirewallPacketCaptureResponseCode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotImplemented**: NotImplemented \ + * **AzureFirewallPacketCaptureStartSucceeded**: AzureFirewallPacketCaptureStartSucceeded \ + * **AzureFirewallPacketCaptureStartFailed**: AzureFirewallPacketCaptureStartFailed \ + * **AzureFirewallPacketCaptureStartFailedToUpload**: AzureFirewallPacketCaptureStartFailedToUpload \ + * **AzureFirewallPacketCaptureStartFailure**: AzureFirewallPacketCaptureStartFailure \ + * **AzureFirewallPacketCaptureInProgress**: AzureFirewallPacketCaptureInProgress \ + * **AzureFirewallPacketCaptureNotInProgress**: AzureFirewallPacketCaptureNotInProgress \ + * **AzureFirewallPacketCaptureStopSucceeded**: AzureFirewallPacketCaptureStopSucceeded \ + * **AzureFirewallPacketCaptureFailed**: AzureFirewallPacketCaptureFailed \ + * **AzureFirewallPacketCaptureCompleted**: AzureFirewallPacketCaptureCompleted + */ +export type AzureFirewallPacketCaptureResponseCode = string; + +/** Bastion Host resource. */ +export interface BastionHost extends Resource { + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The sku of this Bastion Host. */ + sku?: Sku; + /** IP configuration of the Bastion Host resource. */ + ipConfigurations?: BastionHostIPConfiguration[]; + /** FQDN for the endpoint on which bastion host is accessible. */ + dnsName?: string; + /** Reference to an existing virtual network required for Developer Bastion Host only. */ + virtualNetwork?: SubResource; + networkAcls?: BastionHostPropertiesFormatNetworkAcls; + /** The provisioning state of the bastion host resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The scale units for the Bastion Host resource. */ + scaleUnits?: number; + /** Enable/Disable Copy/Paste feature of the Bastion Host resource. */ + disableCopyPaste?: boolean; + /** Enable/Disable File Copy feature of the Bastion Host resource. */ + enableFileCopy?: boolean; + /** Enable/Disable IP Connect feature of the Bastion Host resource. */ + enableIpConnect?: boolean; + /** Enable/Disable Shareable Link of the Bastion Host resource. */ + enableShareableLink?: boolean; + /** Enable/Disable Tunneling feature of the Bastion Host resource. */ + enableTunneling?: boolean; + /** Enable/Disable Kerberos feature of the Bastion Host resource. */ + enableKerberos?: boolean; + /** Enable/Disable Session Recording feature of the Bastion Host resource. */ + enableSessionRecording?: boolean; + /** Enable/Disable Private Only feature of the Bastion Host resource. */ + enablePrivateOnlyBastion?: boolean; +} + +export function bastionHostSerializer(item: BastionHost): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "ipConfigurations", + "dnsName", + "virtualNetwork", + "networkAcls", + "scaleUnits", + "disableCopyPaste", + "enableFileCopy", + "enableIpConnect", + "enableShareableLink", + "enableTunneling", + "enableKerberos", + "enableSessionRecording", + "enablePrivateOnlyBastion", + ]) + ? undefined + : _bastionHostPropertiesSerializer(item), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + sku: !item["sku"] ? item["sku"] : skuSerializer(item["sku"]), + }; +} + +export function bastionHostDeserializer(item: any): BastionHost { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _bastionHostPropertiesDeserializer(item["properties"])), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + etag: item["etag"], + sku: !item["sku"] ? item["sku"] : skuDeserializer(item["sku"]), + }; +} + +/** Properties of the Bastion Host. */ +export interface BastionHostPropertiesFormat { + /** IP configuration of the Bastion Host resource. */ + ipConfigurations?: BastionHostIPConfiguration[]; + /** FQDN for the endpoint on which bastion host is accessible. */ + dnsName?: string; + /** Reference to an existing virtual network required for Developer Bastion Host only. */ + virtualNetwork?: SubResource; + networkAcls?: BastionHostPropertiesFormatNetworkAcls; + /** The provisioning state of the bastion host resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The scale units for the Bastion Host resource. */ + scaleUnits?: number; + /** Enable/Disable Copy/Paste feature of the Bastion Host resource. */ + disableCopyPaste?: boolean; + /** Enable/Disable File Copy feature of the Bastion Host resource. */ + enableFileCopy?: boolean; + /** Enable/Disable IP Connect feature of the Bastion Host resource. */ + enableIpConnect?: boolean; + /** Enable/Disable Shareable Link of the Bastion Host resource. */ + enableShareableLink?: boolean; + /** Enable/Disable Tunneling feature of the Bastion Host resource. */ + enableTunneling?: boolean; + /** Enable/Disable Kerberos feature of the Bastion Host resource. */ + enableKerberos?: boolean; + /** Enable/Disable Session Recording feature of the Bastion Host resource. */ + enableSessionRecording?: boolean; + /** Enable/Disable Private Only feature of the Bastion Host resource. */ + enablePrivateOnlyBastion?: boolean; +} + +export function bastionHostPropertiesFormatSerializer(item: BastionHostPropertiesFormat): any { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : bastionHostIPConfigurationArraySerializer(item["ipConfigurations"]), + dnsName: item["dnsName"], + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceSerializer(item["virtualNetwork"]), + networkAcls: !item["networkAcls"] + ? item["networkAcls"] + : bastionHostPropertiesFormatNetworkAclsSerializer(item["networkAcls"]), + scaleUnits: item["scaleUnits"], + disableCopyPaste: item["disableCopyPaste"], + enableFileCopy: item["enableFileCopy"], + enableIpConnect: item["enableIpConnect"], + enableShareableLink: item["enableShareableLink"], + enableTunneling: item["enableTunneling"], + enableKerberos: item["enableKerberos"], + enableSessionRecording: item["enableSessionRecording"], + enablePrivateOnlyBastion: item["enablePrivateOnlyBastion"], + }; +} + +export function bastionHostPropertiesFormatDeserializer(item: any): BastionHostPropertiesFormat { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : bastionHostIPConfigurationArrayDeserializer(item["ipConfigurations"]), + dnsName: item["dnsName"], + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceDeserializer(item["virtualNetwork"]), + networkAcls: !item["networkAcls"] + ? item["networkAcls"] + : bastionHostPropertiesFormatNetworkAclsDeserializer(item["networkAcls"]), + provisioningState: item["provisioningState"], + scaleUnits: item["scaleUnits"], + disableCopyPaste: item["disableCopyPaste"], + enableFileCopy: item["enableFileCopy"], + enableIpConnect: item["enableIpConnect"], + enableShareableLink: item["enableShareableLink"], + enableTunneling: item["enableTunneling"], + enableKerberos: item["enableKerberos"], + enableSessionRecording: item["enableSessionRecording"], + enablePrivateOnlyBastion: item["enablePrivateOnlyBastion"], + }; +} + +export function bastionHostIPConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return bastionHostIPConfigurationSerializer(item); + }); +} + +export function bastionHostIPConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return bastionHostIPConfigurationDeserializer(item); + }); +} + +/** IP configuration of an Bastion Host. */ +export interface BastionHostIPConfiguration extends SubResource { + /** 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. */ + readonly etag?: string; + /** Ip configuration type. */ + readonly type?: string; + /** Reference of the subnet resource. */ + subnet?: SubResource; + /** Reference of the PublicIP resource. Null for private only bastion */ + publicIPAddress?: SubResource; + /** The provisioning state of the bastion host IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Private IP allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; +} + +export function bastionHostIPConfigurationSerializer(item: BastionHostIPConfiguration): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "subnet", + "publicIPAddress", + "privateIPAllocationMethod", + ]) + ? undefined + : _bastionHostIPConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function bastionHostIPConfigurationDeserializer(item: any): BastionHostIPConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _bastionHostIPConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of IP configuration of an Bastion Host. */ +export interface BastionHostIPConfigurationPropertiesFormat { + /** Reference of the subnet resource. */ + subnet: SubResource; + /** Reference of the PublicIP resource. Null for private only bastion */ + publicIPAddress?: SubResource; + /** The provisioning state of the bastion host IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Private IP allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; +} + +export function bastionHostIPConfigurationPropertiesFormatSerializer( + item: BastionHostIPConfigurationPropertiesFormat, +): any { + return { + subnet: subResourceSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceSerializer(item["publicIPAddress"]), + privateIPAllocationMethod: item["privateIPAllocationMethod"], + }; +} + +export function bastionHostIPConfigurationPropertiesFormatDeserializer( + item: any, +): BastionHostIPConfigurationPropertiesFormat { + return { + subnet: subResourceDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceDeserializer(item["publicIPAddress"]), + provisioningState: item["provisioningState"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + }; +} + +/** model interface BastionHostPropertiesFormatNetworkAcls */ +export interface BastionHostPropertiesFormatNetworkAcls { + /** Sets the IP ACL rules for Developer Bastion Host. */ + ipRules?: IPRule[]; +} + +export function bastionHostPropertiesFormatNetworkAclsSerializer( + item: BastionHostPropertiesFormatNetworkAcls, +): any { + return { ipRules: !item["ipRules"] ? item["ipRules"] : ipRuleArraySerializer(item["ipRules"]) }; +} + +export function bastionHostPropertiesFormatNetworkAclsDeserializer( + item: any, +): BastionHostPropertiesFormatNetworkAcls { + return { + ipRules: !item["ipRules"] ? item["ipRules"] : ipRuleArrayDeserializer(item["ipRules"]), + }; +} + +export function ipRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return ipRuleSerializer(item); + }); +} + +export function ipRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ipRuleDeserializer(item); + }); +} + +/** model interface IPRule */ +export interface IPRule { + /** Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. */ + addressPrefix?: string; +} + +export function ipRuleSerializer(item: IPRule): any { + return { addressPrefix: item["addressPrefix"] }; +} + +export function ipRuleDeserializer(item: any): IPRule { + return { + addressPrefix: item["addressPrefix"], + }; +} + +/** The sku of this Bastion Host. */ +export interface Sku { + /** The name of the sku of this Bastion Host. */ + name?: BastionHostSkuName; +} + +export function skuSerializer(item: Sku): any { + return { name: item["name"] }; +} + +export function skuDeserializer(item: any): Sku { + return { + name: item["name"], + }; +} + +/** The name of the sku of this Bastion Host. */ +export enum KnownBastionHostSkuName { + /** Basic */ + Basic = "Basic", + /** Standard */ + Standard = "Standard", + /** Developer */ + Developer = "Developer", + /** Premium */ + Premium = "Premium", +} + +/** + * The name of the sku of this Bastion Host. \ + * {@link KnownBastionHostSkuName} can be used interchangeably with BastionHostSkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic**: Basic \ + * **Standard**: Standard \ + * **Developer**: Developer \ + * **Premium**: Premium + */ +export type BastionHostSkuName = string; + +export function bastionHostArraySerializer(result: Array): any[] { + return result.map((item) => { + return bastionHostSerializer(item); + }); +} + +export function bastionHostArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return bastionHostDeserializer(item); + }); +} + +/** Response for list effective route API service call. */ +export interface EffectiveRouteListResult { + /** The EffectiveRoute items on this page */ + value: EffectiveRoute[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function effectiveRouteListResultDeserializer(item: any): EffectiveRouteListResult { + return { + value: effectiveRouteArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function effectiveRouteArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return effectiveRouteDeserializer(item); + }); +} + +/** Effective Route. */ +export interface EffectiveRoute { + /** The name of the user defined route. This is optional. */ + name?: string; + /** If true, on-premises routes are not propagated to the network interfaces in the subnet. */ + disableBgpRoutePropagation?: boolean; + /** Who created the route. */ + source?: EffectiveRouteSource; + /** The value of effective route. */ + state?: EffectiveRouteState; + /** The address prefixes of the effective routes in CIDR notation. */ + addressPrefix?: string[]; + /** The IP address of the next hop of the effective route. */ + nextHopIpAddress?: string[]; + /** The type of Azure hop the packet should be sent to. */ + nextHopType?: RouteNextHopType; +} + +export function effectiveRouteDeserializer(item: any): EffectiveRoute { + return { + name: item["name"], + disableBgpRoutePropagation: item["disableBgpRoutePropagation"], + source: item["source"], + state: item["state"], + addressPrefix: !item["addressPrefix"] + ? item["addressPrefix"] + : item["addressPrefix"].map((p: any) => { + return p; + }), + nextHopIpAddress: !item["nextHopIpAddress"] + ? item["nextHopIpAddress"] + : item["nextHopIpAddress"].map((p: any) => { + return p; + }), + nextHopType: item["nextHopType"], + }; +} + +/** Who created the route. */ +export enum KnownEffectiveRouteSource { + /** Unknown */ + Unknown = "Unknown", + /** User */ + User = "User", + /** VirtualNetworkGateway */ + VirtualNetworkGateway = "VirtualNetworkGateway", + /** Default */ + Default = "Default", +} + +/** + * Who created the route. \ + * {@link KnownEffectiveRouteSource} can be used interchangeably with EffectiveRouteSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **User**: User \ + * **VirtualNetworkGateway**: VirtualNetworkGateway \ + * **Default**: Default + */ +export type EffectiveRouteSource = string; + +/** The value of effective route. */ +export enum KnownEffectiveRouteState { + /** Active */ + Active = "Active", + /** Invalid */ + Invalid = "Invalid", +} + +/** + * The value of effective route. \ + * {@link KnownEffectiveRouteState} can be used interchangeably with EffectiveRouteState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Active**: Active \ + * **Invalid**: Invalid + */ +export type EffectiveRouteState = string; + +/** Response for list effective network security groups API service call. */ +export interface EffectiveNetworkSecurityGroupListResult { + /** The EffectiveNetworkSecurityGroup items on this page */ + value: EffectiveNetworkSecurityGroup[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function effectiveNetworkSecurityGroupListResultDeserializer( + item: any, +): EffectiveNetworkSecurityGroupListResult { + return { + value: effectiveNetworkSecurityGroupArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function effectiveNetworkSecurityGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return effectiveNetworkSecurityGroupDeserializer(item); + }); +} + +/** Effective network security group. */ +export interface EffectiveNetworkSecurityGroup { + /** The ID of network security group that is applied. */ + networkSecurityGroup?: SubResource; + /** Associated resources. */ + association?: EffectiveNetworkSecurityGroupAssociation; + /** A collection of effective security rules. */ + effectiveSecurityRules?: EffectiveNetworkSecurityRule[]; + /** Mapping of tags to list of IP Addresses included within the tag. */ + tagMap?: string; +} + +export function effectiveNetworkSecurityGroupDeserializer( + item: any, +): EffectiveNetworkSecurityGroup { + return { + networkSecurityGroup: !item["networkSecurityGroup"] + ? item["networkSecurityGroup"] + : subResourceDeserializer(item["networkSecurityGroup"]), + association: !item["association"] + ? item["association"] + : effectiveNetworkSecurityGroupAssociationDeserializer(item["association"]), + effectiveSecurityRules: !item["effectiveSecurityRules"] + ? item["effectiveSecurityRules"] + : effectiveNetworkSecurityRuleArrayDeserializer(item["effectiveSecurityRules"]), + tagMap: item["tagMap"], + }; +} + +/** The effective network security group association. */ +export interface EffectiveNetworkSecurityGroupAssociation { + /** The ID of the Azure network manager if assigned. */ + networkManager?: SubResource; + /** The ID of the subnet if assigned. */ + subnet?: SubResource; + /** The ID of the network interface if assigned. */ + networkInterface?: SubResource; +} + +export function effectiveNetworkSecurityGroupAssociationDeserializer( + item: any, +): EffectiveNetworkSecurityGroupAssociation { + return { + networkManager: !item["networkManager"] + ? item["networkManager"] + : subResourceDeserializer(item["networkManager"]), + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + networkInterface: !item["networkInterface"] + ? item["networkInterface"] + : subResourceDeserializer(item["networkInterface"]), + }; +} + +export function effectiveNetworkSecurityRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return effectiveNetworkSecurityRuleDeserializer(item); + }); +} + +/** Effective network security rules. */ +export interface EffectiveNetworkSecurityRule { + /** The name of the security rule specified by the user (if created by the user). */ + name?: string; + /** The network protocol this rule applies to. */ + protocol?: EffectiveSecurityRuleProtocol; + /** The source port or range. */ + sourcePortRange?: string; + /** The destination port or range. */ + destinationPortRange?: string; + /** The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). */ + sourcePortRanges?: string[]; + /** The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). */ + destinationPortRanges?: string[]; + /** The source address prefix. */ + sourceAddressPrefix?: string; + /** The destination address prefix. */ + destinationAddressPrefix?: string; + /** The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). */ + sourceAddressPrefixes?: string[]; + /** The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). */ + destinationAddressPrefixes?: string[]; + /** The expanded source address prefix. */ + expandedSourceAddressPrefix?: string[]; + /** Expanded destination address prefix. */ + expandedDestinationAddressPrefix?: string[]; + /** Whether network traffic is allowed or denied. */ + access?: SecurityRuleAccess; + /** The priority of the rule. */ + priority?: number; + /** The direction of the rule. */ + direction?: SecurityRuleDirection; +} + +export function effectiveNetworkSecurityRuleDeserializer(item: any): EffectiveNetworkSecurityRule { + return { + name: item["name"], + protocol: item["protocol"], + sourcePortRange: item["sourcePortRange"], + destinationPortRange: item["destinationPortRange"], + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + sourceAddressPrefix: item["sourceAddressPrefix"], + destinationAddressPrefix: item["destinationAddressPrefix"], + sourceAddressPrefixes: !item["sourceAddressPrefixes"] + ? item["sourceAddressPrefixes"] + : item["sourceAddressPrefixes"].map((p: any) => { + return p; + }), + destinationAddressPrefixes: !item["destinationAddressPrefixes"] + ? item["destinationAddressPrefixes"] + : item["destinationAddressPrefixes"].map((p: any) => { + return p; + }), + expandedSourceAddressPrefix: !item["expandedSourceAddressPrefix"] + ? item["expandedSourceAddressPrefix"] + : item["expandedSourceAddressPrefix"].map((p: any) => { + return p; + }), + expandedDestinationAddressPrefix: !item["expandedDestinationAddressPrefix"] + ? item["expandedDestinationAddressPrefix"] + : item["expandedDestinationAddressPrefix"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + }; +} + +/** The network protocol this rule applies to. */ +export enum KnownEffectiveSecurityRuleProtocol { + /** Tcp */ + Tcp = "Tcp", + /** Udp */ + Udp = "Udp", + /** All */ + All = "All", +} + +/** + * The network protocol this rule applies to. \ + * {@link KnownEffectiveSecurityRuleProtocol} can be used interchangeably with EffectiveSecurityRuleProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Tcp**: Tcp \ + * **Udp**: Udp \ + * **All**: All + */ +export type EffectiveSecurityRuleProtocol = string; + +/** Response for GetPublicIpAddressDdosProtectionStatusOperation API service call. */ +export interface PublicIpDdosProtectionStatusResult { + /** Public IP ARM resource ID */ + publicIpAddressId?: string; + /** IP Address of the Public IP Resource */ + publicIpAddress?: string; + /** Value indicating whether the IP address is DDoS workload protected or not. */ + isWorkloadProtected?: IsWorkloadProtected; + /** DDoS protection plan Resource Id of a if IP address is protected through a plan. */ + ddosProtectionPlanId?: string; +} + +export function publicIpDdosProtectionStatusResultDeserializer( + item: any, +): PublicIpDdosProtectionStatusResult { + return { + publicIpAddressId: item["publicIpAddressId"], + publicIpAddress: item["publicIpAddress"], + isWorkloadProtected: item["isWorkloadProtected"], + ddosProtectionPlanId: item["ddosProtectionPlanId"], + }; +} + +/** Value indicating whether the IP address is DDoS workload protected or not. */ +export enum KnownIsWorkloadProtected { + /** False */ + False = "False", + /** True */ + True = "True", +} + +/** + * Value indicating whether the IP address is DDoS workload protected or not. \ + * {@link KnownIsWorkloadProtected} can be used interchangeably with IsWorkloadProtected, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **False**: False \ + * **True**: True + */ +export type IsWorkloadProtected = string; + +/** The request for ReserveCloudServicePublicIpAddressOperation. */ +export interface ReserveCloudServicePublicIpAddressRequest { + /** When true, reverts from Static to Dynamic allocation (undo reservation). */ + isRollback: IsRollback; +} + +export function reserveCloudServicePublicIpAddressRequestSerializer( + item: ReserveCloudServicePublicIpAddressRequest, +): any { + return { isRollback: item["isRollback"] }; +} + +/** When true, reverts from Static to Dynamic allocation (undo reservation). */ +export enum KnownIsRollback { + /** true */ + True = "true", + /** false */ + False = "false", +} + +/** + * When true, reverts from Static to Dynamic allocation (undo reservation). \ + * {@link KnownIsRollback} can be used interchangeably with IsRollback, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true**: true \ + * **false**: false + */ +export type IsRollback = string; + +/** The request for DisassociateCloudServicePublicIpOperation. */ +export interface DisassociateCloudServicePublicIpRequest { + /** ARM ID of the Standalone Public IP to associate. This is of the form : /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName} */ + publicIpArmId: string; +} + +export function disassociateCloudServicePublicIpRequestSerializer( + item: DisassociateCloudServicePublicIpRequest, +): any { + return { publicIpArmId: item["publicIpArmId"] }; +} + +/** A DDoS custom policy in a resource group. */ +export interface DdosCustomPolicy extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. */ + readonly resourceGuid?: string; + /** The provisioning state of the DDoS custom policy resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The list of DDoS detection rules associated with the custom policy. */ + detectionRules?: DdosDetectionRule[]; + /** The list of frontend IP configurations associated with the custom policy. */ + frontEndIpConfiguration?: SubResource[]; + /** The list of public IP addresses associated with the custom policy. This list is read-only. */ + readonly publicIPAddresses?: SubResource[]; +} + +export function ddosCustomPolicySerializer(item: DdosCustomPolicy): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, ["detectionRules", "frontEndIpConfiguration"]) + ? undefined + : _ddosCustomPolicyPropertiesSerializer(item), + }; +} + +export function ddosCustomPolicyDeserializer(item: any): DdosCustomPolicy { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _ddosCustomPolicyPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** DDoS custom policy properties. */ +export interface DdosCustomPolicyPropertiesFormat { + /** The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. */ + readonly resourceGuid?: string; + /** The provisioning state of the DDoS custom policy resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The list of DDoS detection rules associated with the custom policy. */ + detectionRules?: DdosDetectionRule[]; + /** The list of frontend IP configurations associated with the custom policy. */ + frontEndIpConfiguration?: SubResource[]; + /** The list of public IP addresses associated with the custom policy. This list is read-only. */ + readonly publicIPAddresses?: SubResource[]; +} + +export function ddosCustomPolicyPropertiesFormatSerializer( + item: DdosCustomPolicyPropertiesFormat, +): any { + return { + detectionRules: !item["detectionRules"] + ? item["detectionRules"] + : ddosDetectionRuleArraySerializer(item["detectionRules"]), + frontEndIpConfiguration: !item["frontEndIpConfiguration"] + ? item["frontEndIpConfiguration"] + : subResourceArraySerializer(item["frontEndIpConfiguration"]), + }; +} + +export function ddosCustomPolicyPropertiesFormatDeserializer( + item: any, +): DdosCustomPolicyPropertiesFormat { + return { + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + detectionRules: !item["detectionRules"] + ? item["detectionRules"] + : ddosDetectionRuleArrayDeserializer(item["detectionRules"]), + frontEndIpConfiguration: !item["frontEndIpConfiguration"] + ? item["frontEndIpConfiguration"] + : subResourceArrayDeserializer(item["frontEndIpConfiguration"]), + publicIPAddresses: !item["publicIPAddresses"] + ? item["publicIPAddresses"] + : subResourceArrayDeserializer(item["publicIPAddresses"]), + }; +} + +export function ddosDetectionRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return ddosDetectionRuleSerializer(item); + }); +} + +export function ddosDetectionRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ddosDetectionRuleDeserializer(item); + }); +} + +/** A DDoS detection rule resource. */ +export interface DdosDetectionRule extends SubResource { + /** The name of the DDoS detection rule. */ + name?: string; + /** The resource ID of the DDoS detection rule. */ + readonly id?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The resource type. */ + readonly type?: string; + /** The provisioning state of the DDoS detection rule. */ + readonly provisioningState?: CommonProvisioningState; + /** The detection mode for the DDoS detection rule. */ + detectionMode?: DdosDetectionMode; + /** The traffic detection rule details. */ + trafficDetectionRule?: TrafficDetectionRule; +} + +export function ddosDetectionRuleSerializer(item: DdosDetectionRule): any { + return { + name: item["name"], + properties: areAllPropsUndefined(item, ["detectionMode", "trafficDetectionRule"]) + ? undefined + : _ddosDetectionRulePropertiesSerializer(item), + }; +} + +export function ddosDetectionRuleDeserializer(item: any): DdosDetectionRule { + return { + id: item["id"], + name: item["name"], + etag: item["etag"], + type: item["type"], + ...(!item["properties"] + ? item["properties"] + : _ddosDetectionRulePropertiesDeserializer(item["properties"])), + }; +} + +/** DDoS detection rule properties. */ +export interface DdosDetectionRulePropertiesFormat { + /** The provisioning state of the DDoS detection rule. */ + readonly provisioningState?: CommonProvisioningState; + /** The detection mode for the DDoS detection rule. */ + detectionMode?: DdosDetectionMode; + /** The traffic detection rule details. */ + trafficDetectionRule?: TrafficDetectionRule; +} + +export function ddosDetectionRulePropertiesFormatSerializer( + item: DdosDetectionRulePropertiesFormat, +): any { + return { + detectionMode: item["detectionMode"], + trafficDetectionRule: !item["trafficDetectionRule"] + ? item["trafficDetectionRule"] + : trafficDetectionRuleSerializer(item["trafficDetectionRule"]), + }; +} + +export function ddosDetectionRulePropertiesFormatDeserializer( + item: any, +): DdosDetectionRulePropertiesFormat { + return { + provisioningState: item["provisioningState"], + detectionMode: item["detectionMode"], + trafficDetectionRule: !item["trafficDetectionRule"] + ? item["trafficDetectionRule"] + : trafficDetectionRuleDeserializer(item["trafficDetectionRule"]), + }; +} + +/** The detection mode for the DDoS detection rule. */ +export enum KnownDdosDetectionMode { + /** TrafficThreshold */ + TrafficThreshold = "TrafficThreshold", +} + +/** + * The detection mode for the DDoS detection rule. \ + * {@link KnownDdosDetectionMode} can be used interchangeably with DdosDetectionMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TrafficThreshold**: TrafficThreshold + */ +export type DdosDetectionMode = string; + +/** Ddos Custom Policy traffic detection rule. */ +export interface TrafficDetectionRule { + /** The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon. */ + trafficType?: DdosTrafficType; + /** The customized packets per second threshold. */ + packetsPerSecond?: number; +} + +export function trafficDetectionRuleSerializer(item: TrafficDetectionRule): any { + return { trafficType: item["trafficType"], packetsPerSecond: item["packetsPerSecond"] }; +} + +export function trafficDetectionRuleDeserializer(item: any): TrafficDetectionRule { + return { + trafficType: item["trafficType"], + packetsPerSecond: item["packetsPerSecond"], + }; +} + +/** The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon. */ +export enum KnownDdosTrafficType { + /** Tcp */ + Tcp = "Tcp", + /** Udp */ + Udp = "Udp", + /** TcpSyn */ + TcpSyn = "TcpSyn", +} + +/** + * The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon. \ + * {@link KnownDdosTrafficType} can be used interchangeably with DdosTrafficType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Tcp**: Tcp \ + * **Udp**: Udp \ + * **TcpSyn**: TcpSyn + */ +export type DdosTrafficType = string; + +export function ddosCustomPolicyArraySerializer(result: Array): any[] { + return result.map((item) => { + return ddosCustomPolicySerializer(item); + }); +} + +export function ddosCustomPolicyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ddosCustomPolicyDeserializer(item); + }); +} + +/** A DDoS protection plan in a resource group. */ +export interface DdosProtectionPlan extends TrackedResourceWithOptionalLocation { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. */ + readonly resourceGuid?: string; + /** The provisioning state of the DDoS protection plan resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The list of public IPs associated with the DDoS protection plan resource. This list is read-only. */ + readonly publicIPAddresses?: SubResource[]; + /** The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. */ + readonly virtualNetworks?: SubResource[]; +} + +export function ddosProtectionPlanSerializer(item: DdosProtectionPlan): any { + return { + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, []) + ? undefined + : _ddosProtectionPlanPropertiesSerializer(item), + }; +} + +export function ddosProtectionPlanDeserializer(item: any): DdosProtectionPlan { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _ddosProtectionPlanPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** DDoS protection plan properties. */ +export interface DdosProtectionPlanPropertiesFormat { + /** The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. */ + readonly resourceGuid?: string; + /** The provisioning state of the DDoS protection plan resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The list of public IPs associated with the DDoS protection plan resource. This list is read-only. */ + readonly publicIPAddresses?: SubResource[]; + /** The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. */ + readonly virtualNetworks?: SubResource[]; +} + +export function ddosProtectionPlanPropertiesFormatSerializer( + _item: DdosProtectionPlanPropertiesFormat, +): any { + return {}; +} + +export function ddosProtectionPlanPropertiesFormatDeserializer( + item: any, +): DdosProtectionPlanPropertiesFormat { + return { + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + publicIPAddresses: !item["publicIPAddresses"] + ? item["publicIPAddresses"] + : subResourceArrayDeserializer(item["publicIPAddresses"]), + virtualNetworks: !item["virtualNetworks"] + ? item["virtualNetworks"] + : subResourceArrayDeserializer(item["virtualNetworks"]), + }; +} + +export function ddosProtectionPlanArraySerializer(result: Array): any[] { + return result.map((item) => { + return ddosProtectionPlanSerializer(item); + }); +} + +export function ddosProtectionPlanArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ddosProtectionPlanDeserializer(item); + }); +} + +/** Authorization in an ExpressRouteCircuit resource. */ +export interface ExpressRouteCircuitAuthorization extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The authorization key. */ + authorizationKey?: string; + /** The authorization use status. */ + authorizationUseStatus?: AuthorizationUseStatus; + /** The reference to the ExpressRoute connection resource using the authorization. */ + readonly connectionResourceUri?: string; + /** The provisioning state of the authorization resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function expressRouteCircuitAuthorizationSerializer( + item: ExpressRouteCircuitAuthorization, +): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["authorizationKey", "authorizationUseStatus"]) + ? undefined + : _expressRouteCircuitAuthorizationPropertiesSerializer(item), + }; +} + +export function expressRouteCircuitAuthorizationDeserializer( + item: any, +): ExpressRouteCircuitAuthorization { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _expressRouteCircuitAuthorizationPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of ExpressRouteCircuitAuthorization. */ +export interface AuthorizationPropertiesFormat { + /** The authorization key. */ + authorizationKey?: string; + /** The authorization use status. */ + authorizationUseStatus?: AuthorizationUseStatus; + /** The reference to the ExpressRoute connection resource using the authorization. */ + readonly connectionResourceUri?: string; + /** The provisioning state of the authorization resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function authorizationPropertiesFormatSerializer(item: AuthorizationPropertiesFormat): any { + return { + authorizationKey: item["authorizationKey"], + authorizationUseStatus: item["authorizationUseStatus"], + }; +} + +export function authorizationPropertiesFormatDeserializer( + item: any, +): AuthorizationPropertiesFormat { + return { + authorizationKey: item["authorizationKey"], + authorizationUseStatus: item["authorizationUseStatus"], + connectionResourceUri: item["connectionResourceUri"], + provisioningState: item["provisioningState"], + }; +} + +/** The authorization use status. */ +export enum KnownAuthorizationUseStatus { + /** Available */ + Available = "Available", + /** InUse */ + InUse = "InUse", +} + +/** + * The authorization use status. \ + * {@link KnownAuthorizationUseStatus} can be used interchangeably with AuthorizationUseStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available**: Available \ + * **InUse**: InUse + */ +export type AuthorizationUseStatus = string; + +/** Paged collection of ExpressRouteCircuitAuthorization items */ +export interface _AuthorizationListResult { + /** The ExpressRouteCircuitAuthorization items on this page */ + value: ExpressRouteCircuitAuthorization[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _authorizationListResultDeserializer(item: any): _AuthorizationListResult { + return { + value: expressRouteCircuitAuthorizationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function expressRouteCircuitAuthorizationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCircuitAuthorizationSerializer(item); + }); +} + +export function expressRouteCircuitAuthorizationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCircuitAuthorizationDeserializer(item); + }); +} + +/** ExpressRouteCircuit resource. */ +export interface ExpressRouteCircuit extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The SKU. */ + sku?: ExpressRouteCircuitSku; + /** Allow classic operations. */ + allowClassicOperations?: boolean; + /** The CircuitProvisioningState state of the resource. */ + circuitProvisioningState?: string; + /** The ServiceProviderProvisioningState state of the resource. */ + serviceProviderProvisioningState?: ServiceProviderProvisioningState; + /** The list of authorizations. */ + authorizations?: ExpressRouteCircuitAuthorization[]; + /** The list of peerings. */ + peerings?: ExpressRouteCircuitPeering[]; + /** The ServiceKey. */ + serviceKey?: string; + /** The ServiceProviderNotes. */ + serviceProviderNotes?: string; + /** The ServiceProviderProperties. */ + serviceProviderProperties?: ExpressRouteCircuitServiceProviderProperties; + /** The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. */ + expressRoutePort?: SubResource; + /** The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. */ + bandwidthInGbps?: number; + /** The identifier of the circuit traffic. Outer tag for QinQ encapsulation. */ + readonly stag?: number; + /** The provisioning state of the express route circuit resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The GatewayManager Etag. */ + gatewayManagerEtag?: string; + /** Flag denoting global reach status. */ + globalReachEnabled?: boolean; + /** The authorizationKey. */ + authorizationKey?: string; + /** The authorization status of the Circuit. */ + readonly authorizationStatus?: string; + /** Flag denoting rate-limiting status of the ExpressRoute direct-port circuit. */ + enableDirectPortRateLimit?: boolean; +} + +export function expressRouteCircuitSerializer(item: ExpressRouteCircuit): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "allowClassicOperations", + "circuitProvisioningState", + "serviceProviderProvisioningState", + "authorizations", + "peerings", + "serviceKey", + "serviceProviderNotes", + "serviceProviderProperties", + "expressRoutePort", + "bandwidthInGbps", + "gatewayManagerEtag", + "globalReachEnabled", + "authorizationKey", + "enableDirectPortRateLimit", + ]) + ? undefined + : _expressRouteCircuitPropertiesSerializer(item), + sku: !item["sku"] ? item["sku"] : expressRouteCircuitSkuSerializer(item["sku"]), + }; +} + +export function expressRouteCircuitDeserializer(item: any): ExpressRouteCircuit { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _expressRouteCircuitPropertiesDeserializer(item["properties"])), + etag: item["etag"], + sku: !item["sku"] ? item["sku"] : expressRouteCircuitSkuDeserializer(item["sku"]), + }; +} + +/** Properties of ExpressRouteCircuit. */ +export interface ExpressRouteCircuitPropertiesFormat { + /** Allow classic operations. */ + allowClassicOperations?: boolean; + /** The CircuitProvisioningState state of the resource. */ + circuitProvisioningState?: string; + /** The ServiceProviderProvisioningState state of the resource. */ + serviceProviderProvisioningState?: ServiceProviderProvisioningState; + /** The list of authorizations. */ + authorizations?: ExpressRouteCircuitAuthorization[]; + /** The list of peerings. */ + peerings?: ExpressRouteCircuitPeering[]; + /** The ServiceKey. */ + serviceKey?: string; + /** The ServiceProviderNotes. */ + serviceProviderNotes?: string; + /** The ServiceProviderProperties. */ + serviceProviderProperties?: ExpressRouteCircuitServiceProviderProperties; + /** The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. */ + expressRoutePort?: SubResource; + /** The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. */ + bandwidthInGbps?: number; + /** The identifier of the circuit traffic. Outer tag for QinQ encapsulation. */ + readonly stag?: number; + /** The provisioning state of the express route circuit resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The GatewayManager Etag. */ + gatewayManagerEtag?: string; + /** Flag denoting global reach status. */ + globalReachEnabled?: boolean; + /** The authorizationKey. */ + authorizationKey?: string; + /** The authorization status of the Circuit. */ + readonly authorizationStatus?: string; + /** Flag denoting rate-limiting status of the ExpressRoute direct-port circuit. */ + enableDirectPortRateLimit?: boolean; +} + +export function expressRouteCircuitPropertiesFormatSerializer( + item: ExpressRouteCircuitPropertiesFormat, +): any { + return { + allowClassicOperations: item["allowClassicOperations"], + circuitProvisioningState: item["circuitProvisioningState"], + serviceProviderProvisioningState: item["serviceProviderProvisioningState"], + authorizations: !item["authorizations"] + ? item["authorizations"] + : expressRouteCircuitAuthorizationArraySerializer(item["authorizations"]), + peerings: !item["peerings"] + ? item["peerings"] + : expressRouteCircuitPeeringArraySerializer(item["peerings"]), + serviceKey: item["serviceKey"], + serviceProviderNotes: item["serviceProviderNotes"], + serviceProviderProperties: !item["serviceProviderProperties"] + ? item["serviceProviderProperties"] + : expressRouteCircuitServiceProviderPropertiesSerializer(item["serviceProviderProperties"]), + expressRoutePort: !item["expressRoutePort"] + ? item["expressRoutePort"] + : subResourceSerializer(item["expressRoutePort"]), + bandwidthInGbps: item["bandwidthInGbps"], + gatewayManagerEtag: item["gatewayManagerEtag"], + globalReachEnabled: item["globalReachEnabled"], + authorizationKey: item["authorizationKey"], + enableDirectPortRateLimit: item["enableDirectPortRateLimit"], + }; +} + +export function expressRouteCircuitPropertiesFormatDeserializer( + item: any, +): ExpressRouteCircuitPropertiesFormat { + return { + allowClassicOperations: item["allowClassicOperations"], + circuitProvisioningState: item["circuitProvisioningState"], + serviceProviderProvisioningState: item["serviceProviderProvisioningState"], + authorizations: !item["authorizations"] + ? item["authorizations"] + : expressRouteCircuitAuthorizationArrayDeserializer(item["authorizations"]), + peerings: !item["peerings"] + ? item["peerings"] + : expressRouteCircuitPeeringArrayDeserializer(item["peerings"]), + serviceKey: item["serviceKey"], + serviceProviderNotes: item["serviceProviderNotes"], + serviceProviderProperties: !item["serviceProviderProperties"] + ? item["serviceProviderProperties"] + : expressRouteCircuitServiceProviderPropertiesDeserializer(item["serviceProviderProperties"]), + expressRoutePort: !item["expressRoutePort"] + ? item["expressRoutePort"] + : subResourceDeserializer(item["expressRoutePort"]), + bandwidthInGbps: item["bandwidthInGbps"], + stag: item["stag"], + provisioningState: item["provisioningState"], + gatewayManagerEtag: item["gatewayManagerEtag"], + globalReachEnabled: item["globalReachEnabled"], + authorizationKey: item["authorizationKey"], + authorizationStatus: item["authorizationStatus"], + enableDirectPortRateLimit: item["enableDirectPortRateLimit"], + }; +} + +/** The ServiceProviderProvisioningState state of the resource. */ +export enum KnownServiceProviderProvisioningState { + /** NotProvisioned */ + NotProvisioned = "NotProvisioned", + /** Provisioning */ + Provisioning = "Provisioning", + /** Provisioned */ + Provisioned = "Provisioned", + /** Deprovisioning */ + Deprovisioning = "Deprovisioning", +} + +/** + * The ServiceProviderProvisioningState state of the resource. \ + * {@link KnownServiceProviderProvisioningState} can be used interchangeably with ServiceProviderProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotProvisioned**: NotProvisioned \ + * **Provisioning**: Provisioning \ + * **Provisioned**: Provisioned \ + * **Deprovisioning**: Deprovisioning + */ +export type ServiceProviderProvisioningState = string; + +export function expressRouteCircuitPeeringArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCircuitPeeringSerializer(item); + }); +} + +export function expressRouteCircuitPeeringArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCircuitPeeringDeserializer(item); + }); +} + +/** Peering in an ExpressRouteCircuit resource. */ +export interface ExpressRouteCircuitPeering extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The peering type. */ + peeringType?: ExpressRoutePeeringType; + /** The peering state. */ + state?: ExpressRoutePeeringState; + /** The Azure ASN. */ + azureASN?: number; + /** The peer ASN. */ + peerASN?: number; + /** The primary address prefix. */ + primaryPeerAddressPrefix?: string; + /** The secondary address prefix. */ + secondaryPeerAddressPrefix?: string; + /** The primary port. */ + primaryAzurePort?: string; + /** The secondary port. */ + secondaryAzurePort?: string; + /** The shared key. */ + sharedKey?: string; + /** The VLAN ID. */ + vlanId?: number; + /** The Microsoft peering configuration. */ + microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; + /** The peering stats of express route circuit. */ + stats?: ExpressRouteCircuitStats; + /** The provisioning state of the express route circuit peering resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The GatewayManager Etag. */ + gatewayManagerEtag?: string; + /** Who was the last to modify the peering. */ + readonly lastModifiedBy?: string; + /** The reference to the RouteFilter resource. */ + routeFilter?: SubResource; + /** The IPv6 peering configuration. */ + ipv6PeeringConfig?: Ipv6ExpressRouteCircuitPeeringConfig; + /** The ExpressRoute connection. */ + expressRouteConnection?: ExpressRouteConnectionId; + /** The list of circuit connections associated with Azure Private Peering for this circuit. */ + connections?: ExpressRouteCircuitConnection[]; + /** The list of peered circuit connections associated with Azure Private Peering for this circuit. */ + readonly peeredConnections?: PeerExpressRouteCircuitConnection[]; +} + +export function expressRouteCircuitPeeringSerializer(item: ExpressRouteCircuitPeering): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "peeringType", + "state", + "azureASN", + "peerASN", + "primaryPeerAddressPrefix", + "secondaryPeerAddressPrefix", + "primaryAzurePort", + "secondaryAzurePort", + "sharedKey", + "vlanId", + "microsoftPeeringConfig", + "stats", + "gatewayManagerEtag", + "routeFilter", + "ipv6PeeringConfig", + "expressRouteConnection", + "connections", + ]) + ? undefined + : _expressRouteCircuitPeeringPropertiesSerializer(item), + }; +} + +export function expressRouteCircuitPeeringDeserializer(item: any): ExpressRouteCircuitPeering { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _expressRouteCircuitPeeringPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the express route circuit peering. */ +export interface ExpressRouteCircuitPeeringPropertiesFormat { + /** The peering type. */ + peeringType?: ExpressRoutePeeringType; + /** The peering state. */ + state?: ExpressRoutePeeringState; + /** The Azure ASN. */ + azureASN?: number; + /** The peer ASN. */ + peerASN?: number; + /** The primary address prefix. */ + primaryPeerAddressPrefix?: string; + /** The secondary address prefix. */ + secondaryPeerAddressPrefix?: string; + /** The primary port. */ + primaryAzurePort?: string; + /** The secondary port. */ + secondaryAzurePort?: string; + /** The shared key. */ + sharedKey?: string; + /** The VLAN ID. */ + vlanId?: number; + /** The Microsoft peering configuration. */ + microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; + /** The peering stats of express route circuit. */ + stats?: ExpressRouteCircuitStats; + /** The provisioning state of the express route circuit peering resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The GatewayManager Etag. */ + gatewayManagerEtag?: string; + /** Who was the last to modify the peering. */ + readonly lastModifiedBy?: string; + /** The reference to the RouteFilter resource. */ + routeFilter?: SubResource; + /** The IPv6 peering configuration. */ + ipv6PeeringConfig?: Ipv6ExpressRouteCircuitPeeringConfig; + /** The ExpressRoute connection. */ + expressRouteConnection?: ExpressRouteConnectionId; + /** The list of circuit connections associated with Azure Private Peering for this circuit. */ + connections?: ExpressRouteCircuitConnection[]; + /** The list of peered circuit connections associated with Azure Private Peering for this circuit. */ + readonly peeredConnections?: PeerExpressRouteCircuitConnection[]; +} + +export function expressRouteCircuitPeeringPropertiesFormatSerializer( + item: ExpressRouteCircuitPeeringPropertiesFormat, +): any { + return { + peeringType: item["peeringType"], + state: item["state"], + azureASN: item["azureASN"], + peerASN: item["peerASN"], + primaryPeerAddressPrefix: item["primaryPeerAddressPrefix"], + secondaryPeerAddressPrefix: item["secondaryPeerAddressPrefix"], + primaryAzurePort: item["primaryAzurePort"], + secondaryAzurePort: item["secondaryAzurePort"], + sharedKey: item["sharedKey"], + vlanId: item["vlanId"], + microsoftPeeringConfig: !item["microsoftPeeringConfig"] + ? item["microsoftPeeringConfig"] + : expressRouteCircuitPeeringConfigSerializer(item["microsoftPeeringConfig"]), + stats: !item["stats"] ? item["stats"] : expressRouteCircuitStatsSerializer(item["stats"]), + gatewayManagerEtag: item["gatewayManagerEtag"], + routeFilter: !item["routeFilter"] + ? item["routeFilter"] + : subResourceSerializer(item["routeFilter"]), + ipv6PeeringConfig: !item["ipv6PeeringConfig"] + ? item["ipv6PeeringConfig"] + : ipv6ExpressRouteCircuitPeeringConfigSerializer(item["ipv6PeeringConfig"]), + expressRouteConnection: !item["expressRouteConnection"] + ? item["expressRouteConnection"] + : expressRouteConnectionIdSerializer(item["expressRouteConnection"]), + connections: !item["connections"] + ? item["connections"] + : expressRouteCircuitConnectionArraySerializer(item["connections"]), + }; +} + +export function expressRouteCircuitPeeringPropertiesFormatDeserializer( + item: any, +): ExpressRouteCircuitPeeringPropertiesFormat { + return { + peeringType: item["peeringType"], + state: item["state"], + azureASN: item["azureASN"], + peerASN: item["peerASN"], + primaryPeerAddressPrefix: item["primaryPeerAddressPrefix"], + secondaryPeerAddressPrefix: item["secondaryPeerAddressPrefix"], + primaryAzurePort: item["primaryAzurePort"], + secondaryAzurePort: item["secondaryAzurePort"], + sharedKey: item["sharedKey"], + vlanId: item["vlanId"], + microsoftPeeringConfig: !item["microsoftPeeringConfig"] + ? item["microsoftPeeringConfig"] + : expressRouteCircuitPeeringConfigDeserializer(item["microsoftPeeringConfig"]), + stats: !item["stats"] ? item["stats"] : expressRouteCircuitStatsDeserializer(item["stats"]), + provisioningState: item["provisioningState"], + gatewayManagerEtag: item["gatewayManagerEtag"], + lastModifiedBy: item["lastModifiedBy"], + routeFilter: !item["routeFilter"] + ? item["routeFilter"] + : subResourceDeserializer(item["routeFilter"]), + ipv6PeeringConfig: !item["ipv6PeeringConfig"] + ? item["ipv6PeeringConfig"] + : ipv6ExpressRouteCircuitPeeringConfigDeserializer(item["ipv6PeeringConfig"]), + expressRouteConnection: !item["expressRouteConnection"] + ? item["expressRouteConnection"] + : expressRouteConnectionIdDeserializer(item["expressRouteConnection"]), + connections: !item["connections"] + ? item["connections"] + : expressRouteCircuitConnectionArrayDeserializer(item["connections"]), + peeredConnections: !item["peeredConnections"] + ? item["peeredConnections"] + : peerExpressRouteCircuitConnectionArrayDeserializer(item["peeredConnections"]), + }; +} + +/** The peering type. */ +export enum KnownExpressRoutePeeringType { + /** AzurePublicPeering */ + AzurePublicPeering = "AzurePublicPeering", + /** AzurePrivatePeering */ + AzurePrivatePeering = "AzurePrivatePeering", + /** MicrosoftPeering */ + MicrosoftPeering = "MicrosoftPeering", +} + +/** + * The peering type. \ + * {@link KnownExpressRoutePeeringType} can be used interchangeably with ExpressRoutePeeringType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzurePublicPeering**: AzurePublicPeering \ + * **AzurePrivatePeering**: AzurePrivatePeering \ + * **MicrosoftPeering**: MicrosoftPeering + */ +export type ExpressRoutePeeringType = string; + +/** The state of peering. */ +export enum KnownExpressRoutePeeringState { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", +} + +/** + * The state of peering. \ + * {@link KnownExpressRoutePeeringState} can be used interchangeably with ExpressRoutePeeringState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled**: Disabled \ + * **Enabled**: Enabled + */ +export type ExpressRoutePeeringState = string; + +/** Specifies the peering configuration. */ +export interface ExpressRouteCircuitPeeringConfig { + /** The reference to AdvertisedPublicPrefixes. */ + advertisedPublicPrefixes?: string[]; + /** The communities of bgp peering. Specified for microsoft peering. */ + advertisedCommunities?: string[]; + /** The advertised public prefix state of the Peering resource. */ + readonly advertisedPublicPrefixesState?: ExpressRouteCircuitPeeringAdvertisedPublicPrefixState; + /** The legacy mode of the peering. */ + legacyMode?: number; + /** The CustomerASN of the peering. */ + customerASN?: number; + /** The RoutingRegistryName of the configuration. */ + routingRegistryName?: string; + /** List of Prefix information required to perform validation. */ + advertisedPublicPrefixInfo?: AdvertisedPublicPrefixProperties[]; +} + +export function expressRouteCircuitPeeringConfigSerializer( + item: ExpressRouteCircuitPeeringConfig, +): any { + return { + advertisedPublicPrefixes: !item["advertisedPublicPrefixes"] + ? item["advertisedPublicPrefixes"] + : item["advertisedPublicPrefixes"].map((p: any) => { + return p; + }), + advertisedCommunities: !item["advertisedCommunities"] + ? item["advertisedCommunities"] + : item["advertisedCommunities"].map((p: any) => { + return p; + }), + legacyMode: item["legacyMode"], + customerASN: item["customerASN"], + routingRegistryName: item["routingRegistryName"], + advertisedPublicPrefixInfo: !item["advertisedPublicPrefixInfo"] + ? item["advertisedPublicPrefixInfo"] + : advertisedPublicPrefixPropertiesArraySerializer(item["advertisedPublicPrefixInfo"]), + }; +} + +export function expressRouteCircuitPeeringConfigDeserializer( + item: any, +): ExpressRouteCircuitPeeringConfig { + return { + advertisedPublicPrefixes: !item["advertisedPublicPrefixes"] + ? item["advertisedPublicPrefixes"] + : item["advertisedPublicPrefixes"].map((p: any) => { + return p; + }), + advertisedCommunities: !item["advertisedCommunities"] + ? item["advertisedCommunities"] + : item["advertisedCommunities"].map((p: any) => { + return p; + }), + advertisedPublicPrefixesState: item["advertisedPublicPrefixesState"], + legacyMode: item["legacyMode"], + customerASN: item["customerASN"], + routingRegistryName: item["routingRegistryName"], + advertisedPublicPrefixInfo: !item["advertisedPublicPrefixInfo"] + ? item["advertisedPublicPrefixInfo"] + : advertisedPublicPrefixPropertiesArrayDeserializer(item["advertisedPublicPrefixInfo"]), + }; +} + +/** The advertised public prefix state of the Peering resource. */ +export enum KnownExpressRouteCircuitPeeringAdvertisedPublicPrefixState { + /** NotConfigured */ + NotConfigured = "NotConfigured", + /** Configuring */ + Configuring = "Configuring", + /** Configured */ + Configured = "Configured", + /** ValidationNeeded */ + ValidationNeeded = "ValidationNeeded", +} + +/** + * The advertised public prefix state of the Peering resource. \ + * {@link KnownExpressRouteCircuitPeeringAdvertisedPublicPrefixState} can be used interchangeably with ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotConfigured**: NotConfigured \ + * **Configuring**: Configuring \ + * **Configured**: Configured \ + * **ValidationNeeded**: ValidationNeeded + */ +export type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = string; + +export function advertisedPublicPrefixPropertiesArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return advertisedPublicPrefixPropertiesSerializer(item); + }); +} + +export function advertisedPublicPrefixPropertiesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return advertisedPublicPrefixPropertiesDeserializer(item); + }); +} + +/** Prefix properties required to perform validation using openssl signature. */ +export interface AdvertisedPublicPrefixProperties { + /** Advertised Public Prefix. */ + prefix?: string; + /** Validation string that contains circuit peering info. */ + validationId?: string; + /** Signed string generated by encrypting validationId with a private key. */ + signature?: string; + /** Advertised Public Prefix State that denotes if the prefix is validated or not. */ + readonly validationState?: AdvertisedPublicPrefixPropertiesValidationState; +} + +export function advertisedPublicPrefixPropertiesSerializer( + item: AdvertisedPublicPrefixProperties, +): any { + return { + prefix: item["prefix"], + validationId: item["validationId"], + signature: item["signature"], + }; +} + +export function advertisedPublicPrefixPropertiesDeserializer( + item: any, +): AdvertisedPublicPrefixProperties { + return { + prefix: item["prefix"], + validationId: item["validationId"], + signature: item["signature"], + validationState: item["validationState"], + }; +} + +/** Advertised Public Prefix State that denotes if the prefix is validated or not. */ +export enum KnownAdvertisedPublicPrefixPropertiesValidationState { + /** NotConfigured */ + NotConfigured = "NotConfigured", + /** Configuring */ + Configuring = "Configuring", + /** Configured */ + Configured = "Configured", + /** ValidationNeeded */ + ValidationNeeded = "ValidationNeeded", + /** ValidationFailed */ + ValidationFailed = "ValidationFailed", + /** ManualValidationNeeded */ + ManualValidationNeeded = "ManualValidationNeeded", + /** AsnValidationFailed */ + AsnValidationFailed = "AsnValidationFailed", + /** CertificateMissingInRoutingRegistry */ + CertificateMissingInRoutingRegistry = "CertificateMissingInRoutingRegistry", + /** InvalidSignatureEncoding */ + InvalidSignatureEncoding = "InvalidSignatureEncoding", + /** SignatureVerificationFailed */ + SignatureVerificationFailed = "SignatureVerificationFailed", +} + +/** + * Advertised Public Prefix State that denotes if the prefix is validated or not. \ + * {@link KnownAdvertisedPublicPrefixPropertiesValidationState} can be used interchangeably with AdvertisedPublicPrefixPropertiesValidationState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotConfigured**: NotConfigured \ + * **Configuring**: Configuring \ + * **Configured**: Configured \ + * **ValidationNeeded**: ValidationNeeded \ + * **ValidationFailed**: ValidationFailed \ + * **ManualValidationNeeded**: ManualValidationNeeded \ + * **AsnValidationFailed**: AsnValidationFailed \ + * **CertificateMissingInRoutingRegistry**: CertificateMissingInRoutingRegistry \ + * **InvalidSignatureEncoding**: InvalidSignatureEncoding \ + * **SignatureVerificationFailed**: SignatureVerificationFailed + */ +export type AdvertisedPublicPrefixPropertiesValidationState = string; + +/** Contains stats associated with the peering. */ +export interface ExpressRouteCircuitStats { + /** The Primary BytesIn of the peering. */ + primarybytesIn?: number; + /** The primary BytesOut of the peering. */ + primarybytesOut?: number; + /** The secondary BytesIn of the peering. */ + secondarybytesIn?: number; + /** The secondary BytesOut of the peering. */ + secondarybytesOut?: number; +} + +export function expressRouteCircuitStatsSerializer(item: ExpressRouteCircuitStats): any { + return { + primarybytesIn: item["primarybytesIn"], + primarybytesOut: item["primarybytesOut"], + secondarybytesIn: item["secondarybytesIn"], + secondarybytesOut: item["secondarybytesOut"], + }; +} + +export function expressRouteCircuitStatsDeserializer(item: any): ExpressRouteCircuitStats { + return { + primarybytesIn: item["primarybytesIn"], + primarybytesOut: item["primarybytesOut"], + secondarybytesIn: item["secondarybytesIn"], + secondarybytesOut: item["secondarybytesOut"], + }; +} + +/** Contains IPv6 peering config. */ +export interface Ipv6ExpressRouteCircuitPeeringConfig { + /** The primary address prefix. */ + primaryPeerAddressPrefix?: string; + /** The secondary address prefix. */ + secondaryPeerAddressPrefix?: string; + /** The Microsoft peering configuration. */ + microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; + /** The reference to the RouteFilter resource. */ + routeFilter?: SubResource; + /** The state of peering. */ + state?: ExpressRouteCircuitPeeringState; +} + +export function ipv6ExpressRouteCircuitPeeringConfigSerializer( + item: Ipv6ExpressRouteCircuitPeeringConfig, +): any { + return { + primaryPeerAddressPrefix: item["primaryPeerAddressPrefix"], + secondaryPeerAddressPrefix: item["secondaryPeerAddressPrefix"], + microsoftPeeringConfig: !item["microsoftPeeringConfig"] + ? item["microsoftPeeringConfig"] + : expressRouteCircuitPeeringConfigSerializer(item["microsoftPeeringConfig"]), + routeFilter: !item["routeFilter"] + ? item["routeFilter"] + : subResourceSerializer(item["routeFilter"]), + state: item["state"], + }; +} + +export function ipv6ExpressRouteCircuitPeeringConfigDeserializer( + item: any, +): Ipv6ExpressRouteCircuitPeeringConfig { + return { + primaryPeerAddressPrefix: item["primaryPeerAddressPrefix"], + secondaryPeerAddressPrefix: item["secondaryPeerAddressPrefix"], + microsoftPeeringConfig: !item["microsoftPeeringConfig"] + ? item["microsoftPeeringConfig"] + : expressRouteCircuitPeeringConfigDeserializer(item["microsoftPeeringConfig"]), + routeFilter: !item["routeFilter"] + ? item["routeFilter"] + : subResourceDeserializer(item["routeFilter"]), + state: item["state"], + }; +} + +/** The state of peering. */ +export enum KnownExpressRouteCircuitPeeringState { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", +} + +/** + * The state of peering. \ + * {@link KnownExpressRouteCircuitPeeringState} can be used interchangeably with ExpressRouteCircuitPeeringState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled**: Disabled \ + * **Enabled**: Enabled + */ +export type ExpressRouteCircuitPeeringState = string; + +/** The ID of the ExpressRouteConnection. */ +export interface ExpressRouteConnectionId { + /** The ID of the ExpressRouteConnection. */ + readonly id?: string; +} + +export function expressRouteConnectionIdSerializer(_item: ExpressRouteConnectionId): any { + return {}; +} + +export function expressRouteConnectionIdDeserializer(item: any): ExpressRouteConnectionId { + return { + id: item["id"], + }; +} + +export function expressRouteCircuitConnectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCircuitConnectionSerializer(item); + }); +} + +export function expressRouteCircuitConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCircuitConnectionDeserializer(item); + }); +} + +/** Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. */ +export interface ExpressRouteCircuitConnection extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. */ + expressRouteCircuitPeering?: SubResource; + /** Reference to Express Route Circuit Private Peering Resource of the peered circuit. */ + peerExpressRouteCircuitPeering?: SubResource; + /** /29 IP address space to carve out Customer addresses for tunnels. */ + addressPrefix?: string; + /** The authorization key. */ + authorizationKey?: string; + /** IPv6 Address PrefixProperties of the express route circuit connection. */ + ipv6CircuitConnectionConfig?: Ipv6CircuitConnectionConfig; + /** Express Route Circuit connection state. */ + readonly circuitConnectionStatus?: CircuitConnectionStatus; + /** The provisioning state of the express route circuit connection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function expressRouteCircuitConnectionSerializer(item: ExpressRouteCircuitConnection): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "expressRouteCircuitPeering", + "peerExpressRouteCircuitPeering", + "addressPrefix", + "authorizationKey", + "ipv6CircuitConnectionConfig", + ]) + ? undefined + : _expressRouteCircuitConnectionPropertiesSerializer(item), + }; +} + +export function expressRouteCircuitConnectionDeserializer( + item: any, +): ExpressRouteCircuitConnection { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _expressRouteCircuitConnectionPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the express route circuit connection. */ +export interface ExpressRouteCircuitConnectionPropertiesFormat { + /** Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. */ + expressRouteCircuitPeering?: SubResource; + /** Reference to Express Route Circuit Private Peering Resource of the peered circuit. */ + peerExpressRouteCircuitPeering?: SubResource; + /** /29 IP address space to carve out Customer addresses for tunnels. */ + addressPrefix?: string; + /** The authorization key. */ + authorizationKey?: string; + /** IPv6 Address PrefixProperties of the express route circuit connection. */ + ipv6CircuitConnectionConfig?: Ipv6CircuitConnectionConfig; + /** Express Route Circuit connection state. */ + readonly circuitConnectionStatus?: CircuitConnectionStatus; + /** The provisioning state of the express route circuit connection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function expressRouteCircuitConnectionPropertiesFormatSerializer( + item: ExpressRouteCircuitConnectionPropertiesFormat, +): any { + return { + expressRouteCircuitPeering: !item["expressRouteCircuitPeering"] + ? item["expressRouteCircuitPeering"] + : subResourceSerializer(item["expressRouteCircuitPeering"]), + peerExpressRouteCircuitPeering: !item["peerExpressRouteCircuitPeering"] + ? item["peerExpressRouteCircuitPeering"] + : subResourceSerializer(item["peerExpressRouteCircuitPeering"]), + addressPrefix: item["addressPrefix"], + authorizationKey: item["authorizationKey"], + ipv6CircuitConnectionConfig: !item["ipv6CircuitConnectionConfig"] + ? item["ipv6CircuitConnectionConfig"] + : ipv6CircuitConnectionConfigSerializer(item["ipv6CircuitConnectionConfig"]), + }; +} + +export function expressRouteCircuitConnectionPropertiesFormatDeserializer( + item: any, +): ExpressRouteCircuitConnectionPropertiesFormat { + return { + expressRouteCircuitPeering: !item["expressRouteCircuitPeering"] + ? item["expressRouteCircuitPeering"] + : subResourceDeserializer(item["expressRouteCircuitPeering"]), + peerExpressRouteCircuitPeering: !item["peerExpressRouteCircuitPeering"] + ? item["peerExpressRouteCircuitPeering"] + : subResourceDeserializer(item["peerExpressRouteCircuitPeering"]), + addressPrefix: item["addressPrefix"], + authorizationKey: item["authorizationKey"], + ipv6CircuitConnectionConfig: !item["ipv6CircuitConnectionConfig"] + ? item["ipv6CircuitConnectionConfig"] + : ipv6CircuitConnectionConfigDeserializer(item["ipv6CircuitConnectionConfig"]), + circuitConnectionStatus: item["circuitConnectionStatus"], + provisioningState: item["provisioningState"], + }; +} + +/** IPv6 Circuit Connection properties for global reach. */ +export interface Ipv6CircuitConnectionConfig { + /** /125 IP address space to carve out customer addresses for global reach. */ + addressPrefix?: string; + /** Express Route Circuit connection state. */ + readonly circuitConnectionStatus?: CircuitConnectionStatus; +} + +export function ipv6CircuitConnectionConfigSerializer(item: Ipv6CircuitConnectionConfig): any { + return { addressPrefix: item["addressPrefix"] }; +} + +export function ipv6CircuitConnectionConfigDeserializer(item: any): Ipv6CircuitConnectionConfig { + return { + addressPrefix: item["addressPrefix"], + circuitConnectionStatus: item["circuitConnectionStatus"], + }; +} + +/** Express Route Circuit connection state. */ +export enum KnownCircuitConnectionStatus { + /** Connected */ + Connected = "Connected", + /** Connecting */ + Connecting = "Connecting", + /** Disconnected */ + Disconnected = "Disconnected", +} + +/** + * Express Route Circuit connection state. \ + * {@link KnownCircuitConnectionStatus} can be used interchangeably with CircuitConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Connected**: Connected \ + * **Connecting**: Connecting \ + * **Disconnected**: Disconnected + */ +export type CircuitConnectionStatus = string; + +export function peerExpressRouteCircuitConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return peerExpressRouteCircuitConnectionDeserializer(item); + }); +} + +/** Peer Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. */ +export interface PeerExpressRouteCircuitConnection extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Reference to Express Route Circuit Private Peering Resource of the circuit. */ + expressRouteCircuitPeering?: SubResource; + /** Reference to Express Route Circuit Private Peering Resource of the peered circuit. */ + peerExpressRouteCircuitPeering?: SubResource; + /** /29 IP address space to carve out Customer addresses for tunnels. */ + addressPrefix?: string; + /** Express Route Circuit connection state. */ + readonly circuitConnectionStatus?: CircuitConnectionStatus; + /** The name of the express route circuit connection resource. */ + connectionName?: string; + /** The resource guid of the authorization used for the express route circuit connection. */ + authResourceGuid?: string; + /** The provisioning state of the peer express route circuit connection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function peerExpressRouteCircuitConnectionDeserializer( + item: any, +): PeerExpressRouteCircuitConnection { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _peerExpressRouteCircuitConnectionPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the peer express route circuit connection. */ +export interface PeerExpressRouteCircuitConnectionPropertiesFormat { + /** Reference to Express Route Circuit Private Peering Resource of the circuit. */ + expressRouteCircuitPeering?: SubResource; + /** Reference to Express Route Circuit Private Peering Resource of the peered circuit. */ + peerExpressRouteCircuitPeering?: SubResource; + /** /29 IP address space to carve out Customer addresses for tunnels. */ + addressPrefix?: string; + /** Express Route Circuit connection state. */ + readonly circuitConnectionStatus?: CircuitConnectionStatus; + /** The name of the express route circuit connection resource. */ + connectionName?: string; + /** The resource guid of the authorization used for the express route circuit connection. */ + authResourceGuid?: string; + /** The provisioning state of the peer express route circuit connection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function peerExpressRouteCircuitConnectionPropertiesFormatDeserializer( + item: any, +): PeerExpressRouteCircuitConnectionPropertiesFormat { + return { + expressRouteCircuitPeering: !item["expressRouteCircuitPeering"] + ? item["expressRouteCircuitPeering"] + : subResourceDeserializer(item["expressRouteCircuitPeering"]), + peerExpressRouteCircuitPeering: !item["peerExpressRouteCircuitPeering"] + ? item["peerExpressRouteCircuitPeering"] + : subResourceDeserializer(item["peerExpressRouteCircuitPeering"]), + addressPrefix: item["addressPrefix"], + circuitConnectionStatus: item["circuitConnectionStatus"], + connectionName: item["connectionName"], + authResourceGuid: item["authResourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +/** Contains ServiceProviderProperties in an ExpressRouteCircuit. */ +export interface ExpressRouteCircuitServiceProviderProperties { + /** The serviceProviderName. */ + serviceProviderName?: string; + /** The peering location. */ + peeringLocation?: string; + /** The BandwidthInMbps. */ + bandwidthInMbps?: number; +} + +export function expressRouteCircuitServiceProviderPropertiesSerializer( + item: ExpressRouteCircuitServiceProviderProperties, +): any { + return { + serviceProviderName: item["serviceProviderName"], + peeringLocation: item["peeringLocation"], + bandwidthInMbps: item["bandwidthInMbps"], + }; +} + +export function expressRouteCircuitServiceProviderPropertiesDeserializer( + item: any, +): ExpressRouteCircuitServiceProviderProperties { + return { + serviceProviderName: item["serviceProviderName"], + peeringLocation: item["peeringLocation"], + bandwidthInMbps: item["bandwidthInMbps"], + }; +} + +/** Contains SKU in an ExpressRouteCircuit. */ +export interface ExpressRouteCircuitSku { + /** The name of the SKU. */ + name?: string; + /** The tier of the SKU. */ + tier?: ExpressRouteCircuitSkuTier; + /** The family of the SKU. */ + family?: ExpressRouteCircuitSkuFamily; +} + +export function expressRouteCircuitSkuSerializer(item: ExpressRouteCircuitSku): any { + return { name: item["name"], tier: item["tier"], family: item["family"] }; +} + +export function expressRouteCircuitSkuDeserializer(item: any): ExpressRouteCircuitSku { + return { + name: item["name"], + tier: item["tier"], + family: item["family"], + }; +} + +/** The tier of the SKU. */ +export enum KnownExpressRouteCircuitSkuTier { + /** Standard */ + Standard = "Standard", + /** Premium */ + Premium = "Premium", + /** Basic */ + Basic = "Basic", + /** Local */ + Local = "Local", +} + +/** + * The tier of the SKU. \ + * {@link KnownExpressRouteCircuitSkuTier} can be used interchangeably with ExpressRouteCircuitSkuTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard \ + * **Premium**: Premium \ + * **Basic**: Basic \ + * **Local**: Local + */ +export type ExpressRouteCircuitSkuTier = string; + +/** The family of the SKU. */ +export enum KnownExpressRouteCircuitSkuFamily { + /** UnlimitedData */ + UnlimitedData = "UnlimitedData", + /** MeteredData */ + MeteredData = "MeteredData", +} + +/** + * The family of the SKU. \ + * {@link KnownExpressRouteCircuitSkuFamily} can be used interchangeably with ExpressRouteCircuitSkuFamily, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **UnlimitedData**: UnlimitedData \ + * **MeteredData**: MeteredData + */ +export type ExpressRouteCircuitSkuFamily = string; + +export function expressRouteCircuitArraySerializer(result: Array): any[] { + return result.map((item) => { + return expressRouteCircuitSerializer(item); + }); +} + +export function expressRouteCircuitArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return expressRouteCircuitDeserializer(item); + }); +} + +/** ExpressRoute circuit link failover test details for all tests. */ +export interface ExpressRouteLinkFailoverAllTestsDetails { + /** The current status of the test. */ + status?: FailoverTestStatus; + /** Time when the test was started. */ + startTime?: string; + /** Time when the test was completed. */ + endTime?: string; + /** The unique GUID associated with the test. */ + testGuid?: string; + /** The type of failover test. */ + testType?: FailoverTestType; + /** A list of all issues with the test. */ + issues?: string[]; + /** Whether the failover simulation was successful or not. */ + wasSimulationSuccessful?: boolean; + /** The maintenance test category. */ + circuitTestCategory?: MaintenanceTestCategory; + /** The link type. */ + linkType?: ExpressRouteFailoverLinkType; + /** The BGP status details. */ + bgpStatus?: ExpressRouteLinkFailoverTestBgpStatus[]; +} + +export function expressRouteLinkFailoverAllTestsDetailsDeserializer( + item: any, +): ExpressRouteLinkFailoverAllTestsDetails { + return { + status: item["status"], + startTime: item["startTime"], + endTime: item["endTime"], + testGuid: item["testGuid"], + testType: item["testType"], + issues: !item["issues"] + ? item["issues"] + : item["issues"].map((p: any) => { + return p; + }), + wasSimulationSuccessful: item["wasSimulationSuccessful"], + circuitTestCategory: item["circuitTestCategory"], + linkType: item["linkType"], + bgpStatus: !item["bgpStatus"] + ? item["bgpStatus"] + : expressRouteLinkFailoverTestBgpStatusArrayDeserializer(item["bgpStatus"]), + }; +} + +/** The current status of the test */ +export enum KnownFailoverTestStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** Starting */ + Starting = "Starting", + /** Running */ + Running = "Running", + /** StartFailed */ + StartFailed = "StartFailed", + /** Stopping */ + Stopping = "Stopping", + /** Completed */ + Completed = "Completed", + /** StopFailed */ + StopFailed = "StopFailed", + /** Invalid */ + Invalid = "Invalid", + /** Expired */ + Expired = "Expired", +} + +/** + * The current status of the test \ + * {@link KnownFailoverTestStatus} can be used interchangeably with FailoverTestStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted**: NotStarted \ + * **Starting**: Starting \ + * **Running**: Running \ + * **StartFailed**: StartFailed \ + * **Stopping**: Stopping \ + * **Completed**: Completed \ + * **StopFailed**: StopFailed \ + * **Invalid**: Invalid \ + * **Expired**: Expired + */ +export type FailoverTestStatus = string; + +/** The type of failover test */ +export enum KnownFailoverTestType { + /** SingleSiteFailover */ + SingleSiteFailover = "SingleSiteFailover", + /** MultiSiteFailover */ + MultiSiteFailover = "MultiSiteFailover", + /** All */ + All = "All", +} + +/** + * The type of failover test \ + * {@link KnownFailoverTestType} can be used interchangeably with FailoverTestType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SingleSiteFailover**: SingleSiteFailover \ + * **MultiSiteFailover**: MultiSiteFailover \ + * **All**: All + */ +export type FailoverTestType = string; + +/** The type of maintenance that can occur during an ExpressRoute failover test. */ +export enum KnownMaintenanceTestCategory { + /** BGP disconnect test category. */ + BgpDisconnect = "BgpDisconnect", + /** AS path prepend test category. */ + ASPathPrepend = "ASPathPrepend", +} + +/** + * The type of maintenance that can occur during an ExpressRoute failover test. \ + * {@link KnownMaintenanceTestCategory} can be used interchangeably with MaintenanceTestCategory, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **BgpDisconnect**: BGP disconnect test category. \ + * **ASPathPrepend**: AS path prepend test category. + */ +export type MaintenanceTestCategory = string; + +/** The link on which the failover test is being performed. */ +export enum KnownExpressRouteFailoverLinkType { + /** Primary link. */ + Primary = "Primary", + /** Secondary link. */ + Secondary = "Secondary", +} + +/** + * The link on which the failover test is being performed. \ + * {@link KnownExpressRouteFailoverLinkType} can be used interchangeably with ExpressRouteFailoverLinkType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Primary**: Primary link. \ + * **Secondary**: Secondary link. + */ +export type ExpressRouteFailoverLinkType = string; + +export function expressRouteLinkFailoverTestBgpStatusArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteLinkFailoverTestBgpStatusDeserializer(item); + }); +} + +/** Represents the BGP status of an ExpressRoute link failover test. */ +export interface ExpressRouteLinkFailoverTestBgpStatus { + /** The address family type. */ + type?: ExpressRouteFailoverBgpStatusAddressFamily; + /** The link type. */ + link?: ExpressRouteFailoverLinkType; + /** The BGP status. */ + status?: ExpressRouteLinkFailoverBgpStatus; + /** The check time in UTC. */ + checkTimeUtc?: string; +} + +export function expressRouteLinkFailoverTestBgpStatusDeserializer( + item: any, +): ExpressRouteLinkFailoverTestBgpStatus { + return { + type: item["type"], + link: item["link"], + status: item["status"], + checkTimeUtc: item["checkTimeUtc"], + }; +} + +/** The address family type for BGP status. */ +export enum KnownExpressRouteFailoverBgpStatusAddressFamily { + /** IPv4 address family. */ + IPv4 = "IPv4", + /** IPv6 address family. */ + IPv6 = "IPv6", +} + +/** + * The address family type for BGP status. \ + * {@link KnownExpressRouteFailoverBgpStatusAddressFamily} can be used interchangeably with ExpressRouteFailoverBgpStatusAddressFamily, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPv4**: IPv4 address family. \ + * **IPv6**: IPv6 address family. + */ +export type ExpressRouteFailoverBgpStatusAddressFamily = string; + +/** The BGP status of an ExpressRoute link failover. */ +export enum KnownExpressRouteLinkFailoverBgpStatus { + /** Undefined status. */ + Undefined = "Undefined", + /** Connected status. */ + Connected = "Connected", + /** Disconnected status. */ + Disconnected = "Disconnected", +} + +/** + * The BGP status of an ExpressRoute link failover. \ + * {@link KnownExpressRouteLinkFailoverBgpStatus} can be used interchangeably with ExpressRouteLinkFailoverBgpStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Undefined**: Undefined status. \ + * **Connected**: Connected status. \ + * **Disconnected**: Disconnected status. + */ +export type ExpressRouteLinkFailoverBgpStatus = string; + +/** ExpressRoute circuit link failover single test details. */ +export interface ExpressRouteLinkFailoverSingleTestDetails { + /** Time when the test was started in UTC. */ + startTimeUtc?: string; + /** Time when the test was completed in UTC. */ + endTimeUtc?: string; + /** The current status of the test. */ + status?: FailoverTestStatus; + /** Whether the failover simulation was successful or not. */ + wasSimulationSuccessful?: boolean; + /** The link type. */ + linkType?: ExpressRouteFailoverLinkType; + /** The circuit test category. */ + circuitTestCategory?: MaintenanceTestCategory; + /** Whether the simulation was verified. */ + isSimulationVerified?: boolean; + /** The redundant routes for link failover tests. */ + redundantRoutes?: ExpressRouteLinkFailoverRouteList; + /** The non-redundant routes for link failover tests. */ + nonRedundantRoutes?: ExpressRouteLinkFailoverRouteList; + /** The BGP status details. */ + bgpStatus?: ExpressRouteLinkFailoverTestBgpStatus[]; +} + +export function expressRouteLinkFailoverSingleTestDetailsDeserializer( + item: any, +): ExpressRouteLinkFailoverSingleTestDetails { + return { + startTimeUtc: item["startTimeUtc"], + endTimeUtc: item["endTimeUtc"], + status: item["status"], + wasSimulationSuccessful: item["wasSimulationSuccessful"], + linkType: item["linkType"], + circuitTestCategory: item["circuitTestCategory"], + isSimulationVerified: item["isSimulationVerified"], + redundantRoutes: !item["redundantRoutes"] + ? item["redundantRoutes"] + : expressRouteLinkFailoverRouteListDeserializer(item["redundantRoutes"]), + nonRedundantRoutes: !item["nonRedundantRoutes"] + ? item["nonRedundantRoutes"] + : expressRouteLinkFailoverRouteListDeserializer(item["nonRedundantRoutes"]), + bgpStatus: !item["bgpStatus"] + ? item["bgpStatus"] + : expressRouteLinkFailoverTestBgpStatusArrayDeserializer(item["bgpStatus"]), + }; +} + +/** Represents a list of failover routes for an ExpressRoute link. */ +export interface ExpressRouteLinkFailoverRouteList { + /** The routes before the simulation. */ + beforeSimulation?: ExpressRouteLinkFailoverRoute[]; + /** The routes during the simulation. */ + duringSimulation?: ExpressRouteLinkFailoverRoute[]; +} + +export function expressRouteLinkFailoverRouteListDeserializer( + item: any, +): ExpressRouteLinkFailoverRouteList { + return { + beforeSimulation: !item["beforeSimulation"] + ? item["beforeSimulation"] + : expressRouteLinkFailoverRouteArrayDeserializer(item["beforeSimulation"]), + duringSimulation: !item["duringSimulation"] + ? item["duringSimulation"] + : expressRouteLinkFailoverRouteArrayDeserializer(item["duringSimulation"]), + }; +} + +export function expressRouteLinkFailoverRouteArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteLinkFailoverRouteDeserializer(item); + }); +} + +/** Represents a failover route for an ExpressRoute link. */ +export interface ExpressRouteLinkFailoverRoute { + /** The route. */ + route?: string; + /** The next hop. */ + nextHop?: string; + /** The AS path for primary link. */ + primaryASPath?: string; + /** The AS path for secondary link. */ + secondaryASPath?: string; +} + +export function expressRouteLinkFailoverRouteDeserializer( + item: any, +): ExpressRouteLinkFailoverRoute { + return { + route: item["route"], + nextHop: item["nextHop"], + primaryASPath: item["primaryASPath"], + secondaryASPath: item["secondaryASPath"], + }; +} + +/** Parameters for stopping an ExpressRoute circuit link failover test. */ +export interface ExpressRouteLinkFailoverStopApiParameters { + /** The category of the circuit test. */ + circuitTestCategory?: string; + /** The type of the link. */ + linkType?: string; + /** Whether the simulation was successful. */ + wasSimulationSuccessful?: boolean; + /** Whether the link is verified. */ + isVerified?: boolean; +} + +export function expressRouteLinkFailoverStopApiParametersSerializer( + item: ExpressRouteLinkFailoverStopApiParameters, +): any { + return { + circuitTestCategory: item["circuitTestCategory"], + linkType: item["linkType"], + wasSimulationSuccessful: item["wasSimulationSuccessful"], + isVerified: item["isVerified"], + }; +} + +/** model interface _StopCircuitLinkFailoverTestParameterBody */ +export interface _StopCircuitLinkFailoverTestParameterBody { + /** Parameters supplied to stop the link failover simulation on the express route circuit. */ + stopParameters: ExpressRouteLinkFailoverStopApiParameters; +} + +export function _stopCircuitLinkFailoverTestParameterBodySerializer( + item: _StopCircuitLinkFailoverTestParameterBody, +): any { + return { + stopParameters: expressRouteLinkFailoverStopApiParametersSerializer(item["stopParameters"]), + }; +} + +/** Response for ListArpTable associated with the Express Route Circuits API. */ +export interface ExpressRouteCircuitsArpTableListResult { + /** The ExpressRouteCircuitArpTable items on this page */ + value: ExpressRouteCircuitArpTable[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function expressRouteCircuitsArpTableListResultDeserializer( + item: any, +): ExpressRouteCircuitsArpTableListResult { + return { + value: expressRouteCircuitArpTableArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function expressRouteCircuitArpTableArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCircuitArpTableDeserializer(item); + }); +} + +/** The ARP table associated with the ExpressRouteCircuit. */ +export interface ExpressRouteCircuitArpTable { + /** Entry age in minutes. */ + age?: number; + /** Interface address. */ + interface?: string; + /** The IP address. */ + ipAddress?: string; + /** The MAC address. */ + macAddress?: string; +} + +export function expressRouteCircuitArpTableDeserializer(item: any): ExpressRouteCircuitArpTable { + return { + age: item["age"], + interface: item["interface"], + ipAddress: item["ipAddress"], + macAddress: item["macAddress"], + }; +} + +/** Response for ListRoutesTable associated with the Express Route Circuits API. */ +export interface ExpressRouteCircuitsRoutesTableListResult { + /** The ExpressRouteCircuitRoutesTable items on this page */ + value: ExpressRouteCircuitRoutesTable[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function expressRouteCircuitsRoutesTableListResultDeserializer( + item: any, +): ExpressRouteCircuitsRoutesTableListResult { + return { + value: expressRouteCircuitRoutesTableArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function expressRouteCircuitRoutesTableArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCircuitRoutesTableDeserializer(item); + }); +} + +/** The routes table associated with the ExpressRouteCircuit. */ +export interface ExpressRouteCircuitRoutesTable { + /** IP address of a network entity. */ + network?: string; + /** NextHop address. */ + nextHop?: string; + /** Local preference value as set with the set local-preference route-map configuration command. */ + locPrf?: string; + /** Route Weight. */ + weight?: number; + /** Autonomous system paths to the destination network. */ + path?: string; +} + +export function expressRouteCircuitRoutesTableDeserializer( + item: any, +): ExpressRouteCircuitRoutesTable { + return { + network: item["network"], + nextHop: item["nextHop"], + locPrf: item["locPrf"], + weight: item["weight"], + path: item["path"], + }; +} + +/** Response for ListRoutesTable associated with the Express Route Circuits API. */ +export interface ExpressRouteCircuitsRoutesTableSummaryListResult { + /** The ExpressRouteCircuitRoutesTableSummary items on this page */ + value: ExpressRouteCircuitRoutesTableSummary[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function expressRouteCircuitsRoutesTableSummaryListResultDeserializer( + item: any, +): ExpressRouteCircuitsRoutesTableSummaryListResult { + return { + value: expressRouteCircuitRoutesTableSummaryArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function expressRouteCircuitRoutesTableSummaryArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCircuitRoutesTableSummaryDeserializer(item); + }); +} + +/** The routes table associated with the ExpressRouteCircuit. */ +export interface ExpressRouteCircuitRoutesTableSummary { + /** IP address of the neighbor. */ + neighbor?: string; + /** BGP version number spoken to the neighbor. */ + v?: number; + /** Autonomous system number. */ + as?: number; + /** The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. */ + upDown?: string; + /** Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. */ + statePfxRcd?: string; +} + +export function expressRouteCircuitRoutesTableSummaryDeserializer( + item: any, +): ExpressRouteCircuitRoutesTableSummary { + return { + neighbor: item["neighbor"], + v: item["v"], + as: item["as"], + upDown: item["upDown"], + statePfxRcd: item["statePfxRcd"], + }; +} + +/** ExpressRouteCrossConnection resource. */ +export interface ExpressRouteCrossConnection extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The name of the primary port. */ + readonly primaryAzurePort?: string; + /** The name of the secondary port. */ + readonly secondaryAzurePort?: string; + /** The identifier of the circuit traffic. */ + readonly sTag?: number; + /** The peering location of the ExpressRoute circuit. */ + readonly peeringLocation?: string; + /** The circuit bandwidth In Mbps. */ + readonly bandwidthInMbps?: number; + /** The ExpressRouteCircuit. */ + expressRouteCircuit?: ExpressRouteCircuitReference; + /** The provisioning state of the circuit in the connectivity provider system. */ + serviceProviderProvisioningState?: ServiceProviderProvisioningState; + /** Additional read only notes set by the connectivity provider. */ + serviceProviderNotes?: string; + /** The provisioning state of the express route cross connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The list of peerings. */ + peerings?: ExpressRouteCrossConnectionPeering[]; +} + +export function expressRouteCrossConnectionSerializer(item: ExpressRouteCrossConnection): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "expressRouteCircuit", + "serviceProviderProvisioningState", + "serviceProviderNotes", + "peerings", + ]) + ? undefined + : _expressRouteCrossConnectionPropertiesSerializer(item), + }; +} + +export function expressRouteCrossConnectionDeserializer(item: any): ExpressRouteCrossConnection { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _expressRouteCrossConnectionPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of ExpressRouteCrossConnection. */ +export interface ExpressRouteCrossConnectionProperties { + /** The name of the primary port. */ + readonly primaryAzurePort?: string; + /** The name of the secondary port. */ + readonly secondaryAzurePort?: string; + /** The identifier of the circuit traffic. */ + readonly sTag?: number; + /** The peering location of the ExpressRoute circuit. */ + readonly peeringLocation?: string; + /** The circuit bandwidth In Mbps. */ + readonly bandwidthInMbps?: number; + /** The ExpressRouteCircuit. */ + expressRouteCircuit?: ExpressRouteCircuitReference; + /** The provisioning state of the circuit in the connectivity provider system. */ + serviceProviderProvisioningState?: ServiceProviderProvisioningState; + /** Additional read only notes set by the connectivity provider. */ + serviceProviderNotes?: string; + /** The provisioning state of the express route cross connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The list of peerings. */ + peerings?: ExpressRouteCrossConnectionPeering[]; +} + +export function expressRouteCrossConnectionPropertiesSerializer( + item: ExpressRouteCrossConnectionProperties, +): any { + return { + expressRouteCircuit: !item["expressRouteCircuit"] + ? item["expressRouteCircuit"] + : expressRouteCircuitReferenceSerializer(item["expressRouteCircuit"]), + serviceProviderProvisioningState: item["serviceProviderProvisioningState"], + serviceProviderNotes: item["serviceProviderNotes"], + peerings: !item["peerings"] + ? item["peerings"] + : expressRouteCrossConnectionPeeringArraySerializer(item["peerings"]), + }; +} + +export function expressRouteCrossConnectionPropertiesDeserializer( + item: any, +): ExpressRouteCrossConnectionProperties { + return { + primaryAzurePort: item["primaryAzurePort"], + secondaryAzurePort: item["secondaryAzurePort"], + sTag: item["sTag"], + peeringLocation: item["peeringLocation"], + bandwidthInMbps: item["bandwidthInMbps"], + expressRouteCircuit: !item["expressRouteCircuit"] + ? item["expressRouteCircuit"] + : expressRouteCircuitReferenceDeserializer(item["expressRouteCircuit"]), + serviceProviderProvisioningState: item["serviceProviderProvisioningState"], + serviceProviderNotes: item["serviceProviderNotes"], + provisioningState: item["provisioningState"], + peerings: !item["peerings"] + ? item["peerings"] + : expressRouteCrossConnectionPeeringArrayDeserializer(item["peerings"]), + }; +} + +/** Reference to an express route circuit. */ +export interface ExpressRouteCircuitReference { + /** Corresponding Express Route Circuit Id. */ + id?: string; +} + +export function expressRouteCircuitReferenceSerializer(item: ExpressRouteCircuitReference): any { + return { id: item["id"] }; +} + +export function expressRouteCircuitReferenceDeserializer(item: any): ExpressRouteCircuitReference { + return { + id: item["id"], + }; +} + +export function expressRouteCrossConnectionPeeringArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCrossConnectionPeeringSerializer(item); + }); +} + +export function expressRouteCrossConnectionPeeringArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCrossConnectionPeeringDeserializer(item); + }); +} + +/** Peering in an ExpressRoute Cross Connection resource. */ +export interface ExpressRouteCrossConnectionPeering extends 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. */ + readonly etag?: string; + /** The peering type. */ + peeringType?: ExpressRoutePeeringType; + /** The peering state. */ + state?: ExpressRoutePeeringState; + /** The Azure ASN. */ + readonly azureASN?: number; + /** The peer ASN. */ + peerASN?: number; + /** The primary address prefix. */ + primaryPeerAddressPrefix?: string; + /** The secondary address prefix. */ + secondaryPeerAddressPrefix?: string; + /** The primary port. */ + readonly primaryAzurePort?: string; + /** The secondary port. */ + readonly secondaryAzurePort?: string; + /** The shared key. */ + sharedKey?: string; + /** The VLAN ID. */ + vlanId?: number; + /** The Microsoft peering configuration. */ + microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; + /** The provisioning state of the express route cross connection peering resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The GatewayManager Etag. */ + gatewayManagerEtag?: string; + /** Who was the last to modify the peering. */ + readonly lastModifiedBy?: string; + /** The IPv6 peering configuration. */ + ipv6PeeringConfig?: Ipv6ExpressRouteCircuitPeeringConfig; +} + +export function expressRouteCrossConnectionPeeringSerializer( + item: ExpressRouteCrossConnectionPeering, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "peeringType", + "state", + "peerASN", + "primaryPeerAddressPrefix", + "secondaryPeerAddressPrefix", + "sharedKey", + "vlanId", + "microsoftPeeringConfig", + "gatewayManagerEtag", + "ipv6PeeringConfig", + ]) + ? undefined + : _expressRouteCrossConnectionPeeringPropertiesSerializer(item), + name: item["name"], + }; +} + +export function expressRouteCrossConnectionPeeringDeserializer( + item: any, +): ExpressRouteCrossConnectionPeering { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _expressRouteCrossConnectionPeeringPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of express route cross connection peering. */ +export interface ExpressRouteCrossConnectionPeeringProperties { + /** The peering type. */ + peeringType?: ExpressRoutePeeringType; + /** The peering state. */ + state?: ExpressRoutePeeringState; + /** The Azure ASN. */ + readonly azureASN?: number; + /** The peer ASN. */ + peerASN?: number; + /** The primary address prefix. */ + primaryPeerAddressPrefix?: string; + /** The secondary address prefix. */ + secondaryPeerAddressPrefix?: string; + /** The primary port. */ + readonly primaryAzurePort?: string; + /** The secondary port. */ + readonly secondaryAzurePort?: string; + /** The shared key. */ + sharedKey?: string; + /** The VLAN ID. */ + vlanId?: number; + /** The Microsoft peering configuration. */ + microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; + /** The provisioning state of the express route cross connection peering resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The GatewayManager Etag. */ + gatewayManagerEtag?: string; + /** Who was the last to modify the peering. */ + readonly lastModifiedBy?: string; + /** The IPv6 peering configuration. */ + ipv6PeeringConfig?: Ipv6ExpressRouteCircuitPeeringConfig; +} + +export function expressRouteCrossConnectionPeeringPropertiesSerializer( + item: ExpressRouteCrossConnectionPeeringProperties, +): any { + return { + peeringType: item["peeringType"], + state: item["state"], + peerASN: item["peerASN"], + primaryPeerAddressPrefix: item["primaryPeerAddressPrefix"], + secondaryPeerAddressPrefix: item["secondaryPeerAddressPrefix"], + sharedKey: item["sharedKey"], + vlanId: item["vlanId"], + microsoftPeeringConfig: !item["microsoftPeeringConfig"] + ? item["microsoftPeeringConfig"] + : expressRouteCircuitPeeringConfigSerializer(item["microsoftPeeringConfig"]), + gatewayManagerEtag: item["gatewayManagerEtag"], + ipv6PeeringConfig: !item["ipv6PeeringConfig"] + ? item["ipv6PeeringConfig"] + : ipv6ExpressRouteCircuitPeeringConfigSerializer(item["ipv6PeeringConfig"]), + }; +} + +export function expressRouteCrossConnectionPeeringPropertiesDeserializer( + item: any, +): ExpressRouteCrossConnectionPeeringProperties { + return { + peeringType: item["peeringType"], + state: item["state"], + azureASN: item["azureASN"], + peerASN: item["peerASN"], + primaryPeerAddressPrefix: item["primaryPeerAddressPrefix"], + secondaryPeerAddressPrefix: item["secondaryPeerAddressPrefix"], + primaryAzurePort: item["primaryAzurePort"], + secondaryAzurePort: item["secondaryAzurePort"], + sharedKey: item["sharedKey"], + vlanId: item["vlanId"], + microsoftPeeringConfig: !item["microsoftPeeringConfig"] + ? item["microsoftPeeringConfig"] + : expressRouteCircuitPeeringConfigDeserializer(item["microsoftPeeringConfig"]), + provisioningState: item["provisioningState"], + gatewayManagerEtag: item["gatewayManagerEtag"], + lastModifiedBy: item["lastModifiedBy"], + ipv6PeeringConfig: !item["ipv6PeeringConfig"] + ? item["ipv6PeeringConfig"] + : ipv6ExpressRouteCircuitPeeringConfigDeserializer(item["ipv6PeeringConfig"]), + }; +} + +export function expressRouteCrossConnectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCrossConnectionSerializer(item); + }); +} + +export function expressRouteCrossConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCrossConnectionDeserializer(item); + }); +} + +/** Response for ListRoutesTable associated with the Express Route Cross Connections. */ +export interface ExpressRouteCrossConnectionsRoutesTableSummaryListResult { + /** The ExpressRouteCrossConnectionRoutesTableSummary items on this page */ + value: ExpressRouteCrossConnectionRoutesTableSummary[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function expressRouteCrossConnectionsRoutesTableSummaryListResultDeserializer( + item: any, +): ExpressRouteCrossConnectionsRoutesTableSummaryListResult { + return { + value: expressRouteCrossConnectionRoutesTableSummaryArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function expressRouteCrossConnectionRoutesTableSummaryArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteCrossConnectionRoutesTableSummaryDeserializer(item); + }); +} + +/** The routes table associated with the ExpressRouteCircuit. */ +export interface ExpressRouteCrossConnectionRoutesTableSummary { + /** IP address of Neighbor router. */ + neighbor?: string; + /** Autonomous system number. */ + asn?: number; + /** The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. */ + upDown?: string; + /** Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. */ + stateOrPrefixesReceived?: string; +} + +export function expressRouteCrossConnectionRoutesTableSummaryDeserializer( + item: any, +): ExpressRouteCrossConnectionRoutesTableSummary { + return { + neighbor: item["neighbor"], + asn: item["asn"], + upDown: item["upDown"], + stateOrPrefixesReceived: item["stateOrPrefixesReceived"], + }; +} + +/** Definition of the ExpressRoutePorts peering location resource. */ +export interface ExpressRoutePortsLocation extends Resource { + /** Address of peering location. */ + readonly address?: string; + /** Contact details of peering locations. */ + readonly contact?: string; + /** The inventory of available ExpressRoutePort bandwidths. */ + availableBandwidths?: ExpressRoutePortsLocationBandwidths[]; + /** The provisioning state of the express route port location resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function expressRoutePortsLocationDeserializer(item: any): ExpressRoutePortsLocation { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _expressRoutePortsLocationPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties specific to ExpressRoutePorts peering location resources. */ +export interface ExpressRoutePortsLocationPropertiesFormat { + /** Address of peering location. */ + readonly address?: string; + /** Contact details of peering locations. */ + readonly contact?: string; + /** The inventory of available ExpressRoutePort bandwidths. */ + availableBandwidths?: ExpressRoutePortsLocationBandwidths[]; + /** The provisioning state of the express route port location resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function expressRoutePortsLocationPropertiesFormatDeserializer( + item: any, +): ExpressRoutePortsLocationPropertiesFormat { + return { + address: item["address"], + contact: item["contact"], + availableBandwidths: !item["availableBandwidths"] + ? item["availableBandwidths"] + : expressRoutePortsLocationBandwidthsArrayDeserializer(item["availableBandwidths"]), + provisioningState: item["provisioningState"], + }; +} + +export function expressRoutePortsLocationBandwidthsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRoutePortsLocationBandwidthsDeserializer(item); + }); +} + +/** Real-time inventory of available ExpressRoute port bandwidths. */ +export interface ExpressRoutePortsLocationBandwidths { + /** Bandwidth descriptive name. */ + readonly offerName?: string; + /** Bandwidth value in Gbps. */ + readonly valueInGbps?: number; +} + +export function expressRoutePortsLocationBandwidthsDeserializer( + item: any, +): ExpressRoutePortsLocationBandwidths { + return { + offerName: item["offerName"], + valueInGbps: item["valueInGbps"], + }; +} + +/** Paged collection of ExpressRoutePortsLocation items */ +export interface _ExpressRoutePortsLocationListResult { + /** The ExpressRoutePortsLocation items on this page */ + value: ExpressRoutePortsLocation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _expressRoutePortsLocationListResultDeserializer( + item: any, +): _ExpressRoutePortsLocationListResult { + return { + value: expressRoutePortsLocationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function expressRoutePortsLocationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRoutePortsLocationDeserializer(item); + }); +} + +/** ExpressRoutePort resource definition. */ +export interface ExpressRoutePort extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The identity of ExpressRoutePort, if configured. */ + identity?: ManagedServiceIdentity; + /** The name of the peering location that the ExpressRoutePort is mapped to physically. */ + peeringLocation?: string; + /** Bandwidth of procured ports in Gbps. */ + bandwidthInGbps?: number; + /** Aggregate Gbps of associated circuit bandwidths. */ + readonly provisionedBandwidthInGbps?: number; + /** Maximum transmission unit of the physical port pair(s). */ + readonly mtu?: string; + /** Encapsulation method on physical ports. */ + encapsulation?: ExpressRoutePortsEncapsulation; + /** Ether type of the physical port. */ + readonly etherType?: string; + /** Date of the physical port allocation to be used in Letter of Authorization. */ + readonly allocationDate?: string; + /** The set of physical links of the ExpressRoutePort resource. */ + links?: ExpressRouteLink[]; + /** Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource. */ + readonly circuits?: SubResource[]; + /** The provisioning state of the express route port resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The resource GUID property of the express route port resource. */ + readonly resourceGuid?: string; + /** The billing type of the ExpressRoutePort resource. */ + billingType?: ExpressRoutePortsBillingType; +} + +export function expressRoutePortSerializer(item: ExpressRoutePort): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "peeringLocation", + "bandwidthInGbps", + "encapsulation", + "links", + "billingType", + ]) + ? undefined + : _expressRoutePortPropertiesSerializer(item), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + }; +} + +export function expressRoutePortDeserializer(item: any): ExpressRoutePort { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _expressRoutePortPropertiesDeserializer(item["properties"])), + etag: item["etag"], + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentityDeserializer(item["identity"]), + }; +} + +/** Properties specific to ExpressRoutePort resources. */ +export interface ExpressRoutePortPropertiesFormat { + /** The name of the peering location that the ExpressRoutePort is mapped to physically. */ + peeringLocation?: string; + /** Bandwidth of procured ports in Gbps. */ + bandwidthInGbps?: number; + /** Aggregate Gbps of associated circuit bandwidths. */ + readonly provisionedBandwidthInGbps?: number; + /** Maximum transmission unit of the physical port pair(s). */ + readonly mtu?: string; + /** Encapsulation method on physical ports. */ + encapsulation?: ExpressRoutePortsEncapsulation; + /** Ether type of the physical port. */ + readonly etherType?: string; + /** Date of the physical port allocation to be used in Letter of Authorization. */ + readonly allocationDate?: string; + /** The set of physical links of the ExpressRoutePort resource. */ + links?: ExpressRouteLink[]; + /** Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource. */ + readonly circuits?: SubResource[]; + /** The provisioning state of the express route port resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The resource GUID property of the express route port resource. */ + readonly resourceGuid?: string; + /** The billing type of the ExpressRoutePort resource. */ + billingType?: ExpressRoutePortsBillingType; +} + +export function expressRoutePortPropertiesFormatSerializer( + item: ExpressRoutePortPropertiesFormat, +): any { + return { + peeringLocation: item["peeringLocation"], + bandwidthInGbps: item["bandwidthInGbps"], + encapsulation: item["encapsulation"], + links: !item["links"] ? item["links"] : expressRouteLinkArraySerializer(item["links"]), + billingType: item["billingType"], + }; +} + +export function expressRoutePortPropertiesFormatDeserializer( + item: any, +): ExpressRoutePortPropertiesFormat { + return { + peeringLocation: item["peeringLocation"], + bandwidthInGbps: item["bandwidthInGbps"], + provisionedBandwidthInGbps: item["provisionedBandwidthInGbps"], + mtu: item["mtu"], + encapsulation: item["encapsulation"], + etherType: item["etherType"], + allocationDate: item["allocationDate"], + links: !item["links"] ? item["links"] : expressRouteLinkArrayDeserializer(item["links"]), + circuits: !item["circuits"] ? item["circuits"] : subResourceArrayDeserializer(item["circuits"]), + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + billingType: item["billingType"], + }; +} + +/** Encapsulation method on physical ports. */ +export enum KnownExpressRoutePortsEncapsulation { + /** Dot1Q */ + Dot1Q = "Dot1Q", + /** QinQ */ + QinQ = "QinQ", +} + +/** + * Encapsulation method on physical ports. \ + * {@link KnownExpressRoutePortsEncapsulation} can be used interchangeably with ExpressRoutePortsEncapsulation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Dot1Q**: Dot1Q \ + * **QinQ**: QinQ + */ +export type ExpressRoutePortsEncapsulation = string; + +export function expressRouteLinkArraySerializer(result: Array): any[] { + return result.map((item) => { + return expressRouteLinkSerializer(item); + }); +} + +export function expressRouteLinkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return expressRouteLinkDeserializer(item); + }); +} + +/** ExpressRouteLink child resource definition. */ +export interface ExpressRouteLink extends SubResource { + /** Name of child port resource that is unique among child port resources of the parent. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Name of Azure router associated with physical port. */ + readonly routerName?: string; + /** Name of Azure router interface. */ + readonly interfaceName?: string; + /** Mapping between physical port to patch panel port. */ + readonly patchPanelId?: string; + /** Mapping of physical patch panel to rack. */ + readonly rackId?: string; + /** Cololocation for ExpressRoute Hybrid Direct. */ + readonly coloLocation?: string; + /** Physical fiber port type. */ + readonly connectorType?: ExpressRouteLinkConnectorType; + /** Administrative state of the physical port. */ + adminState?: ExpressRouteLinkAdminState; + /** The provisioning state of the express route link resource. */ + readonly provisioningState?: CommonProvisioningState; + /** MacSec configuration. */ + macSecConfig?: ExpressRouteLinkMacSecConfig; +} + +export function expressRouteLinkSerializer(item: ExpressRouteLink): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["adminState", "macSecConfig"]) + ? undefined + : _expressRouteLinkPropertiesSerializer(item), + name: item["name"], + }; +} + +export function expressRouteLinkDeserializer(item: any): ExpressRouteLink { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _expressRouteLinkPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties specific to ExpressRouteLink resources. */ +export interface ExpressRouteLinkPropertiesFormat { + /** Name of Azure router associated with physical port. */ + readonly routerName?: string; + /** Name of Azure router interface. */ + readonly interfaceName?: string; + /** Mapping between physical port to patch panel port. */ + readonly patchPanelId?: string; + /** Mapping of physical patch panel to rack. */ + readonly rackId?: string; + /** Cololocation for ExpressRoute Hybrid Direct. */ + readonly coloLocation?: string; + /** Physical fiber port type. */ + readonly connectorType?: ExpressRouteLinkConnectorType; + /** Administrative state of the physical port. */ + adminState?: ExpressRouteLinkAdminState; + /** The provisioning state of the express route link resource. */ + readonly provisioningState?: CommonProvisioningState; + /** MacSec configuration. */ + macSecConfig?: ExpressRouteLinkMacSecConfig; +} + +export function expressRouteLinkPropertiesFormatSerializer( + item: ExpressRouteLinkPropertiesFormat, +): any { + return { + adminState: item["adminState"], + macSecConfig: !item["macSecConfig"] + ? item["macSecConfig"] + : expressRouteLinkMacSecConfigSerializer(item["macSecConfig"]), + }; +} + +export function expressRouteLinkPropertiesFormatDeserializer( + item: any, +): ExpressRouteLinkPropertiesFormat { + return { + routerName: item["routerName"], + interfaceName: item["interfaceName"], + patchPanelId: item["patchPanelId"], + rackId: item["rackId"], + coloLocation: item["coloLocation"], + connectorType: item["connectorType"], + adminState: item["adminState"], + provisioningState: item["provisioningState"], + macSecConfig: !item["macSecConfig"] + ? item["macSecConfig"] + : expressRouteLinkMacSecConfigDeserializer(item["macSecConfig"]), + }; +} + +/** Physical fiber port type. */ +export enum KnownExpressRouteLinkConnectorType { + /** LC */ + LC = "LC", + /** SC */ + SC = "SC", +} + +/** + * Physical fiber port type. \ + * {@link KnownExpressRouteLinkConnectorType} can be used interchangeably with ExpressRouteLinkConnectorType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LC**: LC \ + * **SC**: SC + */ +export type ExpressRouteLinkConnectorType = string; + +/** Administrative state of the physical port. */ +export enum KnownExpressRouteLinkAdminState { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Administrative state of the physical port. \ + * {@link KnownExpressRouteLinkAdminState} can be used interchangeably with ExpressRouteLinkAdminState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Enabled \ + * **Disabled**: Disabled + */ +export type ExpressRouteLinkAdminState = string; + +/** ExpressRouteLink Mac Security Configuration. */ +export interface ExpressRouteLinkMacSecConfig { + /** Keyvault Secret Identifier URL containing Mac security CKN key. */ + cknSecretIdentifier?: string; + /** Keyvault Secret Identifier URL containing Mac security CAK key. */ + cakSecretIdentifier?: string; + /** Mac security cipher. */ + cipher?: ExpressRouteLinkMacSecCipher; + /** Sci mode enabled/disabled. */ + sciState?: ExpressRouteLinkMacSecSciState; +} + +export function expressRouteLinkMacSecConfigSerializer(item: ExpressRouteLinkMacSecConfig): any { + return { + cknSecretIdentifier: item["cknSecretIdentifier"], + cakSecretIdentifier: item["cakSecretIdentifier"], + cipher: item["cipher"], + sciState: item["sciState"], + }; +} + +export function expressRouteLinkMacSecConfigDeserializer(item: any): ExpressRouteLinkMacSecConfig { + return { + cknSecretIdentifier: item["cknSecretIdentifier"], + cakSecretIdentifier: item["cakSecretIdentifier"], + cipher: item["cipher"], + sciState: item["sciState"], + }; +} + +/** Mac security cipher. */ +export enum KnownExpressRouteLinkMacSecCipher { + /** GcmAes256 */ + GcmAes256 = "GcmAes256", + /** GcmAes128 */ + GcmAes128 = "GcmAes128", + /** GcmAesXpn128 */ + GcmAesXpn128 = "GcmAesXpn128", + /** GcmAesXpn256 */ + GcmAesXpn256 = "GcmAesXpn256", +} + +/** + * Mac security cipher. \ + * {@link KnownExpressRouteLinkMacSecCipher} can be used interchangeably with ExpressRouteLinkMacSecCipher, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **GcmAes256**: GcmAes256 \ + * **GcmAes128**: GcmAes128 \ + * **GcmAesXpn128**: GcmAesXpn128 \ + * **GcmAesXpn256**: GcmAesXpn256 + */ +export type ExpressRouteLinkMacSecCipher = string; + +/** Sci mode enabled/disabled. */ +export enum KnownExpressRouteLinkMacSecSciState { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", +} + +/** + * Sci mode enabled/disabled. \ + * {@link KnownExpressRouteLinkMacSecSciState} can be used interchangeably with ExpressRouteLinkMacSecSciState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled**: Disabled \ + * **Enabled**: Enabled + */ +export type ExpressRouteLinkMacSecSciState = string; + +/** The billing type of the ExpressRoutePort resource. */ +export enum KnownExpressRoutePortsBillingType { + /** MeteredData */ + MeteredData = "MeteredData", + /** UnlimitedData */ + UnlimitedData = "UnlimitedData", +} + +/** + * The billing type of the ExpressRoutePort resource. \ + * {@link KnownExpressRoutePortsBillingType} can be used interchangeably with ExpressRoutePortsBillingType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MeteredData**: MeteredData \ + * **UnlimitedData**: UnlimitedData + */ +export type ExpressRoutePortsBillingType = string; + +/** Paged collection of ExpressRoutePort items */ +export interface _ExpressRoutePortListResult { + /** The ExpressRoutePort items on this page */ + value: ExpressRoutePort[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _expressRoutePortListResultDeserializer(item: any): _ExpressRoutePortListResult { + return { + value: expressRoutePortArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function expressRoutePortArraySerializer(result: Array): any[] { + return result.map((item) => { + return expressRoutePortSerializer(item); + }); +} + +export function expressRoutePortArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return expressRoutePortDeserializer(item); + }); +} + +/** The customer name to be printed on a letter of authorization. */ +export interface GenerateExpressRoutePortsLOARequest { + /** The customer name. */ + customerName: string; +} + +export function generateExpressRoutePortsLOARequestSerializer( + item: GenerateExpressRoutePortsLOARequest, +): any { + return { customerName: item["customerName"] }; +} + +/** Response for GenerateExpressRoutePortsLOA API service call. */ +export interface GenerateExpressRoutePortsLOAResult { + /** The content as a base64 encoded string. */ + encodedContent?: string; +} + +export function generateExpressRoutePortsLOAResultDeserializer( + item: any, +): GenerateExpressRoutePortsLOAResult { + return { + encodedContent: item["encodedContent"], + }; +} + +/** ExpressRoutePort Authorization resource definition. */ +export interface ExpressRoutePortAuthorization extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The authorization key. */ + readonly authorizationKey?: string; + /** The authorization use status. */ + readonly authorizationUseStatus?: ExpressRoutePortAuthorizationUseStatus; + /** The reference to the ExpressRoute circuit resource using the authorization. */ + readonly circuitResourceUri?: string; + /** The provisioning state of the authorization resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function expressRoutePortAuthorizationSerializer(item: ExpressRoutePortAuthorization): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, []) + ? undefined + : _expressRoutePortAuthorizationPropertiesSerializer(item), + }; +} + +export function expressRoutePortAuthorizationDeserializer( + item: any, +): ExpressRoutePortAuthorization { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _expressRoutePortAuthorizationPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of ExpressRoutePort Authorization. */ +export interface ExpressRoutePortAuthorizationPropertiesFormat { + /** The authorization key. */ + readonly authorizationKey?: string; + /** The authorization use status. */ + readonly authorizationUseStatus?: ExpressRoutePortAuthorizationUseStatus; + /** The reference to the ExpressRoute circuit resource using the authorization. */ + readonly circuitResourceUri?: string; + /** The provisioning state of the authorization resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function expressRoutePortAuthorizationPropertiesFormatSerializer( + _item: ExpressRoutePortAuthorizationPropertiesFormat, +): any { + return {}; +} + +export function expressRoutePortAuthorizationPropertiesFormatDeserializer( + item: any, +): ExpressRoutePortAuthorizationPropertiesFormat { + return { + authorizationKey: item["authorizationKey"], + authorizationUseStatus: item["authorizationUseStatus"], + circuitResourceUri: item["circuitResourceUri"], + provisioningState: item["provisioningState"], + }; +} + +/** The authorization use status. */ +export enum KnownExpressRoutePortAuthorizationUseStatus { + /** Available */ + Available = "Available", + /** InUse */ + InUse = "InUse", +} + +/** + * The authorization use status. \ + * {@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**: Available \ + * **InUse**: InUse + */ +export type ExpressRoutePortAuthorizationUseStatus = string; + +/** Paged collection of ExpressRoutePortAuthorization items */ +export interface _ExpressRoutePortAuthorizationListResult { + /** The ExpressRoutePortAuthorization items on this page */ + value: ExpressRoutePortAuthorization[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _expressRoutePortAuthorizationListResultDeserializer( + item: any, +): _ExpressRoutePortAuthorizationListResult { + return { + value: expressRoutePortAuthorizationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function expressRoutePortAuthorizationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRoutePortAuthorizationSerializer(item); + }); +} + +export function expressRoutePortAuthorizationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRoutePortAuthorizationDeserializer(item); + }); +} + +/** FirewallPolicy Resource. */ +export interface FirewallPolicy extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The identity of the firewall policy. */ + identity?: ManagedServiceIdentity; + /** A read-only string that represents the size of the FirewallPolicyPropertiesFormat in MB. (ex 0.5MB) */ + readonly size?: string; + /** List of references to FirewallPolicyRuleCollectionGroups. */ + readonly ruleCollectionGroups?: SubResource[]; + /** The provisioning state of the firewall policy resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The parent firewall policy from which rules are inherited. */ + basePolicy?: SubResource; + /** List of references to Azure Firewalls that this Firewall Policy is associated with. */ + readonly firewalls?: SubResource[]; + /** List of references to Child Firewall Policies. */ + readonly childPolicies?: SubResource[]; + /** The operation mode for Threat Intelligence. */ + threatIntelMode?: AzureFirewallThreatIntelMode; + /** ThreatIntel Whitelist for Firewall Policy. */ + threatIntelWhitelist?: FirewallPolicyThreatIntelWhitelist; + /** Insights on Firewall Policy. */ + insights?: FirewallPolicyInsights; + /** The private IP addresses/IP ranges to which traffic will not be SNAT. */ + snat?: FirewallPolicySnat; + /** SQL Settings definition. */ + sql?: FirewallPolicySQL; + /** DNS Proxy Settings definition. */ + dnsSettings?: DnsSettings; + /** Explicit Proxy Settings definition. */ + explicitProxy?: ExplicitProxy; + /** The configuration for Intrusion detection. */ + intrusionDetection?: FirewallPolicyIntrusionDetection; + /** TLS Configuration definition. */ + transportSecurity?: FirewallPolicyTransportSecurity; + /** The Firewall Policy SKU. */ + sku?: FirewallPolicySku; +} + +export function firewallPolicySerializer(item: FirewallPolicy): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "basePolicy", + "threatIntelMode", + "threatIntelWhitelist", + "insights", + "snat", + "sql", + "dnsSettings", + "explicitProxy", + "intrusionDetection", + "transportSecurity", + "sku", + ]) + ? undefined + : _firewallPolicyPropertiesSerializer(item), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + }; +} + +export function firewallPolicyDeserializer(item: any): FirewallPolicy { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _firewallPolicyPropertiesDeserializer(item["properties"])), + etag: item["etag"], + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentityDeserializer(item["identity"]), + }; +} + +/** Firewall Policy definition. */ +export interface FirewallPolicyPropertiesFormat { + /** A read-only string that represents the size of the FirewallPolicyPropertiesFormat in MB. (ex 0.5MB) */ + readonly size?: string; + /** List of references to FirewallPolicyRuleCollectionGroups. */ + readonly ruleCollectionGroups?: SubResource[]; + /** The provisioning state of the firewall policy resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The parent firewall policy from which rules are inherited. */ + basePolicy?: SubResource; + /** List of references to Azure Firewalls that this Firewall Policy is associated with. */ + readonly firewalls?: SubResource[]; + /** List of references to Child Firewall Policies. */ + readonly childPolicies?: SubResource[]; + /** The operation mode for Threat Intelligence. */ + threatIntelMode?: AzureFirewallThreatIntelMode; + /** ThreatIntel Whitelist for Firewall Policy. */ + threatIntelWhitelist?: FirewallPolicyThreatIntelWhitelist; + /** Insights on Firewall Policy. */ + insights?: FirewallPolicyInsights; + /** The private IP addresses/IP ranges to which traffic will not be SNAT. */ + snat?: FirewallPolicySnat; + /** SQL Settings definition. */ + sql?: FirewallPolicySQL; + /** DNS Proxy Settings definition. */ + dnsSettings?: DnsSettings; + /** Explicit Proxy Settings definition. */ + explicitProxy?: ExplicitProxy; + /** The configuration for Intrusion detection. */ + intrusionDetection?: FirewallPolicyIntrusionDetection; + /** TLS Configuration definition. */ + transportSecurity?: FirewallPolicyTransportSecurity; + /** The Firewall Policy SKU. */ + sku?: FirewallPolicySku; +} + +export function firewallPolicyPropertiesFormatSerializer( + item: FirewallPolicyPropertiesFormat, +): any { + return { + basePolicy: !item["basePolicy"] + ? item["basePolicy"] + : subResourceSerializer(item["basePolicy"]), + threatIntelMode: item["threatIntelMode"], + threatIntelWhitelist: !item["threatIntelWhitelist"] + ? item["threatIntelWhitelist"] + : firewallPolicyThreatIntelWhitelistSerializer(item["threatIntelWhitelist"]), + insights: !item["insights"] + ? item["insights"] + : firewallPolicyInsightsSerializer(item["insights"]), + snat: !item["snat"] ? item["snat"] : firewallPolicySnatSerializer(item["snat"]), + sql: !item["sql"] ? item["sql"] : firewallPolicySQLSerializer(item["sql"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : dnsSettingsSerializer(item["dnsSettings"]), + explicitProxy: !item["explicitProxy"] + ? item["explicitProxy"] + : explicitProxySerializer(item["explicitProxy"]), + intrusionDetection: !item["intrusionDetection"] + ? item["intrusionDetection"] + : firewallPolicyIntrusionDetectionSerializer(item["intrusionDetection"]), + transportSecurity: !item["transportSecurity"] + ? item["transportSecurity"] + : firewallPolicyTransportSecuritySerializer(item["transportSecurity"]), + sku: !item["sku"] ? item["sku"] : firewallPolicySkuSerializer(item["sku"]), + }; +} + +export function firewallPolicyPropertiesFormatDeserializer( + item: any, +): FirewallPolicyPropertiesFormat { + return { + size: item["size"], + ruleCollectionGroups: !item["ruleCollectionGroups"] + ? item["ruleCollectionGroups"] + : subResourceArrayDeserializer(item["ruleCollectionGroups"]), + provisioningState: item["provisioningState"], + basePolicy: !item["basePolicy"] + ? item["basePolicy"] + : subResourceDeserializer(item["basePolicy"]), + firewalls: !item["firewalls"] + ? item["firewalls"] + : subResourceArrayDeserializer(item["firewalls"]), + childPolicies: !item["childPolicies"] + ? item["childPolicies"] + : subResourceArrayDeserializer(item["childPolicies"]), + threatIntelMode: item["threatIntelMode"], + threatIntelWhitelist: !item["threatIntelWhitelist"] + ? item["threatIntelWhitelist"] + : firewallPolicyThreatIntelWhitelistDeserializer(item["threatIntelWhitelist"]), + insights: !item["insights"] + ? item["insights"] + : firewallPolicyInsightsDeserializer(item["insights"]), + snat: !item["snat"] ? item["snat"] : firewallPolicySnatDeserializer(item["snat"]), + sql: !item["sql"] ? item["sql"] : firewallPolicySQLDeserializer(item["sql"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : dnsSettingsDeserializer(item["dnsSettings"]), + explicitProxy: !item["explicitProxy"] + ? item["explicitProxy"] + : explicitProxyDeserializer(item["explicitProxy"]), + intrusionDetection: !item["intrusionDetection"] + ? item["intrusionDetection"] + : firewallPolicyIntrusionDetectionDeserializer(item["intrusionDetection"]), + transportSecurity: !item["transportSecurity"] + ? item["transportSecurity"] + : firewallPolicyTransportSecurityDeserializer(item["transportSecurity"]), + sku: !item["sku"] ? item["sku"] : firewallPolicySkuDeserializer(item["sku"]), + }; +} + +/** ThreatIntel Whitelist for Firewall Policy. */ +export interface FirewallPolicyThreatIntelWhitelist { + /** List of IP addresses for the ThreatIntel Whitelist. */ + ipAddresses?: string[]; + /** List of FQDNs for the ThreatIntel Whitelist. */ + fqdns?: string[]; +} + +export function firewallPolicyThreatIntelWhitelistSerializer( + item: FirewallPolicyThreatIntelWhitelist, +): any { + return { + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + fqdns: !item["fqdns"] + ? item["fqdns"] + : item["fqdns"].map((p: any) => { + return p; + }), + }; +} + +export function firewallPolicyThreatIntelWhitelistDeserializer( + item: any, +): FirewallPolicyThreatIntelWhitelist { + return { + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + fqdns: !item["fqdns"] + ? item["fqdns"] + : item["fqdns"].map((p: any) => { + return p; + }), + }; +} + +/** Firewall Policy Insights. */ +export interface FirewallPolicyInsights { + /** A flag to indicate if the insights are enabled on the policy. */ + isEnabled?: boolean; + /** Number of days the insights should be enabled on the policy. */ + retentionDays?: number; + /** Workspaces needed to configure the Firewall Policy Insights. */ + logAnalyticsResources?: FirewallPolicyLogAnalyticsResources; +} + +export function firewallPolicyInsightsSerializer(item: FirewallPolicyInsights): any { + return { + isEnabled: item["isEnabled"], + retentionDays: item["retentionDays"], + logAnalyticsResources: !item["logAnalyticsResources"] + ? item["logAnalyticsResources"] + : firewallPolicyLogAnalyticsResourcesSerializer(item["logAnalyticsResources"]), + }; +} + +export function firewallPolicyInsightsDeserializer(item: any): FirewallPolicyInsights { + return { + isEnabled: item["isEnabled"], + retentionDays: item["retentionDays"], + logAnalyticsResources: !item["logAnalyticsResources"] + ? item["logAnalyticsResources"] + : firewallPolicyLogAnalyticsResourcesDeserializer(item["logAnalyticsResources"]), + }; +} + +/** Log Analytics Resources for Firewall Policy Insights. */ +export interface FirewallPolicyLogAnalyticsResources { + /** List of workspaces for Firewall Policy Insights. */ + workspaces?: FirewallPolicyLogAnalyticsWorkspace[]; + /** The default workspace Id for Firewall Policy Insights. */ + defaultWorkspaceId?: SubResource; +} + +export function firewallPolicyLogAnalyticsResourcesSerializer( + item: FirewallPolicyLogAnalyticsResources, +): any { + return { + workspaces: !item["workspaces"] + ? item["workspaces"] + : firewallPolicyLogAnalyticsWorkspaceArraySerializer(item["workspaces"]), + defaultWorkspaceId: !item["defaultWorkspaceId"] + ? item["defaultWorkspaceId"] + : subResourceSerializer(item["defaultWorkspaceId"]), + }; +} + +export function firewallPolicyLogAnalyticsResourcesDeserializer( + item: any, +): FirewallPolicyLogAnalyticsResources { + return { + workspaces: !item["workspaces"] + ? item["workspaces"] + : firewallPolicyLogAnalyticsWorkspaceArrayDeserializer(item["workspaces"]), + defaultWorkspaceId: !item["defaultWorkspaceId"] + ? item["defaultWorkspaceId"] + : subResourceDeserializer(item["defaultWorkspaceId"]), + }; +} + +export function firewallPolicyLogAnalyticsWorkspaceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyLogAnalyticsWorkspaceSerializer(item); + }); +} + +export function firewallPolicyLogAnalyticsWorkspaceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyLogAnalyticsWorkspaceDeserializer(item); + }); +} + +/** Log Analytics Workspace for Firewall Policy Insights. */ +export interface FirewallPolicyLogAnalyticsWorkspace { + /** Region to configure the Workspace. */ + region?: string; + /** The workspace Id for Firewall Policy Insights. */ + workspaceId?: SubResource; +} + +export function firewallPolicyLogAnalyticsWorkspaceSerializer( + item: FirewallPolicyLogAnalyticsWorkspace, +): any { + return { + region: item["region"], + workspaceId: !item["workspaceId"] + ? item["workspaceId"] + : subResourceSerializer(item["workspaceId"]), + }; +} + +export function firewallPolicyLogAnalyticsWorkspaceDeserializer( + item: any, +): FirewallPolicyLogAnalyticsWorkspace { + return { + region: item["region"], + workspaceId: !item["workspaceId"] + ? item["workspaceId"] + : subResourceDeserializer(item["workspaceId"]), + }; +} + +/** The private IP addresses/IP ranges to which traffic will not be SNAT. */ +export interface FirewallPolicySnat { + /** List of private IP addresses/IP address ranges to not be SNAT. */ + privateRanges?: string[]; + /** The operation mode for automatically learning private ranges to not be SNAT */ + autoLearnPrivateRanges?: AutoLearnPrivateRangesMode; +} + +export function firewallPolicySnatSerializer(item: FirewallPolicySnat): any { + return { + privateRanges: !item["privateRanges"] + ? item["privateRanges"] + : item["privateRanges"].map((p: any) => { + return p; + }), + autoLearnPrivateRanges: item["autoLearnPrivateRanges"], + }; +} + +export function firewallPolicySnatDeserializer(item: any): FirewallPolicySnat { + return { + privateRanges: !item["privateRanges"] + ? item["privateRanges"] + : item["privateRanges"].map((p: any) => { + return p; + }), + autoLearnPrivateRanges: item["autoLearnPrivateRanges"], + }; +} + +/** The operation mode for automatically learning private ranges to not be SNAT */ +export enum KnownAutoLearnPrivateRangesMode { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * The operation mode for automatically learning private ranges to not be SNAT \ + * {@link KnownAutoLearnPrivateRangesMode} can be used interchangeably with AutoLearnPrivateRangesMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Enabled \ + * **Disabled**: Disabled + */ +export type AutoLearnPrivateRangesMode = string; + +/** SQL Settings in Firewall Policy. */ +export interface FirewallPolicySQL { + /** A flag to indicate if SQL Redirect traffic filtering is enabled. Turning on the flag requires no rule using port 11000-11999. */ + allowSqlRedirect?: boolean; +} + +export function firewallPolicySQLSerializer(item: FirewallPolicySQL): any { + return { allowSqlRedirect: item["allowSqlRedirect"] }; +} + +export function firewallPolicySQLDeserializer(item: any): FirewallPolicySQL { + return { + allowSqlRedirect: item["allowSqlRedirect"], + }; +} + +/** DNS Proxy Settings in Firewall Policy. */ +export interface DnsSettings { + /** List of Custom DNS Servers. */ + servers?: string[]; + /** Enable DNS Proxy on Firewalls attached to the Firewall Policy. */ + enableProxy?: boolean; + /** FQDNs in Network Rules are supported when set to true. */ + requireProxyForNetworkRules?: boolean; +} + +export function dnsSettingsSerializer(item: DnsSettings): any { + return { + servers: !item["servers"] + ? item["servers"] + : item["servers"].map((p: any) => { + return p; + }), + enableProxy: item["enableProxy"], + requireProxyForNetworkRules: item["requireProxyForNetworkRules"], + }; +} + +export function dnsSettingsDeserializer(item: any): DnsSettings { + return { + servers: !item["servers"] + ? item["servers"] + : item["servers"].map((p: any) => { + return p; + }), + enableProxy: item["enableProxy"], + requireProxyForNetworkRules: item["requireProxyForNetworkRules"], + }; +} + +/** Explicit Proxy Settings in Firewall Policy. */ +export interface ExplicitProxy { + /** When set to true, explicit proxy mode is enabled. */ + enableExplicitProxy?: boolean; + /** Port number for explicit proxy http protocol, cannot be greater than 64000. */ + httpPort?: number; + /** Port number for explicit proxy https protocol, cannot be greater than 64000. */ + httpsPort?: number; + /** When set to true, pac file port and url needs to be provided. */ + enablePacFile?: boolean; + /** Port number for firewall to serve PAC file. */ + pacFilePort?: number; + /** SAS URL for PAC file. */ + pacFile?: string; +} + +export function explicitProxySerializer(item: ExplicitProxy): any { + return { + enableExplicitProxy: item["enableExplicitProxy"], + httpPort: item["httpPort"], + httpsPort: item["httpsPort"], + enablePacFile: item["enablePacFile"], + pacFilePort: item["pacFilePort"], + pacFile: item["pacFile"], + }; +} + +export function explicitProxyDeserializer(item: any): ExplicitProxy { + return { + enableExplicitProxy: item["enableExplicitProxy"], + httpPort: item["httpPort"], + httpsPort: item["httpsPort"], + enablePacFile: item["enablePacFile"], + pacFilePort: item["pacFilePort"], + pacFile: item["pacFile"], + }; +} + +/** Configuration for intrusion detection mode and rules. */ +export interface FirewallPolicyIntrusionDetection { + /** Intrusion detection general state. When attached to a parent policy, the firewall's effective IDPS mode is the stricter mode of the two. */ + mode?: FirewallPolicyIntrusionDetectionStateType; + /** IDPS profile name. When attached to a parent policy, the firewall's effective profile is the profile name of the parent policy. */ + profile?: FirewallPolicyIntrusionDetectionProfileType; + /** Intrusion detection configuration properties. */ + configuration?: FirewallPolicyIntrusionDetectionConfiguration; +} + +export function firewallPolicyIntrusionDetectionSerializer( + item: FirewallPolicyIntrusionDetection, +): any { + return { + mode: item["mode"], + profile: item["profile"], + configuration: !item["configuration"] + ? item["configuration"] + : firewallPolicyIntrusionDetectionConfigurationSerializer(item["configuration"]), + }; +} + +export function firewallPolicyIntrusionDetectionDeserializer( + item: any, +): FirewallPolicyIntrusionDetection { + return { + mode: item["mode"], + profile: item["profile"], + configuration: !item["configuration"] + ? item["configuration"] + : firewallPolicyIntrusionDetectionConfigurationDeserializer(item["configuration"]), + }; +} + +/** Possible state values. */ +export enum KnownFirewallPolicyIntrusionDetectionStateType { + /** Off */ + Off = "Off", + /** Alert */ + Alert = "Alert", + /** Deny */ + Deny = "Deny", +} + +/** + * Possible state values. \ + * {@link KnownFirewallPolicyIntrusionDetectionStateType} can be used interchangeably with FirewallPolicyIntrusionDetectionStateType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Off**: Off \ + * **Alert**: Alert \ + * **Deny**: Deny + */ +export type FirewallPolicyIntrusionDetectionStateType = string; + +/** + * Specifies the Intrusion Detection signature profile to apply. + * + * Values: + * - Off: IDPS profiles disabled; uses the same signature set that existed before profiles. + * - Emerging: Signatures of the newest, most recent threats. + * - Core: Complete, modern, standard set of signatures. + * - Extended: Core signatures plus older legacy signatures for maximum coverage. + */ +export enum KnownFirewallPolicyIntrusionDetectionProfileType { + /** Off */ + Off = "Off", + /** Emerging */ + Emerging = "Emerging", + /** Core */ + Core = "Core", + /** Extended */ + Extended = "Extended", +} + +/** + * Specifies the Intrusion Detection signature profile to apply. + * + * Values: + * - Off: IDPS profiles disabled; uses the same signature set that existed before profiles. + * - Emerging: Signatures of the newest, most recent threats. + * - Core: Complete, modern, standard set of signatures. + * - Extended: Core signatures plus older legacy signatures for maximum coverage. \ + * {@link KnownFirewallPolicyIntrusionDetectionProfileType} can be used interchangeably with FirewallPolicyIntrusionDetectionProfileType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Off**: Off \ + * **Emerging**: Emerging \ + * **Core**: Core \ + * **Extended**: Extended + */ +export type FirewallPolicyIntrusionDetectionProfileType = string; + +/** The operation for configuring intrusion detection. */ +export interface FirewallPolicyIntrusionDetectionConfiguration { + /** List of specific signatures states. */ + 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[]; +} + +export function firewallPolicyIntrusionDetectionConfigurationSerializer( + item: FirewallPolicyIntrusionDetectionConfiguration, +): any { + return { + signatureOverrides: !item["signatureOverrides"] + ? item["signatureOverrides"] + : firewallPolicyIntrusionDetectionSignatureSpecificationArraySerializer( + item["signatureOverrides"], + ), + bypassTrafficSettings: !item["bypassTrafficSettings"] + ? item["bypassTrafficSettings"] + : firewallPolicyIntrusionDetectionBypassTrafficSpecificationsArraySerializer( + item["bypassTrafficSettings"], + ), + privateRanges: !item["privateRanges"] + ? item["privateRanges"] + : item["privateRanges"].map((p: any) => { + return p; + }), + }; +} + +export function firewallPolicyIntrusionDetectionConfigurationDeserializer( + item: any, +): FirewallPolicyIntrusionDetectionConfiguration { + return { + signatureOverrides: !item["signatureOverrides"] + ? item["signatureOverrides"] + : firewallPolicyIntrusionDetectionSignatureSpecificationArrayDeserializer( + item["signatureOverrides"], + ), + bypassTrafficSettings: !item["bypassTrafficSettings"] + ? item["bypassTrafficSettings"] + : firewallPolicyIntrusionDetectionBypassTrafficSpecificationsArrayDeserializer( + item["bypassTrafficSettings"], + ), + privateRanges: !item["privateRanges"] + ? item["privateRanges"] + : item["privateRanges"].map((p: any) => { + return p; + }), + }; +} + +export function firewallPolicyIntrusionDetectionSignatureSpecificationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyIntrusionDetectionSignatureSpecificationSerializer(item); + }); +} + +export function firewallPolicyIntrusionDetectionSignatureSpecificationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyIntrusionDetectionSignatureSpecificationDeserializer(item); + }); +} + +/** Intrusion detection signatures specification states. */ +export interface FirewallPolicyIntrusionDetectionSignatureSpecification { + /** Signature id. */ + id?: string; + /** The signature state. */ + mode?: FirewallPolicyIntrusionDetectionStateType; +} + +export function firewallPolicyIntrusionDetectionSignatureSpecificationSerializer( + item: FirewallPolicyIntrusionDetectionSignatureSpecification, +): any { + return { id: item["id"], mode: item["mode"] }; +} + +export function firewallPolicyIntrusionDetectionSignatureSpecificationDeserializer( + item: any, +): FirewallPolicyIntrusionDetectionSignatureSpecification { + return { + id: item["id"], + mode: item["mode"], + }; +} + +export function firewallPolicyIntrusionDetectionBypassTrafficSpecificationsArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyIntrusionDetectionBypassTrafficSpecificationsSerializer(item); + }); +} + +export function firewallPolicyIntrusionDetectionBypassTrafficSpecificationsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyIntrusionDetectionBypassTrafficSpecificationsDeserializer(item); + }); +} + +/** Intrusion detection bypass traffic specification. */ +export interface FirewallPolicyIntrusionDetectionBypassTrafficSpecifications { + /** Name of the bypass traffic rule. */ + name?: string; + /** Description of the bypass traffic rule. */ + description?: string; + /** The rule bypass protocol. */ + protocol?: FirewallPolicyIntrusionDetectionProtocol; + /** List of source IP addresses or ranges for this rule. */ + sourceAddresses?: string[]; + /** List of destination IP addresses or ranges for this rule. */ + destinationAddresses?: string[]; + /** List of destination ports or ranges. */ + destinationPorts?: string[]; + /** List of source IpGroups for this rule. */ + sourceIpGroups?: string[]; + /** List of destination IpGroups for this rule. */ + destinationIpGroups?: string[]; +} + +export function firewallPolicyIntrusionDetectionBypassTrafficSpecificationsSerializer( + item: FirewallPolicyIntrusionDetectionBypassTrafficSpecifications, +): any { + return { + name: item["name"], + description: item["description"], + protocol: item["protocol"], + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + destinationIpGroups: !item["destinationIpGroups"] + ? item["destinationIpGroups"] + : item["destinationIpGroups"].map((p: any) => { + return p; + }), + }; +} + +export function firewallPolicyIntrusionDetectionBypassTrafficSpecificationsDeserializer( + item: any, +): FirewallPolicyIntrusionDetectionBypassTrafficSpecifications { + return { + name: item["name"], + description: item["description"], + protocol: item["protocol"], + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + destinationIpGroups: !item["destinationIpGroups"] + ? item["destinationIpGroups"] + : item["destinationIpGroups"].map((p: any) => { + return p; + }), + }; +} + +/** Possible intrusion detection bypass traffic protocols. */ +export enum KnownFirewallPolicyIntrusionDetectionProtocol { + /** TCP */ + TCP = "TCP", + /** UDP */ + UDP = "UDP", + /** ICMP */ + Icmp = "ICMP", + /** ANY */ + ANY = "ANY", +} + +/** + * Possible intrusion detection bypass traffic protocols. \ + * {@link KnownFirewallPolicyIntrusionDetectionProtocol} can be used interchangeably with FirewallPolicyIntrusionDetectionProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TCP**: TCP \ + * **UDP**: UDP \ + * **ICMP**: ICMP \ + * **ANY**: ANY + */ +export type FirewallPolicyIntrusionDetectionProtocol = string; + +/** Configuration needed to perform TLS termination & initiation. */ +export interface FirewallPolicyTransportSecurity { + /** The CA used for intermediate CA generation. */ + certificateAuthority?: FirewallPolicyCertificateAuthority; +} + +export function firewallPolicyTransportSecuritySerializer( + item: FirewallPolicyTransportSecurity, +): any { + return { + certificateAuthority: !item["certificateAuthority"] + ? item["certificateAuthority"] + : firewallPolicyCertificateAuthoritySerializer(item["certificateAuthority"]), + }; +} + +export function firewallPolicyTransportSecurityDeserializer( + item: any, +): FirewallPolicyTransportSecurity { + return { + certificateAuthority: !item["certificateAuthority"] + ? item["certificateAuthority"] + : firewallPolicyCertificateAuthorityDeserializer(item["certificateAuthority"]), + }; +} + +/** Trusted Root certificates properties for tls. */ +export interface FirewallPolicyCertificateAuthority { + /** Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. */ + keyVaultSecretId?: string; + /** Name of the CA certificate. */ + name?: string; +} + +export function firewallPolicyCertificateAuthoritySerializer( + item: FirewallPolicyCertificateAuthority, +): any { + return { keyVaultSecretId: item["keyVaultSecretId"], name: item["name"] }; +} + +export function firewallPolicyCertificateAuthorityDeserializer( + item: any, +): FirewallPolicyCertificateAuthority { + return { + keyVaultSecretId: item["keyVaultSecretId"], + name: item["name"], + }; +} + +/** SKU of Firewall policy. */ +export interface FirewallPolicySku { + /** Tier of Firewall Policy. */ + tier?: FirewallPolicySkuTier; +} + +export function firewallPolicySkuSerializer(item: FirewallPolicySku): any { + return { tier: item["tier"] }; +} + +export function firewallPolicySkuDeserializer(item: any): FirewallPolicySku { + return { + tier: item["tier"], + }; +} + +/** Tier of Firewall Policy. */ +export enum KnownFirewallPolicySkuTier { + /** Standard */ + Standard = "Standard", + /** Premium */ + Premium = "Premium", + /** Basic */ + Basic = "Basic", +} + +/** + * Tier of Firewall Policy. \ + * {@link KnownFirewallPolicySkuTier} can be used interchangeably with FirewallPolicySkuTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard \ + * **Premium**: Premium \ + * **Basic**: Basic + */ +export type FirewallPolicySkuTier = string; + +export function firewallPolicyArraySerializer(result: Array): any[] { + return result.map((item) => { + return firewallPolicySerializer(item); + }); +} + +export function firewallPolicyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return firewallPolicyDeserializer(item); + }); +} + +/** Rule Collection Group resource. */ +export interface FirewallPolicyRuleCollectionGroup extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** A read-only string that represents the size of the FirewallPolicyRuleCollectionGroupProperties in MB. (ex 1.2MB) */ + readonly size?: string; + /** Priority of the Firewall Policy Rule Collection Group resource. */ + priority?: number; + /** Group of Firewall Policy rule collections. */ + ruleCollections?: FirewallPolicyRuleCollectionUnion[]; + /** The provisioning state of the firewall policy rule collection group resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function firewallPolicyRuleCollectionGroupSerializer( + item: FirewallPolicyRuleCollectionGroup, +): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["priority", "ruleCollections"]) + ? undefined + : _firewallPolicyRuleCollectionGroupPropertiesSerializer(item), + }; +} + +export function firewallPolicyRuleCollectionGroupDeserializer( + item: any, +): FirewallPolicyRuleCollectionGroup { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _firewallPolicyRuleCollectionGroupPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the rule collection group. */ +export interface FirewallPolicyRuleCollectionGroupProperties { + /** A read-only string that represents the size of the FirewallPolicyRuleCollectionGroupProperties in MB. (ex 1.2MB) */ + readonly size?: string; + /** Priority of the Firewall Policy Rule Collection Group resource. */ + priority?: number; + /** Group of Firewall Policy rule collections. */ + ruleCollections?: FirewallPolicyRuleCollectionUnion[]; + /** The provisioning state of the firewall policy rule collection group resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function firewallPolicyRuleCollectionGroupPropertiesSerializer( + item: FirewallPolicyRuleCollectionGroupProperties, +): any { + return { + priority: item["priority"], + ruleCollections: !item["ruleCollections"] + ? item["ruleCollections"] + : firewallPolicyRuleCollectionUnionArraySerializer(item["ruleCollections"]), + }; +} + +export function firewallPolicyRuleCollectionGroupPropertiesDeserializer( + item: any, +): FirewallPolicyRuleCollectionGroupProperties { + return { + size: item["size"], + priority: item["priority"], + ruleCollections: !item["ruleCollections"] + ? item["ruleCollections"] + : firewallPolicyRuleCollectionUnionArrayDeserializer(item["ruleCollections"]), + provisioningState: item["provisioningState"], + }; +} + +export function firewallPolicyRuleCollectionUnionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyRuleCollectionUnionSerializer(item); + }); +} + +export function firewallPolicyRuleCollectionUnionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyRuleCollectionUnionDeserializer(item); + }); +} + +/** Properties of the rule collection. */ +export interface FirewallPolicyRuleCollection { + /** The type of the rule collection. */ + /** The discriminator possible values: FirewallPolicyNatRuleCollection, FirewallPolicyFilterRuleCollection */ + ruleCollectionType: FirewallPolicyRuleCollectionType; + /** The name of the rule collection. */ + name?: string; + /** Priority of the Firewall Policy Rule Collection resource. */ + priority?: number; +} + +export function firewallPolicyRuleCollectionSerializer(item: FirewallPolicyRuleCollection): any { + return { + ruleCollectionType: item["ruleCollectionType"], + name: item["name"], + priority: item["priority"], + }; +} + +export function firewallPolicyRuleCollectionDeserializer(item: any): FirewallPolicyRuleCollection { + return { + ruleCollectionType: item["ruleCollectionType"], + name: item["name"], + priority: item["priority"], + }; +} + +/** Alias for FirewallPolicyRuleCollectionUnion */ +export type FirewallPolicyRuleCollectionUnion = + | FirewallPolicyNatRuleCollection + | FirewallPolicyFilterRuleCollection + | FirewallPolicyRuleCollection; + +export function firewallPolicyRuleCollectionUnionSerializer( + item: FirewallPolicyRuleCollectionUnion, +): any { + switch (item.ruleCollectionType) { + case "FirewallPolicyNatRuleCollection": + return firewallPolicyNatRuleCollectionSerializer(item as FirewallPolicyNatRuleCollection); + + case "FirewallPolicyFilterRuleCollection": + return firewallPolicyFilterRuleCollectionSerializer( + item as FirewallPolicyFilterRuleCollection, + ); + + default: + return firewallPolicyRuleCollectionSerializer(item); + } +} + +export function firewallPolicyRuleCollectionUnionDeserializer( + item: any, +): FirewallPolicyRuleCollectionUnion { + switch (item["ruleCollectionType"]) { + case "FirewallPolicyNatRuleCollection": + return firewallPolicyNatRuleCollectionDeserializer(item as FirewallPolicyNatRuleCollection); + + case "FirewallPolicyFilterRuleCollection": + return firewallPolicyFilterRuleCollectionDeserializer( + item as FirewallPolicyFilterRuleCollection, + ); + + default: + return firewallPolicyRuleCollectionDeserializer(item); + } +} + +/** The type of the rule collection. */ +export enum KnownFirewallPolicyRuleCollectionType { + /** FirewallPolicyNatRuleCollection */ + FirewallPolicyNatRuleCollection = "FirewallPolicyNatRuleCollection", + /** FirewallPolicyFilterRuleCollection */ + FirewallPolicyFilterRuleCollection = "FirewallPolicyFilterRuleCollection", +} + +/** + * The type of the rule collection. \ + * {@link KnownFirewallPolicyRuleCollectionType} can be used interchangeably with FirewallPolicyRuleCollectionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **FirewallPolicyNatRuleCollection**: FirewallPolicyNatRuleCollection \ + * **FirewallPolicyFilterRuleCollection**: FirewallPolicyFilterRuleCollection + */ +export type FirewallPolicyRuleCollectionType = string; + +/** Firewall Policy NAT Rule Collection. */ +export interface FirewallPolicyNatRuleCollection extends FirewallPolicyRuleCollection { + /** The action type of a Nat rule collection. */ + action?: FirewallPolicyNatRuleCollectionAction; + /** List of rules included in a rule collection. */ + rules?: FirewallPolicyRuleUnion[]; + /** The type of the rule collection. */ + ruleCollectionType: "FirewallPolicyNatRuleCollection"; +} + +export function firewallPolicyNatRuleCollectionSerializer( + item: FirewallPolicyNatRuleCollection, +): any { + return { + ruleCollectionType: item["ruleCollectionType"], + name: item["name"], + priority: item["priority"], + action: !item["action"] + ? item["action"] + : firewallPolicyNatRuleCollectionActionSerializer(item["action"]), + rules: !item["rules"] ? item["rules"] : firewallPolicyRuleUnionArraySerializer(item["rules"]), + }; +} + +export function firewallPolicyNatRuleCollectionDeserializer( + item: any, +): FirewallPolicyNatRuleCollection { + return { + ruleCollectionType: item["ruleCollectionType"], + name: item["name"], + priority: item["priority"], + action: !item["action"] + ? item["action"] + : firewallPolicyNatRuleCollectionActionDeserializer(item["action"]), + rules: !item["rules"] ? item["rules"] : firewallPolicyRuleUnionArrayDeserializer(item["rules"]), + }; +} + +/** Properties of the FirewallPolicyNatRuleCollectionAction. */ +export interface FirewallPolicyNatRuleCollectionAction { + /** The type of action. */ + type?: FirewallPolicyNatRuleCollectionActionType; +} + +export function firewallPolicyNatRuleCollectionActionSerializer( + item: FirewallPolicyNatRuleCollectionAction, +): any { + return { type: item["type"] }; +} + +export function firewallPolicyNatRuleCollectionActionDeserializer( + item: any, +): FirewallPolicyNatRuleCollectionAction { + return { + type: item["type"], + }; +} + +/** The action type of a rule. */ +export enum KnownFirewallPolicyNatRuleCollectionActionType { + /** DNAT */ + Dnat = "DNAT", +} + +/** + * The action type of a rule. \ + * {@link KnownFirewallPolicyNatRuleCollectionActionType} can be used interchangeably with FirewallPolicyNatRuleCollectionActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DNAT**: DNAT + */ +export type FirewallPolicyNatRuleCollectionActionType = string; + +export function firewallPolicyRuleUnionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyRuleUnionSerializer(item); + }); +} + +export function firewallPolicyRuleUnionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyRuleUnionDeserializer(item); + }); +} + +/** Properties of a rule. */ +export interface FirewallPolicyRule { + /** Name of the rule. */ + name?: string; + /** Description of the rule. */ + description?: string; + /** Rule Type. */ + /** The discriminator possible values: ApplicationRule, NatRule, NetworkRule */ + ruleType: FirewallPolicyRuleType; +} + +export function firewallPolicyRuleSerializer(item: FirewallPolicyRule): any { + return { name: item["name"], description: item["description"], ruleType: item["ruleType"] }; +} + +export function firewallPolicyRuleDeserializer(item: any): FirewallPolicyRule { + return { + name: item["name"], + description: item["description"], + ruleType: item["ruleType"], + }; +} + +/** Alias for FirewallPolicyRuleUnion */ +export type FirewallPolicyRuleUnion = ApplicationRule | NatRule | NetworkRule | FirewallPolicyRule; + +export function firewallPolicyRuleUnionSerializer(item: FirewallPolicyRuleUnion): any { + switch (item.ruleType) { + case "ApplicationRule": + return applicationRuleSerializer(item as ApplicationRule); + + case "NatRule": + return natRuleSerializer(item as NatRule); + + case "NetworkRule": + return networkRuleSerializer(item as NetworkRule); + + default: + return firewallPolicyRuleSerializer(item); + } +} + +export function firewallPolicyRuleUnionDeserializer(item: any): FirewallPolicyRuleUnion { + switch (item["ruleType"]) { + case "ApplicationRule": + return applicationRuleDeserializer(item as ApplicationRule); + + case "NatRule": + return natRuleDeserializer(item as NatRule); + + case "NetworkRule": + return networkRuleDeserializer(item as NetworkRule); + + default: + return firewallPolicyRuleDeserializer(item); + } +} + +/** Rule Type. */ +export enum KnownFirewallPolicyRuleType { + /** ApplicationRule */ + ApplicationRule = "ApplicationRule", + /** NetworkRule */ + NetworkRule = "NetworkRule", + /** NatRule */ + NatRule = "NatRule", +} + +/** + * Rule Type. \ + * {@link KnownFirewallPolicyRuleType} can be used interchangeably with FirewallPolicyRuleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ApplicationRule**: ApplicationRule \ + * **NetworkRule**: NetworkRule \ + * **NatRule**: NatRule + */ +export type FirewallPolicyRuleType = string; + +/** Rule of type application. */ +export interface ApplicationRule extends FirewallPolicyRule { + /** List of source IP addresses for this rule. */ + sourceAddresses?: string[]; + /** List of destination IP addresses or Service Tags. */ + destinationAddresses?: string[]; + /** Array of Application Protocols. */ + protocols?: FirewallPolicyRuleApplicationProtocol[]; + /** List of FQDNs for this rule. */ + targetFqdns?: string[]; + /** List of Urls for this rule condition. */ + targetUrls?: string[]; + /** List of FQDN Tags for this rule. */ + fqdnTags?: string[]; + /** List of source IpGroups for this rule. */ + sourceIpGroups?: string[]; + /** Terminate TLS connections for this rule. */ + terminateTLS?: boolean; + /** List of destination azure web categories. */ + webCategories?: string[]; + /** List of HTTP/S headers to insert. */ + httpHeadersToInsert?: FirewallPolicyHttpHeaderToInsert[]; + /** Rule Type. */ + ruleType: "ApplicationRule"; +} + +export function applicationRuleSerializer(item: ApplicationRule): any { + return { + name: item["name"], + description: item["description"], + ruleType: item["ruleType"], + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + protocols: !item["protocols"] + ? item["protocols"] + : firewallPolicyRuleApplicationProtocolArraySerializer(item["protocols"]), + targetFqdns: !item["targetFqdns"] + ? item["targetFqdns"] + : item["targetFqdns"].map((p: any) => { + return p; + }), + targetUrls: !item["targetUrls"] + ? item["targetUrls"] + : item["targetUrls"].map((p: any) => { + return p; + }), + fqdnTags: !item["fqdnTags"] + ? item["fqdnTags"] + : item["fqdnTags"].map((p: any) => { + return p; + }), + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + terminateTLS: item["terminateTLS"], + webCategories: !item["webCategories"] + ? item["webCategories"] + : item["webCategories"].map((p: any) => { + return p; + }), + httpHeadersToInsert: !item["httpHeadersToInsert"] + ? item["httpHeadersToInsert"] + : firewallPolicyHttpHeaderToInsertArraySerializer(item["httpHeadersToInsert"]), + }; +} + +export function applicationRuleDeserializer(item: any): ApplicationRule { + return { + name: item["name"], + description: item["description"], + ruleType: item["ruleType"], + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + protocols: !item["protocols"] + ? item["protocols"] + : firewallPolicyRuleApplicationProtocolArrayDeserializer(item["protocols"]), + targetFqdns: !item["targetFqdns"] + ? item["targetFqdns"] + : item["targetFqdns"].map((p: any) => { + return p; + }), + targetUrls: !item["targetUrls"] + ? item["targetUrls"] + : item["targetUrls"].map((p: any) => { + return p; + }), + fqdnTags: !item["fqdnTags"] + ? item["fqdnTags"] + : item["fqdnTags"].map((p: any) => { + return p; + }), + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + terminateTLS: item["terminateTLS"], + webCategories: !item["webCategories"] + ? item["webCategories"] + : item["webCategories"].map((p: any) => { + return p; + }), + httpHeadersToInsert: !item["httpHeadersToInsert"] + ? item["httpHeadersToInsert"] + : firewallPolicyHttpHeaderToInsertArrayDeserializer(item["httpHeadersToInsert"]), + }; +} + +export function firewallPolicyRuleApplicationProtocolArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyRuleApplicationProtocolSerializer(item); + }); +} + +export function firewallPolicyRuleApplicationProtocolArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyRuleApplicationProtocolDeserializer(item); + }); +} + +/** Properties of the application rule protocol. */ +export interface FirewallPolicyRuleApplicationProtocol { + /** Protocol type. */ + protocolType?: FirewallPolicyRuleApplicationProtocolType; + /** Port number for the protocol, cannot be greater than 64000. */ + port?: number; +} + +export function firewallPolicyRuleApplicationProtocolSerializer( + item: FirewallPolicyRuleApplicationProtocol, +): any { + return { protocolType: item["protocolType"], port: item["port"] }; +} + +export function firewallPolicyRuleApplicationProtocolDeserializer( + item: any, +): FirewallPolicyRuleApplicationProtocol { + return { + protocolType: item["protocolType"], + port: item["port"], + }; +} + +/** The application protocol type of a Rule. */ +export enum KnownFirewallPolicyRuleApplicationProtocolType { + /** Http */ + Http = "Http", + /** Https */ + Https = "Https", +} + +/** + * The application protocol type of a Rule. \ + * {@link KnownFirewallPolicyRuleApplicationProtocolType} can be used interchangeably with FirewallPolicyRuleApplicationProtocolType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Http**: Http \ + * **Https**: Https + */ +export type FirewallPolicyRuleApplicationProtocolType = string; + +export function firewallPolicyHttpHeaderToInsertArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyHttpHeaderToInsertSerializer(item); + }); +} + +export function firewallPolicyHttpHeaderToInsertArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyHttpHeaderToInsertDeserializer(item); + }); +} + +/** name and value of HTTP/S header to insert */ +export interface FirewallPolicyHttpHeaderToInsert { + /** Contains the name of the header */ + headerName?: string; + /** Contains the value of the header */ + headerValue?: string; +} + +export function firewallPolicyHttpHeaderToInsertSerializer( + item: FirewallPolicyHttpHeaderToInsert, +): any { + return { headerName: item["headerName"], headerValue: item["headerValue"] }; +} + +export function firewallPolicyHttpHeaderToInsertDeserializer( + item: any, +): FirewallPolicyHttpHeaderToInsert { + return { + headerName: item["headerName"], + headerValue: item["headerValue"], + }; +} + +/** Rule of type nat. */ +export interface NatRule extends FirewallPolicyRule { + /** Array of FirewallPolicyRuleNetworkProtocols. */ + ipProtocols?: FirewallPolicyRuleNetworkProtocol[]; + /** List of source IP addresses for this rule. */ + sourceAddresses?: string[]; + /** List of destination IP addresses or Service Tags. */ + destinationAddresses?: string[]; + /** List of destination ports. */ + destinationPorts?: string[]; + /** The translated address for this NAT rule. */ + translatedAddress?: string; + /** The translated port for this NAT rule. */ + translatedPort?: string; + /** List of source IpGroups for this rule. */ + sourceIpGroups?: string[]; + /** The translated FQDN for this NAT rule. */ + translatedFqdn?: string; + /** Rule Type. */ + ruleType: "NatRule"; +} + +export function natRuleSerializer(item: NatRule): any { + return { + name: item["name"], + description: item["description"], + ruleType: item["ruleType"], + ipProtocols: !item["ipProtocols"] + ? item["ipProtocols"] + : item["ipProtocols"].map((p: any) => { + return p; + }), + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + translatedAddress: item["translatedAddress"], + translatedPort: item["translatedPort"], + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + translatedFqdn: item["translatedFqdn"], + }; +} + +export function natRuleDeserializer(item: any): NatRule { + return { + name: item["name"], + description: item["description"], + ruleType: item["ruleType"], + ipProtocols: !item["ipProtocols"] + ? item["ipProtocols"] + : item["ipProtocols"].map((p: any) => { + return p; + }), + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + translatedAddress: item["translatedAddress"], + translatedPort: item["translatedPort"], + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + translatedFqdn: item["translatedFqdn"], + }; +} + +/** The Network protocol of a Rule. */ +export enum KnownFirewallPolicyRuleNetworkProtocol { + /** TCP */ + TCP = "TCP", + /** UDP */ + UDP = "UDP", + /** Any */ + Any = "Any", + /** ICMP */ + Icmp = "ICMP", +} + +/** + * The Network protocol of a Rule. \ + * {@link KnownFirewallPolicyRuleNetworkProtocol} can be used interchangeably with FirewallPolicyRuleNetworkProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TCP**: TCP \ + * **UDP**: UDP \ + * **Any**: Any \ + * **ICMP**: ICMP + */ +export type FirewallPolicyRuleNetworkProtocol = string; + +/** Rule of type network. */ +export interface NetworkRule extends FirewallPolicyRule { + /** Array of FirewallPolicyRuleNetworkProtocols. */ + ipProtocols?: FirewallPolicyRuleNetworkProtocol[]; + /** List of source IP addresses for this rule. */ + sourceAddresses?: string[]; + /** List of destination IP addresses or Service Tags. */ + destinationAddresses?: string[]; + /** List of destination ports. */ + destinationPorts?: string[]; + /** List of source IpGroups for this rule. */ + sourceIpGroups?: string[]; + /** List of destination IpGroups for this rule. */ + destinationIpGroups?: string[]; + /** List of destination FQDNs. */ + destinationFqdns?: string[]; + /** Rule Type. */ + ruleType: "NetworkRule"; +} + +export function networkRuleSerializer(item: NetworkRule): any { + return { + name: item["name"], + description: item["description"], + ruleType: item["ruleType"], + ipProtocols: !item["ipProtocols"] + ? item["ipProtocols"] + : item["ipProtocols"].map((p: any) => { + return p; + }), + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + destinationIpGroups: !item["destinationIpGroups"] + ? item["destinationIpGroups"] + : item["destinationIpGroups"].map((p: any) => { + return p; + }), + destinationFqdns: !item["destinationFqdns"] + ? item["destinationFqdns"] + : item["destinationFqdns"].map((p: any) => { + return p; + }), + }; +} + +export function networkRuleDeserializer(item: any): NetworkRule { + return { + name: item["name"], + description: item["description"], + ruleType: item["ruleType"], + ipProtocols: !item["ipProtocols"] + ? item["ipProtocols"] + : item["ipProtocols"].map((p: any) => { + return p; + }), + sourceAddresses: !item["sourceAddresses"] + ? item["sourceAddresses"] + : item["sourceAddresses"].map((p: any) => { + return p; + }), + destinationAddresses: !item["destinationAddresses"] + ? item["destinationAddresses"] + : item["destinationAddresses"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + sourceIpGroups: !item["sourceIpGroups"] + ? item["sourceIpGroups"] + : item["sourceIpGroups"].map((p: any) => { + return p; + }), + destinationIpGroups: !item["destinationIpGroups"] + ? item["destinationIpGroups"] + : item["destinationIpGroups"].map((p: any) => { + return p; + }), + destinationFqdns: !item["destinationFqdns"] + ? item["destinationFqdns"] + : item["destinationFqdns"].map((p: any) => { + return p; + }), + }; +} + +/** Firewall Policy Filter Rule Collection. */ +export interface FirewallPolicyFilterRuleCollection extends FirewallPolicyRuleCollection { + /** The action type of a Filter rule collection. */ + action?: FirewallPolicyFilterRuleCollectionAction; + /** List of rules included in a rule collection. */ + rules?: FirewallPolicyRuleUnion[]; + /** The type of the rule collection. */ + ruleCollectionType: "FirewallPolicyFilterRuleCollection"; +} + +export function firewallPolicyFilterRuleCollectionSerializer( + item: FirewallPolicyFilterRuleCollection, +): any { + return { + ruleCollectionType: item["ruleCollectionType"], + name: item["name"], + priority: item["priority"], + action: !item["action"] + ? item["action"] + : firewallPolicyFilterRuleCollectionActionSerializer(item["action"]), + rules: !item["rules"] ? item["rules"] : firewallPolicyRuleUnionArraySerializer(item["rules"]), + }; +} + +export function firewallPolicyFilterRuleCollectionDeserializer( + item: any, +): FirewallPolicyFilterRuleCollection { + return { + ruleCollectionType: item["ruleCollectionType"], + name: item["name"], + priority: item["priority"], + action: !item["action"] + ? item["action"] + : firewallPolicyFilterRuleCollectionActionDeserializer(item["action"]), + rules: !item["rules"] ? item["rules"] : firewallPolicyRuleUnionArrayDeserializer(item["rules"]), + }; +} + +/** Properties of the FirewallPolicyFilterRuleCollectionAction. */ +export interface FirewallPolicyFilterRuleCollectionAction { + /** The type of action. */ + type?: FirewallPolicyFilterRuleCollectionActionType; +} + +export function firewallPolicyFilterRuleCollectionActionSerializer( + item: FirewallPolicyFilterRuleCollectionAction, +): any { + return { type: item["type"] }; +} + +export function firewallPolicyFilterRuleCollectionActionDeserializer( + item: any, +): FirewallPolicyFilterRuleCollectionAction { + return { + type: item["type"], + }; +} + +/** The action type of a rule. */ +export enum KnownFirewallPolicyFilterRuleCollectionActionType { + /** Allow */ + Allow = "Allow", + /** Deny */ + Deny = "Deny", +} + +/** + * The action type of a rule. \ + * {@link KnownFirewallPolicyFilterRuleCollectionActionType} can be used interchangeably with FirewallPolicyFilterRuleCollectionActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Allow**: Allow \ + * **Deny**: Deny + */ +export type FirewallPolicyFilterRuleCollectionActionType = string; + +export function firewallPolicyRuleCollectionGroupArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyRuleCollectionGroupSerializer(item); + }); +} + +export function firewallPolicyRuleCollectionGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return firewallPolicyRuleCollectionGroupDeserializer(item); + }); +} + +/** Contains all specific policy signatures overrides for the IDPS */ +export interface SignaturesOverrides extends WritableResource { + /** Will contain the properties of the resource (the actual signature overrides) */ + properties?: SignaturesOverridesProperties; +} + +export function signaturesOverridesSerializer(item: SignaturesOverrides): any { + return { + id: item["id"], + name: item["name"], + type: item["type"], + properties: !item["properties"] + ? item["properties"] + : signaturesOverridesPropertiesSerializer(item["properties"]), + }; +} + +export function signaturesOverridesDeserializer(item: any): SignaturesOverrides { + return { + id: item["id"], + name: item["name"], + type: item["type"], + properties: !item["properties"] + ? item["properties"] + : signaturesOverridesPropertiesDeserializer(item["properties"]), + }; +} + +/** Will contain the properties of the resource (the actual signature overrides) */ +export interface SignaturesOverridesProperties { + /** Dictionary of */ + signatures?: Record; +} + +export function signaturesOverridesPropertiesSerializer(item: SignaturesOverridesProperties): any { + return { signatures: item["signatures"] }; +} + +export function signaturesOverridesPropertiesDeserializer( + item: any, +): SignaturesOverridesProperties { + return { + signatures: !item["signatures"] + ? item["signatures"] + : Object.fromEntries( + Object.entries(item["signatures"]).map(([k, p]: [string, any]) => [k, p]), + ), + }; +} + +/** Common resource representation. */ +export interface WritableResource { + /** Resource ID. */ + id?: string; + /** Resource name. */ + name?: string; + /** Resource type. */ + type?: string; +} + +export function writableResourceSerializer(item: WritableResource): any { + return { id: item["id"], name: item["name"], type: item["type"] }; +} + +export function writableResourceDeserializer(item: any): WritableResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + }; +} + +/** Describes an object containing an array with a single item */ +export interface SignaturesOverridesList { + /** Describes a list consisting exactly one item describing the policy's signature override status */ + value?: SignaturesOverrides[]; +} + +export function signaturesOverridesListDeserializer(item: any): SignaturesOverridesList { + return { + value: !item["value"] ? item["value"] : signaturesOverridesArrayDeserializer(item["value"]), + }; +} + +export function signaturesOverridesArraySerializer(result: Array): any[] { + return result.map((item) => { + return signaturesOverridesSerializer(item); + }); +} + +export function signaturesOverridesArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return signaturesOverridesDeserializer(item); + }); +} + +/** FirewallPolicy Resource. */ +export interface FirewallPolicyDraft extends Resource { + /** The parent firewall policy from which rules are inherited. */ + basePolicy?: SubResource; + /** The operation mode for Threat Intelligence. */ + threatIntelMode?: AzureFirewallThreatIntelMode; + /** ThreatIntel Whitelist for Firewall Policy. */ + threatIntelWhitelist?: FirewallPolicyThreatIntelWhitelist; + /** Insights on Firewall Policy. */ + insights?: FirewallPolicyInsights; + /** The private IP addresses/IP ranges to which traffic will not be SNAT. */ + snat?: FirewallPolicySnat; + /** SQL Settings definition. */ + sql?: FirewallPolicySQL; + /** DNS Proxy Settings definition. */ + dnsSettings?: DnsSettings; + /** Explicit Proxy Settings definition. */ + explicitProxy?: ExplicitProxy; + /** The configuration for Intrusion detection. */ + intrusionDetection?: FirewallPolicyIntrusionDetection; +} + +export function firewallPolicyDraftSerializer(item: FirewallPolicyDraft): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "basePolicy", + "threatIntelMode", + "threatIntelWhitelist", + "insights", + "snat", + "sql", + "dnsSettings", + "explicitProxy", + "intrusionDetection", + ]) + ? undefined + : _firewallPolicyDraftPropertiesSerializer(item), + }; +} + +export function firewallPolicyDraftDeserializer(item: any): FirewallPolicyDraft { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _firewallPolicyDraftPropertiesDeserializer(item["properties"])), + }; +} + +/** model interface FirewallPolicyDraftProperties */ +export interface FirewallPolicyDraftProperties { + /** The parent firewall policy from which rules are inherited. */ + basePolicy?: SubResource; + /** The operation mode for Threat Intelligence. */ + threatIntelMode?: AzureFirewallThreatIntelMode; + /** ThreatIntel Whitelist for Firewall Policy. */ + threatIntelWhitelist?: FirewallPolicyThreatIntelWhitelist; + /** Insights on Firewall Policy. */ + insights?: FirewallPolicyInsights; + /** The private IP addresses/IP ranges to which traffic will not be SNAT. */ + snat?: FirewallPolicySnat; + /** SQL Settings definition. */ + sql?: FirewallPolicySQL; + /** DNS Proxy Settings definition. */ + dnsSettings?: DnsSettings; + /** Explicit Proxy Settings definition. */ + explicitProxy?: ExplicitProxy; + /** The configuration for Intrusion detection. */ + intrusionDetection?: FirewallPolicyIntrusionDetection; +} + +export function firewallPolicyDraftPropertiesSerializer(item: FirewallPolicyDraftProperties): any { + return { + basePolicy: !item["basePolicy"] + ? item["basePolicy"] + : subResourceSerializer(item["basePolicy"]), + threatIntelMode: item["threatIntelMode"], + threatIntelWhitelist: !item["threatIntelWhitelist"] + ? item["threatIntelWhitelist"] + : firewallPolicyThreatIntelWhitelistSerializer(item["threatIntelWhitelist"]), + insights: !item["insights"] + ? item["insights"] + : firewallPolicyInsightsSerializer(item["insights"]), + snat: !item["snat"] ? item["snat"] : firewallPolicySnatSerializer(item["snat"]), + sql: !item["sql"] ? item["sql"] : firewallPolicySQLSerializer(item["sql"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : dnsSettingsSerializer(item["dnsSettings"]), + explicitProxy: !item["explicitProxy"] + ? item["explicitProxy"] + : explicitProxySerializer(item["explicitProxy"]), + intrusionDetection: !item["intrusionDetection"] + ? item["intrusionDetection"] + : firewallPolicyIntrusionDetectionSerializer(item["intrusionDetection"]), + }; +} + +export function firewallPolicyDraftPropertiesDeserializer( + item: any, +): FirewallPolicyDraftProperties { + return { + basePolicy: !item["basePolicy"] + ? item["basePolicy"] + : subResourceDeserializer(item["basePolicy"]), + threatIntelMode: item["threatIntelMode"], + threatIntelWhitelist: !item["threatIntelWhitelist"] + ? item["threatIntelWhitelist"] + : firewallPolicyThreatIntelWhitelistDeserializer(item["threatIntelWhitelist"]), + insights: !item["insights"] + ? item["insights"] + : firewallPolicyInsightsDeserializer(item["insights"]), + snat: !item["snat"] ? item["snat"] : firewallPolicySnatDeserializer(item["snat"]), + sql: !item["sql"] ? item["sql"] : firewallPolicySQLDeserializer(item["sql"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : dnsSettingsDeserializer(item["dnsSettings"]), + explicitProxy: !item["explicitProxy"] + ? item["explicitProxy"] + : explicitProxyDeserializer(item["explicitProxy"]), + intrusionDetection: !item["intrusionDetection"] + ? item["intrusionDetection"] + : firewallPolicyIntrusionDetectionDeserializer(item["intrusionDetection"]), + }; +} + +/** Rule Collection Group resource. */ +export interface FirewallPolicyRuleCollectionGroupDraft extends SubResourceModel { + /** A read-only string that represents the size of the FirewallPolicyRuleCollectionGroupProperties in MB. (ex 1.2MB) */ + readonly size?: string; + /** Priority of the Firewall Policy Rule Collection Group resource. */ + priority?: number; + /** Group of Firewall Policy rule collections. */ + ruleCollections?: FirewallPolicyRuleCollectionUnion[]; +} + +export function firewallPolicyRuleCollectionGroupDraftSerializer( + item: FirewallPolicyRuleCollectionGroupDraft, +): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["priority", "ruleCollections"]) + ? undefined + : _firewallPolicyRuleCollectionGroupDraftPropertiesSerializer(item), + }; +} + +export function firewallPolicyRuleCollectionGroupDraftDeserializer( + item: any, +): FirewallPolicyRuleCollectionGroupDraft { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _firewallPolicyRuleCollectionGroupDraftPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of the rule collection group draft. */ +export interface FirewallPolicyRuleCollectionGroupDraftProperties { + /** A read-only string that represents the size of the FirewallPolicyRuleCollectionGroupProperties in MB. (ex 1.2MB) */ + readonly size?: string; + /** Priority of the Firewall Policy Rule Collection Group resource. */ + priority?: number; + /** Group of Firewall Policy rule collections. */ + ruleCollections?: FirewallPolicyRuleCollectionUnion[]; +} + +export function firewallPolicyRuleCollectionGroupDraftPropertiesSerializer( + item: FirewallPolicyRuleCollectionGroupDraftProperties, +): any { + return { + priority: item["priority"], + ruleCollections: !item["ruleCollections"] + ? item["ruleCollections"] + : firewallPolicyRuleCollectionUnionArraySerializer(item["ruleCollections"]), + }; +} + +export function firewallPolicyRuleCollectionGroupDraftPropertiesDeserializer( + item: any, +): FirewallPolicyRuleCollectionGroupDraftProperties { + return { + size: item["size"], + priority: item["priority"], + ruleCollections: !item["ruleCollections"] + ? item["ruleCollections"] + : firewallPolicyRuleCollectionUnionArrayDeserializer(item["ruleCollections"]), + }; +} + +/** Instance of Pool resource. */ +export interface IpamPool extends CommonTrackedResource { + /** Properties of IpamPool resource properties which are specific to the Pool resource. */ + properties: IpamPoolProperties; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; +} + +export function ipamPoolSerializer(item: IpamPool): any { + return { + tags: item["tags"], + location: item["location"], + properties: ipamPoolPropertiesSerializer(item["properties"]), + }; +} + +export function ipamPoolDeserializer(item: any): IpamPool { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: ipamPoolPropertiesDeserializer(item["properties"]), + etag: item["etag"], + }; +} + +/** Properties of IpamPool resource properties which are specific to the Pool resource. */ +export interface IpamPoolProperties { + description?: string; + /** String representing a friendly name for the resource. */ + displayName?: string; + /** List of IP address type for the IpamPool. */ + readonly ipAddressType?: IpType[]; + /** String representing parent IpamPool resource name. If empty the IpamPool will be a root pool. */ + parentPoolName?: string; + /** List of IP address prefixes of the resource. */ + addressPrefixes: string[]; + /** Provisioning states of a resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function ipamPoolPropertiesSerializer(item: IpamPoolProperties): any { + return { + description: item["description"], + displayName: item["displayName"], + parentPoolName: item["parentPoolName"], + addressPrefixes: item["addressPrefixes"].map((p: any) => { + return p; + }), + }; +} + +export function ipamPoolPropertiesDeserializer(item: any): IpamPoolProperties { + return { + description: item["description"], + displayName: item["displayName"], + ipAddressType: !item["ipAddressType"] + ? item["ipAddressType"] + : item["ipAddressType"].map((p: any) => { + return p; + }), + parentPoolName: item["parentPoolName"], + addressPrefixes: item["addressPrefixes"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +/** Enumeration to indicate the IP type. */ +export enum KnownIpType { + /** IPv4 */ + IPv4 = "IPv4", + /** IPv6 */ + IPv6 = "IPv6", +} + +/** + * Enumeration to indicate the IP type. \ + * {@link KnownIpType} can be used interchangeably with IpType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPv4**: IPv4 \ + * **IPv6**: IPv6 + */ +export type IpType = string; + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface CommonTrackedResource extends CommonResource { + /** Resource tags. */ + tags?: Record; + /** The geo-location where the resource lives */ + location: string; +} + +export function commonTrackedResourceSerializer(item: CommonTrackedResource): any { + return { tags: item["tags"], location: item["location"] }; +} + +export function commonTrackedResourceDeserializer(item: any): CommonTrackedResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + }; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface CommonResource { + /** Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" */ + readonly id?: string; + /** The name of the resource */ + readonly name?: string; + /** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */ + readonly type?: string; + /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemData; +} + +export function commonResourceSerializer(_item: CommonResource): any { + return {}; +} + +export function commonResourceDeserializer(item: any): CommonResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface CommonErrorResponse { + /** The error object. */ + error?: CommonErrorDetail; +} + +export function commonErrorResponseDeserializer(item: any): CommonErrorResponse { + return { + error: !item["error"] ? item["error"] : commonErrorDetailDeserializer(item["error"]), + }; +} + +/** The error detail. */ +export interface CommonErrorDetail { + /** The error code. */ + readonly code?: string; + /** The error message. */ + readonly message?: string; + /** The error target. */ + readonly target?: string; + /** The error details. */ + readonly details?: CommonErrorDetail[]; + /** The error additional info. */ + readonly additionalInfo?: CommonErrorAdditionalInfo[]; +} + +export function commonErrorDetailDeserializer(item: any): CommonErrorDetail { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] + ? item["details"] + : commonErrorDetailArrayDeserializer(item["details"]), + additionalInfo: !item["additionalInfo"] + ? item["additionalInfo"] + : commonErrorAdditionalInfoArrayDeserializer(item["additionalInfo"]), + }; +} + +export function commonErrorDetailArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return commonErrorDetailDeserializer(item); + }); +} + +export function commonErrorAdditionalInfoArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return commonErrorAdditionalInfoDeserializer(item); + }); +} + +/** The resource management error additional info. */ +export interface CommonErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: Record; +} + +export function commonErrorAdditionalInfoDeserializer(item: any): CommonErrorAdditionalInfo { + return { + type: item["type"], + info: item["info"], + }; +} + +/** Represents the IpamPool update API request interface. */ +export interface IpamPoolUpdate { + /** Dictionary of */ + tags?: Record; + /** Represents the IpamPool update properties. */ + properties?: IpamPoolUpdateProperties; +} + +export function ipamPoolUpdateSerializer(item: IpamPoolUpdate): any { + return { + tags: item["tags"], + properties: !item["properties"] + ? item["properties"] + : ipamPoolUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** Represents the IpamPool update properties. */ +export interface IpamPoolUpdateProperties { + description?: string; + /** String representing a friendly name for the resource. */ + displayName?: string; +} + +export function ipamPoolUpdatePropertiesSerializer(item: IpamPoolUpdateProperties): any { + return { description: item["description"], displayName: item["displayName"] }; +} + +/** List of IpamPool */ +export interface _IpamPoolList { + /** The IpamPool items on this page */ + value: IpamPool[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _ipamPoolListDeserializer(item: any): _IpamPoolList { + return { + value: ipamPoolArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function ipamPoolArraySerializer(result: Array): any[] { + return result.map((item) => { + return ipamPoolSerializer(item); + }); +} + +export function ipamPoolArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ipamPoolDeserializer(item); + }); +} + +/** IpamPool usage information. */ +export interface PoolUsage { + /** List of IP address prefixes of the resource. */ + readonly addressPrefixes?: string[]; + /** List of IpamPool that are children of this IpamPool. */ + readonly childPools?: ResourceBasics[]; + /** List of assigned IP address prefixes. */ + readonly allocatedAddressPrefixes?: string[]; + /** List of reserved IP address prefixes. These IP addresses could be reclaimed if not assigned in the given time. */ + readonly reservedAddressPrefixes?: string[]; + /** List of available IP address prefixes. */ + readonly availableAddressPrefixes?: string[]; + /** Total number of IP addresses managed in the IpamPool. */ + readonly totalNumberOfIPAddresses?: string; + /** Total number of assigned IP addresses in the IpamPool. */ + readonly numberOfAllocatedIPAddresses?: string; + /** Total number of reserved IP addresses in the IpamPool. */ + readonly numberOfReservedIPAddresses?: string; + /** Total number of available IP addresses in the IpamPool. */ + readonly numberOfAvailableIPAddresses?: string; +} + +export function poolUsageDeserializer(item: any): PoolUsage { + return { + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + childPools: !item["childPools"] + ? item["childPools"] + : resourceBasicsArrayDeserializer(item["childPools"]), + allocatedAddressPrefixes: !item["allocatedAddressPrefixes"] + ? item["allocatedAddressPrefixes"] + : item["allocatedAddressPrefixes"].map((p: any) => { + return p; + }), + reservedAddressPrefixes: !item["reservedAddressPrefixes"] + ? item["reservedAddressPrefixes"] + : item["reservedAddressPrefixes"].map((p: any) => { + return p; + }), + availableAddressPrefixes: !item["availableAddressPrefixes"] + ? item["availableAddressPrefixes"] + : item["availableAddressPrefixes"].map((p: any) => { + return p; + }), + totalNumberOfIPAddresses: item["totalNumberOfIPAddresses"], + numberOfAllocatedIPAddresses: item["numberOfAllocatedIPAddresses"], + numberOfReservedIPAddresses: item["numberOfReservedIPAddresses"], + numberOfAvailableIPAddresses: item["numberOfAvailableIPAddresses"], + }; +} + +export function resourceBasicsArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return resourceBasicsDeserializer(item); + }); +} + +/** Representation of basic resource information. */ +export interface ResourceBasics { + /** ResourceId of the Azure resource. */ + resourceId?: string; + /** List of IP address prefixes of the resource. */ + addressPrefixes?: string[]; +} + +export function resourceBasicsDeserializer(item: any): ResourceBasics { + return { + resourceId: item["resourceId"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + }; +} + +/** List of PoolAssociation */ +export interface _PoolAssociationList { + /** The PoolAssociation items on this page */ + value: PoolAssociation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _poolAssociationListDeserializer(item: any): _PoolAssociationList { + return { + value: poolAssociationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function poolAssociationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return poolAssociationDeserializer(item); + }); +} + +/** IpamPool association information. */ +export interface PoolAssociation { + /** Resource id of the associated Azure resource. */ + resourceId: string; + /** IpamPool id for which the resource is associated to. */ + poolId?: string; + description?: string; + /** List of assigned IP address prefixes in the IpamPool of the associated resource. */ + readonly addressPrefixes?: string[]; + /** List of reserved IP address prefixes in the IpamPool of the associated resource. */ + readonly reservedPrefixes?: string[]; + /** Total number of assigned IP addresses of the association. */ + readonly totalNumberOfIPAddresses?: string; + /** Total number of reserved IP addresses of the association. */ + readonly numberOfReservedIPAddresses?: string; + /** Creation time of the association. */ + readonly createdAt?: Date; + /** Expire time for IP addresses reserved. */ + readonly reservationExpiresAt?: Date; +} + +export function poolAssociationDeserializer(item: any): PoolAssociation { + return { + resourceId: item["resourceId"], + poolId: item["poolId"], + description: item["description"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + reservedPrefixes: !item["reservedPrefixes"] + ? item["reservedPrefixes"] + : item["reservedPrefixes"].map((p: any) => { + return p; + }), + totalNumberOfIPAddresses: item["totalNumberOfIPAddresses"], + numberOfReservedIPAddresses: item["numberOfReservedIPAddresses"], + createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), + reservationExpiresAt: !item["reservationExpiresAt"] + ? item["reservationExpiresAt"] + : new Date(item["reservationExpiresAt"]), + }; +} + +/** The Managed Network resource */ +export interface NetworkManager extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** A description of the network manager. */ + description?: string; + /** Scope of Network Manager. */ + networkManagerScopes?: NetworkManagerPropertiesNetworkManagerScopes; + /** Scope Access. */ + networkManagerScopeAccesses?: ConfigurationType[]; + /** The provisioning state of the network manager resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function networkManagerSerializer(item: NetworkManager): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "description", + "networkManagerScopes", + "networkManagerScopeAccesses", + ]) + ? undefined + : _networkManagerPropertiesSerializer(item), + }; +} + +export function networkManagerDeserializer(item: any): NetworkManager { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _networkManagerPropertiesDeserializer(item["properties"])), + etag: item["etag"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Properties of Managed Network */ +export interface NetworkManagerProperties { + /** A description of the network manager. */ + description?: string; + /** Scope of Network Manager. */ + networkManagerScopes: NetworkManagerPropertiesNetworkManagerScopes; + /** Scope Access. */ + networkManagerScopeAccesses?: ConfigurationType[]; + /** The provisioning state of the network manager resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function networkManagerPropertiesSerializer(item: NetworkManagerProperties): any { + return { + description: item["description"], + networkManagerScopes: networkManagerPropertiesNetworkManagerScopesSerializer( + item["networkManagerScopes"], + ), + networkManagerScopeAccesses: !item["networkManagerScopeAccesses"] + ? item["networkManagerScopeAccesses"] + : item["networkManagerScopeAccesses"].map((p: any) => { + return p; + }), + }; +} + +export function networkManagerPropertiesDeserializer(item: any): NetworkManagerProperties { + return { + description: item["description"], + networkManagerScopes: networkManagerPropertiesNetworkManagerScopesDeserializer( + item["networkManagerScopes"], + ), + networkManagerScopeAccesses: !item["networkManagerScopeAccesses"] + ? item["networkManagerScopeAccesses"] + : item["networkManagerScopeAccesses"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +/** Scope of Network Manager. */ +export interface NetworkManagerPropertiesNetworkManagerScopes { + /** List of management groups. */ + managementGroups?: string[]; + /** List of subscriptions. */ + subscriptions?: string[]; + /** List of cross tenant scopes. */ + readonly crossTenantScopes?: CrossTenantScopes[]; +} + +export function networkManagerPropertiesNetworkManagerScopesSerializer( + item: NetworkManagerPropertiesNetworkManagerScopes, +): any { + return { + managementGroups: !item["managementGroups"] + ? item["managementGroups"] + : item["managementGroups"].map((p: any) => { + return p; + }), + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : item["subscriptions"].map((p: any) => { + return p; + }), + }; +} + +export function networkManagerPropertiesNetworkManagerScopesDeserializer( + item: any, +): NetworkManagerPropertiesNetworkManagerScopes { + return { + managementGroups: !item["managementGroups"] + ? item["managementGroups"] + : item["managementGroups"].map((p: any) => { + return p; + }), + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : item["subscriptions"].map((p: any) => { + return p; + }), + crossTenantScopes: !item["crossTenantScopes"] + ? item["crossTenantScopes"] + : crossTenantScopesArrayDeserializer(item["crossTenantScopes"]), + }; +} + +export function crossTenantScopesArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return crossTenantScopesDeserializer(item); + }); +} + +/** Cross tenant scopes. */ +export interface CrossTenantScopes { + /** Tenant ID. */ + readonly tenantId?: string; + /** List of management groups. */ + readonly managementGroups?: string[]; + /** List of subscriptions. */ + readonly subscriptions?: string[]; +} + +export function crossTenantScopesDeserializer(item: any): CrossTenantScopes { + return { + tenantId: item["tenantId"], + managementGroups: !item["managementGroups"] + ? item["managementGroups"] + : item["managementGroups"].map((p: any) => { + return p; + }), + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : item["subscriptions"].map((p: any) => { + return p; + }), + }; +} + +/** Configuration Deployment Type. */ +export enum KnownConfigurationType { + /** SecurityAdmin */ + SecurityAdmin = "SecurityAdmin", + /** Connectivity */ + Connectivity = "Connectivity", + /** SecurityUser */ + SecurityUser = "SecurityUser", + /** Routing */ + Routing = "Routing", +} + +/** + * Configuration Deployment Type. \ + * {@link KnownConfigurationType} can be used interchangeably with ConfigurationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SecurityAdmin**: SecurityAdmin \ + * **Connectivity**: Connectivity \ + * **SecurityUser**: SecurityUser \ + * **Routing**: Routing + */ +export type ConfigurationType = string; + +/** Object for patch operations. */ +export interface PatchObject { + /** Resource tags. */ + tags?: Record; +} + +export function patchObjectSerializer(item: PatchObject): any { + return { tags: item["tags"] }; +} + +export function networkManagerArraySerializer(result: Array): any[] { + return result.map((item) => { + return networkManagerSerializer(item); + }); +} + +export function networkManagerArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return networkManagerDeserializer(item); + }); +} + +/** Instance of StaticCidr resource. */ +export interface StaticCidr extends CommonProxyResource { + /** Properties of static CIDR resource. */ + properties?: StaticCidrProperties; +} + +export function staticCidrSerializer(item: StaticCidr): any { + return { + properties: !item["properties"] + ? item["properties"] + : staticCidrPropertiesSerializer(item["properties"]), + }; +} + +export function staticCidrDeserializer(item: any): StaticCidr { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : staticCidrPropertiesDeserializer(item["properties"]), + }; +} + +/** Properties of static CIDR resource. */ +export interface StaticCidrProperties { + description?: string; + /** Number of IP addresses to allocate for a static CIDR resource. The IP addresses will be assigned based on IpamPools available space. */ + numberOfIPAddressesToAllocate?: string; + /** List of IP address prefixes of the resource. */ + addressPrefixes?: string[]; + /** Total number of IP addresses allocated for the static CIDR resource. */ + readonly totalNumberOfIPAddresses?: string; + /** Provisioning states of a resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function staticCidrPropertiesSerializer(item: StaticCidrProperties): any { + return { + description: item["description"], + numberOfIPAddressesToAllocate: item["numberOfIPAddressesToAllocate"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + }; +} + +export function staticCidrPropertiesDeserializer(item: any): StaticCidrProperties { + return { + description: item["description"], + numberOfIPAddressesToAllocate: item["numberOfIPAddressesToAllocate"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + totalNumberOfIPAddresses: item["totalNumberOfIPAddresses"], + provisioningState: item["provisioningState"], + }; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface CommonProxyResource extends CommonResource {} + +export function commonProxyResourceSerializer(_item: CommonProxyResource): any { + return {}; +} + +export function commonProxyResourceDeserializer(item: any): CommonProxyResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** List of StaticCidr */ +export interface _StaticCidrList { + /** The StaticCidr items on this page */ + value: StaticCidr[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _staticCidrListDeserializer(item: any): _StaticCidrList { + return { + value: staticCidrArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function staticCidrArraySerializer(result: Array): any[] { + return result.map((item) => { + return staticCidrSerializer(item); + }); +} + +export function staticCidrArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return staticCidrDeserializer(item); + }); +} + +/** IpAllocation resource. */ +export interface IpAllocation extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The Subnet that using the prefix of this IpAllocation resource. */ + readonly subnet?: SubResource; + /** The VirtualNetwork that using the prefix of this IpAllocation resource. */ + readonly virtualNetwork?: SubResource; + /** The type for the IpAllocation. */ + typePropertiesType?: IpAllocationType; + /** The address prefix for the IpAllocation. */ + prefix?: string; + /** The address prefix length for the IpAllocation. */ + prefixLength?: number; + /** The address prefix Type for the IpAllocation. */ + prefixType?: IPVersion; + /** The IPAM allocation ID. */ + ipamAllocationId?: string; + /** IpAllocation tags. */ + allocationTags?: Record; +} + +export function ipAllocationSerializer(item: IpAllocation): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "type", + "prefix", + "prefixLength", + "prefixType", + "ipamAllocationId", + "allocationTags", + ]) + ? undefined + : _ipAllocationPropertiesSerializer(item), + }; +} + +export function ipAllocationDeserializer(item: any): IpAllocation { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _ipAllocationPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the IpAllocation. */ +export interface IpAllocationPropertiesFormat { + /** The Subnet that using the prefix of this IpAllocation resource. */ + readonly subnet?: SubResource; + /** The VirtualNetwork that using the prefix of this IpAllocation resource. */ + readonly virtualNetwork?: SubResource; + /** The type for the IpAllocation. */ + type?: IpAllocationType; + /** The address prefix for the IpAllocation. */ + prefix?: string; + /** The address prefix length for the IpAllocation. */ + prefixLength?: number; + /** The address prefix Type for the IpAllocation. */ + prefixType?: IPVersion; + /** The IPAM allocation ID. */ + ipamAllocationId?: string; + /** IpAllocation tags. */ + allocationTags?: Record; +} + +export function ipAllocationPropertiesFormatSerializer(item: IpAllocationPropertiesFormat): any { + return { + type: item["type"], + prefix: item["prefix"], + prefixLength: item["prefixLength"], + prefixType: item["prefixType"], + ipamAllocationId: item["ipamAllocationId"], + allocationTags: item["allocationTags"], + }; +} + +export function ipAllocationPropertiesFormatDeserializer(item: any): IpAllocationPropertiesFormat { + return { + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceDeserializer(item["virtualNetwork"]), + type: item["type"], + prefix: item["prefix"], + prefixLength: item["prefixLength"], + prefixType: item["prefixType"], + ipamAllocationId: item["ipamAllocationId"], + allocationTags: !item["allocationTags"] + ? item["allocationTags"] + : Object.fromEntries( + Object.entries(item["allocationTags"]).map(([k, p]: [string, any]) => [k, p]), + ), + }; +} + +/** IpAllocation type. */ +export enum KnownIpAllocationType { + /** Undefined */ + Undefined = "Undefined", + /** Hypernet */ + Hypernet = "Hypernet", +} + +/** + * IpAllocation type. \ + * {@link KnownIpAllocationType} can be used interchangeably with IpAllocationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Undefined**: Undefined \ + * **Hypernet**: Hypernet + */ +export type IpAllocationType = string; + +export function ipAllocationArraySerializer(result: Array): any[] { + return result.map((item) => { + return ipAllocationSerializer(item); + }); +} + +export function ipAllocationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ipAllocationDeserializer(item); + }); +} + +/** The IpGroups resource information. */ +export interface IpGroup extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The provisioning state of the IpGroups resource. */ + readonly provisioningState?: CommonProvisioningState; + /** IpAddresses/IpAddressPrefixes in the IpGroups resource. */ + ipAddresses?: string[]; + /** List of references to Firewall resources that this IpGroups is associated with. */ + readonly firewalls?: SubResource[]; + /** List of references to Firewall Policies resources that this IpGroups is associated with. */ + readonly firewallPolicies?: SubResource[]; +} + +export function ipGroupSerializer(item: IpGroup): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, ["ipAddresses"]) + ? undefined + : _ipGroupPropertiesSerializer(item), + }; +} + +export function ipGroupDeserializer(item: any): IpGroup { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _ipGroupPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** The IpGroups property information. */ +export interface IpGroupPropertiesFormat { + /** The provisioning state of the IpGroups resource. */ + readonly provisioningState?: CommonProvisioningState; + /** IpAddresses/IpAddressPrefixes in the IpGroups resource. */ + ipAddresses?: string[]; + /** List of references to Firewall resources that this IpGroups is associated with. */ + readonly firewalls?: SubResource[]; + /** List of references to Firewall Policies resources that this IpGroups is associated with. */ + readonly firewallPolicies?: SubResource[]; +} + +export function ipGroupPropertiesFormatSerializer(item: IpGroupPropertiesFormat): any { + return { + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + }; +} + +export function ipGroupPropertiesFormatDeserializer(item: any): IpGroupPropertiesFormat { + return { + provisioningState: item["provisioningState"], + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + firewalls: !item["firewalls"] + ? item["firewalls"] + : subResourceArrayDeserializer(item["firewalls"]), + firewallPolicies: !item["firewallPolicies"] + ? item["firewallPolicies"] + : subResourceArrayDeserializer(item["firewallPolicies"]), + }; +} + +export function ipGroupArraySerializer(result: Array): any[] { + return result.map((item) => { + return ipGroupSerializer(item); + }); +} + +export function ipGroupArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ipGroupDeserializer(item); + }); +} + +/** The request for a migrateToIpBased API. */ +export interface MigrateLoadBalancerToIpBasedRequest { + /** A list of pool names that should be migrated from Nic based to IP based pool */ + pools?: string[]; +} + +export function migrateLoadBalancerToIpBasedRequestSerializer( + item: MigrateLoadBalancerToIpBasedRequest, +): any { + return { + pools: !item["pools"] + ? item["pools"] + : item["pools"].map((p: any) => { + return p; + }), + }; +} + +/** The response for a migrateToIpBased API. */ +export interface MigratedPools { + /** A list of pools migrated from Nic based to IP based pool */ + migratedPools?: string[]; +} + +export function migratedPoolsDeserializer(item: any): MigratedPools { + return { + migratedPools: !item["migratedPools"] + ? item["migratedPools"] + : item["migratedPools"].map((p: any) => { + return p; + }), + }; +} + +/** The request for a QueryInboundNatRulePortMapping API. Either IpConfiguration or IpAddress should be set */ +export interface QueryInboundNatRulePortMappingRequest { + /** NetworkInterfaceIPConfiguration set in load balancer backend address. */ + ipConfiguration?: SubResource; + /** IP address set in load balancer backend address. */ + ipAddress?: string; +} + +export function queryInboundNatRulePortMappingRequestSerializer( + item: QueryInboundNatRulePortMappingRequest, +): any { + return { + ipConfiguration: !item["ipConfiguration"] + ? item["ipConfiguration"] + : subResourceSerializer(item["ipConfiguration"]), + ipAddress: item["ipAddress"], + }; +} + +/** The response for a QueryInboundNatRulePortMapping API. */ +export interface BackendAddressInboundNatRulePortMappings { + /** Collection of inbound NAT rule port mappings. */ + inboundNatRulePortMappings?: InboundNatRulePortMapping[]; +} + +export function backendAddressInboundNatRulePortMappingsDeserializer( + item: any, +): BackendAddressInboundNatRulePortMappings { + return { + inboundNatRulePortMappings: !item["inboundNatRulePortMappings"] + ? item["inboundNatRulePortMappings"] + : inboundNatRulePortMappingArrayDeserializer(item["inboundNatRulePortMappings"]), + }; +} + +export function inboundNatRulePortMappingArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return inboundNatRulePortMappingDeserializer(item); + }); +} + +/** Individual port mappings for inbound NAT rule created for backend pool. */ +export interface InboundNatRulePortMapping { + /** Name of inbound NAT rule. */ + readonly inboundNatRuleName?: string; + /** The reference to the transport protocol used by the inbound NAT rule. */ + readonly protocol?: TransportProtocol; + /** Frontend port. */ + readonly frontendPort?: number; + /** Backend port. */ + readonly backendPort?: number; +} + +export function inboundNatRulePortMappingDeserializer(item: any): InboundNatRulePortMapping { + return { + inboundNatRuleName: item["inboundNatRuleName"], + protocol: item["protocol"], + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + }; +} + +/** The request for a VIP swap. */ +export interface LoadBalancerVipSwapRequest { + /** A list of frontend IP configuration resources that should swap VIPs. */ + frontendIPConfigurations?: LoadBalancerVipSwapRequestFrontendIPConfiguration[]; +} + +export function loadBalancerVipSwapRequestSerializer(item: LoadBalancerVipSwapRequest): any { + return { + frontendIPConfigurations: !item["frontendIPConfigurations"] + ? item["frontendIPConfigurations"] + : loadBalancerVipSwapRequestFrontendIPConfigurationArraySerializer( + item["frontendIPConfigurations"], + ), + }; +} + +export function loadBalancerVipSwapRequestFrontendIPConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return loadBalancerVipSwapRequestFrontendIPConfigurationSerializer(item); + }); +} + +/** VIP swap request's frontend IP configuration object. */ +export interface LoadBalancerVipSwapRequestFrontendIPConfiguration { + /** The ID of frontend IP configuration resource. */ + id?: string; + /** A reference to public IP address resource. */ + publicIPAddress?: SubResource; +} + +export function loadBalancerVipSwapRequestFrontendIPConfigurationSerializer( + item: LoadBalancerVipSwapRequestFrontendIPConfiguration, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["publicIPAddress"]) + ? undefined + : _loadBalancerVipSwapRequestFrontendIPConfigurationPropertiesSerializer(item), + }; +} + +/** The properties of VIP swap request's frontend IP configuration object. */ +export interface LoadBalancerVipSwapRequestFrontendIPConfigurationProperties { + /** A reference to public IP address resource. */ + publicIPAddress?: SubResource; +} + +export function loadBalancerVipSwapRequestFrontendIPConfigurationPropertiesSerializer( + item: LoadBalancerVipSwapRequestFrontendIPConfigurationProperties, +): any { + return { + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceSerializer(item["publicIPAddress"]), + }; +} + +/** The Network Manager Connection resource */ +export interface NetworkManagerConnection extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** Network Manager Id. */ + networkManagerId?: string; + /** Connection state. */ + readonly connectionState?: ScopeConnectionState; + /** A description of the network manager connection. */ + description?: string; +} + +export function networkManagerConnectionSerializer(item: NetworkManagerConnection): any { + return { + properties: areAllPropsUndefined(item, ["networkManagerId", "description"]) + ? undefined + : _networkManagerConnectionPropertiesSerializer(item), + }; +} + +export function networkManagerConnectionDeserializer(item: any): NetworkManagerConnection { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _networkManagerConnectionPropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Information about the network manager connection. */ +export interface NetworkManagerConnectionProperties { + /** Network Manager Id. */ + networkManagerId?: string; + /** Connection state. */ + readonly connectionState?: ScopeConnectionState; + /** A description of the network manager connection. */ + description?: string; +} + +export function networkManagerConnectionPropertiesSerializer( + item: NetworkManagerConnectionProperties, +): any { + return { networkManagerId: item["networkManagerId"], description: item["description"] }; +} + +export function networkManagerConnectionPropertiesDeserializer( + item: any, +): NetworkManagerConnectionProperties { + return { + networkManagerId: item["networkManagerId"], + connectionState: item["connectionState"], + description: item["description"], + }; +} + +/** The current scope connection state. */ +export enum KnownScopeConnectionState { + /** Connected */ + Connected = "Connected", + /** Pending */ + Pending = "Pending", + /** Conflict */ + Conflict = "Conflict", + /** Revoked */ + Revoked = "Revoked", + /** Rejected */ + Rejected = "Rejected", +} + +/** + * The current scope connection state. \ + * {@link KnownScopeConnectionState} can be used interchangeably with ScopeConnectionState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Connected**: Connected \ + * **Pending**: Pending \ + * **Conflict**: Conflict \ + * **Revoked**: Revoked \ + * **Rejected**: Rejected + */ +export type ScopeConnectionState = string; + +/** Proxy resource representation. */ +export interface ChildResource { + /** Resource ID. */ + readonly id?: string; + /** Resource name. */ + readonly name?: string; + /** Resource type. */ + readonly type?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; +} + +export function childResourceSerializer(_item: ChildResource): any { + return {}; +} + +export function childResourceDeserializer(item: any): ChildResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + }; +} + +export function networkManagerConnectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkManagerConnectionSerializer(item); + }); +} + +export function networkManagerConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkManagerConnectionDeserializer(item); + }); +} + +/** The network manager connectivity configuration resource */ +export interface ConnectivityConfiguration extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** A description of the connectivity configuration. */ + description?: string; + /** Connectivity topology type. */ + connectivityTopology?: ConnectivityTopology; + /** List of hubItems */ + hubs?: Hub[]; + /** Flag if global mesh is supported. */ + isGlobal?: IsGlobal; + /** Collection of additional settings to enhance specific topology behaviors of the connectivity configuration resource. */ + connectivityCapabilities?: ConnectivityConfigurationPropertiesConnectivityCapabilities; + /** Groups for configuration */ + appliesToGroups?: ConnectivityGroupItem[]; + /** The provisioning state of the connectivity configuration resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Flag if need to remove current existing peerings. */ + deleteExistingPeering?: DeleteExistingPeering; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function connectivityConfigurationSerializer(item: ConnectivityConfiguration): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "connectivityTopology", + "hubs", + "isGlobal", + "connectivityCapabilities", + "appliesToGroups", + "deleteExistingPeering", + ]) + ? undefined + : _connectivityConfigurationPropertiesSerializer(item), + }; +} + +export function connectivityConfigurationDeserializer(item: any): ConnectivityConfiguration { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _connectivityConfigurationPropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +export function connectivityConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return connectivityConfigurationSerializer(item); + }); +} + +export function connectivityConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return connectivityConfigurationDeserializer(item); + }); +} + +/** The network group resource */ +export interface NetworkGroup extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** A description of the network group. */ + description?: string; + /** The type of the group member. */ + memberType?: GroupMemberType; + /** The provisioning state of the scope assignment resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function networkGroupSerializer(item: NetworkGroup): any { + return { + properties: areAllPropsUndefined(item, ["description", "memberType"]) + ? undefined + : _networkGroupPropertiesSerializer(item), + }; +} + +export function networkGroupDeserializer(item: any): NetworkGroup { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _networkGroupPropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +export function networkGroupArraySerializer(result: Array): any[] { + return result.map((item) => { + return networkGroupSerializer(item); + }); +} + +export function networkGroupArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return networkGroupDeserializer(item); + }); +} + +/** StaticMember Item. */ +export interface StaticMember extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** Resource Id. */ + resourceId?: string; + /** Resource region. */ + readonly region?: string; + /** The provisioning state of the scope assignment resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function staticMemberSerializer(item: StaticMember): any { + return { + properties: areAllPropsUndefined(item, ["resourceId"]) + ? undefined + : _staticMemberPropertiesSerializer(item), + }; +} + +export function staticMemberDeserializer(item: any): StaticMember { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _staticMemberPropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Properties of static member. */ +export interface StaticMemberProperties { + /** Resource Id. */ + resourceId?: string; + /** Resource region. */ + readonly region?: string; + /** The provisioning state of the scope assignment resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function staticMemberPropertiesSerializer(item: StaticMemberProperties): any { + return { resourceId: item["resourceId"] }; +} + +export function staticMemberPropertiesDeserializer(item: any): StaticMemberProperties { + return { + resourceId: item["resourceId"], + region: item["region"], + provisioningState: item["provisioningState"], + }; +} + +export function staticMemberArraySerializer(result: Array): any[] { + return result.map((item) => { + return staticMemberSerializer(item); + }); +} + +export function staticMemberArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return staticMemberDeserializer(item); + }); +} + +/** Defines the routing configuration */ +export interface NetworkManagerRoutingConfiguration extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** A description of the routing configuration. */ + description?: string; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; + /** Route table usage mode defines which route table will be used by the configuration. If not defined, this will default to 'ManagedOnly'. */ + routeTableUsageMode?: RouteTableUsageMode; +} + +export function networkManagerRoutingConfigurationSerializer( + item: NetworkManagerRoutingConfiguration, +): any { + return { + properties: areAllPropsUndefined(item, ["description", "routeTableUsageMode"]) + ? undefined + : _networkManagerRoutingConfigurationPropertiesSerializer(item), + }; +} + +export function networkManagerRoutingConfigurationDeserializer( + item: any, +): NetworkManagerRoutingConfiguration { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _networkManagerRoutingConfigurationPropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Defines the routing configuration properties. */ +export interface NetworkManagerRoutingConfigurationPropertiesFormat { + /** A description of the routing configuration. */ + description?: string; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; + /** Route table usage mode defines which route table will be used by the configuration. If not defined, this will default to 'ManagedOnly'. */ + routeTableUsageMode?: RouteTableUsageMode; +} + +export function networkManagerRoutingConfigurationPropertiesFormatSerializer( + item: NetworkManagerRoutingConfigurationPropertiesFormat, +): any { + return { description: item["description"], routeTableUsageMode: item["routeTableUsageMode"] }; +} + +export function networkManagerRoutingConfigurationPropertiesFormatDeserializer( + item: any, +): NetworkManagerRoutingConfigurationPropertiesFormat { + return { + description: item["description"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + routeTableUsageMode: item["routeTableUsageMode"], + }; +} + +/** Route table usage mode defines which route table will be used by the configuration. If not defined, this will default to 'ManagedOnly'. */ +export enum KnownRouteTableUsageMode { + /** Only route tables managed by the routing configuration will be used. */ + ManagedOnly = "ManagedOnly", + /** Use existing user-defined route tables already associated with resources. */ + UseExisting = "UseExisting", +} + +/** + * Route table usage mode defines which route table will be used by the configuration. If not defined, this will default to 'ManagedOnly'. \ + * {@link KnownRouteTableUsageMode} can be used interchangeably with RouteTableUsageMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ManagedOnly**: Only route tables managed by the routing configuration will be used. \ + * **UseExisting**: Use existing user-defined route tables already associated with resources. + */ +export type RouteTableUsageMode = string; + +export function networkManagerRoutingConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkManagerRoutingConfigurationSerializer(item); + }); +} + +export function networkManagerRoutingConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkManagerRoutingConfigurationDeserializer(item); + }); +} + +/** Defines the routing rule collection. */ +export interface RoutingRuleCollection extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** A description of the routing rule collection. */ + description?: string; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; + /** Groups for configuration */ + appliesTo?: NetworkManagerRoutingGroupItem[]; + /** Determines whether BGP route propagation is enabled. Defaults to true. */ + disableBgpRoutePropagation?: DisableBgpRoutePropagation; +} + +export function routingRuleCollectionSerializer(item: RoutingRuleCollection): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "appliesTo", + "disableBgpRoutePropagation", + ]) + ? undefined + : _routingRuleCollectionPropertiesSerializer(item), + }; +} + +export function routingRuleCollectionDeserializer(item: any): RoutingRuleCollection { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _routingRuleCollectionPropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Defines the routing rule collection properties. */ +export interface RoutingRuleCollectionPropertiesFormat { + /** A description of the routing rule collection. */ + description?: string; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; + /** Groups for configuration */ + appliesTo: NetworkManagerRoutingGroupItem[]; + /** Determines whether BGP route propagation is enabled. Defaults to true. */ + disableBgpRoutePropagation?: DisableBgpRoutePropagation; +} + +export function routingRuleCollectionPropertiesFormatSerializer( + item: RoutingRuleCollectionPropertiesFormat, +): any { + return { + description: item["description"], + appliesTo: networkManagerRoutingGroupItemArraySerializer(item["appliesTo"]), + disableBgpRoutePropagation: item["disableBgpRoutePropagation"], + }; +} + +export function routingRuleCollectionPropertiesFormatDeserializer( + item: any, +): RoutingRuleCollectionPropertiesFormat { + return { + description: item["description"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + appliesTo: networkManagerRoutingGroupItemArrayDeserializer(item["appliesTo"]), + disableBgpRoutePropagation: item["disableBgpRoutePropagation"], + }; +} + +export function networkManagerRoutingGroupItemArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkManagerRoutingGroupItemSerializer(item); + }); +} + +export function networkManagerRoutingGroupItemArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkManagerRoutingGroupItemDeserializer(item); + }); +} + +/** Network manager routing group item. */ +export interface NetworkManagerRoutingGroupItem { + /** Network manager group Id. */ + networkGroupId: string; +} + +export function networkManagerRoutingGroupItemSerializer( + item: NetworkManagerRoutingGroupItem, +): any { + return { networkGroupId: item["networkGroupId"] }; +} + +export function networkManagerRoutingGroupItemDeserializer( + item: any, +): NetworkManagerRoutingGroupItem { + return { + networkGroupId: item["networkGroupId"], + }; +} + +/** Determines whether BGP route propagation is enabled. Defaults to true. */ +export enum KnownDisableBgpRoutePropagation { + /** BGP route propagation is enabled. */ + False = "False", + /** BGP route propagation is disabled. */ + True = "True", +} + +/** + * Determines whether BGP route propagation is enabled. Defaults to true. \ + * {@link KnownDisableBgpRoutePropagation} can be used interchangeably with DisableBgpRoutePropagation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **False**: BGP route propagation is enabled. \ + * **True**: BGP route propagation is disabled. + */ +export type DisableBgpRoutePropagation = string; + +export function routingRuleCollectionArraySerializer(result: Array): any[] { + return result.map((item) => { + return routingRuleCollectionSerializer(item); + }); +} + +export function routingRuleCollectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return routingRuleCollectionDeserializer(item); + }); +} + +/** Network routing rule. */ +export interface RoutingRule extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** A description for this rule. */ + description?: string; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; + /** Indicates the destination for this particular rule. */ + destination?: RoutingRuleRouteDestination; + /** Indicates the next hop for this particular rule. */ + nextHop?: RoutingRuleNextHop; +} + +export function routingRuleSerializer(item: RoutingRule): any { + return { + properties: areAllPropsUndefined(item, ["description", "destination", "nextHop"]) + ? undefined + : _routingRulePropertiesSerializer(item), + }; +} + +export function routingRuleDeserializer(item: any): RoutingRule { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _routingRulePropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Routing rule resource. */ +export interface RoutingRulePropertiesFormat { + /** A description for this rule. */ + description?: string; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; + /** Indicates the destination for this particular rule. */ + destination: RoutingRuleRouteDestination; + /** Indicates the next hop for this particular rule. */ + nextHop: RoutingRuleNextHop; +} + +export function routingRulePropertiesFormatSerializer(item: RoutingRulePropertiesFormat): any { + return { + description: item["description"], + destination: routingRuleRouteDestinationSerializer(item["destination"]), + nextHop: routingRuleNextHopSerializer(item["nextHop"]), + }; +} + +export function routingRulePropertiesFormatDeserializer(item: any): RoutingRulePropertiesFormat { + return { + description: item["description"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + destination: routingRuleRouteDestinationDeserializer(item["destination"]), + nextHop: routingRuleNextHopDeserializer(item["nextHop"]), + }; +} + +/** Route destination. */ +export interface RoutingRuleRouteDestination { + /** Destination type. */ + type: RoutingRuleDestinationType; + /** Destination address. */ + destinationAddress: string; +} + +export function routingRuleRouteDestinationSerializer(item: RoutingRuleRouteDestination): any { + return { type: item["type"], destinationAddress: item["destinationAddress"] }; +} + +export function routingRuleRouteDestinationDeserializer(item: any): RoutingRuleRouteDestination { + return { + type: item["type"], + destinationAddress: item["destinationAddress"], + }; +} + +/** Routing rule destination type. */ +export enum KnownRoutingRuleDestinationType { + /** Destination specified as an IP address prefix (CIDR). */ + AddressPrefix = "AddressPrefix", + /** Destination specified as an Azure service tag. */ + ServiceTag = "ServiceTag", +} + +/** + * Routing rule destination type. \ + * {@link KnownRoutingRuleDestinationType} can be used interchangeably with RoutingRuleDestinationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AddressPrefix**: Destination specified as an IP address prefix (CIDR). \ + * **ServiceTag**: Destination specified as an Azure service tag. + */ +export type RoutingRuleDestinationType = string; + +/** Next hop. */ +export interface RoutingRuleNextHop { + /** Next hop type. */ + nextHopType: RoutingRuleNextHopType; + /** Next hop address. Only required if the next hop type is VirtualAppliance. */ + nextHopAddress?: string; +} + +export function routingRuleNextHopSerializer(item: RoutingRuleNextHop): any { + return { nextHopType: item["nextHopType"], nextHopAddress: item["nextHopAddress"] }; +} + +export function routingRuleNextHopDeserializer(item: any): RoutingRuleNextHop { + return { + nextHopType: item["nextHopType"], + nextHopAddress: item["nextHopAddress"], + }; +} + +/** Routing rule next hop type. */ +export enum KnownRoutingRuleNextHopType { + /** Forward traffic to the Internet. */ + Internet = "Internet", + /** No next hop will be used. */ + NoNextHop = "NoNextHop", + /** Forward traffic to a specified virtual appliance IP address. */ + VirtualAppliance = "VirtualAppliance", + /** Forward traffic to the virtual network gateway. */ + VirtualNetworkGateway = "VirtualNetworkGateway", + /** Keep traffic within the local virtual network */ + VnetLocal = "VnetLocal", +} + +/** + * Routing rule next hop type. \ + * {@link KnownRoutingRuleNextHopType} can be used interchangeably with RoutingRuleNextHopType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internet**: Forward traffic to the Internet. \ + * **NoNextHop**: No next hop will be used. \ + * **VirtualAppliance**: Forward traffic to a specified virtual appliance IP address. \ + * **VirtualNetworkGateway**: Forward traffic to the virtual network gateway. \ + * **VnetLocal**: Keep traffic within the local virtual network + */ +export type RoutingRuleNextHopType = string; + +export function routingRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return routingRuleSerializer(item); + }); +} + +export function routingRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return routingRuleDeserializer(item); + }); +} + +/** The Scope Connections resource */ +export interface ScopeConnection extends ChildResource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** Tenant ID. */ + tenantId?: string; + /** Resource ID. */ + resourceId?: string; + /** Connection State */ + readonly connectionState?: ScopeConnectionState; + /** A description of the scope connection. */ + description?: string; +} + +export function scopeConnectionSerializer(item: ScopeConnection): any { + return { + properties: areAllPropsUndefined(item, ["tenantId", "resourceId", "description"]) + ? undefined + : _scopeConnectionPropertiesSerializer(item), + }; +} + +export function scopeConnectionDeserializer(item: any): ScopeConnection { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _scopeConnectionPropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Scope connection. */ +export interface ScopeConnectionProperties { + /** Tenant ID. */ + tenantId?: string; + /** Resource ID. */ + resourceId?: string; + /** Connection State */ + readonly connectionState?: ScopeConnectionState; + /** A description of the scope connection. */ + description?: string; +} + +export function scopeConnectionPropertiesSerializer(item: ScopeConnectionProperties): any { + return { + tenantId: item["tenantId"], + resourceId: item["resourceId"], + description: item["description"], + }; +} + +export function scopeConnectionPropertiesDeserializer(item: any): ScopeConnectionProperties { + return { + tenantId: item["tenantId"], + resourceId: item["resourceId"], + connectionState: item["connectionState"], + description: item["description"], + }; +} + +export function scopeConnectionArraySerializer(result: Array): any[] { + return result.map((item) => { + return scopeConnectionSerializer(item); + }); +} + +export function scopeConnectionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return scopeConnectionDeserializer(item); + }); +} + +/** The commit resource */ +export interface Commit extends ChildResource { + /** The Commit properties */ + properties?: CommitProperties; + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; +} + +export function commitSerializer(item: Commit): any { + return { + properties: !item["properties"] + ? item["properties"] + : commitPropertiesSerializer(item["properties"]), + }; +} + +export function commitDeserializer(item: any): Commit { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + properties: !item["properties"] + ? item["properties"] + : commitPropertiesDeserializer(item["properties"]), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Properties of commit */ +export interface CommitProperties { + /** A description of the commit. */ + description?: string; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; + /** Commit Type. */ + commitType: ConfigurationType; + /** List of configuration IDs. */ + configurationIds?: string[]; + /** List of target locations. */ + targetLocations: string[]; + /** List of active locations. */ + readonly activeLocations?: string[]; + /** A value that, when changed, forces the commit to be re-evaluated and redeployed. */ + forceUpdateTag?: string; +} + +export function commitPropertiesSerializer(item: CommitProperties): any { + return { + description: item["description"], + commitType: item["commitType"], + configurationIds: !item["configurationIds"] + ? item["configurationIds"] + : item["configurationIds"].map((p: any) => { + return p; + }), + targetLocations: item["targetLocations"].map((p: any) => { + return p; + }), + forceUpdateTag: item["forceUpdateTag"], + }; +} + +export function commitPropertiesDeserializer(item: any): CommitProperties { + return { + description: item["description"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + commitType: item["commitType"], + configurationIds: !item["configurationIds"] + ? item["configurationIds"] + : item["configurationIds"].map((p: any) => { + return p; + }), + targetLocations: item["targetLocations"].map((p: any) => { + return p; + }), + activeLocations: !item["activeLocations"] + ? item["activeLocations"] + : item["activeLocations"].map((p: any) => { + return p; + }), + forceUpdateTag: item["forceUpdateTag"], + }; +} + +export function commitArraySerializer(result: Array): any[] { + return result.map((item) => { + return commitSerializer(item); + }); +} + +export function commitArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return commitDeserializer(item); + }); +} + +/** Defines the security admin configuration */ +export interface SecurityAdminConfiguration extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** A description of the security configuration. */ + description?: string; + /** Enum list of network intent policy based services. */ + applyOnNetworkIntentPolicyBasedServices?: NetworkIntentPolicyBasedService[]; + /** Determine update behavior for changes to network groups referenced within the rules in this configuration. */ + networkGroupAddressSpaceAggregationOption?: AddressSpaceAggregationOption; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function securityAdminConfigurationSerializer(item: SecurityAdminConfiguration): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "applyOnNetworkIntentPolicyBasedServices", + "networkGroupAddressSpaceAggregationOption", + ]) + ? undefined + : _securityAdminConfigurationPropertiesSerializer(item), + }; +} + +export function securityAdminConfigurationDeserializer(item: any): SecurityAdminConfiguration { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _securityAdminConfigurationPropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Defines the security admin configuration properties. */ +export interface SecurityAdminConfigurationPropertiesFormat { + /** A description of the security configuration. */ + description?: string; + /** Enum list of network intent policy based services. */ + applyOnNetworkIntentPolicyBasedServices?: NetworkIntentPolicyBasedService[]; + /** Determine update behavior for changes to network groups referenced within the rules in this configuration. */ + networkGroupAddressSpaceAggregationOption?: AddressSpaceAggregationOption; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function securityAdminConfigurationPropertiesFormatSerializer( + item: SecurityAdminConfigurationPropertiesFormat, +): any { + return { + description: item["description"], + applyOnNetworkIntentPolicyBasedServices: !item["applyOnNetworkIntentPolicyBasedServices"] + ? item["applyOnNetworkIntentPolicyBasedServices"] + : item["applyOnNetworkIntentPolicyBasedServices"].map((p: any) => { + return p; + }), + networkGroupAddressSpaceAggregationOption: item["networkGroupAddressSpaceAggregationOption"], + }; +} + +export function securityAdminConfigurationPropertiesFormatDeserializer( + item: any, +): SecurityAdminConfigurationPropertiesFormat { + return { + description: item["description"], + applyOnNetworkIntentPolicyBasedServices: !item["applyOnNetworkIntentPolicyBasedServices"] + ? item["applyOnNetworkIntentPolicyBasedServices"] + : item["applyOnNetworkIntentPolicyBasedServices"].map((p: any) => { + return p; + }), + networkGroupAddressSpaceAggregationOption: item["networkGroupAddressSpaceAggregationOption"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +/** Network intent policy based services. */ +export enum KnownNetworkIntentPolicyBasedService { + /** None */ + None = "None", + /** All */ + All = "All", + /** AllowRulesOnly */ + AllowRulesOnly = "AllowRulesOnly", +} + +/** + * Network intent policy based services. \ + * {@link KnownNetworkIntentPolicyBasedService} can be used interchangeably with NetworkIntentPolicyBasedService, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **All**: All \ + * **AllowRulesOnly**: AllowRulesOnly + */ +export type NetworkIntentPolicyBasedService = string; + +/** Option indicating the update behavior of a resource's address prefixes referenced within a network manager configuration. */ +export enum KnownAddressSpaceAggregationOption { + /** None */ + None = "None", + /** Manual */ + Manual = "Manual", +} + +/** + * Option indicating the update behavior of a resource's address prefixes referenced within a network manager configuration. \ + * {@link KnownAddressSpaceAggregationOption} can be used interchangeably with AddressSpaceAggregationOption, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **Manual**: Manual + */ +export type AddressSpaceAggregationOption = string; + +export function securityAdminConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return securityAdminConfigurationSerializer(item); + }); +} + +export function securityAdminConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return securityAdminConfigurationDeserializer(item); + }); +} + +/** Defines the admin rule collection. */ +export interface AdminRuleCollection extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** A description of the admin rule collection. */ + description?: string; + /** Groups for configuration */ + appliesToGroups?: NetworkManagerSecurityGroupItem[]; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function adminRuleCollectionSerializer(item: AdminRuleCollection): any { + return { + properties: areAllPropsUndefined(item, ["description", "appliesToGroups"]) + ? undefined + : _adminRuleCollectionPropertiesSerializer(item), + }; +} + +export function adminRuleCollectionDeserializer(item: any): AdminRuleCollection { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _adminRuleCollectionPropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Defines the admin rule collection properties. */ +export interface AdminRuleCollectionPropertiesFormat { + /** A description of the admin rule collection. */ + description?: string; + /** Groups for configuration */ + appliesToGroups: NetworkManagerSecurityGroupItem[]; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function adminRuleCollectionPropertiesFormatSerializer( + item: AdminRuleCollectionPropertiesFormat, +): any { + return { + description: item["description"], + appliesToGroups: networkManagerSecurityGroupItemArraySerializer(item["appliesToGroups"]), + }; +} + +export function adminRuleCollectionPropertiesFormatDeserializer( + item: any, +): AdminRuleCollectionPropertiesFormat { + return { + description: item["description"], + appliesToGroups: networkManagerSecurityGroupItemArrayDeserializer(item["appliesToGroups"]), + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function adminRuleCollectionArraySerializer(result: Array): any[] { + return result.map((item) => { + return adminRuleCollectionSerializer(item); + }); +} + +export function adminRuleCollectionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return adminRuleCollectionDeserializer(item); + }); +} + +/** Defines the security user configuration */ +export interface SecurityUserConfiguration extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** A description of the security user configuration. */ + description?: string; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function securityUserConfigurationSerializer(item: SecurityUserConfiguration): any { + return { + properties: areAllPropsUndefined(item, ["description"]) + ? undefined + : _securityUserConfigurationPropertiesSerializer(item), + }; +} + +export function securityUserConfigurationDeserializer(item: any): SecurityUserConfiguration { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _securityUserConfigurationPropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Defines the security user configuration properties. */ +export interface SecurityUserConfigurationPropertiesFormat { + /** A description of the security user configuration. */ + description?: string; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function securityUserConfigurationPropertiesFormatSerializer( + item: SecurityUserConfigurationPropertiesFormat, +): any { + return { description: item["description"] }; +} + +export function securityUserConfigurationPropertiesFormatDeserializer( + item: any, +): SecurityUserConfigurationPropertiesFormat { + return { + description: item["description"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function securityUserConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return securityUserConfigurationSerializer(item); + }); +} + +export function securityUserConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return securityUserConfigurationDeserializer(item); + }); +} + +/** Defines the security user rule collection. */ +export interface SecurityUserRuleCollection extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** A description of the security user rule collection. */ + description?: string; + /** Groups for configuration */ + appliesToGroups?: SecurityUserGroupItem[]; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function securityUserRuleCollectionSerializer(item: SecurityUserRuleCollection): any { + return { + properties: areAllPropsUndefined(item, ["description", "appliesToGroups"]) + ? undefined + : _securityUserRuleCollectionPropertiesSerializer(item), + }; +} + +export function securityUserRuleCollectionDeserializer(item: any): SecurityUserRuleCollection { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _securityUserRuleCollectionPropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Defines the security user rule collection properties. */ +export interface SecurityUserRuleCollectionPropertiesFormat { + /** A description of the security user rule collection. */ + description?: string; + /** Groups for configuration */ + appliesToGroups: SecurityUserGroupItem[]; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function securityUserRuleCollectionPropertiesFormatSerializer( + item: SecurityUserRuleCollectionPropertiesFormat, +): any { + return { + description: item["description"], + appliesToGroups: securityUserGroupItemArraySerializer(item["appliesToGroups"]), + }; +} + +export function securityUserRuleCollectionPropertiesFormatDeserializer( + item: any, +): SecurityUserRuleCollectionPropertiesFormat { + return { + description: item["description"], + appliesToGroups: securityUserGroupItemArrayDeserializer(item["appliesToGroups"]), + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function securityUserGroupItemArraySerializer(result: Array): any[] { + return result.map((item) => { + return securityUserGroupItemSerializer(item); + }); +} + +export function securityUserGroupItemArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return securityUserGroupItemDeserializer(item); + }); +} + +/** Network manager security user group item. */ +export interface SecurityUserGroupItem { + /** Network manager group Id. */ + networkGroupId: string; +} + +export function securityUserGroupItemSerializer(item: SecurityUserGroupItem): any { + return { networkGroupId: item["networkGroupId"] }; +} + +export function securityUserGroupItemDeserializer(item: any): SecurityUserGroupItem { + return { + networkGroupId: item["networkGroupId"], + }; +} + +export function securityUserRuleCollectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return securityUserRuleCollectionSerializer(item); + }); +} + +export function securityUserRuleCollectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return securityUserRuleCollectionDeserializer(item); + }); +} + +/** Network security user rule. */ +export interface SecurityUserRule extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** A description for this rule. */ + description?: string; + /** Network protocol this rule applies to. */ + protocol?: SecurityConfigurationRuleProtocol; + /** The CIDR or source IP ranges. */ + sources?: AddressPrefixItem[]; + /** The destination address prefixes. CIDR or destination IP ranges. */ + destinations?: AddressPrefixItem[]; + /** The source port ranges. */ + sourcePortRanges?: string[]; + /** The destination port ranges. */ + destinationPortRanges?: string[]; + /** Indicates if the traffic matched against the rule in inbound or outbound. */ + direction?: SecurityConfigurationRuleDirection; + /** The provisioning state of the security configuration user rule resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function securityUserRuleSerializer(item: SecurityUserRule): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "protocol", + "sources", + "destinations", + "sourcePortRanges", + "destinationPortRanges", + "direction", + ]) + ? undefined + : _securityUserRulePropertiesSerializer(item), + }; +} + +export function securityUserRuleDeserializer(item: any): SecurityUserRule { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _securityUserRulePropertiesDeserializer(item["properties"])), + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Security rule resource. */ +export interface SecurityUserRulePropertiesFormat { + /** A description for this rule. */ + description?: string; + /** Network protocol this rule applies to. */ + protocol: SecurityConfigurationRuleProtocol; + /** The CIDR or source IP ranges. */ + sources?: AddressPrefixItem[]; + /** The destination address prefixes. CIDR or destination IP ranges. */ + destinations?: AddressPrefixItem[]; + /** The source port ranges. */ + sourcePortRanges?: string[]; + /** The destination port ranges. */ + destinationPortRanges?: string[]; + /** Indicates if the traffic matched against the rule in inbound or outbound. */ + direction: SecurityConfigurationRuleDirection; + /** The provisioning state of the security configuration user rule resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function securityUserRulePropertiesFormatSerializer( + item: SecurityUserRulePropertiesFormat, +): any { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] ? item["sources"] : addressPrefixItemArraySerializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArraySerializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + direction: item["direction"], + }; +} + +export function securityUserRulePropertiesFormatDeserializer( + item: any, +): SecurityUserRulePropertiesFormat { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] + ? item["sources"] + : addressPrefixItemArrayDeserializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArrayDeserializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + direction: item["direction"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function securityUserRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return securityUserRuleSerializer(item); + }); +} + +export function securityUserRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return securityUserRuleDeserializer(item); + }); +} + +/** Network profile resource. */ +export interface NetworkProfile extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** List of child container network interfaces. */ + readonly containerNetworkInterfaces?: ContainerNetworkInterface[]; + /** List of chid container network interface configurations. */ + containerNetworkInterfaceConfigurations?: ContainerNetworkInterfaceConfiguration[]; + /** The resource GUID property of the network profile resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the network profile resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function networkProfileSerializer(item: NetworkProfile): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, ["containerNetworkInterfaceConfigurations"]) + ? undefined + : _networkProfilePropertiesSerializer(item), + }; +} + +export function networkProfileDeserializer(item: any): NetworkProfile { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _networkProfilePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Network profile properties. */ +export interface NetworkProfilePropertiesFormat { + /** List of child container network interfaces. */ + readonly containerNetworkInterfaces?: ContainerNetworkInterface[]; + /** List of chid container network interface configurations. */ + containerNetworkInterfaceConfigurations?: ContainerNetworkInterfaceConfiguration[]; + /** The resource GUID property of the network profile resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the network profile resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function networkProfilePropertiesFormatSerializer( + item: NetworkProfilePropertiesFormat, +): any { + return { + containerNetworkInterfaceConfigurations: !item["containerNetworkInterfaceConfigurations"] + ? item["containerNetworkInterfaceConfigurations"] + : containerNetworkInterfaceConfigurationArraySerializer( + item["containerNetworkInterfaceConfigurations"], + ), + }; +} + +export function networkProfilePropertiesFormatDeserializer( + item: any, +): NetworkProfilePropertiesFormat { + return { + containerNetworkInterfaces: !item["containerNetworkInterfaces"] + ? item["containerNetworkInterfaces"] + : containerNetworkInterfaceArrayDeserializer(item["containerNetworkInterfaces"]), + containerNetworkInterfaceConfigurations: !item["containerNetworkInterfaceConfigurations"] + ? item["containerNetworkInterfaceConfigurations"] + : containerNetworkInterfaceConfigurationArrayDeserializer( + item["containerNetworkInterfaceConfigurations"], + ), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function containerNetworkInterfaceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return containerNetworkInterfaceDeserializer(item); + }); +} + +/** Container network interface child resource. */ +export interface ContainerNetworkInterface extends SubResource { + /** The name of the resource. This name can be used to access the resource. */ + name?: string; + /** Sub Resource type. */ + readonly type?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Container network interface configuration from which this container network interface is created. */ + readonly containerNetworkInterfaceConfiguration?: ContainerNetworkInterfaceConfiguration; + /** Reference to the container to which this container network interface is attached. */ + container?: Container; + /** Reference to the ip configuration on this container nic. */ + readonly ipConfigurations?: ContainerNetworkInterfaceIpConfiguration[]; + /** The provisioning state of the container network interface resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function containerNetworkInterfaceDeserializer(item: any): ContainerNetworkInterface { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _containerNetworkInterfacePropertiesDeserializer(item["properties"])), + name: item["name"], + type: item["type"], + etag: item["etag"], + }; +} + +/** Properties of container network interface. */ +export interface ContainerNetworkInterfacePropertiesFormat { + /** Container network interface configuration from which this container network interface is created. */ + readonly containerNetworkInterfaceConfiguration?: ContainerNetworkInterfaceConfiguration; + /** Reference to the container to which this container network interface is attached. */ + container?: Container; + /** Reference to the ip configuration on this container nic. */ + readonly ipConfigurations?: ContainerNetworkInterfaceIpConfiguration[]; + /** The provisioning state of the container network interface resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function containerNetworkInterfacePropertiesFormatDeserializer( + item: any, +): ContainerNetworkInterfacePropertiesFormat { + return { + containerNetworkInterfaceConfiguration: !item["containerNetworkInterfaceConfiguration"] + ? item["containerNetworkInterfaceConfiguration"] + : containerNetworkInterfaceConfigurationDeserializer( + item["containerNetworkInterfaceConfiguration"], + ), + container: !item["container"] ? item["container"] : containerDeserializer(item["container"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : containerNetworkInterfaceIpConfigurationArrayDeserializer(item["ipConfigurations"]), + provisioningState: item["provisioningState"], + }; +} + +/** Container network interface configuration child resource. */ +export interface ContainerNetworkInterfaceConfiguration extends SubResource { + /** The name of the resource. This name can be used to access the resource. */ + name?: string; + /** Sub Resource type. */ + readonly type?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** A list of ip configurations of the container network interface configuration. */ + ipConfigurations?: IPConfigurationProfile[]; + /** A list of container network interfaces created from this container network interface configuration. */ + containerNetworkInterfaces?: SubResource[]; + /** The provisioning state of the container network interface configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function containerNetworkInterfaceConfigurationSerializer( + item: ContainerNetworkInterfaceConfiguration, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["ipConfigurations", "containerNetworkInterfaces"]) + ? undefined + : _containerNetworkInterfaceConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function containerNetworkInterfaceConfigurationDeserializer( + item: any, +): ContainerNetworkInterfaceConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _containerNetworkInterfaceConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + type: item["type"], + etag: item["etag"], + }; +} + +/** Container network interface configuration properties. */ +export interface ContainerNetworkInterfaceConfigurationPropertiesFormat { + /** A list of ip configurations of the container network interface configuration. */ + ipConfigurations?: IPConfigurationProfile[]; + /** A list of container network interfaces created from this container network interface configuration. */ + containerNetworkInterfaces?: SubResource[]; + /** The provisioning state of the container network interface configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function containerNetworkInterfaceConfigurationPropertiesFormatSerializer( + item: ContainerNetworkInterfaceConfigurationPropertiesFormat, +): any { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : ipConfigurationProfileArraySerializer(item["ipConfigurations"]), + containerNetworkInterfaces: !item["containerNetworkInterfaces"] + ? item["containerNetworkInterfaces"] + : subResourceArraySerializer(item["containerNetworkInterfaces"]), + }; +} + +export function containerNetworkInterfaceConfigurationPropertiesFormatDeserializer( + item: any, +): ContainerNetworkInterfaceConfigurationPropertiesFormat { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : ipConfigurationProfileArrayDeserializer(item["ipConfigurations"]), + containerNetworkInterfaces: !item["containerNetworkInterfaces"] + ? item["containerNetworkInterfaces"] + : subResourceArrayDeserializer(item["containerNetworkInterfaces"]), + provisioningState: item["provisioningState"], + }; +} + +/** Reference to container resource in remote resource provider. */ +export interface Container extends SubResource {} + +export function containerDeserializer(item: any): Container { + return { + id: item["id"], + }; +} + +export function containerNetworkInterfaceIpConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return containerNetworkInterfaceIpConfigurationDeserializer(item); + }); +} + +/** The ip configuration for a container network interface. */ +export interface ContainerNetworkInterfaceIpConfiguration { + /** The name of the resource. This name can be used to access the resource. */ + name?: string; + /** Sub Resource type. */ + readonly type?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The provisioning state of the container network interface IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function containerNetworkInterfaceIpConfigurationDeserializer( + item: any, +): ContainerNetworkInterfaceIpConfiguration { + return { + ...(!item["properties"] + ? item["properties"] + : _containerNetworkInterfaceIpConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + type: item["type"], + etag: item["etag"], + }; +} + +/** Properties of the container network interface IP configuration. */ +export interface ContainerNetworkInterfaceIpConfigurationPropertiesFormat { + /** The provisioning state of the container network interface IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function containerNetworkInterfaceIpConfigurationPropertiesFormatDeserializer( + item: any, +): ContainerNetworkInterfaceIpConfigurationPropertiesFormat { + return { + provisioningState: item["provisioningState"], + }; +} + +export function containerNetworkInterfaceConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return containerNetworkInterfaceConfigurationSerializer(item); + }); +} + +export function containerNetworkInterfaceConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return containerNetworkInterfaceConfigurationDeserializer(item); + }); +} + +export function networkProfileArraySerializer(result: Array): any[] { + return result.map((item) => { + return networkProfileSerializer(item); + }); +} + +export function networkProfileArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return networkProfileDeserializer(item); + }); +} + +/** The Network Security Perimeter resource */ +export interface NetworkSecurityPerimeter extends SecurityPerimeterTrackedResource { + /** The provisioning state of the scope assignment resource. */ + readonly provisioningState?: NspProvisioningState; + /** perimeter guid of the network security perimeter. */ + readonly perimeterGuid?: string; +} + +export function networkSecurityPerimeterSerializer(item: NetworkSecurityPerimeter): any { + return { + tags: item["tags"], + location: item["location"], + properties: areAllPropsUndefined(item, []) + ? undefined + : _networkSecurityPerimeterPropertiesSerializer(item), + }; +} + +export function networkSecurityPerimeterDeserializer(item: any): NetworkSecurityPerimeter { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : securityPerimeterSystemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _networkSecurityPerimeterPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of network security perimeter. */ +export interface NetworkSecurityPerimeterProperties { + /** The provisioning state of the scope assignment resource. */ + readonly provisioningState?: NspProvisioningState; + /** perimeter guid of the network security perimeter. */ + readonly perimeterGuid?: string; +} + +export function networkSecurityPerimeterPropertiesSerializer( + _item: NetworkSecurityPerimeterProperties, +): any { + return {}; +} + +export function networkSecurityPerimeterPropertiesDeserializer( + item: any, +): NetworkSecurityPerimeterProperties { + return { + provisioningState: item["provisioningState"], + perimeterGuid: item["perimeterGuid"], + }; +} + +/** The current provisioning state. */ +export enum KnownNspProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Accepted */ + Accepted = "Accepted", + /** Failed */ + Failed = "Failed", +} + +/** + * The current provisioning state. \ + * {@link KnownNspProvisioningState} can be used interchangeably with NspProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Succeeded \ + * **Creating**: Creating \ + * **Updating**: Updating \ + * **Deleting**: Deleting \ + * **Accepted**: Accepted \ + * **Failed**: Failed + */ +export type NspProvisioningState = string; + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface SecurityPerimeterTrackedResource extends SecurityPerimeterResource { + /** Resource tags. */ + tags?: Record; + /** The geo-location where the resource lives */ + location: string; +} + +export function securityPerimeterTrackedResourceSerializer( + item: SecurityPerimeterTrackedResource, +): any { + return { tags: item["tags"], location: item["location"] }; +} + +export function securityPerimeterTrackedResourceDeserializer( + item: any, +): SecurityPerimeterTrackedResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : securityPerimeterSystemDataDeserializer(item["systemData"]), + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + }; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface SecurityPerimeterResource { + /** Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" */ + readonly id?: string; + /** The name of the resource */ + readonly name?: string; + /** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */ + readonly type?: string; + /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SecurityPerimeterSystemData; +} + +export function securityPerimeterResourceSerializer(_item: SecurityPerimeterResource): any { + return {}; +} + +export function securityPerimeterResourceDeserializer(item: any): SecurityPerimeterResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : securityPerimeterSystemDataDeserializer(item["systemData"]), + }; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SecurityPerimeterSystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +export function securityPerimeterSystemDataDeserializer(item: any): SecurityPerimeterSystemData { + return { + createdBy: item["createdBy"], + createdByType: item["createdByType"], + createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), + lastModifiedBy: item["lastModifiedBy"], + lastModifiedByType: item["lastModifiedByType"], + lastModifiedAt: !item["lastModifiedAt"] + ? item["lastModifiedAt"] + : new Date(item["lastModifiedAt"]), + }; +} + +/** The type of identity that created the resource. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key", +} + +/** + * The type of identity that created the resource. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User**: User \ + * **Application**: Application \ + * **ManagedIdentity**: ManagedIdentity \ + * **Key**: Key + */ +export type CreatedByType = string; + +/** Update tags request. */ +export interface UpdateTagsRequest { + /** Network security perimeter identifier. */ + readonly id?: string; + /** List of tags for Network Security Perimeter */ + tags?: Record; +} + +export function updateTagsRequestSerializer(item: UpdateTagsRequest): any { + return { tags: item["tags"] }; +} + +export function networkSecurityPerimeterArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkSecurityPerimeterSerializer(item); + }); +} + +export function networkSecurityPerimeterArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkSecurityPerimeterDeserializer(item); + }); +} + +/** Configuration information or intent on which to do the analysis on. */ +export interface ReachabilityAnalysisIntent extends CommonProxyResource { + /** Represents the Reachability Analysis Intent properties. */ + properties: ReachabilityAnalysisIntentProperties; + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; +} + +export function reachabilityAnalysisIntentSerializer(item: ReachabilityAnalysisIntent): any { + return { properties: reachabilityAnalysisIntentPropertiesSerializer(item["properties"]) }; +} + +export function reachabilityAnalysisIntentDeserializer(item: any): ReachabilityAnalysisIntent { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: reachabilityAnalysisIntentPropertiesDeserializer(item["properties"]), + }; +} + +/** Represents the Reachability Analysis Intent properties. */ +export interface ReachabilityAnalysisIntentProperties { + /** Provisioning states of a resource. */ + readonly provisioningState?: CommonProvisioningState; + description?: string; + /** Source resource id to verify the reachability path of. */ + sourceResourceId: string; + /** Destination resource id to verify the reachability path of. */ + destinationResourceId: string; + /** IP traffic information. */ + ipTraffic: IPTraffic; +} + +export function reachabilityAnalysisIntentPropertiesSerializer( + item: ReachabilityAnalysisIntentProperties, +): any { + return { + description: item["description"], + sourceResourceId: item["sourceResourceId"], + destinationResourceId: item["destinationResourceId"], + ipTraffic: ipTrafficSerializer(item["ipTraffic"]), + }; +} + +export function reachabilityAnalysisIntentPropertiesDeserializer( + item: any, +): ReachabilityAnalysisIntentProperties { + return { + provisioningState: item["provisioningState"], + description: item["description"], + sourceResourceId: item["sourceResourceId"], + destinationResourceId: item["destinationResourceId"], + ipTraffic: ipTrafficDeserializer(item["ipTraffic"]), + }; +} + +/** IP traffic information. */ +export interface IPTraffic { + /** List of source IP addresses of the traffic.. */ + sourceIps: string[]; + /** List of destination IP addresses of the traffic.. */ + destinationIps: string[]; + /** The source ports of the traffic. */ + sourcePorts: string[]; + /** The destination ports of the traffic. */ + destinationPorts: string[]; + protocols: NetworkProtocol[]; +} + +export function ipTrafficSerializer(item: IPTraffic): any { + return { + sourceIps: item["sourceIps"].map((p: any) => { + return p; + }), + destinationIps: item["destinationIps"].map((p: any) => { + return p; + }), + sourcePorts: item["sourcePorts"].map((p: any) => { + return p; + }), + destinationPorts: item["destinationPorts"].map((p: any) => { + return p; + }), + protocols: item["protocols"].map((p: any) => { + return p; + }), + }; +} + +export function ipTrafficDeserializer(item: any): IPTraffic { + return { + sourceIps: item["sourceIps"].map((p: any) => { + return p; + }), + destinationIps: item["destinationIps"].map((p: any) => { + return p; + }), + sourcePorts: item["sourcePorts"].map((p: any) => { + return p; + }), + destinationPorts: item["destinationPorts"].map((p: any) => { + return p; + }), + protocols: item["protocols"].map((p: any) => { + return p; + }), + }; +} + +/** Network Protocol. */ +export enum KnownNetworkProtocol { + /** Any */ + Any = "Any", + /** TCP */ + TCP = "TCP", + /** UDP */ + UDP = "UDP", + /** ICMP */ + Icmp = "ICMP", +} + +/** + * Network Protocol. \ + * {@link KnownNetworkProtocol} can be used interchangeably with NetworkProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Any**: Any \ + * **TCP**: TCP \ + * **UDP**: UDP \ + * **ICMP**: ICMP + */ +export type NetworkProtocol = string; + +export function reachabilityAnalysisIntentArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return reachabilityAnalysisIntentSerializer(item); + }); +} + +export function reachabilityAnalysisIntentArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return reachabilityAnalysisIntentDeserializer(item); + }); +} + +/** Instance of Verifier Workspace. */ +export interface VerifierWorkspace extends CommonTrackedResource { + /** Properties of Verifier Workspace resource. */ + properties?: VerifierWorkspaceProperties; + /** String representing unique etag for the resource document. */ + readonly etag?: string; + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; +} + +export function verifierWorkspaceSerializer(item: VerifierWorkspace): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : verifierWorkspacePropertiesSerializer(item["properties"]), + }; +} + +export function verifierWorkspaceDeserializer(item: any): VerifierWorkspace { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : verifierWorkspacePropertiesDeserializer(item["properties"]), + etag: item["etag"], + }; +} + +/** Properties of Verifier Workspace resource. */ +export interface VerifierWorkspaceProperties { + description?: string; + /** Provisioning states of a resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function verifierWorkspacePropertiesSerializer(item: VerifierWorkspaceProperties): any { + return { description: item["description"] }; +} + +export function verifierWorkspacePropertiesDeserializer(item: any): VerifierWorkspaceProperties { + return { + description: item["description"], + provisioningState: item["provisioningState"], + }; +} + +/** Represents the VerifierWorkspace update API request interface. */ +export interface VerifierWorkspaceUpdate { + /** Dictionary of */ + tags?: Record; + /** Represents the VerifierWorkspace update properties. */ + properties?: VerifierWorkspaceUpdateProperties; +} + +export function verifierWorkspaceUpdateSerializer(item: VerifierWorkspaceUpdate): any { + return { + tags: item["tags"], + properties: !item["properties"] + ? item["properties"] + : verifierWorkspaceUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** Represents the VerifierWorkspace update properties. */ +export interface VerifierWorkspaceUpdateProperties { + description?: string; +} + +export function verifierWorkspaceUpdatePropertiesSerializer( + item: VerifierWorkspaceUpdateProperties, +): any { + return { description: item["description"] }; +} + +export function verifierWorkspaceArraySerializer(result: Array): any[] { + return result.map((item) => { + return verifierWorkspaceSerializer(item); + }); +} + +export function verifierWorkspaceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return verifierWorkspaceDeserializer(item); + }); +} + +/** Configuration information for analysis run. */ +export interface ReachabilityAnalysisRun extends CommonProxyResource { + /** Represents the Reachability Analysis Run properties. */ + properties: ReachabilityAnalysisRunProperties; + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; +} + +export function reachabilityAnalysisRunSerializer(item: ReachabilityAnalysisRun): any { + return { properties: reachabilityAnalysisRunPropertiesSerializer(item["properties"]) }; +} + +export function reachabilityAnalysisRunDeserializer(item: any): ReachabilityAnalysisRun { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: reachabilityAnalysisRunPropertiesDeserializer(item["properties"]), + }; +} + +/** Represents the Reachability Analysis Run properties. */ +export interface ReachabilityAnalysisRunProperties { + description?: string; + /** Id of the intent resource to run analysis on. */ + intentId: string; + /** Intent information. */ + readonly intentContent?: IntentContent; + readonly analysisResult?: string; + readonly errorMessage?: string; + /** Provisioning states of a resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function reachabilityAnalysisRunPropertiesSerializer( + item: ReachabilityAnalysisRunProperties, +): any { + return { description: item["description"], intentId: item["intentId"] }; +} + +export function reachabilityAnalysisRunPropertiesDeserializer( + item: any, +): ReachabilityAnalysisRunProperties { + return { + description: item["description"], + intentId: item["intentId"], + intentContent: !item["intentContent"] + ? item["intentContent"] + : intentContentDeserializer(item["intentContent"]), + analysisResult: item["analysisResult"], + errorMessage: item["errorMessage"], + provisioningState: item["provisioningState"], + }; +} + +/** Intent information. */ +export interface IntentContent { + description?: string; + /** Source resource id of the intent. */ + sourceResourceId: string; + /** Destination resource id of the intent. */ + destinationResourceId: string; + /** IP traffic information. */ + ipTraffic: IPTraffic; +} + +export function intentContentDeserializer(item: any): IntentContent { + return { + description: item["description"], + sourceResourceId: item["sourceResourceId"], + destinationResourceId: item["destinationResourceId"], + ipTraffic: ipTrafficDeserializer(item["ipTraffic"]), + }; +} + +export function reachabilityAnalysisRunArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return reachabilityAnalysisRunSerializer(item); + }); +} + +export function reachabilityAnalysisRunArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return reachabilityAnalysisRunDeserializer(item); + }); +} + +/** NetworkVirtualApplianceConnection resource. */ +export interface NetworkVirtualApplianceConnection extends SubResource { + /** The name of the resource. */ + name?: string; + /** The name of the resource. */ + namePropertiesName?: string; + /** The provisioning state of the NetworkVirtualApplianceConnection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Network Virtual Appliance ASN. */ + asn?: number; + /** Unique identifier for the connection. */ + tunnelIdentifier?: number; + /** List of bgpPeerAddresses for the NVA instances */ + bgpPeerAddress?: string[]; + /** Enable internet security. */ + enableInternetSecurity?: boolean; + /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function networkVirtualApplianceConnectionSerializer( + item: NetworkVirtualApplianceConnection, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "name", + "asn", + "tunnelIdentifier", + "bgpPeerAddress", + "enableInternetSecurity", + "routingConfiguration", + ]) + ? undefined + : _networkVirtualApplianceConnectionPropertiesSerializer(item), + name: item["name"], + }; +} + +export function networkVirtualApplianceConnectionDeserializer( + item: any, +): NetworkVirtualApplianceConnection { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _networkVirtualApplianceConnectionPropertiesDeserializer(item["properties"])), + name: item["name"], + }; +} + +/** Properties of the NetworkVirtualApplianceConnection subresource. */ +export interface NetworkVirtualApplianceConnectionProperties { + /** The name of the resource. */ + name?: string; + /** The provisioning state of the NetworkVirtualApplianceConnection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Network Virtual Appliance ASN. */ + asn?: number; + /** Unique identifier for the connection. */ + tunnelIdentifier?: number; + /** List of bgpPeerAddresses for the NVA instances */ + bgpPeerAddress?: string[]; + /** Enable internet security. */ + enableInternetSecurity?: boolean; + /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function networkVirtualApplianceConnectionPropertiesSerializer( + item: NetworkVirtualApplianceConnectionProperties, +): any { + return { + name: item["name"], + asn: item["asn"], + tunnelIdentifier: item["tunnelIdentifier"], + bgpPeerAddress: !item["bgpPeerAddress"] + ? item["bgpPeerAddress"] + : item["bgpPeerAddress"].map((p: any) => { + return p; + }), + enableInternetSecurity: item["enableInternetSecurity"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function networkVirtualApplianceConnectionPropertiesDeserializer( + item: any, +): NetworkVirtualApplianceConnectionProperties { + return { + name: item["name"], + provisioningState: item["provisioningState"], + asn: item["asn"], + tunnelIdentifier: item["tunnelIdentifier"], + bgpPeerAddress: !item["bgpPeerAddress"] + ? item["bgpPeerAddress"] + : item["bgpPeerAddress"].map((p: any) => { + return p; + }), + enableInternetSecurity: item["enableInternetSecurity"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +/** Routing Configuration indicating the associated and propagated route tables for this connection. */ +export interface RoutingConfiguration { + /** The resource id RouteTable associated with this RoutingConfiguration. */ + associatedRouteTable?: SubResource; + /** The list of RouteTables to advertise the routes to. */ + propagatedRouteTables?: PropagatedRouteTable; + /** List of routes that control routing from VirtualHub into a virtual network connection. */ + vnetRoutes?: VnetRoute; + /** The resource id of the RouteMap associated with this RoutingConfiguration for inbound learned routes. */ + inboundRouteMap?: SubResource; + /** The resource id of theRouteMap associated with this RoutingConfiguration for outbound advertised routes. */ + outboundRouteMap?: SubResource; +} + +export function routingConfigurationSerializer(item: RoutingConfiguration): any { + return { + associatedRouteTable: !item["associatedRouteTable"] + ? item["associatedRouteTable"] + : subResourceSerializer(item["associatedRouteTable"]), + propagatedRouteTables: !item["propagatedRouteTables"] + ? item["propagatedRouteTables"] + : propagatedRouteTableSerializer(item["propagatedRouteTables"]), + vnetRoutes: !item["vnetRoutes"] ? item["vnetRoutes"] : vnetRouteSerializer(item["vnetRoutes"]), + inboundRouteMap: !item["inboundRouteMap"] + ? item["inboundRouteMap"] + : subResourceSerializer(item["inboundRouteMap"]), + outboundRouteMap: !item["outboundRouteMap"] + ? item["outboundRouteMap"] + : subResourceSerializer(item["outboundRouteMap"]), + }; +} + +export function routingConfigurationDeserializer(item: any): RoutingConfiguration { + return { + associatedRouteTable: !item["associatedRouteTable"] + ? item["associatedRouteTable"] + : subResourceDeserializer(item["associatedRouteTable"]), + propagatedRouteTables: !item["propagatedRouteTables"] + ? item["propagatedRouteTables"] + : propagatedRouteTableDeserializer(item["propagatedRouteTables"]), + vnetRoutes: !item["vnetRoutes"] + ? item["vnetRoutes"] + : vnetRouteDeserializer(item["vnetRoutes"]), + inboundRouteMap: !item["inboundRouteMap"] + ? item["inboundRouteMap"] + : subResourceDeserializer(item["inboundRouteMap"]), + outboundRouteMap: !item["outboundRouteMap"] + ? item["outboundRouteMap"] + : subResourceDeserializer(item["outboundRouteMap"]), + }; +} + +/** The list of RouteTables to advertise the routes to. */ +export interface PropagatedRouteTable { + /** The list of labels. */ + labels?: string[]; + /** The list of resource ids of all the RouteTables. */ + ids?: SubResource[]; +} + +export function propagatedRouteTableSerializer(item: PropagatedRouteTable): any { + return { + labels: !item["labels"] + ? item["labels"] + : item["labels"].map((p: any) => { + return p; + }), + ids: !item["ids"] ? item["ids"] : subResourceArraySerializer(item["ids"]), + }; +} + +export function propagatedRouteTableDeserializer(item: any): PropagatedRouteTable { + return { + labels: !item["labels"] + ? item["labels"] + : item["labels"].map((p: any) => { + return p; + }), + ids: !item["ids"] ? item["ids"] : subResourceArrayDeserializer(item["ids"]), + }; +} + +/** List of routes that control routing from VirtualHub into a virtual network connection. */ +export interface VnetRoute { + /** Configuration for static routes on this HubVnetConnection. */ + staticRoutesConfig?: StaticRoutesConfig; + /** List of all Static Routes. */ + staticRoutes?: StaticRoute[]; + /** The list of references to HubBgpConnection objects. */ + readonly bgpConnections?: SubResource[]; +} + +export function vnetRouteSerializer(item: VnetRoute): any { + return { + staticRoutesConfig: !item["staticRoutesConfig"] + ? item["staticRoutesConfig"] + : staticRoutesConfigSerializer(item["staticRoutesConfig"]), + staticRoutes: !item["staticRoutes"] + ? item["staticRoutes"] + : staticRouteArraySerializer(item["staticRoutes"]), + }; +} + +export function vnetRouteDeserializer(item: any): VnetRoute { + return { + staticRoutesConfig: !item["staticRoutesConfig"] + ? item["staticRoutesConfig"] + : staticRoutesConfigDeserializer(item["staticRoutesConfig"]), + staticRoutes: !item["staticRoutes"] + ? item["staticRoutes"] + : staticRouteArrayDeserializer(item["staticRoutes"]), + bgpConnections: !item["bgpConnections"] + ? item["bgpConnections"] + : subResourceArrayDeserializer(item["bgpConnections"]), + }; +} + +/** Configuration for static routes on this HubVnetConnectionConfiguration for static routes on this HubVnetConnection. */ +export interface StaticRoutesConfig { + /** Boolean indicating whether static routes on this connection are automatically propagate to route tables which this connection propagates to. */ + propagateStaticRoutes?: boolean; + /** Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke. */ + vnetLocalRouteOverrideCriteria?: VnetLocalRouteOverrideCriteria; +} + +export function staticRoutesConfigSerializer(item: StaticRoutesConfig): any { + return { + propagateStaticRoutes: item["propagateStaticRoutes"], + vnetLocalRouteOverrideCriteria: item["vnetLocalRouteOverrideCriteria"], + }; +} + +export function staticRoutesConfigDeserializer(item: any): StaticRoutesConfig { + return { + propagateStaticRoutes: item["propagateStaticRoutes"], + vnetLocalRouteOverrideCriteria: item["vnetLocalRouteOverrideCriteria"], + }; +} + +/** Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke vnet. */ +export enum KnownVnetLocalRouteOverrideCriteria { + /** Contains */ + Contains = "Contains", + /** Equal */ + Equal = "Equal", +} + +/** + * Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke vnet. \ + * {@link KnownVnetLocalRouteOverrideCriteria} can be used interchangeably with VnetLocalRouteOverrideCriteria, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Contains**: Contains \ + * **Equal**: Equal + */ +export type VnetLocalRouteOverrideCriteria = string; + +export function staticRouteArraySerializer(result: Array): any[] { + return result.map((item) => { + return staticRouteSerializer(item); + }); +} + +export function staticRouteArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return staticRouteDeserializer(item); + }); +} + +/** List of all Static Routes. */ +export interface StaticRoute { + /** The name of the StaticRoute that is unique within a VnetRoute. */ + name?: string; + /** List of all address prefixes. */ + addressPrefixes?: string[]; + /** The ip address of the next hop. */ + nextHopIpAddress?: string; +} + +export function staticRouteSerializer(item: StaticRoute): any { + return { + name: item["name"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + nextHopIpAddress: item["nextHopIpAddress"], + }; +} + +export function staticRouteDeserializer(item: any): StaticRoute { + return { + name: item["name"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + nextHopIpAddress: item["nextHopIpAddress"], + }; +} + +/** NetworkVirtualApplianceConnection list. */ +export interface _NetworkVirtualApplianceConnectionList { + /** The NetworkVirtualApplianceConnection items on this page */ + value: NetworkVirtualApplianceConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkVirtualApplianceConnectionListDeserializer( + item: any, +): _NetworkVirtualApplianceConnectionList { + return { + value: networkVirtualApplianceConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function networkVirtualApplianceConnectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkVirtualApplianceConnectionSerializer(item); + }); +} + +export function networkVirtualApplianceConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkVirtualApplianceConnectionDeserializer(item); + }); +} + +/** NetworkVirtualAppliance Resource. */ +export interface NetworkVirtualAppliance extends Resource { + /** The service principal that has read access to cloud-init and config blob. */ + identity?: ManagedServiceIdentity; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Network Virtual Appliance SKU. */ + nvaSku?: VirtualApplianceSkuProperties; + /** Address Prefix. */ + readonly addressPrefix?: string; + /** BootStrapConfigurationBlobs storage URLs. */ + bootStrapConfigurationBlobs?: string[]; + /** The Virtual Hub where Network Virtual Appliance is being deployed. */ + virtualHub?: SubResource; + /** CloudInitConfigurationBlob storage URLs. */ + cloudInitConfigurationBlobs?: string[]; + /** CloudInitConfiguration string in plain text. */ + cloudInitConfiguration?: string; + /** VirtualAppliance ASN. Microsoft private, public and IANA reserved ASN are not supported. */ + virtualApplianceAsn?: number; + /** Public key for SSH login. */ + sshPublicKey?: string; + /** List of Virtual Appliance Network Interfaces. */ + readonly virtualApplianceNics?: VirtualApplianceNicProperties[]; + /** Network Profile containing configurations for Public and Private NIC. */ + networkProfile?: NetworkVirtualAppliancePropertiesFormatNetworkProfile; + /** Details required for Additional Network Interface. This property is not compatible with the NVA deployed in VNets. */ + additionalNics?: VirtualApplianceAdditionalNicProperties[]; + /** List of Resource Uri of Public IPs for Internet Ingress Scenario. */ + internetIngressPublicIps?: InternetIngressPublicIpsProperties[]; + /** List of references to VirtualApplianceSite. */ + readonly virtualApplianceSites?: SubResource[]; + /** List of references to VirtualApplianceConnections. */ + readonly virtualApplianceConnections?: SubResource[]; + /** List of references to InboundSecurityRules. */ + readonly inboundSecurityRules?: SubResource[]; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The deployment type. PartnerManaged for the SaaS NVA */ + readonly deploymentType?: string; + /** The delegation for the Virtual Appliance. Only appliable for SaaS NVA. */ + delegation?: DelegationProperties; + /** The delegation for the Virtual Appliance */ + partnerManagedResource?: PartnerManagedResourceProperties; + /** The NVA in VNet interface configurations */ + nvaInterfaceConfigurations?: NvaInterfaceConfigurationsProperties[]; + /** A Internal Load Balancer's HA port frontend IP address. Can be used to set routes & UDR to load balance traffic between NVA instances */ + readonly privateIpAddress?: string; +} + +export function networkVirtualApplianceSerializer(item: NetworkVirtualAppliance): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "nvaSku", + "bootStrapConfigurationBlobs", + "virtualHub", + "cloudInitConfigurationBlobs", + "cloudInitConfiguration", + "virtualApplianceAsn", + "sshPublicKey", + "networkProfile", + "additionalNics", + "internetIngressPublicIps", + "delegation", + "partnerManagedResource", + "nvaInterfaceConfigurations", + ]) + ? undefined + : _networkVirtualAppliancePropertiesSerializer(item), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + }; +} + +export function networkVirtualApplianceDeserializer(item: any): NetworkVirtualAppliance { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _networkVirtualAppliancePropertiesDeserializer(item["properties"])), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentityDeserializer(item["identity"]), + etag: item["etag"], + }; +} + +/** Network Virtual Appliance definition. */ +export interface NetworkVirtualAppliancePropertiesFormat { + /** Network Virtual Appliance SKU. */ + nvaSku?: VirtualApplianceSkuProperties; + /** Address Prefix. */ + readonly addressPrefix?: string; + /** BootStrapConfigurationBlobs storage URLs. */ + bootStrapConfigurationBlobs?: string[]; + /** The Virtual Hub where Network Virtual Appliance is being deployed. */ + virtualHub?: SubResource; + /** CloudInitConfigurationBlob storage URLs. */ + cloudInitConfigurationBlobs?: string[]; + /** CloudInitConfiguration string in plain text. */ + cloudInitConfiguration?: string; + /** VirtualAppliance ASN. Microsoft private, public and IANA reserved ASN are not supported. */ + virtualApplianceAsn?: number; + /** Public key for SSH login. */ + sshPublicKey?: string; + /** List of Virtual Appliance Network Interfaces. */ + readonly virtualApplianceNics?: VirtualApplianceNicProperties[]; + /** Network Profile containing configurations for Public and Private NIC. */ + networkProfile?: NetworkVirtualAppliancePropertiesFormatNetworkProfile; + /** Details required for Additional Network Interface. This property is not compatible with the NVA deployed in VNets. */ + additionalNics?: VirtualApplianceAdditionalNicProperties[]; + /** List of Resource Uri of Public IPs for Internet Ingress Scenario. */ + internetIngressPublicIps?: InternetIngressPublicIpsProperties[]; + /** List of references to VirtualApplianceSite. */ + readonly virtualApplianceSites?: SubResource[]; + /** List of references to VirtualApplianceConnections. */ + readonly virtualApplianceConnections?: SubResource[]; + /** List of references to InboundSecurityRules. */ + readonly inboundSecurityRules?: SubResource[]; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The deployment type. PartnerManaged for the SaaS NVA */ + readonly deploymentType?: string; + /** The delegation for the Virtual Appliance. Only appliable for SaaS NVA. */ + delegation?: DelegationProperties; + /** The delegation for the Virtual Appliance */ + partnerManagedResource?: PartnerManagedResourceProperties; + /** The NVA in VNet interface configurations */ + nvaInterfaceConfigurations?: NvaInterfaceConfigurationsProperties[]; + /** A Internal Load Balancer's HA port frontend IP address. Can be used to set routes & UDR to load balance traffic between NVA instances */ + readonly privateIpAddress?: string; +} + +export function networkVirtualAppliancePropertiesFormatSerializer( + item: NetworkVirtualAppliancePropertiesFormat, +): any { + return { + nvaSku: !item["nvaSku"] + ? item["nvaSku"] + : virtualApplianceSkuPropertiesSerializer(item["nvaSku"]), + bootStrapConfigurationBlobs: !item["bootStrapConfigurationBlobs"] + ? item["bootStrapConfigurationBlobs"] + : item["bootStrapConfigurationBlobs"].map((p: any) => { + return p; + }), + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceSerializer(item["virtualHub"]), + cloudInitConfigurationBlobs: !item["cloudInitConfigurationBlobs"] + ? item["cloudInitConfigurationBlobs"] + : item["cloudInitConfigurationBlobs"].map((p: any) => { + return p; + }), + cloudInitConfiguration: item["cloudInitConfiguration"], + virtualApplianceAsn: item["virtualApplianceAsn"], + sshPublicKey: item["sshPublicKey"], + networkProfile: !item["networkProfile"] + ? item["networkProfile"] + : networkVirtualAppliancePropertiesFormatNetworkProfileSerializer(item["networkProfile"]), + additionalNics: !item["additionalNics"] + ? item["additionalNics"] + : virtualApplianceAdditionalNicPropertiesArraySerializer(item["additionalNics"]), + internetIngressPublicIps: !item["internetIngressPublicIps"] + ? item["internetIngressPublicIps"] + : internetIngressPublicIpsPropertiesArraySerializer(item["internetIngressPublicIps"]), + delegation: !item["delegation"] + ? item["delegation"] + : delegationPropertiesSerializer(item["delegation"]), + partnerManagedResource: !item["partnerManagedResource"] + ? item["partnerManagedResource"] + : partnerManagedResourcePropertiesSerializer(item["partnerManagedResource"]), + nvaInterfaceConfigurations: !item["nvaInterfaceConfigurations"] + ? item["nvaInterfaceConfigurations"] + : nvaInterfaceConfigurationsPropertiesArraySerializer(item["nvaInterfaceConfigurations"]), + }; +} + +export function networkVirtualAppliancePropertiesFormatDeserializer( + item: any, +): NetworkVirtualAppliancePropertiesFormat { + return { + nvaSku: !item["nvaSku"] + ? item["nvaSku"] + : virtualApplianceSkuPropertiesDeserializer(item["nvaSku"]), + addressPrefix: item["addressPrefix"], + bootStrapConfigurationBlobs: !item["bootStrapConfigurationBlobs"] + ? item["bootStrapConfigurationBlobs"] + : item["bootStrapConfigurationBlobs"].map((p: any) => { + return p; + }), + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceDeserializer(item["virtualHub"]), + cloudInitConfigurationBlobs: !item["cloudInitConfigurationBlobs"] + ? item["cloudInitConfigurationBlobs"] + : item["cloudInitConfigurationBlobs"].map((p: any) => { + return p; + }), + cloudInitConfiguration: item["cloudInitConfiguration"], + virtualApplianceAsn: item["virtualApplianceAsn"], + sshPublicKey: item["sshPublicKey"], + virtualApplianceNics: !item["virtualApplianceNics"] + ? item["virtualApplianceNics"] + : virtualApplianceNicPropertiesArrayDeserializer(item["virtualApplianceNics"]), + networkProfile: !item["networkProfile"] + ? item["networkProfile"] + : networkVirtualAppliancePropertiesFormatNetworkProfileDeserializer(item["networkProfile"]), + additionalNics: !item["additionalNics"] + ? item["additionalNics"] + : virtualApplianceAdditionalNicPropertiesArrayDeserializer(item["additionalNics"]), + internetIngressPublicIps: !item["internetIngressPublicIps"] + ? item["internetIngressPublicIps"] + : internetIngressPublicIpsPropertiesArrayDeserializer(item["internetIngressPublicIps"]), + virtualApplianceSites: !item["virtualApplianceSites"] + ? item["virtualApplianceSites"] + : subResourceArrayDeserializer(item["virtualApplianceSites"]), + virtualApplianceConnections: !item["virtualApplianceConnections"] + ? item["virtualApplianceConnections"] + : subResourceArrayDeserializer(item["virtualApplianceConnections"]), + inboundSecurityRules: !item["inboundSecurityRules"] + ? item["inboundSecurityRules"] + : subResourceArrayDeserializer(item["inboundSecurityRules"]), + provisioningState: item["provisioningState"], + deploymentType: item["deploymentType"], + delegation: !item["delegation"] + ? item["delegation"] + : delegationPropertiesDeserializer(item["delegation"]), + partnerManagedResource: !item["partnerManagedResource"] + ? item["partnerManagedResource"] + : partnerManagedResourcePropertiesDeserializer(item["partnerManagedResource"]), + nvaInterfaceConfigurations: !item["nvaInterfaceConfigurations"] + ? item["nvaInterfaceConfigurations"] + : nvaInterfaceConfigurationsPropertiesArrayDeserializer(item["nvaInterfaceConfigurations"]), + privateIpAddress: item["privateIpAddress"], + }; +} + +/** Network Virtual Appliance Sku Properties. */ +export interface VirtualApplianceSkuProperties { + /** Virtual Appliance Vendor. */ + vendor?: string; + /** Virtual Appliance Scale Unit. */ + bundledScaleUnit?: string; + /** Virtual Appliance Version. */ + marketPlaceVersion?: string; +} + +export function virtualApplianceSkuPropertiesSerializer(item: VirtualApplianceSkuProperties): any { + return { + vendor: item["vendor"], + bundledScaleUnit: item["bundledScaleUnit"], + marketPlaceVersion: item["marketPlaceVersion"], + }; +} + +export function virtualApplianceSkuPropertiesDeserializer( + item: any, +): VirtualApplianceSkuProperties { + return { + vendor: item["vendor"], + bundledScaleUnit: item["bundledScaleUnit"], + marketPlaceVersion: item["marketPlaceVersion"], + }; +} + +export function virtualApplianceNicPropertiesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualApplianceNicPropertiesDeserializer(item); + }); +} + +/** Network Virtual Appliance NIC properties. */ +export interface VirtualApplianceNicProperties { + /** NIC type - PublicNic, PrivateNic, or AdditionalNic; AdditionalPrivateNic and AdditionalPublicNic are only supported for NVAs deployed in VNets. */ + readonly nicType?: NicTypeInResponse; + /** NIC name. */ + readonly name?: string; + /** Public IP address. */ + readonly publicIpAddress?: string; + /** Private IP address. */ + readonly privateIpAddress?: string; + /** Instance on which nic is attached. */ + readonly instanceName?: string; +} + +export function virtualApplianceNicPropertiesDeserializer( + item: any, +): VirtualApplianceNicProperties { + return { + nicType: item["nicType"], + name: item["name"], + publicIpAddress: item["publicIpAddress"], + privateIpAddress: item["privateIpAddress"], + instanceName: item["instanceName"], + }; +} + +/** NIC type - PublicNic, PrivateNic, or AdditionalNic; AdditionalPrivateNic and AdditionalPublicNic are only supported for NVAs deployed in VNets. */ +export enum KnownNicTypeInResponse { + /** PublicNic */ + PublicNic = "PublicNic", + /** PrivateNic */ + PrivateNic = "PrivateNic", + /** AdditionalNic */ + AdditionalNic = "AdditionalNic", +} + +/** + * NIC type - PublicNic, PrivateNic, or AdditionalNic; AdditionalPrivateNic and AdditionalPublicNic are only supported for NVAs deployed in VNets. \ + * {@link KnownNicTypeInResponse} can be used interchangeably with NicTypeInResponse, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PublicNic**: PublicNic \ + * **PrivateNic**: PrivateNic \ + * **AdditionalNic**: AdditionalNic + */ +export type NicTypeInResponse = string; + +/** Network Profile containing configurations for Public and Private NIC. */ +export interface NetworkVirtualAppliancePropertiesFormatNetworkProfile { + networkInterfaceConfigurations?: VirtualApplianceNetworkInterfaceConfiguration[]; +} + +export function networkVirtualAppliancePropertiesFormatNetworkProfileSerializer( + item: NetworkVirtualAppliancePropertiesFormatNetworkProfile, +): any { + return { + networkInterfaceConfigurations: !item["networkInterfaceConfigurations"] + ? item["networkInterfaceConfigurations"] + : virtualApplianceNetworkInterfaceConfigurationArraySerializer( + item["networkInterfaceConfigurations"], + ), + }; +} + +export function networkVirtualAppliancePropertiesFormatNetworkProfileDeserializer( + item: any, +): NetworkVirtualAppliancePropertiesFormatNetworkProfile { + return { + networkInterfaceConfigurations: !item["networkInterfaceConfigurations"] + ? item["networkInterfaceConfigurations"] + : virtualApplianceNetworkInterfaceConfigurationArrayDeserializer( + item["networkInterfaceConfigurations"], + ), + }; +} + +export function virtualApplianceNetworkInterfaceConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualApplianceNetworkInterfaceConfigurationSerializer(item); + }); +} + +export function virtualApplianceNetworkInterfaceConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualApplianceNetworkInterfaceConfigurationDeserializer(item); + }); +} + +/** Represents a single NIC configuration. */ +export interface VirtualApplianceNetworkInterfaceConfiguration { + /** NIC type. This should be either PublicNic or PrivateNic. */ + nicType?: NicTypeInRequest; + /** Represents a single NIC configuration properties. */ + properties?: VirtualApplianceNetworkInterfaceConfigurationProperties; +} + +export function virtualApplianceNetworkInterfaceConfigurationSerializer( + item: VirtualApplianceNetworkInterfaceConfiguration, +): any { + return { + type: item["nicType"], + properties: !item["properties"] + ? item["properties"] + : virtualApplianceNetworkInterfaceConfigurationPropertiesSerializer(item["properties"]), + }; +} + +export function virtualApplianceNetworkInterfaceConfigurationDeserializer( + item: any, +): VirtualApplianceNetworkInterfaceConfiguration { + return { + nicType: item["type"], + properties: !item["properties"] + ? item["properties"] + : virtualApplianceNetworkInterfaceConfigurationPropertiesDeserializer(item["properties"]), + }; +} + +/** NIC type. This should be either PublicNic or PrivateNic. */ +export enum KnownNicTypeInRequest { + /** PublicNic */ + PublicNic = "PublicNic", + /** PrivateNic */ + PrivateNic = "PrivateNic", +} + +/** + * NIC type. This should be either PublicNic or PrivateNic. \ + * {@link KnownNicTypeInRequest} can be used interchangeably with NicTypeInRequest, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PublicNic**: PublicNic \ + * **PrivateNic**: PrivateNic + */ +export type NicTypeInRequest = string; + +/** Represents a single NIC configuration properties. */ +export interface VirtualApplianceNetworkInterfaceConfigurationProperties { + ipConfigurations?: VirtualApplianceIPConfiguration[]; +} + +export function virtualApplianceNetworkInterfaceConfigurationPropertiesSerializer( + item: VirtualApplianceNetworkInterfaceConfigurationProperties, +): any { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : virtualApplianceIPConfigurationArraySerializer(item["ipConfigurations"]), + }; +} + +export function virtualApplianceNetworkInterfaceConfigurationPropertiesDeserializer( + item: any, +): VirtualApplianceNetworkInterfaceConfigurationProperties { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : virtualApplianceIPConfigurationArrayDeserializer(item["ipConfigurations"]), + }; +} + +export function virtualApplianceIPConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualApplianceIPConfigurationSerializer(item); + }); +} + +export function virtualApplianceIPConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualApplianceIPConfigurationDeserializer(item); + }); +} + +/** Represents a single IP configuration. */ +export interface VirtualApplianceIPConfiguration { + /** For hub NVAs, primary IP configs must be named 'privatenicipconfig' and 'publicnicipconfig', with non-primary configs using these prefixes; no naming restrictions apply for NVAs in VNets. Maximum 80 character are allowed. */ + name?: string; + /** Represents a single IP configuration properties. */ + properties?: VirtualApplianceIPConfigurationProperties; +} + +export function virtualApplianceIPConfigurationSerializer( + item: VirtualApplianceIPConfiguration, +): any { + return { + name: item["name"], + properties: !item["properties"] + ? item["properties"] + : virtualApplianceIPConfigurationPropertiesSerializer(item["properties"]), + }; +} + +export function virtualApplianceIPConfigurationDeserializer( + item: any, +): VirtualApplianceIPConfiguration { + return { + name: item["name"], + properties: !item["properties"] + ? item["properties"] + : virtualApplianceIPConfigurationPropertiesDeserializer(item["properties"]), + }; +} + +/** Represents a single IP configuration properties. */ +export interface VirtualApplianceIPConfigurationProperties { + /** Whether or not this is primary IP configuration of the NIC. */ + primary?: boolean; +} + +export function virtualApplianceIPConfigurationPropertiesSerializer( + item: VirtualApplianceIPConfigurationProperties, +): any { + return { primary: item["primary"] }; +} + +export function virtualApplianceIPConfigurationPropertiesDeserializer( + item: any, +): VirtualApplianceIPConfigurationProperties { + return { + primary: item["primary"], + }; +} + +export function virtualApplianceAdditionalNicPropertiesArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualApplianceAdditionalNicPropertiesSerializer(item); + }); +} + +export function virtualApplianceAdditionalNicPropertiesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualApplianceAdditionalNicPropertiesDeserializer(item); + }); +} + +/** Network Virtual Appliance Additional NIC properties. */ +export interface VirtualApplianceAdditionalNicProperties { + /** Name of additional nic */ + name?: string; + /** Flag (true or false) for Intent for Public Ip on additional nic */ + hasPublicIp?: boolean; +} + +export function virtualApplianceAdditionalNicPropertiesSerializer( + item: VirtualApplianceAdditionalNicProperties, +): any { + return { name: item["name"], hasPublicIp: item["hasPublicIp"] }; +} + +export function virtualApplianceAdditionalNicPropertiesDeserializer( + item: any, +): VirtualApplianceAdditionalNicProperties { + return { + name: item["name"], + hasPublicIp: item["hasPublicIp"], + }; +} + +export function internetIngressPublicIpsPropertiesArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return internetIngressPublicIpsPropertiesSerializer(item); + }); +} + +export function internetIngressPublicIpsPropertiesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return internetIngressPublicIpsPropertiesDeserializer(item); + }); +} + +/** Resource Uri of Public Ip for Standard Load Balancer Frontend End. */ +export interface InternetIngressPublicIpsProperties { + /** Resource Uri of Public Ip */ + id?: string; +} + +export function internetIngressPublicIpsPropertiesSerializer( + item: InternetIngressPublicIpsProperties, +): any { + return { id: item["id"] }; +} + +export function internetIngressPublicIpsPropertiesDeserializer( + item: any, +): InternetIngressPublicIpsProperties { + return { + id: item["id"], + }; +} + +/** Properties of the delegation. */ +export interface DelegationProperties { + /** The service name to which the NVA is delegated. */ + serviceName?: string; + /** Provisioning states of a resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function delegationPropertiesSerializer(item: DelegationProperties): any { + return { serviceName: item["serviceName"] }; +} + +export function delegationPropertiesDeserializer(item: any): DelegationProperties { + return { + serviceName: item["serviceName"], + provisioningState: item["provisioningState"], + }; +} + +/** Properties of the partner managed resource. Only appliable for SaaS NVA. */ +export interface PartnerManagedResourceProperties { + /** The partner managed resource id. */ + readonly id?: string; + /** The partner managed ILB resource id */ + readonly internalLoadBalancerId?: string; + /** The partner managed SLB resource id */ + readonly standardLoadBalancerId?: string; +} + +export function partnerManagedResourcePropertiesSerializer( + _item: PartnerManagedResourceProperties, +): any { + return {}; +} + +export function partnerManagedResourcePropertiesDeserializer( + item: any, +): PartnerManagedResourceProperties { + return { + id: item["id"], + internalLoadBalancerId: item["internalLoadBalancerId"], + standardLoadBalancerId: item["standardLoadBalancerId"], + }; +} + +export function nvaInterfaceConfigurationsPropertiesArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return nvaInterfaceConfigurationsPropertiesSerializer(item); + }); +} + +export function nvaInterfaceConfigurationsPropertiesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return nvaInterfaceConfigurationsPropertiesDeserializer(item); + }); +} + +/** Specifies input parameters required NVA in VNet interface configuration. */ +export interface NvaInterfaceConfigurationsProperties { + /** A subnet resource id where the NIC will be deployed. Each subnet resource uri should be unique. */ + subnet?: NvaInVnetSubnetReferenceProperties; + /** Specifies the NIC types for the NVA interface configuration. Allowed values: PrivateNic, PublicNic, AdditionalPrivateNic, AdditionalPublicNic. Only the combination of PrivateNic and PublicNic is currently supported. */ + type?: NvaNicType[]; + /** Specifies the name of the interface. Maximum length is 70 characters. */ + name?: string; +} + +export function nvaInterfaceConfigurationsPropertiesSerializer( + item: NvaInterfaceConfigurationsProperties, +): any { + return { + subnet: !item["subnet"] + ? item["subnet"] + : nvaInVnetSubnetReferencePropertiesSerializer(item["subnet"]), + type: !item["type"] + ? item["type"] + : item["type"].map((p: any) => { + return p; + }), + name: item["name"], + }; +} + +export function nvaInterfaceConfigurationsPropertiesDeserializer( + item: any, +): NvaInterfaceConfigurationsProperties { + return { + subnet: !item["subnet"] + ? item["subnet"] + : nvaInVnetSubnetReferencePropertiesDeserializer(item["subnet"]), + type: !item["type"] + ? item["type"] + : item["type"].map((p: any) => { + return p; + }), + name: item["name"], + }; +} + +/** The resource URI of the subnets where the NVA NICS will be deployed */ +export interface NvaInVnetSubnetReferenceProperties { + /** Resource Uri of Subnet */ + id?: string; +} + +export function nvaInVnetSubnetReferencePropertiesSerializer( + item: NvaInVnetSubnetReferenceProperties, +): any { + return { id: item["id"] }; +} + +export function nvaInVnetSubnetReferencePropertiesDeserializer( + item: any, +): NvaInVnetSubnetReferenceProperties { + return { + id: item["id"], + }; +} + +/** Known values of {@link NvaNicType} that the service accepts. */ +export enum KnownNvaNicType { + /** The private NIC type */ + PrivateNic = "PrivateNic", + /** The public NIC type */ + PublicNic = "PublicNic", + /** An additional private NIC type */ + AdditionalPrivateNic = "AdditionalPrivateNic", + /** An additional public NIC type */ + AdditionalPublicNic = "AdditionalPublicNic", +} + +/** Type of NvaNicType */ +export type NvaNicType = string; + +export function networkVirtualApplianceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkVirtualApplianceSerializer(item); + }); +} + +export function networkVirtualApplianceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkVirtualApplianceDeserializer(item); + }); +} + +/** Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. */ +export interface NetworkVirtualApplianceInstanceIds { + /** The network virtual appliance instance ids. Omitting the network virtual appliance instance ids will result in the operation being performed on all virtual machines belonging to the network virtual appliance. */ + instanceIds?: string[]; +} + +export function networkVirtualApplianceInstanceIdsSerializer( + item: NetworkVirtualApplianceInstanceIds, +): any { + return { + instanceIds: !item["instanceIds"] + ? item["instanceIds"] + : item["instanceIds"].map((p: any) => { + return p; + }), + }; +} + +export function networkVirtualApplianceInstanceIdsDeserializer( + item: any, +): NetworkVirtualApplianceInstanceIds { + return { + instanceIds: !item["instanceIds"] + ? item["instanceIds"] + : item["instanceIds"].map((p: any) => { + return p; + }), + }; +} + +/** Specifies input parameters required to retrieve the boot diagnostic logs for an NVA instance */ +export interface NetworkVirtualApplianceBootDiagnosticParameters { + /** The network virtual appliance instance id for which boot diagnostic logs is being requested */ + instanceId?: number; + /** Specifies the sas-url to the storage blob into which serial console logs for the requested instance will be written */ + serialConsoleStorageSasUrl?: string; + /** Specifies the sas-url to the storage blob into which console screen shot for the requested instance will be written */ + consoleScreenshotStorageSasUrl?: string; +} + +export function networkVirtualApplianceBootDiagnosticParametersSerializer( + item: NetworkVirtualApplianceBootDiagnosticParameters, +): any { + return { + instanceId: item["instanceId"], + serialConsoleStorageSasUrl: item["serialConsoleStorageSasUrl"], + consoleScreenshotStorageSasUrl: item["consoleScreenshotStorageSasUrl"], + }; +} + +/** model interface NetworkVirtualApplianceInstanceId */ +export interface NetworkVirtualApplianceInstanceId { + /** The network virtual appliance instance id for which boot diagnostic logs is being requested */ + instanceId?: number; +} + +export function networkVirtualApplianceInstanceIdDeserializer( + item: any, +): NetworkVirtualApplianceInstanceId { + return { + instanceId: item["instanceId"], + }; +} + +/** Virtual Appliance Site resource. */ +export interface VirtualApplianceSite extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Address Prefix. */ + addressPrefix?: string; + /** Office 365 Policy. */ + o365Policy?: Office365PolicyProperties; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualApplianceSiteSerializer(item: VirtualApplianceSite): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["addressPrefix", "o365Policy"]) + ? undefined + : _virtualApplianceSitePropertiesSerializer(item), + }; +} + +export function virtualApplianceSiteDeserializer(item: any): VirtualApplianceSite { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _virtualApplianceSitePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the rule group. */ +export interface VirtualApplianceSiteProperties { + /** Address Prefix. */ + addressPrefix?: string; + /** Office 365 Policy. */ + o365Policy?: Office365PolicyProperties; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualApplianceSitePropertiesSerializer( + item: VirtualApplianceSiteProperties, +): any { + return { + addressPrefix: item["addressPrefix"], + o365Policy: !item["o365Policy"] + ? item["o365Policy"] + : office365PolicyPropertiesSerializer(item["o365Policy"]), + }; +} + +export function virtualApplianceSitePropertiesDeserializer( + item: any, +): VirtualApplianceSiteProperties { + return { + addressPrefix: item["addressPrefix"], + o365Policy: !item["o365Policy"] + ? item["o365Policy"] + : office365PolicyPropertiesDeserializer(item["o365Policy"]), + provisioningState: item["provisioningState"], + }; +} + +/** Network Virtual Appliance Sku Properties. */ +export interface Office365PolicyProperties { + /** Office 365 breakout categories. */ + breakOutCategories?: BreakOutCategoryPolicies; +} + +export function office365PolicyPropertiesSerializer(item: Office365PolicyProperties): any { + return { + breakOutCategories: !item["breakOutCategories"] + ? item["breakOutCategories"] + : breakOutCategoryPoliciesSerializer(item["breakOutCategories"]), + }; +} + +export function office365PolicyPropertiesDeserializer(item: any): Office365PolicyProperties { + return { + breakOutCategories: !item["breakOutCategories"] + ? item["breakOutCategories"] + : breakOutCategoryPoliciesDeserializer(item["breakOutCategories"]), + }; +} + +/** Network Virtual Appliance Sku Properties. */ +export interface BreakOutCategoryPolicies { + /** Flag to control breakout of o365 allow category. */ + allow?: boolean; + /** Flag to control breakout of o365 optimize category. */ + optimize?: boolean; + /** Flag to control breakout of o365 default category. */ + default?: boolean; +} + +export function breakOutCategoryPoliciesSerializer(item: BreakOutCategoryPolicies): any { + return { allow: item["allow"], optimize: item["optimize"], default: item["default"] }; +} + +export function breakOutCategoryPoliciesDeserializer(item: any): BreakOutCategoryPolicies { + return { + allow: item["allow"], + optimize: item["optimize"], + default: item["default"], + }; +} + +/** Paged collection of VirtualApplianceSite items */ +export interface _NetworkVirtualApplianceSiteListResult { + /** The VirtualApplianceSite items on this page */ + value: VirtualApplianceSite[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkVirtualApplianceSiteListResultDeserializer( + item: any, +): _NetworkVirtualApplianceSiteListResult { + return { + value: virtualApplianceSiteArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function virtualApplianceSiteArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualApplianceSiteSerializer(item); + }); +} + +export function virtualApplianceSiteArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualApplianceSiteDeserializer(item); + }); +} + +/** The error object. */ +export interface ErrorResponse { + /** The error details object. */ + error?: ErrorDetails; +} + +export function errorResponseDeserializer(item: any): ErrorResponse { + return { + error: !item["error"] ? item["error"] : errorDetailsDeserializer(item["error"]), + }; +} + +/** Response for ListNetworkWatchers API service call. */ +export interface _NetworkWatcherListResult { + /** List of network watcher resources. */ + value?: NetworkWatcher[]; + /** URL to get the next set of results. */ + nextLink?: string; +} + +export function _networkWatcherListResultDeserializer(item: any): _NetworkWatcherListResult { + return { + value: !item["value"] ? item["value"] : networkWatcherArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Parameters that define the representation of topology. */ +export interface TopologyParameters { + /** The name of the target resource group to perform topology on. */ + targetResourceGroupName?: string; + /** The reference to the Virtual Network resource. */ + targetVirtualNetwork?: SubResource; + /** The reference to the Subnet resource. */ + targetSubnet?: SubResource; +} + +export function topologyParametersSerializer(item: TopologyParameters): any { + return { + targetResourceGroupName: item["targetResourceGroupName"], + targetVirtualNetwork: !item["targetVirtualNetwork"] + ? item["targetVirtualNetwork"] + : subResourceSerializer(item["targetVirtualNetwork"]), + targetSubnet: !item["targetSubnet"] + ? item["targetSubnet"] + : subResourceSerializer(item["targetSubnet"]), + }; +} + +/** Topology of the specified resource group. */ +export interface Topology { + /** GUID representing the operation id. */ + readonly id?: string; + /** The datetime when the topology was initially created for the resource group. */ + readonly createdDateTime?: Date; + /** The datetime when the topology was last modified. */ + readonly lastModified?: Date; + /** A list of topology resources. */ + resources?: TopologyResource[]; +} + +export function topologyDeserializer(item: any): Topology { + return { + id: item["id"], + createdDateTime: !item["createdDateTime"] + ? item["createdDateTime"] + : new Date(item["createdDateTime"]), + lastModified: !item["lastModified"] ? item["lastModified"] : new Date(item["lastModified"]), + resources: !item["resources"] + ? item["resources"] + : topologyResourceArrayDeserializer(item["resources"]), + }; +} + +export function topologyResourceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return topologyResourceDeserializer(item); + }); +} + +/** The network resource topology information for the given resource group. */ +export interface TopologyResource { + /** Name of the resource. */ + name?: string; + /** ID of the resource. */ + id?: string; + /** Resource location. */ + location?: string; + /** Holds the associations the resource has with other resources in the resource group. */ + associations?: TopologyAssociation[]; +} + +export function topologyResourceDeserializer(item: any): TopologyResource { + return { + name: item["name"], + id: item["id"], + location: item["location"], + associations: !item["associations"] + ? item["associations"] + : topologyAssociationArrayDeserializer(item["associations"]), + }; +} + +export function topologyAssociationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return topologyAssociationDeserializer(item); + }); +} + +/** Resources that have an association with the parent resource. */ +export interface TopologyAssociation { + /** The name of the resource that is associated with the parent resource. */ + name?: string; + /** The ID of the resource that is associated with the parent resource. */ + resourceId?: string; + /** The association type of the child resource to the parent resource. */ + associationType?: AssociationType; +} + +export function topologyAssociationDeserializer(item: any): TopologyAssociation { + return { + name: item["name"], + resourceId: item["resourceId"], + associationType: item["associationType"], + }; +} + +/** The association type of the child resource to the parent resource. */ +export enum KnownAssociationType { + /** Associated */ + Associated = "Associated", + /** Contains */ + Contains = "Contains", +} + +/** + * The association type of the child resource to the parent resource. \ + * {@link KnownAssociationType} can be used interchangeably with AssociationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Associated**: Associated \ + * **Contains**: Contains + */ +export type AssociationType = string; + +/** Parameters that define the IP flow to be verified. */ +export interface VerificationIPFlowParameters { + /** The ID of the target resource to perform next-hop on. */ + targetResourceId: string; + /** The direction of the packet represented as a 5-tuple. */ + direction: Direction; + /** Protocol to be verified on. */ + protocol: IpFlowProtocol; + /** The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. */ + localPort: string; + /** The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. */ + remotePort: string; + /** The local IP address. Acceptable values are valid IPv4 addresses. */ + localIPAddress: string; + /** The remote IP address. Acceptable values are valid IPv4 addresses. */ + remoteIPAddress: string; + /** The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). */ + targetNicResourceId?: string; +} + +export function verificationIPFlowParametersSerializer(item: VerificationIPFlowParameters): any { + return { + targetResourceId: item["targetResourceId"], + direction: item["direction"], + protocol: item["protocol"], + localPort: item["localPort"], + remotePort: item["remotePort"], + localIPAddress: item["localIPAddress"], + remoteIPAddress: item["remoteIPAddress"], + targetNicResourceId: item["targetNicResourceId"], + }; +} + +/** The direction of the traffic. */ +export enum KnownDirection { + /** Inbound */ + Inbound = "Inbound", + /** Outbound */ + Outbound = "Outbound", +} + +/** + * The direction of the traffic. \ + * {@link KnownDirection} can be used interchangeably with Direction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inbound**: Inbound \ + * **Outbound**: Outbound + */ +export type Direction = string; + +/** Protocol to be verified on. */ +export enum KnownIpFlowProtocol { + /** TCP */ + TCP = "TCP", + /** UDP */ + UDP = "UDP", +} + +/** + * Protocol to be verified on. \ + * {@link KnownIpFlowProtocol} can be used interchangeably with IpFlowProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TCP**: TCP \ + * **UDP**: UDP + */ +export type IpFlowProtocol = string; + +/** Results of IP flow verification on the target resource. */ +export interface VerificationIPFlowResult { + /** Indicates whether the traffic is allowed or denied. */ + access?: Access; + /** Name of the rule. If input is not matched against any security rule, it is not displayed. */ + ruleName?: string; +} + +export function verificationIPFlowResultDeserializer(item: any): VerificationIPFlowResult { + return { + access: item["access"], + ruleName: item["ruleName"], + }; +} + +/** Access to be allowed or denied. */ +export enum KnownAccess { + /** Allow */ + Allow = "Allow", + /** Deny */ + Deny = "Deny", +} + +/** + * Access to be allowed or denied. \ + * {@link KnownAccess} can be used interchangeably with Access, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Allow**: Allow \ + * **Deny**: Deny + */ +export type Access = string; + +/** Parameters that define the source and destination endpoint. */ +export interface NextHopParameters { + /** The resource identifier of the target resource against which the action is to be performed. */ + targetResourceId: string; + /** The source IP address. */ + sourceIPAddress: string; + /** The destination IP address. */ + destinationIPAddress: string; + /** The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). */ + targetNicResourceId?: string; +} + +export function nextHopParametersSerializer(item: NextHopParameters): any { + return { + targetResourceId: item["targetResourceId"], + sourceIPAddress: item["sourceIPAddress"], + destinationIPAddress: item["destinationIPAddress"], + targetNicResourceId: item["targetNicResourceId"], + }; +} + +/** The information about next hop from the specified VM. */ +export interface NextHopResult { + /** Next hop type. */ + nextHopType?: NextHopType; + /** Next hop IP Address. */ + nextHopIpAddress?: string; + /** The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. */ + routeTableId?: string; +} + +export function nextHopResultDeserializer(item: any): NextHopResult { + return { + nextHopType: item["nextHopType"], + nextHopIpAddress: item["nextHopIpAddress"], + routeTableId: item["routeTableId"], + }; +} + +/** Next hop type. */ +export enum KnownNextHopType { + /** Internet */ + Internet = "Internet", + /** VirtualAppliance */ + VirtualAppliance = "VirtualAppliance", + /** VirtualNetworkGateway */ + VirtualNetworkGateway = "VirtualNetworkGateway", + /** VnetLocal */ + VnetLocal = "VnetLocal", + /** HyperNetGateway */ + HyperNetGateway = "HyperNetGateway", + /** Routes traffic to virtual appliances using Equal-Cost Multi-Path (ECMP) routing with multiple next hop IP addresses. */ + VirtualApplianceEcmp = "VirtualApplianceEcmp", + /** No next hop type. */ + None = "None", +} + +/** + * Next hop type. \ + * {@link KnownNextHopType} can be used interchangeably with NextHopType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internet**: Internet \ + * **VirtualAppliance**: VirtualAppliance \ + * **VirtualNetworkGateway**: VirtualNetworkGateway \ + * **VnetLocal**: VnetLocal \ + * **HyperNetGateway**: HyperNetGateway \ + * **VirtualApplianceEcmp**: Routes traffic to virtual appliances using Equal-Cost Multi-Path (ECMP) routing with multiple next hop IP addresses. \ + * **None**: No next hop type. + */ +export type NextHopType = string; + +/** Parameters that define the VM to check security groups for. */ +export interface SecurityGroupViewParameters { + /** ID of the target VM. */ + targetResourceId: string; +} + +export function securityGroupViewParametersSerializer(item: SecurityGroupViewParameters): any { + return { targetResourceId: item["targetResourceId"] }; +} + +/** The information about security rules applied to the specified VM. */ +export interface SecurityGroupViewResult { + /** List of network interfaces on the specified VM. */ + networkInterfaces?: SecurityGroupNetworkInterface[]; +} + +export function securityGroupViewResultDeserializer(item: any): SecurityGroupViewResult { + return { + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : securityGroupNetworkInterfaceArrayDeserializer(item["networkInterfaces"]), + }; +} + +export function securityGroupNetworkInterfaceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return securityGroupNetworkInterfaceDeserializer(item); + }); +} + +/** Network interface and all its associated security rules. */ +export interface SecurityGroupNetworkInterface { + /** ID of the network interface. */ + id?: string; + /** All security rules associated with the network interface. */ + securityRuleAssociations?: SecurityRuleAssociations; +} + +export function securityGroupNetworkInterfaceDeserializer( + item: any, +): SecurityGroupNetworkInterface { + return { + id: item["id"], + securityRuleAssociations: !item["securityRuleAssociations"] + ? item["securityRuleAssociations"] + : securityRuleAssociationsDeserializer(item["securityRuleAssociations"]), + }; +} + +/** All security rules associated with the network interface. */ +export interface SecurityRuleAssociations { + /** Network interface and it's custom security rules. */ + networkInterfaceAssociation?: NetworkInterfaceAssociation; + /** Subnet and it's custom security rules. */ + subnetAssociation?: SubnetAssociation; + /** Collection of default security rules of the network security group. */ + defaultSecurityRules?: SecurityRule[]; + /** Collection of effective security rules. */ + effectiveSecurityRules?: EffectiveNetworkSecurityRule[]; +} + +export function securityRuleAssociationsDeserializer(item: any): SecurityRuleAssociations { + return { + networkInterfaceAssociation: !item["networkInterfaceAssociation"] + ? item["networkInterfaceAssociation"] + : networkInterfaceAssociationDeserializer(item["networkInterfaceAssociation"]), + subnetAssociation: !item["subnetAssociation"] + ? item["subnetAssociation"] + : subnetAssociationDeserializer(item["subnetAssociation"]), + defaultSecurityRules: !item["defaultSecurityRules"] + ? item["defaultSecurityRules"] + : securityRuleArrayDeserializer(item["defaultSecurityRules"]), + effectiveSecurityRules: !item["effectiveSecurityRules"] + ? item["effectiveSecurityRules"] + : effectiveNetworkSecurityRuleArrayDeserializer(item["effectiveSecurityRules"]), + }; +} + +/** Network interface and its custom security rules. */ +export interface NetworkInterfaceAssociation { + /** Network interface ID. */ + readonly id?: string; + /** Collection of custom security rules. */ + securityRules?: SecurityRule[]; +} + +export function networkInterfaceAssociationDeserializer(item: any): NetworkInterfaceAssociation { + return { + id: item["id"], + securityRules: !item["securityRules"] + ? item["securityRules"] + : securityRuleArrayDeserializer(item["securityRules"]), + }; +} + +/** Subnet and it's custom security rules. */ +export interface SubnetAssociation { + /** Subnet ID. */ + readonly id?: string; + /** Collection of custom security rules. */ + securityRules?: SecurityRule[]; +} + +export function subnetAssociationDeserializer(item: any): SubnetAssociation { + return { + id: item["id"], + securityRules: !item["securityRules"] + ? item["securityRules"] + : securityRuleArrayDeserializer(item["securityRules"]), + }; +} + +/** Parameters that define the resource to troubleshoot. */ +export interface TroubleshootingParameters { + /** The target resource to troubleshoot. */ + targetResourceId: string; + /** The ID for the storage account to save the troubleshoot result. */ + storageId: string; + /** The path to the blob to save the troubleshoot result in. */ + storagePath: string; +} + +export function troubleshootingParametersSerializer(item: TroubleshootingParameters): any { + return { + targetResourceId: item["targetResourceId"], + properties: _troubleshootingParametersPropertiesSerializer(item), + }; +} + +/** Storage location provided for troubleshoot. */ +export interface TroubleshootingProperties { + /** The ID for the storage account to save the troubleshoot result. */ + storageId: string; + /** The path to the blob to save the troubleshoot result in. */ + storagePath: string; +} + +export function troubleshootingPropertiesSerializer(item: TroubleshootingProperties): any { + return { storageId: item["storageId"], storagePath: item["storagePath"] }; +} + +/** Troubleshooting information gained from specified resource. */ +export interface TroubleshootingResult { + /** The start time of the troubleshooting. */ + startTime?: Date; + /** The end time of the troubleshooting. */ + endTime?: Date; + /** The result code of the troubleshooting. */ + code?: string; + /** Information from troubleshooting. */ + results?: TroubleshootingDetails[]; +} + +export function troubleshootingResultDeserializer(item: any): TroubleshootingResult { + return { + startTime: !item["startTime"] ? item["startTime"] : new Date(item["startTime"]), + endTime: !item["endTime"] ? item["endTime"] : new Date(item["endTime"]), + code: item["code"], + results: !item["results"] + ? item["results"] + : troubleshootingDetailsArrayDeserializer(item["results"]), + }; +} + +export function troubleshootingDetailsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return troubleshootingDetailsDeserializer(item); + }); +} + +/** Information gained from troubleshooting of specified resource. */ +export interface TroubleshootingDetails { + /** The id of the get troubleshoot operation. */ + id?: string; + /** Reason type of failure. */ + reasonType?: string; + /** A summary of troubleshooting. */ + summary?: string; + /** Details on troubleshooting results. */ + detail?: string; + /** List of recommended actions. */ + recommendedActions?: TroubleshootingRecommendedActions[]; +} + +export function troubleshootingDetailsDeserializer(item: any): TroubleshootingDetails { + return { + id: item["id"], + reasonType: item["reasonType"], + summary: item["summary"], + detail: item["detail"], + recommendedActions: !item["recommendedActions"] + ? item["recommendedActions"] + : troubleshootingRecommendedActionsArrayDeserializer(item["recommendedActions"]), + }; +} + +export function troubleshootingRecommendedActionsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return troubleshootingRecommendedActionsDeserializer(item); + }); +} + +/** Recommended actions based on discovered issues. */ +export interface TroubleshootingRecommendedActions { + /** ID of the recommended action. */ + actionId?: string; + /** Description of recommended actions. */ + actionText?: string; + /** The uri linking to a documentation for the recommended troubleshooting actions. */ + actionUri?: string; + /** The information from the URI for the recommended troubleshooting actions. */ + actionUriText?: string; +} + +export function troubleshootingRecommendedActionsDeserializer( + item: any, +): TroubleshootingRecommendedActions { + return { + actionId: item["actionId"], + actionText: item["actionText"], + actionUri: item["actionUri"], + actionUriText: item["actionUriText"], + }; +} + +/** Parameters that define the resource to query the troubleshooting result. */ +export interface QueryTroubleshootingParameters { + /** The target resource ID to query the troubleshooting result. */ + targetResourceId: string; +} + +export function queryTroubleshootingParametersSerializer( + item: QueryTroubleshootingParameters, +): any { + return { targetResourceId: item["targetResourceId"] }; +} + +/** Information on the configuration of flow log and traffic analytics (optional) . */ +export interface FlowLogInformation { + /** The ID of the resource to configure for flow log and traffic analytics (optional) . */ + targetResourceId: string; + /** Parameters that define the configuration of traffic analytics. */ + flowAnalyticsConfiguration?: TrafficAnalyticsProperties; + /** FlowLog resource Managed Identity */ + identity?: ManagedServiceIdentity; + /** ID of the storage account which is used to store the flow log. */ + storageId: string; + /** Optional field to filter network traffic logs based on SrcIP, SrcPort, DstIP, DstPort, Protocol, Encryption, Direction and Action. If not specified, all network traffic will be logged. */ + enabledFilteringCriteria?: string; + /** Optional field to filter network traffic logs based on flow states. Value of this field could be any comma separated combination string of letters B,C,E or D. B represents Begin, when a flow is created. C represents Continue for an ongoing flow generated at every five-minute interval. E represents End, when a flow is terminated. D represents Deny, when a flow is denied. If not specified, all network traffic will be logged. */ + recordTypes?: string; + /** Flag to enable/disable flow logging. */ + enabled: boolean; + /** Parameters that define the retention policy for flow log. */ + retentionPolicy?: RetentionPolicyParameters; + /** Parameters that define the flow log format. */ + format?: FlowLogFormatParameters; +} + +export function flowLogInformationSerializer(item: FlowLogInformation): any { + return { + targetResourceId: item["targetResourceId"], + properties: _flowLogInformationPropertiesSerializer(item), + flowAnalyticsConfiguration: !item["flowAnalyticsConfiguration"] + ? item["flowAnalyticsConfiguration"] + : trafficAnalyticsPropertiesSerializer(item["flowAnalyticsConfiguration"]), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + }; +} + +export function flowLogInformationDeserializer(item: any): FlowLogInformation { + return { + targetResourceId: item["targetResourceId"], + ..._flowLogInformationPropertiesDeserializer(item["properties"]), + flowAnalyticsConfiguration: !item["flowAnalyticsConfiguration"] + ? item["flowAnalyticsConfiguration"] + : trafficAnalyticsPropertiesDeserializer(item["flowAnalyticsConfiguration"]), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentityDeserializer(item["identity"]), + }; +} + +/** Parameters that define the configuration of flow log. */ +export interface FlowLogProperties { + /** ID of the storage account which is used to store the flow log. */ + storageId: string; + /** Optional field to filter network traffic logs based on SrcIP, SrcPort, DstIP, DstPort, Protocol, Encryption, Direction and Action. If not specified, all network traffic will be logged. */ + enabledFilteringCriteria?: string; + /** Optional field to filter network traffic logs based on flow states. Value of this field could be any comma separated combination string of letters B,C,E or D. B represents Begin, when a flow is created. C represents Continue for an ongoing flow generated at every five-minute interval. E represents End, when a flow is terminated. D represents Deny, when a flow is denied. If not specified, all network traffic will be logged. */ + recordTypes?: string; + /** Flag to enable/disable flow logging. */ + enabled: boolean; + /** Parameters that define the retention policy for flow log. */ + retentionPolicy?: RetentionPolicyParameters; + /** Parameters that define the flow log format. */ + format?: FlowLogFormatParameters; +} + +export function flowLogPropertiesSerializer(item: FlowLogProperties): any { + return { + storageId: item["storageId"], + enabledFilteringCriteria: item["enabledFilteringCriteria"], + recordTypes: item["recordTypes"], + enabled: item["enabled"], + retentionPolicy: !item["retentionPolicy"] + ? item["retentionPolicy"] + : retentionPolicyParametersSerializer(item["retentionPolicy"]), + format: !item["format"] ? item["format"] : flowLogFormatParametersSerializer(item["format"]), + }; +} + +export function flowLogPropertiesDeserializer(item: any): FlowLogProperties { + return { + storageId: item["storageId"], + enabledFilteringCriteria: item["enabledFilteringCriteria"], + recordTypes: item["recordTypes"], + enabled: item["enabled"], + retentionPolicy: !item["retentionPolicy"] + ? item["retentionPolicy"] + : retentionPolicyParametersDeserializer(item["retentionPolicy"]), + format: !item["format"] ? item["format"] : flowLogFormatParametersDeserializer(item["format"]), + }; +} + +/** Parameters that define a resource to query flow log and traffic analytics (optional) status. */ +export interface FlowLogStatusParameters { + /** The target resource where getting the flow log and traffic analytics (optional) status. */ + targetResourceId: string; +} + +export function flowLogStatusParametersSerializer(item: FlowLogStatusParameters): any { + return { targetResourceId: item["targetResourceId"] }; +} + +/** Parameters that determine how the connectivity check will be performed. */ +export interface ConnectivityParameters { + /** The source of the connection. */ + source: ConnectivitySource; + /** The destination of connection. */ + destination: ConnectivityDestination; + /** Network protocol. */ + protocol?: Protocol; + /** Configuration of the protocol. */ + protocolConfiguration?: ProtocolConfiguration; + /** Preferred IP version of the connection. */ + preferredIPVersion?: IPVersion; +} + +export function connectivityParametersSerializer(item: ConnectivityParameters): any { + return { + source: connectivitySourceSerializer(item["source"]), + destination: connectivityDestinationSerializer(item["destination"]), + protocol: item["protocol"], + protocolConfiguration: !item["protocolConfiguration"] + ? item["protocolConfiguration"] + : protocolConfigurationSerializer(item["protocolConfiguration"]), + preferredIPVersion: item["preferredIPVersion"], + }; +} + +/** Parameters that define the source of the connection. */ +export interface ConnectivitySource { + /** The ID of the resource from which a connectivity check will be initiated. */ + resourceId: string; + /** The source port from which a connectivity check will be performed. */ + port?: number; +} + +export function connectivitySourceSerializer(item: ConnectivitySource): any { + return { resourceId: item["resourceId"], port: item["port"] }; +} + +/** Parameters that define destination of connection. */ +export interface ConnectivityDestination { + /** The ID of the resource to which a connection attempt will be made. */ + resourceId?: string; + /** The IP address or URI the resource to which a connection attempt will be made. */ + address?: string; + /** Port on which check connectivity will be performed. */ + port?: number; +} + +export function connectivityDestinationSerializer(item: ConnectivityDestination): any { + return { resourceId: item["resourceId"], address: item["address"], port: item["port"] }; +} + +/** Network protocol. */ +export enum KnownProtocol { + /** Tcp */ + Tcp = "Tcp", + /** Http */ + Http = "Http", + /** Https */ + Https = "Https", + /** Icmp */ + Icmp = "Icmp", +} + +/** + * Network protocol. \ + * {@link KnownProtocol} can be used interchangeably with Protocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Tcp**: Tcp \ + * **Http**: Http \ + * **Https**: Https \ + * **Icmp**: Icmp + */ +export type Protocol = string; + +/** Configuration of the protocol. */ +export interface ProtocolConfiguration { + /** HTTP configuration of the connectivity check. */ + httpConfiguration?: HttpConfiguration; +} + +export function protocolConfigurationSerializer(item: ProtocolConfiguration): any { + return { + HTTPConfiguration: !item["httpConfiguration"] + ? item["httpConfiguration"] + : httpConfigurationSerializer(item["httpConfiguration"]), + }; +} + +/** HTTP configuration of the connectivity check. */ +export interface HttpConfiguration { + /** HTTP method. */ + method?: HttpMethod; + /** List of HTTP headers. */ + headers?: HttpHeader[]; + /** Valid status codes. */ + validStatusCodes?: number[]; +} + +export function httpConfigurationSerializer(item: HttpConfiguration): any { + return { + method: item["method"], + headers: !item["headers"] ? item["headers"] : httpHeaderArraySerializer(item["headers"]), + validStatusCodes: !item["validStatusCodes"] + ? item["validStatusCodes"] + : item["validStatusCodes"].map((p: any) => { + return p; + }), + }; +} + +/** HTTP method. */ +export enum KnownHttpMethod { + /** Get */ + Get = "Get", +} + +/** + * HTTP method. \ + * {@link KnownHttpMethod} can be used interchangeably with HttpMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Get**: Get + */ +export type HttpMethod = string; + +export function httpHeaderArraySerializer(result: Array): any[] { + return result.map((item) => { + return httpHeaderSerializer(item); + }); +} + +export function httpHeaderArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return httpHeaderDeserializer(item); + }); +} + +/** The HTTP header. */ +export interface HttpHeader { + /** The name in HTTP header. */ + name?: string; + /** The value in HTTP header. */ + value?: string; +} + +export function httpHeaderSerializer(item: HttpHeader): any { + return { name: item["name"], value: item["value"] }; +} + +export function httpHeaderDeserializer(item: any): HttpHeader { + return { + name: item["name"], + value: item["value"], + }; +} + +/** Information on the connectivity status. */ +export interface ConnectivityInformation { + /** List of hops between the source and the destination. */ + readonly hops?: ConnectivityHop[]; + /** The connection status. */ + readonly connectionStatus?: ConnectionStatus; + /** Average latency in milliseconds. */ + readonly avgLatencyInMs?: number; + /** Minimum latency in milliseconds. */ + readonly minLatencyInMs?: number; + /** Maximum latency in milliseconds. */ + readonly maxLatencyInMs?: number; + /** Total number of probes sent. */ + readonly probesSent?: number; + /** Number of failed probes. */ + readonly probesFailed?: number; +} + +export function connectivityInformationDeserializer(item: any): ConnectivityInformation { + return { + hops: !item["hops"] ? item["hops"] : connectivityHopArrayDeserializer(item["hops"]), + connectionStatus: item["connectionStatus"], + avgLatencyInMs: item["avgLatencyInMs"], + minLatencyInMs: item["minLatencyInMs"], + maxLatencyInMs: item["maxLatencyInMs"], + probesSent: item["probesSent"], + probesFailed: item["probesFailed"], + }; +} + +export function connectivityHopArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return connectivityHopDeserializer(item); + }); +} + +/** Information about a hop between the source and the destination. */ +export interface ConnectivityHop { + /** The type of the hop. */ + readonly type?: string; + /** The ID of the hop. */ + readonly id?: string; + /** The IP address of the hop. */ + readonly address?: string; + /** The ID of the resource corresponding to this hop. */ + readonly resourceId?: string; + /** List of next hop identifiers. */ + readonly nextHopIds?: string[]; + /** List of previous hop identifiers. */ + readonly previousHopIds?: string[]; + /** List of hop links. */ + readonly links?: HopLink[]; + /** List of previous hop links. */ + readonly previousLinks?: HopLink[]; + /** List of issues. */ + readonly issues?: ConnectivityIssue[]; +} + +export function connectivityHopDeserializer(item: any): ConnectivityHop { + return { + type: item["type"], + id: item["id"], + address: item["address"], + resourceId: item["resourceId"], + nextHopIds: !item["nextHopIds"] + ? item["nextHopIds"] + : item["nextHopIds"].map((p: any) => { + return p; + }), + previousHopIds: !item["previousHopIds"] + ? item["previousHopIds"] + : item["previousHopIds"].map((p: any) => { + return p; + }), + links: !item["links"] ? item["links"] : hopLinkArrayDeserializer(item["links"]), + previousLinks: !item["previousLinks"] + ? item["previousLinks"] + : hopLinkArrayDeserializer(item["previousLinks"]), + issues: !item["issues"] ? item["issues"] : connectivityIssueArrayDeserializer(item["issues"]), + }; +} + +export function hopLinkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return hopLinkDeserializer(item); + }); +} + +/** Hop link. */ +export interface HopLink { + /** The ID of the next hop. */ + readonly nextHopId?: string; + /** Link type. */ + readonly linkType?: string; + /** List of issues. */ + readonly issues?: ConnectivityIssue[]; + /** Provides additional context on links. */ + readonly context?: Record; + /** Resource ID. */ + readonly resourceId?: string; + /** Minimum roundtrip time in milliseconds. */ + readonly roundTripTimeMin?: number; + /** Average roundtrip time in milliseconds. */ + readonly roundTripTimeAvg?: number; + /** Maximum roundtrip time in milliseconds. */ + readonly roundTripTimeMax?: number; +} + +export function hopLinkDeserializer(item: any): HopLink { + return { + nextHopId: item["nextHopId"], + linkType: item["linkType"], + ...(!item["properties"] + ? item["properties"] + : _hopLinkPropertiesDeserializer(item["properties"])), + issues: !item["issues"] ? item["issues"] : connectivityIssueArrayDeserializer(item["issues"]), + context: !item["context"] + ? item["context"] + : Object.fromEntries(Object.entries(item["context"]).map(([k, p]: [string, any]) => [k, p])), + resourceId: item["resourceId"], + }; +} + +/** Hop link properties. */ +export interface HopLinkProperties { + /** Minimum roundtrip time in milliseconds. */ + readonly roundTripTimeMin?: number; + /** Average roundtrip time in milliseconds. */ + readonly roundTripTimeAvg?: number; + /** Maximum roundtrip time in milliseconds. */ + readonly roundTripTimeMax?: number; +} + +export function hopLinkPropertiesDeserializer(item: any): HopLinkProperties { + return { + roundTripTimeMin: item["roundTripTimeMin"], + roundTripTimeAvg: item["roundTripTimeAvg"], + roundTripTimeMax: item["roundTripTimeMax"], + }; +} + +export function connectivityIssueArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return connectivityIssueDeserializer(item); + }); +} + +/** Information about an issue encountered in the process of checking for connectivity. */ +export interface ConnectivityIssue { + /** The origin of the issue. */ + readonly origin?: Origin; + /** The severity of the issue. */ + readonly severity?: Severity; + /** The type of issue. */ + readonly type?: IssueType; + /** Provides additional context on the issue. */ + readonly context?: Record[]; +} + +export function connectivityIssueDeserializer(item: any): ConnectivityIssue { + return { + origin: item["origin"], + severity: item["severity"], + type: item["type"], + context: !item["context"] + ? item["context"] + : item["context"].map((p: any) => { + return Object.fromEntries(Object.entries(p).map(([k1, p1]: [string, any]) => [k1, p1])); + }), + }; +} + +/** The origin of the issue. */ +export enum KnownOrigin { + /** Local */ + Local = "Local", + /** Inbound */ + Inbound = "Inbound", + /** Outbound */ + Outbound = "Outbound", +} + +/** + * The origin of the issue. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Local**: Local \ + * **Inbound**: Inbound \ + * **Outbound**: Outbound + */ +export type Origin = string; + +/** The severity of the issue. */ +export enum KnownSeverity { + /** Error */ + Error = "Error", + /** Warning */ + Warning = "Warning", +} + +/** + * The severity of the issue. \ + * {@link KnownSeverity} can be used interchangeably with Severity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Error**: Error \ + * **Warning**: Warning + */ +export type Severity = string; + +/** The type of issue. */ +export enum KnownIssueType { + /** Unknown */ + Unknown = "Unknown", + /** AgentStopped */ + AgentStopped = "AgentStopped", + /** GuestFirewall */ + GuestFirewall = "GuestFirewall", + /** DnsResolution */ + DnsResolution = "DnsResolution", + /** SocketBind */ + SocketBind = "SocketBind", + /** NetworkSecurityRule */ + NetworkSecurityRule = "NetworkSecurityRule", + /** UserDefinedRoute */ + UserDefinedRoute = "UserDefinedRoute", + /** PortThrottled */ + PortThrottled = "PortThrottled", + /** Platform */ + Platform = "Platform", +} + +/** + * The type of issue. \ + * {@link KnownIssueType} can be used interchangeably with IssueType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **AgentStopped**: AgentStopped \ + * **GuestFirewall**: GuestFirewall \ + * **DnsResolution**: DnsResolution \ + * **SocketBind**: SocketBind \ + * **NetworkSecurityRule**: NetworkSecurityRule \ + * **UserDefinedRoute**: UserDefinedRoute \ + * **PortThrottled**: PortThrottled \ + * **Platform**: Platform + */ +export type IssueType = string; + +/** The connection status. */ +export enum KnownConnectionStatus { + /** Unknown */ + Unknown = "Unknown", + /** Connected */ + Connected = "Connected", + /** Disconnected */ + Disconnected = "Disconnected", + /** Degraded */ + Degraded = "Degraded", +} + +/** + * The connection status. \ + * {@link KnownConnectionStatus} can be used interchangeably with ConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **Connected**: Connected \ + * **Disconnected**: Disconnected \ + * **Degraded**: Degraded + */ +export type ConnectionStatus = string; + +/** Geographic and time constraints for Azure reachability report. */ +export interface AzureReachabilityReportParameters { + /** Parameters that define a geographic location. */ + providerLocation: AzureReachabilityReportLocation; + /** List of Internet service providers. */ + providers?: string[]; + /** Optional Azure regions to scope the query to. */ + azureLocations?: string[]; + /** The start time for the Azure reachability report. */ + startTime: Date; + /** The end time for the Azure reachability report. */ + endTime: Date; +} + +export function azureReachabilityReportParametersSerializer( + item: AzureReachabilityReportParameters, +): any { + return { + providerLocation: azureReachabilityReportLocationSerializer(item["providerLocation"]), + providers: !item["providers"] + ? item["providers"] + : item["providers"].map((p: any) => { + return p; + }), + azureLocations: !item["azureLocations"] + ? item["azureLocations"] + : item["azureLocations"].map((p: any) => { + return p; + }), + startTime: item["startTime"].toISOString(), + endTime: item["endTime"].toISOString(), + }; +} + +/** Parameters that define a geographic location. */ +export interface AzureReachabilityReportLocation { + /** The name of the country. */ + country: string; + /** The name of the state. */ + state?: string; + /** The name of the city or town. */ + city?: string; +} + +export function azureReachabilityReportLocationSerializer( + item: AzureReachabilityReportLocation, +): any { + return { country: item["country"], state: item["state"], city: item["city"] }; +} + +export function azureReachabilityReportLocationDeserializer( + item: any, +): AzureReachabilityReportLocation { + return { + country: item["country"], + state: item["state"], + city: item["city"], + }; +} + +/** Azure reachability report details. */ +export interface AzureReachabilityReport { + /** The aggregation level of Azure reachability report. Can be Country, State or City. */ + aggregationLevel: string; + /** Parameters that define a geographic location. */ + providerLocation: AzureReachabilityReportLocation; + /** List of Azure reachability report items. */ + reachabilityReport: AzureReachabilityReportItem[]; +} + +export function azureReachabilityReportDeserializer(item: any): AzureReachabilityReport { + return { + aggregationLevel: item["aggregationLevel"], + providerLocation: azureReachabilityReportLocationDeserializer(item["providerLocation"]), + reachabilityReport: azureReachabilityReportItemArrayDeserializer(item["reachabilityReport"]), + }; +} + +export function azureReachabilityReportItemArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return azureReachabilityReportItemDeserializer(item); + }); +} + +/** Azure reachability report details for a given provider location. */ +export interface AzureReachabilityReportItem { + /** The Internet service provider. */ + provider?: string; + /** The Azure region. */ + azureLocation?: string; + /** List of latency details for each of the time series. */ + latencies?: AzureReachabilityReportLatencyInfo[]; +} + +export function azureReachabilityReportItemDeserializer(item: any): AzureReachabilityReportItem { + return { + provider: item["provider"], + azureLocation: item["azureLocation"], + latencies: !item["latencies"] + ? item["latencies"] + : azureReachabilityReportLatencyInfoArrayDeserializer(item["latencies"]), + }; +} + +export function azureReachabilityReportLatencyInfoArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return azureReachabilityReportLatencyInfoDeserializer(item); + }); +} + +/** Details on latency for a time series. */ +export interface AzureReachabilityReportLatencyInfo { + /** The time stamp. */ + timeStamp?: Date; + /** The relative latency score between 1 and 100, higher values indicating a faster connection. */ + score?: number; +} + +export function azureReachabilityReportLatencyInfoDeserializer( + item: any, +): AzureReachabilityReportLatencyInfo { + return { + timeStamp: !item["timeStamp"] ? item["timeStamp"] : new Date(item["timeStamp"]), + score: item["score"], + }; +} + +/** Constraints that determine the list of available Internet service providers. */ +export interface AvailableProvidersListParameters { + /** A list of Azure regions. */ + azureLocations?: string[]; + /** The country for available providers list. */ + country?: string; + /** The state for available providers list. */ + state?: string; + /** The city or town for available providers list. */ + city?: string; +} + +export function availableProvidersListParametersSerializer( + item: AvailableProvidersListParameters, +): any { + return { + azureLocations: !item["azureLocations"] + ? item["azureLocations"] + : item["azureLocations"].map((p: any) => { + return p; + }), + country: item["country"], + state: item["state"], + city: item["city"], + }; +} + +/** List of available countries with details. */ +export interface AvailableProvidersList { + /** List of available countries. */ + countries: AvailableProvidersListCountry[]; +} + +export function availableProvidersListDeserializer(item: any): AvailableProvidersList { + return { + countries: availableProvidersListCountryArrayDeserializer(item["countries"]), + }; +} + +export function availableProvidersListCountryArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return availableProvidersListCountryDeserializer(item); + }); +} + +/** Country details. */ +export interface AvailableProvidersListCountry { + /** The country name. */ + countryName?: string; + /** A list of Internet service providers. */ + providers?: string[]; + /** List of available states in the country. */ + states?: AvailableProvidersListState[]; +} + +export function availableProvidersListCountryDeserializer( + item: any, +): AvailableProvidersListCountry { + return { + countryName: item["countryName"], + providers: !item["providers"] + ? item["providers"] + : item["providers"].map((p: any) => { + return p; + }), + states: !item["states"] + ? item["states"] + : availableProvidersListStateArrayDeserializer(item["states"]), + }; +} + +export function availableProvidersListStateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return availableProvidersListStateDeserializer(item); + }); +} + +/** State details. */ +export interface AvailableProvidersListState { + /** The state name. */ + stateName?: string; + /** A list of Internet service providers. */ + providers?: string[]; + /** List of available cities or towns in the state. */ + cities?: AvailableProvidersListCity[]; +} + +export function availableProvidersListStateDeserializer(item: any): AvailableProvidersListState { + return { + stateName: item["stateName"], + providers: !item["providers"] + ? item["providers"] + : item["providers"].map((p: any) => { + return p; + }), + cities: !item["cities"] + ? item["cities"] + : availableProvidersListCityArrayDeserializer(item["cities"]), + }; +} + +export function availableProvidersListCityArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return availableProvidersListCityDeserializer(item); + }); +} + +/** City or town details. */ +export interface AvailableProvidersListCity { + /** The city or town name. */ + cityName?: string; + /** A list of Internet service providers. */ + providers?: string[]; +} + +export function availableProvidersListCityDeserializer(item: any): AvailableProvidersListCity { + return { + cityName: item["cityName"], + providers: !item["providers"] + ? item["providers"] + : item["providers"].map((p: any) => { + return p; + }), + }; +} + +/** Parameters to get network configuration diagnostic. */ +export interface NetworkConfigurationDiagnosticParameters { + /** The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway. */ + targetResourceId: string; + /** Verbosity level. */ + verbosityLevel?: VerbosityLevel; + /** List of network configuration diagnostic profiles. */ + profiles: NetworkConfigurationDiagnosticProfile[]; +} + +export function networkConfigurationDiagnosticParametersSerializer( + item: NetworkConfigurationDiagnosticParameters, +): any { + return { + targetResourceId: item["targetResourceId"], + verbosityLevel: item["verbosityLevel"], + profiles: networkConfigurationDiagnosticProfileArraySerializer(item["profiles"]), + }; +} + +/** Verbosity level. */ +export enum KnownVerbosityLevel { + /** Normal */ + Normal = "Normal", + /** Minimum */ + Minimum = "Minimum", + /** Full */ + Full = "Full", +} + +/** + * Verbosity level. \ + * {@link KnownVerbosityLevel} can be used interchangeably with VerbosityLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Normal**: Normal \ + * **Minimum**: Minimum \ + * **Full**: Full + */ +export type VerbosityLevel = string; + +export function networkConfigurationDiagnosticProfileArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkConfigurationDiagnosticProfileSerializer(item); + }); +} + +export function networkConfigurationDiagnosticProfileArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkConfigurationDiagnosticProfileDeserializer(item); + }); +} + +/** Parameters to compare with network configuration. */ +export interface NetworkConfigurationDiagnosticProfile { + /** The direction of the traffic. */ + direction: Direction; + /** Protocol to be verified on. Accepted values are '*', TCP, UDP. */ + protocol: string; + /** Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. */ + source: string; + /** Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. */ + destination: string; + /** Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535). */ + destinationPort: string; +} + +export function networkConfigurationDiagnosticProfileSerializer( + item: NetworkConfigurationDiagnosticProfile, +): any { + return { + direction: item["direction"], + protocol: item["protocol"], + source: item["source"], + destination: item["destination"], + destinationPort: item["destinationPort"], + }; +} + +export function networkConfigurationDiagnosticProfileDeserializer( + item: any, +): NetworkConfigurationDiagnosticProfile { + return { + direction: item["direction"], + protocol: item["protocol"], + source: item["source"], + destination: item["destination"], + destinationPort: item["destinationPort"], + }; +} + +/** Results of network configuration diagnostic on the target resource. */ +export interface NetworkConfigurationDiagnosticResponse { + /** List of network configuration diagnostic results. */ + readonly results?: NetworkConfigurationDiagnosticResult[]; +} + +export function networkConfigurationDiagnosticResponseDeserializer( + item: any, +): NetworkConfigurationDiagnosticResponse { + return { + results: !item["results"] + ? item["results"] + : networkConfigurationDiagnosticResultArrayDeserializer(item["results"]), + }; +} + +export function networkConfigurationDiagnosticResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkConfigurationDiagnosticResultDeserializer(item); + }); +} + +/** Network configuration diagnostic result corresponded to provided traffic query. */ +export interface NetworkConfigurationDiagnosticResult { + /** Network configuration diagnostic profile. */ + profile?: NetworkConfigurationDiagnosticProfile; + /** Network security group result. */ + networkSecurityGroupResult?: NetworkSecurityGroupResult; +} + +export function networkConfigurationDiagnosticResultDeserializer( + item: any, +): NetworkConfigurationDiagnosticResult { + return { + profile: !item["profile"] + ? item["profile"] + : networkConfigurationDiagnosticProfileDeserializer(item["profile"]), + networkSecurityGroupResult: !item["networkSecurityGroupResult"] + ? item["networkSecurityGroupResult"] + : networkSecurityGroupResultDeserializer(item["networkSecurityGroupResult"]), + }; +} + +/** Network configuration diagnostic result corresponded provided traffic query. */ +export interface NetworkSecurityGroupResult { + /** The network traffic is allowed or denied. */ + securityRuleAccessResult?: SecurityRuleAccess; + /** List of results network security groups diagnostic. */ + readonly evaluatedNetworkSecurityGroups?: EvaluatedNetworkSecurityGroup[]; +} + +export function networkSecurityGroupResultDeserializer(item: any): NetworkSecurityGroupResult { + return { + securityRuleAccessResult: item["securityRuleAccessResult"], + evaluatedNetworkSecurityGroups: !item["evaluatedNetworkSecurityGroups"] + ? item["evaluatedNetworkSecurityGroups"] + : evaluatedNetworkSecurityGroupArrayDeserializer(item["evaluatedNetworkSecurityGroups"]), + }; +} + +export function evaluatedNetworkSecurityGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return evaluatedNetworkSecurityGroupDeserializer(item); + }); +} + +/** Results of network security group evaluation. */ +export interface EvaluatedNetworkSecurityGroup { + /** Network security group ID. */ + networkSecurityGroupId?: string; + /** Resource ID of nic or subnet to which network security group is applied. */ + appliedTo?: string; + /** Matched network security rule. */ + matchedRule?: MatchedRule; + /** List of network security rules evaluation results. */ + readonly rulesEvaluationResult?: NetworkSecurityRulesEvaluationResult[]; +} + +export function evaluatedNetworkSecurityGroupDeserializer( + item: any, +): EvaluatedNetworkSecurityGroup { + return { + networkSecurityGroupId: item["networkSecurityGroupId"], + appliedTo: item["appliedTo"], + matchedRule: !item["matchedRule"] + ? item["matchedRule"] + : matchedRuleDeserializer(item["matchedRule"]), + rulesEvaluationResult: !item["rulesEvaluationResult"] + ? item["rulesEvaluationResult"] + : networkSecurityRulesEvaluationResultArrayDeserializer(item["rulesEvaluationResult"]), + }; +} + +/** Matched rule. */ +export interface MatchedRule { + /** Name of the matched network security rule. */ + ruleName?: string; + /** The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. */ + action?: string; +} + +export function matchedRuleDeserializer(item: any): MatchedRule { + return { + ruleName: item["ruleName"], + action: item["action"], + }; +} + +export function networkSecurityRulesEvaluationResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkSecurityRulesEvaluationResultDeserializer(item); + }); +} + +/** Network security rules evaluation result. */ +export interface NetworkSecurityRulesEvaluationResult { + /** Name of the network security rule. */ + name?: string; + /** Value indicating whether protocol is matched. */ + protocolMatched?: boolean; + /** Value indicating whether source is matched. */ + sourceMatched?: boolean; + /** Value indicating whether source port is matched. */ + sourcePortMatched?: boolean; + /** Value indicating whether destination is matched. */ + destinationMatched?: boolean; + /** Value indicating whether destination port is matched. */ + destinationPortMatched?: boolean; +} + +export function networkSecurityRulesEvaluationResultDeserializer( + item: any, +): NetworkSecurityRulesEvaluationResult { + return { + name: item["name"], + protocolMatched: item["protocolMatched"], + sourceMatched: item["sourceMatched"], + sourcePortMatched: item["sourcePortMatched"], + destinationMatched: item["destinationMatched"], + destinationPortMatched: item["destinationPortMatched"], + }; +} + +/** Request body of the CheckPrivateLinkServiceVisibility API service call. */ +export interface CheckPrivateLinkServiceVisibilityRequest { + /** The alias of the private link service. */ + privateLinkServiceAlias?: string; +} + +export function checkPrivateLinkServiceVisibilityRequestSerializer( + item: CheckPrivateLinkServiceVisibilityRequest, +): any { + return { privateLinkServiceAlias: item["privateLinkServiceAlias"] }; +} + +/** Response for the CheckPrivateLinkServiceVisibility API service call. */ +export interface PrivateLinkServiceVisibility { + /** Private Link Service Visibility (True/False). */ + visible?: boolean; +} + +export function privateLinkServiceVisibilityDeserializer(item: any): PrivateLinkServiceVisibility { + return { + visible: item["visible"], + }; +} + +/** An array of private link service id that can be linked to a private end point with auto approved. */ +export interface _AutoApprovedPrivateLinkServicesResult { + /** The AutoApprovedPrivateLinkService items on this page */ + value: AutoApprovedPrivateLinkService[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _autoApprovedPrivateLinkServicesResultDeserializer( + item: any, +): _AutoApprovedPrivateLinkServicesResult { + return { + value: autoApprovedPrivateLinkServiceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function autoApprovedPrivateLinkServiceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return autoApprovedPrivateLinkServiceDeserializer(item); + }); +} + +/** The information of an AutoApprovedPrivateLinkService. */ +export interface AutoApprovedPrivateLinkService { + /** The id of the private link service resource. */ + privateLinkService?: string; +} + +export function autoApprovedPrivateLinkServiceDeserializer( + item: any, +): AutoApprovedPrivateLinkService { + return { + privateLinkService: item["privateLinkService"], + }; +} + +/** Public IP prefix resource. */ +export interface PublicIPPrefix extends Resource { + /** The extended location of the public ip address. */ + extendedLocation?: ExtendedLocation; + /** The public IP prefix SKU. */ + sku?: PublicIPPrefixSku; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** A list of availability zones denoting the IP allocated for the resource needs to come from. */ + zones?: string[]; + /** The public IP address version. */ + publicIPAddressVersion?: IPVersion; + /** The list of tags associated with the public IP prefix. */ + ipTags?: IpTag[]; + /** The Length of the Public IP Prefix. */ + prefixLength?: number; + /** The allocated Prefix. */ + readonly ipPrefix?: string; + /** The list of all referenced PublicIPAddresses. */ + readonly publicIPAddresses?: ReferencedPublicIpAddress[]; + /** The reference to load balancer frontend IP configuration associated with the public IP prefix. */ + readonly loadBalancerFrontendIpConfiguration?: SubResource; + /** The customIpPrefix that this prefix is associated with. */ + customIPPrefix?: SubResource; + /** The resource GUID property of the public IP prefix resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the public IP prefix resource. */ + readonly provisioningState?: CommonProvisioningState; + /** NatGateway of Public IP Prefix. */ + natGateway?: NatGateway; +} + +export function publicIPPrefixSerializer(item: PublicIPPrefix): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "publicIPAddressVersion", + "ipTags", + "prefixLength", + "customIPPrefix", + "natGateway", + ]) + ? undefined + : _publicIPPrefixPropertiesSerializer(item), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationSerializer(item["extendedLocation"]), + sku: !item["sku"] ? item["sku"] : publicIPPrefixSkuSerializer(item["sku"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +export function publicIPPrefixDeserializer(item: any): PublicIPPrefix { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _publicIPPrefixPropertiesDeserializer(item["properties"])), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationDeserializer(item["extendedLocation"]), + sku: !item["sku"] ? item["sku"] : publicIPPrefixSkuDeserializer(item["sku"]), + etag: item["etag"], + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +/** Public IP prefix properties. */ +export interface PublicIPPrefixPropertiesFormat { + /** The public IP address version. */ + publicIPAddressVersion?: IPVersion; + /** The list of tags associated with the public IP prefix. */ + ipTags?: IpTag[]; + /** The Length of the Public IP Prefix. */ + prefixLength?: number; + /** The allocated Prefix. */ + readonly ipPrefix?: string; + /** The list of all referenced PublicIPAddresses. */ + readonly publicIPAddresses?: ReferencedPublicIpAddress[]; + /** The reference to load balancer frontend IP configuration associated with the public IP prefix. */ + readonly loadBalancerFrontendIpConfiguration?: SubResource; + /** The customIpPrefix that this prefix is associated with. */ + customIPPrefix?: SubResource; + /** The resource GUID property of the public IP prefix resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the public IP prefix resource. */ + readonly provisioningState?: CommonProvisioningState; + /** NatGateway of Public IP Prefix. */ + natGateway?: NatGateway; +} + +export function publicIPPrefixPropertiesFormatSerializer( + item: PublicIPPrefixPropertiesFormat, +): any { + return { + publicIPAddressVersion: item["publicIPAddressVersion"], + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArraySerializer(item["ipTags"]), + prefixLength: item["prefixLength"], + customIPPrefix: !item["customIPPrefix"] + ? item["customIPPrefix"] + : subResourceSerializer(item["customIPPrefix"]), + natGateway: !item["natGateway"] ? item["natGateway"] : natGatewaySerializer(item["natGateway"]), + }; +} + +export function publicIPPrefixPropertiesFormatDeserializer( + item: any, +): PublicIPPrefixPropertiesFormat { + return { + publicIPAddressVersion: item["publicIPAddressVersion"], + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArrayDeserializer(item["ipTags"]), + prefixLength: item["prefixLength"], + ipPrefix: item["ipPrefix"], + publicIPAddresses: !item["publicIPAddresses"] + ? item["publicIPAddresses"] + : referencedPublicIpAddressArrayDeserializer(item["publicIPAddresses"]), + loadBalancerFrontendIpConfiguration: !item["loadBalancerFrontendIpConfiguration"] + ? item["loadBalancerFrontendIpConfiguration"] + : subResourceDeserializer(item["loadBalancerFrontendIpConfiguration"]), + customIPPrefix: !item["customIPPrefix"] + ? item["customIPPrefix"] + : subResourceDeserializer(item["customIPPrefix"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + natGateway: !item["natGateway"] + ? item["natGateway"] + : natGatewayDeserializer(item["natGateway"]), + }; +} + +export function referencedPublicIpAddressArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return referencedPublicIpAddressDeserializer(item); + }); +} + +/** Reference to a public IP address. */ +export interface ReferencedPublicIpAddress { + /** The PublicIPAddress Reference. */ + id?: string; +} + +export function referencedPublicIpAddressDeserializer(item: any): ReferencedPublicIpAddress { + return { + id: item["id"], + }; +} + +/** SKU of a public IP prefix. */ +export interface PublicIPPrefixSku { + /** Name of a public IP prefix SKU. */ + name?: PublicIPPrefixSkuName; + /** Tier of a public IP prefix SKU. */ + tier?: PublicIPPrefixSkuTier; +} + +export function publicIPPrefixSkuSerializer(item: PublicIPPrefixSku): any { + return { name: item["name"], tier: item["tier"] }; +} + +export function publicIPPrefixSkuDeserializer(item: any): PublicIPPrefixSku { + return { + name: item["name"], + tier: item["tier"], + }; +} + +/** Name of a public IP prefix SKU. */ +export enum KnownPublicIPPrefixSkuName { + /** Standard */ + Standard = "Standard", + /** StandardV2 */ + StandardV2 = "StandardV2", +} + +/** + * Name of a public IP prefix SKU. \ + * {@link KnownPublicIPPrefixSkuName} can be used interchangeably with PublicIPPrefixSkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard \ + * **StandardV2**: StandardV2 + */ +export type PublicIPPrefixSkuName = string; + +/** Tier of a public IP prefix SKU. */ +export enum KnownPublicIPPrefixSkuTier { + /** Regional */ + Regional = "Regional", + /** Global */ + Global = "Global", +} + +/** + * Tier of a public IP prefix SKU. \ + * {@link KnownPublicIPPrefixSkuTier} can be used interchangeably with PublicIPPrefixSkuTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Regional**: Regional \ + * **Global**: Global + */ +export type PublicIPPrefixSkuTier = string; + +export function publicIPPrefixArraySerializer(result: Array): any[] { + return result.map((item) => { + return publicIPPrefixSerializer(item); + }); +} + +export function publicIPPrefixArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return publicIPPrefixDeserializer(item); + }); +} + +/** Route Filter Resource. */ +export interface RouteFilter extends TrackedResourceWithSettableIdOptionalLocation { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Collection of RouteFilterRules contained within a route filter. */ + rules?: RouteFilterRule[]; + /** A collection of references to express route circuit peerings. */ + readonly peerings?: ExpressRouteCircuitPeering[]; + /** A collection of references to express route circuit ipv6 peerings. */ + readonly ipv6Peerings?: ExpressRouteCircuitPeering[]; + /** The provisioning state of the route filter resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function routeFilterSerializer(item: RouteFilter): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, ["rules"]) + ? undefined + : _routeFilterPropertiesSerializer(item), + }; +} + +export function routeFilterDeserializer(item: any): RouteFilter { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _routeFilterPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Route Filter Resource. */ +export interface RouteFilterPropertiesFormat { + /** Collection of RouteFilterRules contained within a route filter. */ + rules?: RouteFilterRule[]; + /** A collection of references to express route circuit peerings. */ + readonly peerings?: ExpressRouteCircuitPeering[]; + /** A collection of references to express route circuit ipv6 peerings. */ + readonly ipv6Peerings?: ExpressRouteCircuitPeering[]; + /** The provisioning state of the route filter resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function routeFilterPropertiesFormatSerializer(item: RouteFilterPropertiesFormat): any { + return { rules: !item["rules"] ? item["rules"] : routeFilterRuleArraySerializer(item["rules"]) }; +} + +export function routeFilterPropertiesFormatDeserializer(item: any): RouteFilterPropertiesFormat { + return { + rules: !item["rules"] ? item["rules"] : routeFilterRuleArrayDeserializer(item["rules"]), + peerings: !item["peerings"] + ? item["peerings"] + : expressRouteCircuitPeeringArrayDeserializer(item["peerings"]), + ipv6Peerings: !item["ipv6Peerings"] + ? item["ipv6Peerings"] + : expressRouteCircuitPeeringArrayDeserializer(item["ipv6Peerings"]), + provisioningState: item["provisioningState"], + }; +} + +export function routeFilterRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return routeFilterRuleSerializer(item); + }); +} + +export function routeFilterRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return routeFilterRuleDeserializer(item); + }); +} + +/** Route Filter Rule Resource. */ +export interface RouteFilterRule extends SubResource { + /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** Resource location. */ + location?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The access type of the rule. */ + access?: Access; + /** The rule type of the rule. */ + routeFilterRuleType?: RouteFilterRuleType; + /** The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. */ + communities?: string[]; + /** The provisioning state of the route filter rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function routeFilterRuleSerializer(item: RouteFilterRule): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["access", "routeFilterRuleType", "communities"]) + ? undefined + : _routeFilterRulePropertiesSerializer(item), + name: item["name"], + location: item["location"], + }; +} + +export function routeFilterRuleDeserializer(item: any): RouteFilterRule { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _routeFilterRulePropertiesDeserializer(item["properties"])), + name: item["name"], + location: item["location"], + etag: item["etag"], + }; +} + +/** Route Filter Rule Resource. */ +export interface RouteFilterRulePropertiesFormat { + /** The access type of the rule. */ + access: Access; + /** The rule type of the rule. */ + routeFilterRuleType: RouteFilterRuleType; + /** The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. */ + communities: string[]; + /** The provisioning state of the route filter rule resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function routeFilterRulePropertiesFormatSerializer( + item: RouteFilterRulePropertiesFormat, +): any { + return { + access: item["access"], + routeFilterRuleType: item["routeFilterRuleType"], + communities: item["communities"].map((p: any) => { + return p; + }), + }; +} + +export function routeFilterRulePropertiesFormatDeserializer( + item: any, +): RouteFilterRulePropertiesFormat { + return { + access: item["access"], + routeFilterRuleType: item["routeFilterRuleType"], + communities: item["communities"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +/** The rule type of the rule. */ +export enum KnownRouteFilterRuleType { + /** Community */ + Community = "Community", +} + +/** + * The rule type of the rule. \ + * {@link KnownRouteFilterRuleType} can be used interchangeably with RouteFilterRuleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Community**: Community + */ +export type RouteFilterRuleType = string; + +/** Common resource representation. */ +export interface TrackedResourceWithSettableIdOptionalLocation { + /** Resource ID. */ + id?: string; + /** Resource name. */ + readonly name?: string; + /** Resource type. */ + readonly type?: string; + /** Resource location. */ + location?: string; + /** Resource tags. */ + tags?: Record; +} + +export function trackedResourceWithSettableIdOptionalLocationSerializer( + item: TrackedResourceWithSettableIdOptionalLocation, +): any { + return { id: item["id"], location: item["location"], tags: item["tags"] }; +} + +export function trackedResourceWithSettableIdOptionalLocationDeserializer( + item: any, +): TrackedResourceWithSettableIdOptionalLocation { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + }; +} + +export function routeFilterArraySerializer(result: Array): any[] { + return result.map((item) => { + return routeFilterSerializer(item); + }); +} + +export function routeFilterArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return routeFilterDeserializer(item); + }); +} + +/** Security Partner Provider resource. */ +export interface SecurityPartnerProvider extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The provisioning state of the Security Partner Provider resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The security provider name. */ + securityProviderName?: SecurityProviderName; + /** The connection status with the Security Partner Provider. */ + readonly connectionStatus?: SecurityPartnerProviderConnectionStatus; + /** The virtualHub to which the Security Partner Provider belongs. */ + virtualHub?: SubResource; +} + +export function securityPartnerProviderSerializer(item: SecurityPartnerProvider): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, ["securityProviderName", "virtualHub"]) + ? undefined + : _securityPartnerProviderPropertiesSerializer(item), + }; +} + +export function securityPartnerProviderDeserializer(item: any): SecurityPartnerProvider { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _securityPartnerProviderPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the Security Partner Provider. */ +export interface SecurityPartnerProviderPropertiesFormat { + /** The provisioning state of the Security Partner Provider resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The security provider name. */ + securityProviderName?: SecurityProviderName; + /** The connection status with the Security Partner Provider. */ + readonly connectionStatus?: SecurityPartnerProviderConnectionStatus; + /** The virtualHub to which the Security Partner Provider belongs. */ + virtualHub?: SubResource; +} + +export function securityPartnerProviderPropertiesFormatSerializer( + item: SecurityPartnerProviderPropertiesFormat, +): any { + return { + securityProviderName: item["securityProviderName"], + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceSerializer(item["virtualHub"]), + }; +} + +export function securityPartnerProviderPropertiesFormatDeserializer( + item: any, +): SecurityPartnerProviderPropertiesFormat { + return { + provisioningState: item["provisioningState"], + securityProviderName: item["securityProviderName"], + connectionStatus: item["connectionStatus"], + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceDeserializer(item["virtualHub"]), + }; +} + +/** The Security Providers. */ +export enum KnownSecurityProviderName { + /** ZScaler */ + ZScaler = "ZScaler", + /** IBoss */ + IBoss = "IBoss", + /** Checkpoint */ + Checkpoint = "Checkpoint", +} + +/** + * The Security Providers. \ + * {@link KnownSecurityProviderName} can be used interchangeably with SecurityProviderName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ZScaler**: ZScaler \ + * **IBoss**: IBoss \ + * **Checkpoint**: Checkpoint + */ +export type SecurityProviderName = string; + +/** The current state of the connection with Security Partner Provider. */ +export enum KnownSecurityPartnerProviderConnectionStatus { + /** Unknown */ + Unknown = "Unknown", + /** PartiallyConnected */ + PartiallyConnected = "PartiallyConnected", + /** Connected */ + Connected = "Connected", + /** NotConnected */ + NotConnected = "NotConnected", +} + +/** + * The current state of the connection with Security Partner Provider. \ + * {@link KnownSecurityPartnerProviderConnectionStatus} can be used interchangeably with SecurityPartnerProviderConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **PartiallyConnected**: PartiallyConnected \ + * **Connected**: Connected \ + * **NotConnected**: NotConnected + */ +export type SecurityPartnerProviderConnectionStatus = string; + +export function securityPartnerProviderArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return securityPartnerProviderSerializer(item); + }); +} + +export function securityPartnerProviderArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return securityPartnerProviderDeserializer(item); + }); +} + +/** Response for CheckIPAddressAvailability API service call. */ +export interface IPAddressAvailabilityResult { + /** Private IP address availability. */ + available?: boolean; + /** Contains other available private IP addresses if the asked for address is taken. */ + availableIPAddresses?: string[]; + /** Private IP address platform reserved. */ + isPlatformReserved?: boolean; +} + +export function ipAddressAvailabilityResultDeserializer(item: any): IPAddressAvailabilityResult { + return { + available: item["available"], + availableIPAddresses: !item["availableIPAddresses"] + ? item["availableIPAddresses"] + : item["availableIPAddresses"].map((p: any) => { + return p; + }), + isPlatformReserved: item["isPlatformReserved"], + }; +} + +/** Response for the virtual networks GetUsage API service call. */ +export interface _VirtualNetworkListUsageResult { + /** The VirtualNetworkUsage items on this page */ + readonly value: VirtualNetworkUsage[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualNetworkListUsageResultDeserializer( + item: any, +): _VirtualNetworkListUsageResult { + return { + value: virtualNetworkUsageArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function virtualNetworkUsageArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualNetworkUsageDeserializer(item); + }); +} + +/** Usage details for subnet. */ +export interface VirtualNetworkUsage { + /** Indicates number of IPs used from the Subnet. */ + readonly currentValue?: number; + /** Subnet identifier. */ + readonly id?: string; + /** Indicates the size of the subnet. */ + readonly limit?: number; + /** The name containing common and localized value for usage. */ + readonly name?: VirtualNetworkUsageName; + /** Usage units. Returns 'Count'. */ + readonly unit?: string; +} + +export function virtualNetworkUsageDeserializer(item: any): VirtualNetworkUsage { + return { + currentValue: item["currentValue"], + id: item["id"], + limit: item["limit"], + name: !item["name"] ? item["name"] : virtualNetworkUsageNameDeserializer(item["name"]), + unit: item["unit"], + }; +} + +/** Usage strings container. */ +export interface VirtualNetworkUsageName { + /** Localized subnet size and usage string. */ + readonly localizedValue?: string; + /** Subnet size and usage string. */ + readonly value?: string; +} + +export function virtualNetworkUsageNameDeserializer(item: any): VirtualNetworkUsageName { + return { + localizedValue: item["localizedValue"], + value: item["value"], + }; +} + +/** Response for GetVirtualNetworkDdosProtectionStatusOperation. */ +export interface _VirtualNetworkDdosProtectionStatusResult { + /** The PublicIpDdosProtectionStatusResult items on this page */ + value: PublicIpDdosProtectionStatusResult[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualNetworkDdosProtectionStatusResultDeserializer( + item: any, +): _VirtualNetworkDdosProtectionStatusResult { + return { + value: publicIpDdosProtectionStatusResultArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function publicIpDdosProtectionStatusResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return publicIpDdosProtectionStatusResultDeserializer(item); + }); +} + +/** Details of PrepareNetworkPolicies for Subnet. */ +export interface PrepareNetworkPoliciesRequest { + /** The name of the service for which subnet is being prepared for. */ + serviceName?: string; + /** A list of NetworkIntentPolicyConfiguration. */ + networkIntentPolicyConfigurations?: NetworkIntentPolicyConfiguration[]; +} + +export function prepareNetworkPoliciesRequestSerializer(item: PrepareNetworkPoliciesRequest): any { + return { + serviceName: item["serviceName"], + networkIntentPolicyConfigurations: !item["networkIntentPolicyConfigurations"] + ? item["networkIntentPolicyConfigurations"] + : networkIntentPolicyConfigurationArraySerializer(item["networkIntentPolicyConfigurations"]), + }; +} + +export function networkIntentPolicyConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkIntentPolicyConfigurationSerializer(item); + }); +} + +/** Details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest. */ +export interface NetworkIntentPolicyConfiguration { + /** The name of the Network Intent Policy for storing in target subscription. */ + networkIntentPolicyName?: string; + /** Source network intent policy. */ + sourceNetworkIntentPolicy?: NetworkIntentPolicy; +} + +export function networkIntentPolicyConfigurationSerializer( + item: NetworkIntentPolicyConfiguration, +): any { + return { + networkIntentPolicyName: item["networkIntentPolicyName"], + sourceNetworkIntentPolicy: !item["sourceNetworkIntentPolicy"] + ? item["sourceNetworkIntentPolicy"] + : networkIntentPolicySerializer(item["sourceNetworkIntentPolicy"]), + }; +} + +/** Network Intent Policy resource. */ +export interface NetworkIntentPolicy extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; +} + +export function networkIntentPolicySerializer(item: NetworkIntentPolicy): any { + return { id: item["id"], location: item["location"], tags: item["tags"] }; +} + +/** Details of UnprepareNetworkPolicies for Subnet. */ +export interface UnprepareNetworkPoliciesRequest { + /** The name of the service for which subnet is being unprepared for. */ + serviceName?: string; +} + +export function unprepareNetworkPoliciesRequestSerializer( + item: UnprepareNetworkPoliciesRequest, +): any { + return { serviceName: item["serviceName"] }; +} + +/** A common class for general resource information. */ +export interface VirtualNetworkGateway extends Resource { + /** The extended location of type local virtual network gateway. */ + extendedLocation?: ExtendedLocation; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The identity of the virtual network gateway, if configured. */ + identity?: ManagedServiceIdentity; + /** Autoscale configuration for virutal network gateway */ + autoScaleConfiguration?: VirtualNetworkGatewayAutoScaleConfiguration; + /** IP configurations for virtual network gateway. */ + ipConfigurations?: VirtualNetworkGatewayIPConfiguration[]; + /** The type of this virtual network gateway. */ + gatewayType?: VirtualNetworkGatewayType; + /** The type of this virtual network gateway. */ + vpnType?: VpnType; + /** The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. */ + vpnGatewayGeneration?: VpnGatewayGeneration; + /** Whether BGP is enabled for this virtual network gateway or not. */ + enableBgp?: boolean; + /** Whether private IP needs to be enabled on this gateway for connections or not. */ + enablePrivateIpAddress?: boolean; + /** The reference to the VirtualNetworkGatewayMigrationStatus which represents the status of migration. */ + virtualNetworkGatewayMigrationStatus?: VirtualNetworkGatewayMigrationStatus; + /** ActiveActive flag. */ + active?: boolean; + /** To enable Advanced Connectivity feature for VPN gateway */ + enableHighBandwidthVpnGateway?: boolean; + /** disableIPSecReplayProtection flag. */ + disableIPSecReplayProtection?: boolean; + /** The reference to the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. */ + gatewayDefaultSite?: SubResource; + /** The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. */ + sku?: VirtualNetworkGatewaySku; + /** The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations. */ + vpnClientConfiguration?: VpnClientConfiguration; + /** The reference to the VirtualNetworkGatewayPolicyGroup resource which represents the available VirtualNetworkGatewayPolicyGroup for the gateway. */ + virtualNetworkGatewayPolicyGroups?: VirtualNetworkGatewayPolicyGroup[]; + /** Virtual network gateway's BGP speaker settings. */ + bgpSettings?: BgpSettings; + /** The reference to the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. */ + customRoutes?: AddressSpace; + /** The resource GUID property of the virtual network gateway resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the virtual network gateway resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Whether dns forwarding is enabled or not. */ + enableDnsForwarding?: boolean; + /** The IP address allocated by the gateway to which dns requests can be sent. */ + readonly inboundDnsForwardingEndpoint?: string; + /** Customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet. */ + vNetExtendedLocationResourceId?: string; + /** NatRules for virtual network gateway. */ + natRules?: VirtualNetworkGatewayNatRule[]; + /** EnableBgpRouteTranslationForNat flag. */ + enableBgpRouteTranslationForNat?: boolean; + /** Configures this gateway to accept traffic from remote Virtual WAN networks. */ + allowVirtualWanTraffic?: boolean; + /** Configure this gateway to accept traffic from other Azure Virtual Networks. This configuration does not support connectivity to Azure Virtual WAN. */ + allowRemoteVnetTraffic?: boolean; + /** Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the vnet */ + adminState?: AdminState; + /** Property to indicate if the Express Route Gateway has resiliency model of MultiHomed or SingleHomed */ + resiliencyModel?: ResiliencyModel; +} + +export function virtualNetworkGatewaySerializer(item: VirtualNetworkGateway): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: _virtualNetworkGatewayPropertiesSerializer(item), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationSerializer(item["extendedLocation"]), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + }; +} + +export function virtualNetworkGatewayDeserializer(item: any): VirtualNetworkGateway { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ..._virtualNetworkGatewayPropertiesDeserializer(item["properties"]), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationDeserializer(item["extendedLocation"]), + etag: item["etag"], + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentityDeserializer(item["identity"]), + }; +} + +/** VirtualNetworkGateway properties. */ +export interface VirtualNetworkGatewayPropertiesFormat { + /** Autoscale configuration for virutal network gateway */ + autoScaleConfiguration?: VirtualNetworkGatewayAutoScaleConfiguration; + /** IP configurations for virtual network gateway. */ + ipConfigurations?: VirtualNetworkGatewayIPConfiguration[]; + /** The type of this virtual network gateway. */ + gatewayType?: VirtualNetworkGatewayType; + /** The type of this virtual network gateway. */ + vpnType?: VpnType; + /** The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. */ + vpnGatewayGeneration?: VpnGatewayGeneration; + /** Whether BGP is enabled for this virtual network gateway or not. */ + enableBgp?: boolean; + /** Whether private IP needs to be enabled on this gateway for connections or not. */ + enablePrivateIpAddress?: boolean; + /** The reference to the VirtualNetworkGatewayMigrationStatus which represents the status of migration. */ + virtualNetworkGatewayMigrationStatus?: VirtualNetworkGatewayMigrationStatus; + /** ActiveActive flag. */ + active?: boolean; + /** To enable Advanced Connectivity feature for VPN gateway */ + enableHighBandwidthVpnGateway?: boolean; + /** disableIPSecReplayProtection flag. */ + disableIPSecReplayProtection?: boolean; + /** The reference to the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. */ + gatewayDefaultSite?: SubResource; + /** The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. */ + sku?: VirtualNetworkGatewaySku; + /** The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations. */ + vpnClientConfiguration?: VpnClientConfiguration; + /** The reference to the VirtualNetworkGatewayPolicyGroup resource which represents the available VirtualNetworkGatewayPolicyGroup for the gateway. */ + virtualNetworkGatewayPolicyGroups?: VirtualNetworkGatewayPolicyGroup[]; + /** Virtual network gateway's BGP speaker settings. */ + bgpSettings?: BgpSettings; + /** The reference to the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. */ + customRoutes?: AddressSpace; + /** The resource GUID property of the virtual network gateway resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the virtual network gateway resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Whether dns forwarding is enabled or not. */ + enableDnsForwarding?: boolean; + /** The IP address allocated by the gateway to which dns requests can be sent. */ + readonly inboundDnsForwardingEndpoint?: string; + /** Customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet. */ + vNetExtendedLocationResourceId?: string; + /** NatRules for virtual network gateway. */ + natRules?: VirtualNetworkGatewayNatRule[]; + /** EnableBgpRouteTranslationForNat flag. */ + enableBgpRouteTranslationForNat?: boolean; + /** Configures this gateway to accept traffic from remote Virtual WAN networks. */ + allowVirtualWanTraffic?: boolean; + /** Configure this gateway to accept traffic from other Azure Virtual Networks. This configuration does not support connectivity to Azure Virtual WAN. */ + allowRemoteVnetTraffic?: boolean; + /** Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the vnet */ + adminState?: AdminState; + /** Property to indicate if the Express Route Gateway has resiliency model of MultiHomed or SingleHomed */ + resiliencyModel?: ResiliencyModel; +} + +export function virtualNetworkGatewayPropertiesFormatSerializer( + item: VirtualNetworkGatewayPropertiesFormat, +): any { + return { + autoScaleConfiguration: !item["autoScaleConfiguration"] + ? item["autoScaleConfiguration"] + : virtualNetworkGatewayAutoScaleConfigurationSerializer(item["autoScaleConfiguration"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : virtualNetworkGatewayIPConfigurationArraySerializer(item["ipConfigurations"]), + gatewayType: item["gatewayType"], + vpnType: item["vpnType"], + vpnGatewayGeneration: item["vpnGatewayGeneration"], + enableBgp: item["enableBgp"], + enablePrivateIpAddress: item["enablePrivateIpAddress"], + virtualNetworkGatewayMigrationStatus: !item["virtualNetworkGatewayMigrationStatus"] + ? item["virtualNetworkGatewayMigrationStatus"] + : virtualNetworkGatewayMigrationStatusSerializer( + item["virtualNetworkGatewayMigrationStatus"], + ), + activeActive: item["active"], + enableHighBandwidthVpnGateway: item["enableHighBandwidthVpnGateway"], + disableIPSecReplayProtection: item["disableIPSecReplayProtection"], + gatewayDefaultSite: !item["gatewayDefaultSite"] + ? item["gatewayDefaultSite"] + : subResourceSerializer(item["gatewayDefaultSite"]), + sku: !item["sku"] ? item["sku"] : virtualNetworkGatewaySkuSerializer(item["sku"]), + vpnClientConfiguration: !item["vpnClientConfiguration"] + ? item["vpnClientConfiguration"] + : vpnClientConfigurationSerializer(item["vpnClientConfiguration"]), + virtualNetworkGatewayPolicyGroups: !item["virtualNetworkGatewayPolicyGroups"] + ? item["virtualNetworkGatewayPolicyGroups"] + : virtualNetworkGatewayPolicyGroupArraySerializer(item["virtualNetworkGatewayPolicyGroups"]), + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsSerializer(item["bgpSettings"]), + customRoutes: !item["customRoutes"] + ? item["customRoutes"] + : addressSpaceSerializer(item["customRoutes"]), + enableDnsForwarding: item["enableDnsForwarding"], + vNetExtendedLocationResourceId: item["vNetExtendedLocationResourceId"], + natRules: !item["natRules"] + ? item["natRules"] + : virtualNetworkGatewayNatRuleArraySerializer(item["natRules"]), + enableBgpRouteTranslationForNat: item["enableBgpRouteTranslationForNat"], + allowVirtualWanTraffic: item["allowVirtualWanTraffic"], + allowRemoteVnetTraffic: item["allowRemoteVnetTraffic"], + adminState: item["adminState"], + resiliencyModel: item["resiliencyModel"], + }; +} + +export function virtualNetworkGatewayPropertiesFormatDeserializer( + item: any, +): VirtualNetworkGatewayPropertiesFormat { + return { + autoScaleConfiguration: !item["autoScaleConfiguration"] + ? item["autoScaleConfiguration"] + : virtualNetworkGatewayAutoScaleConfigurationDeserializer(item["autoScaleConfiguration"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : virtualNetworkGatewayIPConfigurationArrayDeserializer(item["ipConfigurations"]), + gatewayType: item["gatewayType"], + vpnType: item["vpnType"], + vpnGatewayGeneration: item["vpnGatewayGeneration"], + enableBgp: item["enableBgp"], + enablePrivateIpAddress: item["enablePrivateIpAddress"], + virtualNetworkGatewayMigrationStatus: !item["virtualNetworkGatewayMigrationStatus"] + ? item["virtualNetworkGatewayMigrationStatus"] + : virtualNetworkGatewayMigrationStatusDeserializer( + item["virtualNetworkGatewayMigrationStatus"], + ), + active: item["activeActive"], + enableHighBandwidthVpnGateway: item["enableHighBandwidthVpnGateway"], + disableIPSecReplayProtection: item["disableIPSecReplayProtection"], + gatewayDefaultSite: !item["gatewayDefaultSite"] + ? item["gatewayDefaultSite"] + : subResourceDeserializer(item["gatewayDefaultSite"]), + sku: !item["sku"] ? item["sku"] : virtualNetworkGatewaySkuDeserializer(item["sku"]), + vpnClientConfiguration: !item["vpnClientConfiguration"] + ? item["vpnClientConfiguration"] + : vpnClientConfigurationDeserializer(item["vpnClientConfiguration"]), + virtualNetworkGatewayPolicyGroups: !item["virtualNetworkGatewayPolicyGroups"] + ? item["virtualNetworkGatewayPolicyGroups"] + : virtualNetworkGatewayPolicyGroupArrayDeserializer( + item["virtualNetworkGatewayPolicyGroups"], + ), + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsDeserializer(item["bgpSettings"]), + customRoutes: !item["customRoutes"] + ? item["customRoutes"] + : addressSpaceDeserializer(item["customRoutes"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + enableDnsForwarding: item["enableDnsForwarding"], + inboundDnsForwardingEndpoint: item["inboundDnsForwardingEndpoint"], + vNetExtendedLocationResourceId: item["vNetExtendedLocationResourceId"], + natRules: !item["natRules"] + ? item["natRules"] + : virtualNetworkGatewayNatRuleArrayDeserializer(item["natRules"]), + enableBgpRouteTranslationForNat: item["enableBgpRouteTranslationForNat"], + allowVirtualWanTraffic: item["allowVirtualWanTraffic"], + allowRemoteVnetTraffic: item["allowRemoteVnetTraffic"], + adminState: item["adminState"], + resiliencyModel: item["resiliencyModel"], + }; +} + +/** Virtual Network Gateway Autoscale Configuration details */ +export interface VirtualNetworkGatewayAutoScaleConfiguration { + /** The bounds of the autoscale configuration */ + bounds?: VirtualNetworkGatewayAutoScaleBounds; +} + +export function virtualNetworkGatewayAutoScaleConfigurationSerializer( + item: VirtualNetworkGatewayAutoScaleConfiguration, +): any { + return { + bounds: !item["bounds"] + ? item["bounds"] + : virtualNetworkGatewayAutoScaleBoundsSerializer(item["bounds"]), + }; +} + +export function virtualNetworkGatewayAutoScaleConfigurationDeserializer( + item: any, +): VirtualNetworkGatewayAutoScaleConfiguration { + return { + bounds: !item["bounds"] + ? item["bounds"] + : virtualNetworkGatewayAutoScaleBoundsDeserializer(item["bounds"]), + }; +} + +/** model interface VirtualNetworkGatewayAutoScaleBounds */ +export interface VirtualNetworkGatewayAutoScaleBounds { + /** Minimum scale Units for Autoscale configuration */ + min?: number; + /** Maximum Scale Units for Autoscale configuration */ + max?: number; +} + +export function virtualNetworkGatewayAutoScaleBoundsSerializer( + item: VirtualNetworkGatewayAutoScaleBounds, +): any { + return { min: item["min"], max: item["max"] }; +} + +export function virtualNetworkGatewayAutoScaleBoundsDeserializer( + item: any, +): VirtualNetworkGatewayAutoScaleBounds { + return { + min: item["min"], + max: item["max"], + }; +} + +export function virtualNetworkGatewayIPConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayIPConfigurationSerializer(item); + }); +} + +export function virtualNetworkGatewayIPConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayIPConfigurationDeserializer(item); + }); +} + +/** IP configuration for virtual network gateway. */ +export interface VirtualNetworkGatewayIPConfiguration extends 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. */ + readonly etag?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** The reference to the subnet resource. */ + subnet?: SubResource; + /** The reference to the public IP resource. */ + publicIPAddress?: SubResource; + /** Private IP Address for this gateway. */ + readonly privateIPAddress?: string; + /** The provisioning state of the virtual network gateway IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualNetworkGatewayIPConfigurationSerializer( + item: VirtualNetworkGatewayIPConfiguration, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "privateIPAllocationMethod", + "subnet", + "publicIPAddress", + ]) + ? undefined + : _virtualNetworkGatewayIPConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function virtualNetworkGatewayIPConfigurationDeserializer( + item: any, +): VirtualNetworkGatewayIPConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _virtualNetworkGatewayIPConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of VirtualNetworkGatewayIPConfiguration. */ +export interface VirtualNetworkGatewayIPConfigurationPropertiesFormat { + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** The reference to the subnet resource. */ + subnet?: SubResource; + /** The reference to the public IP resource. */ + publicIPAddress?: SubResource; + /** Private IP Address for this gateway. */ + readonly privateIPAddress?: string; + /** The provisioning state of the virtual network gateway IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualNetworkGatewayIPConfigurationPropertiesFormatSerializer( + item: VirtualNetworkGatewayIPConfigurationPropertiesFormat, +): any { + return { + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceSerializer(item["publicIPAddress"]), + }; +} + +export function virtualNetworkGatewayIPConfigurationPropertiesFormatDeserializer( + item: any, +): VirtualNetworkGatewayIPConfigurationPropertiesFormat { + return { + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceDeserializer(item["publicIPAddress"]), + privateIPAddress: item["privateIPAddress"], + provisioningState: item["provisioningState"], + }; +} + +/** The type of this virtual network gateway. */ +export enum KnownVirtualNetworkGatewayType { + /** Vpn */ + Vpn = "Vpn", + /** ExpressRoute */ + ExpressRoute = "ExpressRoute", + /** LocalGateway */ + LocalGateway = "LocalGateway", +} + +/** + * The type of this virtual network gateway. \ + * {@link KnownVirtualNetworkGatewayType} can be used interchangeably with VirtualNetworkGatewayType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Vpn**: Vpn \ + * **ExpressRoute**: ExpressRoute \ + * **LocalGateway**: LocalGateway + */ +export type VirtualNetworkGatewayType = string; + +/** The type of this virtual network gateway. */ +export enum KnownVpnType { + /** PolicyBased */ + PolicyBased = "PolicyBased", + /** RouteBased */ + RouteBased = "RouteBased", +} + +/** + * The type of this virtual network gateway. \ + * {@link KnownVpnType} can be used interchangeably with VpnType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PolicyBased**: PolicyBased \ + * **RouteBased**: RouteBased + */ +export type VpnType = string; + +/** The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. */ +export enum KnownVpnGatewayGeneration { + /** None */ + None = "None", + /** Generation1 */ + Generation1 = "Generation1", + /** Generation2 */ + Generation2 = "Generation2", +} + +/** + * The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. \ + * {@link KnownVpnGatewayGeneration} can be used interchangeably with VpnGatewayGeneration, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **Generation1**: Generation1 \ + * **Generation2**: Generation2 + */ +export type VpnGatewayGeneration = string; + +/** Migration status for the Virtual Network Gateway. */ +export interface VirtualNetworkGatewayMigrationStatus { + /** Represent the current state of gateway migration. */ + state?: VirtualNetworkGatewayMigrationState; + /** Represent the current migration phase of gateway. */ + phase?: VirtualNetworkGatewayMigrationPhase; + /** Error if any occurs during migration. */ + errorMessage?: string; +} + +export function virtualNetworkGatewayMigrationStatusSerializer( + item: VirtualNetworkGatewayMigrationStatus, +): any { + return { state: item["state"], phase: item["phase"], errorMessage: item["errorMessage"] }; +} + +export function virtualNetworkGatewayMigrationStatusDeserializer( + item: any, +): VirtualNetworkGatewayMigrationStatus { + return { + state: item["state"], + phase: item["phase"], + errorMessage: item["errorMessage"], + }; +} + +/** Represent the current state of gateway migration. */ +export enum KnownVirtualNetworkGatewayMigrationState { + /** None */ + None = "None", + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", +} + +/** + * Represent the current state of gateway migration. \ + * {@link KnownVirtualNetworkGatewayMigrationState} can be used interchangeably with VirtualNetworkGatewayMigrationState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **InProgress**: InProgress \ + * **Succeeded**: Succeeded \ + * **Failed**: Failed + */ +export type VirtualNetworkGatewayMigrationState = string; + +/** Represent the current migration phase of gateway. */ +export enum KnownVirtualNetworkGatewayMigrationPhase { + /** No migration phase set on gateway. */ + None = "None", + /** Gateway is going through prepare migration or prepare has failed. Please see state and error details for more information. */ + Prepare = "Prepare", + /** Prepare succeeded on gateway. */ + PrepareSucceeded = "PrepareSucceeded", + /** Gateway is going through execute migration or execute has failed. Please see state and error details for more information. */ + Execute = "Execute", + /** Execute succeeded on gateway. */ + ExecuteSucceeded = "ExecuteSucceeded", + /** Gateway is going through commit migration or commit has failed. Please see state and error details for more information. */ + Commit = "Commit", + /** Commit succeeded, represent migration is complete for the gateway. */ + CommitSucceeded = "CommitSucceeded", + /** Represent abort succeeded on gateway, start with prepare to retrigger migration. */ + AbortSucceeded = "AbortSucceeded", + /** Gateway is going through abort migration or abort has failed. Please see state and error details for more information. */ + Abort = "Abort", +} + +/** + * Represent the current migration phase of gateway. \ + * {@link KnownVirtualNetworkGatewayMigrationPhase} can be used interchangeably with VirtualNetworkGatewayMigrationPhase, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No migration phase set on gateway. \ + * **Prepare**: Gateway is going through prepare migration or prepare has failed. Please see state and error details for more information. \ + * **PrepareSucceeded**: Prepare succeeded on gateway. \ + * **Execute**: Gateway is going through execute migration or execute has failed. Please see state and error details for more information. \ + * **ExecuteSucceeded**: Execute succeeded on gateway. \ + * **Commit**: Gateway is going through commit migration or commit has failed. Please see state and error details for more information. \ + * **CommitSucceeded**: Commit succeeded, represent migration is complete for the gateway. \ + * **AbortSucceeded**: Represent abort succeeded on gateway, start with prepare to retrigger migration. \ + * **Abort**: Gateway is going through abort migration or abort has failed. Please see state and error details for more information. + */ +export type VirtualNetworkGatewayMigrationPhase = string; + +/** VirtualNetworkGatewaySku details. */ +export interface VirtualNetworkGatewaySku { + /** Gateway SKU name. */ + name?: VirtualNetworkGatewaySkuName; + /** Gateway SKU tier. */ + tier?: VirtualNetworkGatewaySkuTier; + /** The capacity. */ + readonly capacity?: number; +} + +export function virtualNetworkGatewaySkuSerializer(item: VirtualNetworkGatewaySku): any { + return { name: item["name"], tier: item["tier"] }; +} + +export function virtualNetworkGatewaySkuDeserializer(item: any): VirtualNetworkGatewaySku { + return { + name: item["name"], + tier: item["tier"], + capacity: item["capacity"], + }; +} + +/** Gateway SKU name. */ +export enum KnownVirtualNetworkGatewaySkuName { + /** Basic */ + Basic = "Basic", + /** HighPerformance */ + HighPerformance = "HighPerformance", + /** Standard */ + Standard = "Standard", + /** UltraPerformance */ + UltraPerformance = "UltraPerformance", + /** VpnGw1 */ + VpnGw1 = "VpnGw1", + /** VpnGw2 */ + VpnGw2 = "VpnGw2", + /** VpnGw3 */ + VpnGw3 = "VpnGw3", + /** VpnGw4 */ + VpnGw4 = "VpnGw4", + /** VpnGw5 */ + VpnGw5 = "VpnGw5", + /** VpnGw1AZ */ + VpnGw1AZ = "VpnGw1AZ", + /** VpnGw2AZ */ + VpnGw2AZ = "VpnGw2AZ", + /** VpnGw3AZ */ + VpnGw3AZ = "VpnGw3AZ", + /** VpnGw4AZ */ + VpnGw4AZ = "VpnGw4AZ", + /** VpnGw5AZ */ + VpnGw5AZ = "VpnGw5AZ", + /** ErGw1AZ */ + ErGw1AZ = "ErGw1AZ", + /** ErGw2AZ */ + ErGw2AZ = "ErGw2AZ", + /** ErGw3AZ */ + ErGw3AZ = "ErGw3AZ", + /** ErGwScale */ + ErGwScale = "ErGwScale", +} + +/** + * Gateway SKU name. \ + * {@link KnownVirtualNetworkGatewaySkuName} can be used interchangeably with VirtualNetworkGatewaySkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic**: Basic \ + * **HighPerformance**: HighPerformance \ + * **Standard**: Standard \ + * **UltraPerformance**: UltraPerformance \ + * **VpnGw1**: VpnGw1 \ + * **VpnGw2**: VpnGw2 \ + * **VpnGw3**: VpnGw3 \ + * **VpnGw4**: VpnGw4 \ + * **VpnGw5**: VpnGw5 \ + * **VpnGw1AZ**: VpnGw1AZ \ + * **VpnGw2AZ**: VpnGw2AZ \ + * **VpnGw3AZ**: VpnGw3AZ \ + * **VpnGw4AZ**: VpnGw4AZ \ + * **VpnGw5AZ**: VpnGw5AZ \ + * **ErGw1AZ**: ErGw1AZ \ + * **ErGw2AZ**: ErGw2AZ \ + * **ErGw3AZ**: ErGw3AZ \ + * **ErGwScale**: ErGwScale + */ +export type VirtualNetworkGatewaySkuName = string; + +/** Gateway SKU tier. */ +export enum KnownVirtualNetworkGatewaySkuTier { + /** Basic */ + Basic = "Basic", + /** HighPerformance */ + HighPerformance = "HighPerformance", + /** Standard */ + Standard = "Standard", + /** UltraPerformance */ + UltraPerformance = "UltraPerformance", + /** VpnGw1 */ + VpnGw1 = "VpnGw1", + /** VpnGw2 */ + VpnGw2 = "VpnGw2", + /** VpnGw3 */ + VpnGw3 = "VpnGw3", + /** VpnGw4 */ + VpnGw4 = "VpnGw4", + /** VpnGw5 */ + VpnGw5 = "VpnGw5", + /** VpnGw1AZ */ + VpnGw1AZ = "VpnGw1AZ", + /** VpnGw2AZ */ + VpnGw2AZ = "VpnGw2AZ", + /** VpnGw3AZ */ + VpnGw3AZ = "VpnGw3AZ", + /** VpnGw4AZ */ + VpnGw4AZ = "VpnGw4AZ", + /** VpnGw5AZ */ + VpnGw5AZ = "VpnGw5AZ", + /** ErGw1AZ */ + ErGw1AZ = "ErGw1AZ", + /** ErGw2AZ */ + ErGw2AZ = "ErGw2AZ", + /** ErGw3AZ */ + ErGw3AZ = "ErGw3AZ", + /** ErGwScale */ + ErGwScale = "ErGwScale", +} + +/** + * Gateway SKU tier. \ + * {@link KnownVirtualNetworkGatewaySkuTier} can be used interchangeably with VirtualNetworkGatewaySkuTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic**: Basic \ + * **HighPerformance**: HighPerformance \ + * **Standard**: Standard \ + * **UltraPerformance**: UltraPerformance \ + * **VpnGw1**: VpnGw1 \ + * **VpnGw2**: VpnGw2 \ + * **VpnGw3**: VpnGw3 \ + * **VpnGw4**: VpnGw4 \ + * **VpnGw5**: VpnGw5 \ + * **VpnGw1AZ**: VpnGw1AZ \ + * **VpnGw2AZ**: VpnGw2AZ \ + * **VpnGw3AZ**: VpnGw3AZ \ + * **VpnGw4AZ**: VpnGw4AZ \ + * **VpnGw5AZ**: VpnGw5AZ \ + * **ErGw1AZ**: ErGw1AZ \ + * **ErGw2AZ**: ErGw2AZ \ + * **ErGw3AZ**: ErGw3AZ \ + * **ErGwScale**: ErGwScale + */ +export type VirtualNetworkGatewaySkuTier = string; + +/** VpnClientConfiguration for P2S client. */ +export interface VpnClientConfiguration { + /** The reference to the address space resource which represents Address space for P2S VpnClient. */ + vpnClientAddressPool?: AddressSpace; + /** VpnClientRootCertificate for virtual network gateway. */ + vpnClientRootCertificates?: VpnClientRootCertificate[]; + /** VpnClientRevokedCertificate for Virtual network gateway. */ + vpnClientRevokedCertificates?: VpnClientRevokedCertificate[]; + /** VpnClientProtocols for Virtual network gateway. */ + vpnClientProtocols?: VpnClientProtocol[]; + /** VPN authentication types for the virtual network gateway.. */ + vpnAuthenticationTypes?: VpnAuthenticationType[]; + /** VpnClientIpsecPolicies for virtual network gateway P2S client. */ + vpnClientIpsecPolicies?: IpsecPolicy[]; + /** The radius server address property of the VirtualNetworkGateway resource for vpn client connection. */ + radiusServerAddress?: string; + /** The radius secret property of the VirtualNetworkGateway resource for vpn client connection. We will no longer return radiusServerSecret in VirtualNetworkGateway Create/Update/Get/List/UpdateTags APIs response. Please use VirtualNetworkGateway ListRadiusSecrets API to fetch radius server secrets. */ + radiusServerSecret?: string; + /** The radiusServers property for multiple radius server configuration. */ + radiusServers?: RadiusServer[]; + /** The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. */ + aadTenant?: string; + /** The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. */ + aadAudience?: string; + /** The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. */ + aadIssuer?: string; + /** per ip address pool connection policy for virtual network gateway P2S client. */ + vngClientConnectionConfigurations?: VngClientConnectionConfiguration[]; +} + +export function vpnClientConfigurationSerializer(item: VpnClientConfiguration): any { + return { + vpnClientAddressPool: !item["vpnClientAddressPool"] + ? item["vpnClientAddressPool"] + : addressSpaceSerializer(item["vpnClientAddressPool"]), + vpnClientRootCertificates: !item["vpnClientRootCertificates"] + ? item["vpnClientRootCertificates"] + : vpnClientRootCertificateArraySerializer(item["vpnClientRootCertificates"]), + vpnClientRevokedCertificates: !item["vpnClientRevokedCertificates"] + ? item["vpnClientRevokedCertificates"] + : vpnClientRevokedCertificateArraySerializer(item["vpnClientRevokedCertificates"]), + vpnClientProtocols: !item["vpnClientProtocols"] + ? item["vpnClientProtocols"] + : item["vpnClientProtocols"].map((p: any) => { + return p; + }), + vpnAuthenticationTypes: !item["vpnAuthenticationTypes"] + ? item["vpnAuthenticationTypes"] + : item["vpnAuthenticationTypes"].map((p: any) => { + return p; + }), + vpnClientIpsecPolicies: !item["vpnClientIpsecPolicies"] + ? item["vpnClientIpsecPolicies"] + : ipsecPolicyArraySerializer(item["vpnClientIpsecPolicies"]), + radiusServerAddress: item["radiusServerAddress"], + radiusServerSecret: item["radiusServerSecret"], + radiusServers: !item["radiusServers"] + ? item["radiusServers"] + : radiusServerArraySerializer(item["radiusServers"]), + aadTenant: item["aadTenant"], + aadAudience: item["aadAudience"], + aadIssuer: item["aadIssuer"], + vngClientConnectionConfigurations: !item["vngClientConnectionConfigurations"] + ? item["vngClientConnectionConfigurations"] + : vngClientConnectionConfigurationArraySerializer(item["vngClientConnectionConfigurations"]), + }; +} + +export function vpnClientConfigurationDeserializer(item: any): VpnClientConfiguration { + return { + vpnClientAddressPool: !item["vpnClientAddressPool"] + ? item["vpnClientAddressPool"] + : addressSpaceDeserializer(item["vpnClientAddressPool"]), + vpnClientRootCertificates: !item["vpnClientRootCertificates"] + ? item["vpnClientRootCertificates"] + : vpnClientRootCertificateArrayDeserializer(item["vpnClientRootCertificates"]), + vpnClientRevokedCertificates: !item["vpnClientRevokedCertificates"] + ? item["vpnClientRevokedCertificates"] + : vpnClientRevokedCertificateArrayDeserializer(item["vpnClientRevokedCertificates"]), + vpnClientProtocols: !item["vpnClientProtocols"] + ? item["vpnClientProtocols"] + : item["vpnClientProtocols"].map((p: any) => { + return p; + }), + vpnAuthenticationTypes: !item["vpnAuthenticationTypes"] + ? item["vpnAuthenticationTypes"] + : item["vpnAuthenticationTypes"].map((p: any) => { + return p; + }), + vpnClientIpsecPolicies: !item["vpnClientIpsecPolicies"] + ? item["vpnClientIpsecPolicies"] + : ipsecPolicyArrayDeserializer(item["vpnClientIpsecPolicies"]), + radiusServerAddress: item["radiusServerAddress"], + radiusServerSecret: item["radiusServerSecret"], + radiusServers: !item["radiusServers"] + ? item["radiusServers"] + : radiusServerArrayDeserializer(item["radiusServers"]), + aadTenant: item["aadTenant"], + aadAudience: item["aadAudience"], + aadIssuer: item["aadIssuer"], + vngClientConnectionConfigurations: !item["vngClientConnectionConfigurations"] + ? item["vngClientConnectionConfigurations"] + : vngClientConnectionConfigurationArrayDeserializer( + item["vngClientConnectionConfigurations"], + ), + }; +} + +export function vpnClientRootCertificateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnClientRootCertificateSerializer(item); + }); +} + +export function vpnClientRootCertificateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnClientRootCertificateDeserializer(item); + }); +} + +/** VPN client root certificate of virtual network gateway. */ +export interface VpnClientRootCertificate extends 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. */ + readonly etag?: string; + /** The certificate public data. */ + publicCertData: string; + /** The provisioning state of the VPN client root certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function vpnClientRootCertificateSerializer(item: VpnClientRootCertificate): any { + return { + id: item["id"], + properties: _vpnClientRootCertificatePropertiesSerializer(item), + name: item["name"], + }; +} + +export function vpnClientRootCertificateDeserializer(item: any): VpnClientRootCertificate { + return { + id: item["id"], + ..._vpnClientRootCertificatePropertiesDeserializer(item["properties"]), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of SSL certificates of application gateway. */ +export interface VpnClientRootCertificatePropertiesFormat { + /** The certificate public data. */ + publicCertData: string; + /** The provisioning state of the VPN client root certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function vpnClientRootCertificatePropertiesFormatSerializer( + item: VpnClientRootCertificatePropertiesFormat, +): any { + return { publicCertData: item["publicCertData"] }; +} + +export function vpnClientRootCertificatePropertiesFormatDeserializer( + item: any, +): VpnClientRootCertificatePropertiesFormat { + return { + publicCertData: item["publicCertData"], + provisioningState: item["provisioningState"], + }; +} + +export function vpnClientRevokedCertificateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnClientRevokedCertificateSerializer(item); + }); +} + +export function vpnClientRevokedCertificateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnClientRevokedCertificateDeserializer(item); + }); +} + +/** VPN client revoked certificate of virtual network gateway. */ +export interface VpnClientRevokedCertificate extends 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. */ + readonly etag?: string; + /** The revoked VPN client certificate thumbprint. */ + thumbprint?: string; + /** The provisioning state of the VPN client revoked certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function vpnClientRevokedCertificateSerializer(item: VpnClientRevokedCertificate): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["thumbprint"]) + ? undefined + : _vpnClientRevokedCertificatePropertiesSerializer(item), + name: item["name"], + }; +} + +export function vpnClientRevokedCertificateDeserializer(item: any): VpnClientRevokedCertificate { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _vpnClientRevokedCertificatePropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of the revoked VPN client certificate of virtual network gateway. */ +export interface VpnClientRevokedCertificatePropertiesFormat { + /** The revoked VPN client certificate thumbprint. */ + thumbprint?: string; + /** The provisioning state of the VPN client revoked certificate resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function vpnClientRevokedCertificatePropertiesFormatSerializer( + item: VpnClientRevokedCertificatePropertiesFormat, +): any { + return { thumbprint: item["thumbprint"] }; +} + +export function vpnClientRevokedCertificatePropertiesFormatDeserializer( + item: any, +): VpnClientRevokedCertificatePropertiesFormat { + return { + thumbprint: item["thumbprint"], + provisioningState: item["provisioningState"], + }; +} + +/** VPN client protocol enabled for the virtual network gateway. */ +export enum KnownVpnClientProtocol { + /** IkeV2 */ + IkeV2 = "IkeV2", + /** SSTP */ + Sstp = "SSTP", + /** OpenVPN */ + OpenVPN = "OpenVPN", +} + +/** + * VPN client protocol enabled for the virtual network gateway. \ + * {@link KnownVpnClientProtocol} can be used interchangeably with VpnClientProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IkeV2**: IkeV2 \ + * **SSTP**: SSTP \ + * **OpenVPN**: OpenVPN + */ +export type VpnClientProtocol = string; + +/** VPN authentication types enabled for the virtual network gateway. */ +export enum KnownVpnAuthenticationType { + /** Certificate */ + Certificate = "Certificate", + /** Radius */ + Radius = "Radius", + /** AAD */ + AAD = "AAD", +} + +/** + * VPN authentication types enabled for the virtual network gateway. \ + * {@link KnownVpnAuthenticationType} can be used interchangeably with VpnAuthenticationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Certificate**: Certificate \ + * **Radius**: Radius \ + * **AAD**: AAD + */ +export type VpnAuthenticationType = string; + +export function ipsecPolicyArraySerializer(result: Array): any[] { + return result.map((item) => { + return ipsecPolicySerializer(item); + }); +} + +export function ipsecPolicyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ipsecPolicyDeserializer(item); + }); +} + +/** An IPSec Policy configuration for a virtual network gateway connection. */ +export interface IpsecPolicy { + /** The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. */ + saLifeTimeSeconds: number; + /** The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. */ + saDataSizeKilobytes: number; + /** The IPSec encryption algorithm (IKE phase 1). */ + ipsecEncryption: IpsecEncryption; + /** The IPSec integrity algorithm (IKE phase 1). */ + ipsecIntegrity: IpsecIntegrity; + /** The IKE encryption algorithm (IKE phase 2). */ + ikeEncryption: IkeEncryption; + /** The IKE integrity algorithm (IKE phase 2). */ + ikeIntegrity: IkeIntegrity; + /** The DH Group used in IKE Phase 1 for initial SA. */ + dhGroup: DhGroup; + /** The Pfs Group used in IKE Phase 2 for new child SA. */ + pfsGroup: PfsGroup; +} + +export function ipsecPolicySerializer(item: IpsecPolicy): any { + return { + saLifeTimeSeconds: item["saLifeTimeSeconds"], + saDataSizeKilobytes: item["saDataSizeKilobytes"], + ipsecEncryption: item["ipsecEncryption"], + ipsecIntegrity: item["ipsecIntegrity"], + ikeEncryption: item["ikeEncryption"], + ikeIntegrity: item["ikeIntegrity"], + dhGroup: item["dhGroup"], + pfsGroup: item["pfsGroup"], + }; +} + +export function ipsecPolicyDeserializer(item: any): IpsecPolicy { + return { + saLifeTimeSeconds: item["saLifeTimeSeconds"], + saDataSizeKilobytes: item["saDataSizeKilobytes"], + ipsecEncryption: item["ipsecEncryption"], + ipsecIntegrity: item["ipsecIntegrity"], + ikeEncryption: item["ikeEncryption"], + ikeIntegrity: item["ikeIntegrity"], + dhGroup: item["dhGroup"], + pfsGroup: item["pfsGroup"], + }; +} + +/** The IPSec encryption algorithm (IKE phase 1). */ +export enum KnownIpsecEncryption { + /** None */ + None = "None", + /** DES */ + DES = "DES", + /** DES3 */ + DES3 = "DES3", + /** AES128 */ + AES128 = "AES128", + /** AES192 */ + AES192 = "AES192", + /** AES256 */ + AES256 = "AES256", + /** GCMAES128 */ + Gcmaes128 = "GCMAES128", + /** GCMAES192 */ + Gcmaes192 = "GCMAES192", + /** GCMAES256 */ + Gcmaes256 = "GCMAES256", +} + +/** + * The IPSec encryption algorithm (IKE phase 1). \ + * {@link KnownIpsecEncryption} can be used interchangeably with IpsecEncryption, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **DES**: DES \ + * **DES3**: DES3 \ + * **AES128**: AES128 \ + * **AES192**: AES192 \ + * **AES256**: AES256 \ + * **GCMAES128**: GCMAES128 \ + * **GCMAES192**: GCMAES192 \ + * **GCMAES256**: GCMAES256 + */ +export type IpsecEncryption = string; + +/** The IPSec integrity algorithm (IKE phase 1). */ +export enum KnownIpsecIntegrity { + /** MD5 */ + MD5 = "MD5", + /** SHA1 */ + SHA1 = "SHA1", + /** SHA256 */ + SHA256 = "SHA256", + /** GCMAES128 */ + Gcmaes128 = "GCMAES128", + /** GCMAES192 */ + Gcmaes192 = "GCMAES192", + /** GCMAES256 */ + Gcmaes256 = "GCMAES256", +} + +/** + * The IPSec integrity algorithm (IKE phase 1). \ + * {@link KnownIpsecIntegrity} can be used interchangeably with IpsecIntegrity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MD5**: MD5 \ + * **SHA1**: SHA1 \ + * **SHA256**: SHA256 \ + * **GCMAES128**: GCMAES128 \ + * **GCMAES192**: GCMAES192 \ + * **GCMAES256**: GCMAES256 + */ +export type IpsecIntegrity = string; + +/** The IKE encryption algorithm (IKE phase 2). */ +export enum KnownIkeEncryption { + /** DES */ + DES = "DES", + /** DES3 */ + DES3 = "DES3", + /** AES128 */ + AES128 = "AES128", + /** AES192 */ + AES192 = "AES192", + /** AES256 */ + AES256 = "AES256", + /** GCMAES256 */ + Gcmaes256 = "GCMAES256", + /** GCMAES128 */ + Gcmaes128 = "GCMAES128", +} + +/** + * The IKE encryption algorithm (IKE phase 2). \ + * {@link KnownIkeEncryption} can be used interchangeably with IkeEncryption, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DES**: DES \ + * **DES3**: DES3 \ + * **AES128**: AES128 \ + * **AES192**: AES192 \ + * **AES256**: AES256 \ + * **GCMAES256**: GCMAES256 \ + * **GCMAES128**: GCMAES128 + */ +export type IkeEncryption = string; + +/** The IKE integrity algorithm (IKE phase 2). */ +export enum KnownIkeIntegrity { + /** MD5 */ + MD5 = "MD5", + /** SHA1 */ + SHA1 = "SHA1", + /** SHA256 */ + SHA256 = "SHA256", + /** SHA384 */ + SHA384 = "SHA384", + /** GCMAES256 */ + Gcmaes256 = "GCMAES256", + /** GCMAES128 */ + Gcmaes128 = "GCMAES128", +} + +/** + * The IKE integrity algorithm (IKE phase 2). \ + * {@link KnownIkeIntegrity} can be used interchangeably with IkeIntegrity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MD5**: MD5 \ + * **SHA1**: SHA1 \ + * **SHA256**: SHA256 \ + * **SHA384**: SHA384 \ + * **GCMAES256**: GCMAES256 \ + * **GCMAES128**: GCMAES128 + */ +export type IkeIntegrity = string; + +/** The DH Groups used in IKE Phase 1 for initial SA. */ +export enum KnownDhGroup { + /** None */ + None = "None", + /** DHGroup1 */ + DHGroup1 = "DHGroup1", + /** DHGroup2 */ + DHGroup2 = "DHGroup2", + /** DHGroup14 */ + DHGroup14 = "DHGroup14", + /** DHGroup2048 */ + DHGroup2048 = "DHGroup2048", + /** ECP256 */ + ECP256 = "ECP256", + /** ECP384 */ + ECP384 = "ECP384", + /** DHGroup24 */ + DHGroup24 = "DHGroup24", +} + +/** + * The DH Groups used in IKE Phase 1 for initial SA. \ + * {@link KnownDhGroup} can be used interchangeably with DhGroup, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **DHGroup1**: DHGroup1 \ + * **DHGroup2**: DHGroup2 \ + * **DHGroup14**: DHGroup14 \ + * **DHGroup2048**: DHGroup2048 \ + * **ECP256**: ECP256 \ + * **ECP384**: ECP384 \ + * **DHGroup24**: DHGroup24 + */ +export type DhGroup = string; + +/** The Pfs Groups used in IKE Phase 2 for new child SA. */ +export enum KnownPfsGroup { + /** None */ + None = "None", + /** PFS1 */ + PFS1 = "PFS1", + /** PFS2 */ + PFS2 = "PFS2", + /** PFS2048 */ + PFS2048 = "PFS2048", + /** ECP256 */ + ECP256 = "ECP256", + /** ECP384 */ + ECP384 = "ECP384", + /** PFS24 */ + PFS24 = "PFS24", + /** PFS14 */ + PFS14 = "PFS14", + /** PFSMM */ + Pfsmm = "PFSMM", +} + +/** + * The Pfs Groups used in IKE Phase 2 for new child SA. \ + * {@link KnownPfsGroup} can be used interchangeably with PfsGroup, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **PFS1**: PFS1 \ + * **PFS2**: PFS2 \ + * **PFS2048**: PFS2048 \ + * **ECP256**: ECP256 \ + * **ECP384**: ECP384 \ + * **PFS24**: PFS24 \ + * **PFS14**: PFS14 \ + * **PFSMM**: PFSMM + */ +export type PfsGroup = string; + +export function radiusServerArraySerializer(result: Array): any[] { + return result.map((item) => { + return radiusServerSerializer(item); + }); +} + +export function radiusServerArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return radiusServerDeserializer(item); + }); +} + +/** Radius Server Settings. */ +export interface RadiusServer { + /** The address of this radius server. */ + radiusServerAddress: string; + /** The initial score assigned to this radius server. */ + radiusServerScore?: number; + /** The secret used for this radius server. We will no longer return radiusServerSecret in VirtualNetworkGateway Create/Update/Get/List/UpdateTags APIs response. Please use VirtualNetworkGateway ListRadiusSecrets API to fetch radius server secrets. */ + radiusServerSecret?: string; +} + +export function radiusServerSerializer(item: RadiusServer): any { + return { + radiusServerAddress: item["radiusServerAddress"], + radiusServerScore: item["radiusServerScore"], + radiusServerSecret: item["radiusServerSecret"], + }; +} + +export function radiusServerDeserializer(item: any): RadiusServer { + return { + radiusServerAddress: item["radiusServerAddress"], + radiusServerScore: item["radiusServerScore"], + radiusServerSecret: item["radiusServerSecret"], + }; +} + +export function vngClientConnectionConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return vngClientConnectionConfigurationSerializer(item); + }); +} + +export function vngClientConnectionConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vngClientConnectionConfigurationDeserializer(item); + }); +} + +/** A vpn client connection configuration for client connection configuration. */ +export interface VngClientConnectionConfiguration extends 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. */ + readonly etag?: string; + /** The reference to the address space resource which represents Address space for P2S VpnClient. */ + vpnClientAddressPool?: AddressSpace; + /** List of references to virtualNetworkGatewayPolicyGroups */ + virtualNetworkGatewayPolicyGroups?: SubResource[]; + /** The provisioning state of the VngClientConnectionConfiguration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function vngClientConnectionConfigurationSerializer( + item: VngClientConnectionConfiguration, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "vpnClientAddressPool", + "virtualNetworkGatewayPolicyGroups", + ]) + ? undefined + : _vngClientConnectionConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function vngClientConnectionConfigurationDeserializer( + item: any, +): VngClientConnectionConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _vngClientConnectionConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of VngClientConnectionConfiguration. */ +export interface VngClientConnectionConfigurationProperties { + /** The reference to the address space resource which represents Address space for P2S VpnClient. */ + vpnClientAddressPool: AddressSpace; + /** List of references to virtualNetworkGatewayPolicyGroups */ + virtualNetworkGatewayPolicyGroups: SubResource[]; + /** The provisioning state of the VngClientConnectionConfiguration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function vngClientConnectionConfigurationPropertiesSerializer( + item: VngClientConnectionConfigurationProperties, +): any { + return { + vpnClientAddressPool: addressSpaceSerializer(item["vpnClientAddressPool"]), + virtualNetworkGatewayPolicyGroups: subResourceArraySerializer( + item["virtualNetworkGatewayPolicyGroups"], + ), + }; +} + +export function vngClientConnectionConfigurationPropertiesDeserializer( + item: any, +): VngClientConnectionConfigurationProperties { + return { + vpnClientAddressPool: addressSpaceDeserializer(item["vpnClientAddressPool"]), + virtualNetworkGatewayPolicyGroups: subResourceArrayDeserializer( + item["virtualNetworkGatewayPolicyGroups"], + ), + provisioningState: item["provisioningState"], + }; +} + +export function virtualNetworkGatewayPolicyGroupArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayPolicyGroupSerializer(item); + }); +} + +export function virtualNetworkGatewayPolicyGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayPolicyGroupDeserializer(item); + }); +} + +/** Parameters for VirtualNetworkGatewayPolicyGroup. */ +export interface VirtualNetworkGatewayPolicyGroup extends 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. */ + readonly etag?: string; + /** Shows if this is a Default VirtualNetworkGatewayPolicyGroup or not. */ + isDefault?: boolean; + /** Priority for VirtualNetworkGatewayPolicyGroup. */ + priority?: number; + /** Multiple PolicyMembers for VirtualNetworkGatewayPolicyGroup. */ + policyMembers?: VirtualNetworkGatewayPolicyGroupMember[]; + /** List of references to vngClientConnectionConfigurations. */ + readonly vngClientConnectionConfigurations?: SubResource[]; + /** The provisioning state of the VirtualNetworkGatewayPolicyGroup resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualNetworkGatewayPolicyGroupSerializer( + item: VirtualNetworkGatewayPolicyGroup, +): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["isDefault", "priority", "policyMembers"]) + ? undefined + : _virtualNetworkGatewayPolicyGroupPropertiesSerializer(item), + name: item["name"], + }; +} + +export function virtualNetworkGatewayPolicyGroupDeserializer( + item: any, +): VirtualNetworkGatewayPolicyGroup { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _virtualNetworkGatewayPolicyGroupPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Properties of VirtualNetworkGatewayPolicyGroup. */ +export interface VirtualNetworkGatewayPolicyGroupProperties { + /** Shows if this is a Default VirtualNetworkGatewayPolicyGroup or not. */ + isDefault: boolean; + /** Priority for VirtualNetworkGatewayPolicyGroup. */ + priority: number; + /** Multiple PolicyMembers for VirtualNetworkGatewayPolicyGroup. */ + policyMembers: VirtualNetworkGatewayPolicyGroupMember[]; + /** List of references to vngClientConnectionConfigurations. */ + readonly vngClientConnectionConfigurations?: SubResource[]; + /** The provisioning state of the VirtualNetworkGatewayPolicyGroup resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualNetworkGatewayPolicyGroupPropertiesSerializer( + item: VirtualNetworkGatewayPolicyGroupProperties, +): any { + return { + isDefault: item["isDefault"], + priority: item["priority"], + policyMembers: virtualNetworkGatewayPolicyGroupMemberArraySerializer(item["policyMembers"]), + }; +} + +export function virtualNetworkGatewayPolicyGroupPropertiesDeserializer( + item: any, +): VirtualNetworkGatewayPolicyGroupProperties { + return { + isDefault: item["isDefault"], + priority: item["priority"], + policyMembers: virtualNetworkGatewayPolicyGroupMemberArrayDeserializer(item["policyMembers"]), + vngClientConnectionConfigurations: !item["vngClientConnectionConfigurations"] + ? item["vngClientConnectionConfigurations"] + : subResourceArrayDeserializer(item["vngClientConnectionConfigurations"]), + provisioningState: item["provisioningState"], + }; +} + +export function virtualNetworkGatewayPolicyGroupMemberArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayPolicyGroupMemberSerializer(item); + }); +} + +export function virtualNetworkGatewayPolicyGroupMemberArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayPolicyGroupMemberDeserializer(item); + }); +} + +/** Vpn Client Connection configuration PolicyGroup member */ +export interface VirtualNetworkGatewayPolicyGroupMember { + /** Name of the VirtualNetworkGatewayPolicyGroupMember. */ + name?: string; + /** The Vpn Policy member attribute type. */ + attributeType?: VpnPolicyMemberAttributeType; + /** The value of Attribute used for this VirtualNetworkGatewayPolicyGroupMember. */ + attributeValue?: string; +} + +export function virtualNetworkGatewayPolicyGroupMemberSerializer( + item: VirtualNetworkGatewayPolicyGroupMember, +): any { + return { + name: item["name"], + attributeType: item["attributeType"], + attributeValue: item["attributeValue"], + }; +} + +export function virtualNetworkGatewayPolicyGroupMemberDeserializer( + item: any, +): VirtualNetworkGatewayPolicyGroupMember { + return { + name: item["name"], + attributeType: item["attributeType"], + attributeValue: item["attributeValue"], + }; +} + +/** The Vpn Policy member attribute type. */ +export enum KnownVpnPolicyMemberAttributeType { + /** CertificateGroupId */ + CertificateGroupId = "CertificateGroupId", + /** AADGroupId */ + AADGroupId = "AADGroupId", + /** RadiusAzureGroupId */ + RadiusAzureGroupId = "RadiusAzureGroupId", +} + +/** + * The Vpn Policy member attribute type. \ + * {@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**: CertificateGroupId \ + * **AADGroupId**: AADGroupId \ + * **RadiusAzureGroupId**: RadiusAzureGroupId + */ +export type VpnPolicyMemberAttributeType = string; + +/** BGP settings details. */ +export interface BgpSettings { + /** The BGP speaker's ASN. */ + asn?: number; + /** The BGP peering address and BGP identifier of this BGP speaker. */ + bgpPeeringAddress?: string; + /** The weight added to routes learned from this BGP speaker. */ + peerWeight?: number; + /** BGP peering address with IP configuration ID for virtual network gateway. */ + bgpPeeringAddresses?: IPConfigurationBgpPeeringAddress[]; +} + +export function bgpSettingsSerializer(item: BgpSettings): any { + return { + asn: item["asn"], + bgpPeeringAddress: item["bgpPeeringAddress"], + peerWeight: item["peerWeight"], + bgpPeeringAddresses: !item["bgpPeeringAddresses"] + ? item["bgpPeeringAddresses"] + : ipConfigurationBgpPeeringAddressArraySerializer(item["bgpPeeringAddresses"]), + }; +} + +export function bgpSettingsDeserializer(item: any): BgpSettings { + return { + asn: item["asn"], + bgpPeeringAddress: item["bgpPeeringAddress"], + peerWeight: item["peerWeight"], + bgpPeeringAddresses: !item["bgpPeeringAddresses"] + ? item["bgpPeeringAddresses"] + : ipConfigurationBgpPeeringAddressArrayDeserializer(item["bgpPeeringAddresses"]), + }; +} + +export function ipConfigurationBgpPeeringAddressArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return ipConfigurationBgpPeeringAddressSerializer(item); + }); +} + +export function ipConfigurationBgpPeeringAddressArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return ipConfigurationBgpPeeringAddressDeserializer(item); + }); +} + +/** Properties of IPConfigurationBgpPeeringAddress. */ +export interface IPConfigurationBgpPeeringAddress { + /** The ID of IP configuration which belongs to gateway. */ + ipconfigurationId?: string; + /** The list of default BGP peering addresses which belong to IP configuration. */ + readonly defaultBgpIpAddresses?: string[]; + /** The list of custom BGP peering addresses which belong to IP configuration. */ + customBgpIpAddresses?: string[]; + /** The list of tunnel public IP addresses which belong to IP configuration. */ + readonly tunnelIpAddresses?: string[]; +} + +export function ipConfigurationBgpPeeringAddressSerializer( + item: IPConfigurationBgpPeeringAddress, +): any { + return { + ipconfigurationId: item["ipconfigurationId"], + customBgpIpAddresses: !item["customBgpIpAddresses"] + ? item["customBgpIpAddresses"] + : item["customBgpIpAddresses"].map((p: any) => { + return p; + }), + }; +} + +export function ipConfigurationBgpPeeringAddressDeserializer( + item: any, +): IPConfigurationBgpPeeringAddress { + return { + ipconfigurationId: item["ipconfigurationId"], + defaultBgpIpAddresses: !item["defaultBgpIpAddresses"] + ? item["defaultBgpIpAddresses"] + : item["defaultBgpIpAddresses"].map((p: any) => { + return p; + }), + customBgpIpAddresses: !item["customBgpIpAddresses"] + ? item["customBgpIpAddresses"] + : item["customBgpIpAddresses"].map((p: any) => { + return p; + }), + tunnelIpAddresses: !item["tunnelIpAddresses"] + ? item["tunnelIpAddresses"] + : item["tunnelIpAddresses"].map((p: any) => { + return p; + }), + }; +} + +export function virtualNetworkGatewayNatRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayNatRuleSerializer(item); + }); +} + +export function virtualNetworkGatewayNatRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayNatRuleDeserializer(item); + }); +} + +/** VirtualNetworkGatewayNatRule Resource. */ +export interface VirtualNetworkGatewayNatRule extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The provisioning state of the NAT Rule resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The type of NAT rule for VPN NAT. */ + typePropertiesType?: VpnNatRuleType; + /** The Source NAT direction of a VPN NAT. */ + mode?: VpnNatRuleMode; + /** The private IP address internal mapping for NAT. */ + internalMappings?: VpnNatRuleMapping[]; + /** The private IP address external mapping for NAT. */ + externalMappings?: VpnNatRuleMapping[]; + /** The IP Configuration ID this NAT rule applies to. */ + ipConfigurationId?: string; +} + +export function virtualNetworkGatewayNatRuleSerializer(item: VirtualNetworkGatewayNatRule): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "type", + "mode", + "internalMappings", + "externalMappings", + "ipConfigurationId", + ]) + ? undefined + : _virtualNetworkGatewayNatRulePropertiesSerializer(item), + }; +} + +export function virtualNetworkGatewayNatRuleDeserializer(item: any): VirtualNetworkGatewayNatRule { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _virtualNetworkGatewayNatRulePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Parameters for VirtualNetworkGatewayNatRule. */ +export interface VirtualNetworkGatewayNatRuleProperties { + /** The provisioning state of the NAT Rule resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The type of NAT rule for VPN NAT. */ + type?: VpnNatRuleType; + /** The Source NAT direction of a VPN NAT. */ + mode?: VpnNatRuleMode; + /** The private IP address internal mapping for NAT. */ + internalMappings?: VpnNatRuleMapping[]; + /** The private IP address external mapping for NAT. */ + externalMappings?: VpnNatRuleMapping[]; + /** The IP Configuration ID this NAT rule applies to. */ + ipConfigurationId?: string; +} + +export function virtualNetworkGatewayNatRulePropertiesSerializer( + item: VirtualNetworkGatewayNatRuleProperties, +): any { + return { + type: item["type"], + mode: item["mode"], + internalMappings: !item["internalMappings"] + ? item["internalMappings"] + : vpnNatRuleMappingArraySerializer(item["internalMappings"]), + externalMappings: !item["externalMappings"] + ? item["externalMappings"] + : vpnNatRuleMappingArraySerializer(item["externalMappings"]), + ipConfigurationId: item["ipConfigurationId"], + }; +} + +export function virtualNetworkGatewayNatRulePropertiesDeserializer( + item: any, +): VirtualNetworkGatewayNatRuleProperties { + return { + provisioningState: item["provisioningState"], + type: item["type"], + mode: item["mode"], + internalMappings: !item["internalMappings"] + ? item["internalMappings"] + : vpnNatRuleMappingArrayDeserializer(item["internalMappings"]), + externalMappings: !item["externalMappings"] + ? item["externalMappings"] + : vpnNatRuleMappingArrayDeserializer(item["externalMappings"]), + ipConfigurationId: item["ipConfigurationId"], + }; +} + +/** The type of NAT rule for VPN NAT. */ +export enum KnownVpnNatRuleType { + /** Static */ + Static = "Static", + /** Dynamic */ + Dynamic = "Dynamic", +} + +/** + * The type of NAT rule for VPN NAT. \ + * {@link KnownVpnNatRuleType} can be used interchangeably with VpnNatRuleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Static**: Static \ + * **Dynamic**: Dynamic + */ +export type VpnNatRuleType = string; + +/** The Source NAT direction of a VPN NAT. */ +export enum KnownVpnNatRuleMode { + /** EgressSnat */ + EgressSnat = "EgressSnat", + /** IngressSnat */ + IngressSnat = "IngressSnat", +} + +/** + * The Source NAT direction of a VPN NAT. \ + * {@link KnownVpnNatRuleMode} can be used interchangeably with VpnNatRuleMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **EgressSnat**: EgressSnat \ + * **IngressSnat**: IngressSnat + */ +export type VpnNatRuleMode = string; + +export function vpnNatRuleMappingArraySerializer(result: Array): any[] { + return result.map((item) => { + return vpnNatRuleMappingSerializer(item); + }); +} + +export function vpnNatRuleMappingArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vpnNatRuleMappingDeserializer(item); + }); +} + +/** Vpn NatRule mapping. */ +export interface VpnNatRuleMapping { + /** Address space for Vpn NatRule mapping. */ + addressSpace?: string; + /** Port range for Vpn NatRule mapping. */ + portRange?: string; +} + +export function vpnNatRuleMappingSerializer(item: VpnNatRuleMapping): any { + return { addressSpace: item["addressSpace"], portRange: item["portRange"] }; +} + +export function vpnNatRuleMappingDeserializer(item: any): VpnNatRuleMapping { + return { + addressSpace: item["addressSpace"], + portRange: item["portRange"], + }; +} + +/** Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the vnet */ +export enum KnownAdminState { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the vnet \ + * {@link KnownAdminState} can be used interchangeably with AdminState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Enabled \ + * **Disabled**: Disabled + */ +export type AdminState = string; + +/** Property to indicate if the Express Route Gateway has resiliency model of MultiHomed or SingleHomed */ +export enum KnownResiliencyModel { + /** SingleHomed */ + SingleHomed = "SingleHomed", + /** MultiHomed */ + MultiHomed = "MultiHomed", +} + +/** + * Property to indicate if the Express Route Gateway has resiliency model of MultiHomed or SingleHomed \ + * {@link KnownResiliencyModel} can be used interchangeably with ResiliencyModel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SingleHomed**: SingleHomed \ + * **MultiHomed**: MultiHomed + */ +export type ResiliencyModel = string; + +export function virtualNetworkGatewayArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualNetworkGatewaySerializer(item); + }); +} + +export function virtualNetworkGatewayArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayDeserializer(item); + }); +} + +/** Response for the VirtualNetworkGatewayListConnections API service call. */ +export interface _VirtualNetworkGatewayListConnectionsResult { + /** The VirtualNetworkGatewayConnectionListEntity items on this page */ + value: VirtualNetworkGatewayConnectionListEntity[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualNetworkGatewayListConnectionsResultDeserializer( + item: any, +): _VirtualNetworkGatewayListConnectionsResult { + return { + value: virtualNetworkGatewayConnectionListEntityArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function virtualNetworkGatewayConnectionListEntityArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayConnectionListEntityDeserializer(item); + }); +} + +/** A common class for general resource information. */ +export interface VirtualNetworkGatewayConnectionListEntity extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The authorizationKey. */ + authorizationKey?: string; + /** The reference to virtual network gateway resource. */ + virtualNetworkGateway1: VirtualNetworkConnectionGatewayReference; + /** The reference to virtual network gateway resource. */ + virtualNetworkGateway2?: VirtualNetworkConnectionGatewayReference; + /** The reference to local network gateway resource. */ + localNetworkGateway2?: VirtualNetworkConnectionGatewayReference; + /** Gateway connection type. */ + connectionType: VirtualNetworkGatewayConnectionType; + /** Connection protocol used for this connection. */ + connectionProtocol?: VirtualNetworkGatewayConnectionProtocol; + /** The routing weight. */ + routingWeight?: number; + /** The connection mode for this connection. */ + connectionMode?: VirtualNetworkGatewayConnectionMode; + /** The IPSec shared key. We will no longer return sharedKey in VirtualNetworkGatewayConnection Create/Update/Get/List/UpdateTags APIs response. Please use VirtualNetworkGatewayConnection GetSharedKey API to fetch connection sharedKey. */ + sharedKey?: string; + /** Virtual Network Gateway connection status. */ + readonly connectionStatus?: VirtualNetworkGatewayConnectionStatus; + /** Collection of all tunnels' connection health status. */ + readonly tunnelConnectionStatus?: TunnelConnectionHealth[]; + /** The egress bytes transferred in this connection. */ + readonly egressBytesTransferred?: number; + /** The ingress bytes transferred in this connection. */ + readonly ingressBytesTransferred?: number; + /** The reference to peerings 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. */ + ipsecPolicies?: IpsecPolicy[]; + /** The Traffic Selector Policies to be considered by this connection. */ + trafficSelectorPolicies?: TrafficSelectorPolicy[]; + /** The resource GUID property of the virtual network gateway connection resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the virtual network gateway connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Bypass ExpressRoute Gateway for data forwarding. */ + expressRouteGatewayBypass?: boolean; + /** Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled. */ + enablePrivateLinkFastPath?: boolean; + /** The routing configuration indicating the associated and propagated route tables for this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function virtualNetworkGatewayConnectionListEntityDeserializer( + item: any, +): VirtualNetworkGatewayConnectionListEntity { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ..._virtualNetworkGatewayConnectionListEntityPropertiesDeserializer(item["properties"]), + etag: item["etag"], + }; +} + +/** VirtualNetworkGatewayConnection properties. */ +export interface VirtualNetworkGatewayConnectionListEntityPropertiesFormat { + /** The authorizationKey. */ + authorizationKey?: string; + /** The reference to virtual network gateway resource. */ + virtualNetworkGateway1: VirtualNetworkConnectionGatewayReference; + /** The reference to virtual network gateway resource. */ + virtualNetworkGateway2?: VirtualNetworkConnectionGatewayReference; + /** The reference to local network gateway resource. */ + localNetworkGateway2?: VirtualNetworkConnectionGatewayReference; + /** Gateway connection type. */ + connectionType: VirtualNetworkGatewayConnectionType; + /** Connection protocol used for this connection. */ + connectionProtocol?: VirtualNetworkGatewayConnectionProtocol; + /** The routing weight. */ + routingWeight?: number; + /** The connection mode for this connection. */ + connectionMode?: VirtualNetworkGatewayConnectionMode; + /** The IPSec shared key. We will no longer return sharedKey in VirtualNetworkGatewayConnection Create/Update/Get/List/UpdateTags APIs response. Please use VirtualNetworkGatewayConnection GetSharedKey API to fetch connection sharedKey. */ + sharedKey?: string; + /** Virtual Network Gateway connection status. */ + readonly connectionStatus?: VirtualNetworkGatewayConnectionStatus; + /** Collection of all tunnels' connection health status. */ + readonly tunnelConnectionStatus?: TunnelConnectionHealth[]; + /** The egress bytes transferred in this connection. */ + readonly egressBytesTransferred?: number; + /** The ingress bytes transferred in this connection. */ + readonly ingressBytesTransferred?: number; + /** The reference to peerings 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. */ + ipsecPolicies?: IpsecPolicy[]; + /** The Traffic Selector Policies to be considered by this connection. */ + trafficSelectorPolicies?: TrafficSelectorPolicy[]; + /** The resource GUID property of the virtual network gateway connection resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the virtual network gateway connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Bypass ExpressRoute Gateway for data forwarding. */ + expressRouteGatewayBypass?: boolean; + /** Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled. */ + enablePrivateLinkFastPath?: boolean; + /** The routing configuration indicating the associated and propagated route tables for this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function virtualNetworkGatewayConnectionListEntityPropertiesFormatDeserializer( + item: any, +): VirtualNetworkGatewayConnectionListEntityPropertiesFormat { + return { + authorizationKey: item["authorizationKey"], + virtualNetworkGateway1: virtualNetworkConnectionGatewayReferenceDeserializer( + item["virtualNetworkGateway1"], + ), + virtualNetworkGateway2: !item["virtualNetworkGateway2"] + ? item["virtualNetworkGateway2"] + : virtualNetworkConnectionGatewayReferenceDeserializer(item["virtualNetworkGateway2"]), + localNetworkGateway2: !item["localNetworkGateway2"] + ? item["localNetworkGateway2"] + : virtualNetworkConnectionGatewayReferenceDeserializer(item["localNetworkGateway2"]), + connectionType: item["connectionType"], + connectionProtocol: item["connectionProtocol"], + routingWeight: item["routingWeight"], + connectionMode: item["connectionMode"], + sharedKey: item["sharedKey"], + connectionStatus: item["connectionStatus"], + tunnelConnectionStatus: !item["tunnelConnectionStatus"] + ? item["tunnelConnectionStatus"] + : tunnelConnectionHealthArrayDeserializer(item["tunnelConnectionStatus"]), + egressBytesTransferred: item["egressBytesTransferred"], + ingressBytesTransferred: item["ingressBytesTransferred"], + peer: !item["peer"] ? item["peer"] : subResourceDeserializer(item["peer"]), + enableBgp: item["enableBgp"], + gatewayCustomBgpIpAddresses: !item["gatewayCustomBgpIpAddresses"] + ? item["gatewayCustomBgpIpAddresses"] + : gatewayCustomBgpIpAddressIpConfigurationArrayDeserializer( + item["gatewayCustomBgpIpAddresses"], + ), + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArrayDeserializer(item["ipsecPolicies"]), + trafficSelectorPolicies: !item["trafficSelectorPolicies"] + ? item["trafficSelectorPolicies"] + : trafficSelectorPolicyArrayDeserializer(item["trafficSelectorPolicies"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + expressRouteGatewayBypass: item["expressRouteGatewayBypass"], + enablePrivateLinkFastPath: item["enablePrivateLinkFastPath"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +/** A reference to VirtualNetworkGateway or LocalNetworkGateway resource. */ +export interface VirtualNetworkConnectionGatewayReference { + /** The ID of VirtualNetworkGateway or LocalNetworkGateway resource. */ + id: string; +} + +export function virtualNetworkConnectionGatewayReferenceDeserializer( + item: any, +): VirtualNetworkConnectionGatewayReference { + return { + id: item["id"], + }; +} + +/** Gateway connection type. */ +export enum KnownVirtualNetworkGatewayConnectionType { + /** IPsec */ + IPsec = "IPsec", + /** Vnet2Vnet */ + Vnet2Vnet = "Vnet2Vnet", + /** ExpressRoute */ + ExpressRoute = "ExpressRoute", + /** VPNClient */ + VPNClient = "VPNClient", +} + +/** + * Gateway connection type. \ + * {@link KnownVirtualNetworkGatewayConnectionType} can be used interchangeably with VirtualNetworkGatewayConnectionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPsec**: IPsec \ + * **Vnet2Vnet**: Vnet2Vnet \ + * **ExpressRoute**: ExpressRoute \ + * **VPNClient**: VPNClient + */ +export type VirtualNetworkGatewayConnectionType = string; + +/** Gateway connection protocol. */ +export enum KnownVirtualNetworkGatewayConnectionProtocol { + /** IKEv2 */ + IKEv2 = "IKEv2", + /** IKEv1 */ + IKEv1 = "IKEv1", +} + +/** + * Gateway connection protocol. \ + * {@link KnownVirtualNetworkGatewayConnectionProtocol} can be used interchangeably with VirtualNetworkGatewayConnectionProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IKEv2**: IKEv2 \ + * **IKEv1**: IKEv1 + */ +export type VirtualNetworkGatewayConnectionProtocol = string; + +/** Gateway connection type. */ +export enum KnownVirtualNetworkGatewayConnectionMode { + /** Default */ + Default = "Default", + /** ResponderOnly */ + ResponderOnly = "ResponderOnly", + /** InitiatorOnly */ + InitiatorOnly = "InitiatorOnly", +} + +/** + * Gateway connection type. \ + * {@link KnownVirtualNetworkGatewayConnectionMode} can be used interchangeably with VirtualNetworkGatewayConnectionMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default**: Default \ + * **ResponderOnly**: ResponderOnly \ + * **InitiatorOnly**: InitiatorOnly + */ +export type VirtualNetworkGatewayConnectionMode = string; + +/** Virtual Network Gateway connection status. */ +export enum KnownVirtualNetworkGatewayConnectionStatus { + /** Unknown */ + Unknown = "Unknown", + /** Connecting */ + Connecting = "Connecting", + /** Connected */ + Connected = "Connected", + /** NotConnected */ + NotConnected = "NotConnected", +} + +/** + * Virtual Network Gateway connection status. \ + * {@link KnownVirtualNetworkGatewayConnectionStatus} can be used interchangeably with VirtualNetworkGatewayConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **Connecting**: Connecting \ + * **Connected**: Connected \ + * **NotConnected**: NotConnected + */ +export type VirtualNetworkGatewayConnectionStatus = string; + +export function tunnelConnectionHealthArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return tunnelConnectionHealthDeserializer(item); + }); +} + +/** VirtualNetworkGatewayConnection properties. */ +export interface TunnelConnectionHealth { + /** Tunnel name. */ + readonly tunnel?: string; + /** Virtual Network Gateway connection status. */ + readonly connectionStatus?: VirtualNetworkGatewayConnectionStatus; + /** The Ingress Bytes Transferred in this connection. */ + readonly ingressBytesTransferred?: number; + /** The Egress Bytes Transferred in this connection. */ + readonly egressBytesTransferred?: number; + /** The time at which connection was established in Utc format. */ + readonly lastConnectionEstablishedUtcTime?: string; +} + +export function tunnelConnectionHealthDeserializer(item: any): TunnelConnectionHealth { + return { + tunnel: item["tunnel"], + connectionStatus: item["connectionStatus"], + ingressBytesTransferred: item["ingressBytesTransferred"], + egressBytesTransferred: item["egressBytesTransferred"], + lastConnectionEstablishedUtcTime: item["lastConnectionEstablishedUtcTime"], + }; +} + +export function gatewayCustomBgpIpAddressIpConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayCustomBgpIpAddressIpConfigurationSerializer(item); + }); +} + +export function gatewayCustomBgpIpAddressIpConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayCustomBgpIpAddressIpConfigurationDeserializer(item); + }); +} + +/** 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; +} + +export function gatewayCustomBgpIpAddressIpConfigurationSerializer( + item: GatewayCustomBgpIpAddressIpConfiguration, +): any { + return { + ipConfigurationId: item["ipConfigurationId"], + customBgpIpAddress: item["customBgpIpAddress"], + }; +} + +export function gatewayCustomBgpIpAddressIpConfigurationDeserializer( + item: any, +): GatewayCustomBgpIpAddressIpConfiguration { + return { + ipConfigurationId: item["ipConfigurationId"], + customBgpIpAddress: item["customBgpIpAddress"], + }; +} + +export function trafficSelectorPolicyArraySerializer(result: Array): any[] { + return result.map((item) => { + return trafficSelectorPolicySerializer(item); + }); +} + +export function trafficSelectorPolicyArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return trafficSelectorPolicyDeserializer(item); + }); +} + +/** An traffic selector policy for a virtual network gateway connection. */ +export interface TrafficSelectorPolicy { + /** A collection of local address spaces in CIDR format. */ + localAddressRanges: string[]; + /** A collection of remote address spaces in CIDR format. */ + remoteAddressRanges: string[]; +} + +export function trafficSelectorPolicySerializer(item: TrafficSelectorPolicy): any { + return { + localAddressRanges: item["localAddressRanges"].map((p: any) => { + return p; + }), + remoteAddressRanges: item["remoteAddressRanges"].map((p: any) => { + return p; + }), + }; +} + +export function trafficSelectorPolicyDeserializer(item: any): TrafficSelectorPolicy { + return { + localAddressRanges: item["localAddressRanges"].map((p: any) => { + return p; + }), + remoteAddressRanges: item["remoteAddressRanges"].map((p: any) => { + return p; + }), + }; +} + +/** Vpn Client Parameters for package generation. */ +export interface VpnClientParameters { + /** VPN client Processor Architecture. */ + processorArchitecture?: ProcessorArchitecture; + /** VPN client authentication method. */ + authenticationMethod?: AuthenticationMethod; + /** The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. */ + radiusServerAuthCertificate?: string; + /** A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. */ + clientRootCertificates?: string[]; +} + +export function vpnClientParametersSerializer(item: VpnClientParameters): any { + return { + processorArchitecture: item["processorArchitecture"], + authenticationMethod: item["authenticationMethod"], + radiusServerAuthCertificate: item["radiusServerAuthCertificate"], + clientRootCertificates: !item["clientRootCertificates"] + ? item["clientRootCertificates"] + : item["clientRootCertificates"].map((p: any) => { + return p; + }), + }; +} + +/** VPN client Processor Architecture. */ +export enum KnownProcessorArchitecture { + /** Amd64 */ + Amd64 = "Amd64", + /** X86 */ + X86 = "X86", +} + +/** + * VPN client Processor Architecture. \ + * {@link KnownProcessorArchitecture} can be used interchangeably with ProcessorArchitecture, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Amd64**: Amd64 \ + * **X86**: X86 + */ +export type ProcessorArchitecture = string; + +/** Response for list BGP peer status API service call. */ +export interface BgpPeerStatusListResult { + /** List of BGP peers. */ + value?: BgpPeerStatus[]; +} + +export function bgpPeerStatusListResultDeserializer(item: any): BgpPeerStatusListResult { + return { + value: !item["value"] ? item["value"] : bgpPeerStatusArrayDeserializer(item["value"]), + }; +} + +export function bgpPeerStatusArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return bgpPeerStatusDeserializer(item); + }); +} + +/** BGP peer status details. */ +export interface BgpPeerStatus { + /** The virtual network gateway's local address. */ + readonly localAddress?: string; + /** The remote BGP peer. */ + readonly neighbor?: string; + /** The autonomous system number of the remote BGP peer. */ + readonly asn?: number; + /** The BGP peer state. */ + readonly state?: BgpPeerState; + /** For how long the peering has been up. */ + readonly connectedDuration?: string; + /** The number of routes learned from this peer. */ + readonly routesReceived?: number; + /** The number of BGP messages sent. */ + readonly messagesSent?: number; + /** The number of BGP messages received. */ + readonly messagesReceived?: number; +} + +export function bgpPeerStatusDeserializer(item: any): BgpPeerStatus { + return { + localAddress: item["localAddress"], + neighbor: item["neighbor"], + asn: item["asn"], + state: item["state"], + connectedDuration: item["connectedDuration"], + routesReceived: item["routesReceived"], + messagesSent: item["messagesSent"], + messagesReceived: item["messagesReceived"], + }; +} + +/** The BGP peer state. */ +export enum KnownBgpPeerState { + /** Unknown */ + Unknown = "Unknown", + /** Stopped */ + Stopped = "Stopped", + /** Idle */ + Idle = "Idle", + /** Connecting */ + Connecting = "Connecting", + /** Connected */ + Connected = "Connected", +} + +/** + * The BGP peer state. \ + * {@link KnownBgpPeerState} can be used interchangeably with BgpPeerState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **Stopped**: Stopped \ + * **Idle**: Idle \ + * **Connecting**: Connecting \ + * **Connected**: Connected + */ +export type BgpPeerState = string; + +/** List of Radius servers with respective radius secrets. */ +export interface RadiusAuthServerListResult { + /** The RadiusAuthServer items on this page */ + value: RadiusAuthServer[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function radiusAuthServerListResultDeserializer(item: any): RadiusAuthServerListResult { + return { + value: radiusAuthServerArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function radiusAuthServerArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return radiusAuthServerDeserializer(item); + }); +} + +/** Gateway or VpnServerConfiguration Radius server with radius secret details */ +export interface RadiusAuthServer { + /** Radius server IPAddress */ + radiusServerAddress?: string; + /** Radius server secret */ + radiusServerSecret?: string; +} + +export function radiusAuthServerDeserializer(item: any): RadiusAuthServer { + return { + radiusServerAddress: item["radiusServerAddress"], + radiusServerSecret: item["radiusServerSecret"], + }; +} + +/** List of virtual network gateway routes. */ +export interface GatewayRouteListResult { + /** List of gateway routes. */ + value?: GatewayRoute[]; +} + +export function gatewayRouteListResultDeserializer(item: any): GatewayRouteListResult { + return { + value: !item["value"] ? item["value"] : gatewayRouteArrayDeserializer(item["value"]), + }; +} + +export function gatewayRouteArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return gatewayRouteDeserializer(item); + }); +} + +/** Gateway routing details. */ +export interface GatewayRoute { + /** The gateway's local address. */ + readonly localAddress?: string; + /** The route's network prefix. */ + readonly network?: string; + /** The route's next hop. */ + readonly nextHop?: string; + /** The peer this route was learned from. */ + readonly sourcePeer?: string; + /** The source this route was learned from. */ + readonly origin?: string; + /** The route's AS path sequence. */ + readonly asPath?: string; + /** The route's weight. */ + readonly weight?: number; +} + +export function gatewayRouteDeserializer(item: any): GatewayRoute { + return { + localAddress: item["localAddress"], + network: item["network"], + nextHop: item["nextHop"], + sourcePeer: item["sourcePeer"], + origin: item["origin"], + asPath: item["asPath"], + weight: item["weight"], + }; +} + +/** Gateway Resiliency Information */ +export interface GatewayResiliencyInformation { + /** Current Resiliency Score for the gateway */ + overallScore?: string; + /** Update in the Resiliency Score for the gateway from the last computed score */ + scoreChange?: string; + /** Minimum increase expected in the score if the at least one of the recommendations is applied for the gateway */ + minScoreFromRecommendations?: string; + /** Maximum increase expected in the score if all of the recommendations are applied for the gateway */ + maxScoreFromRecommendations?: string; + /** Timestamp denoting the last time when the resiliency score was computed for the gateway */ + lastComputedTime?: Date; + /** Timestamp denoting the next eligible time to re-compute the resiliency score for the gateway */ + nextEligibleComputeTime?: Date; + /** List of Resiliency based Recommendation Components for the gateway */ + components?: ResiliencyRecommendationComponents[]; +} + +export function gatewayResiliencyInformationDeserializer(item: any): GatewayResiliencyInformation { + return { + overallScore: item["overallScore"], + scoreChange: item["scoreChange"], + minScoreFromRecommendations: item["minScoreFromRecommendations"], + maxScoreFromRecommendations: item["maxScoreFromRecommendations"], + lastComputedTime: !item["lastComputedTime"] + ? item["lastComputedTime"] + : new Date(item["lastComputedTime"]), + nextEligibleComputeTime: !item["nextEligibleComputeTime"] + ? item["nextEligibleComputeTime"] + : new Date(item["nextEligibleComputeTime"]), + components: !item["components"] + ? item["components"] + : resiliencyRecommendationComponentsArrayDeserializer(item["components"]), + }; +} + +export function resiliencyRecommendationComponentsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return resiliencyRecommendationComponentsDeserializer(item); + }); +} + +/** Gateway Resiliency based Recommendations */ +export interface ResiliencyRecommendationComponents { + /** Name of the Resiliency based Recommendation Component */ + name?: string; + /** Current Score of the gateway */ + currentScore?: string; + /** Max score that the gateway can achieve if the specified recommendation is applied */ + maxScore?: string; + /** List of Gateway Resiliency based Recommendations */ + recommendations?: GatewayResiliencyRecommendation[]; +} + +export function resiliencyRecommendationComponentsDeserializer( + item: any, +): ResiliencyRecommendationComponents { + return { + name: item["name"], + currentScore: item["currentScore"], + maxScore: item["maxScore"], + recommendations: !item["recommendations"] + ? item["recommendations"] + : gatewayResiliencyRecommendationArrayDeserializer(item["recommendations"]), + }; +} + +export function gatewayResiliencyRecommendationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayResiliencyRecommendationDeserializer(item); + }); +} + +/** Resiliency Recommendation details */ +export interface GatewayResiliencyRecommendation { + /** Recommendation Title */ + recommendationTitle?: string; + /** Recommendation Id */ + recommendationId?: string; + /** Impact associated with the recommendation */ + severity?: string; + /** Recommendation details */ + recommendationText?: string; + /** Acton items to apply the recommendation */ + callToActionText?: string; + /** Link to the public documentation for the associated recommendation */ + callToActionLink?: string; +} + +export function gatewayResiliencyRecommendationDeserializer( + item: any, +): GatewayResiliencyRecommendation { + return { + recommendationTitle: item["recommendationTitle"], + recommendationId: item["recommendationId"], + severity: item["severity"], + recommendationText: item["recommendationText"], + callToActionText: item["callToActionText"], + callToActionLink: item["callToActionLink"], + }; +} + +/** Gateway Route Sets Information */ +export interface GatewayRouteSetsInformation { + /** Timestamp denoting the last time when the route sets were computed for the gateway */ + lastComputedTime?: Date; + /** Timestamp denoting the next eligible time to re-compute the route sets for the gateway */ + nextEligibleComputeTime?: Date; + /** Version for the route set */ + routeSetVersion?: string; + /** List of Gateway Route Sets */ + routeSets?: GatewayRouteSet[]; + /** Dictionary containing map of the circuit id and circuit details */ + circuitsMetadataMap?: Record; +} + +export function gatewayRouteSetsInformationDeserializer(item: any): GatewayRouteSetsInformation { + return { + lastComputedTime: !item["lastComputedTime"] + ? item["lastComputedTime"] + : new Date(item["lastComputedTime"]), + nextEligibleComputeTime: !item["nextEligibleComputeTime"] + ? item["nextEligibleComputeTime"] + : new Date(item["nextEligibleComputeTime"]), + routeSetVersion: item["routeSetVersion"], + routeSets: !item["routeSets"] + ? item["routeSets"] + : gatewayRouteSetArrayDeserializer(item["routeSets"]), + circuitsMetadataMap: !item["circuitsMetadataMap"] + ? item["circuitsMetadataMap"] + : circuitMetadataMapRecordDeserializer(item["circuitsMetadataMap"]), + }; +} + +export function gatewayRouteSetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return gatewayRouteSetDeserializer(item); + }); +} + +/** model interface GatewayRouteSet */ +export interface GatewayRouteSet { + /** Route Set name */ + name?: string; + /** List of different locations from where the routes are learned */ + locations?: string[]; + /** List of different Route Sources */ + details?: Record; +} + +export function gatewayRouteSetDeserializer(item: any): GatewayRouteSet { + return { + name: item["name"], + locations: !item["locations"] + ? item["locations"] + : item["locations"].map((p: any) => { + return p; + }), + details: !item["details"] + ? item["details"] + : routeSourceDetailsArrayRecordDeserializer(item["details"]), + }; +} + +export function routeSourceDetailsArrayRecordDeserializer( + item: Record, +): Record> { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : routeSourceDetailsArrayDeserializer(item[key]); + }); + return result; +} + +export function routeSourceDetailsArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return routeSourceDetailsDeserializer(item); + }); +} + +/** model interface RouteSourceDetails */ +export interface RouteSourceDetails { + /** Express Route Circuit identifier */ + circuit?: string; + /** Flag to indicate if the route learned from the primary device is active or passive */ + pri?: string; + /** Flag to indicate if the route learned from the secondary device is active or passive */ + sec?: string; +} + +export function routeSourceDetailsDeserializer(item: any): RouteSourceDetails { + return { + circuit: item["circuit"], + pri: item["pri"], + sec: item["sec"], + }; +} + +export function circuitMetadataMapRecordDeserializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : circuitMetadataMapDeserializer(item[key]); + }); + return result; +} + +/** model interface CircuitMetadataMap */ +export interface CircuitMetadataMap { + /** Express Route Circuit Name */ + name?: string; + /** Link to the Express Route circuit */ + link?: string; + /** Peering location of the Express Route Circuit */ + location?: string; +} + +export function circuitMetadataMapDeserializer(item: any): CircuitMetadataMap { + return { + name: item["name"], + link: item["link"], + location: item["location"], + }; +} + +/** An IPSec parameters for a virtual network gateway P2S connection. */ +export interface VpnClientIPsecParameters { + /** The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. */ + saLifeTimeSeconds: number; + /** The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. */ + saDataSizeKilobytes: number; + /** The IPSec encryption algorithm (IKE phase 1). */ + ipsecEncryption: IpsecEncryption; + /** The IPSec integrity algorithm (IKE phase 1). */ + ipsecIntegrity: IpsecIntegrity; + /** The IKE encryption algorithm (IKE phase 2). */ + ikeEncryption: IkeEncryption; + /** The IKE integrity algorithm (IKE phase 2). */ + ikeIntegrity: IkeIntegrity; + /** The DH Group used in IKE Phase 1 for initial SA. */ + dhGroup: DhGroup; + /** The Pfs Group used in IKE Phase 2 for new child SA. */ + pfsGroup: PfsGroup; +} + +export function vpnClientIPsecParametersSerializer(item: VpnClientIPsecParameters): any { + return { + saLifeTimeSeconds: item["saLifeTimeSeconds"], + saDataSizeKilobytes: item["saDataSizeKilobytes"], + ipsecEncryption: item["ipsecEncryption"], + ipsecIntegrity: item["ipsecIntegrity"], + ikeEncryption: item["ikeEncryption"], + ikeIntegrity: item["ikeIntegrity"], + dhGroup: item["dhGroup"], + pfsGroup: item["pfsGroup"], + }; +} + +export function vpnClientIPsecParametersDeserializer(item: any): VpnClientIPsecParameters { + return { + saLifeTimeSeconds: item["saLifeTimeSeconds"], + saDataSizeKilobytes: item["saDataSizeKilobytes"], + ipsecEncryption: item["ipsecEncryption"], + ipsecIntegrity: item["ipsecIntegrity"], + ikeEncryption: item["ikeEncryption"], + ikeIntegrity: item["ikeIntegrity"], + dhGroup: item["dhGroup"], + pfsGroup: item["pfsGroup"], + }; +} + +/** Start packet capture parameters on virtual network gateway. */ +export interface VpnPacketCaptureStartParameters { + /** Start Packet capture parameters. */ + filterData?: string; +} + +export function vpnPacketCaptureStartParametersSerializer( + item: VpnPacketCaptureStartParameters, +): any { + return { filterData: item["filterData"] }; +} + +/** Stop packet capture parameters. */ +export interface VpnPacketCaptureStopParameters { + /** SAS url for packet capture on virtual network gateway. */ + sasUrl?: string; +} + +export function vpnPacketCaptureStopParametersSerializer( + item: VpnPacketCaptureStopParameters, +): any { + return { sasUrl: item["sasUrl"] }; +} + +/** ExpressRoute failover test details */ +export interface ExpressRouteFailoverTestDetails { + /** Peering location of the test */ + peeringLocation?: string; + /** All circuits in the peering location */ + circuits?: ExpressRouteFailoverCircuitResourceDetails[]; + /** The current status of the test */ + status?: FailoverTestStatus; + /** Time when the test was started */ + startTime?: string; + /** Time when the test was completed */ + endTime?: string; + /** All connections to the circuits in the peering location */ + connections?: ExpressRouteFailoverConnectionResourceDetails[]; + /** The unique GUID associated with the test */ + testGuid?: string; + /** The type of failover test */ + testType?: FailoverTestType; + /** A list of all issues with the test */ + issues?: string[]; +} + +export function expressRouteFailoverTestDetailsDeserializer( + item: any, +): ExpressRouteFailoverTestDetails { + return { + peeringLocation: item["peeringLocation"], + circuits: !item["circuits"] + ? item["circuits"] + : expressRouteFailoverCircuitResourceDetailsArrayDeserializer(item["circuits"]), + status: item["status"], + startTime: item["startTime"], + endTime: item["endTime"], + connections: !item["connections"] + ? item["connections"] + : expressRouteFailoverConnectionResourceDetailsArrayDeserializer(item["connections"]), + testGuid: item["testGuid"], + testType: item["testType"], + issues: !item["issues"] + ? item["issues"] + : item["issues"].map((p: any) => { + return p; + }), + }; +} + +export function expressRouteFailoverCircuitResourceDetailsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteFailoverCircuitResourceDetailsDeserializer(item); + }); +} + +/** model interface ExpressRouteFailoverCircuitResourceDetails */ +export interface ExpressRouteFailoverCircuitResourceDetails { + /** NRP Resource URI of the circuit */ + nrpResourceUri?: string; + /** Circuit Name */ + name?: string; + /** Connection name associated with the circuit */ + connectionName?: string; +} + +export function expressRouteFailoverCircuitResourceDetailsDeserializer( + item: any, +): ExpressRouteFailoverCircuitResourceDetails { + return { + nrpResourceUri: item["nrpResourceUri"], + name: item["name"], + connectionName: item["connectionName"], + }; +} + +export function expressRouteFailoverConnectionResourceDetailsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteFailoverConnectionResourceDetailsDeserializer(item); + }); +} + +/** model interface ExpressRouteFailoverConnectionResourceDetails */ +export interface ExpressRouteFailoverConnectionResourceDetails { + /** NRP Resource URI of the connection */ + nrpResourceUri?: string; + /** Connection Name */ + name?: string; + /** The current status of the connection */ + status?: FailoverConnectionStatus; + /** Time when the connection was last updated */ + lastUpdatedTime?: string; +} + +export function expressRouteFailoverConnectionResourceDetailsDeserializer( + item: any, +): ExpressRouteFailoverConnectionResourceDetails { + return { + nrpResourceUri: item["nrpResourceUri"], + name: item["name"], + status: item["status"], + lastUpdatedTime: item["lastUpdatedTime"], + }; +} + +/** The current status of the connection */ +export enum KnownFailoverConnectionStatus { + /** Connected */ + Connected = "Connected", + /** Disconnected */ + Disconnected = "Disconnected", +} + +/** + * The current status of the connection \ + * {@link KnownFailoverConnectionStatus} can be used interchangeably with FailoverConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Connected**: Connected \ + * **Disconnected**: Disconnected + */ +export type FailoverConnectionStatus = string; + +/** ExpressRoute failover single test details */ +export interface ExpressRouteFailoverSingleTestDetails { + /** Peering location of the test */ + peeringLocation?: string; + /** The current status of the test */ + status?: FailoverTestStatusForSingleTest; + /** Time when the test was started */ + startTimeUtc?: string; + /** Time when the test was completed */ + endTimeUtc?: string; + /** List of routes received from this peering as well as some other peering location */ + redundantRoutes?: ExpressRouteFailoverRedundantRoute[]; + /** List of al the routes that were received only from this peering location */ + nonRedundantRoutes?: string[]; + /** Whether the failover simulation was successful or not */ + wasSimulationSuccessful?: boolean; + /** List of all the failover connections for this peering location */ + failoverConnectionDetails?: FailoverConnectionDetails[]; +} + +export function expressRouteFailoverSingleTestDetailsDeserializer( + item: any, +): ExpressRouteFailoverSingleTestDetails { + return { + peeringLocation: item["peeringLocation"], + status: item["status"], + startTimeUtc: item["startTimeUtc"], + endTimeUtc: item["endTimeUtc"], + redundantRoutes: !item["redundantRoutes"] + ? item["redundantRoutes"] + : expressRouteFailoverRedundantRouteArrayDeserializer(item["redundantRoutes"]), + nonRedundantRoutes: !item["nonRedundantRoutes"] + ? item["nonRedundantRoutes"] + : item["nonRedundantRoutes"].map((p: any) => { + return p; + }), + wasSimulationSuccessful: item["wasSimulationSuccessful"], + failoverConnectionDetails: !item["failoverConnectionDetails"] + ? item["failoverConnectionDetails"] + : failoverConnectionDetailsArrayDeserializer(item["failoverConnectionDetails"]), + }; +} + +/** The current status of the test */ +export enum KnownFailoverTestStatusForSingleTest { + /** NotStarted */ + NotStarted = "NotStarted", + /** Starting */ + Starting = "Starting", + /** Running */ + Running = "Running", + /** StartFailed */ + StartFailed = "StartFailed", + /** Stopping */ + Stopping = "Stopping", + /** Completed */ + Completed = "Completed", + /** StopFailed */ + StopFailed = "StopFailed", + /** Invalid */ + Invalid = "Invalid", + /** Expired */ + Expired = "Expired", +} + +/** + * The current status of the test \ + * {@link KnownFailoverTestStatusForSingleTest} can be used interchangeably with FailoverTestStatusForSingleTest, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted**: NotStarted \ + * **Starting**: Starting \ + * **Running**: Running \ + * **StartFailed**: StartFailed \ + * **Stopping**: Stopping \ + * **Completed**: Completed \ + * **StopFailed**: StopFailed \ + * **Invalid**: Invalid \ + * **Expired**: Expired + */ +export type FailoverTestStatusForSingleTest = string; + +export function expressRouteFailoverRedundantRouteArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteFailoverRedundantRouteDeserializer(item); + }); +} + +/** model interface ExpressRouteFailoverRedundantRoute */ +export interface ExpressRouteFailoverRedundantRoute { + /** A list of all the peering locations for the redundant routes */ + peeringLocations?: string[]; + /** A list of all the redundant routes in the peering locations */ + routes?: string[]; +} + +export function expressRouteFailoverRedundantRouteDeserializer( + item: any, +): ExpressRouteFailoverRedundantRoute { + return { + peeringLocations: !item["peeringLocations"] + ? item["peeringLocations"] + : item["peeringLocations"].map((p: any) => { + return p; + }), + routes: !item["routes"] + ? item["routes"] + : item["routes"].map((p: any) => { + return p; + }), + }; +} + +export function failoverConnectionDetailsArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return failoverConnectionDetailsSerializer(item); + }); +} + +export function failoverConnectionDetailsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return failoverConnectionDetailsDeserializer(item); + }); +} + +/** model interface FailoverConnectionDetails */ +export interface FailoverConnectionDetails { + /** Name of the failover connection */ + failoverConnectionName?: string; + /** Location of the failover connection */ + failoverLocation?: string; + /** Whether the customer was able to establish connectivity through this failover connection or not */ + isVerified?: boolean; +} + +export function failoverConnectionDetailsSerializer(item: FailoverConnectionDetails): any { + return { + failoverConnectionName: item["failoverConnectionName"], + failoverLocation: item["failoverLocation"], + isVerified: item["isVerified"], + }; +} + +export function failoverConnectionDetailsDeserializer(item: any): FailoverConnectionDetails { + return { + failoverConnectionName: item["failoverConnectionName"], + failoverLocation: item["failoverLocation"], + isVerified: item["isVerified"], + }; +} + +/** Start packet capture parameters on virtual network gateway. */ +export interface ExpressRouteFailoverStopApiParameters { + /** Peering location of the test */ + peeringLocation?: string; + /** Whether the failover simulation was successful or not */ + wasSimulationSuccessful?: boolean; + /** List of all the failover connections for this peering location */ + details?: FailoverConnectionDetails[]; +} + +export function expressRouteFailoverStopApiParametersSerializer( + item: ExpressRouteFailoverStopApiParameters, +): any { + return { + peeringLocation: item["peeringLocation"], + wasSimulationSuccessful: item["wasSimulationSuccessful"], + details: !item["details"] + ? item["details"] + : failoverConnectionDetailsArraySerializer(item["details"]), + }; +} + +/** List of virtual network gateway vpn client connection health. */ +export interface VpnClientConnectionHealthDetailListResult { + /** List of vpn client connection health. */ + value?: VpnClientConnectionHealthDetail[]; +} + +export function vpnClientConnectionHealthDetailListResultDeserializer( + item: any, +): VpnClientConnectionHealthDetailListResult { + return { + value: !item["value"] + ? item["value"] + : vpnClientConnectionHealthDetailArrayDeserializer(item["value"]), + }; +} + +export function vpnClientConnectionHealthDetailArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnClientConnectionHealthDetailDeserializer(item); + }); +} + +/** VPN client connection health detail. */ +export interface VpnClientConnectionHealthDetail { + /** The vpn client Id. */ + readonly vpnConnectionId?: string; + /** The duration time of a connected vpn client. */ + readonly vpnConnectionDuration?: number; + /** The start time of a connected vpn client. */ + readonly vpnConnectionTime?: string; + /** The public Ip of a connected vpn client. */ + readonly publicIpAddress?: string; + /** The assigned private Ip of a connected vpn client. */ + readonly privateIpAddress?: string; + /** The user name of a connected vpn client. */ + readonly vpnUserName?: string; + /** The max band width. */ + readonly maxBandwidth?: number; + /** The egress packets per second. */ + readonly egressPacketsTransferred?: number; + /** The egress bytes per second. */ + readonly egressBytesTransferred?: number; + /** The ingress packets per second. */ + readonly ingressPacketsTransferred?: number; + /** The ingress bytes per second. */ + readonly ingressBytesTransferred?: number; + /** The max packets transferred per second. */ + readonly maxPacketsPerSecond?: number; +} + +export function vpnClientConnectionHealthDetailDeserializer( + item: any, +): VpnClientConnectionHealthDetail { + return { + vpnConnectionId: item["vpnConnectionId"], + vpnConnectionDuration: item["vpnConnectionDuration"], + vpnConnectionTime: item["vpnConnectionTime"], + publicIpAddress: item["publicIpAddress"], + privateIpAddress: item["privateIpAddress"], + vpnUserName: item["vpnUserName"], + maxBandwidth: item["maxBandwidth"], + egressPacketsTransferred: item["egressPacketsTransferred"], + egressBytesTransferred: item["egressBytesTransferred"], + ingressPacketsTransferred: item["ingressPacketsTransferred"], + ingressBytesTransferred: item["ingressBytesTransferred"], + maxPacketsPerSecond: item["maxPacketsPerSecond"], + }; +} + +/** List of p2s vpn connections to be disconnected. */ +export interface P2SVpnConnectionRequest { + /** List of p2s vpn connection Ids. */ + vpnConnectionIds?: string[]; +} + +export function p2SVpnConnectionRequestSerializer(item: P2SVpnConnectionRequest): any { + return { + vpnConnectionIds: !item["vpnConnectionIds"] + ? item["vpnConnectionIds"] + : item["vpnConnectionIds"].map((p: any) => { + return p; + }), + }; +} + +/** Virtual network gateway migration parameters. */ +export interface VirtualNetworkGatewayMigrationParameters { + /** MigrationType for the virtual network gateway. */ + migrationType: VirtualNetworkGatewayMigrationType; + /** Resource url that needs to be passed in to migration. */ + resourceUrl?: string; +} + +export function virtualNetworkGatewayMigrationParametersSerializer( + item: VirtualNetworkGatewayMigrationParameters, +): any { + return { migrationType: item["migrationType"], resourceUrl: item["resourceUrl"] }; +} + +/** MigrationType for the virtual network gateway. */ +export enum KnownVirtualNetworkGatewayMigrationType { + /** Indicates that it is a migration process from basic IP CSES to standard IP VMSS. */ + UpgradeDeploymentToStandardIP = "UpgradeDeploymentToStandardIP", +} + +/** + * MigrationType for the virtual network gateway. \ + * {@link KnownVirtualNetworkGatewayMigrationType} can be used interchangeably with VirtualNetworkGatewayMigrationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **UpgradeDeploymentToStandardIP**: Indicates that it is a migration process from basic IP CSES to standard IP VMSS. + */ +export type VirtualNetworkGatewayMigrationType = string; + +/** Vpn device configuration script generation parameters. */ +export interface VpnDeviceScriptParameters { + /** The vendor for the vpn device. */ + vendor?: string; + /** The device family for the vpn device. */ + deviceFamily?: string; + /** The firmware version for the vpn device. */ + firmwareVersion?: string; +} + +export function vpnDeviceScriptParametersSerializer(item: VpnDeviceScriptParameters): any { + return { + vendor: item["vendor"], + deviceFamily: item["deviceFamily"], + firmwareVersion: item["firmwareVersion"], + }; +} + +/** A common class for general resource information. */ +export interface VirtualNetworkGatewayConnection extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The authorizationKey. */ + authorizationKey?: string; + /** The reference to virtual network gateway resource. */ + virtualNetworkGateway1: VirtualNetworkGateway; + /** The reference to virtual network gateway resource. */ + virtualNetworkGateway2?: VirtualNetworkGateway; + /** The reference to local network gateway resource. */ + localNetworkGateway2?: LocalNetworkGateway; + /** List of ingress NatRules. */ + ingressNatRules?: SubResource[]; + /** List of egress NatRules. */ + egressNatRules?: SubResource[]; + /** Gateway connection type. */ + connectionType: VirtualNetworkGatewayConnectionType; + /** Connection protocol used for this connection. */ + connectionProtocol?: VirtualNetworkGatewayConnectionProtocol; + /** The routing weight. */ + routingWeight?: number; + /** The dead peer detection timeout of this connection in seconds. */ + dpdTimeoutSeconds?: number; + /** The connection mode for this connection. */ + connectionMode?: VirtualNetworkGatewayConnectionMode; + /** Tunnel properties for virtual network gateway connection */ + tunnelProperties?: VirtualNetworkGatewayConnectionTunnelProperties[]; + /** The IPSec shared key. */ + sharedKey?: string; + /** Virtual Network Gateway connection status. */ + readonly connectionStatus?: VirtualNetworkGatewayConnectionStatus; + /** Collection of all tunnels' connection health status. */ + readonly tunnelConnectionStatus?: TunnelConnectionHealth[]; + /** The egress bytes transferred in this connection. */ + readonly egressBytesTransferred?: number; + /** The ingress bytes transferred in this connection. */ + readonly ingressBytesTransferred?: number; + /** The reference to peerings 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. */ + usePolicyBasedTrafficSelectors?: boolean; + /** The IPSec Policies to be considered by this connection. */ + ipsecPolicies?: IpsecPolicy[]; + /** The Traffic Selector Policies to be considered by this connection. */ + trafficSelectorPolicies?: TrafficSelectorPolicy[]; + /** The resource GUID property of the virtual network gateway connection resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the virtual network gateway connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Bypass ExpressRoute Gateway for data forwarding. */ + expressRouteGatewayBypass?: boolean; + /** Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled. */ + enablePrivateLinkFastPath?: boolean; + /** Gateway connection authentication type. */ + authenticationType?: ConnectionAuthenticationType; + /** Certificate Authentication information for a certificate based authentication connection. */ + certificateAuthentication?: CertificateAuthentication; + /** The routing configuration indicating the associated and propagated route tables for this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function virtualNetworkGatewayConnectionSerializer( + item: VirtualNetworkGatewayConnection, +): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: _virtualNetworkGatewayConnectionPropertiesSerializer(item), + }; +} + +export function virtualNetworkGatewayConnectionDeserializer( + item: any, +): VirtualNetworkGatewayConnection { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ..._virtualNetworkGatewayConnectionPropertiesDeserializer(item["properties"]), + etag: item["etag"], + }; +} + +/** VirtualNetworkGatewayConnection properties. */ +export interface VirtualNetworkGatewayConnectionPropertiesFormat { + /** The authorizationKey. */ + authorizationKey?: string; + /** The reference to virtual network gateway resource. */ + virtualNetworkGateway1: VirtualNetworkGateway; + /** The reference to virtual network gateway resource. */ + virtualNetworkGateway2?: VirtualNetworkGateway; + /** The reference to local network gateway resource. */ + localNetworkGateway2?: LocalNetworkGateway; + /** List of ingress NatRules. */ + ingressNatRules?: SubResource[]; + /** List of egress NatRules. */ + egressNatRules?: SubResource[]; + /** Gateway connection type. */ + connectionType: VirtualNetworkGatewayConnectionType; + /** Connection protocol used for this connection. */ + connectionProtocol?: VirtualNetworkGatewayConnectionProtocol; + /** The routing weight. */ + routingWeight?: number; + /** The dead peer detection timeout of this connection in seconds. */ + dpdTimeoutSeconds?: number; + /** The connection mode for this connection. */ + connectionMode?: VirtualNetworkGatewayConnectionMode; + /** Tunnel properties for virtual network gateway connection */ + tunnelProperties?: VirtualNetworkGatewayConnectionTunnelProperties[]; + /** The IPSec shared key. */ + sharedKey?: string; + /** Virtual Network Gateway connection status. */ + readonly connectionStatus?: VirtualNetworkGatewayConnectionStatus; + /** Collection of all tunnels' connection health status. */ + readonly tunnelConnectionStatus?: TunnelConnectionHealth[]; + /** The egress bytes transferred in this connection. */ + readonly egressBytesTransferred?: number; + /** The ingress bytes transferred in this connection. */ + readonly ingressBytesTransferred?: number; + /** The reference to peerings 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. */ + usePolicyBasedTrafficSelectors?: boolean; + /** The IPSec Policies to be considered by this connection. */ + ipsecPolicies?: IpsecPolicy[]; + /** The Traffic Selector Policies to be considered by this connection. */ + trafficSelectorPolicies?: TrafficSelectorPolicy[]; + /** The resource GUID property of the virtual network gateway connection resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the virtual network gateway connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Bypass ExpressRoute Gateway for data forwarding. */ + expressRouteGatewayBypass?: boolean; + /** Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled. */ + enablePrivateLinkFastPath?: boolean; + /** Gateway connection authentication type. */ + authenticationType?: ConnectionAuthenticationType; + /** Certificate Authentication information for a certificate based authentication connection. */ + certificateAuthentication?: CertificateAuthentication; + /** The routing configuration indicating the associated and propagated route tables for this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function virtualNetworkGatewayConnectionPropertiesFormatSerializer( + item: VirtualNetworkGatewayConnectionPropertiesFormat, +): any { + return { + authorizationKey: item["authorizationKey"], + virtualNetworkGateway1: virtualNetworkGatewaySerializer(item["virtualNetworkGateway1"]), + virtualNetworkGateway2: !item["virtualNetworkGateway2"] + ? item["virtualNetworkGateway2"] + : virtualNetworkGatewaySerializer(item["virtualNetworkGateway2"]), + localNetworkGateway2: !item["localNetworkGateway2"] + ? item["localNetworkGateway2"] + : localNetworkGatewaySerializer(item["localNetworkGateway2"]), + ingressNatRules: !item["ingressNatRules"] + ? item["ingressNatRules"] + : subResourceArraySerializer(item["ingressNatRules"]), + egressNatRules: !item["egressNatRules"] + ? item["egressNatRules"] + : subResourceArraySerializer(item["egressNatRules"]), + connectionType: item["connectionType"], + connectionProtocol: item["connectionProtocol"], + routingWeight: item["routingWeight"], + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + connectionMode: item["connectionMode"], + tunnelProperties: !item["tunnelProperties"] + ? item["tunnelProperties"] + : virtualNetworkGatewayConnectionTunnelPropertiesArraySerializer(item["tunnelProperties"]), + sharedKey: item["sharedKey"], + peer: !item["peer"] ? item["peer"] : subResourceSerializer(item["peer"]), + enableBgp: item["enableBgp"], + gatewayCustomBgpIpAddresses: !item["gatewayCustomBgpIpAddresses"] + ? item["gatewayCustomBgpIpAddresses"] + : gatewayCustomBgpIpAddressIpConfigurationArraySerializer( + item["gatewayCustomBgpIpAddresses"], + ), + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArraySerializer(item["ipsecPolicies"]), + trafficSelectorPolicies: !item["trafficSelectorPolicies"] + ? item["trafficSelectorPolicies"] + : trafficSelectorPolicyArraySerializer(item["trafficSelectorPolicies"]), + expressRouteGatewayBypass: item["expressRouteGatewayBypass"], + enablePrivateLinkFastPath: item["enablePrivateLinkFastPath"], + authenticationType: item["authenticationType"], + certificateAuthentication: !item["certificateAuthentication"] + ? item["certificateAuthentication"] + : certificateAuthenticationSerializer(item["certificateAuthentication"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function virtualNetworkGatewayConnectionPropertiesFormatDeserializer( + item: any, +): VirtualNetworkGatewayConnectionPropertiesFormat { + return { + authorizationKey: item["authorizationKey"], + virtualNetworkGateway1: virtualNetworkGatewayDeserializer(item["virtualNetworkGateway1"]), + virtualNetworkGateway2: !item["virtualNetworkGateway2"] + ? item["virtualNetworkGateway2"] + : virtualNetworkGatewayDeserializer(item["virtualNetworkGateway2"]), + localNetworkGateway2: !item["localNetworkGateway2"] + ? item["localNetworkGateway2"] + : localNetworkGatewayDeserializer(item["localNetworkGateway2"]), + ingressNatRules: !item["ingressNatRules"] + ? item["ingressNatRules"] + : subResourceArrayDeserializer(item["ingressNatRules"]), + egressNatRules: !item["egressNatRules"] + ? item["egressNatRules"] + : subResourceArrayDeserializer(item["egressNatRules"]), + connectionType: item["connectionType"], + connectionProtocol: item["connectionProtocol"], + routingWeight: item["routingWeight"], + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + connectionMode: item["connectionMode"], + tunnelProperties: !item["tunnelProperties"] + ? item["tunnelProperties"] + : virtualNetworkGatewayConnectionTunnelPropertiesArrayDeserializer(item["tunnelProperties"]), + sharedKey: item["sharedKey"], + connectionStatus: item["connectionStatus"], + tunnelConnectionStatus: !item["tunnelConnectionStatus"] + ? item["tunnelConnectionStatus"] + : tunnelConnectionHealthArrayDeserializer(item["tunnelConnectionStatus"]), + egressBytesTransferred: item["egressBytesTransferred"], + ingressBytesTransferred: item["ingressBytesTransferred"], + peer: !item["peer"] ? item["peer"] : subResourceDeserializer(item["peer"]), + enableBgp: item["enableBgp"], + gatewayCustomBgpIpAddresses: !item["gatewayCustomBgpIpAddresses"] + ? item["gatewayCustomBgpIpAddresses"] + : gatewayCustomBgpIpAddressIpConfigurationArrayDeserializer( + item["gatewayCustomBgpIpAddresses"], + ), + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArrayDeserializer(item["ipsecPolicies"]), + trafficSelectorPolicies: !item["trafficSelectorPolicies"] + ? item["trafficSelectorPolicies"] + : trafficSelectorPolicyArrayDeserializer(item["trafficSelectorPolicies"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + expressRouteGatewayBypass: item["expressRouteGatewayBypass"], + enablePrivateLinkFastPath: item["enablePrivateLinkFastPath"], + authenticationType: item["authenticationType"], + certificateAuthentication: !item["certificateAuthentication"] + ? item["certificateAuthentication"] + : certificateAuthenticationDeserializer(item["certificateAuthentication"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +/** A common class for general resource information. */ +export interface LocalNetworkGateway extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Local network site address space. */ + localNetworkAddressSpace?: AddressSpace; + /** IP address of local network gateway. */ + gatewayIpAddress?: string; + /** FQDN of local network gateway. */ + fqdn?: string; + /** Local network gateway's BGP speaker settings. */ + bgpSettings?: BgpSettings; + /** The resource GUID property of the local network gateway resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the local network gateway resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function localNetworkGatewaySerializer(item: LocalNetworkGateway): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: _localNetworkGatewayPropertiesSerializer(item), + }; +} + +export function localNetworkGatewayDeserializer(item: any): LocalNetworkGateway { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ..._localNetworkGatewayPropertiesDeserializer(item["properties"]), + etag: item["etag"], + }; +} + +/** LocalNetworkGateway properties. */ +export interface LocalNetworkGatewayPropertiesFormat { + /** Local network site address space. */ + localNetworkAddressSpace?: AddressSpace; + /** IP address of local network gateway. */ + gatewayIpAddress?: string; + /** FQDN of local network gateway. */ + fqdn?: string; + /** Local network gateway's BGP speaker settings. */ + bgpSettings?: BgpSettings; + /** The resource GUID property of the local network gateway resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the local network gateway resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function localNetworkGatewayPropertiesFormatSerializer( + item: LocalNetworkGatewayPropertiesFormat, +): any { + return { + localNetworkAddressSpace: !item["localNetworkAddressSpace"] + ? item["localNetworkAddressSpace"] + : addressSpaceSerializer(item["localNetworkAddressSpace"]), + gatewayIpAddress: item["gatewayIpAddress"], + fqdn: item["fqdn"], + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsSerializer(item["bgpSettings"]), + }; +} + +export function localNetworkGatewayPropertiesFormatDeserializer( + item: any, +): LocalNetworkGatewayPropertiesFormat { + return { + localNetworkAddressSpace: !item["localNetworkAddressSpace"] + ? item["localNetworkAddressSpace"] + : addressSpaceDeserializer(item["localNetworkAddressSpace"]), + gatewayIpAddress: item["gatewayIpAddress"], + fqdn: item["fqdn"], + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsDeserializer(item["bgpSettings"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function virtualNetworkGatewayConnectionTunnelPropertiesArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayConnectionTunnelPropertiesSerializer(item); + }); +} + +export function virtualNetworkGatewayConnectionTunnelPropertiesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayConnectionTunnelPropertiesDeserializer(item); + }); +} + +/** model interface VirtualNetworkGatewayConnectionTunnelProperties */ +export interface VirtualNetworkGatewayConnectionTunnelProperties { + /** Tunnel remote IP address */ + tunnelIpAddress?: string; + /** Tunnel BGP peering address */ + bgpPeeringAddress?: string; +} + +export function virtualNetworkGatewayConnectionTunnelPropertiesSerializer( + item: VirtualNetworkGatewayConnectionTunnelProperties, +): any { + return { tunnelIpAddress: item["tunnelIpAddress"], bgpPeeringAddress: item["bgpPeeringAddress"] }; +} + +export function virtualNetworkGatewayConnectionTunnelPropertiesDeserializer( + item: any, +): VirtualNetworkGatewayConnectionTunnelProperties { + return { + tunnelIpAddress: item["tunnelIpAddress"], + bgpPeeringAddress: item["bgpPeeringAddress"], + }; +} + +/** Gateway connection authentication type. */ +export enum KnownConnectionAuthenticationType { + /** Pre-shared key authentication method for VPN gateway connections. */ + PSK = "PSK", + /** Certificate-based authentication method for VPN gateway connections. */ + Certificate = "Certificate", +} + +/** + * Gateway connection authentication type. \ + * {@link KnownConnectionAuthenticationType} can be used interchangeably with ConnectionAuthenticationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PSK**: Pre-shared key authentication method for VPN gateway connections. \ + * **Certificate**: Certificate-based authentication method for VPN gateway connections. + */ +export type ConnectionAuthenticationType = string; + +/** Certificate Authentication information for a certificate based authentication connection. */ +export interface CertificateAuthentication { + /** Keyvault secret ID for outbound authentication certificate. */ + outboundAuthCertificate?: string; + /** Inbound authentication certificate subject name. */ + inboundAuthCertificateSubjectName?: string; + /** Inbound authentication certificate public keys. */ + inboundAuthCertificateChain?: string[]; +} + +export function certificateAuthenticationSerializer(item: CertificateAuthentication): any { + return { + outboundAuthCertificate: item["outboundAuthCertificate"], + inboundAuthCertificateSubjectName: item["inboundAuthCertificateSubjectName"], + inboundAuthCertificateChain: !item["inboundAuthCertificateChain"] + ? item["inboundAuthCertificateChain"] + : item["inboundAuthCertificateChain"].map((p: any) => { + return p; + }), + }; +} + +export function certificateAuthenticationDeserializer(item: any): CertificateAuthentication { + return { + outboundAuthCertificate: item["outboundAuthCertificate"], + inboundAuthCertificateSubjectName: item["inboundAuthCertificateSubjectName"], + inboundAuthCertificateChain: !item["inboundAuthCertificateChain"] + ? item["inboundAuthCertificateChain"] + : item["inboundAuthCertificateChain"].map((p: any) => { + return p; + }), + }; +} + +export function virtualNetworkGatewayConnectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayConnectionSerializer(item); + }); +} + +export function virtualNetworkGatewayConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkGatewayConnectionDeserializer(item); + }); +} + +/** Response for GetConnectionSharedKey API service call. */ +export interface ConnectionSharedKey extends SubResource { + /** The virtual network connection shared key value. */ + value: string; +} + +export function connectionSharedKeySerializer(item: ConnectionSharedKey): any { + return { id: item["id"], value: item["value"] }; +} + +export function connectionSharedKeyDeserializer(item: any): ConnectionSharedKey { + return { + id: item["id"], + value: item["value"], + }; +} + +/** The virtual network connection reset shared key. */ +export interface ConnectionResetSharedKey { + /** The virtual network connection reset shared key length, should between 1 and 128. */ + keyLength: number; +} + +export function connectionResetSharedKeySerializer(item: ConnectionResetSharedKey): any { + return { keyLength: item["keyLength"] }; +} + +export function connectionResetSharedKeyDeserializer(item: any): ConnectionResetSharedKey { + return { + keyLength: item["keyLength"], + }; +} + +export function localNetworkGatewayArraySerializer(result: Array): any[] { + return result.map((item) => { + return localNetworkGatewaySerializer(item); + }); +} + +export function localNetworkGatewayArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return localNetworkGatewayDeserializer(item); + }); +} + +/** Result of the request to list all nat rules to a virtual network gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. */ +export interface _ListVirtualNetworkGatewayNatRulesResult { + /** The VirtualNetworkGatewayNatRule items on this page */ + value: VirtualNetworkGatewayNatRule[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVirtualNetworkGatewayNatRulesResultDeserializer( + item: any, +): _ListVirtualNetworkGatewayNatRulesResult { + return { + value: virtualNetworkGatewayNatRuleArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** VirtualRouter Resource. */ +export interface VirtualRouter extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** VirtualRouter ASN. */ + virtualRouterAsn?: number; + /** VirtualRouter IPs. */ + virtualRouterIps?: string[]; + /** The Subnet on which VirtualRouter is hosted. */ + hostedSubnet?: SubResource; + /** The Gateway on which VirtualRouter is hosted. */ + hostedGateway?: SubResource; + /** List of references to VirtualRouterPeerings. */ + readonly peerings?: SubResource[]; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualRouterSerializer(item: VirtualRouter): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "virtualRouterAsn", + "virtualRouterIps", + "hostedSubnet", + "hostedGateway", + ]) + ? undefined + : _virtualRouterPropertiesSerializer(item), + }; +} + +export function virtualRouterDeserializer(item: any): VirtualRouter { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _virtualRouterPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Virtual Router definition. */ +export interface VirtualRouterPropertiesFormat { + /** VirtualRouter ASN. */ + virtualRouterAsn?: number; + /** VirtualRouter IPs. */ + virtualRouterIps?: string[]; + /** The Subnet on which VirtualRouter is hosted. */ + hostedSubnet?: SubResource; + /** The Gateway on which VirtualRouter is hosted. */ + hostedGateway?: SubResource; + /** List of references to VirtualRouterPeerings. */ + readonly peerings?: SubResource[]; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualRouterPropertiesFormatSerializer(item: VirtualRouterPropertiesFormat): any { + return { + virtualRouterAsn: item["virtualRouterAsn"], + virtualRouterIps: !item["virtualRouterIps"] + ? item["virtualRouterIps"] + : item["virtualRouterIps"].map((p: any) => { + return p; + }), + hostedSubnet: !item["hostedSubnet"] + ? item["hostedSubnet"] + : subResourceSerializer(item["hostedSubnet"]), + hostedGateway: !item["hostedGateway"] + ? item["hostedGateway"] + : subResourceSerializer(item["hostedGateway"]), + }; +} + +export function virtualRouterPropertiesFormatDeserializer( + item: any, +): VirtualRouterPropertiesFormat { + return { + virtualRouterAsn: item["virtualRouterAsn"], + virtualRouterIps: !item["virtualRouterIps"] + ? item["virtualRouterIps"] + : item["virtualRouterIps"].map((p: any) => { + return p; + }), + hostedSubnet: !item["hostedSubnet"] + ? item["hostedSubnet"] + : subResourceDeserializer(item["hostedSubnet"]), + hostedGateway: !item["hostedGateway"] + ? item["hostedGateway"] + : subResourceDeserializer(item["hostedGateway"]), + peerings: !item["peerings"] ? item["peerings"] : subResourceArrayDeserializer(item["peerings"]), + provisioningState: item["provisioningState"], + }; +} + +export function virtualRouterArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualRouterSerializer(item); + }); +} + +export function virtualRouterArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualRouterDeserializer(item); + }); +} + +/** Virtual Router Peering resource. */ +export interface VirtualRouterPeering extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Peer ASN. */ + peerAsn?: number; + /** Peer IP. */ + peerIp?: string; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualRouterPeeringSerializer(item: VirtualRouterPeering): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["peerAsn", "peerIp"]) + ? undefined + : _virtualRouterPeeringPropertiesSerializer(item), + }; +} + +export function virtualRouterPeeringDeserializer(item: any): VirtualRouterPeering { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _virtualRouterPeeringPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the rule group. */ +export interface VirtualRouterPeeringProperties { + /** Peer ASN. */ + peerAsn?: number; + /** Peer IP. */ + peerIp?: string; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualRouterPeeringPropertiesSerializer( + item: VirtualRouterPeeringProperties, +): any { + return { peerAsn: item["peerAsn"], peerIp: item["peerIp"] }; +} + +export function virtualRouterPeeringPropertiesDeserializer( + item: any, +): VirtualRouterPeeringProperties { + return { + peerAsn: item["peerAsn"], + peerIp: item["peerIp"], + provisioningState: item["provisioningState"], + }; +} + +export function virtualRouterPeeringArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualRouterPeeringSerializer(item); + }); +} + +export function virtualRouterPeeringArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualRouterPeeringDeserializer(item); + }); +} + +/** VirtualWAN Resource. */ +export interface VirtualWAN extends TrackedResourceWithSettableIdOptionalLocation { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Vpn encryption to be disabled or not. */ + disableVpnEncryption?: boolean; + /** List of VirtualHubs in the VirtualWAN. */ + readonly virtualHubs?: SubResource[]; + /** List of VpnSites in the VirtualWAN. */ + readonly vpnSites?: SubResource[]; + /** True if branch to branch traffic is allowed. */ + allowBranchToBranchTraffic?: boolean; + /** True if Vnet to Vnet traffic is allowed. */ + allowVnetToVnetTraffic?: boolean; + /** The office local breakout category. */ + readonly office365LocalBreakoutCategory?: OfficeTrafficCategory; + /** The provisioning state of the virtual WAN resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The type of the VirtualWAN. */ + typePropertiesType?: string; +} + +export function virtualWANSerializer(item: VirtualWAN): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "disableVpnEncryption", + "allowBranchToBranchTraffic", + "allowVnetToVnetTraffic", + "type", + ]) + ? undefined + : _virtualWANPropertiesSerializer(item), + }; +} + +export function virtualWANDeserializer(item: any): VirtualWAN { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _virtualWANPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Parameters for VirtualWAN. */ +export interface VirtualWanProperties { + /** Vpn encryption to be disabled or not. */ + disableVpnEncryption?: boolean; + /** List of VirtualHubs in the VirtualWAN. */ + readonly virtualHubs?: SubResource[]; + /** List of VpnSites in the VirtualWAN. */ + readonly vpnSites?: SubResource[]; + /** True if branch to branch traffic is allowed. */ + allowBranchToBranchTraffic?: boolean; + /** True if Vnet to Vnet traffic is allowed. */ + allowVnetToVnetTraffic?: boolean; + /** The office local breakout category. */ + readonly office365LocalBreakoutCategory?: OfficeTrafficCategory; + /** The provisioning state of the virtual WAN resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The type of the VirtualWAN. */ + type?: string; +} + +export function virtualWanPropertiesSerializer(item: VirtualWanProperties): any { + return { + disableVpnEncryption: item["disableVpnEncryption"], + allowBranchToBranchTraffic: item["allowBranchToBranchTraffic"], + allowVnetToVnetTraffic: item["allowVnetToVnetTraffic"], + type: item["type"], + }; +} + +export function virtualWanPropertiesDeserializer(item: any): VirtualWanProperties { + return { + disableVpnEncryption: item["disableVpnEncryption"], + virtualHubs: !item["virtualHubs"] + ? item["virtualHubs"] + : subResourceArrayDeserializer(item["virtualHubs"]), + vpnSites: !item["vpnSites"] ? item["vpnSites"] : subResourceArrayDeserializer(item["vpnSites"]), + allowBranchToBranchTraffic: item["allowBranchToBranchTraffic"], + allowVnetToVnetTraffic: item["allowVnetToVnetTraffic"], + office365LocalBreakoutCategory: item["office365LocalBreakoutCategory"], + provisioningState: item["provisioningState"], + type: item["type"], + }; +} + +/** The office traffic category. */ +export enum KnownOfficeTrafficCategory { + /** Optimize */ + Optimize = "Optimize", + /** OptimizeAndAllow */ + OptimizeAndAllow = "OptimizeAndAllow", + /** All */ + All = "All", + /** None */ + None = "None", +} + +/** + * The office traffic category. \ + * {@link KnownOfficeTrafficCategory} can be used interchangeably with OfficeTrafficCategory, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Optimize**: Optimize \ + * **OptimizeAndAllow**: OptimizeAndAllow \ + * **All**: All \ + * **None**: None + */ +export type OfficeTrafficCategory = string; + +/** Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink to get the next set of results. */ +export interface _ListVirtualWANsResult { + /** The VirtualWAN items on this page */ + value: VirtualWAN[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVirtualWANsResultDeserializer(item: any): _ListVirtualWANsResult { + return { + value: virtualWANArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function virtualWANArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualWANSerializer(item); + }); +} + +export function virtualWANArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualWANDeserializer(item); + }); +} + +/** VpnSite Resource. */ +export interface VpnSite extends TrackedResourceWithSettableIdOptionalLocation { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The VirtualWAN to which the vpnSite belongs. */ + virtualWan?: SubResource; + /** The device properties. */ + deviceProperties?: DeviceProperties; + /** The ip-address for the vpn-site. */ + ipAddress?: string; + /** The key for vpn-site that can be used for connections. */ + siteKey?: string; + /** The AddressSpace that contains an array of IP address ranges. */ + addressSpace?: AddressSpace; + /** The set of bgp properties. */ + bgpProperties?: BgpSettings; + /** The provisioning state of the VPN site resource. */ + readonly provisioningState?: CommonProvisioningState; + /** IsSecuritySite flag. */ + isSecuritySite?: boolean; + /** List of all vpn site links. */ + vpnSiteLinks?: VpnSiteLink[]; + /** Office365 Policy. */ + o365Policy?: O365PolicyProperties; +} + +export function vpnSiteSerializer(item: VpnSite): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "virtualWan", + "deviceProperties", + "ipAddress", + "siteKey", + "addressSpace", + "bgpProperties", + "isSecuritySite", + "vpnSiteLinks", + "o365Policy", + ]) + ? undefined + : _vpnSitePropertiesSerializer(item), + }; +} + +export function vpnSiteDeserializer(item: any): VpnSite { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _vpnSitePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Parameters for VpnSite. */ +export interface VpnSiteProperties { + /** The VirtualWAN to which the vpnSite belongs. */ + virtualWan?: SubResource; + /** The device properties. */ + deviceProperties?: DeviceProperties; + /** The ip-address for the vpn-site. */ + ipAddress?: string; + /** The key for vpn-site that can be used for connections. */ + siteKey?: string; + /** The AddressSpace that contains an array of IP address ranges. */ + addressSpace?: AddressSpace; + /** The set of bgp properties. */ + bgpProperties?: BgpSettings; + /** The provisioning state of the VPN site resource. */ + readonly provisioningState?: CommonProvisioningState; + /** IsSecuritySite flag. */ + isSecuritySite?: boolean; + /** List of all vpn site links. */ + vpnSiteLinks?: VpnSiteLink[]; + /** Office365 Policy. */ + o365Policy?: O365PolicyProperties; +} + +export function vpnSitePropertiesSerializer(item: VpnSiteProperties): any { + return { + virtualWan: !item["virtualWan"] + ? item["virtualWan"] + : subResourceSerializer(item["virtualWan"]), + deviceProperties: !item["deviceProperties"] + ? item["deviceProperties"] + : devicePropertiesSerializer(item["deviceProperties"]), + ipAddress: item["ipAddress"], + siteKey: item["siteKey"], + addressSpace: !item["addressSpace"] + ? item["addressSpace"] + : addressSpaceSerializer(item["addressSpace"]), + bgpProperties: !item["bgpProperties"] + ? item["bgpProperties"] + : bgpSettingsSerializer(item["bgpProperties"]), + isSecuritySite: item["isSecuritySite"], + vpnSiteLinks: !item["vpnSiteLinks"] + ? item["vpnSiteLinks"] + : vpnSiteLinkArraySerializer(item["vpnSiteLinks"]), + o365Policy: !item["o365Policy"] + ? item["o365Policy"] + : o365PolicyPropertiesSerializer(item["o365Policy"]), + }; +} + +export function vpnSitePropertiesDeserializer(item: any): VpnSiteProperties { + return { + virtualWan: !item["virtualWan"] + ? item["virtualWan"] + : subResourceDeserializer(item["virtualWan"]), + deviceProperties: !item["deviceProperties"] + ? item["deviceProperties"] + : devicePropertiesDeserializer(item["deviceProperties"]), + ipAddress: item["ipAddress"], + siteKey: item["siteKey"], + addressSpace: !item["addressSpace"] + ? item["addressSpace"] + : addressSpaceDeserializer(item["addressSpace"]), + bgpProperties: !item["bgpProperties"] + ? item["bgpProperties"] + : bgpSettingsDeserializer(item["bgpProperties"]), + provisioningState: item["provisioningState"], + isSecuritySite: item["isSecuritySite"], + vpnSiteLinks: !item["vpnSiteLinks"] + ? item["vpnSiteLinks"] + : vpnSiteLinkArrayDeserializer(item["vpnSiteLinks"]), + o365Policy: !item["o365Policy"] + ? item["o365Policy"] + : o365PolicyPropertiesDeserializer(item["o365Policy"]), + }; +} + +/** List of properties of the device. */ +export interface DeviceProperties { + /** Name of the device Vendor. */ + deviceVendor?: string; + /** Model of the device. */ + deviceModel?: string; + /** Link speed. */ + linkSpeedInMbps?: number; +} + +export function devicePropertiesSerializer(item: DeviceProperties): any { + return { + deviceVendor: item["deviceVendor"], + deviceModel: item["deviceModel"], + linkSpeedInMbps: item["linkSpeedInMbps"], + }; +} + +export function devicePropertiesDeserializer(item: any): DeviceProperties { + return { + deviceVendor: item["deviceVendor"], + deviceModel: item["deviceModel"], + linkSpeedInMbps: item["linkSpeedInMbps"], + }; +} + +export function vpnSiteLinkArraySerializer(result: Array): any[] { + return result.map((item) => { + return vpnSiteLinkSerializer(item); + }); +} + +export function vpnSiteLinkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vpnSiteLinkDeserializer(item); + }); +} + +/** VpnSiteLink Resource. */ +export interface VpnSiteLink extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The link provider properties. */ + linkProperties?: VpnLinkProviderProperties; + /** The ip-address for the vpn-site-link. */ + ipAddress?: string; + /** FQDN of vpn-site-link. */ + fqdn?: string; + /** The set of bgp properties. */ + bgpProperties?: VpnLinkBgpSettings; + /** The provisioning state of the VPN site link resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function vpnSiteLinkSerializer(item: VpnSiteLink): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["linkProperties", "ipAddress", "fqdn", "bgpProperties"]) + ? undefined + : _vpnSiteLinkPropertiesSerializer(item), + }; +} + +export function vpnSiteLinkDeserializer(item: any): VpnSiteLink { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _vpnSiteLinkPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Parameters for VpnSite. */ +export interface VpnSiteLinkProperties { + /** The link provider properties. */ + linkProperties?: VpnLinkProviderProperties; + /** The ip-address for the vpn-site-link. */ + ipAddress?: string; + /** FQDN of vpn-site-link. */ + fqdn?: string; + /** The set of bgp properties. */ + bgpProperties?: VpnLinkBgpSettings; + /** The provisioning state of the VPN site link resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function vpnSiteLinkPropertiesSerializer(item: VpnSiteLinkProperties): any { + return { + linkProperties: !item["linkProperties"] + ? item["linkProperties"] + : vpnLinkProviderPropertiesSerializer(item["linkProperties"]), + ipAddress: item["ipAddress"], + fqdn: item["fqdn"], + bgpProperties: !item["bgpProperties"] + ? item["bgpProperties"] + : vpnLinkBgpSettingsSerializer(item["bgpProperties"]), + }; +} + +export function vpnSiteLinkPropertiesDeserializer(item: any): VpnSiteLinkProperties { + return { + linkProperties: !item["linkProperties"] + ? item["linkProperties"] + : vpnLinkProviderPropertiesDeserializer(item["linkProperties"]), + ipAddress: item["ipAddress"], + fqdn: item["fqdn"], + bgpProperties: !item["bgpProperties"] + ? item["bgpProperties"] + : vpnLinkBgpSettingsDeserializer(item["bgpProperties"]), + provisioningState: item["provisioningState"], + }; +} + +/** List of properties of a link provider. */ +export interface VpnLinkProviderProperties { + /** Name of the link provider. */ + linkProviderName?: string; + /** Link speed. */ + linkSpeedInMbps?: number; +} + +export function vpnLinkProviderPropertiesSerializer(item: VpnLinkProviderProperties): any { + return { linkProviderName: item["linkProviderName"], linkSpeedInMbps: item["linkSpeedInMbps"] }; +} + +export function vpnLinkProviderPropertiesDeserializer(item: any): VpnLinkProviderProperties { + return { + linkProviderName: item["linkProviderName"], + linkSpeedInMbps: item["linkSpeedInMbps"], + }; +} + +/** BGP settings details for a link. */ +export interface VpnLinkBgpSettings { + /** The BGP speaker's ASN. */ + asn?: number; + /** The BGP peering address and BGP identifier of this BGP speaker. */ + bgpPeeringAddress?: string; +} + +export function vpnLinkBgpSettingsSerializer(item: VpnLinkBgpSettings): any { + return { asn: item["asn"], bgpPeeringAddress: item["bgpPeeringAddress"] }; +} + +export function vpnLinkBgpSettingsDeserializer(item: any): VpnLinkBgpSettings { + return { + asn: item["asn"], + bgpPeeringAddress: item["bgpPeeringAddress"], + }; +} + +/** The Office365 breakout policy. */ +export interface O365PolicyProperties { + /** Office365 breakout categories. */ + breakOutCategories?: O365BreakOutCategoryPolicies; +} + +export function o365PolicyPropertiesSerializer(item: O365PolicyProperties): any { + return { + breakOutCategories: !item["breakOutCategories"] + ? item["breakOutCategories"] + : o365BreakOutCategoryPoliciesSerializer(item["breakOutCategories"]), + }; +} + +export function o365PolicyPropertiesDeserializer(item: any): O365PolicyProperties { + return { + breakOutCategories: !item["breakOutCategories"] + ? item["breakOutCategories"] + : o365BreakOutCategoryPoliciesDeserializer(item["breakOutCategories"]), + }; +} + +/** Office365 breakout categories. */ +export interface O365BreakOutCategoryPolicies { + /** Flag to control allow category. */ + allow?: boolean; + /** Flag to control optimize category. */ + optimize?: boolean; + /** Flag to control default category. */ + default?: boolean; +} + +export function o365BreakOutCategoryPoliciesSerializer(item: O365BreakOutCategoryPolicies): any { + return { allow: item["allow"], optimize: item["optimize"], default: item["default"] }; +} + +export function o365BreakOutCategoryPoliciesDeserializer(item: any): O365BreakOutCategoryPolicies { + return { + allow: item["allow"], + optimize: item["optimize"], + default: item["default"], + }; +} + +/** Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the next set of results. */ +export interface _ListVpnSitesResult { + /** The VpnSite items on this page */ + value: VpnSite[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVpnSitesResultDeserializer(item: any): _ListVpnSitesResult { + return { + value: vpnSiteArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function vpnSiteArraySerializer(result: Array): any[] { + return result.map((item) => { + return vpnSiteSerializer(item); + }); +} + +export function vpnSiteArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vpnSiteDeserializer(item); + }); +} + +/** Result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks and a URL nextLink to get the next set of results. */ +export interface _ListVpnSiteLinksResult { + /** The VpnSiteLink items on this page */ + value: VpnSiteLink[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVpnSiteLinksResultDeserializer(item: any): _ListVpnSiteLinksResult { + return { + value: vpnSiteLinkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** VpnServerConfiguration Resource. */ +export interface VpnServerConfiguration extends TrackedResourceWithSettableName { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The name of the VpnServerConfiguration that is unique within a resource group. */ + namePropertiesName?: string; + /** VPN protocols for the VpnServerConfiguration. */ + vpnProtocols?: VpnGatewayTunnelingProtocol[]; + /** VPN authentication types for the VpnServerConfiguration. */ + vpnAuthenticationTypes?: VpnAuthenticationType[]; + /** VPN client root certificate of VpnServerConfiguration. */ + vpnClientRootCertificates?: VpnServerConfigVpnClientRootCertificate[]; + /** VPN client revoked certificate of VpnServerConfiguration. */ + vpnClientRevokedCertificates?: VpnServerConfigVpnClientRevokedCertificate[]; + /** Radius Server root certificate of VpnServerConfiguration. */ + radiusServerRootCertificates?: VpnServerConfigRadiusServerRootCertificate[]; + /** Radius client root certificate of VpnServerConfiguration. */ + radiusClientRootCertificates?: VpnServerConfigRadiusClientRootCertificate[]; + /** VpnClientIpsecPolicies for VpnServerConfiguration. */ + vpnClientIpsecPolicies?: IpsecPolicy[]; + /** The radius server address property of the VpnServerConfiguration resource for point to site client connection. */ + radiusServerAddress?: string; + /** The radius secret property of the VpnServerConfiguration resource for point to site client connection. We will no longer return radiusServerSecret in VpnServerConfiguration Create/Update/Get/List/UpdateTags APIs response. Please use VpnServerConfiguration ListRadiusSecrets API to fetch radius server secrets. */ + radiusServerSecret?: string; + /** Multiple Radius Server configuration for VpnServerConfiguration. */ + radiusServers?: RadiusServer[]; + /** The set of aad vpn authentication parameters. */ + aadAuthenticationParameters?: AadAuthenticationParameters; + /** The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. */ + readonly provisioningState?: string; + /** List of references to P2SVpnGateways. */ + readonly p2SVpnGateways?: P2SVpnGateway[]; + /** List of all VpnServerConfigurationPolicyGroups. */ + configurationPolicyGroups?: VpnServerConfigurationPolicyGroup[]; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etagPropertiesEtag?: string; +} + +export function vpnServerConfigurationSerializer(item: VpnServerConfiguration): any { + return { + id: item["id"], + name: item["name"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "name", + "vpnProtocols", + "vpnAuthenticationTypes", + "vpnClientRootCertificates", + "vpnClientRevokedCertificates", + "radiusServerRootCertificates", + "radiusClientRootCertificates", + "vpnClientIpsecPolicies", + "radiusServerAddress", + "radiusServerSecret", + "radiusServers", + "aadAuthenticationParameters", + "configurationPolicyGroups", + ]) + ? undefined + : _vpnServerConfigurationPropertiesSerializer(item), + }; +} + +export function vpnServerConfigurationDeserializer(item: any): VpnServerConfiguration { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _vpnServerConfigurationPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Parameters for VpnServerConfiguration. */ +export interface VpnServerConfigurationProperties { + /** The name of the VpnServerConfiguration that is unique within a resource group. */ + name?: string; + /** VPN protocols for the VpnServerConfiguration. */ + vpnProtocols?: VpnGatewayTunnelingProtocol[]; + /** VPN authentication types for the VpnServerConfiguration. */ + vpnAuthenticationTypes?: VpnAuthenticationType[]; + /** VPN client root certificate of VpnServerConfiguration. */ + vpnClientRootCertificates?: VpnServerConfigVpnClientRootCertificate[]; + /** VPN client revoked certificate of VpnServerConfiguration. */ + vpnClientRevokedCertificates?: VpnServerConfigVpnClientRevokedCertificate[]; + /** Radius Server root certificate of VpnServerConfiguration. */ + radiusServerRootCertificates?: VpnServerConfigRadiusServerRootCertificate[]; + /** Radius client root certificate of VpnServerConfiguration. */ + radiusClientRootCertificates?: VpnServerConfigRadiusClientRootCertificate[]; + /** VpnClientIpsecPolicies for VpnServerConfiguration. */ + vpnClientIpsecPolicies?: IpsecPolicy[]; + /** The radius server address property of the VpnServerConfiguration resource for point to site client connection. */ + radiusServerAddress?: string; + /** The radius secret property of the VpnServerConfiguration resource for point to site client connection. We will no longer return radiusServerSecret in VpnServerConfiguration Create/Update/Get/List/UpdateTags APIs response. Please use VpnServerConfiguration ListRadiusSecrets API to fetch radius server secrets. */ + radiusServerSecret?: string; + /** Multiple Radius Server configuration for VpnServerConfiguration. */ + radiusServers?: RadiusServer[]; + /** The set of aad vpn authentication parameters. */ + aadAuthenticationParameters?: AadAuthenticationParameters; + /** The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. */ + readonly provisioningState?: string; + /** List of references to P2SVpnGateways. */ + readonly p2SVpnGateways?: P2SVpnGateway[]; + /** List of all VpnServerConfigurationPolicyGroups. */ + configurationPolicyGroups?: VpnServerConfigurationPolicyGroup[]; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; +} + +export function vpnServerConfigurationPropertiesSerializer( + item: VpnServerConfigurationProperties, +): any { + return { + name: item["name"], + vpnProtocols: !item["vpnProtocols"] + ? item["vpnProtocols"] + : item["vpnProtocols"].map((p: any) => { + return p; + }), + vpnAuthenticationTypes: !item["vpnAuthenticationTypes"] + ? item["vpnAuthenticationTypes"] + : item["vpnAuthenticationTypes"].map((p: any) => { + return p; + }), + vpnClientRootCertificates: !item["vpnClientRootCertificates"] + ? item["vpnClientRootCertificates"] + : vpnServerConfigVpnClientRootCertificateArraySerializer(item["vpnClientRootCertificates"]), + vpnClientRevokedCertificates: !item["vpnClientRevokedCertificates"] + ? item["vpnClientRevokedCertificates"] + : vpnServerConfigVpnClientRevokedCertificateArraySerializer( + item["vpnClientRevokedCertificates"], + ), + radiusServerRootCertificates: !item["radiusServerRootCertificates"] + ? item["radiusServerRootCertificates"] + : vpnServerConfigRadiusServerRootCertificateArraySerializer( + item["radiusServerRootCertificates"], + ), + radiusClientRootCertificates: !item["radiusClientRootCertificates"] + ? item["radiusClientRootCertificates"] + : vpnServerConfigRadiusClientRootCertificateArraySerializer( + item["radiusClientRootCertificates"], + ), + vpnClientIpsecPolicies: !item["vpnClientIpsecPolicies"] + ? item["vpnClientIpsecPolicies"] + : ipsecPolicyArraySerializer(item["vpnClientIpsecPolicies"]), + radiusServerAddress: item["radiusServerAddress"], + radiusServerSecret: item["radiusServerSecret"], + radiusServers: !item["radiusServers"] + ? item["radiusServers"] + : radiusServerArraySerializer(item["radiusServers"]), + aadAuthenticationParameters: !item["aadAuthenticationParameters"] + ? item["aadAuthenticationParameters"] + : aadAuthenticationParametersSerializer(item["aadAuthenticationParameters"]), + configurationPolicyGroups: !item["configurationPolicyGroups"] + ? item["configurationPolicyGroups"] + : vpnServerConfigurationPolicyGroupArraySerializer(item["configurationPolicyGroups"]), + }; +} + +export function vpnServerConfigurationPropertiesDeserializer( + item: any, +): VpnServerConfigurationProperties { + return { + name: item["name"], + vpnProtocols: !item["vpnProtocols"] + ? item["vpnProtocols"] + : item["vpnProtocols"].map((p: any) => { + return p; + }), + vpnAuthenticationTypes: !item["vpnAuthenticationTypes"] + ? item["vpnAuthenticationTypes"] + : item["vpnAuthenticationTypes"].map((p: any) => { + return p; + }), + vpnClientRootCertificates: !item["vpnClientRootCertificates"] + ? item["vpnClientRootCertificates"] + : vpnServerConfigVpnClientRootCertificateArrayDeserializer(item["vpnClientRootCertificates"]), + vpnClientRevokedCertificates: !item["vpnClientRevokedCertificates"] + ? item["vpnClientRevokedCertificates"] + : vpnServerConfigVpnClientRevokedCertificateArrayDeserializer( + item["vpnClientRevokedCertificates"], + ), + radiusServerRootCertificates: !item["radiusServerRootCertificates"] + ? item["radiusServerRootCertificates"] + : vpnServerConfigRadiusServerRootCertificateArrayDeserializer( + item["radiusServerRootCertificates"], + ), + radiusClientRootCertificates: !item["radiusClientRootCertificates"] + ? item["radiusClientRootCertificates"] + : vpnServerConfigRadiusClientRootCertificateArrayDeserializer( + item["radiusClientRootCertificates"], + ), + vpnClientIpsecPolicies: !item["vpnClientIpsecPolicies"] + ? item["vpnClientIpsecPolicies"] + : ipsecPolicyArrayDeserializer(item["vpnClientIpsecPolicies"]), + radiusServerAddress: item["radiusServerAddress"], + radiusServerSecret: item["radiusServerSecret"], + radiusServers: !item["radiusServers"] + ? item["radiusServers"] + : radiusServerArrayDeserializer(item["radiusServers"]), + aadAuthenticationParameters: !item["aadAuthenticationParameters"] + ? item["aadAuthenticationParameters"] + : aadAuthenticationParametersDeserializer(item["aadAuthenticationParameters"]), + provisioningState: item["provisioningState"], + p2SVpnGateways: !item["p2SVpnGateways"] + ? item["p2SVpnGateways"] + : p2SVpnGatewayArrayDeserializer(item["p2SVpnGateways"]), + configurationPolicyGroups: !item["configurationPolicyGroups"] + ? item["configurationPolicyGroups"] + : vpnServerConfigurationPolicyGroupArrayDeserializer(item["configurationPolicyGroups"]), + etag: item["etag"], + }; +} + +/** VPN protocol enabled for the VpnServerConfiguration. */ +export enum KnownVpnGatewayTunnelingProtocol { + /** IkeV2 */ + IkeV2 = "IkeV2", + /** OpenVPN */ + OpenVPN = "OpenVPN", +} + +/** + * VPN protocol enabled for the VpnServerConfiguration. \ + * {@link KnownVpnGatewayTunnelingProtocol} can be used interchangeably with VpnGatewayTunnelingProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IkeV2**: IkeV2 \ + * **OpenVPN**: OpenVPN + */ +export type VpnGatewayTunnelingProtocol = string; + +export function vpnServerConfigVpnClientRootCertificateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigVpnClientRootCertificateSerializer(item); + }); +} + +export function vpnServerConfigVpnClientRootCertificateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigVpnClientRootCertificateDeserializer(item); + }); +} + +/** Properties of VPN client root certificate of VpnServerConfiguration. */ +export interface VpnServerConfigVpnClientRootCertificate { + /** The certificate name. */ + name?: string; + /** The certificate public data. */ + publicCertData?: string; +} + +export function vpnServerConfigVpnClientRootCertificateSerializer( + item: VpnServerConfigVpnClientRootCertificate, +): any { + return { name: item["name"], publicCertData: item["publicCertData"] }; +} + +export function vpnServerConfigVpnClientRootCertificateDeserializer( + item: any, +): VpnServerConfigVpnClientRootCertificate { + return { + name: item["name"], + publicCertData: item["publicCertData"], + }; +} + +export function vpnServerConfigVpnClientRevokedCertificateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigVpnClientRevokedCertificateSerializer(item); + }); +} + +export function vpnServerConfigVpnClientRevokedCertificateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigVpnClientRevokedCertificateDeserializer(item); + }); +} + +/** Properties of the revoked VPN client certificate of VpnServerConfiguration. */ +export interface VpnServerConfigVpnClientRevokedCertificate { + /** The certificate name. */ + name?: string; + /** The revoked VPN client certificate thumbprint. */ + thumbprint?: string; +} + +export function vpnServerConfigVpnClientRevokedCertificateSerializer( + item: VpnServerConfigVpnClientRevokedCertificate, +): any { + return { name: item["name"], thumbprint: item["thumbprint"] }; +} + +export function vpnServerConfigVpnClientRevokedCertificateDeserializer( + item: any, +): VpnServerConfigVpnClientRevokedCertificate { + return { + name: item["name"], + thumbprint: item["thumbprint"], + }; +} + +export function vpnServerConfigRadiusServerRootCertificateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigRadiusServerRootCertificateSerializer(item); + }); +} + +export function vpnServerConfigRadiusServerRootCertificateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigRadiusServerRootCertificateDeserializer(item); + }); +} + +/** Properties of Radius Server root certificate of VpnServerConfiguration. */ +export interface VpnServerConfigRadiusServerRootCertificate { + /** The certificate name. */ + name?: string; + /** The certificate public data. */ + publicCertData?: string; +} + +export function vpnServerConfigRadiusServerRootCertificateSerializer( + item: VpnServerConfigRadiusServerRootCertificate, +): any { + return { name: item["name"], publicCertData: item["publicCertData"] }; +} + +export function vpnServerConfigRadiusServerRootCertificateDeserializer( + item: any, +): VpnServerConfigRadiusServerRootCertificate { + return { + name: item["name"], + publicCertData: item["publicCertData"], + }; +} + +export function vpnServerConfigRadiusClientRootCertificateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigRadiusClientRootCertificateSerializer(item); + }); +} + +export function vpnServerConfigRadiusClientRootCertificateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigRadiusClientRootCertificateDeserializer(item); + }); +} + +/** Properties of the Radius client root certificate of VpnServerConfiguration. */ +export interface VpnServerConfigRadiusClientRootCertificate { + /** The certificate name. */ + name?: string; + /** The Radius client root certificate thumbprint. */ + thumbprint?: string; +} + +export function vpnServerConfigRadiusClientRootCertificateSerializer( + item: VpnServerConfigRadiusClientRootCertificate, +): any { + return { name: item["name"], thumbprint: item["thumbprint"] }; +} + +export function vpnServerConfigRadiusClientRootCertificateDeserializer( + item: any, +): VpnServerConfigRadiusClientRootCertificate { + return { + name: item["name"], + thumbprint: item["thumbprint"], + }; +} + +/** AAD Vpn authentication type related parameters. */ +export interface AadAuthenticationParameters { + /** AAD Vpn authentication parameter AAD tenant. */ + aadTenant?: string; + /** AAD Vpn authentication parameter AAD audience. */ + aadAudience?: string; + /** AAD Vpn authentication parameter AAD issuer. */ + aadIssuer?: string; +} + +export function aadAuthenticationParametersSerializer(item: AadAuthenticationParameters): any { + return { + aadTenant: item["aadTenant"], + aadAudience: item["aadAudience"], + aadIssuer: item["aadIssuer"], + }; +} + +export function aadAuthenticationParametersDeserializer(item: any): AadAuthenticationParameters { + return { + aadTenant: item["aadTenant"], + aadAudience: item["aadAudience"], + aadIssuer: item["aadIssuer"], + }; +} + +export function p2SVpnGatewayArraySerializer(result: Array): any[] { + return result.map((item) => { + return p2SVpnGatewaySerializer(item); + }); +} + +export function p2SVpnGatewayArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return p2SVpnGatewayDeserializer(item); + }); +} + +/** P2SVpnGateway Resource. */ +export interface P2SVpnGateway extends TrackedResourceWithSettableIdOptionalLocation { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The VirtualHub to which the gateway belongs. */ + virtualHub?: SubResource; + /** List of all p2s connection configurations of the gateway. */ + p2SConnectionConfigurations?: P2SConnectionConfiguration[]; + /** The provisioning state of the P2S VPN gateway resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The scale unit for this p2s vpn gateway. */ + vpnGatewayScaleUnit?: number; + /** The VpnServerConfiguration to which the p2sVpnGateway is attached to. */ + vpnServerConfiguration?: SubResource; + /** All P2S VPN clients' connection health status. */ + readonly vpnClientConnectionHealth?: VpnClientConnectionHealth; + /** List of all customer specified DNS servers IP addresses. */ + customDnsServers?: string[]; + /** Enable Routing Preference property for the Public IP Interface of the P2SVpnGateway. */ + isRoutingPreferenceInternet?: boolean; +} + +export function p2SVpnGatewaySerializer(item: P2SVpnGateway): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "virtualHub", + "p2SConnectionConfigurations", + "vpnGatewayScaleUnit", + "vpnServerConfiguration", + "customDnsServers", + "isRoutingPreferenceInternet", + ]) + ? undefined + : _p2SVpnGatewayPropertiesSerializer(item), + }; +} + +export function p2SVpnGatewayDeserializer(item: any): P2SVpnGateway { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _p2SVpnGatewayPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Parameters for P2SVpnGateway. */ +export interface P2SVpnGatewayProperties { + /** The VirtualHub to which the gateway belongs. */ + virtualHub?: SubResource; + /** List of all p2s connection configurations of the gateway. */ + p2SConnectionConfigurations?: P2SConnectionConfiguration[]; + /** The provisioning state of the P2S VPN gateway resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The scale unit for this p2s vpn gateway. */ + vpnGatewayScaleUnit?: number; + /** The VpnServerConfiguration to which the p2sVpnGateway is attached to. */ + vpnServerConfiguration?: SubResource; + /** All P2S VPN clients' connection health status. */ + readonly vpnClientConnectionHealth?: VpnClientConnectionHealth; + /** List of all customer specified DNS servers IP addresses. */ + customDnsServers?: string[]; + /** Enable Routing Preference property for the Public IP Interface of the P2SVpnGateway. */ + isRoutingPreferenceInternet?: boolean; +} + +export function p2SVpnGatewayPropertiesSerializer(item: P2SVpnGatewayProperties): any { + return { + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceSerializer(item["virtualHub"]), + p2SConnectionConfigurations: !item["p2SConnectionConfigurations"] + ? item["p2SConnectionConfigurations"] + : p2SConnectionConfigurationArraySerializer(item["p2SConnectionConfigurations"]), + vpnGatewayScaleUnit: item["vpnGatewayScaleUnit"], + vpnServerConfiguration: !item["vpnServerConfiguration"] + ? item["vpnServerConfiguration"] + : subResourceSerializer(item["vpnServerConfiguration"]), + customDnsServers: !item["customDnsServers"] + ? item["customDnsServers"] + : item["customDnsServers"].map((p: any) => { + return p; + }), + isRoutingPreferenceInternet: item["isRoutingPreferenceInternet"], + }; +} + +export function p2SVpnGatewayPropertiesDeserializer(item: any): P2SVpnGatewayProperties { + return { + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceDeserializer(item["virtualHub"]), + p2SConnectionConfigurations: !item["p2SConnectionConfigurations"] + ? item["p2SConnectionConfigurations"] + : p2SConnectionConfigurationArrayDeserializer(item["p2SConnectionConfigurations"]), + provisioningState: item["provisioningState"], + vpnGatewayScaleUnit: item["vpnGatewayScaleUnit"], + vpnServerConfiguration: !item["vpnServerConfiguration"] + ? item["vpnServerConfiguration"] + : subResourceDeserializer(item["vpnServerConfiguration"]), + vpnClientConnectionHealth: !item["vpnClientConnectionHealth"] + ? item["vpnClientConnectionHealth"] + : vpnClientConnectionHealthDeserializer(item["vpnClientConnectionHealth"]), + customDnsServers: !item["customDnsServers"] + ? item["customDnsServers"] + : item["customDnsServers"].map((p: any) => { + return p; + }), + isRoutingPreferenceInternet: item["isRoutingPreferenceInternet"], + }; +} + +export function p2SConnectionConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return p2SConnectionConfigurationSerializer(item); + }); +} + +export function p2SConnectionConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return p2SConnectionConfigurationDeserializer(item); + }); +} + +/** P2SConnectionConfiguration Resource. */ +export interface P2SConnectionConfiguration extends 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. */ + readonly etag?: string; + /** The reference to the address space resource which represents Address space for P2S VpnClient. */ + vpnClientAddressPool?: AddressSpace; + /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ + 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. */ + configurationPolicyGroupAssociations?: SubResource[]; + /** List of previous Configuration Policy Groups that this P2SConnectionConfiguration was attached to. */ + readonly previousConfigurationPolicyGroupAssociations?: VpnServerConfigurationPolicyGroup[]; + /** The provisioning state of the P2SConnectionConfiguration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function p2SConnectionConfigurationSerializer(item: P2SConnectionConfiguration): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "vpnClientAddressPool", + "routingConfiguration", + "enableInternetSecurity", + "configurationPolicyGroupAssociations", + ]) + ? undefined + : _p2SConnectionConfigurationPropertiesSerializer(item), + name: item["name"], + }; +} + +export function p2SConnectionConfigurationDeserializer(item: any): P2SConnectionConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _p2SConnectionConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Parameters for P2SConnectionConfiguration. */ +export interface P2SConnectionConfigurationProperties { + /** The reference to the address space resource which represents Address space for P2S VpnClient. */ + vpnClientAddressPool?: AddressSpace; + /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ + 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. */ + configurationPolicyGroupAssociations?: SubResource[]; + /** List of previous Configuration Policy Groups that this P2SConnectionConfiguration was attached to. */ + readonly previousConfigurationPolicyGroupAssociations?: VpnServerConfigurationPolicyGroup[]; + /** The provisioning state of the P2SConnectionConfiguration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function p2SConnectionConfigurationPropertiesSerializer( + item: P2SConnectionConfigurationProperties, +): any { + return { + vpnClientAddressPool: !item["vpnClientAddressPool"] + ? item["vpnClientAddressPool"] + : addressSpaceSerializer(item["vpnClientAddressPool"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + enableInternetSecurity: item["enableInternetSecurity"], + configurationPolicyGroupAssociations: !item["configurationPolicyGroupAssociations"] + ? item["configurationPolicyGroupAssociations"] + : subResourceArraySerializer(item["configurationPolicyGroupAssociations"]), + }; +} + +export function p2SConnectionConfigurationPropertiesDeserializer( + item: any, +): P2SConnectionConfigurationProperties { + return { + vpnClientAddressPool: !item["vpnClientAddressPool"] + ? item["vpnClientAddressPool"] + : addressSpaceDeserializer(item["vpnClientAddressPool"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + enableInternetSecurity: item["enableInternetSecurity"], + configurationPolicyGroupAssociations: !item["configurationPolicyGroupAssociations"] + ? item["configurationPolicyGroupAssociations"] + : subResourceArrayDeserializer(item["configurationPolicyGroupAssociations"]), + previousConfigurationPolicyGroupAssociations: !item[ + "previousConfigurationPolicyGroupAssociations" + ] + ? item["previousConfigurationPolicyGroupAssociations"] + : vpnServerConfigurationPolicyGroupArrayDeserializer( + item["previousConfigurationPolicyGroupAssociations"], + ), + provisioningState: item["provisioningState"], + }; +} + +export function vpnServerConfigurationPolicyGroupArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigurationPolicyGroupSerializer(item); + }); +} + +export function vpnServerConfigurationPolicyGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigurationPolicyGroupDeserializer(item); + }); +} + +/** VpnServerConfigurationPolicyGroup Resource. */ +export interface VpnServerConfigurationPolicyGroup extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: 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. */ + readonly p2SConnectionConfigurations?: SubResource[]; + /** The provisioning state of the VpnServerConfigurationPolicyGroup resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function vpnServerConfigurationPolicyGroupSerializer( + item: VpnServerConfigurationPolicyGroup, +): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["isDefault", "priority", "policyMembers"]) + ? undefined + : _vpnServerConfigurationPolicyGroupPropertiesSerializer(item), + }; +} + +export function vpnServerConfigurationPolicyGroupDeserializer( + item: any, +): VpnServerConfigurationPolicyGroup { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _vpnServerConfigurationPolicyGroupPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Parameters for VpnServerConfigurationPolicyGroup. */ +export interface VpnServerConfigurationPolicyGroupProperties { + /** 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. */ + readonly p2SConnectionConfigurations?: SubResource[]; + /** The provisioning state of the VpnServerConfigurationPolicyGroup resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function vpnServerConfigurationPolicyGroupPropertiesSerializer( + item: VpnServerConfigurationPolicyGroupProperties, +): any { + return { + isDefault: item["isDefault"], + priority: item["priority"], + policyMembers: !item["policyMembers"] + ? item["policyMembers"] + : vpnServerConfigurationPolicyGroupMemberArraySerializer(item["policyMembers"]), + }; +} + +export function vpnServerConfigurationPolicyGroupPropertiesDeserializer( + item: any, +): VpnServerConfigurationPolicyGroupProperties { + return { + isDefault: item["isDefault"], + priority: item["priority"], + policyMembers: !item["policyMembers"] + ? item["policyMembers"] + : vpnServerConfigurationPolicyGroupMemberArrayDeserializer(item["policyMembers"]), + p2SConnectionConfigurations: !item["p2SConnectionConfigurations"] + ? item["p2SConnectionConfigurations"] + : subResourceArrayDeserializer(item["p2SConnectionConfigurations"]), + provisioningState: item["provisioningState"], + }; +} + +export function vpnServerConfigurationPolicyGroupMemberArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigurationPolicyGroupMemberSerializer(item); + }); +} + +export function vpnServerConfigurationPolicyGroupMemberArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigurationPolicyGroupMemberDeserializer(item); + }); +} + +/** 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; +} + +export function vpnServerConfigurationPolicyGroupMemberSerializer( + item: VpnServerConfigurationPolicyGroupMember, +): any { + return { + name: item["name"], + attributeType: item["attributeType"], + attributeValue: item["attributeValue"], + }; +} + +export function vpnServerConfigurationPolicyGroupMemberDeserializer( + item: any, +): VpnServerConfigurationPolicyGroupMember { + return { + name: item["name"], + attributeType: item["attributeType"], + attributeValue: item["attributeValue"], + }; +} + +/** VpnClientConnectionHealth properties. */ +export interface VpnClientConnectionHealth { + /** Total of the Ingress Bytes Transferred in this P2S Vpn connection. */ + readonly totalIngressBytesTransferred?: number; + /** Total of the Egress Bytes Transferred in this connection. */ + readonly totalEgressBytesTransferred?: number; + /** The total of p2s vpn clients connected at this time to this P2SVpnGateway. */ + vpnClientConnectionsCount?: number; + /** List of allocated ip addresses to the connected p2s vpn clients. */ + allocatedIpAddresses?: string[]; +} + +export function vpnClientConnectionHealthDeserializer(item: any): VpnClientConnectionHealth { + return { + totalIngressBytesTransferred: item["totalIngressBytesTransferred"], + totalEgressBytesTransferred: item["totalEgressBytesTransferred"], + vpnClientConnectionsCount: item["vpnClientConnectionsCount"], + allocatedIpAddresses: !item["allocatedIpAddresses"] + ? item["allocatedIpAddresses"] + : item["allocatedIpAddresses"].map((p: any) => { + return p; + }), + }; +} + +/** Common resource representation. */ +export interface TrackedResourceWithSettableName { + /** Resource ID. */ + id?: string; + /** Resource name. */ + name?: string; + /** Resource type. */ + readonly type?: string; + /** Resource location. */ + location?: string; + /** Resource tags. */ + tags?: Record; +} + +export function trackedResourceWithSettableNameSerializer( + item: TrackedResourceWithSettableName, +): any { + return { id: item["id"], name: item["name"], location: item["location"], tags: item["tags"] }; +} + +export function trackedResourceWithSettableNameDeserializer( + item: any, +): TrackedResourceWithSettableName { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + }; +} + +/** Result of the request to list all VpnServerConfigurations. It contains a list of VpnServerConfigurations and a URL nextLink to get the next set of results. */ +export interface _ListVpnServerConfigurationsResult { + /** The VpnServerConfiguration items on this page */ + value: VpnServerConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVpnServerConfigurationsResultDeserializer( + item: any, +): _ListVpnServerConfigurationsResult { + return { + value: vpnServerConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function vpnServerConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigurationSerializer(item); + }); +} + +export function vpnServerConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnServerConfigurationDeserializer(item); + }); +} + +/** VirtualHub Resource. */ +export interface VirtualHub extends TrackedResourceWithSettableIdOptionalLocation { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Kind of service virtual hub. This is metadata used for the Azure portal experience for Route Server. */ + readonly kind?: string; + /** The VirtualWAN to which the VirtualHub belongs. */ + virtualWan?: SubResource; + /** The VpnGateway associated with this VirtualHub. */ + vpnGateway?: SubResource; + /** The P2SVpnGateway associated with this VirtualHub. */ + p2SVpnGateway?: SubResource; + /** The expressRouteGateway associated with this VirtualHub. */ + expressRouteGateway?: SubResource; + /** The azureFirewall associated with this VirtualHub. */ + azureFirewall?: SubResource; + /** The securityPartnerProvider associated with this VirtualHub. */ + securityPartnerProvider?: SubResource; + /** Address-prefix for this VirtualHub. */ + addressPrefix?: string; + /** The routeTable associated with this virtual hub. */ + routeTable?: VirtualHubRouteTable; + /** The provisioning state of the virtual hub resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The Security Provider name. */ + securityProviderName?: string; + /** List of all virtual hub route table v2s associated with this VirtualHub. */ + virtualHubRouteTableV2S?: VirtualHubRouteTableV2[]; + /** The sku of this VirtualHub. */ + sku?: string; + /** The routing state. */ + readonly routingState?: RoutingState; + /** List of references to Bgp Connections. */ + readonly bgpConnections?: SubResource[]; + /** List of references to IpConfigurations. */ + readonly ipConfigurations?: SubResource[]; + /** List of references to RouteMaps. */ + readonly routeMaps?: SubResource[]; + /** VirtualRouter ASN. */ + virtualRouterAsn?: number; + /** VirtualRouter IPs. */ + virtualRouterIps?: string[]; + /** Flag to control transit for VirtualRouter hub. */ + allowBranchToBranchTraffic?: boolean; + /** The preferred gateway to route on-prem traffic */ + preferredRoutingGateway?: PreferredRoutingGateway; + /** The hubRoutingPreference of this VirtualHub. */ + hubRoutingPreference?: HubRoutingPreference; + /** The VirtualHub Router autoscale configuration. */ + virtualRouterAutoScaleConfiguration?: VirtualRouterAutoScaleConfiguration; +} + +export function virtualHubSerializer(item: VirtualHub): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "virtualWan", + "vpnGateway", + "p2SVpnGateway", + "expressRouteGateway", + "azureFirewall", + "securityPartnerProvider", + "addressPrefix", + "routeTable", + "securityProviderName", + "virtualHubRouteTableV2s", + "sku", + "virtualRouterAsn", + "virtualRouterIps", + "allowBranchToBranchTraffic", + "preferredRoutingGateway", + "hubRoutingPreference", + "virtualRouterAutoScaleConfiguration", + ]) + ? undefined + : _virtualHubPropertiesSerializer(item), + }; +} + +export function virtualHubDeserializer(item: any): VirtualHub { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _virtualHubPropertiesDeserializer(item["properties"])), + etag: item["etag"], + kind: item["kind"], + }; +} + +/** Parameters for VirtualHub. */ +export interface VirtualHubProperties { + /** The VirtualWAN to which the VirtualHub belongs. */ + virtualWan?: SubResource; + /** The VpnGateway associated with this VirtualHub. */ + vpnGateway?: SubResource; + /** The P2SVpnGateway associated with this VirtualHub. */ + p2SVpnGateway?: SubResource; + /** The expressRouteGateway associated with this VirtualHub. */ + expressRouteGateway?: SubResource; + /** The azureFirewall associated with this VirtualHub. */ + azureFirewall?: SubResource; + /** The securityPartnerProvider associated with this VirtualHub. */ + securityPartnerProvider?: SubResource; + /** Address-prefix for this VirtualHub. */ + addressPrefix?: string; + /** The routeTable associated with this virtual hub. */ + routeTable?: VirtualHubRouteTable; + /** The provisioning state of the virtual hub resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The Security Provider name. */ + securityProviderName?: string; + /** List of all virtual hub route table v2s associated with this VirtualHub. */ + virtualHubRouteTableV2S?: VirtualHubRouteTableV2[]; + /** The sku of this VirtualHub. */ + sku?: string; + /** The routing state. */ + readonly routingState?: RoutingState; + /** List of references to Bgp Connections. */ + readonly bgpConnections?: SubResource[]; + /** List of references to IpConfigurations. */ + readonly ipConfigurations?: SubResource[]; + /** List of references to RouteMaps. */ + readonly routeMaps?: SubResource[]; + /** VirtualRouter ASN. */ + virtualRouterAsn?: number; + /** VirtualRouter IPs. */ + virtualRouterIps?: string[]; + /** Flag to control transit for VirtualRouter hub. */ + allowBranchToBranchTraffic?: boolean; + /** The preferred gateway to route on-prem traffic */ + preferredRoutingGateway?: PreferredRoutingGateway; + /** The hubRoutingPreference of this VirtualHub. */ + hubRoutingPreference?: HubRoutingPreference; + /** The VirtualHub Router autoscale configuration. */ + virtualRouterAutoScaleConfiguration?: VirtualRouterAutoScaleConfiguration; +} + +export function virtualHubPropertiesSerializer(item: VirtualHubProperties): any { + return { + virtualWan: !item["virtualWan"] + ? item["virtualWan"] + : subResourceSerializer(item["virtualWan"]), + vpnGateway: !item["vpnGateway"] + ? item["vpnGateway"] + : subResourceSerializer(item["vpnGateway"]), + p2SVpnGateway: !item["p2SVpnGateway"] + ? item["p2SVpnGateway"] + : subResourceSerializer(item["p2SVpnGateway"]), + expressRouteGateway: !item["expressRouteGateway"] + ? item["expressRouteGateway"] + : subResourceSerializer(item["expressRouteGateway"]), + azureFirewall: !item["azureFirewall"] + ? item["azureFirewall"] + : subResourceSerializer(item["azureFirewall"]), + securityPartnerProvider: !item["securityPartnerProvider"] + ? item["securityPartnerProvider"] + : subResourceSerializer(item["securityPartnerProvider"]), + addressPrefix: item["addressPrefix"], + routeTable: !item["routeTable"] + ? item["routeTable"] + : virtualHubRouteTableSerializer(item["routeTable"]), + securityProviderName: item["securityProviderName"], + virtualHubRouteTableV2s: !item["virtualHubRouteTableV2S"] + ? item["virtualHubRouteTableV2S"] + : virtualHubRouteTableV2ArraySerializer(item["virtualHubRouteTableV2S"]), + sku: item["sku"], + virtualRouterAsn: item["virtualRouterAsn"], + virtualRouterIps: !item["virtualRouterIps"] + ? item["virtualRouterIps"] + : item["virtualRouterIps"].map((p: any) => { + return p; + }), + allowBranchToBranchTraffic: item["allowBranchToBranchTraffic"], + preferredRoutingGateway: item["preferredRoutingGateway"], + hubRoutingPreference: item["hubRoutingPreference"], + virtualRouterAutoScaleConfiguration: !item["virtualRouterAutoScaleConfiguration"] + ? item["virtualRouterAutoScaleConfiguration"] + : virtualRouterAutoScaleConfigurationSerializer(item["virtualRouterAutoScaleConfiguration"]), + }; +} + +export function virtualHubPropertiesDeserializer(item: any): VirtualHubProperties { + return { + virtualWan: !item["virtualWan"] + ? item["virtualWan"] + : subResourceDeserializer(item["virtualWan"]), + vpnGateway: !item["vpnGateway"] + ? item["vpnGateway"] + : subResourceDeserializer(item["vpnGateway"]), + p2SVpnGateway: !item["p2SVpnGateway"] + ? item["p2SVpnGateway"] + : subResourceDeserializer(item["p2SVpnGateway"]), + expressRouteGateway: !item["expressRouteGateway"] + ? item["expressRouteGateway"] + : subResourceDeserializer(item["expressRouteGateway"]), + azureFirewall: !item["azureFirewall"] + ? item["azureFirewall"] + : subResourceDeserializer(item["azureFirewall"]), + securityPartnerProvider: !item["securityPartnerProvider"] + ? item["securityPartnerProvider"] + : subResourceDeserializer(item["securityPartnerProvider"]), + addressPrefix: item["addressPrefix"], + routeTable: !item["routeTable"] + ? item["routeTable"] + : virtualHubRouteTableDeserializer(item["routeTable"]), + provisioningState: item["provisioningState"], + securityProviderName: item["securityProviderName"], + virtualHubRouteTableV2S: !item["virtualHubRouteTableV2s"] + ? item["virtualHubRouteTableV2s"] + : virtualHubRouteTableV2ArrayDeserializer(item["virtualHubRouteTableV2s"]), + sku: item["sku"], + routingState: item["routingState"], + bgpConnections: !item["bgpConnections"] + ? item["bgpConnections"] + : subResourceArrayDeserializer(item["bgpConnections"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : subResourceArrayDeserializer(item["ipConfigurations"]), + routeMaps: !item["routeMaps"] + ? item["routeMaps"] + : subResourceArrayDeserializer(item["routeMaps"]), + virtualRouterAsn: item["virtualRouterAsn"], + virtualRouterIps: !item["virtualRouterIps"] + ? item["virtualRouterIps"] + : item["virtualRouterIps"].map((p: any) => { + return p; + }), + allowBranchToBranchTraffic: item["allowBranchToBranchTraffic"], + preferredRoutingGateway: item["preferredRoutingGateway"], + hubRoutingPreference: item["hubRoutingPreference"], + virtualRouterAutoScaleConfiguration: !item["virtualRouterAutoScaleConfiguration"] + ? item["virtualRouterAutoScaleConfiguration"] + : virtualRouterAutoScaleConfigurationDeserializer( + item["virtualRouterAutoScaleConfiguration"], + ), + }; +} + +/** VirtualHub route table. */ +export interface VirtualHubRouteTable { + /** List of all routes. */ + routes?: VirtualHubRoute[]; +} + +export function virtualHubRouteTableSerializer(item: VirtualHubRouteTable): any { + return { + routes: !item["routes"] ? item["routes"] : virtualHubRouteArraySerializer(item["routes"]), + }; +} + +export function virtualHubRouteTableDeserializer(item: any): VirtualHubRouteTable { + return { + routes: !item["routes"] ? item["routes"] : virtualHubRouteArrayDeserializer(item["routes"]), + }; +} + +export function virtualHubRouteArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualHubRouteSerializer(item); + }); +} + +export function virtualHubRouteArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualHubRouteDeserializer(item); + }); +} + +/** VirtualHub route. */ +export interface VirtualHubRoute { + /** List of all addressPrefixes. */ + addressPrefixes?: string[]; + /** NextHop ip address. */ + nextHopIpAddress?: string; +} + +export function virtualHubRouteSerializer(item: VirtualHubRoute): any { + return { + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + nextHopIpAddress: item["nextHopIpAddress"], + }; +} + +export function virtualHubRouteDeserializer(item: any): VirtualHubRoute { + return { + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + nextHopIpAddress: item["nextHopIpAddress"], + }; +} + +export function virtualHubRouteTableV2ArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualHubRouteTableV2Serializer(item); + }); +} + +export function virtualHubRouteTableV2ArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualHubRouteTableV2Deserializer(item); + }); +} + +/** VirtualHubRouteTableV2 Resource. */ +export interface VirtualHubRouteTableV2 extends 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. */ + readonly etag?: string; + /** List of all routes. */ + routes?: VirtualHubRouteV2[]; + /** List of all connections attached to this route table v2. */ + attachedConnections?: string[]; + /** The provisioning state of the virtual hub route table v2 resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualHubRouteTableV2Serializer(item: VirtualHubRouteTableV2): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, ["routes", "attachedConnections"]) + ? undefined + : _virtualHubRouteTableV2PropertiesSerializer(item), + name: item["name"], + }; +} + +export function virtualHubRouteTableV2Deserializer(item: any): VirtualHubRouteTableV2 { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _virtualHubRouteTableV2PropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Parameters for VirtualHubRouteTableV2. */ +export interface VirtualHubRouteTableV2Properties { + /** List of all routes. */ + routes?: VirtualHubRouteV2[]; + /** List of all connections attached to this route table v2. */ + attachedConnections?: string[]; + /** The provisioning state of the virtual hub route table v2 resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function virtualHubRouteTableV2PropertiesSerializer( + item: VirtualHubRouteTableV2Properties, +): any { + return { + routes: !item["routes"] ? item["routes"] : virtualHubRouteV2ArraySerializer(item["routes"]), + attachedConnections: !item["attachedConnections"] + ? item["attachedConnections"] + : item["attachedConnections"].map((p: any) => { + return p; + }), + }; +} + +export function virtualHubRouteTableV2PropertiesDeserializer( + item: any, +): VirtualHubRouteTableV2Properties { + return { + routes: !item["routes"] ? item["routes"] : virtualHubRouteV2ArrayDeserializer(item["routes"]), + attachedConnections: !item["attachedConnections"] + ? item["attachedConnections"] + : item["attachedConnections"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function virtualHubRouteV2ArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualHubRouteV2Serializer(item); + }); +} + +export function virtualHubRouteV2ArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualHubRouteV2Deserializer(item); + }); +} + +/** VirtualHubRouteTableV2 route. */ +export interface VirtualHubRouteV2 { + /** The type of destinations. */ + destinationType?: string; + /** List of all destinations. */ + destinations?: string[]; + /** The type of next hops. */ + nextHopType?: string; + /** NextHops ip address. */ + nextHops?: string[]; +} + +export function virtualHubRouteV2Serializer(item: VirtualHubRouteV2): any { + return { + destinationType: item["destinationType"], + destinations: !item["destinations"] + ? item["destinations"] + : item["destinations"].map((p: any) => { + return p; + }), + nextHopType: item["nextHopType"], + nextHops: !item["nextHops"] + ? item["nextHops"] + : item["nextHops"].map((p: any) => { + return p; + }), + }; +} + +export function virtualHubRouteV2Deserializer(item: any): VirtualHubRouteV2 { + return { + destinationType: item["destinationType"], + destinations: !item["destinations"] + ? item["destinations"] + : item["destinations"].map((p: any) => { + return p; + }), + nextHopType: item["nextHopType"], + nextHops: !item["nextHops"] + ? item["nextHops"] + : item["nextHops"].map((p: any) => { + return p; + }), + }; +} + +/** The current routing state of the VirtualHub. */ +export enum KnownRoutingState { + /** None */ + None = "None", + /** Provisioned */ + Provisioned = "Provisioned", + /** Provisioning */ + Provisioning = "Provisioning", + /** Failed */ + Failed = "Failed", +} + +/** + * The current routing state of the VirtualHub. \ + * {@link KnownRoutingState} can be used interchangeably with RoutingState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **Provisioned**: Provisioned \ + * **Provisioning**: Provisioning \ + * **Failed**: Failed + */ +export type RoutingState = string; + +/** The preferred routing gateway types */ +export enum KnownPreferredRoutingGateway { + /** ExpressRoute */ + ExpressRoute = "ExpressRoute", + /** VpnGateway */ + VpnGateway = "VpnGateway", + /** None */ + None = "None", +} + +/** + * The preferred routing gateway types \ + * {@link KnownPreferredRoutingGateway} can be used interchangeably with PreferredRoutingGateway, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ExpressRoute**: ExpressRoute \ + * **VpnGateway**: VpnGateway \ + * **None**: None + */ +export type PreferredRoutingGateway = string; + +/** The hub routing preference gateway types */ +export enum KnownHubRoutingPreference { + /** ExpressRoute */ + ExpressRoute = "ExpressRoute", + /** VpnGateway */ + VpnGateway = "VpnGateway", + /** ASPath */ + ASPath = "ASPath", +} + +/** + * The hub routing preference gateway types \ + * {@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**: ExpressRoute \ + * **VpnGateway**: VpnGateway \ + * **ASPath**: ASPath + */ +export type HubRoutingPreference = string; + +/** The VirtualHub Router autoscale configuration. */ +export interface VirtualRouterAutoScaleConfiguration { + /** The minimum number of scale units for VirtualHub Router. */ + minCapacity?: number; +} + +export function virtualRouterAutoScaleConfigurationSerializer( + item: VirtualRouterAutoScaleConfiguration, +): any { + return { minCapacity: item["minCapacity"] }; +} + +export function virtualRouterAutoScaleConfigurationDeserializer( + item: any, +): VirtualRouterAutoScaleConfiguration { + return { + minCapacity: item["minCapacity"], + }; +} + +/** Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of results. */ +export interface _ListVirtualHubsResult { + /** The VirtualHub items on this page */ + value: VirtualHub[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVirtualHubsResultDeserializer(item: any): _ListVirtualHubsResult { + return { + value: virtualHubArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function virtualHubArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualHubSerializer(item); + }); +} + +export function virtualHubArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualHubDeserializer(item); + }); +} + +/** The parameters specifying the resource whose effective routes are being requested. */ +export interface EffectiveRoutesParameters { + /** The resource whose effective routes are being requested. */ + resourceId?: string; + /** The type of the specified resource like RouteTable, ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection. */ + virtualWanResourceType?: string; +} + +export function effectiveRoutesParametersSerializer(item: EffectiveRoutesParameters): any { + return { resourceId: item["resourceId"], virtualWanResourceType: item["virtualWanResourceType"] }; +} + +/** EffectiveRoutes List. */ +export interface VirtualHubEffectiveRouteList { + /** The list of effective routes configured on the virtual hub or the specified resource. */ + value?: VirtualHubEffectiveRoute[]; +} + +export function virtualHubEffectiveRouteListDeserializer(item: any): VirtualHubEffectiveRouteList { + return { + value: !item["value"] + ? item["value"] + : virtualHubEffectiveRouteArrayDeserializer(item["value"]), + }; +} + +export function virtualHubEffectiveRouteArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualHubEffectiveRouteDeserializer(item); + }); +} + +/** The effective route configured on the virtual hub or specified resource. */ +export interface VirtualHubEffectiveRoute { + /** The list of address prefixes. */ + addressPrefixes?: string[]; + /** The list of next hops. */ + nextHops?: string[]; + /** The type of the next hop. */ + nextHopType?: string; + /** The ASPath of this route. */ + asPath?: string; + /** The origin of this route. */ + routeOrigin?: string; +} + +export function virtualHubEffectiveRouteDeserializer(item: any): VirtualHubEffectiveRoute { + return { + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + nextHops: !item["nextHops"] + ? item["nextHops"] + : item["nextHops"].map((p: any) => { + return p; + }), + nextHopType: item["nextHopType"], + asPath: item["asPath"], + routeOrigin: item["routeOrigin"], + }; +} + +/** The parameters specifying the connection resource whose inbound routes are being requested. */ +export interface GetInboundRoutesParameters { + /** The connection resource whose inbound routes are being requested. */ + resourceUri?: string; + /** The type of the specified connection resource like ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection. */ + connectionType?: string; +} + +export function getInboundRoutesParametersSerializer(item: GetInboundRoutesParameters): any { + return { resourceUri: item["resourceUri"], connectionType: item["connectionType"] }; +} + +/** EffectiveRouteMapRoute List. */ +export interface EffectiveRouteMapRouteList { + /** The list of Effective RouteMap Routes configured on the connection resource. */ + value?: EffectiveRouteMapRoute[]; +} + +export function effectiveRouteMapRouteListDeserializer(item: any): EffectiveRouteMapRouteList { + return { + value: !item["value"] ? item["value"] : effectiveRouteMapRouteArrayDeserializer(item["value"]), + }; +} + +export function effectiveRouteMapRouteArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return effectiveRouteMapRouteDeserializer(item); + }); +} + +/** The effective RouteMap route configured on the connection resource. */ +export interface EffectiveRouteMapRoute { + /** The address prefix of the route. */ + prefix?: string; + /** BGP communities of the route. */ + bgpCommunities?: string; + /** The ASPath of this route. */ + asPath?: string; +} + +export function effectiveRouteMapRouteDeserializer(item: any): EffectiveRouteMapRoute { + return { + prefix: item["prefix"], + bgpCommunities: item["bgpCommunities"], + asPath: item["asPath"], + }; +} + +/** The parameters specifying the connection resource whose outbound routes are being requested. */ +export interface GetOutboundRoutesParameters { + /** The connection resource whose outbound routes are being requested. */ + resourceUri?: string; + /** The type of the specified connection resource like ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection. */ + connectionType?: string; +} + +export function getOutboundRoutesParametersSerializer(item: GetOutboundRoutesParameters): any { + return { resourceUri: item["resourceUri"], connectionType: item["connectionType"] }; +} + +/** The RouteMap child resource of a Virtual hub. */ +export interface RouteMap extends ReadOnlySubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** List of connections which have this RoutMap associated for inbound traffic. */ + associatedInboundConnections?: string[]; + /** List of connections which have this RoutMap associated for outbound traffic. */ + associatedOutboundConnections?: string[]; + /** List of RouteMap rules to be applied. */ + rules?: RouteMapRule[]; + /** The provisioning state of the RouteMap resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function routeMapSerializer(item: RouteMap): any { + return { + properties: areAllPropsUndefined(item, [ + "associatedInboundConnections", + "associatedOutboundConnections", + "rules", + ]) + ? undefined + : _routeMapPropertiesSerializer(item), + }; +} + +export function routeMapDeserializer(item: any): RouteMap { + return { + id: item["id"], + name: item["name"], + type: item["type"], + ...(!item["properties"] + ? item["properties"] + : _routeMapPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of RouteMap resource */ +export interface RouteMapProperties { + /** List of connections which have this RoutMap associated for inbound traffic. */ + associatedInboundConnections?: string[]; + /** List of connections which have this RoutMap associated for outbound traffic. */ + associatedOutboundConnections?: string[]; + /** List of RouteMap rules to be applied. */ + rules?: RouteMapRule[]; + /** The provisioning state of the RouteMap resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function routeMapPropertiesSerializer(item: RouteMapProperties): any { + return { + associatedInboundConnections: !item["associatedInboundConnections"] + ? item["associatedInboundConnections"] + : item["associatedInboundConnections"].map((p: any) => { + return p; + }), + associatedOutboundConnections: !item["associatedOutboundConnections"] + ? item["associatedOutboundConnections"] + : item["associatedOutboundConnections"].map((p: any) => { + return p; + }), + rules: !item["rules"] ? item["rules"] : routeMapRuleArraySerializer(item["rules"]), + }; +} + +export function routeMapPropertiesDeserializer(item: any): RouteMapProperties { + return { + associatedInboundConnections: !item["associatedInboundConnections"] + ? item["associatedInboundConnections"] + : item["associatedInboundConnections"].map((p: any) => { + return p; + }), + associatedOutboundConnections: !item["associatedOutboundConnections"] + ? item["associatedOutboundConnections"] + : item["associatedOutboundConnections"].map((p: any) => { + return p; + }), + rules: !item["rules"] ? item["rules"] : routeMapRuleArrayDeserializer(item["rules"]), + provisioningState: item["provisioningState"], + }; +} + +export function routeMapRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return routeMapRuleSerializer(item); + }); +} + +export function routeMapRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return routeMapRuleDeserializer(item); + }); +} + +/** A RouteMap Rule. */ +export interface RouteMapRule { + /** The unique name for the rule. */ + name?: string; + /** List of matching criterion which will be applied to traffic. */ + matchCriteria?: Criterion[]; + /** List of actions which will be applied on a match. */ + actions?: Action[]; + /** Next step after rule is evaluated. Current supported behaviors are 'Continue'(to next rule) and 'Terminate'. */ + nextStepIfMatched?: NextStep; +} + +export function routeMapRuleSerializer(item: RouteMapRule): any { + return { + name: item["name"], + matchCriteria: !item["matchCriteria"] + ? item["matchCriteria"] + : criterionArraySerializer(item["matchCriteria"]), + actions: !item["actions"] ? item["actions"] : actionArraySerializer(item["actions"]), + nextStepIfMatched: item["nextStepIfMatched"], + }; +} + +export function routeMapRuleDeserializer(item: any): RouteMapRule { + return { + name: item["name"], + matchCriteria: !item["matchCriteria"] + ? item["matchCriteria"] + : criterionArrayDeserializer(item["matchCriteria"]), + actions: !item["actions"] ? item["actions"] : actionArrayDeserializer(item["actions"]), + nextStepIfMatched: item["nextStepIfMatched"], + }; +} + +export function criterionArraySerializer(result: Array): any[] { + return result.map((item) => { + return criterionSerializer(item); + }); +} + +export function criterionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return criterionDeserializer(item); + }); +} + +/** A matching criteria which matches routes based on route prefix, community, and AS path. */ +export interface Criterion { + /** List of route prefixes which this criteria matches. */ + routePrefix?: string[]; + /** List of BGP communities which this criteria matches. */ + community?: string[]; + /** List of AS paths which this criteria matches. */ + asPath?: string[]; + /** Match condition to apply RouteMap rules. */ + matchCondition?: RouteMapMatchCondition; +} + +export function criterionSerializer(item: Criterion): any { + return { + routePrefix: !item["routePrefix"] + ? item["routePrefix"] + : item["routePrefix"].map((p: any) => { + return p; + }), + community: !item["community"] + ? item["community"] + : item["community"].map((p: any) => { + return p; + }), + asPath: !item["asPath"] + ? item["asPath"] + : item["asPath"].map((p: any) => { + return p; + }), + matchCondition: item["matchCondition"], + }; +} + +export function criterionDeserializer(item: any): Criterion { + return { + routePrefix: !item["routePrefix"] + ? item["routePrefix"] + : item["routePrefix"].map((p: any) => { + return p; + }), + community: !item["community"] + ? item["community"] + : item["community"].map((p: any) => { + return p; + }), + asPath: !item["asPath"] + ? item["asPath"] + : item["asPath"].map((p: any) => { + return p; + }), + matchCondition: item["matchCondition"], + }; +} + +/** Match condition to apply RouteMap rules. */ +export enum KnownRouteMapMatchCondition { + /** Unknown */ + Unknown = "Unknown", + /** Contains */ + Contains = "Contains", + /** Equals */ + Equals = "Equals", + /** NotContains */ + NotContains = "NotContains", + /** NotEquals */ + NotEquals = "NotEquals", +} + +/** + * Match condition to apply RouteMap rules. \ + * {@link KnownRouteMapMatchCondition} can be used interchangeably with RouteMapMatchCondition, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **Contains**: Contains \ + * **Equals**: Equals \ + * **NotContains**: NotContains \ + * **NotEquals**: NotEquals + */ +export type RouteMapMatchCondition = string; + +export function actionArraySerializer(result: Array): any[] { + return result.map((item) => { + return actionSerializer(item); + }); +} + +export function actionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return actionDeserializer(item); + }); +} + +/** Action to be taken on a route matching a RouteMap criterion. */ +export interface Action { + /** Type of action to be taken. Supported types are 'Remove', 'Add', 'Replace', and 'Drop.' */ + type?: RouteMapActionType; + /** List of parameters relevant to the action.For instance if type is drop then parameters has list of prefixes to be dropped.If type is add, parameters would have list of ASN numbers to be added */ + parameters?: Parameter[]; +} + +export function actionSerializer(item: Action): any { + return { + type: item["type"], + parameters: !item["parameters"] + ? item["parameters"] + : parameterArraySerializer(item["parameters"]), + }; +} + +export function actionDeserializer(item: any): Action { + return { + type: item["type"], + parameters: !item["parameters"] + ? item["parameters"] + : parameterArrayDeserializer(item["parameters"]), + }; +} + +/** Kind of actions which can be taken on a matched route. Add, Replace, Remove refer to parameters on the route, like community or prefix */ +export enum KnownRouteMapActionType { + /** Unknown */ + Unknown = "Unknown", + /** Remove */ + Remove = "Remove", + /** Add */ + Add = "Add", + /** Replace */ + Replace = "Replace", + /** Drop */ + Drop = "Drop", +} + +/** + * Kind of actions which can be taken on a matched route. Add, Replace, Remove refer to parameters on the route, like community or prefix \ + * {@link KnownRouteMapActionType} can be used interchangeably with RouteMapActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **Remove**: Remove \ + * **Add**: Add \ + * **Replace**: Replace \ + * **Drop**: Drop + */ +export type RouteMapActionType = string; + +export function parameterArraySerializer(result: Array): any[] { + return result.map((item) => { + return parameterSerializer(item); + }); +} + +export function parameterArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return parameterDeserializer(item); + }); +} + +/** Parameters for an Action. */ +export interface Parameter { + /** List of route prefixes. */ + routePrefix?: string[]; + /** List of BGP communities. */ + community?: string[]; + /** List of AS paths. */ + asPath?: string[]; +} + +export function parameterSerializer(item: Parameter): any { + return { + routePrefix: !item["routePrefix"] + ? item["routePrefix"] + : item["routePrefix"].map((p: any) => { + return p; + }), + community: !item["community"] + ? item["community"] + : item["community"].map((p: any) => { + return p; + }), + asPath: !item["asPath"] + ? item["asPath"] + : item["asPath"].map((p: any) => { + return p; + }), + }; +} + +export function parameterDeserializer(item: any): Parameter { + return { + routePrefix: !item["routePrefix"] + ? item["routePrefix"] + : item["routePrefix"].map((p: any) => { + return p; + }), + community: !item["community"] + ? item["community"] + : item["community"].map((p: any) => { + return p; + }), + asPath: !item["asPath"] + ? item["asPath"] + : item["asPath"].map((p: any) => { + return p; + }), + }; +} + +/** Supported next step behaviors after a rule is applied to a matched route */ +export enum KnownNextStep { + /** Unknown */ + Unknown = "Unknown", + /** Continue */ + Continue = "Continue", + /** Terminate */ + Terminate = "Terminate", +} + +/** + * Supported next step behaviors after a rule is applied to a matched route \ + * {@link KnownNextStep} can be used interchangeably with NextStep, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **Continue**: Continue \ + * **Terminate**: Terminate + */ +export type NextStep = string; + +/** Reference to another subresource. */ +export interface ReadOnlySubResourceModel { + /** Resource ID. */ + readonly id?: string; + /** Name of the resource. */ + readonly name?: string; + /** Type of the resource. */ + readonly type?: string; +} + +export function readOnlySubResourceModelSerializer(_item: ReadOnlySubResourceModel): any { + return {}; +} + +export function readOnlySubResourceModelDeserializer(item: any): ReadOnlySubResourceModel { + return { + id: item["id"], + name: item["name"], + type: item["type"], + }; +} + +/** List of RouteMaps and a URL nextLink to get the next set of results. */ +export interface _ListRouteMapsResult { + /** The RouteMap items on this page */ + value: RouteMap[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listRouteMapsResultDeserializer(item: any): _ListRouteMapsResult { + return { + value: routeMapArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function routeMapArraySerializer(result: Array): any[] { + return result.map((item) => { + return routeMapSerializer(item); + }); +} + +export function routeMapArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return routeMapDeserializer(item); + }); +} + +/** VpnGateway Resource. */ +export interface VpnGateway extends TrackedResourceWithSettableIdOptionalLocation { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The VirtualHub to which the gateway belongs. */ + virtualHub?: SubResource; + /** List of all vpn connections to the gateway. */ + connections?: VpnConnection[]; + /** Local network gateway's BGP speaker settings. */ + bgpSettings?: BgpSettings; + /** The provisioning state of the VPN gateway resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The scale unit for this vpn gateway. */ + vpnGatewayScaleUnit?: number; + /** List of all IPs configured on the gateway. */ + readonly ipConfigurations?: VpnGatewayIpConfiguration[]; + /** Enable BGP routes translation for NAT on this VpnGateway. */ + enableBgpRouteTranslationForNat?: boolean; + /** Enable Routing Preference property for the Public IP Interface of the VpnGateway. */ + isRoutingPreferenceInternet?: boolean; + /** List of all the nat Rules associated with the gateway. */ + natRules?: VpnGatewayNatRule[]; +} + +export function vpnGatewaySerializer(item: VpnGateway): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "virtualHub", + "connections", + "bgpSettings", + "vpnGatewayScaleUnit", + "enableBgpRouteTranslationForNat", + "isRoutingPreferenceInternet", + "natRules", + ]) + ? undefined + : _vpnGatewayPropertiesSerializer(item), + }; +} + +export function vpnGatewayDeserializer(item: any): VpnGateway { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _vpnGatewayPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Parameters for VpnGateway. */ +export interface VpnGatewayProperties { + /** The VirtualHub to which the gateway belongs. */ + virtualHub?: SubResource; + /** List of all vpn connections to the gateway. */ + connections?: VpnConnection[]; + /** Local network gateway's BGP speaker settings. */ + bgpSettings?: BgpSettings; + /** The provisioning state of the VPN gateway resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The scale unit for this vpn gateway. */ + vpnGatewayScaleUnit?: number; + /** List of all IPs configured on the gateway. */ + readonly ipConfigurations?: VpnGatewayIpConfiguration[]; + /** Enable BGP routes translation for NAT on this VpnGateway. */ + enableBgpRouteTranslationForNat?: boolean; + /** Enable Routing Preference property for the Public IP Interface of the VpnGateway. */ + isRoutingPreferenceInternet?: boolean; + /** List of all the nat Rules associated with the gateway. */ + natRules?: VpnGatewayNatRule[]; +} + +export function vpnGatewayPropertiesSerializer(item: VpnGatewayProperties): any { + return { + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceSerializer(item["virtualHub"]), + connections: !item["connections"] + ? item["connections"] + : vpnConnectionArraySerializer(item["connections"]), + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsSerializer(item["bgpSettings"]), + vpnGatewayScaleUnit: item["vpnGatewayScaleUnit"], + enableBgpRouteTranslationForNat: item["enableBgpRouteTranslationForNat"], + isRoutingPreferenceInternet: item["isRoutingPreferenceInternet"], + natRules: !item["natRules"] + ? item["natRules"] + : vpnGatewayNatRuleArraySerializer(item["natRules"]), + }; +} + +export function vpnGatewayPropertiesDeserializer(item: any): VpnGatewayProperties { + return { + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceDeserializer(item["virtualHub"]), + connections: !item["connections"] + ? item["connections"] + : vpnConnectionArrayDeserializer(item["connections"]), + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsDeserializer(item["bgpSettings"]), + provisioningState: item["provisioningState"], + vpnGatewayScaleUnit: item["vpnGatewayScaleUnit"], + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : vpnGatewayIpConfigurationArrayDeserializer(item["ipConfigurations"]), + enableBgpRouteTranslationForNat: item["enableBgpRouteTranslationForNat"], + isRoutingPreferenceInternet: item["isRoutingPreferenceInternet"], + natRules: !item["natRules"] + ? item["natRules"] + : vpnGatewayNatRuleArrayDeserializer(item["natRules"]), + }; +} + +export function vpnConnectionArraySerializer(result: Array): any[] { + return result.map((item) => { + return vpnConnectionSerializer(item); + }); +} + +export function vpnConnectionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vpnConnectionDeserializer(item); + }); +} + +/** VpnConnection Resource. */ +export interface VpnConnection extends 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. */ + readonly etag?: string; + /** Id of the connected vpn site. */ + remoteVpnSite?: SubResource; + /** Routing weight for vpn connection. */ + routingWeight?: number; + /** DPD timeout in seconds for vpn connection. */ + dpdTimeoutSeconds?: number; + /** The connection status. */ + readonly connectionStatus?: VpnConnectionStatus; + /** Connection protocol used for this connection. */ + vpnConnectionProtocolType?: VirtualNetworkGatewayConnectionProtocol; + /** Ingress bytes transferred. */ + readonly ingressBytesTransferred?: number; + /** Egress bytes transferred. */ + readonly egressBytesTransferred?: number; + /** Expected bandwidth in MBPS. */ + connectionBandwidth?: number; + /** Deprecated: SharedKey for the vpn connection. This is no more used. */ + sharedKey?: string; + /** EnableBgp flag. */ + enableBgp?: boolean; + /** Enable policy-based traffic selectors. */ + usePolicyBasedTrafficSelectors?: boolean; + /** The IPSec Policies to be considered by this connection. */ + ipsecPolicies?: IpsecPolicy[]; + /** The Traffic Selector Policies to be considered by this connection. */ + trafficSelectorPolicies?: TrafficSelectorPolicy[]; + /** EnableBgp flag. */ + enableRateLimiting?: boolean; + /** Enable internet security. */ + enableInternetSecurity?: boolean; + /** Use local azure ip to initiate connection. */ + useLocalAzureIpAddress?: boolean; + /** The provisioning state of the VPN connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** List of all vpn site link connections to the gateway. */ + vpnLinkConnections?: VpnSiteLinkConnection[]; + /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function vpnConnectionSerializer(item: VpnConnection): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "remoteVpnSite", + "routingWeight", + "dpdTimeoutSeconds", + "vpnConnectionProtocolType", + "connectionBandwidth", + "sharedKey", + "enableBgp", + "usePolicyBasedTrafficSelectors", + "ipsecPolicies", + "trafficSelectorPolicies", + "enableRateLimiting", + "enableInternetSecurity", + "useLocalAzureIpAddress", + "vpnLinkConnections", + "routingConfiguration", + ]) + ? undefined + : _vpnConnectionPropertiesSerializer(item), + name: item["name"], + }; +} + +export function vpnConnectionDeserializer(item: any): VpnConnection { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _vpnConnectionPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Parameters for VpnConnection. */ +export interface VpnConnectionProperties { + /** Id of the connected vpn site. */ + remoteVpnSite?: SubResource; + /** Routing weight for vpn connection. */ + routingWeight?: number; + /** DPD timeout in seconds for vpn connection. */ + dpdTimeoutSeconds?: number; + /** The connection status. */ + readonly connectionStatus?: VpnConnectionStatus; + /** Connection protocol used for this connection. */ + vpnConnectionProtocolType?: VirtualNetworkGatewayConnectionProtocol; + /** Ingress bytes transferred. */ + readonly ingressBytesTransferred?: number; + /** Egress bytes transferred. */ + readonly egressBytesTransferred?: number; + /** Expected bandwidth in MBPS. */ + connectionBandwidth?: number; + /** Deprecated: SharedKey for the vpn connection. This is no more used. */ + sharedKey?: string; + /** EnableBgp flag. */ + enableBgp?: boolean; + /** Enable policy-based traffic selectors. */ + usePolicyBasedTrafficSelectors?: boolean; + /** The IPSec Policies to be considered by this connection. */ + ipsecPolicies?: IpsecPolicy[]; + /** The Traffic Selector Policies to be considered by this connection. */ + trafficSelectorPolicies?: TrafficSelectorPolicy[]; + /** EnableBgp flag. */ + enableRateLimiting?: boolean; + /** Enable internet security. */ + enableInternetSecurity?: boolean; + /** Use local azure ip to initiate connection. */ + useLocalAzureIpAddress?: boolean; + /** The provisioning state of the VPN connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** List of all vpn site link connections to the gateway. */ + vpnLinkConnections?: VpnSiteLinkConnection[]; + /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function vpnConnectionPropertiesSerializer(item: VpnConnectionProperties): any { + return { + remoteVpnSite: !item["remoteVpnSite"] + ? item["remoteVpnSite"] + : subResourceSerializer(item["remoteVpnSite"]), + routingWeight: item["routingWeight"], + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + vpnConnectionProtocolType: item["vpnConnectionProtocolType"], + connectionBandwidth: item["connectionBandwidth"], + sharedKey: item["sharedKey"], + enableBgp: item["enableBgp"], + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArraySerializer(item["ipsecPolicies"]), + trafficSelectorPolicies: !item["trafficSelectorPolicies"] + ? item["trafficSelectorPolicies"] + : trafficSelectorPolicyArraySerializer(item["trafficSelectorPolicies"]), + enableRateLimiting: item["enableRateLimiting"], + enableInternetSecurity: item["enableInternetSecurity"], + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + vpnLinkConnections: !item["vpnLinkConnections"] + ? item["vpnLinkConnections"] + : vpnSiteLinkConnectionArraySerializer(item["vpnLinkConnections"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function vpnConnectionPropertiesDeserializer(item: any): VpnConnectionProperties { + return { + remoteVpnSite: !item["remoteVpnSite"] + ? item["remoteVpnSite"] + : subResourceDeserializer(item["remoteVpnSite"]), + routingWeight: item["routingWeight"], + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + connectionStatus: item["connectionStatus"], + vpnConnectionProtocolType: item["vpnConnectionProtocolType"], + ingressBytesTransferred: item["ingressBytesTransferred"], + egressBytesTransferred: item["egressBytesTransferred"], + connectionBandwidth: item["connectionBandwidth"], + sharedKey: item["sharedKey"], + enableBgp: item["enableBgp"], + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArrayDeserializer(item["ipsecPolicies"]), + trafficSelectorPolicies: !item["trafficSelectorPolicies"] + ? item["trafficSelectorPolicies"] + : trafficSelectorPolicyArrayDeserializer(item["trafficSelectorPolicies"]), + enableRateLimiting: item["enableRateLimiting"], + enableInternetSecurity: item["enableInternetSecurity"], + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + provisioningState: item["provisioningState"], + vpnLinkConnections: !item["vpnLinkConnections"] + ? item["vpnLinkConnections"] + : vpnSiteLinkConnectionArrayDeserializer(item["vpnLinkConnections"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +/** The current state of the vpn connection. */ +export enum KnownVpnConnectionStatus { + /** Unknown */ + Unknown = "Unknown", + /** Connecting */ + Connecting = "Connecting", + /** Connected */ + Connected = "Connected", + /** NotConnected */ + NotConnected = "NotConnected", +} + +/** + * The current state of the vpn connection. \ + * {@link KnownVpnConnectionStatus} can be used interchangeably with VpnConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **Connecting**: Connecting \ + * **Connected**: Connected \ + * **NotConnected**: NotConnected + */ +export type VpnConnectionStatus = string; + +export function vpnSiteLinkConnectionArraySerializer(result: Array): any[] { + return result.map((item) => { + return vpnSiteLinkConnectionSerializer(item); + }); +} + +export function vpnSiteLinkConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnSiteLinkConnectionDeserializer(item); + }); +} + +/** VpnSiteLinkConnection Resource. */ +export interface VpnSiteLinkConnection extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Id of the connected vpn site link. */ + vpnSiteLink?: SubResource; + /** Routing weight for vpn connection. */ + routingWeight?: number; + /** Vpn link connection mode. */ + vpnLinkConnectionMode?: VpnLinkConnectionMode; + /** The connection status. */ + readonly connectionStatus?: VpnConnectionStatus; + /** Connection protocol used for this connection. */ + vpnConnectionProtocolType?: VirtualNetworkGatewayConnectionProtocol; + /** Ingress bytes transferred. */ + readonly ingressBytesTransferred?: number; + /** Egress bytes transferred. */ + readonly egressBytesTransferred?: number; + /** Expected bandwidth in MBPS. */ + connectionBandwidth?: number; + /** SharedKey for the vpn link connection. We will no longer return sharedKey in any Create/Update/Get/List/UpdateTags VpnGateway/VpnConnection/VpnLinkConnection APIs response. Please use 'Vpn Link Connections - List Default Shared Key' API to fetch Vpn link connection sharedKey. */ + 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. */ + ipsecPolicies?: IpsecPolicy[]; + /** EnableBgp flag. */ + enableRateLimiting?: boolean; + /** Use local azure ip to initiate connection. */ + useLocalAzureIpAddress?: boolean; + /** The provisioning state of the VPN site link connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** List of ingress NatRules. */ + ingressNatRules?: SubResource[]; + /** List of egress NatRules. */ + egressNatRules?: SubResource[]; + /** Dead Peer Detection timeout in seconds for VpnLink connection. */ + dpdTimeoutSeconds?: number; +} + +export function vpnSiteLinkConnectionSerializer(item: VpnSiteLinkConnection): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "vpnSiteLink", + "routingWeight", + "vpnLinkConnectionMode", + "vpnConnectionProtocolType", + "connectionBandwidth", + "sharedKey", + "enableBgp", + "vpnGatewayCustomBgpAddresses", + "usePolicyBasedTrafficSelectors", + "ipsecPolicies", + "enableRateLimiting", + "useLocalAzureIpAddress", + "ingressNatRules", + "egressNatRules", + "dpdTimeoutSeconds", + ]) + ? undefined + : _vpnSiteLinkConnectionPropertiesSerializer(item), + }; +} + +export function vpnSiteLinkConnectionDeserializer(item: any): VpnSiteLinkConnection { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _vpnSiteLinkConnectionPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Parameters for VpnConnection. */ +export interface VpnSiteLinkConnectionProperties { + /** Id of the connected vpn site link. */ + vpnSiteLink?: SubResource; + /** Routing weight for vpn connection. */ + routingWeight?: number; + /** Vpn link connection mode. */ + vpnLinkConnectionMode?: VpnLinkConnectionMode; + /** The connection status. */ + readonly connectionStatus?: VpnConnectionStatus; + /** Connection protocol used for this connection. */ + vpnConnectionProtocolType?: VirtualNetworkGatewayConnectionProtocol; + /** Ingress bytes transferred. */ + readonly ingressBytesTransferred?: number; + /** Egress bytes transferred. */ + readonly egressBytesTransferred?: number; + /** Expected bandwidth in MBPS. */ + connectionBandwidth?: number; + /** SharedKey for the vpn link connection. We will no longer return sharedKey in any Create/Update/Get/List/UpdateTags VpnGateway/VpnConnection/VpnLinkConnection APIs response. Please use 'Vpn Link Connections - List Default Shared Key' API to fetch Vpn link connection sharedKey. */ + 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. */ + ipsecPolicies?: IpsecPolicy[]; + /** EnableBgp flag. */ + enableRateLimiting?: boolean; + /** Use local azure ip to initiate connection. */ + useLocalAzureIpAddress?: boolean; + /** The provisioning state of the VPN site link connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** List of ingress NatRules. */ + ingressNatRules?: SubResource[]; + /** List of egress NatRules. */ + egressNatRules?: SubResource[]; + /** Dead Peer Detection timeout in seconds for VpnLink connection. */ + dpdTimeoutSeconds?: number; +} + +export function vpnSiteLinkConnectionPropertiesSerializer( + item: VpnSiteLinkConnectionProperties, +): any { + return { + vpnSiteLink: !item["vpnSiteLink"] + ? item["vpnSiteLink"] + : subResourceSerializer(item["vpnSiteLink"]), + routingWeight: item["routingWeight"], + vpnLinkConnectionMode: item["vpnLinkConnectionMode"], + vpnConnectionProtocolType: item["vpnConnectionProtocolType"], + connectionBandwidth: item["connectionBandwidth"], + sharedKey: item["sharedKey"], + enableBgp: item["enableBgp"], + vpnGatewayCustomBgpAddresses: !item["vpnGatewayCustomBgpAddresses"] + ? item["vpnGatewayCustomBgpAddresses"] + : gatewayCustomBgpIpAddressIpConfigurationArraySerializer( + item["vpnGatewayCustomBgpAddresses"], + ), + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArraySerializer(item["ipsecPolicies"]), + enableRateLimiting: item["enableRateLimiting"], + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + ingressNatRules: !item["ingressNatRules"] + ? item["ingressNatRules"] + : subResourceArraySerializer(item["ingressNatRules"]), + egressNatRules: !item["egressNatRules"] + ? item["egressNatRules"] + : subResourceArraySerializer(item["egressNatRules"]), + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + }; +} + +export function vpnSiteLinkConnectionPropertiesDeserializer( + item: any, +): VpnSiteLinkConnectionProperties { + return { + vpnSiteLink: !item["vpnSiteLink"] + ? item["vpnSiteLink"] + : subResourceDeserializer(item["vpnSiteLink"]), + routingWeight: item["routingWeight"], + vpnLinkConnectionMode: item["vpnLinkConnectionMode"], + connectionStatus: item["connectionStatus"], + vpnConnectionProtocolType: item["vpnConnectionProtocolType"], + ingressBytesTransferred: item["ingressBytesTransferred"], + egressBytesTransferred: item["egressBytesTransferred"], + connectionBandwidth: item["connectionBandwidth"], + sharedKey: item["sharedKey"], + enableBgp: item["enableBgp"], + vpnGatewayCustomBgpAddresses: !item["vpnGatewayCustomBgpAddresses"] + ? item["vpnGatewayCustomBgpAddresses"] + : gatewayCustomBgpIpAddressIpConfigurationArrayDeserializer( + item["vpnGatewayCustomBgpAddresses"], + ), + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArrayDeserializer(item["ipsecPolicies"]), + enableRateLimiting: item["enableRateLimiting"], + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + provisioningState: item["provisioningState"], + ingressNatRules: !item["ingressNatRules"] + ? item["ingressNatRules"] + : subResourceArrayDeserializer(item["ingressNatRules"]), + egressNatRules: !item["egressNatRules"] + ? item["egressNatRules"] + : subResourceArrayDeserializer(item["egressNatRules"]), + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + }; +} + +/** Vpn link connection mode. */ +export enum KnownVpnLinkConnectionMode { + /** Default */ + Default = "Default", + /** ResponderOnly */ + ResponderOnly = "ResponderOnly", + /** InitiatorOnly */ + InitiatorOnly = "InitiatorOnly", +} + +/** + * Vpn link connection mode. \ + * {@link KnownVpnLinkConnectionMode} can be used interchangeably with VpnLinkConnectionMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default**: Default \ + * **ResponderOnly**: ResponderOnly \ + * **InitiatorOnly**: InitiatorOnly + */ +export type VpnLinkConnectionMode = string; + +export function vpnGatewayIpConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vpnGatewayIpConfigurationDeserializer(item); + }); +} + +/** IP Configuration of a VPN Gateway Resource. */ +export interface VpnGatewayIpConfiguration { + /** The identifier of the IP configuration for a VPN Gateway. */ + id?: string; + /** The public IP address of this IP configuration. */ + publicIpAddress?: string; + /** The private IP address of this IP configuration. */ + privateIpAddress?: string; +} + +export function vpnGatewayIpConfigurationDeserializer(item: any): VpnGatewayIpConfiguration { + return { + id: item["id"], + publicIpAddress: item["publicIpAddress"], + privateIpAddress: item["privateIpAddress"], + }; +} + +export function vpnGatewayNatRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return vpnGatewayNatRuleSerializer(item); + }); +} + +export function vpnGatewayNatRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vpnGatewayNatRuleDeserializer(item); + }); +} + +/** VpnGatewayNatRule Resource. */ +export interface VpnGatewayNatRule extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The provisioning state of the NAT Rule resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The type of NAT rule for VPN NAT. */ + typePropertiesType?: VpnNatRuleType; + /** The Source NAT direction of a VPN NAT. */ + mode?: VpnNatRuleMode; + /** The private IP address internal mapping for NAT. */ + internalMappings?: VpnNatRuleMapping[]; + /** The private IP address external mapping for NAT. */ + externalMappings?: VpnNatRuleMapping[]; + /** The IP Configuration ID this NAT rule applies to. */ + ipConfigurationId?: string; + /** List of egress VpnSiteLinkConnections. */ + readonly egressVpnSiteLinkConnections?: SubResource[]; + /** List of ingress VpnSiteLinkConnections. */ + readonly ingressVpnSiteLinkConnections?: SubResource[]; +} + +export function vpnGatewayNatRuleSerializer(item: VpnGatewayNatRule): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "type", + "mode", + "internalMappings", + "externalMappings", + "ipConfigurationId", + ]) + ? undefined + : _vpnGatewayNatRulePropertiesSerializer(item), + }; +} + +export function vpnGatewayNatRuleDeserializer(item: any): VpnGatewayNatRule { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _vpnGatewayNatRulePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Parameters for VpnGatewayNatRule. */ +export interface VpnGatewayNatRuleProperties { + /** The provisioning state of the NAT Rule resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The type of NAT rule for VPN NAT. */ + type?: VpnNatRuleType; + /** The Source NAT direction of a VPN NAT. */ + mode?: VpnNatRuleMode; + /** The private IP address internal mapping for NAT. */ + internalMappings?: VpnNatRuleMapping[]; + /** The private IP address external mapping for NAT. */ + externalMappings?: VpnNatRuleMapping[]; + /** The IP Configuration ID this NAT rule applies to. */ + ipConfigurationId?: string; + /** List of egress VpnSiteLinkConnections. */ + readonly egressVpnSiteLinkConnections?: SubResource[]; + /** List of ingress VpnSiteLinkConnections. */ + readonly ingressVpnSiteLinkConnections?: SubResource[]; +} + +export function vpnGatewayNatRulePropertiesSerializer(item: VpnGatewayNatRuleProperties): any { + return { + type: item["type"], + mode: item["mode"], + internalMappings: !item["internalMappings"] + ? item["internalMappings"] + : vpnNatRuleMappingArraySerializer(item["internalMappings"]), + externalMappings: !item["externalMappings"] + ? item["externalMappings"] + : vpnNatRuleMappingArraySerializer(item["externalMappings"]), + ipConfigurationId: item["ipConfigurationId"], + }; +} + +export function vpnGatewayNatRulePropertiesDeserializer(item: any): VpnGatewayNatRuleProperties { + return { + provisioningState: item["provisioningState"], + type: item["type"], + mode: item["mode"], + internalMappings: !item["internalMappings"] + ? item["internalMappings"] + : vpnNatRuleMappingArrayDeserializer(item["internalMappings"]), + externalMappings: !item["externalMappings"] + ? item["externalMappings"] + : vpnNatRuleMappingArrayDeserializer(item["externalMappings"]), + ipConfigurationId: item["ipConfigurationId"], + egressVpnSiteLinkConnections: !item["egressVpnSiteLinkConnections"] + ? item["egressVpnSiteLinkConnections"] + : subResourceArrayDeserializer(item["egressVpnSiteLinkConnections"]), + ingressVpnSiteLinkConnections: !item["ingressVpnSiteLinkConnections"] + ? item["ingressVpnSiteLinkConnections"] + : subResourceArrayDeserializer(item["ingressVpnSiteLinkConnections"]), + }; +} + +/** Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink to get the next set of results. */ +export interface _ListVpnGatewaysResult { + /** The VpnGateway items on this page */ + value: VpnGateway[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVpnGatewaysResultDeserializer(item: any): _ListVpnGatewaysResult { + return { + value: vpnGatewayArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function vpnGatewayArraySerializer(result: Array): any[] { + return result.map((item) => { + return vpnGatewaySerializer(item); + }); +} + +export function vpnGatewayArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vpnGatewayDeserializer(item); + }); +} + +/** Start packet capture parameters. */ +export interface VpnGatewayPacketCaptureStartParameters { + /** Start Packet capture parameters on vpn gateway. */ + filterData?: string; +} + +export function vpnGatewayPacketCaptureStartParametersSerializer( + item: VpnGatewayPacketCaptureStartParameters, +): any { + return { filterData: item["filterData"] }; +} + +/** Stop packet capture parameters. */ +export interface VpnGatewayPacketCaptureStopParameters { + /** SAS url for packet capture on vpn gateway. */ + sasUrl?: string; +} + +export function vpnGatewayPacketCaptureStopParametersSerializer( + item: VpnGatewayPacketCaptureStopParameters, +): any { + return { sasUrl: item["sasUrl"] }; +} + +/** ExpressRoute gateway resource. */ +export interface ExpressRouteGateway extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Configuration for auto scaling. */ + autoScaleConfiguration?: ExpressRouteGatewayPropertiesAutoScaleConfiguration; + /** List of ExpressRoute connections to the ExpressRoute gateway. */ + expressRouteConnections?: ExpressRouteConnection[]; + /** The provisioning state of the express route gateway resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The Virtual Hub where the ExpressRoute gateway is or will be deployed. */ + virtualHub?: VirtualHubId; + /** Configures this gateway to accept traffic from non Virtual WAN networks. */ + allowNonVirtualWanTraffic?: boolean; +} + +export function expressRouteGatewaySerializer(item: ExpressRouteGateway): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "autoScaleConfiguration", + "expressRouteConnections", + "virtualHub", + "allowNonVirtualWanTraffic", + ]) + ? undefined + : _expressRouteGatewayPropertiesSerializer(item), + }; +} + +export function expressRouteGatewayDeserializer(item: any): ExpressRouteGateway { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _expressRouteGatewayPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** ExpressRoute gateway resource properties. */ +export interface ExpressRouteGatewayProperties { + /** Configuration for auto scaling. */ + autoScaleConfiguration?: ExpressRouteGatewayPropertiesAutoScaleConfiguration; + /** List of ExpressRoute connections to the ExpressRoute gateway. */ + expressRouteConnections?: ExpressRouteConnection[]; + /** The provisioning state of the express route gateway resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The Virtual Hub where the ExpressRoute gateway is or will be deployed. */ + virtualHub: VirtualHubId; + /** Configures this gateway to accept traffic from non Virtual WAN networks. */ + allowNonVirtualWanTraffic?: boolean; +} + +export function expressRouteGatewayPropertiesSerializer(item: ExpressRouteGatewayProperties): any { + return { + autoScaleConfiguration: !item["autoScaleConfiguration"] + ? item["autoScaleConfiguration"] + : expressRouteGatewayPropertiesAutoScaleConfigurationSerializer( + item["autoScaleConfiguration"], + ), + expressRouteConnections: !item["expressRouteConnections"] + ? item["expressRouteConnections"] + : expressRouteConnectionArraySerializer(item["expressRouteConnections"]), + virtualHub: virtualHubIdSerializer(item["virtualHub"]), + allowNonVirtualWanTraffic: item["allowNonVirtualWanTraffic"], + }; +} + +export function expressRouteGatewayPropertiesDeserializer( + item: any, +): ExpressRouteGatewayProperties { + return { + autoScaleConfiguration: !item["autoScaleConfiguration"] + ? item["autoScaleConfiguration"] + : expressRouteGatewayPropertiesAutoScaleConfigurationDeserializer( + item["autoScaleConfiguration"], + ), + expressRouteConnections: !item["expressRouteConnections"] + ? item["expressRouteConnections"] + : expressRouteConnectionArrayDeserializer(item["expressRouteConnections"]), + provisioningState: item["provisioningState"], + virtualHub: virtualHubIdDeserializer(item["virtualHub"]), + allowNonVirtualWanTraffic: item["allowNonVirtualWanTraffic"], + }; +} + +/** Configuration for auto scaling. */ +export interface ExpressRouteGatewayPropertiesAutoScaleConfiguration { + /** Minimum and maximum number of scale units to deploy. */ + bounds?: ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds; +} + +export function expressRouteGatewayPropertiesAutoScaleConfigurationSerializer( + item: ExpressRouteGatewayPropertiesAutoScaleConfiguration, +): any { + return { + bounds: !item["bounds"] + ? item["bounds"] + : expressRouteGatewayPropertiesAutoScaleConfigurationBoundsSerializer(item["bounds"]), + }; +} + +export function expressRouteGatewayPropertiesAutoScaleConfigurationDeserializer( + item: any, +): ExpressRouteGatewayPropertiesAutoScaleConfiguration { + return { + bounds: !item["bounds"] + ? item["bounds"] + : expressRouteGatewayPropertiesAutoScaleConfigurationBoundsDeserializer(item["bounds"]), + }; +} + +/** Minimum and maximum number of scale units to deploy. */ +export interface ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds { + /** Minimum number of scale units deployed for ExpressRoute gateway. */ + min?: number; + /** Maximum number of scale units deployed for ExpressRoute gateway. */ + max?: number; +} + +export function expressRouteGatewayPropertiesAutoScaleConfigurationBoundsSerializer( + item: ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds, +): any { + return { min: item["min"], max: item["max"] }; +} + +export function expressRouteGatewayPropertiesAutoScaleConfigurationBoundsDeserializer( + item: any, +): ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds { + return { + min: item["min"], + max: item["max"], + }; +} + +export function expressRouteConnectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteConnectionSerializer(item); + }); +} + +export function expressRouteConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteConnectionDeserializer(item); + }); +} + +/** ExpressRouteConnection resource. */ +export interface ExpressRouteConnection extends SubResource { + /** The name of the resource. */ + name: string; + /** The provisioning state of the express route connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The ExpressRoute circuit peering. */ + expressRouteCircuitPeering?: ExpressRouteCircuitPeeringId; + /** Authorization key to establish the connection. */ + authorizationKey?: string; + /** The routing weight associated to the connection. */ + routingWeight?: number; + /** Enable internet security. */ + enableInternetSecurity?: boolean; + /** Enable FastPath to vWan Firewall hub. */ + expressRouteGatewayBypass?: boolean; + /** Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled. */ + enablePrivateLinkFastPath?: boolean; + /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function expressRouteConnectionSerializer(item: ExpressRouteConnection): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "expressRouteCircuitPeering", + "authorizationKey", + "routingWeight", + "enableInternetSecurity", + "expressRouteGatewayBypass", + "enablePrivateLinkFastPath", + "routingConfiguration", + ]) + ? undefined + : _expressRouteConnectionPropertiesSerializer(item), + name: item["name"], + }; +} + +export function expressRouteConnectionDeserializer(item: any): ExpressRouteConnection { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _expressRouteConnectionPropertiesDeserializer(item["properties"])), + name: item["name"], + }; +} + +/** Properties of the ExpressRouteConnection subresource. */ +export interface ExpressRouteConnectionProperties { + /** The provisioning state of the express route connection resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The ExpressRoute circuit peering. */ + expressRouteCircuitPeering: ExpressRouteCircuitPeeringId; + /** Authorization key to establish the connection. */ + authorizationKey?: string; + /** The routing weight associated to the connection. */ + routingWeight?: number; + /** Enable internet security. */ + enableInternetSecurity?: boolean; + /** Enable FastPath to vWan Firewall hub. */ + expressRouteGatewayBypass?: boolean; + /** Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled. */ + enablePrivateLinkFastPath?: boolean; + /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function expressRouteConnectionPropertiesSerializer( + item: ExpressRouteConnectionProperties, +): any { + return { + expressRouteCircuitPeering: expressRouteCircuitPeeringIdSerializer( + item["expressRouteCircuitPeering"], + ), + authorizationKey: item["authorizationKey"], + routingWeight: item["routingWeight"], + enableInternetSecurity: item["enableInternetSecurity"], + expressRouteGatewayBypass: item["expressRouteGatewayBypass"], + enablePrivateLinkFastPath: item["enablePrivateLinkFastPath"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function expressRouteConnectionPropertiesDeserializer( + item: any, +): ExpressRouteConnectionProperties { + return { + provisioningState: item["provisioningState"], + expressRouteCircuitPeering: expressRouteCircuitPeeringIdDeserializer( + item["expressRouteCircuitPeering"], + ), + authorizationKey: item["authorizationKey"], + routingWeight: item["routingWeight"], + enableInternetSecurity: item["enableInternetSecurity"], + expressRouteGatewayBypass: item["expressRouteGatewayBypass"], + enablePrivateLinkFastPath: item["enablePrivateLinkFastPath"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +/** ExpressRoute circuit peering identifier. */ +export interface ExpressRouteCircuitPeeringId { + /** The ID of the ExpressRoute circuit peering. */ + id?: string; +} + +export function expressRouteCircuitPeeringIdSerializer(item: ExpressRouteCircuitPeeringId): any { + return { id: item["id"] }; +} + +export function expressRouteCircuitPeeringIdDeserializer(item: any): ExpressRouteCircuitPeeringId { + return { + id: item["id"], + }; +} + +/** Virtual Hub identifier. */ +export interface VirtualHubId { + /** The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same subscription. */ + id?: string; +} + +export function virtualHubIdSerializer(item: VirtualHubId): any { + return { id: item["id"] }; +} + +export function virtualHubIdDeserializer(item: any): VirtualHubId { + return { + id: item["id"], + }; +} + +/** List of ExpressRoute gateways. */ +export interface ExpressRouteGatewayList { + /** List of ExpressRoute gateways. */ + value?: ExpressRouteGateway[]; +} + +export function expressRouteGatewayListDeserializer(item: any): ExpressRouteGatewayList { + return { + value: !item["value"] ? item["value"] : expressRouteGatewayArrayDeserializer(item["value"]), + }; +} + +export function expressRouteGatewayArraySerializer(result: Array): any[] { + return result.map((item) => { + return expressRouteGatewaySerializer(item); + }); +} + +export function expressRouteGatewayArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return expressRouteGatewayDeserializer(item); + }); +} + +/** model interface _StopSiteFailoverTestParameterBody */ +export interface _StopSiteFailoverTestParameterBody { + /** Parameters supplied to stop the failover simulation on the express route gateway. */ + stopParameters: ExpressRouteFailoverStopApiParameters; +} + +export function _stopSiteFailoverTestParameterBodySerializer( + item: _StopSiteFailoverTestParameterBody, +): any { + return { + stopParameters: expressRouteFailoverStopApiParametersSerializer(item["stopParameters"]), + }; +} + +/** RouteTable resource in a virtual hub. */ +export interface HubRouteTable extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** List of all routes. */ + routes?: HubRoute[]; + /** List of labels associated with this route table. */ + labels?: string[]; + /** List of all connections associated with this route table. */ + readonly associatedConnections?: string[]; + /** List of all connections that advertise to this route table. */ + readonly propagatingConnections?: string[]; + /** The provisioning state of the RouteTable resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function hubRouteTableSerializer(item: HubRouteTable): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["routes", "labels"]) + ? undefined + : _hubRouteTablePropertiesSerializer(item), + }; +} + +export function hubRouteTableDeserializer(item: any): HubRouteTable { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _hubRouteTablePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Parameters for RouteTable. */ +export interface HubRouteTableProperties { + /** List of all routes. */ + routes?: HubRoute[]; + /** List of labels associated with this route table. */ + labels?: string[]; + /** List of all connections associated with this route table. */ + readonly associatedConnections?: string[]; + /** List of all connections that advertise to this route table. */ + readonly propagatingConnections?: string[]; + /** The provisioning state of the RouteTable resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function hubRouteTablePropertiesSerializer(item: HubRouteTableProperties): any { + return { + routes: !item["routes"] ? item["routes"] : hubRouteArraySerializer(item["routes"]), + labels: !item["labels"] + ? item["labels"] + : item["labels"].map((p: any) => { + return p; + }), + }; +} + +export function hubRouteTablePropertiesDeserializer(item: any): HubRouteTableProperties { + return { + routes: !item["routes"] ? item["routes"] : hubRouteArrayDeserializer(item["routes"]), + labels: !item["labels"] + ? item["labels"] + : item["labels"].map((p: any) => { + return p; + }), + associatedConnections: !item["associatedConnections"] + ? item["associatedConnections"] + : item["associatedConnections"].map((p: any) => { + return p; + }), + propagatingConnections: !item["propagatingConnections"] + ? item["propagatingConnections"] + : item["propagatingConnections"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function hubRouteArraySerializer(result: Array): any[] { + return result.map((item) => { + return hubRouteSerializer(item); + }); +} + +export function hubRouteArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return hubRouteDeserializer(item); + }); +} + +/** RouteTable route. */ +export interface HubRoute { + /** The name of the Route that is unique within a RouteTable. This name can be used to access this route. */ + name: string; + /** The type of destinations (eg: CIDR, ResourceId, Service). */ + destinationType: string; + /** List of all destinations. */ + destinations: string[]; + /** The type of next hop (eg: ResourceId). */ + nextHopType: string; + /** NextHop resource ID. */ + nextHop: string; +} + +export function hubRouteSerializer(item: HubRoute): any { + return { + name: item["name"], + destinationType: item["destinationType"], + destinations: item["destinations"].map((p: any) => { + return p; + }), + nextHopType: item["nextHopType"], + nextHop: item["nextHop"], + }; +} + +export function hubRouteDeserializer(item: any): HubRoute { + return { + name: item["name"], + destinationType: item["destinationType"], + destinations: item["destinations"].map((p: any) => { + return p; + }), + nextHopType: item["nextHopType"], + nextHop: item["nextHop"], + }; +} + +/** List of RouteTables and a URL nextLink to get the next set of results. */ +export interface _ListHubRouteTablesResult { + /** The HubRouteTable items on this page */ + value: HubRouteTable[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listHubRouteTablesResultDeserializer(item: any): _ListHubRouteTablesResult { + return { + value: hubRouteTableArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function hubRouteTableArraySerializer(result: Array): any[] { + return result.map((item) => { + return hubRouteTableSerializer(item); + }); +} + +export function hubRouteTableArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return hubRouteTableDeserializer(item); + }); +} + +/** ConnectionPolicy resource defined for VirtualHub. */ +export interface ConnectionPolicy extends ProxyResource { + /** Properties of the ConnectionPolicy resource. */ + properties?: ConnectionPolicyProperties; +} + +export function connectionPolicySerializer(item: ConnectionPolicy): any { + return { + id: item["id"], + properties: !item["properties"] + ? item["properties"] + : connectionPolicyPropertiesSerializer(item["properties"]), + }; +} + +export function connectionPolicyDeserializer(item: any): ConnectionPolicy { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + properties: !item["properties"] + ? item["properties"] + : connectionPolicyPropertiesDeserializer(item["properties"]), + }; +} + +/** Properties of the ConnectionPolicy resource. */ +export interface ConnectionPolicyProperties { + /** Enable internet security. */ + enableInternetSecurity?: boolean; + /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ + routingConfiguration?: RoutingConfiguration; + /** The provisioning state of the ConnectionPolicy resource. */ + readonly provisioningState?: CommonProvisioningState; + /** List of connection names (e.g. VpnConnection, HubVirtualNetworkConnection) associated with this ConnectionPolicy. These are resource names, not Azure resource IDs, consistent with the established VirtualWAN pattern used by HubRouteTable.associatedConnections. */ + readonly associatedConnections?: string[]; +} + +export function connectionPolicyPropertiesSerializer(item: ConnectionPolicyProperties): any { + return { + enableInternetSecurity: item["enableInternetSecurity"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function connectionPolicyPropertiesDeserializer(item: any): ConnectionPolicyProperties { + return { + enableInternetSecurity: item["enableInternetSecurity"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + provisioningState: item["provisioningState"], + associatedConnections: !item["associatedConnections"] + ? item["associatedConnections"] + : item["associatedConnections"].map((p: any) => { + return p; + }), + }; +} + +/** Proxy resource representation. */ +export interface ProxyResource { + /** Resource ID. */ + id?: string; + /** Resource name. */ + readonly name?: string; + /** Resource type. */ + readonly type?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; +} + +export function proxyResourceSerializer(item: ProxyResource): any { + return { id: item["id"] }; +} + +export function proxyResourceDeserializer(item: any): ProxyResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + }; +} + +/** List of ConnectionPolicies and a URL nextLink to get the next set of results. */ +export interface _ListConnectionPoliciesResult { + /** The ConnectionPolicy items on this page */ + value: ConnectionPolicy[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listConnectionPoliciesResultDeserializer( + item: any, +): _ListConnectionPoliciesResult { + return { + value: connectionPolicyArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function connectionPolicyArraySerializer(result: Array): any[] { + return result.map((item) => { + return connectionPolicySerializer(item); + }); +} + +export function connectionPolicyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return connectionPolicyDeserializer(item); + }); +} + +/** Defines web application firewall policy. */ +export interface WebApplicationFirewallPolicy extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The PolicySettings for policy. */ + policySettings?: PolicySettings; + /** The custom rules inside the policy. */ + customRules?: WebApplicationFirewallCustomRule[]; + /** A collection of references to application gateways. */ + readonly applicationGateways?: ApplicationGateway[]; + /** The provisioning state of the web application firewall policy resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Resource status of the policy. */ + readonly resourceState?: WebApplicationFirewallPolicyResourceState; + /** Describes the managedRules structure. */ + managedRules?: ManagedRulesDefinition; + /** A collection of references to application gateway http listeners. */ + readonly httpListeners?: SubResource[]; + /** A collection of references to application gateway path rules. */ + readonly pathBasedRules?: SubResource[]; + /** A collection of references to application gateway for containers. */ + readonly applicationGatewayForContainers?: ApplicationGatewayForContainersReferenceDefinition[]; +} + +export function webApplicationFirewallPolicySerializer(item: WebApplicationFirewallPolicy): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, ["policySettings", "customRules", "managedRules"]) + ? undefined + : _webApplicationFirewallPolicyPropertiesSerializer(item), + }; +} + +export function webApplicationFirewallPolicyDeserializer(item: any): WebApplicationFirewallPolicy { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _webApplicationFirewallPolicyPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Defines web application firewall policy properties. */ +export interface WebApplicationFirewallPolicyPropertiesFormat { + /** The PolicySettings for policy. */ + policySettings?: PolicySettings; + /** The custom rules inside the policy. */ + customRules?: WebApplicationFirewallCustomRule[]; + /** A collection of references to application gateways. */ + readonly applicationGateways?: ApplicationGateway[]; + /** The provisioning state of the web application firewall policy resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Resource status of the policy. */ + readonly resourceState?: WebApplicationFirewallPolicyResourceState; + /** Describes the managedRules structure. */ + managedRules: ManagedRulesDefinition; + /** A collection of references to application gateway http listeners. */ + readonly httpListeners?: SubResource[]; + /** A collection of references to application gateway path rules. */ + readonly pathBasedRules?: SubResource[]; + /** A collection of references to application gateway for containers. */ + readonly applicationGatewayForContainers?: ApplicationGatewayForContainersReferenceDefinition[]; +} + +export function webApplicationFirewallPolicyPropertiesFormatSerializer( + item: WebApplicationFirewallPolicyPropertiesFormat, +): any { + return { + policySettings: !item["policySettings"] + ? item["policySettings"] + : policySettingsSerializer(item["policySettings"]), + customRules: !item["customRules"] + ? item["customRules"] + : webApplicationFirewallCustomRuleArraySerializer(item["customRules"]), + managedRules: managedRulesDefinitionSerializer(item["managedRules"]), + }; +} + +export function webApplicationFirewallPolicyPropertiesFormatDeserializer( + item: any, +): WebApplicationFirewallPolicyPropertiesFormat { + return { + policySettings: !item["policySettings"] + ? item["policySettings"] + : policySettingsDeserializer(item["policySettings"]), + customRules: !item["customRules"] + ? item["customRules"] + : webApplicationFirewallCustomRuleArrayDeserializer(item["customRules"]), + applicationGateways: !item["applicationGateways"] + ? item["applicationGateways"] + : applicationGatewayArrayDeserializer(item["applicationGateways"]), + provisioningState: item["provisioningState"], + resourceState: item["resourceState"], + managedRules: managedRulesDefinitionDeserializer(item["managedRules"]), + httpListeners: !item["httpListeners"] + ? item["httpListeners"] + : subResourceArrayDeserializer(item["httpListeners"]), + pathBasedRules: !item["pathBasedRules"] + ? item["pathBasedRules"] + : subResourceArrayDeserializer(item["pathBasedRules"]), + applicationGatewayForContainers: !item["applicationGatewayForContainers"] + ? item["applicationGatewayForContainers"] + : applicationGatewayForContainersReferenceDefinitionArrayDeserializer( + item["applicationGatewayForContainers"], + ), + }; +} + +/** Defines contents of a web application firewall global configuration. */ +export interface PolicySettings { + /** The state of the policy. */ + state?: WebApplicationFirewallEnabledState; + /** The mode of the policy. */ + mode?: WebApplicationFirewallMode; + /** Whether to allow WAF to check request Body. */ + requestBodyCheck?: boolean; + /** Max inspection limit in KB for request body inspection for WAF. */ + requestBodyInspectLimitInKB?: number; + /** Whether allow WAF to enforce request body limits. */ + requestBodyEnforcement?: boolean; + /** Maximum request body size in Kb for WAF. */ + maxRequestBodySizeInKb?: number; + /** Whether allow WAF to enforce file upload limits. */ + fileUploadEnforcement?: boolean; + /** Maximum file upload size in Mb for WAF. */ + fileUploadLimitInMb?: number; + /** If the action type is block, customer can override the response status code. */ + customBlockResponseStatusCode?: number; + /** If the action type is block, customer can override the response body. The body must be specified in base64 encoding. */ + customBlockResponseBody?: string; + /** To scrub sensitive log fields */ + logScrubbing?: PolicySettingsLogScrubbing; + /** Web Application Firewall JavaScript Challenge Cookie Expiration time in minutes. */ + jsChallengeCookieExpirationInMins?: number; + /** Web Application Firewall CAPTCHA Cookie Expiration time in minutes. */ + captchaExpirationInMins?: number; +} + +export function policySettingsSerializer(item: PolicySettings): any { + return { + state: item["state"], + mode: item["mode"], + requestBodyCheck: item["requestBodyCheck"], + requestBodyInspectLimitInKB: item["requestBodyInspectLimitInKB"], + requestBodyEnforcement: item["requestBodyEnforcement"], + maxRequestBodySizeInKb: item["maxRequestBodySizeInKb"], + fileUploadEnforcement: item["fileUploadEnforcement"], + fileUploadLimitInMb: item["fileUploadLimitInMb"], + customBlockResponseStatusCode: item["customBlockResponseStatusCode"], + customBlockResponseBody: item["customBlockResponseBody"], + logScrubbing: !item["logScrubbing"] + ? item["logScrubbing"] + : policySettingsLogScrubbingSerializer(item["logScrubbing"]), + jsChallengeCookieExpirationInMins: item["jsChallengeCookieExpirationInMins"], + captchaExpirationInMins: item["captchaExpirationInMins"], + }; +} + +export function policySettingsDeserializer(item: any): PolicySettings { + return { + state: item["state"], + mode: item["mode"], + requestBodyCheck: item["requestBodyCheck"], + requestBodyInspectLimitInKB: item["requestBodyInspectLimitInKB"], + requestBodyEnforcement: item["requestBodyEnforcement"], + maxRequestBodySizeInKb: item["maxRequestBodySizeInKb"], + fileUploadEnforcement: item["fileUploadEnforcement"], + fileUploadLimitInMb: item["fileUploadLimitInMb"], + customBlockResponseStatusCode: item["customBlockResponseStatusCode"], + customBlockResponseBody: item["customBlockResponseBody"], + logScrubbing: !item["logScrubbing"] + ? item["logScrubbing"] + : policySettingsLogScrubbingDeserializer(item["logScrubbing"]), + jsChallengeCookieExpirationInMins: item["jsChallengeCookieExpirationInMins"], + captchaExpirationInMins: item["captchaExpirationInMins"], + }; +} + +/** The state of the policy. */ +export enum KnownWebApplicationFirewallEnabledState { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", +} + +/** + * The state of the policy. \ + * {@link KnownWebApplicationFirewallEnabledState} can be used interchangeably with WebApplicationFirewallEnabledState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled**: Disabled \ + * **Enabled**: Enabled + */ +export type WebApplicationFirewallEnabledState = string; + +/** The mode of the policy. */ +export enum KnownWebApplicationFirewallMode { + /** Prevention */ + Prevention = "Prevention", + /** Detection */ + Detection = "Detection", +} + +/** + * The mode of the policy. \ + * {@link KnownWebApplicationFirewallMode} can be used interchangeably with WebApplicationFirewallMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Prevention**: Prevention \ + * **Detection**: Detection + */ +export type WebApplicationFirewallMode = string; + +/** To scrub sensitive log fields */ +export interface PolicySettingsLogScrubbing { + /** State of the log scrubbing config. Default value is Enabled. */ + state?: WebApplicationFirewallScrubbingState; + /** The rules that are applied to the logs for scrubbing. */ + scrubbingRules?: WebApplicationFirewallScrubbingRules[]; +} + +export function policySettingsLogScrubbingSerializer(item: PolicySettingsLogScrubbing): any { + return { + state: item["state"], + scrubbingRules: !item["scrubbingRules"] + ? item["scrubbingRules"] + : webApplicationFirewallScrubbingRulesArraySerializer(item["scrubbingRules"]), + }; +} + +export function policySettingsLogScrubbingDeserializer(item: any): PolicySettingsLogScrubbing { + return { + state: item["state"], + scrubbingRules: !item["scrubbingRules"] + ? item["scrubbingRules"] + : webApplicationFirewallScrubbingRulesArrayDeserializer(item["scrubbingRules"]), + }; +} + +/** State of the log scrubbing config. Default value is Enabled. */ +export enum KnownWebApplicationFirewallScrubbingState { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", +} + +/** + * State of the log scrubbing config. Default value is Enabled. \ + * {@link KnownWebApplicationFirewallScrubbingState} can be used interchangeably with WebApplicationFirewallScrubbingState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled**: Disabled \ + * **Enabled**: Enabled + */ +export type WebApplicationFirewallScrubbingState = string; + +export function webApplicationFirewallScrubbingRulesArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return webApplicationFirewallScrubbingRulesSerializer(item); + }); +} + +export function webApplicationFirewallScrubbingRulesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return webApplicationFirewallScrubbingRulesDeserializer(item); + }); +} + +/** Allow certain variables to be scrubbed on WAF logs */ +export interface WebApplicationFirewallScrubbingRules { + /** The variable to be scrubbed from the logs. */ + matchVariable: ScrubbingRuleEntryMatchVariable; + /** When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. */ + selectorMatchOperator: ScrubbingRuleEntryMatchOperator; + /** When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to. */ + selector?: string; + /** Defines the state of log scrubbing rule. Default value is Enabled. */ + state?: ScrubbingRuleEntryState; +} + +export function webApplicationFirewallScrubbingRulesSerializer( + item: WebApplicationFirewallScrubbingRules, +): any { + return { + matchVariable: item["matchVariable"], + selectorMatchOperator: item["selectorMatchOperator"], + selector: item["selector"], + state: item["state"], + }; +} + +export function webApplicationFirewallScrubbingRulesDeserializer( + item: any, +): WebApplicationFirewallScrubbingRules { + return { + matchVariable: item["matchVariable"], + selectorMatchOperator: item["selectorMatchOperator"], + selector: item["selector"], + state: item["state"], + }; +} + +/** The variable to be scrubbed from the logs. */ +export enum KnownScrubbingRuleEntryMatchVariable { + /** RequestHeaderNames */ + RequestHeaderNames = "RequestHeaderNames", + /** RequestCookieNames */ + RequestCookieNames = "RequestCookieNames", + /** RequestArgNames */ + RequestArgNames = "RequestArgNames", + /** RequestPostArgNames */ + RequestPostArgNames = "RequestPostArgNames", + /** RequestJSONArgNames */ + RequestJsonArgNames = "RequestJSONArgNames", + /** RequestIPAddress */ + RequestIPAddress = "RequestIPAddress", +} + +/** + * The variable to be scrubbed from the logs. \ + * {@link KnownScrubbingRuleEntryMatchVariable} can be used interchangeably with ScrubbingRuleEntryMatchVariable, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RequestHeaderNames**: RequestHeaderNames \ + * **RequestCookieNames**: RequestCookieNames \ + * **RequestArgNames**: RequestArgNames \ + * **RequestPostArgNames**: RequestPostArgNames \ + * **RequestJSONArgNames**: RequestJSONArgNames \ + * **RequestIPAddress**: RequestIPAddress + */ +export type ScrubbingRuleEntryMatchVariable = string; + +/** When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. */ +export enum KnownScrubbingRuleEntryMatchOperator { + /** Equals */ + Equals = "Equals", + /** EqualsAny */ + EqualsAny = "EqualsAny", +} + +/** + * When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. \ + * {@link KnownScrubbingRuleEntryMatchOperator} can be used interchangeably with ScrubbingRuleEntryMatchOperator, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Equals**: Equals \ + * **EqualsAny**: EqualsAny + */ +export type ScrubbingRuleEntryMatchOperator = string; + +/** Defines the state of log scrubbing rule. Default value is Enabled. */ +export enum KnownScrubbingRuleEntryState { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Defines the state of log scrubbing rule. Default value is Enabled. \ + * {@link KnownScrubbingRuleEntryState} can be used interchangeably with ScrubbingRuleEntryState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Enabled \ + * **Disabled**: Disabled + */ +export type ScrubbingRuleEntryState = string; + +export function webApplicationFirewallCustomRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return webApplicationFirewallCustomRuleSerializer(item); + }); +} + +export function webApplicationFirewallCustomRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return webApplicationFirewallCustomRuleDeserializer(item); + }); +} + +/** Defines contents of a web application rule. */ +export interface WebApplicationFirewallCustomRule { + /** The name of the resource that is unique within a policy. This name can be used to access the resource. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. */ + priority: number; + /** Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. */ + state?: WebApplicationFirewallState; + /** Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule. */ + rateLimitDuration?: ApplicationGatewayFirewallRateLimitDuration; + /** Rate Limit threshold to apply in case ruleType is RateLimitRule. Must be greater than or equal to 1 */ + rateLimitThreshold?: number; + /** The rule type. */ + ruleType: WebApplicationFirewallRuleType; + /** List of match conditions. */ + matchConditions: MatchCondition[]; + /** List of user session identifier group by clauses. */ + groupByUserSession?: GroupByUserSession[]; + /** Type of Actions. */ + action: WebApplicationFirewallAction; +} + +export function webApplicationFirewallCustomRuleSerializer( + item: WebApplicationFirewallCustomRule, +): any { + return { + name: item["name"], + priority: item["priority"], + state: item["state"], + rateLimitDuration: item["rateLimitDuration"], + rateLimitThreshold: item["rateLimitThreshold"], + ruleType: item["ruleType"], + matchConditions: matchConditionArraySerializer(item["matchConditions"]), + groupByUserSession: !item["groupByUserSession"] + ? item["groupByUserSession"] + : groupByUserSessionArraySerializer(item["groupByUserSession"]), + action: item["action"], + }; +} + +export function webApplicationFirewallCustomRuleDeserializer( + item: any, +): WebApplicationFirewallCustomRule { + return { + name: item["name"], + etag: item["etag"], + priority: item["priority"], + state: item["state"], + rateLimitDuration: item["rateLimitDuration"], + rateLimitThreshold: item["rateLimitThreshold"], + ruleType: item["ruleType"], + matchConditions: matchConditionArrayDeserializer(item["matchConditions"]), + groupByUserSession: !item["groupByUserSession"] + ? item["groupByUserSession"] + : groupByUserSessionArrayDeserializer(item["groupByUserSession"]), + action: item["action"], + }; +} + +/** Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. */ +export enum KnownWebApplicationFirewallState { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", +} + +/** + * Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. \ + * {@link KnownWebApplicationFirewallState} can be used interchangeably with WebApplicationFirewallState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled**: Disabled \ + * **Enabled**: Enabled + */ +export type WebApplicationFirewallState = string; + +/** Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule. */ +export enum KnownApplicationGatewayFirewallRateLimitDuration { + /** OneMin */ + OneMin = "OneMin", + /** FiveMins */ + FiveMins = "FiveMins", +} + +/** + * Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule. \ + * {@link KnownApplicationGatewayFirewallRateLimitDuration} can be used interchangeably with ApplicationGatewayFirewallRateLimitDuration, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **OneMin**: OneMin \ + * **FiveMins**: FiveMins + */ +export type ApplicationGatewayFirewallRateLimitDuration = string; + +/** The rule type. */ +export enum KnownWebApplicationFirewallRuleType { + /** MatchRule */ + MatchRule = "MatchRule", + /** RateLimitRule */ + RateLimitRule = "RateLimitRule", + /** Invalid */ + Invalid = "Invalid", +} + +/** + * The rule type. \ + * {@link KnownWebApplicationFirewallRuleType} can be used interchangeably with WebApplicationFirewallRuleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MatchRule**: MatchRule \ + * **RateLimitRule**: RateLimitRule \ + * **Invalid**: Invalid + */ +export type WebApplicationFirewallRuleType = string; + +export function matchConditionArraySerializer(result: Array): any[] { + return result.map((item) => { + return matchConditionSerializer(item); + }); +} + +export function matchConditionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return matchConditionDeserializer(item); + }); +} + +/** Define match conditions. */ +export interface MatchCondition { + /** List of match variables. */ + matchVariables: MatchVariable[]; + /** The operator to be matched. */ + operator: WebApplicationFirewallOperator; + /** Whether this is negate condition or not. */ + negationConditon?: boolean; + /** Match value. */ + matchValues: string[]; + /** List of transforms. */ + transforms?: WebApplicationFirewallTransform[]; +} + +export function matchConditionSerializer(item: MatchCondition): any { + return { + matchVariables: matchVariableArraySerializer(item["matchVariables"]), + operator: item["operator"], + negationConditon: item["negationConditon"], + matchValues: item["matchValues"].map((p: any) => { + return p; + }), + transforms: !item["transforms"] + ? item["transforms"] + : item["transforms"].map((p: any) => { + return p; + }), + }; +} + +export function matchConditionDeserializer(item: any): MatchCondition { + return { + matchVariables: matchVariableArrayDeserializer(item["matchVariables"]), + operator: item["operator"], + negationConditon: item["negationConditon"], + matchValues: item["matchValues"].map((p: any) => { + return p; + }), + transforms: !item["transforms"] + ? item["transforms"] + : item["transforms"].map((p: any) => { + return p; + }), + }; +} + +export function matchVariableArraySerializer(result: Array): any[] { + return result.map((item) => { + return matchVariableSerializer(item); + }); +} + +export function matchVariableArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return matchVariableDeserializer(item); + }); +} + +/** Define match variables. */ +export interface MatchVariable { + /** Match Variable. */ + variableName: WebApplicationFirewallMatchVariable; + /** The selector of match variable. */ + selector?: string; +} + +export function matchVariableSerializer(item: MatchVariable): any { + return { variableName: item["variableName"], selector: item["selector"] }; +} + +export function matchVariableDeserializer(item: any): MatchVariable { + return { + variableName: item["variableName"], + selector: item["selector"], + }; +} + +/** Match Variable. */ +export enum KnownWebApplicationFirewallMatchVariable { + /** RemoteAddr */ + RemoteAddr = "RemoteAddr", + /** RequestMethod */ + RequestMethod = "RequestMethod", + /** QueryString */ + QueryString = "QueryString", + /** PostArgs */ + PostArgs = "PostArgs", + /** RequestUri */ + RequestUri = "RequestUri", + /** RequestHeaders */ + RequestHeaders = "RequestHeaders", + /** RequestBody */ + RequestBody = "RequestBody", + /** RequestCookies */ + RequestCookies = "RequestCookies", +} + +/** + * Match Variable. \ + * {@link KnownWebApplicationFirewallMatchVariable} can be used interchangeably with WebApplicationFirewallMatchVariable, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RemoteAddr**: RemoteAddr \ + * **RequestMethod**: RequestMethod \ + * **QueryString**: QueryString \ + * **PostArgs**: PostArgs \ + * **RequestUri**: RequestUri \ + * **RequestHeaders**: RequestHeaders \ + * **RequestBody**: RequestBody \ + * **RequestCookies**: RequestCookies + */ +export type WebApplicationFirewallMatchVariable = string; + +/** The operator to be matched. */ +export enum KnownWebApplicationFirewallOperator { + /** IPMatch */ + IPMatch = "IPMatch", + /** Equal */ + Equal = "Equal", + /** Contains */ + Contains = "Contains", + /** LessThan */ + LessThan = "LessThan", + /** GreaterThan */ + GreaterThan = "GreaterThan", + /** LessThanOrEqual */ + LessThanOrEqual = "LessThanOrEqual", + /** GreaterThanOrEqual */ + GreaterThanOrEqual = "GreaterThanOrEqual", + /** BeginsWith */ + BeginsWith = "BeginsWith", + /** EndsWith */ + EndsWith = "EndsWith", + /** Regex */ + Regex = "Regex", + /** GeoMatch */ + GeoMatch = "GeoMatch", + /** Any */ + Any = "Any", +} + +/** + * The operator to be matched. \ + * {@link KnownWebApplicationFirewallOperator} can be used interchangeably with WebApplicationFirewallOperator, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPMatch**: IPMatch \ + * **Equal**: Equal \ + * **Contains**: Contains \ + * **LessThan**: LessThan \ + * **GreaterThan**: GreaterThan \ + * **LessThanOrEqual**: LessThanOrEqual \ + * **GreaterThanOrEqual**: GreaterThanOrEqual \ + * **BeginsWith**: BeginsWith \ + * **EndsWith**: EndsWith \ + * **Regex**: Regex \ + * **GeoMatch**: GeoMatch \ + * **Any**: Any + */ +export type WebApplicationFirewallOperator = string; + +/** Transforms applied before matching. */ +export enum KnownWebApplicationFirewallTransform { + /** Uppercase */ + Uppercase = "Uppercase", + /** Lowercase */ + Lowercase = "Lowercase", + /** Trim */ + Trim = "Trim", + /** UrlDecode */ + UrlDecode = "UrlDecode", + /** UrlEncode */ + UrlEncode = "UrlEncode", + /** RemoveNulls */ + RemoveNulls = "RemoveNulls", + /** HtmlEntityDecode */ + HtmlEntityDecode = "HtmlEntityDecode", +} + +/** + * Transforms applied before matching. \ + * {@link KnownWebApplicationFirewallTransform} can be used interchangeably with WebApplicationFirewallTransform, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Uppercase**: Uppercase \ + * **Lowercase**: Lowercase \ + * **Trim**: Trim \ + * **UrlDecode**: UrlDecode \ + * **UrlEncode**: UrlEncode \ + * **RemoveNulls**: RemoveNulls \ + * **HtmlEntityDecode**: HtmlEntityDecode + */ +export type WebApplicationFirewallTransform = string; + +export function groupByUserSessionArraySerializer(result: Array): any[] { + return result.map((item) => { + return groupByUserSessionSerializer(item); + }); +} + +export function groupByUserSessionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return groupByUserSessionDeserializer(item); + }); +} + +/** Define user session identifier group by clauses. */ +export interface GroupByUserSession { + /** List of group by clause variables. */ + groupByVariables: GroupByVariable[]; +} + +export function groupByUserSessionSerializer(item: GroupByUserSession): any { + return { groupByVariables: groupByVariableArraySerializer(item["groupByVariables"]) }; +} + +export function groupByUserSessionDeserializer(item: any): GroupByUserSession { + return { + groupByVariables: groupByVariableArrayDeserializer(item["groupByVariables"]), + }; +} + +export function groupByVariableArraySerializer(result: Array): any[] { + return result.map((item) => { + return groupByVariableSerializer(item); + }); +} + +export function groupByVariableArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return groupByVariableDeserializer(item); + }); +} + +/** Define user session group by clause variables. */ +export interface GroupByVariable { + /** User Session clause variable. */ + variableName: ApplicationGatewayFirewallUserSessionVariable; +} + +export function groupByVariableSerializer(item: GroupByVariable): any { + return { variableName: item["variableName"] }; +} + +export function groupByVariableDeserializer(item: any): GroupByVariable { + return { + variableName: item["variableName"], + }; +} + +/** User Session clause variable. */ +export enum KnownApplicationGatewayFirewallUserSessionVariable { + /** ClientAddr */ + ClientAddr = "ClientAddr", + /** GeoLocation */ + GeoLocation = "GeoLocation", + /** None */ + None = "None", + /** ClientAddrXFFHeader */ + ClientAddrXFFHeader = "ClientAddrXFFHeader", + /** GeoLocationXFFHeader */ + GeoLocationXFFHeader = "GeoLocationXFFHeader", +} + +/** + * User Session clause variable. \ + * {@link KnownApplicationGatewayFirewallUserSessionVariable} can be used interchangeably with ApplicationGatewayFirewallUserSessionVariable, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ClientAddr**: ClientAddr \ + * **GeoLocation**: GeoLocation \ + * **None**: None \ + * **ClientAddrXFFHeader**: ClientAddrXFFHeader \ + * **GeoLocationXFFHeader**: GeoLocationXFFHeader + */ +export type ApplicationGatewayFirewallUserSessionVariable = string; + +/** Type of Actions. */ +export enum KnownWebApplicationFirewallAction { + /** Allow */ + Allow = "Allow", + /** Block */ + Block = "Block", + /** Log */ + Log = "Log", + /** JSChallenge */ + JSChallenge = "JSChallenge", + /** CAPTCHA */ + Captcha = "CAPTCHA", +} + +/** + * Type of Actions. \ + * {@link KnownWebApplicationFirewallAction} can be used interchangeably with WebApplicationFirewallAction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Allow**: Allow \ + * **Block**: Block \ + * **Log**: Log \ + * **JSChallenge**: JSChallenge \ + * **CAPTCHA**: CAPTCHA + */ +export type WebApplicationFirewallAction = string; + +/** Resource status of the policy. */ +export enum KnownWebApplicationFirewallPolicyResourceState { + /** Creating */ + Creating = "Creating", + /** Enabling */ + Enabling = "Enabling", + /** Enabled */ + Enabled = "Enabled", + /** Disabling */ + Disabling = "Disabling", + /** Disabled */ + Disabled = "Disabled", + /** Deleting */ + Deleting = "Deleting", +} + +/** + * Resource status of the policy. \ + * {@link KnownWebApplicationFirewallPolicyResourceState} can be used interchangeably with WebApplicationFirewallPolicyResourceState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating**: Creating \ + * **Enabling**: Enabling \ + * **Enabled**: Enabled \ + * **Disabling**: Disabling \ + * **Disabled**: Disabled \ + * **Deleting**: Deleting + */ +export type WebApplicationFirewallPolicyResourceState = string; + +/** Allow to exclude some variable satisfy the condition for the WAF check. */ +export interface ManagedRulesDefinition { + /** The exceptions that are applied on the policy. */ + exceptions?: ExceptionEntry[]; + /** The Exclusions that are applied on the policy. */ + exclusions?: OwaspCrsExclusionEntry[]; + /** The managed rule sets that are associated with the policy. */ + managedRuleSets: ManagedRuleSet[]; +} + +export function managedRulesDefinitionSerializer(item: ManagedRulesDefinition): any { + return { + exceptions: !item["exceptions"] + ? item["exceptions"] + : exceptionEntryArraySerializer(item["exceptions"]), + exclusions: !item["exclusions"] + ? item["exclusions"] + : owaspCrsExclusionEntryArraySerializer(item["exclusions"]), + managedRuleSets: managedRuleSetArraySerializer(item["managedRuleSets"]), + }; +} + +export function managedRulesDefinitionDeserializer(item: any): ManagedRulesDefinition { + return { + exceptions: !item["exceptions"] + ? item["exceptions"] + : exceptionEntryArrayDeserializer(item["exceptions"]), + exclusions: !item["exclusions"] + ? item["exclusions"] + : owaspCrsExclusionEntryArrayDeserializer(item["exclusions"]), + managedRuleSets: managedRuleSetArrayDeserializer(item["managedRuleSets"]), + }; +} + +export function exceptionEntryArraySerializer(result: Array): any[] { + return result.map((item) => { + return exceptionEntrySerializer(item); + }); +} + +export function exceptionEntryArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return exceptionEntryDeserializer(item); + }); +} + +/** Adds exception to allow a request when the condition is satisfied. */ +export interface ExceptionEntry { + /** The variable on which we evaluate the exception condition */ + matchVariable: ExceptionEntryMatchVariable; + /** Allowed values for the matchVariable */ + values?: string[]; + /** Operates on the allowed values for the matchVariable */ + valueMatchOperator: ExceptionEntryValueMatchOperator; + /** When the matchVariable points to a key-value pair (e.g, RequestHeader), this operates on the selector */ + selectorMatchOperator?: ExceptionEntrySelectorMatchOperator; + /** When the matchVariable points to a key-value pair (e.g, RequestHeader), this identifies the key. */ + selector?: string; + /** The managed rule sets that are associated with the exception. */ + exceptionManagedRuleSets?: ExclusionManagedRuleSet[]; +} + +export function exceptionEntrySerializer(item: ExceptionEntry): any { + return { + matchVariable: item["matchVariable"], + values: !item["values"] + ? item["values"] + : item["values"].map((p: any) => { + return p; + }), + valueMatchOperator: item["valueMatchOperator"], + selectorMatchOperator: item["selectorMatchOperator"], + selector: item["selector"], + exceptionManagedRuleSets: !item["exceptionManagedRuleSets"] + ? item["exceptionManagedRuleSets"] + : exclusionManagedRuleSetArraySerializer(item["exceptionManagedRuleSets"]), + }; +} + +export function exceptionEntryDeserializer(item: any): ExceptionEntry { + return { + matchVariable: item["matchVariable"], + values: !item["values"] + ? item["values"] + : item["values"].map((p: any) => { + return p; + }), + valueMatchOperator: item["valueMatchOperator"], + selectorMatchOperator: item["selectorMatchOperator"], + selector: item["selector"], + exceptionManagedRuleSets: !item["exceptionManagedRuleSets"] + ? item["exceptionManagedRuleSets"] + : exclusionManagedRuleSetArrayDeserializer(item["exceptionManagedRuleSets"]), + }; +} + +/** The variable on which we evaluate the exception condition */ +export enum KnownExceptionEntryMatchVariable { + /** RequestURI */ + RequestURI = "RequestURI", + /** RemoteAddr */ + RemoteAddr = "RemoteAddr", + /** RequestHeader */ + RequestHeader = "RequestHeader", +} + +/** + * The variable on which we evaluate the exception condition \ + * {@link KnownExceptionEntryMatchVariable} can be used interchangeably with ExceptionEntryMatchVariable, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RequestURI**: RequestURI \ + * **RemoteAddr**: RemoteAddr \ + * **RequestHeader**: RequestHeader + */ +export type ExceptionEntryMatchVariable = string; + +/** Operates on the allowed values for the matchVariable */ +export enum KnownExceptionEntryValueMatchOperator { + /** Equals */ + Equals = "Equals", + /** Contains */ + Contains = "Contains", + /** StartsWith */ + StartsWith = "StartsWith", + /** EndsWith */ + EndsWith = "EndsWith", + /** IPMatch */ + IPMatch = "IPMatch", +} + +/** + * Operates on the allowed values for the matchVariable \ + * {@link KnownExceptionEntryValueMatchOperator} can be used interchangeably with ExceptionEntryValueMatchOperator, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Equals**: Equals \ + * **Contains**: Contains \ + * **StartsWith**: StartsWith \ + * **EndsWith**: EndsWith \ + * **IPMatch**: IPMatch + */ +export type ExceptionEntryValueMatchOperator = string; + +/** When the matchVariable points to a key-value pair (e.g, RequestHeader), this operates on the selector */ +export enum KnownExceptionEntrySelectorMatchOperator { + /** Equals */ + Equals = "Equals", + /** Contains */ + Contains = "Contains", + /** StartsWith */ + StartsWith = "StartsWith", + /** EndsWith */ + EndsWith = "EndsWith", +} + +/** + * When the matchVariable points to a key-value pair (e.g, RequestHeader), this operates on the selector \ + * {@link KnownExceptionEntrySelectorMatchOperator} can be used interchangeably with ExceptionEntrySelectorMatchOperator, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Equals**: Equals \ + * **Contains**: Contains \ + * **StartsWith**: StartsWith \ + * **EndsWith**: EndsWith + */ +export type ExceptionEntrySelectorMatchOperator = string; + +export function exclusionManagedRuleSetArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return exclusionManagedRuleSetSerializer(item); + }); +} + +export function exclusionManagedRuleSetArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return exclusionManagedRuleSetDeserializer(item); + }); +} + +/** Defines a managed rule set for Exclusions. */ +export interface ExclusionManagedRuleSet { + /** Defines the rule set type to use. */ + ruleSetType: string; + /** Defines the version of the rule set to use. */ + ruleSetVersion: string; + /** Defines the rule groups to apply to the rule set. */ + ruleGroups?: ExclusionManagedRuleGroup[]; +} + +export function exclusionManagedRuleSetSerializer(item: ExclusionManagedRuleSet): any { + return { + ruleSetType: item["ruleSetType"], + ruleSetVersion: item["ruleSetVersion"], + ruleGroups: !item["ruleGroups"] + ? item["ruleGroups"] + : exclusionManagedRuleGroupArraySerializer(item["ruleGroups"]), + }; +} + +export function exclusionManagedRuleSetDeserializer(item: any): ExclusionManagedRuleSet { + return { + ruleSetType: item["ruleSetType"], + ruleSetVersion: item["ruleSetVersion"], + ruleGroups: !item["ruleGroups"] + ? item["ruleGroups"] + : exclusionManagedRuleGroupArrayDeserializer(item["ruleGroups"]), + }; +} + +export function exclusionManagedRuleGroupArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return exclusionManagedRuleGroupSerializer(item); + }); +} + +export function exclusionManagedRuleGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return exclusionManagedRuleGroupDeserializer(item); + }); +} + +/** Defines a managed rule group to use for exclusion. */ +export interface ExclusionManagedRuleGroup { + /** The managed rule group for exclusion. */ + ruleGroupName: string; + /** List of rules that will be excluded. If none specified, all rules in the group will be excluded. */ + rules?: ExclusionManagedRule[]; +} + +export function exclusionManagedRuleGroupSerializer(item: ExclusionManagedRuleGroup): any { + return { + ruleGroupName: item["ruleGroupName"], + rules: !item["rules"] ? item["rules"] : exclusionManagedRuleArraySerializer(item["rules"]), + }; +} + +export function exclusionManagedRuleGroupDeserializer(item: any): ExclusionManagedRuleGroup { + return { + ruleGroupName: item["ruleGroupName"], + rules: !item["rules"] ? item["rules"] : exclusionManagedRuleArrayDeserializer(item["rules"]), + }; +} + +export function exclusionManagedRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return exclusionManagedRuleSerializer(item); + }); +} + +export function exclusionManagedRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return exclusionManagedRuleDeserializer(item); + }); +} + +/** Defines a managed rule to use for exclusion. */ +export interface ExclusionManagedRule { + /** Identifier for the managed rule. */ + ruleId: string; +} + +export function exclusionManagedRuleSerializer(item: ExclusionManagedRule): any { + return { ruleId: item["ruleId"] }; +} + +export function exclusionManagedRuleDeserializer(item: any): ExclusionManagedRule { + return { + ruleId: item["ruleId"], + }; +} + +export function owaspCrsExclusionEntryArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return owaspCrsExclusionEntrySerializer(item); + }); +} + +export function owaspCrsExclusionEntryArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return owaspCrsExclusionEntryDeserializer(item); + }); +} + +/** Allow to exclude some variable satisfy the condition for the WAF check. */ +export interface OwaspCrsExclusionEntry { + /** The variable to be excluded. */ + matchVariable: OwaspCrsExclusionEntryMatchVariable; + /** When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. */ + selectorMatchOperator: OwaspCrsExclusionEntrySelectorMatchOperator; + /** When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. */ + selector: string; + /** The managed rule sets that are associated with the exclusion. */ + exclusionManagedRuleSets?: ExclusionManagedRuleSet[]; +} + +export function owaspCrsExclusionEntrySerializer(item: OwaspCrsExclusionEntry): any { + return { + matchVariable: item["matchVariable"], + selectorMatchOperator: item["selectorMatchOperator"], + selector: item["selector"], + exclusionManagedRuleSets: !item["exclusionManagedRuleSets"] + ? item["exclusionManagedRuleSets"] + : exclusionManagedRuleSetArraySerializer(item["exclusionManagedRuleSets"]), + }; +} + +export function owaspCrsExclusionEntryDeserializer(item: any): OwaspCrsExclusionEntry { + return { + matchVariable: item["matchVariable"], + selectorMatchOperator: item["selectorMatchOperator"], + selector: item["selector"], + exclusionManagedRuleSets: !item["exclusionManagedRuleSets"] + ? item["exclusionManagedRuleSets"] + : exclusionManagedRuleSetArrayDeserializer(item["exclusionManagedRuleSets"]), + }; +} + +/** The variable to be excluded. */ +export enum KnownOwaspCrsExclusionEntryMatchVariable { + /** RequestHeaderNames */ + RequestHeaderNames = "RequestHeaderNames", + /** RequestCookieNames */ + RequestCookieNames = "RequestCookieNames", + /** RequestArgNames */ + RequestArgNames = "RequestArgNames", + /** RequestHeaderKeys */ + RequestHeaderKeys = "RequestHeaderKeys", + /** RequestHeaderValues */ + RequestHeaderValues = "RequestHeaderValues", + /** RequestCookieKeys */ + RequestCookieKeys = "RequestCookieKeys", + /** RequestCookieValues */ + RequestCookieValues = "RequestCookieValues", + /** RequestArgKeys */ + RequestArgKeys = "RequestArgKeys", + /** RequestArgValues */ + RequestArgValues = "RequestArgValues", +} + +/** + * The variable to be excluded. \ + * {@link KnownOwaspCrsExclusionEntryMatchVariable} can be used interchangeably with OwaspCrsExclusionEntryMatchVariable, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RequestHeaderNames**: RequestHeaderNames \ + * **RequestCookieNames**: RequestCookieNames \ + * **RequestArgNames**: RequestArgNames \ + * **RequestHeaderKeys**: RequestHeaderKeys \ + * **RequestHeaderValues**: RequestHeaderValues \ + * **RequestCookieKeys**: RequestCookieKeys \ + * **RequestCookieValues**: RequestCookieValues \ + * **RequestArgKeys**: RequestArgKeys \ + * **RequestArgValues**: RequestArgValues + */ +export type OwaspCrsExclusionEntryMatchVariable = string; + +/** When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. */ +export enum KnownOwaspCrsExclusionEntrySelectorMatchOperator { + /** Equals */ + Equals = "Equals", + /** Contains */ + Contains = "Contains", + /** StartsWith */ + StartsWith = "StartsWith", + /** EndsWith */ + EndsWith = "EndsWith", + /** EqualsAny */ + EqualsAny = "EqualsAny", +} + +/** + * When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. \ + * {@link KnownOwaspCrsExclusionEntrySelectorMatchOperator} can be used interchangeably with OwaspCrsExclusionEntrySelectorMatchOperator, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Equals**: Equals \ + * **Contains**: Contains \ + * **StartsWith**: StartsWith \ + * **EndsWith**: EndsWith \ + * **EqualsAny**: EqualsAny + */ +export type OwaspCrsExclusionEntrySelectorMatchOperator = string; + +export function managedRuleSetArraySerializer(result: Array): any[] { + return result.map((item) => { + return managedRuleSetSerializer(item); + }); +} + +export function managedRuleSetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return managedRuleSetDeserializer(item); + }); +} + +/** Defines a managed rule set. */ +export interface ManagedRuleSet { + /** Defines the rule set type to use. */ + ruleSetType: string; + /** Defines the version of the rule set to use. */ + ruleSetVersion: string; + /** Defines the rule group overrides to apply to the rule set. */ + ruleGroupOverrides?: ManagedRuleGroupOverride[]; + /** Stores the final list of disabled rule groups */ + readonly computedDisabledRules?: ManagedRuleSetRuleGroup[]; +} + +export function managedRuleSetSerializer(item: ManagedRuleSet): any { + return { + ruleSetType: item["ruleSetType"], + ruleSetVersion: item["ruleSetVersion"], + ruleGroupOverrides: !item["ruleGroupOverrides"] + ? item["ruleGroupOverrides"] + : managedRuleGroupOverrideArraySerializer(item["ruleGroupOverrides"]), + }; +} + +export function managedRuleSetDeserializer(item: any): ManagedRuleSet { + return { + ruleSetType: item["ruleSetType"], + ruleSetVersion: item["ruleSetVersion"], + ruleGroupOverrides: !item["ruleGroupOverrides"] + ? item["ruleGroupOverrides"] + : managedRuleGroupOverrideArrayDeserializer(item["ruleGroupOverrides"]), + computedDisabledRules: !item["computedDisabledRules"] + ? item["computedDisabledRules"] + : managedRuleSetRuleGroupArrayDeserializer(item["computedDisabledRules"]), + }; +} + +export function managedRuleGroupOverrideArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return managedRuleGroupOverrideSerializer(item); + }); +} + +export function managedRuleGroupOverrideArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return managedRuleGroupOverrideDeserializer(item); + }); +} + +/** Defines a managed rule group override setting. */ +export interface ManagedRuleGroupOverride { + /** The managed rule group to override. */ + ruleGroupName: string; + /** List of rules that will be disabled. If none specified, all rules in the group will be disabled. */ + rules?: ManagedRuleOverride[]; +} + +export function managedRuleGroupOverrideSerializer(item: ManagedRuleGroupOverride): any { + return { + ruleGroupName: item["ruleGroupName"], + rules: !item["rules"] ? item["rules"] : managedRuleOverrideArraySerializer(item["rules"]), + }; +} + +export function managedRuleGroupOverrideDeserializer(item: any): ManagedRuleGroupOverride { + return { + ruleGroupName: item["ruleGroupName"], + rules: !item["rules"] ? item["rules"] : managedRuleOverrideArrayDeserializer(item["rules"]), + }; +} + +export function managedRuleOverrideArraySerializer(result: Array): any[] { + return result.map((item) => { + return managedRuleOverrideSerializer(item); + }); +} + +export function managedRuleOverrideArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return managedRuleOverrideDeserializer(item); + }); +} + +/** Defines a managed rule group override setting. */ +export interface ManagedRuleOverride { + /** Identifier for the managed rule. */ + ruleId: string; + /** The state of the managed rule. Defaults to Disabled if not specified. */ + state?: ManagedRuleEnabledState; + /** Describes the override action to be applied when rule matches. */ + action?: ActionType; + /** Describes the override sensitivity to be applied when rule matches. */ + sensitivity?: SensitivityType; +} + +export function managedRuleOverrideSerializer(item: ManagedRuleOverride): any { + return { + ruleId: item["ruleId"], + state: item["state"], + action: item["action"], + sensitivity: item["sensitivity"], + }; +} + +export function managedRuleOverrideDeserializer(item: any): ManagedRuleOverride { + return { + ruleId: item["ruleId"], + state: item["state"], + action: item["action"], + sensitivity: item["sensitivity"], + }; +} + +/** The state of the managed rule. Defaults to Disabled if not specified. */ +export enum KnownManagedRuleEnabledState { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", +} + +/** + * The state of the managed rule. Defaults to Disabled if not specified. \ + * {@link KnownManagedRuleEnabledState} can be used interchangeably with ManagedRuleEnabledState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled**: Disabled \ + * **Enabled**: Enabled + */ +export type ManagedRuleEnabledState = string; + +/** Defines the action to take on rule match. */ +export enum KnownActionType { + /** AnomalyScoring */ + AnomalyScoring = "AnomalyScoring", + /** Allow */ + Allow = "Allow", + /** Block */ + Block = "Block", + /** Log */ + Log = "Log", + /** JSChallenge */ + JSChallenge = "JSChallenge", + /** CAPTCHA */ + Captcha = "CAPTCHA", +} + +/** + * Defines the action to take on rule match. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AnomalyScoring**: AnomalyScoring \ + * **Allow**: Allow \ + * **Block**: Block \ + * **Log**: Log \ + * **JSChallenge**: JSChallenge \ + * **CAPTCHA**: CAPTCHA + */ +export type ActionType = string; + +/** Defines the sensitivity for the rule. */ +export enum KnownSensitivityType { + /** Low */ + Low = "Low", + /** Medium */ + Medium = "Medium", + /** High */ + High = "High", +} + +/** + * Defines the sensitivity for the rule. \ + * {@link KnownSensitivityType} can be used interchangeably with SensitivityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Low**: Low \ + * **Medium**: Medium \ + * **High**: High + */ +export type SensitivityType = string; + +export function managedRuleSetRuleGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return managedRuleSetRuleGroupDeserializer(item); + }); +} + +/** Defines a managed rule set rule group */ +export interface ManagedRuleSetRuleGroup { + /** Name of the rule group */ + ruleGroupName: string; + /** List of rules within the rule group */ + rules?: string[]; +} + +export function managedRuleSetRuleGroupDeserializer(item: any): ManagedRuleSetRuleGroup { + return { + ruleGroupName: item["ruleGroupName"], + rules: !item["rules"] + ? item["rules"] + : item["rules"].map((p: any) => { + return p; + }), + }; +} + +export function applicationGatewayForContainersReferenceDefinitionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayForContainersReferenceDefinitionDeserializer(item); + }); +} + +/** Defines an application gateway for containers reference. */ +export interface ApplicationGatewayForContainersReferenceDefinition { + /** Resource Id of the application gateway for containers. */ + id: string; +} + +export function applicationGatewayForContainersReferenceDefinitionDeserializer( + item: any, +): ApplicationGatewayForContainersReferenceDefinition { + return { + id: item["id"], + }; +} + +/** Paged collection of WebApplicationFirewallPolicy items */ +export interface _WebApplicationFirewallPolicyListResult { + /** The WebApplicationFirewallPolicy items on this page */ + readonly value: WebApplicationFirewallPolicy[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _webApplicationFirewallPolicyListResultDeserializer( + item: any, +): _WebApplicationFirewallPolicyListResult { + return { + value: webApplicationFirewallPolicyArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function webApplicationFirewallPolicyArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return webApplicationFirewallPolicySerializer(item); + }); +} + +export function webApplicationFirewallPolicyArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return webApplicationFirewallPolicyDeserializer(item); + }); +} + +/** A virtual network appliance in a resource group. */ +export interface VirtualNetworkAppliance extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Bandwidth of the VirtualNetworkAppliance resource in Gbps. */ + bandwidthInGbps?: number; + /** A list of IPConfigurations of the virtual network appliance. */ + readonly ipConfigurations?: VirtualNetworkApplianceIpConfiguration[]; + /** Whether the specific virtual network appliance is IPv4 or Dual Stack. Default is IPv4. */ + privateIPAddressVersion?: VirtualNetworkApplianceIpVersionType; + /** The provisioning state of the virtual network appliance resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The resource GUID property of the virtual network appliance resource. */ + readonly resourceGuid?: string; + /** The reference to the subnet resource. */ + subnet?: Subnet; +} + +export function virtualNetworkApplianceSerializer(item: VirtualNetworkAppliance): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, ["bandwidthInGbps", "privateIPAddressVersion", "subnet"]) + ? undefined + : _virtualNetworkAppliancePropertiesSerializer(item), + }; +} + +export function virtualNetworkApplianceDeserializer(item: any): VirtualNetworkAppliance { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _virtualNetworkAppliancePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** VirtualNetworkAppliance properties. */ +export interface VirtualNetworkAppliancePropertiesFormat { + /** Bandwidth of the VirtualNetworkAppliance resource in Gbps. */ + bandwidthInGbps?: number; + /** A list of IPConfigurations of the virtual network appliance. */ + readonly ipConfigurations?: VirtualNetworkApplianceIpConfiguration[]; + /** Whether the specific virtual network appliance is IPv4 or Dual Stack. Default is IPv4. */ + privateIPAddressVersion?: VirtualNetworkApplianceIpVersionType; + /** The provisioning state of the virtual network appliance resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The resource GUID property of the virtual network appliance resource. */ + readonly resourceGuid?: string; + /** The reference to the subnet resource. */ + subnet?: Subnet; +} + +export function virtualNetworkAppliancePropertiesFormatSerializer( + item: VirtualNetworkAppliancePropertiesFormat, +): any { + return { + bandwidthInGbps: item["bandwidthInGbps"], + privateIPAddressVersion: item["privateIPAddressVersion"], + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + }; +} + +export function virtualNetworkAppliancePropertiesFormatDeserializer( + item: any, +): VirtualNetworkAppliancePropertiesFormat { + return { + bandwidthInGbps: item["bandwidthInGbps"], + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : virtualNetworkApplianceIpConfigurationArrayDeserializer(item["ipConfigurations"]), + privateIPAddressVersion: item["privateIPAddressVersion"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + }; +} + +export function virtualNetworkApplianceIpConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkApplianceIpConfigurationDeserializer(item); + }); +} + +/** The virtual network appliance ip configuration. */ +export interface VirtualNetworkApplianceIpConfiguration extends SubResource { + /** The name of virtual network appliance ip configuration. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The resource type. */ + readonly type?: string; + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** Whether the ip configuration is primary or not. */ + primary?: boolean; + /** The provisioning state of the private link service IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. */ + privateIPAddressVersion?: IPVersion; +} + +export function virtualNetworkApplianceIpConfigurationDeserializer( + item: any, +): VirtualNetworkApplianceIpConfiguration { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _virtualNetworkApplianceIpConfigurationPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of virtual network appliance IP configuration. */ +export interface VirtualNetworkApplianceIpConfigurationProperties { + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** Whether the ip configuration is primary or not. */ + primary?: boolean; + /** The provisioning state of the private link service IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. */ + privateIPAddressVersion?: IPVersion; +} + +export function virtualNetworkApplianceIpConfigurationPropertiesDeserializer( + item: any, +): VirtualNetworkApplianceIpConfigurationProperties { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + primary: item["primary"], + provisioningState: item["provisioningState"], + privateIPAddressVersion: item["privateIPAddressVersion"], + }; +} + +/** IP address version. */ +export enum KnownVirtualNetworkApplianceIpVersionType { + /** IPv4 version */ + IPv4 = "IPv4", + /** Dual Stack version */ + DualStack = "DualStack", +} + +/** + * IP address version. \ + * {@link KnownVirtualNetworkApplianceIpVersionType} can be used interchangeably with VirtualNetworkApplianceIpVersionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPv4**: IPv4 version \ + * **DualStack**: Dual Stack version + */ +export type VirtualNetworkApplianceIpVersionType = string; + +export function virtualNetworkApplianceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkApplianceSerializer(item); + }); +} + +export function virtualNetworkApplianceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualNetworkApplianceDeserializer(item); + }); +} + +/** ServiceGateway resource. */ +export interface ServiceGateway extends SecurityPerimeterTrackedResource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The service gateway SKU. */ + sku?: ServiceGatewaySku; + /** + * A list of availability zones denoting the zone in which service gateway should be deployed. + * + * - The zone values must be provided as strings representing numeric identifiers like "1", "2", "3" etc. + */ + zones?: string[]; + /** Reference to an existing virtual network. */ + virtualNetwork?: VirtualNetwork; + /** Route Target address of Service gateway */ + routeTargetAddress?: RouteTargetAddressPropertiesFormat; + /** Route Target address V6 of Service gateway */ + routeTargetAddressV6?: RouteTargetAddressPropertiesFormat; + /** The resource GUID property of the service gateway resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the service gateway resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function serviceGatewaySerializer(item: ServiceGateway): any { + return { + tags: item["tags"], + location: item["location"], + properties: areAllPropsUndefined(item, [ + "virtualNetwork", + "routeTargetAddress", + "routeTargetAddressV6", + ]) + ? undefined + : _serviceGatewayPropertiesSerializer(item), + sku: !item["sku"] ? item["sku"] : serviceGatewaySkuSerializer(item["sku"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +export function serviceGatewayDeserializer(item: any): ServiceGateway { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : securityPerimeterSystemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _serviceGatewayPropertiesDeserializer(item["properties"])), + etag: item["etag"], + sku: !item["sku"] ? item["sku"] : serviceGatewaySkuDeserializer(item["sku"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +/** Properties of the service gateway. */ +export interface ServiceGatewayPropertiesFormat { + /** Reference to an existing virtual network. */ + virtualNetwork?: VirtualNetwork; + /** Route Target address of Service gateway */ + routeTargetAddress?: RouteTargetAddressPropertiesFormat; + /** Route Target address V6 of Service gateway */ + routeTargetAddressV6?: RouteTargetAddressPropertiesFormat; + /** The resource GUID property of the service gateway resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the service gateway resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function serviceGatewayPropertiesFormatSerializer( + item: ServiceGatewayPropertiesFormat, +): any { + return { + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : virtualNetworkSerializer(item["virtualNetwork"]), + routeTargetAddress: !item["routeTargetAddress"] + ? item["routeTargetAddress"] + : routeTargetAddressPropertiesFormatSerializer(item["routeTargetAddress"]), + routeTargetAddressV6: !item["routeTargetAddressV6"] + ? item["routeTargetAddressV6"] + : routeTargetAddressPropertiesFormatSerializer(item["routeTargetAddressV6"]), + }; +} + +export function serviceGatewayPropertiesFormatDeserializer( + item: any, +): ServiceGatewayPropertiesFormat { + return { + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : virtualNetworkDeserializer(item["virtualNetwork"]), + routeTargetAddress: !item["routeTargetAddress"] + ? item["routeTargetAddress"] + : routeTargetAddressPropertiesFormatDeserializer(item["routeTargetAddress"]), + routeTargetAddressV6: !item["routeTargetAddressV6"] + ? item["routeTargetAddressV6"] + : routeTargetAddressPropertiesFormatDeserializer(item["routeTargetAddressV6"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +/** Properties of route target address */ +export interface RouteTargetAddressPropertiesFormat { + /** The reference to the subnet resource. */ + subnet?: Subnet; + /** The private IPv4 or IPv6 address of the service gateway route target address. */ + privateIPAddress?: string; + /** The Private IP allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; +} + +export function routeTargetAddressPropertiesFormatSerializer( + item: RouteTargetAddressPropertiesFormat, +): any { + return { + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + }; +} + +export function routeTargetAddressPropertiesFormatDeserializer( + item: any, +): RouteTargetAddressPropertiesFormat { + return { + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + }; +} + +/** SKU of a service gateway. */ +export interface ServiceGatewaySku { + /** Name of a service gateway SKU. */ + name?: ServiceGatewaySkuName; + /** Tier of a service gateway SKU. */ + tier?: ServiceGatewaySkuTier; +} + +export function serviceGatewaySkuSerializer(item: ServiceGatewaySku): any { + return { name: item["name"], tier: item["tier"] }; +} + +export function serviceGatewaySkuDeserializer(item: any): ServiceGatewaySku { + return { + name: item["name"], + tier: item["tier"], + }; +} + +/** Name of a service gateway SKU. */ +export enum KnownServiceGatewaySkuName { + /** Standard */ + Standard = "Standard", +} + +/** + * Name of a service gateway SKU. \ + * {@link KnownServiceGatewaySkuName} can be used interchangeably with ServiceGatewaySkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard + */ +export type ServiceGatewaySkuName = string; + +/** Tier of a service gateway SKU. */ +export enum KnownServiceGatewaySkuTier { + /** Regional */ + Regional = "Regional", +} + +/** + * Tier of a service gateway SKU. \ + * {@link KnownServiceGatewaySkuTier} can be used interchangeably with ServiceGatewaySkuTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Regional**: Regional + */ +export type ServiceGatewaySkuTier = string; + +export function serviceGatewayArraySerializer(result: Array): any[] { + return result.map((item) => { + return serviceGatewaySerializer(item); + }); +} + +export function serviceGatewayArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return serviceGatewayDeserializer(item); + }); +} + +/** Properties of the service gateway update address locations request. */ +export interface ServiceGatewayUpdateAddressLocationsRequest { + /** + * Specifies the type of update operation to perform on address locations within the service gateway. + * + * - FullUpdate: Replaces all existing address location data with the new list provided in the request. Any previously defined locations not included will be removed. + * - PartialUpdate: Updates only the specified address locations. + */ + action?: UpdateAction; + /** An array of address locations to create or update. */ + addressLocations?: ServiceGatewayAddressLocation[]; +} + +export function serviceGatewayUpdateAddressLocationsRequestSerializer( + item: ServiceGatewayUpdateAddressLocationsRequest, +): any { + return { + action: item["action"], + addressLocations: !item["addressLocations"] + ? item["addressLocations"] + : serviceGatewayAddressLocationArraySerializer(item["addressLocations"]), + }; +} + +/** + * Specifies the type of update operation to perform on address locations within the service gateway. + * + * - FullUpdate: Replaces all existing address location data with the new list provided in the request. Any previously defined locations not included will be removed. + * - PartialUpdate: Updates only the specified address locations. + */ +export enum KnownUpdateAction { + /** FullUpdate */ + FullUpdate = "FullUpdate", + /** PartialUpdate */ + PartialUpdate = "PartialUpdate", +} + +/** + * Specifies the type of update operation to perform on address locations within the service gateway. + * + * - FullUpdate: Replaces all existing address location data with the new list provided in the request. Any previously defined locations not included will be removed. + * - PartialUpdate: Updates only the specified address locations. \ + * {@link KnownUpdateAction} can be used interchangeably with UpdateAction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **FullUpdate**: FullUpdate \ + * **PartialUpdate**: PartialUpdate + */ +export type UpdateAction = string; + +export function serviceGatewayAddressLocationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceGatewayAddressLocationSerializer(item); + }); +} + +/** Properties of the service gateway address location. */ +export interface ServiceGatewayAddressLocation { + /** Location to update */ + addressLocation?: string; + /** + * Specifies the type of update operation to perform on addresses within the address location of service gateway. + * + * - FullUpdate: Replaces all existing address data with the new list provided in the request. Any previously defined addresses not included will be removed. + * - PartialUpdate: Updates only the specified addresses. + */ + addressUpdateAction?: AddressUpdateAction; + /** An array of addresses to create or update in locations. */ + addresses?: ServiceGatewayAddress[]; +} + +export function serviceGatewayAddressLocationSerializer(item: ServiceGatewayAddressLocation): any { + return { + addressLocation: item["addressLocation"], + addressUpdateAction: item["addressUpdateAction"], + addresses: !item["addresses"] + ? item["addresses"] + : serviceGatewayAddressArraySerializer(item["addresses"]), + }; +} + +/** + * Specifies the type of update operation to perform on addresses within the address location of service gateway. + * + * - FullUpdate: Replaces all existing address data with the new list provided in the request. Any previously defined addresses not included will be removed. + * - PartialUpdate: Updates only the specified addresses. + */ +export enum KnownAddressUpdateAction { + /** FullUpdate */ + FullUpdate = "FullUpdate", + /** PartialUpdate */ + PartialUpdate = "PartialUpdate", +} + +/** + * Specifies the type of update operation to perform on addresses within the address location of service gateway. + * + * - FullUpdate: Replaces all existing address data with the new list provided in the request. Any previously defined addresses not included will be removed. + * - PartialUpdate: Updates only the specified addresses. \ + * {@link KnownAddressUpdateAction} can be used interchangeably with AddressUpdateAction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **FullUpdate**: FullUpdate \ + * **PartialUpdate**: PartialUpdate + */ +export type AddressUpdateAction = string; + +export function serviceGatewayAddressArraySerializer(result: Array): any[] { + return result.map((item) => { + return serviceGatewayAddressSerializer(item); + }); +} + +export function serviceGatewayAddressArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceGatewayAddressDeserializer(item); + }); +} + +/** Properties of the service gateway address. */ +export interface ServiceGatewayAddress { + /** Address to update */ + address?: string; + /** Collection of services in address. */ + services?: string[]; +} + +export function serviceGatewayAddressSerializer(item: ServiceGatewayAddress): any { + return { + address: item["address"], + services: !item["services"] + ? item["services"] + : item["services"].map((p: any) => { + return p; + }), + }; +} + +export function serviceGatewayAddressDeserializer(item: any): ServiceGatewayAddress { + return { + address: item["address"], + services: !item["services"] + ? item["services"] + : item["services"].map((p: any) => { + return p; + }), + }; +} + +/** Properties of the service gateway update services request. */ +export interface ServiceGatewayUpdateServicesRequest { + /** + * Specifies the type of update operation to perform on services within the service gateway. + * + * - FullUpdate: Replaces all existing services with the new list provided in the request. Any previously defined services not included will be removed. + * - PartialUpdate: Updates only the specified services. + */ + action?: ServiceUpdateAction; + /** Collection of service updates. */ + serviceRequests?: ServiceGatewayServiceRequest[]; +} + +export function serviceGatewayUpdateServicesRequestSerializer( + item: ServiceGatewayUpdateServicesRequest, +): any { + return { + action: item["action"], + serviceRequests: !item["serviceRequests"] + ? item["serviceRequests"] + : serviceGatewayServiceRequestArraySerializer(item["serviceRequests"]), + }; +} + +/** + * Specifies the type of update operation to perform on services within the service gateway. + * + * - FullUpdate: Replaces all existing services with the new list provided in the request. Any previously defined services not included will be removed. + * - PartialUpdate: Updates only the specified services. + */ +export enum KnownServiceUpdateAction { + /** FullUpdate */ + FullUpdate = "FullUpdate", + /** PartialUpdate */ + PartialUpdate = "PartialUpdate", +} + +/** + * Specifies the type of update operation to perform on services within the service gateway. + * + * - FullUpdate: Replaces all existing services with the new list provided in the request. Any previously defined services not included will be removed. + * - PartialUpdate: Updates only the specified services. \ + * {@link KnownServiceUpdateAction} can be used interchangeably with ServiceUpdateAction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **FullUpdate**: FullUpdate \ + * **PartialUpdate**: PartialUpdate + */ +export type ServiceUpdateAction = string; + +export function serviceGatewayServiceRequestArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceGatewayServiceRequestSerializer(item); + }); +} + +/** Properties of the service gateway services request. */ +export interface ServiceGatewayServiceRequest { + /** Set to true to mark the service for deletion. */ + isDelete?: boolean; + /** Service of service gateway. */ + service?: ServiceGatewayService; +} + +export function serviceGatewayServiceRequestSerializer(item: ServiceGatewayServiceRequest): any { + return { + isDelete: item["isDelete"], + service: !item["service"] ? item["service"] : serviceGatewayServiceSerializer(item["service"]), + }; +} + +/** Properties of the service gateway service. */ +export interface ServiceGatewayService { + /** Name of the service */ + name?: string; + /** Name of the service. */ + serviceType?: ServiceType; + /** Set to true to mark default service for inbound or outbound. */ + isDefault?: boolean; + /** An array of load balancer backend address pools. */ + loadBalancerBackendPools?: BackendAddressPool[]; + /** Azure Resource Id of public natgateway. */ + publicNatGatewayId?: string; +} + +export function serviceGatewayServiceSerializer(item: ServiceGatewayService): any { + return { + name: item["name"], + properties: areAllPropsUndefined(item, [ + "serviceType", + "isDefault", + "loadBalancerBackendPools", + "publicNatGatewayId", + ]) + ? undefined + : _serviceGatewayServicePropertiesSerializer(item), + }; +} + +export function serviceGatewayServiceDeserializer(item: any): ServiceGatewayService { + return { + name: item["name"], + ...(!item["properties"] + ? item["properties"] + : _serviceGatewayServicePropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of the service gateway service. */ +export interface ServiceGatewayServicePropertiesFormat { + /** Name of the service. */ + serviceType?: ServiceType; + /** Set to true to mark default service for inbound or outbound. */ + isDefault?: boolean; + /** An array of load balancer backend address pools. */ + loadBalancerBackendPools?: BackendAddressPool[]; + /** Azure Resource Id of public natgateway. */ + publicNatGatewayId?: string; +} + +export function serviceGatewayServicePropertiesFormatSerializer( + item: ServiceGatewayServicePropertiesFormat, +): any { + return { + serviceType: item["serviceType"], + isDefault: item["isDefault"], + loadBalancerBackendPools: !item["loadBalancerBackendPools"] + ? item["loadBalancerBackendPools"] + : backendAddressPoolArraySerializer(item["loadBalancerBackendPools"]), + publicNatGatewayId: item["publicNatGatewayId"], + }; +} + +export function serviceGatewayServicePropertiesFormatDeserializer( + item: any, +): ServiceGatewayServicePropertiesFormat { + return { + serviceType: item["serviceType"], + isDefault: item["isDefault"], + loadBalancerBackendPools: !item["loadBalancerBackendPools"] + ? item["loadBalancerBackendPools"] + : backendAddressPoolArrayDeserializer(item["loadBalancerBackendPools"]), + publicNatGatewayId: item["publicNatGatewayId"], + }; +} + +/** Name of the service. */ +export enum KnownServiceType { + /** Inbound */ + Inbound = "Inbound", + /** Outbound */ + Outbound = "Outbound", + /** InboundOutbound */ + InboundOutbound = "InboundOutbound", +} + +/** + * Name of the service. \ + * {@link KnownServiceType} can be used interchangeably with ServiceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inbound**: Inbound \ + * **Outbound**: Outbound \ + * **InboundOutbound**: InboundOutbound + */ +export type ServiceType = string; + +/** Response for get service gateway address locations. */ +export interface _GetServiceGatewayAddressLocationsResult { + /** The ServiceGatewayAddressLocationResponse items on this page */ + value: ServiceGatewayAddressLocationResponse[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _getServiceGatewayAddressLocationsResultDeserializer( + item: any, +): _GetServiceGatewayAddressLocationsResult { + return { + value: serviceGatewayAddressLocationResponseArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function serviceGatewayAddressLocationResponseArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceGatewayAddressLocationResponseDeserializer(item); + }); +} + +/** Properties of the service gateway address location. */ +export interface ServiceGatewayAddressLocationResponse { + /** Location to update */ + addressLocation?: string; + /** An array of addresses to create or update in locations. */ + addresses?: ServiceGatewayAddress[]; +} + +export function serviceGatewayAddressLocationResponseDeserializer( + item: any, +): ServiceGatewayAddressLocationResponse { + return { + addressLocation: item["addressLocation"], + addresses: !item["addresses"] + ? item["addresses"] + : serviceGatewayAddressArrayDeserializer(item["addresses"]), + }; +} + +/** Response for get service gateway services. */ +export interface _GetServiceGatewayServicesResult { + /** The ServiceGatewayService items on this page */ + value: ServiceGatewayService[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _getServiceGatewayServicesResultDeserializer( + item: any, +): _GetServiceGatewayServicesResult { + return { + value: serviceGatewayServiceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function serviceGatewayServiceArraySerializer(result: Array): any[] { + return result.map((item) => { + return serviceGatewayServiceSerializer(item); + }); +} + +export function serviceGatewayServiceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceGatewayServiceDeserializer(item); + }); +} + +/** An interconnect group resource. */ +export interface InterconnectGroup extends Resource { + /** Properties of the interconnect group. */ + properties?: InterconnectGroupPropertiesFormat; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; +} + +export function interconnectGroupSerializer(item: InterconnectGroup): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: !item["properties"] + ? item["properties"] + : interconnectGroupPropertiesFormatSerializer(item["properties"]), + }; +} + +export function interconnectGroupDeserializer(item: any): InterconnectGroup { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + properties: !item["properties"] + ? item["properties"] + : interconnectGroupPropertiesFormatDeserializer(item["properties"]), + etag: item["etag"], + }; +} + +/** Interconnect group properties. */ +export interface InterconnectGroupPropertiesFormat { + /** Scope of interconnect group resource. */ + scope?: InterconnectGroupScope; + /** A list of subgroups of the interconnect group. */ + readonly subgroups?: Subgroup[]; + /** The provisioning state of the interconnect group resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The resource GUID property of the interconnect group resource. */ + readonly resourceGuid?: string; + /** The subgroup profile of the interconnect group resource. */ + subgroupProfile: SubgroupProfile; +} + +export function interconnectGroupPropertiesFormatSerializer( + item: InterconnectGroupPropertiesFormat, +): any { + return { + scope: item["scope"], + subgroupProfile: subgroupProfileSerializer(item["subgroupProfile"]), + }; +} + +export function interconnectGroupPropertiesFormatDeserializer( + item: any, +): InterconnectGroupPropertiesFormat { + return { + scope: item["scope"], + subgroups: !item["subgroups"] + ? item["subgroups"] + : subgroupArrayDeserializer(item["subgroups"]), + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + subgroupProfile: subgroupProfileDeserializer(item["subgroupProfile"]), + }; +} + +/** Scope of an interconnect group resource. */ +export enum KnownInterconnectGroupScope { + /** No interconnect group scope. */ + None = "None", + /** InfiniBand interconnect group scope. */ + InfiniBand = "InfiniBand", +} + +/** + * Scope of an interconnect group resource. \ + * {@link KnownInterconnectGroupScope} can be used interchangeably with InterconnectGroupScope, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No interconnect group scope. \ + * **InfiniBand**: InfiniBand interconnect group scope. + */ +export type InterconnectGroupScope = string; + +export function subgroupArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return subgroupDeserializer(item); + }); +} + +/** A subgroup in an interconnect group. */ +export interface Subgroup extends SubResourceModel { + /** Properties of the subgroup. */ + properties?: SubgroupProperties; +} + +export function subgroupDeserializer(item: any): Subgroup { + return { + name: item["name"], + type: item["type"], + id: item["id"], + properties: !item["properties"] + ? item["properties"] + : subgroupPropertiesDeserializer(item["properties"]), + }; +} + +/** Properties of subgroup. */ +export interface SubgroupProperties { + /** The unique identifier of the subgroup. */ + readonly internalSubgroupId?: string; + /** The reference to an interconnect block resource. */ + readonly interconnectBlock?: SubResource; + /** A list of virtual machine references. */ + readonly virtualMachines?: SubResource[]; + /** The provisioning state of the subgroup. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function subgroupPropertiesDeserializer(item: any): SubgroupProperties { + return { + internalSubgroupId: item["internalSubgroupId"], + interconnectBlock: !item["interconnectBlock"] + ? item["interconnectBlock"] + : subResourceDeserializer(item["interconnectBlock"]), + virtualMachines: !item["virtualMachines"] + ? item["virtualMachines"] + : subResourceArrayDeserializer(item["virtualMachines"]), + provisioningState: item["provisioningState"], + }; +} + +/** Subgroup profile of the interconnect group resource. */ +export interface SubgroupProfile { + /** VM size of the subgroup profile. */ + vmSize: string; + /** Scope of the subgroup profile. */ + scope?: SubgroupProfileScope; + /** Size of the subgroup profile. */ + size?: number; +} + +export function subgroupProfileSerializer(item: SubgroupProfile): any { + return { vmSize: item["vmSize"], scope: item["scope"], size: item["size"] }; +} + +export function subgroupProfileDeserializer(item: any): SubgroupProfile { + return { + vmSize: item["vmSize"], + scope: item["scope"], + size: item["size"], + }; +} + +/** Scope of the subgroup profile. */ +export enum KnownSubgroupProfileScope { + /** No subgroup profile scope. */ + None = "None", + /** VerticalConnect subgroup profile scope. */ + VerticalConnect = "VerticalConnect", +} + +/** + * Scope of the subgroup profile. \ + * {@link KnownSubgroupProfileScope} can be used interchangeably with SubgroupProfileScope, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No subgroup profile scope. \ + * **VerticalConnect**: VerticalConnect subgroup profile scope. + */ +export type SubgroupProfileScope = string; + +export function interconnectGroupArraySerializer(result: Array): any[] { + return result.map((item) => { + return interconnectGroupSerializer(item); + }); +} + +export function interconnectGroupArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return interconnectGroupDeserializer(item); + }); +} + +/** Represents node availability information for subgroups within an interconnect group. */ +export interface InterconnectGroupNodeAvailability { + /** The list of subgroup node availability entries. */ + subgroupsNodeAvailability?: SubgroupNodeAvailabilityEntry[]; +} + +export function interconnectGroupNodeAvailabilityDeserializer( + item: any, +): InterconnectGroupNodeAvailability { + return { + subgroupsNodeAvailability: !item["subgroupsNodeAvailability"] + ? item["subgroupsNodeAvailability"] + : subgroupNodeAvailabilityEntryArrayDeserializer(item["subgroupsNodeAvailability"]), + }; +} + +export function subgroupNodeAvailabilityEntryArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return subgroupNodeAvailabilityEntryDeserializer(item); + }); +} + +/** Represents the node availability information for a single subgroup. */ +export interface SubgroupNodeAvailabilityEntry { + /** The subgroup name. */ + name?: string; + /** The unique identifier of the subgroup. */ + internalSubgroupId?: string; + /** The number of nodes that are in service. */ + inServiceNodeCount?: number; + /** The number of nodes that are currently in use. */ + inUseNodeCount?: number; + /** The total node count for the subgroup. */ + count?: number; +} + +export function subgroupNodeAvailabilityEntryDeserializer( + item: any, +): SubgroupNodeAvailabilityEntry { + return { + name: item["name"], + internalSubgroupId: item["internalSubgroupId"], + inServiceNodeCount: item["inServiceNodeCount"], + inUseNodeCount: item["inUseNodeCount"], + count: item["count"], + }; +} + +export function applicationGatewayPrivateLinkResourceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayPrivateLinkResourceDeserializer(item); + }); +} + +/** PrivateLink Resource of an application gateway. */ +export interface ApplicationGatewayPrivateLinkResource extends SubResource { + /** Name of the private link resource that is unique within an Application Gateway. */ + name?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Type of the resource. */ + readonly type?: string; + /** Group identifier of private link resource. */ + readonly groupId?: string; + /** Required member names of private link resource. */ + readonly requiredMembers?: string[]; + /** Required DNS zone names of the the private link resource. */ + requiredZoneNames?: string[]; +} + +export function applicationGatewayPrivateLinkResourceDeserializer( + item: any, +): ApplicationGatewayPrivateLinkResource { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayPrivateLinkResourcePropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + type: item["type"], + }; +} + +/** Properties of a private link resource. */ +export interface ApplicationGatewayPrivateLinkResourceProperties { + /** Group identifier of private link resource. */ + readonly groupId?: string; + /** Required member names of private link resource. */ + readonly requiredMembers?: string[]; + /** Required DNS zone names of the the private link resource. */ + requiredZoneNames?: string[]; +} + +export function applicationGatewayPrivateLinkResourcePropertiesDeserializer( + item: any, +): ApplicationGatewayPrivateLinkResourceProperties { + return { + groupId: item["groupId"], + requiredMembers: !item["requiredMembers"] + ? item["requiredMembers"] + : item["requiredMembers"].map((p: any) => { + return p; + }), + requiredZoneNames: !item["requiredZoneNames"] + ? item["requiredZoneNames"] + : item["requiredZoneNames"].map((p: any) => { + return p; + }), + }; +} + +/** Response for ApplicationGatewayWafDynamicManifest API service call. */ +export interface ApplicationGatewayWafDynamicManifestResult extends ProxyResourceWithSettableId { + /** The default ruleset. */ + defaultRuleSet?: DefaultRuleSetPropertyFormat; + /** The available rulesets. */ + availableRuleSets?: ApplicationGatewayFirewallManifestRuleSet[]; +} + +export function applicationGatewayWafDynamicManifestResultDeserializer( + item: any, +): ApplicationGatewayWafDynamicManifestResult { + return { + id: item["id"], + name: item["name"], + type: item["type"], + ...(!item["properties"] + ? item["properties"] + : _applicationGatewayWafDynamicManifestResultPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of ApplicationGatewayWafDynamicManifest. */ +export interface ApplicationGatewayWafDynamicManifestPropertiesResult { + /** The available rulesets. */ + availableRuleSets?: ApplicationGatewayFirewallManifestRuleSet[]; + /** The type of the web application firewall rule set. */ + ruleSetType?: string; + /** The version of the web application firewall rule set type. */ + ruleSetVersion?: string; +} + +export function applicationGatewayWafDynamicManifestPropertiesResultDeserializer( + item: any, +): ApplicationGatewayWafDynamicManifestPropertiesResult { + return { + ...(!item["defaultRuleSet"] + ? item["defaultRuleSet"] + : _applicationGatewayWafDynamicManifestPropertiesResultDefaultRuleSetDeserializer( + item["defaultRuleSet"], + )), + availableRuleSets: !item["availableRuleSets"] + ? item["availableRuleSets"] + : applicationGatewayFirewallManifestRuleSetArrayDeserializer(item["availableRuleSets"]), + }; +} + +/** the default web application firewall rule set. */ +export interface DefaultRuleSetPropertyFormat { + /** The type of the web application firewall rule set. */ + ruleSetType?: string; + /** The version of the web application firewall rule set type. */ + ruleSetVersion?: string; +} + +export function defaultRuleSetPropertyFormatDeserializer(item: any): DefaultRuleSetPropertyFormat { + return { + ruleSetType: item["ruleSetType"], + ruleSetVersion: item["ruleSetVersion"], + }; +} + +export function applicationGatewayFirewallManifestRuleSetArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayFirewallManifestRuleSetDeserializer(item); + }); +} + +/** Properties of the web application firewall rule set. */ +export interface ApplicationGatewayFirewallManifestRuleSet { + /** The type of the web application firewall rule set. */ + ruleSetType: string; + /** The version of the web application firewall rule set type. */ + ruleSetVersion: string; + /** The rule set status */ + status?: ApplicationGatewayRuleSetStatusOptions; + /** Tier of an application gateway that support the rule set. */ + tiers?: ApplicationGatewayTierTypes[]; + /** The rule groups of the web application firewall rule set. */ + ruleGroups: ApplicationGatewayFirewallRuleGroup[]; +} + +export function applicationGatewayFirewallManifestRuleSetDeserializer( + item: any, +): ApplicationGatewayFirewallManifestRuleSet { + return { + ruleSetType: item["ruleSetType"], + ruleSetVersion: item["ruleSetVersion"], + status: item["status"], + tiers: !item["tiers"] + ? item["tiers"] + : item["tiers"].map((p: any) => { + return p; + }), + ruleGroups: applicationGatewayFirewallRuleGroupArrayDeserializer(item["ruleGroups"]), + }; +} + +/** The rule set status */ +export enum KnownApplicationGatewayRuleSetStatusOptions { + /** Preview */ + Preview = "Preview", + /** GA */ + GA = "GA", + /** Supported */ + Supported = "Supported", + /** Deprecated */ + Deprecated = "Deprecated", +} + +/** + * The rule set status \ + * {@link KnownApplicationGatewayRuleSetStatusOptions} can be used interchangeably with ApplicationGatewayRuleSetStatusOptions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Preview**: Preview \ + * **GA**: GA \ + * **Supported**: Supported \ + * **Deprecated**: Deprecated + */ +export type ApplicationGatewayRuleSetStatusOptions = string; + +/** Proxy resource representation. */ +export interface ProxyResourceWithSettableId { + /** Resource ID. */ + id?: string; + /** Resource name. */ + readonly name?: string; + /** Resource type. */ + readonly type?: string; +} + +export function proxyResourceWithSettableIdDeserializer(item: any): ProxyResourceWithSettableId { + return { + id: item["id"], + name: item["name"], + type: item["type"], + }; +} + +/** Response for ApplicationGatewayWafDynamicManifests API service call. */ +export interface _ApplicationGatewayWafDynamicManifestResultList { + /** The ApplicationGatewayWafDynamicManifestResult items on this page */ + value: ApplicationGatewayWafDynamicManifestResult[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _applicationGatewayWafDynamicManifestResultListDeserializer( + item: any, +): _ApplicationGatewayWafDynamicManifestResultList { + return { + value: applicationGatewayWafDynamicManifestResultArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function applicationGatewayWafDynamicManifestResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationGatewayWafDynamicManifestResultDeserializer(item); + }); +} + +/** Azure Web Category Resource. */ +export interface AzureWebCategory extends ProxyResource { + /** The name of the group that the category belongs to. */ + readonly group?: string; +} + +export function azureWebCategoryDeserializer(item: any): AzureWebCategory { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _azureWebCategoryPropertiesDeserializer(item["properties"])), + }; +} + +/** Azure Web Category Properties. */ +export interface AzureWebCategoryPropertiesFormat { + /** The name of the group that the category belongs to. */ + readonly group?: string; +} + +export function azureWebCategoryPropertiesFormatDeserializer( + item: any, +): AzureWebCategoryPropertiesFormat { + return { + group: item["group"], + }; +} + +/** List of Azure Web Categories for a given Subscription. */ +export interface _AzureWebCategoryListResult { + /** The AzureWebCategory items on this page */ + value: AzureWebCategory[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _azureWebCategoryListResultDeserializer(item: any): _AzureWebCategoryListResult { + return { + value: azureWebCategoryArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function azureWebCategoryArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return azureWebCategoryDeserializer(item); + }); +} + +/** Response for ListExpressRouteProviderPort API service call. */ +export interface ExpressRouteProviderPortListResult { + /** The ExpressRouteProviderPort items on this page */ + value: ExpressRouteProviderPort[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function expressRouteProviderPortListResultDeserializer( + item: any, +): ExpressRouteProviderPortListResult { + return { + value: expressRouteProviderPortArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function expressRouteProviderPortArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteProviderPortDeserializer(item); + }); +} + +/** Paged collection of LoadBalancer items */ +export interface _NetworkInterfaceLoadBalancerListResult { + /** The LoadBalancer items on this page */ + value: LoadBalancer[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkInterfaceLoadBalancerListResultDeserializer( + item: any, +): _NetworkInterfaceLoadBalancerListResult { + return { + value: loadBalancerArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** SwapResource to represent slot type on the specified cloud service. */ +export interface SwapResource extends ProxyResourceWithReadOnlyID { + /** Swap resource properties */ + properties?: SwapResourceProperties; +} + +export function swapResourceSerializer(item: SwapResource): any { + return { + properties: !item["properties"] + ? item["properties"] + : swapResourcePropertiesSerializer(item["properties"]), + }; +} + +export function swapResourceDeserializer(item: any): SwapResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + properties: !item["properties"] + ? item["properties"] + : swapResourcePropertiesDeserializer(item["properties"]), + }; +} + +/** Swap resource properties */ +export interface SwapResourceProperties { + /** Specifies slot info on a cloud service */ + slotType?: SlotType; +} + +export function swapResourcePropertiesSerializer(item: SwapResourceProperties): any { + return { slotType: item["slotType"] }; +} + +export function swapResourcePropertiesDeserializer(item: any): SwapResourceProperties { + return { + slotType: item["slotType"], + }; +} + +/** Specifies slot info on a cloud service */ +export type SlotType = "Production" | "Staging"; + +/** Proxy resource representation. */ +export interface ProxyResourceWithReadOnlyID { + /** Resource ID. */ + readonly id?: string; + /** Resource name. */ + readonly name?: string; + /** Resource type. */ + readonly type?: string; +} + +export function proxyResourceWithReadOnlyIDSerializer(_item: ProxyResourceWithReadOnlyID): any { + return {}; +} + +export function proxyResourceWithReadOnlyIDDeserializer(item: any): ProxyResourceWithReadOnlyID { + return { + id: item["id"], + name: item["name"], + type: item["type"], + }; +} + +/** SwapResource List with single entry to represent slot type on the specified cloud service. */ +export interface SwapResourceListResult { + value?: SwapResource[]; +} + +export function swapResourceListResultDeserializer(item: any): SwapResourceListResult { + return { + value: !item["value"] ? item["value"] : swapResourceArrayDeserializer(item["value"]), + }; +} + +export function swapResourceArraySerializer(result: Array): any[] { + return result.map((item) => { + return swapResourceSerializer(item); + }); +} + +export function swapResourceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return swapResourceDeserializer(item); + }); +} + +/** Custom IP prefix resource. */ +export interface CustomIpPrefix extends Resource { + /** The extended location of the custom IP prefix. */ + extendedLocation?: ExtendedLocation; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** The ASN for CIDR advertising. Should be an integer as string. */ + asn?: string; + /** The prefix range in CIDR notation. Should include the start address and the prefix length. */ + cidr?: string; + /** Signed message for WAN validation. */ + signedMessage?: string; + /** Authorization message for WAN validation. */ + authorizationMessage?: string; + /** The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. */ + customIpPrefixParent?: SubResource; + /** The list of all Children for IPv6 /48 CustomIpPrefix. */ + readonly childCustomIpPrefixes?: SubResource[]; + /** The commissioned state of the Custom IP Prefix. */ + commissionedState?: CommissionedState; + /** Whether to do express route advertise. */ + expressRouteAdvertise?: boolean; + /** The Geo for CIDR advertising. Should be an Geo code. */ + geo?: Geo; + /** Whether to Advertise the range to Internet. */ + noInternetAdvertise?: boolean; + /** Type of custom IP prefix. Should be Singular, Parent, or Child. */ + prefixType?: CustomIpPrefixType; + /** The list of all referenced PublicIpPrefixes. */ + readonly publicIpPrefixes?: SubResource[]; + /** The resource GUID property of the custom IP prefix resource. */ + readonly resourceGuid?: string; + /** The reason why resource is in failed state. */ + readonly failedReason?: string; + /** The provisioning state of the custom IP prefix resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function customIpPrefixSerializer(item: CustomIpPrefix): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "asn", + "cidr", + "signedMessage", + "authorizationMessage", + "customIpPrefixParent", + "commissionedState", + "expressRouteAdvertise", + "geo", + "noInternetAdvertise", + "prefixType", + ]) + ? undefined + : _customIpPrefixPropertiesSerializer(item), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationSerializer(item["extendedLocation"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +export function customIpPrefixDeserializer(item: any): CustomIpPrefix { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _customIpPrefixPropertiesDeserializer(item["properties"])), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationDeserializer(item["extendedLocation"]), + etag: item["etag"], + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +/** Custom IP prefix properties. */ +export interface CustomIpPrefixPropertiesFormat { + /** The ASN for CIDR advertising. Should be an integer as string. */ + asn?: string; + /** The prefix range in CIDR notation. Should include the start address and the prefix length. */ + cidr?: string; + /** Signed message for WAN validation. */ + signedMessage?: string; + /** Authorization message for WAN validation. */ + authorizationMessage?: string; + /** The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. */ + customIpPrefixParent?: SubResource; + /** The list of all Children for IPv6 /48 CustomIpPrefix. */ + readonly childCustomIpPrefixes?: SubResource[]; + /** The commissioned state of the Custom IP Prefix. */ + commissionedState?: CommissionedState; + /** Whether to do express route advertise. */ + expressRouteAdvertise?: boolean; + /** The Geo for CIDR advertising. Should be an Geo code. */ + geo?: Geo; + /** Whether to Advertise the range to Internet. */ + noInternetAdvertise?: boolean; + /** Type of custom IP prefix. Should be Singular, Parent, or Child. */ + prefixType?: CustomIpPrefixType; + /** The list of all referenced PublicIpPrefixes. */ + readonly publicIpPrefixes?: SubResource[]; + /** The resource GUID property of the custom IP prefix resource. */ + readonly resourceGuid?: string; + /** The reason why resource is in failed state. */ + readonly failedReason?: string; + /** The provisioning state of the custom IP prefix resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function customIpPrefixPropertiesFormatSerializer( + item: CustomIpPrefixPropertiesFormat, +): any { + return { + asn: item["asn"], + cidr: item["cidr"], + signedMessage: item["signedMessage"], + authorizationMessage: item["authorizationMessage"], + customIpPrefixParent: !item["customIpPrefixParent"] + ? item["customIpPrefixParent"] + : subResourceSerializer(item["customIpPrefixParent"]), + commissionedState: item["commissionedState"], + expressRouteAdvertise: item["expressRouteAdvertise"], + geo: item["geo"], + noInternetAdvertise: item["noInternetAdvertise"], + prefixType: item["prefixType"], + }; +} + +export function customIpPrefixPropertiesFormatDeserializer( + item: any, +): CustomIpPrefixPropertiesFormat { + return { + asn: item["asn"], + cidr: item["cidr"], + signedMessage: item["signedMessage"], + authorizationMessage: item["authorizationMessage"], + customIpPrefixParent: !item["customIpPrefixParent"] + ? item["customIpPrefixParent"] + : subResourceDeserializer(item["customIpPrefixParent"]), + childCustomIpPrefixes: !item["childCustomIpPrefixes"] + ? item["childCustomIpPrefixes"] + : subResourceArrayDeserializer(item["childCustomIpPrefixes"]), + commissionedState: item["commissionedState"], + expressRouteAdvertise: item["expressRouteAdvertise"], + geo: item["geo"], + noInternetAdvertise: item["noInternetAdvertise"], + prefixType: item["prefixType"], + publicIpPrefixes: !item["publicIpPrefixes"] + ? item["publicIpPrefixes"] + : subResourceArrayDeserializer(item["publicIpPrefixes"]), + resourceGuid: item["resourceGuid"], + failedReason: item["failedReason"], + provisioningState: item["provisioningState"], + }; +} + +/** The commissioned state of the Custom IP Prefix. */ +export enum KnownCommissionedState { + /** Provisioning */ + Provisioning = "Provisioning", + /** Provisioned */ + Provisioned = "Provisioned", + /** Commissioning */ + Commissioning = "Commissioning", + /** CommissionedNoInternetAdvertise */ + CommissionedNoInternetAdvertise = "CommissionedNoInternetAdvertise", + /** Commissioned */ + Commissioned = "Commissioned", + /** Decommissioning */ + Decommissioning = "Decommissioning", + /** Deprovisioning */ + Deprovisioning = "Deprovisioning", + /** Deprovisioned */ + Deprovisioned = "Deprovisioned", +} + +/** + * The commissioned state of the Custom IP Prefix. \ + * {@link KnownCommissionedState} can be used interchangeably with CommissionedState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Provisioning**: Provisioning \ + * **Provisioned**: Provisioned \ + * **Commissioning**: Commissioning \ + * **CommissionedNoInternetAdvertise**: CommissionedNoInternetAdvertise \ + * **Commissioned**: Commissioned \ + * **Decommissioning**: Decommissioning \ + * **Deprovisioning**: Deprovisioning \ + * **Deprovisioned**: Deprovisioned + */ +export type CommissionedState = string; + +/** The Geo for CIDR advertising. Should be an Geo code. */ +export enum KnownGeo { + /** GLOBAL */ + Global = "GLOBAL", + /** AFRI */ + Afri = "AFRI", + /** APAC */ + Apac = "APAC", + /** EURO */ + Euro = "EURO", + /** LATAM */ + Latam = "LATAM", + /** NAM */ + NAM = "NAM", + /** ME */ + ME = "ME", + /** OCEANIA */ + Oceania = "OCEANIA", + /** AQ */ + AQ = "AQ", +} + +/** + * The Geo for CIDR advertising. Should be an Geo code. \ + * {@link KnownGeo} can be used interchangeably with Geo, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **GLOBAL**: GLOBAL \ + * **AFRI**: AFRI \ + * **APAC**: APAC \ + * **EURO**: EURO \ + * **LATAM**: LATAM \ + * **NAM**: NAM \ + * **ME**: ME \ + * **OCEANIA**: OCEANIA \ + * **AQ**: AQ + */ +export type Geo = string; + +/** Type of custom IP prefix. Should be Singular, Parent, or Child. */ +export enum KnownCustomIpPrefixType { + /** Singular */ + Singular = "Singular", + /** Parent */ + Parent = "Parent", + /** Child */ + Child = "Child", +} + +/** + * Type of custom IP prefix. Should be Singular, Parent, or Child. \ + * {@link KnownCustomIpPrefixType} can be used interchangeably with CustomIpPrefixType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Singular**: Singular \ + * **Parent**: Parent \ + * **Child**: Child + */ +export type CustomIpPrefixType = string; + +export function customIpPrefixArraySerializer(result: Array): any[] { + return result.map((item) => { + return customIpPrefixSerializer(item); + }); +} + +export function customIpPrefixArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return customIpPrefixDeserializer(item); + }); +} + +/** Differentiated Services Code Point configuration for any given network interface */ +export interface DscpConfiguration extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** List of markings to be used in the configuration. */ + markings?: number[]; + /** Source IP ranges. */ + sourceIpRanges?: QosIpRange[]; + /** Destination IP ranges. */ + destinationIpRanges?: QosIpRange[]; + /** Sources port ranges. */ + sourcePortRanges?: QosPortRange[]; + /** Destination port ranges. */ + destinationPortRanges?: QosPortRange[]; + /** RNM supported protocol types. */ + protocol?: ProtocolType; + /** QoS object definitions */ + qosDefinitionCollection?: QosDefinition[]; + /** Qos Collection ID generated by RNM. */ + readonly qosCollectionId?: string; + /** Associated Network Interfaces to the DSCP Configuration. */ + readonly associatedNetworkInterfaces?: NetworkInterface[]; + /** The resource GUID property of the DSCP Configuration resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the DSCP Configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function dscpConfigurationSerializer(item: DscpConfiguration): any { + return { + id: item["id"], + location: item["location"], + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "markings", + "sourceIpRanges", + "destinationIpRanges", + "sourcePortRanges", + "destinationPortRanges", + "protocol", + "qosDefinitionCollection", + ]) + ? undefined + : _dscpConfigurationPropertiesSerializer(item), + }; +} + +export function dscpConfigurationDeserializer(item: any): DscpConfiguration { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _dscpConfigurationPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Differentiated Services Code Point configuration properties. */ +export interface DscpConfigurationPropertiesFormat { + /** List of markings to be used in the configuration. */ + markings?: number[]; + /** Source IP ranges. */ + sourceIpRanges?: QosIpRange[]; + /** Destination IP ranges. */ + destinationIpRanges?: QosIpRange[]; + /** Sources port ranges. */ + sourcePortRanges?: QosPortRange[]; + /** Destination port ranges. */ + destinationPortRanges?: QosPortRange[]; + /** RNM supported protocol types. */ + protocol?: ProtocolType; + /** QoS object definitions */ + qosDefinitionCollection?: QosDefinition[]; + /** Qos Collection ID generated by RNM. */ + readonly qosCollectionId?: string; + /** Associated Network Interfaces to the DSCP Configuration. */ + readonly associatedNetworkInterfaces?: NetworkInterface[]; + /** The resource GUID property of the DSCP Configuration resource. */ + readonly resourceGuid?: string; + /** The provisioning state of the DSCP Configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function dscpConfigurationPropertiesFormatSerializer( + item: DscpConfigurationPropertiesFormat, +): any { + return { + markings: !item["markings"] + ? item["markings"] + : item["markings"].map((p: any) => { + return p; + }), + sourceIpRanges: !item["sourceIpRanges"] + ? item["sourceIpRanges"] + : qosIpRangeArraySerializer(item["sourceIpRanges"]), + destinationIpRanges: !item["destinationIpRanges"] + ? item["destinationIpRanges"] + : qosIpRangeArraySerializer(item["destinationIpRanges"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : qosPortRangeArraySerializer(item["sourcePortRanges"]), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : qosPortRangeArraySerializer(item["destinationPortRanges"]), + protocol: item["protocol"], + qosDefinitionCollection: !item["qosDefinitionCollection"] + ? item["qosDefinitionCollection"] + : qosDefinitionArraySerializer(item["qosDefinitionCollection"]), + }; +} + +export function dscpConfigurationPropertiesFormatDeserializer( + item: any, +): DscpConfigurationPropertiesFormat { + return { + markings: !item["markings"] + ? item["markings"] + : item["markings"].map((p: any) => { + return p; + }), + sourceIpRanges: !item["sourceIpRanges"] + ? item["sourceIpRanges"] + : qosIpRangeArrayDeserializer(item["sourceIpRanges"]), + destinationIpRanges: !item["destinationIpRanges"] + ? item["destinationIpRanges"] + : qosIpRangeArrayDeserializer(item["destinationIpRanges"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : qosPortRangeArrayDeserializer(item["sourcePortRanges"]), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : qosPortRangeArrayDeserializer(item["destinationPortRanges"]), + protocol: item["protocol"], + qosDefinitionCollection: !item["qosDefinitionCollection"] + ? item["qosDefinitionCollection"] + : qosDefinitionArrayDeserializer(item["qosDefinitionCollection"]), + qosCollectionId: item["qosCollectionId"], + associatedNetworkInterfaces: !item["associatedNetworkInterfaces"] + ? item["associatedNetworkInterfaces"] + : networkInterfaceArrayDeserializer(item["associatedNetworkInterfaces"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function qosIpRangeArraySerializer(result: Array): any[] { + return result.map((item) => { + return qosIpRangeSerializer(item); + }); +} + +export function qosIpRangeArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return qosIpRangeDeserializer(item); + }); +} + +/** Qos Traffic Profiler IP Range properties. */ +export interface QosIpRange { + /** Start IP Address. */ + startIP?: string; + /** End IP Address. */ + endIP?: string; +} + +export function qosIpRangeSerializer(item: QosIpRange): any { + return { startIP: item["startIP"], endIP: item["endIP"] }; +} + +export function qosIpRangeDeserializer(item: any): QosIpRange { + return { + startIP: item["startIP"], + endIP: item["endIP"], + }; +} + +export function qosPortRangeArraySerializer(result: Array): any[] { + return result.map((item) => { + return qosPortRangeSerializer(item); + }); +} + +export function qosPortRangeArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return qosPortRangeDeserializer(item); + }); +} + +/** Qos Traffic Profiler Port range properties. */ +export interface QosPortRange { + /** Qos Port Range start. */ + start?: number; + /** Qos Port Range end. */ + end?: number; +} + +export function qosPortRangeSerializer(item: QosPortRange): any { + return { start: item["start"], end: item["end"] }; +} + +export function qosPortRangeDeserializer(item: any): QosPortRange { + return { + start: item["start"], + end: item["end"], + }; +} + +/** RNM supported protocol types. */ +export enum KnownProtocolType { + /** DoNotUse */ + DoNotUse = "DoNotUse", + /** Icmp */ + Icmp = "Icmp", + /** Tcp */ + Tcp = "Tcp", + /** Udp */ + Udp = "Udp", + /** Gre */ + Gre = "Gre", + /** Esp */ + Esp = "Esp", + /** Ah */ + Ah = "Ah", + /** Vxlan */ + Vxlan = "Vxlan", + /** All */ + All = "All", +} + +/** + * RNM supported protocol types. \ + * {@link KnownProtocolType} can be used interchangeably with ProtocolType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DoNotUse**: DoNotUse \ + * **Icmp**: Icmp \ + * **Tcp**: Tcp \ + * **Udp**: Udp \ + * **Gre**: Gre \ + * **Esp**: Esp \ + * **Ah**: Ah \ + * **Vxlan**: Vxlan \ + * **All**: All + */ +export type ProtocolType = string; + +export function qosDefinitionArraySerializer(result: Array): any[] { + return result.map((item) => { + return qosDefinitionSerializer(item); + }); +} + +export function qosDefinitionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return qosDefinitionDeserializer(item); + }); +} + +/** Quality of Service defines the traffic configuration between endpoints. Mandatory to have one marking. */ +export interface QosDefinition { + /** List of markings to be used in the configuration. */ + markings?: number[]; + /** Source IP ranges. */ + sourceIpRanges?: QosIpRange[]; + /** Destination IP ranges. */ + destinationIpRanges?: QosIpRange[]; + /** Sources port ranges. */ + sourcePortRanges?: QosPortRange[]; + /** Destination port ranges. */ + destinationPortRanges?: QosPortRange[]; + /** RNM supported protocol types. */ + protocol?: ProtocolType; +} + +export function qosDefinitionSerializer(item: QosDefinition): any { + return { + markings: !item["markings"] + ? item["markings"] + : item["markings"].map((p: any) => { + return p; + }), + sourceIpRanges: !item["sourceIpRanges"] + ? item["sourceIpRanges"] + : qosIpRangeArraySerializer(item["sourceIpRanges"]), + destinationIpRanges: !item["destinationIpRanges"] + ? item["destinationIpRanges"] + : qosIpRangeArraySerializer(item["destinationIpRanges"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : qosPortRangeArraySerializer(item["sourcePortRanges"]), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : qosPortRangeArraySerializer(item["destinationPortRanges"]), + protocol: item["protocol"], + }; +} + +export function qosDefinitionDeserializer(item: any): QosDefinition { + return { + markings: !item["markings"] + ? item["markings"] + : item["markings"].map((p: any) => { + return p; + }), + sourceIpRanges: !item["sourceIpRanges"] + ? item["sourceIpRanges"] + : qosIpRangeArrayDeserializer(item["sourceIpRanges"]), + destinationIpRanges: !item["destinationIpRanges"] + ? item["destinationIpRanges"] + : qosIpRangeArrayDeserializer(item["destinationIpRanges"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : qosPortRangeArrayDeserializer(item["sourcePortRanges"]), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : qosPortRangeArrayDeserializer(item["destinationPortRanges"]), + protocol: item["protocol"], + }; +} + +export function dscpConfigurationArraySerializer(result: Array): any[] { + return result.map((item) => { + return dscpConfigurationSerializer(item); + }); +} + +export function dscpConfigurationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return dscpConfigurationDeserializer(item); + }); +} + +/** Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCrossConnection. */ +export interface _ExpressRouteCrossConnectionPeeringList { + /** The ExpressRouteCrossConnectionPeering items on this page */ + value: ExpressRouteCrossConnectionPeering[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _expressRouteCrossConnectionPeeringListDeserializer( + item: any, +): _ExpressRouteCrossConnectionPeeringList { + return { + value: expressRouteCrossConnectionPeeringArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Response for ListExpressRouteLinks API service call. */ +export interface _ExpressRouteLinkListResult { + /** The ExpressRouteLink items on this page */ + value: ExpressRouteLink[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _expressRouteLinkListResultDeserializer(item: any): _ExpressRouteLinkListResult { + return { + value: expressRouteLinkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Will describe the query to run against the IDPS signatures DB */ +export interface IdpsQueryObject { + /** Contain all filters names and values */ + filters?: FilterItems[]; + /** Search term in all columns */ + search?: string; + /** Column to sort response by */ + orderBy?: OrderBy; + /** The number of the results to return in each page */ + resultsPerPage?: number; + /** The number of records matching the filter to skip */ + skip?: number; +} + +export function idpsQueryObjectSerializer(item: IdpsQueryObject): any { + return { + filters: !item["filters"] ? item["filters"] : filterItemsArraySerializer(item["filters"]), + search: item["search"], + orderBy: !item["orderBy"] ? item["orderBy"] : orderBySerializer(item["orderBy"]), + resultsPerPage: item["resultsPerPage"], + skip: item["skip"], + }; +} + +export function filterItemsArraySerializer(result: Array): any[] { + return result.map((item) => { + return filterItemsSerializer(item); + }); +} + +/** Will contain the filter name and values to operate on */ +export interface FilterItems { + /** The name of the field we would like to filter */ + field?: string; + /** List of values to filter the current field by */ + values?: string[]; +} + +export function filterItemsSerializer(item: FilterItems): any { + return { + field: item["field"], + values: !item["values"] + ? item["values"] + : item["values"].map((p: any) => { + return p; + }), + }; +} + +/** Describes a column to sort */ +export interface OrderBy { + /** Describes the actual column name to sort by */ + field?: string; + /** Describes if results should be in ascending/descending order */ + order?: FirewallPolicyIdpsQuerySortOrder; +} + +export function orderBySerializer(item: OrderBy): any { + return { field: item["field"], order: item["order"] }; +} + +/** Describes if results should be in ascending/descending order */ +export enum KnownFirewallPolicyIdpsQuerySortOrder { + /** Ascending */ + Ascending = "Ascending", + /** Descending */ + Descending = "Descending", +} + +/** + * Describes if results should be in ascending/descending order \ + * {@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**: Ascending \ + * **Descending**: Descending + */ +export type FirewallPolicyIdpsQuerySortOrder = string; + +/** Query result */ +export interface QueryResults { + /** Number of total records matching the query. */ + matchingRecordsCount?: number; + /** Array containing the results of the query */ + signatures?: SingleQueryResult[]; +} + +export function queryResultsDeserializer(item: any): QueryResults { + return { + matchingRecordsCount: item["matchingRecordsCount"], + signatures: !item["signatures"] + ? item["signatures"] + : singleQueryResultArrayDeserializer(item["signatures"]), + }; +} + +export function singleQueryResultArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return singleQueryResultDeserializer(item); + }); +} + +/** model interface SingleQueryResult */ +export interface SingleQueryResult { + /** The ID of the signature */ + signatureId?: number; + /** The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny */ + mode?: FirewallPolicyIdpsSignatureMode; + /** Describes the severity of signature: 1 - High, 2 - Medium, 3 - Low */ + severity?: FirewallPolicyIdpsSignatureSeverity; + /** Describes in which direction signature is being enforced: 0 - OutBound, 1 - InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound, 5 - InternalInbound */ + direction?: FirewallPolicyIdpsSignatureDirection; + /** Describes the groups the signature belongs to */ + group?: string; + /** Describes what is the signature enforces */ + description?: string; + /** Describes the protocol the signatures is being enforced in */ + protocol?: string; + /** Describes the list of source ports related to this signature */ + sourcePorts?: string[]; + /** Describes the list of destination ports related to this signature */ + destinationPorts?: string[]; + /** Describes the last updated time of the signature (provided from 3rd party vendor) */ + lastUpdated?: string; + /** Describes if this override is inherited from base policy or not */ + inheritedFromParentPolicy?: boolean; +} + +export function singleQueryResultDeserializer(item: any): SingleQueryResult { + return { + signatureId: item["signatureId"], + mode: item["mode"], + severity: item["severity"], + direction: item["direction"], + group: item["group"], + description: item["description"], + protocol: item["protocol"], + sourcePorts: !item["sourcePorts"] + ? item["sourcePorts"] + : item["sourcePorts"].map((p: any) => { + return p; + }), + destinationPorts: !item["destinationPorts"] + ? item["destinationPorts"] + : item["destinationPorts"].map((p: any) => { + return p; + }), + lastUpdated: item["lastUpdated"], + inheritedFromParentPolicy: item["inheritedFromParentPolicy"], + }; +} + +/** The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny */ +export type FirewallPolicyIdpsSignatureMode = 0 | 1 | 2; +/** Describes the severity of signature: 1 - High, 2 - Medium, 3 - Low */ +export type FirewallPolicyIdpsSignatureSeverity = 1 | 2 | 3; +/** Describes in which direction signature is being enforced: 0 - OutBound, 1 - InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound, 5 - InternalInbound */ +export type FirewallPolicyIdpsSignatureDirection = 0 | 1 | 2 | 3 | 4 | 5; + +/** Describes the filter values possibles for a given column */ +export interface SignatureOverridesFilterValuesQuery { + /** Describes the name of the column which values will be returned */ + filterName?: string; +} + +export function signatureOverridesFilterValuesQuerySerializer( + item: SignatureOverridesFilterValuesQuery, +): any { + return { filterName: item["filterName"] }; +} + +/** Describes the list of all possible values for a specific filter value */ +export interface SignatureOverridesFilterValuesResponse { + /** Describes the possible values */ + filterValues?: string[]; +} + +export function signatureOverridesFilterValuesResponseDeserializer( + item: any, +): SignatureOverridesFilterValuesResponse { + return { + filterValues: !item["filterValues"] + ? item["filterValues"] + : item["filterValues"].map((p: any) => { + return p; + }), + }; +} + +/** Network Manager Commit. */ +export interface NetworkManagerCommit { + /** Commit Id. */ + readonly commitId?: string; + /** List of target locations. */ + targetLocations: string[]; + /** List of configuration ids. */ + configurationIds?: string[]; + /** Commit Type. */ + commitType: ConfigurationType; +} + +export function networkManagerCommitSerializer(item: NetworkManagerCommit): any { + return { + targetLocations: item["targetLocations"].map((p: any) => { + return p; + }), + configurationIds: !item["configurationIds"] + ? item["configurationIds"] + : item["configurationIds"].map((p: any) => { + return p; + }), + commitType: item["commitType"], + }; +} + +export function networkManagerCommitDeserializer(item: any): NetworkManagerCommit { + return { + commitId: item["commitId"], + targetLocations: item["targetLocations"].map((p: any) => { + return p; + }), + configurationIds: !item["configurationIds"] + ? item["configurationIds"] + : item["configurationIds"].map((p: any) => { + return p; + }), + commitType: item["commitType"], + }; +} + +/** Network Manager Deployment Status Parameter. */ +export interface NetworkManagerDeploymentStatusParameter { + /** List of locations. */ + regions?: string[]; + /** List of deployment types. */ + deploymentTypes?: ConfigurationType[]; + /** Continuation token for pagination, capturing the next page size and offset, as well as the context of the query. */ + skipToken?: string; +} + +export function networkManagerDeploymentStatusParameterSerializer( + item: NetworkManagerDeploymentStatusParameter, +): any { + return { + regions: !item["regions"] + ? item["regions"] + : item["regions"].map((p: any) => { + return p; + }), + deploymentTypes: !item["deploymentTypes"] + ? item["deploymentTypes"] + : item["deploymentTypes"].map((p: any) => { + return p; + }), + skipToken: item["skipToken"], + }; +} + +/** A list of Network Manager Deployment Status */ +export interface NetworkManagerDeploymentStatusListResult { + /** Gets a page of Network Manager Deployment Status */ + value?: NetworkManagerDeploymentStatus[]; + /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */ + skipToken?: string; +} + +export function networkManagerDeploymentStatusListResultDeserializer( + item: any, +): NetworkManagerDeploymentStatusListResult { + return { + value: !item["value"] + ? item["value"] + : networkManagerDeploymentStatusArrayDeserializer(item["value"]), + skipToken: item["skipToken"], + }; +} + +export function networkManagerDeploymentStatusArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkManagerDeploymentStatusDeserializer(item); + }); +} + +/** Network Manager Deployment Status. */ +export interface NetworkManagerDeploymentStatus { + /** Commit Time. */ + commitTime?: Date; + /** Region Name. */ + region?: string; + /** Deployment Status. */ + deploymentStatus?: DeploymentStatus; + /** List of configuration ids. */ + configurationIds?: string[]; + /** Configuration Deployment Type. */ + deploymentType?: ConfigurationType; + /** Error Message. */ + errorMessage?: string; +} + +export function networkManagerDeploymentStatusDeserializer( + item: any, +): NetworkManagerDeploymentStatus { + return { + commitTime: !item["commitTime"] ? item["commitTime"] : new Date(item["commitTime"]), + region: item["region"], + deploymentStatus: item["deploymentStatus"], + configurationIds: !item["configurationIds"] + ? item["configurationIds"] + : item["configurationIds"].map((p: any) => { + return p; + }), + deploymentType: item["deploymentType"], + errorMessage: item["errorMessage"], + }; +} + +/** Deployment Status. */ +export enum KnownDeploymentStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** Deploying */ + Deploying = "Deploying", + /** Deployed */ + Deployed = "Deployed", + /** Failed */ + Failed = "Failed", +} + +/** + * Deployment Status. \ + * {@link KnownDeploymentStatus} can be used interchangeably with DeploymentStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted**: NotStarted \ + * **Deploying**: Deploying \ + * **Deployed**: Deployed \ + * **Failed**: Failed + */ +export type DeploymentStatus = string; + +/** Paged collection of BackendAddressPool items */ +export interface _LoadBalancerBackendAddressPoolListResult { + /** The BackendAddressPool items on this page */ + value: BackendAddressPool[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _loadBalancerBackendAddressPoolListResultDeserializer( + item: any, +): _LoadBalancerBackendAddressPoolListResult { + return { + value: backendAddressPoolArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Paged collection of FrontendIPConfiguration items */ +export interface _LoadBalancerFrontendIPConfigurationListResult { + /** The FrontendIPConfiguration items on this page */ + value: FrontendIPConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _loadBalancerFrontendIPConfigurationListResultDeserializer( + item: any, +): _LoadBalancerFrontendIPConfigurationListResult { + return { + value: frontendIPConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Paged collection of LoadBalancingRule items */ +export interface _LoadBalancerLoadBalancingRuleListResult { + /** The LoadBalancingRule items on this page */ + value: LoadBalancingRule[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _loadBalancerLoadBalancingRuleListResultDeserializer( + item: any, +): _LoadBalancerLoadBalancingRuleListResult { + return { + value: loadBalancingRuleArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response for a Health API. */ +export interface LoadBalancerHealthPerRule { + /** Number of backend instances associated to the LB rule that are considered healthy. */ + up?: number; + /** Number of backend instances associated to the LB rule that are considered unhealthy. */ + down?: number; + /** Information about the health per rule of the backend addresses. */ + loadBalancerBackendAddresses?: LoadBalancerHealthPerRulePerBackendAddress[]; +} + +export function loadBalancerHealthPerRuleDeserializer(item: any): LoadBalancerHealthPerRule { + return { + up: item["up"], + down: item["down"], + loadBalancerBackendAddresses: !item["loadBalancerBackendAddresses"] + ? item["loadBalancerBackendAddresses"] + : loadBalancerHealthPerRulePerBackendAddressArrayDeserializer( + item["loadBalancerBackendAddresses"], + ), + }; +} + +export function loadBalancerHealthPerRulePerBackendAddressArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return loadBalancerHealthPerRulePerBackendAddressDeserializer(item); + }); +} + +/** The information about health per rule per backend address. */ +export interface LoadBalancerHealthPerRulePerBackendAddress { + /** The IP address belonging to the backend address. */ + ipAddress?: string; + /** Resource ID of the Network Interface IP Configuration. */ + networkInterfaceIPConfigurationId?: string; + /** The current health of the backend instances that is associated to the LB rule. */ + state?: string; + /** The explanation of the State */ + reason?: string; +} + +export function loadBalancerHealthPerRulePerBackendAddressDeserializer( + item: any, +): LoadBalancerHealthPerRulePerBackendAddress { + return { + ipAddress: item["ipAddress"], + networkInterfaceIPConfigurationId: item["networkInterfaceIPConfigurationId"], + state: item["state"], + reason: item["reason"], + }; +} + +/** Paged collection of OutboundRule items */ +export interface _LoadBalancerOutboundRuleListResult { + /** The OutboundRule items on this page */ + value: OutboundRule[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _loadBalancerOutboundRuleListResultDeserializer( + item: any, +): _LoadBalancerOutboundRuleListResult { + return { + value: outboundRuleArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Paged collection of Probe items */ +export interface _LoadBalancerProbeListResult { + /** The Probe items on this page */ + value: Probe[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _loadBalancerProbeListResultDeserializer(item: any): _LoadBalancerProbeListResult { + return { + value: probeArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Network base admin rule. */ +export interface BaseAdminRule extends ChildResource { + /** The system metadata related to this resource. */ + readonly systemData?: SystemData; + /** Whether the rule is custom or default. */ + /** The discriminator possible values: Custom, Default */ + kind: AdminRuleKind; +} + +export function baseAdminRuleSerializer(item: BaseAdminRule): any { + return { kind: item["kind"] }; +} + +export function baseAdminRuleDeserializer(item: any): BaseAdminRule { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + kind: item["kind"], + }; +} + +/** Alias for BaseAdminRuleUnion */ +export type BaseAdminRuleUnion = AdminRule | DefaultAdminRule | BaseAdminRule; + +export function baseAdminRuleUnionSerializer(item: BaseAdminRuleUnion): any { + switch (item.kind) { + case "Custom": + return adminRuleSerializer(item as AdminRule); + + case "Default": + return defaultAdminRuleSerializer(item as DefaultAdminRule); + + default: + return baseAdminRuleSerializer(item); + } +} + +export function baseAdminRuleUnionDeserializer(item: any): BaseAdminRuleUnion { + switch (item["kind"]) { + case "Custom": + return adminRuleDeserializer(item as AdminRule); + + case "Default": + return defaultAdminRuleDeserializer(item as DefaultAdminRule); + + default: + return baseAdminRuleDeserializer(item); + } +} + +/** Whether the rule is custom or default. */ +export enum KnownAdminRuleKind { + /** Custom */ + Custom = "Custom", + /** Default */ + Default = "Default", +} + +/** + * Whether the rule is custom or default. \ + * {@link KnownAdminRuleKind} can be used interchangeably with AdminRuleKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Custom**: Custom \ + * **Default**: Default + */ +export type AdminRuleKind = string; + +/** Network admin rule. */ +export interface AdminRule extends BaseAdminRule { + /** Whether the rule is custom or default. */ + kind: "Custom"; + /** A description for this rule. Restricted to 140 chars. */ + description?: string; + /** Network protocol this rule applies to. */ + protocol?: SecurityConfigurationRuleProtocol; + /** The CIDR or source IP ranges. */ + sources?: AddressPrefixItem[]; + /** The destination address prefixes. CIDR or destination IP ranges. */ + destinations?: AddressPrefixItem[]; + /** The source port ranges. */ + sourcePortRanges?: string[]; + /** The destination port ranges. */ + destinationPortRanges?: string[]; + /** Indicates the access allowed for this particular rule */ + access?: SecurityConfigurationRuleAccess; + /** The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ + priority?: number; + /** Indicates if the traffic matched against the rule in inbound or outbound. */ + direction?: SecurityConfigurationRuleDirection; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function adminRuleSerializer(item: AdminRule): any { + return { + kind: item["kind"], + properties: areAllPropsUndefined(item, [ + "description", + "protocol", + "sources", + "destinations", + "sourcePortRanges", + "destinationPortRanges", + "access", + "priority", + "direction", + ]) + ? undefined + : _adminRulePropertiesSerializer(item), + }; +} + +export function adminRuleDeserializer(item: any): AdminRule { + return { + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + kind: item["kind"], + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _adminRulePropertiesDeserializer(item["properties"])), + }; +} + +/** Network default admin rule. */ +export interface DefaultAdminRule extends BaseAdminRule { + /** Whether the rule is custom or default. */ + kind: "Default"; + /** A description for this rule. Restricted to 140 chars. */ + readonly description?: string; + /** Default rule flag. */ + flag?: string; + /** Network protocol this rule applies to. */ + readonly protocol?: SecurityConfigurationRuleProtocol; + /** The CIDR or source IP ranges. */ + readonly sources?: AddressPrefixItem[]; + /** The destination address prefixes. CIDR or destination IP ranges. */ + readonly destinations?: AddressPrefixItem[]; + /** The source port ranges. */ + readonly sourcePortRanges?: string[]; + /** The destination port ranges. */ + readonly destinationPortRanges?: string[]; + /** Indicates the access allowed for this particular rule */ + readonly access?: SecurityConfigurationRuleAccess; + /** The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ + readonly priority?: number; + /** Indicates if the traffic matched against the rule in inbound or outbound. */ + readonly direction?: SecurityConfigurationRuleDirection; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** Unique identifier for this resource. */ + readonly resourceGuid?: string; +} + +export function defaultAdminRuleSerializer(item: DefaultAdminRule): any { + return { + kind: item["kind"], + properties: areAllPropsUndefined(item, ["flag"]) + ? undefined + : _defaultAdminRulePropertiesSerializer(item), + }; +} + +export function defaultAdminRuleDeserializer(item: any): DefaultAdminRule { + return { + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + kind: item["kind"], + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _defaultAdminRulePropertiesDeserializer(item["properties"])), + }; +} + +/** Paged collection of BaseAdminRule items */ +export interface _AdminRuleListResult { + /** The BaseAdminRule items on this page */ + value: BaseAdminRuleUnion[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _adminRuleListResultDeserializer(item: any): _AdminRuleListResult { + return { + value: baseAdminRuleUnionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function baseAdminRuleUnionArraySerializer(result: Array): any[] { + return result.map((item) => { + return baseAdminRuleUnionSerializer(item); + }); +} + +export function baseAdminRuleUnionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return baseAdminRuleUnionDeserializer(item); + }); +} + +/** The network security perimeter profile resource */ +export interface NspProfile extends SecurityPerimeterProxyResource { + /** Version number that increases with every update to access rules within the profile. */ + readonly accessRulesVersion?: string; + /** Version number that increases with every update to diagnostic settings within the profile. */ + readonly diagnosticSettingsVersion?: string; +} + +export function nspProfileSerializer(item: NspProfile): any { + return { + properties: areAllPropsUndefined(item, []) ? undefined : _nspProfilePropertiesSerializer(item), + }; +} + +export function nspProfileDeserializer(item: any): NspProfile { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : securityPerimeterSystemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _nspProfilePropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of NSP profile. */ +export interface NspProfileProperties { + /** Version number that increases with every update to access rules within the profile. */ + readonly accessRulesVersion?: string; + /** Version number that increases with every update to diagnostic settings within the profile. */ + readonly diagnosticSettingsVersion?: string; +} + +export function nspProfilePropertiesSerializer(_item: NspProfileProperties): any { + return {}; +} + +export function nspProfilePropertiesDeserializer(item: any): NspProfileProperties { + return { + accessRulesVersion: item["accessRulesVersion"], + diagnosticSettingsVersion: item["diagnosticSettingsVersion"], + }; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface SecurityPerimeterProxyResource extends SecurityPerimeterResource {} + +export function securityPerimeterProxyResourceSerializer( + _item: SecurityPerimeterProxyResource, +): any { + return {}; +} + +export function securityPerimeterProxyResourceDeserializer( + item: any, +): SecurityPerimeterProxyResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : securityPerimeterSystemDataDeserializer(item["systemData"]), + }; +} + +export function nspProfileArraySerializer(result: Array): any[] { + return result.map((item) => { + return nspProfileSerializer(item); + }); +} + +export function nspProfileArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return nspProfileDeserializer(item); + }); +} + +/** The NSP access rule resource */ +export interface NspAccessRule extends SecurityPerimeterProxyResource { + /** The provisioning state of the scope assignment resource. */ + readonly provisioningState?: NspProvisioningState; + /** Direction that specifies whether the access rules is inbound/outbound. */ + direction?: AccessRuleDirection; + /** Inbound address prefixes (IPv4/IPv6) */ + addressPrefixes?: string[]; + /** Outbound rules in fully qualified domain name format. */ + fullyQualifiedDomainNames?: string[]; + /** List of subscription ids */ + subscriptions?: SubscriptionId[]; + /** Rule specified by the perimeter id. */ + readonly networkSecurityPerimeters?: PerimeterBasedAccessRule[]; + /** Outbound rules in email address format. This access rule type is currently unavailable for use. */ + emailAddresses?: string[]; + /** Outbound rules in phone number format. This access rule type is currently unavailable for use. */ + phoneNumbers?: string[]; + /** Inbound rules of type service tag. This access rule type is currently unavailable for use. */ + serviceTags?: string[]; +} + +export function nspAccessRuleSerializer(item: NspAccessRule): any { + return { + properties: areAllPropsUndefined(item, [ + "direction", + "addressPrefixes", + "fullyQualifiedDomainNames", + "subscriptions", + "emailAddresses", + "phoneNumbers", + "serviceTags", + ]) + ? undefined + : _nspAccessRulePropertiesSerializer(item), + }; +} + +export function nspAccessRuleDeserializer(item: any): NspAccessRule { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : securityPerimeterSystemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _nspAccessRulePropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of NSP access rule. */ +export interface NspAccessRuleProperties { + /** The provisioning state of the scope assignment resource. */ + readonly provisioningState?: NspProvisioningState; + /** Direction that specifies whether the access rules is inbound/outbound. */ + direction?: AccessRuleDirection; + /** Inbound address prefixes (IPv4/IPv6) */ + addressPrefixes?: string[]; + /** Outbound rules in fully qualified domain name format. */ + fullyQualifiedDomainNames?: string[]; + /** List of subscription ids */ + subscriptions?: SubscriptionId[]; + /** Rule specified by the perimeter id. */ + readonly networkSecurityPerimeters?: PerimeterBasedAccessRule[]; + /** Outbound rules in email address format. This access rule type is currently unavailable for use. */ + emailAddresses?: string[]; + /** Outbound rules in phone number format. This access rule type is currently unavailable for use. */ + phoneNumbers?: string[]; + /** Inbound rules of type service tag. This access rule type is currently unavailable for use. */ + serviceTags?: string[]; +} + +export function nspAccessRulePropertiesSerializer(item: NspAccessRuleProperties): any { + return { + direction: item["direction"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + fullyQualifiedDomainNames: !item["fullyQualifiedDomainNames"] + ? item["fullyQualifiedDomainNames"] + : item["fullyQualifiedDomainNames"].map((p: any) => { + return p; + }), + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : subscriptionIdArraySerializer(item["subscriptions"]), + emailAddresses: !item["emailAddresses"] + ? item["emailAddresses"] + : item["emailAddresses"].map((p: any) => { + return p; + }), + phoneNumbers: !item["phoneNumbers"] + ? item["phoneNumbers"] + : item["phoneNumbers"].map((p: any) => { + return p; + }), + serviceTags: !item["serviceTags"] + ? item["serviceTags"] + : item["serviceTags"].map((p: any) => { + return p; + }), + }; +} + +export function nspAccessRulePropertiesDeserializer(item: any): NspAccessRuleProperties { + return { + provisioningState: item["provisioningState"], + direction: item["direction"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + fullyQualifiedDomainNames: !item["fullyQualifiedDomainNames"] + ? item["fullyQualifiedDomainNames"] + : item["fullyQualifiedDomainNames"].map((p: any) => { + return p; + }), + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : subscriptionIdArrayDeserializer(item["subscriptions"]), + networkSecurityPerimeters: !item["networkSecurityPerimeters"] + ? item["networkSecurityPerimeters"] + : perimeterBasedAccessRuleArrayDeserializer(item["networkSecurityPerimeters"]), + emailAddresses: !item["emailAddresses"] + ? item["emailAddresses"] + : item["emailAddresses"].map((p: any) => { + return p; + }), + phoneNumbers: !item["phoneNumbers"] + ? item["phoneNumbers"] + : item["phoneNumbers"].map((p: any) => { + return p; + }), + serviceTags: !item["serviceTags"] + ? item["serviceTags"] + : item["serviceTags"].map((p: any) => { + return p; + }), + }; +} + +/** Direction that specifies whether the access rules is inbound/outbound. */ +export enum KnownAccessRuleDirection { + /** Inbound */ + Inbound = "Inbound", + /** Outbound */ + Outbound = "Outbound", +} + +/** + * Direction that specifies whether the access rules is inbound/outbound. \ + * {@link KnownAccessRuleDirection} can be used interchangeably with AccessRuleDirection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inbound**: Inbound \ + * **Outbound**: Outbound + */ +export type AccessRuleDirection = string; + +export function subscriptionIdArraySerializer(result: Array): any[] { + return result.map((item) => { + return subscriptionIdSerializer(item); + }); +} + +export function subscriptionIdArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return subscriptionIdDeserializer(item); + }); +} + +/** model interface SubscriptionId */ +export interface SubscriptionId { + /** Subscription id in the ARM id format. */ + id?: string; +} + +export function subscriptionIdSerializer(item: SubscriptionId): any { + return { id: item["id"] }; +} + +export function subscriptionIdDeserializer(item: any): SubscriptionId { + return { + id: item["id"], + }; +} + +export function perimeterBasedAccessRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return perimeterBasedAccessRuleDeserializer(item); + }); +} + +/** model interface PerimeterBasedAccessRule */ +export interface PerimeterBasedAccessRule { + /** NSP id in the ARM id format. */ + readonly id?: string; + /** Resource guid of the NSP supplied. */ + readonly perimeterGuid?: string; + /** Location of the NSP supplied. */ + readonly location?: string; +} + +export function perimeterBasedAccessRuleDeserializer(item: any): PerimeterBasedAccessRule { + return { + id: item["id"], + perimeterGuid: item["perimeterGuid"], + location: item["location"], + }; +} + +export function nspAccessRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return nspAccessRuleSerializer(item); + }); +} + +export function nspAccessRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return nspAccessRuleDeserializer(item); + }); +} + +/** The NSP resource association resource */ +export interface NspAssociation extends SecurityPerimeterProxyResource { + /** The provisioning state of the resource association resource. */ + readonly provisioningState?: NspProvisioningState; + /** The PaaS resource to be associated. */ + privateLinkResource?: SubResource; + /** Profile id to which the PaaS resource is associated. */ + profile?: SubResource; + /** Access mode on the association. */ + accessMode?: AssociationAccessMode; + /** Specifies if there are provisioning issues */ + readonly hasProvisioningIssues?: string; +} + +export function nspAssociationSerializer(item: NspAssociation): any { + return { + properties: areAllPropsUndefined(item, ["privateLinkResource", "profile", "accessMode"]) + ? undefined + : _nspAssociationPropertiesSerializer(item), + }; +} + +export function nspAssociationDeserializer(item: any): NspAssociation { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : securityPerimeterSystemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _nspAssociationPropertiesDeserializer(item["properties"])), + }; +} + +/** model interface NspAssociationProperties */ +export interface NspAssociationProperties { + /** The provisioning state of the resource association resource. */ + readonly provisioningState?: NspProvisioningState; + /** The PaaS resource to be associated. */ + privateLinkResource?: SubResource; + /** Profile id to which the PaaS resource is associated. */ + profile?: SubResource; + /** Access mode on the association. */ + accessMode?: AssociationAccessMode; + /** Specifies if there are provisioning issues */ + readonly hasProvisioningIssues?: string; +} + +export function nspAssociationPropertiesSerializer(item: NspAssociationProperties): any { + return { + privateLinkResource: !item["privateLinkResource"] + ? item["privateLinkResource"] + : subResourceSerializer(item["privateLinkResource"]), + profile: !item["profile"] ? item["profile"] : subResourceSerializer(item["profile"]), + accessMode: item["accessMode"], + }; +} + +export function nspAssociationPropertiesDeserializer(item: any): NspAssociationProperties { + return { + provisioningState: item["provisioningState"], + privateLinkResource: !item["privateLinkResource"] + ? item["privateLinkResource"] + : subResourceDeserializer(item["privateLinkResource"]), + profile: !item["profile"] ? item["profile"] : subResourceDeserializer(item["profile"]), + accessMode: item["accessMode"], + hasProvisioningIssues: item["hasProvisioningIssues"], + }; +} + +/** Access mode on the association. */ +export enum KnownAssociationAccessMode { + /** Learning */ + Learning = "Learning", + /** Enforced */ + Enforced = "Enforced", + /** Audit */ + Audit = "Audit", +} + +/** + * Access mode on the association. \ + * {@link KnownAssociationAccessMode} can be used interchangeably with AssociationAccessMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Learning**: Learning \ + * **Enforced**: Enforced \ + * **Audit**: Audit + */ +export type AssociationAccessMode = string; + +/** Paged collection of NspAssociation items */ +export interface _NspAssociationsListResult { + /** The NspAssociation items on this page */ + value: NspAssociation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _nspAssociationsListResultDeserializer(item: any): _NspAssociationsListResult { + return { + value: nspAssociationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function nspAssociationArraySerializer(result: Array): any[] { + return result.map((item) => { + return nspAssociationSerializer(item); + }); +} + +export function nspAssociationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return nspAssociationDeserializer(item); + }); +} + +/** The network security perimeter link resource */ +export interface NspLink extends SecurityPerimeterProxyResource { + /** The provisioning state of the NSP Link resource. */ + readonly provisioningState?: NspLinkProvisioningState; + /** Perimeter ARM Id for the remote NSP with which the link gets created in Auto-approval mode. It should be used when the NSP admin have Microsoft.Network/networkSecurityPerimeters/linkPerimeter/action permission on the remote NSP resource. */ + autoApprovedRemotePerimeterResourceId?: string; + /** Remote NSP Guid with which the link gets created. */ + readonly remotePerimeterGuid?: string; + /** Remote NSP location with which the link gets created. */ + readonly remotePerimeterLocation?: string; + /** Local Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. */ + localInboundProfiles?: string[]; + /** Local Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it. */ + readonly localOutboundProfiles?: string[]; + /** Remote Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. This property can only be updated in auto-approval mode. */ + remoteInboundProfiles?: string[]; + /** Remote Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it. */ + readonly remoteOutboundProfiles?: string[]; + /** A message passed to the owner of the remote NSP link resource with this connection request. In case of Auto-approved flow, it is default to 'Auto Approved'. Restricted to 140 chars. */ + description?: string; + /** The NSP link state. */ + readonly status?: NspLinkStatus; +} + +export function nspLinkSerializer(item: NspLink): any { + return { + properties: areAllPropsUndefined(item, [ + "autoApprovedRemotePerimeterResourceId", + "localInboundProfiles", + "remoteInboundProfiles", + "description", + ]) + ? undefined + : _nspLinkPropertiesSerializer(item), + }; +} + +export function nspLinkDeserializer(item: any): NspLink { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : securityPerimeterSystemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _nspLinkPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of NSP Link resource. */ +export interface NspLinkProperties { + /** The provisioning state of the NSP Link resource. */ + readonly provisioningState?: NspLinkProvisioningState; + /** Perimeter ARM Id for the remote NSP with which the link gets created in Auto-approval mode. It should be used when the NSP admin have Microsoft.Network/networkSecurityPerimeters/linkPerimeter/action permission on the remote NSP resource. */ + autoApprovedRemotePerimeterResourceId?: string; + /** Remote NSP Guid with which the link gets created. */ + readonly remotePerimeterGuid?: string; + /** Remote NSP location with which the link gets created. */ + readonly remotePerimeterLocation?: string; + /** Local Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. */ + localInboundProfiles?: string[]; + /** Local Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it. */ + readonly localOutboundProfiles?: string[]; + /** Remote Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. This property can only be updated in auto-approval mode. */ + remoteInboundProfiles?: string[]; + /** Remote Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it. */ + readonly remoteOutboundProfiles?: string[]; + /** A message passed to the owner of the remote NSP link resource with this connection request. In case of Auto-approved flow, it is default to 'Auto Approved'. Restricted to 140 chars. */ + description?: string; + /** The NSP link state. */ + readonly status?: NspLinkStatus; +} + +export function nspLinkPropertiesSerializer(item: NspLinkProperties): any { + return { + autoApprovedRemotePerimeterResourceId: item["autoApprovedRemotePerimeterResourceId"], + localInboundProfiles: !item["localInboundProfiles"] + ? item["localInboundProfiles"] + : item["localInboundProfiles"].map((p: any) => { + return p; + }), + remoteInboundProfiles: !item["remoteInboundProfiles"] + ? item["remoteInboundProfiles"] + : item["remoteInboundProfiles"].map((p: any) => { + return p; + }), + description: item["description"], + }; +} + +export function nspLinkPropertiesDeserializer(item: any): NspLinkProperties { + return { + provisioningState: item["provisioningState"], + autoApprovedRemotePerimeterResourceId: item["autoApprovedRemotePerimeterResourceId"], + remotePerimeterGuid: item["remotePerimeterGuid"], + remotePerimeterLocation: item["remotePerimeterLocation"], + localInboundProfiles: !item["localInboundProfiles"] + ? item["localInboundProfiles"] + : item["localInboundProfiles"].map((p: any) => { + return p; + }), + localOutboundProfiles: !item["localOutboundProfiles"] + ? item["localOutboundProfiles"] + : item["localOutboundProfiles"].map((p: any) => { + return p; + }), + remoteInboundProfiles: !item["remoteInboundProfiles"] + ? item["remoteInboundProfiles"] + : item["remoteInboundProfiles"].map((p: any) => { + return p; + }), + remoteOutboundProfiles: !item["remoteOutboundProfiles"] + ? item["remoteOutboundProfiles"] + : item["remoteOutboundProfiles"].map((p: any) => { + return p; + }), + description: item["description"], + status: item["status"], + }; +} + +/** The current provisioning state of NSP Link/LinkReference. */ +export enum KnownNspLinkProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Accepted */ + Accepted = "Accepted", + /** Failed */ + Failed = "Failed", + /** WaitForRemoteCompletion */ + WaitForRemoteCompletion = "WaitForRemoteCompletion", +} + +/** + * The current provisioning state of NSP Link/LinkReference. \ + * {@link KnownNspLinkProvisioningState} can be used interchangeably with NspLinkProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Succeeded \ + * **Creating**: Creating \ + * **Updating**: Updating \ + * **Deleting**: Deleting \ + * **Accepted**: Accepted \ + * **Failed**: Failed \ + * **WaitForRemoteCompletion**: WaitForRemoteCompletion + */ +export type NspLinkProvisioningState = string; + +/** The NSP link state. */ +export enum KnownNspLinkStatus { + /** Approved */ + Approved = "Approved", + /** Pending */ + Pending = "Pending", + /** Rejected */ + Rejected = "Rejected", + /** Disconnected */ + Disconnected = "Disconnected", +} + +/** + * The NSP link state. \ + * {@link KnownNspLinkStatus} can be used interchangeably with NspLinkStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Approved**: Approved \ + * **Pending**: Pending \ + * **Rejected**: Rejected \ + * **Disconnected**: Disconnected + */ +export type NspLinkStatus = string; + +export function nspLinkArraySerializer(result: Array): any[] { + return result.map((item) => { + return nspLinkSerializer(item); + }); +} + +export function nspLinkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return nspLinkDeserializer(item); + }); +} + +/** The network security perimeter linkReference resource */ +export interface NspLinkReference extends SecurityPerimeterProxyResource { + /** The provisioning state of the NSP LinkReference resource. */ + readonly provisioningState?: NspLinkProvisioningState; + /** Perimeter ARM Id for the remote NSP with which the link is created. */ + readonly remotePerimeterResourceId?: string; + /** Remote NSP Guid with which the link is created. */ + readonly remotePerimeterGuid?: string; + /** Remote NSP location with which the link gets created. */ + readonly remotePerimeterLocation?: string; + /** Local Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. */ + localInboundProfiles?: string[]; + /** Local Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it. */ + readonly localOutboundProfiles?: string[]; + /** Remote Inbound profile names to which Inbound is allowed. ['*'] value implies inbound is allowed to all profiles at remote perimeter. This property can only be updated from corresponding link resource present in remote perimeter. */ + readonly remoteInboundProfiles?: string[]; + /** Remote Outbound profile names from which Outbound is allowed. ['*'] value implies outbound is allowed from all profiles at remote perimeter. This property can only be updated from corresponding link resource present in remote perimeter. */ + readonly remoteOutboundProfiles?: string[]; + /** A message sent by the remote NSP link admin for connection request. In case of Auto-approved flow, it is default to 'Auto Approved'. */ + readonly description?: string; + /** The NSP linkReference state. It cannot be changed if link is created in auto-approval mode. */ + status?: NspLinkStatus; +} + +export function nspLinkReferenceDeserializer(item: any): NspLinkReference { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : securityPerimeterSystemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _nspLinkReferencePropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of NSP LinkReference resource. */ +export interface NspLinkReferenceProperties { + /** The provisioning state of the NSP LinkReference resource. */ + readonly provisioningState?: NspLinkProvisioningState; + /** Perimeter ARM Id for the remote NSP with which the link is created. */ + readonly remotePerimeterResourceId?: string; + /** Remote NSP Guid with which the link is created. */ + readonly remotePerimeterGuid?: string; + /** Remote NSP location with which the link gets created. */ + readonly remotePerimeterLocation?: string; + /** Local Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. */ + localInboundProfiles?: string[]; + /** Local Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it. */ + readonly localOutboundProfiles?: string[]; + /** Remote Inbound profile names to which Inbound is allowed. ['*'] value implies inbound is allowed to all profiles at remote perimeter. This property can only be updated from corresponding link resource present in remote perimeter. */ + readonly remoteInboundProfiles?: string[]; + /** Remote Outbound profile names from which Outbound is allowed. ['*'] value implies outbound is allowed from all profiles at remote perimeter. This property can only be updated from corresponding link resource present in remote perimeter. */ + readonly remoteOutboundProfiles?: string[]; + /** A message sent by the remote NSP link admin for connection request. In case of Auto-approved flow, it is default to 'Auto Approved'. */ + readonly description?: string; + /** The NSP linkReference state. It cannot be changed if link is created in auto-approval mode. */ + status?: NspLinkStatus; +} + +export function nspLinkReferencePropertiesDeserializer(item: any): NspLinkReferenceProperties { + return { + provisioningState: item["provisioningState"], + remotePerimeterResourceId: item["remotePerimeterResourceId"], + remotePerimeterGuid: item["remotePerimeterGuid"], + remotePerimeterLocation: item["remotePerimeterLocation"], + localInboundProfiles: !item["localInboundProfiles"] + ? item["localInboundProfiles"] + : item["localInboundProfiles"].map((p: any) => { + return p; + }), + localOutboundProfiles: !item["localOutboundProfiles"] + ? item["localOutboundProfiles"] + : item["localOutboundProfiles"].map((p: any) => { + return p; + }), + remoteInboundProfiles: !item["remoteInboundProfiles"] + ? item["remoteInboundProfiles"] + : item["remoteInboundProfiles"].map((p: any) => { + return p; + }), + remoteOutboundProfiles: !item["remoteOutboundProfiles"] + ? item["remoteOutboundProfiles"] + : item["remoteOutboundProfiles"].map((p: any) => { + return p; + }), + description: item["description"], + status: item["status"], + }; +} + +export function nspLinkReferenceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return nspLinkReferenceDeserializer(item); + }); +} + +/** The NSP logging configuration */ +export interface NspLoggingConfiguration extends SecurityPerimeterProxyResource { + /** The log categories to enable in the NSP logging configuration. */ + enabledLogCategories?: string[]; + /** The version of the NSP logging configuration. */ + version?: string; +} + +export function nspLoggingConfigurationSerializer(item: NspLoggingConfiguration): any { + return { + properties: areAllPropsUndefined(item, ["enabledLogCategories", "version"]) + ? undefined + : _nspLoggingConfigurationPropertiesSerializer(item), + }; +} + +export function nspLoggingConfigurationDeserializer(item: any): NspLoggingConfiguration { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : securityPerimeterSystemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _nspLoggingConfigurationPropertiesDeserializer(item["properties"])), + }; +} + +/** The NSP logging configuration properties. */ +export interface NspLoggingConfigurationProperties { + /** The log categories to enable in the NSP logging configuration. */ + enabledLogCategories?: string[]; + /** The version of the NSP logging configuration. */ + version?: string; +} + +export function nspLoggingConfigurationPropertiesSerializer( + item: NspLoggingConfigurationProperties, +): any { + return { + enabledLogCategories: !item["enabledLogCategories"] + ? item["enabledLogCategories"] + : item["enabledLogCategories"].map((p: any) => { + return p; + }), + version: item["version"], + }; +} + +export function nspLoggingConfigurationPropertiesDeserializer( + item: any, +): NspLoggingConfigurationProperties { + return { + enabledLogCategories: !item["enabledLogCategories"] + ? item["enabledLogCategories"] + : item["enabledLogCategories"].map((p: any) => { + return p; + }), + version: item["version"], + }; +} + +export function nspLoggingConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return nspLoggingConfigurationSerializer(item); + }); +} + +export function nspLoggingConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return nspLoggingConfigurationDeserializer(item); + }); +} + +/** Definition of the NetworkVirtualApplianceSkus resource. */ +export interface NetworkVirtualApplianceSku extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Network Virtual Appliance Sku vendor. */ + readonly vendor?: string; + /** Available Network Virtual Appliance versions. */ + readonly availableVersions?: string[]; + /** The list of scale units available. */ + availableScaleUnits?: NetworkVirtualApplianceSkuInstances[]; +} + +export function networkVirtualApplianceSkuDeserializer(item: any): NetworkVirtualApplianceSku { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _networkVirtualApplianceSkuPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties specific to NetworkVirtualApplianceSkus. */ +export interface NetworkVirtualApplianceSkuPropertiesFormat { + /** Network Virtual Appliance Sku vendor. */ + readonly vendor?: string; + /** Available Network Virtual Appliance versions. */ + readonly availableVersions?: string[]; + /** The list of scale units available. */ + availableScaleUnits?: NetworkVirtualApplianceSkuInstances[]; +} + +export function networkVirtualApplianceSkuPropertiesFormatDeserializer( + item: any, +): NetworkVirtualApplianceSkuPropertiesFormat { + return { + vendor: item["vendor"], + availableVersions: !item["availableVersions"] + ? item["availableVersions"] + : item["availableVersions"].map((p: any) => { + return p; + }), + availableScaleUnits: !item["availableScaleUnits"] + ? item["availableScaleUnits"] + : networkVirtualApplianceSkuInstancesArrayDeserializer(item["availableScaleUnits"]), + }; +} + +export function networkVirtualApplianceSkuInstancesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkVirtualApplianceSkuInstancesDeserializer(item); + }); +} + +/** List of available Sku and instances. */ +export interface NetworkVirtualApplianceSkuInstances { + /** Scale Unit. */ + readonly scaleUnit?: string; + /** Instance Count. */ + readonly instanceCount?: number; +} + +export function networkVirtualApplianceSkuInstancesDeserializer( + item: any, +): NetworkVirtualApplianceSkuInstances { + return { + scaleUnit: item["scaleUnit"], + instanceCount: item["instanceCount"], + }; +} + +export function networkVirtualApplianceSkuArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkVirtualApplianceSkuDeserializer(item); + }); +} + +/** NVA Inbound Security Rule resource. */ +export interface InboundSecurityRule extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates NSG rule and SLB LB Rule. */ + ruleType?: InboundSecurityRuleType; + /** List of allowed rules. */ + rules?: InboundSecurityRules[]; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function inboundSecurityRuleSerializer(item: InboundSecurityRule): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["ruleType", "rules"]) + ? undefined + : _inboundSecurityRulePropertiesSerializer(item), + }; +} + +export function inboundSecurityRuleDeserializer(item: any): InboundSecurityRule { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _inboundSecurityRulePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the Inbound Security Rules resource. */ +export interface InboundSecurityRuleProperties { + /** Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates NSG rule and SLB LB Rule. */ + ruleType?: InboundSecurityRuleType; + /** List of allowed rules. */ + rules?: InboundSecurityRules[]; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function inboundSecurityRulePropertiesSerializer(item: InboundSecurityRuleProperties): any { + return { + ruleType: item["ruleType"], + rules: !item["rules"] ? item["rules"] : inboundSecurityRulesArraySerializer(item["rules"]), + }; +} + +export function inboundSecurityRulePropertiesDeserializer( + item: any, +): InboundSecurityRuleProperties { + return { + ruleType: item["ruleType"], + rules: !item["rules"] ? item["rules"] : inboundSecurityRulesArrayDeserializer(item["rules"]), + provisioningState: item["provisioningState"], + }; +} + +/** Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates NSG rule and SLB LB Rule. */ +export enum KnownInboundSecurityRuleType { + /** AutoExpire */ + AutoExpire = "AutoExpire", + /** Permanent */ + Permanent = "Permanent", +} + +/** + * Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates NSG rule and SLB LB Rule. \ + * {@link KnownInboundSecurityRuleType} can be used interchangeably with InboundSecurityRuleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AutoExpire**: AutoExpire \ + * **Permanent**: Permanent + */ +export type InboundSecurityRuleType = string; + +export function inboundSecurityRulesArraySerializer(result: Array): any[] { + return result.map((item) => { + return inboundSecurityRulesSerializer(item); + }); +} + +export function inboundSecurityRulesArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return inboundSecurityRulesDeserializer(item); + }); +} + +/** Properties of the Inbound Security Rules resource. */ +export interface InboundSecurityRules { + /** Name of the rule. */ + name?: string; + /** Protocol. This should be either TCP or UDP. */ + protocol?: InboundSecurityRulesProtocol; + /** The CIDR or source IP range. */ + sourceAddressPrefix?: string; + /** NVA port ranges to be opened up. One needs to provide specific ports. */ + destinationPortRange?: number; + /** NVA port ranges to be opened up. One can provide a range of ports. Allowed port value between 0 and 65535. */ + destinationPortRanges?: string[]; + /** Public IP name in case of Permanent Rule type & Interface Name in case of Auto Expire Rule type */ + appliesOn?: string[]; +} + +export function inboundSecurityRulesSerializer(item: InboundSecurityRules): any { + return { + name: item["name"], + protocol: item["protocol"], + sourceAddressPrefix: item["sourceAddressPrefix"], + destinationPortRange: item["destinationPortRange"], + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + appliesOn: !item["appliesOn"] + ? item["appliesOn"] + : item["appliesOn"].map((p: any) => { + return p; + }), + }; +} + +export function inboundSecurityRulesDeserializer(item: any): InboundSecurityRules { + return { + name: item["name"], + protocol: item["protocol"], + sourceAddressPrefix: item["sourceAddressPrefix"], + destinationPortRange: item["destinationPortRange"], + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + appliesOn: !item["appliesOn"] + ? item["appliesOn"] + : item["appliesOn"].map((p: any) => { + return p; + }), + }; +} + +/** Protocol. This should be either TCP or UDP. */ +export enum KnownInboundSecurityRulesProtocol { + /** TCP */ + TCP = "TCP", + /** UDP */ + UDP = "UDP", +} + +/** + * Protocol. This should be either TCP or UDP. \ + * {@link KnownInboundSecurityRulesProtocol} can be used interchangeably with InboundSecurityRulesProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TCP**: TCP \ + * **UDP**: UDP + */ +export type InboundSecurityRulesProtocol = string; + +/** Parameters that define the create packet capture operation. */ +export interface PacketCapture { + /** The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported. */ + target: string; + /** A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS. */ + scope?: PacketCaptureMachineScope; + /** Target type of the resource provided. */ + targetType?: PacketCaptureTargetType; + /** Number of bytes captured per packet, the remaining bytes are truncated. */ + bytesToCapturePerPacket?: number; + /** Maximum size of the capture output. */ + totalBytesPerSession?: number; + /** Maximum duration of the capture session in seconds. */ + timeLimitInSeconds?: number; + /** The storage location for a packet capture session. */ + storageLocation: PacketCaptureStorageLocation; + /** A list of packet capture filters. */ + filters?: PacketCaptureFilter[]; + /** This continuous capture is a nullable boolean, which can hold 'null', 'true' or 'false' value. If we do not pass this parameter, it would be consider as 'null', default value is 'null'. */ + continuousCapture?: boolean; + /** The capture setting holds the 'FileCount', 'FileSizeInBytes', 'SessionTimeLimitInSeconds' values. */ + captureSettings?: PacketCaptureSettings; +} + +export function packetCaptureSerializer(item: PacketCapture): any { + return { properties: _packetCapturePropertiesSerializer(item) }; +} + +/** Parameters that define the create packet capture operation. */ +export interface PacketCaptureParameters { + /** The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported. */ + target: string; + /** A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS. */ + scope?: PacketCaptureMachineScope; + /** Target type of the resource provided. */ + targetType?: PacketCaptureTargetType; + /** Number of bytes captured per packet, the remaining bytes are truncated. */ + bytesToCapturePerPacket?: number; + /** Maximum size of the capture output. */ + totalBytesPerSession?: number; + /** Maximum duration of the capture session in seconds. */ + timeLimitInSeconds?: number; + /** The storage location for a packet capture session. */ + storageLocation: PacketCaptureStorageLocation; + /** A list of packet capture filters. */ + filters?: PacketCaptureFilter[]; + /** This continuous capture is a nullable boolean, which can hold 'null', 'true' or 'false' value. If we do not pass this parameter, it would be consider as 'null', default value is 'null'. */ + continuousCapture?: boolean; + /** The capture setting holds the 'FileCount', 'FileSizeInBytes', 'SessionTimeLimitInSeconds' values. */ + captureSettings?: PacketCaptureSettings; +} + +export function packetCaptureParametersSerializer(item: PacketCaptureParameters): any { + return { + target: item["target"], + scope: !item["scope"] ? item["scope"] : packetCaptureMachineScopeSerializer(item["scope"]), + targetType: item["targetType"], + bytesToCapturePerPacket: item["bytesToCapturePerPacket"], + totalBytesPerSession: item["totalBytesPerSession"], + timeLimitInSeconds: item["timeLimitInSeconds"], + storageLocation: packetCaptureStorageLocationSerializer(item["storageLocation"]), + filters: !item["filters"] + ? item["filters"] + : packetCaptureFilterArraySerializer(item["filters"]), + continuousCapture: item["continuousCapture"], + captureSettings: !item["captureSettings"] + ? item["captureSettings"] + : packetCaptureSettingsSerializer(item["captureSettings"]), + }; +} + +export function packetCaptureParametersDeserializer(item: any): PacketCaptureParameters { + return { + target: item["target"], + scope: !item["scope"] ? item["scope"] : packetCaptureMachineScopeDeserializer(item["scope"]), + targetType: item["targetType"], + bytesToCapturePerPacket: item["bytesToCapturePerPacket"], + totalBytesPerSession: item["totalBytesPerSession"], + timeLimitInSeconds: item["timeLimitInSeconds"], + storageLocation: packetCaptureStorageLocationDeserializer(item["storageLocation"]), + filters: !item["filters"] + ? item["filters"] + : packetCaptureFilterArrayDeserializer(item["filters"]), + continuousCapture: item["continuousCapture"], + captureSettings: !item["captureSettings"] + ? item["captureSettings"] + : packetCaptureSettingsDeserializer(item["captureSettings"]), + }; +} + +/** A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS. */ +export interface PacketCaptureMachineScope { + /** List of AzureVMSS instances to run packet capture on. */ + include?: string[]; + /** List of AzureVMSS instances which has to be excluded from the AzureVMSS from running packet capture. */ + exclude?: string[]; +} + +export function packetCaptureMachineScopeSerializer(item: PacketCaptureMachineScope): any { + return { + include: !item["include"] + ? item["include"] + : item["include"].map((p: any) => { + return p; + }), + exclude: !item["exclude"] + ? item["exclude"] + : item["exclude"].map((p: any) => { + return p; + }), + }; +} + +export function packetCaptureMachineScopeDeserializer(item: any): PacketCaptureMachineScope { + return { + include: !item["include"] + ? item["include"] + : item["include"].map((p: any) => { + return p; + }), + exclude: !item["exclude"] + ? item["exclude"] + : item["exclude"].map((p: any) => { + return p; + }), + }; +} + +/** Target type of the resource provided. */ +export type PacketCaptureTargetType = "AzureVM" | "AzureVMSS"; + +/** The storage location for a packet capture session. */ +export interface PacketCaptureStorageLocation { + /** The ID of the storage account to save the packet capture session. Required if no localPath or filePath is provided. */ + storageId?: string; + /** The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. */ + storagePath?: string; + /** This path is invalid if 'Continuous Capture' is provided with 'true' or 'false'. A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. */ + filePath?: string; + /** This path is valid if 'Continuous Capture' is provided with 'true' or 'false' and required if no storage ID is provided, otherwise optional. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. */ + localPath?: string; +} + +export function packetCaptureStorageLocationSerializer(item: PacketCaptureStorageLocation): any { + return { + storageId: item["storageId"], + storagePath: item["storagePath"], + filePath: item["filePath"], + localPath: item["localPath"], + }; +} + +export function packetCaptureStorageLocationDeserializer(item: any): PacketCaptureStorageLocation { + return { + storageId: item["storageId"], + storagePath: item["storagePath"], + filePath: item["filePath"], + localPath: item["localPath"], + }; +} + +export function packetCaptureFilterArraySerializer(result: Array): any[] { + return result.map((item) => { + return packetCaptureFilterSerializer(item); + }); +} + +export function packetCaptureFilterArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return packetCaptureFilterDeserializer(item); + }); +} + +/** Filter that is applied to packet capture request. Multiple filters can be applied. */ +export interface PacketCaptureFilter { + /** Protocol to be filtered on. */ + protocol?: PcProtocol; + /** Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. */ + localIPAddress?: string; + /** Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. */ + remoteIPAddress?: string; + /** Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. */ + localPort?: string; + /** Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. */ + remotePort?: string; +} + +export function packetCaptureFilterSerializer(item: PacketCaptureFilter): any { + return { + protocol: item["protocol"], + localIPAddress: item["localIPAddress"], + remoteIPAddress: item["remoteIPAddress"], + localPort: item["localPort"], + remotePort: item["remotePort"], + }; +} + +export function packetCaptureFilterDeserializer(item: any): PacketCaptureFilter { + return { + protocol: item["protocol"], + localIPAddress: item["localIPAddress"], + remoteIPAddress: item["remoteIPAddress"], + localPort: item["localPort"], + remotePort: item["remotePort"], + }; +} + +/** Protocol to be filtered on. */ +export enum KnownPcProtocol { + /** TCP */ + TCP = "TCP", + /** UDP */ + UDP = "UDP", + /** Any */ + Any = "Any", +} + +/** + * Protocol to be filtered on. \ + * {@link KnownPcProtocol} can be used interchangeably with PcProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TCP**: TCP \ + * **UDP**: UDP \ + * **Any**: Any + */ +export type PcProtocol = string; + +/** The storage location for a packet capture session. */ +export interface PacketCaptureSettings { + /** Number of file count. Default value of count is 10 and maximum number is 10000. */ + fileCount?: number; + /** Number of bytes captured per packet. Default value in bytes 104857600 (100MB) and maximum in bytes 4294967295 (4GB). */ + fileSizeInBytes?: number; + /** Maximum duration of the capture session in seconds is 604800s (7 days) for a file. Default value in second 86400s (1 day). */ + sessionTimeLimitInSeconds?: number; +} + +export function packetCaptureSettingsSerializer(item: PacketCaptureSettings): any { + return { + fileCount: item["fileCount"], + fileSizeInBytes: item["fileSizeInBytes"], + sessionTimeLimitInSeconds: item["sessionTimeLimitInSeconds"], + }; +} + +export function packetCaptureSettingsDeserializer(item: any): PacketCaptureSettings { + return { + fileCount: item["fileCount"], + fileSizeInBytes: item["fileSizeInBytes"], + sessionTimeLimitInSeconds: item["sessionTimeLimitInSeconds"], + }; +} + +/** Information about packet capture session. */ +export interface PacketCaptureResult { + /** Name of the packet capture session. */ + readonly name?: string; + /** ID of the packet capture operation. */ + readonly id?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported. */ + target?: string; + /** A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS. */ + scope?: PacketCaptureMachineScope; + /** Target type of the resource provided. */ + targetType?: PacketCaptureTargetType; + /** Number of bytes captured per packet, the remaining bytes are truncated. */ + bytesToCapturePerPacket?: number; + /** Maximum size of the capture output. */ + totalBytesPerSession?: number; + /** Maximum duration of the capture session in seconds. */ + timeLimitInSeconds?: number; + /** The storage location for a packet capture session. */ + storageLocation?: PacketCaptureStorageLocation; + /** A list of packet capture filters. */ + filters?: PacketCaptureFilter[]; + /** This continuous capture is a nullable boolean, which can hold 'null', 'true' or 'false' value. If we do not pass this parameter, it would be consider as 'null', default value is 'null'. */ + continuousCapture?: boolean; + /** The capture setting holds the 'FileCount', 'FileSizeInBytes', 'SessionTimeLimitInSeconds' values. */ + captureSettings?: PacketCaptureSettings; + /** The provisioning state of the packet capture session. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function packetCaptureResultDeserializer(item: any): PacketCaptureResult { + return { + name: item["name"], + id: item["id"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _packetCaptureResultPropertiesDeserializer(item["properties"])), + }; +} + +/** The properties of a packet capture session. */ +export interface PacketCaptureResultProperties extends PacketCaptureParameters { + /** The provisioning state of the packet capture session. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function packetCaptureResultPropertiesDeserializer( + item: any, +): PacketCaptureResultProperties { + return { + target: item["target"], + scope: !item["scope"] ? item["scope"] : packetCaptureMachineScopeDeserializer(item["scope"]), + targetType: item["targetType"], + bytesToCapturePerPacket: item["bytesToCapturePerPacket"], + totalBytesPerSession: item["totalBytesPerSession"], + timeLimitInSeconds: item["timeLimitInSeconds"], + storageLocation: packetCaptureStorageLocationDeserializer(item["storageLocation"]), + filters: !item["filters"] + ? item["filters"] + : packetCaptureFilterArrayDeserializer(item["filters"]), + continuousCapture: item["continuousCapture"], + captureSettings: !item["captureSettings"] + ? item["captureSettings"] + : packetCaptureSettingsDeserializer(item["captureSettings"]), + provisioningState: item["provisioningState"], + }; +} + +/** Status of packet capture session. */ +export interface PacketCaptureQueryStatusResult { + /** The name of the packet capture resource. */ + name?: string; + /** The ID of the packet capture resource. */ + id?: string; + /** The start time of the packet capture session. */ + captureStartTime?: Date; + /** The status of the packet capture session. */ + packetCaptureStatus?: PcStatus; + /** The reason the current packet capture session was stopped. */ + stopReason?: string; + /** List of errors of packet capture session. */ + packetCaptureError?: PcError[]; +} + +export function packetCaptureQueryStatusResultDeserializer( + item: any, +): PacketCaptureQueryStatusResult { + return { + name: item["name"], + id: item["id"], + captureStartTime: !item["captureStartTime"] + ? item["captureStartTime"] + : new Date(item["captureStartTime"]), + packetCaptureStatus: item["packetCaptureStatus"], + stopReason: item["stopReason"], + packetCaptureError: !item["packetCaptureError"] + ? item["packetCaptureError"] + : item["packetCaptureError"].map((p: any) => { + return p; + }), + }; +} + +/** The status of the packet capture session. */ +export enum KnownPcStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** Running */ + Running = "Running", + /** Stopped */ + Stopped = "Stopped", + /** Error */ + Error = "Error", + /** Unknown */ + Unknown = "Unknown", +} + +/** + * The status of the packet capture session. \ + * {@link KnownPcStatus} can be used interchangeably with PcStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted**: NotStarted \ + * **Running**: Running \ + * **Stopped**: Stopped \ + * **Error**: Error \ + * **Unknown**: Unknown + */ +export type PcStatus = string; + +/** Known values of {@link PcError} that the service accepts. */ +export enum KnownPcError { + /** InternalError */ + InternalError = "InternalError", + /** AgentStopped */ + AgentStopped = "AgentStopped", + /** CaptureFailed */ + CaptureFailed = "CaptureFailed", + /** LocalFileFailed */ + LocalFileFailed = "LocalFileFailed", + /** StorageFailed */ + StorageFailed = "StorageFailed", +} + +/** Type of PcError */ +export type PcError = string; + +/** List of packet capture sessions. */ +export interface _PacketCaptureListResult { + /** Information about packet capture sessions. */ + value?: PacketCaptureResult[]; + /** URL to get the next set of results. */ + nextLink?: string; +} + +export function _packetCaptureListResultDeserializer(item: any): _PacketCaptureListResult { + return { + value: !item["value"] ? item["value"] : packetCaptureResultArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function packetCaptureResultArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return packetCaptureResultDeserializer(item); + }); +} + +/** Information about the connection monitor. */ +export interface ConnectionMonitorResult extends TrackedResourceWithEtag { + /** Describes the source of connection monitor. */ + source?: ConnectionMonitorSource; + /** Describes the destination of connection monitor. */ + destination?: ConnectionMonitorDestination; + /** Determines if the connection monitor will start automatically once created. */ + autoStart?: boolean; + /** Monitoring interval in seconds. */ + monitoringIntervalInSeconds?: number; + /** List of connection monitor endpoints. */ + endpoints?: ConnectionMonitorEndpoint[]; + /** List of connection monitor test configurations. */ + testConfigurations?: ConnectionMonitorTestConfiguration[]; + /** List of connection monitor test groups. */ + testGroups?: ConnectionMonitorTestGroup[]; + /** List of connection monitor outputs. */ + outputs?: ConnectionMonitorOutput[]; + /** Optional notes to be associated with the connection monitor. */ + notes?: string; + /** The provisioning state of the connection monitor. */ + readonly provisioningState?: CommonProvisioningState; + /** The date and time when the connection monitor was started. */ + readonly startTime?: Date; + /** The monitoring status of the connection monitor. */ + readonly monitoringStatus?: string; + /** Type of connection monitor. */ + readonly connectionMonitorType?: ConnectionMonitorType; +} + +export function connectionMonitorResultDeserializer(item: any): ConnectionMonitorResult { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _connectionMonitorResultPropertiesDeserializer(item["properties"])), + }; +} + +/** Describes the properties of a connection monitor. */ +export interface ConnectionMonitorResultProperties extends ConnectionMonitorParameters { + /** The provisioning state of the connection monitor. */ + readonly provisioningState?: CommonProvisioningState; + /** The date and time when the connection monitor was started. */ + readonly startTime?: Date; + /** The monitoring status of the connection monitor. */ + readonly monitoringStatus?: string; + /** Type of connection monitor. */ + readonly connectionMonitorType?: ConnectionMonitorType; +} + +export function connectionMonitorResultPropertiesDeserializer( + item: any, +): ConnectionMonitorResultProperties { + return { + source: !item["source"] ? item["source"] : connectionMonitorSourceDeserializer(item["source"]), + destination: !item["destination"] + ? item["destination"] + : connectionMonitorDestinationDeserializer(item["destination"]), + autoStart: item["autoStart"], + monitoringIntervalInSeconds: item["monitoringIntervalInSeconds"], + endpoints: !item["endpoints"] + ? item["endpoints"] + : connectionMonitorEndpointArrayDeserializer(item["endpoints"]), + testConfigurations: !item["testConfigurations"] + ? item["testConfigurations"] + : connectionMonitorTestConfigurationArrayDeserializer(item["testConfigurations"]), + testGroups: !item["testGroups"] + ? item["testGroups"] + : connectionMonitorTestGroupArrayDeserializer(item["testGroups"]), + outputs: !item["outputs"] + ? item["outputs"] + : connectionMonitorOutputArrayDeserializer(item["outputs"]), + notes: item["notes"], + provisioningState: item["provisioningState"], + startTime: !item["startTime"] ? item["startTime"] : new Date(item["startTime"]), + monitoringStatus: item["monitoringStatus"], + connectionMonitorType: item["connectionMonitorType"], + }; +} + +/** Type of connection monitor. */ +export enum KnownConnectionMonitorType { + /** MultiEndpoint */ + MultiEndpoint = "MultiEndpoint", + /** SingleSourceDestination */ + SingleSourceDestination = "SingleSourceDestination", +} + +/** + * Type of connection monitor. \ + * {@link KnownConnectionMonitorType} can be used interchangeably with ConnectionMonitorType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MultiEndpoint**: MultiEndpoint \ + * **SingleSourceDestination**: SingleSourceDestination + */ +export type ConnectionMonitorType = string; + +/** Parameters that define the operation to create a connection monitor. */ +export interface ConnectionMonitorParameters { + /** Describes the source of connection monitor. */ + source?: ConnectionMonitorSource; + /** Describes the destination of connection monitor. */ + destination?: ConnectionMonitorDestination; + /** Determines if the connection monitor will start automatically once created. */ + autoStart?: boolean; + /** Monitoring interval in seconds. */ + monitoringIntervalInSeconds?: number; + /** List of connection monitor endpoints. */ + endpoints?: ConnectionMonitorEndpoint[]; + /** List of connection monitor test configurations. */ + testConfigurations?: ConnectionMonitorTestConfiguration[]; + /** List of connection monitor test groups. */ + testGroups?: ConnectionMonitorTestGroup[]; + /** List of connection monitor outputs. */ + outputs?: ConnectionMonitorOutput[]; + /** Optional notes to be associated with the connection monitor. */ + notes?: string; +} + +export function connectionMonitorParametersSerializer(item: ConnectionMonitorParameters): any { + return { + source: !item["source"] ? item["source"] : connectionMonitorSourceSerializer(item["source"]), + destination: !item["destination"] + ? item["destination"] + : connectionMonitorDestinationSerializer(item["destination"]), + autoStart: item["autoStart"], + monitoringIntervalInSeconds: item["monitoringIntervalInSeconds"], + endpoints: !item["endpoints"] + ? item["endpoints"] + : connectionMonitorEndpointArraySerializer(item["endpoints"]), + testConfigurations: !item["testConfigurations"] + ? item["testConfigurations"] + : connectionMonitorTestConfigurationArraySerializer(item["testConfigurations"]), + testGroups: !item["testGroups"] + ? item["testGroups"] + : connectionMonitorTestGroupArraySerializer(item["testGroups"]), + outputs: !item["outputs"] + ? item["outputs"] + : connectionMonitorOutputArraySerializer(item["outputs"]), + notes: item["notes"], + }; +} + +export function connectionMonitorParametersDeserializer(item: any): ConnectionMonitorParameters { + return { + source: !item["source"] ? item["source"] : connectionMonitorSourceDeserializer(item["source"]), + destination: !item["destination"] + ? item["destination"] + : connectionMonitorDestinationDeserializer(item["destination"]), + autoStart: item["autoStart"], + monitoringIntervalInSeconds: item["monitoringIntervalInSeconds"], + endpoints: !item["endpoints"] + ? item["endpoints"] + : connectionMonitorEndpointArrayDeserializer(item["endpoints"]), + testConfigurations: !item["testConfigurations"] + ? item["testConfigurations"] + : connectionMonitorTestConfigurationArrayDeserializer(item["testConfigurations"]), + testGroups: !item["testGroups"] + ? item["testGroups"] + : connectionMonitorTestGroupArrayDeserializer(item["testGroups"]), + outputs: !item["outputs"] + ? item["outputs"] + : connectionMonitorOutputArrayDeserializer(item["outputs"]), + notes: item["notes"], + }; +} + +/** Describes the source of connection monitor. */ +export interface ConnectionMonitorSource { + /** The ID of the resource used as the source by connection monitor. */ + resourceId: string; + /** The source port used by connection monitor. */ + port?: number; +} + +export function connectionMonitorSourceSerializer(item: ConnectionMonitorSource): any { + return { resourceId: item["resourceId"], port: item["port"] }; +} + +export function connectionMonitorSourceDeserializer(item: any): ConnectionMonitorSource { + return { + resourceId: item["resourceId"], + port: item["port"], + }; +} + +/** Describes the destination of connection monitor. */ +export interface ConnectionMonitorDestination { + /** The ID of the resource used as the destination by connection monitor. */ + resourceId?: string; + /** Address of the connection monitor destination (IP or domain name). */ + address?: string; + /** The destination port used by connection monitor. */ + port?: number; +} + +export function connectionMonitorDestinationSerializer(item: ConnectionMonitorDestination): any { + return { resourceId: item["resourceId"], address: item["address"], port: item["port"] }; +} + +export function connectionMonitorDestinationDeserializer(item: any): ConnectionMonitorDestination { + return { + resourceId: item["resourceId"], + address: item["address"], + port: item["port"], + }; +} + +export function connectionMonitorEndpointArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorEndpointSerializer(item); + }); +} + +export function connectionMonitorEndpointArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorEndpointDeserializer(item); + }); +} + +/** Describes the connection monitor endpoint. */ +export interface ConnectionMonitorEndpoint { + /** The name of the connection monitor endpoint. */ + name: string; + /** The endpoint type. */ + type?: EndpointType; + /** Resource ID of the connection monitor endpoint are supported for AzureVM, AzureVMSS, AzureVNet, AzureSubnet, MMAWorkspaceMachine, MMAWorkspaceNetwork, AzureArcVM endpoint type. */ + resourceId?: string; + /** Address of the connection monitor endpoint. Supported for AzureVM, ExternalAddress, ArcMachine, MMAWorkspaceMachine endpoint type. */ + address?: string; + /** Filter field is getting deprecated and should not be used. Instead use Include/Exclude scope fields for it. */ + filter?: ConnectionMonitorEndpointFilter; + /** Endpoint scope defines which target resource to monitor in case of compound resource endpoints like VMSS, AzureSubnet, AzureVNet, MMAWorkspaceNetwork, AzureArcNetwork. */ + scope?: ConnectionMonitorEndpointScope; + /** Test coverage for the endpoint. */ + coverageLevel?: CoverageLevel; + /** Location details is optional and only being used for 'AzureArcNetwork' type endpoints, which contains region details. */ + locationDetails?: ConnectionMonitorEndpointLocationDetails; + /** Subscription ID for connection monitor endpoint. It's an optional parameter which is being used for 'AzureArcNetwork' type endpoint. */ + subscriptionId?: string; +} + +export function connectionMonitorEndpointSerializer(item: ConnectionMonitorEndpoint): any { + return { + name: item["name"], + type: item["type"], + resourceId: item["resourceId"], + address: item["address"], + filter: !item["filter"] + ? item["filter"] + : connectionMonitorEndpointFilterSerializer(item["filter"]), + scope: !item["scope"] ? item["scope"] : connectionMonitorEndpointScopeSerializer(item["scope"]), + coverageLevel: item["coverageLevel"], + locationDetails: !item["locationDetails"] + ? item["locationDetails"] + : connectionMonitorEndpointLocationDetailsSerializer(item["locationDetails"]), + subscriptionId: item["subscriptionId"], + }; +} + +export function connectionMonitorEndpointDeserializer(item: any): ConnectionMonitorEndpoint { + return { + name: item["name"], + type: item["type"], + resourceId: item["resourceId"], + address: item["address"], + filter: !item["filter"] + ? item["filter"] + : connectionMonitorEndpointFilterDeserializer(item["filter"]), + scope: !item["scope"] + ? item["scope"] + : connectionMonitorEndpointScopeDeserializer(item["scope"]), + coverageLevel: item["coverageLevel"], + locationDetails: !item["locationDetails"] + ? item["locationDetails"] + : connectionMonitorEndpointLocationDetailsDeserializer(item["locationDetails"]), + subscriptionId: item["subscriptionId"], + }; +} + +/** The endpoint type. */ +export enum KnownEndpointType { + /** AzureVM */ + AzureVM = "AzureVM", + /** AzureVNet */ + AzureVNet = "AzureVNet", + /** AzureSubnet */ + AzureSubnet = "AzureSubnet", + /** ExternalAddress */ + ExternalAddress = "ExternalAddress", + /** MMAWorkspaceMachine */ + MMAWorkspaceMachine = "MMAWorkspaceMachine", + /** MMAWorkspaceNetwork */ + MMAWorkspaceNetwork = "MMAWorkspaceNetwork", + /** AzureArcVM */ + AzureArcVM = "AzureArcVM", + /** AzureVMSS */ + AzureVmss = "AzureVMSS", + /** AzureArcNetwork */ + AzureArcNetwork = "AzureArcNetwork", +} + +/** + * The endpoint type. \ + * {@link KnownEndpointType} can be used interchangeably with EndpointType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureVM**: AzureVM \ + * **AzureVNet**: AzureVNet \ + * **AzureSubnet**: AzureSubnet \ + * **ExternalAddress**: ExternalAddress \ + * **MMAWorkspaceMachine**: MMAWorkspaceMachine \ + * **MMAWorkspaceNetwork**: MMAWorkspaceNetwork \ + * **AzureArcVM**: AzureArcVM \ + * **AzureVMSS**: AzureVMSS \ + * **AzureArcNetwork**: AzureArcNetwork + */ +export type EndpointType = string; + +/** Describes the connection monitor endpoint filter. */ +export interface ConnectionMonitorEndpointFilter { + /** The behavior of the endpoint filter. Currently only 'Include' is supported. */ + type?: ConnectionMonitorEndpointFilterType; + /** List of items in the filter. */ + items?: ConnectionMonitorEndpointFilterItem[]; +} + +export function connectionMonitorEndpointFilterSerializer( + item: ConnectionMonitorEndpointFilter, +): any { + return { + type: item["type"], + items: !item["items"] + ? item["items"] + : connectionMonitorEndpointFilterItemArraySerializer(item["items"]), + }; +} + +export function connectionMonitorEndpointFilterDeserializer( + item: any, +): ConnectionMonitorEndpointFilter { + return { + type: item["type"], + items: !item["items"] + ? item["items"] + : connectionMonitorEndpointFilterItemArrayDeserializer(item["items"]), + }; +} + +/** The behavior of the endpoint filter. Currently only 'Include' is supported. */ +export enum KnownConnectionMonitorEndpointFilterType { + /** Include */ + Include = "Include", +} + +/** + * The behavior of the endpoint filter. Currently only 'Include' is supported. \ + * {@link KnownConnectionMonitorEndpointFilterType} can be used interchangeably with ConnectionMonitorEndpointFilterType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Include**: Include + */ +export type ConnectionMonitorEndpointFilterType = string; + +export function connectionMonitorEndpointFilterItemArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorEndpointFilterItemSerializer(item); + }); +} + +export function connectionMonitorEndpointFilterItemArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorEndpointFilterItemDeserializer(item); + }); +} + +/** Describes the connection monitor endpoint filter item. */ +export interface ConnectionMonitorEndpointFilterItem { + /** The type of item included in the filter. Currently only 'AgentAddress' is supported. */ + type?: ConnectionMonitorEndpointFilterItemType; + /** The address of the filter item. */ + address?: string; +} + +export function connectionMonitorEndpointFilterItemSerializer( + item: ConnectionMonitorEndpointFilterItem, +): any { + return { type: item["type"], address: item["address"] }; +} + +export function connectionMonitorEndpointFilterItemDeserializer( + item: any, +): ConnectionMonitorEndpointFilterItem { + return { + type: item["type"], + address: item["address"], + }; +} + +/** The type of item included in the filter. Currently only 'AgentAddress' is supported. */ +export enum KnownConnectionMonitorEndpointFilterItemType { + /** AgentAddress */ + AgentAddress = "AgentAddress", +} + +/** + * The type of item included in the filter. Currently only 'AgentAddress' is supported. \ + * {@link KnownConnectionMonitorEndpointFilterItemType} can be used interchangeably with ConnectionMonitorEndpointFilterItemType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AgentAddress**: AgentAddress + */ +export type ConnectionMonitorEndpointFilterItemType = string; + +/** Describes the connection monitor endpoint scope. */ +export interface ConnectionMonitorEndpointScope { + /** List of items which needs to be included to the endpoint scope. */ + include?: ConnectionMonitorEndpointScopeItem[]; + /** List of items which needs to be excluded from the endpoint scope. */ + exclude?: ConnectionMonitorEndpointScopeItem[]; +} + +export function connectionMonitorEndpointScopeSerializer( + item: ConnectionMonitorEndpointScope, +): any { + return { + include: !item["include"] + ? item["include"] + : connectionMonitorEndpointScopeItemArraySerializer(item["include"]), + exclude: !item["exclude"] + ? item["exclude"] + : connectionMonitorEndpointScopeItemArraySerializer(item["exclude"]), + }; +} + +export function connectionMonitorEndpointScopeDeserializer( + item: any, +): ConnectionMonitorEndpointScope { + return { + include: !item["include"] + ? item["include"] + : connectionMonitorEndpointScopeItemArrayDeserializer(item["include"]), + exclude: !item["exclude"] + ? item["exclude"] + : connectionMonitorEndpointScopeItemArrayDeserializer(item["exclude"]), + }; +} + +export function connectionMonitorEndpointScopeItemArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorEndpointScopeItemSerializer(item); + }); +} + +export function connectionMonitorEndpointScopeItemArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorEndpointScopeItemDeserializer(item); + }); +} + +/** Describes the connection monitor endpoint scope item. */ +export interface ConnectionMonitorEndpointScopeItem { + /** The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or IPv4/IPv6 IP address. */ + address?: string; +} + +export function connectionMonitorEndpointScopeItemSerializer( + item: ConnectionMonitorEndpointScopeItem, +): any { + return { address: item["address"] }; +} + +export function connectionMonitorEndpointScopeItemDeserializer( + item: any, +): ConnectionMonitorEndpointScopeItem { + return { + address: item["address"], + }; +} + +/** Test coverage for the endpoint. */ +export enum KnownCoverageLevel { + /** Default */ + Default = "Default", + /** Low */ + Low = "Low", + /** BelowAverage */ + BelowAverage = "BelowAverage", + /** Average */ + Average = "Average", + /** AboveAverage */ + AboveAverage = "AboveAverage", + /** Full */ + Full = "Full", +} + +/** + * Test coverage for the endpoint. \ + * {@link KnownCoverageLevel} can be used interchangeably with CoverageLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default**: Default \ + * **Low**: Low \ + * **BelowAverage**: BelowAverage \ + * **Average**: Average \ + * **AboveAverage**: AboveAverage \ + * **Full**: Full + */ +export type CoverageLevel = string; + +/** Connection monitor endpoint location details only being used for 'AzureArcNetwork' type endpoints, which contains the region details. */ +export interface ConnectionMonitorEndpointLocationDetails { + /** Region for connection monitor endpoint. */ + region?: string; +} + +export function connectionMonitorEndpointLocationDetailsSerializer( + item: ConnectionMonitorEndpointLocationDetails, +): any { + return { region: item["region"] }; +} + +export function connectionMonitorEndpointLocationDetailsDeserializer( + item: any, +): ConnectionMonitorEndpointLocationDetails { + return { + region: item["region"], + }; +} + +export function connectionMonitorTestConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorTestConfigurationSerializer(item); + }); +} + +export function connectionMonitorTestConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorTestConfigurationDeserializer(item); + }); +} + +/** Describes a connection monitor test configuration. */ +export interface ConnectionMonitorTestConfiguration { + /** The name of the connection monitor test configuration. */ + name: string; + /** The frequency of test evaluation, in seconds. */ + testFrequencySec?: number; + /** The protocol to use in test evaluation. */ + protocol: ConnectionMonitorTestConfigurationProtocol; + /** The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters. */ + preferredIPVersion?: PreferredIPVersion; + /** The parameters used to perform test evaluation over HTTP. */ + httpConfiguration?: ConnectionMonitorHttpConfiguration; + /** The parameters used to perform test evaluation over TCP. */ + tcpConfiguration?: ConnectionMonitorTcpConfiguration; + /** The parameters used to perform test evaluation over ICMP. */ + icmpConfiguration?: ConnectionMonitorIcmpConfiguration; + /** The threshold for declaring a test successful. */ + successThreshold?: ConnectionMonitorSuccessThreshold; +} + +export function connectionMonitorTestConfigurationSerializer( + item: ConnectionMonitorTestConfiguration, +): any { + return { + name: item["name"], + testFrequencySec: item["testFrequencySec"], + protocol: item["protocol"], + preferredIPVersion: item["preferredIPVersion"], + httpConfiguration: !item["httpConfiguration"] + ? item["httpConfiguration"] + : connectionMonitorHttpConfigurationSerializer(item["httpConfiguration"]), + tcpConfiguration: !item["tcpConfiguration"] + ? item["tcpConfiguration"] + : connectionMonitorTcpConfigurationSerializer(item["tcpConfiguration"]), + icmpConfiguration: !item["icmpConfiguration"] + ? item["icmpConfiguration"] + : connectionMonitorIcmpConfigurationSerializer(item["icmpConfiguration"]), + successThreshold: !item["successThreshold"] + ? item["successThreshold"] + : connectionMonitorSuccessThresholdSerializer(item["successThreshold"]), + }; +} + +export function connectionMonitorTestConfigurationDeserializer( + item: any, +): ConnectionMonitorTestConfiguration { + return { + name: item["name"], + testFrequencySec: item["testFrequencySec"], + protocol: item["protocol"], + preferredIPVersion: item["preferredIPVersion"], + httpConfiguration: !item["httpConfiguration"] + ? item["httpConfiguration"] + : connectionMonitorHttpConfigurationDeserializer(item["httpConfiguration"]), + tcpConfiguration: !item["tcpConfiguration"] + ? item["tcpConfiguration"] + : connectionMonitorTcpConfigurationDeserializer(item["tcpConfiguration"]), + icmpConfiguration: !item["icmpConfiguration"] + ? item["icmpConfiguration"] + : connectionMonitorIcmpConfigurationDeserializer(item["icmpConfiguration"]), + successThreshold: !item["successThreshold"] + ? item["successThreshold"] + : connectionMonitorSuccessThresholdDeserializer(item["successThreshold"]), + }; +} + +/** The protocol to use in test evaluation. */ +export enum KnownConnectionMonitorTestConfigurationProtocol { + /** Tcp */ + Tcp = "Tcp", + /** Http */ + Http = "Http", + /** Icmp */ + Icmp = "Icmp", +} + +/** + * The protocol to use in test evaluation. \ + * {@link KnownConnectionMonitorTestConfigurationProtocol} can be used interchangeably with ConnectionMonitorTestConfigurationProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Tcp**: Tcp \ + * **Http**: Http \ + * **Icmp**: Icmp + */ +export type ConnectionMonitorTestConfigurationProtocol = string; + +/** The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters. */ +export enum KnownPreferredIPVersion { + /** IPv4 */ + IPv4 = "IPv4", + /** IPv6 */ + IPv6 = "IPv6", +} + +/** + * The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters. \ + * {@link KnownPreferredIPVersion} can be used interchangeably with PreferredIPVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPv4**: IPv4 \ + * **IPv6**: IPv6 + */ +export type PreferredIPVersion = string; + +/** Describes the HTTP configuration. */ +export interface ConnectionMonitorHttpConfiguration { + /** The port to connect to. */ + port?: number; + /** The HTTP method to use. */ + method?: HttpConfigurationMethod; + /** The path component of the URI. For instance, "/dir1/dir2". */ + path?: string; + /** The HTTP headers to transmit with the request. */ + requestHeaders?: HttpHeader[]; + /** HTTP status codes to consider successful. For instance, "2xx,301-304,418". */ + validStatusCodeRanges?: string[]; + /** Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit. */ + preferHttps?: boolean; +} + +export function connectionMonitorHttpConfigurationSerializer( + item: ConnectionMonitorHttpConfiguration, +): any { + return { + port: item["port"], + method: item["method"], + path: item["path"], + requestHeaders: !item["requestHeaders"] + ? item["requestHeaders"] + : httpHeaderArraySerializer(item["requestHeaders"]), + validStatusCodeRanges: !item["validStatusCodeRanges"] + ? item["validStatusCodeRanges"] + : item["validStatusCodeRanges"].map((p: any) => { + return p; + }), + preferHTTPS: item["preferHttps"], + }; +} + +export function connectionMonitorHttpConfigurationDeserializer( + item: any, +): ConnectionMonitorHttpConfiguration { + return { + port: item["port"], + method: item["method"], + path: item["path"], + requestHeaders: !item["requestHeaders"] + ? item["requestHeaders"] + : httpHeaderArrayDeserializer(item["requestHeaders"]), + validStatusCodeRanges: !item["validStatusCodeRanges"] + ? item["validStatusCodeRanges"] + : item["validStatusCodeRanges"].map((p: any) => { + return p; + }), + preferHttps: item["preferHTTPS"], + }; +} + +/** The HTTP method to use. */ +export enum KnownHttpConfigurationMethod { + /** Get */ + Get = "Get", + /** Post */ + Post = "Post", +} + +/** + * The HTTP method to use. \ + * {@link KnownHttpConfigurationMethod} can be used interchangeably with HttpConfigurationMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Get**: Get \ + * **Post**: Post + */ +export type HttpConfigurationMethod = string; + +/** Describes the TCP configuration. */ +export interface ConnectionMonitorTcpConfiguration { + /** The port to connect to. */ + port?: number; + /** Value indicating whether path evaluation with trace route should be disabled. */ + disableTraceRoute?: boolean; + /** Destination port behavior. */ + destinationPortBehavior?: DestinationPortBehavior; +} + +export function connectionMonitorTcpConfigurationSerializer( + item: ConnectionMonitorTcpConfiguration, +): any { + return { + port: item["port"], + disableTraceRoute: item["disableTraceRoute"], + destinationPortBehavior: item["destinationPortBehavior"], + }; +} + +export function connectionMonitorTcpConfigurationDeserializer( + item: any, +): ConnectionMonitorTcpConfiguration { + return { + port: item["port"], + disableTraceRoute: item["disableTraceRoute"], + destinationPortBehavior: item["destinationPortBehavior"], + }; +} + +/** Destination port behavior. */ +export enum KnownDestinationPortBehavior { + /** None */ + None = "None", + /** ListenIfAvailable */ + ListenIfAvailable = "ListenIfAvailable", +} + +/** + * Destination port behavior. \ + * {@link KnownDestinationPortBehavior} can be used interchangeably with DestinationPortBehavior, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None \ + * **ListenIfAvailable**: ListenIfAvailable + */ +export type DestinationPortBehavior = string; + +/** Describes the ICMP configuration. */ +export interface ConnectionMonitorIcmpConfiguration { + /** Value indicating whether path evaluation with trace route should be disabled. */ + disableTraceRoute?: boolean; +} + +export function connectionMonitorIcmpConfigurationSerializer( + item: ConnectionMonitorIcmpConfiguration, +): any { + return { disableTraceRoute: item["disableTraceRoute"] }; +} + +export function connectionMonitorIcmpConfigurationDeserializer( + item: any, +): ConnectionMonitorIcmpConfiguration { + return { + disableTraceRoute: item["disableTraceRoute"], + }; +} + +/** Describes the threshold for declaring a test successful. */ +export interface ConnectionMonitorSuccessThreshold { + /** The maximum percentage of failed checks permitted for a test to evaluate as successful. */ + checksFailedPercent?: number; + /** The maximum round-trip time in milliseconds permitted for a test to evaluate as successful. */ + roundTripTimeMs?: number; +} + +export function connectionMonitorSuccessThresholdSerializer( + item: ConnectionMonitorSuccessThreshold, +): any { + return { + checksFailedPercent: item["checksFailedPercent"], + roundTripTimeMs: item["roundTripTimeMs"], + }; +} + +export function connectionMonitorSuccessThresholdDeserializer( + item: any, +): ConnectionMonitorSuccessThreshold { + return { + checksFailedPercent: item["checksFailedPercent"], + roundTripTimeMs: item["roundTripTimeMs"], + }; +} + +export function connectionMonitorTestGroupArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorTestGroupSerializer(item); + }); +} + +export function connectionMonitorTestGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorTestGroupDeserializer(item); + }); +} + +/** Describes the connection monitor test group. */ +export interface ConnectionMonitorTestGroup { + /** The name of the connection monitor test group. */ + name: string; + /** Value indicating whether test group is disabled. */ + disable?: boolean; + /** List of test configuration names. */ + testConfigurations: string[]; + /** List of source endpoint names. */ + sources: string[]; + /** List of destination endpoint names. */ + destinations: string[]; +} + +export function connectionMonitorTestGroupSerializer(item: ConnectionMonitorTestGroup): any { + return { + name: item["name"], + disable: item["disable"], + testConfigurations: item["testConfigurations"].map((p: any) => { + return p; + }), + sources: item["sources"].map((p: any) => { + return p; + }), + destinations: item["destinations"].map((p: any) => { + return p; + }), + }; +} + +export function connectionMonitorTestGroupDeserializer(item: any): ConnectionMonitorTestGroup { + return { + name: item["name"], + disable: item["disable"], + testConfigurations: item["testConfigurations"].map((p: any) => { + return p; + }), + sources: item["sources"].map((p: any) => { + return p; + }), + destinations: item["destinations"].map((p: any) => { + return p; + }), + }; +} + +export function connectionMonitorOutputArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorOutputSerializer(item); + }); +} + +export function connectionMonitorOutputArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorOutputDeserializer(item); + }); +} + +/** Describes a connection monitor output destination. */ +export interface ConnectionMonitorOutput { + /** Connection monitor output destination type. Currently, only "Workspace" is supported. */ + type?: OutputType; + /** Describes the settings for producing output into a log analytics workspace. */ + workspaceSettings?: ConnectionMonitorWorkspaceSettings; +} + +export function connectionMonitorOutputSerializer(item: ConnectionMonitorOutput): any { + return { + type: item["type"], + workspaceSettings: !item["workspaceSettings"] + ? item["workspaceSettings"] + : connectionMonitorWorkspaceSettingsSerializer(item["workspaceSettings"]), + }; +} + +export function connectionMonitorOutputDeserializer(item: any): ConnectionMonitorOutput { + return { + type: item["type"], + workspaceSettings: !item["workspaceSettings"] + ? item["workspaceSettings"] + : connectionMonitorWorkspaceSettingsDeserializer(item["workspaceSettings"]), + }; +} + +/** Connection monitor output destination type. Currently, only "Workspace" is supported. */ +export enum KnownOutputType { + /** Workspace */ + Workspace = "Workspace", +} + +/** + * Connection monitor output destination type. Currently, only "Workspace" is supported. \ + * {@link KnownOutputType} can be used interchangeably with OutputType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Workspace**: Workspace + */ +export type OutputType = string; + +/** Describes the settings for producing output into a log analytics workspace. */ +export interface ConnectionMonitorWorkspaceSettings { + /** Log analytics workspace resource ID. */ + workspaceResourceId?: string; +} + +export function connectionMonitorWorkspaceSettingsSerializer( + item: ConnectionMonitorWorkspaceSettings, +): any { + return { workspaceResourceId: item["workspaceResourceId"] }; +} + +export function connectionMonitorWorkspaceSettingsDeserializer( + item: any, +): ConnectionMonitorWorkspaceSettings { + return { + workspaceResourceId: item["workspaceResourceId"], + }; +} + +/** Tracked resource with optional location. */ +export interface TrackedResourceWithEtag { + /** ID of the connection monitor. */ + readonly id?: string; + /** Name of the connection monitor. */ + readonly name?: string; + /** Connection monitor type. */ + readonly type?: string; + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Connection monitor location. */ + location?: string; + /** Connection monitor tags. */ + tags?: Record; +} + +export function trackedResourceWithEtagDeserializer(item: any): TrackedResourceWithEtag { + return { + id: item["id"], + name: item["name"], + type: item["type"], + etag: item["etag"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + }; +} + +/** Parameters that define the operation to create a connection monitor. */ +export interface ConnectionMonitor { + /** Connection monitor location. */ + location?: string; + /** Connection monitor tags. */ + tags?: Record; + /** Describes the source of connection monitor. */ + source?: ConnectionMonitorSource; + /** Describes the destination of connection monitor. */ + destination?: ConnectionMonitorDestination; + /** Determines if the connection monitor will start automatically once created. */ + autoStart?: boolean; + /** Monitoring interval in seconds. */ + monitoringIntervalInSeconds?: number; + /** List of connection monitor endpoints. */ + endpoints?: ConnectionMonitorEndpoint[]; + /** List of connection monitor test configurations. */ + testConfigurations?: ConnectionMonitorTestConfiguration[]; + /** List of connection monitor test groups. */ + testGroups?: ConnectionMonitorTestGroup[]; + /** List of connection monitor outputs. */ + outputs?: ConnectionMonitorOutput[]; + /** Optional notes to be associated with the connection monitor. */ + notes?: string; +} + +export function connectionMonitorSerializer(item: ConnectionMonitor): any { + return { + location: item["location"], + tags: item["tags"], + properties: _connectionMonitorPropertiesSerializer(item), + }; +} + +/** List of connection monitors. */ +export interface _ConnectionMonitorListResult { + /** Information about connection monitors. */ + value?: ConnectionMonitorResult[]; + /** URL to get the next set of results. */ + nextLink?: string; +} + +export function _connectionMonitorListResultDeserializer(item: any): _ConnectionMonitorListResult { + return { + value: !item["value"] ? item["value"] : connectionMonitorResultArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function connectionMonitorResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionMonitorResultDeserializer(item); + }); +} + +/** Private dns zone group resource. */ +export interface PrivateDnsZoneGroup extends SubResource { + /** 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. */ + readonly etag?: string; + /** The provisioning state of the private dns zone group resource. */ + readonly provisioningState?: CommonProvisioningState; + /** A collection of private dns zone configurations of the private dns zone group. */ + privateDnsZoneConfigs?: PrivateDnsZoneConfig[]; +} + +export function privateDnsZoneGroupSerializer(item: PrivateDnsZoneGroup): any { + return { + id: item["id"], + name: item["name"], + properties: areAllPropsUndefined(item, ["privateDnsZoneConfigs"]) + ? undefined + : _privateDnsZoneGroupPropertiesSerializer(item), + }; +} + +export function privateDnsZoneGroupDeserializer(item: any): PrivateDnsZoneGroup { + return { + id: item["id"], + name: item["name"], + etag: item["etag"], + ...(!item["properties"] + ? item["properties"] + : _privateDnsZoneGroupPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of the private dns zone group. */ +export interface PrivateDnsZoneGroupPropertiesFormat { + /** The provisioning state of the private dns zone group resource. */ + readonly provisioningState?: CommonProvisioningState; + /** A collection of private dns zone configurations of the private dns zone group. */ + privateDnsZoneConfigs?: PrivateDnsZoneConfig[]; +} + +export function privateDnsZoneGroupPropertiesFormatSerializer( + item: PrivateDnsZoneGroupPropertiesFormat, +): any { + return { + privateDnsZoneConfigs: !item["privateDnsZoneConfigs"] + ? item["privateDnsZoneConfigs"] + : privateDnsZoneConfigArraySerializer(item["privateDnsZoneConfigs"]), + }; +} + +export function privateDnsZoneGroupPropertiesFormatDeserializer( + item: any, +): PrivateDnsZoneGroupPropertiesFormat { + return { + provisioningState: item["provisioningState"], + privateDnsZoneConfigs: !item["privateDnsZoneConfigs"] + ? item["privateDnsZoneConfigs"] + : privateDnsZoneConfigArrayDeserializer(item["privateDnsZoneConfigs"]), + }; +} + +export function privateDnsZoneConfigArraySerializer(result: Array): any[] { + return result.map((item) => { + return privateDnsZoneConfigSerializer(item); + }); +} + +export function privateDnsZoneConfigArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return privateDnsZoneConfigDeserializer(item); + }); +} + +/** PrivateDnsZoneConfig resource. */ +export interface PrivateDnsZoneConfig { + /** Name of the resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** The resource id of the private dns zone. */ + privateDnsZoneId?: string; + /** A collection of information regarding a recordSet, holding information to identify private resources. */ + readonly recordSets?: RecordSet[]; +} + +export function privateDnsZoneConfigSerializer(item: PrivateDnsZoneConfig): any { + return { + name: item["name"], + properties: areAllPropsUndefined(item, ["privateDnsZoneId"]) + ? undefined + : _privateDnsZoneConfigPropertiesSerializer(item), + }; +} + +export function privateDnsZoneConfigDeserializer(item: any): PrivateDnsZoneConfig { + return { + name: item["name"], + ...(!item["properties"] + ? item["properties"] + : _privateDnsZoneConfigPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of the private dns zone configuration resource. */ +export interface PrivateDnsZonePropertiesFormat { + /** The resource id of the private dns zone. */ + privateDnsZoneId?: string; + /** A collection of information regarding a recordSet, holding information to identify private resources. */ + readonly recordSets?: RecordSet[]; +} + +export function privateDnsZonePropertiesFormatSerializer( + item: PrivateDnsZonePropertiesFormat, +): any { + return { privateDnsZoneId: item["privateDnsZoneId"] }; +} + +export function privateDnsZonePropertiesFormatDeserializer( + item: any, +): PrivateDnsZonePropertiesFormat { + return { + privateDnsZoneId: item["privateDnsZoneId"], + recordSets: !item["recordSets"] + ? item["recordSets"] + : recordSetArrayDeserializer(item["recordSets"]), + }; +} + +export function recordSetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return recordSetDeserializer(item); + }); +} + +/** A collective group of information about the record set information. */ +export interface RecordSet { + /** Resource record type. */ + recordType?: string; + /** Recordset name. */ + recordSetName?: string; + /** Fqdn that resolves to private endpoint ip address. */ + fqdn?: string; + /** The provisioning state of the recordset. */ + readonly provisioningState?: CommonProvisioningState; + /** Recordset time to live. */ + ttl?: number; + /** The private ip address of the private endpoint. */ + ipAddresses?: string[]; +} + +export function recordSetDeserializer(item: any): RecordSet { + return { + recordType: item["recordType"], + recordSetName: item["recordSetName"], + fqdn: item["fqdn"], + provisioningState: item["provisioningState"], + ttl: item["ttl"], + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + }; +} + +/** Response for the ListPrivateDnsZoneGroups API service call. */ +export interface _PrivateDnsZoneGroupListResult { + /** The PrivateDnsZoneGroup items on this page */ + value: PrivateDnsZoneGroup[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _privateDnsZoneGroupListResultDeserializer( + item: any, +): _PrivateDnsZoneGroupListResult { + return { + value: privateDnsZoneGroupArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function privateDnsZoneGroupArraySerializer(result: Array): any[] { + return result.map((item) => { + return privateDnsZoneGroupSerializer(item); + }); +} + +export function privateDnsZoneGroupArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return privateDnsZoneGroupDeserializer(item); + }); +} + +/** Response for the ListRouteFilterRules API service call. */ +export interface _RouteFilterRuleListResult { + /** The RouteFilterRule items on this page */ + value: RouteFilterRule[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _routeFilterRuleListResultDeserializer(item: any): _RouteFilterRuleListResult { + return { + value: routeFilterRuleArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Paged collection of ResourceNavigationLink items */ +export interface ResourceNavigationLinksListResult { + /** The ResourceNavigationLink items on this page */ + value: ResourceNavigationLink[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function resourceNavigationLinksListResultDeserializer( + item: any, +): ResourceNavigationLinksListResult { + return { + value: resourceNavigationLinkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Paged collection of ServiceAssociationLink items */ +export interface ServiceAssociationLinksListResult { + /** The ServiceAssociationLink items on this page */ + value: ServiceAssociationLink[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function serviceAssociationLinksListResultDeserializer( + item: any, +): ServiceAssociationLinksListResult { + return { + value: serviceAssociationLinkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** List of Vpn-Sites. */ +export interface GetVpnSitesConfigurationRequest { + /** List of resource-ids of the vpn-sites for which config is to be downloaded. */ + vpnSites?: string[]; + /** The sas-url to download the configurations for vpn-sites. */ + outputBlobSasUrl: string; +} + +export function getVpnSitesConfigurationRequestSerializer( + item: GetVpnSitesConfigurationRequest, +): any { + return { + vpnSites: !item["vpnSites"] + ? item["vpnSites"] + : item["vpnSites"].map((p: any) => { + return p; + }), + outputBlobSasUrl: item["outputBlobSasUrl"], + }; +} + +/** VpnServerConfigurations list associated with VirtualWan Response. */ +export interface VpnServerConfigurationsResponse { + /** List of VpnServerConfigurations associated with VirtualWan. */ + vpnServerConfigurationResourceIds?: string[]; +} + +export function vpnServerConfigurationsResponseDeserializer( + item: any, +): VpnServerConfigurationsResponse { + return { + vpnServerConfigurationResourceIds: !item["vpnServerConfigurationResourceIds"] + ? item["vpnServerConfigurationResourceIds"] + : item["vpnServerConfigurationResourceIds"].map((p: any) => { + return p; + }), + }; +} + +/** 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 { + /** The VpnServerConfigurationPolicyGroup items on this page */ + value: VpnServerConfigurationPolicyGroup[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVpnServerConfigurationPolicyGroupsResultDeserializer( + item: any, +): _ListVpnServerConfigurationPolicyGroupsResult { + return { + value: vpnServerConfigurationPolicyGroupArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** HubVirtualNetworkConnection Resource. */ +export interface HubVirtualNetworkConnection extends 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. */ + readonly etag?: string; + /** Reference to the remote virtual network. */ + remoteVirtualNetwork?: SubResource; + /** Deprecated: VirtualHub to RemoteVnet transit to enabled or not. */ + allowHubToRemoteVnetTransit?: boolean; + /** Deprecated: Allow RemoteVnet to use Virtual Hub's gateways. */ + allowRemoteVnetToUseHubVnetGateways?: boolean; + /** The resource id of the ConnectionPolicy associated with this HubVirtualNetworkConnection. */ + connectionPolicy?: SubResource; + /** Enable internet security. */ + enableInternetSecurity?: boolean; + /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ + routingConfiguration?: RoutingConfiguration; + /** The provisioning state of the hub virtual network connection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function hubVirtualNetworkConnectionSerializer(item: HubVirtualNetworkConnection): any { + return { + id: item["id"], + properties: areAllPropsUndefined(item, [ + "remoteVirtualNetwork", + "allowHubToRemoteVnetTransit", + "allowRemoteVnetToUseHubVnetGateways", + "connectionPolicy", + "enableInternetSecurity", + "routingConfiguration", + ]) + ? undefined + : _hubVirtualNetworkConnectionPropertiesSerializer(item), + name: item["name"], + }; +} + +export function hubVirtualNetworkConnectionDeserializer(item: any): HubVirtualNetworkConnection { + return { + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _hubVirtualNetworkConnectionPropertiesDeserializer(item["properties"])), + name: item["name"], + etag: item["etag"], + }; +} + +/** Parameters for HubVirtualNetworkConnection. */ +export interface HubVirtualNetworkConnectionProperties { + /** Reference to the remote virtual network. */ + remoteVirtualNetwork?: SubResource; + /** Deprecated: VirtualHub to RemoteVnet transit to enabled or not. */ + allowHubToRemoteVnetTransit?: boolean; + /** Deprecated: Allow RemoteVnet to use Virtual Hub's gateways. */ + allowRemoteVnetToUseHubVnetGateways?: boolean; + /** The resource id of the ConnectionPolicy associated with this HubVirtualNetworkConnection. */ + connectionPolicy?: SubResource; + /** Enable internet security. */ + enableInternetSecurity?: boolean; + /** The Routing Configuration indicating the associated and propagated route tables on this connection. */ + routingConfiguration?: RoutingConfiguration; + /** The provisioning state of the hub virtual network connection resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function hubVirtualNetworkConnectionPropertiesSerializer( + item: HubVirtualNetworkConnectionProperties, +): any { + return { + remoteVirtualNetwork: !item["remoteVirtualNetwork"] + ? item["remoteVirtualNetwork"] + : subResourceSerializer(item["remoteVirtualNetwork"]), + allowHubToRemoteVnetTransit: item["allowHubToRemoteVnetTransit"], + allowRemoteVnetToUseHubVnetGateways: item["allowRemoteVnetToUseHubVnetGateways"], + connectionPolicy: !item["connectionPolicy"] + ? item["connectionPolicy"] + : subResourceSerializer(item["connectionPolicy"]), + enableInternetSecurity: item["enableInternetSecurity"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function hubVirtualNetworkConnectionPropertiesDeserializer( + item: any, +): HubVirtualNetworkConnectionProperties { + return { + remoteVirtualNetwork: !item["remoteVirtualNetwork"] + ? item["remoteVirtualNetwork"] + : subResourceDeserializer(item["remoteVirtualNetwork"]), + allowHubToRemoteVnetTransit: item["allowHubToRemoteVnetTransit"], + allowRemoteVnetToUseHubVnetGateways: item["allowRemoteVnetToUseHubVnetGateways"], + connectionPolicy: !item["connectionPolicy"] + ? item["connectionPolicy"] + : subResourceDeserializer(item["connectionPolicy"]), + enableInternetSecurity: item["enableInternetSecurity"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + provisioningState: item["provisioningState"], + }; +} + +/** List of HubVirtualNetworkConnections and a URL nextLink to get the next set of results. */ +export interface _ListHubVirtualNetworkConnectionsResult { + /** The HubVirtualNetworkConnection items on this page */ + value: HubVirtualNetworkConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listHubVirtualNetworkConnectionsResultDeserializer( + item: any, +): _ListHubVirtualNetworkConnectionsResult { + return { + value: hubVirtualNetworkConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function hubVirtualNetworkConnectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return hubVirtualNetworkConnectionSerializer(item); + }); +} + +export function hubVirtualNetworkConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return hubVirtualNetworkConnectionDeserializer(item); + }); +} + +/** List of VirtualHubRouteTableV2s and a URL nextLink to get the next set of results. */ +export interface _ListVirtualHubRouteTableV2SResult { + /** The VirtualHubRouteTableV2 items on this page */ + value: VirtualHubRouteTableV2[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVirtualHubRouteTableV2SResultDeserializer( + item: any, +): _ListVirtualHubRouteTableV2SResult { + return { + value: virtualHubRouteTableV2ArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Vpn Connection packet capture parameters supplied to start packet capture on gateway connection. */ +export interface VpnConnectionPacketCaptureStartParameters { + /** Start Packet capture parameters on vpn connection. */ + filterData?: string; + /** List of site link connection names. */ + linkConnectionNames?: string[]; +} + +export function vpnConnectionPacketCaptureStartParametersSerializer( + item: VpnConnectionPacketCaptureStartParameters, +): any { + return { + filterData: item["filterData"], + linkConnectionNames: !item["linkConnectionNames"] + ? item["linkConnectionNames"] + : item["linkConnectionNames"].map((p: any) => { + return p; + }), + }; +} + +/** Vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. */ +export interface VpnConnectionPacketCaptureStopParameters { + /** SAS url for packet capture on vpn connection. */ + sasUrl?: string; + /** List of site link connection names. */ + linkConnectionNames?: string[]; +} + +export function vpnConnectionPacketCaptureStopParametersSerializer( + item: VpnConnectionPacketCaptureStopParameters, +): any { + return { + sasUrl: item["sasUrl"], + linkConnectionNames: !item["linkConnectionNames"] + ? item["linkConnectionNames"] + : item["linkConnectionNames"].map((p: any) => { + return p; + }), + }; +} + +/** Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. */ +export interface _ListVpnConnectionsResult { + /** The VpnConnection items on this page */ + value: VpnConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVpnConnectionsResultDeserializer(item: any): _ListVpnConnectionsResult { + return { + value: vpnConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** SharedKey Resource . */ +export interface ConnectionSharedKeyResult extends SubResourceModel { + /** Properties of the shared key. */ + properties?: SharedKeyProperties; +} + +export function connectionSharedKeyResultSerializer(item: ConnectionSharedKeyResult): any { + return { + name: item["name"], + id: item["id"], + properties: !item["properties"] + ? item["properties"] + : sharedKeyPropertiesSerializer(item["properties"]), + }; +} + +export function connectionSharedKeyResultDeserializer(item: any): ConnectionSharedKeyResult { + return { + name: item["name"], + type: item["type"], + id: item["id"], + properties: !item["properties"] + ? item["properties"] + : sharedKeyPropertiesDeserializer(item["properties"]), + }; +} + +/** Parameters for SharedKey. */ +export interface SharedKeyProperties { + /** The value of the shared key for the vpn link connection. */ + sharedKey?: string; + /** The length of the shared key for the vpn link connection. */ + sharedKeyLength?: number; + /** The provisioning state of the SharedKey resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function sharedKeyPropertiesSerializer(item: SharedKeyProperties): any { + return { sharedKey: item["sharedKey"], sharedKeyLength: item["sharedKeyLength"] }; +} + +export function sharedKeyPropertiesDeserializer(item: any): SharedKeyProperties { + return { + sharedKey: item["sharedKey"], + sharedKeyLength: item["sharedKeyLength"], + provisioningState: item["provisioningState"], + }; +} + +/** The list of shared keys for the vpn link connection. It should only contain one shared key for each vpn link connection. */ +export interface _ConnectionSharedKeyResultList { + /** The ConnectionSharedKeyResult items on this page */ + value: ConnectionSharedKeyResult[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _connectionSharedKeyResultListDeserializer( + item: any, +): _ConnectionSharedKeyResultList { + return { + value: connectionSharedKeyResultArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function connectionSharedKeyResultArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionSharedKeyResultSerializer(item); + }); +} + +export function connectionSharedKeyResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return connectionSharedKeyResultDeserializer(item); + }); +} + +/** Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. */ +export interface _ListVpnSiteLinkConnectionsResult { + /** The VpnSiteLinkConnection items on this page */ + value: VpnSiteLinkConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVpnSiteLinkConnectionsResultDeserializer( + item: any, +): _ListVpnSiteLinkConnectionsResult { + return { + value: vpnSiteLinkConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Result of the request to list all nat rules to a virtual wan vpn gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. */ +export interface _ListVpnGatewayNatRulesResult { + /** The VpnGatewayNatRule items on this page */ + value: VpnGatewayNatRule[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVpnGatewayNatRulesResultDeserializer( + item: any, +): _ListVpnGatewayNatRulesResult { + return { + value: vpnGatewayNatRuleArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL nextLink to get the next set of results. */ +export interface _ListP2SVpnGatewaysResult { + /** The P2SVpnGateway items on this page */ + value: P2SVpnGateway[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listP2SVpnGatewaysResultDeserializer(item: any): _ListP2SVpnGatewaysResult { + return { + value: p2SVpnGatewayArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Vpn Client Parameters for package generation. */ +export interface P2SVpnProfileParameters { + /** VPN client authentication method. */ + authenticationMethod?: AuthenticationMethod; +} + +export function p2SVpnProfileParametersSerializer(item: P2SVpnProfileParameters): any { + return { authenticationMethod: item["authenticationMethod"] }; +} + +/** List of P2S Vpn connection health request. */ +export interface P2SVpnConnectionHealthRequest { + /** The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for. */ + vpnUserNamesFilter?: string[]; + /** The sas-url to download the P2S Vpn connection health detail. */ + outputBlobSasUrl?: string; +} + +export function p2SVpnConnectionHealthRequestSerializer(item: P2SVpnConnectionHealthRequest): any { + return { + vpnUserNamesFilter: !item["vpnUserNamesFilter"] + ? item["vpnUserNamesFilter"] + : item["vpnUserNamesFilter"].map((p: any) => { + return p; + }), + outputBlobSasUrl: item["outputBlobSasUrl"], + }; +} + +/** P2S Vpn connection detailed health written to sas url. */ +export interface P2SVpnConnectionHealth { + /** Returned sas url of the blob to which the p2s vpn connection detailed health will be written. */ + sasUrl?: string; +} + +export function p2SVpnConnectionHealthDeserializer(item: any): P2SVpnConnectionHealth { + return { + sasUrl: item["sasUrl"], + }; +} + +/** ExpressRouteConnection list. */ +export interface ExpressRouteConnectionList { + /** The list of ExpressRoute connections. */ + value?: ExpressRouteConnection[]; +} + +export function expressRouteConnectionListDeserializer(item: any): ExpressRouteConnectionList { + return { + value: !item["value"] ? item["value"] : expressRouteConnectionArrayDeserializer(item["value"]), + }; +} + +/** Virtual Appliance Site resource. */ +export interface BgpConnection extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** Peer ASN. */ + peerAsn?: number; + /** Peer IP. */ + peerIp?: string; + /** The reference to the HubVirtualNetworkConnection resource. */ + hubVirtualNetworkConnection?: SubResource; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The current state of the VirtualHub to Peer. */ + readonly connectionState?: HubBgpConnectionStatus; + /** The routing configuration indicating the associated and propagated route tables for this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function bgpConnectionSerializer(item: BgpConnection): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "peerAsn", + "peerIp", + "hubVirtualNetworkConnection", + "routingConfiguration", + ]) + ? undefined + : _bgpConnectionPropertiesSerializer(item), + }; +} + +export function bgpConnectionDeserializer(item: any): BgpConnection { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _bgpConnectionPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of the bgp connection. */ +export interface BgpConnectionProperties { + /** Peer ASN. */ + peerAsn?: number; + /** Peer IP. */ + peerIp?: string; + /** The reference to the HubVirtualNetworkConnection resource. */ + hubVirtualNetworkConnection?: SubResource; + /** The provisioning state of the resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The current state of the VirtualHub to Peer. */ + readonly connectionState?: HubBgpConnectionStatus; + /** The routing configuration indicating the associated and propagated route tables for this connection. */ + routingConfiguration?: RoutingConfiguration; +} + +export function bgpConnectionPropertiesSerializer(item: BgpConnectionProperties): any { + return { + peerAsn: item["peerAsn"], + peerIp: item["peerIp"], + hubVirtualNetworkConnection: !item["hubVirtualNetworkConnection"] + ? item["hubVirtualNetworkConnection"] + : subResourceSerializer(item["hubVirtualNetworkConnection"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function bgpConnectionPropertiesDeserializer(item: any): BgpConnectionProperties { + return { + peerAsn: item["peerAsn"], + peerIp: item["peerIp"], + hubVirtualNetworkConnection: !item["hubVirtualNetworkConnection"] + ? item["hubVirtualNetworkConnection"] + : subResourceDeserializer(item["hubVirtualNetworkConnection"]), + provisioningState: item["provisioningState"], + connectionState: item["connectionState"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +/** The current state of the VirtualHub to Peer. */ +export enum KnownHubBgpConnectionStatus { + /** Unknown */ + Unknown = "Unknown", + /** Connecting */ + Connecting = "Connecting", + /** Connected */ + Connected = "Connected", + /** NotConnected */ + NotConnected = "NotConnected", +} + +/** + * The current state of the VirtualHub to Peer. \ + * {@link KnownHubBgpConnectionStatus} can be used interchangeably with HubBgpConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown \ + * **Connecting**: Connecting \ + * **Connected**: Connected \ + * **NotConnected**: NotConnected + */ +export type HubBgpConnectionStatus = string; + +/** VirtualHubBgpConnections list. */ +export interface _ListVirtualHubBgpConnectionResults { + /** The BgpConnection items on this page */ + value: BgpConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVirtualHubBgpConnectionResultsDeserializer( + item: any, +): _ListVirtualHubBgpConnectionResults { + return { + value: bgpConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function bgpConnectionArraySerializer(result: Array): any[] { + return result.map((item) => { + return bgpConnectionSerializer(item); + }); +} + +export function bgpConnectionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return bgpConnectionDeserializer(item); + }); +} + +/** Peer routing details. */ +export interface PeerRoute { + /** The peer's local address. */ + readonly localAddress?: string; + /** The route's network prefix. */ + readonly network?: string; + /** The route's next hop. */ + readonly nextHop?: string; + /** The peer this route was learned from. */ + readonly sourcePeer?: string; + /** The source this route was learned from. */ + readonly origin?: string; + /** The route's AS path sequence. */ + readonly asPath?: string; + /** The route's weight. */ + readonly weight?: number; +} + +export function peerRouteDeserializer(item: any): PeerRoute { + return { + localAddress: item["localAddress"], + network: item["network"], + nextHop: item["nextHop"], + sourcePeer: item["sourcePeer"], + origin: item["origin"], + asPath: item["asPath"], + weight: item["weight"], + }; +} + +/** IpConfigurations. */ +export interface HubIpConfiguration extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** The reference to the subnet resource. */ + subnet?: Subnet; + /** The reference to the public IP resource. */ + publicIPAddress?: PublicIPAddress; + /** The provisioning state of the IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function hubIpConfigurationSerializer(item: HubIpConfiguration): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, [ + "privateIPAddress", + "privateIPAllocationMethod", + "subnet", + "publicIPAddress", + ]) + ? undefined + : _hubIpConfigurationPropertiesSerializer(item), + }; +} + +export function hubIpConfigurationDeserializer(item: any): HubIpConfiguration { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _hubIpConfigurationPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Properties of IP configuration. */ +export interface HubIPConfigurationPropertiesFormat { + /** The private IP address of the IP configuration. */ + privateIPAddress?: string; + /** The private IP address allocation method. */ + privateIPAllocationMethod?: IPAllocationMethod; + /** The reference to the subnet resource. */ + subnet?: Subnet; + /** The reference to the public IP resource. */ + publicIPAddress?: PublicIPAddress; + /** The provisioning state of the IP configuration resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function hubIPConfigurationPropertiesFormatSerializer( + item: HubIPConfigurationPropertiesFormat, +): any { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressSerializer(item["publicIPAddress"]), + }; +} + +export function hubIPConfigurationPropertiesFormatDeserializer( + item: any, +): HubIPConfigurationPropertiesFormat { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressDeserializer(item["publicIPAddress"]), + provisioningState: item["provisioningState"], + }; +} + +/** VirtualHubIpConfigurations list. */ +export interface _ListVirtualHubIpConfigurationResults { + /** The HubIpConfiguration items on this page */ + value: HubIpConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listVirtualHubIpConfigurationResultsDeserializer( + item: any, +): _ListVirtualHubIpConfigurationResults { + return { + value: hubIpConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function hubIpConfigurationArraySerializer(result: Array): any[] { + return result.map((item) => { + return hubIpConfigurationSerializer(item); + }); +} + +export function hubIpConfigurationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return hubIpConfigurationDeserializer(item); + }); +} + +/** The routing intent child resource of a Virtual hub. */ +export interface RoutingIntent extends SubResourceModel { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** List of routing policies. */ + routingPolicies?: RoutingPolicy[]; + /** The provisioning state of the RoutingIntent resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function routingIntentSerializer(item: RoutingIntent): any { + return { + name: item["name"], + id: item["id"], + properties: areAllPropsUndefined(item, ["routingPolicies"]) + ? undefined + : _routingIntentPropertiesSerializer(item), + }; +} + +export function routingIntentDeserializer(item: any): RoutingIntent { + return { + name: item["name"], + type: item["type"], + id: item["id"], + ...(!item["properties"] + ? item["properties"] + : _routingIntentPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** The properties of a RoutingIntent resource. */ +export interface RoutingIntentProperties { + /** List of routing policies. */ + routingPolicies?: RoutingPolicy[]; + /** The provisioning state of the RoutingIntent resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function routingIntentPropertiesSerializer(item: RoutingIntentProperties): any { + return { + routingPolicies: !item["routingPolicies"] + ? item["routingPolicies"] + : routingPolicyArraySerializer(item["routingPolicies"]), + }; +} + +export function routingIntentPropertiesDeserializer(item: any): RoutingIntentProperties { + return { + routingPolicies: !item["routingPolicies"] + ? item["routingPolicies"] + : routingPolicyArrayDeserializer(item["routingPolicies"]), + provisioningState: item["provisioningState"], + }; +} + +export function routingPolicyArraySerializer(result: Array): any[] { + return result.map((item) => { + return routingPolicySerializer(item); + }); +} + +export function routingPolicyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return routingPolicyDeserializer(item); + }); +} + +/** The routing policy object used in a RoutingIntent resource. */ +export interface RoutingPolicy { + /** The unique name for the routing policy. */ + name: string; + /** List of all destinations which this routing policy is applicable to (for example: Internet, PrivateTraffic). */ + destinations: string[]; + /** The next hop resource id on which this routing policy is applicable to. */ + nextHop: string; +} + +export function routingPolicySerializer(item: RoutingPolicy): any { + return { + name: item["name"], + destinations: item["destinations"].map((p: any) => { + return p; + }), + nextHop: item["nextHop"], + }; +} + +export function routingPolicyDeserializer(item: any): RoutingPolicy { + return { + name: item["name"], + destinations: item["destinations"].map((p: any) => { + return p; + }), + nextHop: item["nextHop"], + }; +} + +/** List of the routing intent result and a URL nextLink to get the next set of results. */ +export interface _ListRoutingIntentResult { + /** The RoutingIntent items on this page */ + value: RoutingIntent[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _listRoutingIntentResultDeserializer(item: any): _ListRoutingIntentResult { + return { + value: routingIntentArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function routingIntentArraySerializer(result: Array): any[] { + return result.map((item) => { + return routingIntentSerializer(item); + }); +} + +export function routingIntentArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return routingIntentDeserializer(item); + }); +} + +/** An array of available delegations. */ +export interface _AvailableDelegationsResult { + /** The AvailableDelegation items on this page */ + value: AvailableDelegation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _availableDelegationsResultDeserializer(item: any): _AvailableDelegationsResult { + return { + value: availableDelegationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function availableDelegationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return availableDelegationDeserializer(item); + }); +} + +/** The serviceName of an AvailableDelegation indicates a possible delegation for a subnet. */ +export interface AvailableDelegation { + /** The name of the AvailableDelegation resource. */ + name?: string; + /** A unique identifier of the AvailableDelegation resource. */ + id?: string; + /** Resource type. */ + type?: string; + /** The name of the service and resource. */ + serviceName?: string; + /** The actions permitted to the service upon delegation. */ + actions?: string[]; +} + +export function availableDelegationDeserializer(item: any): AvailableDelegation { + return { + name: item["name"], + id: item["id"], + type: item["type"], + serviceName: item["serviceName"], + actions: !item["actions"] + ? item["actions"] + : item["actions"].map((p: any) => { + return p; + }), + }; +} + +/** An array of available service aliases. */ +export interface _AvailableServiceAliasesResult { + /** The AvailableServiceAlias items on this page */ + value: AvailableServiceAlias[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _availableServiceAliasesResultDeserializer( + item: any, +): _AvailableServiceAliasesResult { + return { + value: availableServiceAliasArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function availableServiceAliasArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return availableServiceAliasDeserializer(item); + }); +} + +/** The available service alias. */ +export interface AvailableServiceAlias { + /** The name of the service alias. */ + name?: string; + /** The ID of the service alias. */ + id?: string; + /** The type of the resource. */ + type?: string; + /** The resource name of the service alias. */ + resourceName?: string; +} + +export function availableServiceAliasDeserializer(item: any): AvailableServiceAlias { + return { + name: item["name"], + id: item["id"], + type: item["type"], + resourceName: item["resourceName"], + }; +} + +export function azureFirewallFqdnTagArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return azureFirewallFqdnTagDeserializer(item); + }); +} + +/** Azure Firewall FQDN Tag Resource. */ +export interface AzureFirewallFqdnTag extends Resource { + /** A unique read-only string that changes whenever the resource is updated. */ + readonly etag?: string; + /** The provisioning state of the Azure firewall FQDN tag resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The name of this FQDN Tag. */ + readonly fqdnTagName?: string; +} + +export function azureFirewallFqdnTagDeserializer(item: any): AzureFirewallFqdnTag { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _azureFirewallFqdnTagPropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** Azure Firewall FQDN Tag Properties. */ +export interface AzureFirewallFqdnTagPropertiesFormat { + /** The provisioning state of the Azure firewall FQDN tag resource. */ + readonly provisioningState?: CommonProvisioningState; + /** The name of this FQDN Tag. */ + readonly fqdnTagName?: string; +} + +export function azureFirewallFqdnTagPropertiesFormatDeserializer( + item: any, +): AzureFirewallFqdnTagPropertiesFormat { + return { + provisioningState: item["provisioningState"], + fqdnTagName: item["fqdnTagName"], + }; +} + +/** Paged collection of EndpointServiceResult items */ +export interface _EndpointServicesListResult { + /** The EndpointServiceResult items on this page */ + value: EndpointServiceResult[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _endpointServicesListResultDeserializer(item: any): _EndpointServicesListResult { + return { + value: endpointServiceResultArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function endpointServiceResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return endpointServiceResultDeserializer(item); + }); +} + +/** Endpoint service. */ +export interface EndpointServiceResult extends SubResource { + /** Name of the endpoint service. */ + readonly name?: string; + /** Type of the endpoint service. */ + readonly type?: string; +} + +export function endpointServiceResultDeserializer(item: any): EndpointServiceResult { + return { + id: item["id"], + name: item["name"], + type: item["type"], + }; +} + +export function expressRouteServiceProviderArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteServiceProviderDeserializer(item); + }); +} + +/** A ExpressRouteResourceProvider object. */ +export interface ExpressRouteServiceProvider extends Resource { + /** A list of peering locations. */ + peeringLocations?: string[]; + /** A list of bandwidths offered. */ + bandwidthsOffered?: ExpressRouteServiceProviderBandwidthsOffered[]; + /** The provisioning state of the express route service provider resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function expressRouteServiceProviderDeserializer(item: any): ExpressRouteServiceProvider { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _expressRouteServiceProviderPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of ExpressRouteServiceProvider. */ +export interface ExpressRouteServiceProviderPropertiesFormat { + /** A list of peering locations. */ + peeringLocations?: string[]; + /** A list of bandwidths offered. */ + bandwidthsOffered?: ExpressRouteServiceProviderBandwidthsOffered[]; + /** The provisioning state of the express route service provider resource. */ + readonly provisioningState?: CommonProvisioningState; +} + +export function expressRouteServiceProviderPropertiesFormatDeserializer( + item: any, +): ExpressRouteServiceProviderPropertiesFormat { + return { + peeringLocations: !item["peeringLocations"] + ? item["peeringLocations"] + : item["peeringLocations"].map((p: any) => { + return p; + }), + bandwidthsOffered: !item["bandwidthsOffered"] + ? item["bandwidthsOffered"] + : expressRouteServiceProviderBandwidthsOfferedArrayDeserializer(item["bandwidthsOffered"]), + provisioningState: item["provisioningState"], + }; +} + +export function expressRouteServiceProviderBandwidthsOfferedArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteServiceProviderBandwidthsOfferedDeserializer(item); + }); +} + +/** Contains bandwidths offered in ExpressRouteServiceProvider resources. */ +export interface ExpressRouteServiceProviderBandwidthsOffered { + /** The OfferName. */ + offerName?: string; + /** The ValueInMbps. */ + valueInMbps?: number; +} + +export function expressRouteServiceProviderBandwidthsOfferedDeserializer( + item: any, +): ExpressRouteServiceProviderBandwidthsOffered { + return { + offerName: item["offerName"], + valueInMbps: item["valueInMbps"], + }; +} + +/** Paged collection of PerimeterAssociableResource items */ +export interface _PerimeterAssociableResourcesListResult { + /** The PerimeterAssociableResource items on this page */ + value: PerimeterAssociableResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _perimeterAssociableResourcesListResultDeserializer( + item: any, +): _PerimeterAssociableResourcesListResult { + return { + value: perimeterAssociableResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function perimeterAssociableResourceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return perimeterAssociableResourceDeserializer(item); + }); +} + +/** Resource that is onboarded to use network security perimeter. Also referred as perimeter associable resource. */ +export interface PerimeterAssociableResource { + /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** Identifier of the perimeter associable resource. */ + readonly id?: string; + /** Resource type. */ + readonly type?: string; + /** A friendly name for the properties of perimeter associable resources. */ + readonly displayName?: string; + /** Resource type/provider name. */ + readonly resourceType?: string; + /** Public DNS zone names of the resources. */ + readonly publicDnsZones?: string[]; + /** Service tags associated with the resource provider. */ + readonly serviceTags?: string[]; + /** The readiness state of the resource type for NSP support. */ + readonly readinessState?: NspReadinessState; + /** Indicates whether the resource type supports outbound scenario. */ + readonly outboundSupported?: boolean; + /** Description of the PaaS resource type. */ + readonly description?: string; +} + +export function perimeterAssociableResourceDeserializer(item: any): PerimeterAssociableResource { + return { + ...(!item["properties"] + ? item["properties"] + : _perimeterAssociableResourcePropertiesDeserializer(item["properties"])), + name: item["name"], + id: item["id"], + type: item["type"], + }; +} + +/** Properties of the perimeter associable resources. */ +export interface PerimeterAssociableResourceProperties { + /** A friendly name for the properties of perimeter associable resources. */ + readonly displayName?: string; + /** Resource type/provider name. */ + readonly resourceType?: string; + /** Public DNS zone names of the resources. */ + readonly publicDnsZones?: string[]; + /** Service tags associated with the resource provider. */ + readonly serviceTags?: string[]; + /** The readiness state of the resource type for NSP support. */ + readonly readinessState?: NspReadinessState; + /** Indicates whether the resource type supports outbound scenario. */ + readonly outboundSupported?: boolean; + /** Description of the PaaS resource type. */ + readonly description?: string; +} + +export function perimeterAssociableResourcePropertiesDeserializer( + item: any, +): PerimeterAssociableResourceProperties { + return { + displayName: item["displayName"], + resourceType: item["resourceType"], + publicDnsZones: !item["publicDnsZones"] + ? item["publicDnsZones"] + : item["publicDnsZones"].map((p: any) => { + return p; + }), + serviceTags: !item["serviceTags"] + ? item["serviceTags"] + : item["serviceTags"].map((p: any) => { + return p; + }), + readinessState: item["readinessState"], + outboundSupported: item["outboundSupported"], + description: item["description"], + }; +} + +/** The readiness state of the resource type for NSP support. */ +export enum KnownNspReadinessState { + /** Resource Provider is actively being onboarded to NSP */ + Onboarding = "Onboarding", + /** Resource Provider supports NSP in Preview */ + Preview = "Preview", + /** Resource Provider is generally available for NSP Integration */ + GA = "GA", + /** NSP Onboarding is not started or not Supported */ + NotReady = "NotReady", +} + +/** + * The readiness state of the resource type for NSP support. \ + * {@link KnownNspReadinessState} can be used interchangeably with NspReadinessState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Onboarding**: Resource Provider is actively being onboarded to NSP \ + * **Preview**: Resource Provider supports NSP in Preview \ + * **GA**: Resource Provider is generally available for NSP Integration \ + * **NotReady**: NSP Onboarding is not started or not Supported + */ +export type NspReadinessState = string; + +/** Result of the request to list NSP service tags. */ +export interface _NspServiceTagsListResult { + /** The NspServiceTagsResource items on this page */ + value: NspServiceTagsResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _nspServiceTagsListResultDeserializer(item: any): _NspServiceTagsListResult { + return { + value: nspServiceTagsResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function nspServiceTagsResourceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return nspServiceTagsResourceDeserializer(item); + }); +} + +/** Resource containing list of NSP service tags. */ +export interface NspServiceTagsResource { + /** NSP service tags. */ + serviceTags?: string[]; +} + +export function nspServiceTagsResourceDeserializer(item: any): NspServiceTagsResource { + return { + serviceTags: !item["serviceTags"] + ? item["serviceTags"] + : item["serviceTags"].map((p: any) => { + return p; + }), + }; +} + +/** An array of available PrivateEndpoint types. */ +export interface _AvailablePrivateEndpointTypesResult { + /** The AvailablePrivateEndpointType items on this page */ + value: AvailablePrivateEndpointType[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _availablePrivateEndpointTypesResultDeserializer( + item: any, +): _AvailablePrivateEndpointTypesResult { + return { + value: availablePrivateEndpointTypeArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function availablePrivateEndpointTypeArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return availablePrivateEndpointTypeDeserializer(item); + }); +} + +/** The information of an AvailablePrivateEndpointType. */ +export interface AvailablePrivateEndpointType { + /** The name of the service and resource. */ + name?: string; + /** A unique identifier of the AvailablePrivateEndpoint Type resource. */ + id?: string; + /** Resource type. */ + type?: string; + /** The name of the service and resource. */ + resourceName?: string; + /** Display name of the resource. */ + displayName?: string; +} + +export function availablePrivateEndpointTypeDeserializer(item: any): AvailablePrivateEndpointType { + return { + name: item["name"], + id: item["id"], + type: item["type"], + resourceName: item["resourceName"], + displayName: item["displayName"], + }; +} + +export function bgpServiceCommunityArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return bgpServiceCommunityDeserializer(item); + }); +} + +/** Service Community Properties. */ +export interface BgpServiceCommunity extends Resource { + /** The name of the bgp community. e.g. Skype. */ + serviceName?: string; + /** A list of bgp communities. */ + bgpCommunities?: BGPCommunity[]; +} + +export function bgpServiceCommunityDeserializer(item: any): BgpServiceCommunity { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + ...(!item["properties"] + ? item["properties"] + : _bgpServiceCommunityPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of Service Community. */ +export interface BgpServiceCommunityPropertiesFormat { + /** The name of the bgp community. e.g. Skype. */ + serviceName?: string; + /** A list of bgp communities. */ + bgpCommunities?: BGPCommunity[]; +} + +export function bgpServiceCommunityPropertiesFormatDeserializer( + item: any, +): BgpServiceCommunityPropertiesFormat { + return { + serviceName: item["serviceName"], + bgpCommunities: !item["bgpCommunities"] + ? item["bgpCommunities"] + : bgpCommunityArrayDeserializer(item["bgpCommunities"]), + }; +} + +export function bgpCommunityArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return bgpCommunityDeserializer(item); + }); +} + +/** Contains bgp community information offered in Service Community resources. */ +export interface BGPCommunity { + /** The region which the service support. e.g. For O365, region is Global. */ + serviceSupportedRegion?: string; + /** The name of the bgp community. e.g. Skype. */ + communityName?: string; + /** The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. */ + communityValue?: string; + /** The prefixes that the bgp community contains. */ + communityPrefixes?: string[]; + /** Customer is authorized to use bgp community or not. */ + isAuthorizedToUse?: boolean; + /** The service group of the bgp community contains. */ + serviceGroup?: string; +} + +export function bgpCommunityDeserializer(item: any): BGPCommunity { + return { + serviceSupportedRegion: item["serviceSupportedRegion"], + communityName: item["communityName"], + communityValue: item["communityValue"], + communityPrefixes: !item["communityPrefixes"] + ? item["communityPrefixes"] + : item["communityPrefixes"].map((p: any) => { + return p; + }), + isAuthorizedToUse: item["isAuthorizedToUse"], + serviceGroup: item["serviceGroup"], + }; +} + +/** Response for the ListServiceTags API service call. */ +export interface ServiceTagsListResult { + /** The name of the cloud. */ + readonly name?: string; + /** The ID of the cloud. */ + readonly id?: string; + /** The azure resource type. */ + readonly type?: string; + /** The iteration number. */ + readonly changeNumber?: string; + /** The name of the cloud. */ + readonly cloud?: string; + /** The list of service tag information resources. */ + readonly values?: ServiceTagInformation[]; + /** The URL to get next page of service tag information resources. */ + readonly nextLink?: string; +} + +export function serviceTagsListResultDeserializer(item: any): ServiceTagsListResult { + return { + name: item["name"], + id: item["id"], + type: item["type"], + changeNumber: item["changeNumber"], + cloud: item["cloud"], + values: !item["values"] + ? item["values"] + : serviceTagInformationArrayDeserializer(item["values"]), + nextLink: item["nextLink"], + }; +} + +export function serviceTagInformationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceTagInformationDeserializer(item); + }); +} + +/** The service tag information. */ +export interface ServiceTagInformation { + /** Properties of the service tag information. */ + readonly properties?: ServiceTagInformationPropertiesFormat; + /** The name of service tag. */ + readonly name?: string; + /** The ID of service tag. */ + readonly id?: string; + /** The iteration number of service tag object for region. */ + readonly serviceTagChangeNumber?: string; +} + +export function serviceTagInformationDeserializer(item: any): ServiceTagInformation { + return { + properties: !item["properties"] + ? item["properties"] + : serviceTagInformationPropertiesFormatDeserializer(item["properties"]), + name: item["name"], + id: item["id"], + serviceTagChangeNumber: item["serviceTagChangeNumber"], + }; +} + +/** Properties of the service tag information. */ +export interface ServiceTagInformationPropertiesFormat { + /** The iteration number of service tag. */ + readonly changeNumber?: string; + /** The region of service tag. */ + readonly region?: string; + /** The name of system service. */ + readonly systemService?: string; + /** The list of IP address prefixes. */ + readonly addressPrefixes?: string[]; + /** The state of the service tag. */ + readonly state?: string; +} + +export function serviceTagInformationPropertiesFormatDeserializer( + item: any, +): ServiceTagInformationPropertiesFormat { + return { + changeNumber: item["changeNumber"], + region: item["region"], + systemService: item["systemService"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + state: item["state"], + }; +} + +/** Response for Get ServiceTagInformation API service call. Retrieves the list of service tag information resources. */ +export interface _ServiceTagInformationListResult { + /** The ServiceTagInformation items on this page */ + value: ServiceTagInformation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _serviceTagInformationListResultDeserializer( + item: any, +): _ServiceTagInformationListResult { + return { + value: serviceTagInformationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The list usages operation response. */ +export interface _UsagesListResult { + /** The Usage items on this page */ + value: Usage[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _usagesListResultDeserializer(item: any): _UsagesListResult { + return { + value: usageArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function usageArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return usageDeserializer(item); + }); +} + +/** The network resource usage. */ +export interface Usage { + /** Resource identifier. */ + readonly id?: string; + /** An enum describing the unit of measurement. */ + unit: UsageUnit; + /** The current value of the usage. */ + currentValue: number; + /** The limit of usage. */ + limit: number; + /** The name of the type of usage. */ + name: UsageName; +} + +export function usageDeserializer(item: any): Usage { + return { + id: item["id"], + unit: item["unit"], + currentValue: item["currentValue"], + limit: item["limit"], + name: usageNameDeserializer(item["name"]), + }; +} + +/** An enum describing the unit of measurement. */ +export enum KnownUsageUnit { + /** Count */ + Count = "Count", +} + +/** + * An enum describing the unit of measurement. \ + * {@link KnownUsageUnit} can be used interchangeably with UsageUnit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Count**: Count + */ +export type UsageUnit = string; + +/** The usage names. */ +export interface UsageName { + /** A string describing the resource name. */ + value?: string; + /** A localized string describing the resource name. */ + localizedValue?: string; +} + +export function usageNameDeserializer(item: any): UsageName { + return { + value: item["value"], + localizedValue: item["localizedValue"], + }; +} + +/** Controls verbosity of the returned load balancer resource. */ +export enum KnownLoadBalancerDetailLevel { + /** When set to 'Reduced', read-only reference collections may be omitted. */ + Reduced = "Reduced", +} + +/** + * Controls verbosity of the returned load balancer resource. \ + * {@link KnownLoadBalancerDetailLevel} can be used interchangeably with LoadBalancerDetailLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Reduced**: When set to 'Reduced', read-only reference collections may be omitted. + */ +export type LoadBalancerDetailLevel = string; + +/** Known values of {@link SyncRemoteAddressSpace} that the service accepts. */ +export enum KnownSyncRemoteAddressSpace { + /** true */ + True = "true", +} + +/** Type of SyncRemoteAddressSpace */ +export type SyncRemoteAddressSpace = string; + +export function peerRouteArrayRecordDeserializer( + item: Record, +): Record> { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : peerRouteArrayDeserializer(item[key]); + }); + return result; +} + +export function peerRouteArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return peerRouteDeserializer(item); + }); +} + +export function expressRouteFailoverTestDetailsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteFailoverTestDetailsDeserializer(item); + }); +} + +export function expressRouteFailoverSingleTestDetailsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteFailoverSingleTestDetailsDeserializer(item); + }); +} + +export function expressRouteLinkFailoverAllTestsDetailsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteLinkFailoverAllTestsDetailsDeserializer(item); + }); +} + +export function expressRouteLinkFailoverSingleTestDetailsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteLinkFailoverSingleTestDetailsDeserializer(item); + }); +} + +export function _expressRouteProviderPortPropertiesDeserializer(item: any) { + return { + portPairDescriptor: item["portPairDescriptor"], + primaryAzurePort: item["primaryAzurePort"], + secondaryAzurePort: item["secondaryAzurePort"], + peeringLocation: item["peeringLocation"], + overprovisionFactor: item["overprovisionFactor"], + portBandwidthInMbps: item["portBandwidthInMbps"], + usedBandwidthInMbps: item["usedBandwidthInMbps"], + remainingBandwidthInMbps: item["remainingBandwidthInMbps"], + }; +} + +export function _effectiveConnectivityConfigurationPropertiesSerializer( + item: EffectiveConnectivityConfiguration, +): any { + return { + description: item["description"], + connectivityTopology: item["connectivityTopology"], + hubs: !item["hubs"] ? item["hubs"] : hubArraySerializer(item["hubs"]), + isGlobal: item["isGlobal"], + connectivityCapabilities: !item["connectivityCapabilities"] + ? item["connectivityCapabilities"] + : connectivityConfigurationPropertiesConnectivityCapabilitiesSerializer( + item["connectivityCapabilities"], + ), + appliesToGroups: !item["appliesToGroups"] + ? item["appliesToGroups"] + : connectivityGroupItemArraySerializer(item["appliesToGroups"]), + deleteExistingPeering: item["deleteExistingPeering"], + }; +} + +export function _effectiveConnectivityConfigurationPropertiesDeserializer(item: any) { + return { + description: item["description"], + connectivityTopology: item["connectivityTopology"], + hubs: !item["hubs"] ? item["hubs"] : hubArrayDeserializer(item["hubs"]), + isGlobal: item["isGlobal"], + connectivityCapabilities: !item["connectivityCapabilities"] + ? item["connectivityCapabilities"] + : connectivityConfigurationPropertiesConnectivityCapabilitiesDeserializer( + item["connectivityCapabilities"], + ), + appliesToGroups: !item["appliesToGroups"] + ? item["appliesToGroups"] + : connectivityGroupItemArrayDeserializer(item["appliesToGroups"]), + provisioningState: item["provisioningState"], + deleteExistingPeering: item["deleteExistingPeering"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _configurationGroupPropertiesSerializer(item: ConfigurationGroup): any { + return { description: item["description"], memberType: item["memberType"] }; +} + +export function _configurationGroupPropertiesDeserializer(item: any) { + return { + description: item["description"], + memberType: item["memberType"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _activeSecurityAdminRulePropertiesSerializer(item: ActiveSecurityAdminRule): any { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] ? item["sources"] : addressPrefixItemArraySerializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArraySerializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + }; +} + +export function _activeSecurityAdminRulePropertiesDeserializer(item: any) { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] + ? item["sources"] + : addressPrefixItemArrayDeserializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArrayDeserializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _activeDefaultSecurityAdminRulePropertiesSerializer( + item: ActiveDefaultSecurityAdminRule, +): any { + return { flag: item["flag"] }; +} + +export function _activeDefaultSecurityAdminRulePropertiesDeserializer(item: any) { + return { + description: item["description"], + flag: item["flag"], + protocol: item["protocol"], + sources: !item["sources"] + ? item["sources"] + : addressPrefixItemArrayDeserializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArrayDeserializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _effectiveSecurityAdminRulePropertiesSerializer( + item: EffectiveSecurityAdminRule, +): any { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] ? item["sources"] : addressPrefixItemArraySerializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArraySerializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + }; +} + +export function _effectiveSecurityAdminRulePropertiesDeserializer(item: any) { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] + ? item["sources"] + : addressPrefixItemArrayDeserializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArrayDeserializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _effectiveDefaultSecurityAdminRulePropertiesSerializer( + item: EffectiveDefaultSecurityAdminRule, +): any { + return { flag: item["flag"] }; +} + +export function _effectiveDefaultSecurityAdminRulePropertiesDeserializer(item: any) { + return { + description: item["description"], + flag: item["flag"], + protocol: item["protocol"], + sources: !item["sources"] + ? item["sources"] + : addressPrefixItemArrayDeserializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArrayDeserializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _operationPropertiesDeserializer(item: any) { + return { + serviceSpecification: !item["serviceSpecification"] + ? item["serviceSpecification"] + : operationPropertiesFormatServiceSpecificationDeserializer(item["serviceSpecification"]), + }; +} + +export function _applicationGatewayAuthenticationCertificatePropertiesSerializer( + item: ApplicationGatewayAuthenticationCertificate, +): any { + return { data: item["data"] }; +} + +export function _applicationGatewayAuthenticationCertificatePropertiesDeserializer(item: any) { + return { + data: item["data"], + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayTrustedRootCertificatePropertiesSerializer( + item: ApplicationGatewayTrustedRootCertificate, +): any { + return { data: item["data"], keyVaultSecretId: item["keyVaultSecretId"] }; +} + +export function _applicationGatewayTrustedRootCertificatePropertiesDeserializer(item: any) { + return { + data: item["data"], + keyVaultSecretId: item["keyVaultSecretId"], + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayTrustedClientCertificatePropertiesSerializer( + item: ApplicationGatewayTrustedClientCertificate, +): any { + return { data: item["data"] }; +} + +export function _applicationGatewayTrustedClientCertificatePropertiesDeserializer(item: any) { + return { + data: item["data"], + validatedCertData: item["validatedCertData"], + clientCertIssuerDN: item["clientCertIssuerDN"], + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewaySslCertificatePropertiesSerializer( + item: ApplicationGatewaySslCertificate, +): any { + return { + data: item["data"], + password: item["password"], + keyVaultSecretId: item["keyVaultSecretId"], + hsm: !item["hsm"] ? item["hsm"] : applicationGatewayManagedHsmSerializer(item["hsm"]), + }; +} + +export function _applicationGatewaySslCertificatePropertiesDeserializer(item: any) { + return { + data: item["data"], + password: item["password"], + publicCertData: item["publicCertData"], + keyVaultSecretId: item["keyVaultSecretId"], + hsm: !item["hsm"] ? item["hsm"] : applicationGatewayManagedHsmDeserializer(item["hsm"]), + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayFrontendIPConfigurationPropertiesSerializer( + item: ApplicationGatewayFrontendIPConfiguration, +): any { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceSerializer(item["publicIPAddress"]), + privateLinkConfiguration: !item["privateLinkConfiguration"] + ? item["privateLinkConfiguration"] + : subResourceSerializer(item["privateLinkConfiguration"]), + }; +} + +export function _applicationGatewayFrontendIPConfigurationPropertiesDeserializer(item: any) { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceDeserializer(item["publicIPAddress"]), + privateLinkConfiguration: !item["privateLinkConfiguration"] + ? item["privateLinkConfiguration"] + : subResourceDeserializer(item["privateLinkConfiguration"]), + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayFrontendPortPropertiesSerializer( + item: ApplicationGatewayFrontendPort, +): any { + return { port: item["port"] }; +} + +export function _applicationGatewayFrontendPortPropertiesDeserializer(item: any) { + return { + port: item["port"], + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayProbePropertiesSerializer(item: ApplicationGatewayProbe): any { + return { + protocol: item["protocol"], + host: item["host"], + path: item["path"], + interval: item["interval"], + timeout: item["timeout"], + unhealthyThreshold: item["unhealthyThreshold"], + pickHostNameFromBackendHttpSettings: item["pickHostNameFromBackendHttpSettings"], + pickHostNameFromBackendSettings: item["pickHostNameFromBackendSettings"], + minServers: item["minServers"], + match: !item["match"] + ? item["match"] + : applicationGatewayProbeHealthResponseMatchSerializer(item["match"]), + enableProbeProxyProtocolHeader: item["enableProbeProxyProtocolHeader"], + port: item["port"], + }; +} + +export function _applicationGatewayProbePropertiesDeserializer(item: any) { + return { + protocol: item["protocol"], + host: item["host"], + path: item["path"], + interval: item["interval"], + timeout: item["timeout"], + unhealthyThreshold: item["unhealthyThreshold"], + pickHostNameFromBackendHttpSettings: item["pickHostNameFromBackendHttpSettings"], + pickHostNameFromBackendSettings: item["pickHostNameFromBackendSettings"], + minServers: item["minServers"], + match: !item["match"] + ? item["match"] + : applicationGatewayProbeHealthResponseMatchDeserializer(item["match"]), + enableProbeProxyProtocolHeader: item["enableProbeProxyProtocolHeader"], + provisioningState: item["provisioningState"], + port: item["port"], + }; +} + +export function _applicationGatewayBackendHttpSettingsPropertiesSerializer( + item: ApplicationGatewayBackendHttpSettings, +): any { + return { + port: item["port"], + protocol: item["protocol"], + cookieBasedAffinity: item["cookieBasedAffinity"], + requestTimeout: item["requestTimeout"], + probe: !item["probe"] ? item["probe"] : subResourceSerializer(item["probe"]), + authenticationCertificates: !item["authenticationCertificates"] + ? item["authenticationCertificates"] + : subResourceArraySerializer(item["authenticationCertificates"]), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : subResourceArraySerializer(item["trustedRootCertificates"]), + connectionDraining: !item["connectionDraining"] + ? item["connectionDraining"] + : applicationGatewayConnectionDrainingSerializer(item["connectionDraining"]), + hostName: item["hostName"], + pickHostNameFromBackendAddress: item["pickHostNameFromBackendAddress"], + affinityCookieName: item["affinityCookieName"], + probeEnabled: item["probeEnabled"], + path: item["path"], + dedicatedBackendConnection: item["dedicatedBackendConnection"], + validateCertChainAndExpiry: item["validateCertChainAndExpiry"], + validateSNI: item["validateSNI"], + sniName: item["sniName"], + }; +} + +export function _applicationGatewayBackendHttpSettingsPropertiesDeserializer(item: any) { + return { + port: item["port"], + protocol: item["protocol"], + cookieBasedAffinity: item["cookieBasedAffinity"], + requestTimeout: item["requestTimeout"], + probe: !item["probe"] ? item["probe"] : subResourceDeserializer(item["probe"]), + authenticationCertificates: !item["authenticationCertificates"] + ? item["authenticationCertificates"] + : subResourceArrayDeserializer(item["authenticationCertificates"]), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : subResourceArrayDeserializer(item["trustedRootCertificates"]), + connectionDraining: !item["connectionDraining"] + ? item["connectionDraining"] + : applicationGatewayConnectionDrainingDeserializer(item["connectionDraining"]), + hostName: item["hostName"], + pickHostNameFromBackendAddress: item["pickHostNameFromBackendAddress"], + affinityCookieName: item["affinityCookieName"], + probeEnabled: item["probeEnabled"], + path: item["path"], + dedicatedBackendConnection: item["dedicatedBackendConnection"], + validateCertChainAndExpiry: item["validateCertChainAndExpiry"], + validateSNI: item["validateSNI"], + sniName: item["sniName"], + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayBackendSettingsPropertiesSerializer( + item: ApplicationGatewayBackendSettings, +): any { + return { + port: item["port"], + protocol: item["protocol"], + timeout: item["timeout"], + probe: !item["probe"] ? item["probe"] : subResourceSerializer(item["probe"]), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : subResourceArraySerializer(item["trustedRootCertificates"]), + hostName: item["hostName"], + pickHostNameFromBackendAddress: item["pickHostNameFromBackendAddress"], + enableL4ClientIpPreservation: item["enableL4ClientIpPreservation"], + }; +} + +export function _applicationGatewayBackendSettingsPropertiesDeserializer(item: any) { + return { + port: item["port"], + protocol: item["protocol"], + timeout: item["timeout"], + probe: !item["probe"] ? item["probe"] : subResourceDeserializer(item["probe"]), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : subResourceArrayDeserializer(item["trustedRootCertificates"]), + hostName: item["hostName"], + pickHostNameFromBackendAddress: item["pickHostNameFromBackendAddress"], + enableL4ClientIpPreservation: item["enableL4ClientIpPreservation"], + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayHttpListenerPropertiesSerializer( + item: ApplicationGatewayHttpListener, +): any { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceSerializer(item["frontendIPConfiguration"]), + frontendPort: !item["frontendPort"] + ? item["frontendPort"] + : subResourceSerializer(item["frontendPort"]), + protocol: item["protocol"], + hostName: item["hostName"], + sslCertificate: !item["sslCertificate"] + ? item["sslCertificate"] + : subResourceSerializer(item["sslCertificate"]), + sslProfile: !item["sslProfile"] + ? item["sslProfile"] + : subResourceSerializer(item["sslProfile"]), + requireServerNameIndication: item["requireServerNameIndication"], + customErrorConfigurations: !item["customErrorConfigurations"] + ? item["customErrorConfigurations"] + : applicationGatewayCustomErrorArraySerializer(item["customErrorConfigurations"]), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceSerializer(item["firewallPolicy"]), + hostNames: !item["hostNames"] + ? item["hostNames"] + : item["hostNames"].map((p: any) => { + return p; + }), + }; +} + +export function _applicationGatewayHttpListenerPropertiesDeserializer(item: any) { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceDeserializer(item["frontendIPConfiguration"]), + frontendPort: !item["frontendPort"] + ? item["frontendPort"] + : subResourceDeserializer(item["frontendPort"]), + protocol: item["protocol"], + hostName: item["hostName"], + sslCertificate: !item["sslCertificate"] + ? item["sslCertificate"] + : subResourceDeserializer(item["sslCertificate"]), + sslProfile: !item["sslProfile"] + ? item["sslProfile"] + : subResourceDeserializer(item["sslProfile"]), + requireServerNameIndication: item["requireServerNameIndication"], + provisioningState: item["provisioningState"], + customErrorConfigurations: !item["customErrorConfigurations"] + ? item["customErrorConfigurations"] + : applicationGatewayCustomErrorArrayDeserializer(item["customErrorConfigurations"]), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceDeserializer(item["firewallPolicy"]), + hostNames: !item["hostNames"] + ? item["hostNames"] + : item["hostNames"].map((p: any) => { + return p; + }), + }; +} + +export function _applicationGatewayListenerPropertiesSerializer( + item: ApplicationGatewayListener, +): any { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceSerializer(item["frontendIPConfiguration"]), + frontendPort: !item["frontendPort"] + ? item["frontendPort"] + : subResourceSerializer(item["frontendPort"]), + protocol: item["protocol"], + sslCertificate: !item["sslCertificate"] + ? item["sslCertificate"] + : subResourceSerializer(item["sslCertificate"]), + sslProfile: !item["sslProfile"] + ? item["sslProfile"] + : subResourceSerializer(item["sslProfile"]), + hostNames: !item["hostNames"] + ? item["hostNames"] + : item["hostNames"].map((p: any) => { + return p; + }), + }; +} + +export function _applicationGatewayListenerPropertiesDeserializer(item: any) { + return { + frontendIPConfiguration: !item["frontendIPConfiguration"] + ? item["frontendIPConfiguration"] + : subResourceDeserializer(item["frontendIPConfiguration"]), + frontendPort: !item["frontendPort"] + ? item["frontendPort"] + : subResourceDeserializer(item["frontendPort"]), + protocol: item["protocol"], + sslCertificate: !item["sslCertificate"] + ? item["sslCertificate"] + : subResourceDeserializer(item["sslCertificate"]), + sslProfile: !item["sslProfile"] + ? item["sslProfile"] + : subResourceDeserializer(item["sslProfile"]), + provisioningState: item["provisioningState"], + hostNames: !item["hostNames"] + ? item["hostNames"] + : item["hostNames"].map((p: any) => { + return p; + }), + }; +} + +export function _applicationGatewaySslProfilePropertiesSerializer( + item: ApplicationGatewaySslProfile, +): any { + return { + trustedClientCertificates: !item["trustedClientCertificates"] + ? item["trustedClientCertificates"] + : subResourceArraySerializer(item["trustedClientCertificates"]), + sslPolicy: !item["sslPolicy"] + ? item["sslPolicy"] + : applicationGatewaySslPolicySerializer(item["sslPolicy"]), + clientAuthConfiguration: !item["clientAuthConfiguration"] + ? item["clientAuthConfiguration"] + : applicationGatewayClientAuthConfigurationSerializer(item["clientAuthConfiguration"]), + }; +} + +export function _applicationGatewaySslProfilePropertiesDeserializer(item: any) { + return { + trustedClientCertificates: !item["trustedClientCertificates"] + ? item["trustedClientCertificates"] + : subResourceArrayDeserializer(item["trustedClientCertificates"]), + sslPolicy: !item["sslPolicy"] + ? item["sslPolicy"] + : applicationGatewaySslPolicyDeserializer(item["sslPolicy"]), + clientAuthConfiguration: !item["clientAuthConfiguration"] + ? item["clientAuthConfiguration"] + : applicationGatewayClientAuthConfigurationDeserializer(item["clientAuthConfiguration"]), + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayPathRulePropertiesSerializer( + item: ApplicationGatewayPathRule, +): any { + return { + paths: !item["paths"] + ? item["paths"] + : item["paths"].map((p: any) => { + return p; + }), + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + backendHttpSettings: !item["backendHttpSettings"] + ? item["backendHttpSettings"] + : subResourceSerializer(item["backendHttpSettings"]), + redirectConfiguration: !item["redirectConfiguration"] + ? item["redirectConfiguration"] + : subResourceSerializer(item["redirectConfiguration"]), + rewriteRuleSet: !item["rewriteRuleSet"] + ? item["rewriteRuleSet"] + : subResourceSerializer(item["rewriteRuleSet"]), + loadDistributionPolicy: !item["loadDistributionPolicy"] + ? item["loadDistributionPolicy"] + : subResourceSerializer(item["loadDistributionPolicy"]), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceSerializer(item["firewallPolicy"]), + }; +} + +export function _applicationGatewayPathRulePropertiesDeserializer(item: any) { + return { + paths: !item["paths"] + ? item["paths"] + : item["paths"].map((p: any) => { + return p; + }), + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + backendHttpSettings: !item["backendHttpSettings"] + ? item["backendHttpSettings"] + : subResourceDeserializer(item["backendHttpSettings"]), + redirectConfiguration: !item["redirectConfiguration"] + ? item["redirectConfiguration"] + : subResourceDeserializer(item["redirectConfiguration"]), + rewriteRuleSet: !item["rewriteRuleSet"] + ? item["rewriteRuleSet"] + : subResourceDeserializer(item["rewriteRuleSet"]), + loadDistributionPolicy: !item["loadDistributionPolicy"] + ? item["loadDistributionPolicy"] + : subResourceDeserializer(item["loadDistributionPolicy"]), + provisioningState: item["provisioningState"], + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceDeserializer(item["firewallPolicy"]), + }; +} + +export function _applicationGatewayUrlPathMapPropertiesSerializer( + item: ApplicationGatewayUrlPathMap, +): any { + return { + defaultBackendAddressPool: !item["defaultBackendAddressPool"] + ? item["defaultBackendAddressPool"] + : subResourceSerializer(item["defaultBackendAddressPool"]), + defaultBackendHttpSettings: !item["defaultBackendHttpSettings"] + ? item["defaultBackendHttpSettings"] + : subResourceSerializer(item["defaultBackendHttpSettings"]), + defaultRewriteRuleSet: !item["defaultRewriteRuleSet"] + ? item["defaultRewriteRuleSet"] + : subResourceSerializer(item["defaultRewriteRuleSet"]), + defaultRedirectConfiguration: !item["defaultRedirectConfiguration"] + ? item["defaultRedirectConfiguration"] + : subResourceSerializer(item["defaultRedirectConfiguration"]), + defaultLoadDistributionPolicy: !item["defaultLoadDistributionPolicy"] + ? item["defaultLoadDistributionPolicy"] + : subResourceSerializer(item["defaultLoadDistributionPolicy"]), + pathRules: !item["pathRules"] + ? item["pathRules"] + : applicationGatewayPathRuleArraySerializer(item["pathRules"]), + }; +} + +export function _applicationGatewayUrlPathMapPropertiesDeserializer(item: any) { + return { + defaultBackendAddressPool: !item["defaultBackendAddressPool"] + ? item["defaultBackendAddressPool"] + : subResourceDeserializer(item["defaultBackendAddressPool"]), + defaultBackendHttpSettings: !item["defaultBackendHttpSettings"] + ? item["defaultBackendHttpSettings"] + : subResourceDeserializer(item["defaultBackendHttpSettings"]), + defaultRewriteRuleSet: !item["defaultRewriteRuleSet"] + ? item["defaultRewriteRuleSet"] + : subResourceDeserializer(item["defaultRewriteRuleSet"]), + defaultRedirectConfiguration: !item["defaultRedirectConfiguration"] + ? item["defaultRedirectConfiguration"] + : subResourceDeserializer(item["defaultRedirectConfiguration"]), + defaultLoadDistributionPolicy: !item["defaultLoadDistributionPolicy"] + ? item["defaultLoadDistributionPolicy"] + : subResourceDeserializer(item["defaultLoadDistributionPolicy"]), + pathRules: !item["pathRules"] + ? item["pathRules"] + : applicationGatewayPathRuleArrayDeserializer(item["pathRules"]), + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayRequestRoutingRulePropertiesSerializer( + item: ApplicationGatewayRequestRoutingRule, +): any { + return { + ruleType: item["ruleType"], + priority: item["priority"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + backendHttpSettings: !item["backendHttpSettings"] + ? item["backendHttpSettings"] + : subResourceSerializer(item["backendHttpSettings"]), + httpListener: !item["httpListener"] + ? item["httpListener"] + : subResourceSerializer(item["httpListener"]), + urlPathMap: !item["urlPathMap"] + ? item["urlPathMap"] + : subResourceSerializer(item["urlPathMap"]), + rewriteRuleSet: !item["rewriteRuleSet"] + ? item["rewriteRuleSet"] + : subResourceSerializer(item["rewriteRuleSet"]), + redirectConfiguration: !item["redirectConfiguration"] + ? item["redirectConfiguration"] + : subResourceSerializer(item["redirectConfiguration"]), + loadDistributionPolicy: !item["loadDistributionPolicy"] + ? item["loadDistributionPolicy"] + : subResourceSerializer(item["loadDistributionPolicy"]), + entraJWTValidationConfig: !item["entraJWTValidationConfig"] + ? item["entraJWTValidationConfig"] + : subResourceSerializer(item["entraJWTValidationConfig"]), + }; +} + +export function _applicationGatewayRequestRoutingRulePropertiesDeserializer(item: any) { + return { + ruleType: item["ruleType"], + priority: item["priority"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + backendHttpSettings: !item["backendHttpSettings"] + ? item["backendHttpSettings"] + : subResourceDeserializer(item["backendHttpSettings"]), + httpListener: !item["httpListener"] + ? item["httpListener"] + : subResourceDeserializer(item["httpListener"]), + urlPathMap: !item["urlPathMap"] + ? item["urlPathMap"] + : subResourceDeserializer(item["urlPathMap"]), + rewriteRuleSet: !item["rewriteRuleSet"] + ? item["rewriteRuleSet"] + : subResourceDeserializer(item["rewriteRuleSet"]), + redirectConfiguration: !item["redirectConfiguration"] + ? item["redirectConfiguration"] + : subResourceDeserializer(item["redirectConfiguration"]), + loadDistributionPolicy: !item["loadDistributionPolicy"] + ? item["loadDistributionPolicy"] + : subResourceDeserializer(item["loadDistributionPolicy"]), + entraJWTValidationConfig: !item["entraJWTValidationConfig"] + ? item["entraJWTValidationConfig"] + : subResourceDeserializer(item["entraJWTValidationConfig"]), + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayRoutingRulePropertiesSerializer( + item: ApplicationGatewayRoutingRule, +): any { + return { + ruleType: item["ruleType"], + priority: item["priority"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + backendSettings: !item["backendSettings"] + ? item["backendSettings"] + : subResourceSerializer(item["backendSettings"]), + listener: !item["listener"] ? item["listener"] : subResourceSerializer(item["listener"]), + }; +} + +export function _applicationGatewayRoutingRulePropertiesDeserializer(item: any) { + return { + ruleType: item["ruleType"], + priority: item["priority"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + backendSettings: !item["backendSettings"] + ? item["backendSettings"] + : subResourceDeserializer(item["backendSettings"]), + listener: !item["listener"] ? item["listener"] : subResourceDeserializer(item["listener"]), + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayRewriteRuleSetPropertiesSerializer( + item: ApplicationGatewayRewriteRuleSet, +): any { + return { + rewriteRules: !item["rewriteRules"] + ? item["rewriteRules"] + : applicationGatewayRewriteRuleArraySerializer(item["rewriteRules"]), + }; +} + +export function _applicationGatewayRewriteRuleSetPropertiesDeserializer(item: any) { + return { + rewriteRules: !item["rewriteRules"] + ? item["rewriteRules"] + : applicationGatewayRewriteRuleArrayDeserializer(item["rewriteRules"]), + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayRedirectConfigurationPropertiesSerializer( + item: ApplicationGatewayRedirectConfiguration, +): any { + return { + redirectType: item["redirectType"], + targetListener: !item["targetListener"] + ? item["targetListener"] + : subResourceSerializer(item["targetListener"]), + targetUrl: item["targetUrl"], + includePath: item["includePath"], + includeQueryString: item["includeQueryString"], + requestRoutingRules: !item["requestRoutingRules"] + ? item["requestRoutingRules"] + : subResourceArraySerializer(item["requestRoutingRules"]), + urlPathMaps: !item["urlPathMaps"] + ? item["urlPathMaps"] + : subResourceArraySerializer(item["urlPathMaps"]), + pathRules: !item["pathRules"] + ? item["pathRules"] + : subResourceArraySerializer(item["pathRules"]), + }; +} + +export function _applicationGatewayRedirectConfigurationPropertiesDeserializer(item: any) { + return { + redirectType: item["redirectType"], + targetListener: !item["targetListener"] + ? item["targetListener"] + : subResourceDeserializer(item["targetListener"]), + targetUrl: item["targetUrl"], + includePath: item["includePath"], + includeQueryString: item["includeQueryString"], + requestRoutingRules: !item["requestRoutingRules"] + ? item["requestRoutingRules"] + : subResourceArrayDeserializer(item["requestRoutingRules"]), + urlPathMaps: !item["urlPathMaps"] + ? item["urlPathMaps"] + : subResourceArrayDeserializer(item["urlPathMaps"]), + pathRules: !item["pathRules"] + ? item["pathRules"] + : subResourceArrayDeserializer(item["pathRules"]), + }; +} + +export function _applicationGatewayPrivateLinkIpConfigurationPropertiesSerializer( + item: ApplicationGatewayPrivateLinkIpConfiguration, +): any { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + primary: item["primary"], + }; +} + +export function _applicationGatewayPrivateLinkIpConfigurationPropertiesDeserializer(item: any) { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + primary: item["primary"], + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayPrivateLinkConfigurationPropertiesSerializer( + item: ApplicationGatewayPrivateLinkConfiguration, +): any { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : applicationGatewayPrivateLinkIpConfigurationArraySerializer(item["ipConfigurations"]), + }; +} + +export function _applicationGatewayPrivateLinkConfigurationPropertiesDeserializer(item: any) { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : applicationGatewayPrivateLinkIpConfigurationArrayDeserializer(item["ipConfigurations"]), + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayPrivateEndpointConnectionPropertiesSerializer( + item: ApplicationGatewayPrivateEndpointConnection, +): any { + return { + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateSerializer(item["privateLinkServiceConnectionState"]), + }; +} + +export function _applicationGatewayPrivateEndpointConnectionPropertiesDeserializer(item: any) { + return { + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : privateEndpointDeserializer(item["privateEndpoint"]), + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateDeserializer(item["privateLinkServiceConnectionState"]), + provisioningState: item["provisioningState"], + linkIdentifier: item["linkIdentifier"], + }; +} + +export function _applicationGatewayLoadDistributionTargetPropertiesSerializer( + item: ApplicationGatewayLoadDistributionTarget, +): any { + return { + weightPerServer: item["weightPerServer"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceSerializer(item["backendAddressPool"]), + }; +} + +export function _applicationGatewayLoadDistributionTargetPropertiesDeserializer(item: any) { + return { + weightPerServer: item["weightPerServer"], + backendAddressPool: !item["backendAddressPool"] + ? item["backendAddressPool"] + : subResourceDeserializer(item["backendAddressPool"]), + }; +} + +export function _applicationGatewayLoadDistributionPolicyPropertiesSerializer( + item: ApplicationGatewayLoadDistributionPolicy, +): any { + return { + loadDistributionTargets: !item["loadDistributionTargets"] + ? item["loadDistributionTargets"] + : applicationGatewayLoadDistributionTargetArraySerializer(item["loadDistributionTargets"]), + loadDistributionAlgorithm: item["loadDistributionAlgorithm"], + }; +} + +export function _applicationGatewayLoadDistributionPolicyPropertiesDeserializer(item: any) { + return { + loadDistributionTargets: !item["loadDistributionTargets"] + ? item["loadDistributionTargets"] + : applicationGatewayLoadDistributionTargetArrayDeserializer(item["loadDistributionTargets"]), + loadDistributionAlgorithm: item["loadDistributionAlgorithm"], + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayEntraJWTValidationConfigPropertiesSerializer( + item: ApplicationGatewayEntraJWTValidationConfig, +): any { + return { + unAuthorizedRequestAction: item["unAuthorizedRequestAction"], + tenantId: item["tenantId"], + clientId: item["clientId"], + audiences: !item["audiences"] + ? item["audiences"] + : item["audiences"].map((p: any) => { + return p; + }), + }; +} + +export function _applicationGatewayEntraJWTValidationConfigPropertiesDeserializer(item: any) { + return { + unAuthorizedRequestAction: item["unAuthorizedRequestAction"], + tenantId: item["tenantId"], + clientId: item["clientId"], + audiences: !item["audiences"] + ? item["audiences"] + : item["audiences"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _applicationGatewayPropertiesSerializer(item: ApplicationGateway): any { + return { + sku: !item["sku"] ? item["sku"] : applicationGatewaySkuSerializer(item["sku"]), + sslPolicy: !item["sslPolicy"] + ? item["sslPolicy"] + : applicationGatewaySslPolicySerializer(item["sslPolicy"]), + gatewayIPConfigurations: !item["gatewayIPConfigurations"] + ? item["gatewayIPConfigurations"] + : applicationGatewayIPConfigurationArraySerializer(item["gatewayIPConfigurations"]), + authenticationCertificates: !item["authenticationCertificates"] + ? item["authenticationCertificates"] + : applicationGatewayAuthenticationCertificateArraySerializer( + item["authenticationCertificates"], + ), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : applicationGatewayTrustedRootCertificateArraySerializer(item["trustedRootCertificates"]), + trustedClientCertificates: !item["trustedClientCertificates"] + ? item["trustedClientCertificates"] + : applicationGatewayTrustedClientCertificateArraySerializer( + item["trustedClientCertificates"], + ), + sslCertificates: !item["sslCertificates"] + ? item["sslCertificates"] + : applicationGatewaySslCertificateArraySerializer(item["sslCertificates"]), + frontendIPConfigurations: !item["frontendIPConfigurations"] + ? item["frontendIPConfigurations"] + : applicationGatewayFrontendIPConfigurationArraySerializer(item["frontendIPConfigurations"]), + frontendPorts: !item["frontendPorts"] + ? item["frontendPorts"] + : applicationGatewayFrontendPortArraySerializer(item["frontendPorts"]), + probes: !item["probes"] + ? item["probes"] + : applicationGatewayProbeArraySerializer(item["probes"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : applicationGatewayBackendAddressPoolArraySerializer(item["backendAddressPools"]), + backendHttpSettingsCollection: !item["backendHttpSettingsCollection"] + ? item["backendHttpSettingsCollection"] + : applicationGatewayBackendHttpSettingsArraySerializer(item["backendHttpSettingsCollection"]), + backendSettingsCollection: !item["backendSettingsCollection"] + ? item["backendSettingsCollection"] + : applicationGatewayBackendSettingsArraySerializer(item["backendSettingsCollection"]), + httpListeners: !item["httpListeners"] + ? item["httpListeners"] + : applicationGatewayHttpListenerArraySerializer(item["httpListeners"]), + listeners: !item["listeners"] + ? item["listeners"] + : applicationGatewayListenerArraySerializer(item["listeners"]), + sslProfiles: !item["sslProfiles"] + ? item["sslProfiles"] + : applicationGatewaySslProfileArraySerializer(item["sslProfiles"]), + urlPathMaps: !item["urlPathMaps"] + ? item["urlPathMaps"] + : applicationGatewayUrlPathMapArraySerializer(item["urlPathMaps"]), + requestRoutingRules: !item["requestRoutingRules"] + ? item["requestRoutingRules"] + : applicationGatewayRequestRoutingRuleArraySerializer(item["requestRoutingRules"]), + routingRules: !item["routingRules"] + ? item["routingRules"] + : applicationGatewayRoutingRuleArraySerializer(item["routingRules"]), + rewriteRuleSets: !item["rewriteRuleSets"] + ? item["rewriteRuleSets"] + : applicationGatewayRewriteRuleSetArraySerializer(item["rewriteRuleSets"]), + redirectConfigurations: !item["redirectConfigurations"] + ? item["redirectConfigurations"] + : applicationGatewayRedirectConfigurationArraySerializer(item["redirectConfigurations"]), + webApplicationFirewallConfiguration: !item["webApplicationFirewallConfiguration"] + ? item["webApplicationFirewallConfiguration"] + : applicationGatewayWebApplicationFirewallConfigurationSerializer( + item["webApplicationFirewallConfiguration"], + ), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceSerializer(item["firewallPolicy"]), + enableHttp2: item["enableHttp2"], + enableFips: item["enableFips"], + autoscaleConfiguration: !item["autoscaleConfiguration"] + ? item["autoscaleConfiguration"] + : applicationGatewayAutoscaleConfigurationSerializer(item["autoscaleConfiguration"]), + privateLinkConfigurations: !item["privateLinkConfigurations"] + ? item["privateLinkConfigurations"] + : applicationGatewayPrivateLinkConfigurationArraySerializer( + item["privateLinkConfigurations"], + ), + customErrorConfigurations: !item["customErrorConfigurations"] + ? item["customErrorConfigurations"] + : applicationGatewayCustomErrorArraySerializer(item["customErrorConfigurations"]), + forceFirewallPolicyAssociation: item["forceFirewallPolicyAssociation"], + loadDistributionPolicies: !item["loadDistributionPolicies"] + ? item["loadDistributionPolicies"] + : applicationGatewayLoadDistributionPolicyArraySerializer(item["loadDistributionPolicies"]), + entraJWTValidationConfigs: !item["entraJWTValidationConfigs"] + ? item["entraJWTValidationConfigs"] + : applicationGatewayEntraJWTValidationConfigArraySerializer( + item["entraJWTValidationConfigs"], + ), + globalConfiguration: !item["globalConfiguration"] + ? item["globalConfiguration"] + : applicationGatewayGlobalConfigurationSerializer(item["globalConfiguration"]), + }; +} + +export function _applicationGatewayPropertiesDeserializer(item: any) { + return { + sku: !item["sku"] ? item["sku"] : applicationGatewaySkuDeserializer(item["sku"]), + sslPolicy: !item["sslPolicy"] + ? item["sslPolicy"] + : applicationGatewaySslPolicyDeserializer(item["sslPolicy"]), + operationalState: item["operationalState"], + gatewayIPConfigurations: !item["gatewayIPConfigurations"] + ? item["gatewayIPConfigurations"] + : applicationGatewayIPConfigurationArrayDeserializer(item["gatewayIPConfigurations"]), + authenticationCertificates: !item["authenticationCertificates"] + ? item["authenticationCertificates"] + : applicationGatewayAuthenticationCertificateArrayDeserializer( + item["authenticationCertificates"], + ), + trustedRootCertificates: !item["trustedRootCertificates"] + ? item["trustedRootCertificates"] + : applicationGatewayTrustedRootCertificateArrayDeserializer(item["trustedRootCertificates"]), + trustedClientCertificates: !item["trustedClientCertificates"] + ? item["trustedClientCertificates"] + : applicationGatewayTrustedClientCertificateArrayDeserializer( + item["trustedClientCertificates"], + ), + sslCertificates: !item["sslCertificates"] + ? item["sslCertificates"] + : applicationGatewaySslCertificateArrayDeserializer(item["sslCertificates"]), + frontendIPConfigurations: !item["frontendIPConfigurations"] + ? item["frontendIPConfigurations"] + : applicationGatewayFrontendIPConfigurationArrayDeserializer( + item["frontendIPConfigurations"], + ), + frontendPorts: !item["frontendPorts"] + ? item["frontendPorts"] + : applicationGatewayFrontendPortArrayDeserializer(item["frontendPorts"]), + probes: !item["probes"] + ? item["probes"] + : applicationGatewayProbeArrayDeserializer(item["probes"]), + backendAddressPools: !item["backendAddressPools"] + ? item["backendAddressPools"] + : applicationGatewayBackendAddressPoolArrayDeserializer(item["backendAddressPools"]), + backendHttpSettingsCollection: !item["backendHttpSettingsCollection"] + ? item["backendHttpSettingsCollection"] + : applicationGatewayBackendHttpSettingsArrayDeserializer( + item["backendHttpSettingsCollection"], + ), + backendSettingsCollection: !item["backendSettingsCollection"] + ? item["backendSettingsCollection"] + : applicationGatewayBackendSettingsArrayDeserializer(item["backendSettingsCollection"]), + httpListeners: !item["httpListeners"] + ? item["httpListeners"] + : applicationGatewayHttpListenerArrayDeserializer(item["httpListeners"]), + listeners: !item["listeners"] + ? item["listeners"] + : applicationGatewayListenerArrayDeserializer(item["listeners"]), + sslProfiles: !item["sslProfiles"] + ? item["sslProfiles"] + : applicationGatewaySslProfileArrayDeserializer(item["sslProfiles"]), + urlPathMaps: !item["urlPathMaps"] + ? item["urlPathMaps"] + : applicationGatewayUrlPathMapArrayDeserializer(item["urlPathMaps"]), + requestRoutingRules: !item["requestRoutingRules"] + ? item["requestRoutingRules"] + : applicationGatewayRequestRoutingRuleArrayDeserializer(item["requestRoutingRules"]), + routingRules: !item["routingRules"] + ? item["routingRules"] + : applicationGatewayRoutingRuleArrayDeserializer(item["routingRules"]), + rewriteRuleSets: !item["rewriteRuleSets"] + ? item["rewriteRuleSets"] + : applicationGatewayRewriteRuleSetArrayDeserializer(item["rewriteRuleSets"]), + redirectConfigurations: !item["redirectConfigurations"] + ? item["redirectConfigurations"] + : applicationGatewayRedirectConfigurationArrayDeserializer(item["redirectConfigurations"]), + webApplicationFirewallConfiguration: !item["webApplicationFirewallConfiguration"] + ? item["webApplicationFirewallConfiguration"] + : applicationGatewayWebApplicationFirewallConfigurationDeserializer( + item["webApplicationFirewallConfiguration"], + ), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceDeserializer(item["firewallPolicy"]), + enableHttp2: item["enableHttp2"], + enableFips: item["enableFips"], + autoscaleConfiguration: !item["autoscaleConfiguration"] + ? item["autoscaleConfiguration"] + : applicationGatewayAutoscaleConfigurationDeserializer(item["autoscaleConfiguration"]), + privateLinkConfigurations: !item["privateLinkConfigurations"] + ? item["privateLinkConfigurations"] + : applicationGatewayPrivateLinkConfigurationArrayDeserializer( + item["privateLinkConfigurations"], + ), + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : applicationGatewayPrivateEndpointConnectionArrayDeserializer( + item["privateEndpointConnections"], + ), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + customErrorConfigurations: !item["customErrorConfigurations"] + ? item["customErrorConfigurations"] + : applicationGatewayCustomErrorArrayDeserializer(item["customErrorConfigurations"]), + forceFirewallPolicyAssociation: item["forceFirewallPolicyAssociation"], + loadDistributionPolicies: !item["loadDistributionPolicies"] + ? item["loadDistributionPolicies"] + : applicationGatewayLoadDistributionPolicyArrayDeserializer(item["loadDistributionPolicies"]), + entraJWTValidationConfigs: !item["entraJWTValidationConfigs"] + ? item["entraJWTValidationConfigs"] + : applicationGatewayEntraJWTValidationConfigArrayDeserializer( + item["entraJWTValidationConfigs"], + ), + globalConfiguration: !item["globalConfiguration"] + ? item["globalConfiguration"] + : applicationGatewayGlobalConfigurationDeserializer(item["globalConfiguration"]), + defaultPredefinedSslPolicy: item["defaultPredefinedSslPolicy"], + }; +} + +export function _applicationGatewayAvailableSslOptionsPropertiesDeserializer(item: any) { + return { + predefinedPolicies: !item["predefinedPolicies"] + ? item["predefinedPolicies"] + : subResourceArrayDeserializer(item["predefinedPolicies"]), + defaultPolicy: item["defaultPolicy"], + availableCipherSuites: !item["availableCipherSuites"] + ? item["availableCipherSuites"] + : item["availableCipherSuites"].map((p: any) => { + return p; + }), + availableProtocols: !item["availableProtocols"] + ? item["availableProtocols"] + : item["availableProtocols"].map((p: any) => { + return p; + }), + }; +} + +export function _applicationGatewaySslPredefinedPolicyPropertiesDeserializer(item: any) { + return { + cipherSuites: !item["cipherSuites"] + ? item["cipherSuites"] + : item["cipherSuites"].map((p: any) => { + return p; + }), + minProtocolVersion: item["minProtocolVersion"], + }; +} + +export function _applicationGatewayFirewallRuleSetPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + ruleSetType: item["ruleSetType"], + ruleSetVersion: item["ruleSetVersion"], + ruleGroups: !item["ruleGroups"] + ? item["ruleGroups"] + : applicationGatewayFirewallRuleGroupArrayDeserializer(item["ruleGroups"]), + tiers: !item["tiers"] + ? item["tiers"] + : item["tiers"].map((p: any) => { + return p; + }), + }; +} + +export function _azureFirewallApplicationRuleCollectionPropertiesSerializer( + item: AzureFirewallApplicationRuleCollection, +): any { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallRCActionSerializer(item["action"]), + rules: !item["rules"] + ? item["rules"] + : azureFirewallApplicationRuleArraySerializer(item["rules"]), + }; +} + +export function _azureFirewallApplicationRuleCollectionPropertiesDeserializer(item: any) { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallRCActionDeserializer(item["action"]), + rules: !item["rules"] + ? item["rules"] + : azureFirewallApplicationRuleArrayDeserializer(item["rules"]), + provisioningState: item["provisioningState"], + }; +} + +export function _azureFirewallNatRuleCollectionPropertiesSerializer( + item: AzureFirewallNatRuleCollection, +): any { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallNatRCActionSerializer(item["action"]), + rules: !item["rules"] ? item["rules"] : azureFirewallNatRuleArraySerializer(item["rules"]), + }; +} + +export function _azureFirewallNatRuleCollectionPropertiesDeserializer(item: any) { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallNatRCActionDeserializer(item["action"]), + rules: !item["rules"] ? item["rules"] : azureFirewallNatRuleArrayDeserializer(item["rules"]), + provisioningState: item["provisioningState"], + }; +} + +export function _azureFirewallNetworkRuleCollectionPropertiesSerializer( + item: AzureFirewallNetworkRuleCollection, +): any { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallRCActionSerializer(item["action"]), + rules: !item["rules"] ? item["rules"] : azureFirewallNetworkRuleArraySerializer(item["rules"]), + }; +} + +export function _azureFirewallNetworkRuleCollectionPropertiesDeserializer(item: any) { + return { + priority: item["priority"], + action: !item["action"] ? item["action"] : azureFirewallRCActionDeserializer(item["action"]), + rules: !item["rules"] + ? item["rules"] + : azureFirewallNetworkRuleArrayDeserializer(item["rules"]), + provisioningState: item["provisioningState"], + }; +} + +export function _azureFirewallIPConfigurationPropertiesSerializer( + item: AzureFirewallIPConfiguration, +): any { + return { + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceSerializer(item["publicIPAddress"]), + }; +} + +export function _azureFirewallIPConfigurationPropertiesDeserializer(item: any) { + return { + privateIPAddress: item["privateIPAddress"], + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceDeserializer(item["publicIPAddress"]), + provisioningState: item["provisioningState"], + }; +} + +export function _azureFirewallPropertiesSerializer(item: AzureFirewall): any { + return { + applicationRuleCollections: !item["applicationRuleCollections"] + ? item["applicationRuleCollections"] + : azureFirewallApplicationRuleCollectionArraySerializer(item["applicationRuleCollections"]), + natRuleCollections: !item["natRuleCollections"] + ? item["natRuleCollections"] + : azureFirewallNatRuleCollectionArraySerializer(item["natRuleCollections"]), + networkRuleCollections: !item["networkRuleCollections"] + ? item["networkRuleCollections"] + : azureFirewallNetworkRuleCollectionArraySerializer(item["networkRuleCollections"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : azureFirewallIPConfigurationArraySerializer(item["ipConfigurations"]), + managementIpConfiguration: !item["managementIpConfiguration"] + ? item["managementIpConfiguration"] + : azureFirewallIPConfigurationSerializer(item["managementIpConfiguration"]), + threatIntelMode: item["threatIntelMode"], + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceSerializer(item["virtualHub"]), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceSerializer(item["firewallPolicy"]), + hubIPAddresses: !item["hubIPAddresses"] + ? item["hubIPAddresses"] + : hubIPAddressesSerializer(item["hubIPAddresses"]), + sku: !item["sku"] ? item["sku"] : azureFirewallSkuSerializer(item["sku"]), + additionalProperties: item["additionalProperties"], + autoscaleConfiguration: !item["autoscaleConfiguration"] + ? item["autoscaleConfiguration"] + : azureFirewallAutoscaleConfigurationSerializer(item["autoscaleConfiguration"]), + }; +} + +export function _azureFirewallPropertiesDeserializer(item: any) { + return { + applicationRuleCollections: !item["applicationRuleCollections"] + ? item["applicationRuleCollections"] + : azureFirewallApplicationRuleCollectionArrayDeserializer(item["applicationRuleCollections"]), + natRuleCollections: !item["natRuleCollections"] + ? item["natRuleCollections"] + : azureFirewallNatRuleCollectionArrayDeserializer(item["natRuleCollections"]), + networkRuleCollections: !item["networkRuleCollections"] + ? item["networkRuleCollections"] + : azureFirewallNetworkRuleCollectionArrayDeserializer(item["networkRuleCollections"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : azureFirewallIPConfigurationArrayDeserializer(item["ipConfigurations"]), + managementIpConfiguration: !item["managementIpConfiguration"] + ? item["managementIpConfiguration"] + : azureFirewallIPConfigurationDeserializer(item["managementIpConfiguration"]), + provisioningState: item["provisioningState"], + threatIntelMode: item["threatIntelMode"], + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceDeserializer(item["virtualHub"]), + firewallPolicy: !item["firewallPolicy"] + ? item["firewallPolicy"] + : subResourceDeserializer(item["firewallPolicy"]), + hubIPAddresses: !item["hubIPAddresses"] + ? item["hubIPAddresses"] + : hubIPAddressesDeserializer(item["hubIPAddresses"]), + ipGroups: !item["ipGroups"] + ? item["ipGroups"] + : azureFirewallIpGroupsArrayDeserializer(item["ipGroups"]), + sku: !item["sku"] ? item["sku"] : azureFirewallSkuDeserializer(item["sku"]), + additionalProperties: !item["additionalProperties"] + ? item["additionalProperties"] + : Object.fromEntries( + Object.entries(item["additionalProperties"]).map(([k, p]: [string, any]) => [k, p]), + ), + autoscaleConfiguration: !item["autoscaleConfiguration"] + ? item["autoscaleConfiguration"] + : azureFirewallAutoscaleConfigurationDeserializer(item["autoscaleConfiguration"]), + afcConfiguration: !item["afcConfiguration"] + ? item["afcConfiguration"] + : afcConfigurationDeserializer(item["afcConfiguration"]), + }; +} + +export function _bastionHostIPConfigurationPropertiesSerializer( + item: BastionHostIPConfiguration, +): any { + return { + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceSerializer(item["publicIPAddress"]), + privateIPAllocationMethod: item["privateIPAllocationMethod"], + }; +} + +export function _bastionHostIPConfigurationPropertiesDeserializer(item: any) { + return { + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceDeserializer(item["publicIPAddress"]), + provisioningState: item["provisioningState"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + }; +} + +export function _bastionHostPropertiesSerializer(item: BastionHost): any { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : bastionHostIPConfigurationArraySerializer(item["ipConfigurations"]), + dnsName: item["dnsName"], + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceSerializer(item["virtualNetwork"]), + networkAcls: !item["networkAcls"] + ? item["networkAcls"] + : bastionHostPropertiesFormatNetworkAclsSerializer(item["networkAcls"]), + scaleUnits: item["scaleUnits"], + disableCopyPaste: item["disableCopyPaste"], + enableFileCopy: item["enableFileCopy"], + enableIpConnect: item["enableIpConnect"], + enableShareableLink: item["enableShareableLink"], + enableTunneling: item["enableTunneling"], + enableKerberos: item["enableKerberos"], + enableSessionRecording: item["enableSessionRecording"], + enablePrivateOnlyBastion: item["enablePrivateOnlyBastion"], + }; +} + +export function _bastionHostPropertiesDeserializer(item: any) { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : bastionHostIPConfigurationArrayDeserializer(item["ipConfigurations"]), + dnsName: item["dnsName"], + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceDeserializer(item["virtualNetwork"]), + networkAcls: !item["networkAcls"] + ? item["networkAcls"] + : bastionHostPropertiesFormatNetworkAclsDeserializer(item["networkAcls"]), + provisioningState: item["provisioningState"], + scaleUnits: item["scaleUnits"], + disableCopyPaste: item["disableCopyPaste"], + enableFileCopy: item["enableFileCopy"], + enableIpConnect: item["enableIpConnect"], + enableShareableLink: item["enableShareableLink"], + enableTunneling: item["enableTunneling"], + enableKerberos: item["enableKerberos"], + enableSessionRecording: item["enableSessionRecording"], + enablePrivateOnlyBastion: item["enablePrivateOnlyBastion"], + }; +} + +export function _ddosDetectionRulePropertiesSerializer(item: DdosDetectionRule): any { + return { + detectionMode: item["detectionMode"], + trafficDetectionRule: !item["trafficDetectionRule"] + ? item["trafficDetectionRule"] + : trafficDetectionRuleSerializer(item["trafficDetectionRule"]), + }; +} + +export function _ddosDetectionRulePropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + detectionMode: item["detectionMode"], + trafficDetectionRule: !item["trafficDetectionRule"] + ? item["trafficDetectionRule"] + : trafficDetectionRuleDeserializer(item["trafficDetectionRule"]), + }; +} + +export function _ddosCustomPolicyPropertiesSerializer(item: DdosCustomPolicy): any { + return { + detectionRules: !item["detectionRules"] + ? item["detectionRules"] + : ddosDetectionRuleArraySerializer(item["detectionRules"]), + frontEndIpConfiguration: !item["frontEndIpConfiguration"] + ? item["frontEndIpConfiguration"] + : subResourceArraySerializer(item["frontEndIpConfiguration"]), + }; +} + +export function _ddosCustomPolicyPropertiesDeserializer(item: any) { + return { + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + detectionRules: !item["detectionRules"] + ? item["detectionRules"] + : ddosDetectionRuleArrayDeserializer(item["detectionRules"]), + frontEndIpConfiguration: !item["frontEndIpConfiguration"] + ? item["frontEndIpConfiguration"] + : subResourceArrayDeserializer(item["frontEndIpConfiguration"]), + publicIPAddresses: !item["publicIPAddresses"] + ? item["publicIPAddresses"] + : subResourceArrayDeserializer(item["publicIPAddresses"]), + }; +} + +export function _ddosProtectionPlanPropertiesSerializer(_item: DdosProtectionPlan): any { + return {}; +} + +export function _ddosProtectionPlanPropertiesDeserializer(item: any) { + return { + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + publicIPAddresses: !item["publicIPAddresses"] + ? item["publicIPAddresses"] + : subResourceArrayDeserializer(item["publicIPAddresses"]), + virtualNetworks: !item["virtualNetworks"] + ? item["virtualNetworks"] + : subResourceArrayDeserializer(item["virtualNetworks"]), + }; +} + +export function _expressRouteCircuitAuthorizationPropertiesSerializer( + item: ExpressRouteCircuitAuthorization, +): any { + return { + authorizationKey: item["authorizationKey"], + authorizationUseStatus: item["authorizationUseStatus"], + }; +} + +export function _expressRouteCircuitAuthorizationPropertiesDeserializer(item: any) { + return { + authorizationKey: item["authorizationKey"], + authorizationUseStatus: item["authorizationUseStatus"], + connectionResourceUri: item["connectionResourceUri"], + provisioningState: item["provisioningState"], + }; +} + +export function _expressRouteCircuitConnectionPropertiesSerializer( + item: ExpressRouteCircuitConnection, +): any { + return { + expressRouteCircuitPeering: !item["expressRouteCircuitPeering"] + ? item["expressRouteCircuitPeering"] + : subResourceSerializer(item["expressRouteCircuitPeering"]), + peerExpressRouteCircuitPeering: !item["peerExpressRouteCircuitPeering"] + ? item["peerExpressRouteCircuitPeering"] + : subResourceSerializer(item["peerExpressRouteCircuitPeering"]), + addressPrefix: item["addressPrefix"], + authorizationKey: item["authorizationKey"], + ipv6CircuitConnectionConfig: !item["ipv6CircuitConnectionConfig"] + ? item["ipv6CircuitConnectionConfig"] + : ipv6CircuitConnectionConfigSerializer(item["ipv6CircuitConnectionConfig"]), + }; +} + +export function _expressRouteCircuitConnectionPropertiesDeserializer(item: any) { + return { + expressRouteCircuitPeering: !item["expressRouteCircuitPeering"] + ? item["expressRouteCircuitPeering"] + : subResourceDeserializer(item["expressRouteCircuitPeering"]), + peerExpressRouteCircuitPeering: !item["peerExpressRouteCircuitPeering"] + ? item["peerExpressRouteCircuitPeering"] + : subResourceDeserializer(item["peerExpressRouteCircuitPeering"]), + addressPrefix: item["addressPrefix"], + authorizationKey: item["authorizationKey"], + ipv6CircuitConnectionConfig: !item["ipv6CircuitConnectionConfig"] + ? item["ipv6CircuitConnectionConfig"] + : ipv6CircuitConnectionConfigDeserializer(item["ipv6CircuitConnectionConfig"]), + circuitConnectionStatus: item["circuitConnectionStatus"], + provisioningState: item["provisioningState"], + }; +} + +export function _peerExpressRouteCircuitConnectionPropertiesDeserializer(item: any) { + return { + expressRouteCircuitPeering: !item["expressRouteCircuitPeering"] + ? item["expressRouteCircuitPeering"] + : subResourceDeserializer(item["expressRouteCircuitPeering"]), + peerExpressRouteCircuitPeering: !item["peerExpressRouteCircuitPeering"] + ? item["peerExpressRouteCircuitPeering"] + : subResourceDeserializer(item["peerExpressRouteCircuitPeering"]), + addressPrefix: item["addressPrefix"], + circuitConnectionStatus: item["circuitConnectionStatus"], + connectionName: item["connectionName"], + authResourceGuid: item["authResourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function _expressRouteCircuitPeeringPropertiesSerializer( + item: ExpressRouteCircuitPeering, +): any { + return { + peeringType: item["peeringType"], + state: item["state"], + azureASN: item["azureASN"], + peerASN: item["peerASN"], + primaryPeerAddressPrefix: item["primaryPeerAddressPrefix"], + secondaryPeerAddressPrefix: item["secondaryPeerAddressPrefix"], + primaryAzurePort: item["primaryAzurePort"], + secondaryAzurePort: item["secondaryAzurePort"], + sharedKey: item["sharedKey"], + vlanId: item["vlanId"], + microsoftPeeringConfig: !item["microsoftPeeringConfig"] + ? item["microsoftPeeringConfig"] + : expressRouteCircuitPeeringConfigSerializer(item["microsoftPeeringConfig"]), + stats: !item["stats"] ? item["stats"] : expressRouteCircuitStatsSerializer(item["stats"]), + gatewayManagerEtag: item["gatewayManagerEtag"], + routeFilter: !item["routeFilter"] + ? item["routeFilter"] + : subResourceSerializer(item["routeFilter"]), + ipv6PeeringConfig: !item["ipv6PeeringConfig"] + ? item["ipv6PeeringConfig"] + : ipv6ExpressRouteCircuitPeeringConfigSerializer(item["ipv6PeeringConfig"]), + expressRouteConnection: !item["expressRouteConnection"] + ? item["expressRouteConnection"] + : expressRouteConnectionIdSerializer(item["expressRouteConnection"]), + connections: !item["connections"] + ? item["connections"] + : expressRouteCircuitConnectionArraySerializer(item["connections"]), + }; +} + +export function _expressRouteCircuitPeeringPropertiesDeserializer(item: any) { + return { + peeringType: item["peeringType"], + state: item["state"], + azureASN: item["azureASN"], + peerASN: item["peerASN"], + primaryPeerAddressPrefix: item["primaryPeerAddressPrefix"], + secondaryPeerAddressPrefix: item["secondaryPeerAddressPrefix"], + primaryAzurePort: item["primaryAzurePort"], + secondaryAzurePort: item["secondaryAzurePort"], + sharedKey: item["sharedKey"], + vlanId: item["vlanId"], + microsoftPeeringConfig: !item["microsoftPeeringConfig"] + ? item["microsoftPeeringConfig"] + : expressRouteCircuitPeeringConfigDeserializer(item["microsoftPeeringConfig"]), + stats: !item["stats"] ? item["stats"] : expressRouteCircuitStatsDeserializer(item["stats"]), + provisioningState: item["provisioningState"], + gatewayManagerEtag: item["gatewayManagerEtag"], + lastModifiedBy: item["lastModifiedBy"], + routeFilter: !item["routeFilter"] + ? item["routeFilter"] + : subResourceDeserializer(item["routeFilter"]), + ipv6PeeringConfig: !item["ipv6PeeringConfig"] + ? item["ipv6PeeringConfig"] + : ipv6ExpressRouteCircuitPeeringConfigDeserializer(item["ipv6PeeringConfig"]), + expressRouteConnection: !item["expressRouteConnection"] + ? item["expressRouteConnection"] + : expressRouteConnectionIdDeserializer(item["expressRouteConnection"]), + connections: !item["connections"] + ? item["connections"] + : expressRouteCircuitConnectionArrayDeserializer(item["connections"]), + peeredConnections: !item["peeredConnections"] + ? item["peeredConnections"] + : peerExpressRouteCircuitConnectionArrayDeserializer(item["peeredConnections"]), + }; +} + +export function _expressRouteCircuitPropertiesSerializer(item: ExpressRouteCircuit): any { + return { + allowClassicOperations: item["allowClassicOperations"], + circuitProvisioningState: item["circuitProvisioningState"], + serviceProviderProvisioningState: item["serviceProviderProvisioningState"], + authorizations: !item["authorizations"] + ? item["authorizations"] + : expressRouteCircuitAuthorizationArraySerializer(item["authorizations"]), + peerings: !item["peerings"] + ? item["peerings"] + : expressRouteCircuitPeeringArraySerializer(item["peerings"]), + serviceKey: item["serviceKey"], + serviceProviderNotes: item["serviceProviderNotes"], + serviceProviderProperties: !item["serviceProviderProperties"] + ? item["serviceProviderProperties"] + : expressRouteCircuitServiceProviderPropertiesSerializer(item["serviceProviderProperties"]), + expressRoutePort: !item["expressRoutePort"] + ? item["expressRoutePort"] + : subResourceSerializer(item["expressRoutePort"]), + bandwidthInGbps: item["bandwidthInGbps"], + gatewayManagerEtag: item["gatewayManagerEtag"], + globalReachEnabled: item["globalReachEnabled"], + authorizationKey: item["authorizationKey"], + enableDirectPortRateLimit: item["enableDirectPortRateLimit"], + }; +} + +export function _expressRouteCircuitPropertiesDeserializer(item: any) { + return { + allowClassicOperations: item["allowClassicOperations"], + circuitProvisioningState: item["circuitProvisioningState"], + serviceProviderProvisioningState: item["serviceProviderProvisioningState"], + authorizations: !item["authorizations"] + ? item["authorizations"] + : expressRouteCircuitAuthorizationArrayDeserializer(item["authorizations"]), + peerings: !item["peerings"] + ? item["peerings"] + : expressRouteCircuitPeeringArrayDeserializer(item["peerings"]), + serviceKey: item["serviceKey"], + serviceProviderNotes: item["serviceProviderNotes"], + serviceProviderProperties: !item["serviceProviderProperties"] + ? item["serviceProviderProperties"] + : expressRouteCircuitServiceProviderPropertiesDeserializer(item["serviceProviderProperties"]), + expressRoutePort: !item["expressRoutePort"] + ? item["expressRoutePort"] + : subResourceDeserializer(item["expressRoutePort"]), + bandwidthInGbps: item["bandwidthInGbps"], + stag: item["stag"], + provisioningState: item["provisioningState"], + gatewayManagerEtag: item["gatewayManagerEtag"], + globalReachEnabled: item["globalReachEnabled"], + authorizationKey: item["authorizationKey"], + authorizationStatus: item["authorizationStatus"], + enableDirectPortRateLimit: item["enableDirectPortRateLimit"], + }; +} + +export function _expressRouteCrossConnectionPeeringPropertiesSerializer( + item: ExpressRouteCrossConnectionPeering, +): any { + return { + peeringType: item["peeringType"], + state: item["state"], + peerASN: item["peerASN"], + primaryPeerAddressPrefix: item["primaryPeerAddressPrefix"], + secondaryPeerAddressPrefix: item["secondaryPeerAddressPrefix"], + sharedKey: item["sharedKey"], + vlanId: item["vlanId"], + microsoftPeeringConfig: !item["microsoftPeeringConfig"] + ? item["microsoftPeeringConfig"] + : expressRouteCircuitPeeringConfigSerializer(item["microsoftPeeringConfig"]), + gatewayManagerEtag: item["gatewayManagerEtag"], + ipv6PeeringConfig: !item["ipv6PeeringConfig"] + ? item["ipv6PeeringConfig"] + : ipv6ExpressRouteCircuitPeeringConfigSerializer(item["ipv6PeeringConfig"]), + }; +} + +export function _expressRouteCrossConnectionPeeringPropertiesDeserializer(item: any) { + return { + peeringType: item["peeringType"], + state: item["state"], + azureASN: item["azureASN"], + peerASN: item["peerASN"], + primaryPeerAddressPrefix: item["primaryPeerAddressPrefix"], + secondaryPeerAddressPrefix: item["secondaryPeerAddressPrefix"], + primaryAzurePort: item["primaryAzurePort"], + secondaryAzurePort: item["secondaryAzurePort"], + sharedKey: item["sharedKey"], + vlanId: item["vlanId"], + microsoftPeeringConfig: !item["microsoftPeeringConfig"] + ? item["microsoftPeeringConfig"] + : expressRouteCircuitPeeringConfigDeserializer(item["microsoftPeeringConfig"]), + provisioningState: item["provisioningState"], + gatewayManagerEtag: item["gatewayManagerEtag"], + lastModifiedBy: item["lastModifiedBy"], + ipv6PeeringConfig: !item["ipv6PeeringConfig"] + ? item["ipv6PeeringConfig"] + : ipv6ExpressRouteCircuitPeeringConfigDeserializer(item["ipv6PeeringConfig"]), + }; +} + +export function _expressRouteCrossConnectionPropertiesSerializer( + item: ExpressRouteCrossConnection, +): any { + return { + expressRouteCircuit: !item["expressRouteCircuit"] + ? item["expressRouteCircuit"] + : expressRouteCircuitReferenceSerializer(item["expressRouteCircuit"]), + serviceProviderProvisioningState: item["serviceProviderProvisioningState"], + serviceProviderNotes: item["serviceProviderNotes"], + peerings: !item["peerings"] + ? item["peerings"] + : expressRouteCrossConnectionPeeringArraySerializer(item["peerings"]), + }; +} + +export function _expressRouteCrossConnectionPropertiesDeserializer(item: any) { + return { + primaryAzurePort: item["primaryAzurePort"], + secondaryAzurePort: item["secondaryAzurePort"], + sTag: item["sTag"], + peeringLocation: item["peeringLocation"], + bandwidthInMbps: item["bandwidthInMbps"], + expressRouteCircuit: !item["expressRouteCircuit"] + ? item["expressRouteCircuit"] + : expressRouteCircuitReferenceDeserializer(item["expressRouteCircuit"]), + serviceProviderProvisioningState: item["serviceProviderProvisioningState"], + serviceProviderNotes: item["serviceProviderNotes"], + provisioningState: item["provisioningState"], + peerings: !item["peerings"] + ? item["peerings"] + : expressRouteCrossConnectionPeeringArrayDeserializer(item["peerings"]), + }; +} + +export function _expressRoutePortsLocationPropertiesDeserializer(item: any) { + return { + address: item["address"], + contact: item["contact"], + availableBandwidths: !item["availableBandwidths"] + ? item["availableBandwidths"] + : expressRoutePortsLocationBandwidthsArrayDeserializer(item["availableBandwidths"]), + provisioningState: item["provisioningState"], + }; +} + +export function _expressRouteLinkPropertiesSerializer(item: ExpressRouteLink): any { + return { + adminState: item["adminState"], + macSecConfig: !item["macSecConfig"] + ? item["macSecConfig"] + : expressRouteLinkMacSecConfigSerializer(item["macSecConfig"]), + }; +} + +export function _expressRouteLinkPropertiesDeserializer(item: any) { + return { + routerName: item["routerName"], + interfaceName: item["interfaceName"], + patchPanelId: item["patchPanelId"], + rackId: item["rackId"], + coloLocation: item["coloLocation"], + connectorType: item["connectorType"], + adminState: item["adminState"], + provisioningState: item["provisioningState"], + macSecConfig: !item["macSecConfig"] + ? item["macSecConfig"] + : expressRouteLinkMacSecConfigDeserializer(item["macSecConfig"]), + }; +} + +export function _expressRoutePortPropertiesSerializer(item: ExpressRoutePort): any { + return { + peeringLocation: item["peeringLocation"], + bandwidthInGbps: item["bandwidthInGbps"], + encapsulation: item["encapsulation"], + links: !item["links"] ? item["links"] : expressRouteLinkArraySerializer(item["links"]), + billingType: item["billingType"], + }; +} + +export function _expressRoutePortPropertiesDeserializer(item: any) { + return { + peeringLocation: item["peeringLocation"], + bandwidthInGbps: item["bandwidthInGbps"], + provisionedBandwidthInGbps: item["provisionedBandwidthInGbps"], + mtu: item["mtu"], + encapsulation: item["encapsulation"], + etherType: item["etherType"], + allocationDate: item["allocationDate"], + links: !item["links"] ? item["links"] : expressRouteLinkArrayDeserializer(item["links"]), + circuits: !item["circuits"] ? item["circuits"] : subResourceArrayDeserializer(item["circuits"]), + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + billingType: item["billingType"], + }; +} + +export function _expressRoutePortAuthorizationPropertiesSerializer( + _item: ExpressRoutePortAuthorization, +): any { + return {}; +} + +export function _expressRoutePortAuthorizationPropertiesDeserializer(item: any) { + return { + authorizationKey: item["authorizationKey"], + authorizationUseStatus: item["authorizationUseStatus"], + circuitResourceUri: item["circuitResourceUri"], + provisioningState: item["provisioningState"], + }; +} + +export function _firewallPolicyPropertiesSerializer(item: FirewallPolicy): any { + return { + basePolicy: !item["basePolicy"] + ? item["basePolicy"] + : subResourceSerializer(item["basePolicy"]), + threatIntelMode: item["threatIntelMode"], + threatIntelWhitelist: !item["threatIntelWhitelist"] + ? item["threatIntelWhitelist"] + : firewallPolicyThreatIntelWhitelistSerializer(item["threatIntelWhitelist"]), + insights: !item["insights"] + ? item["insights"] + : firewallPolicyInsightsSerializer(item["insights"]), + snat: !item["snat"] ? item["snat"] : firewallPolicySnatSerializer(item["snat"]), + sql: !item["sql"] ? item["sql"] : firewallPolicySQLSerializer(item["sql"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : dnsSettingsSerializer(item["dnsSettings"]), + explicitProxy: !item["explicitProxy"] + ? item["explicitProxy"] + : explicitProxySerializer(item["explicitProxy"]), + intrusionDetection: !item["intrusionDetection"] + ? item["intrusionDetection"] + : firewallPolicyIntrusionDetectionSerializer(item["intrusionDetection"]), + transportSecurity: !item["transportSecurity"] + ? item["transportSecurity"] + : firewallPolicyTransportSecuritySerializer(item["transportSecurity"]), + sku: !item["sku"] ? item["sku"] : firewallPolicySkuSerializer(item["sku"]), + }; +} + +export function _firewallPolicyPropertiesDeserializer(item: any) { + return { + size: item["size"], + ruleCollectionGroups: !item["ruleCollectionGroups"] + ? item["ruleCollectionGroups"] + : subResourceArrayDeserializer(item["ruleCollectionGroups"]), + provisioningState: item["provisioningState"], + basePolicy: !item["basePolicy"] + ? item["basePolicy"] + : subResourceDeserializer(item["basePolicy"]), + firewalls: !item["firewalls"] + ? item["firewalls"] + : subResourceArrayDeserializer(item["firewalls"]), + childPolicies: !item["childPolicies"] + ? item["childPolicies"] + : subResourceArrayDeserializer(item["childPolicies"]), + threatIntelMode: item["threatIntelMode"], + threatIntelWhitelist: !item["threatIntelWhitelist"] + ? item["threatIntelWhitelist"] + : firewallPolicyThreatIntelWhitelistDeserializer(item["threatIntelWhitelist"]), + insights: !item["insights"] + ? item["insights"] + : firewallPolicyInsightsDeserializer(item["insights"]), + snat: !item["snat"] ? item["snat"] : firewallPolicySnatDeserializer(item["snat"]), + sql: !item["sql"] ? item["sql"] : firewallPolicySQLDeserializer(item["sql"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : dnsSettingsDeserializer(item["dnsSettings"]), + explicitProxy: !item["explicitProxy"] + ? item["explicitProxy"] + : explicitProxyDeserializer(item["explicitProxy"]), + intrusionDetection: !item["intrusionDetection"] + ? item["intrusionDetection"] + : firewallPolicyIntrusionDetectionDeserializer(item["intrusionDetection"]), + transportSecurity: !item["transportSecurity"] + ? item["transportSecurity"] + : firewallPolicyTransportSecurityDeserializer(item["transportSecurity"]), + sku: !item["sku"] ? item["sku"] : firewallPolicySkuDeserializer(item["sku"]), + }; +} + +export function _firewallPolicyRuleCollectionGroupPropertiesSerializer( + item: FirewallPolicyRuleCollectionGroup, +): any { + return { + priority: item["priority"], + ruleCollections: !item["ruleCollections"] + ? item["ruleCollections"] + : firewallPolicyRuleCollectionUnionArraySerializer(item["ruleCollections"]), + }; +} + +export function _firewallPolicyRuleCollectionGroupPropertiesDeserializer(item: any) { + return { + size: item["size"], + priority: item["priority"], + ruleCollections: !item["ruleCollections"] + ? item["ruleCollections"] + : firewallPolicyRuleCollectionUnionArrayDeserializer(item["ruleCollections"]), + provisioningState: item["provisioningState"], + }; +} + +export function _firewallPolicyDraftPropertiesSerializer(item: FirewallPolicyDraft): any { + return { + basePolicy: !item["basePolicy"] + ? item["basePolicy"] + : subResourceSerializer(item["basePolicy"]), + threatIntelMode: item["threatIntelMode"], + threatIntelWhitelist: !item["threatIntelWhitelist"] + ? item["threatIntelWhitelist"] + : firewallPolicyThreatIntelWhitelistSerializer(item["threatIntelWhitelist"]), + insights: !item["insights"] + ? item["insights"] + : firewallPolicyInsightsSerializer(item["insights"]), + snat: !item["snat"] ? item["snat"] : firewallPolicySnatSerializer(item["snat"]), + sql: !item["sql"] ? item["sql"] : firewallPolicySQLSerializer(item["sql"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : dnsSettingsSerializer(item["dnsSettings"]), + explicitProxy: !item["explicitProxy"] + ? item["explicitProxy"] + : explicitProxySerializer(item["explicitProxy"]), + intrusionDetection: !item["intrusionDetection"] + ? item["intrusionDetection"] + : firewallPolicyIntrusionDetectionSerializer(item["intrusionDetection"]), + }; +} + +export function _firewallPolicyDraftPropertiesDeserializer(item: any) { + return { + basePolicy: !item["basePolicy"] + ? item["basePolicy"] + : subResourceDeserializer(item["basePolicy"]), + threatIntelMode: item["threatIntelMode"], + threatIntelWhitelist: !item["threatIntelWhitelist"] + ? item["threatIntelWhitelist"] + : firewallPolicyThreatIntelWhitelistDeserializer(item["threatIntelWhitelist"]), + insights: !item["insights"] + ? item["insights"] + : firewallPolicyInsightsDeserializer(item["insights"]), + snat: !item["snat"] ? item["snat"] : firewallPolicySnatDeserializer(item["snat"]), + sql: !item["sql"] ? item["sql"] : firewallPolicySQLDeserializer(item["sql"]), + dnsSettings: !item["dnsSettings"] + ? item["dnsSettings"] + : dnsSettingsDeserializer(item["dnsSettings"]), + explicitProxy: !item["explicitProxy"] + ? item["explicitProxy"] + : explicitProxyDeserializer(item["explicitProxy"]), + intrusionDetection: !item["intrusionDetection"] + ? item["intrusionDetection"] + : firewallPolicyIntrusionDetectionDeserializer(item["intrusionDetection"]), + }; +} + +export function _firewallPolicyRuleCollectionGroupDraftPropertiesSerializer( + item: FirewallPolicyRuleCollectionGroupDraft, +): any { + return { + priority: item["priority"], + ruleCollections: !item["ruleCollections"] + ? item["ruleCollections"] + : firewallPolicyRuleCollectionUnionArraySerializer(item["ruleCollections"]), + }; +} + +export function _firewallPolicyRuleCollectionGroupDraftPropertiesDeserializer(item: any) { + return { + size: item["size"], + priority: item["priority"], + ruleCollections: !item["ruleCollections"] + ? item["ruleCollections"] + : firewallPolicyRuleCollectionUnionArrayDeserializer(item["ruleCollections"]), + }; +} + +export function _networkManagerPropertiesSerializer(item: NetworkManager): any { + return { + description: item["description"], + networkManagerScopes: !item["networkManagerScopes"] + ? item["networkManagerScopes"] + : networkManagerPropertiesNetworkManagerScopesSerializer(item["networkManagerScopes"]), + networkManagerScopeAccesses: !item["networkManagerScopeAccesses"] + ? item["networkManagerScopeAccesses"] + : item["networkManagerScopeAccesses"].map((p: any) => { + return p; + }), + }; +} + +export function _networkManagerPropertiesDeserializer(item: any) { + return { + description: item["description"], + networkManagerScopes: !item["networkManagerScopes"] + ? item["networkManagerScopes"] + : networkManagerPropertiesNetworkManagerScopesDeserializer(item["networkManagerScopes"]), + networkManagerScopeAccesses: !item["networkManagerScopeAccesses"] + ? item["networkManagerScopeAccesses"] + : item["networkManagerScopeAccesses"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _ipAllocationPropertiesSerializer(item: IpAllocation): any { + return { + type: item["typePropertiesType"], + prefix: item["prefix"], + prefixLength: item["prefixLength"], + prefixType: item["prefixType"], + ipamAllocationId: item["ipamAllocationId"], + allocationTags: item["allocationTags"], + }; +} + +export function _ipAllocationPropertiesDeserializer(item: any) { + return { + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : subResourceDeserializer(item["virtualNetwork"]), + typePropertiesType: item["type"], + prefix: item["prefix"], + prefixLength: item["prefixLength"], + prefixType: item["prefixType"], + ipamAllocationId: item["ipamAllocationId"], + allocationTags: !item["allocationTags"] + ? item["allocationTags"] + : Object.fromEntries( + Object.entries(item["allocationTags"]).map(([k, p]: [string, any]) => [k, p]), + ), + }; +} + +export function _ipGroupPropertiesSerializer(item: IpGroup): any { + return { + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + }; +} + +export function _ipGroupPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + firewalls: !item["firewalls"] + ? item["firewalls"] + : subResourceArrayDeserializer(item["firewalls"]), + firewallPolicies: !item["firewallPolicies"] + ? item["firewallPolicies"] + : subResourceArrayDeserializer(item["firewallPolicies"]), + }; +} + +export function _loadBalancerVipSwapRequestFrontendIPConfigurationPropertiesSerializer( + item: LoadBalancerVipSwapRequestFrontendIPConfiguration, +): any { + return { + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceSerializer(item["publicIPAddress"]), + }; +} + +export function _networkManagerConnectionPropertiesSerializer(item: NetworkManagerConnection): any { + return { networkManagerId: item["networkManagerId"], description: item["description"] }; +} + +export function _networkManagerConnectionPropertiesDeserializer(item: any) { + return { + networkManagerId: item["networkManagerId"], + connectionState: item["connectionState"], + description: item["description"], + }; +} + +export function _connectivityConfigurationPropertiesSerializer( + item: ConnectivityConfiguration, +): any { + return { + description: item["description"], + connectivityTopology: item["connectivityTopology"], + hubs: !item["hubs"] ? item["hubs"] : hubArraySerializer(item["hubs"]), + isGlobal: item["isGlobal"], + connectivityCapabilities: !item["connectivityCapabilities"] + ? item["connectivityCapabilities"] + : connectivityConfigurationPropertiesConnectivityCapabilitiesSerializer( + item["connectivityCapabilities"], + ), + appliesToGroups: !item["appliesToGroups"] + ? item["appliesToGroups"] + : connectivityGroupItemArraySerializer(item["appliesToGroups"]), + deleteExistingPeering: item["deleteExistingPeering"], + }; +} + +export function _connectivityConfigurationPropertiesDeserializer(item: any) { + return { + description: item["description"], + connectivityTopology: item["connectivityTopology"], + hubs: !item["hubs"] ? item["hubs"] : hubArrayDeserializer(item["hubs"]), + isGlobal: item["isGlobal"], + connectivityCapabilities: !item["connectivityCapabilities"] + ? item["connectivityCapabilities"] + : connectivityConfigurationPropertiesConnectivityCapabilitiesDeserializer( + item["connectivityCapabilities"], + ), + appliesToGroups: !item["appliesToGroups"] + ? item["appliesToGroups"] + : connectivityGroupItemArrayDeserializer(item["appliesToGroups"]), + provisioningState: item["provisioningState"], + deleteExistingPeering: item["deleteExistingPeering"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _networkGroupPropertiesSerializer(item: NetworkGroup): any { + return { description: item["description"], memberType: item["memberType"] }; +} + +export function _networkGroupPropertiesDeserializer(item: any) { + return { + description: item["description"], + memberType: item["memberType"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _staticMemberPropertiesSerializer(item: StaticMember): any { + return { resourceId: item["resourceId"] }; +} + +export function _staticMemberPropertiesDeserializer(item: any) { + return { + resourceId: item["resourceId"], + region: item["region"], + provisioningState: item["provisioningState"], + }; +} + +export function _networkManagerRoutingConfigurationPropertiesSerializer( + item: NetworkManagerRoutingConfiguration, +): any { + return { description: item["description"], routeTableUsageMode: item["routeTableUsageMode"] }; +} + +export function _networkManagerRoutingConfigurationPropertiesDeserializer(item: any) { + return { + description: item["description"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + routeTableUsageMode: item["routeTableUsageMode"], + }; +} + +export function _routingRuleCollectionPropertiesSerializer(item: RoutingRuleCollection): any { + return { + description: item["description"], + appliesTo: !item["appliesTo"] + ? item["appliesTo"] + : networkManagerRoutingGroupItemArraySerializer(item["appliesTo"]), + disableBgpRoutePropagation: item["disableBgpRoutePropagation"], + }; +} + +export function _routingRuleCollectionPropertiesDeserializer(item: any) { + return { + description: item["description"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + appliesTo: !item["appliesTo"] + ? item["appliesTo"] + : networkManagerRoutingGroupItemArrayDeserializer(item["appliesTo"]), + disableBgpRoutePropagation: item["disableBgpRoutePropagation"], + }; +} + +export function _routingRulePropertiesSerializer(item: RoutingRule): any { + return { + description: item["description"], + destination: !item["destination"] + ? item["destination"] + : routingRuleRouteDestinationSerializer(item["destination"]), + nextHop: !item["nextHop"] ? item["nextHop"] : routingRuleNextHopSerializer(item["nextHop"]), + }; +} + +export function _routingRulePropertiesDeserializer(item: any) { + return { + description: item["description"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + destination: !item["destination"] + ? item["destination"] + : routingRuleRouteDestinationDeserializer(item["destination"]), + nextHop: !item["nextHop"] ? item["nextHop"] : routingRuleNextHopDeserializer(item["nextHop"]), + }; +} + +export function _scopeConnectionPropertiesSerializer(item: ScopeConnection): any { + return { + tenantId: item["tenantId"], + resourceId: item["resourceId"], + description: item["description"], + }; +} + +export function _scopeConnectionPropertiesDeserializer(item: any) { + return { + tenantId: item["tenantId"], + resourceId: item["resourceId"], + connectionState: item["connectionState"], + description: item["description"], + }; +} + +export function _securityAdminConfigurationPropertiesSerializer( + item: SecurityAdminConfiguration, +): any { + return { + description: item["description"], + applyOnNetworkIntentPolicyBasedServices: !item["applyOnNetworkIntentPolicyBasedServices"] + ? item["applyOnNetworkIntentPolicyBasedServices"] + : item["applyOnNetworkIntentPolicyBasedServices"].map((p: any) => { + return p; + }), + networkGroupAddressSpaceAggregationOption: item["networkGroupAddressSpaceAggregationOption"], + }; +} + +export function _securityAdminConfigurationPropertiesDeserializer(item: any) { + return { + description: item["description"], + applyOnNetworkIntentPolicyBasedServices: !item["applyOnNetworkIntentPolicyBasedServices"] + ? item["applyOnNetworkIntentPolicyBasedServices"] + : item["applyOnNetworkIntentPolicyBasedServices"].map((p: any) => { + return p; + }), + networkGroupAddressSpaceAggregationOption: item["networkGroupAddressSpaceAggregationOption"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _adminRuleCollectionPropertiesSerializer(item: AdminRuleCollection): any { + return { + description: item["description"], + appliesToGroups: !item["appliesToGroups"] + ? item["appliesToGroups"] + : networkManagerSecurityGroupItemArraySerializer(item["appliesToGroups"]), + }; +} + +export function _adminRuleCollectionPropertiesDeserializer(item: any) { + return { + description: item["description"], + appliesToGroups: !item["appliesToGroups"] + ? item["appliesToGroups"] + : networkManagerSecurityGroupItemArrayDeserializer(item["appliesToGroups"]), + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _securityUserConfigurationPropertiesSerializer( + item: SecurityUserConfiguration, +): any { + return { description: item["description"] }; +} + +export function _securityUserConfigurationPropertiesDeserializer(item: any) { + return { + description: item["description"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _securityUserRuleCollectionPropertiesSerializer( + item: SecurityUserRuleCollection, +): any { + return { + description: item["description"], + appliesToGroups: !item["appliesToGroups"] + ? item["appliesToGroups"] + : securityUserGroupItemArraySerializer(item["appliesToGroups"]), + }; +} + +export function _securityUserRuleCollectionPropertiesDeserializer(item: any) { + return { + description: item["description"], + appliesToGroups: !item["appliesToGroups"] + ? item["appliesToGroups"] + : securityUserGroupItemArrayDeserializer(item["appliesToGroups"]), + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _securityUserRulePropertiesSerializer(item: SecurityUserRule): any { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] ? item["sources"] : addressPrefixItemArraySerializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArraySerializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + direction: item["direction"], + }; +} + +export function _securityUserRulePropertiesDeserializer(item: any) { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] + ? item["sources"] + : addressPrefixItemArrayDeserializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArrayDeserializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + direction: item["direction"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _containerNetworkInterfaceConfigurationPropertiesSerializer( + item: ContainerNetworkInterfaceConfiguration, +): any { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : ipConfigurationProfileArraySerializer(item["ipConfigurations"]), + containerNetworkInterfaces: !item["containerNetworkInterfaces"] + ? item["containerNetworkInterfaces"] + : subResourceArraySerializer(item["containerNetworkInterfaces"]), + }; +} + +export function _containerNetworkInterfaceConfigurationPropertiesDeserializer(item: any) { + return { + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : ipConfigurationProfileArrayDeserializer(item["ipConfigurations"]), + containerNetworkInterfaces: !item["containerNetworkInterfaces"] + ? item["containerNetworkInterfaces"] + : subResourceArrayDeserializer(item["containerNetworkInterfaces"]), + provisioningState: item["provisioningState"], + }; +} + +export function _containerNetworkInterfaceIpConfigurationPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + }; +} + +export function _containerNetworkInterfacePropertiesDeserializer(item: any) { + return { + containerNetworkInterfaceConfiguration: !item["containerNetworkInterfaceConfiguration"] + ? item["containerNetworkInterfaceConfiguration"] + : containerNetworkInterfaceConfigurationDeserializer( + item["containerNetworkInterfaceConfiguration"], + ), + container: !item["container"] ? item["container"] : containerDeserializer(item["container"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : containerNetworkInterfaceIpConfigurationArrayDeserializer(item["ipConfigurations"]), + provisioningState: item["provisioningState"], + }; +} + +export function _networkProfilePropertiesSerializer(item: NetworkProfile): any { + return { + containerNetworkInterfaceConfigurations: !item["containerNetworkInterfaceConfigurations"] + ? item["containerNetworkInterfaceConfigurations"] + : containerNetworkInterfaceConfigurationArraySerializer( + item["containerNetworkInterfaceConfigurations"], + ), + }; +} + +export function _networkProfilePropertiesDeserializer(item: any) { + return { + containerNetworkInterfaces: !item["containerNetworkInterfaces"] + ? item["containerNetworkInterfaces"] + : containerNetworkInterfaceArrayDeserializer(item["containerNetworkInterfaces"]), + containerNetworkInterfaceConfigurations: !item["containerNetworkInterfaceConfigurations"] + ? item["containerNetworkInterfaceConfigurations"] + : containerNetworkInterfaceConfigurationArrayDeserializer( + item["containerNetworkInterfaceConfigurations"], + ), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function _networkSecurityPerimeterPropertiesSerializer( + _item: NetworkSecurityPerimeter, +): any { + return {}; +} + +export function _networkSecurityPerimeterPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + perimeterGuid: item["perimeterGuid"], + }; +} + +export function _networkVirtualApplianceConnectionPropertiesSerializer( + item: NetworkVirtualApplianceConnection, +): any { + return { + name: item["namePropertiesName"], + asn: item["asn"], + tunnelIdentifier: item["tunnelIdentifier"], + bgpPeerAddress: !item["bgpPeerAddress"] + ? item["bgpPeerAddress"] + : item["bgpPeerAddress"].map((p: any) => { + return p; + }), + enableInternetSecurity: item["enableInternetSecurity"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function _networkVirtualApplianceConnectionPropertiesDeserializer(item: any) { + return { + namePropertiesName: item["name"], + provisioningState: item["provisioningState"], + asn: item["asn"], + tunnelIdentifier: item["tunnelIdentifier"], + bgpPeerAddress: !item["bgpPeerAddress"] + ? item["bgpPeerAddress"] + : item["bgpPeerAddress"].map((p: any) => { + return p; + }), + enableInternetSecurity: item["enableInternetSecurity"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +export function _networkVirtualAppliancePropertiesSerializer(item: NetworkVirtualAppliance): any { + return { + nvaSku: !item["nvaSku"] + ? item["nvaSku"] + : virtualApplianceSkuPropertiesSerializer(item["nvaSku"]), + bootStrapConfigurationBlobs: !item["bootStrapConfigurationBlobs"] + ? item["bootStrapConfigurationBlobs"] + : item["bootStrapConfigurationBlobs"].map((p: any) => { + return p; + }), + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceSerializer(item["virtualHub"]), + cloudInitConfigurationBlobs: !item["cloudInitConfigurationBlobs"] + ? item["cloudInitConfigurationBlobs"] + : item["cloudInitConfigurationBlobs"].map((p: any) => { + return p; + }), + cloudInitConfiguration: item["cloudInitConfiguration"], + virtualApplianceAsn: item["virtualApplianceAsn"], + sshPublicKey: item["sshPublicKey"], + networkProfile: !item["networkProfile"] + ? item["networkProfile"] + : networkVirtualAppliancePropertiesFormatNetworkProfileSerializer(item["networkProfile"]), + additionalNics: !item["additionalNics"] + ? item["additionalNics"] + : virtualApplianceAdditionalNicPropertiesArraySerializer(item["additionalNics"]), + internetIngressPublicIps: !item["internetIngressPublicIps"] + ? item["internetIngressPublicIps"] + : internetIngressPublicIpsPropertiesArraySerializer(item["internetIngressPublicIps"]), + delegation: !item["delegation"] + ? item["delegation"] + : delegationPropertiesSerializer(item["delegation"]), + partnerManagedResource: !item["partnerManagedResource"] + ? item["partnerManagedResource"] + : partnerManagedResourcePropertiesSerializer(item["partnerManagedResource"]), + nvaInterfaceConfigurations: !item["nvaInterfaceConfigurations"] + ? item["nvaInterfaceConfigurations"] + : nvaInterfaceConfigurationsPropertiesArraySerializer(item["nvaInterfaceConfigurations"]), + }; +} + +export function _networkVirtualAppliancePropertiesDeserializer(item: any) { + return { + nvaSku: !item["nvaSku"] + ? item["nvaSku"] + : virtualApplianceSkuPropertiesDeserializer(item["nvaSku"]), + addressPrefix: item["addressPrefix"], + bootStrapConfigurationBlobs: !item["bootStrapConfigurationBlobs"] + ? item["bootStrapConfigurationBlobs"] + : item["bootStrapConfigurationBlobs"].map((p: any) => { + return p; + }), + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceDeserializer(item["virtualHub"]), + cloudInitConfigurationBlobs: !item["cloudInitConfigurationBlobs"] + ? item["cloudInitConfigurationBlobs"] + : item["cloudInitConfigurationBlobs"].map((p: any) => { + return p; + }), + cloudInitConfiguration: item["cloudInitConfiguration"], + virtualApplianceAsn: item["virtualApplianceAsn"], + sshPublicKey: item["sshPublicKey"], + virtualApplianceNics: !item["virtualApplianceNics"] + ? item["virtualApplianceNics"] + : virtualApplianceNicPropertiesArrayDeserializer(item["virtualApplianceNics"]), + networkProfile: !item["networkProfile"] + ? item["networkProfile"] + : networkVirtualAppliancePropertiesFormatNetworkProfileDeserializer(item["networkProfile"]), + additionalNics: !item["additionalNics"] + ? item["additionalNics"] + : virtualApplianceAdditionalNicPropertiesArrayDeserializer(item["additionalNics"]), + internetIngressPublicIps: !item["internetIngressPublicIps"] + ? item["internetIngressPublicIps"] + : internetIngressPublicIpsPropertiesArrayDeserializer(item["internetIngressPublicIps"]), + virtualApplianceSites: !item["virtualApplianceSites"] + ? item["virtualApplianceSites"] + : subResourceArrayDeserializer(item["virtualApplianceSites"]), + virtualApplianceConnections: !item["virtualApplianceConnections"] + ? item["virtualApplianceConnections"] + : subResourceArrayDeserializer(item["virtualApplianceConnections"]), + inboundSecurityRules: !item["inboundSecurityRules"] + ? item["inboundSecurityRules"] + : subResourceArrayDeserializer(item["inboundSecurityRules"]), + provisioningState: item["provisioningState"], + deploymentType: item["deploymentType"], + delegation: !item["delegation"] + ? item["delegation"] + : delegationPropertiesDeserializer(item["delegation"]), + partnerManagedResource: !item["partnerManagedResource"] + ? item["partnerManagedResource"] + : partnerManagedResourcePropertiesDeserializer(item["partnerManagedResource"]), + nvaInterfaceConfigurations: !item["nvaInterfaceConfigurations"] + ? item["nvaInterfaceConfigurations"] + : nvaInterfaceConfigurationsPropertiesArrayDeserializer(item["nvaInterfaceConfigurations"]), + privateIpAddress: item["privateIpAddress"], + }; +} + +export function _virtualApplianceSitePropertiesSerializer(item: VirtualApplianceSite): any { + return { + addressPrefix: item["addressPrefix"], + o365Policy: !item["o365Policy"] + ? item["o365Policy"] + : office365PolicyPropertiesSerializer(item["o365Policy"]), + }; +} + +export function _virtualApplianceSitePropertiesDeserializer(item: any) { + return { + addressPrefix: item["addressPrefix"], + o365Policy: !item["o365Policy"] + ? item["o365Policy"] + : office365PolicyPropertiesDeserializer(item["o365Policy"]), + provisioningState: item["provisioningState"], + }; +} + +export function _troubleshootingParametersPropertiesSerializer( + item: TroubleshootingParameters, +): any { + return { storageId: item["storageId"], storagePath: item["storagePath"] }; +} + +export function _flowLogInformationPropertiesSerializer(item: FlowLogInformation): any { + return { + storageId: item["storageId"], + enabledFilteringCriteria: item["enabledFilteringCriteria"], + recordTypes: item["recordTypes"], + enabled: item["enabled"], + retentionPolicy: !item["retentionPolicy"] + ? item["retentionPolicy"] + : retentionPolicyParametersSerializer(item["retentionPolicy"]), + format: !item["format"] ? item["format"] : flowLogFormatParametersSerializer(item["format"]), + }; +} + +export function _flowLogInformationPropertiesDeserializer(item: any) { + return { + storageId: item["storageId"], + enabledFilteringCriteria: item["enabledFilteringCriteria"], + recordTypes: item["recordTypes"], + enabled: item["enabled"], + retentionPolicy: !item["retentionPolicy"] + ? item["retentionPolicy"] + : retentionPolicyParametersDeserializer(item["retentionPolicy"]), + format: !item["format"] ? item["format"] : flowLogFormatParametersDeserializer(item["format"]), + }; +} + +export function _hopLinkPropertiesDeserializer(item: any) { + return { + roundTripTimeMin: item["roundTripTimeMin"], + roundTripTimeAvg: item["roundTripTimeAvg"], + roundTripTimeMax: item["roundTripTimeMax"], + }; +} + +export function _publicIPPrefixPropertiesSerializer(item: PublicIPPrefix): any { + return { + publicIPAddressVersion: item["publicIPAddressVersion"], + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArraySerializer(item["ipTags"]), + prefixLength: item["prefixLength"], + customIPPrefix: !item["customIPPrefix"] + ? item["customIPPrefix"] + : subResourceSerializer(item["customIPPrefix"]), + natGateway: !item["natGateway"] ? item["natGateway"] : natGatewaySerializer(item["natGateway"]), + }; +} + +export function _publicIPPrefixPropertiesDeserializer(item: any) { + return { + publicIPAddressVersion: item["publicIPAddressVersion"], + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArrayDeserializer(item["ipTags"]), + prefixLength: item["prefixLength"], + ipPrefix: item["ipPrefix"], + publicIPAddresses: !item["publicIPAddresses"] + ? item["publicIPAddresses"] + : referencedPublicIpAddressArrayDeserializer(item["publicIPAddresses"]), + loadBalancerFrontendIpConfiguration: !item["loadBalancerFrontendIpConfiguration"] + ? item["loadBalancerFrontendIpConfiguration"] + : subResourceDeserializer(item["loadBalancerFrontendIpConfiguration"]), + customIPPrefix: !item["customIPPrefix"] + ? item["customIPPrefix"] + : subResourceDeserializer(item["customIPPrefix"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + natGateway: !item["natGateway"] + ? item["natGateway"] + : natGatewayDeserializer(item["natGateway"]), + }; +} + +export function _routeFilterRulePropertiesSerializer(item: RouteFilterRule): any { + return { + access: item["access"], + routeFilterRuleType: item["routeFilterRuleType"], + communities: !item["communities"] + ? item["communities"] + : item["communities"].map((p: any) => { + return p; + }), + }; +} + +export function _routeFilterRulePropertiesDeserializer(item: any) { + return { + access: item["access"], + routeFilterRuleType: item["routeFilterRuleType"], + communities: !item["communities"] + ? item["communities"] + : item["communities"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _routeFilterPropertiesSerializer(item: RouteFilter): any { + return { rules: !item["rules"] ? item["rules"] : routeFilterRuleArraySerializer(item["rules"]) }; +} + +export function _routeFilterPropertiesDeserializer(item: any) { + return { + rules: !item["rules"] ? item["rules"] : routeFilterRuleArrayDeserializer(item["rules"]), + peerings: !item["peerings"] + ? item["peerings"] + : expressRouteCircuitPeeringArrayDeserializer(item["peerings"]), + ipv6Peerings: !item["ipv6Peerings"] + ? item["ipv6Peerings"] + : expressRouteCircuitPeeringArrayDeserializer(item["ipv6Peerings"]), + provisioningState: item["provisioningState"], + }; +} + +export function _securityPartnerProviderPropertiesSerializer(item: SecurityPartnerProvider): any { + return { + securityProviderName: item["securityProviderName"], + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceSerializer(item["virtualHub"]), + }; +} + +export function _securityPartnerProviderPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + securityProviderName: item["securityProviderName"], + connectionStatus: item["connectionStatus"], + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceDeserializer(item["virtualHub"]), + }; +} + +export function _virtualNetworkGatewayIPConfigurationPropertiesSerializer( + item: VirtualNetworkGatewayIPConfiguration, +): any { + return { + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceSerializer(item["publicIPAddress"]), + }; +} + +export function _virtualNetworkGatewayIPConfigurationPropertiesDeserializer(item: any) { + return { + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : subResourceDeserializer(item["publicIPAddress"]), + privateIPAddress: item["privateIPAddress"], + provisioningState: item["provisioningState"], + }; +} + +export function _vpnClientRootCertificatePropertiesSerializer(item: VpnClientRootCertificate): any { + return { publicCertData: item["publicCertData"] }; +} + +export function _vpnClientRootCertificatePropertiesDeserializer(item: any) { + return { + publicCertData: item["publicCertData"], + provisioningState: item["provisioningState"], + }; +} + +export function _vpnClientRevokedCertificatePropertiesSerializer( + item: VpnClientRevokedCertificate, +): any { + return { thumbprint: item["thumbprint"] }; +} + +export function _vpnClientRevokedCertificatePropertiesDeserializer(item: any) { + return { + thumbprint: item["thumbprint"], + provisioningState: item["provisioningState"], + }; +} + +export function _vngClientConnectionConfigurationPropertiesSerializer( + item: VngClientConnectionConfiguration, +): any { + return { + vpnClientAddressPool: !item["vpnClientAddressPool"] + ? item["vpnClientAddressPool"] + : addressSpaceSerializer(item["vpnClientAddressPool"]), + virtualNetworkGatewayPolicyGroups: !item["virtualNetworkGatewayPolicyGroups"] + ? item["virtualNetworkGatewayPolicyGroups"] + : subResourceArraySerializer(item["virtualNetworkGatewayPolicyGroups"]), + }; +} + +export function _vngClientConnectionConfigurationPropertiesDeserializer(item: any) { + return { + vpnClientAddressPool: !item["vpnClientAddressPool"] + ? item["vpnClientAddressPool"] + : addressSpaceDeserializer(item["vpnClientAddressPool"]), + virtualNetworkGatewayPolicyGroups: !item["virtualNetworkGatewayPolicyGroups"] + ? item["virtualNetworkGatewayPolicyGroups"] + : subResourceArrayDeserializer(item["virtualNetworkGatewayPolicyGroups"]), + provisioningState: item["provisioningState"], + }; +} + +export function _virtualNetworkGatewayPolicyGroupPropertiesSerializer( + item: VirtualNetworkGatewayPolicyGroup, +): any { + return { + isDefault: item["isDefault"], + priority: item["priority"], + policyMembers: !item["policyMembers"] + ? item["policyMembers"] + : virtualNetworkGatewayPolicyGroupMemberArraySerializer(item["policyMembers"]), + }; +} + +export function _virtualNetworkGatewayPolicyGroupPropertiesDeserializer(item: any) { + return { + isDefault: item["isDefault"], + priority: item["priority"], + policyMembers: !item["policyMembers"] + ? item["policyMembers"] + : virtualNetworkGatewayPolicyGroupMemberArrayDeserializer(item["policyMembers"]), + vngClientConnectionConfigurations: !item["vngClientConnectionConfigurations"] + ? item["vngClientConnectionConfigurations"] + : subResourceArrayDeserializer(item["vngClientConnectionConfigurations"]), + provisioningState: item["provisioningState"], + }; +} + +export function _virtualNetworkGatewayNatRulePropertiesSerializer( + item: VirtualNetworkGatewayNatRule, +): any { + return { + type: item["typePropertiesType"], + mode: item["mode"], + internalMappings: !item["internalMappings"] + ? item["internalMappings"] + : vpnNatRuleMappingArraySerializer(item["internalMappings"]), + externalMappings: !item["externalMappings"] + ? item["externalMappings"] + : vpnNatRuleMappingArraySerializer(item["externalMappings"]), + ipConfigurationId: item["ipConfigurationId"], + }; +} + +export function _virtualNetworkGatewayNatRulePropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + typePropertiesType: item["type"], + mode: item["mode"], + internalMappings: !item["internalMappings"] + ? item["internalMappings"] + : vpnNatRuleMappingArrayDeserializer(item["internalMappings"]), + externalMappings: !item["externalMappings"] + ? item["externalMappings"] + : vpnNatRuleMappingArrayDeserializer(item["externalMappings"]), + ipConfigurationId: item["ipConfigurationId"], + }; +} + +export function _virtualNetworkGatewayPropertiesSerializer(item: VirtualNetworkGateway): any { + return { + autoScaleConfiguration: !item["autoScaleConfiguration"] + ? item["autoScaleConfiguration"] + : virtualNetworkGatewayAutoScaleConfigurationSerializer(item["autoScaleConfiguration"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : virtualNetworkGatewayIPConfigurationArraySerializer(item["ipConfigurations"]), + gatewayType: item["gatewayType"], + vpnType: item["vpnType"], + vpnGatewayGeneration: item["vpnGatewayGeneration"], + enableBgp: item["enableBgp"], + enablePrivateIpAddress: item["enablePrivateIpAddress"], + virtualNetworkGatewayMigrationStatus: !item["virtualNetworkGatewayMigrationStatus"] + ? item["virtualNetworkGatewayMigrationStatus"] + : virtualNetworkGatewayMigrationStatusSerializer( + item["virtualNetworkGatewayMigrationStatus"], + ), + activeActive: item["active"], + enableHighBandwidthVpnGateway: item["enableHighBandwidthVpnGateway"], + disableIPSecReplayProtection: item["disableIPSecReplayProtection"], + gatewayDefaultSite: !item["gatewayDefaultSite"] + ? item["gatewayDefaultSite"] + : subResourceSerializer(item["gatewayDefaultSite"]), + sku: !item["sku"] ? item["sku"] : virtualNetworkGatewaySkuSerializer(item["sku"]), + vpnClientConfiguration: !item["vpnClientConfiguration"] + ? item["vpnClientConfiguration"] + : vpnClientConfigurationSerializer(item["vpnClientConfiguration"]), + virtualNetworkGatewayPolicyGroups: !item["virtualNetworkGatewayPolicyGroups"] + ? item["virtualNetworkGatewayPolicyGroups"] + : virtualNetworkGatewayPolicyGroupArraySerializer(item["virtualNetworkGatewayPolicyGroups"]), + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsSerializer(item["bgpSettings"]), + customRoutes: !item["customRoutes"] + ? item["customRoutes"] + : addressSpaceSerializer(item["customRoutes"]), + enableDnsForwarding: item["enableDnsForwarding"], + vNetExtendedLocationResourceId: item["vNetExtendedLocationResourceId"], + natRules: !item["natRules"] + ? item["natRules"] + : virtualNetworkGatewayNatRuleArraySerializer(item["natRules"]), + enableBgpRouteTranslationForNat: item["enableBgpRouteTranslationForNat"], + allowVirtualWanTraffic: item["allowVirtualWanTraffic"], + allowRemoteVnetTraffic: item["allowRemoteVnetTraffic"], + adminState: item["adminState"], + resiliencyModel: item["resiliencyModel"], + }; +} + +export function _virtualNetworkGatewayPropertiesDeserializer(item: any) { + return { + autoScaleConfiguration: !item["autoScaleConfiguration"] + ? item["autoScaleConfiguration"] + : virtualNetworkGatewayAutoScaleConfigurationDeserializer(item["autoScaleConfiguration"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : virtualNetworkGatewayIPConfigurationArrayDeserializer(item["ipConfigurations"]), + gatewayType: item["gatewayType"], + vpnType: item["vpnType"], + vpnGatewayGeneration: item["vpnGatewayGeneration"], + enableBgp: item["enableBgp"], + enablePrivateIpAddress: item["enablePrivateIpAddress"], + virtualNetworkGatewayMigrationStatus: !item["virtualNetworkGatewayMigrationStatus"] + ? item["virtualNetworkGatewayMigrationStatus"] + : virtualNetworkGatewayMigrationStatusDeserializer( + item["virtualNetworkGatewayMigrationStatus"], + ), + active: item["activeActive"], + enableHighBandwidthVpnGateway: item["enableHighBandwidthVpnGateway"], + disableIPSecReplayProtection: item["disableIPSecReplayProtection"], + gatewayDefaultSite: !item["gatewayDefaultSite"] + ? item["gatewayDefaultSite"] + : subResourceDeserializer(item["gatewayDefaultSite"]), + sku: !item["sku"] ? item["sku"] : virtualNetworkGatewaySkuDeserializer(item["sku"]), + vpnClientConfiguration: !item["vpnClientConfiguration"] + ? item["vpnClientConfiguration"] + : vpnClientConfigurationDeserializer(item["vpnClientConfiguration"]), + virtualNetworkGatewayPolicyGroups: !item["virtualNetworkGatewayPolicyGroups"] + ? item["virtualNetworkGatewayPolicyGroups"] + : virtualNetworkGatewayPolicyGroupArrayDeserializer( + item["virtualNetworkGatewayPolicyGroups"], + ), + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsDeserializer(item["bgpSettings"]), + customRoutes: !item["customRoutes"] + ? item["customRoutes"] + : addressSpaceDeserializer(item["customRoutes"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + enableDnsForwarding: item["enableDnsForwarding"], + inboundDnsForwardingEndpoint: item["inboundDnsForwardingEndpoint"], + vNetExtendedLocationResourceId: item["vNetExtendedLocationResourceId"], + natRules: !item["natRules"] + ? item["natRules"] + : virtualNetworkGatewayNatRuleArrayDeserializer(item["natRules"]), + enableBgpRouteTranslationForNat: item["enableBgpRouteTranslationForNat"], + allowVirtualWanTraffic: item["allowVirtualWanTraffic"], + allowRemoteVnetTraffic: item["allowRemoteVnetTraffic"], + adminState: item["adminState"], + resiliencyModel: item["resiliencyModel"], + }; +} + +export function _virtualNetworkGatewayConnectionListEntityPropertiesDeserializer(item: any) { + return { + authorizationKey: item["authorizationKey"], + virtualNetworkGateway1: virtualNetworkConnectionGatewayReferenceDeserializer( + item["virtualNetworkGateway1"], + ), + virtualNetworkGateway2: !item["virtualNetworkGateway2"] + ? item["virtualNetworkGateway2"] + : virtualNetworkConnectionGatewayReferenceDeserializer(item["virtualNetworkGateway2"]), + localNetworkGateway2: !item["localNetworkGateway2"] + ? item["localNetworkGateway2"] + : virtualNetworkConnectionGatewayReferenceDeserializer(item["localNetworkGateway2"]), + connectionType: item["connectionType"], + connectionProtocol: item["connectionProtocol"], + routingWeight: item["routingWeight"], + connectionMode: item["connectionMode"], + sharedKey: item["sharedKey"], + connectionStatus: item["connectionStatus"], + tunnelConnectionStatus: !item["tunnelConnectionStatus"] + ? item["tunnelConnectionStatus"] + : tunnelConnectionHealthArrayDeserializer(item["tunnelConnectionStatus"]), + egressBytesTransferred: item["egressBytesTransferred"], + ingressBytesTransferred: item["ingressBytesTransferred"], + peer: !item["peer"] ? item["peer"] : subResourceDeserializer(item["peer"]), + enableBgp: item["enableBgp"], + gatewayCustomBgpIpAddresses: !item["gatewayCustomBgpIpAddresses"] + ? item["gatewayCustomBgpIpAddresses"] + : gatewayCustomBgpIpAddressIpConfigurationArrayDeserializer( + item["gatewayCustomBgpIpAddresses"], + ), + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArrayDeserializer(item["ipsecPolicies"]), + trafficSelectorPolicies: !item["trafficSelectorPolicies"] + ? item["trafficSelectorPolicies"] + : trafficSelectorPolicyArrayDeserializer(item["trafficSelectorPolicies"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + expressRouteGatewayBypass: item["expressRouteGatewayBypass"], + enablePrivateLinkFastPath: item["enablePrivateLinkFastPath"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +export function _localNetworkGatewayPropertiesSerializer(item: LocalNetworkGateway): any { + return { + localNetworkAddressSpace: !item["localNetworkAddressSpace"] + ? item["localNetworkAddressSpace"] + : addressSpaceSerializer(item["localNetworkAddressSpace"]), + gatewayIpAddress: item["gatewayIpAddress"], + fqdn: item["fqdn"], + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsSerializer(item["bgpSettings"]), + }; +} + +export function _localNetworkGatewayPropertiesDeserializer(item: any) { + return { + localNetworkAddressSpace: !item["localNetworkAddressSpace"] + ? item["localNetworkAddressSpace"] + : addressSpaceDeserializer(item["localNetworkAddressSpace"]), + gatewayIpAddress: item["gatewayIpAddress"], + fqdn: item["fqdn"], + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsDeserializer(item["bgpSettings"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function _virtualNetworkGatewayConnectionPropertiesSerializer( + item: VirtualNetworkGatewayConnection, +): any { + return { + authorizationKey: item["authorizationKey"], + virtualNetworkGateway1: virtualNetworkGatewaySerializer(item["virtualNetworkGateway1"]), + virtualNetworkGateway2: !item["virtualNetworkGateway2"] + ? item["virtualNetworkGateway2"] + : virtualNetworkGatewaySerializer(item["virtualNetworkGateway2"]), + localNetworkGateway2: !item["localNetworkGateway2"] + ? item["localNetworkGateway2"] + : localNetworkGatewaySerializer(item["localNetworkGateway2"]), + ingressNatRules: !item["ingressNatRules"] + ? item["ingressNatRules"] + : subResourceArraySerializer(item["ingressNatRules"]), + egressNatRules: !item["egressNatRules"] + ? item["egressNatRules"] + : subResourceArraySerializer(item["egressNatRules"]), + connectionType: item["connectionType"], + connectionProtocol: item["connectionProtocol"], + routingWeight: item["routingWeight"], + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + connectionMode: item["connectionMode"], + tunnelProperties: !item["tunnelProperties"] + ? item["tunnelProperties"] + : virtualNetworkGatewayConnectionTunnelPropertiesArraySerializer(item["tunnelProperties"]), + sharedKey: item["sharedKey"], + peer: !item["peer"] ? item["peer"] : subResourceSerializer(item["peer"]), + enableBgp: item["enableBgp"], + gatewayCustomBgpIpAddresses: !item["gatewayCustomBgpIpAddresses"] + ? item["gatewayCustomBgpIpAddresses"] + : gatewayCustomBgpIpAddressIpConfigurationArraySerializer( + item["gatewayCustomBgpIpAddresses"], + ), + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArraySerializer(item["ipsecPolicies"]), + trafficSelectorPolicies: !item["trafficSelectorPolicies"] + ? item["trafficSelectorPolicies"] + : trafficSelectorPolicyArraySerializer(item["trafficSelectorPolicies"]), + expressRouteGatewayBypass: item["expressRouteGatewayBypass"], + enablePrivateLinkFastPath: item["enablePrivateLinkFastPath"], + authenticationType: item["authenticationType"], + certificateAuthentication: !item["certificateAuthentication"] + ? item["certificateAuthentication"] + : certificateAuthenticationSerializer(item["certificateAuthentication"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function _virtualNetworkGatewayConnectionPropertiesDeserializer(item: any) { + return { + authorizationKey: item["authorizationKey"], + virtualNetworkGateway1: virtualNetworkGatewayDeserializer(item["virtualNetworkGateway1"]), + virtualNetworkGateway2: !item["virtualNetworkGateway2"] + ? item["virtualNetworkGateway2"] + : virtualNetworkGatewayDeserializer(item["virtualNetworkGateway2"]), + localNetworkGateway2: !item["localNetworkGateway2"] + ? item["localNetworkGateway2"] + : localNetworkGatewayDeserializer(item["localNetworkGateway2"]), + ingressNatRules: !item["ingressNatRules"] + ? item["ingressNatRules"] + : subResourceArrayDeserializer(item["ingressNatRules"]), + egressNatRules: !item["egressNatRules"] + ? item["egressNatRules"] + : subResourceArrayDeserializer(item["egressNatRules"]), + connectionType: item["connectionType"], + connectionProtocol: item["connectionProtocol"], + routingWeight: item["routingWeight"], + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + connectionMode: item["connectionMode"], + tunnelProperties: !item["tunnelProperties"] + ? item["tunnelProperties"] + : virtualNetworkGatewayConnectionTunnelPropertiesArrayDeserializer(item["tunnelProperties"]), + sharedKey: item["sharedKey"], + connectionStatus: item["connectionStatus"], + tunnelConnectionStatus: !item["tunnelConnectionStatus"] + ? item["tunnelConnectionStatus"] + : tunnelConnectionHealthArrayDeserializer(item["tunnelConnectionStatus"]), + egressBytesTransferred: item["egressBytesTransferred"], + ingressBytesTransferred: item["ingressBytesTransferred"], + peer: !item["peer"] ? item["peer"] : subResourceDeserializer(item["peer"]), + enableBgp: item["enableBgp"], + gatewayCustomBgpIpAddresses: !item["gatewayCustomBgpIpAddresses"] + ? item["gatewayCustomBgpIpAddresses"] + : gatewayCustomBgpIpAddressIpConfigurationArrayDeserializer( + item["gatewayCustomBgpIpAddresses"], + ), + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArrayDeserializer(item["ipsecPolicies"]), + trafficSelectorPolicies: !item["trafficSelectorPolicies"] + ? item["trafficSelectorPolicies"] + : trafficSelectorPolicyArrayDeserializer(item["trafficSelectorPolicies"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + expressRouteGatewayBypass: item["expressRouteGatewayBypass"], + enablePrivateLinkFastPath: item["enablePrivateLinkFastPath"], + authenticationType: item["authenticationType"], + certificateAuthentication: !item["certificateAuthentication"] + ? item["certificateAuthentication"] + : certificateAuthenticationDeserializer(item["certificateAuthentication"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +export function _virtualRouterPropertiesSerializer(item: VirtualRouter): any { + return { + virtualRouterAsn: item["virtualRouterAsn"], + virtualRouterIps: !item["virtualRouterIps"] + ? item["virtualRouterIps"] + : item["virtualRouterIps"].map((p: any) => { + return p; + }), + hostedSubnet: !item["hostedSubnet"] + ? item["hostedSubnet"] + : subResourceSerializer(item["hostedSubnet"]), + hostedGateway: !item["hostedGateway"] + ? item["hostedGateway"] + : subResourceSerializer(item["hostedGateway"]), + }; +} + +export function _virtualRouterPropertiesDeserializer(item: any) { + return { + virtualRouterAsn: item["virtualRouterAsn"], + virtualRouterIps: !item["virtualRouterIps"] + ? item["virtualRouterIps"] + : item["virtualRouterIps"].map((p: any) => { + return p; + }), + hostedSubnet: !item["hostedSubnet"] + ? item["hostedSubnet"] + : subResourceDeserializer(item["hostedSubnet"]), + hostedGateway: !item["hostedGateway"] + ? item["hostedGateway"] + : subResourceDeserializer(item["hostedGateway"]), + peerings: !item["peerings"] ? item["peerings"] : subResourceArrayDeserializer(item["peerings"]), + provisioningState: item["provisioningState"], + }; +} + +export function _virtualRouterPeeringPropertiesSerializer(item: VirtualRouterPeering): any { + return { peerAsn: item["peerAsn"], peerIp: item["peerIp"] }; +} + +export function _virtualRouterPeeringPropertiesDeserializer(item: any) { + return { + peerAsn: item["peerAsn"], + peerIp: item["peerIp"], + provisioningState: item["provisioningState"], + }; +} + +export function _virtualWANPropertiesSerializer(item: VirtualWAN): any { + return { + disableVpnEncryption: item["disableVpnEncryption"], + allowBranchToBranchTraffic: item["allowBranchToBranchTraffic"], + allowVnetToVnetTraffic: item["allowVnetToVnetTraffic"], + type: item["typePropertiesType"], + }; +} + +export function _virtualWANPropertiesDeserializer(item: any) { + return { + disableVpnEncryption: item["disableVpnEncryption"], + virtualHubs: !item["virtualHubs"] + ? item["virtualHubs"] + : subResourceArrayDeserializer(item["virtualHubs"]), + vpnSites: !item["vpnSites"] ? item["vpnSites"] : subResourceArrayDeserializer(item["vpnSites"]), + allowBranchToBranchTraffic: item["allowBranchToBranchTraffic"], + allowVnetToVnetTraffic: item["allowVnetToVnetTraffic"], + office365LocalBreakoutCategory: item["office365LocalBreakoutCategory"], + provisioningState: item["provisioningState"], + typePropertiesType: item["type"], + }; +} + +export function _vpnSiteLinkPropertiesSerializer(item: VpnSiteLink): any { + return { + linkProperties: !item["linkProperties"] + ? item["linkProperties"] + : vpnLinkProviderPropertiesSerializer(item["linkProperties"]), + ipAddress: item["ipAddress"], + fqdn: item["fqdn"], + bgpProperties: !item["bgpProperties"] + ? item["bgpProperties"] + : vpnLinkBgpSettingsSerializer(item["bgpProperties"]), + }; +} + +export function _vpnSiteLinkPropertiesDeserializer(item: any) { + return { + linkProperties: !item["linkProperties"] + ? item["linkProperties"] + : vpnLinkProviderPropertiesDeserializer(item["linkProperties"]), + ipAddress: item["ipAddress"], + fqdn: item["fqdn"], + bgpProperties: !item["bgpProperties"] + ? item["bgpProperties"] + : vpnLinkBgpSettingsDeserializer(item["bgpProperties"]), + provisioningState: item["provisioningState"], + }; +} + +export function _vpnSitePropertiesSerializer(item: VpnSite): any { + return { + virtualWan: !item["virtualWan"] + ? item["virtualWan"] + : subResourceSerializer(item["virtualWan"]), + deviceProperties: !item["deviceProperties"] + ? item["deviceProperties"] + : devicePropertiesSerializer(item["deviceProperties"]), + ipAddress: item["ipAddress"], + siteKey: item["siteKey"], + addressSpace: !item["addressSpace"] + ? item["addressSpace"] + : addressSpaceSerializer(item["addressSpace"]), + bgpProperties: !item["bgpProperties"] + ? item["bgpProperties"] + : bgpSettingsSerializer(item["bgpProperties"]), + isSecuritySite: item["isSecuritySite"], + vpnSiteLinks: !item["vpnSiteLinks"] + ? item["vpnSiteLinks"] + : vpnSiteLinkArraySerializer(item["vpnSiteLinks"]), + o365Policy: !item["o365Policy"] + ? item["o365Policy"] + : o365PolicyPropertiesSerializer(item["o365Policy"]), + }; +} + +export function _vpnSitePropertiesDeserializer(item: any) { + return { + virtualWan: !item["virtualWan"] + ? item["virtualWan"] + : subResourceDeserializer(item["virtualWan"]), + deviceProperties: !item["deviceProperties"] + ? item["deviceProperties"] + : devicePropertiesDeserializer(item["deviceProperties"]), + ipAddress: item["ipAddress"], + siteKey: item["siteKey"], + addressSpace: !item["addressSpace"] + ? item["addressSpace"] + : addressSpaceDeserializer(item["addressSpace"]), + bgpProperties: !item["bgpProperties"] + ? item["bgpProperties"] + : bgpSettingsDeserializer(item["bgpProperties"]), + provisioningState: item["provisioningState"], + isSecuritySite: item["isSecuritySite"], + vpnSiteLinks: !item["vpnSiteLinks"] + ? item["vpnSiteLinks"] + : vpnSiteLinkArrayDeserializer(item["vpnSiteLinks"]), + o365Policy: !item["o365Policy"] + ? item["o365Policy"] + : o365PolicyPropertiesDeserializer(item["o365Policy"]), + }; +} + +export function _vpnServerConfigurationPolicyGroupPropertiesSerializer( + item: VpnServerConfigurationPolicyGroup, +): any { + return { + isDefault: item["isDefault"], + priority: item["priority"], + policyMembers: !item["policyMembers"] + ? item["policyMembers"] + : vpnServerConfigurationPolicyGroupMemberArraySerializer(item["policyMembers"]), + }; +} + +export function _vpnServerConfigurationPolicyGroupPropertiesDeserializer(item: any) { + return { + isDefault: item["isDefault"], + priority: item["priority"], + policyMembers: !item["policyMembers"] + ? item["policyMembers"] + : vpnServerConfigurationPolicyGroupMemberArrayDeserializer(item["policyMembers"]), + p2SConnectionConfigurations: !item["p2SConnectionConfigurations"] + ? item["p2SConnectionConfigurations"] + : subResourceArrayDeserializer(item["p2SConnectionConfigurations"]), + provisioningState: item["provisioningState"], + }; +} + +export function _p2SConnectionConfigurationPropertiesSerializer( + item: P2SConnectionConfiguration, +): any { + return { + vpnClientAddressPool: !item["vpnClientAddressPool"] + ? item["vpnClientAddressPool"] + : addressSpaceSerializer(item["vpnClientAddressPool"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + enableInternetSecurity: item["enableInternetSecurity"], + configurationPolicyGroupAssociations: !item["configurationPolicyGroupAssociations"] + ? item["configurationPolicyGroupAssociations"] + : subResourceArraySerializer(item["configurationPolicyGroupAssociations"]), + }; +} + +export function _p2SConnectionConfigurationPropertiesDeserializer(item: any) { + return { + vpnClientAddressPool: !item["vpnClientAddressPool"] + ? item["vpnClientAddressPool"] + : addressSpaceDeserializer(item["vpnClientAddressPool"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + enableInternetSecurity: item["enableInternetSecurity"], + configurationPolicyGroupAssociations: !item["configurationPolicyGroupAssociations"] + ? item["configurationPolicyGroupAssociations"] + : subResourceArrayDeserializer(item["configurationPolicyGroupAssociations"]), + previousConfigurationPolicyGroupAssociations: !item[ + "previousConfigurationPolicyGroupAssociations" + ] + ? item["previousConfigurationPolicyGroupAssociations"] + : vpnServerConfigurationPolicyGroupArrayDeserializer( + item["previousConfigurationPolicyGroupAssociations"], + ), + provisioningState: item["provisioningState"], + }; +} + +export function _p2SVpnGatewayPropertiesSerializer(item: P2SVpnGateway): any { + return { + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceSerializer(item["virtualHub"]), + p2SConnectionConfigurations: !item["p2SConnectionConfigurations"] + ? item["p2SConnectionConfigurations"] + : p2SConnectionConfigurationArraySerializer(item["p2SConnectionConfigurations"]), + vpnGatewayScaleUnit: item["vpnGatewayScaleUnit"], + vpnServerConfiguration: !item["vpnServerConfiguration"] + ? item["vpnServerConfiguration"] + : subResourceSerializer(item["vpnServerConfiguration"]), + customDnsServers: !item["customDnsServers"] + ? item["customDnsServers"] + : item["customDnsServers"].map((p: any) => { + return p; + }), + isRoutingPreferenceInternet: item["isRoutingPreferenceInternet"], + }; +} + +export function _p2SVpnGatewayPropertiesDeserializer(item: any) { + return { + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceDeserializer(item["virtualHub"]), + p2SConnectionConfigurations: !item["p2SConnectionConfigurations"] + ? item["p2SConnectionConfigurations"] + : p2SConnectionConfigurationArrayDeserializer(item["p2SConnectionConfigurations"]), + provisioningState: item["provisioningState"], + vpnGatewayScaleUnit: item["vpnGatewayScaleUnit"], + vpnServerConfiguration: !item["vpnServerConfiguration"] + ? item["vpnServerConfiguration"] + : subResourceDeserializer(item["vpnServerConfiguration"]), + vpnClientConnectionHealth: !item["vpnClientConnectionHealth"] + ? item["vpnClientConnectionHealth"] + : vpnClientConnectionHealthDeserializer(item["vpnClientConnectionHealth"]), + customDnsServers: !item["customDnsServers"] + ? item["customDnsServers"] + : item["customDnsServers"].map((p: any) => { + return p; + }), + isRoutingPreferenceInternet: item["isRoutingPreferenceInternet"], + }; +} + +export function _vpnServerConfigurationPropertiesSerializer(item: VpnServerConfiguration): any { + return { + name: item["namePropertiesName"], + vpnProtocols: !item["vpnProtocols"] + ? item["vpnProtocols"] + : item["vpnProtocols"].map((p: any) => { + return p; + }), + vpnAuthenticationTypes: !item["vpnAuthenticationTypes"] + ? item["vpnAuthenticationTypes"] + : item["vpnAuthenticationTypes"].map((p: any) => { + return p; + }), + vpnClientRootCertificates: !item["vpnClientRootCertificates"] + ? item["vpnClientRootCertificates"] + : vpnServerConfigVpnClientRootCertificateArraySerializer(item["vpnClientRootCertificates"]), + vpnClientRevokedCertificates: !item["vpnClientRevokedCertificates"] + ? item["vpnClientRevokedCertificates"] + : vpnServerConfigVpnClientRevokedCertificateArraySerializer( + item["vpnClientRevokedCertificates"], + ), + radiusServerRootCertificates: !item["radiusServerRootCertificates"] + ? item["radiusServerRootCertificates"] + : vpnServerConfigRadiusServerRootCertificateArraySerializer( + item["radiusServerRootCertificates"], + ), + radiusClientRootCertificates: !item["radiusClientRootCertificates"] + ? item["radiusClientRootCertificates"] + : vpnServerConfigRadiusClientRootCertificateArraySerializer( + item["radiusClientRootCertificates"], + ), + vpnClientIpsecPolicies: !item["vpnClientIpsecPolicies"] + ? item["vpnClientIpsecPolicies"] + : ipsecPolicyArraySerializer(item["vpnClientIpsecPolicies"]), + radiusServerAddress: item["radiusServerAddress"], + radiusServerSecret: item["radiusServerSecret"], + radiusServers: !item["radiusServers"] + ? item["radiusServers"] + : radiusServerArraySerializer(item["radiusServers"]), + aadAuthenticationParameters: !item["aadAuthenticationParameters"] + ? item["aadAuthenticationParameters"] + : aadAuthenticationParametersSerializer(item["aadAuthenticationParameters"]), + configurationPolicyGroups: !item["configurationPolicyGroups"] + ? item["configurationPolicyGroups"] + : vpnServerConfigurationPolicyGroupArraySerializer(item["configurationPolicyGroups"]), + }; +} + +export function _vpnServerConfigurationPropertiesDeserializer(item: any) { + return { + namePropertiesName: item["name"], + vpnProtocols: !item["vpnProtocols"] + ? item["vpnProtocols"] + : item["vpnProtocols"].map((p: any) => { + return p; + }), + vpnAuthenticationTypes: !item["vpnAuthenticationTypes"] + ? item["vpnAuthenticationTypes"] + : item["vpnAuthenticationTypes"].map((p: any) => { + return p; + }), + vpnClientRootCertificates: !item["vpnClientRootCertificates"] + ? item["vpnClientRootCertificates"] + : vpnServerConfigVpnClientRootCertificateArrayDeserializer(item["vpnClientRootCertificates"]), + vpnClientRevokedCertificates: !item["vpnClientRevokedCertificates"] + ? item["vpnClientRevokedCertificates"] + : vpnServerConfigVpnClientRevokedCertificateArrayDeserializer( + item["vpnClientRevokedCertificates"], + ), + radiusServerRootCertificates: !item["radiusServerRootCertificates"] + ? item["radiusServerRootCertificates"] + : vpnServerConfigRadiusServerRootCertificateArrayDeserializer( + item["radiusServerRootCertificates"], + ), + radiusClientRootCertificates: !item["radiusClientRootCertificates"] + ? item["radiusClientRootCertificates"] + : vpnServerConfigRadiusClientRootCertificateArrayDeserializer( + item["radiusClientRootCertificates"], + ), + vpnClientIpsecPolicies: !item["vpnClientIpsecPolicies"] + ? item["vpnClientIpsecPolicies"] + : ipsecPolicyArrayDeserializer(item["vpnClientIpsecPolicies"]), + radiusServerAddress: item["radiusServerAddress"], + radiusServerSecret: item["radiusServerSecret"], + radiusServers: !item["radiusServers"] + ? item["radiusServers"] + : radiusServerArrayDeserializer(item["radiusServers"]), + aadAuthenticationParameters: !item["aadAuthenticationParameters"] + ? item["aadAuthenticationParameters"] + : aadAuthenticationParametersDeserializer(item["aadAuthenticationParameters"]), + provisioningState: item["provisioningState"], + p2SVpnGateways: !item["p2SVpnGateways"] + ? item["p2SVpnGateways"] + : p2SVpnGatewayArrayDeserializer(item["p2SVpnGateways"]), + configurationPolicyGroups: !item["configurationPolicyGroups"] + ? item["configurationPolicyGroups"] + : vpnServerConfigurationPolicyGroupArrayDeserializer(item["configurationPolicyGroups"]), + etagPropertiesEtag: item["etag"], + }; +} + +export function _virtualHubRouteTableV2PropertiesSerializer(item: VirtualHubRouteTableV2): any { + return { + routes: !item["routes"] ? item["routes"] : virtualHubRouteV2ArraySerializer(item["routes"]), + attachedConnections: !item["attachedConnections"] + ? item["attachedConnections"] + : item["attachedConnections"].map((p: any) => { + return p; + }), + }; +} + +export function _virtualHubRouteTableV2PropertiesDeserializer(item: any) { + return { + routes: !item["routes"] ? item["routes"] : virtualHubRouteV2ArrayDeserializer(item["routes"]), + attachedConnections: !item["attachedConnections"] + ? item["attachedConnections"] + : item["attachedConnections"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _virtualHubPropertiesSerializer(item: VirtualHub): any { + return { + virtualWan: !item["virtualWan"] + ? item["virtualWan"] + : subResourceSerializer(item["virtualWan"]), + vpnGateway: !item["vpnGateway"] + ? item["vpnGateway"] + : subResourceSerializer(item["vpnGateway"]), + p2SVpnGateway: !item["p2SVpnGateway"] + ? item["p2SVpnGateway"] + : subResourceSerializer(item["p2SVpnGateway"]), + expressRouteGateway: !item["expressRouteGateway"] + ? item["expressRouteGateway"] + : subResourceSerializer(item["expressRouteGateway"]), + azureFirewall: !item["azureFirewall"] + ? item["azureFirewall"] + : subResourceSerializer(item["azureFirewall"]), + securityPartnerProvider: !item["securityPartnerProvider"] + ? item["securityPartnerProvider"] + : subResourceSerializer(item["securityPartnerProvider"]), + addressPrefix: item["addressPrefix"], + routeTable: !item["routeTable"] + ? item["routeTable"] + : virtualHubRouteTableSerializer(item["routeTable"]), + securityProviderName: item["securityProviderName"], + virtualHubRouteTableV2s: !item["virtualHubRouteTableV2S"] + ? item["virtualHubRouteTableV2S"] + : virtualHubRouteTableV2ArraySerializer(item["virtualHubRouteTableV2S"]), + sku: item["sku"], + virtualRouterAsn: item["virtualRouterAsn"], + virtualRouterIps: !item["virtualRouterIps"] + ? item["virtualRouterIps"] + : item["virtualRouterIps"].map((p: any) => { + return p; + }), + allowBranchToBranchTraffic: item["allowBranchToBranchTraffic"], + preferredRoutingGateway: item["preferredRoutingGateway"], + hubRoutingPreference: item["hubRoutingPreference"], + virtualRouterAutoScaleConfiguration: !item["virtualRouterAutoScaleConfiguration"] + ? item["virtualRouterAutoScaleConfiguration"] + : virtualRouterAutoScaleConfigurationSerializer(item["virtualRouterAutoScaleConfiguration"]), + }; +} + +export function _virtualHubPropertiesDeserializer(item: any) { + return { + virtualWan: !item["virtualWan"] + ? item["virtualWan"] + : subResourceDeserializer(item["virtualWan"]), + vpnGateway: !item["vpnGateway"] + ? item["vpnGateway"] + : subResourceDeserializer(item["vpnGateway"]), + p2SVpnGateway: !item["p2SVpnGateway"] + ? item["p2SVpnGateway"] + : subResourceDeserializer(item["p2SVpnGateway"]), + expressRouteGateway: !item["expressRouteGateway"] + ? item["expressRouteGateway"] + : subResourceDeserializer(item["expressRouteGateway"]), + azureFirewall: !item["azureFirewall"] + ? item["azureFirewall"] + : subResourceDeserializer(item["azureFirewall"]), + securityPartnerProvider: !item["securityPartnerProvider"] + ? item["securityPartnerProvider"] + : subResourceDeserializer(item["securityPartnerProvider"]), + addressPrefix: item["addressPrefix"], + routeTable: !item["routeTable"] + ? item["routeTable"] + : virtualHubRouteTableDeserializer(item["routeTable"]), + provisioningState: item["provisioningState"], + securityProviderName: item["securityProviderName"], + virtualHubRouteTableV2S: !item["virtualHubRouteTableV2s"] + ? item["virtualHubRouteTableV2s"] + : virtualHubRouteTableV2ArrayDeserializer(item["virtualHubRouteTableV2s"]), + sku: item["sku"], + routingState: item["routingState"], + bgpConnections: !item["bgpConnections"] + ? item["bgpConnections"] + : subResourceArrayDeserializer(item["bgpConnections"]), + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : subResourceArrayDeserializer(item["ipConfigurations"]), + routeMaps: !item["routeMaps"] + ? item["routeMaps"] + : subResourceArrayDeserializer(item["routeMaps"]), + virtualRouterAsn: item["virtualRouterAsn"], + virtualRouterIps: !item["virtualRouterIps"] + ? item["virtualRouterIps"] + : item["virtualRouterIps"].map((p: any) => { + return p; + }), + allowBranchToBranchTraffic: item["allowBranchToBranchTraffic"], + preferredRoutingGateway: item["preferredRoutingGateway"], + hubRoutingPreference: item["hubRoutingPreference"], + virtualRouterAutoScaleConfiguration: !item["virtualRouterAutoScaleConfiguration"] + ? item["virtualRouterAutoScaleConfiguration"] + : virtualRouterAutoScaleConfigurationDeserializer( + item["virtualRouterAutoScaleConfiguration"], + ), + }; +} + +export function _routeMapPropertiesSerializer(item: RouteMap): any { + return { + associatedInboundConnections: !item["associatedInboundConnections"] + ? item["associatedInboundConnections"] + : item["associatedInboundConnections"].map((p: any) => { + return p; + }), + associatedOutboundConnections: !item["associatedOutboundConnections"] + ? item["associatedOutboundConnections"] + : item["associatedOutboundConnections"].map((p: any) => { + return p; + }), + rules: !item["rules"] ? item["rules"] : routeMapRuleArraySerializer(item["rules"]), + }; +} + +export function _routeMapPropertiesDeserializer(item: any) { + return { + associatedInboundConnections: !item["associatedInboundConnections"] + ? item["associatedInboundConnections"] + : item["associatedInboundConnections"].map((p: any) => { + return p; + }), + associatedOutboundConnections: !item["associatedOutboundConnections"] + ? item["associatedOutboundConnections"] + : item["associatedOutboundConnections"].map((p: any) => { + return p; + }), + rules: !item["rules"] ? item["rules"] : routeMapRuleArrayDeserializer(item["rules"]), + provisioningState: item["provisioningState"], + }; +} + +export function _vpnSiteLinkConnectionPropertiesSerializer(item: VpnSiteLinkConnection): any { + return { + vpnSiteLink: !item["vpnSiteLink"] + ? item["vpnSiteLink"] + : subResourceSerializer(item["vpnSiteLink"]), + routingWeight: item["routingWeight"], + vpnLinkConnectionMode: item["vpnLinkConnectionMode"], + vpnConnectionProtocolType: item["vpnConnectionProtocolType"], + connectionBandwidth: item["connectionBandwidth"], + sharedKey: item["sharedKey"], + enableBgp: item["enableBgp"], + vpnGatewayCustomBgpAddresses: !item["vpnGatewayCustomBgpAddresses"] + ? item["vpnGatewayCustomBgpAddresses"] + : gatewayCustomBgpIpAddressIpConfigurationArraySerializer( + item["vpnGatewayCustomBgpAddresses"], + ), + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArraySerializer(item["ipsecPolicies"]), + enableRateLimiting: item["enableRateLimiting"], + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + ingressNatRules: !item["ingressNatRules"] + ? item["ingressNatRules"] + : subResourceArraySerializer(item["ingressNatRules"]), + egressNatRules: !item["egressNatRules"] + ? item["egressNatRules"] + : subResourceArraySerializer(item["egressNatRules"]), + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + }; +} + +export function _vpnSiteLinkConnectionPropertiesDeserializer(item: any) { + return { + vpnSiteLink: !item["vpnSiteLink"] + ? item["vpnSiteLink"] + : subResourceDeserializer(item["vpnSiteLink"]), + routingWeight: item["routingWeight"], + vpnLinkConnectionMode: item["vpnLinkConnectionMode"], + connectionStatus: item["connectionStatus"], + vpnConnectionProtocolType: item["vpnConnectionProtocolType"], + ingressBytesTransferred: item["ingressBytesTransferred"], + egressBytesTransferred: item["egressBytesTransferred"], + connectionBandwidth: item["connectionBandwidth"], + sharedKey: item["sharedKey"], + enableBgp: item["enableBgp"], + vpnGatewayCustomBgpAddresses: !item["vpnGatewayCustomBgpAddresses"] + ? item["vpnGatewayCustomBgpAddresses"] + : gatewayCustomBgpIpAddressIpConfigurationArrayDeserializer( + item["vpnGatewayCustomBgpAddresses"], + ), + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArrayDeserializer(item["ipsecPolicies"]), + enableRateLimiting: item["enableRateLimiting"], + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + provisioningState: item["provisioningState"], + ingressNatRules: !item["ingressNatRules"] + ? item["ingressNatRules"] + : subResourceArrayDeserializer(item["ingressNatRules"]), + egressNatRules: !item["egressNatRules"] + ? item["egressNatRules"] + : subResourceArrayDeserializer(item["egressNatRules"]), + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + }; +} + +export function _vpnConnectionPropertiesSerializer(item: VpnConnection): any { + return { + remoteVpnSite: !item["remoteVpnSite"] + ? item["remoteVpnSite"] + : subResourceSerializer(item["remoteVpnSite"]), + routingWeight: item["routingWeight"], + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + vpnConnectionProtocolType: item["vpnConnectionProtocolType"], + connectionBandwidth: item["connectionBandwidth"], + sharedKey: item["sharedKey"], + enableBgp: item["enableBgp"], + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArraySerializer(item["ipsecPolicies"]), + trafficSelectorPolicies: !item["trafficSelectorPolicies"] + ? item["trafficSelectorPolicies"] + : trafficSelectorPolicyArraySerializer(item["trafficSelectorPolicies"]), + enableRateLimiting: item["enableRateLimiting"], + enableInternetSecurity: item["enableInternetSecurity"], + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + vpnLinkConnections: !item["vpnLinkConnections"] + ? item["vpnLinkConnections"] + : vpnSiteLinkConnectionArraySerializer(item["vpnLinkConnections"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function _vpnConnectionPropertiesDeserializer(item: any) { + return { + remoteVpnSite: !item["remoteVpnSite"] + ? item["remoteVpnSite"] + : subResourceDeserializer(item["remoteVpnSite"]), + routingWeight: item["routingWeight"], + dpdTimeoutSeconds: item["dpdTimeoutSeconds"], + connectionStatus: item["connectionStatus"], + vpnConnectionProtocolType: item["vpnConnectionProtocolType"], + ingressBytesTransferred: item["ingressBytesTransferred"], + egressBytesTransferred: item["egressBytesTransferred"], + connectionBandwidth: item["connectionBandwidth"], + sharedKey: item["sharedKey"], + enableBgp: item["enableBgp"], + usePolicyBasedTrafficSelectors: item["usePolicyBasedTrafficSelectors"], + ipsecPolicies: !item["ipsecPolicies"] + ? item["ipsecPolicies"] + : ipsecPolicyArrayDeserializer(item["ipsecPolicies"]), + trafficSelectorPolicies: !item["trafficSelectorPolicies"] + ? item["trafficSelectorPolicies"] + : trafficSelectorPolicyArrayDeserializer(item["trafficSelectorPolicies"]), + enableRateLimiting: item["enableRateLimiting"], + enableInternetSecurity: item["enableInternetSecurity"], + useLocalAzureIpAddress: item["useLocalAzureIpAddress"], + provisioningState: item["provisioningState"], + vpnLinkConnections: !item["vpnLinkConnections"] + ? item["vpnLinkConnections"] + : vpnSiteLinkConnectionArrayDeserializer(item["vpnLinkConnections"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +export function _vpnGatewayNatRulePropertiesSerializer(item: VpnGatewayNatRule): any { + return { + type: item["typePropertiesType"], + mode: item["mode"], + internalMappings: !item["internalMappings"] + ? item["internalMappings"] + : vpnNatRuleMappingArraySerializer(item["internalMappings"]), + externalMappings: !item["externalMappings"] + ? item["externalMappings"] + : vpnNatRuleMappingArraySerializer(item["externalMappings"]), + ipConfigurationId: item["ipConfigurationId"], + }; +} + +export function _vpnGatewayNatRulePropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + typePropertiesType: item["type"], + mode: item["mode"], + internalMappings: !item["internalMappings"] + ? item["internalMappings"] + : vpnNatRuleMappingArrayDeserializer(item["internalMappings"]), + externalMappings: !item["externalMappings"] + ? item["externalMappings"] + : vpnNatRuleMappingArrayDeserializer(item["externalMappings"]), + ipConfigurationId: item["ipConfigurationId"], + egressVpnSiteLinkConnections: !item["egressVpnSiteLinkConnections"] + ? item["egressVpnSiteLinkConnections"] + : subResourceArrayDeserializer(item["egressVpnSiteLinkConnections"]), + ingressVpnSiteLinkConnections: !item["ingressVpnSiteLinkConnections"] + ? item["ingressVpnSiteLinkConnections"] + : subResourceArrayDeserializer(item["ingressVpnSiteLinkConnections"]), + }; +} + +export function _vpnGatewayPropertiesSerializer(item: VpnGateway): any { + return { + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceSerializer(item["virtualHub"]), + connections: !item["connections"] + ? item["connections"] + : vpnConnectionArraySerializer(item["connections"]), + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsSerializer(item["bgpSettings"]), + vpnGatewayScaleUnit: item["vpnGatewayScaleUnit"], + enableBgpRouteTranslationForNat: item["enableBgpRouteTranslationForNat"], + isRoutingPreferenceInternet: item["isRoutingPreferenceInternet"], + natRules: !item["natRules"] + ? item["natRules"] + : vpnGatewayNatRuleArraySerializer(item["natRules"]), + }; +} + +export function _vpnGatewayPropertiesDeserializer(item: any) { + return { + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : subResourceDeserializer(item["virtualHub"]), + connections: !item["connections"] + ? item["connections"] + : vpnConnectionArrayDeserializer(item["connections"]), + bgpSettings: !item["bgpSettings"] + ? item["bgpSettings"] + : bgpSettingsDeserializer(item["bgpSettings"]), + provisioningState: item["provisioningState"], + vpnGatewayScaleUnit: item["vpnGatewayScaleUnit"], + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : vpnGatewayIpConfigurationArrayDeserializer(item["ipConfigurations"]), + enableBgpRouteTranslationForNat: item["enableBgpRouteTranslationForNat"], + isRoutingPreferenceInternet: item["isRoutingPreferenceInternet"], + natRules: !item["natRules"] + ? item["natRules"] + : vpnGatewayNatRuleArrayDeserializer(item["natRules"]), + }; +} + +export function _expressRouteConnectionPropertiesSerializer(item: ExpressRouteConnection): any { + return { + expressRouteCircuitPeering: !item["expressRouteCircuitPeering"] + ? item["expressRouteCircuitPeering"] + : expressRouteCircuitPeeringIdSerializer(item["expressRouteCircuitPeering"]), + authorizationKey: item["authorizationKey"], + routingWeight: item["routingWeight"], + enableInternetSecurity: item["enableInternetSecurity"], + expressRouteGatewayBypass: item["expressRouteGatewayBypass"], + enablePrivateLinkFastPath: item["enablePrivateLinkFastPath"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function _expressRouteConnectionPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + expressRouteCircuitPeering: !item["expressRouteCircuitPeering"] + ? item["expressRouteCircuitPeering"] + : expressRouteCircuitPeeringIdDeserializer(item["expressRouteCircuitPeering"]), + authorizationKey: item["authorizationKey"], + routingWeight: item["routingWeight"], + enableInternetSecurity: item["enableInternetSecurity"], + expressRouteGatewayBypass: item["expressRouteGatewayBypass"], + enablePrivateLinkFastPath: item["enablePrivateLinkFastPath"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +export function _expressRouteGatewayPropertiesSerializer(item: ExpressRouteGateway): any { + return { + autoScaleConfiguration: !item["autoScaleConfiguration"] + ? item["autoScaleConfiguration"] + : expressRouteGatewayPropertiesAutoScaleConfigurationSerializer( + item["autoScaleConfiguration"], + ), + expressRouteConnections: !item["expressRouteConnections"] + ? item["expressRouteConnections"] + : expressRouteConnectionArraySerializer(item["expressRouteConnections"]), + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : virtualHubIdSerializer(item["virtualHub"]), + allowNonVirtualWanTraffic: item["allowNonVirtualWanTraffic"], + }; +} + +export function _expressRouteGatewayPropertiesDeserializer(item: any) { + return { + autoScaleConfiguration: !item["autoScaleConfiguration"] + ? item["autoScaleConfiguration"] + : expressRouteGatewayPropertiesAutoScaleConfigurationDeserializer( + item["autoScaleConfiguration"], + ), + expressRouteConnections: !item["expressRouteConnections"] + ? item["expressRouteConnections"] + : expressRouteConnectionArrayDeserializer(item["expressRouteConnections"]), + provisioningState: item["provisioningState"], + virtualHub: !item["virtualHub"] + ? item["virtualHub"] + : virtualHubIdDeserializer(item["virtualHub"]), + allowNonVirtualWanTraffic: item["allowNonVirtualWanTraffic"], + }; +} + +export function _hubRouteTablePropertiesSerializer(item: HubRouteTable): any { + return { + routes: !item["routes"] ? item["routes"] : hubRouteArraySerializer(item["routes"]), + labels: !item["labels"] + ? item["labels"] + : item["labels"].map((p: any) => { + return p; + }), + }; +} + +export function _hubRouteTablePropertiesDeserializer(item: any) { + return { + routes: !item["routes"] ? item["routes"] : hubRouteArrayDeserializer(item["routes"]), + labels: !item["labels"] + ? item["labels"] + : item["labels"].map((p: any) => { + return p; + }), + associatedConnections: !item["associatedConnections"] + ? item["associatedConnections"] + : item["associatedConnections"].map((p: any) => { + return p; + }), + propagatingConnections: !item["propagatingConnections"] + ? item["propagatingConnections"] + : item["propagatingConnections"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _webApplicationFirewallPolicyPropertiesSerializer( + item: WebApplicationFirewallPolicy, +): any { + return { + policySettings: !item["policySettings"] + ? item["policySettings"] + : policySettingsSerializer(item["policySettings"]), + customRules: !item["customRules"] + ? item["customRules"] + : webApplicationFirewallCustomRuleArraySerializer(item["customRules"]), + managedRules: !item["managedRules"] + ? item["managedRules"] + : managedRulesDefinitionSerializer(item["managedRules"]), + }; +} + +export function _webApplicationFirewallPolicyPropertiesDeserializer(item: any) { + return { + policySettings: !item["policySettings"] + ? item["policySettings"] + : policySettingsDeserializer(item["policySettings"]), + customRules: !item["customRules"] + ? item["customRules"] + : webApplicationFirewallCustomRuleArrayDeserializer(item["customRules"]), + applicationGateways: !item["applicationGateways"] + ? item["applicationGateways"] + : applicationGatewayArrayDeserializer(item["applicationGateways"]), + provisioningState: item["provisioningState"], + resourceState: item["resourceState"], + managedRules: !item["managedRules"] + ? item["managedRules"] + : managedRulesDefinitionDeserializer(item["managedRules"]), + httpListeners: !item["httpListeners"] + ? item["httpListeners"] + : subResourceArrayDeserializer(item["httpListeners"]), + pathBasedRules: !item["pathBasedRules"] + ? item["pathBasedRules"] + : subResourceArrayDeserializer(item["pathBasedRules"]), + applicationGatewayForContainers: !item["applicationGatewayForContainers"] + ? item["applicationGatewayForContainers"] + : applicationGatewayForContainersReferenceDefinitionArrayDeserializer( + item["applicationGatewayForContainers"], + ), + }; +} + +export function _virtualNetworkApplianceIpConfigurationPropertiesDeserializer(item: any) { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + primary: item["primary"], + provisioningState: item["provisioningState"], + privateIPAddressVersion: item["privateIPAddressVersion"], + }; +} + +export function _virtualNetworkAppliancePropertiesSerializer(item: VirtualNetworkAppliance): any { + return { + bandwidthInGbps: item["bandwidthInGbps"], + privateIPAddressVersion: item["privateIPAddressVersion"], + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + }; +} + +export function _virtualNetworkAppliancePropertiesDeserializer(item: any) { + return { + bandwidthInGbps: item["bandwidthInGbps"], + ipConfigurations: !item["ipConfigurations"] + ? item["ipConfigurations"] + : virtualNetworkApplianceIpConfigurationArrayDeserializer(item["ipConfigurations"]), + privateIPAddressVersion: item["privateIPAddressVersion"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + }; +} + +export function _serviceGatewayPropertiesSerializer(item: ServiceGateway): any { + return { + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : virtualNetworkSerializer(item["virtualNetwork"]), + routeTargetAddress: !item["routeTargetAddress"] + ? item["routeTargetAddress"] + : routeTargetAddressPropertiesFormatSerializer(item["routeTargetAddress"]), + routeTargetAddressV6: !item["routeTargetAddressV6"] + ? item["routeTargetAddressV6"] + : routeTargetAddressPropertiesFormatSerializer(item["routeTargetAddressV6"]), + }; +} + +export function _serviceGatewayPropertiesDeserializer(item: any) { + return { + virtualNetwork: !item["virtualNetwork"] + ? item["virtualNetwork"] + : virtualNetworkDeserializer(item["virtualNetwork"]), + routeTargetAddress: !item["routeTargetAddress"] + ? item["routeTargetAddress"] + : routeTargetAddressPropertiesFormatDeserializer(item["routeTargetAddress"]), + routeTargetAddressV6: !item["routeTargetAddressV6"] + ? item["routeTargetAddressV6"] + : routeTargetAddressPropertiesFormatDeserializer(item["routeTargetAddressV6"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function _serviceGatewayServicePropertiesSerializer(item: ServiceGatewayService): any { + return { + serviceType: item["serviceType"], + isDefault: item["isDefault"], + loadBalancerBackendPools: !item["loadBalancerBackendPools"] + ? item["loadBalancerBackendPools"] + : backendAddressPoolArraySerializer(item["loadBalancerBackendPools"]), + publicNatGatewayId: item["publicNatGatewayId"], + }; +} + +export function _serviceGatewayServicePropertiesDeserializer(item: any) { + return { + serviceType: item["serviceType"], + isDefault: item["isDefault"], + loadBalancerBackendPools: !item["loadBalancerBackendPools"] + ? item["loadBalancerBackendPools"] + : backendAddressPoolArrayDeserializer(item["loadBalancerBackendPools"]), + publicNatGatewayId: item["publicNatGatewayId"], + }; +} + +export function _applicationGatewayPrivateLinkResourcePropertiesDeserializer(item: any) { + return { + groupId: item["groupId"], + requiredMembers: !item["requiredMembers"] + ? item["requiredMembers"] + : item["requiredMembers"].map((p: any) => { + return p; + }), + requiredZoneNames: !item["requiredZoneNames"] + ? item["requiredZoneNames"] + : item["requiredZoneNames"].map((p: any) => { + return p; + }), + }; +} + +export function _applicationGatewayWafDynamicManifestPropertiesResultDefaultRuleSetDeserializer( + item: any, +) { + return { + ruleSetType: item["ruleSetType"], + ruleSetVersion: item["ruleSetVersion"], + }; +} + +export function _applicationGatewayWafDynamicManifestResultPropertiesDeserializer(item: any) { + return { + defaultRuleSet: !item["defaultRuleSet"] + ? item["defaultRuleSet"] + : defaultRuleSetPropertyFormatDeserializer(item["defaultRuleSet"]), + availableRuleSets: !item["availableRuleSets"] + ? item["availableRuleSets"] + : applicationGatewayFirewallManifestRuleSetArrayDeserializer(item["availableRuleSets"]), + }; +} + +export function _azureWebCategoryPropertiesDeserializer(item: any) { + return { + group: item["group"], + }; +} + +export function _customIpPrefixPropertiesSerializer(item: CustomIpPrefix): any { + return { + asn: item["asn"], + cidr: item["cidr"], + signedMessage: item["signedMessage"], + authorizationMessage: item["authorizationMessage"], + customIpPrefixParent: !item["customIpPrefixParent"] + ? item["customIpPrefixParent"] + : subResourceSerializer(item["customIpPrefixParent"]), + commissionedState: item["commissionedState"], + expressRouteAdvertise: item["expressRouteAdvertise"], + geo: item["geo"], + noInternetAdvertise: item["noInternetAdvertise"], + prefixType: item["prefixType"], + }; +} + +export function _customIpPrefixPropertiesDeserializer(item: any) { + return { + asn: item["asn"], + cidr: item["cidr"], + signedMessage: item["signedMessage"], + authorizationMessage: item["authorizationMessage"], + customIpPrefixParent: !item["customIpPrefixParent"] + ? item["customIpPrefixParent"] + : subResourceDeserializer(item["customIpPrefixParent"]), + childCustomIpPrefixes: !item["childCustomIpPrefixes"] + ? item["childCustomIpPrefixes"] + : subResourceArrayDeserializer(item["childCustomIpPrefixes"]), + commissionedState: item["commissionedState"], + expressRouteAdvertise: item["expressRouteAdvertise"], + geo: item["geo"], + noInternetAdvertise: item["noInternetAdvertise"], + prefixType: item["prefixType"], + publicIpPrefixes: !item["publicIpPrefixes"] + ? item["publicIpPrefixes"] + : subResourceArrayDeserializer(item["publicIpPrefixes"]), + resourceGuid: item["resourceGuid"], + failedReason: item["failedReason"], + provisioningState: item["provisioningState"], + }; +} + +export function _dscpConfigurationPropertiesSerializer(item: DscpConfiguration): any { + return { + markings: !item["markings"] + ? item["markings"] + : item["markings"].map((p: any) => { + return p; + }), + sourceIpRanges: !item["sourceIpRanges"] + ? item["sourceIpRanges"] + : qosIpRangeArraySerializer(item["sourceIpRanges"]), + destinationIpRanges: !item["destinationIpRanges"] + ? item["destinationIpRanges"] + : qosIpRangeArraySerializer(item["destinationIpRanges"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : qosPortRangeArraySerializer(item["sourcePortRanges"]), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : qosPortRangeArraySerializer(item["destinationPortRanges"]), + protocol: item["protocol"], + qosDefinitionCollection: !item["qosDefinitionCollection"] + ? item["qosDefinitionCollection"] + : qosDefinitionArraySerializer(item["qosDefinitionCollection"]), + }; +} + +export function _dscpConfigurationPropertiesDeserializer(item: any) { + return { + markings: !item["markings"] + ? item["markings"] + : item["markings"].map((p: any) => { + return p; + }), + sourceIpRanges: !item["sourceIpRanges"] + ? item["sourceIpRanges"] + : qosIpRangeArrayDeserializer(item["sourceIpRanges"]), + destinationIpRanges: !item["destinationIpRanges"] + ? item["destinationIpRanges"] + : qosIpRangeArrayDeserializer(item["destinationIpRanges"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : qosPortRangeArrayDeserializer(item["sourcePortRanges"]), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : qosPortRangeArrayDeserializer(item["destinationPortRanges"]), + protocol: item["protocol"], + qosDefinitionCollection: !item["qosDefinitionCollection"] + ? item["qosDefinitionCollection"] + : qosDefinitionArrayDeserializer(item["qosDefinitionCollection"]), + qosCollectionId: item["qosCollectionId"], + associatedNetworkInterfaces: !item["associatedNetworkInterfaces"] + ? item["associatedNetworkInterfaces"] + : networkInterfaceArrayDeserializer(item["associatedNetworkInterfaces"]), + resourceGuid: item["resourceGuid"], + provisioningState: item["provisioningState"], + }; +} + +export function _adminRulePropertiesSerializer(item: AdminRule): any { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] ? item["sources"] : addressPrefixItemArraySerializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArraySerializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + }; +} + +export function _adminRulePropertiesDeserializer(item: any) { + return { + description: item["description"], + protocol: item["protocol"], + sources: !item["sources"] + ? item["sources"] + : addressPrefixItemArrayDeserializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArrayDeserializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _defaultAdminRulePropertiesSerializer(item: DefaultAdminRule): any { + return { flag: item["flag"] }; +} + +export function _defaultAdminRulePropertiesDeserializer(item: any) { + return { + description: item["description"], + flag: item["flag"], + protocol: item["protocol"], + sources: !item["sources"] + ? item["sources"] + : addressPrefixItemArrayDeserializer(item["sources"]), + destinations: !item["destinations"] + ? item["destinations"] + : addressPrefixItemArrayDeserializer(item["destinations"]), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + access: item["access"], + priority: item["priority"], + direction: item["direction"], + provisioningState: item["provisioningState"], + resourceGuid: item["resourceGuid"], + }; +} + +export function _nspProfilePropertiesSerializer(_item: NspProfile): any { + return {}; +} + +export function _nspProfilePropertiesDeserializer(item: any) { + return { + accessRulesVersion: item["accessRulesVersion"], + diagnosticSettingsVersion: item["diagnosticSettingsVersion"], + }; +} + +export function _nspAccessRulePropertiesSerializer(item: NspAccessRule): any { + return { + direction: item["direction"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + fullyQualifiedDomainNames: !item["fullyQualifiedDomainNames"] + ? item["fullyQualifiedDomainNames"] + : item["fullyQualifiedDomainNames"].map((p: any) => { + return p; + }), + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : subscriptionIdArraySerializer(item["subscriptions"]), + emailAddresses: !item["emailAddresses"] + ? item["emailAddresses"] + : item["emailAddresses"].map((p: any) => { + return p; + }), + phoneNumbers: !item["phoneNumbers"] + ? item["phoneNumbers"] + : item["phoneNumbers"].map((p: any) => { + return p; + }), + serviceTags: !item["serviceTags"] + ? item["serviceTags"] + : item["serviceTags"].map((p: any) => { + return p; + }), + }; +} + +export function _nspAccessRulePropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + direction: item["direction"], + addressPrefixes: !item["addressPrefixes"] + ? item["addressPrefixes"] + : item["addressPrefixes"].map((p: any) => { + return p; + }), + fullyQualifiedDomainNames: !item["fullyQualifiedDomainNames"] + ? item["fullyQualifiedDomainNames"] + : item["fullyQualifiedDomainNames"].map((p: any) => { + return p; + }), + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : subscriptionIdArrayDeserializer(item["subscriptions"]), + networkSecurityPerimeters: !item["networkSecurityPerimeters"] + ? item["networkSecurityPerimeters"] + : perimeterBasedAccessRuleArrayDeserializer(item["networkSecurityPerimeters"]), + emailAddresses: !item["emailAddresses"] + ? item["emailAddresses"] + : item["emailAddresses"].map((p: any) => { + return p; + }), + phoneNumbers: !item["phoneNumbers"] + ? item["phoneNumbers"] + : item["phoneNumbers"].map((p: any) => { + return p; + }), + serviceTags: !item["serviceTags"] + ? item["serviceTags"] + : item["serviceTags"].map((p: any) => { + return p; + }), + }; +} + +export function _nspAssociationPropertiesSerializer(item: NspAssociation): any { + return { + privateLinkResource: !item["privateLinkResource"] + ? item["privateLinkResource"] + : subResourceSerializer(item["privateLinkResource"]), + profile: !item["profile"] ? item["profile"] : subResourceSerializer(item["profile"]), + accessMode: item["accessMode"], + }; +} + +export function _nspAssociationPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + privateLinkResource: !item["privateLinkResource"] + ? item["privateLinkResource"] + : subResourceDeserializer(item["privateLinkResource"]), + profile: !item["profile"] ? item["profile"] : subResourceDeserializer(item["profile"]), + accessMode: item["accessMode"], + hasProvisioningIssues: item["hasProvisioningIssues"], + }; +} + +export function _nspLinkPropertiesSerializer(item: NspLink): any { + return { + autoApprovedRemotePerimeterResourceId: item["autoApprovedRemotePerimeterResourceId"], + localInboundProfiles: !item["localInboundProfiles"] + ? item["localInboundProfiles"] + : item["localInboundProfiles"].map((p: any) => { + return p; + }), + remoteInboundProfiles: !item["remoteInboundProfiles"] + ? item["remoteInboundProfiles"] + : item["remoteInboundProfiles"].map((p: any) => { + return p; + }), + description: item["description"], + }; +} + +export function _nspLinkPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + autoApprovedRemotePerimeterResourceId: item["autoApprovedRemotePerimeterResourceId"], + remotePerimeterGuid: item["remotePerimeterGuid"], + remotePerimeterLocation: item["remotePerimeterLocation"], + localInboundProfiles: !item["localInboundProfiles"] + ? item["localInboundProfiles"] + : item["localInboundProfiles"].map((p: any) => { + return p; + }), + localOutboundProfiles: !item["localOutboundProfiles"] + ? item["localOutboundProfiles"] + : item["localOutboundProfiles"].map((p: any) => { + return p; + }), + remoteInboundProfiles: !item["remoteInboundProfiles"] + ? item["remoteInboundProfiles"] + : item["remoteInboundProfiles"].map((p: any) => { + return p; + }), + remoteOutboundProfiles: !item["remoteOutboundProfiles"] + ? item["remoteOutboundProfiles"] + : item["remoteOutboundProfiles"].map((p: any) => { + return p; + }), + description: item["description"], + status: item["status"], + }; +} + +export function _nspLinkReferencePropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + remotePerimeterResourceId: item["remotePerimeterResourceId"], + remotePerimeterGuid: item["remotePerimeterGuid"], + remotePerimeterLocation: item["remotePerimeterLocation"], + localInboundProfiles: !item["localInboundProfiles"] + ? item["localInboundProfiles"] + : item["localInboundProfiles"].map((p: any) => { + return p; + }), + localOutboundProfiles: !item["localOutboundProfiles"] + ? item["localOutboundProfiles"] + : item["localOutboundProfiles"].map((p: any) => { + return p; + }), + remoteInboundProfiles: !item["remoteInboundProfiles"] + ? item["remoteInboundProfiles"] + : item["remoteInboundProfiles"].map((p: any) => { + return p; + }), + remoteOutboundProfiles: !item["remoteOutboundProfiles"] + ? item["remoteOutboundProfiles"] + : item["remoteOutboundProfiles"].map((p: any) => { + return p; + }), + description: item["description"], + status: item["status"], + }; +} + +export function _nspLoggingConfigurationPropertiesSerializer(item: NspLoggingConfiguration): any { + return { + enabledLogCategories: !item["enabledLogCategories"] + ? item["enabledLogCategories"] + : item["enabledLogCategories"].map((p: any) => { + return p; + }), + version: item["version"], + }; +} + +export function _nspLoggingConfigurationPropertiesDeserializer(item: any) { + return { + enabledLogCategories: !item["enabledLogCategories"] + ? item["enabledLogCategories"] + : item["enabledLogCategories"].map((p: any) => { + return p; + }), + version: item["version"], + }; +} + +export function _networkVirtualApplianceSkuPropertiesDeserializer(item: any) { + return { + vendor: item["vendor"], + availableVersions: !item["availableVersions"] + ? item["availableVersions"] + : item["availableVersions"].map((p: any) => { + return p; + }), + availableScaleUnits: !item["availableScaleUnits"] + ? item["availableScaleUnits"] + : networkVirtualApplianceSkuInstancesArrayDeserializer(item["availableScaleUnits"]), + }; +} + +export function _inboundSecurityRulePropertiesSerializer(item: InboundSecurityRule): any { + return { + ruleType: item["ruleType"], + rules: !item["rules"] ? item["rules"] : inboundSecurityRulesArraySerializer(item["rules"]), + }; +} + +export function _inboundSecurityRulePropertiesDeserializer(item: any) { + return { + ruleType: item["ruleType"], + rules: !item["rules"] ? item["rules"] : inboundSecurityRulesArrayDeserializer(item["rules"]), + provisioningState: item["provisioningState"], + }; +} + +export function _packetCapturePropertiesSerializer(item: PacketCapture): any { + return { + target: item["target"], + scope: !item["scope"] ? item["scope"] : packetCaptureMachineScopeSerializer(item["scope"]), + targetType: item["targetType"], + bytesToCapturePerPacket: item["bytesToCapturePerPacket"], + totalBytesPerSession: item["totalBytesPerSession"], + timeLimitInSeconds: item["timeLimitInSeconds"], + storageLocation: packetCaptureStorageLocationSerializer(item["storageLocation"]), + filters: !item["filters"] + ? item["filters"] + : packetCaptureFilterArraySerializer(item["filters"]), + continuousCapture: item["continuousCapture"], + captureSettings: !item["captureSettings"] + ? item["captureSettings"] + : packetCaptureSettingsSerializer(item["captureSettings"]), + }; +} + +export function _packetCapturePropertiesDeserializer(item: any) { + return { + target: item["target"], + scope: !item["scope"] ? item["scope"] : packetCaptureMachineScopeDeserializer(item["scope"]), + targetType: item["targetType"], + bytesToCapturePerPacket: item["bytesToCapturePerPacket"], + totalBytesPerSession: item["totalBytesPerSession"], + timeLimitInSeconds: item["timeLimitInSeconds"], + storageLocation: packetCaptureStorageLocationDeserializer(item["storageLocation"]), + filters: !item["filters"] + ? item["filters"] + : packetCaptureFilterArrayDeserializer(item["filters"]), + continuousCapture: item["continuousCapture"], + captureSettings: !item["captureSettings"] + ? item["captureSettings"] + : packetCaptureSettingsDeserializer(item["captureSettings"]), + }; +} + +export function _packetCaptureResultPropertiesDeserializer(item: any) { + return { + target: item["target"], + scope: !item["scope"] ? item["scope"] : packetCaptureMachineScopeDeserializer(item["scope"]), + targetType: item["targetType"], + bytesToCapturePerPacket: item["bytesToCapturePerPacket"], + totalBytesPerSession: item["totalBytesPerSession"], + timeLimitInSeconds: item["timeLimitInSeconds"], + storageLocation: !item["storageLocation"] + ? item["storageLocation"] + : packetCaptureStorageLocationDeserializer(item["storageLocation"]), + filters: !item["filters"] + ? item["filters"] + : packetCaptureFilterArrayDeserializer(item["filters"]), + continuousCapture: item["continuousCapture"], + captureSettings: !item["captureSettings"] + ? item["captureSettings"] + : packetCaptureSettingsDeserializer(item["captureSettings"]), + provisioningState: item["provisioningState"], + }; +} + +export function _connectionMonitorResultPropertiesDeserializer(item: any) { + return { + source: !item["source"] ? item["source"] : connectionMonitorSourceDeserializer(item["source"]), + destination: !item["destination"] + ? item["destination"] + : connectionMonitorDestinationDeserializer(item["destination"]), + autoStart: item["autoStart"], + monitoringIntervalInSeconds: item["monitoringIntervalInSeconds"], + endpoints: !item["endpoints"] + ? item["endpoints"] + : connectionMonitorEndpointArrayDeserializer(item["endpoints"]), + testConfigurations: !item["testConfigurations"] + ? item["testConfigurations"] + : connectionMonitorTestConfigurationArrayDeserializer(item["testConfigurations"]), + testGroups: !item["testGroups"] + ? item["testGroups"] + : connectionMonitorTestGroupArrayDeserializer(item["testGroups"]), + outputs: !item["outputs"] + ? item["outputs"] + : connectionMonitorOutputArrayDeserializer(item["outputs"]), + notes: item["notes"], + provisioningState: item["provisioningState"], + startTime: !item["startTime"] ? item["startTime"] : new Date(item["startTime"]), + monitoringStatus: item["monitoringStatus"], + connectionMonitorType: item["connectionMonitorType"], + }; +} + +export function _connectionMonitorPropertiesSerializer(item: ConnectionMonitor): any { + return { + source: !item["source"] ? item["source"] : connectionMonitorSourceSerializer(item["source"]), + destination: !item["destination"] + ? item["destination"] + : connectionMonitorDestinationSerializer(item["destination"]), + autoStart: item["autoStart"], + monitoringIntervalInSeconds: item["monitoringIntervalInSeconds"], + endpoints: !item["endpoints"] + ? item["endpoints"] + : connectionMonitorEndpointArraySerializer(item["endpoints"]), + testConfigurations: !item["testConfigurations"] + ? item["testConfigurations"] + : connectionMonitorTestConfigurationArraySerializer(item["testConfigurations"]), + testGroups: !item["testGroups"] + ? item["testGroups"] + : connectionMonitorTestGroupArraySerializer(item["testGroups"]), + outputs: !item["outputs"] + ? item["outputs"] + : connectionMonitorOutputArraySerializer(item["outputs"]), + notes: item["notes"], + }; +} + +export function _connectionMonitorPropertiesDeserializer(item: any) { + return { + source: !item["source"] ? item["source"] : connectionMonitorSourceDeserializer(item["source"]), + destination: !item["destination"] + ? item["destination"] + : connectionMonitorDestinationDeserializer(item["destination"]), + autoStart: item["autoStart"], + monitoringIntervalInSeconds: item["monitoringIntervalInSeconds"], + endpoints: !item["endpoints"] + ? item["endpoints"] + : connectionMonitorEndpointArrayDeserializer(item["endpoints"]), + testConfigurations: !item["testConfigurations"] + ? item["testConfigurations"] + : connectionMonitorTestConfigurationArrayDeserializer(item["testConfigurations"]), + testGroups: !item["testGroups"] + ? item["testGroups"] + : connectionMonitorTestGroupArrayDeserializer(item["testGroups"]), + outputs: !item["outputs"] + ? item["outputs"] + : connectionMonitorOutputArrayDeserializer(item["outputs"]), + notes: item["notes"], + }; +} + +export function _privateDnsZoneConfigPropertiesSerializer(item: PrivateDnsZoneConfig): any { + return { privateDnsZoneId: item["privateDnsZoneId"] }; +} + +export function _privateDnsZoneConfigPropertiesDeserializer(item: any) { + return { + privateDnsZoneId: item["privateDnsZoneId"], + recordSets: !item["recordSets"] + ? item["recordSets"] + : recordSetArrayDeserializer(item["recordSets"]), + }; +} + +export function _privateDnsZoneGroupPropertiesSerializer(item: PrivateDnsZoneGroup): any { + return { + privateDnsZoneConfigs: !item["privateDnsZoneConfigs"] + ? item["privateDnsZoneConfigs"] + : privateDnsZoneConfigArraySerializer(item["privateDnsZoneConfigs"]), + }; +} + +export function _privateDnsZoneGroupPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + privateDnsZoneConfigs: !item["privateDnsZoneConfigs"] + ? item["privateDnsZoneConfigs"] + : privateDnsZoneConfigArrayDeserializer(item["privateDnsZoneConfigs"]), + }; +} + +export function _hubVirtualNetworkConnectionPropertiesSerializer( + item: HubVirtualNetworkConnection, +): any { + return { + remoteVirtualNetwork: !item["remoteVirtualNetwork"] + ? item["remoteVirtualNetwork"] + : subResourceSerializer(item["remoteVirtualNetwork"]), + allowHubToRemoteVnetTransit: item["allowHubToRemoteVnetTransit"], + allowRemoteVnetToUseHubVnetGateways: item["allowRemoteVnetToUseHubVnetGateways"], + connectionPolicy: !item["connectionPolicy"] + ? item["connectionPolicy"] + : subResourceSerializer(item["connectionPolicy"]), + enableInternetSecurity: item["enableInternetSecurity"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function _hubVirtualNetworkConnectionPropertiesDeserializer(item: any) { + return { + remoteVirtualNetwork: !item["remoteVirtualNetwork"] + ? item["remoteVirtualNetwork"] + : subResourceDeserializer(item["remoteVirtualNetwork"]), + allowHubToRemoteVnetTransit: item["allowHubToRemoteVnetTransit"], + allowRemoteVnetToUseHubVnetGateways: item["allowRemoteVnetToUseHubVnetGateways"], + connectionPolicy: !item["connectionPolicy"] + ? item["connectionPolicy"] + : subResourceDeserializer(item["connectionPolicy"]), + enableInternetSecurity: item["enableInternetSecurity"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + provisioningState: item["provisioningState"], + }; +} + +export function _bgpConnectionPropertiesSerializer(item: BgpConnection): any { + return { + peerAsn: item["peerAsn"], + peerIp: item["peerIp"], + hubVirtualNetworkConnection: !item["hubVirtualNetworkConnection"] + ? item["hubVirtualNetworkConnection"] + : subResourceSerializer(item["hubVirtualNetworkConnection"]), + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationSerializer(item["routingConfiguration"]), + }; +} + +export function _bgpConnectionPropertiesDeserializer(item: any) { + return { + peerAsn: item["peerAsn"], + peerIp: item["peerIp"], + hubVirtualNetworkConnection: !item["hubVirtualNetworkConnection"] + ? item["hubVirtualNetworkConnection"] + : subResourceDeserializer(item["hubVirtualNetworkConnection"]), + provisioningState: item["provisioningState"], + connectionState: item["connectionState"], + routingConfiguration: !item["routingConfiguration"] + ? item["routingConfiguration"] + : routingConfigurationDeserializer(item["routingConfiguration"]), + }; +} + +export function _hubIpConfigurationPropertiesSerializer(item: HubIpConfiguration): any { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subnetSerializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressSerializer(item["publicIPAddress"]), + }; +} + +export function _hubIpConfigurationPropertiesDeserializer(item: any) { + return { + privateIPAddress: item["privateIPAddress"], + privateIPAllocationMethod: item["privateIPAllocationMethod"], + subnet: !item["subnet"] ? item["subnet"] : subnetDeserializer(item["subnet"]), + publicIPAddress: !item["publicIPAddress"] + ? item["publicIPAddress"] + : publicIPAddressDeserializer(item["publicIPAddress"]), + provisioningState: item["provisioningState"], + }; +} + +export function _routingIntentPropertiesSerializer(item: RoutingIntent): any { + return { + routingPolicies: !item["routingPolicies"] + ? item["routingPolicies"] + : routingPolicyArraySerializer(item["routingPolicies"]), + }; +} + +export function _routingIntentPropertiesDeserializer(item: any) { + return { + routingPolicies: !item["routingPolicies"] + ? item["routingPolicies"] + : routingPolicyArrayDeserializer(item["routingPolicies"]), + provisioningState: item["provisioningState"], + }; +} + +export function _azureFirewallFqdnTagPropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + fqdnTagName: item["fqdnTagName"], + }; +} + +export function _expressRouteServiceProviderPropertiesDeserializer(item: any) { + return { + peeringLocations: !item["peeringLocations"] + ? item["peeringLocations"] + : item["peeringLocations"].map((p: any) => { + return p; + }), + bandwidthsOffered: !item["bandwidthsOffered"] + ? item["bandwidthsOffered"] + : expressRouteServiceProviderBandwidthsOfferedArrayDeserializer(item["bandwidthsOffered"]), + provisioningState: item["provisioningState"], + }; +} + +export function _perimeterAssociableResourcePropertiesDeserializer(item: any) { + return { + displayName: item["displayName"], + resourceType: item["resourceType"], + publicDnsZones: !item["publicDnsZones"] + ? item["publicDnsZones"] + : item["publicDnsZones"].map((p: any) => { + return p; + }), + serviceTags: !item["serviceTags"] + ? item["serviceTags"] + : item["serviceTags"].map((p: any) => { + return p; + }), + readinessState: item["readinessState"], + outboundSupported: item["outboundSupported"], + description: item["description"], + }; +} + +export function _bgpServiceCommunityPropertiesDeserializer(item: any) { + return { + serviceName: item["serviceName"], + bgpCommunities: !item["bgpCommunities"] + ? item["bgpCommunities"] + : bgpCommunityArrayDeserializer(item["bgpCommunities"]), + }; +} diff --git a/sdk/network/arm-network/src/models/models.ts b/sdk/network/arm-network/src/models/models.ts new file mode 100644 index 000000000000..9a1c132d41a1 --- /dev/null +++ b/sdk/network/arm-network/src/models/models.ts @@ -0,0 +1,1693 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + networkInterfaceIPConfigurationArrayDeserializer, + NetworkInterfaceIPConfiguration, + virtualNetworkTapArrayDeserializer, + VirtualNetworkTap, + networkInterfaceTapConfigurationArrayDeserializer, + NetworkInterfaceTapConfiguration, + Subnet, + NetworkSecurityGroup, + securityRuleArrayDeserializer, + SecurityRule, + applicationSecurityGroupArrayDeserializer, + ApplicationSecurityGroup, + networkInterfaceArrayDeserializer, + NetworkInterface, + PrivateEndpoint, + PrivateLinkService, + privateEndpointConnectionArrayDeserializer, + PrivateEndpointConnection, + subnetArrayDeserializer, + flowLogArrayDeserializer, + FlowLog, + RouteTable, + routeArrayDeserializer, + Route, + serviceEndpointPolicyArrayDeserializer, + ServiceEndpointPolicy, + serviceEndpointPolicyDefinitionArrayDeserializer, + ServiceEndpointPolicyDefinition, + privateEndpointArrayDeserializer, + PublicIPAddress, + NatGateway, + inboundNatRuleArrayDeserializer, + InboundNatRule, + publicIPAddressArrayDeserializer, + LoadBalancer, + loadBalancerArrayDeserializer, + natGatewayArrayDeserializer, + networkSecurityGroupArrayDeserializer, + privateLinkServiceArrayDeserializer, + routeTableArrayDeserializer, + VirtualNetwork, + virtualNetworkPeeringArrayDeserializer, + VirtualNetworkPeering, + virtualNetworkArrayDeserializer, +} from "./common/models.js"; +import { + ApplicationGateway, + applicationGatewayPrivateEndpointConnectionArrayDeserializer, + ApplicationGatewayPrivateEndpointConnection, + applicationGatewayArrayDeserializer, + AzureFirewall, + azureFirewallArrayDeserializer, + BastionHost, + bastionHostArrayDeserializer, + DdosCustomPolicy, + ddosCustomPolicyArrayDeserializer, + DdosProtectionPlan, + ddosProtectionPlanArrayDeserializer, + ExpressRouteCircuit, + expressRouteCircuitPeeringArrayDeserializer, + ExpressRouteCircuitPeering, + expressRouteCircuitConnectionArrayDeserializer, + ExpressRouteCircuitConnection, + peerExpressRouteCircuitConnectionArrayDeserializer, + PeerExpressRouteCircuitConnection, + expressRouteCircuitArrayDeserializer, + ExpressRouteCrossConnection, + expressRouteCrossConnectionArrayDeserializer, + FirewallPolicy, + firewallPolicyArrayDeserializer, + FirewallPolicyRuleCollectionGroup, + firewallPolicyRuleCollectionGroupArrayDeserializer, + NetworkManager, + networkManagerArrayDeserializer, + IpAllocation, + ipAllocationArrayDeserializer, + IpGroup, + ipGroupArrayDeserializer, + NetworkManagerConnection, + networkManagerConnectionArrayDeserializer, + ConnectivityConfiguration, + connectivityConfigurationArrayDeserializer, + NetworkGroup, + networkGroupArrayDeserializer, + StaticMember, + staticMemberArrayDeserializer, + NetworkManagerRoutingConfiguration, + networkManagerRoutingConfigurationArrayDeserializer, + RoutingRuleCollection, + routingRuleCollectionArrayDeserializer, + RoutingRule, + routingRuleArrayDeserializer, + ScopeConnection, + scopeConnectionArrayDeserializer, + Commit, + commitArrayDeserializer, + SecurityAdminConfiguration, + securityAdminConfigurationArrayDeserializer, + AdminRuleCollection, + adminRuleCollectionArrayDeserializer, + SecurityUserConfiguration, + securityUserConfigurationArrayDeserializer, + SecurityUserRuleCollection, + securityUserRuleCollectionArrayDeserializer, + SecurityUserRule, + securityUserRuleArrayDeserializer, + NetworkProfile, + networkProfileArrayDeserializer, + NetworkSecurityPerimeter, + networkSecurityPerimeterArrayDeserializer, + ReachabilityAnalysisIntent, + reachabilityAnalysisIntentArrayDeserializer, + VerifierWorkspace, + verifierWorkspaceArrayDeserializer, + ReachabilityAnalysisRun, + reachabilityAnalysisRunArrayDeserializer, + NetworkVirtualAppliance, + networkVirtualApplianceArrayDeserializer, + PublicIPPrefix, + publicIPPrefixArrayDeserializer, + RouteFilter, + routeFilterArrayDeserializer, + SecurityPartnerProvider, + securityPartnerProviderArrayDeserializer, + VirtualNetworkGateway, + virtualNetworkGatewayArrayDeserializer, + VirtualNetworkGatewayConnection, + LocalNetworkGateway, + virtualNetworkGatewayConnectionArrayDeserializer, + localNetworkGatewayArrayDeserializer, + VirtualRouter, + virtualRouterArrayDeserializer, + VirtualRouterPeering, + virtualRouterPeeringArrayDeserializer, + VirtualNetworkAppliance, + virtualNetworkApplianceArrayDeserializer, + ServiceGateway, + serviceGatewayArrayDeserializer, + InterconnectGroup, + subgroupArrayDeserializer, + Subgroup, + interconnectGroupArrayDeserializer, + applicationGatewayPrivateLinkResourceArrayDeserializer, + ApplicationGatewayPrivateLinkResource, + CustomIpPrefix, + customIpPrefixArrayDeserializer, + DscpConfiguration, + dscpConfigurationArrayDeserializer, + NspProfile, + nspProfileArrayDeserializer, + NspAccessRule, + nspAccessRuleArrayDeserializer, + NspLink, + nspLinkArrayDeserializer, + NspLinkReference, + nspLinkReferenceArrayDeserializer, + NspLoggingConfiguration, + nspLoggingConfigurationArrayDeserializer, + NetworkVirtualApplianceSku, + networkVirtualApplianceSkuArrayDeserializer, + azureFirewallFqdnTagArrayDeserializer, + AzureFirewallFqdnTag, + expressRouteServiceProviderArrayDeserializer, + ExpressRouteServiceProvider, + bgpServiceCommunityArrayDeserializer, + BgpServiceCommunity, +} from "./microsoft/network/models.js"; + +/** + * This file contains only generated model types and their (de)serializers. + * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input. + */ +/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +/** The error detail. */ +export interface ErrorDetail { + /** The error code. */ + readonly code?: string; + /** The error message. */ + readonly message?: string; + /** The error target. */ + readonly target?: string; + /** The error details. */ + readonly details?: ErrorDetail[]; + /** The error additional info. */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +export function errorDetailDeserializer(item: any): ErrorDetail { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]), + additionalInfo: !item["additionalInfo"] + ? item["additionalInfo"] + : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]), + }; +} + +export function errorDetailArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorDetailDeserializer(item); + }); +} + +export function errorAdditionalInfoArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorAdditionalInfoDeserializer(item); + }); +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: Record; +} + +export function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo { + return { + type: item["type"], + info: item["info"], + }; +} + +/** The response of a ApplicationGateway list operation. */ +export interface _ApplicationGatewayListResult { + /** The ApplicationGateway items on this page */ + value: ApplicationGateway[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _applicationGatewayListResultDeserializer( + item: any, +): _ApplicationGatewayListResult { + return { + value: applicationGatewayArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ApplicationGatewayPrivateEndpointConnection list operation. */ +export interface _ApplicationGatewayPrivateEndpointConnectionListResult { + /** The ApplicationGatewayPrivateEndpointConnection items on this page */ + value: ApplicationGatewayPrivateEndpointConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _applicationGatewayPrivateEndpointConnectionListResultDeserializer( + item: any, +): _ApplicationGatewayPrivateEndpointConnectionListResult { + return { + value: applicationGatewayPrivateEndpointConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ApplicationSecurityGroup list operation. */ +export interface _ApplicationSecurityGroupListResult { + /** The ApplicationSecurityGroup items on this page */ + value: ApplicationSecurityGroup[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _applicationSecurityGroupListResultDeserializer( + item: any, +): _ApplicationSecurityGroupListResult { + return { + value: applicationSecurityGroupArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a AzureFirewall list operation. */ +export interface _AzureFirewallListResult { + /** The AzureFirewall items on this page */ + value: AzureFirewall[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _azureFirewallListResultDeserializer(item: any): _AzureFirewallListResult { + return { + value: azureFirewallArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a BastionHost list operation. */ +export interface _BastionHostListResult { + /** The BastionHost items on this page */ + value: BastionHost[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _bastionHostListResultDeserializer(item: any): _BastionHostListResult { + return { + value: bastionHostArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NetworkInterface list operation. */ +export interface _NetworkInterfaceListResult { + /** The NetworkInterface items on this page */ + value: NetworkInterface[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkInterfaceListResultDeserializer(item: any): _NetworkInterfaceListResult { + return { + value: networkInterfaceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NetworkInterfaceIPConfiguration list operation. */ +export interface _NetworkInterfaceIPConfigurationListResult { + /** The NetworkInterfaceIPConfiguration items on this page */ + value: NetworkInterfaceIPConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkInterfaceIPConfigurationListResultDeserializer( + item: any, +): _NetworkInterfaceIPConfigurationListResult { + return { + value: networkInterfaceIPConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a PublicIPAddress list operation. */ +export interface _PublicIPAddressListResult { + /** The PublicIPAddress items on this page */ + value: PublicIPAddress[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _publicIPAddressListResultDeserializer(item: any): _PublicIPAddressListResult { + return { + value: publicIPAddressArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a DdosCustomPolicy list operation. */ +export interface _DdosCustomPolicyListResult { + /** The DdosCustomPolicy items on this page */ + value: DdosCustomPolicy[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _ddosCustomPolicyListResultDeserializer(item: any): _DdosCustomPolicyListResult { + return { + value: ddosCustomPolicyArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a DdosProtectionPlan list operation. */ +export interface _DdosProtectionPlanListResult { + /** The DdosProtectionPlan items on this page */ + value: DdosProtectionPlan[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _ddosProtectionPlanListResultDeserializer( + item: any, +): _DdosProtectionPlanListResult { + return { + value: ddosProtectionPlanArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ExpressRouteCircuit list operation. */ +export interface _ExpressRouteCircuitListResult { + /** The ExpressRouteCircuit items on this page */ + value: ExpressRouteCircuit[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _expressRouteCircuitListResultDeserializer( + item: any, +): _ExpressRouteCircuitListResult { + return { + value: expressRouteCircuitArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ExpressRouteCircuitPeering list operation. */ +export interface _ExpressRouteCircuitPeeringListResult { + /** The ExpressRouteCircuitPeering items on this page */ + value: ExpressRouteCircuitPeering[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _expressRouteCircuitPeeringListResultDeserializer( + item: any, +): _ExpressRouteCircuitPeeringListResult { + return { + value: expressRouteCircuitPeeringArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ExpressRouteCircuitConnection list operation. */ +export interface _ExpressRouteCircuitConnectionListResult { + /** The ExpressRouteCircuitConnection items on this page */ + value: ExpressRouteCircuitConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _expressRouteCircuitConnectionListResultDeserializer( + item: any, +): _ExpressRouteCircuitConnectionListResult { + return { + value: expressRouteCircuitConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a PeerExpressRouteCircuitConnection list operation. */ +export interface _PeerExpressRouteCircuitConnectionListResult { + /** The PeerExpressRouteCircuitConnection items on this page */ + value: PeerExpressRouteCircuitConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _peerExpressRouteCircuitConnectionListResultDeserializer( + item: any, +): _PeerExpressRouteCircuitConnectionListResult { + return { + value: peerExpressRouteCircuitConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ExpressRouteCrossConnection list operation. */ +export interface _ExpressRouteCrossConnectionListResult { + /** The ExpressRouteCrossConnection items on this page */ + value: ExpressRouteCrossConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _expressRouteCrossConnectionListResultDeserializer( + item: any, +): _ExpressRouteCrossConnectionListResult { + return { + value: expressRouteCrossConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a FirewallPolicy list operation. */ +export interface _FirewallPolicyListResult { + /** The FirewallPolicy items on this page */ + value: FirewallPolicy[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _firewallPolicyListResultDeserializer(item: any): _FirewallPolicyListResult { + return { + value: firewallPolicyArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a FirewallPolicyRuleCollectionGroup list operation. */ +export interface _FirewallPolicyRuleCollectionGroupListResult { + /** The FirewallPolicyRuleCollectionGroup items on this page */ + value: FirewallPolicyRuleCollectionGroup[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _firewallPolicyRuleCollectionGroupListResultDeserializer( + item: any, +): _FirewallPolicyRuleCollectionGroupListResult { + return { + value: firewallPolicyRuleCollectionGroupArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +export function systemDataDeserializer(item: any): SystemData { + return { + createdBy: item["createdBy"], + createdByType: item["createdByType"], + createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), + lastModifiedBy: item["lastModifiedBy"], + lastModifiedByType: item["lastModifiedByType"], + lastModifiedAt: !item["lastModifiedAt"] + ? item["lastModifiedAt"] + : new Date(item["lastModifiedAt"]), + }; +} + +/** The kind of entity that created the resource. */ +export enum KnownCreatedByType { + /** The entity was created by a user. */ + User = "User", + /** The entity was created by an application. */ + Application = "Application", + /** The entity was created by a managed identity. */ + ManagedIdentity = "ManagedIdentity", + /** The entity was created by a key. */ + Key = "Key", +} + +/** + * The kind of entity that created the resource. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User**: The entity was created by a user. \ + * **Application**: The entity was created by an application. \ + * **ManagedIdentity**: The entity was created by a managed identity. \ + * **Key**: The entity was created by a key. + */ +export type CreatedByType = string; + +/** The response of a NetworkManager list operation. */ +export interface _NetworkManagerListResult { + /** The NetworkManager items on this page */ + value: NetworkManager[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkManagerListResultDeserializer(item: any): _NetworkManagerListResult { + return { + value: networkManagerArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a IpAllocation list operation. */ +export interface _IpAllocationListResult { + /** The IpAllocation items on this page */ + value: IpAllocation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _ipAllocationListResultDeserializer(item: any): _IpAllocationListResult { + return { + value: ipAllocationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a IpGroup list operation. */ +export interface _IpGroupListResult { + /** The IpGroup items on this page */ + value: IpGroup[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _ipGroupListResultDeserializer(item: any): _IpGroupListResult { + return { + value: ipGroupArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a LoadBalancer list operation. */ +export interface _LoadBalancerListResult { + /** The LoadBalancer items on this page */ + value: LoadBalancer[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _loadBalancerListResultDeserializer(item: any): _LoadBalancerListResult { + return { + value: loadBalancerArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a InboundNatRule list operation. */ +export interface _InboundNatRuleListResult { + /** The InboundNatRule items on this page */ + value: InboundNatRule[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _inboundNatRuleListResultDeserializer(item: any): _InboundNatRuleListResult { + return { + value: inboundNatRuleArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NatGateway list operation. */ +export interface _NatGatewayListResult { + /** The NatGateway items on this page */ + value: NatGateway[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _natGatewayListResultDeserializer(item: any): _NatGatewayListResult { + return { + value: natGatewayArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NetworkInterfaceTapConfiguration list operation. */ +export interface _NetworkInterfaceTapConfigurationListResult { + /** The NetworkInterfaceTapConfiguration items on this page */ + value: NetworkInterfaceTapConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkInterfaceTapConfigurationListResultDeserializer( + item: any, +): _NetworkInterfaceTapConfigurationListResult { + return { + value: networkInterfaceTapConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NetworkManagerConnection list operation. */ +export interface _NetworkManagerConnectionListResult { + /** The NetworkManagerConnection items on this page */ + value: NetworkManagerConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkManagerConnectionListResultDeserializer( + item: any, +): _NetworkManagerConnectionListResult { + return { + value: networkManagerConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ConnectivityConfiguration list operation. */ +export interface _ConnectivityConfigurationListResult { + /** The ConnectivityConfiguration items on this page */ + value: ConnectivityConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _connectivityConfigurationListResultDeserializer( + item: any, +): _ConnectivityConfigurationListResult { + return { + value: connectivityConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NetworkGroup list operation. */ +export interface _NetworkGroupListResult { + /** The NetworkGroup items on this page */ + value: NetworkGroup[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkGroupListResultDeserializer(item: any): _NetworkGroupListResult { + return { + value: networkGroupArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a StaticMember list operation. */ +export interface _StaticMemberListResult { + /** The StaticMember items on this page */ + value: StaticMember[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _staticMemberListResultDeserializer(item: any): _StaticMemberListResult { + return { + value: staticMemberArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NetworkManagerRoutingConfiguration list operation. */ +export interface _NetworkManagerRoutingConfigurationListResult { + /** The NetworkManagerRoutingConfiguration items on this page */ + value: NetworkManagerRoutingConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkManagerRoutingConfigurationListResultDeserializer( + item: any, +): _NetworkManagerRoutingConfigurationListResult { + return { + value: networkManagerRoutingConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a RoutingRuleCollection list operation. */ +export interface _RoutingRuleCollectionListResult { + /** The RoutingRuleCollection items on this page */ + value: RoutingRuleCollection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _routingRuleCollectionListResultDeserializer( + item: any, +): _RoutingRuleCollectionListResult { + return { + value: routingRuleCollectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a RoutingRule list operation. */ +export interface _RoutingRuleListResult { + /** The RoutingRule items on this page */ + value: RoutingRule[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _routingRuleListResultDeserializer(item: any): _RoutingRuleListResult { + return { + value: routingRuleArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ScopeConnection list operation. */ +export interface _ScopeConnectionListResult { + /** The ScopeConnection items on this page */ + value: ScopeConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _scopeConnectionListResultDeserializer(item: any): _ScopeConnectionListResult { + return { + value: scopeConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a Commit list operation. */ +export interface _CommitListResult { + /** The Commit items on this page */ + value: Commit[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _commitListResultDeserializer(item: any): _CommitListResult { + return { + value: commitArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a SecurityAdminConfiguration list operation. */ +export interface _SecurityAdminConfigurationListResult { + /** The SecurityAdminConfiguration items on this page */ + value: SecurityAdminConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _securityAdminConfigurationListResultDeserializer( + item: any, +): _SecurityAdminConfigurationListResult { + return { + value: securityAdminConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a AdminRuleCollection list operation. */ +export interface _AdminRuleCollectionListResult { + /** The AdminRuleCollection items on this page */ + value: AdminRuleCollection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _adminRuleCollectionListResultDeserializer( + item: any, +): _AdminRuleCollectionListResult { + return { + value: adminRuleCollectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a SecurityUserConfiguration list operation. */ +export interface _SecurityUserConfigurationListResult { + /** The SecurityUserConfiguration items on this page */ + value: SecurityUserConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _securityUserConfigurationListResultDeserializer( + item: any, +): _SecurityUserConfigurationListResult { + return { + value: securityUserConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a SecurityUserRuleCollection list operation. */ +export interface _SecurityUserRuleCollectionListResult { + /** The SecurityUserRuleCollection items on this page */ + value: SecurityUserRuleCollection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _securityUserRuleCollectionListResultDeserializer( + item: any, +): _SecurityUserRuleCollectionListResult { + return { + value: securityUserRuleCollectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a SecurityUserRule list operation. */ +export interface _SecurityUserRuleListResult { + /** The SecurityUserRule items on this page */ + value: SecurityUserRule[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _securityUserRuleListResultDeserializer(item: any): _SecurityUserRuleListResult { + return { + value: securityUserRuleArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NetworkProfile list operation. */ +export interface _NetworkProfileListResult { + /** The NetworkProfile items on this page */ + value: NetworkProfile[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkProfileListResultDeserializer(item: any): _NetworkProfileListResult { + return { + value: networkProfileArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NetworkSecurityGroup list operation. */ +export interface _NetworkSecurityGroupListResult { + /** The NetworkSecurityGroup items on this page */ + value: NetworkSecurityGroup[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkSecurityGroupListResultDeserializer( + item: any, +): _NetworkSecurityGroupListResult { + return { + value: networkSecurityGroupArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a SecurityRule list operation. */ +export interface _SecurityRuleListResult { + /** The SecurityRule items on this page */ + value: SecurityRule[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _securityRuleListResultDeserializer(item: any): _SecurityRuleListResult { + return { + value: securityRuleArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NetworkSecurityPerimeter list operation. */ +export interface _NetworkSecurityPerimeterListResult { + /** The NetworkSecurityPerimeter items on this page */ + value: NetworkSecurityPerimeter[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkSecurityPerimeterListResultDeserializer( + item: any, +): _NetworkSecurityPerimeterListResult { + return { + value: networkSecurityPerimeterArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ReachabilityAnalysisIntent list operation. */ +export interface _ReachabilityAnalysisIntentListResult { + /** The ReachabilityAnalysisIntent items on this page */ + value: ReachabilityAnalysisIntent[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _reachabilityAnalysisIntentListResultDeserializer( + item: any, +): _ReachabilityAnalysisIntentListResult { + return { + value: reachabilityAnalysisIntentArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a VerifierWorkspace list operation. */ +export interface _VerifierWorkspaceListResult { + /** The VerifierWorkspace items on this page */ + value: VerifierWorkspace[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _verifierWorkspaceListResultDeserializer(item: any): _VerifierWorkspaceListResult { + return { + value: verifierWorkspaceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ReachabilityAnalysisRun list operation. */ +export interface _ReachabilityAnalysisRunListResult { + /** The ReachabilityAnalysisRun items on this page */ + value: ReachabilityAnalysisRun[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _reachabilityAnalysisRunListResultDeserializer( + item: any, +): _ReachabilityAnalysisRunListResult { + return { + value: reachabilityAnalysisRunArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NetworkVirtualAppliance list operation. */ +export interface _NetworkVirtualApplianceListResult { + /** The NetworkVirtualAppliance items on this page */ + value: NetworkVirtualAppliance[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkVirtualApplianceListResultDeserializer( + item: any, +): _NetworkVirtualApplianceListResult { + return { + value: networkVirtualApplianceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a FlowLog list operation. */ +export interface _FlowLogListResult { + /** The FlowLog items on this page */ + value: FlowLog[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _flowLogListResultDeserializer(item: any): _FlowLogListResult { + return { + value: flowLogArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a PrivateEndpoint list operation. */ +export interface _PrivateEndpointListResult { + /** The PrivateEndpoint items on this page */ + value: PrivateEndpoint[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _privateEndpointListResultDeserializer(item: any): _PrivateEndpointListResult { + return { + value: privateEndpointArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a PrivateLinkService list operation. */ +export interface _PrivateLinkServiceListResult { + /** The PrivateLinkService items on this page */ + value: PrivateLinkService[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _privateLinkServiceListResultDeserializer( + item: any, +): _PrivateLinkServiceListResult { + return { + value: privateLinkServiceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a PrivateEndpointConnection list operation. */ +export interface _PrivateEndpointConnectionListResult { + /** The PrivateEndpointConnection items on this page */ + value: PrivateEndpointConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _privateEndpointConnectionListResultDeserializer( + item: any, +): _PrivateEndpointConnectionListResult { + return { + value: privateEndpointConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a PublicIPPrefix list operation. */ +export interface _PublicIPPrefixListResult { + /** The PublicIPPrefix items on this page */ + value: PublicIPPrefix[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _publicIPPrefixListResultDeserializer(item: any): _PublicIPPrefixListResult { + return { + value: publicIPPrefixArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a RouteFilter list operation. */ +export interface _RouteFilterListResult { + /** The RouteFilter items on this page */ + value: RouteFilter[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _routeFilterListResultDeserializer(item: any): _RouteFilterListResult { + return { + value: routeFilterArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a RouteTable list operation. */ +export interface _RouteTableListResult { + /** The RouteTable items on this page */ + value: RouteTable[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _routeTableListResultDeserializer(item: any): _RouteTableListResult { + return { + value: routeTableArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a Route list operation. */ +export interface _RouteListResult { + /** The Route items on this page */ + value: Route[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _routeListResultDeserializer(item: any): _RouteListResult { + return { + value: routeArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a SecurityPartnerProvider list operation. */ +export interface _SecurityPartnerProviderListResult { + /** The SecurityPartnerProvider items on this page */ + value: SecurityPartnerProvider[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _securityPartnerProviderListResultDeserializer( + item: any, +): _SecurityPartnerProviderListResult { + return { + value: securityPartnerProviderArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ServiceEndpointPolicy list operation. */ +export interface _ServiceEndpointPolicyListResult { + /** The ServiceEndpointPolicy items on this page */ + value: ServiceEndpointPolicy[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _serviceEndpointPolicyListResultDeserializer( + item: any, +): _ServiceEndpointPolicyListResult { + return { + value: serviceEndpointPolicyArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ServiceEndpointPolicyDefinition list operation. */ +export interface _ServiceEndpointPolicyDefinitionListResult { + /** The ServiceEndpointPolicyDefinition items on this page */ + value: ServiceEndpointPolicyDefinition[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _serviceEndpointPolicyDefinitionListResultDeserializer( + item: any, +): _ServiceEndpointPolicyDefinitionListResult { + return { + value: serviceEndpointPolicyDefinitionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a VirtualNetwork list operation. */ +export interface _VirtualNetworkListResult { + /** The VirtualNetwork items on this page */ + value: VirtualNetwork[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualNetworkListResultDeserializer(item: any): _VirtualNetworkListResult { + return { + value: virtualNetworkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a Subnet list operation. */ +export interface _SubnetListResult { + /** The Subnet items on this page */ + value: Subnet[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _subnetListResultDeserializer(item: any): _SubnetListResult { + return { + value: subnetArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a VirtualNetworkPeering list operation. */ +export interface _VirtualNetworkPeeringListResult { + /** The VirtualNetworkPeering items on this page */ + value: VirtualNetworkPeering[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualNetworkPeeringListResultDeserializer( + item: any, +): _VirtualNetworkPeeringListResult { + return { + value: virtualNetworkPeeringArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a VirtualNetworkGateway list operation. */ +export interface _VirtualNetworkGatewayListResult { + /** The VirtualNetworkGateway items on this page */ + value: VirtualNetworkGateway[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualNetworkGatewayListResultDeserializer( + item: any, +): _VirtualNetworkGatewayListResult { + return { + value: virtualNetworkGatewayArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a VirtualNetworkGatewayConnection list operation. */ +export interface _VirtualNetworkGatewayConnectionListResult { + /** The VirtualNetworkGatewayConnection items on this page */ + value: VirtualNetworkGatewayConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualNetworkGatewayConnectionListResultDeserializer( + item: any, +): _VirtualNetworkGatewayConnectionListResult { + return { + value: virtualNetworkGatewayConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a LocalNetworkGateway list operation. */ +export interface _LocalNetworkGatewayListResult { + /** The LocalNetworkGateway items on this page */ + value: LocalNetworkGateway[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _localNetworkGatewayListResultDeserializer( + item: any, +): _LocalNetworkGatewayListResult { + return { + value: localNetworkGatewayArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a VirtualNetworkTap list operation. */ +export interface _VirtualNetworkTapListResult { + /** The VirtualNetworkTap items on this page */ + value: VirtualNetworkTap[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualNetworkTapListResultDeserializer(item: any): _VirtualNetworkTapListResult { + return { + value: virtualNetworkTapArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a VirtualRouter list operation. */ +export interface _VirtualRouterListResult { + /** The VirtualRouter items on this page */ + value: VirtualRouter[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualRouterListResultDeserializer(item: any): _VirtualRouterListResult { + return { + value: virtualRouterArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a VirtualRouterPeering list operation. */ +export interface _VirtualRouterPeeringListResult { + /** The VirtualRouterPeering items on this page */ + value: VirtualRouterPeering[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualRouterPeeringListResultDeserializer( + item: any, +): _VirtualRouterPeeringListResult { + return { + value: virtualRouterPeeringArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a VirtualNetworkAppliance list operation. */ +export interface _VirtualNetworkApplianceListResult { + /** The VirtualNetworkAppliance items on this page */ + value: VirtualNetworkAppliance[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualNetworkApplianceListResultDeserializer( + item: any, +): _VirtualNetworkApplianceListResult { + return { + value: virtualNetworkApplianceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ServiceGateway list operation. */ +export interface _ServiceGatewayListResult { + /** The ServiceGateway items on this page */ + value: ServiceGateway[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _serviceGatewayListResultDeserializer(item: any): _ServiceGatewayListResult { + return { + value: serviceGatewayArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a InterconnectGroup list operation. */ +export interface _InterconnectGroupListResult { + /** The InterconnectGroup items on this page */ + value: InterconnectGroup[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _interconnectGroupListResultDeserializer(item: any): _InterconnectGroupListResult { + return { + value: interconnectGroupArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a Subgroup list operation. */ +export interface _SubgroupListResult { + /** The Subgroup items on this page */ + value: Subgroup[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _subgroupListResultDeserializer(item: any): _SubgroupListResult { + return { + value: subgroupArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ApplicationGatewayPrivateLinkResource list operation. */ +export interface _ApplicationGatewayPrivateLinkResourceListResult { + /** The ApplicationGatewayPrivateLinkResource items on this page */ + value: ApplicationGatewayPrivateLinkResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _applicationGatewayPrivateLinkResourceListResultDeserializer( + item: any, +): _ApplicationGatewayPrivateLinkResourceListResult { + return { + value: applicationGatewayPrivateLinkResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a CustomIpPrefix list operation. */ +export interface _CustomIpPrefixListResult { + /** The CustomIpPrefix items on this page */ + value: CustomIpPrefix[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _customIpPrefixListResultDeserializer(item: any): _CustomIpPrefixListResult { + return { + value: customIpPrefixArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a DscpConfiguration list operation. */ +export interface _DscpConfigurationListResult { + /** The DscpConfiguration items on this page */ + value: DscpConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _dscpConfigurationListResultDeserializer(item: any): _DscpConfigurationListResult { + return { + value: dscpConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NspProfile list operation. */ +export interface _NspProfileListResult { + /** The NspProfile items on this page */ + value: NspProfile[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _nspProfileListResultDeserializer(item: any): _NspProfileListResult { + return { + value: nspProfileArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NspAccessRule list operation. */ +export interface _NspAccessRuleListResult { + /** The NspAccessRule items on this page */ + value: NspAccessRule[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _nspAccessRuleListResultDeserializer(item: any): _NspAccessRuleListResult { + return { + value: nspAccessRuleArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NspLink list operation. */ +export interface _NspLinkListResult { + /** The NspLink items on this page */ + value: NspLink[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _nspLinkListResultDeserializer(item: any): _NspLinkListResult { + return { + value: nspLinkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NspLinkReference list operation. */ +export interface _NspLinkReferenceListResult { + /** The NspLinkReference items on this page */ + value: NspLinkReference[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _nspLinkReferenceListResultDeserializer(item: any): _NspLinkReferenceListResult { + return { + value: nspLinkReferenceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NspLoggingConfiguration list operation. */ +export interface _NspLoggingConfigurationListResult { + /** The NspLoggingConfiguration items on this page */ + value: NspLoggingConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _nspLoggingConfigurationListResultDeserializer( + item: any, +): _NspLoggingConfigurationListResult { + return { + value: nspLoggingConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a NetworkVirtualApplianceSku list operation. */ +export interface _NetworkVirtualApplianceSkuListResult { + /** The NetworkVirtualApplianceSku items on this page */ + value: NetworkVirtualApplianceSku[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _networkVirtualApplianceSkuListResultDeserializer( + item: any, +): _NetworkVirtualApplianceSkuListResult { + return { + value: networkVirtualApplianceSkuArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a AzureFirewallFqdnTag list operation. */ +export interface _AzureFirewallFqdnTagListResult { + /** The AzureFirewallFqdnTag items on this page */ + value: AzureFirewallFqdnTag[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _azureFirewallFqdnTagListResultDeserializer( + item: any, +): _AzureFirewallFqdnTagListResult { + return { + value: azureFirewallFqdnTagArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The response of a ExpressRouteServiceProvider list operation. */ +export interface _ExpressRouteServiceProviderListResult { + /** The ExpressRouteServiceProvider items on this page */ + value: ExpressRouteServiceProvider[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _expressRouteServiceProviderListResultDeserializer( + item: any, +): _ExpressRouteServiceProviderListResult { + return { + value: expressRouteServiceProviderArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +/** The current status of an async operation. */ +export interface OperationStatusResult { + /** Fully qualified ID for the async operation. */ + id?: string; + /** Name of the async operation. */ + name?: string; + /** Operation status. */ + status: string; + /** Percent of the operation that is complete. */ + percentComplete?: number; + /** The start time of the operation. */ + startTime?: Date; + /** The end time of the operation. */ + endTime?: Date; + /** The operations list. */ + operations?: OperationStatusResult[]; + /** If present, details of the operation error. */ + error?: ErrorDetail; + /** Fully qualified ID of the resource against which the original async operation was started. */ + readonly resourceId?: string; +} + +export function operationStatusResultDeserializer(item: any): OperationStatusResult { + return { + id: item["id"], + name: item["name"], + status: item["status"], + percentComplete: item["percentComplete"], + startTime: !item["startTime"] ? item["startTime"] : new Date(item["startTime"]), + endTime: !item["endTime"] ? item["endTime"] : new Date(item["endTime"]), + operations: !item["operations"] + ? item["operations"] + : operationStatusResultArrayDeserializer(item["operations"]), + error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]), + resourceId: item["resourceId"], + }; +} + +export function operationStatusResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return operationStatusResultDeserializer(item); + }); +} + +/** The response of a BgpServiceCommunity list operation. */ +export interface _BgpServiceCommunityListResult { + /** The BgpServiceCommunity items on this page */ + value: BgpServiceCommunity[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _bgpServiceCommunityListResultDeserializer( + item: any, +): _BgpServiceCommunityListResult { + return { + value: bgpServiceCommunityArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export type VpnLinkConnectionsGetIkeSasResponse = { body: string }; + +export type VpnConnectionsStopPacketCaptureResponse = { body: string }; + +export type VpnConnectionsStartPacketCaptureResponse = { body: string }; + +export type ExpressRouteGatewaysStopSiteFailoverTestResponse = { body: string }; + +export type ExpressRouteGatewaysStartSiteFailoverTestResponse = { body: string }; + +export type VpnGatewaysStopPacketCaptureResponse = { body: string }; + +export type VpnGatewaysStartPacketCaptureResponse = { body: string }; + +export type VirtualNetworkGatewayConnectionsGetIkeSasResponse = { body: string }; + +export type VirtualNetworkGatewayConnectionsStopPacketCaptureResponse = { body: string }; + +export type VirtualNetworkGatewayConnectionsStartPacketCaptureResponse = { body: string }; + +export type VirtualNetworkGatewaysVpnDeviceConfigurationScriptResponse = { body: string }; + +export type VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse = { body: string }; + +export type VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse = { + body: string; +}; + +export type VirtualNetworkGatewaysStopPacketCaptureResponse = { body: string }; + +export type VirtualNetworkGatewaysStartPacketCaptureResponse = { body: string }; + +export type VirtualNetworkGatewaysSupportedVpnDevicesResponse = { body: string }; + +export type VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse = { body: string }; + +export type VirtualNetworkGatewaysGenerateVpnProfileResponse = { body: string }; + +export type VirtualNetworkGatewaysGeneratevpnclientpackageResponse = { body: string }; + +export type ExpressRouteCircuitsStopCircuitLinkFailoverTestResponse = { body: string }; + +export type ExpressRouteCircuitsStartCircuitLinkFailoverTestResponse = { body: string }; + +export type ApplicationGatewaysListAvailableResponseHeadersResponse = { body: string[] }; + +export type ApplicationGatewaysListAvailableRequestHeadersResponse = { body: string[] }; + +export type ApplicationGatewaysListAvailableServerVariablesResponse = { body: string[] }; diff --git a/sdk/network/arm-network/src/models/parameters.ts b/sdk/network/arm-network/src/models/parameters.ts deleted file mode 100644 index c03ca48b7adf..000000000000 --- a/sdk/network/arm-network/src/models/parameters.ts +++ /dev/null @@ -1,3150 +0,0 @@ -// 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 type { - OperationParameter, - OperationURLParameter, - OperationQueryParameter, -} from "@azure/core-client"; -import { - ApplicationGateway as ApplicationGatewayMapper, - TagsObject as TagsObjectMapper, - ApplicationGatewayOnDemandProbe as ApplicationGatewayOnDemandProbeMapper, - ApplicationGatewayPrivateEndpointConnection as ApplicationGatewayPrivateEndpointConnectionMapper, - ApplicationSecurityGroup as ApplicationSecurityGroupMapper, - AzureFirewall as AzureFirewallMapper, - FirewallPacketCaptureParameters as FirewallPacketCaptureParametersMapper, - BastionHost as BastionHostMapper, - BastionShareableLinkListRequest as BastionShareableLinkListRequestMapper, - BastionShareableLinkTokenListRequest as BastionShareableLinkTokenListRequestMapper, - SessionIds as SessionIdsMapper, - ActiveConfigurationParameter as ActiveConfigurationParameterMapper, - QueryRequestOptions as QueryRequestOptionsMapper, - VirtualWanVpnProfileParameters as VirtualWanVpnProfileParametersMapper, - NetworkInterface as NetworkInterfaceMapper, - PublicIPAddress as PublicIPAddressMapper, - ReserveCloudServicePublicIpAddressRequest as ReserveCloudServicePublicIpAddressRequestMapper, - DisassociateCloudServicePublicIpRequest as DisassociateCloudServicePublicIpRequestMapper, - SwapResource as SwapResourceMapper, - CustomIpPrefix as CustomIpPrefixMapper, - DdosCustomPolicy as DdosCustomPolicyMapper, - DdosProtectionPlan as DdosProtectionPlanMapper, - DscpConfiguration as DscpConfigurationMapper, - ExpressRouteCircuitAuthorization as ExpressRouteCircuitAuthorizationMapper, - ExpressRouteCircuitPeering as ExpressRouteCircuitPeeringMapper, - ExpressRouteCircuitConnection as ExpressRouteCircuitConnectionMapper, - ExpressRouteCircuit as ExpressRouteCircuitMapper, - ExpressRouteCrossConnection as ExpressRouteCrossConnectionMapper, - ExpressRouteCrossConnectionPeering as ExpressRouteCrossConnectionPeeringMapper, - ExpressRoutePort as ExpressRoutePortMapper, - GenerateExpressRoutePortsLOARequest as GenerateExpressRoutePortsLOARequestMapper, - ExpressRoutePortAuthorization as ExpressRoutePortAuthorizationMapper, - FirewallPolicy as FirewallPolicyMapper, - FirewallPolicyRuleCollectionGroup as FirewallPolicyRuleCollectionGroupMapper, - IdpsQueryObject as IdpsQueryObjectMapper, - SignaturesOverrides as SignaturesOverridesMapper, - SignatureOverridesFilterValuesQuery as SignatureOverridesFilterValuesQueryMapper, - FirewallPolicyDraft as FirewallPolicyDraftMapper, - FirewallPolicyRuleCollectionGroupDraft as FirewallPolicyRuleCollectionGroupDraftMapper, - IpamPool as IpamPoolMapper, - IpamPoolUpdate as IpamPoolUpdateMapper, - StaticCidr as StaticCidrMapper, - IpAllocation as IpAllocationMapper, - IpGroup as IpGroupMapper, - LoadBalancer as LoadBalancerMapper, - LoadBalancerVipSwapRequest as LoadBalancerVipSwapRequestMapper, - QueryInboundNatRulePortMappingRequest as QueryInboundNatRulePortMappingRequestMapper, - MigrateLoadBalancerToIpBasedRequest as MigrateLoadBalancerToIpBasedRequestMapper, - BackendAddressPool as BackendAddressPoolMapper, - InboundNatRule as InboundNatRuleMapper, - NatGateway as NatGatewayMapper, - NetworkInterfaceTapConfiguration as NetworkInterfaceTapConfigurationMapper, - NetworkManager as NetworkManagerMapper, - PatchObject as PatchObjectMapper, - NetworkManagerCommit as NetworkManagerCommitMapper, - NetworkManagerDeploymentStatusParameter as NetworkManagerDeploymentStatusParameterMapper, - NetworkManagerConnection as NetworkManagerConnectionMapper, - ConnectivityConfiguration as ConnectivityConfigurationMapper, - NetworkGroup as NetworkGroupMapper, - StaticMember as StaticMemberMapper, - NetworkManagerRoutingConfiguration as NetworkManagerRoutingConfigurationMapper, - RoutingRuleCollection as RoutingRuleCollectionMapper, - RoutingRule as RoutingRuleMapper, - ScopeConnection as ScopeConnectionMapper, - SecurityAdminConfiguration as SecurityAdminConfigurationMapper, - AdminRuleCollection as AdminRuleCollectionMapper, - BaseAdminRule as BaseAdminRuleMapper, - SecurityUserConfiguration as SecurityUserConfigurationMapper, - SecurityUserRuleCollection as SecurityUserRuleCollectionMapper, - SecurityUserRule as SecurityUserRuleMapper, - NetworkProfile as NetworkProfileMapper, - NetworkSecurityGroup as NetworkSecurityGroupMapper, - SecurityRule as SecurityRuleMapper, - NetworkSecurityPerimeter as NetworkSecurityPerimeterMapper, - UpdateTagsRequest as UpdateTagsRequestMapper, - NspProfile as NspProfileMapper, - NspAccessRule as NspAccessRuleMapper, - NspAssociation as NspAssociationMapper, - NspLink as NspLinkMapper, - NspLoggingConfiguration as NspLoggingConfigurationMapper, - ReachabilityAnalysisIntent as ReachabilityAnalysisIntentMapper, - ReachabilityAnalysisRun as ReachabilityAnalysisRunMapper, - VerifierWorkspace as VerifierWorkspaceMapper, - VerifierWorkspaceUpdate as VerifierWorkspaceUpdateMapper, - NetworkVirtualAppliance as NetworkVirtualApplianceMapper, - NetworkVirtualApplianceInstanceIds as NetworkVirtualApplianceInstanceIdsMapper, - NetworkVirtualApplianceBootDiagnosticParameters as NetworkVirtualApplianceBootDiagnosticParametersMapper, - VirtualApplianceSite as VirtualApplianceSiteMapper, - InboundSecurityRule as InboundSecurityRuleMapper, - NetworkWatcher as NetworkWatcherMapper, - TopologyParameters as TopologyParametersMapper, - VerificationIPFlowParameters as VerificationIPFlowParametersMapper, - NextHopParameters as NextHopParametersMapper, - SecurityGroupViewParameters as SecurityGroupViewParametersMapper, - TroubleshootingParameters as TroubleshootingParametersMapper, - QueryTroubleshootingParameters as QueryTroubleshootingParametersMapper, - FlowLogInformation as FlowLogInformationMapper, - FlowLogStatusParameters as FlowLogStatusParametersMapper, - ConnectivityParameters as ConnectivityParametersMapper, - AzureReachabilityReportParameters as AzureReachabilityReportParametersMapper, - AvailableProvidersListParameters as AvailableProvidersListParametersMapper, - NetworkConfigurationDiagnosticParameters as NetworkConfigurationDiagnosticParametersMapper, - PacketCapture as PacketCaptureMapper, - ConnectionMonitor as ConnectionMonitorMapper, - FlowLog as FlowLogMapper, - PrivateEndpoint as PrivateEndpointMapper, - PrivateDnsZoneGroup as PrivateDnsZoneGroupMapper, - PrivateLinkService as PrivateLinkServiceMapper, - PrivateEndpointConnection as PrivateEndpointConnectionMapper, - CheckPrivateLinkServiceVisibilityRequest as CheckPrivateLinkServiceVisibilityRequestMapper, - PublicIPPrefix as PublicIPPrefixMapper, - RouteFilter as RouteFilterMapper, - RouteFilterRule as RouteFilterRuleMapper, - RouteTable as RouteTableMapper, - Route as RouteMapper, - SecurityPartnerProvider as SecurityPartnerProviderMapper, - ServiceEndpointPolicy as ServiceEndpointPolicyMapper, - ServiceEndpointPolicyDefinition as ServiceEndpointPolicyDefinitionMapper, - ServiceGateway as ServiceGatewayMapper, - ServiceGatewayUpdateAddressLocationsRequest as ServiceGatewayUpdateAddressLocationsRequestMapper, - ServiceGatewayUpdateServicesRequest as ServiceGatewayUpdateServicesRequestMapper, - VirtualNetwork as VirtualNetworkMapper, - Subnet as SubnetMapper, - PrepareNetworkPoliciesRequest as PrepareNetworkPoliciesRequestMapper, - UnprepareNetworkPoliciesRequest as UnprepareNetworkPoliciesRequestMapper, - VirtualNetworkPeering as VirtualNetworkPeeringMapper, - VirtualNetworkAppliance as VirtualNetworkApplianceMapper, - VirtualNetworkGateway as VirtualNetworkGatewayMapper, - VpnClientParameters as VpnClientParametersMapper, - VpnClientIPsecParameters as VpnClientIPsecParametersMapper, - VpnDeviceScriptParameters as VpnDeviceScriptParametersMapper, - VpnPacketCaptureStartParameters as VpnPacketCaptureStartParametersMapper, - VpnPacketCaptureStopParameters as VpnPacketCaptureStopParametersMapper, - ExpressRouteFailoverStopApiParameters as ExpressRouteFailoverStopApiParametersMapper, - P2SVpnConnectionRequest as P2SVpnConnectionRequestMapper, - VirtualNetworkGatewayMigrationParameters as VirtualNetworkGatewayMigrationParametersMapper, - VirtualNetworkGatewayConnection as VirtualNetworkGatewayConnectionMapper, - ConnectionSharedKey as ConnectionSharedKeyMapper, - ConnectionResetSharedKey as ConnectionResetSharedKeyMapper, - LocalNetworkGateway as LocalNetworkGatewayMapper, - VirtualNetworkGatewayNatRule as VirtualNetworkGatewayNatRuleMapper, - VirtualNetworkTap as VirtualNetworkTapMapper, - VirtualRouter as VirtualRouterMapper, - VirtualRouterPeering as VirtualRouterPeeringMapper, - VirtualWAN as VirtualWANMapper, - VpnSite as VpnSiteMapper, - GetVpnSitesConfigurationRequest as GetVpnSitesConfigurationRequestMapper, - VpnServerConfiguration as VpnServerConfigurationMapper, - VpnServerConfigurationPolicyGroup as VpnServerConfigurationPolicyGroupMapper, - VirtualHub as VirtualHubMapper, - EffectiveRoutesParameters as EffectiveRoutesParametersMapper, - GetInboundRoutesParameters as GetInboundRoutesParametersMapper, - GetOutboundRoutesParameters as GetOutboundRoutesParametersMapper, - RouteMap as RouteMapMapper, - HubVirtualNetworkConnection as HubVirtualNetworkConnectionMapper, - VpnGateway as VpnGatewayMapper, - VpnGatewayPacketCaptureStartParameters as VpnGatewayPacketCaptureStartParametersMapper, - VpnGatewayPacketCaptureStopParameters as VpnGatewayPacketCaptureStopParametersMapper, - ConnectionSharedKeyResult as ConnectionSharedKeyResultMapper, - VpnConnection as VpnConnectionMapper, - VpnConnectionPacketCaptureStartParameters as VpnConnectionPacketCaptureStartParametersMapper, - VpnConnectionPacketCaptureStopParameters as VpnConnectionPacketCaptureStopParametersMapper, - VpnGatewayNatRule as VpnGatewayNatRuleMapper, - P2SVpnGateway as P2SVpnGatewayMapper, - P2SVpnProfileParameters as P2SVpnProfileParametersMapper, - P2SVpnConnectionHealthRequest as P2SVpnConnectionHealthRequestMapper, - VirtualHubRouteTableV2 as VirtualHubRouteTableV2Mapper, - ExpressRouteGateway as ExpressRouteGatewayMapper, - ExpressRouteConnection as ExpressRouteConnectionMapper, - NetworkVirtualApplianceConnection as NetworkVirtualApplianceConnectionMapper, - BgpConnection as BgpConnectionMapper, - HubIpConfiguration as HubIpConfigurationMapper, - HubRouteTable as HubRouteTableMapper, - RoutingIntent as RoutingIntentMapper, - WebApplicationFirewallPolicy as WebApplicationFirewallPolicyMapper, -} from "../models/mappers.js"; - -export const accept: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; - -export const $host: OperationURLParameter = { - parameterPath: "$host", - mapper: { - serializedName: "$host", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - serializedName: "resourceGroupName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const applicationGatewayName: OperationURLParameter = { - parameterPath: "applicationGatewayName", - mapper: { - serializedName: "applicationGatewayName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2025-05-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String", - }, - }, -}; - -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - serializedName: "subscriptionId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String", - }, - }, -}; - -export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: ApplicationGatewayMapper, -}; - -export const parameters1: OperationParameter = { - parameterPath: "parameters", - mapper: TagsObjectMapper, -}; - -export const expand: OperationQueryParameter = { - parameterPath: ["options", "expand"], - mapper: { - serializedName: "$expand", - type: { - name: "String", - }, - }, -}; - -export const probeRequest: OperationParameter = { - parameterPath: "probeRequest", - mapper: ApplicationGatewayOnDemandProbeMapper, -}; - -export const predefinedPolicyName: OperationURLParameter = { - parameterPath: "predefinedPolicyName", - mapper: { - serializedName: "predefinedPolicyName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const connectionName: OperationURLParameter = { - parameterPath: "connectionName", - mapper: { - serializedName: "connectionName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters2: OperationParameter = { - parameterPath: "parameters", - mapper: ApplicationGatewayPrivateEndpointConnectionMapper, -}; - -export const location: OperationURLParameter = { - parameterPath: "location", - mapper: { - serializedName: "location", - required: true, - type: { - name: "String", - }, - }, -}; - -export const applicationSecurityGroupName: OperationURLParameter = { - parameterPath: "applicationSecurityGroupName", - mapper: { - serializedName: "applicationSecurityGroupName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters3: OperationParameter = { - parameterPath: "parameters", - mapper: ApplicationSecurityGroupMapper, -}; - -export const azureFirewallName: OperationURLParameter = { - parameterPath: "azureFirewallName", - mapper: { - serializedName: "azureFirewallName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters4: OperationParameter = { - parameterPath: "parameters", - mapper: AzureFirewallMapper, -}; - -export const azureFirewallName1: OperationURLParameter = { - parameterPath: "azureFirewallName", - mapper: { - constraints: { - MaxLength: 56, - MinLength: 1, - }, - serializedName: "azureFirewallName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters5: OperationParameter = { - parameterPath: "parameters", - mapper: FirewallPacketCaptureParametersMapper, -}; - -export const azureFirewallName2: OperationURLParameter = { - parameterPath: "azureFirewallName", - mapper: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9]"), - MaxLength: 56, - MinLength: 1, - }, - serializedName: "azureFirewallName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const azureFirewallName3: OperationURLParameter = { - parameterPath: "azureFirewallName", - mapper: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9][\\w\\-._]{0,54}[A-Za-z0-9_]$"), - }, - serializedName: "azureFirewallName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const name: OperationURLParameter = { - parameterPath: "name", - mapper: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, -}; - -export const bastionHostName: OperationURLParameter = { - parameterPath: "bastionHostName", - mapper: { - serializedName: "bastionHostName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters6: OperationParameter = { - parameterPath: "parameters", - mapper: BastionHostMapper, -}; - -export const bslRequest: OperationParameter = { - parameterPath: "bslRequest", - mapper: BastionShareableLinkListRequestMapper, -}; - -export const bslTokenRequest: OperationParameter = { - parameterPath: "bslTokenRequest", - mapper: BastionShareableLinkTokenListRequestMapper, -}; - -export const sessionIds: OperationParameter = { - parameterPath: "sessionIds", - mapper: SessionIdsMapper, -}; - -export const domainNameLabel: OperationQueryParameter = { - parameterPath: "domainNameLabel", - mapper: { - serializedName: "domainNameLabel", - required: true, - type: { - name: "String", - }, - }, -}; - -export const providerport: OperationURLParameter = { - parameterPath: "providerport", - mapper: { - serializedName: "providerport", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters7: OperationParameter = { - parameterPath: "parameters", - mapper: ActiveConfigurationParameterMapper, -}; - -export const networkManagerName: OperationURLParameter = { - parameterPath: "networkManagerName", - mapper: { - serializedName: "networkManagerName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const top: OperationQueryParameter = { - parameterPath: ["options", "top"], - mapper: { - constraints: { - InclusiveMaximum: 20, - InclusiveMinimum: 1, - }, - serializedName: "$top", - type: { - name: "Number", - }, - }, -}; - -export const parameters8: OperationParameter = { - parameterPath: "parameters", - mapper: QueryRequestOptionsMapper, -}; - -export const virtualNetworkName: OperationURLParameter = { - parameterPath: "virtualNetworkName", - mapper: { - serializedName: "virtualNetworkName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const virtualWANName: OperationURLParameter = { - parameterPath: "virtualWANName", - mapper: { - serializedName: "virtualWANName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const vpnClientParams: OperationParameter = { - parameterPath: "vpnClientParams", - mapper: VirtualWanVpnProfileParametersMapper, -}; - -export const cloudServiceName: OperationURLParameter = { - parameterPath: "cloudServiceName", - mapper: { - serializedName: "cloudServiceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const roleInstanceName: OperationURLParameter = { - parameterPath: "roleInstanceName", - mapper: { - serializedName: "roleInstanceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const networkInterfaceName: OperationURLParameter = { - parameterPath: "networkInterfaceName", - mapper: { - serializedName: "networkInterfaceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters9: OperationParameter = { - parameterPath: "parameters", - mapper: NetworkInterfaceMapper, -}; - -export const virtualMachineScaleSetName: OperationURLParameter = { - parameterPath: "virtualMachineScaleSetName", - mapper: { - serializedName: "virtualMachineScaleSetName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const virtualmachineIndex: OperationURLParameter = { - parameterPath: "virtualmachineIndex", - mapper: { - serializedName: "virtualmachineIndex", - required: true, - type: { - name: "String", - }, - }, -}; - -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: { - serializedName: "ipConfigurationName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const publicIpAddressName: OperationURLParameter = { - parameterPath: "publicIpAddressName", - mapper: { - serializedName: "publicIpAddressName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters10: OperationParameter = { - parameterPath: "parameters", - mapper: PublicIPAddressMapper, -}; - -export const parameters11: OperationParameter = { - parameterPath: "parameters", - mapper: ReserveCloudServicePublicIpAddressRequestMapper, -}; - -export const publicIpAddressName1: OperationURLParameter = { - parameterPath: "publicIpAddressName", - mapper: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9][A-Za-z0-9_\\.-]*[A-Za-z0-9_]$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "publicIpAddressName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters12: OperationParameter = { - parameterPath: "parameters", - mapper: DisassociateCloudServicePublicIpRequestMapper, -}; - -export const groupName: OperationURLParameter = { - parameterPath: "groupName", - mapper: { - serializedName: "groupName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const resourceName: OperationURLParameter = { - parameterPath: "resourceName", - mapper: { - serializedName: "resourceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const singletonResource: OperationURLParameter = { - parameterPath: "singletonResource", - mapper: { - defaultValue: "swap", - isConstant: true, - serializedName: "singletonResource", - type: { - name: "String", - }, - }, -}; - -export const parameters13: OperationParameter = { - parameterPath: "parameters", - mapper: SwapResourceMapper, -}; - -export const customIpPrefixName: OperationURLParameter = { - parameterPath: "customIpPrefixName", - mapper: { - serializedName: "customIpPrefixName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters14: OperationParameter = { - parameterPath: "parameters", - mapper: CustomIpPrefixMapper, -}; - -export const ddosCustomPolicyName: OperationURLParameter = { - parameterPath: "ddosCustomPolicyName", - mapper: { - serializedName: "ddosCustomPolicyName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters15: OperationParameter = { - parameterPath: "parameters", - mapper: DdosCustomPolicyMapper, -}; - -export const ddosProtectionPlanName: OperationURLParameter = { - parameterPath: "ddosProtectionPlanName", - mapper: { - serializedName: "ddosProtectionPlanName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters16: OperationParameter = { - parameterPath: "parameters", - mapper: DdosProtectionPlanMapper, -}; - -export const parameters17: OperationParameter = { - parameterPath: "parameters", - mapper: DscpConfigurationMapper, -}; - -export const dscpConfigurationName: OperationURLParameter = { - parameterPath: "dscpConfigurationName", - mapper: { - serializedName: "dscpConfigurationName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const circuitName: OperationURLParameter = { - parameterPath: "circuitName", - mapper: { - serializedName: "circuitName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const authorizationName: OperationURLParameter = { - parameterPath: "authorizationName", - mapper: { - serializedName: "authorizationName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const authorizationParameters: OperationParameter = { - parameterPath: "authorizationParameters", - mapper: ExpressRouteCircuitAuthorizationMapper, -}; - -export const peeringName: OperationURLParameter = { - parameterPath: "peeringName", - mapper: { - serializedName: "peeringName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const peeringParameters: OperationParameter = { - parameterPath: "peeringParameters", - mapper: ExpressRouteCircuitPeeringMapper, -}; - -export const expressRouteCircuitConnectionParameters: OperationParameter = { - parameterPath: "expressRouteCircuitConnectionParameters", - mapper: ExpressRouteCircuitConnectionMapper, -}; - -export const parameters18: OperationParameter = { - parameterPath: "parameters", - mapper: ExpressRouteCircuitMapper, -}; - -export const devicePath: OperationURLParameter = { - parameterPath: "devicePath", - mapper: { - serializedName: "devicePath", - required: true, - type: { - name: "String", - }, - }, -}; - -export const filter: OperationQueryParameter = { - parameterPath: ["options", "filter"], - mapper: { - serializedName: "$filter", - type: { - name: "String", - }, - }, -}; - -export const crossConnectionName: OperationURLParameter = { - parameterPath: "crossConnectionName", - mapper: { - serializedName: "crossConnectionName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters19: OperationParameter = { - parameterPath: "parameters", - mapper: ExpressRouteCrossConnectionMapper, -}; - -export const crossConnectionParameters: OperationParameter = { - parameterPath: "crossConnectionParameters", - mapper: TagsObjectMapper, -}; - -export const peeringParameters1: OperationParameter = { - parameterPath: "peeringParameters", - mapper: ExpressRouteCrossConnectionPeeringMapper, -}; - -export const locationName: OperationURLParameter = { - parameterPath: "locationName", - mapper: { - serializedName: "locationName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const expressRoutePortName: OperationURLParameter = { - parameterPath: "expressRoutePortName", - mapper: { - serializedName: "expressRoutePortName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters20: OperationParameter = { - parameterPath: "parameters", - mapper: ExpressRoutePortMapper, -}; - -export const request: OperationParameter = { - parameterPath: "request", - mapper: GenerateExpressRoutePortsLOARequestMapper, -}; - -export const linkName: OperationURLParameter = { - parameterPath: "linkName", - mapper: { - serializedName: "linkName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const authorizationParameters1: OperationParameter = { - parameterPath: "authorizationParameters", - mapper: ExpressRoutePortAuthorizationMapper, -}; - -export const firewallPolicyName: OperationURLParameter = { - parameterPath: "firewallPolicyName", - mapper: { - serializedName: "firewallPolicyName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters21: OperationParameter = { - parameterPath: "parameters", - mapper: FirewallPolicyMapper, -}; - -export const ruleCollectionGroupName: OperationURLParameter = { - parameterPath: "ruleCollectionGroupName", - mapper: { - serializedName: "ruleCollectionGroupName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters22: OperationParameter = { - parameterPath: "parameters", - mapper: FirewallPolicyRuleCollectionGroupMapper, -}; - -export const parameters23: OperationParameter = { - parameterPath: "parameters", - mapper: IdpsQueryObjectMapper, -}; - -export const parameters24: OperationParameter = { - parameterPath: "parameters", - mapper: SignaturesOverridesMapper, -}; - -export const parameters25: OperationParameter = { - parameterPath: "parameters", - mapper: SignatureOverridesFilterValuesQueryMapper, -}; - -export const parameters26: OperationParameter = { - parameterPath: "parameters", - mapper: FirewallPolicyDraftMapper, -}; - -export const firewallPolicyName1: OperationURLParameter = { - parameterPath: "firewallPolicyName", - mapper: { - constraints: { - Pattern: new RegExp("^[^_\\W][\\w-._]{0,79}(? -export class NetworkManagementClient extends coreClient.ServiceClient { - $host: string; - subscriptionId?: string; +export type { NetworkManagementClientOptionalParams } from "./api/networkManagementContext.js"; - /** - * Initializes a new instance of the NetworkManagementClient class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The subscription credentials which uniquely identify the Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. - * @param options The parameter options - */ +export class NetworkManagementClient { + private _client: NetworkManagementContext; + /** The pipeline used by this client to make requests */ + public readonly pipeline: Pipeline; + + constructor(credential: TokenCredential, options?: NetworkManagementClientOptionalParams); constructor( - credentials: coreAuth.TokenCredential, + credential: TokenCredential, subscriptionId: string, options?: NetworkManagementClientOptionalParams, ); constructor( - credentials: coreAuth.TokenCredential, - options?: NetworkManagementClientOptionalParams, - ); - constructor( - credentials: coreAuth.TokenCredential, - subscriptionIdOrOptions?: NetworkManagementClientOptionalParams | string, + credential: TokenCredential, + subscriptionIdOrOptions?: string | NetworkManagementClientOptionalParams, options?: NetworkManagementClientOptionalParams, ) { - if (credentials === undefined) { - throw new Error("'credentials' cannot be null"); - } - let subscriptionId: string | undefined; if (typeof subscriptionIdOrOptions === "string") { @@ -420,1859 +674,892 @@ export class NetworkManagementClient extends coreClient.ServiceClient { options = subscriptionIdOrOptions; } - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults: NetworkManagementClientOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials, - }; - - const packageDetails = `azsdk-js-arm-network/36.0.0`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - const optionsWithDefaults = { - ...defaults, + options = options ?? {}; + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-client` + : `azsdk-js-client`; + this._client = createNetworkManagement(credential, subscriptionId ?? "", { ...options, - userAgentOptions: { - userAgentPrefix, - }, - endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com", - }; - super(optionsWithDefaults); - - let bearerTokenAuthenticationPolicyFound: boolean = false; - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = - options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName, - ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName, - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: - optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge, - }, - }), - ); - } - // Parameter assignments - this.subscriptionId = subscriptionId; - - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.applicationGateways = new ApplicationGatewaysImpl(this); - this.applicationGatewayPrivateLinkResources = new ApplicationGatewayPrivateLinkResourcesImpl( - this, + userAgentOptions: { userAgentPrefix }, + }); + this.pipeline = this._client.pipeline; + this.usages = _getUsagesOperations(this._client); + this.serviceTagInformation = _getServiceTagInformationOperations(this._client); + this.serviceTags = _getServiceTagsOperations(this._client); + this.bgpServiceCommunities = _getBgpServiceCommunitiesOperations(this._client); + this.availablePrivateEndpointTypes = _getAvailablePrivateEndpointTypesOperations(this._client); + this.networkSecurityPerimeterServiceTags = _getNetworkSecurityPerimeterServiceTagsOperations( + this._client, ); - this.applicationGatewayPrivateEndpointConnections = - new ApplicationGatewayPrivateEndpointConnectionsImpl(this); - this.applicationGatewayWafDynamicManifestsDefault = - new ApplicationGatewayWafDynamicManifestsDefaultImpl(this); - this.applicationGatewayWafDynamicManifests = new ApplicationGatewayWafDynamicManifestsImpl( - this, + this.networkSecurityPerimeterOperationStatuses = + _getNetworkSecurityPerimeterOperationStatusesOperations(this._client); + this.networkSecurityPerimeterAssociableResourceTypes = + _getNetworkSecurityPerimeterAssociableResourceTypesOperations(this._client); + this.expressRouteServiceProviders = _getExpressRouteServiceProvidersOperations(this._client); + this.availableEndpointServices = _getAvailableEndpointServicesOperations(this._client); + this.azureFirewallFqdnTags = _getAzureFirewallFqdnTagsOperations(this._client); + this.availableServiceAliases = _getAvailableServiceAliasesOperations(this._client); + this.availableResourceGroupDelegations = _getAvailableResourceGroupDelegationsOperations( + this._client, + ); + this.availableDelegations = _getAvailableDelegationsOperations(this._client); + this.routingIntent = _getRoutingIntentOperations(this._client); + this.virtualHubIpConfiguration = _getVirtualHubIpConfigurationOperations(this._client); + this.virtualHubBgpConnections = _getVirtualHubBgpConnectionsOperations(this._client); + this.virtualHubBgpConnection = _getVirtualHubBgpConnectionOperations(this._client); + this.expressRouteConnections = _getExpressRouteConnectionsOperations(this._client); + this.p2SVpnGateways = _getP2SVpnGatewaysOperations(this._client); + this.natRules = _getNatRulesOperations(this._client); + this.vpnLinkConnections = _getVpnLinkConnectionsOperations(this._client); + this.vpnConnections = _getVpnConnectionsOperations(this._client); + this.virtualHubRouteTableV2S = _getVirtualHubRouteTableV2SOperations(this._client); + this.hubVirtualNetworkConnections = _getHubVirtualNetworkConnectionsOperations(this._client); + this.configurationPolicyGroups = _getConfigurationPolicyGroupsOperations(this._client); + this.vpnServerConfigurationsAssociatedWithVirtualWan = + _getVpnServerConfigurationsAssociatedWithVirtualWanOperations(this._client); + this.vpnSitesConfiguration = _getVpnSitesConfigurationOperations(this._client); + this.serviceAssociationLinks = _getServiceAssociationLinksOperations(this._client); + this.resourceNavigationLinks = _getResourceNavigationLinksOperations(this._client); + this.routeFilterRules = _getRouteFilterRulesOperations(this._client); + this.privateDnsZoneGroups = _getPrivateDnsZoneGroupsOperations(this._client); + this.connectionMonitors = _getConnectionMonitorsOperations(this._client); + this.packetCaptures = _getPacketCapturesOperations(this._client); + this.inboundSecurityRule = _getInboundSecurityRuleOperations(this._client); + this.virtualApplianceSkus = _getVirtualApplianceSkusOperations(this._client); + this.networkSecurityPerimeterLoggingConfigurations = + _getNetworkSecurityPerimeterLoggingConfigurationsOperations(this._client); + this.networkSecurityPerimeterLinkReferences = + _getNetworkSecurityPerimeterLinkReferencesOperations(this._client); + this.networkSecurityPerimeterLinks = _getNetworkSecurityPerimeterLinksOperations(this._client); + this.networkSecurityPerimeterAssociations = _getNetworkSecurityPerimeterAssociationsOperations( + this._client, + ); + this.networkSecurityPerimeterAccessRules = _getNetworkSecurityPerimeterAccessRulesOperations( + this._client, ); - this.applicationSecurityGroups = new ApplicationSecurityGroupsImpl(this); - this.availableDelegations = new AvailableDelegationsImpl(this); - this.availableResourceGroupDelegations = new AvailableResourceGroupDelegationsImpl(this); - this.availableServiceAliases = new AvailableServiceAliasesImpl(this); - this.azureFirewalls = new AzureFirewallsImpl(this); - this.azureFirewallFqdnTags = new AzureFirewallFqdnTagsImpl(this); - this.webCategories = new WebCategoriesImpl(this); - this.bastionHosts = new BastionHostsImpl(this); - this.networkInterfaces = new NetworkInterfacesImpl(this); - this.publicIPAddresses = new PublicIPAddressesImpl(this); - this.vipSwap = new VipSwapImpl(this); - this.customIPPrefixes = new CustomIPPrefixesImpl(this); - this.ddosCustomPolicies = new DdosCustomPoliciesImpl(this); - this.ddosProtectionPlans = new DdosProtectionPlansImpl(this); - this.dscpConfigurationOperations = new DscpConfigurationOperationsImpl(this); - this.availableEndpointServices = new AvailableEndpointServicesImpl(this); - this.expressRouteCircuitAuthorizations = new ExpressRouteCircuitAuthorizationsImpl(this); - this.expressRouteCircuitPeerings = new ExpressRouteCircuitPeeringsImpl(this); - this.expressRouteCircuitConnections = new ExpressRouteCircuitConnectionsImpl(this); - this.peerExpressRouteCircuitConnections = new PeerExpressRouteCircuitConnectionsImpl(this); - this.expressRouteCircuits = new ExpressRouteCircuitsImpl(this); - this.expressRouteServiceProviders = new ExpressRouteServiceProvidersImpl(this); - this.expressRouteCrossConnections = new ExpressRouteCrossConnectionsImpl(this); - this.expressRouteCrossConnectionPeerings = new ExpressRouteCrossConnectionPeeringsImpl(this); - this.expressRoutePortsLocations = new ExpressRoutePortsLocationsImpl(this); - this.expressRoutePorts = new ExpressRoutePortsImpl(this); - this.expressRouteLinks = new ExpressRouteLinksImpl(this); - this.expressRoutePortAuthorizations = new ExpressRoutePortAuthorizationsImpl(this); - this.expressRouteProviderPortsLocation = new ExpressRouteProviderPortsLocationImpl(this); - this.firewallPolicies = new FirewallPoliciesImpl(this); - this.firewallPolicyRuleCollectionGroups = new FirewallPolicyRuleCollectionGroupsImpl(this); - this.firewallPolicyIdpsSignatures = new FirewallPolicyIdpsSignaturesImpl(this); - this.firewallPolicyIdpsSignaturesOverrides = new FirewallPolicyIdpsSignaturesOverridesImpl( - this, + this.networkSecurityPerimeterProfiles = _getNetworkSecurityPerimeterProfilesOperations( + this._client, ); + this.adminRules = _getAdminRulesOperations(this._client); + this.subscriptionNetworkManagerConnections = + _getSubscriptionNetworkManagerConnectionsOperations(this._client); + this.loadBalancerProbes = _getLoadBalancerProbesOperations(this._client); + this.loadBalancerOutboundRules = _getLoadBalancerOutboundRulesOperations(this._client); + this.loadBalancerLoadBalancingRules = _getLoadBalancerLoadBalancingRulesOperations( + this._client, + ); + this.loadBalancerFrontendIPConfigurations = _getLoadBalancerFrontendIPConfigurationsOperations( + this._client, + ); + this.loadBalancerBackendAddressPools = _getLoadBalancerBackendAddressPoolsOperations( + this._client, + ); + this.loadBalancerNetworkInterfaces = _getLoadBalancerNetworkInterfacesOperations(this._client); + this.networkManagerDeploymentStatus = _getNetworkManagerDeploymentStatusOperations( + this._client, + ); + this.networkManagerCommits = _getNetworkManagerCommitsOperations(this._client); + this.firewallPolicyDeployments = _getFirewallPolicyDeploymentsOperations(this._client); this.firewallPolicyIdpsSignaturesFilterValues = - new FirewallPolicyIdpsSignaturesFilterValuesImpl(this); - this.firewallPolicyDrafts = new FirewallPolicyDraftsImpl(this); - this.firewallPolicyDeployments = new FirewallPolicyDeploymentsImpl(this); - this.firewallPolicyRuleCollectionGroupDrafts = new FirewallPolicyRuleCollectionGroupDraftsImpl( - this, + _getFirewallPolicyIdpsSignaturesFilterValuesOperations(this._client); + this.firewallPolicyIdpsSignatures = _getFirewallPolicyIdpsSignaturesOperations(this._client); + this.expressRouteLinks = _getExpressRouteLinksOperations(this._client); + this.expressRouteCrossConnectionPeerings = _getExpressRouteCrossConnectionPeeringsOperations( + this._client, + ); + this.dscpConfiguration = _getDscpConfigurationOperations(this._client); + this.customIPPrefixes = _getCustomIPPrefixesOperations(this._client); + this.vipSwap = _getVipSwapOperations(this._client); + this.networkInterfaceLoadBalancers = _getNetworkInterfaceLoadBalancersOperations(this._client); + this.expressRouteProviderPortsLocation = _getExpressRouteProviderPortsLocationOperations( + this._client, + ); + this.webCategories = _getWebCategoriesOperations(this._client); + this.applicationGatewayWafDynamicManifests = + _getApplicationGatewayWafDynamicManifestsOperations(this._client); + this.applicationGatewayWafDynamicManifestsDefault = + _getApplicationGatewayWafDynamicManifestsDefaultOperations(this._client); + this.applicationGatewayPrivateLinkResources = + _getApplicationGatewayPrivateLinkResourcesOperations(this._client); + this.subgroups = _getSubgroupsOperations(this._client); + this.interconnectGroups = _getInterconnectGroupsOperations(this._client); + this.serviceGateways = _getServiceGatewaysOperations(this._client); + this.virtualNetworkAppliances = _getVirtualNetworkAppliancesOperations(this._client); + this.webApplicationFirewallPolicies = _getWebApplicationFirewallPoliciesOperations( + this._client, + ); + this.connectionPolicies = _getConnectionPoliciesOperations(this._client); + this.hubRouteTables = _getHubRouteTablesOperations(this._client); + this.expressRouteGateways = _getExpressRouteGatewaysOperations(this._client); + this.vpnSiteLinkConnections = _getVpnSiteLinkConnectionsOperations(this._client); + this.vpnGateways = _getVpnGatewaysOperations(this._client); + this.routeMaps = _getRouteMapsOperations(this._client); + this.virtualHubs = _getVirtualHubsOperations(this._client); + this.vpnServerConfigurations = _getVpnServerConfigurationsOperations(this._client); + this.vpnSiteLinks = _getVpnSiteLinksOperations(this._client); + this.vpnSites = _getVpnSitesOperations(this._client); + this.virtualWans = _getVirtualWansOperations(this._client); + this.virtualRouterPeerings = _getVirtualRouterPeeringsOperations(this._client); + this.virtualRouters = _getVirtualRoutersOperations(this._client); + this.virtualNetworkTaps = _getVirtualNetworkTapsOperations(this._client); + this.virtualNetworkGatewayNatRules = _getVirtualNetworkGatewayNatRulesOperations(this._client); + this.localNetworkGateways = _getLocalNetworkGatewaysOperations(this._client); + this.virtualNetworkGatewayConnections = _getVirtualNetworkGatewayConnectionsOperations( + this._client, ); - this.ipamPools = new IpamPoolsImpl(this); - this.staticCidrs = new StaticCidrsImpl(this); - this.ipAllocations = new IpAllocationsImpl(this); - this.ipGroups = new IpGroupsImpl(this); - this.loadBalancers = new LoadBalancersImpl(this); - this.loadBalancerBackendAddressPools = new LoadBalancerBackendAddressPoolsImpl(this); - this.loadBalancerFrontendIPConfigurations = new LoadBalancerFrontendIPConfigurationsImpl(this); - this.inboundNatRules = new InboundNatRulesImpl(this); - this.loadBalancerLoadBalancingRules = new LoadBalancerLoadBalancingRulesImpl(this); - this.loadBalancerOutboundRules = new LoadBalancerOutboundRulesImpl(this); - this.loadBalancerNetworkInterfaces = new LoadBalancerNetworkInterfacesImpl(this); - this.loadBalancerProbes = new LoadBalancerProbesImpl(this); - this.natGateways = new NatGatewaysImpl(this); - this.networkInterfaceIPConfigurations = new NetworkInterfaceIPConfigurationsImpl(this); - this.networkInterfaceLoadBalancers = new NetworkInterfaceLoadBalancersImpl(this); - this.networkInterfaceTapConfigurations = new NetworkInterfaceTapConfigurationsImpl(this); - this.networkManagers = new NetworkManagersImpl(this); - this.networkManagerCommits = new NetworkManagerCommitsImpl(this); - this.networkManagerDeploymentStatusOperations = - new NetworkManagerDeploymentStatusOperationsImpl(this); - this.subscriptionNetworkManagerConnections = new SubscriptionNetworkManagerConnectionsImpl( - this, + this.virtualNetworkGateways = _getVirtualNetworkGatewaysOperations(this._client); + this.virtualNetworkPeerings = _getVirtualNetworkPeeringsOperations(this._client); + this.subnets = _getSubnetsOperations(this._client); + this.virtualNetworks = _getVirtualNetworksOperations(this._client); + this.serviceEndpointPolicyDefinitions = _getServiceEndpointPolicyDefinitionsOperations( + this._client, ); + this.serviceEndpointPolicies = _getServiceEndpointPoliciesOperations(this._client); + this.securityPartnerProviders = _getSecurityPartnerProvidersOperations(this._client); + this.routes = _getRoutesOperations(this._client); + this.routeTables = _getRouteTablesOperations(this._client); + this.routeFilters = _getRouteFiltersOperations(this._client); + this.publicIPPrefixes = _getPublicIPPrefixesOperations(this._client); + this.privateLinkServices = _getPrivateLinkServicesOperations(this._client); + this.privateEndpoints = _getPrivateEndpointsOperations(this._client); + this.flowLogs = _getFlowLogsOperations(this._client); + this.networkWatchers = _getNetworkWatchersOperations(this._client); + this.virtualApplianceSites = _getVirtualApplianceSitesOperations(this._client); + this.networkVirtualAppliances = _getNetworkVirtualAppliancesOperations(this._client); + this.networkVirtualApplianceConnections = _getNetworkVirtualApplianceConnectionsOperations( + this._client, + ); + this.reachabilityAnalysisRuns = _getReachabilityAnalysisRunsOperations(this._client); + this.verifierWorkspaces = _getVerifierWorkspacesOperations(this._client); + this.reachabilityAnalysisIntents = _getReachabilityAnalysisIntentsOperations(this._client); + this.networkSecurityPerimeters = _getNetworkSecurityPerimetersOperations(this._client); + this.defaultSecurityRules = _getDefaultSecurityRulesOperations(this._client); + this.securityRules = _getSecurityRulesOperations(this._client); + this.networkSecurityGroups = _getNetworkSecurityGroupsOperations(this._client); + this.networkProfiles = _getNetworkProfilesOperations(this._client); + this.securityUserRules = _getSecurityUserRulesOperations(this._client); + this.securityUserRuleCollections = _getSecurityUserRuleCollectionsOperations(this._client); + this.securityUserConfigurations = _getSecurityUserConfigurationsOperations(this._client); + this.adminRuleCollections = _getAdminRuleCollectionsOperations(this._client); + this.securityAdminConfigurations = _getSecurityAdminConfigurationsOperations(this._client); + this.commits = _getCommitsOperations(this._client); + this.scopeConnections = _getScopeConnectionsOperations(this._client); + this.routingRules = _getRoutingRulesOperations(this._client); + this.routingRuleCollections = _getRoutingRuleCollectionsOperations(this._client); + this.networkManagerRoutingConfigurations = _getNetworkManagerRoutingConfigurationsOperations( + this._client, + ); + this.staticMembers = _getStaticMembersOperations(this._client); + this.networkGroups = _getNetworkGroupsOperations(this._client); + this.connectivityConfigurations = _getConnectivityConfigurationsOperations(this._client); this.managementGroupNetworkManagerConnections = - new ManagementGroupNetworkManagerConnectionsImpl(this); - this.connectivityConfigurations = new ConnectivityConfigurationsImpl(this); - this.networkGroups = new NetworkGroupsImpl(this); - this.staticMembers = new StaticMembersImpl(this); - this.networkManagerRoutingConfigurations = new NetworkManagerRoutingConfigurationsImpl(this); - this.routingRuleCollections = new RoutingRuleCollectionsImpl(this); - this.routingRules = new RoutingRulesImpl(this); - this.scopeConnections = new ScopeConnectionsImpl(this); - this.securityAdminConfigurations = new SecurityAdminConfigurationsImpl(this); - this.adminRuleCollections = new AdminRuleCollectionsImpl(this); - this.adminRules = new AdminRulesImpl(this); - this.securityUserConfigurations = new SecurityUserConfigurationsImpl(this); - this.securityUserRuleCollections = new SecurityUserRuleCollectionsImpl(this); - this.securityUserRules = new SecurityUserRulesImpl(this); - this.networkProfiles = new NetworkProfilesImpl(this); - this.networkSecurityGroups = new NetworkSecurityGroupsImpl(this); - this.securityRules = new SecurityRulesImpl(this); - this.defaultSecurityRules = new DefaultSecurityRulesImpl(this); - this.networkSecurityPerimeters = new NetworkSecurityPerimetersImpl(this); - this.networkSecurityPerimeterProfiles = new NetworkSecurityPerimeterProfilesImpl(this); - this.networkSecurityPerimeterAccessRules = new NetworkSecurityPerimeterAccessRulesImpl(this); - this.networkSecurityPerimeterAssociations = new NetworkSecurityPerimeterAssociationsImpl(this); - this.networkSecurityPerimeterAssociableResourceTypes = - new NetworkSecurityPerimeterAssociableResourceTypesImpl(this); - this.networkSecurityPerimeterLinks = new NetworkSecurityPerimeterLinksImpl(this); - this.networkSecurityPerimeterLinkReferences = new NetworkSecurityPerimeterLinkReferencesImpl( - this, + _getManagementGroupNetworkManagerConnectionsOperations(this._client); + this.networkInterfaceTapConfigurations = _getNetworkInterfaceTapConfigurationsOperations( + this._client, ); - this.networkSecurityPerimeterLoggingConfigurations = - new NetworkSecurityPerimeterLoggingConfigurationsImpl(this); - this.networkSecurityPerimeterOperationStatuses = - new NetworkSecurityPerimeterOperationStatusesImpl(this); - this.networkSecurityPerimeterServiceTags = new NetworkSecurityPerimeterServiceTagsImpl(this); - this.reachabilityAnalysisIntents = new ReachabilityAnalysisIntentsImpl(this); - this.reachabilityAnalysisRuns = new ReachabilityAnalysisRunsImpl(this); - this.verifierWorkspaces = new VerifierWorkspacesImpl(this); - this.networkVirtualAppliances = new NetworkVirtualAppliancesImpl(this); - this.virtualApplianceSites = new VirtualApplianceSitesImpl(this); - this.virtualApplianceSkus = new VirtualApplianceSkusImpl(this); - this.inboundSecurityRuleOperations = new InboundSecurityRuleOperationsImpl(this); - this.networkWatchers = new NetworkWatchersImpl(this); - this.packetCaptures = new PacketCapturesImpl(this); - this.connectionMonitors = new ConnectionMonitorsImpl(this); - this.flowLogs = new FlowLogsImpl(this); - this.operations = new OperationsImpl(this); - this.privateEndpoints = new PrivateEndpointsImpl(this); - this.availablePrivateEndpointTypes = new AvailablePrivateEndpointTypesImpl(this); - this.privateDnsZoneGroups = new PrivateDnsZoneGroupsImpl(this); - this.privateLinkServices = new PrivateLinkServicesImpl(this); - this.publicIPPrefixes = new PublicIPPrefixesImpl(this); - this.routeFilters = new RouteFiltersImpl(this); - this.routeFilterRules = new RouteFilterRulesImpl(this); - this.routeTables = new RouteTablesImpl(this); - this.routes = new RoutesImpl(this); - this.securityPartnerProviders = new SecurityPartnerProvidersImpl(this); - this.bgpServiceCommunities = new BgpServiceCommunitiesImpl(this); - this.serviceEndpointPolicies = new ServiceEndpointPoliciesImpl(this); - this.serviceEndpointPolicyDefinitions = new ServiceEndpointPolicyDefinitionsImpl(this); - this.serviceGateways = new ServiceGatewaysImpl(this); - this.serviceTags = new ServiceTagsImpl(this); - this.serviceTagInformationOperations = new ServiceTagInformationOperationsImpl(this); - this.usages = new UsagesImpl(this); - this.virtualNetworks = new VirtualNetworksImpl(this); - this.subnets = new SubnetsImpl(this); - this.resourceNavigationLinks = new ResourceNavigationLinksImpl(this); - this.serviceAssociationLinks = new ServiceAssociationLinksImpl(this); - this.virtualNetworkPeerings = new VirtualNetworkPeeringsImpl(this); - this.virtualNetworkAppliances = new VirtualNetworkAppliancesImpl(this); - this.virtualNetworkGateways = new VirtualNetworkGatewaysImpl(this); - this.virtualNetworkGatewayConnections = new VirtualNetworkGatewayConnectionsImpl(this); - this.localNetworkGateways = new LocalNetworkGatewaysImpl(this); - this.virtualNetworkGatewayNatRules = new VirtualNetworkGatewayNatRulesImpl(this); - this.virtualNetworkTaps = new VirtualNetworkTapsImpl(this); - this.virtualRouters = new VirtualRoutersImpl(this); - this.virtualRouterPeerings = new VirtualRouterPeeringsImpl(this); - this.virtualWans = new VirtualWansImpl(this); - this.vpnSites = new VpnSitesImpl(this); - 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.routeMaps = new RouteMapsImpl(this); - this.hubVirtualNetworkConnections = new HubVirtualNetworkConnectionsImpl(this); - this.vpnGateways = new VpnGatewaysImpl(this); - this.vpnLinkConnections = new VpnLinkConnectionsImpl(this); - this.vpnConnections = new VpnConnectionsImpl(this); - this.vpnSiteLinkConnections = new VpnSiteLinkConnectionsImpl(this); - this.natRules = new NatRulesImpl(this); - this.p2SVpnGateways = new P2SVpnGatewaysImpl(this); - this.vpnServerConfigurationsAssociatedWithVirtualWan = - new VpnServerConfigurationsAssociatedWithVirtualWanImpl(this); - this.virtualHubRouteTableV2S = new VirtualHubRouteTableV2SImpl(this); - this.expressRouteGateways = new ExpressRouteGatewaysImpl(this); - this.expressRouteConnections = new ExpressRouteConnectionsImpl(this); - this.networkVirtualApplianceConnections = new NetworkVirtualApplianceConnectionsImpl(this); - this.virtualHubBgpConnection = new VirtualHubBgpConnectionImpl(this); - this.virtualHubBgpConnections = new VirtualHubBgpConnectionsImpl(this); - this.virtualHubIpConfiguration = new VirtualHubIpConfigurationImpl(this); - this.hubRouteTables = new HubRouteTablesImpl(this); - this.routingIntentOperations = new RoutingIntentOperationsImpl(this); - this.webApplicationFirewallPolicies = new WebApplicationFirewallPoliciesImpl(this); + this.networkInterfaceIPConfigurations = _getNetworkInterfaceIPConfigurationsOperations( + this._client, + ); + this.natGateways = _getNatGatewaysOperations(this._client); + this.inboundNatRules = _getInboundNatRulesOperations(this._client); + this.loadBalancers = _getLoadBalancersOperations(this._client); + this.ipGroups = _getIpGroupsOperations(this._client); + this.ipAllocations = _getIpAllocationsOperations(this._client); + this.staticCidrs = _getStaticCidrsOperations(this._client); + this.networkManagers = _getNetworkManagersOperations(this._client); + this.ipamPools = _getIpamPoolsOperations(this._client); + this.firewallPolicyRuleCollectionGroupDrafts = + _getFirewallPolicyRuleCollectionGroupDraftsOperations(this._client); + this.firewallPolicyDrafts = _getFirewallPolicyDraftsOperations(this._client); + this.firewallPolicyIdpsSignaturesOverrides = + _getFirewallPolicyIdpsSignaturesOverridesOperations(this._client); + this.firewallPolicyRuleCollectionGroups = _getFirewallPolicyRuleCollectionGroupsOperations( + this._client, + ); + this.firewallPolicies = _getFirewallPoliciesOperations(this._client); + this.expressRoutePortAuthorizations = _getExpressRoutePortAuthorizationsOperations( + this._client, + ); + this.expressRoutePorts = _getExpressRoutePortsOperations(this._client); + this.expressRoutePortsLocations = _getExpressRoutePortsLocationsOperations(this._client); + this.expressRouteCrossConnections = _getExpressRouteCrossConnectionsOperations(this._client); + this.peerExpressRouteCircuitConnections = _getPeerExpressRouteCircuitConnectionsOperations( + this._client, + ); + this.expressRouteCircuitConnections = _getExpressRouteCircuitConnectionsOperations( + this._client, + ); + this.expressRouteCircuitPeerings = _getExpressRouteCircuitPeeringsOperations(this._client); + this.expressRouteCircuits = _getExpressRouteCircuitsOperations(this._client); + this.expressRouteCircuitAuthorizations = _getExpressRouteCircuitAuthorizationsOperations( + this._client, + ); + this.ddosProtectionPlans = _getDdosProtectionPlansOperations(this._client); + this.ddosCustomPolicies = _getDdosCustomPoliciesOperations(this._client); + this.publicIPAddresses = _getPublicIPAddressesOperations(this._client); + this.networkInterfaces = _getNetworkInterfacesOperations(this._client); + this.bastionHosts = _getBastionHostsOperations(this._client); + this.azureFirewalls = _getAzureFirewallsOperations(this._client); + this.applicationSecurityGroups = _getApplicationSecurityGroupsOperations(this._client); + this.applicationGatewayPrivateEndpointConnections = + _getApplicationGatewayPrivateEndpointConnectionsOperations(this._client); + this.applicationGateways = _getApplicationGatewaysOperations(this._client); + this.operations = _getOperationsOperations(this._client); + } + + /** Checks whether a domain name in the cloudapp.azure.com zone is available for use. */ + checkDnsNameAvailability( + location: string, + domainNameLabel: string, + options: CheckDnsNameAvailabilityOptionalParams = { requestOptions: {} }, + ): Promise { + return checkDnsNameAvailability(this._client, location, domainNameLabel, options); } - /** - * Creates a Bastion Shareable Links for all the VMs specified in the request. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param bslRequest Post request for Create/Delete/Get Bastion Shareable Link endpoints. - * @param options The options parameters. - */ - public beginListPutBastionShareableLinkAndWait( + /** Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. */ + generatevirtualwanvpnserverconfigurationvpnprofile( resourceGroupName: string, - bastionHostName: string, - bslRequest: BastionShareableLinkListRequest, - options?: PutBastionShareableLinkOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.putBastionShareableLinkPagingAll( + virtualWANName: string, + vpnClientParams: VirtualWanVpnProfileParameters, + options: GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams = { + requestOptions: {}, + }, + ): PollerLike, VpnProfileResponse> { + return generatevirtualwanvpnserverconfigurationvpnprofile( + this._client, resourceGroupName, - bastionHostName, - bslRequest, + virtualWANName, + vpnClientParams, options, ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.putBastionShareableLinkPagingPage( - resourceGroupName, - bastionHostName, - bslRequest, - options, - settings, - ); - }, - }; } - private async *putBastionShareableLinkPagingPage( - resourceGroupName: string, - bastionHostName: string, - bslRequest: BastionShareableLinkListRequest, - options?: PutBastionShareableLinkOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PutBastionShareableLinkResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - const poller = await this._putBastionShareableLink( - resourceGroupName, - bastionHostName, - bslRequest, - options, - ); - result = await poller.pollUntilDone(); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._putBastionShareableLinkNext( - resourceGroupName, - bastionHostName, - bslRequest, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *putBastionShareableLinkPagingAll( + /** @deprecated use generatevirtualwanvpnserverconfigurationvpnprofile instead */ + async beginGeneratevirtualwanvpnserverconfigurationvpnprofile( resourceGroupName: string, - bastionHostName: string, - bslRequest: BastionShareableLinkListRequest, - options?: PutBastionShareableLinkOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.putBastionShareableLinkPagingPage( + virtualWANName: string, + vpnClientParams: VirtualWanVpnProfileParameters, + options: GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams = { + requestOptions: {}, + }, + ): Promise, VpnProfileResponse>> { + const poller = generatevirtualwanvpnserverconfigurationvpnprofile( + this._client, resourceGroupName, - bastionHostName, - bslRequest, + virtualWANName, + vpnClientParams, options, - )) { - yield* page; - } + ); + await poller.submitted(); + return getSimplePoller(poller); } - /** - * Return the Bastion Shareable Links for all the VMs specified in the request. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param bslRequest Post request for Create/Delete/Get Bastion Shareable Link endpoints. - * @param options The options parameters. - */ - public listBastionShareableLink( + /** @deprecated use generatevirtualwanvpnserverconfigurationvpnprofile instead */ + async beginGeneratevirtualwanvpnserverconfigurationvpnprofileAndWait( resourceGroupName: string, - bastionHostName: string, - bslRequest: BastionShareableLinkListRequest, - options?: GetBastionShareableLinkOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.getBastionShareableLinkPagingAll( + virtualWANName: string, + vpnClientParams: VirtualWanVpnProfileParameters, + options: GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams = { + requestOptions: {}, + }, + ): Promise { + return await generatevirtualwanvpnserverconfigurationvpnprofile( + this._client, resourceGroupName, - bastionHostName, - bslRequest, + virtualWANName, + vpnClientParams, options, ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.getBastionShareableLinkPagingPage( - resourceGroupName, - bastionHostName, - bslRequest, - options, - settings, - ); - }, - }; } - private async *getBastionShareableLinkPagingPage( + /** Gives the supported security providers for the virtual wan. */ + supportedSecurityProviders( resourceGroupName: string, - bastionHostName: string, - bslRequest: BastionShareableLinkListRequest, - options?: GetBastionShareableLinkOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GetBastionShareableLinkResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._getBastionShareableLink( - resourceGroupName, - bastionHostName, - bslRequest, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._getBastionShareableLinkNext( - resourceGroupName, - bastionHostName, - bslRequest, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } + virtualWANName: string, + options: SupportedSecurityProvidersOptionalParams = { requestOptions: {} }, + ): Promise { + return supportedSecurityProviders(this._client, resourceGroupName, virtualWANName, options); } - private async *getBastionShareableLinkPagingAll( + /** List all effective security admin rules applied on a virtual network. */ + listNetworkManagerEffectiveSecurityAdminRules( resourceGroupName: string, - bastionHostName: string, - bslRequest: BastionShareableLinkListRequest, - options?: GetBastionShareableLinkOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.getBastionShareableLinkPagingPage( + virtualNetworkName: string, + parameters: QueryRequestOptions, + options: ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams = { requestOptions: {} }, + ): Promise { + return listNetworkManagerEffectiveSecurityAdminRules( + this._client, resourceGroupName, - bastionHostName, - bslRequest, + virtualNetworkName, + parameters, options, - )) { - yield* page; - } - } - - /** - * Returns the list of currently active sessions on the Bastion. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param options The options parameters. - */ - public beginListActiveSessionsAndWait( - resourceGroupName: string, - bastionHostName: string, - options?: GetActiveSessionsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.getActiveSessionsPagingAll(resourceGroupName, bastionHostName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.getActiveSessionsPagingPage( - resourceGroupName, - bastionHostName, - options, - settings, - ); - }, - }; + ); } - private async *getActiveSessionsPagingPage( + /** List all effective connectivity configurations applied on a virtual network. */ + listNetworkManagerEffectiveConnectivityConfigurations( resourceGroupName: string, - bastionHostName: string, - options?: GetActiveSessionsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GetActiveSessionsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - const poller = await this._getActiveSessions(resourceGroupName, bastionHostName, options); - result = await poller.pollUntilDone(); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._getActiveSessionsNext( - resourceGroupName, - bastionHostName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } + virtualNetworkName: string, + parameters: QueryRequestOptions, + options: ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams = { + requestOptions: {}, + }, + ): Promise { + return listNetworkManagerEffectiveConnectivityConfigurations( + this._client, + resourceGroupName, + virtualNetworkName, + parameters, + options, + ); } - private async *getActiveSessionsPagingAll( + /** Lists active security admin rules in a network manager. */ + listActiveSecurityAdminRules( resourceGroupName: string, - bastionHostName: string, - options?: GetActiveSessionsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.getActiveSessionsPagingPage( + networkManagerName: string, + parameters: ActiveConfigurationParameter, + options: ListActiveSecurityAdminRulesOptionalParams = { requestOptions: {} }, + ): Promise { + return listActiveSecurityAdminRules( + this._client, resourceGroupName, - bastionHostName, + networkManagerName, + parameters, options, - )) { - yield* page; - } + ); } - /** - * Returns the list of currently active sessions on the Bastion. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param sessionIds The list of sessionids to disconnect. - * @param options The options parameters. - */ - public listDisconnectActiveSessions( + /** Lists active connectivity configurations in a network manager. */ + listActiveConnectivityConfigurations( resourceGroupName: string, - bastionHostName: string, - sessionIds: SessionIds, - options?: DisconnectActiveSessionsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.disconnectActiveSessionsPagingAll( + networkManagerName: string, + parameters: ActiveConfigurationParameter, + options: ListActiveConnectivityConfigurationsOptionalParams = { requestOptions: {} }, + ): Promise { + return listActiveConnectivityConfigurations( + this._client, resourceGroupName, - bastionHostName, - sessionIds, + networkManagerName, + parameters, options, ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.disconnectActiveSessionsPagingPage( - resourceGroupName, - bastionHostName, - sessionIds, - options, - settings, - ); - }, - }; } - private async *disconnectActiveSessionsPagingPage( - resourceGroupName: string, - bastionHostName: string, - sessionIds: SessionIds, - options?: DisconnectActiveSessionsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: DisconnectActiveSessionsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._disconnectActiveSessions( - resourceGroupName, - bastionHostName, - sessionIds, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._disconnectActiveSessionsNext( - resourceGroupName, - bastionHostName, - sessionIds, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } + /** Retrieves detail of a provider port. */ + expressRouteProviderPort( + providerport: string, + options: ExpressRouteProviderPortOptionalParams = { requestOptions: {} }, + ): Promise { + return expressRouteProviderPort(this._client, providerport, options); } - private async *disconnectActiveSessionsPagingAll( + /** Returns the list of currently active sessions on the Bastion. */ + disconnectActiveSessions( resourceGroupName: string, bastionHostName: string, sessionIds: SessionIds, - options?: DisconnectActiveSessionsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.disconnectActiveSessionsPagingPage( + options: DisconnectActiveSessionsOptionalParams = { requestOptions: {} }, + ): PagedAsyncIterableIterator { + return disconnectActiveSessions( + this._client, resourceGroupName, bastionHostName, sessionIds, options, - )) { - yield* page; - } + ); } - /** - * Creates a Bastion Shareable Links for all the VMs specified in the request. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param bslRequest Post request for Create/Delete/Get Bastion Shareable Link endpoints. - * @param options The options parameters. - */ - private async _putBastionShareableLink( + /** Returns the list of currently active sessions on the Bastion. */ + getActiveSessions( resourceGroupName: string, bastionHostName: string, - bslRequest: BastionShareableLinkListRequest, - options?: PutBastionShareableLinkOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PutBastionShareableLinkResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bastionHostName, bslRequest, options }, - spec: putBastionShareableLinkOperationSpec, - }); - const poller = await createHttpPoller< - PutBastionShareableLinkResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; + options: GetActiveSessionsOptionalParams = { requestOptions: {} }, + ): PagedAsyncIterableIterator { + return getActiveSessions(this._client, resourceGroupName, bastionHostName, options); } - /** - * Deletes the Bastion Shareable Links for all the VMs specified in the request. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param bslRequest Post request for Create/Delete/Get Bastion Shareable Link endpoints. - * @param options The options parameters. - */ - async beginDeleteBastionShareableLink( + /** @deprecated use getActiveSessions instead */ + beginListActiveSessionsAndWait( resourceGroupName: string, bastionHostName: string, - bslRequest: BastionShareableLinkListRequest, - options?: DeleteBastionShareableLinkOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bastionHostName, bslRequest, options }, - spec: deleteBastionShareableLinkOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; + options: GetActiveSessionsOptionalParams = { requestOptions: {} }, + ): PagedAsyncIterableIterator { + return getActiveSessions(this._client, resourceGroupName, bastionHostName, options); } - /** - * Deletes the Bastion Shareable Links for all the VMs specified in the request. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param bslRequest Post request for Create/Delete/Get Bastion Shareable Link endpoints. - * @param options The options parameters. - */ - async beginDeleteBastionShareableLinkAndWait( + /** Return the Bastion Shareable Links for all the VMs specified in the request. */ + getBastionShareableLink( resourceGroupName: string, bastionHostName: string, bslRequest: BastionShareableLinkListRequest, - options?: DeleteBastionShareableLinkOptionalParams, - ): Promise { - const poller = await this.beginDeleteBastionShareableLink( + options: GetBastionShareableLinkOptionalParams = { requestOptions: {} }, + ): PagedAsyncIterableIterator { + return getBastionShareableLink( + this._client, resourceGroupName, bastionHostName, bslRequest, options, ); - return poller.pollUntilDone(); } - /** - * Deletes the Bastion Shareable Links for all the tokens specified in the request. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param bslTokenRequest Post request for Delete Bastion Shareable Link By Token endpoint. - * @param options The options parameters. - */ - async beginDeleteBastionShareableLinkByToken( + /** Deletes the Bastion Shareable Links for all the tokens specified in the request. */ + deleteBastionShareableLinkByToken( resourceGroupName: string, bastionHostName: string, bslTokenRequest: BastionShareableLinkTokenListRequest, - options?: DeleteBastionShareableLinkByTokenOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - DeleteBastionShareableLinkByTokenResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bastionHostName, bslTokenRequest, options }, - spec: deleteBastionShareableLinkByTokenOperationSpec, - }); - const poller = await createHttpPoller< - DeleteBastionShareableLinkByTokenResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; + options: DeleteBastionShareableLinkByTokenOptionalParams = { requestOptions: {} }, + ): PollerLike, void> { + return deleteBastionShareableLinkByToken( + this._client, + resourceGroupName, + bastionHostName, + bslTokenRequest, + options, + ); } - /** - * Deletes the Bastion Shareable Links for all the tokens specified in the request. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param bslTokenRequest Post request for Delete Bastion Shareable Link By Token endpoint. - * @param options The options parameters. - */ - async beginDeleteBastionShareableLinkByTokenAndWait( + /** @deprecated use deleteBastionShareableLinkByToken instead */ + async beginDeleteBastionShareableLinkByToken( resourceGroupName: string, bastionHostName: string, bslTokenRequest: BastionShareableLinkTokenListRequest, - options?: DeleteBastionShareableLinkByTokenOptionalParams, - ): Promise { - const poller = await this.beginDeleteBastionShareableLinkByToken( + options: DeleteBastionShareableLinkByTokenOptionalParams = { requestOptions: {} }, + ): Promise, void>> { + const poller = deleteBastionShareableLinkByToken( + this._client, resourceGroupName, bastionHostName, bslTokenRequest, options, ); - return poller.pollUntilDone(); + await poller.submitted(); + return getSimplePoller(poller); } - /** - * Return the Bastion Shareable Links for all the VMs specified in the request. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param bslRequest Post request for Create/Delete/Get Bastion Shareable Link endpoints. - * @param options The options parameters. - */ - private _getBastionShareableLink( + /** @deprecated use deleteBastionShareableLinkByToken instead */ + async beginDeleteBastionShareableLinkByTokenAndWait( resourceGroupName: string, bastionHostName: string, - bslRequest: BastionShareableLinkListRequest, - options?: GetBastionShareableLinkOptionalParams, - ): Promise { - return this.sendOperationRequest( - { resourceGroupName, bastionHostName, bslRequest, options }, - getBastionShareableLinkOperationSpec, + bslTokenRequest: BastionShareableLinkTokenListRequest, + options: DeleteBastionShareableLinkByTokenOptionalParams = { requestOptions: {} }, + ): Promise { + return await deleteBastionShareableLinkByToken( + this._client, + resourceGroupName, + bastionHostName, + bslTokenRequest, + options, ); } - /** - * Returns the list of currently active sessions on the Bastion. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param options The options parameters. - */ - private async _getActiveSessions( - resourceGroupName: string, - bastionHostName: string, - options?: GetActiveSessionsOptionalParams, - ): Promise< - SimplePollerLike, GetActiveSessionsResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bastionHostName, options }, - spec: getActiveSessionsOperationSpec, - }); - const poller = await createHttpPoller< - GetActiveSessionsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Returns the list of currently active sessions on the Bastion. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param sessionIds The list of sessionids to disconnect. - * @param options The options parameters. - */ - private _disconnectActiveSessions( + /** Deletes the Bastion Shareable Links for all the VMs specified in the request. */ + deleteBastionShareableLink( resourceGroupName: string, bastionHostName: string, - sessionIds: SessionIds, - options?: DisconnectActiveSessionsOptionalParams, - ): Promise { - return this.sendOperationRequest( - { resourceGroupName, bastionHostName, sessionIds, options }, - disconnectActiveSessionsOperationSpec, - ); - } - - /** - * Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * @param location The location of the domain name. - * @param domainNameLabel The domain name to be verified. It must conform to the following regular - * expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. - * @param options The options parameters. - */ - checkDnsNameAvailability( - location: string, - domainNameLabel: string, - options?: CheckDnsNameAvailabilityOptionalParams, - ): Promise { - return this.sendOperationRequest( - { location, domainNameLabel, options }, - checkDnsNameAvailabilityOperationSpec, - ); - } - - /** - * Retrieves detail of a provider port. - * @param providerport The name of the provider port. - * @param options The options parameters. - */ - expressRouteProviderPort( - providerport: string, - options?: ExpressRouteProviderPortOptionalParams, - ): Promise { - return this.sendOperationRequest( - { providerport, options }, - expressRouteProviderPortOperationSpec, - ); - } - - /** - * Lists active connectivity configurations in a network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Active Configuration Parameter. - * @param options The options parameters. - */ - listActiveConnectivityConfigurations( - resourceGroupName: string, - networkManagerName: string, - parameters: ActiveConfigurationParameter, - options?: ListActiveConnectivityConfigurationsOptionalParams, - ): Promise { - return this.sendOperationRequest( - { resourceGroupName, networkManagerName, parameters, options }, - listActiveConnectivityConfigurationsOperationSpec, - ); - } - - /** - * Lists active security admin rules in a network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Active Configuration Parameter. - * @param options The options parameters. - */ - listActiveSecurityAdminRules( - resourceGroupName: string, - networkManagerName: string, - parameters: ActiveConfigurationParameter, - options?: ListActiveSecurityAdminRulesOptionalParams, - ): Promise { - return this.sendOperationRequest( - { resourceGroupName, networkManagerName, parameters, options }, - listActiveSecurityAdminRulesOperationSpec, - ); - } - - /** - * List all effective connectivity configurations applied on a virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param parameters Parameters supplied to list correct page. - * @param options The options parameters. - */ - listNetworkManagerEffectiveConnectivityConfigurations( - resourceGroupName: string, - virtualNetworkName: string, - parameters: QueryRequestOptions, - options?: ListNetworkManagerEffectiveConnectivityConfigurationsOptionalParams, - ): Promise { - return this.sendOperationRequest( - { resourceGroupName, virtualNetworkName, parameters, options }, - listNetworkManagerEffectiveConnectivityConfigurationsOperationSpec, - ); - } - - /** - * List all effective security admin rules applied on a virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param parameters Parameters supplied to list correct page. - * @param options The options parameters. - */ - listNetworkManagerEffectiveSecurityAdminRules( - resourceGroupName: string, - virtualNetworkName: string, - parameters: QueryRequestOptions, - options?: ListNetworkManagerEffectiveSecurityAdminRulesOptionalParams, - ): Promise { - return this.sendOperationRequest( - { resourceGroupName, virtualNetworkName, parameters, options }, - listNetworkManagerEffectiveSecurityAdminRulesOperationSpec, - ); - } - - /** - * Gives the supported security providers for the virtual wan. - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. - * @param options The options parameters. - */ - supportedSecurityProviders( - resourceGroupName: string, - virtualWANName: string, - options?: SupportedSecurityProvidersOptionalParams, - ): Promise { - return this.sendOperationRequest( - { resourceGroupName, virtualWANName, options }, - supportedSecurityProvidersOperationSpec, - ); - } - - /** - * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration - * combination in the specified resource group. - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation - * operation. - * @param options The options parameters. - */ - async beginGeneratevirtualwanvpnserverconfigurationvpnprofile( - resourceGroupName: string, - virtualWANName: string, - vpnClientParams: VirtualWanVpnProfileParameters, - options?: GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - GeneratevirtualwanvpnserverconfigurationvpnprofileResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualWANName, vpnClientParams, options }, - spec: generatevirtualwanvpnserverconfigurationvpnprofileOperationSpec, - }); - const poller = await createHttpPoller< - GeneratevirtualwanvpnserverconfigurationvpnprofileResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration - * combination in the specified resource group. - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation - * operation. - * @param options The options parameters. - */ - async beginGeneratevirtualwanvpnserverconfigurationvpnprofileAndWait( - resourceGroupName: string, - virtualWANName: string, - vpnClientParams: VirtualWanVpnProfileParameters, - options?: GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams, - ): Promise { - const poller = await this.beginGeneratevirtualwanvpnserverconfigurationvpnprofile( + bslRequest: BastionShareableLinkListRequest, + options: DeleteBastionShareableLinkOptionalParams = { requestOptions: {} }, + ): PollerLike, void> { + return deleteBastionShareableLink( + this._client, resourceGroupName, - virtualWANName, - vpnClientParams, + bastionHostName, + bslRequest, options, ); - return poller.pollUntilDone(); } - /** - * PutBastionShareableLinkNext - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param bslRequest Post request for Create/Delete/Get Bastion Shareable Link endpoints. - * @param nextLink The nextLink from the previous successful call to the PutBastionShareableLink - * method. - * @param options The options parameters. - */ - private _putBastionShareableLinkNext( + /** @deprecated use deleteBastionShareableLink instead */ + async beginDeleteBastionShareableLink( resourceGroupName: string, bastionHostName: string, bslRequest: BastionShareableLinkListRequest, - nextLink: string, - options?: PutBastionShareableLinkNextOptionalParams, - ): Promise { - return this.sendOperationRequest( - { resourceGroupName, bastionHostName, bslRequest, nextLink, options }, - putBastionShareableLinkNextOperationSpec, + options: DeleteBastionShareableLinkOptionalParams = { requestOptions: {} }, + ): Promise, void>> { + const poller = deleteBastionShareableLink( + this._client, + resourceGroupName, + bastionHostName, + bslRequest, + options, ); + await poller.submitted(); + return getSimplePoller(poller); } - /** - * GetBastionShareableLinkNext - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param bslRequest Post request for Create/Delete/Get Bastion Shareable Link endpoints. - * @param nextLink The nextLink from the previous successful call to the GetBastionShareableLink - * method. - * @param options The options parameters. - */ - private _getBastionShareableLinkNext( + /** @deprecated use deleteBastionShareableLink instead */ + async beginDeleteBastionShareableLinkAndWait( resourceGroupName: string, bastionHostName: string, bslRequest: BastionShareableLinkListRequest, - nextLink: string, - options?: GetBastionShareableLinkNextOptionalParams, - ): Promise { - return this.sendOperationRequest( - { resourceGroupName, bastionHostName, bslRequest, nextLink, options }, - getBastionShareableLinkNextOperationSpec, + options: DeleteBastionShareableLinkOptionalParams = { requestOptions: {} }, + ): Promise { + return await deleteBastionShareableLink( + this._client, + resourceGroupName, + bastionHostName, + bslRequest, + options, ); } - /** - * GetActiveSessionsNext - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param nextLink The nextLink from the previous successful call to the GetActiveSessions method. - * @param options The options parameters. - */ - private _getActiveSessionsNext( + /** Creates a Bastion Shareable Links for all the VMs specified in the request. */ + putBastionShareableLink( resourceGroupName: string, bastionHostName: string, - nextLink: string, - options?: GetActiveSessionsNextOptionalParams, - ): Promise { - return this.sendOperationRequest( - { resourceGroupName, bastionHostName, nextLink, options }, - getActiveSessionsNextOperationSpec, + bslRequest: BastionShareableLinkListRequest, + options: PutBastionShareableLinkOptionalParams = { requestOptions: {} }, + ): PagedAsyncIterableIterator { + return putBastionShareableLink( + this._client, + resourceGroupName, + bastionHostName, + bslRequest, + options, ); } - /** - * DisconnectActiveSessionsNext - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param sessionIds The list of sessionids to disconnect. - * @param nextLink The nextLink from the previous successful call to the DisconnectActiveSessions - * method. - * @param options The options parameters. - */ - private _disconnectActiveSessionsNext( + /** @deprecated use putBastionShareableLink instead */ + beginListPutBastionShareableLinkAndWait( resourceGroupName: string, bastionHostName: string, - sessionIds: SessionIds, - nextLink: string, - options?: DisconnectActiveSessionsNextOptionalParams, - ): Promise { - return this.sendOperationRequest( - { resourceGroupName, bastionHostName, sessionIds, nextLink, options }, - disconnectActiveSessionsNextOperationSpec, + bslRequest: BastionShareableLinkListRequest, + options: PutBastionShareableLinkOptionalParams = { requestOptions: {} }, + ): PagedAsyncIterableIterator { + return putBastionShareableLink( + this._client, + resourceGroupName, + bastionHostName, + bslRequest, + options, ); } - applicationGateways: ApplicationGateways; - applicationGatewayPrivateLinkResources: ApplicationGatewayPrivateLinkResources; - applicationGatewayPrivateEndpointConnections: ApplicationGatewayPrivateEndpointConnections; - applicationGatewayWafDynamicManifestsDefault: ApplicationGatewayWafDynamicManifestsDefault; - applicationGatewayWafDynamicManifests: ApplicationGatewayWafDynamicManifests; - applicationSecurityGroups: ApplicationSecurityGroups; - availableDelegations: AvailableDelegations; - availableResourceGroupDelegations: AvailableResourceGroupDelegations; - availableServiceAliases: AvailableServiceAliases; - azureFirewalls: AzureFirewalls; - azureFirewallFqdnTags: AzureFirewallFqdnTags; - webCategories: WebCategories; - bastionHosts: BastionHosts; - networkInterfaces: NetworkInterfaces; - publicIPAddresses: PublicIPAddresses; - vipSwap: VipSwap; - customIPPrefixes: CustomIPPrefixes; - ddosCustomPolicies: DdosCustomPolicies; - ddosProtectionPlans: DdosProtectionPlans; - dscpConfigurationOperations: DscpConfigurationOperations; - availableEndpointServices: AvailableEndpointServices; - expressRouteCircuitAuthorizations: ExpressRouteCircuitAuthorizations; - expressRouteCircuitPeerings: ExpressRouteCircuitPeerings; - expressRouteCircuitConnections: ExpressRouteCircuitConnections; - peerExpressRouteCircuitConnections: PeerExpressRouteCircuitConnections; - expressRouteCircuits: ExpressRouteCircuits; - expressRouteServiceProviders: ExpressRouteServiceProviders; - expressRouteCrossConnections: ExpressRouteCrossConnections; - expressRouteCrossConnectionPeerings: ExpressRouteCrossConnectionPeerings; - expressRoutePortsLocations: ExpressRoutePortsLocations; - expressRoutePorts: ExpressRoutePorts; - expressRouteLinks: ExpressRouteLinks; - expressRoutePortAuthorizations: ExpressRoutePortAuthorizations; - expressRouteProviderPortsLocation: ExpressRouteProviderPortsLocation; - firewallPolicies: FirewallPolicies; - firewallPolicyRuleCollectionGroups: FirewallPolicyRuleCollectionGroups; - firewallPolicyIdpsSignatures: FirewallPolicyIdpsSignatures; - firewallPolicyIdpsSignaturesOverrides: FirewallPolicyIdpsSignaturesOverrides; - firewallPolicyIdpsSignaturesFilterValues: FirewallPolicyIdpsSignaturesFilterValues; - firewallPolicyDrafts: FirewallPolicyDrafts; - firewallPolicyDeployments: FirewallPolicyDeployments; - firewallPolicyRuleCollectionGroupDrafts: FirewallPolicyRuleCollectionGroupDrafts; - ipamPools: IpamPools; - staticCidrs: StaticCidrs; - ipAllocations: IpAllocations; - ipGroups: IpGroups; - loadBalancers: LoadBalancers; - loadBalancerBackendAddressPools: LoadBalancerBackendAddressPools; - loadBalancerFrontendIPConfigurations: LoadBalancerFrontendIPConfigurations; - inboundNatRules: InboundNatRules; - loadBalancerLoadBalancingRules: LoadBalancerLoadBalancingRules; - loadBalancerOutboundRules: LoadBalancerOutboundRules; - loadBalancerNetworkInterfaces: LoadBalancerNetworkInterfaces; - loadBalancerProbes: LoadBalancerProbes; - natGateways: NatGateways; - networkInterfaceIPConfigurations: NetworkInterfaceIPConfigurations; - networkInterfaceLoadBalancers: NetworkInterfaceLoadBalancers; - networkInterfaceTapConfigurations: NetworkInterfaceTapConfigurations; - networkManagers: NetworkManagers; - networkManagerCommits: NetworkManagerCommits; - networkManagerDeploymentStatusOperations: NetworkManagerDeploymentStatusOperations; - subscriptionNetworkManagerConnections: SubscriptionNetworkManagerConnections; - managementGroupNetworkManagerConnections: ManagementGroupNetworkManagerConnections; - connectivityConfigurations: ConnectivityConfigurations; - networkGroups: NetworkGroups; - staticMembers: StaticMembers; - networkManagerRoutingConfigurations: NetworkManagerRoutingConfigurations; - routingRuleCollections: RoutingRuleCollections; - routingRules: RoutingRules; - scopeConnections: ScopeConnections; - securityAdminConfigurations: SecurityAdminConfigurations; - adminRuleCollections: AdminRuleCollections; - adminRules: AdminRules; - securityUserConfigurations: SecurityUserConfigurations; - securityUserRuleCollections: SecurityUserRuleCollections; - securityUserRules: SecurityUserRules; - networkProfiles: NetworkProfiles; - networkSecurityGroups: NetworkSecurityGroups; - securityRules: SecurityRules; - defaultSecurityRules: DefaultSecurityRules; - networkSecurityPerimeters: NetworkSecurityPerimeters; - networkSecurityPerimeterProfiles: NetworkSecurityPerimeterProfiles; - networkSecurityPerimeterAccessRules: NetworkSecurityPerimeterAccessRules; - networkSecurityPerimeterAssociations: NetworkSecurityPerimeterAssociations; - networkSecurityPerimeterAssociableResourceTypes: NetworkSecurityPerimeterAssociableResourceTypes; - networkSecurityPerimeterLinks: NetworkSecurityPerimeterLinks; - networkSecurityPerimeterLinkReferences: NetworkSecurityPerimeterLinkReferences; - networkSecurityPerimeterLoggingConfigurations: NetworkSecurityPerimeterLoggingConfigurations; - networkSecurityPerimeterOperationStatuses: NetworkSecurityPerimeterOperationStatuses; - networkSecurityPerimeterServiceTags: NetworkSecurityPerimeterServiceTags; - reachabilityAnalysisIntents: ReachabilityAnalysisIntents; - reachabilityAnalysisRuns: ReachabilityAnalysisRuns; - verifierWorkspaces: VerifierWorkspaces; - networkVirtualAppliances: NetworkVirtualAppliances; - virtualApplianceSites: VirtualApplianceSites; - virtualApplianceSkus: VirtualApplianceSkus; - inboundSecurityRuleOperations: InboundSecurityRuleOperations; - networkWatchers: NetworkWatchers; - packetCaptures: PacketCaptures; - connectionMonitors: ConnectionMonitors; - flowLogs: FlowLogs; - operations: Operations; - privateEndpoints: PrivateEndpoints; - availablePrivateEndpointTypes: AvailablePrivateEndpointTypes; - privateDnsZoneGroups: PrivateDnsZoneGroups; - privateLinkServices: PrivateLinkServices; - publicIPPrefixes: PublicIPPrefixes; - routeFilters: RouteFilters; - routeFilterRules: RouteFilterRules; - routeTables: RouteTables; - routes: Routes; - securityPartnerProviders: SecurityPartnerProviders; - bgpServiceCommunities: BgpServiceCommunities; - serviceEndpointPolicies: ServiceEndpointPolicies; - serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinitions; - serviceGateways: ServiceGateways; - serviceTags: ServiceTags; - serviceTagInformationOperations: ServiceTagInformationOperations; - usages: Usages; - virtualNetworks: VirtualNetworks; - subnets: Subnets; - resourceNavigationLinks: ResourceNavigationLinks; - serviceAssociationLinks: ServiceAssociationLinks; - virtualNetworkPeerings: VirtualNetworkPeerings; - virtualNetworkAppliances: VirtualNetworkAppliances; - virtualNetworkGateways: VirtualNetworkGateways; - virtualNetworkGatewayConnections: VirtualNetworkGatewayConnections; - localNetworkGateways: LocalNetworkGateways; - virtualNetworkGatewayNatRules: VirtualNetworkGatewayNatRules; - virtualNetworkTaps: VirtualNetworkTaps; - virtualRouters: VirtualRouters; - virtualRouterPeerings: VirtualRouterPeerings; - virtualWans: VirtualWans; - vpnSites: VpnSites; - vpnSiteLinks: VpnSiteLinks; - vpnSitesConfiguration: VpnSitesConfiguration; - vpnServerConfigurations: VpnServerConfigurations; - configurationPolicyGroups: ConfigurationPolicyGroups; - virtualHubs: VirtualHubs; - routeMaps: RouteMaps; - hubVirtualNetworkConnections: HubVirtualNetworkConnections; - vpnGateways: VpnGateways; - vpnLinkConnections: VpnLinkConnections; - vpnConnections: VpnConnections; - vpnSiteLinkConnections: VpnSiteLinkConnections; - natRules: NatRules; - p2SVpnGateways: P2SVpnGateways; - vpnServerConfigurationsAssociatedWithVirtualWan: VpnServerConfigurationsAssociatedWithVirtualWan; - virtualHubRouteTableV2S: VirtualHubRouteTableV2S; - expressRouteGateways: ExpressRouteGateways; - expressRouteConnections: ExpressRouteConnections; - networkVirtualApplianceConnections: NetworkVirtualApplianceConnections; - virtualHubBgpConnection: VirtualHubBgpConnection; - virtualHubBgpConnections: VirtualHubBgpConnections; - virtualHubIpConfiguration: VirtualHubIpConfiguration; - hubRouteTables: HubRouteTables; - routingIntentOperations: RoutingIntentOperations; - webApplicationFirewallPolicies: WebApplicationFirewallPolicies; + /** The operation groups for usages */ + public readonly usages: UsagesOperations; + /** The operation groups for serviceTagInformation */ + public readonly serviceTagInformation: ServiceTagInformationOperations; + /** The operation groups for serviceTags */ + public readonly serviceTags: ServiceTagsOperations; + /** The operation groups for bgpServiceCommunities */ + public readonly bgpServiceCommunities: BgpServiceCommunitiesOperations; + /** The operation groups for availablePrivateEndpointTypes */ + public readonly availablePrivateEndpointTypes: AvailablePrivateEndpointTypesOperations; + /** The operation groups for networkSecurityPerimeterServiceTags */ + public readonly networkSecurityPerimeterServiceTags: NetworkSecurityPerimeterServiceTagsOperations; + /** The operation groups for networkSecurityPerimeterOperationStatuses */ + public readonly networkSecurityPerimeterOperationStatuses: NetworkSecurityPerimeterOperationStatusesOperations; + /** The operation groups for networkSecurityPerimeterAssociableResourceTypes */ + public readonly networkSecurityPerimeterAssociableResourceTypes: NetworkSecurityPerimeterAssociableResourceTypesOperations; + /** The operation groups for expressRouteServiceProviders */ + public readonly expressRouteServiceProviders: ExpressRouteServiceProvidersOperations; + /** The operation groups for availableEndpointServices */ + public readonly availableEndpointServices: AvailableEndpointServicesOperations; + /** The operation groups for azureFirewallFqdnTags */ + public readonly azureFirewallFqdnTags: AzureFirewallFqdnTagsOperations; + /** The operation groups for availableServiceAliases */ + public readonly availableServiceAliases: AvailableServiceAliasesOperations; + /** The operation groups for availableResourceGroupDelegations */ + public readonly availableResourceGroupDelegations: AvailableResourceGroupDelegationsOperations; + /** The operation groups for availableDelegations */ + public readonly availableDelegations: AvailableDelegationsOperations; + /** The operation groups for routingIntent */ + public readonly routingIntent: RoutingIntentOperations; + /** The operation groups for virtualHubIpConfiguration */ + public readonly virtualHubIpConfiguration: VirtualHubIpConfigurationOperations; + /** The operation groups for virtualHubBgpConnections */ + public readonly virtualHubBgpConnections: VirtualHubBgpConnectionsOperations; + /** The operation groups for virtualHubBgpConnection */ + public readonly virtualHubBgpConnection: VirtualHubBgpConnectionOperations; + /** The operation groups for expressRouteConnections */ + public readonly expressRouteConnections: ExpressRouteConnectionsOperations; + /** The operation groups for p2SVpnGateways */ + public readonly p2SVpnGateways: P2SVpnGatewaysOperations; + /** The operation groups for natRules */ + public readonly natRules: NatRulesOperations; + /** The operation groups for vpnLinkConnections */ + public readonly vpnLinkConnections: VpnLinkConnectionsOperations; + /** The operation groups for vpnConnections */ + public readonly vpnConnections: VpnConnectionsOperations; + /** The operation groups for virtualHubRouteTableV2S */ + public readonly virtualHubRouteTableV2S: VirtualHubRouteTableV2SOperations; + /** The operation groups for hubVirtualNetworkConnections */ + public readonly hubVirtualNetworkConnections: HubVirtualNetworkConnectionsOperations; + /** The operation groups for configurationPolicyGroups */ + public readonly configurationPolicyGroups: ConfigurationPolicyGroupsOperations; + /** The operation groups for vpnServerConfigurationsAssociatedWithVirtualWan */ + public readonly vpnServerConfigurationsAssociatedWithVirtualWan: VpnServerConfigurationsAssociatedWithVirtualWanOperations; + /** The operation groups for vpnSitesConfiguration */ + public readonly vpnSitesConfiguration: VpnSitesConfigurationOperations; + /** The operation groups for serviceAssociationLinks */ + public readonly serviceAssociationLinks: ServiceAssociationLinksOperations; + /** The operation groups for resourceNavigationLinks */ + public readonly resourceNavigationLinks: ResourceNavigationLinksOperations; + /** The operation groups for routeFilterRules */ + public readonly routeFilterRules: RouteFilterRulesOperations; + /** The operation groups for privateDnsZoneGroups */ + public readonly privateDnsZoneGroups: PrivateDnsZoneGroupsOperations; + /** The operation groups for connectionMonitors */ + public readonly connectionMonitors: ConnectionMonitorsOperations; + /** The operation groups for packetCaptures */ + public readonly packetCaptures: PacketCapturesOperations; + /** The operation groups for inboundSecurityRule */ + public readonly inboundSecurityRule: InboundSecurityRuleOperations; + /** The operation groups for virtualApplianceSkus */ + public readonly virtualApplianceSkus: VirtualApplianceSkusOperations; + /** The operation groups for networkSecurityPerimeterLoggingConfigurations */ + public readonly networkSecurityPerimeterLoggingConfigurations: NetworkSecurityPerimeterLoggingConfigurationsOperations; + /** The operation groups for networkSecurityPerimeterLinkReferences */ + public readonly networkSecurityPerimeterLinkReferences: NetworkSecurityPerimeterLinkReferencesOperations; + /** The operation groups for networkSecurityPerimeterLinks */ + public readonly networkSecurityPerimeterLinks: NetworkSecurityPerimeterLinksOperations; + /** The operation groups for networkSecurityPerimeterAssociations */ + public readonly networkSecurityPerimeterAssociations: NetworkSecurityPerimeterAssociationsOperations; + /** The operation groups for networkSecurityPerimeterAccessRules */ + public readonly networkSecurityPerimeterAccessRules: NetworkSecurityPerimeterAccessRulesOperations; + /** The operation groups for networkSecurityPerimeterProfiles */ + public readonly networkSecurityPerimeterProfiles: NetworkSecurityPerimeterProfilesOperations; + /** The operation groups for adminRules */ + public readonly adminRules: AdminRulesOperations; + /** The operation groups for subscriptionNetworkManagerConnections */ + public readonly subscriptionNetworkManagerConnections: SubscriptionNetworkManagerConnectionsOperations; + /** The operation groups for loadBalancerProbes */ + public readonly loadBalancerProbes: LoadBalancerProbesOperations; + /** The operation groups for loadBalancerOutboundRules */ + public readonly loadBalancerOutboundRules: LoadBalancerOutboundRulesOperations; + /** The operation groups for loadBalancerLoadBalancingRules */ + public readonly loadBalancerLoadBalancingRules: LoadBalancerLoadBalancingRulesOperations; + /** The operation groups for loadBalancerFrontendIPConfigurations */ + public readonly loadBalancerFrontendIPConfigurations: LoadBalancerFrontendIPConfigurationsOperations; + /** The operation groups for loadBalancerBackendAddressPools */ + public readonly loadBalancerBackendAddressPools: LoadBalancerBackendAddressPoolsOperations; + /** The operation groups for loadBalancerNetworkInterfaces */ + public readonly loadBalancerNetworkInterfaces: LoadBalancerNetworkInterfacesOperations; + /** The operation groups for networkManagerDeploymentStatus */ + public readonly networkManagerDeploymentStatus: NetworkManagerDeploymentStatusOperations; + /** The operation groups for networkManagerCommits */ + public readonly networkManagerCommits: NetworkManagerCommitsOperations; + /** The operation groups for firewallPolicyDeployments */ + public readonly firewallPolicyDeployments: FirewallPolicyDeploymentsOperations; + /** The operation groups for firewallPolicyIdpsSignaturesFilterValues */ + public readonly firewallPolicyIdpsSignaturesFilterValues: FirewallPolicyIdpsSignaturesFilterValuesOperations; + /** The operation groups for firewallPolicyIdpsSignatures */ + public readonly firewallPolicyIdpsSignatures: FirewallPolicyIdpsSignaturesOperations; + /** The operation groups for expressRouteLinks */ + public readonly expressRouteLinks: ExpressRouteLinksOperations; + /** The operation groups for expressRouteCrossConnectionPeerings */ + public readonly expressRouteCrossConnectionPeerings: ExpressRouteCrossConnectionPeeringsOperations; + /** The operation groups for dscpConfiguration */ + public readonly dscpConfiguration: DscpConfigurationOperations; + /** The operation groups for customIPPrefixes */ + public readonly customIPPrefixes: CustomIPPrefixesOperations; + /** The operation groups for vipSwap */ + public readonly vipSwap: VipSwapOperations; + /** The operation groups for networkInterfaceLoadBalancers */ + public readonly networkInterfaceLoadBalancers: NetworkInterfaceLoadBalancersOperations; + /** The operation groups for expressRouteProviderPortsLocation */ + public readonly expressRouteProviderPortsLocation: ExpressRouteProviderPortsLocationOperations; + /** The operation groups for webCategories */ + public readonly webCategories: WebCategoriesOperations; + /** The operation groups for applicationGatewayWafDynamicManifests */ + public readonly applicationGatewayWafDynamicManifests: ApplicationGatewayWafDynamicManifestsOperations; + /** The operation groups for applicationGatewayWafDynamicManifestsDefault */ + public readonly applicationGatewayWafDynamicManifestsDefault: ApplicationGatewayWafDynamicManifestsDefaultOperations; + /** The operation groups for applicationGatewayPrivateLinkResources */ + public readonly applicationGatewayPrivateLinkResources: ApplicationGatewayPrivateLinkResourcesOperations; + /** The operation groups for subgroups */ + public readonly subgroups: SubgroupsOperations; + /** The operation groups for interconnectGroups */ + public readonly interconnectGroups: InterconnectGroupsOperations; + /** The operation groups for serviceGateways */ + public readonly serviceGateways: ServiceGatewaysOperations; + /** The operation groups for virtualNetworkAppliances */ + public readonly virtualNetworkAppliances: VirtualNetworkAppliancesOperations; + /** The operation groups for webApplicationFirewallPolicies */ + public readonly webApplicationFirewallPolicies: WebApplicationFirewallPoliciesOperations; + /** The operation groups for connectionPolicies */ + public readonly connectionPolicies: ConnectionPoliciesOperations; + /** The operation groups for hubRouteTables */ + public readonly hubRouteTables: HubRouteTablesOperations; + /** The operation groups for expressRouteGateways */ + public readonly expressRouteGateways: ExpressRouteGatewaysOperations; + /** The operation groups for vpnSiteLinkConnections */ + public readonly vpnSiteLinkConnections: VpnSiteLinkConnectionsOperations; + /** The operation groups for vpnGateways */ + public readonly vpnGateways: VpnGatewaysOperations; + /** The operation groups for routeMaps */ + public readonly routeMaps: RouteMapsOperations; + /** The operation groups for virtualHubs */ + public readonly virtualHubs: VirtualHubsOperations; + /** The operation groups for vpnServerConfigurations */ + public readonly vpnServerConfigurations: VpnServerConfigurationsOperations; + /** The operation groups for vpnSiteLinks */ + public readonly vpnSiteLinks: VpnSiteLinksOperations; + /** The operation groups for vpnSites */ + public readonly vpnSites: VpnSitesOperations; + /** The operation groups for virtualWans */ + public readonly virtualWans: VirtualWansOperations; + /** The operation groups for virtualRouterPeerings */ + public readonly virtualRouterPeerings: VirtualRouterPeeringsOperations; + /** The operation groups for virtualRouters */ + public readonly virtualRouters: VirtualRoutersOperations; + /** The operation groups for virtualNetworkTaps */ + public readonly virtualNetworkTaps: VirtualNetworkTapsOperations; + /** The operation groups for virtualNetworkGatewayNatRules */ + public readonly virtualNetworkGatewayNatRules: VirtualNetworkGatewayNatRulesOperations; + /** The operation groups for localNetworkGateways */ + public readonly localNetworkGateways: LocalNetworkGatewaysOperations; + /** The operation groups for virtualNetworkGatewayConnections */ + public readonly virtualNetworkGatewayConnections: VirtualNetworkGatewayConnectionsOperations; + /** The operation groups for virtualNetworkGateways */ + public readonly virtualNetworkGateways: VirtualNetworkGatewaysOperations; + /** The operation groups for virtualNetworkPeerings */ + public readonly virtualNetworkPeerings: VirtualNetworkPeeringsOperations; + /** The operation groups for subnets */ + public readonly subnets: SubnetsOperations; + /** The operation groups for virtualNetworks */ + public readonly virtualNetworks: VirtualNetworksOperations; + /** The operation groups for serviceEndpointPolicyDefinitions */ + public readonly serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinitionsOperations; + /** The operation groups for serviceEndpointPolicies */ + public readonly serviceEndpointPolicies: ServiceEndpointPoliciesOperations; + /** The operation groups for securityPartnerProviders */ + public readonly securityPartnerProviders: SecurityPartnerProvidersOperations; + /** The operation groups for routes */ + public readonly routes: RoutesOperations; + /** The operation groups for routeTables */ + public readonly routeTables: RouteTablesOperations; + /** The operation groups for routeFilters */ + public readonly routeFilters: RouteFiltersOperations; + /** The operation groups for publicIPPrefixes */ + public readonly publicIPPrefixes: PublicIPPrefixesOperations; + /** The operation groups for privateLinkServices */ + public readonly privateLinkServices: PrivateLinkServicesOperations; + /** The operation groups for privateEndpoints */ + public readonly privateEndpoints: PrivateEndpointsOperations; + /** The operation groups for flowLogs */ + public readonly flowLogs: FlowLogsOperations; + /** The operation groups for networkWatchers */ + public readonly networkWatchers: NetworkWatchersOperations; + /** The operation groups for virtualApplianceSites */ + public readonly virtualApplianceSites: VirtualApplianceSitesOperations; + /** The operation groups for networkVirtualAppliances */ + public readonly networkVirtualAppliances: NetworkVirtualAppliancesOperations; + /** The operation groups for networkVirtualApplianceConnections */ + public readonly networkVirtualApplianceConnections: NetworkVirtualApplianceConnectionsOperations; + /** The operation groups for reachabilityAnalysisRuns */ + public readonly reachabilityAnalysisRuns: ReachabilityAnalysisRunsOperations; + /** The operation groups for verifierWorkspaces */ + public readonly verifierWorkspaces: VerifierWorkspacesOperations; + /** The operation groups for reachabilityAnalysisIntents */ + public readonly reachabilityAnalysisIntents: ReachabilityAnalysisIntentsOperations; + /** The operation groups for networkSecurityPerimeters */ + public readonly networkSecurityPerimeters: NetworkSecurityPerimetersOperations; + /** The operation groups for defaultSecurityRules */ + public readonly defaultSecurityRules: DefaultSecurityRulesOperations; + /** The operation groups for securityRules */ + public readonly securityRules: SecurityRulesOperations; + /** The operation groups for networkSecurityGroups */ + public readonly networkSecurityGroups: NetworkSecurityGroupsOperations; + /** The operation groups for networkProfiles */ + public readonly networkProfiles: NetworkProfilesOperations; + /** The operation groups for securityUserRules */ + public readonly securityUserRules: SecurityUserRulesOperations; + /** The operation groups for securityUserRuleCollections */ + public readonly securityUserRuleCollections: SecurityUserRuleCollectionsOperations; + /** The operation groups for securityUserConfigurations */ + public readonly securityUserConfigurations: SecurityUserConfigurationsOperations; + /** The operation groups for adminRuleCollections */ + public readonly adminRuleCollections: AdminRuleCollectionsOperations; + /** The operation groups for securityAdminConfigurations */ + public readonly securityAdminConfigurations: SecurityAdminConfigurationsOperations; + /** The operation groups for commits */ + public readonly commits: CommitsOperations; + /** The operation groups for scopeConnections */ + public readonly scopeConnections: ScopeConnectionsOperations; + /** The operation groups for routingRules */ + public readonly routingRules: RoutingRulesOperations; + /** The operation groups for routingRuleCollections */ + public readonly routingRuleCollections: RoutingRuleCollectionsOperations; + /** The operation groups for networkManagerRoutingConfigurations */ + public readonly networkManagerRoutingConfigurations: NetworkManagerRoutingConfigurationsOperations; + /** The operation groups for staticMembers */ + public readonly staticMembers: StaticMembersOperations; + /** The operation groups for networkGroups */ + public readonly networkGroups: NetworkGroupsOperations; + /** The operation groups for connectivityConfigurations */ + public readonly connectivityConfigurations: ConnectivityConfigurationsOperations; + /** The operation groups for managementGroupNetworkManagerConnections */ + public readonly managementGroupNetworkManagerConnections: ManagementGroupNetworkManagerConnectionsOperations; + /** The operation groups for networkInterfaceTapConfigurations */ + public readonly networkInterfaceTapConfigurations: NetworkInterfaceTapConfigurationsOperations; + /** The operation groups for networkInterfaceIPConfigurations */ + public readonly networkInterfaceIPConfigurations: NetworkInterfaceIPConfigurationsOperations; + /** The operation groups for natGateways */ + public readonly natGateways: NatGatewaysOperations; + /** The operation groups for inboundNatRules */ + public readonly inboundNatRules: InboundNatRulesOperations; + /** The operation groups for loadBalancers */ + public readonly loadBalancers: LoadBalancersOperations; + /** The operation groups for ipGroups */ + public readonly ipGroups: IpGroupsOperations; + /** The operation groups for ipAllocations */ + public readonly ipAllocations: IpAllocationsOperations; + /** The operation groups for staticCidrs */ + public readonly staticCidrs: StaticCidrsOperations; + /** The operation groups for networkManagers */ + public readonly networkManagers: NetworkManagersOperations; + /** The operation groups for ipamPools */ + public readonly ipamPools: IpamPoolsOperations; + /** The operation groups for firewallPolicyRuleCollectionGroupDrafts */ + public readonly firewallPolicyRuleCollectionGroupDrafts: FirewallPolicyRuleCollectionGroupDraftsOperations; + /** The operation groups for firewallPolicyDrafts */ + public readonly firewallPolicyDrafts: FirewallPolicyDraftsOperations; + /** The operation groups for firewallPolicyIdpsSignaturesOverrides */ + public readonly firewallPolicyIdpsSignaturesOverrides: FirewallPolicyIdpsSignaturesOverridesOperations; + /** The operation groups for firewallPolicyRuleCollectionGroups */ + public readonly firewallPolicyRuleCollectionGroups: FirewallPolicyRuleCollectionGroupsOperations; + /** The operation groups for firewallPolicies */ + public readonly firewallPolicies: FirewallPoliciesOperations; + /** The operation groups for expressRoutePortAuthorizations */ + public readonly expressRoutePortAuthorizations: ExpressRoutePortAuthorizationsOperations; + /** The operation groups for expressRoutePorts */ + public readonly expressRoutePorts: ExpressRoutePortsOperations; + /** The operation groups for expressRoutePortsLocations */ + public readonly expressRoutePortsLocations: ExpressRoutePortsLocationsOperations; + /** The operation groups for expressRouteCrossConnections */ + public readonly expressRouteCrossConnections: ExpressRouteCrossConnectionsOperations; + /** The operation groups for peerExpressRouteCircuitConnections */ + public readonly peerExpressRouteCircuitConnections: PeerExpressRouteCircuitConnectionsOperations; + /** The operation groups for expressRouteCircuitConnections */ + public readonly expressRouteCircuitConnections: ExpressRouteCircuitConnectionsOperations; + /** The operation groups for expressRouteCircuitPeerings */ + public readonly expressRouteCircuitPeerings: ExpressRouteCircuitPeeringsOperations; + /** The operation groups for expressRouteCircuits */ + public readonly expressRouteCircuits: ExpressRouteCircuitsOperations; + /** The operation groups for expressRouteCircuitAuthorizations */ + public readonly expressRouteCircuitAuthorizations: ExpressRouteCircuitAuthorizationsOperations; + /** The operation groups for ddosProtectionPlans */ + public readonly ddosProtectionPlans: DdosProtectionPlansOperations; + /** The operation groups for ddosCustomPolicies */ + public readonly ddosCustomPolicies: DdosCustomPoliciesOperations; + /** The operation groups for publicIPAddresses */ + public readonly publicIPAddresses: PublicIPAddressesOperations; + /** The operation groups for networkInterfaces */ + public readonly networkInterfaces: NetworkInterfacesOperations; + /** The operation groups for bastionHosts */ + public readonly bastionHosts: BastionHostsOperations; + /** The operation groups for azureFirewalls */ + public readonly azureFirewalls: AzureFirewallsOperations; + /** The operation groups for applicationSecurityGroups */ + public readonly applicationSecurityGroups: ApplicationSecurityGroupsOperations; + /** The operation groups for applicationGatewayPrivateEndpointConnections */ + public readonly applicationGatewayPrivateEndpointConnections: ApplicationGatewayPrivateEndpointConnectionsOperations; + /** The operation groups for applicationGateways */ + public readonly applicationGateways: ApplicationGatewaysOperations; + /** The operation groups for operations */ + public readonly operations: OperationsOperations; } -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const putBastionShareableLinkOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.BastionShareableLinkListResult, - }, - 201: { - bodyMapper: Mappers.BastionShareableLinkListResult, - }, - 202: { - bodyMapper: Mappers.BastionShareableLinkListResult, - }, - 204: { - bodyMapper: Mappers.BastionShareableLinkListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.bslRequest, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteBastionShareableLinkOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.bslRequest, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteBastionShareableLinkByTokenOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinksByToken", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.NetworkManagementClientDeleteBastionShareableLinkByTokenHeaders, - }, - 201: { - headersMapper: Mappers.NetworkManagementClientDeleteBastionShareableLinkByTokenHeaders, - }, - 202: { - headersMapper: Mappers.NetworkManagementClientDeleteBastionShareableLinkByTokenHeaders, - }, - 204: { - headersMapper: Mappers.NetworkManagementClientDeleteBastionShareableLinkByTokenHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.bslTokenRequest, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getBastionShareableLinkOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.BastionShareableLinkListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.bslRequest, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getActiveSessionsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.BastionActiveSessionListResult, - }, - 201: { - bodyMapper: Mappers.BastionActiveSessionListResult, - }, - 202: { - bodyMapper: Mappers.BastionActiveSessionListResult, - }, - 204: { - bodyMapper: Mappers.BastionActiveSessionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const disconnectActiveSessionsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.BastionSessionDeleteResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.sessionIds, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const checkDnsNameAvailabilityOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DnsNameAvailabilityResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.domainNameLabel], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; -const expressRouteProviderPortOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts/{providerport}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteProviderPort, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.providerport], - headerParameters: [Parameters.accept], - serializer, -}; -const listActiveConnectivityConfigurationsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveConnectivityConfigurations", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ActiveConnectivityConfigurationsListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion, Parameters.top], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listActiveSecurityAdminRulesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityAdminRules", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ActiveSecurityAdminRulesListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion, Parameters.top], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listNetworkManagerEffectiveConnectivityConfigurationsOperationSpec: coreClient.OperationSpec = - { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveConnectivityConfigurations", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerEffectiveConnectivityConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion, Parameters.top], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, - }; -const listNetworkManagerEffectiveSecurityAdminRulesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveSecurityAdminRules", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerEffectiveSecurityAdminRulesListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion, Parameters.top], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const supportedSecurityProvidersOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualWanSecurityProviders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualWANName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const generatevirtualwanvpnserverconfigurationvpnprofileOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VpnProfileResponse, - }, - 201: { - bodyMapper: Mappers.VpnProfileResponse, - }, - 202: { - bodyMapper: Mappers.VpnProfileResponse, - }, - 204: { - bodyMapper: Mappers.VpnProfileResponse, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.vpnClientParams, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualWANName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const putBastionShareableLinkNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BastionShareableLinkListResult, - }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getBastionShareableLinkNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BastionShareableLinkListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getActiveSessionsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BastionActiveSessionListResult, - }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const disconnectActiveSessionsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BastionSessionDeleteResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/adminRuleCollections.ts b/sdk/network/arm-network/src/operations/adminRuleCollections.ts deleted file mode 100644 index 00ae4382c607..000000000000 --- a/sdk/network/arm-network/src/operations/adminRuleCollections.ts +++ /dev/null @@ -1,452 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { AdminRuleCollections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - AdminRuleCollection, - AdminRuleCollectionsListNextOptionalParams, - AdminRuleCollectionsListOptionalParams, - AdminRuleCollectionsListResponse, - AdminRuleCollectionsGetOptionalParams, - AdminRuleCollectionsGetResponse, - AdminRuleCollectionsCreateOrUpdateOptionalParams, - AdminRuleCollectionsCreateOrUpdateResponse, - AdminRuleCollectionsDeleteOptionalParams, - AdminRuleCollectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AdminRuleCollections operations. */ -export class AdminRuleCollectionsImpl implements AdminRuleCollections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class AdminRuleCollections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the rule collections in a security admin configuration, in a paginated format. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: AdminRuleCollectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: AdminRuleCollectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AdminRuleCollectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, configurationName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - configurationName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: AdminRuleCollectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - options, - )) { - yield* page; - } - } - - /** - * Lists all the rule collections in a security admin configuration, in a paginated format. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: AdminRuleCollectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, configurationName, options }, - listOperationSpec, - ); - } - - /** - * Gets a network manager security admin configuration rule collection. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: AdminRuleCollectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates an admin rule collection. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleCollection The Rule Collection to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleCollection: AdminRuleCollection, - options?: AdminRuleCollectionsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes an admin rule collection. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: AdminRuleCollectionsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes an admin rule collection. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: AdminRuleCollectionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - nextLink: string, - options?: AdminRuleCollectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AdminRuleCollectionListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.configurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AdminRuleCollection, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.configurationName, - Parameters.ruleCollectionName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AdminRuleCollection, - }, - 201: { - bodyMapper: Mappers.AdminRuleCollection, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - requestBody: Parameters.ruleCollection1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.configurationName, - Parameters.ruleCollectionName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.configurationName, - Parameters.ruleCollectionName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AdminRuleCollectionListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName1, - Parameters.configurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/adminRules.ts b/sdk/network/arm-network/src/operations/adminRules.ts deleted file mode 100644 index 5a3295aec68c..000000000000 --- a/sdk/network/arm-network/src/operations/adminRules.ts +++ /dev/null @@ -1,494 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { AdminRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - BaseAdminRuleUnion, - AdminRulesListNextOptionalParams, - AdminRulesListOptionalParams, - AdminRulesListResponse, - AdminRulesGetOptionalParams, - AdminRulesGetResponse, - AdminRulesCreateOrUpdateOptionalParams, - AdminRulesCreateOrUpdateResponse, - AdminRulesDeleteOptionalParams, - AdminRulesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AdminRules operations. */ -export class AdminRulesImpl implements AdminRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class AdminRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List all network manager security configuration admin rules. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: AdminRulesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: AdminRulesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AdminRulesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: AdminRulesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - )) { - yield* page; - } - } - - /** - * List all network manager security configuration admin rules. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: AdminRulesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - }, - listOperationSpec, - ); - } - - /** - * Gets a network manager security configuration admin rule. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: AdminRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates an admin rule. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param adminRule The admin rule to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - adminRule: BaseAdminRuleUnion, - options?: AdminRulesCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - adminRule, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes an admin rule. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: AdminRulesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes an admin rule. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: AdminRulesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - nextLink: string, - options?: AdminRulesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AdminRuleListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.configurationName, - Parameters.ruleCollectionName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BaseAdminRule, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.configurationName, - Parameters.ruleCollectionName1, - Parameters.ruleName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.BaseAdminRule, - }, - 201: { - bodyMapper: Mappers.BaseAdminRule, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - requestBody: Parameters.adminRule, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.configurationName, - Parameters.ruleCollectionName1, - Parameters.ruleName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.configurationName, - Parameters.ruleCollectionName1, - Parameters.ruleName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AdminRuleListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName1, - Parameters.configurationName, - Parameters.ruleCollectionName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/applicationGatewayPrivateEndpointConnections.ts b/sdk/network/arm-network/src/operations/applicationGatewayPrivateEndpointConnections.ts deleted file mode 100644 index 453c1d02037c..000000000000 --- a/sdk/network/arm-network/src/operations/applicationGatewayPrivateEndpointConnections.ts +++ /dev/null @@ -1,489 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ApplicationGatewayPrivateEndpointConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ApplicationGatewayPrivateEndpointConnection, - ApplicationGatewayPrivateEndpointConnectionsListNextOptionalParams, - ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, - ApplicationGatewayPrivateEndpointConnectionsListResponse, - ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, - ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, - ApplicationGatewayPrivateEndpointConnectionsUpdateResponse, - ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams, - ApplicationGatewayPrivateEndpointConnectionsGetResponse, - ApplicationGatewayPrivateEndpointConnectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApplicationGatewayPrivateEndpointConnections operations. */ -export class ApplicationGatewayPrivateEndpointConnectionsImpl implements ApplicationGatewayPrivateEndpointConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ApplicationGatewayPrivateEndpointConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all private endpoint connections on an application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, applicationGatewayName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, applicationGatewayName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApplicationGatewayPrivateEndpointConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, applicationGatewayName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - applicationGatewayName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - applicationGatewayName, - options, - )) { - yield* page; - } - } - - /** - * Deletes the specified private endpoint connection on application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param connectionName The name of the application gateway private endpoint connection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - applicationGatewayName: string, - connectionName: string, - options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - applicationGatewayName, - connectionName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified private endpoint connection on application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param connectionName The name of the application gateway private endpoint connection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - applicationGatewayName: string, - connectionName: string, - options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - applicationGatewayName, - connectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the specified private endpoint connection on application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param connectionName The name of the application gateway private endpoint connection. - * @param parameters Parameters supplied to update application gateway private endpoint connection - * operation. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - applicationGatewayName: string, - connectionName: string, - parameters: ApplicationGatewayPrivateEndpointConnection, - options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationGatewayPrivateEndpointConnectionsUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - applicationGatewayName, - connectionName, - parameters, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - ApplicationGatewayPrivateEndpointConnectionsUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates the specified private endpoint connection on application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param connectionName The name of the application gateway private endpoint connection. - * @param parameters Parameters supplied to update application gateway private endpoint connection - * operation. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - applicationGatewayName: string, - connectionName: string, - parameters: ApplicationGatewayPrivateEndpointConnection, - options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - applicationGatewayName, - connectionName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified private endpoint connection on application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param connectionName The name of the application gateway private endpoint connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - applicationGatewayName: string, - connectionName: string, - options?: ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationGatewayName, connectionName, options }, - getOperationSpec, - ); - } - - /** - * Lists all private endpoint connections on an application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationGatewayName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - applicationGatewayName: string, - nextLink: string, - options?: ApplicationGatewayPrivateEndpointConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationGatewayName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - Parameters.connectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayPrivateEndpointConnection, - }, - 201: { - bodyMapper: Mappers.ApplicationGatewayPrivateEndpointConnection, - }, - 202: { - bodyMapper: Mappers.ApplicationGatewayPrivateEndpointConnection, - }, - 204: { - bodyMapper: Mappers.ApplicationGatewayPrivateEndpointConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - Parameters.connectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayPrivateEndpointConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - Parameters.connectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayPrivateEndpointConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayPrivateEndpointConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/applicationGatewayPrivateLinkResources.ts b/sdk/network/arm-network/src/operations/applicationGatewayPrivateLinkResources.ts deleted file mode 100644 index 34d16da1a5c7..000000000000 --- a/sdk/network/arm-network/src/operations/applicationGatewayPrivateLinkResources.ts +++ /dev/null @@ -1,186 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ApplicationGatewayPrivateLinkResources } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ApplicationGatewayPrivateLinkResource, - ApplicationGatewayPrivateLinkResourcesListNextOptionalParams, - ApplicationGatewayPrivateLinkResourcesListOptionalParams, - ApplicationGatewayPrivateLinkResourcesListResponse, - ApplicationGatewayPrivateLinkResourcesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApplicationGatewayPrivateLinkResources operations. */ -export class ApplicationGatewayPrivateLinkResourcesImpl implements ApplicationGatewayPrivateLinkResources { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ApplicationGatewayPrivateLinkResources class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all private link resources on an application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewayPrivateLinkResourcesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, applicationGatewayName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, applicationGatewayName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewayPrivateLinkResourcesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApplicationGatewayPrivateLinkResourcesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, applicationGatewayName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - applicationGatewayName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewayPrivateLinkResourcesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - applicationGatewayName, - options, - )) { - yield* page; - } - } - - /** - * Lists all private link resources on an application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewayPrivateLinkResourcesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationGatewayName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - applicationGatewayName: string, - nextLink: string, - options?: ApplicationGatewayPrivateLinkResourcesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationGatewayName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateLinkResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayPrivateLinkResourceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayPrivateLinkResourceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/applicationGatewayWafDynamicManifests.ts b/sdk/network/arm-network/src/operations/applicationGatewayWafDynamicManifests.ts deleted file mode 100644 index 983d1ee0c3fa..000000000000 --- a/sdk/network/arm-network/src/operations/applicationGatewayWafDynamicManifests.ts +++ /dev/null @@ -1,157 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ApplicationGatewayWafDynamicManifests } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ApplicationGatewayWafDynamicManifestResult, - ApplicationGatewayWafDynamicManifestsGetNextOptionalParams, - ApplicationGatewayWafDynamicManifestsGetOptionalParams, - ApplicationGatewayWafDynamicManifestsGetResponse, - ApplicationGatewayWafDynamicManifestsGetNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApplicationGatewayWafDynamicManifests operations. */ -export class ApplicationGatewayWafDynamicManifestsImpl implements ApplicationGatewayWafDynamicManifests { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ApplicationGatewayWafDynamicManifests class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets the regional application gateway waf manifest. - * @param location The region where the nrp are located at. - * @param options The options parameters. - */ - public list( - location: string, - options?: ApplicationGatewayWafDynamicManifestsGetOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.getPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.getPagingPage(location, options, settings); - }, - }; - } - - private async *getPagingPage( - location: string, - options?: ApplicationGatewayWafDynamicManifestsGetOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApplicationGatewayWafDynamicManifestsGetResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._get(location, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._getNext(location, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *getPagingAll( - location: string, - options?: ApplicationGatewayWafDynamicManifestsGetOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.getPagingPage(location, options)) { - yield* page; - } - } - - /** - * Gets the regional application gateway waf manifest. - * @param location The region where the nrp are located at. - * @param options The options parameters. - */ - private _get( - location: string, - options?: ApplicationGatewayWafDynamicManifestsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, options }, getOperationSpec); - } - - /** - * GetNext - * @param location The region where the nrp are located at. - * @param nextLink The nextLink from the previous successful call to the Get method. - * @param options The options parameters. - */ - private _getNext( - location: string, - nextLink: string, - options?: ApplicationGatewayWafDynamicManifestsGetNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, nextLink, options }, getNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayWafDynamicManifestResultList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; -const getNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayWafDynamicManifestResultList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/applicationGatewayWafDynamicManifestsDefault.ts b/sdk/network/arm-network/src/operations/applicationGatewayWafDynamicManifestsDefault.ts deleted file mode 100644 index 18fa19671e06..000000000000 --- a/sdk/network/arm-network/src/operations/applicationGatewayWafDynamicManifestsDefault.ts +++ /dev/null @@ -1,59 +0,0 @@ -// 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 type { ApplicationGatewayWafDynamicManifestsDefault } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams, - ApplicationGatewayWafDynamicManifestsDefaultGetResponse, -} from "../models/index.js"; - -/** Class containing ApplicationGatewayWafDynamicManifestsDefault operations. */ -export class ApplicationGatewayWafDynamicManifestsDefaultImpl implements ApplicationGatewayWafDynamicManifestsDefault { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ApplicationGatewayWafDynamicManifestsDefault class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets the regional application gateway waf manifest. - * @param location The region where the nrp are located at. - * @param options The options parameters. - */ - get( - location: string, - options?: ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, options }, getOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests/dafault", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayWafDynamicManifestResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/applicationGateways.ts b/sdk/network/arm-network/src/operations/applicationGateways.ts deleted file mode 100644 index 30464d0c52b6..000000000000 --- a/sdk/network/arm-network/src/operations/applicationGateways.ts +++ /dev/null @@ -1,1342 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ApplicationGateways } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ApplicationGateway, - ApplicationGatewaysListNextOptionalParams, - ApplicationGatewaysListOptionalParams, - ApplicationGatewaysListResponse, - ApplicationGatewaysListAllNextOptionalParams, - ApplicationGatewaysListAllOptionalParams, - ApplicationGatewaysListAllResponse, - ApplicationGatewaySslPredefinedPolicy, - ApplicationGatewaysListAvailableSslPredefinedPoliciesNextOptionalParams, - ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, - ApplicationGatewaysListAvailableSslPredefinedPoliciesResponse, - ApplicationGatewaysDeleteOptionalParams, - ApplicationGatewaysGetOptionalParams, - ApplicationGatewaysGetResponse, - ApplicationGatewaysCreateOrUpdateOptionalParams, - ApplicationGatewaysCreateOrUpdateResponse, - TagsObject, - ApplicationGatewaysUpdateTagsOptionalParams, - ApplicationGatewaysUpdateTagsResponse, - ApplicationGatewaysStartOptionalParams, - ApplicationGatewaysStopOptionalParams, - ApplicationGatewaysBackendHealthOptionalParams, - ApplicationGatewaysBackendHealthResponse, - ApplicationGatewayOnDemandProbe, - ApplicationGatewaysBackendHealthOnDemandOptionalParams, - ApplicationGatewaysBackendHealthOnDemandResponse, - ApplicationGatewaysListAvailableServerVariablesOptionalParams, - ApplicationGatewaysListAvailableServerVariablesResponse, - ApplicationGatewaysListAvailableRequestHeadersOptionalParams, - ApplicationGatewaysListAvailableRequestHeadersResponse, - ApplicationGatewaysListAvailableResponseHeadersOptionalParams, - ApplicationGatewaysListAvailableResponseHeadersResponse, - ApplicationGatewaysListAvailableWafRuleSetsOptionalParams, - ApplicationGatewaysListAvailableWafRuleSetsResponse, - ApplicationGatewaysListAvailableSslOptionsOptionalParams, - ApplicationGatewaysListAvailableSslOptionsResponse, - ApplicationGatewaysGetSslPredefinedPolicyOptionalParams, - ApplicationGatewaysGetSslPredefinedPolicyResponse, - ApplicationGatewaysListNextResponse, - ApplicationGatewaysListAllNextResponse, - ApplicationGatewaysListAvailableSslPredefinedPoliciesNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApplicationGateways operations. */ -export class ApplicationGatewaysImpl implements ApplicationGateways { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ApplicationGateways class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all application gateways in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: ApplicationGatewaysListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: ApplicationGatewaysListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApplicationGatewaysListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: ApplicationGatewaysListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all the application gateways in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: ApplicationGatewaysListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: ApplicationGatewaysListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApplicationGatewaysListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: ApplicationGatewaysListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Lists all SSL predefined policies for configuring Ssl policy. - * @param options The options parameters. - */ - public listAvailableSslPredefinedPolicies( - options?: ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAvailableSslPredefinedPoliciesPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAvailableSslPredefinedPoliciesPagingPage(options, settings); - }, - }; - } - - private async *listAvailableSslPredefinedPoliciesPagingPage( - options?: ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApplicationGatewaysListAvailableSslPredefinedPoliciesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAvailableSslPredefinedPolicies(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAvailableSslPredefinedPoliciesNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAvailableSslPredefinedPoliciesPagingAll( - options?: ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAvailableSslPredefinedPoliciesPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, applicationGatewayName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, applicationGatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationGatewayName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param parameters Parameters supplied to the create or update application gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - applicationGatewayName: string, - parameters: ApplicationGateway, - options?: ApplicationGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationGatewaysCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, applicationGatewayName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ApplicationGatewaysCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param parameters Parameters supplied to the create or update application gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - applicationGatewayName: string, - parameters: ApplicationGateway, - options?: ApplicationGatewaysCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - applicationGatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the specified application gateway tags. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param parameters Parameters supplied to update application gateway tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - applicationGatewayName: string, - parameters: TagsObject, - options?: ApplicationGatewaysUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationGatewayName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Lists all application gateways in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: ApplicationGatewaysListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all the application gateways in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: ApplicationGatewaysListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Starts the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - async beginStart( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysStartOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, applicationGatewayName, options }, - spec: startOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Starts the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - async beginStartAndWait( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysStartOptionalParams, - ): Promise { - const poller = await this.beginStart(resourceGroupName, applicationGatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Stops the specified application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - async beginStop( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysStopOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, applicationGatewayName, options }, - spec: stopOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Stops the specified application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - async beginStopAndWait( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysStopOptionalParams, - ): Promise { - const poller = await this.beginStop(resourceGroupName, applicationGatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the backend health of the specified application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - async beginBackendHealth( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysBackendHealthOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationGatewaysBackendHealthResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, applicationGatewayName, options }, - spec: backendHealthOperationSpec, - }); - const poller = await createHttpPoller< - ApplicationGatewaysBackendHealthResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the backend health of the specified application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - async beginBackendHealthAndWait( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysBackendHealthOptionalParams, - ): Promise { - const poller = await this.beginBackendHealth( - resourceGroupName, - applicationGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the backend health for given combination of backend pool and http setting of the specified - * application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param probeRequest Request body for on-demand test probe operation. - * @param options The options parameters. - */ - async beginBackendHealthOnDemand( - resourceGroupName: string, - applicationGatewayName: string, - probeRequest: ApplicationGatewayOnDemandProbe, - options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationGatewaysBackendHealthOnDemandResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - applicationGatewayName, - probeRequest, - options, - }, - spec: backendHealthOnDemandOperationSpec, - }); - const poller = await createHttpPoller< - ApplicationGatewaysBackendHealthOnDemandResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the backend health for given combination of backend pool and http setting of the specified - * application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param probeRequest Request body for on-demand test probe operation. - * @param options The options parameters. - */ - async beginBackendHealthOnDemandAndWait( - resourceGroupName: string, - applicationGatewayName: string, - probeRequest: ApplicationGatewayOnDemandProbe, - options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams, - ): Promise { - const poller = await this.beginBackendHealthOnDemand( - resourceGroupName, - applicationGatewayName, - probeRequest, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all available server variables. - * @param options The options parameters. - */ - listAvailableServerVariables( - options?: ApplicationGatewaysListAvailableServerVariablesOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAvailableServerVariablesOperationSpec); - } - - /** - * Lists all available request headers. - * @param options The options parameters. - */ - listAvailableRequestHeaders( - options?: ApplicationGatewaysListAvailableRequestHeadersOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAvailableRequestHeadersOperationSpec); - } - - /** - * Lists all available response headers. - * @param options The options parameters. - */ - listAvailableResponseHeaders( - options?: ApplicationGatewaysListAvailableResponseHeadersOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAvailableResponseHeadersOperationSpec); - } - - /** - * Lists all available web application firewall rule sets. - * @param options The options parameters. - */ - listAvailableWafRuleSets( - options?: ApplicationGatewaysListAvailableWafRuleSetsOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAvailableWafRuleSetsOperationSpec); - } - - /** - * Lists available Ssl options for configuring Ssl policy. - * @param options The options parameters. - */ - listAvailableSslOptions( - options?: ApplicationGatewaysListAvailableSslOptionsOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAvailableSslOptionsOperationSpec); - } - - /** - * Lists all SSL predefined policies for configuring Ssl policy. - * @param options The options parameters. - */ - private _listAvailableSslPredefinedPolicies( - options?: ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listAvailableSslPredefinedPoliciesOperationSpec, - ); - } - - /** - * Gets Ssl predefined policy with the specified policy name. - * @param predefinedPolicyName Name of Ssl predefined policy. - * @param options The options parameters. - */ - getSslPredefinedPolicy( - predefinedPolicyName: string, - options?: ApplicationGatewaysGetSslPredefinedPolicyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { predefinedPolicyName, options }, - getSslPredefinedPolicyOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: ApplicationGatewaysListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: ApplicationGatewaysListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListAvailableSslPredefinedPoliciesNext - * @param nextLink The nextLink from the previous successful call to the - * ListAvailableSslPredefinedPolicies method. - * @param options The options parameters. - */ - private _listAvailableSslPredefinedPoliciesNext( - nextLink: string, - options?: ApplicationGatewaysListAvailableSslPredefinedPoliciesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listAvailableSslPredefinedPoliciesNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGateway, - }, - 201: { - bodyMapper: Mappers.ApplicationGateway, - }, - 202: { - bodyMapper: Mappers.ApplicationGateway, - }, - 204: { - bodyMapper: Mappers.ApplicationGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const startOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const stopOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const backendHealthOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayBackendHealth, - }, - 201: { - bodyMapper: Mappers.ApplicationGatewayBackendHealth, - }, - 202: { - bodyMapper: Mappers.ApplicationGatewayBackendHealth, - }, - 204: { - bodyMapper: Mappers.ApplicationGatewayBackendHealth, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const backendHealthOnDemandOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayBackendHealthOnDemand, - }, - 201: { - bodyMapper: Mappers.ApplicationGatewayBackendHealthOnDemand, - }, - 202: { - bodyMapper: Mappers.ApplicationGatewayBackendHealthOnDemand, - }, - 204: { - bodyMapper: Mappers.ApplicationGatewayBackendHealthOnDemand, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.probeRequest, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.applicationGatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAvailableServerVariablesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { name: "Sequence", element: { type: { name: "String" } } }, - }, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAvailableRequestHeadersOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { name: "Sequence", element: { type: { name: "String" } } }, - }, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAvailableResponseHeadersOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { name: "Sequence", element: { type: { name: "String" } } }, - }, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAvailableWafRuleSetsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayAvailableWafRuleSetsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAvailableSslOptionsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayAvailableSslOptions, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAvailableSslPredefinedPoliciesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayAvailableSslPredefinedPolicies, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getSslPredefinedPolicyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewaySslPredefinedPolicy, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.predefinedPolicyName], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listAvailableSslPredefinedPoliciesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationGatewayAvailableSslPredefinedPolicies, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/applicationSecurityGroups.ts b/sdk/network/arm-network/src/operations/applicationSecurityGroups.ts deleted file mode 100644 index 3449c1170292..000000000000 --- a/sdk/network/arm-network/src/operations/applicationSecurityGroups.ts +++ /dev/null @@ -1,592 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ApplicationSecurityGroups } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ApplicationSecurityGroup, - ApplicationSecurityGroupsListAllNextOptionalParams, - ApplicationSecurityGroupsListAllOptionalParams, - ApplicationSecurityGroupsListAllResponse, - ApplicationSecurityGroupsListNextOptionalParams, - ApplicationSecurityGroupsListOptionalParams, - ApplicationSecurityGroupsListResponse, - ApplicationSecurityGroupsDeleteOptionalParams, - ApplicationSecurityGroupsGetOptionalParams, - ApplicationSecurityGroupsGetResponse, - ApplicationSecurityGroupsCreateOrUpdateOptionalParams, - ApplicationSecurityGroupsCreateOrUpdateResponse, - TagsObject, - ApplicationSecurityGroupsUpdateTagsOptionalParams, - ApplicationSecurityGroupsUpdateTagsResponse, - ApplicationSecurityGroupsListAllNextResponse, - ApplicationSecurityGroupsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApplicationSecurityGroups operations. */ -export class ApplicationSecurityGroupsImpl implements ApplicationSecurityGroups { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ApplicationSecurityGroups class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all application security groups in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: ApplicationSecurityGroupsListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: ApplicationSecurityGroupsListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApplicationSecurityGroupsListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: ApplicationSecurityGroupsListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all the application security groups in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: ApplicationSecurityGroupsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: ApplicationSecurityGroupsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApplicationSecurityGroupsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: ApplicationSecurityGroupsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified application security group. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - applicationSecurityGroupName: string, - options?: ApplicationSecurityGroupsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, applicationSecurityGroupName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified application security group. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - applicationSecurityGroupName: string, - options?: ApplicationSecurityGroupsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, applicationSecurityGroupName, options); - return poller.pollUntilDone(); - } - - /** - * Gets information about the specified application security group. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - applicationSecurityGroupName: string, - options?: ApplicationSecurityGroupsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationSecurityGroupName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates an application security group. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - applicationSecurityGroupName: string, - parameters: ApplicationSecurityGroup, - options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationSecurityGroupsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - applicationSecurityGroupName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ApplicationSecurityGroupsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates an application security group. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - applicationSecurityGroupName: string, - parameters: ApplicationSecurityGroup, - options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - applicationSecurityGroupName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates an application security group's tags. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to update application security group tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - applicationSecurityGroupName: string, - parameters: TagsObject, - options?: ApplicationSecurityGroupsUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationSecurityGroupName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all application security groups in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: ApplicationSecurityGroupsListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all the application security groups in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: ApplicationSecurityGroupsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: ApplicationSecurityGroupsListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: ApplicationSecurityGroupsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.applicationSecurityGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationSecurityGroup, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.applicationSecurityGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApplicationSecurityGroup, - }, - 201: { - bodyMapper: Mappers.ApplicationSecurityGroup, - }, - 202: { - bodyMapper: Mappers.ApplicationSecurityGroup, - }, - 204: { - bodyMapper: Mappers.ApplicationSecurityGroup, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.applicationSecurityGroupName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApplicationSecurityGroup, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.applicationSecurityGroupName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationSecurityGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationSecurityGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationSecurityGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationSecurityGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/availableDelegations.ts b/sdk/network/arm-network/src/operations/availableDelegations.ts deleted file mode 100644 index 41c5b5669060..000000000000 --- a/sdk/network/arm-network/src/operations/availableDelegations.ts +++ /dev/null @@ -1,157 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { AvailableDelegations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - AvailableDelegation, - AvailableDelegationsListNextOptionalParams, - AvailableDelegationsListOptionalParams, - AvailableDelegationsListResponse, - AvailableDelegationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AvailableDelegations operations. */ -export class AvailableDelegationsImpl implements AvailableDelegations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class AvailableDelegations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all of the available subnet delegations for this subscription in this region. - * @param location The location of the subnet. - * @param options The options parameters. - */ - public list( - location: string, - options?: AvailableDelegationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(location, options, settings); - }, - }; - } - - private async *listPagingPage( - location: string, - options?: AvailableDelegationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AvailableDelegationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(location, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(location, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - location: string, - options?: AvailableDelegationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(location, options)) { - yield* page; - } - } - - /** - * Gets all of the available subnet delegations for this subscription in this region. - * @param location The location of the subnet. - * @param options The options parameters. - */ - private _list( - location: string, - options?: AvailableDelegationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, options }, listOperationSpec); - } - - /** - * ListNext - * @param location The location of the subnet. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - location: string, - nextLink: string, - options?: AvailableDelegationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailableDelegationsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailableDelegationsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/availableEndpointServices.ts b/sdk/network/arm-network/src/operations/availableEndpointServices.ts deleted file mode 100644 index e3f8dd441914..000000000000 --- a/sdk/network/arm-network/src/operations/availableEndpointServices.ts +++ /dev/null @@ -1,157 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { AvailableEndpointServices } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - EndpointServiceResult, - AvailableEndpointServicesListNextOptionalParams, - AvailableEndpointServicesListOptionalParams, - AvailableEndpointServicesListResponse, - AvailableEndpointServicesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AvailableEndpointServices operations. */ -export class AvailableEndpointServicesImpl implements AvailableEndpointServices { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class AvailableEndpointServices class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List what values of endpoint services are available for use. - * @param location The location to check available endpoint services. - * @param options The options parameters. - */ - public list( - location: string, - options?: AvailableEndpointServicesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(location, options, settings); - }, - }; - } - - private async *listPagingPage( - location: string, - options?: AvailableEndpointServicesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AvailableEndpointServicesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(location, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(location, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - location: string, - options?: AvailableEndpointServicesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(location, options)) { - yield* page; - } - } - - /** - * List what values of endpoint services are available for use. - * @param location The location to check available endpoint services. - * @param options The options parameters. - */ - private _list( - location: string, - options?: AvailableEndpointServicesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, options }, listOperationSpec); - } - - /** - * ListNext - * @param location The location to check available endpoint services. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - location: string, - nextLink: string, - options?: AvailableEndpointServicesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EndpointServicesListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EndpointServicesListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/availablePrivateEndpointTypes.ts b/sdk/network/arm-network/src/operations/availablePrivateEndpointTypes.ts deleted file mode 100644 index e10cd7d99b4d..000000000000 --- a/sdk/network/arm-network/src/operations/availablePrivateEndpointTypes.ts +++ /dev/null @@ -1,314 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { AvailablePrivateEndpointTypes } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - AvailablePrivateEndpointType, - AvailablePrivateEndpointTypesListNextOptionalParams, - AvailablePrivateEndpointTypesListOptionalParams, - AvailablePrivateEndpointTypesListResponse, - AvailablePrivateEndpointTypesListByResourceGroupNextOptionalParams, - AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, - AvailablePrivateEndpointTypesListByResourceGroupResponse, - AvailablePrivateEndpointTypesListNextResponse, - AvailablePrivateEndpointTypesListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AvailablePrivateEndpointTypes operations. */ -export class AvailablePrivateEndpointTypesImpl implements AvailablePrivateEndpointTypes { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class AvailablePrivateEndpointTypes class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in - * this region. - * @param location The location of the domain name. - * @param options The options parameters. - */ - public list( - location: string, - options?: AvailablePrivateEndpointTypesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(location, options, settings); - }, - }; - } - - private async *listPagingPage( - location: string, - options?: AvailablePrivateEndpointTypesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AvailablePrivateEndpointTypesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(location, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(location, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - location: string, - options?: AvailablePrivateEndpointTypesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(location, options)) { - yield* page; - } - } - - /** - * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in - * this region. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - location: string, - resourceGroupName: string, - options?: AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(location, resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(location, resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - location: string, - resourceGroupName: string, - options?: AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AvailablePrivateEndpointTypesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(location, resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - location, - resourceGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - location: string, - resourceGroupName: string, - options?: AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - location, - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in - * this region. - * @param location The location of the domain name. - * @param options The options parameters. - */ - private _list( - location: string, - options?: AvailablePrivateEndpointTypesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, options }, listOperationSpec); - } - - /** - * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in - * this region. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - location: string, - resourceGroupName: string, - options?: AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * ListNext - * @param location The location of the domain name. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - location: string, - nextLink: string, - options?: AvailablePrivateEndpointTypesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, nextLink, options }, listNextOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - location: string, - resourceGroupName: string, - nextLink: string, - options?: AvailablePrivateEndpointTypesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailablePrivateEndpointTypesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailablePrivateEndpointTypesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailablePrivateEndpointTypesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailablePrivateEndpointTypesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/availableResourceGroupDelegations.ts b/sdk/network/arm-network/src/operations/availableResourceGroupDelegations.ts deleted file mode 100644 index eb99d79e8f32..000000000000 --- a/sdk/network/arm-network/src/operations/availableResourceGroupDelegations.ts +++ /dev/null @@ -1,177 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { AvailableResourceGroupDelegations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - AvailableDelegation, - AvailableResourceGroupDelegationsListNextOptionalParams, - AvailableResourceGroupDelegationsListOptionalParams, - AvailableResourceGroupDelegationsListResponse, - AvailableResourceGroupDelegationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AvailableResourceGroupDelegations operations. */ -export class AvailableResourceGroupDelegationsImpl implements AvailableResourceGroupDelegations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class AvailableResourceGroupDelegations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all of the available subnet delegations for this resource group in this region. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - location: string, - resourceGroupName: string, - options?: AvailableResourceGroupDelegationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(location, resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(location, resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - location: string, - resourceGroupName: string, - options?: AvailableResourceGroupDelegationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AvailableResourceGroupDelegationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(location, resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(location, resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - location: string, - resourceGroupName: string, - options?: AvailableResourceGroupDelegationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(location, resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all of the available subnet delegations for this resource group in this region. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - location: string, - resourceGroupName: string, - options?: AvailableResourceGroupDelegationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, resourceGroupName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - location: string, - resourceGroupName: string, - nextLink: string, - options?: AvailableResourceGroupDelegationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableDelegations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailableDelegationsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailableDelegationsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/availableServiceAliases.ts b/sdk/network/arm-network/src/operations/availableServiceAliases.ts deleted file mode 100644 index 02acbb3931b8..000000000000 --- a/sdk/network/arm-network/src/operations/availableServiceAliases.ts +++ /dev/null @@ -1,310 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { AvailableServiceAliases } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - AvailableServiceAlias, - AvailableServiceAliasesListNextOptionalParams, - AvailableServiceAliasesListOptionalParams, - AvailableServiceAliasesListResponse, - AvailableServiceAliasesListByResourceGroupNextOptionalParams, - AvailableServiceAliasesListByResourceGroupOptionalParams, - AvailableServiceAliasesListByResourceGroupResponse, - AvailableServiceAliasesListNextResponse, - AvailableServiceAliasesListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AvailableServiceAliases operations. */ -export class AvailableServiceAliasesImpl implements AvailableServiceAliases { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class AvailableServiceAliases class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all available service aliases for this subscription in this region. - * @param location The location. - * @param options The options parameters. - */ - public list( - location: string, - options?: AvailableServiceAliasesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(location, options, settings); - }, - }; - } - - private async *listPagingPage( - location: string, - options?: AvailableServiceAliasesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AvailableServiceAliasesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(location, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(location, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - location: string, - options?: AvailableServiceAliasesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(location, options)) { - yield* page; - } - } - - /** - * Gets all available service aliases for this resource group in this region. - * @param resourceGroupName The name of the resource group. - * @param location The location. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - location: string, - options?: AvailableServiceAliasesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, location, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - location: string, - options?: AvailableServiceAliasesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AvailableServiceAliasesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, location, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - location, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - location: string, - options?: AvailableServiceAliasesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - location, - options, - )) { - yield* page; - } - } - - /** - * Gets all available service aliases for this subscription in this region. - * @param location The location. - * @param options The options parameters. - */ - private _list( - location: string, - options?: AvailableServiceAliasesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, options }, listOperationSpec); - } - - /** - * Gets all available service aliases for this resource group in this region. - * @param resourceGroupName The name of the resource group. - * @param location The location. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - location: string, - options?: AvailableServiceAliasesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, location, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * ListNext - * @param location The location. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - location: string, - nextLink: string, - options?: AvailableServiceAliasesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, nextLink, options }, listNextOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param location The location. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - location: string, - nextLink: string, - options?: AvailableServiceAliasesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, location, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableServiceAliases", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailableServiceAliasesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableServiceAliases", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailableServiceAliasesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailableServiceAliasesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailableServiceAliasesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/azureFirewallFqdnTags.ts b/sdk/network/arm-network/src/operations/azureFirewallFqdnTags.ts deleted file mode 100644 index 66ffb7cda05b..000000000000 --- a/sdk/network/arm-network/src/operations/azureFirewallFqdnTags.ts +++ /dev/null @@ -1,144 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { AzureFirewallFqdnTags } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - AzureFirewallFqdnTag, - AzureFirewallFqdnTagsListAllNextOptionalParams, - AzureFirewallFqdnTagsListAllOptionalParams, - AzureFirewallFqdnTagsListAllResponse, - AzureFirewallFqdnTagsListAllNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AzureFirewallFqdnTags operations. */ -export class AzureFirewallFqdnTagsImpl implements AzureFirewallFqdnTags { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class AzureFirewallFqdnTags class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the Azure Firewall FQDN Tags in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: AzureFirewallFqdnTagsListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: AzureFirewallFqdnTagsListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AzureFirewallFqdnTagsListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: AzureFirewallFqdnTagsListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all the Azure Firewall FQDN Tags in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: AzureFirewallFqdnTagsListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: AzureFirewallFqdnTagsListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureFirewallFqdnTagListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureFirewallFqdnTagListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/azureFirewalls.ts b/sdk/network/arm-network/src/operations/azureFirewalls.ts deleted file mode 100644 index 32cdb55f22f1..000000000000 --- a/sdk/network/arm-network/src/operations/azureFirewalls.ts +++ /dev/null @@ -1,1049 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { AzureFirewalls } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - AzureFirewall, - AzureFirewallsListNextOptionalParams, - AzureFirewallsListOptionalParams, - AzureFirewallsListResponse, - AzureFirewallsListAllNextOptionalParams, - AzureFirewallsListAllOptionalParams, - AzureFirewallsListAllResponse, - AzureFirewallsDeleteOptionalParams, - AzureFirewallsGetOptionalParams, - AzureFirewallsGetResponse, - AzureFirewallsCreateOrUpdateOptionalParams, - AzureFirewallsCreateOrUpdateResponse, - TagsObject, - AzureFirewallsUpdateTagsOptionalParams, - AzureFirewallsUpdateTagsResponse, - AzureFirewallsListLearnedPrefixesOptionalParams, - AzureFirewallsListLearnedPrefixesResponse, - FirewallPacketCaptureParameters, - AzureFirewallsPacketCaptureOptionalParams, - AzureFirewallsPacketCaptureResponse, - AzureFirewallsPacketCaptureOperationOptionalParams, - AzureFirewallsPacketCaptureOperationResponse, - AzureFirewallsListNextResponse, - AzureFirewallsListAllNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AzureFirewalls operations. */ -export class AzureFirewallsImpl implements AzureFirewalls { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class AzureFirewalls class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all Azure Firewalls in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: AzureFirewallsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: AzureFirewallsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AzureFirewallsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: AzureFirewallsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all the Azure Firewalls in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: AzureFirewallsListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: AzureFirewallsListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AzureFirewallsListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: AzureFirewallsListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the specified Azure Firewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - azureFirewallName: string, - options?: AzureFirewallsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, azureFirewallName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified Azure Firewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - azureFirewallName: string, - options?: AzureFirewallsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, azureFirewallName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified Azure Firewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - azureFirewallName: string, - options?: AzureFirewallsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, azureFirewallName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the specified Azure Firewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to the create or update Azure Firewall operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - azureFirewallName: string, - parameters: AzureFirewall, - options?: AzureFirewallsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AzureFirewallsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, azureFirewallName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - AzureFirewallsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified Azure Firewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to the create or update Azure Firewall operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - azureFirewallName: string, - parameters: AzureFirewall, - options?: AzureFirewallsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - azureFirewallName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates tags of an Azure Firewall resource. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to update azure firewall tags. - * @param options The options parameters. - */ - async beginUpdateTags( - resourceGroupName: string, - azureFirewallName: string, - parameters: TagsObject, - options?: AzureFirewallsUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AzureFirewallsUpdateTagsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, azureFirewallName, parameters, options }, - spec: updateTagsOperationSpec, - }); - const poller = await createHttpPoller< - AzureFirewallsUpdateTagsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates tags of an Azure Firewall resource. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to update azure firewall tags. - * @param options The options parameters. - */ - async beginUpdateTagsAndWait( - resourceGroupName: string, - azureFirewallName: string, - parameters: TagsObject, - options?: AzureFirewallsUpdateTagsOptionalParams, - ): Promise { - const poller = await this.beginUpdateTags( - resourceGroupName, - azureFirewallName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all Azure Firewalls in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: AzureFirewallsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all the Azure Firewalls in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: AzureFirewallsListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the azure firewall. - * @param options The options parameters. - */ - async beginListLearnedPrefixes( - resourceGroupName: string, - azureFirewallName: string, - options?: AzureFirewallsListLearnedPrefixesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AzureFirewallsListLearnedPrefixesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, azureFirewallName, options }, - spec: listLearnedPrefixesOperationSpec, - }); - const poller = await createHttpPoller< - AzureFirewallsListLearnedPrefixesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the azure firewall. - * @param options The options parameters. - */ - async beginListLearnedPrefixesAndWait( - resourceGroupName: string, - azureFirewallName: string, - options?: AzureFirewallsListLearnedPrefixesOptionalParams, - ): Promise { - const poller = await this.beginListLearnedPrefixes( - resourceGroupName, - azureFirewallName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Runs a packet capture on AzureFirewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to run packet capture on azure firewall. - * @param options The options parameters. - */ - async beginPacketCapture( - resourceGroupName: string, - azureFirewallName: string, - parameters: FirewallPacketCaptureParameters, - options?: AzureFirewallsPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AzureFirewallsPacketCaptureResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, azureFirewallName, parameters, options }, - spec: packetCaptureOperationSpec, - }); - const poller = await createHttpPoller< - AzureFirewallsPacketCaptureResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Runs a packet capture on AzureFirewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to run packet capture on azure firewall. - * @param options The options parameters. - */ - async beginPacketCaptureAndWait( - resourceGroupName: string, - azureFirewallName: string, - parameters: FirewallPacketCaptureParameters, - options?: AzureFirewallsPacketCaptureOptionalParams, - ): Promise { - const poller = await this.beginPacketCapture( - resourceGroupName, - azureFirewallName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Runs a packet capture operation on AzureFirewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the azure firewall. - * @param parameters Parameters supplied to run packet capture on azure firewall. - * @param options The options parameters. - */ - async beginPacketCaptureOperation( - resourceGroupName: string, - azureFirewallName: string, - parameters: FirewallPacketCaptureParameters, - options?: AzureFirewallsPacketCaptureOperationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AzureFirewallsPacketCaptureOperationResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, azureFirewallName, parameters, options }, - spec: packetCaptureOperationOperationSpec, - }); - const poller = await createHttpPoller< - AzureFirewallsPacketCaptureOperationResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Runs a packet capture operation on AzureFirewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the azure firewall. - * @param parameters Parameters supplied to run packet capture on azure firewall. - * @param options The options parameters. - */ - async beginPacketCaptureOperationAndWait( - resourceGroupName: string, - azureFirewallName: string, - parameters: FirewallPacketCaptureParameters, - options?: AzureFirewallsPacketCaptureOperationOptionalParams, - ): Promise { - const poller = await this.beginPacketCaptureOperation( - resourceGroupName, - azureFirewallName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: AzureFirewallsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: AzureFirewallsListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.azureFirewallName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureFirewall, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.azureFirewallName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AzureFirewall, - }, - 201: { - bodyMapper: Mappers.AzureFirewall, - }, - 202: { - bodyMapper: Mappers.AzureFirewall, - }, - 204: { - bodyMapper: Mappers.AzureFirewall, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.azureFirewallName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AzureFirewall, - }, - 201: { - bodyMapper: Mappers.AzureFirewall, - }, - 202: { - bodyMapper: Mappers.AzureFirewall, - }, - 204: { - bodyMapper: Mappers.AzureFirewall, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.azureFirewallName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureFirewallListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureFirewallListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listLearnedPrefixesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/learnedIPPrefixes", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.IPPrefixesList, - }, - 201: { - bodyMapper: Mappers.IPPrefixesList, - }, - 202: { - bodyMapper: Mappers.IPPrefixesList, - }, - 204: { - bodyMapper: Mappers.IPPrefixesList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.azureFirewallName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const packetCaptureOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/packetCapture", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.AzureFirewallsPacketCaptureHeaders, - }, - 201: { - headersMapper: Mappers.AzureFirewallsPacketCaptureHeaders, - }, - 202: { - headersMapper: Mappers.AzureFirewallsPacketCaptureHeaders, - }, - 204: { - headersMapper: Mappers.AzureFirewallsPacketCaptureHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.azureFirewallName2, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const packetCaptureOperationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/packetCaptureOperation", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AzureFirewallPacketCaptureResponse, - }, - 201: { - bodyMapper: Mappers.AzureFirewallPacketCaptureResponse, - }, - 202: { - bodyMapper: Mappers.AzureFirewallPacketCaptureResponse, - }, - 204: { - bodyMapper: Mappers.AzureFirewallPacketCaptureResponse, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.azureFirewallName3, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureFirewallListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureFirewallListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/bastionHosts.ts b/sdk/network/arm-network/src/operations/bastionHosts.ts deleted file mode 100644 index e6b4fd611720..000000000000 --- a/sdk/network/arm-network/src/operations/bastionHosts.ts +++ /dev/null @@ -1,667 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { BastionHosts } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - BastionHost, - BastionHostsListNextOptionalParams, - BastionHostsListOptionalParams, - BastionHostsListResponse, - BastionHostsListByResourceGroupNextOptionalParams, - BastionHostsListByResourceGroupOptionalParams, - BastionHostsListByResourceGroupResponse, - BastionHostsDeleteOptionalParams, - BastionHostsGetOptionalParams, - BastionHostsGetResponse, - BastionHostsCreateOrUpdateOptionalParams, - BastionHostsCreateOrUpdateResponse, - TagsObject, - BastionHostsUpdateTagsOptionalParams, - BastionHostsUpdateTagsResponse, - BastionHostsListNextResponse, - BastionHostsListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing BastionHosts operations. */ -export class BastionHostsImpl implements BastionHosts { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class BastionHosts class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all Bastion Hosts in a subscription. - * @param options The options parameters. - */ - public list(options?: BastionHostsListOptionalParams): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: BastionHostsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: BastionHostsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: BastionHostsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Lists all Bastion Hosts in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: BastionHostsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: BastionHostsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: BastionHostsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: BastionHostsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified Bastion Host. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - bastionHostName: string, - options?: BastionHostsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bastionHostName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified Bastion Host. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - bastionHostName: string, - options?: BastionHostsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, bastionHostName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified Bastion Host. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - bastionHostName: string, - options?: BastionHostsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, bastionHostName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the specified Bastion Host. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param parameters Parameters supplied to the create or update Bastion Host operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - bastionHostName: string, - parameters: BastionHost, - options?: BastionHostsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BastionHostsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bastionHostName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - BastionHostsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified Bastion Host. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param parameters Parameters supplied to the create or update Bastion Host operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - bastionHostName: string, - parameters: BastionHost, - options?: BastionHostsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - bastionHostName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates Tags for BastionHost resource - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param parameters Parameters supplied to update BastionHost tags. - * @param options The options parameters. - */ - async beginUpdateTags( - resourceGroupName: string, - bastionHostName: string, - parameters: TagsObject, - options?: BastionHostsUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike, BastionHostsUpdateTagsResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bastionHostName, parameters, options }, - spec: updateTagsOperationSpec, - }); - const poller = await createHttpPoller< - BastionHostsUpdateTagsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates Tags for BastionHost resource - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param parameters Parameters supplied to update BastionHost tags. - * @param options The options parameters. - */ - async beginUpdateTagsAndWait( - resourceGroupName: string, - bastionHostName: string, - parameters: TagsObject, - options?: BastionHostsUpdateTagsOptionalParams, - ): Promise { - const poller = await this.beginUpdateTags( - resourceGroupName, - bastionHostName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all Bastion Hosts in a subscription. - * @param options The options parameters. - */ - private _list(options?: BastionHostsListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Lists all Bastion Hosts in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: BastionHostsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: BastionHostsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: BastionHostsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BastionHost, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.BastionHost, - }, - 201: { - bodyMapper: Mappers.BastionHost, - }, - 202: { - bodyMapper: Mappers.BastionHost, - }, - 204: { - bodyMapper: Mappers.BastionHost, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.BastionHost, - }, - 201: { - bodyMapper: Mappers.BastionHost, - }, - 202: { - bodyMapper: Mappers.BastionHost, - }, - 204: { - bodyMapper: Mappers.BastionHost, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.bastionHostName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BastionHostListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BastionHostListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BastionHostListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BastionHostListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/bgpServiceCommunities.ts b/sdk/network/arm-network/src/operations/bgpServiceCommunities.ts deleted file mode 100644 index 7e552fc21f1d..000000000000 --- a/sdk/network/arm-network/src/operations/bgpServiceCommunities.ts +++ /dev/null @@ -1,144 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { BgpServiceCommunities } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - BgpServiceCommunity, - BgpServiceCommunitiesListNextOptionalParams, - BgpServiceCommunitiesListOptionalParams, - BgpServiceCommunitiesListResponse, - BgpServiceCommunitiesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing BgpServiceCommunities operations. */ -export class BgpServiceCommunitiesImpl implements BgpServiceCommunities { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class BgpServiceCommunities class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the available bgp service communities. - * @param options The options parameters. - */ - public list( - options?: BgpServiceCommunitiesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: BgpServiceCommunitiesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: BgpServiceCommunitiesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: BgpServiceCommunitiesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all the available bgp service communities. - * @param options The options parameters. - */ - private _list( - options?: BgpServiceCommunitiesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: BgpServiceCommunitiesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BgpServiceCommunityListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BgpServiceCommunityListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/configurationPolicyGroups.ts b/sdk/network/arm-network/src/operations/configurationPolicyGroups.ts deleted file mode 100644 index 61ae9c2672a7..000000000000 --- a/sdk/network/arm-network/src/operations/configurationPolicyGroups.ts +++ /dev/null @@ -1,508 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ConfigurationPolicyGroups } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VpnServerConfigurationPolicyGroup, - ConfigurationPolicyGroupsListByVpnServerConfigurationNextOptionalParams, - ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams, - ConfigurationPolicyGroupsListByVpnServerConfigurationResponse, - ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, - ConfigurationPolicyGroupsCreateOrUpdateResponse, - ConfigurationPolicyGroupsDeleteOptionalParams, - ConfigurationPolicyGroupsGetOptionalParams, - ConfigurationPolicyGroupsGetResponse, - ConfigurationPolicyGroupsListByVpnServerConfigurationNextResponse, -} from "../models/index.js"; - -/// -/** 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: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByVpnServerConfigurationPagingPage( - resourceGroupName, - vpnServerConfigurationName, - options, - settings, - ); - }, - }; - } - - private async *listByVpnServerConfigurationPagingPage( - resourceGroupName: string, - vpnServerConfigurationName: string, - options?: ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ConfigurationPolicyGroupsListByVpnServerConfigurationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVpnServerConfiguration( - resourceGroupName, - vpnServerConfigurationName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVpnServerConfigurationNext( - resourceGroupName, - vpnServerConfigurationName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - 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< - SimplePollerLike< - OperationState, - ConfigurationPolicyGroupsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - vpnServerConfigurationPolicyGroupParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ConfigurationPolicyGroupsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * 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 sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - vpnServerConfigurationName, - configurationPolicyGroupName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * 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 { - 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, - }, - }, - 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 deleted file mode 100644 index ce2357d3dd75..000000000000 --- a/sdk/network/arm-network/src/operations/connectionMonitors.ts +++ /dev/null @@ -1,592 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import type { ConnectionMonitors } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ConnectionMonitorResult, - ConnectionMonitorsListOptionalParams, - ConnectionMonitorsListResponse, - ConnectionMonitor, - ConnectionMonitorsCreateOrUpdateOptionalParams, - ConnectionMonitorsCreateOrUpdateResponse, - ConnectionMonitorsGetOptionalParams, - ConnectionMonitorsGetResponse, - ConnectionMonitorsDeleteOptionalParams, - TagsObject, - ConnectionMonitorsUpdateTagsOptionalParams, - ConnectionMonitorsUpdateTagsResponse, - ConnectionMonitorsStopOptionalParams, -} from "../models/index.js"; - -/// -/** Class containing ConnectionMonitors operations. */ -export class ConnectionMonitorsImpl implements ConnectionMonitors { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ConnectionMonitors class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all connection monitors for the specified Network Watcher. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkWatcherName: string, - options?: ConnectionMonitorsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkWatcherName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkWatcherName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkWatcherName: string, - options?: ConnectionMonitorsListOptionalParams, - _settings?: PageSettings, - ): AsyncIterableIterator { - let result: ConnectionMonitorsListResponse; - result = await this._list(resourceGroupName, networkWatcherName, options); - yield result.value || []; - } - - private async *listPagingAll( - resourceGroupName: string, - networkWatcherName: string, - options?: ConnectionMonitorsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, networkWatcherName, options)) { - yield* page; - } - } - - /** - * Create or update a connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param parameters Parameters that define the operation to create a connection monitor. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - parameters: ConnectionMonitor, - options?: ConnectionMonitorsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ConnectionMonitorsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ConnectionMonitorsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create or update a connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param parameters Parameters that define the operation to create a connection monitor. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - parameters: ConnectionMonitor, - options?: ConnectionMonitorsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets a connection monitor by name. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - options?: ConnectionMonitorsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkWatcherName, connectionMonitorName, options }, - getOperationSpec, - ); - } - - /** - * Deletes the specified connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - options?: ConnectionMonitorsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkWatcherName, - connectionMonitorName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - options?: ConnectionMonitorsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update tags of the specified connection monitor. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param connectionMonitorName The name of the connection monitor. - * @param parameters Parameters supplied to update connection monitor tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - parameters: TagsObject, - options?: ConnectionMonitorsUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkWatcherName, - connectionMonitorName, - parameters, - options, - }, - updateTagsOperationSpec, - ); - } - - /** - * Stops the specified connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param options The options parameters. - */ - async beginStop( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - options?: ConnectionMonitorsStopOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkWatcherName, - connectionMonitorName, - options, - }, - spec: stopOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Stops the specified connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param options The options parameters. - */ - async beginStopAndWait( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - options?: ConnectionMonitorsStopOptionalParams, - ): Promise { - const poller = await this.beginStop( - resourceGroupName, - networkWatcherName, - connectionMonitorName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all connection monitors for the specified Network Watcher. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkWatcherName: string, - options?: ConnectionMonitorsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkWatcherName, options }, - listOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ConnectionMonitorResult, - }, - 201: { - bodyMapper: Mappers.ConnectionMonitorResult, - }, - 202: { - bodyMapper: Mappers.ConnectionMonitorResult, - }, - 204: { - bodyMapper: Mappers.ConnectionMonitorResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters71, - queryParameters: [Parameters.apiVersion, Parameters.migrate], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.connectionMonitorName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ConnectionMonitorResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.connectionMonitorName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.connectionMonitorName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ConnectionMonitorResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.connectionMonitorName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const stopOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.connectionMonitorName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ConnectionMonitorListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/connectivityConfigurations.ts b/sdk/network/arm-network/src/operations/connectivityConfigurations.ts deleted file mode 100644 index 516eab587308..000000000000 --- a/sdk/network/arm-network/src/operations/connectivityConfigurations.ts +++ /dev/null @@ -1,403 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ConnectivityConfigurations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ConnectivityConfiguration, - ConnectivityConfigurationsListNextOptionalParams, - ConnectivityConfigurationsListOptionalParams, - ConnectivityConfigurationsListResponse, - ConnectivityConfigurationsGetOptionalParams, - ConnectivityConfigurationsGetResponse, - ConnectivityConfigurationsCreateOrUpdateOptionalParams, - ConnectivityConfigurationsCreateOrUpdateResponse, - ConnectivityConfigurationsDeleteOptionalParams, - ConnectivityConfigurationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ConnectivityConfigurations operations. */ -export class ConnectivityConfigurationsImpl implements ConnectivityConfigurations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ConnectivityConfigurations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the network manager connectivity configuration in a specified network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - options?: ConnectivityConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkManagerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkManagerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - options?: ConnectivityConfigurationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ConnectivityConfigurationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - options?: ConnectivityConfigurationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, networkManagerName, options)) { - yield* page; - } - } - - /** - * Gets a Network Connectivity Configuration, specified by the resource group, network manager name, - * and connectivity Configuration name - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager connectivity configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: ConnectivityConfigurationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, configurationName, options }, - getOperationSpec, - ); - } - - /** - * Creates/Updates a new network manager connectivity configuration - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager connectivity configuration. - * @param connectivityConfiguration Parameters supplied to create/update a network manager connectivity - * configuration - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - connectivityConfiguration: ConnectivityConfiguration, - options?: ConnectivityConfigurationsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - connectivityConfiguration, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a network manager connectivity configuration, specified by the resource group, network - * manager name, and connectivity configuration name - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager connectivity configuration. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: ConnectivityConfigurationsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - configurationName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a network manager connectivity configuration, specified by the resource group, network - * manager name, and connectivity configuration name - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager connectivity configuration. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: ConnectivityConfigurationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all the network manager connectivity configuration in a specified network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - options?: ConnectivityConfigurationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - nextLink: string, - options?: ConnectivityConfigurationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ConnectivityConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - Parameters.configurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ConnectivityConfiguration, - }, - 201: { - bodyMapper: Mappers.ConnectivityConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.connectivityConfiguration, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - Parameters.configurationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - Parameters.configurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ConnectivityConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ConnectivityConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/customIPPrefixes.ts b/sdk/network/arm-network/src/operations/customIPPrefixes.ts deleted file mode 100644 index 280deb202e64..000000000000 --- a/sdk/network/arm-network/src/operations/customIPPrefixes.ts +++ /dev/null @@ -1,587 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { CustomIPPrefixes } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - CustomIpPrefix, - CustomIPPrefixesListAllNextOptionalParams, - CustomIPPrefixesListAllOptionalParams, - CustomIPPrefixesListAllResponse, - CustomIPPrefixesListNextOptionalParams, - CustomIPPrefixesListOptionalParams, - CustomIPPrefixesListResponse, - CustomIPPrefixesDeleteOptionalParams, - CustomIPPrefixesGetOptionalParams, - CustomIPPrefixesGetResponse, - CustomIPPrefixesCreateOrUpdateOptionalParams, - CustomIPPrefixesCreateOrUpdateResponse, - TagsObject, - CustomIPPrefixesUpdateTagsOptionalParams, - CustomIPPrefixesUpdateTagsResponse, - CustomIPPrefixesListAllNextResponse, - CustomIPPrefixesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing CustomIPPrefixes operations. */ -export class CustomIPPrefixesImpl implements CustomIPPrefixes { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class CustomIPPrefixes class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the custom IP prefixes in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: CustomIPPrefixesListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: CustomIPPrefixesListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: CustomIPPrefixesListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: CustomIPPrefixesListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all custom IP prefixes in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: CustomIPPrefixesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: CustomIPPrefixesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: CustomIPPrefixesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: CustomIPPrefixesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified custom IP prefix. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the CustomIpPrefix. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - customIpPrefixName: string, - options?: CustomIPPrefixesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, customIpPrefixName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified custom IP prefix. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the CustomIpPrefix. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - customIpPrefixName: string, - options?: CustomIPPrefixesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, customIpPrefixName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified custom IP prefix in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the custom IP prefix. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - customIpPrefixName: string, - options?: CustomIPPrefixesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, customIpPrefixName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a custom IP prefix. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the custom IP prefix. - * @param parameters Parameters supplied to the create or update custom IP prefix operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - customIpPrefixName: string, - parameters: CustomIpPrefix, - options?: CustomIPPrefixesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CustomIPPrefixesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, customIpPrefixName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - CustomIPPrefixesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a custom IP prefix. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the custom IP prefix. - * @param parameters Parameters supplied to the create or update custom IP prefix operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - customIpPrefixName: string, - parameters: CustomIpPrefix, - options?: CustomIPPrefixesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - customIpPrefixName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates custom IP prefix tags. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the custom IP prefix. - * @param parameters Parameters supplied to update custom IP prefix tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - customIpPrefixName: string, - parameters: TagsObject, - options?: CustomIPPrefixesUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, customIpPrefixName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all the custom IP prefixes in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: CustomIPPrefixesListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all custom IP prefixes in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: CustomIPPrefixesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: CustomIPPrefixesListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: CustomIPPrefixesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.customIpPrefixName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CustomIpPrefix, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.customIpPrefixName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CustomIpPrefix, - }, - 201: { - bodyMapper: Mappers.CustomIpPrefix, - }, - 202: { - bodyMapper: Mappers.CustomIpPrefix, - }, - 204: { - bodyMapper: Mappers.CustomIpPrefix, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters14, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.customIpPrefixName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.CustomIpPrefix, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.customIpPrefixName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/customIpPrefixes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CustomIpPrefixListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CustomIpPrefixListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CustomIpPrefixListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CustomIpPrefixListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/ddosCustomPolicies.ts b/sdk/network/arm-network/src/operations/ddosCustomPolicies.ts deleted file mode 100644 index 5096639a6806..000000000000 --- a/sdk/network/arm-network/src/operations/ddosCustomPolicies.ts +++ /dev/null @@ -1,346 +0,0 @@ -// 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 type { DdosCustomPolicies } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - DdosCustomPoliciesDeleteOptionalParams, - DdosCustomPoliciesGetOptionalParams, - DdosCustomPoliciesGetResponse, - DdosCustomPolicy, - DdosCustomPoliciesCreateOrUpdateOptionalParams, - DdosCustomPoliciesCreateOrUpdateResponse, - TagsObject, - DdosCustomPoliciesUpdateTagsOptionalParams, - DdosCustomPoliciesUpdateTagsResponse, -} from "../models/index.js"; - -/** Class containing DdosCustomPolicies operations. */ -export class DdosCustomPoliciesImpl implements DdosCustomPolicies { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class DdosCustomPolicies class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Deletes the specified DDoS custom policy. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - ddosCustomPolicyName: string, - options?: DdosCustomPoliciesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, ddosCustomPolicyName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified DDoS custom policy. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - ddosCustomPolicyName: string, - options?: DdosCustomPoliciesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, ddosCustomPolicyName, options); - return poller.pollUntilDone(); - } - - /** - * Gets information about the specified DDoS custom policy. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ddosCustomPolicyName: string, - options?: DdosCustomPoliciesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ddosCustomPolicyName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a DDoS custom policy. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param parameters Parameters supplied to the create or update operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - ddosCustomPolicyName: string, - parameters: DdosCustomPolicy, - options?: DdosCustomPoliciesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - DdosCustomPoliciesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, ddosCustomPolicyName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - DdosCustomPoliciesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a DDoS custom policy. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param parameters Parameters supplied to the create or update operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - ddosCustomPolicyName: string, - parameters: DdosCustomPolicy, - options?: DdosCustomPoliciesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - ddosCustomPolicyName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a DDoS custom policy tags. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param parameters Parameters supplied to update DDoS custom policy resource tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - ddosCustomPolicyName: string, - parameters: TagsObject, - options?: DdosCustomPoliciesUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ddosCustomPolicyName, parameters, options }, - updateTagsOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ddosCustomPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DdosCustomPolicy, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ddosCustomPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DdosCustomPolicy, - }, - 201: { - bodyMapper: Mappers.DdosCustomPolicy, - }, - 202: { - bodyMapper: Mappers.DdosCustomPolicy, - }, - 204: { - bodyMapper: Mappers.DdosCustomPolicy, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters15, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ddosCustomPolicyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DdosCustomPolicy, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ddosCustomPolicyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/ddosProtectionPlans.ts b/sdk/network/arm-network/src/operations/ddosProtectionPlans.ts deleted file mode 100644 index bec15f3b4dcf..000000000000 --- a/sdk/network/arm-network/src/operations/ddosProtectionPlans.ts +++ /dev/null @@ -1,590 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { DdosProtectionPlans } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - DdosProtectionPlan, - DdosProtectionPlansListNextOptionalParams, - DdosProtectionPlansListOptionalParams, - DdosProtectionPlansListResponse, - DdosProtectionPlansListByResourceGroupNextOptionalParams, - DdosProtectionPlansListByResourceGroupOptionalParams, - DdosProtectionPlansListByResourceGroupResponse, - DdosProtectionPlansDeleteOptionalParams, - DdosProtectionPlansGetOptionalParams, - DdosProtectionPlansGetResponse, - DdosProtectionPlansCreateOrUpdateOptionalParams, - DdosProtectionPlansCreateOrUpdateResponse, - TagsObject, - DdosProtectionPlansUpdateTagsOptionalParams, - DdosProtectionPlansUpdateTagsResponse, - DdosProtectionPlansListNextResponse, - DdosProtectionPlansListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing DdosProtectionPlans operations. */ -export class DdosProtectionPlansImpl implements DdosProtectionPlans { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class DdosProtectionPlans class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all DDoS protection plans in a subscription. - * @param options The options parameters. - */ - public list( - options?: DdosProtectionPlansListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: DdosProtectionPlansListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: DdosProtectionPlansListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: DdosProtectionPlansListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all the DDoS protection plans in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: DdosProtectionPlansListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: DdosProtectionPlansListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: DdosProtectionPlansListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: DdosProtectionPlansListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified DDoS protection plan. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - ddosProtectionPlanName: string, - options?: DdosProtectionPlansDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, ddosProtectionPlanName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified DDoS protection plan. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - ddosProtectionPlanName: string, - options?: DdosProtectionPlansDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, ddosProtectionPlanName, options); - return poller.pollUntilDone(); - } - - /** - * Gets information about the specified DDoS protection plan. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ddosProtectionPlanName: string, - options?: DdosProtectionPlansGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ddosProtectionPlanName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a DDoS protection plan. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - ddosProtectionPlanName: string, - parameters: DdosProtectionPlan, - options?: DdosProtectionPlansCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - DdosProtectionPlansCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, ddosProtectionPlanName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - DdosProtectionPlansCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a DDoS protection plan. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - ddosProtectionPlanName: string, - parameters: DdosProtectionPlan, - options?: DdosProtectionPlansCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - ddosProtectionPlanName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a DDoS protection plan tags. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the update DDoS protection plan resource tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - ddosProtectionPlanName: string, - parameters: TagsObject, - options?: DdosProtectionPlansUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ddosProtectionPlanName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all DDoS protection plans in a subscription. - * @param options The options parameters. - */ - private _list( - options?: DdosProtectionPlansListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Gets all the DDoS protection plans in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: DdosProtectionPlansListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: DdosProtectionPlansListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: DdosProtectionPlansListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ddosProtectionPlanName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DdosProtectionPlan, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ddosProtectionPlanName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DdosProtectionPlan, - }, - 201: { - bodyMapper: Mappers.DdosProtectionPlan, - }, - 202: { - bodyMapper: Mappers.DdosProtectionPlan, - }, - 204: { - bodyMapper: Mappers.DdosProtectionPlan, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ddosProtectionPlanName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DdosProtectionPlan, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ddosProtectionPlanName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DdosProtectionPlanListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DdosProtectionPlanListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DdosProtectionPlanListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DdosProtectionPlanListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/defaultSecurityRules.ts b/sdk/network/arm-network/src/operations/defaultSecurityRules.ts deleted file mode 100644 index 68a9f1cd373e..000000000000 --- a/sdk/network/arm-network/src/operations/defaultSecurityRules.ts +++ /dev/null @@ -1,234 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { DefaultSecurityRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - SecurityRule, - DefaultSecurityRulesListNextOptionalParams, - DefaultSecurityRulesListOptionalParams, - DefaultSecurityRulesListResponse, - DefaultSecurityRulesGetOptionalParams, - DefaultSecurityRulesGetResponse, - DefaultSecurityRulesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing DefaultSecurityRules operations. */ -export class DefaultSecurityRulesImpl implements DefaultSecurityRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class DefaultSecurityRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all default security rules in a network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: DefaultSecurityRulesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkSecurityGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkSecurityGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: DefaultSecurityRulesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: DefaultSecurityRulesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkSecurityGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkSecurityGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: DefaultSecurityRulesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkSecurityGroupName, - options, - )) { - yield* page; - } - } - - /** - * Gets all default security rules in a network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: DefaultSecurityRulesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityGroupName, options }, - listOperationSpec, - ); - } - - /** - * Get the specified default network security rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param defaultSecurityRuleName The name of the default security rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityGroupName: string, - defaultSecurityRuleName: string, - options?: DefaultSecurityRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityGroupName, - defaultSecurityRuleName, - options, - }, - getOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkSecurityGroupName: string, - nextLink: string, - options?: DefaultSecurityRulesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityGroupName, - Parameters.defaultSecurityRuleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkSecurityGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/dscpConfigurationOperations.ts b/sdk/network/arm-network/src/operations/dscpConfigurationOperations.ts deleted file mode 100644 index 1eac31c39640..000000000000 --- a/sdk/network/arm-network/src/operations/dscpConfigurationOperations.ts +++ /dev/null @@ -1,542 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { DscpConfigurationOperations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - DscpConfiguration, - DscpConfigurationListNextOptionalParams, - DscpConfigurationListOptionalParams, - DscpConfigurationListResponse, - DscpConfigurationListAllNextOptionalParams, - DscpConfigurationListAllOptionalParams, - DscpConfigurationListAllResponse, - DscpConfigurationCreateOrUpdateOptionalParams, - DscpConfigurationCreateOrUpdateResponse, - DscpConfigurationDeleteOptionalParams, - DscpConfigurationGetOptionalParams, - DscpConfigurationGetResponse, - DscpConfigurationListNextResponse, - DscpConfigurationListAllNextResponse, -} from "../models/index.js"; - -/// -/** Class containing DscpConfigurationOperations operations. */ -export class DscpConfigurationOperationsImpl implements DscpConfigurationOperations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class DscpConfigurationOperations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: DscpConfigurationListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: DscpConfigurationListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: DscpConfigurationListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: DscpConfigurationListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all dscp configurations in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: DscpConfigurationListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: DscpConfigurationListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: DscpConfigurationListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: DscpConfigurationListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Creates or updates a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param dscpConfigurationName The name of the resource. - * @param parameters Parameters supplied to the create or update dscp configuration operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - dscpConfigurationName: string, - parameters: DscpConfiguration, - options?: DscpConfigurationCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - DscpConfigurationCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, dscpConfigurationName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - DscpConfigurationCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param dscpConfigurationName The name of the resource. - * @param parameters Parameters supplied to the create or update dscp configuration operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - dscpConfigurationName: string, - parameters: DscpConfiguration, - options?: DscpConfigurationCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - dscpConfigurationName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param dscpConfigurationName The name of the resource. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - dscpConfigurationName: string, - options?: DscpConfigurationDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, dscpConfigurationName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param dscpConfigurationName The name of the resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - dscpConfigurationName: string, - options?: DscpConfigurationDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, dscpConfigurationName, options); - return poller.pollUntilDone(); - } - - /** - * Gets a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param dscpConfigurationName The name of the resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - dscpConfigurationName: string, - options?: DscpConfigurationGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dscpConfigurationName, options }, - getOperationSpec, - ); - } - - /** - * Gets a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: DscpConfigurationListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all dscp configurations in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: DscpConfigurationListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: DscpConfigurationListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: DscpConfigurationListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DscpConfiguration, - }, - 201: { - bodyMapper: Mappers.DscpConfiguration, - }, - 202: { - bodyMapper: Mappers.DscpConfiguration, - }, - 204: { - bodyMapper: Mappers.DscpConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters17, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dscpConfigurationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dscpConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DscpConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dscpConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DscpConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/dscpConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DscpConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DscpConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DscpConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRouteCircuitAuthorizations.ts b/sdk/network/arm-network/src/operations/expressRouteCircuitAuthorizations.ts deleted file mode 100644 index f487571a68f4..000000000000 --- a/sdk/network/arm-network/src/operations/expressRouteCircuitAuthorizations.ts +++ /dev/null @@ -1,475 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ExpressRouteCircuitAuthorizations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ExpressRouteCircuitAuthorization, - ExpressRouteCircuitAuthorizationsListNextOptionalParams, - ExpressRouteCircuitAuthorizationsListOptionalParams, - ExpressRouteCircuitAuthorizationsListResponse, - ExpressRouteCircuitAuthorizationsDeleteOptionalParams, - ExpressRouteCircuitAuthorizationsGetOptionalParams, - ExpressRouteCircuitAuthorizationsGetResponse, - ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, - ExpressRouteCircuitAuthorizationsCreateOrUpdateResponse, - ExpressRouteCircuitAuthorizationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ExpressRouteCircuitAuthorizations operations. */ -export class ExpressRouteCircuitAuthorizationsImpl implements ExpressRouteCircuitAuthorizations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRouteCircuitAuthorizations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all authorizations in an express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitAuthorizationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, circuitName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, circuitName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitAuthorizationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRouteCircuitAuthorizationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, circuitName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, circuitName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitAuthorizationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, circuitName, options)) { - yield* page; - } - } - - /** - * Deletes the specified authorization from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param authorizationName The name of the authorization. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - circuitName: string, - authorizationName: string, - options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, circuitName, authorizationName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified authorization from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param authorizationName The name of the authorization. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - circuitName: string, - authorizationName: string, - options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - circuitName, - authorizationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified authorization from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param authorizationName The name of the authorization. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - circuitName: string, - authorizationName: string, - options?: ExpressRouteCircuitAuthorizationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, authorizationName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates an authorization in the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param authorizationName The name of the authorization. - * @param authorizationParameters Parameters supplied to the create or update express route circuit - * authorization operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - circuitName: string, - authorizationName: string, - authorizationParameters: ExpressRouteCircuitAuthorization, - options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitAuthorizationsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - circuitName, - authorizationName, - authorizationParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCircuitAuthorizationsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates an authorization in the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param authorizationName The name of the authorization. - * @param authorizationParameters Parameters supplied to the create or update express route circuit - * authorization operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - circuitName: string, - authorizationName: string, - authorizationParameters: ExpressRouteCircuitAuthorization, - options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - circuitName, - authorizationName, - authorizationParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all authorizations in an express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitAuthorizationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - circuitName: string, - nextLink: string, - options?: ExpressRouteCircuitAuthorizationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.authorizationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitAuthorization, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.authorizationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitAuthorization, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCircuitAuthorization, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCircuitAuthorization, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCircuitAuthorization, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.authorizationParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.authorizationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.circuitName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRouteCircuitConnections.ts b/sdk/network/arm-network/src/operations/expressRouteCircuitConnections.ts deleted file mode 100644 index 9ac016b3c19d..000000000000 --- a/sdk/network/arm-network/src/operations/expressRouteCircuitConnections.ts +++ /dev/null @@ -1,518 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ExpressRouteCircuitConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ExpressRouteCircuitConnection, - ExpressRouteCircuitConnectionsListNextOptionalParams, - ExpressRouteCircuitConnectionsListOptionalParams, - ExpressRouteCircuitConnectionsListResponse, - ExpressRouteCircuitConnectionsDeleteOptionalParams, - ExpressRouteCircuitConnectionsGetOptionalParams, - ExpressRouteCircuitConnectionsGetResponse, - ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, - ExpressRouteCircuitConnectionsCreateOrUpdateResponse, - ExpressRouteCircuitConnectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ExpressRouteCircuitConnections operations. */ -export class ExpressRouteCircuitConnectionsImpl implements ExpressRouteCircuitConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRouteCircuitConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all global reach connections associated with a private peering in an express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, circuitName, peeringName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, circuitName, peeringName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRouteCircuitConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, circuitName, peeringName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - circuitName, - peeringName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - circuitName, - peeringName, - options, - )) { - yield* page; - } - } - - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - options?: ExpressRouteCircuitConnectionsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - circuitName, - peeringName, - connectionName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - options?: ExpressRouteCircuitConnectionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - circuitName, - peeringName, - connectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified Express Route Circuit Connection from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - options?: ExpressRouteCircuitConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, peeringName, connectionName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express - * route circuit connection operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, - options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitConnectionsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - circuitName, - peeringName, - connectionName, - expressRouteCircuitConnectionParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCircuitConnectionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express - * route circuit connection operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, - options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - circuitName, - peeringName, - connectionName, - expressRouteCircuitConnectionParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all global reach connections associated with a private peering in an express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, peeringName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param peeringName The name of the peering. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - circuitName: string, - peeringName: string, - nextLink: string, - options?: ExpressRouteCircuitConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, peeringName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitConnection, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCircuitConnection, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCircuitConnection, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCircuitConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.expressRouteCircuitConnectionParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRouteCircuitPeerings.ts b/sdk/network/arm-network/src/operations/expressRouteCircuitPeerings.ts deleted file mode 100644 index 0d8d6d85ac9e..000000000000 --- a/sdk/network/arm-network/src/operations/expressRouteCircuitPeerings.ts +++ /dev/null @@ -1,470 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ExpressRouteCircuitPeerings } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ExpressRouteCircuitPeering, - ExpressRouteCircuitPeeringsListNextOptionalParams, - ExpressRouteCircuitPeeringsListOptionalParams, - ExpressRouteCircuitPeeringsListResponse, - ExpressRouteCircuitPeeringsDeleteOptionalParams, - ExpressRouteCircuitPeeringsGetOptionalParams, - ExpressRouteCircuitPeeringsGetResponse, - ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, - ExpressRouteCircuitPeeringsCreateOrUpdateResponse, - ExpressRouteCircuitPeeringsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ExpressRouteCircuitPeerings operations. */ -export class ExpressRouteCircuitPeeringsImpl implements ExpressRouteCircuitPeerings { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRouteCircuitPeerings class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all peerings in a specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitPeeringsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, circuitName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, circuitName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitPeeringsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRouteCircuitPeeringsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, circuitName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, circuitName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitPeeringsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, circuitName, options)) { - yield* page; - } - } - - /** - * Deletes the specified peering from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitPeeringsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, circuitName, peeringName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified peering from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitPeeringsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, circuitName, peeringName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified peering for the express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitPeeringsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, peeringName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a peering in the specified express route circuits. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update express route circuit peering - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - circuitName: string, - peeringName: string, - peeringParameters: ExpressRouteCircuitPeering, - options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitPeeringsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - circuitName, - peeringName, - peeringParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCircuitPeeringsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a peering in the specified express route circuits. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update express route circuit peering - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - peeringParameters: ExpressRouteCircuitPeering, - options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - circuitName, - peeringName, - peeringParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all peerings in a specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitPeeringsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - circuitName: string, - nextLink: string, - options?: ExpressRouteCircuitPeeringsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitPeering, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitPeering, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCircuitPeering, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCircuitPeering, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCircuitPeering, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.peeringParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitPeeringListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitPeeringListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.circuitName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRouteCircuits.ts b/sdk/network/arm-network/src/operations/expressRouteCircuits.ts deleted file mode 100644 index b7ac16f18d15..000000000000 --- a/sdk/network/arm-network/src/operations/expressRouteCircuits.ts +++ /dev/null @@ -1,1093 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ExpressRouteCircuits } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ExpressRouteCircuit, - ExpressRouteCircuitsListNextOptionalParams, - ExpressRouteCircuitsListOptionalParams, - ExpressRouteCircuitsListResponse, - ExpressRouteCircuitsListAllNextOptionalParams, - ExpressRouteCircuitsListAllOptionalParams, - ExpressRouteCircuitsListAllResponse, - ExpressRouteCircuitsDeleteOptionalParams, - ExpressRouteCircuitsGetOptionalParams, - ExpressRouteCircuitsGetResponse, - ExpressRouteCircuitsCreateOrUpdateOptionalParams, - ExpressRouteCircuitsCreateOrUpdateResponse, - TagsObject, - ExpressRouteCircuitsUpdateTagsOptionalParams, - ExpressRouteCircuitsUpdateTagsResponse, - ExpressRouteCircuitsListArpTableOptionalParams, - ExpressRouteCircuitsListArpTableResponse, - ExpressRouteCircuitsListRoutesTableOptionalParams, - ExpressRouteCircuitsListRoutesTableResponse, - ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, - ExpressRouteCircuitsListRoutesTableSummaryResponse, - ExpressRouteCircuitsGetStatsOptionalParams, - ExpressRouteCircuitsGetStatsResponse, - ExpressRouteCircuitsGetPeeringStatsOptionalParams, - ExpressRouteCircuitsGetPeeringStatsResponse, - ExpressRouteCircuitsListNextResponse, - ExpressRouteCircuitsListAllNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ExpressRouteCircuits operations. */ -export class ExpressRouteCircuitsImpl implements ExpressRouteCircuits { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRouteCircuits class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the express route circuits in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: ExpressRouteCircuitsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: ExpressRouteCircuitsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRouteCircuitsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: ExpressRouteCircuitsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all the express route circuits in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: ExpressRouteCircuitsListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: ExpressRouteCircuitsListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRouteCircuitsListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: ExpressRouteCircuitsListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, circuitName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, circuitName, options); - return poller.pollUntilDone(); - } - - /** - * Gets information about the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of express route circuit. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates an express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param parameters Parameters supplied to the create or update express route circuit operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - circuitName: string, - parameters: ExpressRouteCircuit, - options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, circuitName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCircuitsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates an express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param parameters Parameters supplied to the create or update express route circuit operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - circuitName: string, - parameters: ExpressRouteCircuit, - options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - circuitName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates an express route circuit tags. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param parameters Parameters supplied to update express route circuit tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - circuitName: string, - parameters: TagsObject, - options?: ExpressRouteCircuitsUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource - * group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListArpTable( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListArpTableOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitsListArpTableResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - circuitName, - peeringName, - devicePath, - options, - }, - spec: listArpTableOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCircuitsListArpTableResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource - * group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListArpTableAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListArpTableOptionalParams, - ): Promise { - const poller = await this.beginListArpTable( - resourceGroupName, - circuitName, - peeringName, - devicePath, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the currently advertised routes table associated with the express route circuit in a resource - * group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListRoutesTable( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListRoutesTableOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitsListRoutesTableResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - circuitName, - peeringName, - devicePath, - options, - }, - spec: listRoutesTableOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCircuitsListRoutesTableResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the currently advertised routes table associated with the express route circuit in a resource - * group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListRoutesTableAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListRoutesTableOptionalParams, - ): Promise { - const poller = await this.beginListRoutesTable( - resourceGroupName, - circuitName, - peeringName, - devicePath, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the currently advertised routes table summary associated with the express route circuit in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListRoutesTableSummary( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitsListRoutesTableSummaryResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - circuitName, - peeringName, - devicePath, - options, - }, - spec: listRoutesTableSummaryOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCircuitsListRoutesTableSummaryResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the currently advertised routes table summary associated with the express route circuit in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListRoutesTableSummaryAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, - ): Promise { - const poller = await this.beginListRoutesTableSummary( - resourceGroupName, - circuitName, - peeringName, - devicePath, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all the stats from an express route circuit in a resource group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param options The options parameters. - */ - getStats( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitsGetStatsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, options }, - getStatsOperationSpec, - ); - } - - /** - * Gets all stats from an express route circuit in a resource group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - getPeeringStats( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitsGetPeeringStatsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, peeringName, options }, - getPeeringStatsOperationSpec, - ); - } - - /** - * Gets all the express route circuits in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: ExpressRouteCircuitsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all the express route circuits in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: ExpressRouteCircuitsListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: ExpressRouteCircuitsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: ExpressRouteCircuitsListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuit, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuit, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCircuit, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCircuit, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCircuit, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters18, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuit, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listArpTableOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitsArpTableListResult, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCircuitsArpTableListResult, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCircuitsArpTableListResult, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCircuitsArpTableListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.peeringName, - Parameters.devicePath, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listRoutesTableOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableListResult, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableListResult, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableListResult, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.peeringName, - Parameters.devicePath, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listRoutesTableSummaryOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableSummaryListResult, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableSummaryListResult, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableSummaryListResult, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableSummaryListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.peeringName, - Parameters.devicePath, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getStatsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitStats, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getPeeringStatsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitStats, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRouteConnections.ts b/sdk/network/arm-network/src/operations/expressRouteConnections.ts deleted file mode 100644 index 2568af5f8134..000000000000 --- a/sdk/network/arm-network/src/operations/expressRouteConnections.ts +++ /dev/null @@ -1,373 +0,0 @@ -// 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 type { ExpressRouteConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ExpressRouteConnection, - ExpressRouteConnectionsCreateOrUpdateOptionalParams, - ExpressRouteConnectionsCreateOrUpdateResponse, - ExpressRouteConnectionsGetOptionalParams, - ExpressRouteConnectionsGetResponse, - ExpressRouteConnectionsDeleteOptionalParams, - ExpressRouteConnectionsListOptionalParams, - ExpressRouteConnectionsListResponse, -} from "../models/index.js"; - -/** Class containing ExpressRouteConnections operations. */ -export class ExpressRouteConnectionsImpl implements ExpressRouteConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRouteConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param connectionName The name of the connection subresource. - * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - expressRouteGatewayName: string, - connectionName: string, - putExpressRouteConnectionParameters: ExpressRouteConnection, - options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteConnectionsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - expressRouteGatewayName, - connectionName, - putExpressRouteConnectionParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteConnectionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param connectionName The name of the connection subresource. - * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - expressRouteGatewayName: string, - connectionName: string, - putExpressRouteConnectionParameters: ExpressRouteConnection, - options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - expressRouteGatewayName, - connectionName, - putExpressRouteConnectionParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified ExpressRouteConnection. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param connectionName The name of the ExpressRoute connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - expressRouteGatewayName: string, - connectionName: string, - options?: ExpressRouteConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, expressRouteGatewayName, connectionName, options }, - getOperationSpec, - ); - } - - /** - * Deletes a connection to a ExpressRoute circuit. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param connectionName The name of the connection subresource. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - expressRouteGatewayName: string, - connectionName: string, - options?: ExpressRouteConnectionsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - expressRouteGatewayName, - connectionName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a connection to a ExpressRoute circuit. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param connectionName The name of the connection subresource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - expressRouteGatewayName: string, - connectionName: string, - options?: ExpressRouteConnectionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - expressRouteGatewayName, - connectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists ExpressRouteConnections. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - expressRouteGatewayName: string, - options?: ExpressRouteConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, expressRouteGatewayName, options }, - listOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteConnection, - }, - 201: { - bodyMapper: Mappers.ExpressRouteConnection, - }, - 202: { - bodyMapper: Mappers.ExpressRouteConnection, - }, - 204: { - bodyMapper: Mappers.ExpressRouteConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.putExpressRouteConnectionParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.expressRouteGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.expressRouteGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.expressRouteGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteConnectionList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.expressRouteGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRouteCrossConnectionPeerings.ts b/sdk/network/arm-network/src/operations/expressRouteCrossConnectionPeerings.ts deleted file mode 100644 index c86686fd158b..000000000000 --- a/sdk/network/arm-network/src/operations/expressRouteCrossConnectionPeerings.ts +++ /dev/null @@ -1,480 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ExpressRouteCrossConnectionPeerings } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ExpressRouteCrossConnectionPeering, - ExpressRouteCrossConnectionPeeringsListNextOptionalParams, - ExpressRouteCrossConnectionPeeringsListOptionalParams, - ExpressRouteCrossConnectionPeeringsListResponse, - ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, - ExpressRouteCrossConnectionPeeringsGetOptionalParams, - ExpressRouteCrossConnectionPeeringsGetResponse, - ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, - ExpressRouteCrossConnectionPeeringsCreateOrUpdateResponse, - ExpressRouteCrossConnectionPeeringsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ExpressRouteCrossConnectionPeerings operations. */ -export class ExpressRouteCrossConnectionPeeringsImpl implements ExpressRouteCrossConnectionPeerings { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRouteCrossConnectionPeerings class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - crossConnectionName: string, - options?: ExpressRouteCrossConnectionPeeringsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, crossConnectionName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, crossConnectionName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - crossConnectionName: string, - options?: ExpressRouteCrossConnectionPeeringsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRouteCrossConnectionPeeringsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, crossConnectionName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - crossConnectionName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - crossConnectionName: string, - options?: ExpressRouteCrossConnectionPeeringsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, crossConnectionName, options)) { - yield* page; - } - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - crossConnectionName: string, - options?: ExpressRouteCrossConnectionPeeringsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, crossConnectionName, options }, - listOperationSpec, - ); - } - - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, crossConnectionName, peeringName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - crossConnectionName, - peeringName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified peering for the ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - options?: ExpressRouteCrossConnectionPeeringsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, crossConnectionName, peeringName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection - * peering operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - peeringParameters: ExpressRouteCrossConnectionPeering, - options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCrossConnectionPeeringsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - crossConnectionName, - peeringName, - peeringParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCrossConnectionPeeringsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection - * peering operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - peeringParameters: ExpressRouteCrossConnectionPeering, - options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - crossConnectionName, - peeringName, - peeringParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - crossConnectionName: string, - nextLink: string, - options?: ExpressRouteCrossConnectionPeeringsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, crossConnectionName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnectionPeeringList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.crossConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.peeringName, - Parameters.crossConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnectionPeering, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.peeringName, - Parameters.crossConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnectionPeering, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCrossConnectionPeering, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCrossConnectionPeering, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCrossConnectionPeering, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.peeringParameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.peeringName, - Parameters.crossConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnectionPeeringList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.crossConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRouteCrossConnections.ts b/sdk/network/arm-network/src/operations/expressRouteCrossConnections.ts deleted file mode 100644 index 618dab72d25f..000000000000 --- a/sdk/network/arm-network/src/operations/expressRouteCrossConnections.ts +++ /dev/null @@ -1,916 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ExpressRouteCrossConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ExpressRouteCrossConnection, - ExpressRouteCrossConnectionsListNextOptionalParams, - ExpressRouteCrossConnectionsListOptionalParams, - ExpressRouteCrossConnectionsListResponse, - ExpressRouteCrossConnectionsListByResourceGroupNextOptionalParams, - ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, - ExpressRouteCrossConnectionsListByResourceGroupResponse, - ExpressRouteCrossConnectionsGetOptionalParams, - ExpressRouteCrossConnectionsGetResponse, - ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, - ExpressRouteCrossConnectionsCreateOrUpdateResponse, - TagsObject, - ExpressRouteCrossConnectionsUpdateTagsOptionalParams, - ExpressRouteCrossConnectionsUpdateTagsResponse, - ExpressRouteCrossConnectionsListArpTableOptionalParams, - ExpressRouteCrossConnectionsListArpTableResponse, - ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, - ExpressRouteCrossConnectionsListRoutesTableSummaryResponse, - ExpressRouteCrossConnectionsListRoutesTableOptionalParams, - ExpressRouteCrossConnectionsListRoutesTableResponse, - ExpressRouteCrossConnectionsListNextResponse, - ExpressRouteCrossConnectionsListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ExpressRouteCrossConnections operations. */ -export class ExpressRouteCrossConnectionsImpl implements ExpressRouteCrossConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRouteCrossConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * @param options The options parameters. - */ - public list( - options?: ExpressRouteCrossConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: ExpressRouteCrossConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRouteCrossConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: ExpressRouteCrossConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRouteCrossConnectionsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * @param options The options parameters. - */ - private _list( - options?: ExpressRouteCrossConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Gets details about the specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group (peering location of the circuit). - * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). - * @param options The options parameters. - */ - get( - resourceGroupName: string, - crossConnectionName: string, - options?: ExpressRouteCrossConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, crossConnectionName, options }, - getOperationSpec, - ); - } - - /** - * Update the specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - crossConnectionName: string, - parameters: ExpressRouteCrossConnection, - options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCrossConnectionsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, crossConnectionName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCrossConnectionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Update the specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - crossConnectionName: string, - parameters: ExpressRouteCrossConnection, - options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - crossConnectionName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates an express route cross connection tags. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param crossConnectionParameters Parameters supplied to update express route cross connection tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - crossConnectionName: string, - crossConnectionParameters: TagsObject, - options?: ExpressRouteCrossConnectionsUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - crossConnectionName, - crossConnectionParameters, - options, - }, - updateTagsOperationSpec, - ); - } - - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListArpTable( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListArpTableOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCrossConnectionsListArpTableResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - options, - }, - spec: listArpTableOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCrossConnectionsListArpTableResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListArpTableAndWait( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListArpTableOptionalParams, - ): Promise { - const poller = await this.beginListArpTable( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListRoutesTableSummary( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCrossConnectionsListRoutesTableSummaryResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - options, - }, - spec: listRoutesTableSummaryOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCrossConnectionsListRoutesTableSummaryResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListRoutesTableSummaryAndWait( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, - ): Promise { - const poller = await this.beginListRoutesTableSummary( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the currently advertised routes table associated with the express route cross connection in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListRoutesTable( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCrossConnectionsListRoutesTableResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - options, - }, - spec: listRoutesTableOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteCrossConnectionsListRoutesTableResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the currently advertised routes table associated with the express route cross connection in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - async beginListRoutesTableAndWait( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams, - ): Promise { - const poller = await this.beginListRoutesTable( - resourceGroupName, - crossConnectionName, - peeringName, - devicePath, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ExpressRouteCrossConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ExpressRouteCrossConnectionsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.filter], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.crossConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnection, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCrossConnection, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCrossConnection, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCrossConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters19, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.crossConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.crossConnectionParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.crossConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listArpTableOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitsArpTableListResult, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCircuitsArpTableListResult, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCircuitsArpTableListResult, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCircuitsArpTableListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.peeringName, - Parameters.devicePath, - Parameters.crossConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listRoutesTableSummaryOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnectionsRoutesTableSummaryListResult, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCrossConnectionsRoutesTableSummaryListResult, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCrossConnectionsRoutesTableSummaryListResult, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCrossConnectionsRoutesTableSummaryListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.peeringName, - Parameters.devicePath, - Parameters.crossConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listRoutesTableOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableListResult, - }, - 201: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableListResult, - }, - 202: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableListResult, - }, - 204: { - bodyMapper: Mappers.ExpressRouteCircuitsRoutesTableListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.peeringName, - Parameters.devicePath, - Parameters.crossConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteCrossConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRouteGateways.ts b/sdk/network/arm-network/src/operations/expressRouteGateways.ts deleted file mode 100644 index b8712093171b..000000000000 --- a/sdk/network/arm-network/src/operations/expressRouteGateways.ts +++ /dev/null @@ -1,507 +0,0 @@ -// 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 type { ExpressRouteGateways } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ExpressRouteGatewaysListBySubscriptionOptionalParams, - ExpressRouteGatewaysListBySubscriptionResponse, - ExpressRouteGatewaysListByResourceGroupOptionalParams, - ExpressRouteGatewaysListByResourceGroupResponse, - ExpressRouteGateway, - ExpressRouteGatewaysCreateOrUpdateOptionalParams, - ExpressRouteGatewaysCreateOrUpdateResponse, - TagsObject, - ExpressRouteGatewaysUpdateTagsOptionalParams, - ExpressRouteGatewaysUpdateTagsResponse, - ExpressRouteGatewaysGetOptionalParams, - ExpressRouteGatewaysGetResponse, - ExpressRouteGatewaysDeleteOptionalParams, -} from "../models/index.js"; - -/** Class containing ExpressRouteGateways operations. */ -export class ExpressRouteGatewaysImpl implements ExpressRouteGateways { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRouteGateways class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists ExpressRoute gateways under a given subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: ExpressRouteGatewaysListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Lists ExpressRoute gateways in a given resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ExpressRouteGatewaysListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Creates or updates a ExpressRoute gateway in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - expressRouteGatewayName: string, - putExpressRouteGatewayParameters: ExpressRouteGateway, - options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteGatewaysCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - expressRouteGatewayName, - putExpressRouteGatewayParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteGatewaysCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a ExpressRoute gateway in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - expressRouteGatewayName: string, - putExpressRouteGatewayParameters: ExpressRouteGateway, - options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - expressRouteGatewayName, - putExpressRouteGatewayParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates express route gateway tags. - * @param resourceGroupName The resource group name of the ExpressRouteGateway. - * @param expressRouteGatewayName The name of the gateway. - * @param expressRouteGatewayParameters Parameters supplied to update a virtual wan express route - * gateway tags. - * @param options The options parameters. - */ - async beginUpdateTags( - resourceGroupName: string, - expressRouteGatewayName: string, - expressRouteGatewayParameters: TagsObject, - options?: ExpressRouteGatewaysUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteGatewaysUpdateTagsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - expressRouteGatewayName, - expressRouteGatewayParameters, - options, - }, - spec: updateTagsOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRouteGatewaysUpdateTagsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates express route gateway tags. - * @param resourceGroupName The resource group name of the ExpressRouteGateway. - * @param expressRouteGatewayName The name of the gateway. - * @param expressRouteGatewayParameters Parameters supplied to update a virtual wan express route - * gateway tags. - * @param options The options parameters. - */ - async beginUpdateTagsAndWait( - resourceGroupName: string, - expressRouteGatewayName: string, - expressRouteGatewayParameters: TagsObject, - options?: ExpressRouteGatewaysUpdateTagsOptionalParams, - ): Promise { - const poller = await this.beginUpdateTags( - resourceGroupName, - expressRouteGatewayName, - expressRouteGatewayParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Fetches the details of a ExpressRoute gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - expressRouteGatewayName: string, - options?: ExpressRouteGatewaysGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, expressRouteGatewayName, options }, - getOperationSpec, - ); - } - - /** - * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can - * only be deleted when there are no connection subresources. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - expressRouteGatewayName: string, - options?: ExpressRouteGatewaysDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, expressRouteGatewayName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can - * only be deleted when there are no connection subresources. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - expressRouteGatewayName: string, - options?: ExpressRouteGatewaysDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, expressRouteGatewayName, options); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteGatewayList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteGatewayList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteGateway, - }, - 201: { - bodyMapper: Mappers.ExpressRouteGateway, - }, - 202: { - bodyMapper: Mappers.ExpressRouteGateway, - }, - 204: { - bodyMapper: Mappers.ExpressRouteGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.putExpressRouteGatewayParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.expressRouteGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteGateway, - }, - 201: { - bodyMapper: Mappers.ExpressRouteGateway, - }, - 202: { - bodyMapper: Mappers.ExpressRouteGateway, - }, - 204: { - bodyMapper: Mappers.ExpressRouteGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.expressRouteGatewayParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.expressRouteGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.expressRouteGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.expressRouteGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRouteLinks.ts b/sdk/network/arm-network/src/operations/expressRouteLinks.ts deleted file mode 100644 index 24cd6d1441ae..000000000000 --- a/sdk/network/arm-network/src/operations/expressRouteLinks.ts +++ /dev/null @@ -1,229 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ExpressRouteLinks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ExpressRouteLink, - ExpressRouteLinksListNextOptionalParams, - ExpressRouteLinksListOptionalParams, - ExpressRouteLinksListResponse, - ExpressRouteLinksGetOptionalParams, - ExpressRouteLinksGetResponse, - ExpressRouteLinksListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ExpressRouteLinks operations. */ -export class ExpressRouteLinksImpl implements ExpressRouteLinks { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRouteLinks class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRouteLinksListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, expressRoutePortName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, expressRoutePortName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRouteLinksListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRouteLinksListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, expressRoutePortName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - expressRoutePortName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRouteLinksListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - expressRoutePortName, - options, - )) { - yield* page; - } - } - - /** - * Retrieves the specified ExpressRouteLink resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param linkName The name of the ExpressRouteLink resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - expressRoutePortName: string, - linkName: string, - options?: ExpressRouteLinksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, expressRoutePortName, linkName, options }, - getOperationSpec, - ); - } - - /** - * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRouteLinksListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, expressRoutePortName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @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?: ExpressRouteLinksListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, expressRoutePortName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteLink, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.expressRoutePortName, - Parameters.linkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteLinkListResult, - }, - 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.ExpressRouteLinkListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.expressRoutePortName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRoutePortAuthorizations.ts b/sdk/network/arm-network/src/operations/expressRoutePortAuthorizations.ts deleted file mode 100644 index 7ca5ef39e44e..000000000000 --- a/sdk/network/arm-network/src/operations/expressRoutePortAuthorizations.ts +++ /dev/null @@ -1,489 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ExpressRoutePortAuthorizations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ExpressRoutePortAuthorization, - ExpressRoutePortAuthorizationsListNextOptionalParams, - ExpressRoutePortAuthorizationsListOptionalParams, - ExpressRoutePortAuthorizationsListResponse, - ExpressRoutePortAuthorizationsDeleteOptionalParams, - ExpressRoutePortAuthorizationsGetOptionalParams, - ExpressRoutePortAuthorizationsGetResponse, - ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, - ExpressRoutePortAuthorizationsCreateOrUpdateResponse, - ExpressRoutePortAuthorizationsListNextResponse, -} from "../models/index.js"; - -/// -/** 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: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, expressRoutePortName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRoutePortAuthorizationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRoutePortAuthorizationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, expressRoutePortName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - expressRoutePortName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - 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 sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - expressRoutePortName, - authorizationName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * 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< - SimplePollerLike< - OperationState, - ExpressRoutePortAuthorizationsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - expressRoutePortName, - authorizationName, - authorizationParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRoutePortAuthorizationsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * 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, - }, - }, - 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 deleted file mode 100644 index 8d6ebb48fad3..000000000000 --- a/sdk/network/arm-network/src/operations/expressRoutePorts.ts +++ /dev/null @@ -1,635 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ExpressRoutePorts } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ExpressRoutePort, - ExpressRoutePortsListByResourceGroupNextOptionalParams, - ExpressRoutePortsListByResourceGroupOptionalParams, - ExpressRoutePortsListByResourceGroupResponse, - ExpressRoutePortsListNextOptionalParams, - ExpressRoutePortsListOptionalParams, - ExpressRoutePortsListResponse, - ExpressRoutePortsDeleteOptionalParams, - ExpressRoutePortsGetOptionalParams, - ExpressRoutePortsGetResponse, - ExpressRoutePortsCreateOrUpdateOptionalParams, - ExpressRoutePortsCreateOrUpdateResponse, - TagsObject, - ExpressRoutePortsUpdateTagsOptionalParams, - ExpressRoutePortsUpdateTagsResponse, - GenerateExpressRoutePortsLOARequest, - ExpressRoutePortsGenerateLOAOptionalParams, - ExpressRoutePortsGenerateLOAResponse, - ExpressRoutePortsListByResourceGroupNextResponse, - ExpressRoutePortsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ExpressRoutePorts operations. */ -export class ExpressRoutePortsImpl implements ExpressRoutePorts { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRoutePorts class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List all the ExpressRoutePort resources in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ExpressRoutePortsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ExpressRoutePortsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRoutePortsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ExpressRoutePortsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * List all the ExpressRoutePort resources in the specified subscription. - * @param options The options parameters. - */ - public list( - options?: ExpressRoutePortsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: ExpressRoutePortsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRoutePortsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: ExpressRoutePortsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the specified ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRoutePortsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, expressRoutePortName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRoutePortsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, expressRoutePortName, options); - return poller.pollUntilDone(); - } - - /** - * Retrieves the requested ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of ExpressRoutePort. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRoutePortsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, expressRoutePortName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the specified ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param parameters Parameters supplied to the create ExpressRoutePort operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - expressRoutePortName: string, - parameters: ExpressRoutePort, - options?: ExpressRoutePortsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRoutePortsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, expressRoutePortName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ExpressRoutePortsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param parameters Parameters supplied to the create ExpressRoutePort operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - expressRoutePortName: string, - parameters: ExpressRoutePort, - options?: ExpressRoutePortsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - expressRoutePortName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update ExpressRoutePort tags. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param parameters Parameters supplied to update ExpressRoutePort resource tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - expressRoutePortName: string, - parameters: TagsObject, - options?: ExpressRoutePortsUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, expressRoutePortName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * List all the ExpressRoutePort resources in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ExpressRoutePortsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * List all the ExpressRoutePort resources in the specified subscription. - * @param options The options parameters. - */ - private _list( - options?: ExpressRoutePortsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Generate a letter of authorization for the requested ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of ExpressRoutePort. - * @param request Request parameters supplied to generate a letter of authorization. - * @param options The options parameters. - */ - generateLOA( - resourceGroupName: string, - expressRoutePortName: string, - request: GenerateExpressRoutePortsLOARequest, - options?: ExpressRoutePortsGenerateLOAOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, expressRoutePortName, request, options }, - generateLOAOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ExpressRoutePortsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ExpressRoutePortsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ 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}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.expressRoutePortName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRoutePort, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.expressRoutePortName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ExpressRoutePort, - }, - 201: { - bodyMapper: Mappers.ExpressRoutePort, - }, - 202: { - bodyMapper: Mappers.ExpressRoutePort, - }, - 204: { - bodyMapper: Mappers.ExpressRoutePort, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters20, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.expressRoutePortName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ExpressRoutePort, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.expressRoutePortName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRoutePortListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRoutePortListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const generateLOAOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/generateLoa", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GenerateExpressRoutePortsLOAResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.request, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.expressRoutePortName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRoutePortListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRoutePortListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRoutePortsLocations.ts b/sdk/network/arm-network/src/operations/expressRoutePortsLocations.ts deleted file mode 100644 index 728afda118cf..000000000000 --- a/sdk/network/arm-network/src/operations/expressRoutePortsLocations.ts +++ /dev/null @@ -1,177 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ExpressRoutePortsLocations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ExpressRoutePortsLocation, - ExpressRoutePortsLocationsListNextOptionalParams, - ExpressRoutePortsLocationsListOptionalParams, - ExpressRoutePortsLocationsListResponse, - ExpressRoutePortsLocationsGetOptionalParams, - ExpressRoutePortsLocationsGetResponse, - ExpressRoutePortsLocationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ExpressRoutePortsLocations operations. */ -export class ExpressRoutePortsLocationsImpl implements ExpressRoutePortsLocations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRoutePortsLocations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each - * location. Available bandwidths can only be obtained when retrieving a specific peering location. - * @param options The options parameters. - */ - public list( - options?: ExpressRoutePortsLocationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: ExpressRoutePortsLocationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRoutePortsLocationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: ExpressRoutePortsLocationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each - * location. Available bandwidths can only be obtained when retrieving a specific peering location. - * @param options The options parameters. - */ - private _list( - options?: ExpressRoutePortsLocationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths - * available at said peering location. - * @param locationName Name of the requested ExpressRoutePort peering location. - * @param options The options parameters. - */ - get( - locationName: string, - options?: ExpressRoutePortsLocationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ locationName, options }, getOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ExpressRoutePortsLocationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRoutePortsLocationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRoutePortsLocation, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.locationName], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRoutePortsLocationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRouteProviderPortsLocation.ts b/sdk/network/arm-network/src/operations/expressRouteProviderPortsLocation.ts deleted file mode 100644 index fe925a274458..000000000000 --- a/sdk/network/arm-network/src/operations/expressRouteProviderPortsLocation.ts +++ /dev/null @@ -1,57 +0,0 @@ -// 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 type { ExpressRouteProviderPortsLocation } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ExpressRouteProviderPortsLocationListOptionalParams, - ExpressRouteProviderPortsLocationListResponse, -} from "../models/index.js"; - -/** Class containing ExpressRouteProviderPortsLocation operations. */ -export class ExpressRouteProviderPortsLocationImpl implements ExpressRouteProviderPortsLocation { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRouteProviderPortsLocation class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves all the ExpressRouteProviderPorts in a subscription. - * @param options The options parameters. - */ - list( - options?: ExpressRouteProviderPortsLocationListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteProviderPortListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.filter], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/expressRouteServiceProviders.ts b/sdk/network/arm-network/src/operations/expressRouteServiceProviders.ts deleted file mode 100644 index 0a0b54795633..000000000000 --- a/sdk/network/arm-network/src/operations/expressRouteServiceProviders.ts +++ /dev/null @@ -1,144 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ExpressRouteServiceProviders } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ExpressRouteServiceProvider, - ExpressRouteServiceProvidersListNextOptionalParams, - ExpressRouteServiceProvidersListOptionalParams, - ExpressRouteServiceProvidersListResponse, - ExpressRouteServiceProvidersListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ExpressRouteServiceProviders operations. */ -export class ExpressRouteServiceProvidersImpl implements ExpressRouteServiceProviders { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ExpressRouteServiceProviders class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the available express route service providers. - * @param options The options parameters. - */ - public list( - options?: ExpressRouteServiceProvidersListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: ExpressRouteServiceProvidersListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ExpressRouteServiceProvidersListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: ExpressRouteServiceProvidersListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all the available express route service providers. - * @param options The options parameters. - */ - private _list( - options?: ExpressRouteServiceProvidersListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ExpressRouteServiceProvidersListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteServiceProviderListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteServiceProviderListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/firewallPolicies.ts b/sdk/network/arm-network/src/operations/firewallPolicies.ts deleted file mode 100644 index 81f760b5e120..000000000000 --- a/sdk/network/arm-network/src/operations/firewallPolicies.ts +++ /dev/null @@ -1,587 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { FirewallPolicies } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - FirewallPolicy, - FirewallPoliciesListNextOptionalParams, - FirewallPoliciesListOptionalParams, - FirewallPoliciesListResponse, - FirewallPoliciesListAllNextOptionalParams, - FirewallPoliciesListAllOptionalParams, - FirewallPoliciesListAllResponse, - FirewallPoliciesDeleteOptionalParams, - FirewallPoliciesGetOptionalParams, - FirewallPoliciesGetResponse, - FirewallPoliciesCreateOrUpdateOptionalParams, - FirewallPoliciesCreateOrUpdateResponse, - TagsObject, - FirewallPoliciesUpdateTagsOptionalParams, - FirewallPoliciesUpdateTagsResponse, - FirewallPoliciesListNextResponse, - FirewallPoliciesListAllNextResponse, -} from "../models/index.js"; - -/// -/** Class containing FirewallPolicies operations. */ -export class FirewallPoliciesImpl implements FirewallPolicies { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class FirewallPolicies class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all Firewall Policies in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: FirewallPoliciesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: FirewallPoliciesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: FirewallPoliciesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: FirewallPoliciesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all the Firewall Policies in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: FirewallPoliciesListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: FirewallPoliciesListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: FirewallPoliciesListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: FirewallPoliciesListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the specified Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPoliciesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, firewallPolicyName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPoliciesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, firewallPolicyName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPoliciesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the specified Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Parameters supplied to the create or update Firewall Policy operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - firewallPolicyName: string, - parameters: FirewallPolicy, - options?: FirewallPoliciesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - FirewallPoliciesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, firewallPolicyName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - FirewallPoliciesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Parameters supplied to the create or update Firewall Policy operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - firewallPolicyName: string, - parameters: FirewallPolicy, - options?: FirewallPoliciesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - firewallPolicyName, - parameters, - options, - ); - 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. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: FirewallPoliciesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all the Firewall Policies in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: FirewallPoliciesListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: FirewallPoliciesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: FirewallPoliciesListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicy, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicy, - }, - 201: { - bodyMapper: Mappers.FirewallPolicy, - }, - 202: { - bodyMapper: Mappers.FirewallPolicy, - }, - 204: { - bodyMapper: Mappers.FirewallPolicy, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters21, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - 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", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/firewallPolicyDeployments.ts b/sdk/network/arm-network/src/operations/firewallPolicyDeployments.ts deleted file mode 100644 index 72c5c7bac73f..000000000000 --- a/sdk/network/arm-network/src/operations/firewallPolicyDeployments.ts +++ /dev/null @@ -1,149 +0,0 @@ -// 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 type { FirewallPolicyDeployments } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - FirewallPolicyDeploymentsDeployOptionalParams, - FirewallPolicyDeploymentsDeployResponse, -} from "../models/index.js"; - -/** Class containing FirewallPolicyDeployments operations. */ -export class FirewallPolicyDeploymentsImpl implements FirewallPolicyDeployments { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class FirewallPolicyDeployments class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Deploys the firewall policy draft and child rule collection group drafts. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - async beginDeploy( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyDeploymentsDeployOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - FirewallPolicyDeploymentsDeployResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, firewallPolicyName, options }, - spec: deployOperationSpec, - }); - const poller = await createHttpPoller< - FirewallPolicyDeploymentsDeployResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Deploys the firewall policy draft and child rule collection group drafts. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - async beginDeployAndWait( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyDeploymentsDeployOptionalParams, - ): Promise { - const poller = await this.beginDeploy(resourceGroupName, firewallPolicyName, options); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deployOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/deploy", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.FirewallPolicyDeploymentsDeployHeaders, - }, - 201: { - headersMapper: Mappers.FirewallPolicyDeploymentsDeployHeaders, - }, - 202: { - headersMapper: Mappers.FirewallPolicyDeploymentsDeployHeaders, - }, - 204: { - headersMapper: Mappers.FirewallPolicyDeploymentsDeployHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/firewallPolicyDrafts.ts b/sdk/network/arm-network/src/operations/firewallPolicyDrafts.ts deleted file mode 100644 index 1c0bc3bde658..000000000000 --- a/sdk/network/arm-network/src/operations/firewallPolicyDrafts.ts +++ /dev/null @@ -1,155 +0,0 @@ -// 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 type { FirewallPolicyDrafts } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - FirewallPolicyDraft, - FirewallPolicyDraftsCreateOrUpdateOptionalParams, - FirewallPolicyDraftsCreateOrUpdateResponse, - FirewallPolicyDraftsDeleteOptionalParams, - FirewallPolicyDraftsGetOptionalParams, - FirewallPolicyDraftsGetResponse, -} from "../models/index.js"; - -/** Class containing FirewallPolicyDrafts operations. */ -export class FirewallPolicyDraftsImpl implements FirewallPolicyDrafts { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class FirewallPolicyDrafts class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Create or update a draft Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Parameters supplied to the create or update Firewall Policy Draft operation. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - firewallPolicyName: string, - parameters: FirewallPolicyDraft, - options?: FirewallPolicyDraftsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Delete a draft policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyDraftsDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, options }, - deleteOperationSpec, - ); - } - - /** - * Get a draft Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyDraftsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, options }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/firewallPolicyDrafts/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyDraft, - }, - 201: { - bodyMapper: Mappers.FirewallPolicyDraft, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters26, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/firewallPolicyDrafts/default", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/firewallPolicyDrafts/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyDraft, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignatures.ts b/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignatures.ts deleted file mode 100644 index eebb0dd42888..000000000000 --- a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignatures.ts +++ /dev/null @@ -1,75 +0,0 @@ -// 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 type { FirewallPolicyIdpsSignatures } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - IdpsQueryObject, - FirewallPolicyIdpsSignaturesListOptionalParams, - FirewallPolicyIdpsSignaturesListResponse, -} from "../models/index.js"; - -/** Class containing FirewallPolicyIdpsSignatures operations. */ -export class FirewallPolicyIdpsSignaturesImpl implements FirewallPolicyIdpsSignatures { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class FirewallPolicyIdpsSignatures class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned - * signatures is 1000. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Will describe the query to run against the IDPS signatures DB - * @param options The options parameters. - */ - list( - resourceGroupName: string, - firewallPolicyName: string, - parameters: IdpsQueryObject, - options?: FirewallPolicyIdpsSignaturesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, parameters, options }, - listOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsSignatures", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.QueryResults, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters23, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesFilterValues.ts b/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesFilterValues.ts deleted file mode 100644 index fb5b88168c1a..000000000000 --- a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesFilterValues.ts +++ /dev/null @@ -1,74 +0,0 @@ -// 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 type { FirewallPolicyIdpsSignaturesFilterValues } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - SignatureOverridesFilterValuesQuery, - FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams, - FirewallPolicyIdpsSignaturesFilterValuesListResponse, -} from "../models/index.js"; - -/** Class containing FirewallPolicyIdpsSignaturesFilterValues operations. */ -export class FirewallPolicyIdpsSignaturesFilterValuesImpl implements FirewallPolicyIdpsSignaturesFilterValues { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class FirewallPolicyIdpsSignaturesFilterValues class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves the current filter values for the signatures overrides - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Describes the filter values possibles for a given column - * @param options The options parameters. - */ - list( - resourceGroupName: string, - firewallPolicyName: string, - parameters: SignatureOverridesFilterValuesQuery, - options?: FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, parameters, options }, - listOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsFilterOptions", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SignatureOverridesFilterValuesResponse, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters25, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesOverrides.ts b/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesOverrides.ts deleted file mode 100644 index d5dd13d531cb..000000000000 --- a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesOverrides.ts +++ /dev/null @@ -1,198 +0,0 @@ -// 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 type { FirewallPolicyIdpsSignaturesOverrides } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - SignaturesOverrides, - FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams, - FirewallPolicyIdpsSignaturesOverridesPatchResponse, - FirewallPolicyIdpsSignaturesOverridesPutOptionalParams, - FirewallPolicyIdpsSignaturesOverridesPutResponse, - FirewallPolicyIdpsSignaturesOverridesGetOptionalParams, - FirewallPolicyIdpsSignaturesOverridesGetResponse, - FirewallPolicyIdpsSignaturesOverridesListOptionalParams, - FirewallPolicyIdpsSignaturesOverridesListResponse, -} from "../models/index.js"; - -/** Class containing FirewallPolicyIdpsSignaturesOverrides operations. */ -export class FirewallPolicyIdpsSignaturesOverridesImpl implements FirewallPolicyIdpsSignaturesOverrides { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class FirewallPolicyIdpsSignaturesOverrides class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Will update the status of policy's signature overrides for IDPS - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Will contain all properties of the object to put - * @param options The options parameters. - */ - patch( - resourceGroupName: string, - firewallPolicyName: string, - parameters: SignaturesOverrides, - options?: FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, parameters, options }, - patchOperationSpec, - ); - } - - /** - * Will override/create a new signature overrides for the policy's IDPS - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Will contain all properties of the object to put - * @param options The options parameters. - */ - put( - resourceGroupName: string, - firewallPolicyName: string, - parameters: SignaturesOverrides, - options?: FirewallPolicyIdpsSignaturesOverridesPutOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, parameters, options }, - putOperationSpec, - ); - } - - /** - * Returns all signatures overrides for a specific policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyIdpsSignaturesOverridesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, options }, - getOperationSpec, - ); - } - - /** - * Returns all signatures overrides objects for a specific policy as a list containing a single value. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyIdpsSignaturesOverridesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, options }, - listOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const patchOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.SignaturesOverrides, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters24, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const putOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SignaturesOverrides, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters24, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SignaturesOverrides, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SignaturesOverridesList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroupDrafts.ts b/sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroupDrafts.ts deleted file mode 100644 index 49ee7d9642cb..000000000000 --- a/sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroupDrafts.ts +++ /dev/null @@ -1,181 +0,0 @@ -// 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 type { FirewallPolicyRuleCollectionGroupDrafts } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams, - FirewallPolicyRuleCollectionGroupDraft, - FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams, - FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateResponse, - FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams, - FirewallPolicyRuleCollectionGroupDraftsGetResponse, -} from "../models/index.js"; - -/** Class containing FirewallPolicyRuleCollectionGroupDrafts operations. */ -export class FirewallPolicyRuleCollectionGroupDraftsImpl implements FirewallPolicyRuleCollectionGroupDrafts { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class FirewallPolicyRuleCollectionGroupDrafts class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Delete Rule Collection Group Draft. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - options?: FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - options, - }, - deleteOperationSpec, - ); - } - - /** - * Create or Update Rule Collection Group Draft. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param parameters Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup - * operation. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - parameters: FirewallPolicyRuleCollectionGroupDraft, - options?: FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Get Rule Collection Group Draft. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - options?: FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - options, - }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName1, - Parameters.ruleCollectionGroupName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyRuleCollectionGroupDraft, - }, - 201: { - bodyMapper: Mappers.FirewallPolicyRuleCollectionGroupDraft, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters27, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName1, - Parameters.ruleCollectionGroupName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyRuleCollectionGroupDraft, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName1, - Parameters.ruleCollectionGroupName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroups.ts b/sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroups.ts deleted file mode 100644 index 21e5dec804c9..000000000000 --- a/sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroups.ts +++ /dev/null @@ -1,490 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { FirewallPolicyRuleCollectionGroups } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - FirewallPolicyRuleCollectionGroup, - FirewallPolicyRuleCollectionGroupsListNextOptionalParams, - FirewallPolicyRuleCollectionGroupsListOptionalParams, - FirewallPolicyRuleCollectionGroupsListResponse, - FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, - FirewallPolicyRuleCollectionGroupsGetOptionalParams, - FirewallPolicyRuleCollectionGroupsGetResponse, - FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, - FirewallPolicyRuleCollectionGroupsCreateOrUpdateResponse, - FirewallPolicyRuleCollectionGroupsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing FirewallPolicyRuleCollectionGroups operations. */ -export class FirewallPolicyRuleCollectionGroupsImpl implements FirewallPolicyRuleCollectionGroups { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class FirewallPolicyRuleCollectionGroups class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyRuleCollectionGroupsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, firewallPolicyName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, firewallPolicyName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyRuleCollectionGroupsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: FirewallPolicyRuleCollectionGroupsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, firewallPolicyName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - firewallPolicyName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyRuleCollectionGroupsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, firewallPolicyName, options)) { - yield* page; - } - } - - /** - * Deletes the specified FirewallPolicyRuleCollectionGroup. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified FirewallPolicyRuleCollectionGroup. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified FirewallPolicyRuleCollectionGroup. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - options?: FirewallPolicyRuleCollectionGroupsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param parameters Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - parameters: FirewallPolicyRuleCollectionGroup, - options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - FirewallPolicyRuleCollectionGroupsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - FirewallPolicyRuleCollectionGroupsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param parameters Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - parameters: FirewallPolicyRuleCollectionGroup, - options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - firewallPolicyName, - ruleCollectionGroupName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyRuleCollectionGroupsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - firewallPolicyName: string, - nextLink: string, - options?: FirewallPolicyRuleCollectionGroupsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, firewallPolicyName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - Parameters.ruleCollectionGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyRuleCollectionGroup, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - Parameters.ruleCollectionGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyRuleCollectionGroup, - }, - 201: { - bodyMapper: Mappers.FirewallPolicyRuleCollectionGroup, - }, - 202: { - bodyMapper: Mappers.FirewallPolicyRuleCollectionGroup, - }, - 204: { - bodyMapper: Mappers.FirewallPolicyRuleCollectionGroup, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters22, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - Parameters.ruleCollectionGroupName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyRuleCollectionGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.firewallPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FirewallPolicyRuleCollectionGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.firewallPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/flowLogs.ts b/sdk/network/arm-network/src/operations/flowLogs.ts deleted file mode 100644 index 314bfa16bee5..000000000000 --- a/sdk/network/arm-network/src/operations/flowLogs.ts +++ /dev/null @@ -1,529 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { FlowLogs } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - FlowLog, - FlowLogsListNextOptionalParams, - FlowLogsListOptionalParams, - FlowLogsListResponse, - FlowLogsCreateOrUpdateOptionalParams, - FlowLogsCreateOrUpdateResponse, - TagsObject, - FlowLogsUpdateTagsOptionalParams, - FlowLogsUpdateTagsResponse, - FlowLogsGetOptionalParams, - FlowLogsGetResponse, - FlowLogsDeleteOptionalParams, - FlowLogsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing FlowLogs operations. */ -export class FlowLogsImpl implements FlowLogs { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class FlowLogs class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all flow log resources for the specified Network Watcher. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkWatcherName: string, - options?: FlowLogsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkWatcherName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkWatcherName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkWatcherName: string, - options?: FlowLogsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: FlowLogsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkWatcherName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkWatcherName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkWatcherName: string, - options?: FlowLogsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, networkWatcherName, options)) { - yield* page; - } - } - - /** - * Create or update a flow log for the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log. - * @param parameters Parameters that define the create or update flow log resource. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - parameters: FlowLog, - options?: FlowLogsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, FlowLogsCreateOrUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - FlowLogsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create or update a flow log for the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log. - * @param parameters Parameters that define the create or update flow log resource. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - parameters: FlowLog, - options?: FlowLogsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update tags of the specified flow log. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log. - * @param parameters Parameters supplied to update flow log tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - parameters: TagsObject, - options?: FlowLogsUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkWatcherName, - flowLogName, - parameters, - options, - }, - updateTagsOperationSpec, - ); - } - - /** - * Gets a flow log resource by name. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - options?: FlowLogsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkWatcherName, flowLogName, options }, - getOperationSpec, - ); - } - - /** - * Deletes the specified flow log resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log resource. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - options?: FlowLogsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, flowLogName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified flow log resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - options?: FlowLogsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkWatcherName, - flowLogName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all flow log resources for the specified Network Watcher. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkWatcherName: string, - options?: FlowLogsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkWatcherName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkWatcherName: string, - nextLink: string, - options?: FlowLogsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkWatcherName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.FlowLog, - }, - 201: { - bodyMapper: Mappers.FlowLog, - }, - 202: { - bodyMapper: Mappers.FlowLog, - }, - 204: { - bodyMapper: Mappers.FlowLog, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters72, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.flowLogName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.FlowLog, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.flowLogName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FlowLog, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.flowLogName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.flowLogName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FlowLogListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FlowLogListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/hubRouteTables.ts b/sdk/network/arm-network/src/operations/hubRouteTables.ts deleted file mode 100644 index 14bcb7949b36..000000000000 --- a/sdk/network/arm-network/src/operations/hubRouteTables.ts +++ /dev/null @@ -1,473 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { HubRouteTables } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - HubRouteTable, - HubRouteTablesListNextOptionalParams, - HubRouteTablesListOptionalParams, - HubRouteTablesListResponse, - HubRouteTablesCreateOrUpdateOptionalParams, - HubRouteTablesCreateOrUpdateResponse, - HubRouteTablesGetOptionalParams, - HubRouteTablesGetResponse, - HubRouteTablesDeleteOptionalParams, - HubRouteTablesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing HubRouteTables operations. */ -export class HubRouteTablesImpl implements HubRouteTables { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class HubRouteTables class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves the details of all RouteTables. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - virtualHubName: string, - options?: HubRouteTablesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, virtualHubName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, virtualHubName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - virtualHubName: string, - options?: HubRouteTablesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: HubRouteTablesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, virtualHubName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, virtualHubName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - virtualHubName: string, - options?: HubRouteTablesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, virtualHubName, options)) { - yield* page; - } - } - - /** - * Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the RouteTable. - * @param routeTableParameters Parameters supplied to create or update RouteTable. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - routeTableParameters: HubRouteTable, - options?: HubRouteTablesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - HubRouteTablesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualHubName, - routeTableName, - routeTableParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - HubRouteTablesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the RouteTable. - * @param routeTableParameters Parameters supplied to create or update RouteTable. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - routeTableParameters: HubRouteTable, - options?: HubRouteTablesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualHubName, - routeTableName, - routeTableParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves the details of a RouteTable. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the RouteTable. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: HubRouteTablesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, routeTableName, options }, - getOperationSpec, - ); - } - - /** - * Deletes a RouteTable. - * @param resourceGroupName The resource group name of the RouteTable. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the RouteTable. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: HubRouteTablesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualHubName, routeTableName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a RouteTable. - * @param resourceGroupName The resource group name of the RouteTable. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the RouteTable. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: HubRouteTablesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualHubName, - routeTableName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves the details of all RouteTables. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - virtualHubName: string, - options?: HubRouteTablesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - virtualHubName: string, - nextLink: string, - options?: HubRouteTablesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.HubRouteTable, - }, - 201: { - bodyMapper: Mappers.HubRouteTable, - }, - 202: { - bodyMapper: Mappers.HubRouteTable, - }, - 204: { - bodyMapper: Mappers.HubRouteTable, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.routeTableParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HubRouteTable, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListHubRouteTablesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListHubRouteTablesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/hubVirtualNetworkConnections.ts b/sdk/network/arm-network/src/operations/hubVirtualNetworkConnections.ts deleted file mode 100644 index f8459bde3335..000000000000 --- a/sdk/network/arm-network/src/operations/hubVirtualNetworkConnections.ts +++ /dev/null @@ -1,475 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { HubVirtualNetworkConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - HubVirtualNetworkConnection, - HubVirtualNetworkConnectionsListNextOptionalParams, - HubVirtualNetworkConnectionsListOptionalParams, - HubVirtualNetworkConnectionsListResponse, - HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, - HubVirtualNetworkConnectionsCreateOrUpdateResponse, - HubVirtualNetworkConnectionsDeleteOptionalParams, - HubVirtualNetworkConnectionsGetOptionalParams, - HubVirtualNetworkConnectionsGetResponse, - HubVirtualNetworkConnectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing HubVirtualNetworkConnections operations. */ -export class HubVirtualNetworkConnectionsImpl implements HubVirtualNetworkConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class HubVirtualNetworkConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves the details of all HubVirtualNetworkConnections. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - virtualHubName: string, - options?: HubVirtualNetworkConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, virtualHubName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, virtualHubName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - virtualHubName: string, - options?: HubVirtualNetworkConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: HubVirtualNetworkConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, virtualHubName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, virtualHubName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - virtualHubName: string, - options?: HubVirtualNetworkConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, virtualHubName, options)) { - yield* page; - } - } - - /** - * Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * @param resourceGroupName The resource group name of the HubVirtualNetworkConnection. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the HubVirtualNetworkConnection. - * @param hubVirtualNetworkConnectionParameters Parameters supplied to create or update a hub virtual - * network connection. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, - options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - HubVirtualNetworkConnectionsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualHubName, - connectionName, - hubVirtualNetworkConnectionParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - HubVirtualNetworkConnectionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * @param resourceGroupName The resource group name of the HubVirtualNetworkConnection. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the HubVirtualNetworkConnection. - * @param hubVirtualNetworkConnectionParameters Parameters supplied to create or update a hub virtual - * network connection. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, - options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualHubName, - connectionName, - hubVirtualNetworkConnectionParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a HubVirtualNetworkConnection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the HubVirtualNetworkConnection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: HubVirtualNetworkConnectionsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualHubName, connectionName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a HubVirtualNetworkConnection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the HubVirtualNetworkConnection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: HubVirtualNetworkConnectionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualHubName, - connectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves the details of a HubVirtualNetworkConnection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the vpn connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: HubVirtualNetworkConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, connectionName, options }, - getOperationSpec, - ); - } - - /** - * Retrieves the details of all HubVirtualNetworkConnections. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - virtualHubName: string, - options?: HubVirtualNetworkConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - virtualHubName: string, - nextLink: string, - options?: HubVirtualNetworkConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.HubVirtualNetworkConnection, - }, - 201: { - bodyMapper: Mappers.HubVirtualNetworkConnection, - }, - 202: { - bodyMapper: Mappers.HubVirtualNetworkConnection, - }, - 204: { - bodyMapper: Mappers.HubVirtualNetworkConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.hubVirtualNetworkConnectionParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HubVirtualNetworkConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListHubVirtualNetworkConnectionsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListHubVirtualNetworkConnectionsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/inboundNatRules.ts b/sdk/network/arm-network/src/operations/inboundNatRules.ts deleted file mode 100644 index 166248add261..000000000000 --- a/sdk/network/arm-network/src/operations/inboundNatRules.ts +++ /dev/null @@ -1,485 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { InboundNatRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - InboundNatRule, - InboundNatRulesListNextOptionalParams, - InboundNatRulesListOptionalParams, - InboundNatRulesListResponse, - InboundNatRulesDeleteOptionalParams, - InboundNatRulesGetOptionalParams, - InboundNatRulesGetResponse, - InboundNatRulesCreateOrUpdateOptionalParams, - InboundNatRulesCreateOrUpdateResponse, - InboundNatRulesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing InboundNatRules operations. */ -export class InboundNatRulesImpl implements InboundNatRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class InboundNatRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the inbound NAT rules in a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - loadBalancerName: string, - options?: InboundNatRulesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, loadBalancerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, loadBalancerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - loadBalancerName: string, - options?: InboundNatRulesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: InboundNatRulesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, loadBalancerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - loadBalancerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - loadBalancerName: string, - options?: InboundNatRulesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, loadBalancerName, options)) { - yield* page; - } - } - - /** - * Gets all the inbound NAT rules in a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - loadBalancerName: string, - options?: InboundNatRulesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, options }, - listOperationSpec, - ); - } - - /** - * Deletes the specified load balancer inbound NAT rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param inboundNatRuleName The name of the inbound NAT rule. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - loadBalancerName: string, - inboundNatRuleName: string, - options?: InboundNatRulesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified load balancer inbound NAT rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param inboundNatRuleName The name of the inbound NAT rule. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - loadBalancerName: string, - inboundNatRuleName: string, - options?: InboundNatRulesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified load balancer inbound NAT rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param inboundNatRuleName The name of the inbound NAT rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - inboundNatRuleName: string, - options?: InboundNatRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, inboundNatRuleName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a load balancer inbound NAT rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param inboundNatRuleName The name of the inbound NAT rule. - * @param inboundNatRuleParameters Parameters supplied to the create or update inbound NAT rule - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - loadBalancerName: string, - inboundNatRuleName: string, - inboundNatRuleParameters: InboundNatRule, - options?: InboundNatRulesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - InboundNatRulesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - inboundNatRuleParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - InboundNatRulesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a load balancer inbound NAT rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param inboundNatRuleName The name of the inbound NAT rule. - * @param inboundNatRuleParameters Parameters supplied to the create or update inbound NAT rule - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - loadBalancerName: string, - inboundNatRuleName: string, - inboundNatRuleParameters: InboundNatRule, - options?: InboundNatRulesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - loadBalancerName, - inboundNatRuleName, - inboundNatRuleParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - loadBalancerName: string, - nextLink: string, - options?: InboundNatRulesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.InboundNatRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - Parameters.inboundNatRuleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.InboundNatRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - Parameters.inboundNatRuleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.InboundNatRule, - }, - 201: { - bodyMapper: Mappers.InboundNatRule, - }, - 202: { - bodyMapper: Mappers.InboundNatRule, - }, - 204: { - bodyMapper: Mappers.InboundNatRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.inboundNatRuleParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - Parameters.inboundNatRuleName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.InboundNatRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts b/sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts deleted file mode 100644 index 80e8a9e0e43f..000000000000 --- a/sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts +++ /dev/null @@ -1,223 +0,0 @@ -// 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 type { InboundSecurityRuleOperations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - InboundSecurityRule, - InboundSecurityRuleCreateOrUpdateOptionalParams, - InboundSecurityRuleCreateOrUpdateResponse, - InboundSecurityRuleGetOptionalParams, - InboundSecurityRuleGetResponse, -} from "../models/index.js"; - -/** Class containing InboundSecurityRuleOperations operations. */ -export class InboundSecurityRuleOperationsImpl implements InboundSecurityRuleOperations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class InboundSecurityRuleOperations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param ruleCollectionName The name of security rule collection. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound - * Security Rules operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - networkVirtualApplianceName: string, - ruleCollectionName: string, - parameters: InboundSecurityRule, - options?: InboundSecurityRuleCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - InboundSecurityRuleCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - InboundSecurityRuleCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param ruleCollectionName The name of security rule collection. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound - * Security Rules operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - ruleCollectionName: string, - parameters: InboundSecurityRule, - options?: InboundSecurityRuleCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param ruleCollectionName The name of security rule collection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkVirtualApplianceName: string, - ruleCollectionName: string, - options?: InboundSecurityRuleGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkVirtualApplianceName, - ruleCollectionName, - options, - }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.InboundSecurityRule, - }, - 201: { - bodyMapper: Mappers.InboundSecurityRule, - }, - 202: { - bodyMapper: Mappers.InboundSecurityRule, - }, - 204: { - bodyMapper: Mappers.InboundSecurityRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters56, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleCollectionName1, - Parameters.networkVirtualApplianceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.InboundSecurityRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleCollectionName1, - Parameters.networkVirtualApplianceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/index.ts b/sdk/network/arm-network/src/operations/index.ts deleted file mode 100644 index 5edc4144ad63..000000000000 --- a/sdk/network/arm-network/src/operations/index.ts +++ /dev/null @@ -1,164 +0,0 @@ -// 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. - -export * from "./applicationGateways.js"; -export * from "./applicationGatewayPrivateLinkResources.js"; -export * from "./applicationGatewayPrivateEndpointConnections.js"; -export * from "./applicationGatewayWafDynamicManifestsDefault.js"; -export * from "./applicationGatewayWafDynamicManifests.js"; -export * from "./applicationSecurityGroups.js"; -export * from "./availableDelegations.js"; -export * from "./availableResourceGroupDelegations.js"; -export * from "./availableServiceAliases.js"; -export * from "./azureFirewalls.js"; -export * from "./azureFirewallFqdnTags.js"; -export * from "./webCategories.js"; -export * from "./bastionHosts.js"; -export * from "./networkInterfaces.js"; -export * from "./publicIPAddresses.js"; -export * from "./vipSwap.js"; -export * from "./customIPPrefixes.js"; -export * from "./ddosCustomPolicies.js"; -export * from "./ddosProtectionPlans.js"; -export * from "./dscpConfigurationOperations.js"; -export * from "./availableEndpointServices.js"; -export * from "./expressRouteCircuitAuthorizations.js"; -export * from "./expressRouteCircuitPeerings.js"; -export * from "./expressRouteCircuitConnections.js"; -export * from "./peerExpressRouteCircuitConnections.js"; -export * from "./expressRouteCircuits.js"; -export * from "./expressRouteServiceProviders.js"; -export * from "./expressRouteCrossConnections.js"; -export * from "./expressRouteCrossConnectionPeerings.js"; -export * from "./expressRoutePortsLocations.js"; -export * from "./expressRoutePorts.js"; -export * from "./expressRouteLinks.js"; -export * from "./expressRoutePortAuthorizations.js"; -export * from "./expressRouteProviderPortsLocation.js"; -export * from "./firewallPolicies.js"; -export * from "./firewallPolicyRuleCollectionGroups.js"; -export * from "./firewallPolicyIdpsSignatures.js"; -export * from "./firewallPolicyIdpsSignaturesOverrides.js"; -export * from "./firewallPolicyIdpsSignaturesFilterValues.js"; -export * from "./firewallPolicyDrafts.js"; -export * from "./firewallPolicyDeployments.js"; -export * from "./firewallPolicyRuleCollectionGroupDrafts.js"; -export * from "./ipamPools.js"; -export * from "./staticCidrs.js"; -export * from "./ipAllocations.js"; -export * from "./ipGroups.js"; -export * from "./loadBalancers.js"; -export * from "./loadBalancerBackendAddressPools.js"; -export * from "./loadBalancerFrontendIPConfigurations.js"; -export * from "./inboundNatRules.js"; -export * from "./loadBalancerLoadBalancingRules.js"; -export * from "./loadBalancerOutboundRules.js"; -export * from "./loadBalancerNetworkInterfaces.js"; -export * from "./loadBalancerProbes.js"; -export * from "./natGateways.js"; -export * from "./networkInterfaceIPConfigurations.js"; -export * from "./networkInterfaceLoadBalancers.js"; -export * from "./networkInterfaceTapConfigurations.js"; -export * from "./networkManagers.js"; -export * from "./networkManagerCommits.js"; -export * from "./networkManagerDeploymentStatusOperations.js"; -export * from "./subscriptionNetworkManagerConnections.js"; -export * from "./managementGroupNetworkManagerConnections.js"; -export * from "./connectivityConfigurations.js"; -export * from "./networkGroups.js"; -export * from "./staticMembers.js"; -export * from "./networkManagerRoutingConfigurations.js"; -export * from "./routingRuleCollections.js"; -export * from "./routingRules.js"; -export * from "./scopeConnections.js"; -export * from "./securityAdminConfigurations.js"; -export * from "./adminRuleCollections.js"; -export * from "./adminRules.js"; -export * from "./securityUserConfigurations.js"; -export * from "./securityUserRuleCollections.js"; -export * from "./securityUserRules.js"; -export * from "./networkProfiles.js"; -export * from "./networkSecurityGroups.js"; -export * from "./securityRules.js"; -export * from "./defaultSecurityRules.js"; -export * from "./networkSecurityPerimeters.js"; -export * from "./networkSecurityPerimeterProfiles.js"; -export * from "./networkSecurityPerimeterAccessRules.js"; -export * from "./networkSecurityPerimeterAssociations.js"; -export * from "./networkSecurityPerimeterAssociableResourceTypes.js"; -export * from "./networkSecurityPerimeterLinks.js"; -export * from "./networkSecurityPerimeterLinkReferences.js"; -export * from "./networkSecurityPerimeterLoggingConfigurations.js"; -export * from "./networkSecurityPerimeterOperationStatuses.js"; -export * from "./networkSecurityPerimeterServiceTags.js"; -export * from "./reachabilityAnalysisIntents.js"; -export * from "./reachabilityAnalysisRuns.js"; -export * from "./verifierWorkspaces.js"; -export * from "./networkVirtualAppliances.js"; -export * from "./virtualApplianceSites.js"; -export * from "./virtualApplianceSkus.js"; -export * from "./inboundSecurityRuleOperations.js"; -export * from "./networkWatchers.js"; -export * from "./packetCaptures.js"; -export * from "./connectionMonitors.js"; -export * from "./flowLogs.js"; -export * from "./operations.js"; -export * from "./privateEndpoints.js"; -export * from "./availablePrivateEndpointTypes.js"; -export * from "./privateDnsZoneGroups.js"; -export * from "./privateLinkServices.js"; -export * from "./publicIPPrefixes.js"; -export * from "./routeFilters.js"; -export * from "./routeFilterRules.js"; -export * from "./routeTables.js"; -export * from "./routes.js"; -export * from "./securityPartnerProviders.js"; -export * from "./bgpServiceCommunities.js"; -export * from "./serviceEndpointPolicies.js"; -export * from "./serviceEndpointPolicyDefinitions.js"; -export * from "./serviceGateways.js"; -export * from "./serviceTags.js"; -export * from "./serviceTagInformationOperations.js"; -export * from "./usages.js"; -export * from "./virtualNetworks.js"; -export * from "./subnets.js"; -export * from "./resourceNavigationLinks.js"; -export * from "./serviceAssociationLinks.js"; -export * from "./virtualNetworkPeerings.js"; -export * from "./virtualNetworkAppliances.js"; -export * from "./virtualNetworkGateways.js"; -export * from "./virtualNetworkGatewayConnections.js"; -export * from "./localNetworkGateways.js"; -export * from "./virtualNetworkGatewayNatRules.js"; -export * from "./virtualNetworkTaps.js"; -export * from "./virtualRouters.js"; -export * from "./virtualRouterPeerings.js"; -export * from "./virtualWans.js"; -export * from "./vpnSites.js"; -export * from "./vpnSiteLinks.js"; -export * from "./vpnSitesConfiguration.js"; -export * from "./vpnServerConfigurations.js"; -export * from "./configurationPolicyGroups.js"; -export * from "./virtualHubs.js"; -export * from "./routeMaps.js"; -export * from "./hubVirtualNetworkConnections.js"; -export * from "./vpnGateways.js"; -export * from "./vpnLinkConnections.js"; -export * from "./vpnConnections.js"; -export * from "./vpnSiteLinkConnections.js"; -export * from "./natRules.js"; -export * from "./p2SVpnGateways.js"; -export * from "./vpnServerConfigurationsAssociatedWithVirtualWan.js"; -export * from "./virtualHubRouteTableV2S.js"; -export * from "./expressRouteGateways.js"; -export * from "./expressRouteConnections.js"; -export * from "./networkVirtualApplianceConnections.js"; -export * from "./virtualHubBgpConnection.js"; -export * from "./virtualHubBgpConnections.js"; -export * from "./virtualHubIpConfiguration.js"; -export * from "./hubRouteTables.js"; -export * from "./routingIntentOperations.js"; -export * from "./webApplicationFirewallPolicies.js"; diff --git a/sdk/network/arm-network/src/operations/ipAllocations.ts b/sdk/network/arm-network/src/operations/ipAllocations.ts deleted file mode 100644 index 2808c4637ea4..000000000000 --- a/sdk/network/arm-network/src/operations/ipAllocations.ts +++ /dev/null @@ -1,586 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { IpAllocations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - IpAllocation, - IpAllocationsListNextOptionalParams, - IpAllocationsListOptionalParams, - IpAllocationsListResponse, - IpAllocationsListByResourceGroupNextOptionalParams, - IpAllocationsListByResourceGroupOptionalParams, - IpAllocationsListByResourceGroupResponse, - IpAllocationsDeleteOptionalParams, - IpAllocationsGetOptionalParams, - IpAllocationsGetResponse, - IpAllocationsCreateOrUpdateOptionalParams, - IpAllocationsCreateOrUpdateResponse, - TagsObject, - IpAllocationsUpdateTagsOptionalParams, - IpAllocationsUpdateTagsResponse, - IpAllocationsListNextResponse, - IpAllocationsListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing IpAllocations operations. */ -export class IpAllocationsImpl implements IpAllocations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class IpAllocations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all IpAllocations in a subscription. - * @param options The options parameters. - */ - public list(options?: IpAllocationsListOptionalParams): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: IpAllocationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: IpAllocationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: IpAllocationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all IpAllocations in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: IpAllocationsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: IpAllocationsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: IpAllocationsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: IpAllocationsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified IpAllocation. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - ipAllocationName: string, - options?: IpAllocationsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, ipAllocationName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified IpAllocation. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - ipAllocationName: string, - options?: IpAllocationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, ipAllocationName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified IpAllocation by resource group. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ipAllocationName: string, - options?: IpAllocationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ipAllocationName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates an IpAllocation in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param parameters Parameters supplied to the create or update virtual network operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - ipAllocationName: string, - parameters: IpAllocation, - options?: IpAllocationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - IpAllocationsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, ipAllocationName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - IpAllocationsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates an IpAllocation in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param parameters Parameters supplied to the create or update virtual network operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - ipAllocationName: string, - parameters: IpAllocation, - options?: IpAllocationsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - ipAllocationName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates a IpAllocation tags. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param parameters Parameters supplied to update IpAllocation tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - ipAllocationName: string, - parameters: TagsObject, - options?: IpAllocationsUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ipAllocationName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all IpAllocations in a subscription. - * @param options The options parameters. - */ - private _list(options?: IpAllocationsListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Gets all IpAllocations in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: IpAllocationsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: IpAllocationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: IpAllocationsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ipAllocationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpAllocation, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ipAllocationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IpAllocation, - }, - 201: { - bodyMapper: Mappers.IpAllocation, - }, - 202: { - bodyMapper: Mappers.IpAllocation, - }, - 204: { - bodyMapper: Mappers.IpAllocation, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters28, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ipAllocationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.IpAllocation, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ipAllocationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/IpAllocations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpAllocationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpAllocationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpAllocationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpAllocationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/ipGroups.ts b/sdk/network/arm-network/src/operations/ipGroups.ts deleted file mode 100644 index e79e346c5252..000000000000 --- a/sdk/network/arm-network/src/operations/ipGroups.ts +++ /dev/null @@ -1,583 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { IpGroups } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - IpGroup, - IpGroupsListByResourceGroupNextOptionalParams, - IpGroupsListByResourceGroupOptionalParams, - IpGroupsListByResourceGroupResponse, - IpGroupsListNextOptionalParams, - IpGroupsListOptionalParams, - IpGroupsListResponse, - IpGroupsGetOptionalParams, - IpGroupsGetResponse, - IpGroupsCreateOrUpdateOptionalParams, - IpGroupsCreateOrUpdateResponse, - TagsObject, - IpGroupsUpdateGroupsOptionalParams, - IpGroupsUpdateGroupsResponse, - IpGroupsDeleteOptionalParams, - IpGroupsListByResourceGroupNextResponse, - IpGroupsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing IpGroups operations. */ -export class IpGroupsImpl implements IpGroups { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class IpGroups class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all IpGroups in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: IpGroupsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: IpGroupsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: IpGroupsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: IpGroupsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all IpGroups in a subscription. - * @param options The options parameters. - */ - public list(options?: IpGroupsListOptionalParams): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: IpGroupsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: IpGroupsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: IpGroupsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Gets the specified ipGroups. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ipGroupsName: string, - options?: IpGroupsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ipGroupsName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates an ipGroups in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param parameters Parameters supplied to the create or update IpGroups operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - ipGroupsName: string, - parameters: IpGroup, - options?: IpGroupsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, IpGroupsCreateOrUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, ipGroupsName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - IpGroupsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates an ipGroups in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param parameters Parameters supplied to the create or update IpGroups operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - ipGroupsName: string, - parameters: IpGroup, - options?: IpGroupsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - ipGroupsName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates tags of an IpGroups resource. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param parameters Parameters supplied to the update ipGroups operation. - * @param options The options parameters. - */ - updateGroups( - resourceGroupName: string, - ipGroupsName: string, - parameters: TagsObject, - options?: IpGroupsUpdateGroupsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ipGroupsName, parameters, options }, - updateGroupsOperationSpec, - ); - } - - /** - * Deletes the specified ipGroups. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - ipGroupsName: string, - options?: IpGroupsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, ipGroupsName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified ipGroups. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - ipGroupsName: string, - options?: IpGroupsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, ipGroupsName, options); - return poller.pollUntilDone(); - } - - /** - * Gets all IpGroups in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: IpGroupsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Gets all IpGroups in a subscription. - * @param options The options parameters. - */ - private _list(options?: IpGroupsListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: IpGroupsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: IpGroupsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpGroup, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ipGroupsName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IpGroup, - }, - 201: { - bodyMapper: Mappers.IpGroup, - }, - 202: { - bodyMapper: Mappers.IpGroup, - }, - 204: { - bodyMapper: Mappers.IpGroup, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters29, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ipGroupsName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateGroupsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.IpGroup, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ipGroupsName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ipGroupsName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpGroupListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpGroupListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpGroupListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpGroupListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/ipamPools.ts b/sdk/network/arm-network/src/operations/ipamPools.ts deleted file mode 100644 index 87931f8a0225..000000000000 --- a/sdk/network/arm-network/src/operations/ipamPools.ts +++ /dev/null @@ -1,752 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { IpamPools } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - IpamPool, - IpamPoolsListNextOptionalParams, - IpamPoolsListOptionalParams, - IpamPoolsListResponse, - PoolAssociation, - IpamPoolsListAssociatedResourcesNextOptionalParams, - IpamPoolsListAssociatedResourcesOptionalParams, - IpamPoolsListAssociatedResourcesResponse, - IpamPoolsCreateOptionalParams, - IpamPoolsCreateResponse, - IpamPoolsUpdateOptionalParams, - IpamPoolsUpdateResponse, - IpamPoolsGetOptionalParams, - IpamPoolsGetResponse, - IpamPoolsDeleteOptionalParams, - IpamPoolsDeleteResponse, - IpamPoolsGetPoolUsageOptionalParams, - IpamPoolsGetPoolUsageResponse, - IpamPoolsListNextResponse, - IpamPoolsListAssociatedResourcesNextResponse, -} from "../models/index.js"; - -/// -/** Class containing IpamPools operations. */ -export class IpamPoolsImpl implements IpamPools { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class IpamPools class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets list of Pool resources at Network Manager level. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - options?: IpamPoolsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkManagerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkManagerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - options?: IpamPoolsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: IpamPoolsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - options?: IpamPoolsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, networkManagerName, options)) { - yield* page; - } - } - - /** - * List Associated Resource in the Pool. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - public listAssociatedResources( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsListAssociatedResourcesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAssociatedResourcesPagingAll( - resourceGroupName, - networkManagerName, - poolName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAssociatedResourcesPagingPage( - resourceGroupName, - networkManagerName, - poolName, - options, - settings, - ); - }, - }; - } - - private async *listAssociatedResourcesPagingPage( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsListAssociatedResourcesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: IpamPoolsListAssociatedResourcesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAssociatedResources( - resourceGroupName, - networkManagerName, - poolName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAssociatedResourcesNext( - resourceGroupName, - networkManagerName, - poolName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAssociatedResourcesPagingAll( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsListAssociatedResourcesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAssociatedResourcesPagingPage( - resourceGroupName, - networkManagerName, - poolName, - options, - )) { - yield* page; - } - } - - /** - * Gets list of Pool resources at Network Manager level. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - options?: IpamPoolsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, options }, - listOperationSpec, - ); - } - - /** - * Creates/Updates the Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName IP Address Manager Pool resource name. - * @param body Pool resource object to create/update. - * @param options The options parameters. - */ - async beginCreate( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - body: IpamPool, - options?: IpamPoolsCreateOptionalParams, - ): Promise, IpamPoolsCreateResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkManagerName, poolName, body, options }, - spec: createOperationSpec, - }); - const poller = await createHttpPoller< - IpamPoolsCreateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates/Updates the Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName IP Address Manager Pool resource name. - * @param body Pool resource object to create/update. - * @param options The options parameters. - */ - async beginCreateAndWait( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - body: IpamPool, - options?: IpamPoolsCreateOptionalParams, - ): Promise { - const poller = await this.beginCreate( - resourceGroupName, - networkManagerName, - poolName, - body, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the specific Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName IP Address Manager Pool resource name. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, poolName, options }, - updateOperationSpec, - ); - } - - /** - * Gets the specific Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, poolName, options }, - getOperationSpec, - ); - } - - /** - * Delete the Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsDeleteOptionalParams, - ): Promise, IpamPoolsDeleteResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkManagerName, poolName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - IpamPoolsDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, networkManagerName, poolName, options); - return poller.pollUntilDone(); - } - - /** - * Get the Pool Usage. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - getPoolUsage( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsGetPoolUsageOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, poolName, options }, - getPoolUsageOperationSpec, - ); - } - - /** - * List Associated Resource in the Pool. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - private _listAssociatedResources( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsListAssociatedResourcesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, poolName, options }, - listAssociatedResourcesOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - nextLink: string, - options?: IpamPoolsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListAssociatedResourcesNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param nextLink The nextLink from the previous successful call to the ListAssociatedResources - * method. - * @param options The options parameters. - */ - private _listAssociatedResourcesNext( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - nextLink: string, - options?: IpamPoolsListAssociatedResourcesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, poolName, nextLink, options }, - listAssociatedResourcesNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpamPoolList, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken, - Parameters.skip, - Parameters.top1, - Parameters.sortKey, - Parameters.sortValue, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IpamPool, - }, - 201: { - bodyMapper: Mappers.IpamPool, - }, - 202: { - bodyMapper: Mappers.IpamPool, - }, - 204: { - bodyMapper: Mappers.IpamPool, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - requestBody: Parameters.body, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.poolName, - ], - headerParameters: [Parameters.accept, Parameters.contentType, Parameters.ifMatch], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.IpamPool, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - requestBody: Parameters.body1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.poolName, - ], - headerParameters: [Parameters.accept, Parameters.contentType, Parameters.ifMatch], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpamPool, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.poolName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.IpamPoolsDeleteHeaders, - }, - 201: { - headersMapper: Mappers.IpamPoolsDeleteHeaders, - }, - 202: { - headersMapper: Mappers.IpamPoolsDeleteHeaders, - }, - 204: { - headersMapper: Mappers.IpamPoolsDeleteHeaders, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.poolName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch], - serializer, -}; -const getPoolUsageOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/getPoolUsage", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PoolUsage, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.poolName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAssociatedResourcesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/listAssociatedResources", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PoolAssociationList, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.poolName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IpamPoolList, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAssociatedResourcesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PoolAssociationList, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName1, - Parameters.poolName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/loadBalancerBackendAddressPools.ts b/sdk/network/arm-network/src/operations/loadBalancerBackendAddressPools.ts deleted file mode 100644 index 2cf5159789b6..000000000000 --- a/sdk/network/arm-network/src/operations/loadBalancerBackendAddressPools.ts +++ /dev/null @@ -1,485 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { LoadBalancerBackendAddressPools } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - BackendAddressPool, - LoadBalancerBackendAddressPoolsListNextOptionalParams, - LoadBalancerBackendAddressPoolsListOptionalParams, - LoadBalancerBackendAddressPoolsListResponse, - LoadBalancerBackendAddressPoolsGetOptionalParams, - LoadBalancerBackendAddressPoolsGetResponse, - LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, - LoadBalancerBackendAddressPoolsCreateOrUpdateResponse, - LoadBalancerBackendAddressPoolsDeleteOptionalParams, - LoadBalancerBackendAddressPoolsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing LoadBalancerBackendAddressPools operations. */ -export class LoadBalancerBackendAddressPoolsImpl implements LoadBalancerBackendAddressPools { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class LoadBalancerBackendAddressPools class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the load balancer backed address pools. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerBackendAddressPoolsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, loadBalancerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, loadBalancerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerBackendAddressPoolsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: LoadBalancerBackendAddressPoolsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, loadBalancerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - loadBalancerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerBackendAddressPoolsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, loadBalancerName, options)) { - yield* page; - } - } - - /** - * Gets all the load balancer backed address pools. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerBackendAddressPoolsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, options }, - listOperationSpec, - ); - } - - /** - * Gets load balancer backend address pool. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendAddressPoolName The name of the backend address pool. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - backendAddressPoolName: string, - options?: LoadBalancerBackendAddressPoolsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, backendAddressPoolName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a load balancer backend address pool. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendAddressPoolName The name of the backend address pool. - * @param parameters Parameters supplied to the create or update load balancer backend address pool - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - loadBalancerName: string, - backendAddressPoolName: string, - parameters: BackendAddressPool, - options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - LoadBalancerBackendAddressPoolsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - LoadBalancerBackendAddressPoolsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a load balancer backend address pool. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendAddressPoolName The name of the backend address pool. - * @param parameters Parameters supplied to the create or update load balancer backend address pool - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - loadBalancerName: string, - backendAddressPoolName: string, - parameters: BackendAddressPool, - options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes the specified load balancer backend address pool. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendAddressPoolName The name of the backend address pool. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - loadBalancerName: string, - backendAddressPoolName: string, - options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified load balancer backend address pool. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendAddressPoolName The name of the backend address pool. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - loadBalancerName: string, - backendAddressPoolName: string, - options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - loadBalancerName, - backendAddressPoolName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - loadBalancerName: string, - nextLink: string, - options?: LoadBalancerBackendAddressPoolsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerBackendAddressPoolListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendAddressPool, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - Parameters.backendAddressPoolName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.BackendAddressPool, - }, - 201: { - bodyMapper: Mappers.BackendAddressPool, - }, - 202: { - bodyMapper: Mappers.BackendAddressPool, - }, - 204: { - bodyMapper: Mappers.BackendAddressPool, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters34, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - Parameters.backendAddressPoolName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - Parameters.backendAddressPoolName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerBackendAddressPoolListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/loadBalancerFrontendIPConfigurations.ts b/sdk/network/arm-network/src/operations/loadBalancerFrontendIPConfigurations.ts deleted file mode 100644 index 990dd79a87df..000000000000 --- a/sdk/network/arm-network/src/operations/loadBalancerFrontendIPConfigurations.ts +++ /dev/null @@ -1,230 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { LoadBalancerFrontendIPConfigurations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - FrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationsListNextOptionalParams, - LoadBalancerFrontendIPConfigurationsListOptionalParams, - LoadBalancerFrontendIPConfigurationsListResponse, - LoadBalancerFrontendIPConfigurationsGetOptionalParams, - LoadBalancerFrontendIPConfigurationsGetResponse, - LoadBalancerFrontendIPConfigurationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing LoadBalancerFrontendIPConfigurations operations. */ -export class LoadBalancerFrontendIPConfigurationsImpl implements LoadBalancerFrontendIPConfigurations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class LoadBalancerFrontendIPConfigurations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the load balancer frontend IP configurations. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerFrontendIPConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, loadBalancerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, loadBalancerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerFrontendIPConfigurationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: LoadBalancerFrontendIPConfigurationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, loadBalancerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - loadBalancerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerFrontendIPConfigurationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, loadBalancerName, options)) { - yield* page; - } - } - - /** - * Gets all the load balancer frontend IP configurations. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerFrontendIPConfigurationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, options }, - listOperationSpec, - ); - } - - /** - * Gets load balancer frontend IP configuration. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param frontendIPConfigurationName The name of the frontend IP configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - frontendIPConfigurationName: string, - options?: LoadBalancerFrontendIPConfigurationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - loadBalancerName, - frontendIPConfigurationName, - options, - }, - getOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - loadBalancerName: string, - nextLink: string, - options?: LoadBalancerFrontendIPConfigurationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerFrontendIPConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FrontendIPConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - Parameters.frontendIPConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerFrontendIPConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/loadBalancerLoadBalancingRules.ts b/sdk/network/arm-network/src/operations/loadBalancerLoadBalancingRules.ts deleted file mode 100644 index b7d56e680eab..000000000000 --- a/sdk/network/arm-network/src/operations/loadBalancerLoadBalancingRules.ts +++ /dev/null @@ -1,355 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { LoadBalancerLoadBalancingRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - LoadBalancingRule, - LoadBalancerLoadBalancingRulesListNextOptionalParams, - LoadBalancerLoadBalancingRulesListOptionalParams, - LoadBalancerLoadBalancingRulesListResponse, - LoadBalancerLoadBalancingRulesGetOptionalParams, - LoadBalancerLoadBalancingRulesGetResponse, - LoadBalancerLoadBalancingRulesHealthOptionalParams, - LoadBalancerLoadBalancingRulesHealthResponse, - LoadBalancerLoadBalancingRulesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing LoadBalancerLoadBalancingRules operations. */ -export class LoadBalancerLoadBalancingRulesImpl implements LoadBalancerLoadBalancingRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class LoadBalancerLoadBalancingRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the load balancing rules in a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerLoadBalancingRulesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, loadBalancerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, loadBalancerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerLoadBalancingRulesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: LoadBalancerLoadBalancingRulesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, loadBalancerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - loadBalancerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerLoadBalancingRulesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, loadBalancerName, options)) { - yield* page; - } - } - - /** - * Gets all the load balancing rules in a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerLoadBalancingRulesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, options }, - listOperationSpec, - ); - } - - /** - * Gets the specified load balancer load balancing rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param loadBalancingRuleName The name of the load balancing rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - loadBalancingRuleName: string, - options?: LoadBalancerLoadBalancingRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, loadBalancingRuleName, options }, - getOperationSpec, - ); - } - - /** - * Get health details of a load balancing rule. - * @param groupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param loadBalancingRuleName The name of the load balancing rule. - * @param options The options parameters. - */ - async beginHealth( - groupName: string, - loadBalancerName: string, - loadBalancingRuleName: string, - options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - LoadBalancerLoadBalancingRulesHealthResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { groupName, loadBalancerName, loadBalancingRuleName, options }, - spec: healthOperationSpec, - }); - const poller = await createHttpPoller< - LoadBalancerLoadBalancingRulesHealthResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Get health details of a load balancing rule. - * @param groupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param loadBalancingRuleName The name of the load balancing rule. - * @param options The options parameters. - */ - async beginHealthAndWait( - groupName: string, - loadBalancerName: string, - loadBalancingRuleName: string, - options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, - ): Promise { - const poller = await this.beginHealth( - groupName, - loadBalancerName, - loadBalancingRuleName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - loadBalancerName: string, - nextLink: string, - options?: LoadBalancerLoadBalancingRulesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerLoadBalancingRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancingRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - Parameters.loadBalancingRuleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const healthOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}/health", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerHealthPerRule, - }, - 201: { - bodyMapper: Mappers.LoadBalancerHealthPerRule, - }, - 202: { - bodyMapper: Mappers.LoadBalancerHealthPerRule, - }, - 204: { - bodyMapper: Mappers.LoadBalancerHealthPerRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.groupName2, - Parameters.loadBalancerName2, - Parameters.loadBalancingRuleName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerLoadBalancingRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/loadBalancerNetworkInterfaces.ts b/sdk/network/arm-network/src/operations/loadBalancerNetworkInterfaces.ts deleted file mode 100644 index f4447b99f5a6..000000000000 --- a/sdk/network/arm-network/src/operations/loadBalancerNetworkInterfaces.ts +++ /dev/null @@ -1,182 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { LoadBalancerNetworkInterfaces } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - NetworkInterface, - LoadBalancerNetworkInterfacesListNextOptionalParams, - LoadBalancerNetworkInterfacesListOptionalParams, - LoadBalancerNetworkInterfacesListResponse, - LoadBalancerNetworkInterfacesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing LoadBalancerNetworkInterfaces operations. */ -export class LoadBalancerNetworkInterfacesImpl implements LoadBalancerNetworkInterfaces { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class LoadBalancerNetworkInterfaces class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets associated load balancer network interfaces. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerNetworkInterfacesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, loadBalancerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, loadBalancerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerNetworkInterfacesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: LoadBalancerNetworkInterfacesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, loadBalancerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - loadBalancerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerNetworkInterfacesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, loadBalancerName, options)) { - yield* page; - } - } - - /** - * Gets associated load balancer network interfaces. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerNetworkInterfacesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - loadBalancerName: string, - nextLink: string, - options?: LoadBalancerNetworkInterfacesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/loadBalancerOutboundRules.ts b/sdk/network/arm-network/src/operations/loadBalancerOutboundRules.ts deleted file mode 100644 index e1987e05a4d5..000000000000 --- a/sdk/network/arm-network/src/operations/loadBalancerOutboundRules.ts +++ /dev/null @@ -1,225 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { LoadBalancerOutboundRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - OutboundRule, - LoadBalancerOutboundRulesListNextOptionalParams, - LoadBalancerOutboundRulesListOptionalParams, - LoadBalancerOutboundRulesListResponse, - LoadBalancerOutboundRulesGetOptionalParams, - LoadBalancerOutboundRulesGetResponse, - LoadBalancerOutboundRulesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing LoadBalancerOutboundRules operations. */ -export class LoadBalancerOutboundRulesImpl implements LoadBalancerOutboundRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class LoadBalancerOutboundRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the outbound rules in a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerOutboundRulesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, loadBalancerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, loadBalancerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerOutboundRulesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: LoadBalancerOutboundRulesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, loadBalancerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - loadBalancerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerOutboundRulesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, loadBalancerName, options)) { - yield* page; - } - } - - /** - * Gets all the outbound rules in a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerOutboundRulesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, options }, - listOperationSpec, - ); - } - - /** - * Gets the specified load balancer outbound rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param outboundRuleName The name of the outbound rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - outboundRuleName: string, - options?: LoadBalancerOutboundRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, outboundRuleName, options }, - getOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - loadBalancerName: string, - nextLink: string, - options?: LoadBalancerOutboundRulesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerOutboundRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OutboundRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - Parameters.outboundRuleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerOutboundRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/loadBalancerProbes.ts b/sdk/network/arm-network/src/operations/loadBalancerProbes.ts deleted file mode 100644 index 1eb386c5ef9d..000000000000 --- a/sdk/network/arm-network/src/operations/loadBalancerProbes.ts +++ /dev/null @@ -1,225 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { LoadBalancerProbes } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - Probe, - LoadBalancerProbesListNextOptionalParams, - LoadBalancerProbesListOptionalParams, - LoadBalancerProbesListResponse, - LoadBalancerProbesGetOptionalParams, - LoadBalancerProbesGetResponse, - LoadBalancerProbesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing LoadBalancerProbes operations. */ -export class LoadBalancerProbesImpl implements LoadBalancerProbes { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class LoadBalancerProbes class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the load balancer probes. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerProbesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, loadBalancerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, loadBalancerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerProbesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: LoadBalancerProbesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, loadBalancerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - loadBalancerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerProbesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, loadBalancerName, options)) { - yield* page; - } - } - - /** - * Gets all the load balancer probes. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerProbesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, options }, - listOperationSpec, - ); - } - - /** - * Gets load balancer probe. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param probeName The name of the probe. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - probeName: string, - options?: LoadBalancerProbesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, probeName, options }, - getOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - loadBalancerName: string, - nextLink: string, - options?: LoadBalancerProbesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerProbeListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Probe, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - Parameters.probeName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerProbeListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/loadBalancers.ts b/sdk/network/arm-network/src/operations/loadBalancers.ts deleted file mode 100644 index a989d4403854..000000000000 --- a/sdk/network/arm-network/src/operations/loadBalancers.ts +++ /dev/null @@ -1,868 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { LoadBalancers } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - LoadBalancer, - LoadBalancersListAllNextOptionalParams, - LoadBalancersListAllOptionalParams, - LoadBalancersListAllResponse, - LoadBalancersListNextOptionalParams, - LoadBalancersListOptionalParams, - LoadBalancersListResponse, - LoadBalancersDeleteOptionalParams, - LoadBalancersGetOptionalParams, - LoadBalancersGetResponse, - LoadBalancersCreateOrUpdateOptionalParams, - LoadBalancersCreateOrUpdateResponse, - TagsObject, - LoadBalancersUpdateTagsOptionalParams, - LoadBalancersUpdateTagsResponse, - LoadBalancerVipSwapRequest, - LoadBalancersSwapPublicIpAddressesOptionalParams, - QueryInboundNatRulePortMappingRequest, - LoadBalancersListInboundNatRulePortMappingsOptionalParams, - LoadBalancersListInboundNatRulePortMappingsResponse, - LoadBalancersMigrateToIpBasedOptionalParams, - LoadBalancersMigrateToIpBasedResponse, - LoadBalancersListAllNextResponse, - LoadBalancersListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing LoadBalancers operations. */ -export class LoadBalancersImpl implements LoadBalancers { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class LoadBalancers class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the load balancers in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: LoadBalancersListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: LoadBalancersListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: LoadBalancersListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: LoadBalancersListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all the load balancers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: LoadBalancersListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: LoadBalancersListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: LoadBalancersListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: LoadBalancersListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancersDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, loadBalancerName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, loadBalancerName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param parameters Parameters supplied to the create or update load balancer operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - loadBalancerName: string, - parameters: LoadBalancer, - options?: LoadBalancersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - LoadBalancersCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, loadBalancerName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - LoadBalancersCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param parameters Parameters supplied to the create or update load balancer operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - loadBalancerName: string, - parameters: LoadBalancer, - options?: LoadBalancersCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - loadBalancerName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates a load balancer tags. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param parameters Parameters supplied to update load balancer tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - loadBalancerName: string, - parameters: TagsObject, - options?: LoadBalancersUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, loadBalancerName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all the load balancers in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: LoadBalancersListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all the load balancers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: LoadBalancersListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Swaps VIPs between two load balancers. - * @param location The region where load balancers are located at. - * @param parameters Parameters that define which VIPs should be swapped. - * @param options The options parameters. - */ - async beginSwapPublicIpAddresses( - location: string, - parameters: LoadBalancerVipSwapRequest, - options?: LoadBalancersSwapPublicIpAddressesOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { location, parameters, options }, - spec: swapPublicIpAddressesOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Swaps VIPs between two load balancers. - * @param location The region where load balancers are located at. - * @param parameters Parameters that define which VIPs should be swapped. - * @param options The options parameters. - */ - async beginSwapPublicIpAddressesAndWait( - location: string, - parameters: LoadBalancerVipSwapRequest, - options?: LoadBalancersSwapPublicIpAddressesOptionalParams, - ): Promise { - const poller = await this.beginSwapPublicIpAddresses(location, parameters, options); - return poller.pollUntilDone(); - } - - /** - * List of inbound NAT rule port mappings. - * @param groupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendPoolName The name of the load balancer backend address pool. - * @param parameters Query inbound NAT rule port mapping request. - * @param options The options parameters. - */ - async beginListInboundNatRulePortMappings( - groupName: string, - loadBalancerName: string, - backendPoolName: string, - parameters: QueryInboundNatRulePortMappingRequest, - options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - LoadBalancersListInboundNatRulePortMappingsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - groupName, - loadBalancerName, - backendPoolName, - parameters, - options, - }, - spec: listInboundNatRulePortMappingsOperationSpec, - }); - const poller = await createHttpPoller< - LoadBalancersListInboundNatRulePortMappingsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * List of inbound NAT rule port mappings. - * @param groupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendPoolName The name of the load balancer backend address pool. - * @param parameters Query inbound NAT rule port mapping request. - * @param options The options parameters. - */ - async beginListInboundNatRulePortMappingsAndWait( - groupName: string, - loadBalancerName: string, - backendPoolName: string, - parameters: QueryInboundNatRulePortMappingRequest, - options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams, - ): Promise { - const poller = await this.beginListInboundNatRulePortMappings( - groupName, - loadBalancerName, - backendPoolName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Migrate load balancer to IP Based - * @param groupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - migrateToIpBased( - groupName: string, - loadBalancerName: string, - options?: LoadBalancersMigrateToIpBasedOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { groupName, loadBalancerName, options }, - migrateToIpBasedOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: LoadBalancersListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: LoadBalancersListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancer, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancer, - }, - 201: { - bodyMapper: Mappers.LoadBalancer, - }, - 202: { - bodyMapper: Mappers.LoadBalancer, - }, - 204: { - bodyMapper: Mappers.LoadBalancer, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters30, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancer, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.loadBalancerName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const swapPublicIpAddressesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters31, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listInboundNatRulePortMappingsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.BackendAddressInboundNatRulePortMappings, - }, - 201: { - bodyMapper: Mappers.BackendAddressInboundNatRulePortMappings, - }, - 202: { - bodyMapper: Mappers.BackendAddressInboundNatRulePortMappings, - }, - 204: { - bodyMapper: Mappers.BackendAddressInboundNatRulePortMappings, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters32, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.groupName, - Parameters.loadBalancerName, - Parameters.backendPoolName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const migrateToIpBasedOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/migrateToIpBased", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.MigratedPools, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters33, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.groupName1, - Parameters.loadBalancerName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoadBalancerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/localNetworkGateways.ts b/sdk/network/arm-network/src/operations/localNetworkGateways.ts deleted file mode 100644 index 0e1a549d5d7f..000000000000 --- a/sdk/network/arm-network/src/operations/localNetworkGateways.ts +++ /dev/null @@ -1,476 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { LocalNetworkGateways } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - LocalNetworkGateway, - LocalNetworkGatewaysListNextOptionalParams, - LocalNetworkGatewaysListOptionalParams, - LocalNetworkGatewaysListResponse, - LocalNetworkGatewaysCreateOrUpdateOptionalParams, - LocalNetworkGatewaysCreateOrUpdateResponse, - LocalNetworkGatewaysGetOptionalParams, - LocalNetworkGatewaysGetResponse, - LocalNetworkGatewaysDeleteOptionalParams, - TagsObject, - LocalNetworkGatewaysUpdateTagsOptionalParams, - LocalNetworkGatewaysUpdateTagsResponse, - LocalNetworkGatewaysListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing LocalNetworkGateways operations. */ -export class LocalNetworkGatewaysImpl implements LocalNetworkGateways { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class LocalNetworkGateways class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the local network gateways in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: LocalNetworkGatewaysListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: LocalNetworkGatewaysListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: LocalNetworkGatewaysListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: LocalNetworkGatewaysListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Creates or updates a local network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param parameters Parameters supplied to the create or update local network gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - localNetworkGatewayName: string, - parameters: LocalNetworkGateway, - options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - LocalNetworkGatewaysCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, localNetworkGatewayName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - LocalNetworkGatewaysCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a local network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param parameters Parameters supplied to the create or update local network gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - localNetworkGatewayName: string, - parameters: LocalNetworkGateway, - options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - localNetworkGatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified local network gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - localNetworkGatewayName: string, - options?: LocalNetworkGatewaysGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, localNetworkGatewayName, options }, - getOperationSpec, - ); - } - - /** - * Deletes the specified local network gateway. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - localNetworkGatewayName: string, - options?: LocalNetworkGatewaysDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, localNetworkGatewayName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified local network gateway. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - localNetworkGatewayName: string, - options?: LocalNetworkGatewaysDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, localNetworkGatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Updates a local network gateway tags. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param parameters Parameters supplied to update local network gateway tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - localNetworkGatewayName: string, - parameters: TagsObject, - options?: LocalNetworkGatewaysUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, localNetworkGatewayName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all the local network gateways in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: LocalNetworkGatewaysListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: LocalNetworkGatewaysListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.LocalNetworkGateway, - }, - 201: { - bodyMapper: Mappers.LocalNetworkGateway, - }, - 202: { - bodyMapper: Mappers.LocalNetworkGateway, - }, - 204: { - bodyMapper: Mappers.LocalNetworkGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters95, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.localNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LocalNetworkGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.localNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.localNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.LocalNetworkGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.localNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LocalNetworkGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LocalNetworkGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/managementGroupNetworkManagerConnections.ts b/sdk/network/arm-network/src/operations/managementGroupNetworkManagerConnections.ts deleted file mode 100644 index 878c9c77377c..000000000000 --- a/sdk/network/arm-network/src/operations/managementGroupNetworkManagerConnections.ts +++ /dev/null @@ -1,283 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ManagementGroupNetworkManagerConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - NetworkManagerConnection, - ManagementGroupNetworkManagerConnectionsListNextOptionalParams, - ManagementGroupNetworkManagerConnectionsListOptionalParams, - ManagementGroupNetworkManagerConnectionsListResponse, - ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams, - ManagementGroupNetworkManagerConnectionsCreateOrUpdateResponse, - ManagementGroupNetworkManagerConnectionsGetOptionalParams, - ManagementGroupNetworkManagerConnectionsGetResponse, - ManagementGroupNetworkManagerConnectionsDeleteOptionalParams, - ManagementGroupNetworkManagerConnectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ManagementGroupNetworkManagerConnections operations. */ -export class ManagementGroupNetworkManagerConnectionsImpl implements ManagementGroupNetworkManagerConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ManagementGroupNetworkManagerConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List all network manager connections created by this management group. - * @param managementGroupId The management group Id which uniquely identify the Microsoft Azure - * management group. - * @param options The options parameters. - */ - public list( - managementGroupId: string, - options?: ManagementGroupNetworkManagerConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(managementGroupId, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(managementGroupId, options, settings); - }, - }; - } - - private async *listPagingPage( - managementGroupId: string, - options?: ManagementGroupNetworkManagerConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ManagementGroupNetworkManagerConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(managementGroupId, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(managementGroupId, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - managementGroupId: string, - options?: ManagementGroupNetworkManagerConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(managementGroupId, options)) { - yield* page; - } - } - - /** - * Create a network manager connection on this management group. - * @param managementGroupId The management group Id which uniquely identify the Microsoft Azure - * management group. - * @param networkManagerConnectionName Name for the network manager connection. - * @param parameters Network manager connection to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - managementGroupId: string, - networkManagerConnectionName: string, - parameters: NetworkManagerConnection, - options?: ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { managementGroupId, networkManagerConnectionName, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Get a specified connection created by this management group. - * @param managementGroupId The management group Id which uniquely identify the Microsoft Azure - * management group. - * @param networkManagerConnectionName Name for the network manager connection. - * @param options The options parameters. - */ - get( - managementGroupId: string, - networkManagerConnectionName: string, - options?: ManagementGroupNetworkManagerConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { managementGroupId, networkManagerConnectionName, options }, - getOperationSpec, - ); - } - - /** - * Delete specified pending connection created by this management group. - * @param managementGroupId The management group Id which uniquely identify the Microsoft Azure - * management group. - * @param networkManagerConnectionName Name for the network manager connection. - * @param options The options parameters. - */ - delete( - managementGroupId: string, - networkManagerConnectionName: string, - options?: ManagementGroupNetworkManagerConnectionsDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { managementGroupId, networkManagerConnectionName, options }, - deleteOperationSpec, - ); - } - - /** - * List all network manager connections created by this management group. - * @param managementGroupId The management group Id which uniquely identify the Microsoft Azure - * management group. - * @param options The options parameters. - */ - private _list( - managementGroupId: string, - options?: ManagementGroupNetworkManagerConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ managementGroupId, options }, listOperationSpec); - } - - /** - * ListNext - * @param managementGroupId The management group Id which uniquely identify the Microsoft Azure - * management group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - managementGroupId: string, - nextLink: string, - options?: ManagementGroupNetworkManagerConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { managementGroupId, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerConnection, - }, - 201: { - bodyMapper: Mappers.NetworkManagerConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters40, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.networkManagerConnectionName, - Parameters.managementGroupId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.networkManagerConnectionName, - Parameters.managementGroupId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.networkManagerConnectionName, - Parameters.managementGroupId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [Parameters.$host, Parameters.managementGroupId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.managementGroupId], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/natGateways.ts b/sdk/network/arm-network/src/operations/natGateways.ts deleted file mode 100644 index 3e2901bf1aa5..000000000000 --- a/sdk/network/arm-network/src/operations/natGateways.ts +++ /dev/null @@ -1,587 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NatGateways } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NatGateway, - NatGatewaysListAllNextOptionalParams, - NatGatewaysListAllOptionalParams, - NatGatewaysListAllResponse, - NatGatewaysListNextOptionalParams, - NatGatewaysListOptionalParams, - NatGatewaysListResponse, - NatGatewaysDeleteOptionalParams, - NatGatewaysGetOptionalParams, - NatGatewaysGetResponse, - NatGatewaysCreateOrUpdateOptionalParams, - NatGatewaysCreateOrUpdateResponse, - TagsObject, - NatGatewaysUpdateTagsOptionalParams, - NatGatewaysUpdateTagsResponse, - NatGatewaysListAllNextResponse, - NatGatewaysListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NatGateways operations. */ -export class NatGatewaysImpl implements NatGateways { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NatGateways class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the Nat Gateways in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: NatGatewaysListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: NatGatewaysListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NatGatewaysListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: NatGatewaysListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all nat gateways in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: NatGatewaysListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: NatGatewaysListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NatGatewaysListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: NatGatewaysListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified nat gateway. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - natGatewayName: string, - options?: NatGatewaysDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, natGatewayName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified nat gateway. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - natGatewayName: string, - options?: NatGatewaysDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, natGatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified nat gateway in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - natGatewayName: string, - options?: NatGatewaysGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, natGatewayName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a nat gateway. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param parameters Parameters supplied to the create or update nat gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - natGatewayName: string, - parameters: NatGateway, - options?: NatGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NatGatewaysCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, natGatewayName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - NatGatewaysCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a nat gateway. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param parameters Parameters supplied to the create or update nat gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - natGatewayName: string, - parameters: NatGateway, - options?: NatGatewaysCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - natGatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates nat gateway tags. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param parameters Parameters supplied to update nat gateway tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - natGatewayName: string, - parameters: TagsObject, - options?: NatGatewaysUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, natGatewayName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all the Nat Gateways in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: NatGatewaysListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all nat gateways in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: NatGatewaysListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: NatGatewaysListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: NatGatewaysListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.natGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NatGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.natGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NatGateway, - }, - 201: { - bodyMapper: Mappers.NatGateway, - }, - 202: { - bodyMapper: Mappers.NatGateway, - }, - 204: { - bodyMapper: Mappers.NatGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters35, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.natGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NatGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.natGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NatGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NatGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NatGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NatGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/natRules.ts b/sdk/network/arm-network/src/operations/natRules.ts deleted file mode 100644 index 90e91be34c1f..000000000000 --- a/sdk/network/arm-network/src/operations/natRules.ts +++ /dev/null @@ -1,476 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NatRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VpnGatewayNatRule, - NatRulesListByVpnGatewayNextOptionalParams, - NatRulesListByVpnGatewayOptionalParams, - NatRulesListByVpnGatewayResponse, - NatRulesGetOptionalParams, - NatRulesGetResponse, - NatRulesCreateOrUpdateOptionalParams, - NatRulesCreateOrUpdateResponse, - NatRulesDeleteOptionalParams, - NatRulesListByVpnGatewayNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NatRules operations. */ -export class NatRulesImpl implements NatRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NatRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves all nat rules for a particular virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - public listByVpnGateway( - resourceGroupName: string, - gatewayName: string, - options?: NatRulesListByVpnGatewayOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByVpnGatewayPagingAll(resourceGroupName, gatewayName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByVpnGatewayPagingPage(resourceGroupName, gatewayName, options, settings); - }, - }; - } - - private async *listByVpnGatewayPagingPage( - resourceGroupName: string, - gatewayName: string, - options?: NatRulesListByVpnGatewayOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NatRulesListByVpnGatewayResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVpnGateway(resourceGroupName, gatewayName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVpnGatewayNext( - resourceGroupName, - gatewayName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByVpnGatewayPagingAll( - resourceGroupName: string, - gatewayName: string, - options?: NatRulesListByVpnGatewayOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByVpnGatewayPagingPage( - resourceGroupName, - gatewayName, - options, - )) { - yield* page; - } - } - - /** - * Retrieves the details of a nat ruleGet. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - natRuleName: string, - options?: NatRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, natRuleName, options }, - getOperationSpec, - ); - } - - /** - * Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat - * rules. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param natRuleParameters Parameters supplied to create or Update a Nat Rule. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - natRuleName: string, - natRuleParameters: VpnGatewayNatRule, - options?: NatRulesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, NatRulesCreateOrUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - gatewayName, - natRuleName, - natRuleParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - NatRulesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat - * rules. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param natRuleParameters Parameters supplied to create or Update a Nat Rule. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - natRuleName: string, - natRuleParameters: VpnGatewayNatRule, - options?: NatRulesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - gatewayName, - natRuleName, - natRuleParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a nat rule. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - gatewayName: string, - natRuleName: string, - options?: NatRulesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, natRuleName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a nat rule. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - natRuleName: string, - options?: NatRulesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, gatewayName, natRuleName, options); - return poller.pollUntilDone(); - } - - /** - * Retrieves all nat rules for a particular virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - private _listByVpnGateway( - resourceGroupName: string, - gatewayName: string, - options?: NatRulesListByVpnGatewayOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, options }, - listByVpnGatewayOperationSpec, - ); - } - - /** - * ListByVpnGatewayNext - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param nextLink The nextLink from the previous successful call to the ListByVpnGateway method. - * @param options The options parameters. - */ - private _listByVpnGatewayNext( - resourceGroupName: string, - gatewayName: string, - nextLink: string, - options?: NatRulesListByVpnGatewayNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, nextLink, options }, - listByVpnGatewayNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VpnGatewayNatRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.natRuleName, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VpnGatewayNatRule, - }, - 201: { - bodyMapper: Mappers.VpnGatewayNatRule, - }, - 202: { - bodyMapper: Mappers.VpnGatewayNatRule, - }, - 204: { - bodyMapper: Mappers.VpnGatewayNatRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.natRuleParameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.natRuleName, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.natRuleName, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByVpnGatewayOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnGatewayNatRulesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByVpnGatewayNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnGatewayNatRulesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkGroups.ts b/sdk/network/arm-network/src/operations/networkGroups.ts deleted file mode 100644 index 668227bd203c..000000000000 --- a/sdk/network/arm-network/src/operations/networkGroups.ts +++ /dev/null @@ -1,401 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkGroups } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkGroup, - NetworkGroupsListNextOptionalParams, - NetworkGroupsListOptionalParams, - NetworkGroupsListResponse, - NetworkGroupsGetOptionalParams, - NetworkGroupsGetResponse, - NetworkGroupsCreateOrUpdateOptionalParams, - NetworkGroupsCreateOrUpdateResponse, - NetworkGroupsDeleteOptionalParams, - NetworkGroupsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkGroups operations. */ -export class NetworkGroupsImpl implements NetworkGroups { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkGroups class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists the specified network group. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkGroupsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkManagerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkManagerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkGroupsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkGroupsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkGroupsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, networkManagerName, options)) { - yield* page; - } - } - - /** - * Gets the specified network group. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - options?: NetworkGroupsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, networkGroupName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a network group. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param parameters Parameters supplied to the specify which network group need to create - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - parameters: NetworkGroup, - options?: NetworkGroupsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - networkGroupName, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a network group. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - options?: NetworkGroupsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - networkGroupName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a network group. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - options?: NetworkGroupsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - networkGroupName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists the specified network group. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkGroupsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - nextLink: string, - options?: NetworkGroupsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkGroup, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - Parameters.networkGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkGroup, - headersMapper: Mappers.NetworkGroupsCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.NetworkGroup, - headersMapper: Mappers.NetworkGroupsCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters41, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - Parameters.networkGroupName, - ], - headerParameters: [Parameters.accept, Parameters.contentType, Parameters.ifMatch], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - Parameters.networkGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkInterfaceIPConfigurations.ts b/sdk/network/arm-network/src/operations/networkInterfaceIPConfigurations.ts deleted file mode 100644 index 8bfea5c6bbdf..000000000000 --- a/sdk/network/arm-network/src/operations/networkInterfaceIPConfigurations.ts +++ /dev/null @@ -1,229 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkInterfaceIPConfigurations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - NetworkInterfaceIPConfiguration, - NetworkInterfaceIPConfigurationsListNextOptionalParams, - NetworkInterfaceIPConfigurationsListOptionalParams, - NetworkInterfaceIPConfigurationsListResponse, - NetworkInterfaceIPConfigurationsGetOptionalParams, - NetworkInterfaceIPConfigurationsGetResponse, - NetworkInterfaceIPConfigurationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkInterfaceIPConfigurations operations. */ -export class NetworkInterfaceIPConfigurationsImpl implements NetworkInterfaceIPConfigurations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkInterfaceIPConfigurations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Get all ip configurations in a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceIPConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkInterfaceName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkInterfaceName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceIPConfigurationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkInterfaceIPConfigurationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkInterfaceName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkInterfaceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceIPConfigurationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkInterfaceName, - options, - )) { - yield* page; - } - } - - /** - * Get all ip configurations in a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceIPConfigurationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkInterfaceName, options }, - listOperationSpec, - ); - } - - /** - * Gets the specified network interface ip configuration. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: NetworkInterfaceIPConfigurationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkInterfaceName, ipConfigurationName, options }, - getOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkInterfaceName: string, - nextLink: string, - options?: NetworkInterfaceIPConfigurationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkInterfaceName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceIPConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceIPConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - Parameters.ipConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceIPConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkInterfaceLoadBalancers.ts b/sdk/network/arm-network/src/operations/networkInterfaceLoadBalancers.ts deleted file mode 100644 index a9074c579df3..000000000000 --- a/sdk/network/arm-network/src/operations/networkInterfaceLoadBalancers.ts +++ /dev/null @@ -1,186 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkInterfaceLoadBalancers } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - LoadBalancer, - NetworkInterfaceLoadBalancersListNextOptionalParams, - NetworkInterfaceLoadBalancersListOptionalParams, - NetworkInterfaceLoadBalancersListResponse, - NetworkInterfaceLoadBalancersListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkInterfaceLoadBalancers operations. */ -export class NetworkInterfaceLoadBalancersImpl implements NetworkInterfaceLoadBalancers { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkInterfaceLoadBalancers class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List all load balancers in a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceLoadBalancersListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkInterfaceName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkInterfaceName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceLoadBalancersListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkInterfaceLoadBalancersListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkInterfaceName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkInterfaceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceLoadBalancersListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkInterfaceName, - options, - )) { - yield* page; - } - } - - /** - * List all load balancers in a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceLoadBalancersListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkInterfaceName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkInterfaceName: string, - nextLink: string, - options?: NetworkInterfaceLoadBalancersListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkInterfaceName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceLoadBalancerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceLoadBalancerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkInterfaceTapConfigurations.ts b/sdk/network/arm-network/src/operations/networkInterfaceTapConfigurations.ts deleted file mode 100644 index 9b0c134af522..000000000000 --- a/sdk/network/arm-network/src/operations/networkInterfaceTapConfigurations.ts +++ /dev/null @@ -1,494 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkInterfaceTapConfigurations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkInterfaceTapConfiguration, - NetworkInterfaceTapConfigurationsListNextOptionalParams, - NetworkInterfaceTapConfigurationsListOptionalParams, - NetworkInterfaceTapConfigurationsListResponse, - NetworkInterfaceTapConfigurationsDeleteOptionalParams, - NetworkInterfaceTapConfigurationsGetOptionalParams, - NetworkInterfaceTapConfigurationsGetResponse, - NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, - NetworkInterfaceTapConfigurationsCreateOrUpdateResponse, - NetworkInterfaceTapConfigurationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkInterfaceTapConfigurations operations. */ -export class NetworkInterfaceTapConfigurationsImpl implements NetworkInterfaceTapConfigurations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkInterfaceTapConfigurations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Get all Tap configurations in a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceTapConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkInterfaceName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkInterfaceName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceTapConfigurationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkInterfaceTapConfigurationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkInterfaceName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkInterfaceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceTapConfigurationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkInterfaceName, - options, - )) { - yield* page; - } - } - - /** - * Deletes the specified tap configuration from the NetworkInterface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tapConfigurationName The name of the tap configuration. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkInterfaceName: string, - tapConfigurationName: string, - options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified tap configuration from the NetworkInterface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tapConfigurationName The name of the tap configuration. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkInterfaceName: string, - tapConfigurationName: string, - options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Get the specified tap configuration on a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tapConfigurationName The name of the tap configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkInterfaceName: string, - tapConfigurationName: string, - options?: NetworkInterfaceTapConfigurationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates a Tap configuration in the specified NetworkInterface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tapConfigurationName The name of the tap configuration. - * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - networkInterfaceName: string, - tapConfigurationName: string, - tapConfigurationParameters: NetworkInterfaceTapConfiguration, - options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkInterfaceTapConfigurationsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - tapConfigurationParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - NetworkInterfaceTapConfigurationsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a Tap configuration in the specified NetworkInterface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tapConfigurationName The name of the tap configuration. - * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkInterfaceName: string, - tapConfigurationName: string, - tapConfigurationParameters: NetworkInterfaceTapConfiguration, - options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - networkInterfaceName, - tapConfigurationName, - tapConfigurationParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Get all Tap configurations in a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceTapConfigurationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkInterfaceName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkInterfaceName: string, - nextLink: string, - options?: NetworkInterfaceTapConfigurationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkInterfaceName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - Parameters.tapConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceTapConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - Parameters.tapConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceTapConfiguration, - }, - 201: { - bodyMapper: Mappers.NetworkInterfaceTapConfiguration, - }, - 202: { - bodyMapper: Mappers.NetworkInterfaceTapConfiguration, - }, - 204: { - bodyMapper: Mappers.NetworkInterfaceTapConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.tapConfigurationParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - Parameters.tapConfigurationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceTapConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceTapConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkInterfaces.ts b/sdk/network/arm-network/src/operations/networkInterfaces.ts deleted file mode 100644 index a2fd04daf24e..000000000000 --- a/sdk/network/arm-network/src/operations/networkInterfaces.ts +++ /dev/null @@ -1,1915 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkInterfaces } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkInterface, - NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesNextOptionalParams, - NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, - NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesResponse, - NetworkInterfacesListCloudServiceNetworkInterfacesNextOptionalParams, - NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, - NetworkInterfacesListCloudServiceNetworkInterfacesResponse, - NetworkInterfacesListAllNextOptionalParams, - NetworkInterfacesListAllOptionalParams, - NetworkInterfacesListAllResponse, - NetworkInterfacesListNextOptionalParams, - NetworkInterfacesListOptionalParams, - NetworkInterfacesListResponse, - NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesNextOptionalParams, - NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, - NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesResponse, - NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesNextOptionalParams, - NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, - NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesResponse, - NetworkInterfaceIPConfiguration, - NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsNextOptionalParams, - NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, - NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsResponse, - NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams, - NetworkInterfacesGetCloudServiceNetworkInterfaceResponse, - NetworkInterfacesDeleteOptionalParams, - NetworkInterfacesGetOptionalParams, - NetworkInterfacesGetResponse, - NetworkInterfacesCreateOrUpdateOptionalParams, - NetworkInterfacesCreateOrUpdateResponse, - TagsObject, - NetworkInterfacesUpdateTagsOptionalParams, - NetworkInterfacesUpdateTagsResponse, - NetworkInterfacesGetEffectiveRouteTableOptionalParams, - NetworkInterfacesGetEffectiveRouteTableResponse, - NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, - NetworkInterfacesListEffectiveNetworkSecurityGroupsResponse, - NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams, - NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceResponse, - NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams, - NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationResponse, - NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesNextResponse, - NetworkInterfacesListCloudServiceNetworkInterfacesNextResponse, - NetworkInterfacesListAllNextResponse, - NetworkInterfacesListNextResponse, - NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesNextResponse, - NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesNextResponse, - NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkInterfaces operations. */ -export class NetworkInterfacesImpl implements NetworkInterfaces { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkInterfaces class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets information about all network interfaces in a role instance in a cloud service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The name of role instance. - * @param options The options parameters. - */ - public listCloudServiceRoleInstanceNetworkInterfaces( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - options?: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listCloudServiceRoleInstanceNetworkInterfacesPagingAll( - resourceGroupName, - cloudServiceName, - roleInstanceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listCloudServiceRoleInstanceNetworkInterfacesPagingPage( - resourceGroupName, - cloudServiceName, - roleInstanceName, - options, - settings, - ); - }, - }; - } - - private async *listCloudServiceRoleInstanceNetworkInterfacesPagingPage( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - options?: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listCloudServiceRoleInstanceNetworkInterfaces( - resourceGroupName, - cloudServiceName, - roleInstanceName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listCloudServiceRoleInstanceNetworkInterfacesNext( - resourceGroupName, - cloudServiceName, - roleInstanceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listCloudServiceRoleInstanceNetworkInterfacesPagingAll( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - options?: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listCloudServiceRoleInstanceNetworkInterfacesPagingPage( - resourceGroupName, - cloudServiceName, - roleInstanceName, - options, - )) { - yield* page; - } - } - - /** - * Gets all network interfaces in a cloud service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param options The options parameters. - */ - public listCloudServiceNetworkInterfaces( - resourceGroupName: string, - cloudServiceName: string, - options?: NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listCloudServiceNetworkInterfacesPagingAll( - resourceGroupName, - cloudServiceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listCloudServiceNetworkInterfacesPagingPage( - resourceGroupName, - cloudServiceName, - options, - settings, - ); - }, - }; - } - - private async *listCloudServiceNetworkInterfacesPagingPage( - resourceGroupName: string, - cloudServiceName: string, - options?: NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkInterfacesListCloudServiceNetworkInterfacesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listCloudServiceNetworkInterfaces( - resourceGroupName, - cloudServiceName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listCloudServiceNetworkInterfacesNext( - resourceGroupName, - cloudServiceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listCloudServiceNetworkInterfacesPagingAll( - resourceGroupName: string, - cloudServiceName: string, - options?: NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listCloudServiceNetworkInterfacesPagingPage( - resourceGroupName, - cloudServiceName, - options, - )) { - yield* page; - } - } - - /** - * Gets all network interfaces in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: NetworkInterfacesListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: NetworkInterfacesListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkInterfacesListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: NetworkInterfacesListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all network interfaces in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: NetworkInterfacesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: NetworkInterfacesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkInterfacesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: NetworkInterfacesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param options The options parameters. - */ - public listVirtualMachineScaleSetVMNetworkInterfaces( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - options?: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listVirtualMachineScaleSetVMNetworkInterfacesPagingAll( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listVirtualMachineScaleSetVMNetworkInterfacesPagingPage( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - options, - settings, - ); - }, - }; - } - - private async *listVirtualMachineScaleSetVMNetworkInterfacesPagingPage( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - options?: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listVirtualMachineScaleSetVMNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listVirtualMachineScaleSetVMNetworkInterfacesNext( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listVirtualMachineScaleSetVMNetworkInterfacesPagingAll( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - options?: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listVirtualMachineScaleSetVMNetworkInterfacesPagingPage( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - options, - )) { - yield* page; - } - } - - /** - * Gets all network interfaces in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param options The options parameters. - */ - public listVirtualMachineScaleSetNetworkInterfaces( - resourceGroupName: string, - virtualMachineScaleSetName: string, - options?: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listVirtualMachineScaleSetNetworkInterfacesPagingAll( - resourceGroupName, - virtualMachineScaleSetName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listVirtualMachineScaleSetNetworkInterfacesPagingPage( - resourceGroupName, - virtualMachineScaleSetName, - options, - settings, - ); - }, - }; - } - - private async *listVirtualMachineScaleSetNetworkInterfacesPagingPage( - resourceGroupName: string, - virtualMachineScaleSetName: string, - options?: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listVirtualMachineScaleSetNetworkInterfaces( - resourceGroupName, - virtualMachineScaleSetName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listVirtualMachineScaleSetNetworkInterfacesNext( - resourceGroupName, - virtualMachineScaleSetName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listVirtualMachineScaleSetNetworkInterfacesPagingAll( - resourceGroupName: string, - virtualMachineScaleSetName: string, - options?: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listVirtualMachineScaleSetNetworkInterfacesPagingPage( - resourceGroupName, - virtualMachineScaleSetName, - options, - )) { - yield* page; - } - } - - /** - * Get the specified network interface ip configuration in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - public listVirtualMachineScaleSetIpConfigurations( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - options?: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listVirtualMachineScaleSetIpConfigurationsPagingAll( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listVirtualMachineScaleSetIpConfigurationsPagingPage( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - options, - settings, - ); - }, - }; - } - - private async *listVirtualMachineScaleSetIpConfigurationsPagingPage( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - options?: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listVirtualMachineScaleSetIpConfigurations( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listVirtualMachineScaleSetIpConfigurationsNext( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listVirtualMachineScaleSetIpConfigurationsPagingAll( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - options?: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listVirtualMachineScaleSetIpConfigurationsPagingPage( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - options, - )) { - yield* page; - } - } - - /** - * Gets information about all network interfaces in a role instance in a cloud service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The name of role instance. - * @param options The options parameters. - */ - private _listCloudServiceRoleInstanceNetworkInterfaces( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - options?: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, cloudServiceName, roleInstanceName, options }, - listCloudServiceRoleInstanceNetworkInterfacesOperationSpec, - ); - } - - /** - * Gets all network interfaces in a cloud service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param options The options parameters. - */ - private _listCloudServiceNetworkInterfaces( - resourceGroupName: string, - cloudServiceName: string, - options?: NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, cloudServiceName, options }, - listCloudServiceNetworkInterfacesOperationSpec, - ); - } - - /** - * Get the specified network interface in a cloud service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The name of role instance. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - getCloudServiceNetworkInterface( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - networkInterfaceName: string, - options?: NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - options, - }, - getCloudServiceNetworkInterfaceOperationSpec, - ); - } - - /** - * Deletes the specified network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkInterfaceName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, networkInterfaceName, options); - return poller.pollUntilDone(); - } - - /** - * Gets information about the specified network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkInterfaceName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param parameters Parameters supplied to the create or update network interface operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - networkInterfaceName: string, - parameters: NetworkInterface, - options?: NetworkInterfacesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkInterfacesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkInterfaceName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - NetworkInterfacesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param parameters Parameters supplied to the create or update network interface operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkInterfaceName: string, - parameters: NetworkInterface, - options?: NetworkInterfacesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - networkInterfaceName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates a network interface tags. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param parameters Parameters supplied to update network interface tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkInterfaceName: string, - parameters: TagsObject, - options?: NetworkInterfacesUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkInterfaceName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all network interfaces in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: NetworkInterfacesListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all network interfaces in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: NetworkInterfacesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all route tables applied to a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - async beginGetEffectiveRouteTable( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkInterfacesGetEffectiveRouteTableResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkInterfaceName, options }, - spec: getEffectiveRouteTableOperationSpec, - }); - const poller = await createHttpPoller< - NetworkInterfacesGetEffectiveRouteTableResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets all route tables applied to a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - async beginGetEffectiveRouteTableAndWait( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams, - ): Promise { - const poller = await this.beginGetEffectiveRouteTable( - resourceGroupName, - networkInterfaceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all network security groups applied to a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - async beginListEffectiveNetworkSecurityGroups( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkInterfacesListEffectiveNetworkSecurityGroupsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkInterfaceName, options }, - spec: listEffectiveNetworkSecurityGroupsOperationSpec, - }); - const poller = await createHttpPoller< - NetworkInterfacesListEffectiveNetworkSecurityGroupsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets all network security groups applied to a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - async beginListEffectiveNetworkSecurityGroupsAndWait( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, - ): Promise { - const poller = await this.beginListEffectiveNetworkSecurityGroups( - resourceGroupName, - networkInterfaceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param options The options parameters. - */ - private _listVirtualMachineScaleSetVMNetworkInterfaces( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - options?: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - options, - }, - listVirtualMachineScaleSetVMNetworkInterfacesOperationSpec, - ); - } - - /** - * Gets all network interfaces in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param options The options parameters. - */ - private _listVirtualMachineScaleSetNetworkInterfaces( - resourceGroupName: string, - virtualMachineScaleSetName: string, - options?: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineScaleSetName, options }, - listVirtualMachineScaleSetNetworkInterfacesOperationSpec, - ); - } - - /** - * Get the specified network interface in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - getVirtualMachineScaleSetNetworkInterface( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - options?: NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - options, - }, - getVirtualMachineScaleSetNetworkInterfaceOperationSpec, - ); - } - - /** - * Get the specified network interface ip configuration in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - private _listVirtualMachineScaleSetIpConfigurations( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - options?: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - options, - }, - listVirtualMachineScaleSetIpConfigurationsOperationSpec, - ); - } - - /** - * Get the specified network interface ip configuration in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration. - * @param options The options parameters. - */ - getVirtualMachineScaleSetIpConfiguration( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - options, - }, - getVirtualMachineScaleSetIpConfigurationOperationSpec, - ); - } - - /** - * ListCloudServiceRoleInstanceNetworkInterfacesNext - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The name of role instance. - * @param nextLink The nextLink from the previous successful call to the - * ListCloudServiceRoleInstanceNetworkInterfaces method. - * @param options The options parameters. - */ - private _listCloudServiceRoleInstanceNetworkInterfacesNext( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - nextLink: string, - options?: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - cloudServiceName, - roleInstanceName, - nextLink, - options, - }, - listCloudServiceRoleInstanceNetworkInterfacesNextOperationSpec, - ); - } - - /** - * ListCloudServiceNetworkInterfacesNext - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param nextLink The nextLink from the previous successful call to the - * ListCloudServiceNetworkInterfaces method. - * @param options The options parameters. - */ - private _listCloudServiceNetworkInterfacesNext( - resourceGroupName: string, - cloudServiceName: string, - nextLink: string, - options?: NetworkInterfacesListCloudServiceNetworkInterfacesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, cloudServiceName, nextLink, options }, - listCloudServiceNetworkInterfacesNextOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: NetworkInterfacesListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: NetworkInterfacesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListVirtualMachineScaleSetVMNetworkInterfacesNext - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param nextLink The nextLink from the previous successful call to the - * ListVirtualMachineScaleSetVMNetworkInterfaces method. - * @param options The options parameters. - */ - private _listVirtualMachineScaleSetVMNetworkInterfacesNext( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - nextLink: string, - options?: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - nextLink, - options, - }, - listVirtualMachineScaleSetVMNetworkInterfacesNextOperationSpec, - ); - } - - /** - * ListVirtualMachineScaleSetNetworkInterfacesNext - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param nextLink The nextLink from the previous successful call to the - * ListVirtualMachineScaleSetNetworkInterfaces method. - * @param options The options parameters. - */ - private _listVirtualMachineScaleSetNetworkInterfacesNext( - resourceGroupName: string, - virtualMachineScaleSetName: string, - nextLink: string, - options?: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineScaleSetName, nextLink, options }, - listVirtualMachineScaleSetNetworkInterfacesNextOperationSpec, - ); - } - - /** - * ListVirtualMachineScaleSetIpConfigurationsNext - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param nextLink The nextLink from the previous successful call to the - * ListVirtualMachineScaleSetIpConfigurations method. - * @param options The options parameters. - */ - private _listVirtualMachineScaleSetIpConfigurationsNext( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - nextLink: string, - options?: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - nextLink, - options, - }, - listVirtualMachineScaleSetIpConfigurationsNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listCloudServiceRoleInstanceNetworkInterfacesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.cloudServiceName, - Parameters.roleInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listCloudServiceNetworkInterfacesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.cloudServiceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getCloudServiceNetworkInterfaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterface, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.cloudServiceName, - Parameters.roleInstanceName, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterface, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterface, - }, - 201: { - bodyMapper: Mappers.NetworkInterface, - }, - 202: { - bodyMapper: Mappers.NetworkInterface, - }, - 204: { - bodyMapper: Mappers.NetworkInterface, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters9, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterface, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getEffectiveRouteTableOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.EffectiveRouteListResult, - }, - 201: { - bodyMapper: Mappers.EffectiveRouteListResult, - }, - 202: { - bodyMapper: Mappers.EffectiveRouteListResult, - }, - 204: { - bodyMapper: Mappers.EffectiveRouteListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listEffectiveNetworkSecurityGroupsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.EffectiveNetworkSecurityGroupListResult, - }, - 201: { - bodyMapper: Mappers.EffectiveNetworkSecurityGroupListResult, - }, - 202: { - bodyMapper: Mappers.EffectiveNetworkSecurityGroupListResult, - }, - 204: { - bodyMapper: Mappers.EffectiveNetworkSecurityGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVirtualMachineScaleSetVMNetworkInterfacesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualMachineScaleSetName, - Parameters.virtualmachineIndex, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVirtualMachineScaleSetNetworkInterfacesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualMachineScaleSetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getVirtualMachineScaleSetNetworkInterfaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterface, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.expand, Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - Parameters.virtualMachineScaleSetName, - Parameters.virtualmachineIndex, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVirtualMachineScaleSetIpConfigurationsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceIPConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.expand, Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - Parameters.virtualMachineScaleSetName, - Parameters.virtualmachineIndex, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getVirtualMachineScaleSetIpConfigurationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceIPConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.expand, Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - Parameters.virtualMachineScaleSetName, - Parameters.virtualmachineIndex, - Parameters.ipConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listCloudServiceRoleInstanceNetworkInterfacesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.cloudServiceName, - Parameters.roleInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listCloudServiceNetworkInterfacesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.cloudServiceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVirtualMachineScaleSetVMNetworkInterfacesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualMachineScaleSetName, - Parameters.virtualmachineIndex, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVirtualMachineScaleSetNetworkInterfacesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualMachineScaleSetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVirtualMachineScaleSetIpConfigurationsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkInterfaceIPConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkInterfaceName, - Parameters.virtualMachineScaleSetName, - Parameters.virtualmachineIndex, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkManagerCommits.ts b/sdk/network/arm-network/src/operations/networkManagerCommits.ts deleted file mode 100644 index 1697b530dd9d..000000000000 --- a/sdk/network/arm-network/src/operations/networkManagerCommits.ts +++ /dev/null @@ -1,156 +0,0 @@ -// 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 type { NetworkManagerCommits } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkManagerCommit, - NetworkManagerCommitsPostOptionalParams, - NetworkManagerCommitsPostResponse, -} from "../models/index.js"; - -/** Class containing NetworkManagerCommits operations. */ -export class NetworkManagerCommitsImpl implements NetworkManagerCommits { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkManagerCommits class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Post a Network Manager Commit. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Parameters supplied to specify which Managed Network commit is. - * @param options The options parameters. - */ - async beginPost( - resourceGroupName: string, - networkManagerName: string, - parameters: NetworkManagerCommit, - options?: NetworkManagerCommitsPostOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkManagerCommitsPostResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkManagerName, parameters, options }, - spec: postOperationSpec, - }); - const poller = await createHttpPoller< - NetworkManagerCommitsPostResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Post a Network Manager Commit. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Parameters supplied to specify which Managed Network commit is. - * @param options The options parameters. - */ - async beginPostAndWait( - resourceGroupName: string, - networkManagerName: string, - parameters: NetworkManagerCommit, - options?: NetworkManagerCommitsPostOptionalParams, - ): Promise { - const poller = await this.beginPost(resourceGroupName, networkManagerName, parameters, options); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const postOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commit", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerCommit, - }, - 201: { - bodyMapper: Mappers.NetworkManagerCommit, - }, - 202: { - bodyMapper: Mappers.NetworkManagerCommit, - }, - 204: { - bodyMapper: Mappers.NetworkManagerCommit, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters38, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkManagerDeploymentStatusOperations.ts b/sdk/network/arm-network/src/operations/networkManagerDeploymentStatusOperations.ts deleted file mode 100644 index ea766403b6d1..000000000000 --- a/sdk/network/arm-network/src/operations/networkManagerDeploymentStatusOperations.ts +++ /dev/null @@ -1,74 +0,0 @@ -// 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 type { NetworkManagerDeploymentStatusOperations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - NetworkManagerDeploymentStatusParameter, - NetworkManagerDeploymentStatusListOptionalParams, - NetworkManagerDeploymentStatusListResponse, -} from "../models/index.js"; - -/** Class containing NetworkManagerDeploymentStatusOperations operations. */ -export class NetworkManagerDeploymentStatusOperationsImpl implements NetworkManagerDeploymentStatusOperations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkManagerDeploymentStatusOperations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Post to List of Network Manager Deployment Status. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Parameters supplied to specify which Managed Network deployment status is. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - parameters: NetworkManagerDeploymentStatusParameter, - options?: NetworkManagerDeploymentStatusListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, parameters, options }, - listOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listDeploymentStatus", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerDeploymentStatusListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters39, - queryParameters: [Parameters.apiVersion, Parameters.top], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkManagerRoutingConfigurations.ts b/sdk/network/arm-network/src/operations/networkManagerRoutingConfigurations.ts deleted file mode 100644 index d168fdfa98b5..000000000000 --- a/sdk/network/arm-network/src/operations/networkManagerRoutingConfigurations.ts +++ /dev/null @@ -1,399 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkManagerRoutingConfigurations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkManagerRoutingConfiguration, - NetworkManagerRoutingConfigurationsListNextOptionalParams, - NetworkManagerRoutingConfigurationsListOptionalParams, - NetworkManagerRoutingConfigurationsListResponse, - NetworkManagerRoutingConfigurationsGetOptionalParams, - NetworkManagerRoutingConfigurationsGetResponse, - NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams, - NetworkManagerRoutingConfigurationsCreateOrUpdateResponse, - NetworkManagerRoutingConfigurationsDeleteOptionalParams, - NetworkManagerRoutingConfigurationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkManagerRoutingConfigurations operations. */ -export class NetworkManagerRoutingConfigurationsImpl implements NetworkManagerRoutingConfigurations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkManagerRoutingConfigurations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the network manager routing configurations in a network manager, in a paginated format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkManagerRoutingConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkManagerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkManagerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkManagerRoutingConfigurationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkManagerRoutingConfigurationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkManagerRoutingConfigurationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, networkManagerName, options)) { - yield* page; - } - } - - /** - * Lists all the network manager routing configurations in a network manager, in a paginated format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkManagerRoutingConfigurationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, options }, - listOperationSpec, - ); - } - - /** - * Retrieves a network manager routing configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: NetworkManagerRoutingConfigurationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, configurationName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a network manager routing configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param routingConfiguration The routing configuration to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - routingConfiguration: NetworkManagerRoutingConfiguration, - options?: NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - routingConfiguration, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a network manager routing configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - configurationName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a network manager routing configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - nextLink: string, - options?: NetworkManagerRoutingConfigurationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerRoutingConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerRoutingConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerRoutingConfiguration, - }, - 201: { - bodyMapper: Mappers.NetworkManagerRoutingConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.routingConfiguration, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerRoutingConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkManagers.ts b/sdk/network/arm-network/src/operations/networkManagers.ts deleted file mode 100644 index 7d771cf8abd6..000000000000 --- a/sdk/network/arm-network/src/operations/networkManagers.ts +++ /dev/null @@ -1,509 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkManagers } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkManager, - NetworkManagersListBySubscriptionNextOptionalParams, - NetworkManagersListBySubscriptionOptionalParams, - NetworkManagersListBySubscriptionResponse, - NetworkManagersListNextOptionalParams, - NetworkManagersListOptionalParams, - NetworkManagersListResponse, - NetworkManagersGetOptionalParams, - NetworkManagersGetResponse, - NetworkManagersCreateOrUpdateOptionalParams, - NetworkManagersCreateOrUpdateResponse, - NetworkManagersDeleteOptionalParams, - PatchObject, - NetworkManagersPatchOptionalParams, - NetworkManagersPatchResponse, - NetworkManagersListBySubscriptionNextResponse, - NetworkManagersListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkManagers operations. */ -export class NetworkManagersImpl implements NetworkManagers { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkManagers class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List all network managers in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: NetworkManagersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: NetworkManagersListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkManagersListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: NetworkManagersListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * List network managers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: NetworkManagersListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: NetworkManagersListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkManagersListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: NetworkManagersListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets the specified Network Manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkManagersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a Network Manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Parameters supplied to specify which network manager is. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - parameters: NetworkManager, - options?: NetworkManagersCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkManagersDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkManagerName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkManagersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, networkManagerName, options); - return poller.pollUntilDone(); - } - - /** - * Patch NetworkManager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Parameters supplied to specify which network manager is. - * @param options The options parameters. - */ - patch( - resourceGroupName: string, - networkManagerName: string, - parameters: PatchObject, - options?: NetworkManagersPatchOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, parameters, options }, - patchOperationSpec, - ); - } - - /** - * List all network managers in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: NetworkManagersListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * List network managers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: NetworkManagersListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: NetworkManagersListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: NetworkManagersListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManager, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkManager, - }, - 201: { - bodyMapper: Mappers.NetworkManager, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters36, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const patchOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NetworkManager, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters37, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkProfiles.ts b/sdk/network/arm-network/src/operations/networkProfiles.ts deleted file mode 100644 index e024d4c97c2a..000000000000 --- a/sdk/network/arm-network/src/operations/networkProfiles.ts +++ /dev/null @@ -1,506 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkProfiles } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkProfile, - NetworkProfilesListAllNextOptionalParams, - NetworkProfilesListAllOptionalParams, - NetworkProfilesListAllResponse, - NetworkProfilesListNextOptionalParams, - NetworkProfilesListOptionalParams, - NetworkProfilesListResponse, - NetworkProfilesDeleteOptionalParams, - NetworkProfilesGetOptionalParams, - NetworkProfilesGetResponse, - NetworkProfilesCreateOrUpdateOptionalParams, - NetworkProfilesCreateOrUpdateResponse, - TagsObject, - NetworkProfilesUpdateTagsOptionalParams, - NetworkProfilesUpdateTagsResponse, - NetworkProfilesListAllNextResponse, - NetworkProfilesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkProfiles operations. */ -export class NetworkProfilesImpl implements NetworkProfiles { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkProfiles class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the network profiles in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: NetworkProfilesListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: NetworkProfilesListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkProfilesListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: NetworkProfilesListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all network profiles in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: NetworkProfilesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: NetworkProfilesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkProfilesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: NetworkProfilesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified network profile. - * @param resourceGroupName The name of the resource group. - * @param networkProfileName The name of the NetworkProfile. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkProfileName: string, - options?: NetworkProfilesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkProfileName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified network profile. - * @param resourceGroupName The name of the resource group. - * @param networkProfileName The name of the NetworkProfile. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkProfileName: string, - options?: NetworkProfilesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, networkProfileName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified network profile in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param networkProfileName The name of the public IP prefix. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkProfileName: string, - options?: NetworkProfilesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkProfileName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a network profile. - * @param resourceGroupName The name of the resource group. - * @param networkProfileName The name of the network profile. - * @param parameters Parameters supplied to the create or update network profile operation. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkProfileName: string, - parameters: NetworkProfile, - options?: NetworkProfilesCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkProfileName, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates network profile tags. - * @param resourceGroupName The name of the resource group. - * @param networkProfileName The name of the network profile. - * @param parameters Parameters supplied to update network profile tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkProfileName: string, - parameters: TagsObject, - options?: NetworkProfilesUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkProfileName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all the network profiles in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: NetworkProfilesListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all network profiles in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: NetworkProfilesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: NetworkProfilesListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: NetworkProfilesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkProfileName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkProfile, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkProfileName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkProfile, - }, - 201: { - bodyMapper: Mappers.NetworkProfile, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters44, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkProfileName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NetworkProfile, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkProfileName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkProfileListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkProfileListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkProfileListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkProfileListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkSecurityGroups.ts b/sdk/network/arm-network/src/operations/networkSecurityGroups.ts deleted file mode 100644 index 97b745ae445a..000000000000 --- a/sdk/network/arm-network/src/operations/networkSecurityGroups.ts +++ /dev/null @@ -1,592 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkSecurityGroups } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkSecurityGroup, - NetworkSecurityGroupsListAllNextOptionalParams, - NetworkSecurityGroupsListAllOptionalParams, - NetworkSecurityGroupsListAllResponse, - NetworkSecurityGroupsListNextOptionalParams, - NetworkSecurityGroupsListOptionalParams, - NetworkSecurityGroupsListResponse, - NetworkSecurityGroupsDeleteOptionalParams, - NetworkSecurityGroupsGetOptionalParams, - NetworkSecurityGroupsGetResponse, - NetworkSecurityGroupsCreateOrUpdateOptionalParams, - NetworkSecurityGroupsCreateOrUpdateResponse, - TagsObject, - NetworkSecurityGroupsUpdateTagsOptionalParams, - NetworkSecurityGroupsUpdateTagsResponse, - NetworkSecurityGroupsListAllNextResponse, - NetworkSecurityGroupsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkSecurityGroups operations. */ -export class NetworkSecurityGroupsImpl implements NetworkSecurityGroups { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkSecurityGroups class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all network security groups in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: NetworkSecurityGroupsListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: NetworkSecurityGroupsListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityGroupsListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: NetworkSecurityGroupsListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all network security groups in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: NetworkSecurityGroupsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: NetworkSecurityGroupsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityGroupsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: NetworkSecurityGroupsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: NetworkSecurityGroupsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkSecurityGroupName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: NetworkSecurityGroupsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, networkSecurityGroupName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: NetworkSecurityGroupsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityGroupName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a network security group in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param parameters Parameters supplied to the create or update network security group operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - networkSecurityGroupName: string, - parameters: NetworkSecurityGroup, - options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkSecurityGroupsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkSecurityGroupName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - NetworkSecurityGroupsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a network security group in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param parameters Parameters supplied to the create or update network security group operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkSecurityGroupName: string, - parameters: NetworkSecurityGroup, - options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - networkSecurityGroupName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates a network security group tags. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param parameters Parameters supplied to update network security group tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkSecurityGroupName: string, - parameters: TagsObject, - options?: NetworkSecurityGroupsUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityGroupName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all network security groups in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: NetworkSecurityGroupsListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all network security groups in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: NetworkSecurityGroupsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: NetworkSecurityGroupsListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: NetworkSecurityGroupsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityGroup, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityGroup, - }, - 201: { - bodyMapper: Mappers.NetworkSecurityGroup, - }, - 202: { - bodyMapper: Mappers.NetworkSecurityGroup, - }, - 204: { - bodyMapper: Mappers.NetworkSecurityGroup, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters45, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityGroupName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityGroup, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityGroupName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityGroupListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkSecurityPerimeterAccessRules.ts b/sdk/network/arm-network/src/operations/networkSecurityPerimeterAccessRules.ts deleted file mode 100644 index 52e349b27325..000000000000 --- a/sdk/network/arm-network/src/operations/networkSecurityPerimeterAccessRules.ts +++ /dev/null @@ -1,441 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkSecurityPerimeterAccessRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - NspAccessRule, - NetworkSecurityPerimeterAccessRulesListNextOptionalParams, - NetworkSecurityPerimeterAccessRulesListOptionalParams, - NetworkSecurityPerimeterAccessRulesListResponse, - NetworkSecurityPerimeterAccessRulesGetOptionalParams, - NetworkSecurityPerimeterAccessRulesGetResponse, - NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams, - NetworkSecurityPerimeterAccessRulesCreateOrUpdateResponse, - NetworkSecurityPerimeterAccessRulesDeleteOptionalParams, - NetworkSecurityPerimeterAccessRulesReconcileOptionalParams, - NetworkSecurityPerimeterAccessRulesReconcileResponse, - NetworkSecurityPerimeterAccessRulesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkSecurityPerimeterAccessRules operations. */ -export class NetworkSecurityPerimeterAccessRulesImpl implements NetworkSecurityPerimeterAccessRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkSecurityPerimeterAccessRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists the NSP access rules in the specified NSP profile. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - options?: NetworkSecurityPerimeterAccessRulesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - options?: NetworkSecurityPerimeterAccessRulesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityPerimeterAccessRulesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - options?: NetworkSecurityPerimeterAccessRulesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - profileName, - options, - )) { - yield* page; - } - } - - /** - * Gets the specified NSP access rule by name. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param accessRuleName The name of the NSP access rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - accessRuleName: string, - options?: NetworkSecurityPerimeterAccessRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates a network access rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param accessRuleName The name of the NSP access rule. - * @param parameters Parameters that hold the NspAccessRule resource to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - accessRuleName: string, - parameters: NspAccessRule, - options?: NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes an NSP access rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param accessRuleName The name of the NSP access rule. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - accessRuleName: string, - options?: NetworkSecurityPerimeterAccessRulesDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - options, - }, - deleteOperationSpec, - ); - } - - /** - * Lists the NSP access rules in the specified NSP profile. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - options?: NetworkSecurityPerimeterAccessRulesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, profileName, options }, - listOperationSpec, - ); - } - - /** - * Reconcile NSP access rules - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param accessRuleName The name of the NSP access rule. - * @param parameters Parameters for NSP access rule reconcile - * @param options The options parameters. - */ - reconcile( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - accessRuleName: string, - parameters: Record, - options?: NetworkSecurityPerimeterAccessRulesReconcileOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - profileName, - accessRuleName, - parameters, - options, - }, - reconcileOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - nextLink: string, - options?: NetworkSecurityPerimeterAccessRulesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - profileName, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules/{accessRuleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspAccessRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.profileName, - Parameters.accessRuleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules/{accessRuleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NspAccessRule, - }, - 201: { - bodyMapper: Mappers.NspAccessRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters49, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.profileName, - Parameters.accessRuleName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules/{accessRuleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.profileName, - Parameters.accessRuleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspAccessRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.profileName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const reconcileOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules/{accessRuleName}/reconcile", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { - type: { name: "Dictionary", value: { type: { name: "any" } } }, - }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters50, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.profileName, - Parameters.accessRuleName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspAccessRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkSecurityPerimeterName, - Parameters.profileName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkSecurityPerimeterAssociableResourceTypes.ts b/sdk/network/arm-network/src/operations/networkSecurityPerimeterAssociableResourceTypes.ts deleted file mode 100644 index 0d2e5a440672..000000000000 --- a/sdk/network/arm-network/src/operations/networkSecurityPerimeterAssociableResourceTypes.ts +++ /dev/null @@ -1,159 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkSecurityPerimeterAssociableResourceTypes } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - PerimeterAssociableResource, - NetworkSecurityPerimeterAssociableResourceTypesListNextOptionalParams, - NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams, - NetworkSecurityPerimeterAssociableResourceTypesListResponse, - NetworkSecurityPerimeterAssociableResourceTypesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkSecurityPerimeterAssociableResourceTypes operations. */ -export class NetworkSecurityPerimeterAssociableResourceTypesImpl implements NetworkSecurityPerimeterAssociableResourceTypes { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkSecurityPerimeterAssociableResourceTypes class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets the list of resources that are onboarded with NSP. These resources can be associated with a - * network security perimeter - * @param location The location of network security perimeter. - * @param options The options parameters. - */ - public list( - location: string, - options?: NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(location, options, settings); - }, - }; - } - - private async *listPagingPage( - location: string, - options?: NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityPerimeterAssociableResourceTypesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(location, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(location, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - location: string, - options?: NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(location, options)) { - yield* page; - } - } - - /** - * Gets the list of resources that are onboarded with NSP. These resources can be associated with a - * network security perimeter - * @param location The location of network security perimeter. - * @param options The options parameters. - */ - private _list( - location: string, - options?: NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, options }, listOperationSpec); - } - - /** - * ListNext - * @param location The location of network security perimeter. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - location: string, - nextLink: string, - options?: NetworkSecurityPerimeterAssociableResourceTypesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/perimeterAssociableResourceTypes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PerimeterAssociableResourcesListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PerimeterAssociableResourcesListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkSecurityPerimeterAssociations.ts b/sdk/network/arm-network/src/operations/networkSecurityPerimeterAssociations.ts deleted file mode 100644 index b5fd5f967adf..000000000000 --- a/sdk/network/arm-network/src/operations/networkSecurityPerimeterAssociations.ts +++ /dev/null @@ -1,552 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkSecurityPerimeterAssociations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NspAssociation, - NetworkSecurityPerimeterAssociationsListNextOptionalParams, - NetworkSecurityPerimeterAssociationsListOptionalParams, - NetworkSecurityPerimeterAssociationsListResponse, - NetworkSecurityPerimeterAssociationsGetOptionalParams, - NetworkSecurityPerimeterAssociationsGetResponse, - NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, - NetworkSecurityPerimeterAssociationsCreateOrUpdateResponse, - NetworkSecurityPerimeterAssociationsDeleteOptionalParams, - NetworkSecurityPerimeterAssociationsReconcileOptionalParams, - NetworkSecurityPerimeterAssociationsReconcileResponse, - NetworkSecurityPerimeterAssociationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkSecurityPerimeterAssociations operations. */ -export class NetworkSecurityPerimeterAssociationsImpl implements NetworkSecurityPerimeterAssociations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkSecurityPerimeterAssociations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists the NSP resource associations. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterAssociationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkSecurityPerimeterName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterAssociationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityPerimeterAssociationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkSecurityPerimeterName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkSecurityPerimeterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterAssociationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - options, - )) { - yield* page; - } - } - - /** - * Gets the specified NSP association by name. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - options?: NetworkSecurityPerimeterAssociationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - associationName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates a NSP resource association. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param parameters Parameters that hold the NspAssociation resource to be created/updated. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - parameters: NspAssociation, - options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkSecurityPerimeterAssociationsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - NetworkSecurityPerimeterAssociationsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a NSP resource association. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param parameters Parameters that hold the NspAssociation resource to be created/updated. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - parameters: NspAssociation, - options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes an NSP association resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkSecurityPerimeterName, - associationName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes an NSP association resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkSecurityPerimeterName, - associationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists the NSP resource associations. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterAssociationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, options }, - listOperationSpec, - ); - } - - /** - * Reconcile NSP association - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param parameters Parameters for NSP association reconcile - * @param options The options parameters. - */ - reconcile( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - parameters: Record, - options?: NetworkSecurityPerimeterAssociationsReconcileOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - associationName, - parameters, - options, - }, - reconcileOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkSecurityPerimeterName: string, - nextLink: string, - options?: NetworkSecurityPerimeterAssociationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspAssociation, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.associationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NspAssociation, - }, - 201: { - bodyMapper: Mappers.NspAssociation, - }, - 202: { - bodyMapper: Mappers.NspAssociation, - }, - 204: { - bodyMapper: Mappers.NspAssociation, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters51, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.associationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.associationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspAssociationsListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const reconcileOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}/reconcile", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { - type: { name: "Dictionary", value: { type: { name: "any" } } }, - }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters50, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.associationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspAssociationsListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkSecurityPerimeterLinkReferences.ts b/sdk/network/arm-network/src/operations/networkSecurityPerimeterLinkReferences.ts deleted file mode 100644 index c76ddb2309df..000000000000 --- a/sdk/network/arm-network/src/operations/networkSecurityPerimeterLinkReferences.ts +++ /dev/null @@ -1,357 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkSecurityPerimeterLinkReferences } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NspLinkReference, - NetworkSecurityPerimeterLinkReferencesListNextOptionalParams, - NetworkSecurityPerimeterLinkReferencesListOptionalParams, - NetworkSecurityPerimeterLinkReferencesListResponse, - NetworkSecurityPerimeterLinkReferencesGetOptionalParams, - NetworkSecurityPerimeterLinkReferencesGetResponse, - NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, - NetworkSecurityPerimeterLinkReferencesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkSecurityPerimeterLinkReferences operations. */ -export class NetworkSecurityPerimeterLinkReferencesImpl implements NetworkSecurityPerimeterLinkReferences { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkSecurityPerimeterLinkReferences class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists the NSP LinkReference resources in the specified network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLinkReferencesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkSecurityPerimeterName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLinkReferencesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityPerimeterLinkReferencesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkSecurityPerimeterName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkSecurityPerimeterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLinkReferencesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - options, - )) { - yield* page; - } - } - - /** - * Gets the specified NSP linkReference resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkReferenceName The name of the NSP linkReference. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkReferenceName: string, - options?: NetworkSecurityPerimeterLinkReferencesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - options, - }, - getOperationSpec, - ); - } - - /** - * Deletes an NSP LinkReference resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkReferenceName The name of the NSP linkReference. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkReferenceName: string, - options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes an NSP LinkReference resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkReferenceName The name of the NSP linkReference. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkReferenceName: string, - options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkSecurityPerimeterName, - linkReferenceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists the NSP LinkReference resources in the specified network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLinkReferencesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkSecurityPerimeterName: string, - nextLink: string, - options?: NetworkSecurityPerimeterLinkReferencesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/linkReferences/{linkReferenceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspLinkReference, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.linkReferenceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/linkReferences/{linkReferenceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.linkReferenceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/linkReferences", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspLinkReferenceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspLinkReferenceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkSecurityPerimeterLinks.ts b/sdk/network/arm-network/src/operations/networkSecurityPerimeterLinks.ts deleted file mode 100644 index 9392f73565c4..000000000000 --- a/sdk/network/arm-network/src/operations/networkSecurityPerimeterLinks.ts +++ /dev/null @@ -1,408 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkSecurityPerimeterLinks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NspLink, - NetworkSecurityPerimeterLinksListNextOptionalParams, - NetworkSecurityPerimeterLinksListOptionalParams, - NetworkSecurityPerimeterLinksListResponse, - NetworkSecurityPerimeterLinksGetOptionalParams, - NetworkSecurityPerimeterLinksGetResponse, - NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams, - NetworkSecurityPerimeterLinksCreateOrUpdateResponse, - NetworkSecurityPerimeterLinksDeleteOptionalParams, - NetworkSecurityPerimeterLinksListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkSecurityPerimeterLinks operations. */ -export class NetworkSecurityPerimeterLinksImpl implements NetworkSecurityPerimeterLinks { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkSecurityPerimeterLinks class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists the NSP Link resources in the specified network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLinksListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkSecurityPerimeterName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLinksListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityPerimeterLinksListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkSecurityPerimeterName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkSecurityPerimeterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLinksListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - options, - )) { - yield* page; - } - } - - /** - * Gets the specified NSP link resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkName The name of the NSP link. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkName: string, - options?: NetworkSecurityPerimeterLinksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, linkName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates NSP link resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkName The name of the NSP link. - * @param parameters Parameters that hold the NspLink resource to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkName: string, - parameters: NspLink, - options?: NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - linkName, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes an NSP Link resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkName The name of the NSP link. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkName: string, - options?: NetworkSecurityPerimeterLinksDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkSecurityPerimeterName, - linkName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes an NSP Link resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkName The name of the NSP link. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkName: string, - options?: NetworkSecurityPerimeterLinksDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkSecurityPerimeterName, - linkName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists the NSP Link resources in the specified network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLinksListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkSecurityPerimeterName: string, - nextLink: string, - options?: NetworkSecurityPerimeterLinksListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspLink, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.linkName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NspLink, - }, - 201: { - bodyMapper: Mappers.NspLink, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters52, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.linkName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.linkName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspLinkListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspLinkListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkSecurityPerimeterLoggingConfigurations.ts b/sdk/network/arm-network/src/operations/networkSecurityPerimeterLoggingConfigurations.ts deleted file mode 100644 index edd79c3a4295..000000000000 --- a/sdk/network/arm-network/src/operations/networkSecurityPerimeterLoggingConfigurations.ts +++ /dev/null @@ -1,344 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkSecurityPerimeterLoggingConfigurations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - NspLoggingConfiguration, - NetworkSecurityPerimeterLoggingConfigurationsListNextOptionalParams, - NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, - NetworkSecurityPerimeterLoggingConfigurationsListResponse, - NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams, - NetworkSecurityPerimeterLoggingConfigurationsGetResponse, - NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams, - NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateResponse, - NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams, - NetworkSecurityPerimeterLoggingConfigurationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkSecurityPerimeterLoggingConfigurations operations. */ -export class NetworkSecurityPerimeterLoggingConfigurationsImpl implements NetworkSecurityPerimeterLoggingConfigurations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkSecurityPerimeterLoggingConfigurations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists the NSP logging configuration. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkSecurityPerimeterName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityPerimeterLoggingConfigurationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkSecurityPerimeterName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkSecurityPerimeterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - options, - )) { - yield* page; - } - } - - /** - * Gets the NSP logging configuration. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param loggingConfigurationName The name of the NSP logging configuration. Accepts 'instance' as - * name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - loggingConfigurationName: string, - options?: NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates NSP logging configuration. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param loggingConfigurationName The name of the NSP logging configuration. Accepts 'instance' as - * name. - * @param parameters Parameters that hold the NspLoggingConfiguration to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - loggingConfigurationName: string, - parameters: NspLoggingConfiguration, - options?: NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes an NSP Logging configuration. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param loggingConfigurationName The name of the NSP logging configuration. Accepts 'instance' as - * name. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - loggingConfigurationName: string, - options?: NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - loggingConfigurationName, - options, - }, - deleteOperationSpec, - ); - } - - /** - * Lists the NSP logging configuration. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkSecurityPerimeterName: string, - nextLink: string, - options?: NetworkSecurityPerimeterLoggingConfigurationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations/{loggingConfigurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspLoggingConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.loggingConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations/{loggingConfigurationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NspLoggingConfiguration, - }, - 201: { - bodyMapper: Mappers.NspLoggingConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters53, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.loggingConfigurationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations/{loggingConfigurationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.loggingConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspLoggingConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspLoggingConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkSecurityPerimeterOperationStatuses.ts b/sdk/network/arm-network/src/operations/networkSecurityPerimeterOperationStatuses.ts deleted file mode 100644 index 14f707c5e11b..000000000000 --- a/sdk/network/arm-network/src/operations/networkSecurityPerimeterOperationStatuses.ts +++ /dev/null @@ -1,66 +0,0 @@ -// 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 type { NetworkSecurityPerimeterOperationStatuses } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - NetworkSecurityPerimeterOperationStatusesGetOptionalParams, - NetworkSecurityPerimeterOperationStatusesGetResponse, -} from "../models/index.js"; - -/** Class containing NetworkSecurityPerimeterOperationStatuses operations. */ -export class NetworkSecurityPerimeterOperationStatusesImpl implements NetworkSecurityPerimeterOperationStatuses { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkSecurityPerimeterOperationStatuses class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets the operation status for the given operation id. - * @param location The location of network security perimeter. - * @param operationId The operation id of the async operation. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: NetworkSecurityPerimeterOperationStatusesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, operationId, options }, getOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/networkSecurityPerimeterOperationStatuses/{operationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - Parameters.operationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkSecurityPerimeterProfiles.ts b/sdk/network/arm-network/src/operations/networkSecurityPerimeterProfiles.ts deleted file mode 100644 index 769db1d94eff..000000000000 --- a/sdk/network/arm-network/src/operations/networkSecurityPerimeterProfiles.ts +++ /dev/null @@ -1,331 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkSecurityPerimeterProfiles } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - NspProfile, - NetworkSecurityPerimeterProfilesListNextOptionalParams, - NetworkSecurityPerimeterProfilesListOptionalParams, - NetworkSecurityPerimeterProfilesListResponse, - NetworkSecurityPerimeterProfilesGetOptionalParams, - NetworkSecurityPerimeterProfilesGetResponse, - NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams, - NetworkSecurityPerimeterProfilesCreateOrUpdateResponse, - NetworkSecurityPerimeterProfilesDeleteOptionalParams, - NetworkSecurityPerimeterProfilesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkSecurityPerimeterProfiles operations. */ -export class NetworkSecurityPerimeterProfilesImpl implements NetworkSecurityPerimeterProfiles { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkSecurityPerimeterProfiles class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists the NSP profiles in the specified network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterProfilesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkSecurityPerimeterName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterProfilesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityPerimeterProfilesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkSecurityPerimeterName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkSecurityPerimeterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterProfilesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkSecurityPerimeterName, - options, - )) { - yield* page; - } - } - - /** - * Gets the specified NSP profile. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - options?: NetworkSecurityPerimeterProfilesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, profileName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a network profile. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param parameters Parameters that hold the NspProfile resource to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - parameters: NspProfile, - options?: NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityPerimeterName, - profileName, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes an NSP profile. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - options?: NetworkSecurityPerimeterProfilesDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, profileName, options }, - deleteOperationSpec, - ); - } - - /** - * Lists the NSP profiles in the specified network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterProfilesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkSecurityPerimeterName: string, - nextLink: string, - options?: NetworkSecurityPerimeterProfilesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspProfile, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.profileName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NspProfile, - }, - 201: { - bodyMapper: Mappers.NspProfile, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters48, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.profileName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - Parameters.profileName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspProfileListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspProfileListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkSecurityPerimeterServiceTags.ts b/sdk/network/arm-network/src/operations/networkSecurityPerimeterServiceTags.ts deleted file mode 100644 index ce0aa76c1820..000000000000 --- a/sdk/network/arm-network/src/operations/networkSecurityPerimeterServiceTags.ts +++ /dev/null @@ -1,159 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkSecurityPerimeterServiceTags } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - NspServiceTagsResource, - NetworkSecurityPerimeterServiceTagsListNextOptionalParams, - NetworkSecurityPerimeterServiceTagsListOptionalParams, - NetworkSecurityPerimeterServiceTagsListResponse, - NetworkSecurityPerimeterServiceTagsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkSecurityPerimeterServiceTags operations. */ -export class NetworkSecurityPerimeterServiceTagsImpl implements NetworkSecurityPerimeterServiceTags { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkSecurityPerimeterServiceTags class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets the list of service tags supported by NSP. These service tags can be used to create access - * rules in NSP. - * @param location The location of network security perimeter. - * @param options The options parameters. - */ - public list( - location: string, - options?: NetworkSecurityPerimeterServiceTagsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(location, options, settings); - }, - }; - } - - private async *listPagingPage( - location: string, - options?: NetworkSecurityPerimeterServiceTagsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityPerimeterServiceTagsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(location, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(location, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - location: string, - options?: NetworkSecurityPerimeterServiceTagsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(location, options)) { - yield* page; - } - } - - /** - * Gets the list of service tags supported by NSP. These service tags can be used to create access - * rules in NSP. - * @param location The location of network security perimeter. - * @param options The options parameters. - */ - private _list( - location: string, - options?: NetworkSecurityPerimeterServiceTagsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, options }, listOperationSpec); - } - - /** - * ListNext - * @param location The location of network security perimeter. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - location: string, - nextLink: string, - options?: NetworkSecurityPerimeterServiceTagsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/nspServiceTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspServiceTagsListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NspServiceTagsListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkSecurityPerimeters.ts b/sdk/network/arm-network/src/operations/networkSecurityPerimeters.ts deleted file mode 100644 index 7d691bafa877..000000000000 --- a/sdk/network/arm-network/src/operations/networkSecurityPerimeters.ts +++ /dev/null @@ -1,509 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkSecurityPerimeters } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkSecurityPerimeter, - NetworkSecurityPerimetersListBySubscriptionNextOptionalParams, - NetworkSecurityPerimetersListBySubscriptionOptionalParams, - NetworkSecurityPerimetersListBySubscriptionResponse, - NetworkSecurityPerimetersListNextOptionalParams, - NetworkSecurityPerimetersListOptionalParams, - NetworkSecurityPerimetersListResponse, - NetworkSecurityPerimetersGetOptionalParams, - NetworkSecurityPerimetersGetResponse, - NetworkSecurityPerimetersCreateOrUpdateOptionalParams, - NetworkSecurityPerimetersCreateOrUpdateResponse, - NetworkSecurityPerimetersDeleteOptionalParams, - UpdateTagsRequest, - NetworkSecurityPerimetersPatchOptionalParams, - NetworkSecurityPerimetersPatchResponse, - NetworkSecurityPerimetersListBySubscriptionNextResponse, - NetworkSecurityPerimetersListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkSecurityPerimeters operations. */ -export class NetworkSecurityPerimetersImpl implements NetworkSecurityPerimeters { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkSecurityPerimeters class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List all network security perimeters in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: NetworkSecurityPerimetersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: NetworkSecurityPerimetersListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityPerimetersListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: NetworkSecurityPerimetersListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * List network security perimeters in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: NetworkSecurityPerimetersListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: NetworkSecurityPerimetersListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkSecurityPerimetersListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: NetworkSecurityPerimetersListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets the specified network security perimeter by the name. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimetersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a Network Security Perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param parameters Parameter supplied to create or update the network security perimeter. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - parameters: NetworkSecurityPerimeter, - options?: NetworkSecurityPerimetersCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimetersDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkSecurityPerimeterName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimetersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, networkSecurityPerimeterName, options); - return poller.pollUntilDone(); - } - - /** - * Patch Tags for a Network Security Perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param parameters Parameter supplied to the network security perimeter. - * @param options The options parameters. - */ - patch( - resourceGroupName: string, - networkSecurityPerimeterName: string, - parameters: UpdateTagsRequest, - options?: NetworkSecurityPerimetersPatchOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityPerimeterName, parameters, options }, - patchOperationSpec, - ); - } - - /** - * List all network security perimeters in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: NetworkSecurityPerimetersListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * List network security perimeters in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: NetworkSecurityPerimetersListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: NetworkSecurityPerimetersListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: NetworkSecurityPerimetersListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityPerimeter, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityPerimeter, - }, - 201: { - bodyMapper: Mappers.NetworkSecurityPerimeter, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters46, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.forceDeletion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const patchOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityPerimeter, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters47, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityPerimeterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityPerimeterListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityPerimeterListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityPerimeterListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkSecurityPerimeterListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkVirtualApplianceConnections.ts b/sdk/network/arm-network/src/operations/networkVirtualApplianceConnections.ts deleted file mode 100644 index c639a7e65739..000000000000 --- a/sdk/network/arm-network/src/operations/networkVirtualApplianceConnections.ts +++ /dev/null @@ -1,501 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkVirtualApplianceConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkVirtualApplianceConnection, - NetworkVirtualApplianceConnectionsListNextOptionalParams, - NetworkVirtualApplianceConnectionsListOptionalParams, - NetworkVirtualApplianceConnectionsListResponse, - NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, - NetworkVirtualApplianceConnectionsCreateOrUpdateResponse, - NetworkVirtualApplianceConnectionsGetOptionalParams, - NetworkVirtualApplianceConnectionsGetResponse, - NetworkVirtualApplianceConnectionsDeleteOptionalParams, - NetworkVirtualApplianceConnectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkVirtualApplianceConnections operations. */ -export class NetworkVirtualApplianceConnectionsImpl implements NetworkVirtualApplianceConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkVirtualApplianceConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists NetworkVirtualApplianceConnections under the NVA. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualApplianceConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkVirtualApplianceName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkVirtualApplianceName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualApplianceConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkVirtualApplianceConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkVirtualApplianceName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkVirtualApplianceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualApplianceConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkVirtualApplianceName, - options, - )) { - yield* page; - } - } - - /** - * Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA - * connection' - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param connectionName The name of the NVA connection. - * @param networkVirtualApplianceConnectionParameters Parameters supplied in an - * NetworkVirtualApplianceConnection PUT operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - networkVirtualApplianceName: string, - connectionName: string, - networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, - options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkVirtualApplianceConnectionsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkVirtualApplianceName, - connectionName, - networkVirtualApplianceConnectionParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - NetworkVirtualApplianceConnectionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA - * connection' - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param connectionName The name of the NVA connection. - * @param networkVirtualApplianceConnectionParameters Parameters supplied in an - * NetworkVirtualApplianceConnection PUT operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - connectionName: string, - networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, - options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - networkVirtualApplianceConnectionParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves the details of specified NVA connection. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param connectionName The name of the NVA connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkVirtualApplianceName: string, - connectionName: string, - options?: NetworkVirtualApplianceConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkVirtualApplianceName, - connectionName, - options, - }, - getOperationSpec, - ); - } - - /** - * Deletes a NVA connection. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param connectionName The name of the NVA connection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkVirtualApplianceName: string, - connectionName: string, - options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkVirtualApplianceName, - connectionName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a NVA connection. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param connectionName The name of the NVA connection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - connectionName: string, - options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkVirtualApplianceName, - connectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists NetworkVirtualApplianceConnections under the NVA. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualApplianceConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkVirtualApplianceName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkVirtualApplianceName: string, - nextLink: string, - options?: NetworkVirtualApplianceConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkVirtualApplianceName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections/{connectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceConnection, - }, - 201: { - bodyMapper: Mappers.NetworkVirtualApplianceConnection, - }, - 202: { - bodyMapper: Mappers.NetworkVirtualApplianceConnection, - }, - 204: { - bodyMapper: Mappers.NetworkVirtualApplianceConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.networkVirtualApplianceConnectionParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName1, - Parameters.connectionName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections/{connectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.networkVirtualApplianceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections/{connectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.networkVirtualApplianceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceConnectionList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceConnectionList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkVirtualApplianceName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkVirtualAppliances.ts b/sdk/network/arm-network/src/operations/networkVirtualAppliances.ts deleted file mode 100644 index 17121573b764..000000000000 --- a/sdk/network/arm-network/src/operations/networkVirtualAppliances.ts +++ /dev/null @@ -1,969 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { NetworkVirtualAppliances } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkVirtualAppliance, - NetworkVirtualAppliancesListByResourceGroupNextOptionalParams, - NetworkVirtualAppliancesListByResourceGroupOptionalParams, - NetworkVirtualAppliancesListByResourceGroupResponse, - NetworkVirtualAppliancesListNextOptionalParams, - NetworkVirtualAppliancesListOptionalParams, - NetworkVirtualAppliancesListResponse, - NetworkVirtualAppliancesDeleteOptionalParams, - NetworkVirtualAppliancesGetOptionalParams, - NetworkVirtualAppliancesGetResponse, - TagsObject, - NetworkVirtualAppliancesUpdateTagsOptionalParams, - NetworkVirtualAppliancesUpdateTagsResponse, - NetworkVirtualAppliancesCreateOrUpdateOptionalParams, - NetworkVirtualAppliancesCreateOrUpdateResponse, - NetworkVirtualAppliancesRestartOptionalParams, - NetworkVirtualAppliancesRestartResponse, - NetworkVirtualAppliancesReimageOptionalParams, - NetworkVirtualAppliancesReimageResponse, - NetworkVirtualApplianceBootDiagnosticParameters, - NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, - NetworkVirtualAppliancesGetBootDiagnosticLogsResponse, - NetworkVirtualAppliancesListByResourceGroupNextResponse, - NetworkVirtualAppliancesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkVirtualAppliances operations. */ -export class NetworkVirtualAppliancesImpl implements NetworkVirtualAppliances { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkVirtualAppliances class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all Network Virtual Appliances in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: NetworkVirtualAppliancesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: NetworkVirtualAppliancesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkVirtualAppliancesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: NetworkVirtualAppliancesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all Network Virtual Appliances in a subscription. - * @param options The options parameters. - */ - public list( - options?: NetworkVirtualAppliancesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: NetworkVirtualAppliancesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkVirtualAppliancesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: NetworkVirtualAppliancesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkVirtualApplianceName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, networkVirtualApplianceName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkVirtualApplianceName, options }, - getOperationSpec, - ); - } - - /** - * Updates a Network Virtual Appliance. - * @param resourceGroupName The resource group name of Network Virtual Appliance. - * @param networkVirtualApplianceName The name of Network Virtual Appliance being updated. - * @param parameters Parameters supplied to Update Network Virtual Appliance Tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkVirtualApplianceName: string, - parameters: TagsObject, - options?: NetworkVirtualAppliancesUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkVirtualApplianceName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Creates or updates the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - networkVirtualApplianceName: string, - parameters: NetworkVirtualAppliance, - options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkVirtualAppliancesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkVirtualApplianceName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - NetworkVirtualAppliancesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - parameters: NetworkVirtualAppliance, - options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - networkVirtualApplianceName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - async beginRestart( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesRestartOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkVirtualAppliancesRestartResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkVirtualApplianceName, options }, - spec: restartOperationSpec, - }); - const poller = await createHttpPoller< - NetworkVirtualAppliancesRestartResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - async beginRestartAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesRestartOptionalParams, - ): Promise { - const poller = await this.beginRestart(resourceGroupName, networkVirtualApplianceName, options); - return poller.pollUntilDone(); - } - - /** - * Reimages one VM belonging to the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - async beginReimage( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesReimageOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkVirtualAppliancesReimageResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkVirtualApplianceName, options }, - spec: reimageOperationSpec, - }); - const poller = await createHttpPoller< - NetworkVirtualAppliancesReimageResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Reimages one VM belonging to the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - async beginReimageAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesReimageOptionalParams, - ): Promise { - const poller = await this.beginReimage(resourceGroupName, networkVirtualApplianceName, options); - return poller.pollUntilDone(); - } - - /** - * Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual - * Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param request Parameters supplied to retrieve boot diagnostic logs for a NVA VM instance - * @param options The options parameters. - */ - async beginGetBootDiagnosticLogs( - resourceGroupName: string, - networkVirtualApplianceName: string, - request: NetworkVirtualApplianceBootDiagnosticParameters, - options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkVirtualAppliancesGetBootDiagnosticLogsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkVirtualApplianceName, - request, - options, - }, - spec: getBootDiagnosticLogsOperationSpec, - }); - const poller = await createHttpPoller< - NetworkVirtualAppliancesGetBootDiagnosticLogsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual - * Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param request Parameters supplied to retrieve boot diagnostic logs for a NVA VM instance - * @param options The options parameters. - */ - async beginGetBootDiagnosticLogsAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - request: NetworkVirtualApplianceBootDiagnosticParameters, - options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, - ): Promise { - const poller = await this.beginGetBootDiagnosticLogs( - resourceGroupName, - networkVirtualApplianceName, - request, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all Network Virtual Appliances in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: NetworkVirtualAppliancesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Gets all Network Virtual Appliances in a subscription. - * @param options The options parameters. - */ - private _list( - options?: NetworkVirtualAppliancesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: NetworkVirtualAppliancesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: NetworkVirtualAppliancesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualAppliance, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualAppliance, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualAppliance, - }, - 201: { - bodyMapper: Mappers.NetworkVirtualAppliance, - }, - 202: { - bodyMapper: Mappers.NetworkVirtualAppliance, - }, - 204: { - bodyMapper: Mappers.NetworkVirtualAppliance, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters54, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const restartOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/restart", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceIds, - }, - 201: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceIds, - }, - 202: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceIds, - }, - 204: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceIds, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.networkVirtualApplianceInstanceIds, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const reimageOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/reimage", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceIds, - }, - 201: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceIds, - }, - 202: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceIds, - }, - 204: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceIds, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.networkVirtualApplianceInstanceIds, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getBootDiagnosticLogsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/getBootDiagnosticLogs", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceId, - }, - 201: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceId, - }, - 202: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceId, - }, - 204: { - bodyMapper: Mappers.NetworkVirtualApplianceInstanceId, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.request1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/networkWatchers.ts b/sdk/network/arm-network/src/operations/networkWatchers.ts deleted file mode 100644 index e462e2a9c584..000000000000 --- a/sdk/network/arm-network/src/operations/networkWatchers.ts +++ /dev/null @@ -1,1891 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import type { NetworkWatchers } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - NetworkWatcher, - NetworkWatchersListOptionalParams, - NetworkWatchersListResponse, - NetworkWatchersListAllOptionalParams, - NetworkWatchersListAllResponse, - NetworkWatchersCreateOrUpdateOptionalParams, - NetworkWatchersCreateOrUpdateResponse, - NetworkWatchersGetOptionalParams, - NetworkWatchersGetResponse, - NetworkWatchersDeleteOptionalParams, - TagsObject, - NetworkWatchersUpdateTagsOptionalParams, - NetworkWatchersUpdateTagsResponse, - TopologyParameters, - NetworkWatchersGetTopologyOptionalParams, - NetworkWatchersGetTopologyResponse, - VerificationIPFlowParameters, - NetworkWatchersVerifyIPFlowOptionalParams, - NetworkWatchersVerifyIPFlowResponse, - NextHopParameters, - NetworkWatchersGetNextHopOptionalParams, - NetworkWatchersGetNextHopResponse, - SecurityGroupViewParameters, - NetworkWatchersGetVMSecurityRulesOptionalParams, - NetworkWatchersGetVMSecurityRulesResponse, - TroubleshootingParameters, - NetworkWatchersGetTroubleshootingOptionalParams, - NetworkWatchersGetTroubleshootingResponse, - QueryTroubleshootingParameters, - NetworkWatchersGetTroubleshootingResultOptionalParams, - NetworkWatchersGetTroubleshootingResultResponse, - FlowLogInformation, - NetworkWatchersSetFlowLogConfigurationOptionalParams, - NetworkWatchersSetFlowLogConfigurationResponse, - FlowLogStatusParameters, - NetworkWatchersGetFlowLogStatusOptionalParams, - NetworkWatchersGetFlowLogStatusResponse, - ConnectivityParameters, - NetworkWatchersCheckConnectivityOptionalParams, - NetworkWatchersCheckConnectivityResponse, - AzureReachabilityReportParameters, - NetworkWatchersGetAzureReachabilityReportOptionalParams, - NetworkWatchersGetAzureReachabilityReportResponse, - AvailableProvidersListParameters, - NetworkWatchersListAvailableProvidersOptionalParams, - NetworkWatchersListAvailableProvidersResponse, - NetworkConfigurationDiagnosticParameters, - NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, - NetworkWatchersGetNetworkConfigurationDiagnosticResponse, -} from "../models/index.js"; - -/// -/** Class containing NetworkWatchers operations. */ -export class NetworkWatchersImpl implements NetworkWatchers { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class NetworkWatchers class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all network watchers by resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: NetworkWatchersListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: NetworkWatchersListOptionalParams, - _settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkWatchersListResponse; - result = await this._list(resourceGroupName, options); - yield result.value || []; - } - - private async *listPagingAll( - resourceGroupName: string, - options?: NetworkWatchersListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all network watchers by subscription. - * @param options The options parameters. - */ - public listAll( - options?: NetworkWatchersListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: NetworkWatchersListAllOptionalParams, - _settings?: PageSettings, - ): AsyncIterableIterator { - let result: NetworkWatchersListAllResponse; - result = await this._listAll(options); - yield result.value || []; - } - - private async *listAllPagingAll( - options?: NetworkWatchersListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Creates or updates a network watcher in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the network watcher resource. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkWatcherName: string, - parameters: NetworkWatcher, - options?: NetworkWatchersCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkWatcherName, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Gets the specified network watcher by resource group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkWatcherName: string, - options?: NetworkWatchersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkWatcherName, options }, - getOperationSpec, - ); - } - - /** - * Deletes the specified network watcher resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkWatcherName: string, - options?: NetworkWatchersDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified network watcher resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkWatcherName: string, - options?: NetworkWatchersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, networkWatcherName, options); - return poller.pollUntilDone(); - } - - /** - * Updates a network watcher tags. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters supplied to update network watcher tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkWatcherName: string, - parameters: TagsObject, - options?: NetworkWatchersUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkWatcherName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all network watchers by resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: NetworkWatchersListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all network watchers by subscription. - * @param options The options parameters. - */ - private _listAll( - options?: NetworkWatchersListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets the current network topology by resource group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the representation of topology. - * @param options The options parameters. - */ - getTopology( - resourceGroupName: string, - networkWatcherName: string, - parameters: TopologyParameters, - options?: NetworkWatchersGetTopologyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkWatcherName, parameters, options }, - getTopologyOperationSpec, - ); - } - - /** - * Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the IP flow to be verified. - * @param options The options parameters. - */ - async beginVerifyIPFlow( - resourceGroupName: string, - networkWatcherName: string, - parameters: VerificationIPFlowParameters, - options?: NetworkWatchersVerifyIPFlowOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersVerifyIPFlowResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, parameters, options }, - spec: verifyIPFlowOperationSpec, - }); - const poller = await createHttpPoller< - NetworkWatchersVerifyIPFlowResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the IP flow to be verified. - * @param options The options parameters. - */ - async beginVerifyIPFlowAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: VerificationIPFlowParameters, - options?: NetworkWatchersVerifyIPFlowOptionalParams, - ): Promise { - const poller = await this.beginVerifyIPFlow( - resourceGroupName, - networkWatcherName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the next hop from the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the source and destination endpoint. - * @param options The options parameters. - */ - async beginGetNextHop( - resourceGroupName: string, - networkWatcherName: string, - parameters: NextHopParameters, - options?: NetworkWatchersGetNextHopOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetNextHopResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, parameters, options }, - spec: getNextHopOperationSpec, - }); - const poller = await createHttpPoller< - NetworkWatchersGetNextHopResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the next hop from the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the source and destination endpoint. - * @param options The options parameters. - */ - async beginGetNextHopAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: NextHopParameters, - options?: NetworkWatchersGetNextHopOptionalParams, - ): Promise { - const poller = await this.beginGetNextHop( - resourceGroupName, - networkWatcherName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the configured and effective security group rules on the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the VM to check security groups for. - * @param options The options parameters. - */ - async beginGetVMSecurityRules( - resourceGroupName: string, - networkWatcherName: string, - parameters: SecurityGroupViewParameters, - options?: NetworkWatchersGetVMSecurityRulesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetVMSecurityRulesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, parameters, options }, - spec: getVMSecurityRulesOperationSpec, - }); - const poller = await createHttpPoller< - NetworkWatchersGetVMSecurityRulesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the configured and effective security group rules on the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the VM to check security groups for. - * @param options The options parameters. - */ - async beginGetVMSecurityRulesAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: SecurityGroupViewParameters, - options?: NetworkWatchersGetVMSecurityRulesOptionalParams, - ): Promise { - const poller = await this.beginGetVMSecurityRules( - resourceGroupName, - networkWatcherName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Initiate troubleshooting on a specified resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the resource to troubleshoot. - * @param options The options parameters. - */ - async beginGetTroubleshooting( - resourceGroupName: string, - networkWatcherName: string, - parameters: TroubleshootingParameters, - options?: NetworkWatchersGetTroubleshootingOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetTroubleshootingResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, parameters, options }, - spec: getTroubleshootingOperationSpec, - }); - const poller = await createHttpPoller< - NetworkWatchersGetTroubleshootingResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Initiate troubleshooting on a specified resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the resource to troubleshoot. - * @param options The options parameters. - */ - async beginGetTroubleshootingAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: TroubleshootingParameters, - options?: NetworkWatchersGetTroubleshootingOptionalParams, - ): Promise { - const poller = await this.beginGetTroubleshooting( - resourceGroupName, - networkWatcherName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Get the last completed troubleshooting result on a specified resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the resource to query the troubleshooting result. - * @param options The options parameters. - */ - async beginGetTroubleshootingResult( - resourceGroupName: string, - networkWatcherName: string, - parameters: QueryTroubleshootingParameters, - options?: NetworkWatchersGetTroubleshootingResultOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetTroubleshootingResultResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, parameters, options }, - spec: getTroubleshootingResultOperationSpec, - }); - const poller = await createHttpPoller< - NetworkWatchersGetTroubleshootingResultResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Get the last completed troubleshooting result on a specified resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the resource to query the troubleshooting result. - * @param options The options parameters. - */ - async beginGetTroubleshootingResultAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: QueryTroubleshootingParameters, - options?: NetworkWatchersGetTroubleshootingResultOptionalParams, - ): Promise { - const poller = await this.beginGetTroubleshootingResult( - resourceGroupName, - networkWatcherName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Configures flow log and traffic analytics (optional) on a specified resource. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the configuration of flow log. - * @param options The options parameters. - */ - async beginSetFlowLogConfiguration( - resourceGroupName: string, - networkWatcherName: string, - parameters: FlowLogInformation, - options?: NetworkWatchersSetFlowLogConfigurationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersSetFlowLogConfigurationResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, parameters, options }, - spec: setFlowLogConfigurationOperationSpec, - }); - const poller = await createHttpPoller< - NetworkWatchersSetFlowLogConfigurationResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Configures flow log and traffic analytics (optional) on a specified resource. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the configuration of flow log. - * @param options The options parameters. - */ - async beginSetFlowLogConfigurationAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: FlowLogInformation, - options?: NetworkWatchersSetFlowLogConfigurationOptionalParams, - ): Promise { - const poller = await this.beginSetFlowLogConfiguration( - resourceGroupName, - networkWatcherName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Queries status of flow log and traffic analytics (optional) on a specified resource. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define a resource to query flow log and traffic analytics - * (optional) status. - * @param options The options parameters. - */ - async beginGetFlowLogStatus( - resourceGroupName: string, - networkWatcherName: string, - parameters: FlowLogStatusParameters, - options?: NetworkWatchersGetFlowLogStatusOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetFlowLogStatusResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, parameters, options }, - spec: getFlowLogStatusOperationSpec, - }); - const poller = await createHttpPoller< - NetworkWatchersGetFlowLogStatusResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Queries status of flow log and traffic analytics (optional) on a specified resource. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define a resource to query flow log and traffic analytics - * (optional) status. - * @param options The options parameters. - */ - async beginGetFlowLogStatusAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: FlowLogStatusParameters, - options?: NetworkWatchersGetFlowLogStatusOptionalParams, - ): Promise { - const poller = await this.beginGetFlowLogStatus( - resourceGroupName, - networkWatcherName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given - * endpoint including another VM or an arbitrary remote server. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that determine how the connectivity check will be performed. - * @param options The options parameters. - */ - async beginCheckConnectivity( - resourceGroupName: string, - networkWatcherName: string, - parameters: ConnectivityParameters, - options?: NetworkWatchersCheckConnectivityOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersCheckConnectivityResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, parameters, options }, - spec: checkConnectivityOperationSpec, - }); - const poller = await createHttpPoller< - NetworkWatchersCheckConnectivityResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given - * endpoint including another VM or an arbitrary remote server. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that determine how the connectivity check will be performed. - * @param options The options parameters. - */ - async beginCheckConnectivityAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: ConnectivityParameters, - options?: NetworkWatchersCheckConnectivityOptionalParams, - ): Promise { - const poller = await this.beginCheckConnectivity( - resourceGroupName, - networkWatcherName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * NOTE: This feature is currently in preview and still being tested for stability. Gets the relative - * latency score for internet service providers from a specified location to Azure regions. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that determine Azure reachability report configuration. - * @param options The options parameters. - */ - async beginGetAzureReachabilityReport( - resourceGroupName: string, - networkWatcherName: string, - parameters: AzureReachabilityReportParameters, - options?: NetworkWatchersGetAzureReachabilityReportOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetAzureReachabilityReportResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, parameters, options }, - spec: getAzureReachabilityReportOperationSpec, - }); - const poller = await createHttpPoller< - NetworkWatchersGetAzureReachabilityReportResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * NOTE: This feature is currently in preview and still being tested for stability. Gets the relative - * latency score for internet service providers from a specified location to Azure regions. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that determine Azure reachability report configuration. - * @param options The options parameters. - */ - async beginGetAzureReachabilityReportAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: AzureReachabilityReportParameters, - options?: NetworkWatchersGetAzureReachabilityReportOptionalParams, - ): Promise { - const poller = await this.beginGetAzureReachabilityReport( - resourceGroupName, - networkWatcherName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * NOTE: This feature is currently in preview and still being tested for stability. Lists all available - * internet service providers for a specified Azure region. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that scope the list of available providers. - * @param options The options parameters. - */ - async beginListAvailableProviders( - resourceGroupName: string, - networkWatcherName: string, - parameters: AvailableProvidersListParameters, - options?: NetworkWatchersListAvailableProvidersOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersListAvailableProvidersResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, parameters, options }, - spec: listAvailableProvidersOperationSpec, - }); - const poller = await createHttpPoller< - NetworkWatchersListAvailableProvidersResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * NOTE: This feature is currently in preview and still being tested for stability. Lists all available - * internet service providers for a specified Azure region. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that scope the list of available providers. - * @param options The options parameters. - */ - async beginListAvailableProvidersAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: AvailableProvidersListParameters, - options?: NetworkWatchersListAvailableProvidersOptionalParams, - ): Promise { - const poller = await this.beginListAvailableProviders( - resourceGroupName, - networkWatcherName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. - * It provides detailed information on what security rules were applied to a specified traffic flow and - * the result of evaluating these rules. Customers must provide details of a flow like source, - * destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules - * evaluated for the specified flow and the evaluation results. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters to get network configuration diagnostic. - * @param options The options parameters. - */ - async beginGetNetworkConfigurationDiagnostic( - resourceGroupName: string, - networkWatcherName: string, - parameters: NetworkConfigurationDiagnosticParameters, - options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetNetworkConfigurationDiagnosticResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkWatcherName, parameters, options }, - spec: getNetworkConfigurationDiagnosticOperationSpec, - }); - const poller = await createHttpPoller< - NetworkWatchersGetNetworkConfigurationDiagnosticResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. - * It provides detailed information on what security rules were applied to a specified traffic flow and - * the result of evaluating these rules. Customers must provide details of a flow like source, - * destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules - * evaluated for the specified flow and the evaluation results. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters to get network configuration diagnostic. - * @param options The options parameters. - */ - async beginGetNetworkConfigurationDiagnosticAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: NetworkConfigurationDiagnosticParameters, - options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, - ): Promise { - const poller = await this.beginGetNetworkConfigurationDiagnostic( - resourceGroupName, - networkWatcherName, - parameters, - options, - ); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkWatcher, - }, - 201: { - bodyMapper: Mappers.NetworkWatcher, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters57, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkWatcher, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NetworkWatcher, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkWatcherListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkWatcherListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getTopologyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.Topology, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters58, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const verifyIPFlowOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VerificationIPFlowResult, - }, - 201: { - bodyMapper: Mappers.VerificationIPFlowResult, - }, - 202: { - bodyMapper: Mappers.VerificationIPFlowResult, - }, - 204: { - bodyMapper: Mappers.VerificationIPFlowResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters59, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getNextHopOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NextHopResult, - }, - 201: { - bodyMapper: Mappers.NextHopResult, - }, - 202: { - bodyMapper: Mappers.NextHopResult, - }, - 204: { - bodyMapper: Mappers.NextHopResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters60, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getVMSecurityRulesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SecurityGroupViewResult, - }, - 201: { - bodyMapper: Mappers.SecurityGroupViewResult, - }, - 202: { - bodyMapper: Mappers.SecurityGroupViewResult, - }, - 204: { - bodyMapper: Mappers.SecurityGroupViewResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters61, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getTroubleshootingOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.TroubleshootingResult, - }, - 201: { - bodyMapper: Mappers.TroubleshootingResult, - }, - 202: { - bodyMapper: Mappers.TroubleshootingResult, - }, - 204: { - bodyMapper: Mappers.TroubleshootingResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters62, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getTroubleshootingResultOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.TroubleshootingResult, - }, - 201: { - bodyMapper: Mappers.TroubleshootingResult, - }, - 202: { - bodyMapper: Mappers.TroubleshootingResult, - }, - 204: { - bodyMapper: Mappers.TroubleshootingResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters63, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const setFlowLogConfigurationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.FlowLogInformation, - }, - 201: { - bodyMapper: Mappers.FlowLogInformation, - }, - 202: { - bodyMapper: Mappers.FlowLogInformation, - }, - 204: { - bodyMapper: Mappers.FlowLogInformation, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters64, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getFlowLogStatusOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.FlowLogInformation, - }, - 201: { - bodyMapper: Mappers.FlowLogInformation, - }, - 202: { - bodyMapper: Mappers.FlowLogInformation, - }, - 204: { - bodyMapper: Mappers.FlowLogInformation, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters65, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const checkConnectivityOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ConnectivityInformation, - }, - 201: { - bodyMapper: Mappers.ConnectivityInformation, - }, - 202: { - bodyMapper: Mappers.ConnectivityInformation, - }, - 204: { - bodyMapper: Mappers.ConnectivityInformation, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters66, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getAzureReachabilityReportOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AzureReachabilityReport, - }, - 201: { - bodyMapper: Mappers.AzureReachabilityReport, - }, - 202: { - bodyMapper: Mappers.AzureReachabilityReport, - }, - 204: { - bodyMapper: Mappers.AzureReachabilityReport, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters67, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAvailableProvidersOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AvailableProvidersList, - }, - 201: { - bodyMapper: Mappers.AvailableProvidersList, - }, - 202: { - bodyMapper: Mappers.AvailableProvidersList, - }, - 204: { - bodyMapper: Mappers.AvailableProvidersList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters68, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getNetworkConfigurationDiagnosticOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NetworkConfigurationDiagnosticResponse, - }, - 201: { - bodyMapper: Mappers.NetworkConfigurationDiagnosticResponse, - }, - 202: { - bodyMapper: Mappers.NetworkConfigurationDiagnosticResponse, - }, - 204: { - bodyMapper: Mappers.NetworkConfigurationDiagnosticResponse, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters69, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/operations.ts b/sdk/network/arm-network/src/operations/operations.ts deleted file mode 100644 index faa629ac4f17..000000000000 --- a/sdk/network/arm-network/src/operations/operations.ts +++ /dev/null @@ -1,140 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { Operations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - Operation, - OperationsListNextOptionalParams, - OperationsListOptionalParams, - OperationsListResponse, - OperationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all of the available Network Rest API operations. - * @param options The options parameters. - */ - public list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: OperationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: OperationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: OperationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Lists all of the available Network Rest API operations. - * @param options The options parameters. - */ - private _list(options?: OperationsListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: OperationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.Network/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/p2SVpnGateways.ts b/sdk/network/arm-network/src/operations/p2SVpnGateways.ts deleted file mode 100644 index b9df44c83539..000000000000 --- a/sdk/network/arm-network/src/operations/p2SVpnGateways.ts +++ /dev/null @@ -1,1293 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { P2SVpnGateways } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - P2SVpnGateway, - P2SVpnGatewaysListByResourceGroupNextOptionalParams, - P2SVpnGatewaysListByResourceGroupOptionalParams, - P2SVpnGatewaysListByResourceGroupResponse, - P2SVpnGatewaysListNextOptionalParams, - P2SVpnGatewaysListOptionalParams, - P2SVpnGatewaysListResponse, - P2SVpnGatewaysGetOptionalParams, - P2SVpnGatewaysGetResponse, - P2SVpnGatewaysCreateOrUpdateOptionalParams, - P2SVpnGatewaysCreateOrUpdateResponse, - TagsObject, - P2SVpnGatewaysUpdateTagsOptionalParams, - P2SVpnGatewaysUpdateTagsResponse, - P2SVpnGatewaysDeleteOptionalParams, - P2SVpnGatewaysResetOptionalParams, - P2SVpnGatewaysResetResponse, - P2SVpnProfileParameters, - P2SVpnGatewaysGenerateVpnProfileOptionalParams, - P2SVpnGatewaysGenerateVpnProfileResponse, - P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, - P2SVpnGatewaysGetP2SVpnConnectionHealthResponse, - P2SVpnConnectionHealthRequest, - P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, - P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedResponse, - P2SVpnConnectionRequest, - P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, - P2SVpnGatewaysListByResourceGroupNextResponse, - P2SVpnGatewaysListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing P2SVpnGateways operations. */ -export class P2SVpnGatewaysImpl implements P2SVpnGateways { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class P2SVpnGateways class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the P2SVpnGateways in a resource group. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: P2SVpnGatewaysListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: P2SVpnGatewaysListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: P2SVpnGatewaysListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: P2SVpnGatewaysListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Lists all the P2SVpnGateways in a subscription. - * @param options The options parameters. - */ - public list( - options?: P2SVpnGatewaysListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: P2SVpnGatewaysListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: P2SVpnGatewaysListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: P2SVpnGatewaysListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Retrieves the details of a virtual wan p2s vpn gateway. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, options }, - getOperationSpec, - ); - } - - /** - * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn - * gateway. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - p2SVpnGatewayParameters: P2SVpnGateway, - options?: P2SVpnGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - P2SVpnGatewaysCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - P2SVpnGatewaysCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn - * gateway. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - p2SVpnGatewayParameters: P2SVpnGateway, - options?: P2SVpnGatewaysCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates virtual wan p2s vpn gateway tags. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param p2SVpnGatewayParameters Parameters supplied to update a virtual wan p2s vpn gateway tags. - * @param options The options parameters. - */ - async beginUpdateTags( - resourceGroupName: string, - gatewayName: string, - p2SVpnGatewayParameters: TagsObject, - options?: P2SVpnGatewaysUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - P2SVpnGatewaysUpdateTagsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - options, - }, - spec: updateTagsOperationSpec, - }); - const poller = await createHttpPoller< - P2SVpnGatewaysUpdateTagsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates virtual wan p2s vpn gateway tags. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param p2SVpnGatewayParameters Parameters supplied to update a virtual wan p2s vpn gateway tags. - * @param options The options parameters. - */ - async beginUpdateTagsAndWait( - resourceGroupName: string, - gatewayName: string, - p2SVpnGatewayParameters: TagsObject, - options?: P2SVpnGatewaysUpdateTagsOptionalParams, - ): Promise { - const poller = await this.beginUpdateTags( - resourceGroupName, - gatewayName, - p2SVpnGatewayParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a virtual wan p2s vpn gateway. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a virtual wan p2s vpn gateway. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, gatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Lists all the P2SVpnGateways in a resource group. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: P2SVpnGatewaysListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Lists all the P2SVpnGateways in a subscription. - * @param options The options parameters. - */ - private _list(options?: P2SVpnGatewaysListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Resets the primary of the p2s vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginReset( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysResetOptionalParams, - ): Promise< - SimplePollerLike, P2SVpnGatewaysResetResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, options }, - spec: resetOperationSpec, - }); - const poller = await createHttpPoller< - P2SVpnGatewaysResetResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Resets the primary of the p2s vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginResetAndWait( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysResetOptionalParams, - ): Promise { - const poller = await this.beginReset(resourceGroupName, gatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param parameters Parameters supplied to the generate P2SVpnGateway VPN client package operation. - * @param options The options parameters. - */ - async beginGenerateVpnProfile( - resourceGroupName: string, - gatewayName: string, - parameters: P2SVpnProfileParameters, - options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - P2SVpnGatewaysGenerateVpnProfileResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, parameters, options }, - spec: generateVpnProfileOperationSpec, - }); - const poller = await createHttpPoller< - P2SVpnGatewaysGenerateVpnProfileResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param parameters Parameters supplied to the generate P2SVpnGateway VPN client package operation. - * @param options The options parameters. - */ - async beginGenerateVpnProfileAndWait( - resourceGroupName: string, - gatewayName: string, - parameters: P2SVpnProfileParameters, - options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams, - ): Promise { - const poller = await this.beginGenerateVpnProfile( - resourceGroupName, - gatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param options The options parameters. - */ - async beginGetP2SVpnConnectionHealth( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - P2SVpnGatewaysGetP2SVpnConnectionHealthResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, options }, - spec: getP2SVpnConnectionHealthOperationSpec, - }); - const poller = await createHttpPoller< - P2SVpnGatewaysGetP2SVpnConnectionHealthResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param options The options parameters. - */ - async beginGetP2SVpnConnectionHealthAndWait( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, - ): Promise { - const poller = await this.beginGetP2SVpnConnectionHealth( - resourceGroupName, - gatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway - * in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param request Request parameters supplied to get p2s vpn connections detailed health. - * @param options The options parameters. - */ - async beginGetP2SVpnConnectionHealthDetailed( - resourceGroupName: string, - gatewayName: string, - request: P2SVpnConnectionHealthRequest, - options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, request, options }, - spec: getP2SVpnConnectionHealthDetailedOperationSpec, - }); - const poller = await createHttpPoller< - P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway - * in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param request Request parameters supplied to get p2s vpn connections detailed health. - * @param options The options parameters. - */ - async beginGetP2SVpnConnectionHealthDetailedAndWait( - resourceGroupName: string, - gatewayName: string, - request: P2SVpnConnectionHealthRequest, - options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, - ): Promise { - const poller = await this.beginGetP2SVpnConnectionHealthDetailed( - resourceGroupName, - gatewayName, - request, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param p2SVpnGatewayName The name of the P2S Vpn Gateway. - * @param request The parameters are supplied to disconnect p2s vpn connections. - * @param options The options parameters. - */ - async beginDisconnectP2SVpnConnections( - resourceGroupName: string, - p2SVpnGatewayName: string, - request: P2SVpnConnectionRequest, - options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, p2SVpnGatewayName, request, options }, - spec: disconnectP2SVpnConnectionsOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param p2SVpnGatewayName The name of the P2S Vpn Gateway. - * @param request The parameters are supplied to disconnect p2s vpn connections. - * @param options The options parameters. - */ - async beginDisconnectP2SVpnConnectionsAndWait( - resourceGroupName: string, - p2SVpnGatewayName: string, - request: P2SVpnConnectionRequest, - options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, - ): Promise { - const poller = await this.beginDisconnectP2SVpnConnections( - resourceGroupName, - p2SVpnGatewayName, - request, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: P2SVpnGatewaysListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: P2SVpnGatewaysListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.P2SVpnGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 201: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 202: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 204: { - bodyMapper: Mappers.P2SVpnGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.p2SVpnGatewayParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 201: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 202: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 204: { - bodyMapper: Mappers.P2SVpnGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.p2SVpnGatewayParameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListP2SVpnGatewaysResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListP2SVpnGatewaysResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const resetOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 201: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 202: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 204: { - bodyMapper: Mappers.P2SVpnGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const generateVpnProfileOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VpnProfileResponse, - }, - 201: { - bodyMapper: Mappers.VpnProfileResponse, - }, - 202: { - bodyMapper: Mappers.VpnProfileResponse, - }, - 204: { - bodyMapper: Mappers.VpnProfileResponse, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters103, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getP2SVpnConnectionHealthOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 201: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 202: { - bodyMapper: Mappers.P2SVpnGateway, - }, - 204: { - bodyMapper: Mappers.P2SVpnGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getP2SVpnConnectionHealthDetailedOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.P2SVpnConnectionHealth, - }, - 201: { - bodyMapper: Mappers.P2SVpnConnectionHealth, - }, - 202: { - bodyMapper: Mappers.P2SVpnConnectionHealth, - }, - 204: { - bodyMapper: Mappers.P2SVpnConnectionHealth, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.request4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const disconnectP2SVpnConnectionsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.request2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.p2SVpnGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListP2SVpnGatewaysResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListP2SVpnGatewaysResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/packetCaptures.ts b/sdk/network/arm-network/src/operations/packetCaptures.ts deleted file mode 100644 index fb2bf71301b0..000000000000 --- a/sdk/network/arm-network/src/operations/packetCaptures.ts +++ /dev/null @@ -1,667 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import type { PacketCaptures } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - PacketCaptureResult, - PacketCapturesListOptionalParams, - PacketCapturesListResponse, - PacketCapture, - PacketCapturesCreateOptionalParams, - PacketCapturesCreateResponse, - PacketCapturesGetOptionalParams, - PacketCapturesGetResponse, - PacketCapturesDeleteOptionalParams, - PacketCapturesStopOptionalParams, - PacketCapturesGetStatusOptionalParams, - PacketCapturesGetStatusResponse, -} from "../models/index.js"; - -/// -/** Class containing PacketCaptures operations. */ -export class PacketCapturesImpl implements PacketCaptures { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class PacketCaptures class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all packet capture sessions within the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the Network Watcher resource. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkWatcherName: string, - options?: PacketCapturesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkWatcherName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkWatcherName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkWatcherName: string, - options?: PacketCapturesListOptionalParams, - _settings?: PageSettings, - ): AsyncIterableIterator { - let result: PacketCapturesListResponse; - result = await this._list(resourceGroupName, networkWatcherName, options); - yield result.value || []; - } - - private async *listPagingAll( - resourceGroupName: string, - networkWatcherName: string, - options?: PacketCapturesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, networkWatcherName, options)) { - yield* page; - } - } - - /** - * Create and start a packet capture on the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param parameters Parameters that define the create packet capture operation. - * @param options The options parameters. - */ - async beginCreate( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - parameters: PacketCapture, - options?: PacketCapturesCreateOptionalParams, - ): Promise< - SimplePollerLike, PacketCapturesCreateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkWatcherName, - packetCaptureName, - parameters, - options, - }, - spec: createOperationSpec, - }); - const poller = await createHttpPoller< - PacketCapturesCreateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create and start a packet capture on the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param parameters Parameters that define the create packet capture operation. - * @param options The options parameters. - */ - async beginCreateAndWait( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - parameters: PacketCapture, - options?: PacketCapturesCreateOptionalParams, - ): Promise { - const poller = await this.beginCreate( - resourceGroupName, - networkWatcherName, - packetCaptureName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets a packet capture session by name. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkWatcherName, packetCaptureName, options }, - getOperationSpec, - ); - } - - /** - * Deletes the specified packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkWatcherName, - packetCaptureName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkWatcherName, - packetCaptureName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Stops a specified packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param options The options parameters. - */ - async beginStop( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesStopOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkWatcherName, - packetCaptureName, - options, - }, - spec: stopOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Stops a specified packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param options The options parameters. - */ - async beginStopAndWait( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesStopOptionalParams, - ): Promise { - const poller = await this.beginStop( - resourceGroupName, - networkWatcherName, - packetCaptureName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Query the status of a running packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the Network Watcher resource. - * @param packetCaptureName The name given to the packet capture session. - * @param options The options parameters. - */ - async beginGetStatus( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesGetStatusOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PacketCapturesGetStatusResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkWatcherName, - packetCaptureName, - options, - }, - spec: getStatusOperationSpec, - }); - const poller = await createHttpPoller< - PacketCapturesGetStatusResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Query the status of a running packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the Network Watcher resource. - * @param packetCaptureName The name given to the packet capture session. - * @param options The options parameters. - */ - async beginGetStatusAndWait( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesGetStatusOptionalParams, - ): Promise { - const poller = await this.beginGetStatus( - resourceGroupName, - networkWatcherName, - packetCaptureName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all packet capture sessions within the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the Network Watcher resource. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkWatcherName: string, - options?: PacketCapturesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkWatcherName, options }, - listOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PacketCaptureResult, - }, - 201: { - bodyMapper: Mappers.PacketCaptureResult, - }, - 202: { - bodyMapper: Mappers.PacketCaptureResult, - }, - 204: { - bodyMapper: Mappers.PacketCaptureResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters70, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.packetCaptureName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PacketCaptureResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.packetCaptureName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.packetCaptureName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const stopOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.packetCaptureName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getStatusOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PacketCaptureQueryStatusResult, - }, - 201: { - bodyMapper: Mappers.PacketCaptureQueryStatusResult, - }, - 202: { - bodyMapper: Mappers.PacketCaptureQueryStatusResult, - }, - 204: { - bodyMapper: Mappers.PacketCaptureQueryStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - Parameters.packetCaptureName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PacketCaptureListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkWatcherName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/peerExpressRouteCircuitConnections.ts b/sdk/network/arm-network/src/operations/peerExpressRouteCircuitConnections.ts deleted file mode 100644 index 08ae828bb5d6..000000000000 --- a/sdk/network/arm-network/src/operations/peerExpressRouteCircuitConnections.ts +++ /dev/null @@ -1,246 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { PeerExpressRouteCircuitConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - PeerExpressRouteCircuitConnection, - PeerExpressRouteCircuitConnectionsListNextOptionalParams, - PeerExpressRouteCircuitConnectionsListOptionalParams, - PeerExpressRouteCircuitConnectionsListResponse, - PeerExpressRouteCircuitConnectionsGetOptionalParams, - PeerExpressRouteCircuitConnectionsGetResponse, - PeerExpressRouteCircuitConnectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing PeerExpressRouteCircuitConnections operations. */ -export class PeerExpressRouteCircuitConnectionsImpl implements PeerExpressRouteCircuitConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class PeerExpressRouteCircuitConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all global reach peer connections associated with a private peering in an express route - * circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: PeerExpressRouteCircuitConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, circuitName, peeringName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, circuitName, peeringName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: PeerExpressRouteCircuitConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PeerExpressRouteCircuitConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, circuitName, peeringName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - circuitName, - peeringName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: PeerExpressRouteCircuitConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - circuitName, - peeringName, - options, - )) { - yield* page; - } - } - - /** - * Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the peer express route circuit connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - options?: PeerExpressRouteCircuitConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, peeringName, connectionName, options }, - getOperationSpec, - ); - } - - /** - * Gets all global reach peer connections associated with a private peering in an express route - * circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: PeerExpressRouteCircuitConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, peeringName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param peeringName The name of the peering. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - circuitName: string, - peeringName: string, - nextLink: string, - options?: PeerExpressRouteCircuitConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, circuitName, peeringName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PeerExpressRouteCircuitConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PeerExpressRouteCircuitConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PeerExpressRouteCircuitConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.circuitName, - Parameters.peeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/privateDnsZoneGroups.ts b/sdk/network/arm-network/src/operations/privateDnsZoneGroups.ts deleted file mode 100644 index d2a206a5246b..000000000000 --- a/sdk/network/arm-network/src/operations/privateDnsZoneGroups.ts +++ /dev/null @@ -1,488 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { PrivateDnsZoneGroups } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - PrivateDnsZoneGroup, - PrivateDnsZoneGroupsListNextOptionalParams, - PrivateDnsZoneGroupsListOptionalParams, - PrivateDnsZoneGroupsListResponse, - PrivateDnsZoneGroupsDeleteOptionalParams, - PrivateDnsZoneGroupsGetOptionalParams, - PrivateDnsZoneGroupsGetResponse, - PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, - PrivateDnsZoneGroupsCreateOrUpdateResponse, - PrivateDnsZoneGroupsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing PrivateDnsZoneGroups operations. */ -export class PrivateDnsZoneGroupsImpl implements PrivateDnsZoneGroups { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class PrivateDnsZoneGroups class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all private dns zone groups in a private endpoint. - * @param privateEndpointName The name of the private endpoint. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - privateEndpointName: string, - resourceGroupName: string, - options?: PrivateDnsZoneGroupsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(privateEndpointName, resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(privateEndpointName, resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - privateEndpointName: string, - resourceGroupName: string, - options?: PrivateDnsZoneGroupsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PrivateDnsZoneGroupsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(privateEndpointName, resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - privateEndpointName, - resourceGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - privateEndpointName: string, - resourceGroupName: string, - options?: PrivateDnsZoneGroupsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(privateEndpointName, resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified private dns zone group. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param privateDnsZoneGroupName The name of the private dns zone group. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateEndpointName: string, - privateDnsZoneGroupName: string, - options?: PrivateDnsZoneGroupsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified private dns zone group. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param privateDnsZoneGroupName The name of the private dns zone group. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateEndpointName: string, - privateDnsZoneGroupName: string, - options?: PrivateDnsZoneGroupsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the private dns zone group resource by specified private dns zone group name. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param privateDnsZoneGroupName The name of the private dns zone group. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateEndpointName: string, - privateDnsZoneGroupName: string, - options?: PrivateDnsZoneGroupsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates a private dns zone group in the specified private endpoint. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param privateDnsZoneGroupName The name of the private dns zone group. - * @param parameters Parameters supplied to the create or update private dns zone group operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateEndpointName: string, - privateDnsZoneGroupName: string, - parameters: PrivateDnsZoneGroup, - options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateDnsZoneGroupsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - PrivateDnsZoneGroupsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a private dns zone group in the specified private endpoint. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param privateDnsZoneGroupName The name of the private dns zone group. - * @param parameters Parameters supplied to the create or update private dns zone group operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateEndpointName: string, - privateDnsZoneGroupName: string, - parameters: PrivateDnsZoneGroup, - options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateEndpointName, - privateDnsZoneGroupName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all private dns zone groups in a private endpoint. - * @param privateEndpointName The name of the private endpoint. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - privateEndpointName: string, - resourceGroupName: string, - options?: PrivateDnsZoneGroupsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { privateEndpointName, resourceGroupName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param privateEndpointName The name of the private endpoint. - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - privateEndpointName: string, - resourceGroupName: string, - nextLink: string, - options?: PrivateDnsZoneGroupsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { privateEndpointName, resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.privateEndpointName, - Parameters.privateDnsZoneGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateDnsZoneGroup, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.privateEndpointName, - Parameters.privateDnsZoneGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PrivateDnsZoneGroup, - }, - 201: { - bodyMapper: Mappers.PrivateDnsZoneGroup, - }, - 202: { - bodyMapper: Mappers.PrivateDnsZoneGroup, - }, - 204: { - bodyMapper: Mappers.PrivateDnsZoneGroup, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters74, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.privateEndpointName, - Parameters.privateDnsZoneGroupName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateDnsZoneGroupListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.privateEndpointName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateDnsZoneGroupListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.privateEndpointName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/privateEndpoints.ts b/sdk/network/arm-network/src/operations/privateEndpoints.ts deleted file mode 100644 index 0e334342bc5a..000000000000 --- a/sdk/network/arm-network/src/operations/privateEndpoints.ts +++ /dev/null @@ -1,545 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { PrivateEndpoints } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - PrivateEndpoint, - PrivateEndpointsListNextOptionalParams, - PrivateEndpointsListOptionalParams, - PrivateEndpointsListResponse, - PrivateEndpointsListBySubscriptionNextOptionalParams, - PrivateEndpointsListBySubscriptionOptionalParams, - PrivateEndpointsListBySubscriptionResponse, - PrivateEndpointsDeleteOptionalParams, - PrivateEndpointsGetOptionalParams, - PrivateEndpointsGetResponse, - PrivateEndpointsCreateOrUpdateOptionalParams, - PrivateEndpointsCreateOrUpdateResponse, - PrivateEndpointsListNextResponse, - PrivateEndpointsListBySubscriptionNextResponse, -} from "../models/index.js"; - -/// -/** Class containing PrivateEndpoints operations. */ -export class PrivateEndpointsImpl implements PrivateEndpoints { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class PrivateEndpoints class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all private endpoints in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: PrivateEndpointsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: PrivateEndpointsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PrivateEndpointsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: PrivateEndpointsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all private endpoints in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: PrivateEndpointsListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: PrivateEndpointsListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PrivateEndpointsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: PrivateEndpointsListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the specified private endpoint. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateEndpointName: string, - options?: PrivateEndpointsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, privateEndpointName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified private endpoint. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateEndpointName: string, - options?: PrivateEndpointsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, privateEndpointName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified private endpoint by resource group. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateEndpointName: string, - options?: PrivateEndpointsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateEndpointName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates an private endpoint in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateEndpointName: string, - parameters: PrivateEndpoint, - options?: PrivateEndpointsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateEndpointsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, privateEndpointName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - PrivateEndpointsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates an private endpoint in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateEndpointName: string, - parameters: PrivateEndpoint, - options?: PrivateEndpointsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateEndpointName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all private endpoints in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: PrivateEndpointsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all private endpoints in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: PrivateEndpointsListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: PrivateEndpointsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: PrivateEndpointsListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.privateEndpointName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpoint, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.privateEndpointName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpoint, - }, - 201: { - bodyMapper: Mappers.PrivateEndpoint, - }, - 202: { - bodyMapper: Mappers.PrivateEndpoint, - }, - 204: { - bodyMapper: Mappers.PrivateEndpoint, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters73, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.privateEndpointName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/privateLinkServices.ts b/sdk/network/arm-network/src/operations/privateLinkServices.ts deleted file mode 100644 index e7d1c40bdb33..000000000000 --- a/sdk/network/arm-network/src/operations/privateLinkServices.ts +++ /dev/null @@ -1,1464 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { PrivateLinkServices } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - PrivateLinkService, - PrivateLinkServicesListNextOptionalParams, - PrivateLinkServicesListOptionalParams, - PrivateLinkServicesListResponse, - PrivateLinkServicesListBySubscriptionNextOptionalParams, - PrivateLinkServicesListBySubscriptionOptionalParams, - PrivateLinkServicesListBySubscriptionResponse, - PrivateEndpointConnection, - PrivateLinkServicesListPrivateEndpointConnectionsNextOptionalParams, - PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, - PrivateLinkServicesListPrivateEndpointConnectionsResponse, - AutoApprovedPrivateLinkService, - PrivateLinkServicesListAutoApprovedPrivateLinkServicesNextOptionalParams, - PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, - PrivateLinkServicesListAutoApprovedPrivateLinkServicesResponse, - PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupNextOptionalParams, - PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, - PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupResponse, - PrivateLinkServicesDeleteOptionalParams, - PrivateLinkServicesGetOptionalParams, - PrivateLinkServicesGetResponse, - PrivateLinkServicesCreateOrUpdateOptionalParams, - PrivateLinkServicesCreateOrUpdateResponse, - PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams, - PrivateLinkServicesGetPrivateEndpointConnectionResponse, - PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams, - PrivateLinkServicesUpdatePrivateEndpointConnectionResponse, - PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, - CheckPrivateLinkServiceVisibilityRequest, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityResponse, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupResponse, - PrivateLinkServicesListNextResponse, - PrivateLinkServicesListBySubscriptionNextResponse, - PrivateLinkServicesListPrivateEndpointConnectionsNextResponse, - PrivateLinkServicesListAutoApprovedPrivateLinkServicesNextResponse, - PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing PrivateLinkServices operations. */ -export class PrivateLinkServicesImpl implements PrivateLinkServices { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class PrivateLinkServices class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all private link services in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: PrivateLinkServicesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: PrivateLinkServicesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PrivateLinkServicesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: PrivateLinkServicesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all private link service in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: PrivateLinkServicesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: PrivateLinkServicesListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PrivateLinkServicesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: PrivateLinkServicesListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all private end point connections for a specific private link service. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param options The options parameters. - */ - public listPrivateEndpointConnections( - resourceGroupName: string, - serviceName: string, - options?: PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPrivateEndpointConnectionsPagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPrivateEndpointConnectionsPagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listPrivateEndpointConnectionsPagingPage( - resourceGroupName: string, - serviceName: string, - options?: PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PrivateLinkServicesListPrivateEndpointConnectionsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listPrivateEndpointConnections(resourceGroupName, serviceName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listPrivateEndpointConnectionsNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPrivateEndpointConnectionsPagingAll( - resourceGroupName: string, - serviceName: string, - options?: PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPrivateEndpointConnectionsPagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Returns all of the private link service ids that can be linked to a Private Endpoint with auto - * approved in this subscription in this region. - * @param location The location of the domain name. - * @param options The options parameters. - */ - public listAutoApprovedPrivateLinkServices( - location: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAutoApprovedPrivateLinkServicesPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAutoApprovedPrivateLinkServicesPagingPage(location, options, settings); - }, - }; - } - - private async *listAutoApprovedPrivateLinkServicesPagingPage( - location: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PrivateLinkServicesListAutoApprovedPrivateLinkServicesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAutoApprovedPrivateLinkServices(location, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAutoApprovedPrivateLinkServicesNext( - location, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAutoApprovedPrivateLinkServicesPagingAll( - location: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAutoApprovedPrivateLinkServicesPagingPage( - location, - options, - )) { - yield* page; - } - } - - /** - * Returns all of the private link service ids that can be linked to a Private Endpoint with auto - * approved in this subscription in this region. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listAutoApprovedPrivateLinkServicesByResourceGroup( - location: string, - resourceGroupName: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAutoApprovedPrivateLinkServicesByResourceGroupPagingAll( - location, - resourceGroupName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAutoApprovedPrivateLinkServicesByResourceGroupPagingPage( - location, - resourceGroupName, - options, - settings, - ); - }, - }; - } - - private async *listAutoApprovedPrivateLinkServicesByResourceGroupPagingPage( - location: string, - resourceGroupName: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAutoApprovedPrivateLinkServicesByResourceGroup( - location, - resourceGroupName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAutoApprovedPrivateLinkServicesByResourceGroupNext( - location, - resourceGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAutoApprovedPrivateLinkServicesByResourceGroupPagingAll( - location: string, - resourceGroupName: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAutoApprovedPrivateLinkServicesByResourceGroupPagingPage( - location, - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * Deletes the specified private link service. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceName: string, - options?: PrivateLinkServicesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified private link service. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - options?: PrivateLinkServicesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, serviceName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified private link service by resource group. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: PrivateLinkServicesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates an private link service in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PrivateLinkService, - options?: PrivateLinkServicesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateLinkServicesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - PrivateLinkServicesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates an private link service in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: PrivateLinkService, - options?: PrivateLinkServicesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all private link services in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: PrivateLinkServicesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all private link service in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: PrivateLinkServicesListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get the specific private end point connection by specific private link service in the resource - * group. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param peConnectionName The name of the private end point connection. - * @param options The options parameters. - */ - getPrivateEndpointConnection( - resourceGroupName: string, - serviceName: string, - peConnectionName: string, - options?: PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, peConnectionName, options }, - getPrivateEndpointConnectionOperationSpec, - ); - } - - /** - * Approve or reject private end point connection for a private link service in a subscription. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param peConnectionName The name of the private end point connection. - * @param parameters Parameters supplied to approve or reject the private end point connection. - * @param options The options parameters. - */ - updatePrivateEndpointConnection( - resourceGroupName: string, - serviceName: string, - peConnectionName: string, - parameters: PrivateEndpointConnection, - options?: PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, peConnectionName, parameters, options }, - updatePrivateEndpointConnectionOperationSpec, - ); - } - - /** - * Delete private end point connection for a private link service in a subscription. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param peConnectionName The name of the private end point connection. - * @param options The options parameters. - */ - async beginDeletePrivateEndpointConnection( - resourceGroupName: string, - serviceName: string, - peConnectionName: string, - options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, peConnectionName, options }, - spec: deletePrivateEndpointConnectionOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete private end point connection for a private link service in a subscription. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param peConnectionName The name of the private end point connection. - * @param options The options parameters. - */ - async beginDeletePrivateEndpointConnectionAndWait( - resourceGroupName: string, - serviceName: string, - peConnectionName: string, - options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, - ): Promise { - const poller = await this.beginDeletePrivateEndpointConnection( - resourceGroupName, - serviceName, - peConnectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all private end point connections for a specific private link service. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param options The options parameters. - */ - private _listPrivateEndpointConnections( - resourceGroupName: string, - serviceName: string, - options?: PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listPrivateEndpointConnectionsOperationSpec, - ); - } - - /** - * Checks whether the subscription is visible to private link service. - * @param location The location of the domain name. - * @param parameters The request body of CheckPrivateLinkService API call. - * @param options The options parameters. - */ - async beginCheckPrivateLinkServiceVisibility( - location: string, - parameters: CheckPrivateLinkServiceVisibilityRequest, - options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { location, parameters, options }, - spec: checkPrivateLinkServiceVisibilityOperationSpec, - }); - const poller = await createHttpPoller< - PrivateLinkServicesCheckPrivateLinkServiceVisibilityResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Checks whether the subscription is visible to private link service. - * @param location The location of the domain name. - * @param parameters The request body of CheckPrivateLinkService API call. - * @param options The options parameters. - */ - async beginCheckPrivateLinkServiceVisibilityAndWait( - location: string, - parameters: CheckPrivateLinkServiceVisibilityRequest, - options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, - ): Promise { - const poller = await this.beginCheckPrivateLinkServiceVisibility(location, parameters, options); - return poller.pollUntilDone(); - } - - /** - * Checks whether the subscription is visible to private link service in the specified resource group. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param parameters The request body of CheckPrivateLinkService API call. - * @param options The options parameters. - */ - async beginCheckPrivateLinkServiceVisibilityByResourceGroup( - location: string, - resourceGroupName: string, - parameters: CheckPrivateLinkServiceVisibilityRequest, - options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { location, resourceGroupName, parameters, options }, - spec: checkPrivateLinkServiceVisibilityByResourceGroupOperationSpec, - }); - const poller = await createHttpPoller< - PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Checks whether the subscription is visible to private link service in the specified resource group. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param parameters The request body of CheckPrivateLinkService API call. - * @param options The options parameters. - */ - async beginCheckPrivateLinkServiceVisibilityByResourceGroupAndWait( - location: string, - resourceGroupName: string, - parameters: CheckPrivateLinkServiceVisibilityRequest, - options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, - ): Promise { - const poller = await this.beginCheckPrivateLinkServiceVisibilityByResourceGroup( - location, - resourceGroupName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Returns all of the private link service ids that can be linked to a Private Endpoint with auto - * approved in this subscription in this region. - * @param location The location of the domain name. - * @param options The options parameters. - */ - private _listAutoApprovedPrivateLinkServices( - location: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, options }, - listAutoApprovedPrivateLinkServicesOperationSpec, - ); - } - - /** - * Returns all of the private link service ids that can be linked to a Private Endpoint with auto - * approved in this subscription in this region. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listAutoApprovedPrivateLinkServicesByResourceGroup( - location: string, - resourceGroupName: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, resourceGroupName, options }, - listAutoApprovedPrivateLinkServicesByResourceGroupOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: PrivateLinkServicesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: PrivateLinkServicesListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListPrivateEndpointConnectionsNext - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param nextLink The nextLink from the previous successful call to the ListPrivateEndpointConnections - * method. - * @param options The options parameters. - */ - private _listPrivateEndpointConnectionsNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: PrivateLinkServicesListPrivateEndpointConnectionsNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listPrivateEndpointConnectionsNextOperationSpec, - ); - } - - /** - * ListAutoApprovedPrivateLinkServicesNext - * @param location The location of the domain name. - * @param nextLink The nextLink from the previous successful call to the - * ListAutoApprovedPrivateLinkServices method. - * @param options The options parameters. - */ - private _listAutoApprovedPrivateLinkServicesNext( - location: string, - nextLink: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, nextLink, options }, - listAutoApprovedPrivateLinkServicesNextOperationSpec, - ); - } - - /** - * ListAutoApprovedPrivateLinkServicesByResourceGroupNext - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the - * ListAutoApprovedPrivateLinkServicesByResourceGroup method. - * @param options The options parameters. - */ - private _listAutoApprovedPrivateLinkServicesByResourceGroupNext( - location: string, - resourceGroupName: string, - nextLink: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, resourceGroupName, nextLink, options }, - listAutoApprovedPrivateLinkServicesByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkService, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkService, - }, - 201: { - bodyMapper: Mappers.PrivateLinkService, - }, - 202: { - bodyMapper: Mappers.PrivateLinkService, - }, - 204: { - bodyMapper: Mappers.PrivateLinkService, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters75, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkServiceListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkServiceListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getPrivateEndpointConnectionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.peConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updatePrivateEndpointConnectionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters76, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.peConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deletePrivateEndpointConnectionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.peConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listPrivateEndpointConnectionsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const checkPrivateLinkServiceVisibilityOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkServiceVisibility, - }, - 201: { - bodyMapper: Mappers.PrivateLinkServiceVisibility, - }, - 202: { - bodyMapper: Mappers.PrivateLinkServiceVisibility, - }, - 204: { - bodyMapper: Mappers.PrivateLinkServiceVisibility, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters77, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const checkPrivateLinkServiceVisibilityByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkServiceVisibility, - }, - 201: { - bodyMapper: Mappers.PrivateLinkServiceVisibility, - }, - 202: { - bodyMapper: Mappers.PrivateLinkServiceVisibility, - }, - 204: { - bodyMapper: Mappers.PrivateLinkServiceVisibility, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters77, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAutoApprovedPrivateLinkServicesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AutoApprovedPrivateLinkServicesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; -const listAutoApprovedPrivateLinkServicesByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AutoApprovedPrivateLinkServicesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkServiceListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkServiceListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listPrivateEndpointConnectionsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAutoApprovedPrivateLinkServicesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AutoApprovedPrivateLinkServicesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAutoApprovedPrivateLinkServicesByResourceGroupNextOperationSpec: coreClient.OperationSpec = - { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AutoApprovedPrivateLinkServicesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, - }; diff --git a/sdk/network/arm-network/src/operations/publicIPAddresses.ts b/sdk/network/arm-network/src/operations/publicIPAddresses.ts deleted file mode 100644 index c5488b8e9b8d..000000000000 --- a/sdk/network/arm-network/src/operations/publicIPAddresses.ts +++ /dev/null @@ -1,1886 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { PublicIPAddresses } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - PublicIPAddress, - PublicIPAddressesListCloudServicePublicIPAddressesNextOptionalParams, - PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, - PublicIPAddressesListCloudServicePublicIPAddressesResponse, - PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesNextOptionalParams, - PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, - PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesResponse, - PublicIPAddressesListAllNextOptionalParams, - PublicIPAddressesListAllOptionalParams, - PublicIPAddressesListAllResponse, - PublicIPAddressesListNextOptionalParams, - PublicIPAddressesListOptionalParams, - PublicIPAddressesListResponse, - PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesNextOptionalParams, - PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, - PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesResponse, - PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesNextOptionalParams, - PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, - PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesResponse, - PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams, - PublicIPAddressesGetCloudServicePublicIPAddressResponse, - PublicIPAddressesDeleteOptionalParams, - PublicIPAddressesGetOptionalParams, - PublicIPAddressesGetResponse, - PublicIPAddressesCreateOrUpdateOptionalParams, - PublicIPAddressesCreateOrUpdateResponse, - TagsObject, - PublicIPAddressesUpdateTagsOptionalParams, - PublicIPAddressesUpdateTagsResponse, - PublicIPAddressesDdosProtectionStatusOptionalParams, - PublicIPAddressesDdosProtectionStatusResponse, - ReserveCloudServicePublicIpAddressRequest, - PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, - PublicIPAddressesReserveCloudServicePublicIpAddressResponse, - DisassociateCloudServicePublicIpRequest, - PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, - PublicIPAddressesDisassociateCloudServiceReservedPublicIpResponse, - PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams, - PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressResponse, - PublicIPAddressesListCloudServicePublicIPAddressesNextResponse, - PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesNextResponse, - PublicIPAddressesListAllNextResponse, - PublicIPAddressesListNextResponse, - PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesNextResponse, - PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesNextResponse, -} from "../models/index.js"; - -/// -/** Class containing PublicIPAddresses operations. */ -export class PublicIPAddressesImpl implements PublicIPAddresses { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class PublicIPAddresses class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets information about all public IP addresses on a cloud service level. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param options The options parameters. - */ - public listCloudServicePublicIPAddresses( - resourceGroupName: string, - cloudServiceName: string, - options?: PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listCloudServicePublicIPAddressesPagingAll( - resourceGroupName, - cloudServiceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listCloudServicePublicIPAddressesPagingPage( - resourceGroupName, - cloudServiceName, - options, - settings, - ); - }, - }; - } - - private async *listCloudServicePublicIPAddressesPagingPage( - resourceGroupName: string, - cloudServiceName: string, - options?: PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PublicIPAddressesListCloudServicePublicIPAddressesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listCloudServicePublicIPAddresses( - resourceGroupName, - cloudServiceName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listCloudServicePublicIPAddressesNext( - resourceGroupName, - cloudServiceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listCloudServicePublicIPAddressesPagingAll( - resourceGroupName: string, - cloudServiceName: string, - options?: PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listCloudServicePublicIPAddressesPagingPage( - resourceGroupName, - cloudServiceName, - options, - )) { - yield* page; - } - } - - /** - * Gets information about all public IP addresses in a role instance IP configuration in a cloud - * service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The name of role instance. - * @param networkInterfaceName The network interface name. - * @param ipConfigurationName The IP configuration name. - * @param options The options parameters. - */ - public listCloudServiceRoleInstancePublicIPAddresses( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listCloudServiceRoleInstancePublicIPAddressesPagingAll( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listCloudServiceRoleInstancePublicIPAddressesPagingPage( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - options, - settings, - ); - }, - }; - } - - private async *listCloudServiceRoleInstancePublicIPAddressesPagingPage( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listCloudServiceRoleInstancePublicIPAddresses( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listCloudServiceRoleInstancePublicIPAddressesNext( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listCloudServiceRoleInstancePublicIPAddressesPagingAll( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listCloudServiceRoleInstancePublicIPAddressesPagingPage( - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - options, - )) { - yield* page; - } - } - - /** - * Gets all the public IP addresses in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: PublicIPAddressesListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: PublicIPAddressesListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PublicIPAddressesListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: PublicIPAddressesListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all public IP addresses in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: PublicIPAddressesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: PublicIPAddressesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PublicIPAddressesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: PublicIPAddressesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets information about all public IP addresses on a virtual machine scale set level. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param options The options parameters. - */ - public listVirtualMachineScaleSetPublicIPAddresses( - resourceGroupName: string, - virtualMachineScaleSetName: string, - options?: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listVirtualMachineScaleSetPublicIPAddressesPagingAll( - resourceGroupName, - virtualMachineScaleSetName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listVirtualMachineScaleSetPublicIPAddressesPagingPage( - resourceGroupName, - virtualMachineScaleSetName, - options, - settings, - ); - }, - }; - } - - private async *listVirtualMachineScaleSetPublicIPAddressesPagingPage( - resourceGroupName: string, - virtualMachineScaleSetName: string, - options?: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listVirtualMachineScaleSetPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listVirtualMachineScaleSetPublicIPAddressesNext( - resourceGroupName, - virtualMachineScaleSetName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listVirtualMachineScaleSetPublicIPAddressesPagingAll( - resourceGroupName: string, - virtualMachineScaleSetName: string, - options?: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listVirtualMachineScaleSetPublicIPAddressesPagingPage( - resourceGroupName, - virtualMachineScaleSetName, - options, - )) { - yield* page; - } - } - - /** - * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual - * machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The network interface name. - * @param ipConfigurationName The IP configuration name. - * @param options The options parameters. - */ - public listVirtualMachineScaleSetVMPublicIPAddresses( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listVirtualMachineScaleSetVMPublicIPAddressesPagingAll( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listVirtualMachineScaleSetVMPublicIPAddressesPagingPage( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - options, - settings, - ); - }, - }; - } - - private async *listVirtualMachineScaleSetVMPublicIPAddressesPagingPage( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listVirtualMachineScaleSetVMPublicIPAddresses( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listVirtualMachineScaleSetVMPublicIPAddressesNext( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listVirtualMachineScaleSetVMPublicIPAddressesPagingAll( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listVirtualMachineScaleSetVMPublicIPAddressesPagingPage( - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - options, - )) { - yield* page; - } - } - - /** - * Gets information about all public IP addresses on a cloud service level. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param options The options parameters. - */ - private _listCloudServicePublicIPAddresses( - resourceGroupName: string, - cloudServiceName: string, - options?: PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, cloudServiceName, options }, - listCloudServicePublicIPAddressesOperationSpec, - ); - } - - /** - * Gets information about all public IP addresses in a role instance IP configuration in a cloud - * service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The name of role instance. - * @param networkInterfaceName The network interface name. - * @param ipConfigurationName The IP configuration name. - * @param options The options parameters. - */ - private _listCloudServiceRoleInstancePublicIPAddresses( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - options, - }, - listCloudServiceRoleInstancePublicIPAddressesOperationSpec, - ); - } - - /** - * Get the specified public IP address in a cloud service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The role instance name. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the IP configuration. - * @param publicIpAddressName The name of the public IP Address. - * @param options The options parameters. - */ - getCloudServicePublicIPAddress( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - networkInterfaceName: string, - ipConfigurationName: string, - publicIpAddressName: string, - options?: PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - options, - }, - getCloudServicePublicIPAddressOperationSpec, - ); - } - - /** - * Deletes the specified public IP address. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - publicIpAddressName: string, - options?: PublicIPAddressesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, publicIpAddressName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified public IP address. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - publicIpAddressName: string, - options?: PublicIPAddressesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, publicIpAddressName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified public IP address in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - publicIpAddressName: string, - options?: PublicIPAddressesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, publicIpAddressName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a static or dynamic public IP address. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameters supplied to the create or update public IP address operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - publicIpAddressName: string, - parameters: PublicIPAddress, - options?: PublicIPAddressesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PublicIPAddressesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, publicIpAddressName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - PublicIPAddressesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a static or dynamic public IP address. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameters supplied to the create or update public IP address operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - publicIpAddressName: string, - parameters: PublicIPAddress, - options?: PublicIPAddressesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - publicIpAddressName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates public IP address tags. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameters supplied to update public IP address tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - publicIpAddressName: string, - parameters: TagsObject, - options?: PublicIPAddressesUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, publicIpAddressName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all the public IP addresses in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: PublicIPAddressesListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all public IP addresses in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: PublicIPAddressesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets the Ddos Protection Status of a Public IP Address - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param options The options parameters. - */ - async beginDdosProtectionStatus( - resourceGroupName: string, - publicIpAddressName: string, - options?: PublicIPAddressesDdosProtectionStatusOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PublicIPAddressesDdosProtectionStatusResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, publicIpAddressName, options }, - spec: ddosProtectionStatusOperationSpec, - }); - const poller = await createHttpPoller< - PublicIPAddressesDdosProtectionStatusResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the Ddos Protection Status of a Public IP Address - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param options The options parameters. - */ - async beginDdosProtectionStatusAndWait( - resourceGroupName: string, - publicIpAddressName: string, - options?: PublicIPAddressesDdosProtectionStatusOptionalParams, - ): Promise { - const poller = await this.beginDdosProtectionStatus( - resourceGroupName, - publicIpAddressName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If - * rollback is requested, reverts the allocation method to Dynamic. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameter that define which Public IP Address should be associated in place of - * given Public IP Address. - * @param options The options parameters. - */ - async beginReserveCloudServicePublicIpAddress( - resourceGroupName: string, - publicIpAddressName: string, - parameters: ReserveCloudServicePublicIpAddressRequest, - options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PublicIPAddressesReserveCloudServicePublicIpAddressResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, publicIpAddressName, parameters, options }, - spec: reserveCloudServicePublicIpAddressOperationSpec, - }); - const poller = await createHttpPoller< - PublicIPAddressesReserveCloudServicePublicIpAddressResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If - * rollback is requested, reverts the allocation method to Dynamic. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameter that define which Public IP Address should be associated in place of - * given Public IP Address. - * @param options The options parameters. - */ - async beginReserveCloudServicePublicIpAddressAndWait( - resourceGroupName: string, - publicIpAddressName: string, - parameters: ReserveCloudServicePublicIpAddressRequest, - options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, - ): Promise { - const poller = await this.beginReserveCloudServicePublicIpAddress( - resourceGroupName, - publicIpAddressName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP - * to the same Cloud Service frontend. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameter that define which Public IP Address should be associated in place of - * given Public IP Address. - * @param options The options parameters. - */ - async beginDisassociateCloudServiceReservedPublicIp( - resourceGroupName: string, - publicIpAddressName: string, - parameters: DisassociateCloudServicePublicIpRequest, - options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PublicIPAddressesDisassociateCloudServiceReservedPublicIpResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, publicIpAddressName, parameters, options }, - spec: disassociateCloudServiceReservedPublicIpOperationSpec, - }); - const poller = await createHttpPoller< - PublicIPAddressesDisassociateCloudServiceReservedPublicIpResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP - * to the same Cloud Service frontend. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameter that define which Public IP Address should be associated in place of - * given Public IP Address. - * @param options The options parameters. - */ - async beginDisassociateCloudServiceReservedPublicIpAndWait( - resourceGroupName: string, - publicIpAddressName: string, - parameters: DisassociateCloudServicePublicIpRequest, - options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, - ): Promise { - const poller = await this.beginDisassociateCloudServiceReservedPublicIp( - resourceGroupName, - publicIpAddressName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets information about all public IP addresses on a virtual machine scale set level. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param options The options parameters. - */ - private _listVirtualMachineScaleSetPublicIPAddresses( - resourceGroupName: string, - virtualMachineScaleSetName: string, - options?: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineScaleSetName, options }, - listVirtualMachineScaleSetPublicIPAddressesOperationSpec, - ); - } - - /** - * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual - * machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The network interface name. - * @param ipConfigurationName The IP configuration name. - * @param options The options parameters. - */ - private _listVirtualMachineScaleSetVMPublicIPAddresses( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - options, - }, - listVirtualMachineScaleSetVMPublicIPAddressesOperationSpec, - ); - } - - /** - * Get the specified public IP address in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the IP configuration. - * @param publicIpAddressName The name of the public IP Address. - * @param options The options parameters. - */ - getVirtualMachineScaleSetPublicIPAddress( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - ipConfigurationName: string, - publicIpAddressName: string, - options?: PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - publicIpAddressName, - options, - }, - getVirtualMachineScaleSetPublicIPAddressOperationSpec, - ); - } - - /** - * ListCloudServicePublicIPAddressesNext - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param nextLink The nextLink from the previous successful call to the - * ListCloudServicePublicIPAddresses method. - * @param options The options parameters. - */ - private _listCloudServicePublicIPAddressesNext( - resourceGroupName: string, - cloudServiceName: string, - nextLink: string, - options?: PublicIPAddressesListCloudServicePublicIPAddressesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, cloudServiceName, nextLink, options }, - listCloudServicePublicIPAddressesNextOperationSpec, - ); - } - - /** - * ListCloudServiceRoleInstancePublicIPAddressesNext - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The name of role instance. - * @param networkInterfaceName The network interface name. - * @param ipConfigurationName The IP configuration name. - * @param nextLink The nextLink from the previous successful call to the - * ListCloudServiceRoleInstancePublicIPAddresses method. - * @param options The options parameters. - */ - private _listCloudServiceRoleInstancePublicIPAddressesNext( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - networkInterfaceName: string, - ipConfigurationName: string, - nextLink: string, - options?: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - cloudServiceName, - roleInstanceName, - networkInterfaceName, - ipConfigurationName, - nextLink, - options, - }, - listCloudServiceRoleInstancePublicIPAddressesNextOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: PublicIPAddressesListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: PublicIPAddressesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListVirtualMachineScaleSetPublicIPAddressesNext - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param nextLink The nextLink from the previous successful call to the - * ListVirtualMachineScaleSetPublicIPAddresses method. - * @param options The options parameters. - */ - private _listVirtualMachineScaleSetPublicIPAddressesNext( - resourceGroupName: string, - virtualMachineScaleSetName: string, - nextLink: string, - options?: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineScaleSetName, nextLink, options }, - listVirtualMachineScaleSetPublicIPAddressesNextOperationSpec, - ); - } - - /** - * ListVirtualMachineScaleSetVMPublicIPAddressesNext - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The network interface name. - * @param ipConfigurationName The IP configuration name. - * @param nextLink The nextLink from the previous successful call to the - * ListVirtualMachineScaleSetVMPublicIPAddresses method. - * @param options The options parameters. - */ - private _listVirtualMachineScaleSetVMPublicIPAddressesNext( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - ipConfigurationName: string, - nextLink: string, - options?: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualMachineScaleSetName, - virtualmachineIndex, - networkInterfaceName, - ipConfigurationName, - nextLink, - options, - }, - listVirtualMachineScaleSetVMPublicIPAddressesNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listCloudServicePublicIPAddressesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.cloudServiceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listCloudServiceRoleInstancePublicIPAddressesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.cloudServiceName, - Parameters.roleInstanceName, - Parameters.networkInterfaceName, - Parameters.ipConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getCloudServicePublicIPAddressOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddress, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.cloudServiceName, - Parameters.roleInstanceName, - Parameters.networkInterfaceName, - Parameters.ipConfigurationName, - Parameters.publicIpAddressName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.publicIpAddressName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddress, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.publicIpAddressName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddress, - }, - 201: { - bodyMapper: Mappers.PublicIPAddress, - }, - 202: { - bodyMapper: Mappers.PublicIPAddress, - }, - 204: { - bodyMapper: Mappers.PublicIPAddress, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.publicIpAddressName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddress, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.publicIpAddressName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const ddosProtectionStatusOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/ddosProtectionStatus", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PublicIpDdosProtectionStatusResult, - }, - 201: { - bodyMapper: Mappers.PublicIpDdosProtectionStatusResult, - }, - 202: { - bodyMapper: Mappers.PublicIpDdosProtectionStatusResult, - }, - 204: { - bodyMapper: Mappers.PublicIpDdosProtectionStatusResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.publicIpAddressName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const reserveCloudServicePublicIpAddressOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/reserveCloudServicePublicIpAddress", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddress, - }, - 201: { - bodyMapper: Mappers.PublicIPAddress, - }, - 202: { - bodyMapper: Mappers.PublicIPAddress, - }, - 204: { - bodyMapper: Mappers.PublicIPAddress, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters11, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.publicIpAddressName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const disassociateCloudServiceReservedPublicIpOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/disassociateCloudServiceReservedPublicIp", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddress, - }, - 201: { - bodyMapper: Mappers.PublicIPAddress, - }, - 202: { - bodyMapper: Mappers.PublicIPAddress, - }, - 204: { - bodyMapper: Mappers.PublicIPAddress, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.publicIpAddressName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listVirtualMachineScaleSetPublicIPAddressesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualMachineScaleSetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVirtualMachineScaleSetVMPublicIPAddressesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - Parameters.virtualMachineScaleSetName, - Parameters.virtualmachineIndex, - Parameters.ipConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getVirtualMachineScaleSetPublicIPAddressOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddress, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.expand, Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkInterfaceName, - Parameters.virtualMachineScaleSetName, - Parameters.virtualmachineIndex, - Parameters.ipConfigurationName, - Parameters.publicIpAddressName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listCloudServicePublicIPAddressesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.cloudServiceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listCloudServiceRoleInstancePublicIPAddressesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.cloudServiceName, - Parameters.roleInstanceName, - Parameters.networkInterfaceName, - Parameters.ipConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVirtualMachineScaleSetPublicIPAddressesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualMachineScaleSetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVirtualMachineScaleSetVMPublicIPAddressesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPAddressListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkInterfaceName, - Parameters.virtualMachineScaleSetName, - Parameters.virtualmachineIndex, - Parameters.ipConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/publicIPPrefixes.ts b/sdk/network/arm-network/src/operations/publicIPPrefixes.ts deleted file mode 100644 index 40df6f39f4c6..000000000000 --- a/sdk/network/arm-network/src/operations/publicIPPrefixes.ts +++ /dev/null @@ -1,587 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { PublicIPPrefixes } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - PublicIPPrefix, - PublicIPPrefixesListAllNextOptionalParams, - PublicIPPrefixesListAllOptionalParams, - PublicIPPrefixesListAllResponse, - PublicIPPrefixesListNextOptionalParams, - PublicIPPrefixesListOptionalParams, - PublicIPPrefixesListResponse, - PublicIPPrefixesDeleteOptionalParams, - PublicIPPrefixesGetOptionalParams, - PublicIPPrefixesGetResponse, - PublicIPPrefixesCreateOrUpdateOptionalParams, - PublicIPPrefixesCreateOrUpdateResponse, - TagsObject, - PublicIPPrefixesUpdateTagsOptionalParams, - PublicIPPrefixesUpdateTagsResponse, - PublicIPPrefixesListAllNextResponse, - PublicIPPrefixesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing PublicIPPrefixes operations. */ -export class PublicIPPrefixesImpl implements PublicIPPrefixes { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class PublicIPPrefixes class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the public IP prefixes in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: PublicIPPrefixesListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: PublicIPPrefixesListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PublicIPPrefixesListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: PublicIPPrefixesListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all public IP prefixes in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: PublicIPPrefixesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: PublicIPPrefixesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PublicIPPrefixesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: PublicIPPrefixesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified public IP prefix. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the PublicIpPrefix. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - publicIpPrefixName: string, - options?: PublicIPPrefixesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, publicIpPrefixName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified public IP prefix. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the PublicIpPrefix. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - publicIpPrefixName: string, - options?: PublicIPPrefixesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, publicIpPrefixName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified public IP prefix in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the public IP prefix. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - publicIpPrefixName: string, - options?: PublicIPPrefixesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, publicIpPrefixName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a static or dynamic public IP prefix. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the public IP prefix. - * @param parameters Parameters supplied to the create or update public IP prefix operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - publicIpPrefixName: string, - parameters: PublicIPPrefix, - options?: PublicIPPrefixesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PublicIPPrefixesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, publicIpPrefixName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - PublicIPPrefixesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a static or dynamic public IP prefix. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the public IP prefix. - * @param parameters Parameters supplied to the create or update public IP prefix operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - publicIpPrefixName: string, - parameters: PublicIPPrefix, - options?: PublicIPPrefixesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - publicIpPrefixName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates public IP prefix tags. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the public IP prefix. - * @param parameters Parameters supplied to update public IP prefix tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - publicIpPrefixName: string, - parameters: TagsObject, - options?: PublicIPPrefixesUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, publicIpPrefixName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all the public IP prefixes in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: PublicIPPrefixesListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all public IP prefixes in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: PublicIPPrefixesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: PublicIPPrefixesListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: PublicIPPrefixesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.publicIpPrefixName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPPrefix, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.publicIpPrefixName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PublicIPPrefix, - }, - 201: { - bodyMapper: Mappers.PublicIPPrefix, - }, - 202: { - bodyMapper: Mappers.PublicIPPrefix, - }, - 204: { - bodyMapper: Mappers.PublicIPPrefix, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters78, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.publicIpPrefixName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.PublicIPPrefix, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.publicIpPrefixName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPPrefixListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPPrefixListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPPrefixListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PublicIPPrefixListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/reachabilityAnalysisIntents.ts b/sdk/network/arm-network/src/operations/reachabilityAnalysisIntents.ts deleted file mode 100644 index 0203f41023c9..000000000000 --- a/sdk/network/arm-network/src/operations/reachabilityAnalysisIntents.ts +++ /dev/null @@ -1,379 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ReachabilityAnalysisIntents } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ReachabilityAnalysisIntent, - ReachabilityAnalysisIntentsListNextOptionalParams, - ReachabilityAnalysisIntentsListOptionalParams, - ReachabilityAnalysisIntentsListResponse, - ReachabilityAnalysisIntentsGetOptionalParams, - ReachabilityAnalysisIntentsGetResponse, - ReachabilityAnalysisIntentsCreateOptionalParams, - ReachabilityAnalysisIntentsCreateResponse, - ReachabilityAnalysisIntentsDeleteOptionalParams, - ReachabilityAnalysisIntentsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ReachabilityAnalysisIntents operations. */ -export class ReachabilityAnalysisIntentsImpl implements ReachabilityAnalysisIntents { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ReachabilityAnalysisIntents class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets list of Reachability Analysis Intents . - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: ReachabilityAnalysisIntentsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkManagerName, workspaceName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkManagerName, - workspaceName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: ReachabilityAnalysisIntentsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ReachabilityAnalysisIntentsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, workspaceName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - workspaceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: ReachabilityAnalysisIntentsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkManagerName, - workspaceName, - options, - )) { - yield* page; - } - } - - /** - * Gets list of Reachability Analysis Intents . - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: ReachabilityAnalysisIntentsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, workspaceName, options }, - listOperationSpec, - ); - } - - /** - * Get the Reachability Analysis Intent. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisIntentName: string, - options?: ReachabilityAnalysisIntentsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates Reachability Analysis Intent. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. - * @param body Reachability Analysis Intent object to create/update. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisIntentName: string, - body: ReachabilityAnalysisIntent, - options?: ReachabilityAnalysisIntentsCreateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - body, - options, - }, - createOperationSpec, - ); - } - - /** - * Deletes Reachability Analysis Intent. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisIntentName: string, - options?: ReachabilityAnalysisIntentsDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisIntentName, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - nextLink: string, - options?: ReachabilityAnalysisIntentsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - workspaceName, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReachabilityAnalysisIntentListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken, - Parameters.skip, - Parameters.top1, - Parameters.sortKey, - Parameters.sortValue, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReachabilityAnalysisIntent, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - Parameters.reachabilityAnalysisIntentName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ReachabilityAnalysisIntent, - }, - 201: { - bodyMapper: Mappers.ReachabilityAnalysisIntent, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - requestBody: Parameters.body3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - Parameters.reachabilityAnalysisIntentName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - Parameters.reachabilityAnalysisIntentName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReachabilityAnalysisIntentListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName1, - Parameters.workspaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/reachabilityAnalysisRuns.ts b/sdk/network/arm-network/src/operations/reachabilityAnalysisRuns.ts deleted file mode 100644 index cb86ae77c245..000000000000 --- a/sdk/network/arm-network/src/operations/reachabilityAnalysisRuns.ts +++ /dev/null @@ -1,471 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ReachabilityAnalysisRuns } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ReachabilityAnalysisRun, - ReachabilityAnalysisRunsListNextOptionalParams, - ReachabilityAnalysisRunsListOptionalParams, - ReachabilityAnalysisRunsListResponse, - ReachabilityAnalysisRunsGetOptionalParams, - ReachabilityAnalysisRunsGetResponse, - ReachabilityAnalysisRunsCreateOptionalParams, - ReachabilityAnalysisRunsCreateResponse, - ReachabilityAnalysisRunsDeleteOptionalParams, - ReachabilityAnalysisRunsDeleteResponse, - ReachabilityAnalysisRunsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ReachabilityAnalysisRuns operations. */ -export class ReachabilityAnalysisRunsImpl implements ReachabilityAnalysisRuns { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ReachabilityAnalysisRuns class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets list of Reachability Analysis Runs. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: ReachabilityAnalysisRunsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkManagerName, workspaceName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkManagerName, - workspaceName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: ReachabilityAnalysisRunsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ReachabilityAnalysisRunsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, workspaceName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - workspaceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: ReachabilityAnalysisRunsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkManagerName, - workspaceName, - options, - )) { - yield* page; - } - } - - /** - * Gets list of Reachability Analysis Runs. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: ReachabilityAnalysisRunsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, workspaceName, options }, - listOperationSpec, - ); - } - - /** - * Gets Reachability Analysis Run. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisRunName Reachability Analysis Run name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisRunName: string, - options?: ReachabilityAnalysisRunsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates Reachability Analysis Runs. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisRunName Reachability Analysis Run name. - * @param body Analysis Run resource object to create/update. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisRunName: string, - body: ReachabilityAnalysisRun, - options?: ReachabilityAnalysisRunsCreateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - body, - options, - }, - createOperationSpec, - ); - } - - /** - * Deletes Reachability Analysis Run. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisRunName Reachability Analysis Run name. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisRunName: string, - options?: ReachabilityAnalysisRunsDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ReachabilityAnalysisRunsDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - ReachabilityAnalysisRunsDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes Reachability Analysis Run. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisRunName Reachability Analysis Run name. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisRunName: string, - options?: ReachabilityAnalysisRunsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - workspaceName, - reachabilityAnalysisRunName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - nextLink: string, - options?: ReachabilityAnalysisRunsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - workspaceName, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReachabilityAnalysisRunListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken, - Parameters.skip, - Parameters.top1, - Parameters.sortKey, - Parameters.sortValue, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReachabilityAnalysisRun, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - Parameters.reachabilityAnalysisRunName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ReachabilityAnalysisRun, - }, - 201: { - bodyMapper: Mappers.ReachabilityAnalysisRun, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - requestBody: Parameters.body4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - Parameters.reachabilityAnalysisRunName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.ReachabilityAnalysisRunsDeleteHeaders, - }, - 201: { - headersMapper: Mappers.ReachabilityAnalysisRunsDeleteHeaders, - }, - 202: { - headersMapper: Mappers.ReachabilityAnalysisRunsDeleteHeaders, - }, - 204: { - headersMapper: Mappers.ReachabilityAnalysisRunsDeleteHeaders, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - Parameters.reachabilityAnalysisRunName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReachabilityAnalysisRunListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName1, - Parameters.workspaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/resourceNavigationLinks.ts b/sdk/network/arm-network/src/operations/resourceNavigationLinks.ts deleted file mode 100644 index fe0ade142b78..000000000000 --- a/sdk/network/arm-network/src/operations/resourceNavigationLinks.ts +++ /dev/null @@ -1,72 +0,0 @@ -// 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 type { ResourceNavigationLinks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ResourceNavigationLinksListOptionalParams, - ResourceNavigationLinksListResponse, -} from "../models/index.js"; - -/** Class containing ResourceNavigationLinks operations. */ -export class ResourceNavigationLinksImpl implements ResourceNavigationLinks { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ResourceNavigationLinks class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets a list of resource navigation links for a subnet. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - options?: ResourceNavigationLinksListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, subnetName, options }, - listOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResourceNavigationLinksListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - Parameters.subnetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/routeFilterRules.ts b/sdk/network/arm-network/src/operations/routeFilterRules.ts deleted file mode 100644 index 6191e77f30d7..000000000000 --- a/sdk/network/arm-network/src/operations/routeFilterRules.ts +++ /dev/null @@ -1,484 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { RouteFilterRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - RouteFilterRule, - RouteFilterRulesListByRouteFilterNextOptionalParams, - RouteFilterRulesListByRouteFilterOptionalParams, - RouteFilterRulesListByRouteFilterResponse, - RouteFilterRulesDeleteOptionalParams, - RouteFilterRulesGetOptionalParams, - RouteFilterRulesGetResponse, - RouteFilterRulesCreateOrUpdateOptionalParams, - RouteFilterRulesCreateOrUpdateResponse, - RouteFilterRulesListByRouteFilterNextResponse, -} from "../models/index.js"; - -/// -/** Class containing RouteFilterRules operations. */ -export class RouteFilterRulesImpl implements RouteFilterRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class RouteFilterRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all RouteFilterRules in a route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param options The options parameters. - */ - public listByRouteFilter( - resourceGroupName: string, - routeFilterName: string, - options?: RouteFilterRulesListByRouteFilterOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByRouteFilterPagingAll(resourceGroupName, routeFilterName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByRouteFilterPagingPage( - resourceGroupName, - routeFilterName, - options, - settings, - ); - }, - }; - } - - private async *listByRouteFilterPagingPage( - resourceGroupName: string, - routeFilterName: string, - options?: RouteFilterRulesListByRouteFilterOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RouteFilterRulesListByRouteFilterResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByRouteFilter(resourceGroupName, routeFilterName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByRouteFilterNext( - resourceGroupName, - routeFilterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByRouteFilterPagingAll( - resourceGroupName: string, - routeFilterName: string, - options?: RouteFilterRulesListByRouteFilterOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByRouteFilterPagingPage( - resourceGroupName, - routeFilterName, - options, - )) { - yield* page; - } - } - - /** - * Deletes the specified rule from a route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - routeFilterName: string, - ruleName: string, - options?: RouteFilterRulesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, routeFilterName, ruleName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified rule from a route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - routeFilterName: string, - ruleName: string, - options?: RouteFilterRulesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, routeFilterName, ruleName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified rule from a route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - routeFilterName: string, - ruleName: string, - options?: RouteFilterRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, routeFilterName, ruleName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a route in the specified route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param ruleName The name of the route filter rule. - * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - routeFilterName: string, - ruleName: string, - routeFilterRuleParameters: RouteFilterRule, - options?: RouteFilterRulesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - RouteFilterRulesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - routeFilterName, - ruleName, - routeFilterRuleParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - RouteFilterRulesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a route in the specified route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param ruleName The name of the route filter rule. - * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - routeFilterName: string, - ruleName: string, - routeFilterRuleParameters: RouteFilterRule, - options?: RouteFilterRulesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - routeFilterName, - ruleName, - routeFilterRuleParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all RouteFilterRules in a route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param options The options parameters. - */ - private _listByRouteFilter( - resourceGroupName: string, - routeFilterName: string, - options?: RouteFilterRulesListByRouteFilterOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, routeFilterName, options }, - listByRouteFilterOperationSpec, - ); - } - - /** - * ListByRouteFilterNext - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param nextLink The nextLink from the previous successful call to the ListByRouteFilter method. - * @param options The options parameters. - */ - private _listByRouteFilterNext( - resourceGroupName: string, - routeFilterName: string, - nextLink: string, - options?: RouteFilterRulesListByRouteFilterNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, routeFilterName, nextLink, options }, - listByRouteFilterNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName1, - Parameters.routeFilterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteFilterRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName1, - Parameters.routeFilterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RouteFilterRule, - }, - 201: { - bodyMapper: Mappers.RouteFilterRule, - }, - 202: { - bodyMapper: Mappers.RouteFilterRule, - }, - 204: { - bodyMapper: Mappers.RouteFilterRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.routeFilterRuleParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName1, - Parameters.routeFilterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByRouteFilterOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteFilterRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeFilterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByRouteFilterNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteFilterRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.routeFilterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/routeFilters.ts b/sdk/network/arm-network/src/operations/routeFilters.ts deleted file mode 100644 index 808ff66dc8a2..000000000000 --- a/sdk/network/arm-network/src/operations/routeFilters.ts +++ /dev/null @@ -1,591 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { RouteFilters } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - RouteFilter, - RouteFiltersListByResourceGroupNextOptionalParams, - RouteFiltersListByResourceGroupOptionalParams, - RouteFiltersListByResourceGroupResponse, - RouteFiltersListNextOptionalParams, - RouteFiltersListOptionalParams, - RouteFiltersListResponse, - RouteFiltersDeleteOptionalParams, - RouteFiltersGetOptionalParams, - RouteFiltersGetResponse, - RouteFiltersCreateOrUpdateOptionalParams, - RouteFiltersCreateOrUpdateResponse, - TagsObject, - RouteFiltersUpdateTagsOptionalParams, - RouteFiltersUpdateTagsResponse, - RouteFiltersListByResourceGroupNextResponse, - RouteFiltersListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing RouteFilters operations. */ -export class RouteFiltersImpl implements RouteFilters { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class RouteFilters class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all route filters in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: RouteFiltersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: RouteFiltersListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RouteFiltersListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: RouteFiltersListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all route filters in a subscription. - * @param options The options parameters. - */ - public list(options?: RouteFiltersListOptionalParams): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: RouteFiltersListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RouteFiltersListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: RouteFiltersListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the specified route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - routeFilterName: string, - options?: RouteFiltersDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, routeFilterName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - routeFilterName: string, - options?: RouteFiltersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, routeFilterName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - routeFilterName: string, - options?: RouteFiltersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, routeFilterName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a route filter in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param routeFilterParameters Parameters supplied to the create or update route filter operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - routeFilterName: string, - routeFilterParameters: RouteFilter, - options?: RouteFiltersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - RouteFiltersCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - routeFilterName, - routeFilterParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - RouteFiltersCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a route filter in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param routeFilterParameters Parameters supplied to the create or update route filter operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - routeFilterName: string, - routeFilterParameters: RouteFilter, - options?: RouteFiltersCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - routeFilterName, - routeFilterParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates tags of a route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param parameters Parameters supplied to update route filter tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - routeFilterName: string, - parameters: TagsObject, - options?: RouteFiltersUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, routeFilterName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all route filters in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: RouteFiltersListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Gets all route filters in a subscription. - * @param options The options parameters. - */ - private _list(options?: RouteFiltersListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: RouteFiltersListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: RouteFiltersListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeFilterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteFilter, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeFilterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RouteFilter, - }, - 201: { - bodyMapper: Mappers.RouteFilter, - }, - 202: { - bodyMapper: Mappers.RouteFilter, - }, - 204: { - bodyMapper: Mappers.RouteFilter, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.routeFilterParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeFilterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.RouteFilter, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeFilterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteFilterListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteFilterListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteFilterListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteFilterListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/routeMaps.ts b/sdk/network/arm-network/src/operations/routeMaps.ts deleted file mode 100644 index 644573ccce4f..000000000000 --- a/sdk/network/arm-network/src/operations/routeMaps.ts +++ /dev/null @@ -1,468 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { RouteMaps } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - RouteMap, - RouteMapsListNextOptionalParams, - RouteMapsListOptionalParams, - RouteMapsListResponse, - RouteMapsGetOptionalParams, - RouteMapsGetResponse, - RouteMapsCreateOrUpdateOptionalParams, - RouteMapsCreateOrUpdateResponse, - RouteMapsDeleteOptionalParams, - RouteMapsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing RouteMaps operations. */ -export class RouteMapsImpl implements RouteMaps { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class RouteMaps class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves the details of all RouteMaps. - * @param resourceGroupName The resource group name of the RouteMap's resource group'. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - virtualHubName: string, - options?: RouteMapsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, virtualHubName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, virtualHubName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - virtualHubName: string, - options?: RouteMapsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RouteMapsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, virtualHubName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, virtualHubName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - virtualHubName: string, - options?: RouteMapsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, virtualHubName, options)) { - yield* page; - } - } - - /** - * Retrieves the details of a RouteMap. - * @param resourceGroupName The resource group name of the RouteMap's resource group. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param routeMapName The name of the RouteMap. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - routeMapName: string, - options?: RouteMapsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, routeMapName, options }, - getOperationSpec, - ); - } - - /** - * Creates a RouteMap if it doesn't exist else updates the existing one. - * @param resourceGroupName The resource group name of the RouteMap's resource group. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param routeMapName The name of the RouteMap. - * @param routeMapParameters Parameters supplied to create or update a RouteMap. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - routeMapName: string, - routeMapParameters: RouteMap, - options?: RouteMapsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - RouteMapsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualHubName, - routeMapName, - routeMapParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - RouteMapsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a RouteMap if it doesn't exist else updates the existing one. - * @param resourceGroupName The resource group name of the RouteMap's resource group. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param routeMapName The name of the RouteMap. - * @param routeMapParameters Parameters supplied to create or update a RouteMap. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - routeMapName: string, - routeMapParameters: RouteMap, - options?: RouteMapsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualHubName, - routeMapName, - routeMapParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a RouteMap. - * @param resourceGroupName The resource group name of the RouteMap's resource group. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param routeMapName The name of the RouteMap. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualHubName: string, - routeMapName: string, - options?: RouteMapsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualHubName, routeMapName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a RouteMap. - * @param resourceGroupName The resource group name of the RouteMap's resource group. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param routeMapName The name of the RouteMap. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - routeMapName: string, - options?: RouteMapsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, virtualHubName, routeMapName, options); - return poller.pollUntilDone(); - } - - /** - * Retrieves the details of all RouteMaps. - * @param resourceGroupName The resource group name of the RouteMap's resource group'. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - virtualHubName: string, - options?: RouteMapsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The resource group name of the RouteMap's resource group'. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - virtualHubName: string, - nextLink: string, - options?: RouteMapsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteMap, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - Parameters.routeMapName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RouteMap, - }, - 201: { - bodyMapper: Mappers.RouteMap, - }, - 202: { - bodyMapper: Mappers.RouteMap, - }, - 204: { - bodyMapper: Mappers.RouteMap, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.routeMapParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - Parameters.routeMapName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - Parameters.routeMapName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListRouteMapsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListRouteMapsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/routeTables.ts b/sdk/network/arm-network/src/operations/routeTables.ts deleted file mode 100644 index 2f5b53600a52..000000000000 --- a/sdk/network/arm-network/src/operations/routeTables.ts +++ /dev/null @@ -1,587 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { RouteTables } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - RouteTable, - RouteTablesListNextOptionalParams, - RouteTablesListOptionalParams, - RouteTablesListResponse, - RouteTablesListAllNextOptionalParams, - RouteTablesListAllOptionalParams, - RouteTablesListAllResponse, - RouteTablesDeleteOptionalParams, - RouteTablesGetOptionalParams, - RouteTablesGetResponse, - RouteTablesCreateOrUpdateOptionalParams, - RouteTablesCreateOrUpdateResponse, - TagsObject, - RouteTablesUpdateTagsOptionalParams, - RouteTablesUpdateTagsResponse, - RouteTablesListNextResponse, - RouteTablesListAllNextResponse, -} from "../models/index.js"; - -/// -/** Class containing RouteTables operations. */ -export class RouteTablesImpl implements RouteTables { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class RouteTables class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all route tables in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: RouteTablesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: RouteTablesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RouteTablesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: RouteTablesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all route tables in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: RouteTablesListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: RouteTablesListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RouteTablesListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: RouteTablesListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the specified route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - routeTableName: string, - options?: RouteTablesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, routeTableName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - routeTableName: string, - options?: RouteTablesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, routeTableName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - routeTableName: string, - options?: RouteTablesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, routeTableName, options }, - getOperationSpec, - ); - } - - /** - * Create or updates a route table in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param parameters Parameters supplied to the create or update route table operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - routeTableName: string, - parameters: RouteTable, - options?: RouteTablesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - RouteTablesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, routeTableName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - RouteTablesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create or updates a route table in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param parameters Parameters supplied to the create or update route table operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - routeTableName: string, - parameters: RouteTable, - options?: RouteTablesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - routeTableName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates a route table tags. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param parameters Parameters supplied to update route table tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - routeTableName: string, - parameters: TagsObject, - options?: RouteTablesUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, routeTableName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all route tables in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: RouteTablesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all route tables in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: RouteTablesListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: RouteTablesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: RouteTablesListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteTable, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RouteTable, - }, - 201: { - bodyMapper: Mappers.RouteTable, - }, - 202: { - bodyMapper: Mappers.RouteTable, - }, - 204: { - bodyMapper: Mappers.RouteTable, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters79, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.RouteTable, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteTableListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteTableListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteTableListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteTableListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/routes.ts b/sdk/network/arm-network/src/operations/routes.ts deleted file mode 100644 index 5312169d7e12..000000000000 --- a/sdk/network/arm-network/src/operations/routes.ts +++ /dev/null @@ -1,465 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { Routes } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - Route, - RoutesListNextOptionalParams, - RoutesListOptionalParams, - RoutesListResponse, - RoutesDeleteOptionalParams, - RoutesGetOptionalParams, - RoutesGetResponse, - RoutesCreateOrUpdateOptionalParams, - RoutesCreateOrUpdateResponse, - RoutesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Routes operations. */ -export class RoutesImpl implements Routes { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class Routes class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all routes in a route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - routeTableName: string, - options?: RoutesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, routeTableName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, routeTableName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - routeTableName: string, - options?: RoutesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RoutesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, routeTableName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, routeTableName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - routeTableName: string, - options?: RoutesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, routeTableName, options)) { - yield* page; - } - } - - /** - * Deletes the specified route from a route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param routeName The name of the route. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - routeTableName: string, - routeName: string, - options?: RoutesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, routeTableName, routeName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified route from a route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param routeName The name of the route. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - routeTableName: string, - routeName: string, - options?: RoutesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, routeTableName, routeName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified route from a route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param routeName The name of the route. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - routeTableName: string, - routeName: string, - options?: RoutesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, routeTableName, routeName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a route in the specified route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param routeName The name of the route. - * @param routeParameters Parameters supplied to the create or update route operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - routeTableName: string, - routeName: string, - routeParameters: Route, - options?: RoutesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, RoutesCreateOrUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - routeTableName, - routeName, - routeParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - RoutesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a route in the specified route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param routeName The name of the route. - * @param routeParameters Parameters supplied to the create or update route operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - routeTableName: string, - routeName: string, - routeParameters: Route, - options?: RoutesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - routeTableName, - routeName, - routeParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all routes in a route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - routeTableName: string, - options?: RoutesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, routeTableName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - routeTableName: string, - nextLink: string, - options?: RoutesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, routeTableName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - Parameters.routeName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Route, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - Parameters.routeName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Route, - }, - 201: { - bodyMapper: Mappers.Route, - }, - 202: { - bodyMapper: Mappers.Route, - }, - 204: { - bodyMapper: Mappers.Route, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.routeParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - Parameters.routeName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RouteListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.routeTableName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/routingIntentOperations.ts b/sdk/network/arm-network/src/operations/routingIntentOperations.ts deleted file mode 100644 index c1fb5ab8d759..000000000000 --- a/sdk/network/arm-network/src/operations/routingIntentOperations.ts +++ /dev/null @@ -1,473 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { RoutingIntentOperations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - RoutingIntent, - RoutingIntentListNextOptionalParams, - RoutingIntentListOptionalParams, - RoutingIntentListResponse, - RoutingIntentCreateOrUpdateOptionalParams, - RoutingIntentCreateOrUpdateResponse, - RoutingIntentGetOptionalParams, - RoutingIntentGetResponse, - RoutingIntentDeleteOptionalParams, - RoutingIntentListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing RoutingIntentOperations operations. */ -export class RoutingIntentOperationsImpl implements RoutingIntentOperations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class RoutingIntentOperations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - virtualHubName: string, - options?: RoutingIntentListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, virtualHubName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, virtualHubName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - virtualHubName: string, - options?: RoutingIntentListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RoutingIntentListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, virtualHubName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, virtualHubName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - virtualHubName: string, - options?: RoutingIntentListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, virtualHubName, options)) { - yield* page; - } - } - - /** - * Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * @param resourceGroupName The resource group name of the RoutingIntent. - * @param virtualHubName The name of the VirtualHub. - * @param routingIntentName The name of the per VirtualHub singleton Routing Intent resource. - * @param routingIntentParameters Parameters supplied to create or update RoutingIntent. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - routingIntentName: string, - routingIntentParameters: RoutingIntent, - options?: RoutingIntentCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - RoutingIntentCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualHubName, - routingIntentName, - routingIntentParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - RoutingIntentCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * @param resourceGroupName The resource group name of the RoutingIntent. - * @param virtualHubName The name of the VirtualHub. - * @param routingIntentName The name of the per VirtualHub singleton Routing Intent resource. - * @param routingIntentParameters Parameters supplied to create or update RoutingIntent. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - routingIntentName: string, - routingIntentParameters: RoutingIntent, - options?: RoutingIntentCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualHubName, - routingIntentName, - routingIntentParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves the details of a RoutingIntent. - * @param resourceGroupName The resource group name of the RoutingIntent. - * @param virtualHubName The name of the VirtualHub. - * @param routingIntentName The name of the RoutingIntent. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - routingIntentName: string, - options?: RoutingIntentGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, routingIntentName, options }, - getOperationSpec, - ); - } - - /** - * Deletes a RoutingIntent. - * @param resourceGroupName The resource group name of the RoutingIntent. - * @param virtualHubName The name of the VirtualHub. - * @param routingIntentName The name of the RoutingIntent. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualHubName: string, - routingIntentName: string, - options?: RoutingIntentDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualHubName, routingIntentName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a RoutingIntent. - * @param resourceGroupName The resource group name of the RoutingIntent. - * @param virtualHubName The name of the VirtualHub. - * @param routingIntentName The name of the RoutingIntent. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - routingIntentName: string, - options?: RoutingIntentDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualHubName, - routingIntentName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - virtualHubName: string, - options?: RoutingIntentListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - virtualHubName: string, - nextLink: string, - options?: RoutingIntentListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RoutingIntent, - }, - 201: { - bodyMapper: Mappers.RoutingIntent, - }, - 202: { - bodyMapper: Mappers.RoutingIntent, - }, - 204: { - bodyMapper: Mappers.RoutingIntent, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.routingIntentParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - Parameters.routingIntentName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RoutingIntent, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - Parameters.routingIntentName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - Parameters.routingIntentName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListRoutingIntentResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListRoutingIntentResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/routingRuleCollections.ts b/sdk/network/arm-network/src/operations/routingRuleCollections.ts deleted file mode 100644 index 081b8ab40806..000000000000 --- a/sdk/network/arm-network/src/operations/routingRuleCollections.ts +++ /dev/null @@ -1,452 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { RoutingRuleCollections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - RoutingRuleCollection, - RoutingRuleCollectionsListNextOptionalParams, - RoutingRuleCollectionsListOptionalParams, - RoutingRuleCollectionsListResponse, - RoutingRuleCollectionsGetOptionalParams, - RoutingRuleCollectionsGetResponse, - RoutingRuleCollectionsCreateOrUpdateOptionalParams, - RoutingRuleCollectionsCreateOrUpdateResponse, - RoutingRuleCollectionsDeleteOptionalParams, - RoutingRuleCollectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing RoutingRuleCollections operations. */ -export class RoutingRuleCollectionsImpl implements RoutingRuleCollections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class RoutingRuleCollections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the rule collections in a routing configuration, in a paginated format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: RoutingRuleCollectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: RoutingRuleCollectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RoutingRuleCollectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, configurationName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - configurationName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: RoutingRuleCollectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - options, - )) { - yield* page; - } - } - - /** - * Lists all the rule collections in a routing configuration, in a paginated format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: RoutingRuleCollectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, configurationName, options }, - listOperationSpec, - ); - } - - /** - * Gets a network manager routing configuration rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: RoutingRuleCollectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates a routing rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param ruleCollection The Rule Collection to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleCollection: RoutingRuleCollection, - options?: RoutingRuleCollectionsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleCollection, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes an routing rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: RoutingRuleCollectionsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes an routing rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: RoutingRuleCollectionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - nextLink: string, - options?: RoutingRuleCollectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RoutingRuleCollectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RoutingRuleCollection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RoutingRuleCollection, - }, - 201: { - bodyMapper: Mappers.RoutingRuleCollection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.ruleCollection, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RoutingRuleCollectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/routingRules.ts b/sdk/network/arm-network/src/operations/routingRules.ts deleted file mode 100644 index 7d86e8a7257b..000000000000 --- a/sdk/network/arm-network/src/operations/routingRules.ts +++ /dev/null @@ -1,494 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { RoutingRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - RoutingRule, - RoutingRulesListNextOptionalParams, - RoutingRulesListOptionalParams, - RoutingRulesListResponse, - RoutingRulesGetOptionalParams, - RoutingRulesGetResponse, - RoutingRulesCreateOrUpdateOptionalParams, - RoutingRulesCreateOrUpdateResponse, - RoutingRulesDeleteOptionalParams, - RoutingRulesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing RoutingRules operations. */ -export class RoutingRulesImpl implements RoutingRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class RoutingRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List all network manager routing configuration routing rules. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: RoutingRulesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: RoutingRulesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RoutingRulesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: RoutingRulesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - )) { - yield* page; - } - } - - /** - * List all network manager routing configuration routing rules. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: RoutingRulesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - }, - listOperationSpec, - ); - } - - /** - * Gets a network manager routing configuration routing rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: RoutingRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates an routing rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param ruleName The name of the rule. - * @param routingRule The routing rule to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - routingRule: RoutingRule, - options?: RoutingRulesCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - routingRule, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a routing rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: RoutingRulesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a routing rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: RoutingRulesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - nextLink: string, - options?: RoutingRulesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RoutingRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RoutingRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - Parameters.ruleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RoutingRule, - }, - 201: { - bodyMapper: Mappers.RoutingRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.routingRule, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - Parameters.ruleName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - Parameters.ruleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RoutingRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/scopeConnections.ts b/sdk/network/arm-network/src/operations/scopeConnections.ts deleted file mode 100644 index 752b3819fd34..000000000000 --- a/sdk/network/arm-network/src/operations/scopeConnections.ts +++ /dev/null @@ -1,322 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ScopeConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ScopeConnection, - ScopeConnectionsListNextOptionalParams, - ScopeConnectionsListOptionalParams, - ScopeConnectionsListResponse, - ScopeConnectionsCreateOrUpdateOptionalParams, - ScopeConnectionsCreateOrUpdateResponse, - ScopeConnectionsGetOptionalParams, - ScopeConnectionsGetResponse, - ScopeConnectionsDeleteOptionalParams, - ScopeConnectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ScopeConnections operations. */ -export class ScopeConnectionsImpl implements ScopeConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ScopeConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List all scope connections created by this network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - options?: ScopeConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkManagerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkManagerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - options?: ScopeConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ScopeConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - options?: ScopeConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, networkManagerName, options)) { - yield* page; - } - } - - /** - * Creates or updates scope connection from Network Manager - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param scopeConnectionName Name for the cross-tenant connection. - * @param parameters Scope connection to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - scopeConnectionName: string, - parameters: ScopeConnection, - options?: ScopeConnectionsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - scopeConnectionName, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Get specified scope connection created by this Network Manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param scopeConnectionName Name for the cross-tenant connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - scopeConnectionName: string, - options?: ScopeConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, scopeConnectionName, options }, - getOperationSpec, - ); - } - - /** - * Delete the pending scope connection created by this network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param scopeConnectionName Name for the cross-tenant connection. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkManagerName: string, - scopeConnectionName: string, - options?: ScopeConnectionsDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, scopeConnectionName, options }, - deleteOperationSpec, - ); - } - - /** - * List all scope connections created by this network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - options?: ScopeConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - nextLink: string, - options?: ScopeConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ScopeConnection, - }, - 201: { - bodyMapper: Mappers.ScopeConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters43, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.scopeConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScopeConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.scopeConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.scopeConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScopeConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScopeConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/securityAdminConfigurations.ts b/sdk/network/arm-network/src/operations/securityAdminConfigurations.ts deleted file mode 100644 index d9cca4826756..000000000000 --- a/sdk/network/arm-network/src/operations/securityAdminConfigurations.ts +++ /dev/null @@ -1,401 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { SecurityAdminConfigurations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - SecurityAdminConfiguration, - SecurityAdminConfigurationsListNextOptionalParams, - SecurityAdminConfigurationsListOptionalParams, - SecurityAdminConfigurationsListResponse, - SecurityAdminConfigurationsGetOptionalParams, - SecurityAdminConfigurationsGetResponse, - SecurityAdminConfigurationsCreateOrUpdateOptionalParams, - SecurityAdminConfigurationsCreateOrUpdateResponse, - SecurityAdminConfigurationsDeleteOptionalParams, - SecurityAdminConfigurationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing SecurityAdminConfigurations operations. */ -export class SecurityAdminConfigurationsImpl implements SecurityAdminConfigurations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class SecurityAdminConfigurations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the network manager security admin configurations in a network manager, in a paginated - * format. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - options?: SecurityAdminConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkManagerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkManagerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - options?: SecurityAdminConfigurationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SecurityAdminConfigurationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - options?: SecurityAdminConfigurationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, networkManagerName, options)) { - yield* page; - } - } - - /** - * Lists all the network manager security admin configurations in a network manager, in a paginated - * format. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - options?: SecurityAdminConfigurationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, options }, - listOperationSpec, - ); - } - - /** - * Retrieves a network manager security admin configuration. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityAdminConfigurationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, configurationName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a network manager security admin configuration. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param securityAdminConfiguration The security admin configuration to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - securityAdminConfiguration: SecurityAdminConfiguration, - options?: SecurityAdminConfigurationsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - securityAdminConfiguration, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a network manager security admin configuration. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityAdminConfigurationsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - configurationName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a network manager security admin configuration. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityAdminConfigurationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - nextLink: string, - options?: SecurityAdminConfigurationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityAdminConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityAdminConfiguration, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.configurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SecurityAdminConfiguration, - }, - 201: { - bodyMapper: Mappers.SecurityAdminConfiguration, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - requestBody: Parameters.securityAdminConfiguration, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.configurationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.configurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityAdminConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/securityPartnerProviders.ts b/sdk/network/arm-network/src/operations/securityPartnerProviders.ts deleted file mode 100644 index dd24580a563c..000000000000 --- a/sdk/network/arm-network/src/operations/securityPartnerProviders.ts +++ /dev/null @@ -1,595 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { SecurityPartnerProviders } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - SecurityPartnerProvider, - SecurityPartnerProvidersListByResourceGroupNextOptionalParams, - SecurityPartnerProvidersListByResourceGroupOptionalParams, - SecurityPartnerProvidersListByResourceGroupResponse, - SecurityPartnerProvidersListNextOptionalParams, - SecurityPartnerProvidersListOptionalParams, - SecurityPartnerProvidersListResponse, - SecurityPartnerProvidersDeleteOptionalParams, - SecurityPartnerProvidersGetOptionalParams, - SecurityPartnerProvidersGetResponse, - SecurityPartnerProvidersCreateOrUpdateOptionalParams, - SecurityPartnerProvidersCreateOrUpdateResponse, - TagsObject, - SecurityPartnerProvidersUpdateTagsOptionalParams, - SecurityPartnerProvidersUpdateTagsResponse, - SecurityPartnerProvidersListByResourceGroupNextResponse, - SecurityPartnerProvidersListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing SecurityPartnerProviders operations. */ -export class SecurityPartnerProvidersImpl implements SecurityPartnerProviders { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class SecurityPartnerProviders class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all Security Partner Providers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: SecurityPartnerProvidersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: SecurityPartnerProvidersListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SecurityPartnerProvidersListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: SecurityPartnerProvidersListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all the Security Partner Providers in a subscription. - * @param options The options parameters. - */ - public list( - options?: SecurityPartnerProvidersListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: SecurityPartnerProvidersListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SecurityPartnerProvidersListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: SecurityPartnerProvidersListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the specified Security Partner Provider. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - securityPartnerProviderName: string, - options?: SecurityPartnerProvidersDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, securityPartnerProviderName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified Security Partner Provider. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - securityPartnerProviderName: string, - options?: SecurityPartnerProvidersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, securityPartnerProviderName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified Security Partner Provider. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - securityPartnerProviderName: string, - options?: SecurityPartnerProvidersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, securityPartnerProviderName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the specified Security Partner Provider. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param parameters Parameters supplied to the create or update Security Partner Provider operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - securityPartnerProviderName: string, - parameters: SecurityPartnerProvider, - options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SecurityPartnerProvidersCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - securityPartnerProviderName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - SecurityPartnerProvidersCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified Security Partner Provider. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param parameters Parameters supplied to the create or update Security Partner Provider operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - securityPartnerProviderName: string, - parameters: SecurityPartnerProvider, - options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - securityPartnerProviderName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates tags of a Security Partner Provider resource. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param parameters Parameters supplied to update Security Partner Provider tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - securityPartnerProviderName: string, - parameters: TagsObject, - options?: SecurityPartnerProvidersUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, securityPartnerProviderName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Lists all Security Partner Providers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: SecurityPartnerProvidersListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Gets all the Security Partner Providers in a subscription. - * @param options The options parameters. - */ - private _list( - options?: SecurityPartnerProvidersListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: SecurityPartnerProvidersListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: SecurityPartnerProvidersListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.securityPartnerProviderName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityPartnerProvider, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.securityPartnerProviderName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SecurityPartnerProvider, - }, - 201: { - bodyMapper: Mappers.SecurityPartnerProvider, - }, - 202: { - bodyMapper: Mappers.SecurityPartnerProvider, - }, - 204: { - bodyMapper: Mappers.SecurityPartnerProvider, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters80, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.securityPartnerProviderName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.SecurityPartnerProvider, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.securityPartnerProviderName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityPartnerProviderListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/securityPartnerProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityPartnerProviderListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityPartnerProviderListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityPartnerProviderListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/securityRules.ts b/sdk/network/arm-network/src/operations/securityRules.ts deleted file mode 100644 index b657eb522aba..000000000000 --- a/sdk/network/arm-network/src/operations/securityRules.ts +++ /dev/null @@ -1,494 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { SecurityRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - SecurityRule, - SecurityRulesListNextOptionalParams, - SecurityRulesListOptionalParams, - SecurityRulesListResponse, - SecurityRulesDeleteOptionalParams, - SecurityRulesGetOptionalParams, - SecurityRulesGetResponse, - SecurityRulesCreateOrUpdateOptionalParams, - SecurityRulesCreateOrUpdateResponse, - SecurityRulesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing SecurityRules operations. */ -export class SecurityRulesImpl implements SecurityRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class SecurityRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all security rules in a network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: SecurityRulesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkSecurityGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkSecurityGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: SecurityRulesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SecurityRulesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkSecurityGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkSecurityGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: SecurityRulesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkSecurityGroupName, - options, - )) { - yield* page; - } - } - - /** - * Deletes the specified network security rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param securityRuleName The name of the security rule. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkSecurityGroupName: string, - securityRuleName: string, - options?: SecurityRulesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified network security rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param securityRuleName The name of the security rule. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkSecurityGroupName: string, - securityRuleName: string, - options?: SecurityRulesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Get the specified network security rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param securityRuleName The name of the security rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityGroupName: string, - securityRuleName: string, - options?: SecurityRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates a security rule in the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param securityRuleName The name of the security rule. - * @param securityRuleParameters Parameters supplied to the create or update network security rule - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - networkSecurityGroupName: string, - securityRuleName: string, - securityRuleParameters: SecurityRule, - options?: SecurityRulesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SecurityRulesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - securityRuleParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - SecurityRulesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a security rule in the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param securityRuleName The name of the security rule. - * @param securityRuleParameters Parameters supplied to the create or update network security rule - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkSecurityGroupName: string, - securityRuleName: string, - securityRuleParameters: SecurityRule, - options?: SecurityRulesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - networkSecurityGroupName, - securityRuleName, - securityRuleParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all security rules in a network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: SecurityRulesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityGroupName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkSecurityGroupName: string, - nextLink: string, - options?: SecurityRulesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkSecurityGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityGroupName, - Parameters.securityRuleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityGroupName, - Parameters.securityRuleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SecurityRule, - }, - 201: { - bodyMapper: Mappers.SecurityRule, - }, - 202: { - bodyMapper: Mappers.SecurityRule, - }, - 204: { - bodyMapper: Mappers.SecurityRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.securityRuleParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityGroupName, - Parameters.securityRuleName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkSecurityGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkSecurityGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/securityUserConfigurations.ts b/sdk/network/arm-network/src/operations/securityUserConfigurations.ts deleted file mode 100644 index 3589cd0a509a..000000000000 --- a/sdk/network/arm-network/src/operations/securityUserConfigurations.ts +++ /dev/null @@ -1,401 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { SecurityUserConfigurations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - SecurityUserConfiguration, - SecurityUserConfigurationsListNextOptionalParams, - SecurityUserConfigurationsListOptionalParams, - SecurityUserConfigurationsListResponse, - SecurityUserConfigurationsGetOptionalParams, - SecurityUserConfigurationsGetResponse, - SecurityUserConfigurationsCreateOrUpdateOptionalParams, - SecurityUserConfigurationsCreateOrUpdateResponse, - SecurityUserConfigurationsDeleteOptionalParams, - SecurityUserConfigurationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing SecurityUserConfigurations operations. */ -export class SecurityUserConfigurationsImpl implements SecurityUserConfigurations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class SecurityUserConfigurations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the network manager security user configurations in a network manager, in a paginated - * format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - options?: SecurityUserConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkManagerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkManagerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - options?: SecurityUserConfigurationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SecurityUserConfigurationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - options?: SecurityUserConfigurationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, networkManagerName, options)) { - yield* page; - } - } - - /** - * Lists all the network manager security user configurations in a network manager, in a paginated - * format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - options?: SecurityUserConfigurationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, options }, - listOperationSpec, - ); - } - - /** - * Retrieves a network manager security user configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityUserConfigurationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, configurationName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a network manager security user configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param securityUserConfiguration The security user configuration to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - securityUserConfiguration: SecurityUserConfiguration, - options?: SecurityUserConfigurationsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - securityUserConfiguration, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a network manager security user configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityUserConfigurationsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - configurationName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a network manager security user configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityUserConfigurationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - nextLink: string, - options?: SecurityUserConfigurationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserConfiguration, - }, - 201: { - bodyMapper: Mappers.SecurityUserConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.securityUserConfiguration, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserConfigurationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/securityUserRuleCollections.ts b/sdk/network/arm-network/src/operations/securityUserRuleCollections.ts deleted file mode 100644 index 71d1dc32ca8d..000000000000 --- a/sdk/network/arm-network/src/operations/securityUserRuleCollections.ts +++ /dev/null @@ -1,452 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { SecurityUserRuleCollections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - SecurityUserRuleCollection, - SecurityUserRuleCollectionsListNextOptionalParams, - SecurityUserRuleCollectionsListOptionalParams, - SecurityUserRuleCollectionsListResponse, - SecurityUserRuleCollectionsGetOptionalParams, - SecurityUserRuleCollectionsGetResponse, - SecurityUserRuleCollectionsCreateOrUpdateOptionalParams, - SecurityUserRuleCollectionsCreateOrUpdateResponse, - SecurityUserRuleCollectionsDeleteOptionalParams, - SecurityUserRuleCollectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing SecurityUserRuleCollections operations. */ -export class SecurityUserRuleCollectionsImpl implements SecurityUserRuleCollections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class SecurityUserRuleCollections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the security user rule collections in a security configuration, in a paginated format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityUserRuleCollectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - networkManagerName, - configurationName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityUserRuleCollectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SecurityUserRuleCollectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, configurationName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - configurationName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityUserRuleCollectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - options, - )) { - yield* page; - } - } - - /** - * Lists all the security user rule collections in a security configuration, in a paginated format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityUserRuleCollectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, configurationName, options }, - listOperationSpec, - ); - } - - /** - * Gets a network manager security user configuration rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: SecurityUserRuleCollectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates a security user rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param securityUserRuleCollection The Security User Rule Collection to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - securityUserRuleCollection: SecurityUserRuleCollection, - options?: SecurityUserRuleCollectionsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - securityUserRuleCollection, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a Security User Rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: SecurityUserRuleCollectionsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a Security User Rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: SecurityUserRuleCollectionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - nextLink: string, - options?: SecurityUserRuleCollectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserRuleCollectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserRuleCollection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserRuleCollection, - }, - 201: { - bodyMapper: Mappers.SecurityUserRuleCollection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.securityUserRuleCollection, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserRuleCollectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/securityUserRules.ts b/sdk/network/arm-network/src/operations/securityUserRules.ts deleted file mode 100644 index b44add33ee1e..000000000000 --- a/sdk/network/arm-network/src/operations/securityUserRules.ts +++ /dev/null @@ -1,494 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { SecurityUserRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - SecurityUserRule, - SecurityUserRulesListNextOptionalParams, - SecurityUserRulesListOptionalParams, - SecurityUserRulesListResponse, - SecurityUserRulesGetOptionalParams, - SecurityUserRulesGetResponse, - SecurityUserRulesCreateOrUpdateOptionalParams, - SecurityUserRulesCreateOrUpdateResponse, - SecurityUserRulesDeleteOptionalParams, - SecurityUserRulesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing SecurityUserRules operations. */ -export class SecurityUserRulesImpl implements SecurityUserRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class SecurityUserRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all Security User Rules in a rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: SecurityUserRulesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: SecurityUserRulesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SecurityUserRulesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: SecurityUserRulesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - )) { - yield* page; - } - } - - /** - * Lists all Security User Rules in a rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: SecurityUserRulesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - options, - }, - listOperationSpec, - ); - } - - /** - * Gets a security user rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: SecurityUserRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates a security user rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param securityUserRule The security user rule to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - securityUserRule: SecurityUserRule, - options?: SecurityUserRulesCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - securityUserRule, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a security user rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: SecurityUserRulesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a security user rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: SecurityUserRulesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - ruleName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - nextLink: string, - options?: SecurityUserRulesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - configurationName, - ruleCollectionName, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - Parameters.ruleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserRule, - }, - 201: { - bodyMapper: Mappers.SecurityUserRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.securityUserRule, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - Parameters.ruleName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - Parameters.ruleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SecurityUserRuleListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.resourceGroupName1, - Parameters.networkManagerName2, - Parameters.configurationName1, - Parameters.ruleCollectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/serviceAssociationLinks.ts b/sdk/network/arm-network/src/operations/serviceAssociationLinks.ts deleted file mode 100644 index 4fad158e814f..000000000000 --- a/sdk/network/arm-network/src/operations/serviceAssociationLinks.ts +++ /dev/null @@ -1,72 +0,0 @@ -// 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 type { ServiceAssociationLinks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ServiceAssociationLinksListOptionalParams, - ServiceAssociationLinksListResponse, -} from "../models/index.js"; - -/** Class containing ServiceAssociationLinks operations. */ -export class ServiceAssociationLinksImpl implements ServiceAssociationLinks { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ServiceAssociationLinks class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets a list of service association links for a subnet. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - options?: ServiceAssociationLinksListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, subnetName, options }, - listOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceAssociationLinksListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - Parameters.subnetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/serviceEndpointPolicies.ts b/sdk/network/arm-network/src/operations/serviceEndpointPolicies.ts deleted file mode 100644 index c8465e88c4a7..000000000000 --- a/sdk/network/arm-network/src/operations/serviceEndpointPolicies.ts +++ /dev/null @@ -1,595 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ServiceEndpointPolicies } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ServiceEndpointPolicy, - ServiceEndpointPoliciesListNextOptionalParams, - ServiceEndpointPoliciesListOptionalParams, - ServiceEndpointPoliciesListResponse, - ServiceEndpointPoliciesListByResourceGroupNextOptionalParams, - ServiceEndpointPoliciesListByResourceGroupOptionalParams, - ServiceEndpointPoliciesListByResourceGroupResponse, - ServiceEndpointPoliciesDeleteOptionalParams, - ServiceEndpointPoliciesGetOptionalParams, - ServiceEndpointPoliciesGetResponse, - ServiceEndpointPoliciesCreateOrUpdateOptionalParams, - ServiceEndpointPoliciesCreateOrUpdateResponse, - TagsObject, - ServiceEndpointPoliciesUpdateTagsOptionalParams, - ServiceEndpointPoliciesUpdateTagsResponse, - ServiceEndpointPoliciesListNextResponse, - ServiceEndpointPoliciesListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ServiceEndpointPolicies operations. */ -export class ServiceEndpointPoliciesImpl implements ServiceEndpointPolicies { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ServiceEndpointPolicies class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the service endpoint policies in a subscription. - * @param options The options parameters. - */ - public list( - options?: ServiceEndpointPoliciesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: ServiceEndpointPoliciesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ServiceEndpointPoliciesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: ServiceEndpointPoliciesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all service endpoint Policies in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ServiceEndpointPoliciesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ServiceEndpointPoliciesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ServiceEndpointPoliciesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ServiceEndpointPoliciesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceEndpointPolicyName: string, - options?: ServiceEndpointPoliciesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceEndpointPolicyName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceEndpointPolicyName: string, - options?: ServiceEndpointPoliciesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, serviceEndpointPolicyName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified service Endpoint Policies in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceEndpointPolicyName: string, - options?: ServiceEndpointPoliciesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceEndpointPolicyName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a service Endpoint Policies. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param parameters Parameters supplied to the create or update service endpoint policy operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceEndpointPolicyName: string, - parameters: ServiceEndpointPolicy, - options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServiceEndpointPoliciesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceEndpointPolicyName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ServiceEndpointPoliciesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a service Endpoint Policies. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param parameters Parameters supplied to the create or update service endpoint policy operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceEndpointPolicyName: string, - parameters: ServiceEndpointPolicy, - options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceEndpointPolicyName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates tags of a service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param parameters Parameters supplied to update service endpoint policy tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - serviceEndpointPolicyName: string, - parameters: TagsObject, - options?: ServiceEndpointPoliciesUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceEndpointPolicyName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all the service endpoint policies in a subscription. - * @param options The options parameters. - */ - private _list( - options?: ServiceEndpointPoliciesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Gets all service endpoint Policies in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ServiceEndpointPoliciesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ServiceEndpointPoliciesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ServiceEndpointPoliciesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceEndpointPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceEndpointPolicy, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceEndpointPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ServiceEndpointPolicy, - }, - 201: { - bodyMapper: Mappers.ServiceEndpointPolicy, - }, - 202: { - bodyMapper: Mappers.ServiceEndpointPolicy, - }, - 204: { - bodyMapper: Mappers.ServiceEndpointPolicy, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters81, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceEndpointPolicyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ServiceEndpointPolicy, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceEndpointPolicyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceEndpointPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceEndpointPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceEndpointPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceEndpointPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/serviceEndpointPolicyDefinitions.ts b/sdk/network/arm-network/src/operations/serviceEndpointPolicyDefinitions.ts deleted file mode 100644 index 02e09b4fae72..000000000000 --- a/sdk/network/arm-network/src/operations/serviceEndpointPolicyDefinitions.ts +++ /dev/null @@ -1,507 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ServiceEndpointPolicyDefinitions } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ServiceEndpointPolicyDefinition, - ServiceEndpointPolicyDefinitionsListByResourceGroupNextOptionalParams, - ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, - ServiceEndpointPolicyDefinitionsListByResourceGroupResponse, - ServiceEndpointPolicyDefinitionsDeleteOptionalParams, - ServiceEndpointPolicyDefinitionsGetOptionalParams, - ServiceEndpointPolicyDefinitionsGetResponse, - ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, - ServiceEndpointPolicyDefinitionsCreateOrUpdateResponse, - ServiceEndpointPolicyDefinitionsListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ServiceEndpointPolicyDefinitions operations. */ -export class ServiceEndpointPolicyDefinitionsImpl implements ServiceEndpointPolicyDefinitions { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ServiceEndpointPolicyDefinitions class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all service endpoint policy definitions in a service end point policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy name. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - serviceEndpointPolicyName: string, - options?: ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll( - resourceGroupName, - serviceEndpointPolicyName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - serviceEndpointPolicyName, - options, - settings, - ); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - serviceEndpointPolicyName: string, - options?: ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ServiceEndpointPolicyDefinitionsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup( - resourceGroupName, - serviceEndpointPolicyName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - serviceEndpointPolicyName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - serviceEndpointPolicyName: string, - options?: ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - serviceEndpointPolicyName, - options, - )) { - yield* page; - } - } - - /** - * Deletes the specified ServiceEndpoint policy definitions. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. - * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceEndpointPolicyName: string, - serviceEndpointPolicyDefinitionName: string, - options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified ServiceEndpoint policy definitions. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. - * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceEndpointPolicyName: string, - serviceEndpointPolicyDefinitionName: string, - options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Get the specified service endpoint policy definitions from service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy name. - * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceEndpointPolicyName: string, - serviceEndpointPolicyDefinitionName: string, - options?: ServiceEndpointPolicyDefinitionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. - * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint - * policy operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceEndpointPolicyName: string, - serviceEndpointPolicyDefinitionName: string, - serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, - options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServiceEndpointPolicyDefinitionsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - serviceEndpointPolicyDefinitions, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ServiceEndpointPolicyDefinitionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. - * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint - * policy operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceEndpointPolicyName: string, - serviceEndpointPolicyDefinitionName: string, - serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, - options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceEndpointPolicyName, - serviceEndpointPolicyDefinitionName, - serviceEndpointPolicyDefinitions, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all service endpoint policy definitions in a service end point policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy name. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - serviceEndpointPolicyName: string, - options?: ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceEndpointPolicyName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy name. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - serviceEndpointPolicyName: string, - nextLink: string, - options?: ServiceEndpointPolicyDefinitionsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceEndpointPolicyName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceEndpointPolicyName, - Parameters.serviceEndpointPolicyDefinitionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceEndpointPolicyDefinition, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceEndpointPolicyName, - Parameters.serviceEndpointPolicyDefinitionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ServiceEndpointPolicyDefinition, - }, - 201: { - bodyMapper: Mappers.ServiceEndpointPolicyDefinition, - }, - 202: { - bodyMapper: Mappers.ServiceEndpointPolicyDefinition, - }, - 204: { - bodyMapper: Mappers.ServiceEndpointPolicyDefinition, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.serviceEndpointPolicyDefinitions, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceEndpointPolicyName, - Parameters.serviceEndpointPolicyDefinitionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceEndpointPolicyDefinitionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceEndpointPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceEndpointPolicyDefinitionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceEndpointPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/serviceGateways.ts b/sdk/network/arm-network/src/operations/serviceGateways.ts deleted file mode 100644 index 40acbf0ccf1e..000000000000 --- a/sdk/network/arm-network/src/operations/serviceGateways.ts +++ /dev/null @@ -1,1206 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ServiceGateways } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ServiceGateway, - ServiceGatewaysListAllNextOptionalParams, - ServiceGatewaysListAllOptionalParams, - ServiceGatewaysListAllResponse, - ServiceGatewaysListNextOptionalParams, - ServiceGatewaysListOptionalParams, - ServiceGatewaysListResponse, - ServiceGatewayAddressLocationResponse, - ServiceGatewaysGetAddressLocationsNextOptionalParams, - ServiceGatewaysGetAddressLocationsOptionalParams, - ServiceGatewaysGetAddressLocationsResponse, - ServiceGatewayService, - ServiceGatewaysGetServicesNextOptionalParams, - ServiceGatewaysGetServicesOptionalParams, - ServiceGatewaysGetServicesResponse, - ServiceGatewaysDeleteOptionalParams, - ServiceGatewaysDeleteResponse, - ServiceGatewaysGetOptionalParams, - ServiceGatewaysGetResponse, - ServiceGatewaysCreateOrUpdateOptionalParams, - ServiceGatewaysCreateOrUpdateResponse, - TagsObject, - ServiceGatewaysUpdateTagsOptionalParams, - ServiceGatewaysUpdateTagsResponse, - ServiceGatewayUpdateAddressLocationsRequest, - ServiceGatewaysUpdateAddressLocationsOptionalParams, - ServiceGatewaysUpdateAddressLocationsResponse, - ServiceGatewayUpdateServicesRequest, - ServiceGatewaysUpdateServicesOptionalParams, - ServiceGatewaysUpdateServicesResponse, - ServiceGatewaysListAllNextResponse, - ServiceGatewaysListNextResponse, - ServiceGatewaysGetAddressLocationsNextResponse, - ServiceGatewaysGetServicesNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ServiceGateways operations. */ -export class ServiceGatewaysImpl implements ServiceGateways { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ServiceGateways class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the service gateways in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: ServiceGatewaysListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: ServiceGatewaysListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ServiceGatewaysListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: ServiceGatewaysListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all the service gateways in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: ServiceGatewaysListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: ServiceGatewaysListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ServiceGatewaysListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: ServiceGatewaysListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get address locations in service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - public listAddressLocations( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetAddressLocationsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.getAddressLocationsPagingAll(resourceGroupName, serviceGatewayName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.getAddressLocationsPagingPage( - resourceGroupName, - serviceGatewayName, - options, - settings, - ); - }, - }; - } - - private async *getAddressLocationsPagingPage( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetAddressLocationsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ServiceGatewaysGetAddressLocationsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._getAddressLocations(resourceGroupName, serviceGatewayName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._getAddressLocationsNext( - resourceGroupName, - serviceGatewayName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *getAddressLocationsPagingAll( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetAddressLocationsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.getAddressLocationsPagingPage( - resourceGroupName, - serviceGatewayName, - options, - )) { - yield* page; - } - } - - /** - * Get Services in service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - public listServices( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetServicesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.getServicesPagingAll(resourceGroupName, serviceGatewayName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.getServicesPagingPage(resourceGroupName, serviceGatewayName, options, settings); - }, - }; - } - - private async *getServicesPagingPage( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetServicesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ServiceGatewaysGetServicesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._getServices(resourceGroupName, serviceGatewayName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._getServicesNext( - resourceGroupName, - serviceGatewayName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *getServicesPagingAll( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetServicesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.getServicesPagingPage( - resourceGroupName, - serviceGatewayName, - options, - )) { - yield* page; - } - } - - /** - * Deletes the specified service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysDeleteOptionalParams, - ): Promise< - SimplePollerLike, ServiceGatewaysDeleteResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceGatewayName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - ServiceGatewaysDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, serviceGatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceGatewayName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or update service gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGateway, - options?: ServiceGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServiceGatewaysCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceGatewayName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ServiceGatewaysCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or update service gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGateway, - options?: ServiceGatewaysCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceGatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates a service gateway tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to update service gateway tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - serviceGatewayName: string, - parameters: TagsObject, - options?: ServiceGatewaysUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceGatewayName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all the service gateways in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: ServiceGatewaysListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all the service gateways in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: ServiceGatewaysListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Creates or updates address locations within the service gateway. - * - * The request supports both full and partial update modes at two levels: location and address. - * - * Full update replaces all existing data. - * - * Partial update modifies only the specified entries: - * - * For location-level partial updates, if no address is provided, the existing address will be deleted. - * - * For address-level partial updates, if no services are provided, the existing services will be - * considered for deletion. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or updates address locations in service gateway - * operation. - * @param options The options parameters. - */ - async beginUpdateAddressLocations( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGatewayUpdateAddressLocationsRequest, - options?: ServiceGatewaysUpdateAddressLocationsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServiceGatewaysUpdateAddressLocationsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceGatewayName, parameters, options }, - spec: updateAddressLocationsOperationSpec, - }); - const poller = await createHttpPoller< - ServiceGatewaysUpdateAddressLocationsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates address locations within the service gateway. - * - * The request supports both full and partial update modes at two levels: location and address. - * - * Full update replaces all existing data. - * - * Partial update modifies only the specified entries: - * - * For location-level partial updates, if no address is provided, the existing address will be deleted. - * - * For address-level partial updates, if no services are provided, the existing services will be - * considered for deletion. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or updates address locations in service gateway - * operation. - * @param options The options parameters. - */ - async beginUpdateAddressLocationsAndWait( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGatewayUpdateAddressLocationsRequest, - options?: ServiceGatewaysUpdateAddressLocationsOptionalParams, - ): Promise { - const poller = await this.beginUpdateAddressLocations( - resourceGroupName, - serviceGatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Creates, updates, or deletes services within the service gateway. - * The request supports both full and partial update modes at the service level. - * - * Full update replaces all existing services with the new list provided in the request. - * Partial update modifies only the specified services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or updates services in service gateway - * operation. - * @param options The options parameters. - */ - async beginUpdateServices( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGatewayUpdateServicesRequest, - options?: ServiceGatewaysUpdateServicesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServiceGatewaysUpdateServicesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceGatewayName, parameters, options }, - spec: updateServicesOperationSpec, - }); - const poller = await createHttpPoller< - ServiceGatewaysUpdateServicesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates, updates, or deletes services within the service gateway. - * The request supports both full and partial update modes at the service level. - * - * Full update replaces all existing services with the new list provided in the request. - * Partial update modifies only the specified services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or updates services in service gateway - * operation. - * @param options The options parameters. - */ - async beginUpdateServicesAndWait( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGatewayUpdateServicesRequest, - options?: ServiceGatewaysUpdateServicesOptionalParams, - ): Promise { - const poller = await this.beginUpdateServices( - resourceGroupName, - serviceGatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Get address locations in service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - private _getAddressLocations( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetAddressLocationsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceGatewayName, options }, - getAddressLocationsOperationSpec, - ); - } - - /** - * Get Services in service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - private _getServices( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetServicesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceGatewayName, options }, - getServicesOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: ServiceGatewaysListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: ServiceGatewaysListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * GetAddressLocationsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param nextLink The nextLink from the previous successful call to the GetAddressLocations method. - * @param options The options parameters. - */ - private _getAddressLocationsNext( - resourceGroupName: string, - serviceGatewayName: string, - nextLink: string, - options?: ServiceGatewaysGetAddressLocationsNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceGatewayName, nextLink, options }, - getAddressLocationsNextOperationSpec, - ); - } - - /** - * GetServicesNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param nextLink The nextLink from the previous successful call to the GetServices method. - * @param options The options parameters. - */ - private _getServicesNext( - resourceGroupName: string, - serviceGatewayName: string, - nextLink: string, - options?: ServiceGatewaysGetServicesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceGatewayName, nextLink, options }, - getServicesNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.ServiceGatewaysDeleteHeaders, - }, - 201: { - headersMapper: Mappers.ServiceGatewaysDeleteHeaders, - }, - 202: { - headersMapper: Mappers.ServiceGatewaysDeleteHeaders, - }, - 204: { - headersMapper: Mappers.ServiceGatewaysDeleteHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.serviceGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.serviceGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ServiceGateway, - }, - 201: { - bodyMapper: Mappers.ServiceGateway, - }, - 202: { - bodyMapper: Mappers.ServiceGateway, - }, - 204: { - bodyMapper: Mappers.ServiceGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters82, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.serviceGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ServiceGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.serviceGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/serviceGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1], - headerParameters: [Parameters.accept], - serializer, -}; -const updateAddressLocationsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}/updateAddressLocations", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.ServiceGatewaysUpdateAddressLocationsHeaders, - }, - 201: { - headersMapper: Mappers.ServiceGatewaysUpdateAddressLocationsHeaders, - }, - 202: { - headersMapper: Mappers.ServiceGatewaysUpdateAddressLocationsHeaders, - }, - 204: { - headersMapper: Mappers.ServiceGatewaysUpdateAddressLocationsHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters83, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.serviceGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateServicesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}/updateServices", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.ServiceGatewaysUpdateServicesHeaders, - }, - 201: { - headersMapper: Mappers.ServiceGatewaysUpdateServicesHeaders, - }, - 202: { - headersMapper: Mappers.ServiceGatewaysUpdateServicesHeaders, - }, - 204: { - headersMapper: Mappers.ServiceGatewaysUpdateServicesHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters84, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.serviceGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getAddressLocationsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}/addressLocations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GetServiceGatewayAddressLocationsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.serviceGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getServicesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}/services", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GetServiceGatewayServicesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.serviceGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.resourceGroupName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getAddressLocationsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GetServiceGatewayAddressLocationsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.resourceGroupName1, - Parameters.serviceGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getServicesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GetServiceGatewayServicesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.resourceGroupName1, - Parameters.serviceGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/serviceTagInformationOperations.ts b/sdk/network/arm-network/src/operations/serviceTagInformationOperations.ts deleted file mode 100644 index 2c13407950ed..000000000000 --- a/sdk/network/arm-network/src/operations/serviceTagInformationOperations.ts +++ /dev/null @@ -1,163 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ServiceTagInformationOperations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - ServiceTagInformation, - ServiceTagInformationListNextOptionalParams, - ServiceTagInformationListOptionalParams, - ServiceTagInformationListResponse, - ServiceTagInformationListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ServiceTagInformationOperations operations. */ -export class ServiceTagInformationOperationsImpl implements ServiceTagInformationOperations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ServiceTagInformationOperations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets a list of service tag information resources with pagination. - * @param location The location that will be used as a reference for cloud (not as a filter based on - * location, you will get the list of service tags with prefix details across all regions but limited - * to the cloud that your subscription belongs to). - * @param options The options parameters. - */ - public list( - location: string, - options?: ServiceTagInformationListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(location, options, settings); - }, - }; - } - - private async *listPagingPage( - location: string, - options?: ServiceTagInformationListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ServiceTagInformationListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(location, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(location, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - location: string, - options?: ServiceTagInformationListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(location, options)) { - yield* page; - } - } - - /** - * Gets a list of service tag information resources with pagination. - * @param location The location that will be used as a reference for cloud (not as a filter based on - * location, you will get the list of service tags with prefix details across all regions but limited - * to the cloud that your subscription belongs to). - * @param options The options parameters. - */ - private _list( - location: string, - options?: ServiceTagInformationListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, options }, listOperationSpec); - } - - /** - * ListNext - * @param location The location that will be used as a reference for cloud (not as a filter based on - * location, you will get the list of service tags with prefix details across all regions but limited - * to the cloud that your subscription belongs to). - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - location: string, - nextLink: string, - options?: ServiceTagInformationListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTagDetails", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceTagInformationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.noAddressPrefixes, Parameters.tagName], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceTagInformationListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/serviceTags.ts b/sdk/network/arm-network/src/operations/serviceTags.ts deleted file mode 100644 index 52605bcad159..000000000000 --- a/sdk/network/arm-network/src/operations/serviceTags.ts +++ /dev/null @@ -1,58 +0,0 @@ -// 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 type { ServiceTags } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { ServiceTagsListOptionalParams, ServiceTagsListResponse } from "../models/index.js"; - -/** Class containing ServiceTags operations. */ -export class ServiceTagsImpl implements ServiceTags { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class ServiceTags class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets a list of service tag information resources. - * @param location The location that will be used as a reference for version (not as a filter based on - * location, you will get the list of service tags with prefix details across all regions but limited - * to the cloud that your subscription belongs to). - * @param options The options parameters. - */ - list( - location: string, - options?: ServiceTagsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, options }, listOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceTagsListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/staticCidrs.ts b/sdk/network/arm-network/src/operations/staticCidrs.ts deleted file mode 100644 index 19a40605f70f..000000000000 --- a/sdk/network/arm-network/src/operations/staticCidrs.ts +++ /dev/null @@ -1,459 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { StaticCidrs } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - StaticCidr, - StaticCidrsListNextOptionalParams, - StaticCidrsListOptionalParams, - StaticCidrsListResponse, - StaticCidrsCreateOptionalParams, - StaticCidrsCreateResponse, - StaticCidrsGetOptionalParams, - StaticCidrsGetResponse, - StaticCidrsDeleteOptionalParams, - StaticCidrsDeleteResponse, - StaticCidrsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing StaticCidrs operations. */ -export class StaticCidrsImpl implements StaticCidrs { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class StaticCidrs class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets list of Static CIDR resources at Network Manager level. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: StaticCidrsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkManagerName, poolName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkManagerName, - poolName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: StaticCidrsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: StaticCidrsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, poolName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - poolName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: StaticCidrsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkManagerName, - poolName, - options, - )) { - yield* page; - } - } - - /** - * Gets list of Static CIDR resources at Network Manager level. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: StaticCidrsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, poolName, options }, - listOperationSpec, - ); - } - - /** - * Creates/Updates the Static CIDR resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName IP Address Manager Pool resource name. - * @param staticCidrName Static Cidr allocation name. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - staticCidrName: string, - options?: StaticCidrsCreateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - options, - }, - createOperationSpec, - ); - } - - /** - * Gets the specific Static CIDR resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param staticCidrName StaticCidr resource name to retrieve. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - staticCidrName: string, - options?: StaticCidrsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - options, - }, - getOperationSpec, - ); - } - - /** - * Delete the Static CIDR resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param staticCidrName StaticCidr resource name to delete. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - staticCidrName: string, - options?: StaticCidrsDeleteOptionalParams, - ): Promise< - SimplePollerLike, StaticCidrsDeleteResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - StaticCidrsDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the Static CIDR resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param staticCidrName StaticCidr resource name to delete. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - staticCidrName: string, - options?: StaticCidrsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - poolName, - staticCidrName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - nextLink: string, - options?: StaticCidrsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, poolName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StaticCidrList, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken, - Parameters.skip, - Parameters.top1, - Parameters.sortKey, - Parameters.sortValue, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.poolName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.StaticCidr, - }, - 201: { - bodyMapper: Mappers.StaticCidr, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - requestBody: Parameters.body2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.poolName, - Parameters.staticCidrName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StaticCidr, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.poolName, - Parameters.staticCidrName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.StaticCidrsDeleteHeaders, - }, - 201: { - headersMapper: Mappers.StaticCidrsDeleteHeaders, - }, - 202: { - headersMapper: Mappers.StaticCidrsDeleteHeaders, - }, - 204: { - headersMapper: Mappers.StaticCidrsDeleteHeaders, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.poolName, - Parameters.staticCidrName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StaticCidrList, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName1, - Parameters.poolName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/staticMembers.ts b/sdk/network/arm-network/src/operations/staticMembers.ts deleted file mode 100644 index 6685b03c32fc..000000000000 --- a/sdk/network/arm-network/src/operations/staticMembers.ts +++ /dev/null @@ -1,377 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { StaticMembers } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - StaticMember, - StaticMembersListNextOptionalParams, - StaticMembersListOptionalParams, - StaticMembersListResponse, - StaticMembersGetOptionalParams, - StaticMembersGetResponse, - StaticMembersCreateOrUpdateOptionalParams, - StaticMembersCreateOrUpdateResponse, - StaticMembersDeleteOptionalParams, - StaticMembersListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing StaticMembers operations. */ -export class StaticMembersImpl implements StaticMembers { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class StaticMembers class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists the specified static member. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - options?: StaticMembersListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - networkManagerName, - networkGroupName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkManagerName, - networkGroupName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - options?: StaticMembersListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: StaticMembersListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, networkGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - networkGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - options?: StaticMembersListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkManagerName, - networkGroupName, - options, - )) { - yield* page; - } - } - - /** - * Gets the specified static member. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param staticMemberName The name of the static member. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - staticMemberName: string, - options?: StaticMembersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates a static member. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param staticMemberName The name of the static member. - * @param parameters Parameters supplied to the specify the static member to create - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - staticMemberName: string, - parameters: StaticMember, - options?: StaticMembersCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a static member. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param staticMemberName The name of the static member. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - staticMemberName: string, - options?: StaticMembersDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - networkGroupName, - staticMemberName, - options, - }, - deleteOperationSpec, - ); - } - - /** - * Lists the specified static member. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - options?: StaticMembersListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, networkGroupName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - nextLink: string, - options?: StaticMembersListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - networkManagerName, - networkGroupName, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StaticMember, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - Parameters.networkGroupName, - Parameters.staticMemberName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.StaticMember, - }, - 201: { - bodyMapper: Mappers.StaticMember, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters42, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - Parameters.networkGroupName, - Parameters.staticMemberName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - Parameters.networkGroupName, - Parameters.staticMemberName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StaticMemberListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName, - Parameters.networkGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StaticMemberListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName, - Parameters.networkGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/subnets.ts b/sdk/network/arm-network/src/operations/subnets.ts deleted file mode 100644 index 87e35bb4c316..000000000000 --- a/sdk/network/arm-network/src/operations/subnets.ts +++ /dev/null @@ -1,727 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { Subnets } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - Subnet, - SubnetsListNextOptionalParams, - SubnetsListOptionalParams, - SubnetsListResponse, - SubnetsDeleteOptionalParams, - SubnetsGetOptionalParams, - SubnetsGetResponse, - SubnetsCreateOrUpdateOptionalParams, - SubnetsCreateOrUpdateResponse, - PrepareNetworkPoliciesRequest, - SubnetsPrepareNetworkPoliciesOptionalParams, - UnprepareNetworkPoliciesRequest, - SubnetsUnprepareNetworkPoliciesOptionalParams, - SubnetsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Subnets operations. */ -export class SubnetsImpl implements Subnets { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class Subnets class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all subnets in a virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - virtualNetworkName: string, - options?: SubnetsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, virtualNetworkName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, virtualNetworkName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - virtualNetworkName: string, - options?: SubnetsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SubnetsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, virtualNetworkName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - virtualNetworkName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - virtualNetworkName: string, - options?: SubnetsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, virtualNetworkName, options)) { - yield* page; - } - } - - /** - * Deletes the specified subnet. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - options?: SubnetsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkName, subnetName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified subnet. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - options?: SubnetsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualNetworkName, - subnetName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified subnet by virtual network and resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - options?: SubnetsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, subnetName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a subnet in the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param subnetParameters Parameters supplied to the create or update subnet operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - subnetParameters: Subnet, - options?: SubnetsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, SubnetsCreateOrUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - SubnetsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a subnet in the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param subnetParameters Parameters supplied to the create or update subnet operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - subnetParameters: Subnet, - options?: SubnetsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualNetworkName, - subnetName, - subnetParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Prepares a subnet by applying network intent policies. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying - * network intent policies. - * @param options The options parameters. - */ - async beginPrepareNetworkPolicies( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, - options?: SubnetsPrepareNetworkPoliciesOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkName, - subnetName, - prepareNetworkPoliciesRequestParameters, - options, - }, - spec: prepareNetworkPoliciesOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Prepares a subnet by applying network intent policies. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying - * network intent policies. - * @param options The options parameters. - */ - async beginPrepareNetworkPoliciesAndWait( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, - options?: SubnetsPrepareNetworkPoliciesOptionalParams, - ): Promise { - const poller = await this.beginPrepareNetworkPolicies( - resourceGroupName, - virtualNetworkName, - subnetName, - prepareNetworkPoliciesRequestParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Unprepares a subnet by removing network intent policies. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param unprepareNetworkPoliciesRequestParameters Parameters supplied to unprepare subnet to remove - * network intent policies. - * @param options The options parameters. - */ - async beginUnprepareNetworkPolicies( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, - options?: SubnetsUnprepareNetworkPoliciesOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkName, - subnetName, - unprepareNetworkPoliciesRequestParameters, - options, - }, - spec: unprepareNetworkPoliciesOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Unprepares a subnet by removing network intent policies. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param unprepareNetworkPoliciesRequestParameters Parameters supplied to unprepare subnet to remove - * network intent policies. - * @param options The options parameters. - */ - async beginUnprepareNetworkPoliciesAndWait( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, - options?: SubnetsUnprepareNetworkPoliciesOptionalParams, - ): Promise { - const poller = await this.beginUnprepareNetworkPolicies( - resourceGroupName, - virtualNetworkName, - subnetName, - unprepareNetworkPoliciesRequestParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all subnets in a virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - virtualNetworkName: string, - options?: SubnetsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - virtualNetworkName: string, - nextLink: string, - options?: SubnetsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - Parameters.subnetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Subnet, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - Parameters.subnetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Subnet, - }, - 201: { - bodyMapper: Mappers.Subnet, - }, - 202: { - bodyMapper: Mappers.Subnet, - }, - 204: { - bodyMapper: Mappers.Subnet, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.subnetParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - Parameters.subnetName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const prepareNetworkPoliciesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.prepareNetworkPoliciesRequestParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - Parameters.subnetName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const unprepareNetworkPoliciesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.unprepareNetworkPoliciesRequestParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - Parameters.subnetName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubnetListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubnetListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/subscriptionNetworkManagerConnections.ts b/sdk/network/arm-network/src/operations/subscriptionNetworkManagerConnections.ts deleted file mode 100644 index 0a44187c865f..000000000000 --- a/sdk/network/arm-network/src/operations/subscriptionNetworkManagerConnections.ts +++ /dev/null @@ -1,260 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { SubscriptionNetworkManagerConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - NetworkManagerConnection, - SubscriptionNetworkManagerConnectionsListNextOptionalParams, - SubscriptionNetworkManagerConnectionsListOptionalParams, - SubscriptionNetworkManagerConnectionsListResponse, - SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams, - SubscriptionNetworkManagerConnectionsCreateOrUpdateResponse, - SubscriptionNetworkManagerConnectionsGetOptionalParams, - SubscriptionNetworkManagerConnectionsGetResponse, - SubscriptionNetworkManagerConnectionsDeleteOptionalParams, - SubscriptionNetworkManagerConnectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing SubscriptionNetworkManagerConnections operations. */ -export class SubscriptionNetworkManagerConnectionsImpl implements SubscriptionNetworkManagerConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class SubscriptionNetworkManagerConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List all network manager connections created by this subscription. - * @param options The options parameters. - */ - public list( - options?: SubscriptionNetworkManagerConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: SubscriptionNetworkManagerConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SubscriptionNetworkManagerConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: SubscriptionNetworkManagerConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Create a network manager connection on this subscription. - * @param networkManagerConnectionName Name for the network manager connection. - * @param parameters Network manager connection to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - networkManagerConnectionName: string, - parameters: NetworkManagerConnection, - options?: SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { networkManagerConnectionName, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Get a specified connection created by this subscription. - * @param networkManagerConnectionName Name for the network manager connection. - * @param options The options parameters. - */ - get( - networkManagerConnectionName: string, - options?: SubscriptionNetworkManagerConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { networkManagerConnectionName, options }, - getOperationSpec, - ); - } - - /** - * Delete specified connection created by this subscription. - * @param networkManagerConnectionName Name for the network manager connection. - * @param options The options parameters. - */ - delete( - networkManagerConnectionName: string, - options?: SubscriptionNetworkManagerConnectionsDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { networkManagerConnectionName, options }, - deleteOperationSpec, - ); - } - - /** - * List all network manager connections created by this subscription. - * @param options The options parameters. - */ - private _list( - options?: SubscriptionNetworkManagerConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: SubscriptionNetworkManagerConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerConnection, - }, - 201: { - bodyMapper: Mappers.NetworkManagerConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters40, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.networkManagerConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.networkManagerConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.networkManagerConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken1], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkManagerConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/usages.ts b/sdk/network/arm-network/src/operations/usages.ts deleted file mode 100644 index 1dd06ef49165..000000000000 --- a/sdk/network/arm-network/src/operations/usages.ts +++ /dev/null @@ -1,154 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { Usages } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - Usage, - UsagesListNextOptionalParams, - UsagesListOptionalParams, - UsagesListResponse, - UsagesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Usages operations. */ -export class UsagesImpl implements Usages { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class Usages class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List network usages for a subscription. - * @param location The location where resource usage is queried. - * @param options The options parameters. - */ - public list( - location: string, - options?: UsagesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(location, options, settings); - }, - }; - } - - private async *listPagingPage( - location: string, - options?: UsagesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: UsagesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(location, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(location, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - location: string, - options?: UsagesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(location, options)) { - yield* page; - } - } - - /** - * List network usages for a subscription. - * @param location The location where resource usage is queried. - * @param options The options parameters. - */ - private _list(location: string, options?: UsagesListOptionalParams): Promise { - return this.client.sendOperationRequest({ location, options }, listOperationSpec); - } - - /** - * ListNext - * @param location The location where resource usage is queried. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - location: string, - nextLink: string, - options?: UsagesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ location, nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UsagesListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location1], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UsagesListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/verifierWorkspaces.ts b/sdk/network/arm-network/src/operations/verifierWorkspaces.ts deleted file mode 100644 index 8447ea876227..000000000000 --- a/sdk/network/arm-network/src/operations/verifierWorkspaces.ts +++ /dev/null @@ -1,457 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VerifierWorkspaces } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VerifierWorkspace, - VerifierWorkspacesListNextOptionalParams, - VerifierWorkspacesListOptionalParams, - VerifierWorkspacesListResponse, - VerifierWorkspacesGetOptionalParams, - VerifierWorkspacesGetResponse, - VerifierWorkspacesCreateOptionalParams, - VerifierWorkspacesCreateResponse, - VerifierWorkspacesUpdateOptionalParams, - VerifierWorkspacesUpdateResponse, - VerifierWorkspacesDeleteOptionalParams, - VerifierWorkspacesDeleteResponse, - VerifierWorkspacesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VerifierWorkspaces operations. */ -export class VerifierWorkspacesImpl implements VerifierWorkspaces { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VerifierWorkspaces class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets list of Verifier Workspaces. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkManagerName: string, - options?: VerifierWorkspacesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkManagerName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, networkManagerName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkManagerName: string, - options?: VerifierWorkspacesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VerifierWorkspacesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkManagerName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkManagerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkManagerName: string, - options?: VerifierWorkspacesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, networkManagerName, options)) { - yield* page; - } - } - - /** - * Gets list of Verifier Workspaces. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkManagerName: string, - options?: VerifierWorkspacesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, options }, - listOperationSpec, - ); - } - - /** - * Gets Verifier Workspace. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: VerifierWorkspacesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, workspaceName, options }, - getOperationSpec, - ); - } - - /** - * Creates Verifier Workspace. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param body Verifier Workspace object to create/update. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - body: VerifierWorkspace, - options?: VerifierWorkspacesCreateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, workspaceName, body, options }, - createOperationSpec, - ); - } - - /** - * Updates Verifier Workspace. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: VerifierWorkspacesUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, workspaceName, options }, - updateOperationSpec, - ); - } - - /** - * Deletes Verifier Workspace. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: VerifierWorkspacesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VerifierWorkspacesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, networkManagerName, workspaceName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - VerifierWorkspacesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes Verifier Workspace. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: VerifierWorkspacesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkManagerName, - workspaceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkManagerName: string, - nextLink: string, - options?: VerifierWorkspacesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkManagerName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VerifierWorkspaceListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken, - Parameters.skip, - Parameters.top1, - Parameters.sortKey, - Parameters.sortValue, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VerifierWorkspace, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VerifierWorkspace, - }, - 201: { - bodyMapper: Mappers.VerifierWorkspace, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - requestBody: Parameters.body5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType, Parameters.ifMatch], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VerifierWorkspace, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - requestBody: Parameters.body6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType, Parameters.ifMatch], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.VerifierWorkspacesDeleteHeaders, - }, - 201: { - headersMapper: Mappers.VerifierWorkspacesDeleteHeaders, - }, - 202: { - headersMapper: Mappers.VerifierWorkspacesDeleteHeaders, - }, - 204: { - headersMapper: Mappers.VerifierWorkspacesDeleteHeaders, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkManagerName1, - Parameters.workspaceName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VerifierWorkspaceListResult, - }, - default: { - bodyMapper: Mappers.CommonErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkManagerName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/vipSwap.ts b/sdk/network/arm-network/src/operations/vipSwap.ts deleted file mode 100644 index 25e63e9198a0..000000000000 --- a/sdk/network/arm-network/src/operations/vipSwap.ts +++ /dev/null @@ -1,221 +0,0 @@ -// 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 type { VipSwap } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VipSwapGetOptionalParams, - VipSwapGetResponse, - SwapResource, - VipSwapCreateOptionalParams, - VipSwapListOptionalParams, - VipSwapListResponse, -} from "../models/index.js"; - -/** Class containing VipSwap operations. */ -export class VipSwapImpl implements VipSwap { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VipSwap class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type - * on a cloud service can either be Staging or Production - * @param groupName The name of the resource group. - * @param resourceName The name of the cloud service. - * @param options The options parameters. - */ - get( - groupName: string, - resourceName: string, - options?: VipSwapGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ groupName, resourceName, options }, getOperationSpec); - } - - /** - * Performs vip swap operation on swappable cloud services. - * @param groupName The name of the resource group. - * @param resourceName The name of the cloud service. - * @param parameters SwapResource object where slot type should be the target slot after vip swap for - * the specified cloud service. - * @param options The options parameters. - */ - async beginCreate( - groupName: string, - resourceName: string, - parameters: SwapResource, - options?: VipSwapCreateOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { groupName, resourceName, parameters, options }, - spec: createOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Performs vip swap operation on swappable cloud services. - * @param groupName The name of the resource group. - * @param resourceName The name of the cloud service. - * @param parameters SwapResource object where slot type should be the target slot after vip swap for - * the specified cloud service. - * @param options The options parameters. - */ - async beginCreateAndWait( - groupName: string, - resourceName: string, - parameters: SwapResource, - options?: VipSwapCreateOptionalParams, - ): Promise { - const poller = await this.beginCreate(groupName, resourceName, parameters, options); - return poller.pollUntilDone(); - } - - /** - * Gets the list of SwapResource which identifies the slot type for the specified cloud service. The - * slot type on a cloud service can either be Staging or Production - * @param groupName The name of the resource group. - * @param resourceName The name of the cloud service. - * @param options The options parameters. - */ - list( - groupName: string, - resourceName: string, - options?: VipSwapListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { groupName, resourceName, options }, - listOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/cloudServices/{resourceName}/providers/Microsoft.Network/cloudServiceSlots/{singletonResource}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SwapResource, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.groupName, - Parameters.resourceName, - Parameters.singletonResource, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/cloudServices/{resourceName}/providers/Microsoft.Network/cloudServiceSlots/{singletonResource}", - httpMethod: "PUT", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters13, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.groupName, - Parameters.resourceName, - Parameters.singletonResource, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/cloudServices/{resourceName}/providers/Microsoft.Network/cloudServiceSlots", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SwapResourceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.groupName, - Parameters.resourceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualApplianceSites.ts b/sdk/network/arm-network/src/operations/virtualApplianceSites.ts deleted file mode 100644 index 9022fdd943b7..000000000000 --- a/sdk/network/arm-network/src/operations/virtualApplianceSites.ts +++ /dev/null @@ -1,494 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualApplianceSites } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualApplianceSite, - VirtualApplianceSitesListNextOptionalParams, - VirtualApplianceSitesListOptionalParams, - VirtualApplianceSitesListResponse, - VirtualApplianceSitesDeleteOptionalParams, - VirtualApplianceSitesGetOptionalParams, - VirtualApplianceSitesGetResponse, - VirtualApplianceSitesCreateOrUpdateOptionalParams, - VirtualApplianceSitesCreateOrUpdateResponse, - VirtualApplianceSitesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualApplianceSites operations. */ -export class VirtualApplianceSitesImpl implements VirtualApplianceSites { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualApplianceSites class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: VirtualApplianceSitesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, networkVirtualApplianceName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - networkVirtualApplianceName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: VirtualApplianceSitesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualApplianceSitesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, networkVirtualApplianceName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - networkVirtualApplianceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: VirtualApplianceSitesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - networkVirtualApplianceName, - options, - )) { - yield* page; - } - } - - /** - * Deletes the specified site from a Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param siteName The name of the site. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - networkVirtualApplianceName: string, - siteName: string, - options?: VirtualApplianceSitesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkVirtualApplianceName, - siteName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified site from a Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param siteName The name of the site. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - siteName: string, - options?: VirtualApplianceSitesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - networkVirtualApplianceName, - siteName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified Virtual Appliance Site. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param siteName The name of the site. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkVirtualApplianceName: string, - siteName: string, - options?: VirtualApplianceSitesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkVirtualApplianceName, siteName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the specified Network Virtual Appliance Site. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param siteName The name of the site. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance Site - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - networkVirtualApplianceName: string, - siteName: string, - parameters: VirtualApplianceSite, - options?: VirtualApplianceSitesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualApplianceSitesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - networkVirtualApplianceName, - siteName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualApplianceSitesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified Network Virtual Appliance Site. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param siteName The name of the site. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance Site - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - siteName: string, - parameters: VirtualApplianceSite, - options?: VirtualApplianceSitesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - networkVirtualApplianceName, - siteName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: VirtualApplianceSitesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkVirtualApplianceName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - networkVirtualApplianceName: string, - nextLink: string, - options?: VirtualApplianceSitesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, networkVirtualApplianceName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName, - Parameters.siteName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualApplianceSite, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName, - Parameters.siteName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualApplianceSite, - }, - 201: { - bodyMapper: Mappers.VirtualApplianceSite, - }, - 202: { - bodyMapper: Mappers.VirtualApplianceSite, - }, - 204: { - bodyMapper: Mappers.VirtualApplianceSite, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters55, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName, - Parameters.siteName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceSiteListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.networkVirtualApplianceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceSiteListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.networkVirtualApplianceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualApplianceSkus.ts b/sdk/network/arm-network/src/operations/virtualApplianceSkus.ts deleted file mode 100644 index d9195b8341f0..000000000000 --- a/sdk/network/arm-network/src/operations/virtualApplianceSkus.ts +++ /dev/null @@ -1,174 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualApplianceSkus } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - NetworkVirtualApplianceSku, - VirtualApplianceSkusListNextOptionalParams, - VirtualApplianceSkusListOptionalParams, - VirtualApplianceSkusListResponse, - VirtualApplianceSkusGetOptionalParams, - VirtualApplianceSkusGetResponse, - VirtualApplianceSkusListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualApplianceSkus operations. */ -export class VirtualApplianceSkusImpl implements VirtualApplianceSkus { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualApplianceSkus class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * List all SKUs available for a virtual appliance. - * @param options The options parameters. - */ - public list( - options?: VirtualApplianceSkusListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: VirtualApplianceSkusListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualApplianceSkusListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: VirtualApplianceSkusListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * List all SKUs available for a virtual appliance. - * @param options The options parameters. - */ - private _list( - options?: VirtualApplianceSkusListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Retrieves a single available sku for network virtual appliance. - * @param skuName Name of the Sku. - * @param options The options parameters. - */ - get( - skuName: string, - options?: VirtualApplianceSkusGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ skuName, options }, getOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: VirtualApplianceSkusListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceSkuListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus/{skuName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceSku, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.skuName], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkVirtualApplianceSkuListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualHubBgpConnection.ts b/sdk/network/arm-network/src/operations/virtualHubBgpConnection.ts deleted file mode 100644 index f1173ae1c681..000000000000 --- a/sdk/network/arm-network/src/operations/virtualHubBgpConnection.ts +++ /dev/null @@ -1,328 +0,0 @@ -// 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 type { VirtualHubBgpConnection } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualHubBgpConnectionGetOptionalParams, - VirtualHubBgpConnectionGetResponse, - BgpConnection, - VirtualHubBgpConnectionCreateOrUpdateOptionalParams, - VirtualHubBgpConnectionCreateOrUpdateResponse, - VirtualHubBgpConnectionDeleteOptionalParams, -} from "../models/index.js"; - -/** Class containing VirtualHubBgpConnection operations. */ -export class VirtualHubBgpConnectionImpl implements VirtualHubBgpConnection { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualHubBgpConnection class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves the details of a Virtual Hub Bgp Connection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, connectionName, options }, - getOperationSpec, - ); - } - - /** - * Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing - * VirtualHubBgpConnection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the connection. - * @param parameters Parameters of Bgp connection. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - parameters: BgpConnection, - options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubBgpConnectionCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualHubName, - connectionName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualHubBgpConnectionCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing - * VirtualHubBgpConnection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the connection. - * @param parameters Parameters of Bgp connection. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - parameters: BgpConnection, - options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualHubName, - connectionName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a VirtualHubBgpConnection. - * @param resourceGroupName The resource group name of the VirtualHubBgpConnection. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the connection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualHubName, connectionName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a VirtualHubBgpConnection. - * @param resourceGroupName The resource group name of the VirtualHubBgpConnection. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the connection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualHubName, - connectionName, - options, - ); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BgpConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.BgpConnection, - }, - 201: { - bodyMapper: Mappers.BgpConnection, - }, - 202: { - bodyMapper: Mappers.BgpConnection, - }, - 204: { - bodyMapper: Mappers.BgpConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters104, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualHubBgpConnections.ts b/sdk/network/arm-network/src/operations/virtualHubBgpConnections.ts deleted file mode 100644 index 2509cae30681..000000000000 --- a/sdk/network/arm-network/src/operations/virtualHubBgpConnections.ts +++ /dev/null @@ -1,514 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualHubBgpConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - BgpConnection, - VirtualHubBgpConnectionsListNextOptionalParams, - VirtualHubBgpConnectionsListOptionalParams, - VirtualHubBgpConnectionsListResponse, - VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, - VirtualHubBgpConnectionsListLearnedRoutesResponse, - VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, - VirtualHubBgpConnectionsListAdvertisedRoutesResponse, - VirtualHubBgpConnectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualHubBgpConnections operations. */ -export class VirtualHubBgpConnectionsImpl implements VirtualHubBgpConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualHubBgpConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves the details of all VirtualHubBgpConnections. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubBgpConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, virtualHubName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, virtualHubName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubBgpConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualHubBgpConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, virtualHubName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, virtualHubName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubBgpConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, virtualHubName, options)) { - yield* page; - } - } - - /** - * Retrieves the details of all VirtualHubBgpConnections. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubBgpConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, options }, - listOperationSpec, - ); - } - - /** - * Retrieves a list of routes the virtual hub bgp connection has learned. - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the virtual hub. - * @param connectionName The name of the virtual hub bgp connection. - * @param options The options parameters. - */ - async beginListLearnedRoutes( - resourceGroupName: string, - hubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubBgpConnectionsListLearnedRoutesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, hubName, connectionName, options }, - spec: listLearnedRoutesOperationSpec, - }); - const poller = await createHttpPoller< - VirtualHubBgpConnectionsListLearnedRoutesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Retrieves a list of routes the virtual hub bgp connection has learned. - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the virtual hub. - * @param connectionName The name of the virtual hub bgp connection. - * @param options The options parameters. - */ - async beginListLearnedRoutesAndWait( - resourceGroupName: string, - hubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, - ): Promise { - const poller = await this.beginListLearnedRoutes( - resourceGroupName, - hubName, - connectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the virtual hub. - * @param connectionName The name of the virtual hub bgp connection. - * @param options The options parameters. - */ - async beginListAdvertisedRoutes( - resourceGroupName: string, - hubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubBgpConnectionsListAdvertisedRoutesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, hubName, connectionName, options }, - spec: listAdvertisedRoutesOperationSpec, - }); - const poller = await createHttpPoller< - VirtualHubBgpConnectionsListAdvertisedRoutesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the virtual hub. - * @param connectionName The name of the virtual hub bgp connection. - * @param options The options parameters. - */ - async beginListAdvertisedRoutesAndWait( - resourceGroupName: string, - hubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, - ): Promise { - const poller = await this.beginListAdvertisedRoutes( - resourceGroupName, - hubName, - connectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - virtualHubName: string, - nextLink: string, - options?: VirtualHubBgpConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualHubBgpConnectionResults, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listLearnedRoutesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { - type: { - name: "Dictionary", - value: { - type: { - name: "Sequence", - element: { type: { name: "Composite", className: "PeerRoute" } }, - }, - }, - }, - }, - }, - 201: { - bodyMapper: { - type: { - name: "Dictionary", - value: { - type: { - name: "Sequence", - element: { type: { name: "Composite", className: "PeerRoute" } }, - }, - }, - }, - }, - }, - 202: { - bodyMapper: { - type: { - name: "Dictionary", - value: { - type: { - name: "Sequence", - element: { type: { name: "Composite", className: "PeerRoute" } }, - }, - }, - }, - }, - }, - 204: { - bodyMapper: { - type: { - name: "Dictionary", - value: { - type: { - name: "Sequence", - element: { type: { name: "Composite", className: "PeerRoute" } }, - }, - }, - }, - }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.hubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAdvertisedRoutesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { - type: { - name: "Dictionary", - value: { - type: { - name: "Sequence", - element: { type: { name: "Composite", className: "PeerRoute" } }, - }, - }, - }, - }, - }, - 201: { - bodyMapper: { - type: { - name: "Dictionary", - value: { - type: { - name: "Sequence", - element: { type: { name: "Composite", className: "PeerRoute" } }, - }, - }, - }, - }, - }, - 202: { - bodyMapper: { - type: { - name: "Dictionary", - value: { - type: { - name: "Sequence", - element: { type: { name: "Composite", className: "PeerRoute" } }, - }, - }, - }, - }, - }, - 204: { - bodyMapper: { - type: { - name: "Dictionary", - value: { - type: { - name: "Sequence", - element: { type: { name: "Composite", className: "PeerRoute" } }, - }, - }, - }, - }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.hubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualHubBgpConnectionResults, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualHubIpConfiguration.ts b/sdk/network/arm-network/src/operations/virtualHubIpConfiguration.ts deleted file mode 100644 index eaa379dfd81c..000000000000 --- a/sdk/network/arm-network/src/operations/virtualHubIpConfiguration.ts +++ /dev/null @@ -1,470 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualHubIpConfiguration } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - HubIpConfiguration, - VirtualHubIpConfigurationListNextOptionalParams, - VirtualHubIpConfigurationListOptionalParams, - VirtualHubIpConfigurationListResponse, - VirtualHubIpConfigurationGetOptionalParams, - VirtualHubIpConfigurationGetResponse, - VirtualHubIpConfigurationCreateOrUpdateOptionalParams, - VirtualHubIpConfigurationCreateOrUpdateResponse, - VirtualHubIpConfigurationDeleteOptionalParams, - VirtualHubIpConfigurationListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualHubIpConfiguration operations. */ -export class VirtualHubIpConfigurationImpl implements VirtualHubIpConfiguration { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualHubIpConfiguration class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves the details of all VirtualHubIpConfigurations. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubIpConfigurationListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, virtualHubName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, virtualHubName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubIpConfigurationListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualHubIpConfigurationListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, virtualHubName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, virtualHubName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubIpConfigurationListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, virtualHubName, options)) { - yield* page; - } - } - - /** - * Retrieves the details of a Virtual Hub Ip configuration. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param ipConfigName The name of the ipconfig. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - ipConfigName: string, - options?: VirtualHubIpConfigurationGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, ipConfigName, options }, - getOperationSpec, - ); - } - - /** - * Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing - * VirtualHubIpConfiguration. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param ipConfigName The name of the ipconfig. - * @param parameters Hub Ip Configuration parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - ipConfigName: string, - parameters: HubIpConfiguration, - options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubIpConfigurationCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualHubName, - ipConfigName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualHubIpConfigurationCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing - * VirtualHubIpConfiguration. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param ipConfigName The name of the ipconfig. - * @param parameters Hub Ip Configuration parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - ipConfigName: string, - parameters: HubIpConfiguration, - options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualHubName, - ipConfigName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a VirtualHubIpConfiguration. - * @param resourceGroupName The resource group name of the VirtualHubBgpConnection. - * @param virtualHubName The name of the VirtualHub. - * @param ipConfigName The name of the ipconfig. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualHubName: string, - ipConfigName: string, - options?: VirtualHubIpConfigurationDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualHubName, ipConfigName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a VirtualHubIpConfiguration. - * @param resourceGroupName The resource group name of the VirtualHubBgpConnection. - * @param virtualHubName The name of the VirtualHub. - * @param ipConfigName The name of the ipconfig. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - ipConfigName: string, - options?: VirtualHubIpConfigurationDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, virtualHubName, ipConfigName, options); - return poller.pollUntilDone(); - } - - /** - * Retrieves the details of all VirtualHubIpConfigurations. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubIpConfigurationListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - virtualHubName: string, - nextLink: string, - options?: VirtualHubIpConfigurationListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HubIpConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - Parameters.ipConfigName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.HubIpConfiguration, - }, - 201: { - bodyMapper: Mappers.HubIpConfiguration, - }, - 202: { - bodyMapper: Mappers.HubIpConfiguration, - }, - 204: { - bodyMapper: Mappers.HubIpConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters105, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - Parameters.ipConfigName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - Parameters.ipConfigName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualHubIpConfigurationResults, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualHubIpConfigurationResults, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualHubRouteTableV2S.ts b/sdk/network/arm-network/src/operations/virtualHubRouteTableV2S.ts deleted file mode 100644 index 86f24596ac87..000000000000 --- a/sdk/network/arm-network/src/operations/virtualHubRouteTableV2S.ts +++ /dev/null @@ -1,477 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualHubRouteTableV2S } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualHubRouteTableV2, - VirtualHubRouteTableV2SListNextOptionalParams, - VirtualHubRouteTableV2SListOptionalParams, - VirtualHubRouteTableV2SListResponse, - VirtualHubRouteTableV2SGetOptionalParams, - VirtualHubRouteTableV2SGetResponse, - VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, - VirtualHubRouteTableV2SCreateOrUpdateResponse, - VirtualHubRouteTableV2SDeleteOptionalParams, - VirtualHubRouteTableV2SListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualHubRouteTableV2S operations. */ -export class VirtualHubRouteTableV2SImpl implements VirtualHubRouteTableV2S { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualHubRouteTableV2S class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves the details of all VirtualHubRouteTableV2s. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubRouteTableV2SListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, virtualHubName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, virtualHubName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubRouteTableV2SListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualHubRouteTableV2SListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, virtualHubName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, virtualHubName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubRouteTableV2SListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, virtualHubName, options)) { - yield* page; - } - } - - /** - * Retrieves the details of a VirtualHubRouteTableV2. - * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the VirtualHubRouteTableV2. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: VirtualHubRouteTableV2SGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, routeTableName, options }, - getOperationSpec, - ); - } - - /** - * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing - * VirtualHubRouteTableV2. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the VirtualHubRouteTableV2. - * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update - * VirtualHubRouteTableV2. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, - options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubRouteTableV2SCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualHubName, - routeTableName, - virtualHubRouteTableV2Parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualHubRouteTableV2SCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing - * VirtualHubRouteTableV2. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the VirtualHubRouteTableV2. - * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update - * VirtualHubRouteTableV2. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, - options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualHubName, - routeTableName, - virtualHubRouteTableV2Parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a VirtualHubRouteTableV2. - * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the VirtualHubRouteTableV2. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: VirtualHubRouteTableV2SDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualHubName, routeTableName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a VirtualHubRouteTableV2. - * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the VirtualHubRouteTableV2. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: VirtualHubRouteTableV2SDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualHubName, - routeTableName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves the details of all VirtualHubRouteTableV2s. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubRouteTableV2SListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - virtualHubName: string, - nextLink: string, - options?: VirtualHubRouteTableV2SListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualHubRouteTableV2, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualHubRouteTableV2, - }, - 201: { - bodyMapper: Mappers.VirtualHubRouteTableV2, - }, - 202: { - bodyMapper: Mappers.VirtualHubRouteTableV2, - }, - 204: { - bodyMapper: Mappers.VirtualHubRouteTableV2, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.virtualHubRouteTableV2Parameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.routeTableName, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualHubRouteTableV2SResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualHubRouteTableV2SResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualHubs.ts b/sdk/network/arm-network/src/operations/virtualHubs.ts deleted file mode 100644 index 829638cc11e8..000000000000 --- a/sdk/network/arm-network/src/operations/virtualHubs.ts +++ /dev/null @@ -1,986 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualHubs } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualHub, - VirtualHubsListByResourceGroupNextOptionalParams, - VirtualHubsListByResourceGroupOptionalParams, - VirtualHubsListByResourceGroupResponse, - VirtualHubsListNextOptionalParams, - VirtualHubsListOptionalParams, - VirtualHubsListResponse, - VirtualHubsGetOptionalParams, - VirtualHubsGetResponse, - VirtualHubsCreateOrUpdateOptionalParams, - VirtualHubsCreateOrUpdateResponse, - TagsObject, - VirtualHubsUpdateTagsOptionalParams, - VirtualHubsUpdateTagsResponse, - VirtualHubsDeleteOptionalParams, - VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, - VirtualHubsGetEffectiveVirtualHubRoutesResponse, - GetInboundRoutesParameters, - VirtualHubsGetInboundRoutesOptionalParams, - VirtualHubsGetInboundRoutesResponse, - GetOutboundRoutesParameters, - VirtualHubsGetOutboundRoutesOptionalParams, - VirtualHubsGetOutboundRoutesResponse, - VirtualHubsListByResourceGroupNextResponse, - VirtualHubsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualHubs operations. */ -export class VirtualHubsImpl implements VirtualHubs { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualHubs class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the VirtualHubs in a resource group. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VirtualHubsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VirtualHubsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualHubsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VirtualHubsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Lists all the VirtualHubs in a subscription. - * @param options The options parameters. - */ - public list(options?: VirtualHubsListOptionalParams): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: VirtualHubsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualHubsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: VirtualHubsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Retrieves the details of a VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, options }, - getOperationSpec, - ); - } - - /** - * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param virtualHubParameters Parameters supplied to create or update VirtualHub. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - virtualHubParameters: VirtualHub, - options?: VirtualHubsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualHubName, - virtualHubParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualHubsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param virtualHubParameters Parameters supplied to create or update VirtualHub. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - virtualHubParameters: VirtualHub, - options?: VirtualHubsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualHubName, - virtualHubParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates VirtualHub tags. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param virtualHubParameters Parameters supplied to update VirtualHub tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - virtualHubName: string, - virtualHubParameters: TagsObject, - options?: VirtualHubsUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualHubName, virtualHubParameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Deletes a VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualHubName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, virtualHubName, options); - return poller.pollUntilDone(); - } - - /** - * Lists all the VirtualHubs in a resource group. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VirtualHubsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Lists all the VirtualHubs in a subscription. - * @param options The options parameters. - */ - private _list(options?: VirtualHubsListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - async beginGetEffectiveVirtualHubRoutes( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubsGetEffectiveVirtualHubRoutesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualHubName, options }, - spec: getEffectiveVirtualHubRoutesOperationSpec, - }); - const poller = await createHttpPoller< - VirtualHubsGetEffectiveVirtualHubRoutesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - async beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, - ): Promise { - const poller = await this.beginGetEffectiveVirtualHubRoutes( - resourceGroupName, - virtualHubName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the inbound routes configured for the Virtual Hub on a particular connection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param getInboundRoutesParameters Parameters supplied to get the inbound routes for a connection - * resource. - * @param options The options parameters. - */ - async beginGetInboundRoutes( - resourceGroupName: string, - virtualHubName: string, - getInboundRoutesParameters: GetInboundRoutesParameters, - options?: VirtualHubsGetInboundRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubsGetInboundRoutesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualHubName, - getInboundRoutesParameters, - options, - }, - spec: getInboundRoutesOperationSpec, - }); - const poller = await createHttpPoller< - VirtualHubsGetInboundRoutesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the inbound routes configured for the Virtual Hub on a particular connection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param getInboundRoutesParameters Parameters supplied to get the inbound routes for a connection - * resource. - * @param options The options parameters. - */ - async beginGetInboundRoutesAndWait( - resourceGroupName: string, - virtualHubName: string, - getInboundRoutesParameters: GetInboundRoutesParameters, - options?: VirtualHubsGetInboundRoutesOptionalParams, - ): Promise { - const poller = await this.beginGetInboundRoutes( - resourceGroupName, - virtualHubName, - getInboundRoutesParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the outbound routes configured for the Virtual Hub on a particular connection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param getOutboundRoutesParameters Parameters supplied to get the outbound routes for a connection - * resource. - * @param options The options parameters. - */ - async beginGetOutboundRoutes( - resourceGroupName: string, - virtualHubName: string, - getOutboundRoutesParameters: GetOutboundRoutesParameters, - options?: VirtualHubsGetOutboundRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubsGetOutboundRoutesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualHubName, - getOutboundRoutesParameters, - options, - }, - spec: getOutboundRoutesOperationSpec, - }); - const poller = await createHttpPoller< - VirtualHubsGetOutboundRoutesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets the outbound routes configured for the Virtual Hub on a particular connection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param getOutboundRoutesParameters Parameters supplied to get the outbound routes for a connection - * resource. - * @param options The options parameters. - */ - async beginGetOutboundRoutesAndWait( - resourceGroupName: string, - virtualHubName: string, - getOutboundRoutesParameters: GetOutboundRoutesParameters, - options?: VirtualHubsGetOutboundRoutesOptionalParams, - ): Promise { - const poller = await this.beginGetOutboundRoutes( - resourceGroupName, - virtualHubName, - getOutboundRoutesParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The resource group name of the VirtualHub. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: VirtualHubsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: VirtualHubsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualHub, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualHub, - }, - 201: { - bodyMapper: Mappers.VirtualHub, - }, - 202: { - bodyMapper: Mappers.VirtualHub, - }, - 204: { - bodyMapper: Mappers.VirtualHub, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.virtualHubParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualHub, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.virtualHubParameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualHubsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualHubsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getEffectiveVirtualHubRoutesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VirtualHubEffectiveRouteList, - }, - 201: { - bodyMapper: Mappers.VirtualHubEffectiveRouteList, - }, - 202: { - bodyMapper: Mappers.VirtualHubEffectiveRouteList, - }, - 204: { - bodyMapper: Mappers.VirtualHubEffectiveRouteList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.effectiveRoutesParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getInboundRoutesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/inboundRoutes", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.EffectiveRouteMapRouteList, - }, - 201: { - bodyMapper: Mappers.EffectiveRouteMapRouteList, - }, - 202: { - bodyMapper: Mappers.EffectiveRouteMapRouteList, - }, - 204: { - bodyMapper: Mappers.EffectiveRouteMapRouteList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.getInboundRoutesParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOutboundRoutesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/outboundRoutes", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.EffectiveRouteMapRouteList, - }, - 201: { - bodyMapper: Mappers.EffectiveRouteMapRouteList, - }, - 202: { - bodyMapper: Mappers.EffectiveRouteMapRouteList, - }, - 204: { - bodyMapper: Mappers.EffectiveRouteMapRouteList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.getOutboundRoutesParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualHubName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualHubsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualHubsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualNetworkAppliances.ts b/sdk/network/arm-network/src/operations/virtualNetworkAppliances.ts deleted file mode 100644 index bbb1a9bb970d..000000000000 --- a/sdk/network/arm-network/src/operations/virtualNetworkAppliances.ts +++ /dev/null @@ -1,609 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualNetworkAppliances } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualNetworkAppliance, - VirtualNetworkAppliancesListAllNextOptionalParams, - VirtualNetworkAppliancesListAllOptionalParams, - VirtualNetworkAppliancesListAllResponse, - VirtualNetworkAppliancesListNextOptionalParams, - VirtualNetworkAppliancesListOptionalParams, - VirtualNetworkAppliancesListResponse, - VirtualNetworkAppliancesDeleteOptionalParams, - VirtualNetworkAppliancesDeleteResponse, - VirtualNetworkAppliancesGetOptionalParams, - VirtualNetworkAppliancesGetResponse, - VirtualNetworkAppliancesCreateOrUpdateOptionalParams, - VirtualNetworkAppliancesCreateOrUpdateResponse, - TagsObject, - VirtualNetworkAppliancesUpdateTagsOptionalParams, - VirtualNetworkAppliancesUpdateTagsResponse, - VirtualNetworkAppliancesListAllNextResponse, - VirtualNetworkAppliancesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualNetworkAppliances operations. */ -export class VirtualNetworkAppliancesImpl implements VirtualNetworkAppliances { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualNetworkAppliances class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all virtual network appliances in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: VirtualNetworkAppliancesListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: VirtualNetworkAppliancesListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworkAppliancesListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: VirtualNetworkAppliancesListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all virtual network appliances in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: VirtualNetworkAppliancesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: VirtualNetworkAppliancesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworkAppliancesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: VirtualNetworkAppliancesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified virtual network appliance. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualNetworkApplianceName: string, - options?: VirtualNetworkAppliancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkAppliancesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkApplianceName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkAppliancesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified virtual network appliance. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkApplianceName: string, - options?: VirtualNetworkAppliancesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, virtualNetworkApplianceName, options); - return poller.pollUntilDone(); - } - - /** - * Gets information about the specified virtual network appliance. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkApplianceName: string, - options?: VirtualNetworkAppliancesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkApplianceName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a virtual network appliance. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param parameters Parameters supplied to the create or update virtual network appliance operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkApplianceName: string, - parameters: VirtualNetworkAppliance, - options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkAppliancesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkApplianceName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkAppliancesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a virtual network appliance. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param parameters Parameters supplied to the create or update virtual network appliance operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkApplianceName: string, - parameters: VirtualNetworkAppliance, - options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualNetworkApplianceName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates a virtual network appliance tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param parameters Parameters supplied to update virtual network appliance tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - virtualNetworkApplianceName: string, - parameters: TagsObject, - options?: VirtualNetworkAppliancesUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkApplianceName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all virtual network appliances in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: VirtualNetworkAppliancesListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all virtual network appliances in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: VirtualNetworkAppliancesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: VirtualNetworkAppliancesListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: VirtualNetworkAppliancesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances/{virtualNetworkApplianceName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.VirtualNetworkAppliancesDeleteHeaders, - }, - 201: { - headersMapper: Mappers.VirtualNetworkAppliancesDeleteHeaders, - }, - 202: { - headersMapper: Mappers.VirtualNetworkAppliancesDeleteHeaders, - }, - 204: { - headersMapper: Mappers.VirtualNetworkAppliancesDeleteHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkApplianceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances/{virtualNetworkApplianceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkAppliance, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkApplianceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances/{virtualNetworkApplianceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkAppliance, - }, - 201: { - bodyMapper: Mappers.VirtualNetworkAppliance, - }, - 202: { - bodyMapper: Mappers.VirtualNetworkAppliance, - }, - 204: { - bodyMapper: Mappers.VirtualNetworkAppliance, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters86, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkApplianceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances/{virtualNetworkApplianceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkAppliance, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkApplianceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkAppliances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkApplianceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkApplianceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkApplianceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkApplianceListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualNetworkGatewayConnections.ts b/sdk/network/arm-network/src/operations/virtualNetworkGatewayConnections.ts deleted file mode 100644 index ffed7907cf95..000000000000 --- a/sdk/network/arm-network/src/operations/virtualNetworkGatewayConnections.ts +++ /dev/null @@ -1,1387 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualNetworkGatewayConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualNetworkGatewayConnection, - VirtualNetworkGatewayConnectionsListNextOptionalParams, - VirtualNetworkGatewayConnectionsListOptionalParams, - VirtualNetworkGatewayConnectionsListResponse, - VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, - VirtualNetworkGatewayConnectionsCreateOrUpdateResponse, - VirtualNetworkGatewayConnectionsGetOptionalParams, - VirtualNetworkGatewayConnectionsGetResponse, - VirtualNetworkGatewayConnectionsDeleteOptionalParams, - TagsObject, - VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, - VirtualNetworkGatewayConnectionsUpdateTagsResponse, - ConnectionSharedKey, - VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, - VirtualNetworkGatewayConnectionsSetSharedKeyResponse, - VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams, - VirtualNetworkGatewayConnectionsGetSharedKeyResponse, - ConnectionResetSharedKey, - VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, - VirtualNetworkGatewayConnectionsResetSharedKeyResponse, - VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, - VirtualNetworkGatewayConnectionsStartPacketCaptureResponse, - VpnPacketCaptureStopParameters, - VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, - VirtualNetworkGatewayConnectionsStopPacketCaptureResponse, - VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, - VirtualNetworkGatewayConnectionsGetIkeSasResponse, - VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, - VirtualNetworkGatewayConnectionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualNetworkGatewayConnections operations. */ -export class VirtualNetworkGatewayConnectionsImpl implements VirtualNetworkGatewayConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualNetworkGatewayConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways - * connections created. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: VirtualNetworkGatewayConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: VirtualNetworkGatewayConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworkGatewayConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: VirtualNetworkGatewayConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Creates or updates a virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param parameters Parameters supplied to the create or update virtual network gateway connection - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: VirtualNetworkGatewayConnection, - options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewayConnectionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param parameters Parameters supplied to the create or update virtual network gateway connection - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: VirtualNetworkGatewayConnection, - options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified virtual network gateway connection by resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkGatewayConnectionName, options }, - getOperationSpec, - ); - } - - /** - * Deletes the specified virtual network Gateway connection. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayConnectionName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified virtual network Gateway connection. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualNetworkGatewayConnectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates a virtual network gateway connection tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param parameters Parameters supplied to update virtual network gateway connection tags. - * @param options The options parameters. - */ - async beginUpdateTags( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: TagsObject, - options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsUpdateTagsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - options, - }, - spec: updateTagsOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewayConnectionsUpdateTagsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates a virtual network gateway connection tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param parameters Parameters supplied to update virtual network gateway connection tags. - * @param options The options parameters. - */ - async beginUpdateTagsAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: TagsObject, - options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, - ): Promise { - const poller = await this.beginUpdateTags( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway - * connection shared key for passed virtual network gateway connection in the specified resource group - * through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key - * operation throughNetwork resource provider. - * @param options The options parameters. - */ - async beginSetSharedKey( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: ConnectionSharedKey, - options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsSetSharedKeyResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - options, - }, - spec: setSharedKeyOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewayConnectionsSetSharedKeyResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway - * connection shared key for passed virtual network gateway connection in the specified resource group - * through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key - * operation throughNetwork resource provider. - * @param options The options parameters. - */ - async beginSetSharedKeyAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: ConnectionSharedKey, - options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, - ): Promise { - const poller = await this.beginSetSharedKey( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified - * virtual network gateway connection shared key through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The virtual network gateway connection shared key name. - * @param options The options parameters. - */ - getSharedKey( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkGatewayConnectionName, options }, - getSharedKeyOperationSpec, - ); - } - - /** - * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways - * connections created. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: VirtualNetworkGatewayConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway - * connection shared key for passed virtual network gateway connection in the specified resource group - * through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key - * Name. - * @param parameters Parameters supplied to the begin reset virtual network gateway connection shared - * key operation through network resource provider. - * @param options The options parameters. - */ - async beginResetSharedKey( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: ConnectionResetSharedKey, - options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsResetSharedKeyResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - options, - }, - spec: resetSharedKeyOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewayConnectionsResetSharedKeyResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway - * connection shared key for passed virtual network gateway connection in the specified resource group - * through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key - * Name. - * @param parameters Parameters supplied to the begin reset virtual network gateway connection shared - * key operation through network resource provider. - * @param options The options parameters. - */ - async beginResetSharedKeyAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: ConnectionResetSharedKey, - options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, - ): Promise { - const poller = await this.beginResetSharedKey( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Starts packet capture on virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param options The options parameters. - */ - async beginStartPacketCapture( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsStartPacketCaptureResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayConnectionName, options }, - spec: startPacketCaptureOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewayConnectionsStartPacketCaptureResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Starts packet capture on virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param options The options parameters. - */ - async beginStartPacketCaptureAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, - ): Promise { - const poller = await this.beginStartPacketCapture( - resourceGroupName, - virtualNetworkGatewayConnectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Stops packet capture on virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param parameters Virtual network gateway packet capture parameters supplied to stop packet capture - * on gateway connection. - * @param options The options parameters. - */ - async beginStopPacketCapture( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: VpnPacketCaptureStopParameters, - options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsStopPacketCaptureResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - options, - }, - spec: stopPacketCaptureOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewayConnectionsStopPacketCaptureResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Stops packet capture on virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param parameters Virtual network gateway packet capture parameters supplied to stop packet capture - * on gateway connection. - * @param options The options parameters. - */ - async beginStopPacketCaptureAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: VpnPacketCaptureStopParameters, - options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, - ): Promise { - const poller = await this.beginStopPacketCapture( - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists IKE Security Associations for the virtual network gateway connection in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param options The options parameters. - */ - async beginGetIkeSas( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsGetIkeSasResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayConnectionName, options }, - spec: getIkeSasOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewayConnectionsGetIkeSasResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Lists IKE Security Associations for the virtual network gateway connection in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param options The options parameters. - */ - async beginGetIkeSasAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, - ): Promise { - const poller = await this.beginGetIkeSas( - resourceGroupName, - virtualNetworkGatewayConnectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Resets the virtual network gateway connection specified. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param options The options parameters. - */ - async beginResetConnection( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayConnectionName, options }, - spec: resetConnectionOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Resets the virtual network gateway connection specified. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param options The options parameters. - */ - async beginResetConnectionAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, - ): Promise { - const poller = await this.beginResetConnection( - resourceGroupName, - virtualNetworkGatewayConnectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: VirtualNetworkGatewayConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGatewayConnection, - }, - 201: { - bodyMapper: Mappers.VirtualNetworkGatewayConnection, - }, - 202: { - bodyMapper: Mappers.VirtualNetworkGatewayConnection, - }, - 204: { - bodyMapper: Mappers.VirtualNetworkGatewayConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters92, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGatewayConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGatewayConnection, - }, - 201: { - bodyMapper: Mappers.VirtualNetworkGatewayConnection, - }, - 202: { - bodyMapper: Mappers.VirtualNetworkGatewayConnection, - }, - 204: { - bodyMapper: Mappers.VirtualNetworkGatewayConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const setSharedKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ConnectionSharedKey, - }, - 201: { - bodyMapper: Mappers.ConnectionSharedKey, - }, - 202: { - bodyMapper: Mappers.ConnectionSharedKey, - }, - 204: { - bodyMapper: Mappers.ConnectionSharedKey, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters93, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getSharedKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ConnectionSharedKey, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGatewayConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const resetSharedKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ConnectionResetSharedKey, - }, - 201: { - bodyMapper: Mappers.ConnectionResetSharedKey, - }, - 202: { - bodyMapper: Mappers.ConnectionResetSharedKey, - }, - 204: { - bodyMapper: Mappers.ConnectionResetSharedKey, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters94, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const startPacketCaptureOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters90, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const stopPacketCaptureOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters91, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getIkeSasOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const resetConnectionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGatewayConnectionListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts b/sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts deleted file mode 100644 index d7719dd56068..000000000000 --- a/sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts +++ /dev/null @@ -1,503 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualNetworkGatewayNatRules } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualNetworkGatewayNatRule, - VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayNextOptionalParams, - VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, - VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayResponse, - VirtualNetworkGatewayNatRulesGetOptionalParams, - VirtualNetworkGatewayNatRulesGetResponse, - VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, - VirtualNetworkGatewayNatRulesCreateOrUpdateResponse, - VirtualNetworkGatewayNatRulesDeleteOptionalParams, - VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualNetworkGatewayNatRules operations. */ -export class VirtualNetworkGatewayNatRulesImpl implements VirtualNetworkGatewayNatRules { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualNetworkGatewayNatRules class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves all nat rules for a particular virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - public listByVirtualNetworkGateway( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByVirtualNetworkGatewayPagingAll( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByVirtualNetworkGatewayPagingPage( - resourceGroupName, - virtualNetworkGatewayName, - options, - settings, - ); - }, - }; - } - - private async *listByVirtualNetworkGatewayPagingPage( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVirtualNetworkGateway( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVirtualNetworkGatewayNext( - resourceGroupName, - virtualNetworkGatewayName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByVirtualNetworkGatewayPagingAll( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByVirtualNetworkGatewayPagingPage( - resourceGroupName, - virtualNetworkGatewayName, - options, - )) { - yield* page; - } - } - - /** - * Retrieves the details of a nat rule. - * @param resourceGroupName The resource group name of the Virtual Network Gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkGatewayName: string, - natRuleName: string, - options?: VirtualNetworkGatewayNatRulesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkGatewayName, natRuleName, options }, - getOperationSpec, - ); - } - - /** - * Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the - * existing nat rules. - * @param resourceGroupName The resource group name of the Virtual Network Gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param natRuleParameters Parameters supplied to create or Update a Nat Rule. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkGatewayName: string, - natRuleName: string, - natRuleParameters: VirtualNetworkGatewayNatRule, - options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayNatRulesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - natRuleParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewayNatRulesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the - * existing nat rules. - * @param resourceGroupName The resource group name of the Virtual Network Gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param natRuleParameters Parameters supplied to create or Update a Nat Rule. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - natRuleName: string, - natRuleParameters: VirtualNetworkGatewayNatRule, - options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - natRuleParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a nat rule. - * @param resourceGroupName The resource group name of the Virtual Network Gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualNetworkGatewayName: string, - natRuleName: string, - options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a nat rule. - * @param resourceGroupName The resource group name of the Virtual Network Gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - natRuleName: string, - options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualNetworkGatewayName, - natRuleName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves all nat rules for a particular virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - private _listByVirtualNetworkGateway( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkGatewayName, options }, - listByVirtualNetworkGatewayOperationSpec, - ); - } - - /** - * ListByVirtualNetworkGatewayNext - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param nextLink The nextLink from the previous successful call to the ListByVirtualNetworkGateway - * method. - * @param options The options parameters. - */ - private _listByVirtualNetworkGatewayNext( - resourceGroupName: string, - virtualNetworkGatewayName: string, - nextLink: string, - options?: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkGatewayName, nextLink, options }, - listByVirtualNetworkGatewayNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGatewayNatRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - Parameters.natRuleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGatewayNatRule, - }, - 201: { - bodyMapper: Mappers.VirtualNetworkGatewayNatRule, - }, - 202: { - bodyMapper: Mappers.VirtualNetworkGatewayNatRule, - }, - 204: { - bodyMapper: Mappers.VirtualNetworkGatewayNatRule, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.natRuleParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - Parameters.natRuleName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - Parameters.natRuleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByVirtualNetworkGatewayOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualNetworkGatewayNatRulesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByVirtualNetworkGatewayNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualNetworkGatewayNatRulesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualNetworkGateways.ts b/sdk/network/arm-network/src/operations/virtualNetworkGateways.ts deleted file mode 100644 index 64011a51d503..000000000000 --- a/sdk/network/arm-network/src/operations/virtualNetworkGateways.ts +++ /dev/null @@ -1,3983 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualNetworkGateways } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualNetworkGateway, - VirtualNetworkGatewaysListNextOptionalParams, - VirtualNetworkGatewaysListOptionalParams, - VirtualNetworkGatewaysListResponse, - VirtualNetworkGatewayConnectionListEntity, - VirtualNetworkGatewaysListConnectionsNextOptionalParams, - VirtualNetworkGatewaysListConnectionsOptionalParams, - VirtualNetworkGatewaysListConnectionsResponse, - VirtualNetworkGatewaysCreateOrUpdateOptionalParams, - VirtualNetworkGatewaysCreateOrUpdateResponse, - VirtualNetworkGatewaysGetOptionalParams, - VirtualNetworkGatewaysGetResponse, - VirtualNetworkGatewaysDeleteOptionalParams, - TagsObject, - VirtualNetworkGatewaysUpdateTagsOptionalParams, - VirtualNetworkGatewaysUpdateTagsResponse, - VirtualNetworkGatewaysResetOptionalParams, - VirtualNetworkGatewaysResetResponse, - VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, - VpnClientParameters, - VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, - VirtualNetworkGatewaysGeneratevpnclientpackageResponse, - VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, - VirtualNetworkGatewaysGenerateVpnProfileResponse, - VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, - VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse, - VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, - VirtualNetworkGatewaysGetBgpPeerStatusResponse, - VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams, - VirtualNetworkGatewaysSupportedVpnDevicesResponse, - VirtualNetworkGatewaysListRadiusSecretsOptionalParams, - VirtualNetworkGatewaysListRadiusSecretsResponse, - VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, - VirtualNetworkGatewaysGetLearnedRoutesResponse, - VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, - VirtualNetworkGatewaysGetAdvertisedRoutesResponse, - VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, - VirtualNetworkGatewaysGetResiliencyInformationResponse, - VirtualNetworkGatewaysGetRoutesInformationOptionalParams, - VirtualNetworkGatewaysGetRoutesInformationResponse, - VpnClientIPsecParameters, - VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, - VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse, - VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, - VirtualNetworkGatewaysGetVpnclientIpsecParametersResponse, - VpnDeviceScriptParameters, - VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams, - VirtualNetworkGatewaysVpnDeviceConfigurationScriptResponse, - VirtualNetworkGatewaysStartPacketCaptureOptionalParams, - VirtualNetworkGatewaysStartPacketCaptureResponse, - VpnPacketCaptureStopParameters, - VirtualNetworkGatewaysStopPacketCaptureOptionalParams, - VirtualNetworkGatewaysStopPacketCaptureResponse, - VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, - VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse, - VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, - VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse, - VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, - VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse, - ExpressRouteFailoverStopApiParameters, - VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, - VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse, - VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, - VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse, - P2SVpnConnectionRequest, - VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, - VirtualNetworkGatewayMigrationParameters, - VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, - VirtualNetworkGatewaysInvokePrepareMigrationResponse, - VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, - VirtualNetworkGatewaysInvokeExecuteMigrationResponse, - VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, - VirtualNetworkGatewaysInvokeCommitMigrationResponse, - VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, - VirtualNetworkGatewaysInvokeAbortMigrationResponse, - VirtualNetworkGatewaysListNextResponse, - VirtualNetworkGatewaysListConnectionsNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualNetworkGateways operations. */ -export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualNetworkGateways class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all virtual network gateways by resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: VirtualNetworkGatewaysListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: VirtualNetworkGatewaysListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworkGatewaysListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: VirtualNetworkGatewaysListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all the connections in a virtual network gateway. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - public listConnections( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysListConnectionsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listConnectionsPagingAll( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listConnectionsPagingPage( - resourceGroupName, - virtualNetworkGatewayName, - options, - settings, - ); - }, - }; - } - - private async *listConnectionsPagingPage( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysListConnectionsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworkGatewaysListConnectionsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listConnections(resourceGroupName, virtualNetworkGatewayName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listConnectionsNext( - resourceGroupName, - virtualNetworkGatewayName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listConnectionsPagingAll( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysListConnectionsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listConnectionsPagingPage( - resourceGroupName, - virtualNetworkGatewayName, - options, - )) { - yield* page; - } - } - - /** - * Creates or updates a virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to create or update virtual network gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VirtualNetworkGateway, - options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to create or update virtual network gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VirtualNetworkGateway, - options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified virtual network gateway by resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkGatewayName, options }, - getOperationSpec, - ); - } - - /** - * Deletes the specified virtual network gateway. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified virtual network gateway. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, virtualNetworkGatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Updates a virtual network gateway tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to update virtual network gateway tags. - * @param options The options parameters. - */ - async beginUpdateTags( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: TagsObject, - options?: VirtualNetworkGatewaysUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysUpdateTagsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - parameters, - options, - }, - spec: updateTagsOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysUpdateTagsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates a virtual network gateway tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to update virtual network gateway tags. - * @param options The options parameters. - */ - async beginUpdateTagsAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: TagsObject, - options?: VirtualNetworkGatewaysUpdateTagsOptionalParams, - ): Promise { - const poller = await this.beginUpdateTags( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all virtual network gateways by resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: VirtualNetworkGatewaysListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all the connections in a virtual network gateway. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - private _listConnections( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysListConnectionsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkGatewayName, options }, - listConnectionsOperationSpec, - ); - } - - /** - * Resets the primary of the virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginReset( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysResetOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysResetResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: resetOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysResetResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Resets the primary of the virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginResetAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysResetOptionalParams, - ): Promise { - const poller = await this.beginReset(resourceGroupName, virtualNetworkGatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginResetVpnClientSharedKey( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: resetVpnClientSharedKeyOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginResetVpnClientSharedKeyAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, - ): Promise { - const poller = await this.beginResetVpnClientSharedKey( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Generates VPN client package for P2S client of the virtual network gateway in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package - * operation. - * @param options The options parameters. - */ - async beginGeneratevpnclientpackage( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnClientParameters, - options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGeneratevpnclientpackageResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - parameters, - options, - }, - spec: generatevpnclientpackageOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGeneratevpnclientpackageResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Generates VPN client package for P2S client of the virtual network gateway in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package - * operation. - * @param options The options parameters. - */ - async beginGeneratevpnclientpackageAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnClientParameters, - options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, - ): Promise { - const poller = await this.beginGeneratevpnclientpackage( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. - * Used for IKEV2 and radius based authentication. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package - * operation. - * @param options The options parameters. - */ - async beginGenerateVpnProfile( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnClientParameters, - options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGenerateVpnProfileResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - parameters, - options, - }, - spec: generateVpnProfileOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGenerateVpnProfileResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. - * Used for IKEV2 and radius based authentication. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package - * operation. - * @param options The options parameters. - */ - async beginGenerateVpnProfileAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnClientParameters, - options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, - ): Promise { - const poller = await this.beginGenerateVpnProfile( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified - * resource group. The profile needs to be generated first using generateVpnProfile. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetVpnProfilePackageUrl( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: getVpnProfilePackageUrlOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified - * resource group. The profile needs to be generated first using generateVpnProfile. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetVpnProfilePackageUrlAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, - ): Promise { - const poller = await this.beginGetVpnProfilePackageUrl( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetBgpPeerStatus( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetBgpPeerStatusResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: getBgpPeerStatusOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGetBgpPeerStatusResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetBgpPeerStatusAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, - ): Promise { - const poller = await this.beginGetBgpPeerStatus( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets a xml format representation for supported vpn devices. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - supportedVpnDevices( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkGatewayName, options }, - supportedVpnDevicesOperationSpec, - ); - } - - /** - * List all Radius servers with respective radius secrets from virtual network gateway - * VpnClientConfiguration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - listRadiusSecrets( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysListRadiusSecretsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkGatewayName, options }, - listRadiusSecretsOperationSpec, - ); - } - - /** - * This operation retrieves a list of routes the virtual network gateway has learned, including routes - * learned from BGP peers. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetLearnedRoutes( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetLearnedRoutesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: getLearnedRoutesOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGetLearnedRoutesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * This operation retrieves a list of routes the virtual network gateway has learned, including routes - * learned from BGP peers. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetLearnedRoutesAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, - ): Promise { - const poller = await this.beginGetLearnedRoutes( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the - * specified peer. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer. - * @param options The options parameters. - */ - async beginGetAdvertisedRoutes( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peer: string, - options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetAdvertisedRoutesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, peer, options }, - spec: getAdvertisedRoutesOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGetAdvertisedRoutesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the - * specified peer. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer. - * @param options The options parameters. - */ - async beginGetAdvertisedRoutesAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peer: string, - options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, - ): Promise { - const poller = await this.beginGetAdvertisedRoutes( - resourceGroupName, - virtualNetworkGatewayName, - peer, - options, - ); - return poller.pollUntilDone(); - } - - /** - * This operation retrieves the resiliency information for an Express Route Gateway, including the - * gateway's current resiliency score and recommendations to further improve the score - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetResiliencyInformation( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetResiliencyInformationResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: getResiliencyInformationOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGetResiliencyInformationResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * This operation retrieves the resiliency information for an Express Route Gateway, including the - * gateway's current resiliency score and recommendations to further improve the score - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetResiliencyInformationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, - ): Promise { - const poller = await this.beginGetResiliencyInformation( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * This operation retrieves the route set information for an Express Route Gateway based on their - * resiliency - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetRoutesInformation( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetRoutesInformationResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: getRoutesInformationOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGetRoutesInformationResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * This operation retrieves the route set information for an Express Route Gateway based on their - * resiliency - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetRoutesInformationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams, - ): Promise { - const poller = await this.beginGetRoutesInformation( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual - * network gateway in the specified resource group through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of - * Virtual Network Gateway P2S client operation through Network resource provider. - * @param options The options parameters. - */ - async beginSetVpnclientIpsecParameters( - resourceGroupName: string, - virtualNetworkGatewayName: string, - vpnclientIpsecParams: VpnClientIPsecParameters, - options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - vpnclientIpsecParams, - options, - }, - spec: setVpnclientIpsecParametersOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual - * network gateway in the specified resource group through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of - * Virtual Network Gateway P2S client operation through Network resource provider. - * @param options The options parameters. - */ - async beginSetVpnclientIpsecParametersAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - vpnclientIpsecParams: VpnClientIPsecParameters, - options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, - ): Promise { - const poller = await this.beginSetVpnclientIpsecParameters( - resourceGroupName, - virtualNetworkGatewayName, - vpnclientIpsecParams, - options, - ); - return poller.pollUntilDone(); - } - - /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy - * for P2S client of virtual network gateway in the specified resource group through Network resource - * provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. - * @param options The options parameters. - */ - async beginGetVpnclientIpsecParameters( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetVpnclientIpsecParametersResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: getVpnclientIpsecParametersOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGetVpnclientIpsecParametersResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy - * for P2S client of virtual network gateway in the specified resource group through Network resource - * provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. - * @param options The options parameters. - */ - async beginGetVpnclientIpsecParametersAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, - ): Promise { - const poller = await this.beginGetVpnclientIpsecParameters( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets a xml format representation for vpn device configuration script. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for - * which the configuration script is generated. - * @param parameters Parameters supplied to the generate vpn device script operation. - * @param options The options parameters. - */ - vpnDeviceConfigurationScript( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: VpnDeviceScriptParameters, - options?: VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualNetworkGatewayConnectionName, - parameters, - options, - }, - vpnDeviceConfigurationScriptOperationSpec, - ); - } - - /** - * Starts packet capture on virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginStartPacketCapture( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysStartPacketCaptureResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: startPacketCaptureOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysStartPacketCaptureResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Starts packet capture on virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginStartPacketCaptureAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams, - ): Promise { - const poller = await this.beginStartPacketCapture( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Stops packet capture on virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Virtual network gateway packet capture parameters supplied to stop packet capture - * on gateway. - * @param options The options parameters. - */ - async beginStopPacketCapture( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnPacketCaptureStopParameters, - options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysStopPacketCaptureResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - parameters, - options, - }, - spec: stopPacketCaptureOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysStopPacketCaptureResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Stops packet capture on virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Virtual network gateway packet capture parameters supplied to stop packet capture - * on gateway. - * @param options The options parameters. - */ - async beginStopPacketCaptureAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnPacketCaptureStopParameters, - options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams, - ): Promise { - const poller = await this.beginStopPacketCapture( - resourceGroupName, - virtualNetworkGatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * This operation retrieves the details of all the failover tests performed on the gateway for - * different peering locations - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param typeParam The type of failover test - * @param fetchLatest Fetch only the latest tests for each peering location - * @param options The options parameters. - */ - async beginGetFailoverAllTestDetails( - resourceGroupName: string, - virtualNetworkGatewayName: string, - typeParam: string, - fetchLatest: boolean, - options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - typeParam, - fetchLatest, - options, - }, - spec: getFailoverAllTestDetailsOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * This operation retrieves the details of all the failover tests performed on the gateway for - * different peering locations - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param typeParam The type of failover test - * @param fetchLatest Fetch only the latest tests for each peering location - * @param options The options parameters. - */ - async beginGetFailoverAllTestDetailsAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - typeParam: string, - fetchLatest: boolean, - options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, - ): Promise { - const poller = await this.beginGetFailoverAllTestDetails( - resourceGroupName, - virtualNetworkGatewayName, - typeParam, - fetchLatest, - options, - ); - return poller.pollUntilDone(); - } - - /** - * This operation retrieves the details of a particular failover test performed on the gateway based on - * the test Guid - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peeringLocation Peering location of the test - * @param failoverTestId The unique Guid value which identifies the test - * @param options The options parameters. - */ - async beginGetFailoverSingleTestDetails( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peeringLocation: string, - failoverTestId: string, - options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - failoverTestId, - options, - }, - spec: getFailoverSingleTestDetailsOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * This operation retrieves the details of a particular failover test performed on the gateway based on - * the test Guid - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peeringLocation Peering location of the test - * @param failoverTestId The unique Guid value which identifies the test - * @param options The options parameters. - */ - async beginGetFailoverSingleTestDetailsAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peeringLocation: string, - failoverTestId: string, - options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, - ): Promise { - const poller = await this.beginGetFailoverSingleTestDetails( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - failoverTestId, - options, - ); - return poller.pollUntilDone(); - } - - /** - * This operation starts failover simulation on the gateway for the specified peering location - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peeringLocation Peering location of the test - * @param options The options parameters. - */ - async beginStartExpressRouteSiteFailoverSimulation( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peeringLocation: string, - options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - options, - }, - spec: startExpressRouteSiteFailoverSimulationOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * This operation starts failover simulation on the gateway for the specified peering location - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peeringLocation Peering location of the test - * @param options The options parameters. - */ - async beginStartExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peeringLocation: string, - options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, - ): Promise { - const poller = await this.beginStartExpressRouteSiteFailoverSimulation( - resourceGroupName, - virtualNetworkGatewayName, - peeringLocation, - options, - ); - return poller.pollUntilDone(); - } - - /** - * This operation stops failover simulation on the gateway for the specified peering location - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param stopParameters Virtual network gateway stop simulation parameters supplied to stop failover - * simulation on gateway. - * @param options The options parameters. - */ - async beginStopExpressRouteSiteFailoverSimulation( - resourceGroupName: string, - virtualNetworkGatewayName: string, - stopParameters: ExpressRouteFailoverStopApiParameters, - options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - stopParameters, - options, - }, - spec: stopExpressRouteSiteFailoverSimulationOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * This operation stops failover simulation on the gateway for the specified peering location - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param stopParameters Virtual network gateway stop simulation parameters supplied to stop failover - * simulation on gateway. - * @param options The options parameters. - */ - async beginStopExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - stopParameters: ExpressRouteFailoverStopApiParameters, - options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, - ): Promise { - const poller = await this.beginStopExpressRouteSiteFailoverSimulation( - resourceGroupName, - virtualNetworkGatewayName, - stopParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Get VPN client connection health detail per P2S client connection of the virtual network gateway in - * the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetVpnclientConnectionHealth( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: getVpnclientConnectionHealthOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Get VPN client connection health detail per P2S client connection of the virtual network gateway in - * the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - async beginGetVpnclientConnectionHealthAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, - ): Promise { - const poller = await this.beginGetVpnclientConnectionHealth( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Disconnect vpn connections of virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param request The parameters are supplied to disconnect vpn connections. - * @param options The options parameters. - */ - async beginDisconnectVirtualNetworkGatewayVpnConnections( - resourceGroupName: string, - virtualNetworkGatewayName: string, - request: P2SVpnConnectionRequest, - options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, request, options }, - spec: disconnectVirtualNetworkGatewayVpnConnectionsOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Disconnect vpn connections of virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param request The parameters are supplied to disconnect vpn connections. - * @param options The options parameters. - */ - async beginDisconnectVirtualNetworkGatewayVpnConnectionsAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - request: P2SVpnConnectionRequest, - options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, - ): Promise { - const poller = await this.beginDisconnectVirtualNetworkGatewayVpnConnections( - resourceGroupName, - virtualNetworkGatewayName, - request, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Trigger prepare migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param migrationParams Parameters supplied to the Begin Prepare migration on basic vpn gateway - * through Network resource provider. - * @param options The options parameters. - */ - async beginInvokePrepareMigration( - resourceGroupName: string, - virtualNetworkGatewayName: string, - migrationParams: VirtualNetworkGatewayMigrationParameters, - options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysInvokePrepareMigrationResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkGatewayName, - migrationParams, - options, - }, - spec: invokePrepareMigrationOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysInvokePrepareMigrationResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Trigger prepare migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param migrationParams Parameters supplied to the Begin Prepare migration on basic vpn gateway - * through Network resource provider. - * @param options The options parameters. - */ - async beginInvokePrepareMigrationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - migrationParams: VirtualNetworkGatewayMigrationParameters, - options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, - ): Promise { - const poller = await this.beginInvokePrepareMigration( - resourceGroupName, - virtualNetworkGatewayName, - migrationParams, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Trigger execute migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginInvokeExecuteMigration( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysInvokeExecuteMigrationResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: invokeExecuteMigrationOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysInvokeExecuteMigrationResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Trigger execute migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginInvokeExecuteMigrationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, - ): Promise { - const poller = await this.beginInvokeExecuteMigration( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Trigger commit migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginInvokeCommitMigration( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysInvokeCommitMigrationResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: invokeCommitMigrationOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysInvokeCommitMigrationResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Trigger commit migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginInvokeCommitMigrationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, - ): Promise { - const poller = await this.beginInvokeCommitMigration( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Trigger abort migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginInvokeAbortMigration( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysInvokeAbortMigrationResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkGatewayName, options }, - spec: invokeAbortMigrationOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkGatewaysInvokeAbortMigrationResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Trigger abort migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginInvokeAbortMigrationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, - ): Promise { - const poller = await this.beginInvokeAbortMigration( - resourceGroupName, - virtualNetworkGatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: VirtualNetworkGatewaysListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListConnectionsNext - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param nextLink The nextLink from the previous successful call to the ListConnections method. - * @param options The options parameters. - */ - private _listConnectionsNext( - resourceGroupName: string, - virtualNetworkGatewayName: string, - nextLink: string, - options?: VirtualNetworkGatewaysListConnectionsNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkGatewayName, nextLink, options }, - listConnectionsNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - 201: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - 202: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - 204: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters87, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - 201: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - 202: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - 204: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listConnectionsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGatewayListConnectionsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const resetOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - 201: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - 202: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - 204: { - bodyMapper: Mappers.VirtualNetworkGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.gatewayVip], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const resetVpnClientSharedKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const generatevpnclientpackageOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters88, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const generateVpnProfileOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters88, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getVpnProfilePackageUrlOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getBgpPeerStatusOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.BgpPeerStatusListResult, - }, - 201: { - bodyMapper: Mappers.BgpPeerStatusListResult, - }, - 202: { - bodyMapper: Mappers.BgpPeerStatusListResult, - }, - 204: { - bodyMapper: Mappers.BgpPeerStatusListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.peer], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const supportedVpnDevicesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listRadiusSecretsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/listRadiusSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.RadiusAuthServerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getLearnedRoutesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GatewayRouteListResult, - }, - 201: { - bodyMapper: Mappers.GatewayRouteListResult, - }, - 202: { - bodyMapper: Mappers.GatewayRouteListResult, - }, - 204: { - bodyMapper: Mappers.GatewayRouteListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getAdvertisedRoutesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GatewayRouteListResult, - }, - 201: { - bodyMapper: Mappers.GatewayRouteListResult, - }, - 202: { - bodyMapper: Mappers.GatewayRouteListResult, - }, - 204: { - bodyMapper: Mappers.GatewayRouteListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.peer1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getResiliencyInformationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getResiliencyInformation", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GatewayResiliencyInformation, - }, - 201: { - bodyMapper: Mappers.GatewayResiliencyInformation, - }, - 202: { - bodyMapper: Mappers.GatewayResiliencyInformation, - }, - 204: { - bodyMapper: Mappers.GatewayResiliencyInformation, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.attemptRefresh], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getRoutesInformationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getRoutesInformation", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GatewayRouteSetsInformation, - }, - 201: { - bodyMapper: Mappers.GatewayRouteSetsInformation, - }, - 202: { - bodyMapper: Mappers.GatewayRouteSetsInformation, - }, - 204: { - bodyMapper: Mappers.GatewayRouteSetsInformation, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.attemptRefresh], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const setVpnclientIpsecParametersOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VpnClientIPsecParameters, - }, - 201: { - bodyMapper: Mappers.VpnClientIPsecParameters, - }, - 202: { - bodyMapper: Mappers.VpnClientIPsecParameters, - }, - 204: { - bodyMapper: Mappers.VpnClientIPsecParameters, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.vpnclientIpsecParams, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getVpnclientIpsecParametersOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VpnClientIPsecParameters, - }, - 201: { - bodyMapper: Mappers.VpnClientIPsecParameters, - }, - 202: { - bodyMapper: Mappers.VpnClientIPsecParameters, - }, - 204: { - bodyMapper: Mappers.VpnClientIPsecParameters, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const vpnDeviceConfigurationScriptOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters89, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const startPacketCaptureOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters90, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const stopPacketCaptureOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters91, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getFailoverAllTestDetailsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverAllTestsDetails", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteFailoverTestDetails", - }, - }, - }, - }, - }, - 201: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteFailoverTestDetails", - }, - }, - }, - }, - }, - 202: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteFailoverTestDetails", - }, - }, - }, - }, - }, - 204: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteFailoverTestDetails", - }, - }, - }, - }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.typeParam, Parameters.fetchLatest], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getFailoverSingleTestDetailsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverSingleTestDetails", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteFailoverSingleTestDetails", - }, - }, - }, - }, - }, - 201: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteFailoverSingleTestDetails", - }, - }, - }, - }, - }, - 202: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteFailoverSingleTestDetails", - }, - }, - }, - }, - }, - 204: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteFailoverSingleTestDetails", - }, - }, - }, - }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.peeringLocation, Parameters.failoverTestId], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const startExpressRouteSiteFailoverSimulationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startSiteFailoverTest", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.peeringLocation], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const stopExpressRouteSiteFailoverSimulationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopSiteFailoverTest", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.stopParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getVpnclientConnectionHealthOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VpnClientConnectionHealthDetailListResult, - }, - 201: { - bodyMapper: Mappers.VpnClientConnectionHealthDetailListResult, - }, - 202: { - bodyMapper: Mappers.VpnClientConnectionHealthDetailListResult, - }, - 204: { - bodyMapper: Mappers.VpnClientConnectionHealthDetailListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const disconnectVirtualNetworkGatewayVpnConnectionsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.request2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const invokePrepareMigrationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/prepareMigration", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokePrepareMigrationHeaders, - }, - 201: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokePrepareMigrationHeaders, - }, - 202: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokePrepareMigrationHeaders, - }, - 204: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokePrepareMigrationHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.migrationParams, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const invokeExecuteMigrationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/executeMigration", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeExecuteMigrationHeaders, - }, - 201: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeExecuteMigrationHeaders, - }, - 202: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeExecuteMigrationHeaders, - }, - 204: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeExecuteMigrationHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const invokeCommitMigrationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/commitMigration", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeCommitMigrationHeaders, - }, - 201: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeCommitMigrationHeaders, - }, - 202: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeCommitMigrationHeaders, - }, - 204: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeCommitMigrationHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const invokeAbortMigrationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/abortMigration", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeAbortMigrationHeaders, - }, - 201: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeAbortMigrationHeaders, - }, - 202: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeAbortMigrationHeaders, - }, - 204: { - headersMapper: Mappers.VirtualNetworkGatewaysInvokeAbortMigrationHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGatewayListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listConnectionsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkGatewayListConnectionsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualNetworkGatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts b/sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts deleted file mode 100644 index 3b4db9909d51..000000000000 --- a/sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts +++ /dev/null @@ -1,490 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualNetworkPeerings } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualNetworkPeering, - VirtualNetworkPeeringsListNextOptionalParams, - VirtualNetworkPeeringsListOptionalParams, - VirtualNetworkPeeringsListResponse, - VirtualNetworkPeeringsDeleteOptionalParams, - VirtualNetworkPeeringsGetOptionalParams, - VirtualNetworkPeeringsGetResponse, - VirtualNetworkPeeringsCreateOrUpdateOptionalParams, - VirtualNetworkPeeringsCreateOrUpdateResponse, - VirtualNetworkPeeringsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualNetworkPeerings operations. */ -export class VirtualNetworkPeeringsImpl implements VirtualNetworkPeerings { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualNetworkPeerings class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all virtual network peerings in a virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworkPeeringsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, virtualNetworkName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, virtualNetworkName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworkPeeringsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworkPeeringsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, virtualNetworkName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - virtualNetworkName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworkPeeringsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, virtualNetworkName, options)) { - yield* page; - } - } - - /** - * Deletes the specified virtual network peering. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param virtualNetworkPeeringName The name of the virtual network peering. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualNetworkName: string, - virtualNetworkPeeringName: string, - options?: VirtualNetworkPeeringsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified virtual network peering. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param virtualNetworkPeeringName The name of the virtual network peering. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkName: string, - virtualNetworkPeeringName: string, - options?: VirtualNetworkPeeringsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified virtual network peering. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param virtualNetworkPeeringName The name of the virtual network peering. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkName: string, - virtualNetworkPeeringName: string, - options?: VirtualNetworkPeeringsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates a peering in the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param virtualNetworkPeeringName The name of the peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network - * peering operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkName: string, - virtualNetworkPeeringName: string, - virtualNetworkPeeringParameters: VirtualNetworkPeering, - options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkPeeringsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkPeeringsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a peering in the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param virtualNetworkPeeringName The name of the peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network - * peering operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkName: string, - virtualNetworkPeeringName: string, - virtualNetworkPeeringParameters: VirtualNetworkPeering, - options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualNetworkName, - virtualNetworkPeeringName, - virtualNetworkPeeringParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all virtual network peerings in a virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworkPeeringsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - virtualNetworkName: string, - nextLink: string, - options?: VirtualNetworkPeeringsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - Parameters.virtualNetworkPeeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkPeering, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - Parameters.virtualNetworkPeeringName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkPeering, - }, - 201: { - bodyMapper: Mappers.VirtualNetworkPeering, - }, - 202: { - bodyMapper: Mappers.VirtualNetworkPeering, - }, - 204: { - bodyMapper: Mappers.VirtualNetworkPeering, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.virtualNetworkPeeringParameters, - queryParameters: [Parameters.apiVersion, Parameters.syncRemoteAddressSpace], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - Parameters.virtualNetworkPeeringName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkPeeringListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkPeeringListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualNetworkTaps.ts b/sdk/network/arm-network/src/operations/virtualNetworkTaps.ts deleted file mode 100644 index 0f0aee6c07fc..000000000000 --- a/sdk/network/arm-network/src/operations/virtualNetworkTaps.ts +++ /dev/null @@ -1,585 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualNetworkTaps } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualNetworkTap, - VirtualNetworkTapsListAllNextOptionalParams, - VirtualNetworkTapsListAllOptionalParams, - VirtualNetworkTapsListAllResponse, - VirtualNetworkTapsListByResourceGroupNextOptionalParams, - VirtualNetworkTapsListByResourceGroupOptionalParams, - VirtualNetworkTapsListByResourceGroupResponse, - VirtualNetworkTapsDeleteOptionalParams, - VirtualNetworkTapsGetOptionalParams, - VirtualNetworkTapsGetResponse, - VirtualNetworkTapsCreateOrUpdateOptionalParams, - VirtualNetworkTapsCreateOrUpdateResponse, - TagsObject, - VirtualNetworkTapsUpdateTagsOptionalParams, - VirtualNetworkTapsUpdateTagsResponse, - VirtualNetworkTapsListAllNextResponse, - VirtualNetworkTapsListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualNetworkTaps operations. */ -export class VirtualNetworkTapsImpl implements VirtualNetworkTaps { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualNetworkTaps class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the VirtualNetworkTaps in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: VirtualNetworkTapsListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: VirtualNetworkTapsListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworkTapsListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: VirtualNetworkTapsListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all the VirtualNetworkTaps in a subscription. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VirtualNetworkTapsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VirtualNetworkTapsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworkTapsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VirtualNetworkTapsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Deletes the specified virtual network tap. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of the virtual network tap. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - tapName: string, - options?: VirtualNetworkTapsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, tapName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified virtual network tap. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of the virtual network tap. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - tapName: string, - options?: VirtualNetworkTapsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, tapName, options); - return poller.pollUntilDone(); - } - - /** - * Gets information about the specified virtual network tap. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of virtual network tap. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - tapName: string, - options?: VirtualNetworkTapsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, tapName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a Virtual Network Tap. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of the virtual network tap. - * @param parameters Parameters supplied to the create or update virtual network tap operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - tapName: string, - parameters: VirtualNetworkTap, - options?: VirtualNetworkTapsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkTapsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, tapName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworkTapsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a Virtual Network Tap. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of the virtual network tap. - * @param parameters Parameters supplied to the create or update virtual network tap operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - tapName: string, - parameters: VirtualNetworkTap, - options?: VirtualNetworkTapsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate(resourceGroupName, tapName, parameters, options); - return poller.pollUntilDone(); - } - - /** - * Updates an VirtualNetworkTap tags. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of the tap. - * @param tapParameters Parameters supplied to update VirtualNetworkTap tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - tapName: string, - tapParameters: TagsObject, - options?: VirtualNetworkTapsUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, tapName, tapParameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all the VirtualNetworkTaps in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: VirtualNetworkTapsListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all the VirtualNetworkTaps in a subscription. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VirtualNetworkTapsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: VirtualNetworkTapsListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: VirtualNetworkTapsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.tapName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkTap, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.tapName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkTap, - }, - 201: { - bodyMapper: Mappers.VirtualNetworkTap, - }, - 202: { - bodyMapper: Mappers.VirtualNetworkTap, - }, - 204: { - bodyMapper: Mappers.VirtualNetworkTap, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters96, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.tapName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkTap, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.tapParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.tapName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkTapListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkTapListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkTapListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkTapListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualNetworks.ts b/sdk/network/arm-network/src/operations/virtualNetworks.ts deleted file mode 100644 index 132e71e7a53c..000000000000 --- a/sdk/network/arm-network/src/operations/virtualNetworks.ts +++ /dev/null @@ -1,1015 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualNetworks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualNetwork, - VirtualNetworksListAllNextOptionalParams, - VirtualNetworksListAllOptionalParams, - VirtualNetworksListAllResponse, - VirtualNetworksListNextOptionalParams, - VirtualNetworksListOptionalParams, - VirtualNetworksListResponse, - VirtualNetworkUsage, - VirtualNetworksListUsageNextOptionalParams, - VirtualNetworksListUsageOptionalParams, - VirtualNetworksListUsageResponse, - PublicIpDdosProtectionStatusResult, - VirtualNetworksListDdosProtectionStatusNextOptionalParams, - VirtualNetworksListDdosProtectionStatusOptionalParams, - VirtualNetworksListDdosProtectionStatusResponse, - VirtualNetworksDeleteOptionalParams, - VirtualNetworksGetOptionalParams, - VirtualNetworksGetResponse, - VirtualNetworksCreateOrUpdateOptionalParams, - VirtualNetworksCreateOrUpdateResponse, - TagsObject, - VirtualNetworksUpdateTagsOptionalParams, - VirtualNetworksUpdateTagsResponse, - VirtualNetworksCheckIPAddressAvailabilityOptionalParams, - VirtualNetworksCheckIPAddressAvailabilityResponse, - VirtualNetworksListAllNextResponse, - VirtualNetworksListNextResponse, - VirtualNetworksListUsageNextResponse, - VirtualNetworksListDdosProtectionStatusNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualNetworks operations. */ -export class VirtualNetworksImpl implements VirtualNetworks { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualNetworks class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all virtual networks in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: VirtualNetworksListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: VirtualNetworksListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworksListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: VirtualNetworksListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all virtual networks in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: VirtualNetworksListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: VirtualNetworksListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworksListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: VirtualNetworksListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Lists usage stats. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - public listUsage( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksListUsageOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listUsagePagingAll(resourceGroupName, virtualNetworkName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listUsagePagingPage(resourceGroupName, virtualNetworkName, options, settings); - }, - }; - } - - private async *listUsagePagingPage( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksListUsageOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworksListUsageResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listUsage(resourceGroupName, virtualNetworkName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listUsageNext( - resourceGroupName, - virtualNetworkName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listUsagePagingAll( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksListUsageOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listUsagePagingPage( - resourceGroupName, - virtualNetworkName, - options, - )) { - yield* page; - } - } - - /** - * Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - public beginListDdosProtectionStatusAndWait( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksListDdosProtectionStatusOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listDdosProtectionStatusPagingAll( - resourceGroupName, - virtualNetworkName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listDdosProtectionStatusPagingPage( - resourceGroupName, - virtualNetworkName, - options, - settings, - ); - }, - }; - } - - private async *listDdosProtectionStatusPagingPage( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksListDdosProtectionStatusOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworksListDdosProtectionStatusResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - const poller = await this._listDdosProtectionStatus( - resourceGroupName, - virtualNetworkName, - options, - ); - result = await poller.pollUntilDone(); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listDdosProtectionStatusNext( - resourceGroupName, - virtualNetworkName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listDdosProtectionStatusPagingAll( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksListDdosProtectionStatusOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listDdosProtectionStatusPagingPage( - resourceGroupName, - virtualNetworkName, - options, - )) { - yield* page; - } - } - - /** - * Deletes the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, virtualNetworkName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified virtual network by resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a virtual network in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param parameters Parameters supplied to the create or update virtual network operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkName: string, - parameters: VirtualNetwork, - options?: VirtualNetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworksCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworksCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a virtual network in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param parameters Parameters supplied to the create or update virtual network operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkName: string, - parameters: VirtualNetwork, - options?: VirtualNetworksCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualNetworkName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates a virtual network tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param parameters Parameters supplied to update virtual network tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - virtualNetworkName: string, - parameters: TagsObject, - options?: VirtualNetworksUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, parameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Gets all virtual networks in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: VirtualNetworksListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Gets all virtual networks in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: VirtualNetworksListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Checks whether a private IP address is available for use. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param ipAddress The private IP address to be verified. - * @param options The options parameters. - */ - checkIPAddressAvailability( - resourceGroupName: string, - virtualNetworkName: string, - ipAddress: string, - options?: VirtualNetworksCheckIPAddressAvailabilityOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, ipAddress, options }, - checkIPAddressAvailabilityOperationSpec, - ); - } - - /** - * Lists usage stats. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - private _listUsage( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksListUsageOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, options }, - listUsageOperationSpec, - ); - } - - /** - * Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - private async _listDdosProtectionStatus( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksListDdosProtectionStatusOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworksListDdosProtectionStatusResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkName, options }, - spec: listDdosProtectionStatusOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworksListDdosProtectionStatusResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: VirtualNetworksListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: VirtualNetworksListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListUsageNext - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param nextLink The nextLink from the previous successful call to the ListUsage method. - * @param options The options parameters. - */ - private _listUsageNext( - resourceGroupName: string, - virtualNetworkName: string, - nextLink: string, - options?: VirtualNetworksListUsageNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, nextLink, options }, - listUsageNextOperationSpec, - ); - } - - /** - * ListDdosProtectionStatusNext - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param nextLink The nextLink from the previous successful call to the ListDdosProtectionStatus - * method. - * @param options The options parameters. - */ - private _listDdosProtectionStatusNext( - resourceGroupName: string, - virtualNetworkName: string, - nextLink: string, - options?: VirtualNetworksListDdosProtectionStatusNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, nextLink, options }, - listDdosProtectionStatusNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetwork, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetwork, - }, - 201: { - bodyMapper: Mappers.VirtualNetwork, - }, - 202: { - bodyMapper: Mappers.VirtualNetwork, - }, - 204: { - bodyMapper: Mappers.VirtualNetwork, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters85, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetwork, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const checkIPAddressAvailabilityOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IPAddressAvailabilityResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.ipAddress], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listUsageOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkListUsageResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listDdosProtectionStatusOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/ddosProtectionStatus", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkDdosProtectionStatusResult, - }, - 201: { - bodyMapper: Mappers.VirtualNetworkDdosProtectionStatusResult, - }, - 202: { - bodyMapper: Mappers.VirtualNetworkDdosProtectionStatusResult, - }, - 204: { - bodyMapper: Mappers.VirtualNetworkDdosProtectionStatusResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.skipToken, Parameters.top2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listUsageNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkListUsageResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listDdosProtectionStatusNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkDdosProtectionStatusResult, - }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualRouterPeerings.ts b/sdk/network/arm-network/src/operations/virtualRouterPeerings.ts deleted file mode 100644 index 45f1522d437c..000000000000 --- a/sdk/network/arm-network/src/operations/virtualRouterPeerings.ts +++ /dev/null @@ -1,478 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualRouterPeerings } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualRouterPeering, - VirtualRouterPeeringsListNextOptionalParams, - VirtualRouterPeeringsListOptionalParams, - VirtualRouterPeeringsListResponse, - VirtualRouterPeeringsDeleteOptionalParams, - VirtualRouterPeeringsGetOptionalParams, - VirtualRouterPeeringsGetResponse, - VirtualRouterPeeringsCreateOrUpdateOptionalParams, - VirtualRouterPeeringsCreateOrUpdateResponse, - VirtualRouterPeeringsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualRouterPeerings operations. */ -export class VirtualRouterPeeringsImpl implements VirtualRouterPeerings { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualRouterPeerings class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all Virtual Router Peerings in a Virtual Router resource. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - virtualRouterName: string, - options?: VirtualRouterPeeringsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, virtualRouterName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, virtualRouterName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - virtualRouterName: string, - options?: VirtualRouterPeeringsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualRouterPeeringsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, virtualRouterName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - virtualRouterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - virtualRouterName: string, - options?: VirtualRouterPeeringsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, virtualRouterName, options)) { - yield* page; - } - } - - /** - * Deletes the specified peering from a Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualRouterName: string, - peeringName: string, - options?: VirtualRouterPeeringsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualRouterName, peeringName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified peering from a Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualRouterName: string, - peeringName: string, - options?: VirtualRouterPeeringsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualRouterName, - peeringName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the specified Virtual Router Peering. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param peeringName The name of the Virtual Router Peering. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualRouterName: string, - peeringName: string, - options?: VirtualRouterPeeringsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualRouterName, peeringName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the specified Virtual Router Peering. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param peeringName The name of the Virtual Router Peering. - * @param parameters Parameters supplied to the create or update Virtual Router Peering operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualRouterName: string, - peeringName: string, - parameters: VirtualRouterPeering, - options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualRouterPeeringsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualRouterName, - peeringName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualRouterPeeringsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified Virtual Router Peering. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param peeringName The name of the Virtual Router Peering. - * @param parameters Parameters supplied to the create or update Virtual Router Peering operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualRouterName: string, - peeringName: string, - parameters: VirtualRouterPeering, - options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualRouterName, - peeringName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all Virtual Router Peerings in a Virtual Router resource. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - virtualRouterName: string, - options?: VirtualRouterPeeringsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualRouterName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - virtualRouterName: string, - nextLink: string, - options?: VirtualRouterPeeringsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualRouterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.peeringName, - Parameters.virtualRouterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualRouterPeering, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.peeringName, - Parameters.virtualRouterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualRouterPeering, - }, - 201: { - bodyMapper: Mappers.VirtualRouterPeering, - }, - 202: { - bodyMapper: Mappers.VirtualRouterPeering, - }, - 204: { - bodyMapper: Mappers.VirtualRouterPeering, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters98, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.peeringName, - Parameters.virtualRouterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualRouterPeeringListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualRouterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualRouterPeeringListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.virtualRouterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualRouters.ts b/sdk/network/arm-network/src/operations/virtualRouters.ts deleted file mode 100644 index 385da9f1d92d..000000000000 --- a/sdk/network/arm-network/src/operations/virtualRouters.ts +++ /dev/null @@ -1,543 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualRouters } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualRouter, - VirtualRoutersListByResourceGroupNextOptionalParams, - VirtualRoutersListByResourceGroupOptionalParams, - VirtualRoutersListByResourceGroupResponse, - VirtualRoutersListNextOptionalParams, - VirtualRoutersListOptionalParams, - VirtualRoutersListResponse, - VirtualRoutersDeleteOptionalParams, - VirtualRoutersGetOptionalParams, - VirtualRoutersGetResponse, - VirtualRoutersCreateOrUpdateOptionalParams, - VirtualRoutersCreateOrUpdateResponse, - VirtualRoutersListByResourceGroupNextResponse, - VirtualRoutersListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualRouters operations. */ -export class VirtualRoutersImpl implements VirtualRouters { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualRouters class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all Virtual Routers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VirtualRoutersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VirtualRoutersListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualRoutersListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VirtualRoutersListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all the Virtual Routers in a subscription. - * @param options The options parameters. - */ - public list( - options?: VirtualRoutersListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: VirtualRoutersListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualRoutersListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: VirtualRoutersListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the specified Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualRouterName: string, - options?: VirtualRoutersDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualRouterName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualRouterName: string, - options?: VirtualRoutersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, virtualRouterName, options); - return poller.pollUntilDone(); - } - - /** - * Gets the specified Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualRouterName: string, - options?: VirtualRoutersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualRouterName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the specified Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param parameters Parameters supplied to the create or update Virtual Router. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualRouterName: string, - parameters: VirtualRouter, - options?: VirtualRoutersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualRoutersCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualRouterName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualRoutersCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the specified Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param parameters Parameters supplied to the create or update Virtual Router. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualRouterName: string, - parameters: VirtualRouter, - options?: VirtualRoutersCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualRouterName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all Virtual Routers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VirtualRoutersListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Gets all the Virtual Routers in a subscription. - * @param options The options parameters. - */ - private _list(options?: VirtualRoutersListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: VirtualRoutersListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: VirtualRoutersListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualRouterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualRouter, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualRouterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualRouter, - }, - 201: { - bodyMapper: Mappers.VirtualRouter, - }, - 202: { - bodyMapper: Mappers.VirtualRouter, - }, - 204: { - bodyMapper: Mappers.VirtualRouter, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters97, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualRouterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualRouterListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualRouterListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualRouterListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualRouterListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/virtualWans.ts b/sdk/network/arm-network/src/operations/virtualWans.ts deleted file mode 100644 index dd53089d6432..000000000000 --- a/sdk/network/arm-network/src/operations/virtualWans.ts +++ /dev/null @@ -1,586 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualWans } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualWAN, - VirtualWansListByResourceGroupNextOptionalParams, - VirtualWansListByResourceGroupOptionalParams, - VirtualWansListByResourceGroupResponse, - VirtualWansListNextOptionalParams, - VirtualWansListOptionalParams, - VirtualWansListResponse, - VirtualWansGetOptionalParams, - VirtualWansGetResponse, - VirtualWansCreateOrUpdateOptionalParams, - VirtualWansCreateOrUpdateResponse, - TagsObject, - VirtualWansUpdateTagsOptionalParams, - VirtualWansUpdateTagsResponse, - VirtualWansDeleteOptionalParams, - VirtualWansListByResourceGroupNextResponse, - VirtualWansListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualWans operations. */ -export class VirtualWansImpl implements VirtualWans { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VirtualWans class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the VirtualWANs in a resource group. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VirtualWansListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VirtualWansListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualWansListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VirtualWansListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Lists all the VirtualWANs in a subscription. - * @param options The options parameters. - */ - public list(options?: VirtualWansListOptionalParams): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: VirtualWansListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualWansListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: VirtualWansListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Retrieves the details of a VirtualWAN. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being retrieved. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualWANName: string, - options?: VirtualWansGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualWANName, options }, - getOperationSpec, - ); - } - - /** - * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being created or updated. - * @param wANParameters Parameters supplied to create or update VirtualWAN. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualWANName: string, - wANParameters: VirtualWAN, - options?: VirtualWansCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualWansCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualWANName, wANParameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualWansCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being created or updated. - * @param wANParameters Parameters supplied to create or update VirtualWAN. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualWANName: string, - wANParameters: VirtualWAN, - options?: VirtualWansCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualWANName, - wANParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates a VirtualWAN tags. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being updated. - * @param wANParameters Parameters supplied to Update VirtualWAN tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - virtualWANName: string, - wANParameters: TagsObject, - options?: VirtualWansUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualWANName, wANParameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Deletes a VirtualWAN. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being deleted. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualWANName: string, - options?: VirtualWansDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualWANName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a VirtualWAN. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being deleted. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualWANName: string, - options?: VirtualWansDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, virtualWANName, options); - return poller.pollUntilDone(); - } - - /** - * Lists all the VirtualWANs in a resource group. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VirtualWansListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Lists all the VirtualWANs in a subscription. - * @param options The options parameters. - */ - private _list(options?: VirtualWansListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The resource group name of the VirtualWan. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: VirtualWansListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: VirtualWansListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualWAN, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualWANName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualWAN, - }, - 201: { - bodyMapper: Mappers.VirtualWAN, - }, - 202: { - bodyMapper: Mappers.VirtualWAN, - }, - 204: { - bodyMapper: Mappers.VirtualWAN, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.wANParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualWANName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualWAN, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.wANParameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualWANName1, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualWANName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualWANsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualWANsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualWANsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVirtualWANsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/vpnConnections.ts b/sdk/network/arm-network/src/operations/vpnConnections.ts deleted file mode 100644 index 87bd8ec313e9..000000000000 --- a/sdk/network/arm-network/src/operations/vpnConnections.ts +++ /dev/null @@ -1,737 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VpnConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VpnConnection, - VpnConnectionsListByVpnGatewayNextOptionalParams, - VpnConnectionsListByVpnGatewayOptionalParams, - VpnConnectionsListByVpnGatewayResponse, - VpnConnectionsGetOptionalParams, - VpnConnectionsGetResponse, - VpnConnectionsCreateOrUpdateOptionalParams, - VpnConnectionsCreateOrUpdateResponse, - VpnConnectionsDeleteOptionalParams, - VpnConnectionsStartPacketCaptureOptionalParams, - VpnConnectionsStartPacketCaptureResponse, - VpnConnectionsStopPacketCaptureOptionalParams, - VpnConnectionsStopPacketCaptureResponse, - VpnConnectionsListByVpnGatewayNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VpnConnections operations. */ -export class VpnConnectionsImpl implements VpnConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VpnConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves all vpn connections for a particular virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - public listByVpnGateway( - resourceGroupName: string, - gatewayName: string, - options?: VpnConnectionsListByVpnGatewayOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByVpnGatewayPagingAll(resourceGroupName, gatewayName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByVpnGatewayPagingPage(resourceGroupName, gatewayName, options, settings); - }, - }; - } - - private async *listByVpnGatewayPagingPage( - resourceGroupName: string, - gatewayName: string, - options?: VpnConnectionsListByVpnGatewayOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VpnConnectionsListByVpnGatewayResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVpnGateway(resourceGroupName, gatewayName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVpnGatewayNext( - resourceGroupName, - gatewayName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByVpnGatewayPagingAll( - resourceGroupName: string, - gatewayName: string, - options?: VpnConnectionsListByVpnGatewayOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByVpnGatewayPagingPage( - resourceGroupName, - gatewayName, - options, - )) { - yield* page; - } - } - - /** - * Retrieves the details of a vpn connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - options?: VpnConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, connectionName, options }, - getOperationSpec, - ); - } - - /** - * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing - * connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - vpnConnectionParameters: VpnConnection, - options?: VpnConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnConnectionsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - gatewayName, - connectionName, - vpnConnectionParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VpnConnectionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing - * connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - vpnConnectionParameters: VpnConnection, - options?: VpnConnectionsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - gatewayName, - connectionName, - vpnConnectionParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a vpn connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - options?: VpnConnectionsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, connectionName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a vpn connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - options?: VpnConnectionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, gatewayName, connectionName, options); - return poller.pollUntilDone(); - } - - /** - * Starts packet capture on Vpn connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param vpnConnectionName The name of the vpn connection. - * @param options The options parameters. - */ - async beginStartPacketCapture( - resourceGroupName: string, - gatewayName: string, - vpnConnectionName: string, - options?: VpnConnectionsStartPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnConnectionsStartPacketCaptureResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, vpnConnectionName, options }, - spec: startPacketCaptureOperationSpec, - }); - const poller = await createHttpPoller< - VpnConnectionsStartPacketCaptureResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Starts packet capture on Vpn connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param vpnConnectionName The name of the vpn connection. - * @param options The options parameters. - */ - async beginStartPacketCaptureAndWait( - resourceGroupName: string, - gatewayName: string, - vpnConnectionName: string, - options?: VpnConnectionsStartPacketCaptureOptionalParams, - ): Promise { - const poller = await this.beginStartPacketCapture( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Stops packet capture on Vpn connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param vpnConnectionName The name of the vpn connection. - * @param options The options parameters. - */ - async beginStopPacketCapture( - resourceGroupName: string, - gatewayName: string, - vpnConnectionName: string, - options?: VpnConnectionsStopPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnConnectionsStopPacketCaptureResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, vpnConnectionName, options }, - spec: stopPacketCaptureOperationSpec, - }); - const poller = await createHttpPoller< - VpnConnectionsStopPacketCaptureResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Stops packet capture on Vpn connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param vpnConnectionName The name of the vpn connection. - * @param options The options parameters. - */ - async beginStopPacketCaptureAndWait( - resourceGroupName: string, - gatewayName: string, - vpnConnectionName: string, - options?: VpnConnectionsStopPacketCaptureOptionalParams, - ): Promise { - const poller = await this.beginStopPacketCapture( - resourceGroupName, - gatewayName, - vpnConnectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves all vpn connections for a particular virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - private _listByVpnGateway( - resourceGroupName: string, - gatewayName: string, - options?: VpnConnectionsListByVpnGatewayOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, options }, - listByVpnGatewayOperationSpec, - ); - } - - /** - * ListByVpnGatewayNext - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param nextLink The nextLink from the previous successful call to the ListByVpnGateway method. - * @param options The options parameters. - */ - private _listByVpnGatewayNext( - resourceGroupName: string, - gatewayName: string, - nextLink: string, - options?: VpnConnectionsListByVpnGatewayNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, nextLink, options }, - listByVpnGatewayNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VpnConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VpnConnection, - }, - 201: { - bodyMapper: Mappers.VpnConnection, - }, - 202: { - bodyMapper: Mappers.VpnConnection, - }, - 204: { - bodyMapper: Mappers.VpnConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.vpnConnectionParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const startPacketCaptureOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters101, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - Parameters.vpnConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const stopPacketCaptureOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters102, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - Parameters.vpnConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByVpnGatewayOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnConnectionsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByVpnGatewayNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnConnectionsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/vpnGateways.ts b/sdk/network/arm-network/src/operations/vpnGateways.ts deleted file mode 100644 index 61e16cd5922a..000000000000 --- a/sdk/network/arm-network/src/operations/vpnGateways.ts +++ /dev/null @@ -1,1017 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VpnGateways } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VpnGateway, - VpnGatewaysListByResourceGroupNextOptionalParams, - VpnGatewaysListByResourceGroupOptionalParams, - VpnGatewaysListByResourceGroupResponse, - VpnGatewaysListNextOptionalParams, - VpnGatewaysListOptionalParams, - VpnGatewaysListResponse, - VpnGatewaysGetOptionalParams, - VpnGatewaysGetResponse, - VpnGatewaysCreateOrUpdateOptionalParams, - VpnGatewaysCreateOrUpdateResponse, - TagsObject, - VpnGatewaysUpdateTagsOptionalParams, - VpnGatewaysUpdateTagsResponse, - VpnGatewaysDeleteOptionalParams, - VpnGatewaysResetOptionalParams, - VpnGatewaysResetResponse, - VpnGatewaysStartPacketCaptureOptionalParams, - VpnGatewaysStartPacketCaptureResponse, - VpnGatewaysStopPacketCaptureOptionalParams, - VpnGatewaysStopPacketCaptureResponse, - VpnGatewaysListByResourceGroupNextResponse, - VpnGatewaysListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VpnGateways operations. */ -export class VpnGatewaysImpl implements VpnGateways { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VpnGateways class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the VpnGateways in a resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VpnGatewaysListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VpnGatewaysListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VpnGatewaysListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VpnGatewaysListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Lists all the VpnGateways in a subscription. - * @param options The options parameters. - */ - public list(options?: VpnGatewaysListOptionalParams): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: VpnGatewaysListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VpnGatewaysListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: VpnGatewaysListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Retrieves the details of a virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, options }, - getOperationSpec, - ); - } - - /** - * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - vpnGatewayParameters: VpnGateway, - options?: VpnGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnGatewaysCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, vpnGatewayParameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VpnGatewaysCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - vpnGatewayParameters: VpnGateway, - options?: VpnGatewaysCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates virtual wan vpn gateway tags. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param vpnGatewayParameters Parameters supplied to update a virtual wan vpn gateway tags. - * @param options The options parameters. - */ - async beginUpdateTags( - resourceGroupName: string, - gatewayName: string, - vpnGatewayParameters: TagsObject, - options?: VpnGatewaysUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike, VpnGatewaysUpdateTagsResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, vpnGatewayParameters, options }, - spec: updateTagsOperationSpec, - }); - const poller = await createHttpPoller< - VpnGatewaysUpdateTagsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates virtual wan vpn gateway tags. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param vpnGatewayParameters Parameters supplied to update a virtual wan vpn gateway tags. - * @param options The options parameters. - */ - async beginUpdateTagsAndWait( - resourceGroupName: string, - gatewayName: string, - vpnGatewayParameters: TagsObject, - options?: VpnGatewaysUpdateTagsOptionalParams, - ): Promise { - const poller = await this.beginUpdateTags( - resourceGroupName, - gatewayName, - vpnGatewayParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, gatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Resets the primary of the vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginReset( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysResetOptionalParams, - ): Promise, VpnGatewaysResetResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, options }, - spec: resetOperationSpec, - }); - const poller = await createHttpPoller< - VpnGatewaysResetResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Resets the primary of the vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginResetAndWait( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysResetOptionalParams, - ): Promise { - const poller = await this.beginReset(resourceGroupName, gatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Starts packet capture on vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginStartPacketCapture( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysStartPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnGatewaysStartPacketCaptureResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, options }, - spec: startPacketCaptureOperationSpec, - }); - const poller = await createHttpPoller< - VpnGatewaysStartPacketCaptureResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Starts packet capture on vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginStartPacketCaptureAndWait( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysStartPacketCaptureOptionalParams, - ): Promise { - const poller = await this.beginStartPacketCapture(resourceGroupName, gatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Stops packet capture on vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginStopPacketCapture( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysStopPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnGatewaysStopPacketCaptureResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, options }, - spec: stopPacketCaptureOperationSpec, - }); - const poller = await createHttpPoller< - VpnGatewaysStopPacketCaptureResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Stops packet capture on vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - async beginStopPacketCaptureAndWait( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysStopPacketCaptureOptionalParams, - ): Promise { - const poller = await this.beginStopPacketCapture(resourceGroupName, gatewayName, options); - return poller.pollUntilDone(); - } - - /** - * Lists all the VpnGateways in a resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VpnGatewaysListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Lists all the VpnGateways in a subscription. - * @param options The options parameters. - */ - private _list(options?: VpnGatewaysListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The resource group name of the VpnGateway. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: VpnGatewaysListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: VpnGatewaysListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VpnGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VpnGateway, - }, - 201: { - bodyMapper: Mappers.VpnGateway, - }, - 202: { - bodyMapper: Mappers.VpnGateway, - }, - 204: { - bodyMapper: Mappers.VpnGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.vpnGatewayParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VpnGateway, - }, - 201: { - bodyMapper: Mappers.VpnGateway, - }, - 202: { - bodyMapper: Mappers.VpnGateway, - }, - 204: { - bodyMapper: Mappers.VpnGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.vpnGatewayParameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const resetOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VpnGateway, - }, - 201: { - bodyMapper: Mappers.VpnGateway, - }, - 202: { - bodyMapper: Mappers.VpnGateway, - }, - 204: { - bodyMapper: Mappers.VpnGateway, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.ipConfigurationId], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const startPacketCaptureOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters99, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const stopPacketCaptureOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters100, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnGatewaysResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnGatewaysResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnGatewaysResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnGatewaysResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/vpnLinkConnections.ts b/sdk/network/arm-network/src/operations/vpnLinkConnections.ts deleted file mode 100644 index 21efc71cc46a..000000000000 --- a/sdk/network/arm-network/src/operations/vpnLinkConnections.ts +++ /dev/null @@ -1,945 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VpnLinkConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ConnectionSharedKeyResult, - VpnLinkConnectionsGetAllSharedKeysNextOptionalParams, - VpnLinkConnectionsGetAllSharedKeysOptionalParams, - VpnLinkConnectionsGetAllSharedKeysResponse, - VpnSiteLinkConnection, - VpnLinkConnectionsListByVpnConnectionNextOptionalParams, - VpnLinkConnectionsListByVpnConnectionOptionalParams, - VpnLinkConnectionsListByVpnConnectionResponse, - VpnLinkConnectionsResetConnectionOptionalParams, - VpnLinkConnectionsGetDefaultSharedKeyOptionalParams, - VpnLinkConnectionsGetDefaultSharedKeyResponse, - VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, - VpnLinkConnectionsSetOrInitDefaultSharedKeyResponse, - VpnLinkConnectionsListDefaultSharedKeyOptionalParams, - VpnLinkConnectionsListDefaultSharedKeyResponse, - VpnLinkConnectionsGetIkeSasOptionalParams, - VpnLinkConnectionsGetIkeSasResponse, - VpnLinkConnectionsGetAllSharedKeysNextResponse, - VpnLinkConnectionsListByVpnConnectionNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VpnLinkConnections operations. */ -export class VpnLinkConnectionsImpl implements VpnLinkConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VpnLinkConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all shared keys of VpnLink connection specified. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - public listAllSharedKeys( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsGetAllSharedKeysOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.getAllSharedKeysPagingAll( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.getAllSharedKeysPagingPage( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - settings, - ); - }, - }; - } - - private async *getAllSharedKeysPagingPage( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsGetAllSharedKeysOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VpnLinkConnectionsGetAllSharedKeysResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._getAllSharedKeys( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._getAllSharedKeysNext( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *getAllSharedKeysPagingAll( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsGetAllSharedKeysOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.getAllSharedKeysPagingPage( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - )) { - yield* page; - } - } - - /** - * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * @param resourceGroupName The resource group name of the vpn gateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param options The options parameters. - */ - public listByVpnConnection( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - options?: VpnLinkConnectionsListByVpnConnectionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByVpnConnectionPagingAll( - resourceGroupName, - gatewayName, - connectionName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByVpnConnectionPagingPage( - resourceGroupName, - gatewayName, - connectionName, - options, - settings, - ); - }, - }; - } - - private async *listByVpnConnectionPagingPage( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - options?: VpnLinkConnectionsListByVpnConnectionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VpnLinkConnectionsListByVpnConnectionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVpnConnection( - resourceGroupName, - gatewayName, - connectionName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVpnConnectionNext( - resourceGroupName, - gatewayName, - connectionName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByVpnConnectionPagingAll( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - options?: VpnLinkConnectionsListByVpnConnectionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByVpnConnectionPagingPage( - resourceGroupName, - gatewayName, - connectionName, - options, - )) { - yield* page; - } - } - - /** - * Resets the VpnLink connection specified. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - async beginResetConnection( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsResetConnectionOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - }, - spec: resetConnectionOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Resets the VpnLink connection specified. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - async beginResetConnectionAndWait( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsResetConnectionOptionalParams, - ): Promise { - const poller = await this.beginResetConnection( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists all shared keys of VpnLink connection specified. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - private _getAllSharedKeys( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsGetAllSharedKeysOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - }, - getAllSharedKeysOperationSpec, - ); - } - - /** - * Gets the shared key of VpnLink connection specified. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - getDefaultSharedKey( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsGetDefaultSharedKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - }, - getDefaultSharedKeyOperationSpec, - ); - } - - /** - * Sets or auto generates the shared key based on the user input. If users give a shared key value, it - * does the set operation. If key length is given, the operation creates a random key of the - * pre-defined length. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param linkConnectionName The name of the vpn link connection. - * @param connectionSharedKeyParameters Parameters supplied to set or auto generate the shared key for - * the vpn link connection. - * @param options The options parameters. - */ - async beginSetOrInitDefaultSharedKey( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - connectionSharedKeyParameters: ConnectionSharedKeyResult, - options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnLinkConnectionsSetOrInitDefaultSharedKeyResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - connectionSharedKeyParameters, - options, - }, - spec: setOrInitDefaultSharedKeyOperationSpec, - }); - const poller = await createHttpPoller< - VpnLinkConnectionsSetOrInitDefaultSharedKeyResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Sets or auto generates the shared key based on the user input. If users give a shared key value, it - * does the set operation. If key length is given, the operation creates a random key of the - * pre-defined length. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param linkConnectionName The name of the vpn link connection. - * @param connectionSharedKeyParameters Parameters supplied to set or auto generate the shared key for - * the vpn link connection. - * @param options The options parameters. - */ - async beginSetOrInitDefaultSharedKeyAndWait( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - connectionSharedKeyParameters: ConnectionSharedKeyResult, - options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, - ): Promise { - const poller = await this.beginSetOrInitDefaultSharedKey( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - connectionSharedKeyParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the value of the shared key of VpnLink connection specified. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - listDefaultSharedKey( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsListDefaultSharedKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - }, - listDefaultSharedKeyOperationSpec, - ); - } - - /** - * Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - async beginGetIkeSas( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsGetIkeSasOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnLinkConnectionsGetIkeSasResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - }, - spec: getIkeSasOperationSpec, - }); - const poller = await createHttpPoller< - VpnLinkConnectionsGetIkeSasResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - async beginGetIkeSasAndWait( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsGetIkeSasOptionalParams, - ): Promise { - const poller = await this.beginGetIkeSas( - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * @param resourceGroupName The resource group name of the vpn gateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param options The options parameters. - */ - private _listByVpnConnection( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - options?: VpnLinkConnectionsListByVpnConnectionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, connectionName, options }, - listByVpnConnectionOperationSpec, - ); - } - - /** - * GetAllSharedKeysNext - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param nextLink The nextLink from the previous successful call to the GetAllSharedKeys method. - * @param options The options parameters. - */ - private _getAllSharedKeysNext( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - nextLink: string, - options?: VpnLinkConnectionsGetAllSharedKeysNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - nextLink, - options, - }, - getAllSharedKeysNextOperationSpec, - ); - } - - /** - * ListByVpnConnectionNext - * @param resourceGroupName The resource group name of the vpn gateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param nextLink The nextLink from the previous successful call to the ListByVpnConnection method. - * @param options The options parameters. - */ - private _listByVpnConnectionNext( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - nextLink: string, - options?: VpnLinkConnectionsListByVpnConnectionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, connectionName, nextLink, options }, - listByVpnConnectionNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const resetConnectionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.gatewayName, - Parameters.linkConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getAllSharedKeysOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ConnectionSharedKeyResultList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.gatewayName, - Parameters.linkConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getDefaultSharedKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ConnectionSharedKeyResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.gatewayName, - Parameters.linkConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const setOrInitDefaultSharedKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ConnectionSharedKeyResult, - }, - 201: { - bodyMapper: Mappers.ConnectionSharedKeyResult, - }, - 202: { - bodyMapper: Mappers.ConnectionSharedKeyResult, - }, - 204: { - bodyMapper: Mappers.ConnectionSharedKeyResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.connectionSharedKeyParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.gatewayName, - Parameters.linkConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listDefaultSharedKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys/default/listSharedKey", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ConnectionSharedKeyResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.gatewayName, - Parameters.linkConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getIkeSasOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { type: { name: "String" } }, - }, - 201: { - bodyMapper: { type: { name: "String" } }, - }, - 202: { - bodyMapper: { type: { name: "String" } }, - }, - 204: { - bodyMapper: { type: { name: "String" } }, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.gatewayName, - Parameters.linkConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByVpnConnectionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnSiteLinkConnectionsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getAllSharedKeysNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ConnectionSharedKeyResultList, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.connectionName, - Parameters.gatewayName, - Parameters.linkConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByVpnConnectionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnSiteLinkConnectionsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.connectionName, - Parameters.gatewayName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/vpnServerConfigurations.ts b/sdk/network/arm-network/src/operations/vpnServerConfigurations.ts deleted file mode 100644 index 81289199816f..000000000000 --- a/sdk/network/arm-network/src/operations/vpnServerConfigurations.ts +++ /dev/null @@ -1,644 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VpnServerConfigurations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VpnServerConfiguration, - VpnServerConfigurationsListByResourceGroupNextOptionalParams, - VpnServerConfigurationsListByResourceGroupOptionalParams, - VpnServerConfigurationsListByResourceGroupResponse, - VpnServerConfigurationsListNextOptionalParams, - VpnServerConfigurationsListOptionalParams, - VpnServerConfigurationsListResponse, - VpnServerConfigurationsGetOptionalParams, - VpnServerConfigurationsGetResponse, - VpnServerConfigurationsCreateOrUpdateOptionalParams, - VpnServerConfigurationsCreateOrUpdateResponse, - TagsObject, - VpnServerConfigurationsUpdateTagsOptionalParams, - VpnServerConfigurationsUpdateTagsResponse, - VpnServerConfigurationsDeleteOptionalParams, - VpnServerConfigurationsListRadiusSecretsOptionalParams, - VpnServerConfigurationsListRadiusSecretsResponse, - VpnServerConfigurationsListByResourceGroupNextResponse, - VpnServerConfigurationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VpnServerConfigurations operations. */ -export class VpnServerConfigurationsImpl implements VpnServerConfigurations { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VpnServerConfigurations class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the vpnServerConfigurations in a resource group. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VpnServerConfigurationsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VpnServerConfigurationsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VpnServerConfigurationsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VpnServerConfigurationsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Lists all the VpnServerConfigurations in a subscription. - * @param options The options parameters. - */ - public list( - options?: VpnServerConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: VpnServerConfigurationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VpnServerConfigurationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: VpnServerConfigurationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Retrieves the details of a VpnServerConfiguration. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being retrieved. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - vpnServerConfigurationName: string, - options?: VpnServerConfigurationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vpnServerConfigurationName, options }, - getOperationSpec, - ); - } - - /** - * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing - * VpnServerConfiguration. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. - * @param vpnServerConfigurationParameters Parameters supplied to create or update - * VpnServerConfiguration. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - vpnServerConfigurationName: string, - vpnServerConfigurationParameters: VpnServerConfiguration, - options?: VpnServerConfigurationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnServerConfigurationsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VpnServerConfigurationsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing - * VpnServerConfiguration. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. - * @param vpnServerConfigurationParameters Parameters supplied to create or update - * VpnServerConfiguration. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - vpnServerConfigurationName: string, - vpnServerConfigurationParameters: VpnServerConfiguration, - options?: VpnServerConfigurationsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates VpnServerConfiguration tags. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being updated. - * @param vpnServerConfigurationParameters Parameters supplied to update VpnServerConfiguration tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - vpnServerConfigurationName: string, - vpnServerConfigurationParameters: TagsObject, - options?: VpnServerConfigurationsUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vpnServerConfigurationName, - vpnServerConfigurationParameters, - options, - }, - updateTagsOperationSpec, - ); - } - - /** - * Deletes a VpnServerConfiguration. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - vpnServerConfigurationName: string, - options?: VpnServerConfigurationsDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, vpnServerConfigurationName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a VpnServerConfiguration. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - vpnServerConfigurationName: string, - options?: VpnServerConfigurationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, vpnServerConfigurationName, options); - return poller.pollUntilDone(); - } - - /** - * Lists all the vpnServerConfigurations in a resource group. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VpnServerConfigurationsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Lists all the VpnServerConfigurations in a subscription. - * @param options The options parameters. - */ - private _list( - options?: VpnServerConfigurationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * List all Radius servers with respective radius secrets from VpnServerConfiguration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration. - * @param options The options parameters. - */ - listRadiusSecrets( - resourceGroupName: string, - vpnServerConfigurationName: string, - options?: VpnServerConfigurationsListRadiusSecretsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vpnServerConfigurationName, options }, - listRadiusSecretsOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: VpnServerConfigurationsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: VpnServerConfigurationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VpnServerConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.vpnServerConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VpnServerConfiguration, - }, - 201: { - bodyMapper: Mappers.VpnServerConfiguration, - }, - 202: { - bodyMapper: Mappers.VpnServerConfiguration, - }, - 204: { - bodyMapper: Mappers.VpnServerConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.vpnServerConfigurationParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.vpnServerConfigurationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VpnServerConfiguration, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.vpnServerConfigurationParameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.vpnServerConfigurationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.vpnServerConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnServerConfigurationsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnServerConfigurationsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listRadiusSecretsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/listRadiusSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.RadiusAuthServerListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName1, - Parameters.vpnServerConfigurationName1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnServerConfigurationsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnServerConfigurationsResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/vpnServerConfigurationsAssociatedWithVirtualWan.ts b/sdk/network/arm-network/src/operations/vpnServerConfigurationsAssociatedWithVirtualWan.ts deleted file mode 100644 index e792073425c5..000000000000 --- a/sdk/network/arm-network/src/operations/vpnServerConfigurationsAssociatedWithVirtualWan.ts +++ /dev/null @@ -1,149 +0,0 @@ -// 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 type { VpnServerConfigurationsAssociatedWithVirtualWan } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, - VpnServerConfigurationsAssociatedWithVirtualWanListResponse, -} from "../models/index.js"; - -/** Class containing VpnServerConfigurationsAssociatedWithVirtualWan operations. */ -export class VpnServerConfigurationsAssociatedWithVirtualWanImpl implements VpnServerConfigurationsAssociatedWithVirtualWan { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VpnServerConfigurationsAssociatedWithVirtualWan class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param options The options parameters. - */ - async beginList( - resourceGroupName: string, - virtualWANName: string, - options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnServerConfigurationsAssociatedWithVirtualWanListResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualWANName, options }, - spec: listOperationSpec, - }); - const poller = await createHttpPoller< - VpnServerConfigurationsAssociatedWithVirtualWanListResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param options The options parameters. - */ - async beginListAndWait( - resourceGroupName: string, - virtualWANName: string, - options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, - ): Promise { - const poller = await this.beginList(resourceGroupName, virtualWANName, options); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VpnServerConfigurationsResponse, - }, - 201: { - bodyMapper: Mappers.VpnServerConfigurationsResponse, - }, - 202: { - bodyMapper: Mappers.VpnServerConfigurationsResponse, - }, - 204: { - bodyMapper: Mappers.VpnServerConfigurationsResponse, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualWANName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/vpnSiteLinkConnections.ts b/sdk/network/arm-network/src/operations/vpnSiteLinkConnections.ts deleted file mode 100644 index ad119ef0d458..000000000000 --- a/sdk/network/arm-network/src/operations/vpnSiteLinkConnections.ts +++ /dev/null @@ -1,81 +0,0 @@ -// 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 type { VpnSiteLinkConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - VpnSiteLinkConnectionsGetOptionalParams, - VpnSiteLinkConnectionsGetResponse, -} from "../models/index.js"; - -/** Class containing VpnSiteLinkConnections operations. */ -export class VpnSiteLinkConnectionsImpl implements VpnSiteLinkConnections { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VpnSiteLinkConnections class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Retrieves the details of a vpn site link connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnSiteLinkConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - gatewayName, - connectionName, - linkConnectionName, - options, - }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VpnSiteLinkConnection, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.connectionName, - Parameters.gatewayName, - Parameters.linkConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/vpnSiteLinks.ts b/sdk/network/arm-network/src/operations/vpnSiteLinks.ts deleted file mode 100644 index e177fac5af73..000000000000 --- a/sdk/network/arm-network/src/operations/vpnSiteLinks.ts +++ /dev/null @@ -1,229 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VpnSiteLinks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - VpnSiteLink, - VpnSiteLinksListByVpnSiteNextOptionalParams, - VpnSiteLinksListByVpnSiteOptionalParams, - VpnSiteLinksListByVpnSiteResponse, - VpnSiteLinksGetOptionalParams, - VpnSiteLinksGetResponse, - VpnSiteLinksListByVpnSiteNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VpnSiteLinks operations. */ -export class VpnSiteLinksImpl implements VpnSiteLinks { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VpnSiteLinks class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the vpnSiteLinks in a resource group for a vpn site. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite. - * @param options The options parameters. - */ - public listByVpnSite( - resourceGroupName: string, - vpnSiteName: string, - options?: VpnSiteLinksListByVpnSiteOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByVpnSitePagingAll(resourceGroupName, vpnSiteName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByVpnSitePagingPage(resourceGroupName, vpnSiteName, options, settings); - }, - }; - } - - private async *listByVpnSitePagingPage( - resourceGroupName: string, - vpnSiteName: string, - options?: VpnSiteLinksListByVpnSiteOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VpnSiteLinksListByVpnSiteResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVpnSite(resourceGroupName, vpnSiteName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVpnSiteNext( - resourceGroupName, - vpnSiteName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByVpnSitePagingAll( - resourceGroupName: string, - vpnSiteName: string, - options?: VpnSiteLinksListByVpnSiteOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByVpnSitePagingPage( - resourceGroupName, - vpnSiteName, - options, - )) { - yield* page; - } - } - - /** - * Retrieves the details of a VPN site link. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite. - * @param vpnSiteLinkName The name of the VpnSiteLink being retrieved. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - vpnSiteName: string, - vpnSiteLinkName: string, - options?: VpnSiteLinksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vpnSiteName, vpnSiteLinkName, options }, - getOperationSpec, - ); - } - - /** - * Lists all the vpnSiteLinks in a resource group for a vpn site. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite. - * @param options The options parameters. - */ - private _listByVpnSite( - resourceGroupName: string, - vpnSiteName: string, - options?: VpnSiteLinksListByVpnSiteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vpnSiteName, options }, - listByVpnSiteOperationSpec, - ); - } - - /** - * ListByVpnSiteNext - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite. - * @param nextLink The nextLink from the previous successful call to the ListByVpnSite method. - * @param options The options parameters. - */ - private _listByVpnSiteNext( - resourceGroupName: string, - vpnSiteName: string, - nextLink: string, - options?: VpnSiteLinksListByVpnSiteNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vpnSiteName, nextLink, options }, - listByVpnSiteNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VpnSiteLink, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.vpnSiteName, - Parameters.vpnSiteLinkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByVpnSiteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnSiteLinksResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.vpnSiteName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByVpnSiteNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnSiteLinksResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.vpnSiteName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/vpnSites.ts b/sdk/network/arm-network/src/operations/vpnSites.ts deleted file mode 100644 index 3bbebecd3f65..000000000000 --- a/sdk/network/arm-network/src/operations/vpnSites.ts +++ /dev/null @@ -1,583 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VpnSites } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VpnSite, - VpnSitesListByResourceGroupNextOptionalParams, - VpnSitesListByResourceGroupOptionalParams, - VpnSitesListByResourceGroupResponse, - VpnSitesListNextOptionalParams, - VpnSitesListOptionalParams, - VpnSitesListResponse, - VpnSitesGetOptionalParams, - VpnSitesGetResponse, - VpnSitesCreateOrUpdateOptionalParams, - VpnSitesCreateOrUpdateResponse, - TagsObject, - VpnSitesUpdateTagsOptionalParams, - VpnSitesUpdateTagsResponse, - VpnSitesDeleteOptionalParams, - VpnSitesListByResourceGroupNextResponse, - VpnSitesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VpnSites operations. */ -export class VpnSitesImpl implements VpnSites { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VpnSites class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all the vpnSites in a resource group. - * @param resourceGroupName The resource group name of the VpnSite. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VpnSitesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VpnSitesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VpnSitesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VpnSitesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Lists all the VpnSites in a subscription. - * @param options The options parameters. - */ - public list(options?: VpnSitesListOptionalParams): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: VpnSitesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VpnSitesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: VpnSitesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Retrieves the details of a VPN site. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being retrieved. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - vpnSiteName: string, - options?: VpnSitesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vpnSiteName, options }, - getOperationSpec, - ); - } - - /** - * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being created or updated. - * @param vpnSiteParameters Parameters supplied to create or update VpnSite. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - vpnSiteName: string, - vpnSiteParameters: VpnSite, - options?: VpnSitesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, VpnSitesCreateOrUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, vpnSiteName, vpnSiteParameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VpnSitesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being created or updated. - * @param vpnSiteParameters Parameters supplied to create or update VpnSite. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - vpnSiteName: string, - vpnSiteParameters: VpnSite, - options?: VpnSitesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - vpnSiteName, - vpnSiteParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates VpnSite tags. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being updated. - * @param vpnSiteParameters Parameters supplied to update VpnSite tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - vpnSiteName: string, - vpnSiteParameters: TagsObject, - options?: VpnSitesUpdateTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vpnSiteName, vpnSiteParameters, options }, - updateTagsOperationSpec, - ); - } - - /** - * Deletes a VpnSite. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being deleted. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - vpnSiteName: string, - options?: VpnSitesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, vpnSiteName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a VpnSite. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being deleted. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - vpnSiteName: string, - options?: VpnSitesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, vpnSiteName, options); - return poller.pollUntilDone(); - } - - /** - * Lists all the vpnSites in a resource group. - * @param resourceGroupName The resource group name of the VpnSite. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VpnSitesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Lists all the VpnSites in a subscription. - * @param options The options parameters. - */ - private _list(options?: VpnSitesListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The resource group name of the VpnSite. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: VpnSitesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: VpnSitesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VpnSite, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.vpnSiteName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VpnSite, - }, - 201: { - bodyMapper: Mappers.VpnSite, - }, - 202: { - bodyMapper: Mappers.VpnSite, - }, - 204: { - bodyMapper: Mappers.VpnSite, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.vpnSiteParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.vpnSiteName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VpnSite, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.vpnSiteParameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.vpnSiteName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.vpnSiteName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnSitesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnSitesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnSitesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListVpnSitesResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/vpnSitesConfiguration.ts b/sdk/network/arm-network/src/operations/vpnSitesConfiguration.ts deleted file mode 100644 index 0ec987b22eb8..000000000000 --- a/sdk/network/arm-network/src/operations/vpnSitesConfiguration.ts +++ /dev/null @@ -1,139 +0,0 @@ -// 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 type { VpnSitesConfiguration } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - GetVpnSitesConfigurationRequest, - VpnSitesConfigurationDownloadOptionalParams, -} from "../models/index.js"; - -/** Class containing VpnSitesConfiguration operations. */ -export class VpnSitesConfigurationImpl implements VpnSitesConfiguration { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class VpnSitesConfiguration class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gives the sas-url to download the configurations for vpn-sites in a resource group. - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. - * @param request Parameters supplied to download vpn-sites configuration. - * @param options The options parameters. - */ - async beginDownload( - resourceGroupName: string, - virtualWANName: string, - request: GetVpnSitesConfigurationRequest, - options?: VpnSitesConfigurationDownloadOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualWANName, request, options }, - spec: downloadOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Gives the sas-url to download the configurations for vpn-sites in a resource group. - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. - * @param request Parameters supplied to download vpn-sites configuration. - * @param options The options parameters. - */ - async beginDownloadAndWait( - resourceGroupName: string, - virtualWANName: string, - request: GetVpnSitesConfigurationRequest, - options?: VpnSitesConfigurationDownloadOptionalParams, - ): Promise { - const poller = await this.beginDownload(resourceGroupName, virtualWANName, request, options); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const downloadOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.request3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.virtualWANName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/webApplicationFirewallPolicies.ts b/sdk/network/arm-network/src/operations/webApplicationFirewallPolicies.ts deleted file mode 100644 index 6f08bda3d134..000000000000 --- a/sdk/network/arm-network/src/operations/webApplicationFirewallPolicies.ts +++ /dev/null @@ -1,461 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { WebApplicationFirewallPolicies } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - WebApplicationFirewallPolicy, - WebApplicationFirewallPoliciesListNextOptionalParams, - WebApplicationFirewallPoliciesListOptionalParams, - WebApplicationFirewallPoliciesListResponse, - WebApplicationFirewallPoliciesListAllNextOptionalParams, - WebApplicationFirewallPoliciesListAllOptionalParams, - WebApplicationFirewallPoliciesListAllResponse, - WebApplicationFirewallPoliciesGetOptionalParams, - WebApplicationFirewallPoliciesGetResponse, - WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams, - WebApplicationFirewallPoliciesCreateOrUpdateResponse, - WebApplicationFirewallPoliciesDeleteOptionalParams, - WebApplicationFirewallPoliciesListNextResponse, - WebApplicationFirewallPoliciesListAllNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WebApplicationFirewallPolicies operations. */ -export class WebApplicationFirewallPoliciesImpl implements WebApplicationFirewallPolicies { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class WebApplicationFirewallPolicies class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Lists all of the protection policies within a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: WebApplicationFirewallPoliciesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: WebApplicationFirewallPoliciesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WebApplicationFirewallPoliciesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: WebApplicationFirewallPoliciesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets all the WAF policies in a subscription. - * @param options The options parameters. - */ - public listAll( - options?: WebApplicationFirewallPoliciesListAllOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAllPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAllPagingPage(options, settings); - }, - }; - } - - private async *listAllPagingPage( - options?: WebApplicationFirewallPoliciesListAllOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WebApplicationFirewallPoliciesListAllResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAll(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAllNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAllPagingAll( - options?: WebApplicationFirewallPoliciesListAllOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAllPagingPage(options)) { - yield* page; - } - } - - /** - * Lists all of the protection policies within a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: WebApplicationFirewallPoliciesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); - } - - /** - * Gets all the WAF policies in a subscription. - * @param options The options parameters. - */ - private _listAll( - options?: WebApplicationFirewallPoliciesListAllOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listAllOperationSpec); - } - - /** - * Retrieve protection policy with specified name within a resource group. - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - policyName: string, - options?: WebApplicationFirewallPoliciesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, policyName, options }, - getOperationSpec, - ); - } - - /** - * Creates or update policy with specified rule set name within a resource group. - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the policy. - * @param parameters Policy to be created. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - policyName: string, - parameters: WebApplicationFirewallPolicy, - options?: WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, policyName, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes Policy. - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the policy. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - policyName: string, - options?: WebApplicationFirewallPoliciesDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, policyName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes Policy. - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the policy. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - policyName: string, - options?: WebApplicationFirewallPoliciesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, policyName, options); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: WebApplicationFirewallPoliciesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListAllNext - * @param nextLink The nextLink from the previous successful call to the ListAll method. - * @param options The options parameters. - */ - private _listAllNext( - nextLink: string, - options?: WebApplicationFirewallPoliciesListAllNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WebApplicationFirewallPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WebApplicationFirewallPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WebApplicationFirewallPolicy, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.policyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WebApplicationFirewallPolicy, - }, - 201: { - bodyMapper: Mappers.WebApplicationFirewallPolicy, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - requestBody: Parameters.parameters106, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.policyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.policyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WebApplicationFirewallPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAllNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WebApplicationFirewallPolicyListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operations/webCategories.ts b/sdk/network/arm-network/src/operations/webCategories.ts deleted file mode 100644 index c90d962deb50..000000000000 --- a/sdk/network/arm-network/src/operations/webCategories.ts +++ /dev/null @@ -1,174 +0,0 @@ -// 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 type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { WebCategories } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkManagementClient } from "../networkManagementClient.js"; -import type { - AzureWebCategory, - WebCategoriesListBySubscriptionNextOptionalParams, - WebCategoriesListBySubscriptionOptionalParams, - WebCategoriesListBySubscriptionResponse, - WebCategoriesGetOptionalParams, - WebCategoriesGetResponse, - WebCategoriesListBySubscriptionNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WebCategories operations. */ -export class WebCategoriesImpl implements WebCategories { - private readonly client: NetworkManagementClient; - - /** - * Initialize a new instance of the class WebCategories class. - * @param client Reference to the service client - */ - constructor(client: NetworkManagementClient) { - this.client = client; - } - - /** - * Gets all the Azure Web Categories in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: WebCategoriesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: WebCategoriesListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WebCategoriesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: WebCategoriesListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Gets the specified Azure Web Category. - * @param name The name of the azureWebCategory. - * @param options The options parameters. - */ - get(name: string, options?: WebCategoriesGetOptionalParams): Promise { - return this.client.sendOperationRequest({ name, options }, getOperationSpec); - } - - /** - * Gets all the Azure Web Categories in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: WebCategoriesListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: WebCategoriesListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories/{name}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureWebCategory, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.name], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureWebCategoryListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureWebCategoryListResult, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/network/arm-network/src/operationsInterfaces/adminRuleCollections.ts b/sdk/network/arm-network/src/operationsInterfaces/adminRuleCollections.ts deleted file mode 100644 index 6191ed08e8dc..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/adminRuleCollections.ts +++ /dev/null @@ -1,97 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - AdminRuleCollection, - AdminRuleCollectionsListOptionalParams, - AdminRuleCollectionsGetOptionalParams, - AdminRuleCollectionsGetResponse, - AdminRuleCollectionsCreateOrUpdateOptionalParams, - AdminRuleCollectionsCreateOrUpdateResponse, - AdminRuleCollectionsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a AdminRuleCollections. */ -export interface AdminRuleCollections { - /** - * Lists all the rule collections in a security admin configuration, in a paginated format. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: AdminRuleCollectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets a network manager security admin configuration rule collection. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: AdminRuleCollectionsGetOptionalParams, - ): Promise; - /** - * Creates or updates an admin rule collection. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleCollection The Rule Collection to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleCollection: AdminRuleCollection, - options?: AdminRuleCollectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes an admin rule collection. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: AdminRuleCollectionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes an admin rule collection. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: AdminRuleCollectionsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/adminRules.ts b/sdk/network/arm-network/src/operationsInterfaces/adminRules.ts deleted file mode 100644 index ee3dbe0dd7ba..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/adminRules.ts +++ /dev/null @@ -1,107 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - BaseAdminRuleUnion, - AdminRulesListOptionalParams, - AdminRulesGetOptionalParams, - AdminRulesGetResponse, - AdminRulesCreateOrUpdateOptionalParams, - AdminRulesCreateOrUpdateResponse, - AdminRulesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a AdminRules. */ -export interface AdminRules { - /** - * List all network manager security configuration admin rules. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: AdminRulesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets a network manager security configuration admin rule. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: AdminRulesGetOptionalParams, - ): Promise; - /** - * Creates or updates an admin rule. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param adminRule The admin rule to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - adminRule: BaseAdminRuleUnion, - options?: AdminRulesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes an admin rule. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: AdminRulesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes an admin rule. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: AdminRulesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayPrivateEndpointConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayPrivateEndpointConnections.ts deleted file mode 100644 index faf88cdb5b93..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayPrivateEndpointConnections.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ApplicationGatewayPrivateEndpointConnection, - ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, - ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, - ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, - ApplicationGatewayPrivateEndpointConnectionsUpdateResponse, - ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams, - ApplicationGatewayPrivateEndpointConnectionsGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ApplicationGatewayPrivateEndpointConnections. */ -export interface ApplicationGatewayPrivateEndpointConnections { - /** - * Lists all private endpoint connections on an application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewayPrivateEndpointConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified private endpoint connection on application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param connectionName The name of the application gateway private endpoint connection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - applicationGatewayName: string, - connectionName: string, - options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified private endpoint connection on application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param connectionName The name of the application gateway private endpoint connection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - applicationGatewayName: string, - connectionName: string, - options?: ApplicationGatewayPrivateEndpointConnectionsDeleteOptionalParams, - ): Promise; - /** - * Updates the specified private endpoint connection on application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param connectionName The name of the application gateway private endpoint connection. - * @param parameters Parameters supplied to update application gateway private endpoint connection - * operation. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - applicationGatewayName: string, - connectionName: string, - parameters: ApplicationGatewayPrivateEndpointConnection, - options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationGatewayPrivateEndpointConnectionsUpdateResponse - > - >; - /** - * Updates the specified private endpoint connection on application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param connectionName The name of the application gateway private endpoint connection. - * @param parameters Parameters supplied to update application gateway private endpoint connection - * operation. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - applicationGatewayName: string, - connectionName: string, - parameters: ApplicationGatewayPrivateEndpointConnection, - options?: ApplicationGatewayPrivateEndpointConnectionsUpdateOptionalParams, - ): Promise; - /** - * Gets the specified private endpoint connection on application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param connectionName The name of the application gateway private endpoint connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - applicationGatewayName: string, - connectionName: string, - options?: ApplicationGatewayPrivateEndpointConnectionsGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayPrivateLinkResources.ts b/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayPrivateLinkResources.ts deleted file mode 100644 index aaa5820865ac..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayPrivateLinkResources.ts +++ /dev/null @@ -1,27 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - ApplicationGatewayPrivateLinkResource, - ApplicationGatewayPrivateLinkResourcesListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApplicationGatewayPrivateLinkResources. */ -export interface ApplicationGatewayPrivateLinkResources { - /** - * Lists all private link resources on an application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewayPrivateLinkResourcesListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayWafDynamicManifests.ts b/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayWafDynamicManifests.ts deleted file mode 100644 index 3d8b40dd4591..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayWafDynamicManifests.ts +++ /dev/null @@ -1,25 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - ApplicationGatewayWafDynamicManifestResult, - ApplicationGatewayWafDynamicManifestsGetOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApplicationGatewayWafDynamicManifests. */ -export interface ApplicationGatewayWafDynamicManifests { - /** - * Gets the regional application gateway waf manifest. - * @param location The region where the nrp are located at. - * @param options The options parameters. - */ - list( - location: string, - options?: ApplicationGatewayWafDynamicManifestsGetOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayWafDynamicManifestsDefault.ts b/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayWafDynamicManifestsDefault.ts deleted file mode 100644 index dc3c178b1841..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/applicationGatewayWafDynamicManifestsDefault.ts +++ /dev/null @@ -1,23 +0,0 @@ -// 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 type { - ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams, - ApplicationGatewayWafDynamicManifestsDefaultGetResponse, -} from "../models/index.js"; - -/** Interface representing a ApplicationGatewayWafDynamicManifestsDefault. */ -export interface ApplicationGatewayWafDynamicManifestsDefault { - /** - * Gets the regional application gateway waf manifest. - * @param location The region where the nrp are located at. - * @param options The options parameters. - */ - get( - location: string, - options?: ApplicationGatewayWafDynamicManifestsDefaultGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/applicationGateways.ts b/sdk/network/arm-network/src/operationsInterfaces/applicationGateways.ts deleted file mode 100644 index 454796b546db..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/applicationGateways.ts +++ /dev/null @@ -1,295 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ApplicationGateway, - ApplicationGatewaysListOptionalParams, - ApplicationGatewaysListAllOptionalParams, - ApplicationGatewaySslPredefinedPolicy, - ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, - ApplicationGatewaysDeleteOptionalParams, - ApplicationGatewaysGetOptionalParams, - ApplicationGatewaysGetResponse, - ApplicationGatewaysCreateOrUpdateOptionalParams, - ApplicationGatewaysCreateOrUpdateResponse, - TagsObject, - ApplicationGatewaysUpdateTagsOptionalParams, - ApplicationGatewaysUpdateTagsResponse, - ApplicationGatewaysStartOptionalParams, - ApplicationGatewaysStopOptionalParams, - ApplicationGatewaysBackendHealthOptionalParams, - ApplicationGatewaysBackendHealthResponse, - ApplicationGatewayOnDemandProbe, - ApplicationGatewaysBackendHealthOnDemandOptionalParams, - ApplicationGatewaysBackendHealthOnDemandResponse, - ApplicationGatewaysListAvailableServerVariablesOptionalParams, - ApplicationGatewaysListAvailableServerVariablesResponse, - ApplicationGatewaysListAvailableRequestHeadersOptionalParams, - ApplicationGatewaysListAvailableRequestHeadersResponse, - ApplicationGatewaysListAvailableResponseHeadersOptionalParams, - ApplicationGatewaysListAvailableResponseHeadersResponse, - ApplicationGatewaysListAvailableWafRuleSetsOptionalParams, - ApplicationGatewaysListAvailableWafRuleSetsResponse, - ApplicationGatewaysListAvailableSslOptionsOptionalParams, - ApplicationGatewaysListAvailableSslOptionsResponse, - ApplicationGatewaysGetSslPredefinedPolicyOptionalParams, - ApplicationGatewaysGetSslPredefinedPolicyResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ApplicationGateways. */ -export interface ApplicationGateways { - /** - * Lists all application gateways in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: ApplicationGatewaysListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the application gateways in a subscription. - * @param options The options parameters. - */ - listAll( - options?: ApplicationGatewaysListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists all SSL predefined policies for configuring Ssl policy. - * @param options The options parameters. - */ - listAvailableSslPredefinedPolicies( - options?: ApplicationGatewaysListAvailableSslPredefinedPoliciesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysDeleteOptionalParams, - ): Promise; - /** - * Gets the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysGetOptionalParams, - ): Promise; - /** - * Creates or updates the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param parameters Parameters supplied to the create or update application gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - applicationGatewayName: string, - parameters: ApplicationGateway, - options?: ApplicationGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationGatewaysCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param parameters Parameters supplied to the create or update application gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - applicationGatewayName: string, - parameters: ApplicationGateway, - options?: ApplicationGatewaysCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the specified application gateway tags. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param parameters Parameters supplied to update application gateway tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - applicationGatewayName: string, - parameters: TagsObject, - options?: ApplicationGatewaysUpdateTagsOptionalParams, - ): Promise; - /** - * Starts the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - beginStart( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysStartOptionalParams, - ): Promise, void>>; - /** - * Starts the specified application gateway. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - beginStartAndWait( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysStartOptionalParams, - ): Promise; - /** - * Stops the specified application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - beginStop( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysStopOptionalParams, - ): Promise, void>>; - /** - * Stops the specified application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - beginStopAndWait( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysStopOptionalParams, - ): Promise; - /** - * Gets the backend health of the specified application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - beginBackendHealth( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysBackendHealthOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationGatewaysBackendHealthResponse - > - >; - /** - * Gets the backend health of the specified application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param options The options parameters. - */ - beginBackendHealthAndWait( - resourceGroupName: string, - applicationGatewayName: string, - options?: ApplicationGatewaysBackendHealthOptionalParams, - ): Promise; - /** - * Gets the backend health for given combination of backend pool and http setting of the specified - * application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param probeRequest Request body for on-demand test probe operation. - * @param options The options parameters. - */ - beginBackendHealthOnDemand( - resourceGroupName: string, - applicationGatewayName: string, - probeRequest: ApplicationGatewayOnDemandProbe, - options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationGatewaysBackendHealthOnDemandResponse - > - >; - /** - * Gets the backend health for given combination of backend pool and http setting of the specified - * application gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param probeRequest Request body for on-demand test probe operation. - * @param options The options parameters. - */ - beginBackendHealthOnDemandAndWait( - resourceGroupName: string, - applicationGatewayName: string, - probeRequest: ApplicationGatewayOnDemandProbe, - options?: ApplicationGatewaysBackendHealthOnDemandOptionalParams, - ): Promise; - /** - * Lists all available server variables. - * @param options The options parameters. - */ - listAvailableServerVariables( - options?: ApplicationGatewaysListAvailableServerVariablesOptionalParams, - ): Promise; - /** - * Lists all available request headers. - * @param options The options parameters. - */ - listAvailableRequestHeaders( - options?: ApplicationGatewaysListAvailableRequestHeadersOptionalParams, - ): Promise; - /** - * Lists all available response headers. - * @param options The options parameters. - */ - listAvailableResponseHeaders( - options?: ApplicationGatewaysListAvailableResponseHeadersOptionalParams, - ): Promise; - /** - * Lists all available web application firewall rule sets. - * @param options The options parameters. - */ - listAvailableWafRuleSets( - options?: ApplicationGatewaysListAvailableWafRuleSetsOptionalParams, - ): Promise; - /** - * Lists available Ssl options for configuring Ssl policy. - * @param options The options parameters. - */ - listAvailableSslOptions( - options?: ApplicationGatewaysListAvailableSslOptionsOptionalParams, - ): Promise; - /** - * Gets Ssl predefined policy with the specified policy name. - * @param predefinedPolicyName Name of Ssl predefined policy. - * @param options The options parameters. - */ - getSslPredefinedPolicy( - predefinedPolicyName: string, - options?: ApplicationGatewaysGetSslPredefinedPolicyOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/applicationSecurityGroups.ts b/sdk/network/arm-network/src/operationsInterfaces/applicationSecurityGroups.ts deleted file mode 100644 index 29735f613e9a..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/applicationSecurityGroups.ts +++ /dev/null @@ -1,119 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ApplicationSecurityGroup, - ApplicationSecurityGroupsListAllOptionalParams, - ApplicationSecurityGroupsListOptionalParams, - ApplicationSecurityGroupsDeleteOptionalParams, - ApplicationSecurityGroupsGetOptionalParams, - ApplicationSecurityGroupsGetResponse, - ApplicationSecurityGroupsCreateOrUpdateOptionalParams, - ApplicationSecurityGroupsCreateOrUpdateResponse, - TagsObject, - ApplicationSecurityGroupsUpdateTagsOptionalParams, - ApplicationSecurityGroupsUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ApplicationSecurityGroups. */ -export interface ApplicationSecurityGroups { - /** - * Gets all application security groups in a subscription. - * @param options The options parameters. - */ - listAll( - options?: ApplicationSecurityGroupsListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the application security groups in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: ApplicationSecurityGroupsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified application security group. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - applicationSecurityGroupName: string, - options?: ApplicationSecurityGroupsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified application security group. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - applicationSecurityGroupName: string, - options?: ApplicationSecurityGroupsDeleteOptionalParams, - ): Promise; - /** - * Gets information about the specified application security group. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - applicationSecurityGroupName: string, - options?: ApplicationSecurityGroupsGetOptionalParams, - ): Promise; - /** - * Creates or updates an application security group. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - applicationSecurityGroupName: string, - parameters: ApplicationSecurityGroup, - options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationSecurityGroupsCreateOrUpdateResponse - > - >; - /** - * Creates or updates an application security group. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - applicationSecurityGroupName: string, - parameters: ApplicationSecurityGroup, - options?: ApplicationSecurityGroupsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an application security group's tags. - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to update application security group tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - applicationSecurityGroupName: string, - parameters: TagsObject, - options?: ApplicationSecurityGroupsUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/availableDelegations.ts b/sdk/network/arm-network/src/operationsInterfaces/availableDelegations.ts deleted file mode 100644 index 4791d06e8645..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/availableDelegations.ts +++ /dev/null @@ -1,25 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - AvailableDelegation, - AvailableDelegationsListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a AvailableDelegations. */ -export interface AvailableDelegations { - /** - * Gets all of the available subnet delegations for this subscription in this region. - * @param location The location of the subnet. - * @param options The options parameters. - */ - list( - location: string, - options?: AvailableDelegationsListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/availableEndpointServices.ts b/sdk/network/arm-network/src/operationsInterfaces/availableEndpointServices.ts deleted file mode 100644 index 5dae79c18a51..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/availableEndpointServices.ts +++ /dev/null @@ -1,25 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - EndpointServiceResult, - AvailableEndpointServicesListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a AvailableEndpointServices. */ -export interface AvailableEndpointServices { - /** - * List what values of endpoint services are available for use. - * @param location The location to check available endpoint services. - * @param options The options parameters. - */ - list( - location: string, - options?: AvailableEndpointServicesListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/availablePrivateEndpointTypes.ts b/sdk/network/arm-network/src/operationsInterfaces/availablePrivateEndpointTypes.ts deleted file mode 100644 index 88405c83d88c..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/availablePrivateEndpointTypes.ts +++ /dev/null @@ -1,39 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - AvailablePrivateEndpointType, - AvailablePrivateEndpointTypesListOptionalParams, - AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a AvailablePrivateEndpointTypes. */ -export interface AvailablePrivateEndpointTypes { - /** - * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in - * this region. - * @param location The location of the domain name. - * @param options The options parameters. - */ - list( - location: string, - options?: AvailablePrivateEndpointTypesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in - * this region. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - location: string, - resourceGroupName: string, - options?: AvailablePrivateEndpointTypesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/availableResourceGroupDelegations.ts b/sdk/network/arm-network/src/operationsInterfaces/availableResourceGroupDelegations.ts deleted file mode 100644 index 8c0a5903225b..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/availableResourceGroupDelegations.ts +++ /dev/null @@ -1,27 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - AvailableDelegation, - AvailableResourceGroupDelegationsListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a AvailableResourceGroupDelegations. */ -export interface AvailableResourceGroupDelegations { - /** - * Gets all of the available subnet delegations for this resource group in this region. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - location: string, - resourceGroupName: string, - options?: AvailableResourceGroupDelegationsListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/availableServiceAliases.ts b/sdk/network/arm-network/src/operationsInterfaces/availableServiceAliases.ts deleted file mode 100644 index 4305481623c0..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/availableServiceAliases.ts +++ /dev/null @@ -1,37 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - AvailableServiceAlias, - AvailableServiceAliasesListOptionalParams, - AvailableServiceAliasesListByResourceGroupOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a AvailableServiceAliases. */ -export interface AvailableServiceAliases { - /** - * Gets all available service aliases for this subscription in this region. - * @param location The location. - * @param options The options parameters. - */ - list( - location: string, - options?: AvailableServiceAliasesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all available service aliases for this resource group in this region. - * @param resourceGroupName The name of the resource group. - * @param location The location. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - location: string, - options?: AvailableServiceAliasesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/azureFirewallFqdnTags.ts b/sdk/network/arm-network/src/operationsInterfaces/azureFirewallFqdnTags.ts deleted file mode 100644 index 0bce65090a6a..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/azureFirewallFqdnTags.ts +++ /dev/null @@ -1,23 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - AzureFirewallFqdnTag, - AzureFirewallFqdnTagsListAllOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a AzureFirewallFqdnTags. */ -export interface AzureFirewallFqdnTags { - /** - * Gets all the Azure Firewall FQDN Tags in a subscription. - * @param options The options parameters. - */ - listAll( - options?: AzureFirewallFqdnTagsListAllOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/azureFirewalls.ts b/sdk/network/arm-network/src/operationsInterfaces/azureFirewalls.ts deleted file mode 100644 index 98d443c6ad38..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/azureFirewalls.ts +++ /dev/null @@ -1,231 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - AzureFirewall, - AzureFirewallsListOptionalParams, - AzureFirewallsListAllOptionalParams, - AzureFirewallsDeleteOptionalParams, - AzureFirewallsGetOptionalParams, - AzureFirewallsGetResponse, - AzureFirewallsCreateOrUpdateOptionalParams, - AzureFirewallsCreateOrUpdateResponse, - TagsObject, - AzureFirewallsUpdateTagsOptionalParams, - AzureFirewallsUpdateTagsResponse, - AzureFirewallsListLearnedPrefixesOptionalParams, - AzureFirewallsListLearnedPrefixesResponse, - FirewallPacketCaptureParameters, - AzureFirewallsPacketCaptureOptionalParams, - AzureFirewallsPacketCaptureResponse, - AzureFirewallsPacketCaptureOperationOptionalParams, - AzureFirewallsPacketCaptureOperationResponse, -} from "../models/index.js"; - -/// -/** Interface representing a AzureFirewalls. */ -export interface AzureFirewalls { - /** - * Lists all Azure Firewalls in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: AzureFirewallsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the Azure Firewalls in a subscription. - * @param options The options parameters. - */ - listAll(options?: AzureFirewallsListAllOptionalParams): PagedAsyncIterableIterator; - /** - * Deletes the specified Azure Firewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - azureFirewallName: string, - options?: AzureFirewallsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified Azure Firewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - azureFirewallName: string, - options?: AzureFirewallsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified Azure Firewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - azureFirewallName: string, - options?: AzureFirewallsGetOptionalParams, - ): Promise; - /** - * Creates or updates the specified Azure Firewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to the create or update Azure Firewall operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - azureFirewallName: string, - parameters: AzureFirewall, - options?: AzureFirewallsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AzureFirewallsCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified Azure Firewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to the create or update Azure Firewall operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - azureFirewallName: string, - parameters: AzureFirewall, - options?: AzureFirewallsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates tags of an Azure Firewall resource. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to update azure firewall tags. - * @param options The options parameters. - */ - beginUpdateTags( - resourceGroupName: string, - azureFirewallName: string, - parameters: TagsObject, - options?: AzureFirewallsUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AzureFirewallsUpdateTagsResponse - > - >; - /** - * Updates tags of an Azure Firewall resource. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to update azure firewall tags. - * @param options The options parameters. - */ - beginUpdateTagsAndWait( - resourceGroupName: string, - azureFirewallName: string, - parameters: TagsObject, - options?: AzureFirewallsUpdateTagsOptionalParams, - ): Promise; - /** - * Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the azure firewall. - * @param options The options parameters. - */ - beginListLearnedPrefixes( - resourceGroupName: string, - azureFirewallName: string, - options?: AzureFirewallsListLearnedPrefixesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AzureFirewallsListLearnedPrefixesResponse - > - >; - /** - * Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the azure firewall. - * @param options The options parameters. - */ - beginListLearnedPrefixesAndWait( - resourceGroupName: string, - azureFirewallName: string, - options?: AzureFirewallsListLearnedPrefixesOptionalParams, - ): Promise; - /** - * Runs a packet capture on AzureFirewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to run packet capture on azure firewall. - * @param options The options parameters. - */ - beginPacketCapture( - resourceGroupName: string, - azureFirewallName: string, - parameters: FirewallPacketCaptureParameters, - options?: AzureFirewallsPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AzureFirewallsPacketCaptureResponse - > - >; - /** - * Runs a packet capture on AzureFirewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the Azure Firewall. - * @param parameters Parameters supplied to run packet capture on azure firewall. - * @param options The options parameters. - */ - beginPacketCaptureAndWait( - resourceGroupName: string, - azureFirewallName: string, - parameters: FirewallPacketCaptureParameters, - options?: AzureFirewallsPacketCaptureOptionalParams, - ): Promise; - /** - * Runs a packet capture operation on AzureFirewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the azure firewall. - * @param parameters Parameters supplied to run packet capture on azure firewall. - * @param options The options parameters. - */ - beginPacketCaptureOperation( - resourceGroupName: string, - azureFirewallName: string, - parameters: FirewallPacketCaptureParameters, - options?: AzureFirewallsPacketCaptureOperationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AzureFirewallsPacketCaptureOperationResponse - > - >; - /** - * Runs a packet capture operation on AzureFirewall. - * @param resourceGroupName The name of the resource group. - * @param azureFirewallName The name of the azure firewall. - * @param parameters Parameters supplied to run packet capture on azure firewall. - * @param options The options parameters. - */ - beginPacketCaptureOperationAndWait( - resourceGroupName: string, - azureFirewallName: string, - parameters: FirewallPacketCaptureParameters, - options?: AzureFirewallsPacketCaptureOperationOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/bastionHosts.ts b/sdk/network/arm-network/src/operationsInterfaces/bastionHosts.ts deleted file mode 100644 index c2123d8bf07d..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/bastionHosts.ts +++ /dev/null @@ -1,132 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - BastionHost, - BastionHostsListOptionalParams, - BastionHostsListByResourceGroupOptionalParams, - BastionHostsDeleteOptionalParams, - BastionHostsGetOptionalParams, - BastionHostsGetResponse, - BastionHostsCreateOrUpdateOptionalParams, - BastionHostsCreateOrUpdateResponse, - TagsObject, - BastionHostsUpdateTagsOptionalParams, - BastionHostsUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a BastionHosts. */ -export interface BastionHosts { - /** - * Lists all Bastion Hosts in a subscription. - * @param options The options parameters. - */ - list(options?: BastionHostsListOptionalParams): PagedAsyncIterableIterator; - /** - * Lists all Bastion Hosts in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: BastionHostsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified Bastion Host. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - bastionHostName: string, - options?: BastionHostsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified Bastion Host. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - bastionHostName: string, - options?: BastionHostsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified Bastion Host. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - bastionHostName: string, - options?: BastionHostsGetOptionalParams, - ): Promise; - /** - * Creates or updates the specified Bastion Host. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param parameters Parameters supplied to the create or update Bastion Host operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - bastionHostName: string, - parameters: BastionHost, - options?: BastionHostsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BastionHostsCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified Bastion Host. - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param parameters Parameters supplied to the create or update Bastion Host operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - bastionHostName: string, - parameters: BastionHost, - options?: BastionHostsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates Tags for BastionHost resource - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param parameters Parameters supplied to update BastionHost tags. - * @param options The options parameters. - */ - beginUpdateTags( - resourceGroupName: string, - bastionHostName: string, - parameters: TagsObject, - options?: BastionHostsUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike, BastionHostsUpdateTagsResponse> - >; - /** - * Updates Tags for BastionHost resource - * @param resourceGroupName The name of the resource group. - * @param bastionHostName The name of the Bastion Host. - * @param parameters Parameters supplied to update BastionHost tags. - * @param options The options parameters. - */ - beginUpdateTagsAndWait( - resourceGroupName: string, - bastionHostName: string, - parameters: TagsObject, - options?: BastionHostsUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/bgpServiceCommunities.ts b/sdk/network/arm-network/src/operationsInterfaces/bgpServiceCommunities.ts deleted file mode 100644 index 520d4c51bd8e..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/bgpServiceCommunities.ts +++ /dev/null @@ -1,23 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - BgpServiceCommunity, - BgpServiceCommunitiesListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a BgpServiceCommunities. */ -export interface BgpServiceCommunities { - /** - * Gets all the available bgp service communities. - * @param options The options parameters. - */ - list( - options?: BgpServiceCommunitiesListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/configurationPolicyGroups.ts b/sdk/network/arm-network/src/operationsInterfaces/configurationPolicyGroups.ts deleted file mode 100644 index 055976120565..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/configurationPolicyGroups.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VpnServerConfigurationPolicyGroup, - ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams, - ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, - ConfigurationPolicyGroupsCreateOrUpdateResponse, - ConfigurationPolicyGroupsDeleteOptionalParams, - ConfigurationPolicyGroupsGetOptionalParams, - ConfigurationPolicyGroupsGetResponse, -} from "../models/index.js"; - -/// -/** 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< - SimplePollerLike< - OperationState, - 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/connectionMonitors.ts b/sdk/network/arm-network/src/operationsInterfaces/connectionMonitors.ts deleted file mode 100644 index d9eb180fb621..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/connectionMonitors.ts +++ /dev/null @@ -1,153 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ConnectionMonitorResult, - ConnectionMonitorsListOptionalParams, - ConnectionMonitor, - ConnectionMonitorsCreateOrUpdateOptionalParams, - ConnectionMonitorsCreateOrUpdateResponse, - ConnectionMonitorsGetOptionalParams, - ConnectionMonitorsGetResponse, - ConnectionMonitorsDeleteOptionalParams, - TagsObject, - ConnectionMonitorsUpdateTagsOptionalParams, - ConnectionMonitorsUpdateTagsResponse, - ConnectionMonitorsStopOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ConnectionMonitors. */ -export interface ConnectionMonitors { - /** - * Lists all connection monitors for the specified Network Watcher. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkWatcherName: string, - options?: ConnectionMonitorsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Create or update a connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param parameters Parameters that define the operation to create a connection monitor. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - parameters: ConnectionMonitor, - options?: ConnectionMonitorsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ConnectionMonitorsCreateOrUpdateResponse - > - >; - /** - * Create or update a connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param parameters Parameters that define the operation to create a connection monitor. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - parameters: ConnectionMonitor, - options?: ConnectionMonitorsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Gets a connection monitor by name. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - options?: ConnectionMonitorsGetOptionalParams, - ): Promise; - /** - * Deletes the specified connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - options?: ConnectionMonitorsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - options?: ConnectionMonitorsDeleteOptionalParams, - ): Promise; - /** - * Update tags of the specified connection monitor. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param connectionMonitorName The name of the connection monitor. - * @param parameters Parameters supplied to update connection monitor tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - parameters: TagsObject, - options?: ConnectionMonitorsUpdateTagsOptionalParams, - ): Promise; - /** - * Stops the specified connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param options The options parameters. - */ - beginStop( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - options?: ConnectionMonitorsStopOptionalParams, - ): Promise, void>>; - /** - * Stops the specified connection monitor. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param options The options parameters. - */ - beginStopAndWait( - resourceGroupName: string, - networkWatcherName: string, - connectionMonitorName: string, - options?: ConnectionMonitorsStopOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/connectivityConfigurations.ts b/sdk/network/arm-network/src/operationsInterfaces/connectivityConfigurations.ts deleted file mode 100644 index 91eaecc7a2f3..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/connectivityConfigurations.ts +++ /dev/null @@ -1,91 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ConnectivityConfiguration, - ConnectivityConfigurationsListOptionalParams, - ConnectivityConfigurationsGetOptionalParams, - ConnectivityConfigurationsGetResponse, - ConnectivityConfigurationsCreateOrUpdateOptionalParams, - ConnectivityConfigurationsCreateOrUpdateResponse, - ConnectivityConfigurationsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ConnectivityConfigurations. */ -export interface ConnectivityConfigurations { - /** - * Lists all the network manager connectivity configuration in a specified network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - options?: ConnectivityConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets a Network Connectivity Configuration, specified by the resource group, network manager name, - * and connectivity Configuration name - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager connectivity configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: ConnectivityConfigurationsGetOptionalParams, - ): Promise; - /** - * Creates/Updates a new network manager connectivity configuration - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager connectivity configuration. - * @param connectivityConfiguration Parameters supplied to create/update a network manager connectivity - * configuration - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - connectivityConfiguration: ConnectivityConfiguration, - options?: ConnectivityConfigurationsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a network manager connectivity configuration, specified by the resource group, network - * manager name, and connectivity configuration name - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager connectivity configuration. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: ConnectivityConfigurationsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a network manager connectivity configuration, specified by the resource group, network - * manager name, and connectivity configuration name - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager connectivity configuration. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: ConnectivityConfigurationsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/customIPPrefixes.ts b/sdk/network/arm-network/src/operationsInterfaces/customIPPrefixes.ts deleted file mode 100644 index c8778f580957..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/customIPPrefixes.ts +++ /dev/null @@ -1,119 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - CustomIpPrefix, - CustomIPPrefixesListAllOptionalParams, - CustomIPPrefixesListOptionalParams, - CustomIPPrefixesDeleteOptionalParams, - CustomIPPrefixesGetOptionalParams, - CustomIPPrefixesGetResponse, - CustomIPPrefixesCreateOrUpdateOptionalParams, - CustomIPPrefixesCreateOrUpdateResponse, - TagsObject, - CustomIPPrefixesUpdateTagsOptionalParams, - CustomIPPrefixesUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a CustomIPPrefixes. */ -export interface CustomIPPrefixes { - /** - * Gets all the custom IP prefixes in a subscription. - * @param options The options parameters. - */ - listAll( - options?: CustomIPPrefixesListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all custom IP prefixes in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: CustomIPPrefixesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified custom IP prefix. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the CustomIpPrefix. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - customIpPrefixName: string, - options?: CustomIPPrefixesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified custom IP prefix. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the CustomIpPrefix. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - customIpPrefixName: string, - options?: CustomIPPrefixesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified custom IP prefix in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the custom IP prefix. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - customIpPrefixName: string, - options?: CustomIPPrefixesGetOptionalParams, - ): Promise; - /** - * Creates or updates a custom IP prefix. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the custom IP prefix. - * @param parameters Parameters supplied to the create or update custom IP prefix operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - customIpPrefixName: string, - parameters: CustomIpPrefix, - options?: CustomIPPrefixesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CustomIPPrefixesCreateOrUpdateResponse - > - >; - /** - * Creates or updates a custom IP prefix. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the custom IP prefix. - * @param parameters Parameters supplied to the create or update custom IP prefix operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - customIpPrefixName: string, - parameters: CustomIpPrefix, - options?: CustomIPPrefixesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates custom IP prefix tags. - * @param resourceGroupName The name of the resource group. - * @param customIpPrefixName The name of the custom IP prefix. - * @param parameters Parameters supplied to update custom IP prefix tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - customIpPrefixName: string, - parameters: TagsObject, - options?: CustomIPPrefixesUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/ddosCustomPolicies.ts b/sdk/network/arm-network/src/operationsInterfaces/ddosCustomPolicies.ts deleted file mode 100644 index a0dcb5f1131a..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/ddosCustomPolicies.ts +++ /dev/null @@ -1,99 +0,0 @@ -// 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 type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - DdosCustomPoliciesDeleteOptionalParams, - DdosCustomPoliciesGetOptionalParams, - DdosCustomPoliciesGetResponse, - DdosCustomPolicy, - DdosCustomPoliciesCreateOrUpdateOptionalParams, - DdosCustomPoliciesCreateOrUpdateResponse, - TagsObject, - DdosCustomPoliciesUpdateTagsOptionalParams, - DdosCustomPoliciesUpdateTagsResponse, -} from "../models/index.js"; - -/** Interface representing a DdosCustomPolicies. */ -export interface DdosCustomPolicies { - /** - * Deletes the specified DDoS custom policy. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - ddosCustomPolicyName: string, - options?: DdosCustomPoliciesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified DDoS custom policy. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - ddosCustomPolicyName: string, - options?: DdosCustomPoliciesDeleteOptionalParams, - ): Promise; - /** - * Gets information about the specified DDoS custom policy. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ddosCustomPolicyName: string, - options?: DdosCustomPoliciesGetOptionalParams, - ): Promise; - /** - * Creates or updates a DDoS custom policy. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param parameters Parameters supplied to the create or update operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - ddosCustomPolicyName: string, - parameters: DdosCustomPolicy, - options?: DdosCustomPoliciesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - DdosCustomPoliciesCreateOrUpdateResponse - > - >; - /** - * Creates or updates a DDoS custom policy. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param parameters Parameters supplied to the create or update operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - ddosCustomPolicyName: string, - parameters: DdosCustomPolicy, - options?: DdosCustomPoliciesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Update a DDoS custom policy tags. - * @param resourceGroupName The name of the resource group. - * @param ddosCustomPolicyName The name of the DDoS custom policy. - * @param parameters Parameters supplied to update DDoS custom policy resource tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - ddosCustomPolicyName: string, - parameters: TagsObject, - options?: DdosCustomPoliciesUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/ddosProtectionPlans.ts b/sdk/network/arm-network/src/operationsInterfaces/ddosProtectionPlans.ts deleted file mode 100644 index a01ebb05cb97..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/ddosProtectionPlans.ts +++ /dev/null @@ -1,119 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - DdosProtectionPlan, - DdosProtectionPlansListOptionalParams, - DdosProtectionPlansListByResourceGroupOptionalParams, - DdosProtectionPlansDeleteOptionalParams, - DdosProtectionPlansGetOptionalParams, - DdosProtectionPlansGetResponse, - DdosProtectionPlansCreateOrUpdateOptionalParams, - DdosProtectionPlansCreateOrUpdateResponse, - TagsObject, - DdosProtectionPlansUpdateTagsOptionalParams, - DdosProtectionPlansUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a DdosProtectionPlans. */ -export interface DdosProtectionPlans { - /** - * Gets all DDoS protection plans in a subscription. - * @param options The options parameters. - */ - list( - options?: DdosProtectionPlansListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the DDoS protection plans in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: DdosProtectionPlansListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified DDoS protection plan. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - ddosProtectionPlanName: string, - options?: DdosProtectionPlansDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified DDoS protection plan. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - ddosProtectionPlanName: string, - options?: DdosProtectionPlansDeleteOptionalParams, - ): Promise; - /** - * Gets information about the specified DDoS protection plan. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ddosProtectionPlanName: string, - options?: DdosProtectionPlansGetOptionalParams, - ): Promise; - /** - * Creates or updates a DDoS protection plan. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - ddosProtectionPlanName: string, - parameters: DdosProtectionPlan, - options?: DdosProtectionPlansCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - DdosProtectionPlansCreateOrUpdateResponse - > - >; - /** - * Creates or updates a DDoS protection plan. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - ddosProtectionPlanName: string, - parameters: DdosProtectionPlan, - options?: DdosProtectionPlansCreateOrUpdateOptionalParams, - ): Promise; - /** - * Update a DDoS protection plan tags. - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the update DDoS protection plan resource tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - ddosProtectionPlanName: string, - parameters: TagsObject, - options?: DdosProtectionPlansUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/defaultSecurityRules.ts b/sdk/network/arm-network/src/operationsInterfaces/defaultSecurityRules.ts deleted file mode 100644 index e1aca5b4dbbb..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/defaultSecurityRules.ts +++ /dev/null @@ -1,42 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - SecurityRule, - DefaultSecurityRulesListOptionalParams, - DefaultSecurityRulesGetOptionalParams, - DefaultSecurityRulesGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a DefaultSecurityRules. */ -export interface DefaultSecurityRules { - /** - * Gets all default security rules in a network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: DefaultSecurityRulesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get the specified default network security rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param defaultSecurityRuleName The name of the default security rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityGroupName: string, - defaultSecurityRuleName: string, - options?: DefaultSecurityRulesGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/dscpConfigurationOperations.ts b/sdk/network/arm-network/src/operationsInterfaces/dscpConfigurationOperations.ts deleted file mode 100644 index 92f225a7e2ab..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/dscpConfigurationOperations.ts +++ /dev/null @@ -1,103 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - DscpConfiguration, - DscpConfigurationListOptionalParams, - DscpConfigurationListAllOptionalParams, - DscpConfigurationCreateOrUpdateOptionalParams, - DscpConfigurationCreateOrUpdateResponse, - DscpConfigurationDeleteOptionalParams, - DscpConfigurationGetOptionalParams, - DscpConfigurationGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a DscpConfigurationOperations. */ -export interface DscpConfigurationOperations { - /** - * Gets a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: DscpConfigurationListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all dscp configurations in a subscription. - * @param options The options parameters. - */ - listAll( - options?: DscpConfigurationListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates or updates a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param dscpConfigurationName The name of the resource. - * @param parameters Parameters supplied to the create or update dscp configuration operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - dscpConfigurationName: string, - parameters: DscpConfiguration, - options?: DscpConfigurationCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - DscpConfigurationCreateOrUpdateResponse - > - >; - /** - * Creates or updates a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param dscpConfigurationName The name of the resource. - * @param parameters Parameters supplied to the create or update dscp configuration operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - dscpConfigurationName: string, - parameters: DscpConfiguration, - options?: DscpConfigurationCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param dscpConfigurationName The name of the resource. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - dscpConfigurationName: string, - options?: DscpConfigurationDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param dscpConfigurationName The name of the resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - dscpConfigurationName: string, - options?: DscpConfigurationDeleteOptionalParams, - ): Promise; - /** - * Gets a DSCP Configuration. - * @param resourceGroupName The name of the resource group. - * @param dscpConfigurationName The name of the resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - dscpConfigurationName: string, - options?: DscpConfigurationGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitAuthorizations.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitAuthorizations.ts deleted file mode 100644 index 7d4e2c639e98..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitAuthorizations.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ExpressRouteCircuitAuthorization, - ExpressRouteCircuitAuthorizationsListOptionalParams, - ExpressRouteCircuitAuthorizationsDeleteOptionalParams, - ExpressRouteCircuitAuthorizationsGetOptionalParams, - ExpressRouteCircuitAuthorizationsGetResponse, - ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, - ExpressRouteCircuitAuthorizationsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ExpressRouteCircuitAuthorizations. */ -export interface ExpressRouteCircuitAuthorizations { - /** - * Gets all authorizations in an express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitAuthorizationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified authorization from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param authorizationName The name of the authorization. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - circuitName: string, - authorizationName: string, - options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified authorization from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param authorizationName The name of the authorization. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - circuitName: string, - authorizationName: string, - options?: ExpressRouteCircuitAuthorizationsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified authorization from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param authorizationName The name of the authorization. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - circuitName: string, - authorizationName: string, - options?: ExpressRouteCircuitAuthorizationsGetOptionalParams, - ): Promise; - /** - * Creates or updates an authorization in the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param authorizationName The name of the authorization. - * @param authorizationParameters Parameters supplied to the create or update express route circuit - * authorization operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - circuitName: string, - authorizationName: string, - authorizationParameters: ExpressRouteCircuitAuthorization, - options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitAuthorizationsCreateOrUpdateResponse - > - >; - /** - * Creates or updates an authorization in the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param authorizationName The name of the authorization. - * @param authorizationParameters Parameters supplied to the create or update express route circuit - * authorization operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - circuitName: string, - authorizationName: string, - authorizationParameters: ExpressRouteCircuitAuthorization, - options?: ExpressRouteCircuitAuthorizationsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitConnections.ts deleted file mode 100644 index c3cbc943f547..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitConnections.ts +++ /dev/null @@ -1,121 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ExpressRouteCircuitConnection, - ExpressRouteCircuitConnectionsListOptionalParams, - ExpressRouteCircuitConnectionsDeleteOptionalParams, - ExpressRouteCircuitConnectionsGetOptionalParams, - ExpressRouteCircuitConnectionsGetResponse, - ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, - ExpressRouteCircuitConnectionsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ExpressRouteCircuitConnections. */ -export interface ExpressRouteCircuitConnections { - /** - * Gets all global reach connections associated with a private peering in an express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - options?: ExpressRouteCircuitConnectionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - options?: ExpressRouteCircuitConnectionsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified Express Route Circuit Connection from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - options?: ExpressRouteCircuitConnectionsGetOptionalParams, - ): Promise; - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express - * route circuit connection operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, - options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitConnectionsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express - * route circuit connection operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - expressRouteCircuitConnectionParameters: ExpressRouteCircuitConnection, - options?: ExpressRouteCircuitConnectionsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitPeerings.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitPeerings.ts deleted file mode 100644 index 091f219d62ef..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuitPeerings.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ExpressRouteCircuitPeering, - ExpressRouteCircuitPeeringsListOptionalParams, - ExpressRouteCircuitPeeringsDeleteOptionalParams, - ExpressRouteCircuitPeeringsGetOptionalParams, - ExpressRouteCircuitPeeringsGetResponse, - ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, - ExpressRouteCircuitPeeringsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ExpressRouteCircuitPeerings. */ -export interface ExpressRouteCircuitPeerings { - /** - * Gets all peerings in a specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitPeeringsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified peering from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitPeeringsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified peering from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitPeeringsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified peering for the express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitPeeringsGetOptionalParams, - ): Promise; - /** - * Creates or updates a peering in the specified express route circuits. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update express route circuit peering - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - circuitName: string, - peeringName: string, - peeringParameters: ExpressRouteCircuitPeering, - options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitPeeringsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a peering in the specified express route circuits. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update express route circuit peering - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - peeringParameters: ExpressRouteCircuitPeering, - options?: ExpressRouteCircuitPeeringsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuits.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuits.ts deleted file mode 100644 index 85d018703d53..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCircuits.ts +++ /dev/null @@ -1,264 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ExpressRouteCircuit, - ExpressRouteCircuitsListOptionalParams, - ExpressRouteCircuitsListAllOptionalParams, - ExpressRouteCircuitsDeleteOptionalParams, - ExpressRouteCircuitsGetOptionalParams, - ExpressRouteCircuitsGetResponse, - ExpressRouteCircuitsCreateOrUpdateOptionalParams, - ExpressRouteCircuitsCreateOrUpdateResponse, - TagsObject, - ExpressRouteCircuitsUpdateTagsOptionalParams, - ExpressRouteCircuitsUpdateTagsResponse, - ExpressRouteCircuitsListArpTableOptionalParams, - ExpressRouteCircuitsListArpTableResponse, - ExpressRouteCircuitsListRoutesTableOptionalParams, - ExpressRouteCircuitsListRoutesTableResponse, - ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, - ExpressRouteCircuitsListRoutesTableSummaryResponse, - ExpressRouteCircuitsGetStatsOptionalParams, - ExpressRouteCircuitsGetStatsResponse, - ExpressRouteCircuitsGetPeeringStatsOptionalParams, - ExpressRouteCircuitsGetPeeringStatsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ExpressRouteCircuits. */ -export interface ExpressRouteCircuits { - /** - * Gets all the express route circuits in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: ExpressRouteCircuitsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the express route circuits in a subscription. - * @param options The options parameters. - */ - listAll( - options?: ExpressRouteCircuitsListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitsDeleteOptionalParams, - ): Promise; - /** - * Gets information about the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of express route circuit. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitsGetOptionalParams, - ): Promise; - /** - * Creates or updates an express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param parameters Parameters supplied to the create or update express route circuit operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - circuitName: string, - parameters: ExpressRouteCircuit, - options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitsCreateOrUpdateResponse - > - >; - /** - * Creates or updates an express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param parameters Parameters supplied to the create or update express route circuit operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - circuitName: string, - parameters: ExpressRouteCircuit, - options?: ExpressRouteCircuitsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an express route circuit tags. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param parameters Parameters supplied to update express route circuit tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - circuitName: string, - parameters: TagsObject, - options?: ExpressRouteCircuitsUpdateTagsOptionalParams, - ): Promise; - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource - * group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListArpTable( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListArpTableOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitsListArpTableResponse - > - >; - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource - * group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListArpTableAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListArpTableOptionalParams, - ): Promise; - /** - * Gets the currently advertised routes table associated with the express route circuit in a resource - * group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListRoutesTable( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListRoutesTableOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitsListRoutesTableResponse - > - >; - /** - * Gets the currently advertised routes table associated with the express route circuit in a resource - * group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListRoutesTableAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListRoutesTableOptionalParams, - ): Promise; - /** - * Gets the currently advertised routes table summary associated with the express route circuit in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListRoutesTableSummary( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCircuitsListRoutesTableSummaryResponse - > - >; - /** - * Gets the currently advertised routes table summary associated with the express route circuit in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListRoutesTableSummaryAndWait( - resourceGroupName: string, - circuitName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCircuitsListRoutesTableSummaryOptionalParams, - ): Promise; - /** - * Gets all the stats from an express route circuit in a resource group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param options The options parameters. - */ - getStats( - resourceGroupName: string, - circuitName: string, - options?: ExpressRouteCircuitsGetStatsOptionalParams, - ): Promise; - /** - * Gets all stats from an express route circuit in a resource group. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - getPeeringStats( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: ExpressRouteCircuitsGetPeeringStatsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteConnections.ts deleted file mode 100644 index c34853e2166f..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRouteConnections.ts +++ /dev/null @@ -1,108 +0,0 @@ -// 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 type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ExpressRouteConnection, - ExpressRouteConnectionsCreateOrUpdateOptionalParams, - ExpressRouteConnectionsCreateOrUpdateResponse, - ExpressRouteConnectionsGetOptionalParams, - ExpressRouteConnectionsGetResponse, - ExpressRouteConnectionsDeleteOptionalParams, - ExpressRouteConnectionsListOptionalParams, - ExpressRouteConnectionsListResponse, -} from "../models/index.js"; - -/** Interface representing a ExpressRouteConnections. */ -export interface ExpressRouteConnections { - /** - * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param connectionName The name of the connection subresource. - * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - expressRouteGatewayName: string, - connectionName: string, - putExpressRouteConnectionParameters: ExpressRouteConnection, - options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteConnectionsCreateOrUpdateResponse - > - >; - /** - * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param connectionName The name of the connection subresource. - * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - expressRouteGatewayName: string, - connectionName: string, - putExpressRouteConnectionParameters: ExpressRouteConnection, - options?: ExpressRouteConnectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Gets the specified ExpressRouteConnection. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param connectionName The name of the ExpressRoute connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - expressRouteGatewayName: string, - connectionName: string, - options?: ExpressRouteConnectionsGetOptionalParams, - ): Promise; - /** - * Deletes a connection to a ExpressRoute circuit. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param connectionName The name of the connection subresource. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - expressRouteGatewayName: string, - connectionName: string, - options?: ExpressRouteConnectionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a connection to a ExpressRoute circuit. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param connectionName The name of the connection subresource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - expressRouteGatewayName: string, - connectionName: string, - options?: ExpressRouteConnectionsDeleteOptionalParams, - ): Promise; - /** - * Lists ExpressRouteConnections. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - expressRouteGatewayName: string, - options?: ExpressRouteConnectionsListOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCrossConnectionPeerings.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteCrossConnectionPeerings.ts deleted file mode 100644 index 524dfad65d7f..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCrossConnectionPeerings.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ExpressRouteCrossConnectionPeering, - ExpressRouteCrossConnectionPeeringsListOptionalParams, - ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, - ExpressRouteCrossConnectionPeeringsGetOptionalParams, - ExpressRouteCrossConnectionPeeringsGetResponse, - ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, - ExpressRouteCrossConnectionPeeringsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ExpressRouteCrossConnectionPeerings. */ -export interface ExpressRouteCrossConnectionPeerings { - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - crossConnectionName: string, - options?: ExpressRouteCrossConnectionPeeringsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - options?: ExpressRouteCrossConnectionPeeringsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified peering for the ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - options?: ExpressRouteCrossConnectionPeeringsGetOptionalParams, - ): Promise; - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection - * peering operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - peeringParameters: ExpressRouteCrossConnectionPeering, - options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCrossConnectionPeeringsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection - * peering operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - peeringParameters: ExpressRouteCrossConnectionPeering, - options?: ExpressRouteCrossConnectionPeeringsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCrossConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteCrossConnections.ts deleted file mode 100644 index 8a256201b1e1..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRouteCrossConnections.ts +++ /dev/null @@ -1,211 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ExpressRouteCrossConnection, - ExpressRouteCrossConnectionsListOptionalParams, - ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, - ExpressRouteCrossConnectionsGetOptionalParams, - ExpressRouteCrossConnectionsGetResponse, - ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, - ExpressRouteCrossConnectionsCreateOrUpdateResponse, - TagsObject, - ExpressRouteCrossConnectionsUpdateTagsOptionalParams, - ExpressRouteCrossConnectionsUpdateTagsResponse, - ExpressRouteCrossConnectionsListArpTableOptionalParams, - ExpressRouteCrossConnectionsListArpTableResponse, - ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, - ExpressRouteCrossConnectionsListRoutesTableSummaryResponse, - ExpressRouteCrossConnectionsListRoutesTableOptionalParams, - ExpressRouteCrossConnectionsListRoutesTableResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ExpressRouteCrossConnections. */ -export interface ExpressRouteCrossConnections { - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * @param options The options parameters. - */ - list( - options?: ExpressRouteCrossConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ExpressRouteCrossConnectionsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets details about the specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group (peering location of the circuit). - * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). - * @param options The options parameters. - */ - get( - resourceGroupName: string, - crossConnectionName: string, - options?: ExpressRouteCrossConnectionsGetOptionalParams, - ): Promise; - /** - * Update the specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - crossConnectionName: string, - parameters: ExpressRouteCrossConnection, - options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCrossConnectionsCreateOrUpdateResponse - > - >; - /** - * Update the specified ExpressRouteCrossConnection. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - crossConnectionName: string, - parameters: ExpressRouteCrossConnection, - options?: ExpressRouteCrossConnectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an express route cross connection tags. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param crossConnectionParameters Parameters supplied to update express route cross connection tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - crossConnectionName: string, - crossConnectionParameters: TagsObject, - options?: ExpressRouteCrossConnectionsUpdateTagsOptionalParams, - ): Promise; - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListArpTable( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListArpTableOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCrossConnectionsListArpTableResponse - > - >; - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListArpTableAndWait( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListArpTableOptionalParams, - ): Promise; - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListRoutesTableSummary( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCrossConnectionsListRoutesTableSummaryResponse - > - >; - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListRoutesTableSummaryAndWait( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListRoutesTableSummaryOptionalParams, - ): Promise; - /** - * Gets the currently advertised routes table associated with the express route cross connection in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListRoutesTable( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteCrossConnectionsListRoutesTableResponse - > - >; - /** - * Gets the currently advertised routes table associated with the express route cross connection in a - * resource group. - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @param options The options parameters. - */ - beginListRoutesTableAndWait( - resourceGroupName: string, - crossConnectionName: string, - peeringName: string, - devicePath: string, - options?: ExpressRouteCrossConnectionsListRoutesTableOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteGateways.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteGateways.ts deleted file mode 100644 index 5e5907fe39b4..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRouteGateways.ts +++ /dev/null @@ -1,143 +0,0 @@ -// 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 type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ExpressRouteGatewaysListBySubscriptionOptionalParams, - ExpressRouteGatewaysListBySubscriptionResponse, - ExpressRouteGatewaysListByResourceGroupOptionalParams, - ExpressRouteGatewaysListByResourceGroupResponse, - ExpressRouteGateway, - ExpressRouteGatewaysCreateOrUpdateOptionalParams, - ExpressRouteGatewaysCreateOrUpdateResponse, - TagsObject, - ExpressRouteGatewaysUpdateTagsOptionalParams, - ExpressRouteGatewaysUpdateTagsResponse, - ExpressRouteGatewaysGetOptionalParams, - ExpressRouteGatewaysGetResponse, - ExpressRouteGatewaysDeleteOptionalParams, -} from "../models/index.js"; - -/** Interface representing a ExpressRouteGateways. */ -export interface ExpressRouteGateways { - /** - * Lists ExpressRoute gateways under a given subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: ExpressRouteGatewaysListBySubscriptionOptionalParams, - ): Promise; - /** - * Lists ExpressRoute gateways in a given resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ExpressRouteGatewaysListByResourceGroupOptionalParams, - ): Promise; - /** - * Creates or updates a ExpressRoute gateway in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - expressRouteGatewayName: string, - putExpressRouteGatewayParameters: ExpressRouteGateway, - options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteGatewaysCreateOrUpdateResponse - > - >; - /** - * Creates or updates a ExpressRoute gateway in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - expressRouteGatewayName: string, - putExpressRouteGatewayParameters: ExpressRouteGateway, - options?: ExpressRouteGatewaysCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates express route gateway tags. - * @param resourceGroupName The resource group name of the ExpressRouteGateway. - * @param expressRouteGatewayName The name of the gateway. - * @param expressRouteGatewayParameters Parameters supplied to update a virtual wan express route - * gateway tags. - * @param options The options parameters. - */ - beginUpdateTags( - resourceGroupName: string, - expressRouteGatewayName: string, - expressRouteGatewayParameters: TagsObject, - options?: ExpressRouteGatewaysUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRouteGatewaysUpdateTagsResponse - > - >; - /** - * Updates express route gateway tags. - * @param resourceGroupName The resource group name of the ExpressRouteGateway. - * @param expressRouteGatewayName The name of the gateway. - * @param expressRouteGatewayParameters Parameters supplied to update a virtual wan express route - * gateway tags. - * @param options The options parameters. - */ - beginUpdateTagsAndWait( - resourceGroupName: string, - expressRouteGatewayName: string, - expressRouteGatewayParameters: TagsObject, - options?: ExpressRouteGatewaysUpdateTagsOptionalParams, - ): Promise; - /** - * Fetches the details of a ExpressRoute gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - expressRouteGatewayName: string, - options?: ExpressRouteGatewaysGetOptionalParams, - ): Promise; - /** - * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can - * only be deleted when there are no connection subresources. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - expressRouteGatewayName: string, - options?: ExpressRouteGatewaysDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can - * only be deleted when there are no connection subresources. - * @param resourceGroupName The name of the resource group. - * @param expressRouteGatewayName The name of the ExpressRoute gateway. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - expressRouteGatewayName: string, - options?: ExpressRouteGatewaysDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteLinks.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteLinks.ts deleted file mode 100644 index a59f5ac85f6b..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRouteLinks.ts +++ /dev/null @@ -1,42 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - ExpressRouteLink, - ExpressRouteLinksListOptionalParams, - ExpressRouteLinksGetOptionalParams, - ExpressRouteLinksGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ExpressRouteLinks. */ -export interface ExpressRouteLinks { - /** - * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRouteLinksListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves the specified ExpressRouteLink resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param linkName The name of the ExpressRouteLink resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - expressRoutePortName: string, - linkName: string, - options?: ExpressRouteLinksGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortAuthorizations.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortAuthorizations.ts deleted file mode 100644 index 6c38daf4af28..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortAuthorizations.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ExpressRoutePortAuthorization, - ExpressRoutePortAuthorizationsListOptionalParams, - ExpressRoutePortAuthorizationsDeleteOptionalParams, - ExpressRoutePortAuthorizationsGetOptionalParams, - ExpressRoutePortAuthorizationsGetResponse, - ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, - ExpressRoutePortAuthorizationsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** 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< - SimplePollerLike< - OperationState, - 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/expressRoutePorts.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRoutePorts.ts deleted file mode 100644 index 47199c2a0107..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRoutePorts.ts +++ /dev/null @@ -1,133 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ExpressRoutePort, - ExpressRoutePortsListByResourceGroupOptionalParams, - ExpressRoutePortsListOptionalParams, - ExpressRoutePortsDeleteOptionalParams, - ExpressRoutePortsGetOptionalParams, - ExpressRoutePortsGetResponse, - ExpressRoutePortsCreateOrUpdateOptionalParams, - ExpressRoutePortsCreateOrUpdateResponse, - TagsObject, - ExpressRoutePortsUpdateTagsOptionalParams, - ExpressRoutePortsUpdateTagsResponse, - GenerateExpressRoutePortsLOARequest, - ExpressRoutePortsGenerateLOAOptionalParams, - ExpressRoutePortsGenerateLOAResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ExpressRoutePorts. */ -export interface ExpressRoutePorts { - /** - * List all the ExpressRoutePort resources in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ExpressRoutePortsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List all the ExpressRoutePort resources in the specified subscription. - * @param options The options parameters. - */ - list(options?: ExpressRoutePortsListOptionalParams): PagedAsyncIterableIterator; - /** - * Deletes the specified ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRoutePortsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRoutePortsDeleteOptionalParams, - ): Promise; - /** - * Retrieves the requested ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of ExpressRoutePort. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - expressRoutePortName: string, - options?: ExpressRoutePortsGetOptionalParams, - ): Promise; - /** - * Creates or updates the specified ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param parameters Parameters supplied to the create ExpressRoutePort operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - expressRoutePortName: string, - parameters: ExpressRoutePort, - options?: ExpressRoutePortsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ExpressRoutePortsCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param parameters Parameters supplied to the create ExpressRoutePort operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - expressRoutePortName: string, - parameters: ExpressRoutePort, - options?: ExpressRoutePortsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Update ExpressRoutePort tags. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of the ExpressRoutePort resource. - * @param parameters Parameters supplied to update ExpressRoutePort resource tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - expressRoutePortName: string, - parameters: TagsObject, - options?: ExpressRoutePortsUpdateTagsOptionalParams, - ): Promise; - /** - * Generate a letter of authorization for the requested ExpressRoutePort resource. - * @param resourceGroupName The name of the resource group. - * @param expressRoutePortName The name of ExpressRoutePort. - * @param request Request parameters supplied to generate a letter of authorization. - * @param options The options parameters. - */ - generateLOA( - resourceGroupName: string, - expressRoutePortName: string, - request: GenerateExpressRoutePortsLOARequest, - options?: ExpressRoutePortsGenerateLOAOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortsLocations.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortsLocations.ts deleted file mode 100644 index 65107317fa3a..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortsLocations.ts +++ /dev/null @@ -1,36 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - ExpressRoutePortsLocation, - ExpressRoutePortsLocationsListOptionalParams, - ExpressRoutePortsLocationsGetOptionalParams, - ExpressRoutePortsLocationsGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ExpressRoutePortsLocations. */ -export interface ExpressRoutePortsLocations { - /** - * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each - * location. Available bandwidths can only be obtained when retrieving a specific peering location. - * @param options The options parameters. - */ - list( - options?: ExpressRoutePortsLocationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths - * available at said peering location. - * @param locationName Name of the requested ExpressRoutePort peering location. - * @param options The options parameters. - */ - get( - locationName: string, - options?: ExpressRoutePortsLocationsGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteProviderPortsLocation.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteProviderPortsLocation.ts deleted file mode 100644 index 615cc26c2643..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRouteProviderPortsLocation.ts +++ /dev/null @@ -1,21 +0,0 @@ -// 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 type { - ExpressRouteProviderPortsLocationListOptionalParams, - ExpressRouteProviderPortsLocationListResponse, -} from "../models/index.js"; - -/** Interface representing a ExpressRouteProviderPortsLocation. */ -export interface ExpressRouteProviderPortsLocation { - /** - * Retrieves all the ExpressRouteProviderPorts in a subscription. - * @param options The options parameters. - */ - list( - options?: ExpressRouteProviderPortsLocationListOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteServiceProviders.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteServiceProviders.ts deleted file mode 100644 index 1a3af015bd65..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/expressRouteServiceProviders.ts +++ /dev/null @@ -1,23 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - ExpressRouteServiceProvider, - ExpressRouteServiceProvidersListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ExpressRouteServiceProviders. */ -export interface ExpressRouteServiceProviders { - /** - * Gets all the available express route service providers. - * @param options The options parameters. - */ - list( - options?: ExpressRouteServiceProvidersListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicies.ts b/sdk/network/arm-network/src/operationsInterfaces/firewallPolicies.ts deleted file mode 100644 index 1efa9a17965a..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicies.ts +++ /dev/null @@ -1,119 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - FirewallPolicy, - FirewallPoliciesListOptionalParams, - FirewallPoliciesListAllOptionalParams, - FirewallPoliciesDeleteOptionalParams, - FirewallPoliciesGetOptionalParams, - FirewallPoliciesGetResponse, - FirewallPoliciesCreateOrUpdateOptionalParams, - FirewallPoliciesCreateOrUpdateResponse, - TagsObject, - FirewallPoliciesUpdateTagsOptionalParams, - FirewallPoliciesUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a FirewallPolicies. */ -export interface FirewallPolicies { - /** - * Lists all Firewall Policies in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: FirewallPoliciesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the Firewall Policies in a subscription. - * @param options The options parameters. - */ - listAll( - options?: FirewallPoliciesListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPoliciesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPoliciesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPoliciesGetOptionalParams, - ): Promise; - /** - * Creates or updates the specified Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Parameters supplied to the create or update Firewall Policy operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - firewallPolicyName: string, - parameters: FirewallPolicy, - options?: FirewallPoliciesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - FirewallPoliciesCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Parameters supplied to the create or update Firewall Policy operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - firewallPolicyName: string, - 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/firewallPolicyDeployments.ts b/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyDeployments.ts deleted file mode 100644 index c111b9c113db..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyDeployments.ts +++ /dev/null @@ -1,42 +0,0 @@ -// 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 type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - FirewallPolicyDeploymentsDeployOptionalParams, - FirewallPolicyDeploymentsDeployResponse, -} from "../models/index.js"; - -/** Interface representing a FirewallPolicyDeployments. */ -export interface FirewallPolicyDeployments { - /** - * Deploys the firewall policy draft and child rule collection group drafts. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - beginDeploy( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyDeploymentsDeployOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - FirewallPolicyDeploymentsDeployResponse - > - >; - /** - * Deploys the firewall policy draft and child rule collection group drafts. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - beginDeployAndWait( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyDeploymentsDeployOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyDrafts.ts b/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyDrafts.ts deleted file mode 100644 index 1d1136bf1562..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyDrafts.ts +++ /dev/null @@ -1,53 +0,0 @@ -// 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 type { - FirewallPolicyDraft, - FirewallPolicyDraftsCreateOrUpdateOptionalParams, - FirewallPolicyDraftsCreateOrUpdateResponse, - FirewallPolicyDraftsDeleteOptionalParams, - FirewallPolicyDraftsGetOptionalParams, - FirewallPolicyDraftsGetResponse, -} from "../models/index.js"; - -/** Interface representing a FirewallPolicyDrafts. */ -export interface FirewallPolicyDrafts { - /** - * Create or update a draft Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Parameters supplied to the create or update Firewall Policy Draft operation. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - firewallPolicyName: string, - parameters: FirewallPolicyDraft, - options?: FirewallPolicyDraftsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete a draft policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyDraftsDeleteOptionalParams, - ): Promise; - /** - * Get a draft Firewall Policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyDraftsGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignatures.ts b/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignatures.ts deleted file mode 100644 index 7c29011b3b41..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignatures.ts +++ /dev/null @@ -1,29 +0,0 @@ -// 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 type { - IdpsQueryObject, - FirewallPolicyIdpsSignaturesListOptionalParams, - FirewallPolicyIdpsSignaturesListResponse, -} from "../models/index.js"; - -/** Interface representing a FirewallPolicyIdpsSignatures. */ -export interface FirewallPolicyIdpsSignatures { - /** - * Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned - * signatures is 1000. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Will describe the query to run against the IDPS signatures DB - * @param options The options parameters. - */ - list( - resourceGroupName: string, - firewallPolicyName: string, - parameters: IdpsQueryObject, - options?: FirewallPolicyIdpsSignaturesListOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignaturesFilterValues.ts b/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignaturesFilterValues.ts deleted file mode 100644 index d208cc511f3e..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignaturesFilterValues.ts +++ /dev/null @@ -1,28 +0,0 @@ -// 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 type { - SignatureOverridesFilterValuesQuery, - FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams, - FirewallPolicyIdpsSignaturesFilterValuesListResponse, -} from "../models/index.js"; - -/** Interface representing a FirewallPolicyIdpsSignaturesFilterValues. */ -export interface FirewallPolicyIdpsSignaturesFilterValues { - /** - * Retrieves the current filter values for the signatures overrides - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Describes the filter values possibles for a given column - * @param options The options parameters. - */ - list( - resourceGroupName: string, - firewallPolicyName: string, - parameters: SignatureOverridesFilterValuesQuery, - options?: FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignaturesOverrides.ts b/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignaturesOverrides.ts deleted file mode 100644 index 46a31281f4c6..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyIdpsSignaturesOverrides.ts +++ /dev/null @@ -1,69 +0,0 @@ -// 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 type { - SignaturesOverrides, - FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams, - FirewallPolicyIdpsSignaturesOverridesPatchResponse, - FirewallPolicyIdpsSignaturesOverridesPutOptionalParams, - FirewallPolicyIdpsSignaturesOverridesPutResponse, - FirewallPolicyIdpsSignaturesOverridesGetOptionalParams, - FirewallPolicyIdpsSignaturesOverridesGetResponse, - FirewallPolicyIdpsSignaturesOverridesListOptionalParams, - FirewallPolicyIdpsSignaturesOverridesListResponse, -} from "../models/index.js"; - -/** Interface representing a FirewallPolicyIdpsSignaturesOverrides. */ -export interface FirewallPolicyIdpsSignaturesOverrides { - /** - * Will update the status of policy's signature overrides for IDPS - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Will contain all properties of the object to put - * @param options The options parameters. - */ - patch( - resourceGroupName: string, - firewallPolicyName: string, - parameters: SignaturesOverrides, - options?: FirewallPolicyIdpsSignaturesOverridesPatchOptionalParams, - ): Promise; - /** - * Will override/create a new signature overrides for the policy's IDPS - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param parameters Will contain all properties of the object to put - * @param options The options parameters. - */ - put( - resourceGroupName: string, - firewallPolicyName: string, - parameters: SignaturesOverrides, - options?: FirewallPolicyIdpsSignaturesOverridesPutOptionalParams, - ): Promise; - /** - * Returns all signatures overrides for a specific policy. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyIdpsSignaturesOverridesGetOptionalParams, - ): Promise; - /** - * Returns all signatures overrides objects for a specific policy as a list containing a single value. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyIdpsSignaturesOverridesListOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyRuleCollectionGroupDrafts.ts b/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyRuleCollectionGroupDrafts.ts deleted file mode 100644 index 029d77ebf980..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyRuleCollectionGroupDrafts.ts +++ /dev/null @@ -1,60 +0,0 @@ -// 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 type { - FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams, - FirewallPolicyRuleCollectionGroupDraft, - FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams, - FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateResponse, - FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams, - FirewallPolicyRuleCollectionGroupDraftsGetResponse, -} from "../models/index.js"; - -/** Interface representing a FirewallPolicyRuleCollectionGroupDrafts. */ -export interface FirewallPolicyRuleCollectionGroupDrafts { - /** - * Delete Rule Collection Group Draft. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - options?: FirewallPolicyRuleCollectionGroupDraftsDeleteOptionalParams, - ): Promise; - /** - * Create or Update Rule Collection Group Draft. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param parameters Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup - * operation. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - parameters: FirewallPolicyRuleCollectionGroupDraft, - options?: FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Get Rule Collection Group Draft. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - options?: FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyRuleCollectionGroups.ts b/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyRuleCollectionGroups.ts deleted file mode 100644 index e9bde5a2dd01..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicyRuleCollectionGroups.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - FirewallPolicyRuleCollectionGroup, - FirewallPolicyRuleCollectionGroupsListOptionalParams, - FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, - FirewallPolicyRuleCollectionGroupsGetOptionalParams, - FirewallPolicyRuleCollectionGroupsGetResponse, - FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, - FirewallPolicyRuleCollectionGroupsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a FirewallPolicyRuleCollectionGroups. */ -export interface FirewallPolicyRuleCollectionGroups { - /** - * Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - firewallPolicyName: string, - options?: FirewallPolicyRuleCollectionGroupsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified FirewallPolicyRuleCollectionGroup. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified FirewallPolicyRuleCollectionGroup. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - options?: FirewallPolicyRuleCollectionGroupsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified FirewallPolicyRuleCollectionGroup. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - options?: FirewallPolicyRuleCollectionGroupsGetOptionalParams, - ): Promise; - /** - * Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param parameters Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - parameters: FirewallPolicyRuleCollectionGroup, - options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - FirewallPolicyRuleCollectionGroupsCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * @param resourceGroupName The name of the resource group. - * @param firewallPolicyName The name of the Firewall Policy. - * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup. - * @param parameters Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - firewallPolicyName: string, - ruleCollectionGroupName: string, - parameters: FirewallPolicyRuleCollectionGroup, - options?: FirewallPolicyRuleCollectionGroupsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/flowLogs.ts b/sdk/network/arm-network/src/operationsInterfaces/flowLogs.ts deleted file mode 100644 index 17050d5de89f..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/flowLogs.ts +++ /dev/null @@ -1,122 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - FlowLog, - FlowLogsListOptionalParams, - FlowLogsCreateOrUpdateOptionalParams, - FlowLogsCreateOrUpdateResponse, - TagsObject, - FlowLogsUpdateTagsOptionalParams, - FlowLogsUpdateTagsResponse, - FlowLogsGetOptionalParams, - FlowLogsGetResponse, - FlowLogsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a FlowLogs. */ -export interface FlowLogs { - /** - * Lists all flow log resources for the specified Network Watcher. - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkWatcherName: string, - options?: FlowLogsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Create or update a flow log for the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log. - * @param parameters Parameters that define the create or update flow log resource. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - parameters: FlowLog, - options?: FlowLogsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, FlowLogsCreateOrUpdateResponse> - >; - /** - * Create or update a flow log for the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log. - * @param parameters Parameters that define the create or update flow log resource. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - parameters: FlowLog, - options?: FlowLogsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Update tags of the specified flow log. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log. - * @param parameters Parameters supplied to update flow log tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - parameters: TagsObject, - options?: FlowLogsUpdateTagsOptionalParams, - ): Promise; - /** - * Gets a flow log resource by name. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - options?: FlowLogsGetOptionalParams, - ): Promise; - /** - * Deletes the specified flow log resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log resource. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - options?: FlowLogsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified flow log resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param flowLogName The name of the flow log resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkWatcherName: string, - flowLogName: string, - options?: FlowLogsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/hubRouteTables.ts b/sdk/network/arm-network/src/operationsInterfaces/hubRouteTables.ts deleted file mode 100644 index 7b38cf67e61b..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/hubRouteTables.ts +++ /dev/null @@ -1,107 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - HubRouteTable, - HubRouteTablesListOptionalParams, - HubRouteTablesCreateOrUpdateOptionalParams, - HubRouteTablesCreateOrUpdateResponse, - HubRouteTablesGetOptionalParams, - HubRouteTablesGetResponse, - HubRouteTablesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a HubRouteTables. */ -export interface HubRouteTables { - /** - * Retrieves the details of all RouteTables. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualHubName: string, - options?: HubRouteTablesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the RouteTable. - * @param routeTableParameters Parameters supplied to create or update RouteTable. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - routeTableParameters: HubRouteTable, - options?: HubRouteTablesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - HubRouteTablesCreateOrUpdateResponse - > - >; - /** - * Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the RouteTable. - * @param routeTableParameters Parameters supplied to create or update RouteTable. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - routeTableParameters: HubRouteTable, - options?: HubRouteTablesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Retrieves the details of a RouteTable. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the RouteTable. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: HubRouteTablesGetOptionalParams, - ): Promise; - /** - * Deletes a RouteTable. - * @param resourceGroupName The resource group name of the RouteTable. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the RouteTable. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: HubRouteTablesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a RouteTable. - * @param resourceGroupName The resource group name of the RouteTable. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the RouteTable. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: HubRouteTablesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/hubVirtualNetworkConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/hubVirtualNetworkConnections.ts deleted file mode 100644 index d1ba5a928171..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/hubVirtualNetworkConnections.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - HubVirtualNetworkConnection, - HubVirtualNetworkConnectionsListOptionalParams, - HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, - HubVirtualNetworkConnectionsCreateOrUpdateResponse, - HubVirtualNetworkConnectionsDeleteOptionalParams, - HubVirtualNetworkConnectionsGetOptionalParams, - HubVirtualNetworkConnectionsGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a HubVirtualNetworkConnections. */ -export interface HubVirtualNetworkConnections { - /** - * Retrieves the details of all HubVirtualNetworkConnections. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualHubName: string, - options?: HubVirtualNetworkConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * @param resourceGroupName The resource group name of the HubVirtualNetworkConnection. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the HubVirtualNetworkConnection. - * @param hubVirtualNetworkConnectionParameters Parameters supplied to create or update a hub virtual - * network connection. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, - options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - HubVirtualNetworkConnectionsCreateOrUpdateResponse - > - >; - /** - * Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * @param resourceGroupName The resource group name of the HubVirtualNetworkConnection. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the HubVirtualNetworkConnection. - * @param hubVirtualNetworkConnectionParameters Parameters supplied to create or update a hub virtual - * network connection. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - hubVirtualNetworkConnectionParameters: HubVirtualNetworkConnection, - options?: HubVirtualNetworkConnectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a HubVirtualNetworkConnection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the HubVirtualNetworkConnection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: HubVirtualNetworkConnectionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a HubVirtualNetworkConnection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the HubVirtualNetworkConnection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: HubVirtualNetworkConnectionsDeleteOptionalParams, - ): Promise; - /** - * Retrieves the details of a HubVirtualNetworkConnection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the vpn connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: HubVirtualNetworkConnectionsGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/inboundNatRules.ts b/sdk/network/arm-network/src/operationsInterfaces/inboundNatRules.ts deleted file mode 100644 index 56431b7750d5..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/inboundNatRules.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - InboundNatRule, - InboundNatRulesListOptionalParams, - InboundNatRulesDeleteOptionalParams, - InboundNatRulesGetOptionalParams, - InboundNatRulesGetResponse, - InboundNatRulesCreateOrUpdateOptionalParams, - InboundNatRulesCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a InboundNatRules. */ -export interface InboundNatRules { - /** - * Gets all the inbound NAT rules in a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - loadBalancerName: string, - options?: InboundNatRulesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified load balancer inbound NAT rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param inboundNatRuleName The name of the inbound NAT rule. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - loadBalancerName: string, - inboundNatRuleName: string, - options?: InboundNatRulesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified load balancer inbound NAT rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param inboundNatRuleName The name of the inbound NAT rule. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - loadBalancerName: string, - inboundNatRuleName: string, - options?: InboundNatRulesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified load balancer inbound NAT rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param inboundNatRuleName The name of the inbound NAT rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - inboundNatRuleName: string, - options?: InboundNatRulesGetOptionalParams, - ): Promise; - /** - * Creates or updates a load balancer inbound NAT rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param inboundNatRuleName The name of the inbound NAT rule. - * @param inboundNatRuleParameters Parameters supplied to the create or update inbound NAT rule - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - loadBalancerName: string, - inboundNatRuleName: string, - inboundNatRuleParameters: InboundNatRule, - options?: InboundNatRulesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - InboundNatRulesCreateOrUpdateResponse - > - >; - /** - * Creates or updates a load balancer inbound NAT rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param inboundNatRuleName The name of the inbound NAT rule. - * @param inboundNatRuleParameters Parameters supplied to the create or update inbound NAT rule - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - loadBalancerName: string, - inboundNatRuleName: string, - inboundNatRuleParameters: InboundNatRule, - options?: InboundNatRulesCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/inboundSecurityRuleOperations.ts b/sdk/network/arm-network/src/operationsInterfaces/inboundSecurityRuleOperations.ts deleted file mode 100644 index 73d5d028787d..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/inboundSecurityRuleOperations.ts +++ /dev/null @@ -1,68 +0,0 @@ -// 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 type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - InboundSecurityRule, - InboundSecurityRuleCreateOrUpdateOptionalParams, - InboundSecurityRuleCreateOrUpdateResponse, - InboundSecurityRuleGetOptionalParams, - InboundSecurityRuleGetResponse, -} from "../models/index.js"; - -/** Interface representing a InboundSecurityRuleOperations. */ -export interface InboundSecurityRuleOperations { - /** - * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param ruleCollectionName The name of security rule collection. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound - * Security Rules operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - networkVirtualApplianceName: string, - ruleCollectionName: string, - parameters: InboundSecurityRule, - options?: InboundSecurityRuleCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - InboundSecurityRuleCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param ruleCollectionName The name of security rule collection. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound - * Security Rules operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - ruleCollectionName: string, - parameters: InboundSecurityRule, - options?: InboundSecurityRuleCreateOrUpdateOptionalParams, - ): Promise; - /** - * Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param ruleCollectionName The name of security rule collection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkVirtualApplianceName: string, - ruleCollectionName: string, - options?: InboundSecurityRuleGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/index.ts b/sdk/network/arm-network/src/operationsInterfaces/index.ts deleted file mode 100644 index 5edc4144ad63..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/index.ts +++ /dev/null @@ -1,164 +0,0 @@ -// 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. - -export * from "./applicationGateways.js"; -export * from "./applicationGatewayPrivateLinkResources.js"; -export * from "./applicationGatewayPrivateEndpointConnections.js"; -export * from "./applicationGatewayWafDynamicManifestsDefault.js"; -export * from "./applicationGatewayWafDynamicManifests.js"; -export * from "./applicationSecurityGroups.js"; -export * from "./availableDelegations.js"; -export * from "./availableResourceGroupDelegations.js"; -export * from "./availableServiceAliases.js"; -export * from "./azureFirewalls.js"; -export * from "./azureFirewallFqdnTags.js"; -export * from "./webCategories.js"; -export * from "./bastionHosts.js"; -export * from "./networkInterfaces.js"; -export * from "./publicIPAddresses.js"; -export * from "./vipSwap.js"; -export * from "./customIPPrefixes.js"; -export * from "./ddosCustomPolicies.js"; -export * from "./ddosProtectionPlans.js"; -export * from "./dscpConfigurationOperations.js"; -export * from "./availableEndpointServices.js"; -export * from "./expressRouteCircuitAuthorizations.js"; -export * from "./expressRouteCircuitPeerings.js"; -export * from "./expressRouteCircuitConnections.js"; -export * from "./peerExpressRouteCircuitConnections.js"; -export * from "./expressRouteCircuits.js"; -export * from "./expressRouteServiceProviders.js"; -export * from "./expressRouteCrossConnections.js"; -export * from "./expressRouteCrossConnectionPeerings.js"; -export * from "./expressRoutePortsLocations.js"; -export * from "./expressRoutePorts.js"; -export * from "./expressRouteLinks.js"; -export * from "./expressRoutePortAuthorizations.js"; -export * from "./expressRouteProviderPortsLocation.js"; -export * from "./firewallPolicies.js"; -export * from "./firewallPolicyRuleCollectionGroups.js"; -export * from "./firewallPolicyIdpsSignatures.js"; -export * from "./firewallPolicyIdpsSignaturesOverrides.js"; -export * from "./firewallPolicyIdpsSignaturesFilterValues.js"; -export * from "./firewallPolicyDrafts.js"; -export * from "./firewallPolicyDeployments.js"; -export * from "./firewallPolicyRuleCollectionGroupDrafts.js"; -export * from "./ipamPools.js"; -export * from "./staticCidrs.js"; -export * from "./ipAllocations.js"; -export * from "./ipGroups.js"; -export * from "./loadBalancers.js"; -export * from "./loadBalancerBackendAddressPools.js"; -export * from "./loadBalancerFrontendIPConfigurations.js"; -export * from "./inboundNatRules.js"; -export * from "./loadBalancerLoadBalancingRules.js"; -export * from "./loadBalancerOutboundRules.js"; -export * from "./loadBalancerNetworkInterfaces.js"; -export * from "./loadBalancerProbes.js"; -export * from "./natGateways.js"; -export * from "./networkInterfaceIPConfigurations.js"; -export * from "./networkInterfaceLoadBalancers.js"; -export * from "./networkInterfaceTapConfigurations.js"; -export * from "./networkManagers.js"; -export * from "./networkManagerCommits.js"; -export * from "./networkManagerDeploymentStatusOperations.js"; -export * from "./subscriptionNetworkManagerConnections.js"; -export * from "./managementGroupNetworkManagerConnections.js"; -export * from "./connectivityConfigurations.js"; -export * from "./networkGroups.js"; -export * from "./staticMembers.js"; -export * from "./networkManagerRoutingConfigurations.js"; -export * from "./routingRuleCollections.js"; -export * from "./routingRules.js"; -export * from "./scopeConnections.js"; -export * from "./securityAdminConfigurations.js"; -export * from "./adminRuleCollections.js"; -export * from "./adminRules.js"; -export * from "./securityUserConfigurations.js"; -export * from "./securityUserRuleCollections.js"; -export * from "./securityUserRules.js"; -export * from "./networkProfiles.js"; -export * from "./networkSecurityGroups.js"; -export * from "./securityRules.js"; -export * from "./defaultSecurityRules.js"; -export * from "./networkSecurityPerimeters.js"; -export * from "./networkSecurityPerimeterProfiles.js"; -export * from "./networkSecurityPerimeterAccessRules.js"; -export * from "./networkSecurityPerimeterAssociations.js"; -export * from "./networkSecurityPerimeterAssociableResourceTypes.js"; -export * from "./networkSecurityPerimeterLinks.js"; -export * from "./networkSecurityPerimeterLinkReferences.js"; -export * from "./networkSecurityPerimeterLoggingConfigurations.js"; -export * from "./networkSecurityPerimeterOperationStatuses.js"; -export * from "./networkSecurityPerimeterServiceTags.js"; -export * from "./reachabilityAnalysisIntents.js"; -export * from "./reachabilityAnalysisRuns.js"; -export * from "./verifierWorkspaces.js"; -export * from "./networkVirtualAppliances.js"; -export * from "./virtualApplianceSites.js"; -export * from "./virtualApplianceSkus.js"; -export * from "./inboundSecurityRuleOperations.js"; -export * from "./networkWatchers.js"; -export * from "./packetCaptures.js"; -export * from "./connectionMonitors.js"; -export * from "./flowLogs.js"; -export * from "./operations.js"; -export * from "./privateEndpoints.js"; -export * from "./availablePrivateEndpointTypes.js"; -export * from "./privateDnsZoneGroups.js"; -export * from "./privateLinkServices.js"; -export * from "./publicIPPrefixes.js"; -export * from "./routeFilters.js"; -export * from "./routeFilterRules.js"; -export * from "./routeTables.js"; -export * from "./routes.js"; -export * from "./securityPartnerProviders.js"; -export * from "./bgpServiceCommunities.js"; -export * from "./serviceEndpointPolicies.js"; -export * from "./serviceEndpointPolicyDefinitions.js"; -export * from "./serviceGateways.js"; -export * from "./serviceTags.js"; -export * from "./serviceTagInformationOperations.js"; -export * from "./usages.js"; -export * from "./virtualNetworks.js"; -export * from "./subnets.js"; -export * from "./resourceNavigationLinks.js"; -export * from "./serviceAssociationLinks.js"; -export * from "./virtualNetworkPeerings.js"; -export * from "./virtualNetworkAppliances.js"; -export * from "./virtualNetworkGateways.js"; -export * from "./virtualNetworkGatewayConnections.js"; -export * from "./localNetworkGateways.js"; -export * from "./virtualNetworkGatewayNatRules.js"; -export * from "./virtualNetworkTaps.js"; -export * from "./virtualRouters.js"; -export * from "./virtualRouterPeerings.js"; -export * from "./virtualWans.js"; -export * from "./vpnSites.js"; -export * from "./vpnSiteLinks.js"; -export * from "./vpnSitesConfiguration.js"; -export * from "./vpnServerConfigurations.js"; -export * from "./configurationPolicyGroups.js"; -export * from "./virtualHubs.js"; -export * from "./routeMaps.js"; -export * from "./hubVirtualNetworkConnections.js"; -export * from "./vpnGateways.js"; -export * from "./vpnLinkConnections.js"; -export * from "./vpnConnections.js"; -export * from "./vpnSiteLinkConnections.js"; -export * from "./natRules.js"; -export * from "./p2SVpnGateways.js"; -export * from "./vpnServerConfigurationsAssociatedWithVirtualWan.js"; -export * from "./virtualHubRouteTableV2S.js"; -export * from "./expressRouteGateways.js"; -export * from "./expressRouteConnections.js"; -export * from "./networkVirtualApplianceConnections.js"; -export * from "./virtualHubBgpConnection.js"; -export * from "./virtualHubBgpConnections.js"; -export * from "./virtualHubIpConfiguration.js"; -export * from "./hubRouteTables.js"; -export * from "./routingIntentOperations.js"; -export * from "./webApplicationFirewallPolicies.js"; diff --git a/sdk/network/arm-network/src/operationsInterfaces/ipAllocations.ts b/sdk/network/arm-network/src/operationsInterfaces/ipAllocations.ts deleted file mode 100644 index c0ba98a2a09d..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/ipAllocations.ts +++ /dev/null @@ -1,117 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - IpAllocation, - IpAllocationsListOptionalParams, - IpAllocationsListByResourceGroupOptionalParams, - IpAllocationsDeleteOptionalParams, - IpAllocationsGetOptionalParams, - IpAllocationsGetResponse, - IpAllocationsCreateOrUpdateOptionalParams, - IpAllocationsCreateOrUpdateResponse, - TagsObject, - IpAllocationsUpdateTagsOptionalParams, - IpAllocationsUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a IpAllocations. */ -export interface IpAllocations { - /** - * Gets all IpAllocations in a subscription. - * @param options The options parameters. - */ - list(options?: IpAllocationsListOptionalParams): PagedAsyncIterableIterator; - /** - * Gets all IpAllocations in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: IpAllocationsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified IpAllocation. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - ipAllocationName: string, - options?: IpAllocationsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified IpAllocation. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - ipAllocationName: string, - options?: IpAllocationsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified IpAllocation by resource group. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ipAllocationName: string, - options?: IpAllocationsGetOptionalParams, - ): Promise; - /** - * Creates or updates an IpAllocation in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param parameters Parameters supplied to the create or update virtual network operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - ipAllocationName: string, - parameters: IpAllocation, - options?: IpAllocationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - IpAllocationsCreateOrUpdateResponse - > - >; - /** - * Creates or updates an IpAllocation in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param parameters Parameters supplied to the create or update virtual network operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - ipAllocationName: string, - parameters: IpAllocation, - options?: IpAllocationsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates a IpAllocation tags. - * @param resourceGroupName The name of the resource group. - * @param ipAllocationName The name of the IpAllocation. - * @param parameters Parameters supplied to update IpAllocation tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - ipAllocationName: string, - parameters: TagsObject, - options?: IpAllocationsUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/ipGroups.ts b/sdk/network/arm-network/src/operationsInterfaces/ipGroups.ts deleted file mode 100644 index b76aaa956892..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/ipGroups.ts +++ /dev/null @@ -1,114 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - IpGroup, - IpGroupsListByResourceGroupOptionalParams, - IpGroupsListOptionalParams, - IpGroupsGetOptionalParams, - IpGroupsGetResponse, - IpGroupsCreateOrUpdateOptionalParams, - IpGroupsCreateOrUpdateResponse, - TagsObject, - IpGroupsUpdateGroupsOptionalParams, - IpGroupsUpdateGroupsResponse, - IpGroupsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a IpGroups. */ -export interface IpGroups { - /** - * Gets all IpGroups in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: IpGroupsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all IpGroups in a subscription. - * @param options The options parameters. - */ - list(options?: IpGroupsListOptionalParams): PagedAsyncIterableIterator; - /** - * Gets the specified ipGroups. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ipGroupsName: string, - options?: IpGroupsGetOptionalParams, - ): Promise; - /** - * Creates or updates an ipGroups in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param parameters Parameters supplied to the create or update IpGroups operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - ipGroupsName: string, - parameters: IpGroup, - options?: IpGroupsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, IpGroupsCreateOrUpdateResponse> - >; - /** - * Creates or updates an ipGroups in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param parameters Parameters supplied to the create or update IpGroups operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - ipGroupsName: string, - parameters: IpGroup, - options?: IpGroupsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates tags of an IpGroups resource. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param parameters Parameters supplied to the update ipGroups operation. - * @param options The options parameters. - */ - updateGroups( - resourceGroupName: string, - ipGroupsName: string, - parameters: TagsObject, - options?: IpGroupsUpdateGroupsOptionalParams, - ): Promise; - /** - * Deletes the specified ipGroups. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - ipGroupsName: string, - options?: IpGroupsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified ipGroups. - * @param resourceGroupName The name of the resource group. - * @param ipGroupsName The name of the ipGroups. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - ipGroupsName: string, - options?: IpGroupsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/ipamPools.ts b/sdk/network/arm-network/src/operationsInterfaces/ipamPools.ts deleted file mode 100644 index dd017c3ac073..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/ipamPools.ts +++ /dev/null @@ -1,148 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - IpamPool, - IpamPoolsListOptionalParams, - PoolAssociation, - IpamPoolsListAssociatedResourcesOptionalParams, - IpamPoolsCreateOptionalParams, - IpamPoolsCreateResponse, - IpamPoolsUpdateOptionalParams, - IpamPoolsUpdateResponse, - IpamPoolsGetOptionalParams, - IpamPoolsGetResponse, - IpamPoolsDeleteOptionalParams, - IpamPoolsDeleteResponse, - IpamPoolsGetPoolUsageOptionalParams, - IpamPoolsGetPoolUsageResponse, -} from "../models/index.js"; - -/// -/** Interface representing a IpamPools. */ -export interface IpamPools { - /** - * Gets list of Pool resources at Network Manager level. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - options?: IpamPoolsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List Associated Resource in the Pool. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - listAssociatedResources( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsListAssociatedResourcesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates/Updates the Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName IP Address Manager Pool resource name. - * @param body Pool resource object to create/update. - * @param options The options parameters. - */ - beginCreate( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - body: IpamPool, - options?: IpamPoolsCreateOptionalParams, - ): Promise, IpamPoolsCreateResponse>>; - /** - * Creates/Updates the Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName IP Address Manager Pool resource name. - * @param body Pool resource object to create/update. - * @param options The options parameters. - */ - beginCreateAndWait( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - body: IpamPool, - options?: IpamPoolsCreateOptionalParams, - ): Promise; - /** - * Updates the specific Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName IP Address Manager Pool resource name. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsUpdateOptionalParams, - ): Promise; - /** - * Gets the specific Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsGetOptionalParams, - ): Promise; - /** - * Delete the Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsDeleteOptionalParams, - ): Promise, IpamPoolsDeleteResponse>>; - /** - * Delete the Pool resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsDeleteOptionalParams, - ): Promise; - /** - * Get the Pool Usage. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - getPoolUsage( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: IpamPoolsGetPoolUsageOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerBackendAddressPools.ts b/sdk/network/arm-network/src/operationsInterfaces/loadBalancerBackendAddressPools.ts deleted file mode 100644 index 379bc95eb228..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerBackendAddressPools.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - BackendAddressPool, - LoadBalancerBackendAddressPoolsListOptionalParams, - LoadBalancerBackendAddressPoolsGetOptionalParams, - LoadBalancerBackendAddressPoolsGetResponse, - LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, - LoadBalancerBackendAddressPoolsCreateOrUpdateResponse, - LoadBalancerBackendAddressPoolsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a LoadBalancerBackendAddressPools. */ -export interface LoadBalancerBackendAddressPools { - /** - * Gets all the load balancer backed address pools. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerBackendAddressPoolsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets load balancer backend address pool. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendAddressPoolName The name of the backend address pool. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - backendAddressPoolName: string, - options?: LoadBalancerBackendAddressPoolsGetOptionalParams, - ): Promise; - /** - * Creates or updates a load balancer backend address pool. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendAddressPoolName The name of the backend address pool. - * @param parameters Parameters supplied to the create or update load balancer backend address pool - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - loadBalancerName: string, - backendAddressPoolName: string, - parameters: BackendAddressPool, - options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - LoadBalancerBackendAddressPoolsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a load balancer backend address pool. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendAddressPoolName The name of the backend address pool. - * @param parameters Parameters supplied to the create or update load balancer backend address pool - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - loadBalancerName: string, - backendAddressPoolName: string, - parameters: BackendAddressPool, - options?: LoadBalancerBackendAddressPoolsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified load balancer backend address pool. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendAddressPoolName The name of the backend address pool. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - loadBalancerName: string, - backendAddressPoolName: string, - options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified load balancer backend address pool. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendAddressPoolName The name of the backend address pool. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - loadBalancerName: string, - backendAddressPoolName: string, - options?: LoadBalancerBackendAddressPoolsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerFrontendIPConfigurations.ts b/sdk/network/arm-network/src/operationsInterfaces/loadBalancerFrontendIPConfigurations.ts deleted file mode 100644 index c397ff928d77..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerFrontendIPConfigurations.ts +++ /dev/null @@ -1,42 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - FrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationsListOptionalParams, - LoadBalancerFrontendIPConfigurationsGetOptionalParams, - LoadBalancerFrontendIPConfigurationsGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a LoadBalancerFrontendIPConfigurations. */ -export interface LoadBalancerFrontendIPConfigurations { - /** - * Gets all the load balancer frontend IP configurations. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerFrontendIPConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets load balancer frontend IP configuration. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param frontendIPConfigurationName The name of the frontend IP configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - frontendIPConfigurationName: string, - options?: LoadBalancerFrontendIPConfigurationsGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerLoadBalancingRules.ts b/sdk/network/arm-network/src/operationsInterfaces/loadBalancerLoadBalancingRules.ts deleted file mode 100644 index 9d2b50854dd8..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerLoadBalancingRules.ts +++ /dev/null @@ -1,76 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - LoadBalancingRule, - LoadBalancerLoadBalancingRulesListOptionalParams, - LoadBalancerLoadBalancingRulesGetOptionalParams, - LoadBalancerLoadBalancingRulesGetResponse, - LoadBalancerLoadBalancingRulesHealthOptionalParams, - LoadBalancerLoadBalancingRulesHealthResponse, -} from "../models/index.js"; - -/// -/** Interface representing a LoadBalancerLoadBalancingRules. */ -export interface LoadBalancerLoadBalancingRules { - /** - * Gets all the load balancing rules in a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerLoadBalancingRulesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified load balancer load balancing rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param loadBalancingRuleName The name of the load balancing rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - loadBalancingRuleName: string, - options?: LoadBalancerLoadBalancingRulesGetOptionalParams, - ): Promise; - /** - * Get health details of a load balancing rule. - * @param groupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param loadBalancingRuleName The name of the load balancing rule. - * @param options The options parameters. - */ - beginHealth( - groupName: string, - loadBalancerName: string, - loadBalancingRuleName: string, - options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - LoadBalancerLoadBalancingRulesHealthResponse - > - >; - /** - * Get health details of a load balancing rule. - * @param groupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param loadBalancingRuleName The name of the load balancing rule. - * @param options The options parameters. - */ - beginHealthAndWait( - groupName: string, - loadBalancerName: string, - loadBalancingRuleName: string, - options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerNetworkInterfaces.ts b/sdk/network/arm-network/src/operationsInterfaces/loadBalancerNetworkInterfaces.ts deleted file mode 100644 index 2f7d8cf362cb..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerNetworkInterfaces.ts +++ /dev/null @@ -1,27 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - NetworkInterface, - LoadBalancerNetworkInterfacesListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a LoadBalancerNetworkInterfaces. */ -export interface LoadBalancerNetworkInterfaces { - /** - * Gets associated load balancer network interfaces. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerNetworkInterfacesListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerOutboundRules.ts b/sdk/network/arm-network/src/operationsInterfaces/loadBalancerOutboundRules.ts deleted file mode 100644 index 49b307272f4f..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerOutboundRules.ts +++ /dev/null @@ -1,42 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - OutboundRule, - LoadBalancerOutboundRulesListOptionalParams, - LoadBalancerOutboundRulesGetOptionalParams, - LoadBalancerOutboundRulesGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a LoadBalancerOutboundRules. */ -export interface LoadBalancerOutboundRules { - /** - * Gets all the outbound rules in a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerOutboundRulesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified load balancer outbound rule. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param outboundRuleName The name of the outbound rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - outboundRuleName: string, - options?: LoadBalancerOutboundRulesGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerProbes.ts b/sdk/network/arm-network/src/operationsInterfaces/loadBalancerProbes.ts deleted file mode 100644 index 62a05b4eeb4d..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerProbes.ts +++ /dev/null @@ -1,42 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - Probe, - LoadBalancerProbesListOptionalParams, - LoadBalancerProbesGetOptionalParams, - LoadBalancerProbesGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a LoadBalancerProbes. */ -export interface LoadBalancerProbes { - /** - * Gets all the load balancer probes. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancerProbesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets load balancer probe. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param probeName The name of the probe. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - probeName: string, - options?: LoadBalancerProbesGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/loadBalancers.ts b/sdk/network/arm-network/src/operationsInterfaces/loadBalancers.ts deleted file mode 100644 index 8be58a83de19..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/loadBalancers.ts +++ /dev/null @@ -1,192 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - LoadBalancer, - LoadBalancersListAllOptionalParams, - LoadBalancersListOptionalParams, - LoadBalancersDeleteOptionalParams, - LoadBalancersGetOptionalParams, - LoadBalancersGetResponse, - LoadBalancersCreateOrUpdateOptionalParams, - LoadBalancersCreateOrUpdateResponse, - TagsObject, - LoadBalancersUpdateTagsOptionalParams, - LoadBalancersUpdateTagsResponse, - LoadBalancerVipSwapRequest, - LoadBalancersSwapPublicIpAddressesOptionalParams, - QueryInboundNatRulePortMappingRequest, - LoadBalancersListInboundNatRulePortMappingsOptionalParams, - LoadBalancersListInboundNatRulePortMappingsResponse, - LoadBalancersMigrateToIpBasedOptionalParams, - LoadBalancersMigrateToIpBasedResponse, -} from "../models/index.js"; - -/// -/** Interface representing a LoadBalancers. */ -export interface LoadBalancers { - /** - * Gets all the load balancers in a subscription. - * @param options The options parameters. - */ - listAll(options?: LoadBalancersListAllOptionalParams): PagedAsyncIterableIterator; - /** - * Gets all the load balancers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: LoadBalancersListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancersDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancersDeleteOptionalParams, - ): Promise; - /** - * Gets the specified load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - loadBalancerName: string, - options?: LoadBalancersGetOptionalParams, - ): Promise; - /** - * Creates or updates a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param parameters Parameters supplied to the create or update load balancer operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - loadBalancerName: string, - parameters: LoadBalancer, - options?: LoadBalancersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - LoadBalancersCreateOrUpdateResponse - > - >; - /** - * Creates or updates a load balancer. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param parameters Parameters supplied to the create or update load balancer operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - loadBalancerName: string, - parameters: LoadBalancer, - options?: LoadBalancersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates a load balancer tags. - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param parameters Parameters supplied to update load balancer tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - loadBalancerName: string, - parameters: TagsObject, - options?: LoadBalancersUpdateTagsOptionalParams, - ): Promise; - /** - * Swaps VIPs between two load balancers. - * @param location The region where load balancers are located at. - * @param parameters Parameters that define which VIPs should be swapped. - * @param options The options parameters. - */ - beginSwapPublicIpAddresses( - location: string, - parameters: LoadBalancerVipSwapRequest, - options?: LoadBalancersSwapPublicIpAddressesOptionalParams, - ): Promise, void>>; - /** - * Swaps VIPs between two load balancers. - * @param location The region where load balancers are located at. - * @param parameters Parameters that define which VIPs should be swapped. - * @param options The options parameters. - */ - beginSwapPublicIpAddressesAndWait( - location: string, - parameters: LoadBalancerVipSwapRequest, - options?: LoadBalancersSwapPublicIpAddressesOptionalParams, - ): Promise; - /** - * List of inbound NAT rule port mappings. - * @param groupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendPoolName The name of the load balancer backend address pool. - * @param parameters Query inbound NAT rule port mapping request. - * @param options The options parameters. - */ - beginListInboundNatRulePortMappings( - groupName: string, - loadBalancerName: string, - backendPoolName: string, - parameters: QueryInboundNatRulePortMappingRequest, - options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - LoadBalancersListInboundNatRulePortMappingsResponse - > - >; - /** - * List of inbound NAT rule port mappings. - * @param groupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param backendPoolName The name of the load balancer backend address pool. - * @param parameters Query inbound NAT rule port mapping request. - * @param options The options parameters. - */ - beginListInboundNatRulePortMappingsAndWait( - groupName: string, - loadBalancerName: string, - backendPoolName: string, - parameters: QueryInboundNatRulePortMappingRequest, - options?: LoadBalancersListInboundNatRulePortMappingsOptionalParams, - ): Promise; - /** - * Migrate load balancer to IP Based - * @param groupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param options The options parameters. - */ - migrateToIpBased( - groupName: string, - loadBalancerName: string, - options?: LoadBalancersMigrateToIpBasedOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/localNetworkGateways.ts b/sdk/network/arm-network/src/operationsInterfaces/localNetworkGateways.ts deleted file mode 100644 index 592ff9aadc51..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/localNetworkGateways.ts +++ /dev/null @@ -1,111 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - LocalNetworkGateway, - LocalNetworkGatewaysListOptionalParams, - LocalNetworkGatewaysCreateOrUpdateOptionalParams, - LocalNetworkGatewaysCreateOrUpdateResponse, - LocalNetworkGatewaysGetOptionalParams, - LocalNetworkGatewaysGetResponse, - LocalNetworkGatewaysDeleteOptionalParams, - TagsObject, - LocalNetworkGatewaysUpdateTagsOptionalParams, - LocalNetworkGatewaysUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a LocalNetworkGateways. */ -export interface LocalNetworkGateways { - /** - * Gets all the local network gateways in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: LocalNetworkGatewaysListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates or updates a local network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param parameters Parameters supplied to the create or update local network gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - localNetworkGatewayName: string, - parameters: LocalNetworkGateway, - options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - LocalNetworkGatewaysCreateOrUpdateResponse - > - >; - /** - * Creates or updates a local network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param parameters Parameters supplied to the create or update local network gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - localNetworkGatewayName: string, - parameters: LocalNetworkGateway, - options?: LocalNetworkGatewaysCreateOrUpdateOptionalParams, - ): Promise; - /** - * Gets the specified local network gateway in a resource group. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - localNetworkGatewayName: string, - options?: LocalNetworkGatewaysGetOptionalParams, - ): Promise; - /** - * Deletes the specified local network gateway. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - localNetworkGatewayName: string, - options?: LocalNetworkGatewaysDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified local network gateway. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - localNetworkGatewayName: string, - options?: LocalNetworkGatewaysDeleteOptionalParams, - ): Promise; - /** - * Updates a local network gateway tags. - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param parameters Parameters supplied to update local network gateway tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - localNetworkGatewayName: string, - parameters: TagsObject, - options?: LocalNetworkGatewaysUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/managementGroupNetworkManagerConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/managementGroupNetworkManagerConnections.ts deleted file mode 100644 index 2371bae68f8c..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/managementGroupNetworkManagerConnections.ts +++ /dev/null @@ -1,69 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - NetworkManagerConnection, - ManagementGroupNetworkManagerConnectionsListOptionalParams, - ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams, - ManagementGroupNetworkManagerConnectionsCreateOrUpdateResponse, - ManagementGroupNetworkManagerConnectionsGetOptionalParams, - ManagementGroupNetworkManagerConnectionsGetResponse, - ManagementGroupNetworkManagerConnectionsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ManagementGroupNetworkManagerConnections. */ -export interface ManagementGroupNetworkManagerConnections { - /** - * List all network manager connections created by this management group. - * @param managementGroupId The management group Id which uniquely identify the Microsoft Azure - * management group. - * @param options The options parameters. - */ - list( - managementGroupId: string, - options?: ManagementGroupNetworkManagerConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Create a network manager connection on this management group. - * @param managementGroupId The management group Id which uniquely identify the Microsoft Azure - * management group. - * @param networkManagerConnectionName Name for the network manager connection. - * @param parameters Network manager connection to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - managementGroupId: string, - networkManagerConnectionName: string, - parameters: NetworkManagerConnection, - options?: ManagementGroupNetworkManagerConnectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Get a specified connection created by this management group. - * @param managementGroupId The management group Id which uniquely identify the Microsoft Azure - * management group. - * @param networkManagerConnectionName Name for the network manager connection. - * @param options The options parameters. - */ - get( - managementGroupId: string, - networkManagerConnectionName: string, - options?: ManagementGroupNetworkManagerConnectionsGetOptionalParams, - ): Promise; - /** - * Delete specified pending connection created by this management group. - * @param managementGroupId The management group Id which uniquely identify the Microsoft Azure - * management group. - * @param networkManagerConnectionName Name for the network manager connection. - * @param options The options parameters. - */ - delete( - managementGroupId: string, - networkManagerConnectionName: string, - options?: ManagementGroupNetworkManagerConnectionsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/natGateways.ts b/sdk/network/arm-network/src/operationsInterfaces/natGateways.ts deleted file mode 100644 index 7e82305b283e..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/natGateways.ts +++ /dev/null @@ -1,117 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NatGateway, - NatGatewaysListAllOptionalParams, - NatGatewaysListOptionalParams, - NatGatewaysDeleteOptionalParams, - NatGatewaysGetOptionalParams, - NatGatewaysGetResponse, - NatGatewaysCreateOrUpdateOptionalParams, - NatGatewaysCreateOrUpdateResponse, - TagsObject, - NatGatewaysUpdateTagsOptionalParams, - NatGatewaysUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NatGateways. */ -export interface NatGateways { - /** - * Gets all the Nat Gateways in a subscription. - * @param options The options parameters. - */ - listAll(options?: NatGatewaysListAllOptionalParams): PagedAsyncIterableIterator; - /** - * Gets all nat gateways in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: NatGatewaysListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified nat gateway. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - natGatewayName: string, - options?: NatGatewaysDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified nat gateway. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - natGatewayName: string, - options?: NatGatewaysDeleteOptionalParams, - ): Promise; - /** - * Gets the specified nat gateway in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - natGatewayName: string, - options?: NatGatewaysGetOptionalParams, - ): Promise; - /** - * Creates or updates a nat gateway. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param parameters Parameters supplied to the create or update nat gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - natGatewayName: string, - parameters: NatGateway, - options?: NatGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NatGatewaysCreateOrUpdateResponse - > - >; - /** - * Creates or updates a nat gateway. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param parameters Parameters supplied to the create or update nat gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - natGatewayName: string, - parameters: NatGateway, - options?: NatGatewaysCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates nat gateway tags. - * @param resourceGroupName The name of the resource group. - * @param natGatewayName The name of the nat gateway. - * @param parameters Parameters supplied to update nat gateway tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - natGatewayName: string, - parameters: TagsObject, - options?: NatGatewaysUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/natRules.ts b/sdk/network/arm-network/src/operationsInterfaces/natRules.ts deleted file mode 100644 index 24cdb9978603..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/natRules.ts +++ /dev/null @@ -1,106 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VpnGatewayNatRule, - NatRulesListByVpnGatewayOptionalParams, - NatRulesGetOptionalParams, - NatRulesGetResponse, - NatRulesCreateOrUpdateOptionalParams, - NatRulesCreateOrUpdateResponse, - NatRulesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NatRules. */ -export interface NatRules { - /** - * Retrieves all nat rules for a particular virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - listByVpnGateway( - resourceGroupName: string, - gatewayName: string, - options?: NatRulesListByVpnGatewayOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves the details of a nat ruleGet. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - natRuleName: string, - options?: NatRulesGetOptionalParams, - ): Promise; - /** - * Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat - * rules. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param natRuleParameters Parameters supplied to create or Update a Nat Rule. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - natRuleName: string, - natRuleParameters: VpnGatewayNatRule, - options?: NatRulesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, NatRulesCreateOrUpdateResponse> - >; - /** - * Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat - * rules. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param natRuleParameters Parameters supplied to create or Update a Nat Rule. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - natRuleName: string, - natRuleParameters: VpnGatewayNatRule, - options?: NatRulesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a nat rule. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - gatewayName: string, - natRuleName: string, - options?: NatRulesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a nat rule. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - natRuleName: string, - options?: NatRulesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkGroups.ts b/sdk/network/arm-network/src/operationsInterfaces/networkGroups.ts deleted file mode 100644 index 6b880c12cb95..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkGroups.ts +++ /dev/null @@ -1,87 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkGroup, - NetworkGroupsListOptionalParams, - NetworkGroupsGetOptionalParams, - NetworkGroupsGetResponse, - NetworkGroupsCreateOrUpdateOptionalParams, - NetworkGroupsCreateOrUpdateResponse, - NetworkGroupsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkGroups. */ -export interface NetworkGroups { - /** - * Lists the specified network group. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkGroupsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified network group. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - options?: NetworkGroupsGetOptionalParams, - ): Promise; - /** - * Creates or updates a network group. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param parameters Parameters supplied to the specify which network group need to create - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - parameters: NetworkGroup, - options?: NetworkGroupsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a network group. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - options?: NetworkGroupsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a network group. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - options?: NetworkGroupsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkInterfaceIPConfigurations.ts b/sdk/network/arm-network/src/operationsInterfaces/networkInterfaceIPConfigurations.ts deleted file mode 100644 index 4b3acca304d0..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkInterfaceIPConfigurations.ts +++ /dev/null @@ -1,42 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - NetworkInterfaceIPConfiguration, - NetworkInterfaceIPConfigurationsListOptionalParams, - NetworkInterfaceIPConfigurationsGetOptionalParams, - NetworkInterfaceIPConfigurationsGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkInterfaceIPConfigurations. */ -export interface NetworkInterfaceIPConfigurations { - /** - * Get all ip configurations in a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceIPConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified network interface ip configuration. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: NetworkInterfaceIPConfigurationsGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkInterfaceLoadBalancers.ts b/sdk/network/arm-network/src/operationsInterfaces/networkInterfaceLoadBalancers.ts deleted file mode 100644 index 624b7d6b0c3a..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkInterfaceLoadBalancers.ts +++ /dev/null @@ -1,27 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - LoadBalancer, - NetworkInterfaceLoadBalancersListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkInterfaceLoadBalancers. */ -export interface NetworkInterfaceLoadBalancers { - /** - * List all load balancers in a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceLoadBalancersListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkInterfaceTapConfigurations.ts b/sdk/network/arm-network/src/operationsInterfaces/networkInterfaceTapConfigurations.ts deleted file mode 100644 index bbe697fb4ce6..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkInterfaceTapConfigurations.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkInterfaceTapConfiguration, - NetworkInterfaceTapConfigurationsListOptionalParams, - NetworkInterfaceTapConfigurationsDeleteOptionalParams, - NetworkInterfaceTapConfigurationsGetOptionalParams, - NetworkInterfaceTapConfigurationsGetResponse, - NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, - NetworkInterfaceTapConfigurationsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkInterfaceTapConfigurations. */ -export interface NetworkInterfaceTapConfigurations { - /** - * Get all Tap configurations in a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfaceTapConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified tap configuration from the NetworkInterface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tapConfigurationName The name of the tap configuration. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkInterfaceName: string, - tapConfigurationName: string, - options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified tap configuration from the NetworkInterface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tapConfigurationName The name of the tap configuration. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkInterfaceName: string, - tapConfigurationName: string, - options?: NetworkInterfaceTapConfigurationsDeleteOptionalParams, - ): Promise; - /** - * Get the specified tap configuration on a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tapConfigurationName The name of the tap configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkInterfaceName: string, - tapConfigurationName: string, - options?: NetworkInterfaceTapConfigurationsGetOptionalParams, - ): Promise; - /** - * Creates or updates a Tap configuration in the specified NetworkInterface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tapConfigurationName The name of the tap configuration. - * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - networkInterfaceName: string, - tapConfigurationName: string, - tapConfigurationParameters: NetworkInterfaceTapConfiguration, - options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkInterfaceTapConfigurationsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a Tap configuration in the specified NetworkInterface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tapConfigurationName The name of the tap configuration. - * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkInterfaceName: string, - tapConfigurationName: string, - tapConfigurationParameters: NetworkInterfaceTapConfiguration, - options?: NetworkInterfaceTapConfigurationsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkInterfaces.ts b/sdk/network/arm-network/src/operationsInterfaces/networkInterfaces.ts deleted file mode 100644 index 0923e52584f5..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkInterfaces.ts +++ /dev/null @@ -1,299 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkInterface, - NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, - NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, - NetworkInterfacesListAllOptionalParams, - NetworkInterfacesListOptionalParams, - NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, - NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, - NetworkInterfaceIPConfiguration, - NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, - NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams, - NetworkInterfacesGetCloudServiceNetworkInterfaceResponse, - NetworkInterfacesDeleteOptionalParams, - NetworkInterfacesGetOptionalParams, - NetworkInterfacesGetResponse, - NetworkInterfacesCreateOrUpdateOptionalParams, - NetworkInterfacesCreateOrUpdateResponse, - TagsObject, - NetworkInterfacesUpdateTagsOptionalParams, - NetworkInterfacesUpdateTagsResponse, - NetworkInterfacesGetEffectiveRouteTableOptionalParams, - NetworkInterfacesGetEffectiveRouteTableResponse, - NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, - NetworkInterfacesListEffectiveNetworkSecurityGroupsResponse, - NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams, - NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceResponse, - NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams, - NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkInterfaces. */ -export interface NetworkInterfaces { - /** - * Gets information about all network interfaces in a role instance in a cloud service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The name of role instance. - * @param options The options parameters. - */ - listCloudServiceRoleInstanceNetworkInterfaces( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - options?: NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all network interfaces in a cloud service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param options The options parameters. - */ - listCloudServiceNetworkInterfaces( - resourceGroupName: string, - cloudServiceName: string, - options?: NetworkInterfacesListCloudServiceNetworkInterfacesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all network interfaces in a subscription. - * @param options The options parameters. - */ - listAll( - options?: NetworkInterfacesListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all network interfaces in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: NetworkInterfacesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param options The options parameters. - */ - listVirtualMachineScaleSetVMNetworkInterfaces( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - options?: NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all network interfaces in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param options The options parameters. - */ - listVirtualMachineScaleSetNetworkInterfaces( - resourceGroupName: string, - virtualMachineScaleSetName: string, - options?: NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get the specified network interface ip configuration in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - listVirtualMachineScaleSetIpConfigurations( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - options?: NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get the specified network interface in a cloud service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The name of role instance. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - getCloudServiceNetworkInterface( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - networkInterfaceName: string, - options?: NetworkInterfacesGetCloudServiceNetworkInterfaceOptionalParams, - ): Promise; - /** - * Deletes the specified network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesDeleteOptionalParams, - ): Promise; - /** - * Gets information about the specified network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesGetOptionalParams, - ): Promise; - /** - * Creates or updates a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param parameters Parameters supplied to the create or update network interface operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - networkInterfaceName: string, - parameters: NetworkInterface, - options?: NetworkInterfacesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkInterfacesCreateOrUpdateResponse - > - >; - /** - * Creates or updates a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param parameters Parameters supplied to the create or update network interface operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkInterfaceName: string, - parameters: NetworkInterface, - options?: NetworkInterfacesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates a network interface tags. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param parameters Parameters supplied to update network interface tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkInterfaceName: string, - parameters: TagsObject, - options?: NetworkInterfacesUpdateTagsOptionalParams, - ): Promise; - /** - * Gets all route tables applied to a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - beginGetEffectiveRouteTable( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkInterfacesGetEffectiveRouteTableResponse - > - >; - /** - * Gets all route tables applied to a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - beginGetEffectiveRouteTableAndWait( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesGetEffectiveRouteTableOptionalParams, - ): Promise; - /** - * Gets all network security groups applied to a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - beginListEffectiveNetworkSecurityGroups( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkInterfacesListEffectiveNetworkSecurityGroupsResponse - > - >; - /** - * Gets all network security groups applied to a network interface. - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - beginListEffectiveNetworkSecurityGroupsAndWait( - resourceGroupName: string, - networkInterfaceName: string, - options?: NetworkInterfacesListEffectiveNetworkSecurityGroupsOptionalParams, - ): Promise; - /** - * Get the specified network interface in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param options The options parameters. - */ - getVirtualMachineScaleSetNetworkInterface( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - options?: NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceOptionalParams, - ): Promise; - /** - * Get the specified network interface ip configuration in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration. - * @param options The options parameters. - */ - getVirtualMachineScaleSetIpConfiguration( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkManagerCommits.ts b/sdk/network/arm-network/src/operationsInterfaces/networkManagerCommits.ts deleted file mode 100644 index 655df4e84509..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkManagerCommits.ts +++ /dev/null @@ -1,47 +0,0 @@ -// 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 type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkManagerCommit, - NetworkManagerCommitsPostOptionalParams, - NetworkManagerCommitsPostResponse, -} from "../models/index.js"; - -/** Interface representing a NetworkManagerCommits. */ -export interface NetworkManagerCommits { - /** - * Post a Network Manager Commit. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Parameters supplied to specify which Managed Network commit is. - * @param options The options parameters. - */ - beginPost( - resourceGroupName: string, - networkManagerName: string, - parameters: NetworkManagerCommit, - options?: NetworkManagerCommitsPostOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkManagerCommitsPostResponse - > - >; - /** - * Post a Network Manager Commit. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Parameters supplied to specify which Managed Network commit is. - * @param options The options parameters. - */ - beginPostAndWait( - resourceGroupName: string, - networkManagerName: string, - parameters: NetworkManagerCommit, - options?: NetworkManagerCommitsPostOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkManagerDeploymentStatusOperations.ts b/sdk/network/arm-network/src/operationsInterfaces/networkManagerDeploymentStatusOperations.ts deleted file mode 100644 index 9f7fd48f5218..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkManagerDeploymentStatusOperations.ts +++ /dev/null @@ -1,28 +0,0 @@ -// 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 type { - NetworkManagerDeploymentStatusParameter, - NetworkManagerDeploymentStatusListOptionalParams, - NetworkManagerDeploymentStatusListResponse, -} from "../models/index.js"; - -/** Interface representing a NetworkManagerDeploymentStatusOperations. */ -export interface NetworkManagerDeploymentStatusOperations { - /** - * Post to List of Network Manager Deployment Status. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Parameters supplied to specify which Managed Network deployment status is. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - parameters: NetworkManagerDeploymentStatusParameter, - options?: NetworkManagerDeploymentStatusListOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkManagerRoutingConfigurations.ts b/sdk/network/arm-network/src/operationsInterfaces/networkManagerRoutingConfigurations.ts deleted file mode 100644 index 7d97d4f4a1ab..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkManagerRoutingConfigurations.ts +++ /dev/null @@ -1,87 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkManagerRoutingConfiguration, - NetworkManagerRoutingConfigurationsListOptionalParams, - NetworkManagerRoutingConfigurationsGetOptionalParams, - NetworkManagerRoutingConfigurationsGetResponse, - NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams, - NetworkManagerRoutingConfigurationsCreateOrUpdateResponse, - NetworkManagerRoutingConfigurationsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkManagerRoutingConfigurations. */ -export interface NetworkManagerRoutingConfigurations { - /** - * Lists all the network manager routing configurations in a network manager, in a paginated format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkManagerRoutingConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves a network manager routing configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: NetworkManagerRoutingConfigurationsGetOptionalParams, - ): Promise; - /** - * Creates or updates a network manager routing configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param routingConfiguration The routing configuration to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - routingConfiguration: NetworkManagerRoutingConfiguration, - options?: NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a network manager routing configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a network manager routing configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: NetworkManagerRoutingConfigurationsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkManagers.ts b/sdk/network/arm-network/src/operationsInterfaces/networkManagers.ts deleted file mode 100644 index 14f48817c7a8..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkManagers.ts +++ /dev/null @@ -1,101 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkManager, - NetworkManagersListBySubscriptionOptionalParams, - NetworkManagersListOptionalParams, - NetworkManagersGetOptionalParams, - NetworkManagersGetResponse, - NetworkManagersCreateOrUpdateOptionalParams, - NetworkManagersCreateOrUpdateResponse, - NetworkManagersDeleteOptionalParams, - PatchObject, - NetworkManagersPatchOptionalParams, - NetworkManagersPatchResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkManagers. */ -export interface NetworkManagers { - /** - * List all network managers in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: NetworkManagersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List network managers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: NetworkManagersListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified Network Manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkManagersGetOptionalParams, - ): Promise; - /** - * Creates or updates a Network Manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Parameters supplied to specify which network manager is. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - parameters: NetworkManager, - options?: NetworkManagersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkManagersDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - options?: NetworkManagersDeleteOptionalParams, - ): Promise; - /** - * Patch NetworkManager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param parameters Parameters supplied to specify which network manager is. - * @param options The options parameters. - */ - patch( - resourceGroupName: string, - networkManagerName: string, - parameters: PatchObject, - options?: NetworkManagersPatchOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkProfiles.ts b/sdk/network/arm-network/src/operationsInterfaces/networkProfiles.ts deleted file mode 100644 index 6fe92aef10f5..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkProfiles.ts +++ /dev/null @@ -1,101 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkProfile, - NetworkProfilesListAllOptionalParams, - NetworkProfilesListOptionalParams, - NetworkProfilesDeleteOptionalParams, - NetworkProfilesGetOptionalParams, - NetworkProfilesGetResponse, - NetworkProfilesCreateOrUpdateOptionalParams, - NetworkProfilesCreateOrUpdateResponse, - TagsObject, - NetworkProfilesUpdateTagsOptionalParams, - NetworkProfilesUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkProfiles. */ -export interface NetworkProfiles { - /** - * Gets all the network profiles in a subscription. - * @param options The options parameters. - */ - listAll( - options?: NetworkProfilesListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all network profiles in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: NetworkProfilesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified network profile. - * @param resourceGroupName The name of the resource group. - * @param networkProfileName The name of the NetworkProfile. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkProfileName: string, - options?: NetworkProfilesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified network profile. - * @param resourceGroupName The name of the resource group. - * @param networkProfileName The name of the NetworkProfile. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkProfileName: string, - options?: NetworkProfilesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified network profile in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param networkProfileName The name of the public IP prefix. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkProfileName: string, - options?: NetworkProfilesGetOptionalParams, - ): Promise; - /** - * Creates or updates a network profile. - * @param resourceGroupName The name of the resource group. - * @param networkProfileName The name of the network profile. - * @param parameters Parameters supplied to the create or update network profile operation. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkProfileName: string, - parameters: NetworkProfile, - options?: NetworkProfilesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates network profile tags. - * @param resourceGroupName The name of the resource group. - * @param networkProfileName The name of the network profile. - * @param parameters Parameters supplied to update network profile tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkProfileName: string, - parameters: TagsObject, - options?: NetworkProfilesUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityGroups.ts b/sdk/network/arm-network/src/operationsInterfaces/networkSecurityGroups.ts deleted file mode 100644 index 92cf2f3b99e5..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityGroups.ts +++ /dev/null @@ -1,119 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkSecurityGroup, - NetworkSecurityGroupsListAllOptionalParams, - NetworkSecurityGroupsListOptionalParams, - NetworkSecurityGroupsDeleteOptionalParams, - NetworkSecurityGroupsGetOptionalParams, - NetworkSecurityGroupsGetResponse, - NetworkSecurityGroupsCreateOrUpdateOptionalParams, - NetworkSecurityGroupsCreateOrUpdateResponse, - TagsObject, - NetworkSecurityGroupsUpdateTagsOptionalParams, - NetworkSecurityGroupsUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkSecurityGroups. */ -export interface NetworkSecurityGroups { - /** - * Gets all network security groups in a subscription. - * @param options The options parameters. - */ - listAll( - options?: NetworkSecurityGroupsListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all network security groups in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: NetworkSecurityGroupsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: NetworkSecurityGroupsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: NetworkSecurityGroupsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: NetworkSecurityGroupsGetOptionalParams, - ): Promise; - /** - * Creates or updates a network security group in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param parameters Parameters supplied to the create or update network security group operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - networkSecurityGroupName: string, - parameters: NetworkSecurityGroup, - options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkSecurityGroupsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a network security group in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param parameters Parameters supplied to the create or update network security group operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkSecurityGroupName: string, - parameters: NetworkSecurityGroup, - options?: NetworkSecurityGroupsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates a network security group tags. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param parameters Parameters supplied to update network security group tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkSecurityGroupName: string, - parameters: TagsObject, - options?: NetworkSecurityGroupsUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAccessRules.ts b/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAccessRules.ts deleted file mode 100644 index 94fadad01307..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAccessRules.ts +++ /dev/null @@ -1,100 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - NspAccessRule, - NetworkSecurityPerimeterAccessRulesListOptionalParams, - NetworkSecurityPerimeterAccessRulesGetOptionalParams, - NetworkSecurityPerimeterAccessRulesGetResponse, - NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams, - NetworkSecurityPerimeterAccessRulesCreateOrUpdateResponse, - NetworkSecurityPerimeterAccessRulesDeleteOptionalParams, - NetworkSecurityPerimeterAccessRulesReconcileOptionalParams, - NetworkSecurityPerimeterAccessRulesReconcileResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkSecurityPerimeterAccessRules. */ -export interface NetworkSecurityPerimeterAccessRules { - /** - * Lists the NSP access rules in the specified NSP profile. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - options?: NetworkSecurityPerimeterAccessRulesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified NSP access rule by name. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param accessRuleName The name of the NSP access rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - accessRuleName: string, - options?: NetworkSecurityPerimeterAccessRulesGetOptionalParams, - ): Promise; - /** - * Creates or updates a network access rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param accessRuleName The name of the NSP access rule. - * @param parameters Parameters that hold the NspAccessRule resource to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - accessRuleName: string, - parameters: NspAccessRule, - options?: NetworkSecurityPerimeterAccessRulesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes an NSP access rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param accessRuleName The name of the NSP access rule. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - accessRuleName: string, - options?: NetworkSecurityPerimeterAccessRulesDeleteOptionalParams, - ): Promise; - /** - * Reconcile NSP access rules - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param accessRuleName The name of the NSP access rule. - * @param parameters Parameters for NSP access rule reconcile - * @param options The options parameters. - */ - reconcile( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - accessRuleName: string, - parameters: Record, - options?: NetworkSecurityPerimeterAccessRulesReconcileOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAssociableResourceTypes.ts b/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAssociableResourceTypes.ts deleted file mode 100644 index c34a1d616636..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAssociableResourceTypes.ts +++ /dev/null @@ -1,26 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - PerimeterAssociableResource, - NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkSecurityPerimeterAssociableResourceTypes. */ -export interface NetworkSecurityPerimeterAssociableResourceTypes { - /** - * Gets the list of resources that are onboarded with NSP. These resources can be associated with a - * network security perimeter - * @param location The location of network security perimeter. - * @param options The options parameters. - */ - list( - location: string, - options?: NetworkSecurityPerimeterAssociableResourceTypesListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAssociations.ts b/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAssociations.ts deleted file mode 100644 index 2918503a36a3..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterAssociations.ts +++ /dev/null @@ -1,124 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NspAssociation, - NetworkSecurityPerimeterAssociationsListOptionalParams, - NetworkSecurityPerimeterAssociationsGetOptionalParams, - NetworkSecurityPerimeterAssociationsGetResponse, - NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, - NetworkSecurityPerimeterAssociationsCreateOrUpdateResponse, - NetworkSecurityPerimeterAssociationsDeleteOptionalParams, - NetworkSecurityPerimeterAssociationsReconcileOptionalParams, - NetworkSecurityPerimeterAssociationsReconcileResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkSecurityPerimeterAssociations. */ -export interface NetworkSecurityPerimeterAssociations { - /** - * Lists the NSP resource associations. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterAssociationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified NSP association by name. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - options?: NetworkSecurityPerimeterAssociationsGetOptionalParams, - ): Promise; - /** - * Creates or updates a NSP resource association. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param parameters Parameters that hold the NspAssociation resource to be created/updated. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - parameters: NspAssociation, - options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkSecurityPerimeterAssociationsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a NSP resource association. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param parameters Parameters that hold the NspAssociation resource to be created/updated. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - parameters: NspAssociation, - options?: NetworkSecurityPerimeterAssociationsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes an NSP association resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes an NSP association resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - options?: NetworkSecurityPerimeterAssociationsDeleteOptionalParams, - ): Promise; - /** - * Reconcile NSP association - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param associationName The name of the NSP association. - * @param parameters Parameters for NSP association reconcile - * @param options The options parameters. - */ - reconcile( - resourceGroupName: string, - networkSecurityPerimeterName: string, - associationName: string, - parameters: Record, - options?: NetworkSecurityPerimeterAssociationsReconcileOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLinkReferences.ts b/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLinkReferences.ts deleted file mode 100644 index afb9dcdccb3b..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLinkReferences.ts +++ /dev/null @@ -1,70 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NspLinkReference, - NetworkSecurityPerimeterLinkReferencesListOptionalParams, - NetworkSecurityPerimeterLinkReferencesGetOptionalParams, - NetworkSecurityPerimeterLinkReferencesGetResponse, - NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkSecurityPerimeterLinkReferences. */ -export interface NetworkSecurityPerimeterLinkReferences { - /** - * Lists the NSP LinkReference resources in the specified network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLinkReferencesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified NSP linkReference resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkReferenceName The name of the NSP linkReference. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkReferenceName: string, - options?: NetworkSecurityPerimeterLinkReferencesGetOptionalParams, - ): Promise; - /** - * Deletes an NSP LinkReference resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkReferenceName The name of the NSP linkReference. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkReferenceName: string, - options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes an NSP LinkReference resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkReferenceName The name of the NSP linkReference. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkReferenceName: string, - options?: NetworkSecurityPerimeterLinkReferencesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLinks.ts b/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLinks.ts deleted file mode 100644 index 4675d9bdb1c4..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLinks.ts +++ /dev/null @@ -1,87 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NspLink, - NetworkSecurityPerimeterLinksListOptionalParams, - NetworkSecurityPerimeterLinksGetOptionalParams, - NetworkSecurityPerimeterLinksGetResponse, - NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams, - NetworkSecurityPerimeterLinksCreateOrUpdateResponse, - NetworkSecurityPerimeterLinksDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkSecurityPerimeterLinks. */ -export interface NetworkSecurityPerimeterLinks { - /** - * Lists the NSP Link resources in the specified network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLinksListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified NSP link resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkName The name of the NSP link. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkName: string, - options?: NetworkSecurityPerimeterLinksGetOptionalParams, - ): Promise; - /** - * Creates or updates NSP link resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkName The name of the NSP link. - * @param parameters Parameters that hold the NspLink resource to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkName: string, - parameters: NspLink, - options?: NetworkSecurityPerimeterLinksCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes an NSP Link resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkName The name of the NSP link. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkName: string, - options?: NetworkSecurityPerimeterLinksDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes an NSP Link resource. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param linkName The name of the NSP link. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkSecurityPerimeterName: string, - linkName: string, - options?: NetworkSecurityPerimeterLinksDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLoggingConfigurations.ts b/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLoggingConfigurations.ts deleted file mode 100644 index 7615ff275811..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterLoggingConfigurations.ts +++ /dev/null @@ -1,76 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - NspLoggingConfiguration, - NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, - NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams, - NetworkSecurityPerimeterLoggingConfigurationsGetResponse, - NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams, - NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateResponse, - NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkSecurityPerimeterLoggingConfigurations. */ -export interface NetworkSecurityPerimeterLoggingConfigurations { - /** - * Lists the NSP logging configuration. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterLoggingConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the NSP logging configuration. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param loggingConfigurationName The name of the NSP logging configuration. Accepts 'instance' as - * name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - loggingConfigurationName: string, - options?: NetworkSecurityPerimeterLoggingConfigurationsGetOptionalParams, - ): Promise; - /** - * Creates or updates NSP logging configuration. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param loggingConfigurationName The name of the NSP logging configuration. Accepts 'instance' as - * name. - * @param parameters Parameters that hold the NspLoggingConfiguration to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - loggingConfigurationName: string, - parameters: NspLoggingConfiguration, - options?: NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes an NSP Logging configuration. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param loggingConfigurationName The name of the NSP logging configuration. Accepts 'instance' as - * name. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - loggingConfigurationName: string, - options?: NetworkSecurityPerimeterLoggingConfigurationsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterOperationStatuses.ts b/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterOperationStatuses.ts deleted file mode 100644 index f18566f9576c..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterOperationStatuses.ts +++ /dev/null @@ -1,25 +0,0 @@ -// 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 type { - NetworkSecurityPerimeterOperationStatusesGetOptionalParams, - NetworkSecurityPerimeterOperationStatusesGetResponse, -} from "../models/index.js"; - -/** Interface representing a NetworkSecurityPerimeterOperationStatuses. */ -export interface NetworkSecurityPerimeterOperationStatuses { - /** - * Gets the operation status for the given operation id. - * @param location The location of network security perimeter. - * @param operationId The operation id of the async operation. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: NetworkSecurityPerimeterOperationStatusesGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterProfiles.ts b/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterProfiles.ts deleted file mode 100644 index fa643faaf46d..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterProfiles.ts +++ /dev/null @@ -1,73 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - NspProfile, - NetworkSecurityPerimeterProfilesListOptionalParams, - NetworkSecurityPerimeterProfilesGetOptionalParams, - NetworkSecurityPerimeterProfilesGetResponse, - NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams, - NetworkSecurityPerimeterProfilesCreateOrUpdateResponse, - NetworkSecurityPerimeterProfilesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkSecurityPerimeterProfiles. */ -export interface NetworkSecurityPerimeterProfiles { - /** - * Lists the NSP profiles in the specified network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimeterProfilesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified NSP profile. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - options?: NetworkSecurityPerimeterProfilesGetOptionalParams, - ): Promise; - /** - * Creates or updates a network profile. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param parameters Parameters that hold the NspProfile resource to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - parameters: NspProfile, - options?: NetworkSecurityPerimeterProfilesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes an NSP profile. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param profileName The name of the NSP profile. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - profileName: string, - options?: NetworkSecurityPerimeterProfilesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterServiceTags.ts b/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterServiceTags.ts deleted file mode 100644 index c5bc6c8f47e4..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeterServiceTags.ts +++ /dev/null @@ -1,26 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - NspServiceTagsResource, - NetworkSecurityPerimeterServiceTagsListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkSecurityPerimeterServiceTags. */ -export interface NetworkSecurityPerimeterServiceTags { - /** - * Gets the list of service tags supported by NSP. These service tags can be used to create access - * rules in NSP. - * @param location The location of network security perimeter. - * @param options The options parameters. - */ - list( - location: string, - options?: NetworkSecurityPerimeterServiceTagsListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeters.ts b/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeters.ts deleted file mode 100644 index 65f0c233311f..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkSecurityPerimeters.ts +++ /dev/null @@ -1,101 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkSecurityPerimeter, - NetworkSecurityPerimetersListBySubscriptionOptionalParams, - NetworkSecurityPerimetersListOptionalParams, - NetworkSecurityPerimetersGetOptionalParams, - NetworkSecurityPerimetersGetResponse, - NetworkSecurityPerimetersCreateOrUpdateOptionalParams, - NetworkSecurityPerimetersCreateOrUpdateResponse, - NetworkSecurityPerimetersDeleteOptionalParams, - UpdateTagsRequest, - NetworkSecurityPerimetersPatchOptionalParams, - NetworkSecurityPerimetersPatchResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkSecurityPerimeters. */ -export interface NetworkSecurityPerimeters { - /** - * List all network security perimeters in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: NetworkSecurityPerimetersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List network security perimeters in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: NetworkSecurityPerimetersListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified network security perimeter by the name. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimetersGetOptionalParams, - ): Promise; - /** - * Creates or updates a Network Security Perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param parameters Parameter supplied to create or update the network security perimeter. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkSecurityPerimeterName: string, - parameters: NetworkSecurityPerimeter, - options?: NetworkSecurityPerimetersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimetersDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a network security perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkSecurityPerimeterName: string, - options?: NetworkSecurityPerimetersDeleteOptionalParams, - ): Promise; - /** - * Patch Tags for a Network Security Perimeter. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityPerimeterName The name of the network security perimeter. - * @param parameters Parameter supplied to the network security perimeter. - * @param options The options parameters. - */ - patch( - resourceGroupName: string, - networkSecurityPerimeterName: string, - parameters: UpdateTagsRequest, - options?: NetworkSecurityPerimetersPatchOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkVirtualApplianceConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/networkVirtualApplianceConnections.ts deleted file mode 100644 index 30998f3e696e..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkVirtualApplianceConnections.ts +++ /dev/null @@ -1,111 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkVirtualApplianceConnection, - NetworkVirtualApplianceConnectionsListOptionalParams, - NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, - NetworkVirtualApplianceConnectionsCreateOrUpdateResponse, - NetworkVirtualApplianceConnectionsGetOptionalParams, - NetworkVirtualApplianceConnectionsGetResponse, - NetworkVirtualApplianceConnectionsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkVirtualApplianceConnections. */ -export interface NetworkVirtualApplianceConnections { - /** - * Lists NetworkVirtualApplianceConnections under the NVA. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualApplianceConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA - * connection' - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param connectionName The name of the NVA connection. - * @param networkVirtualApplianceConnectionParameters Parameters supplied in an - * NetworkVirtualApplianceConnection PUT operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - networkVirtualApplianceName: string, - connectionName: string, - networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, - options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkVirtualApplianceConnectionsCreateOrUpdateResponse - > - >; - /** - * Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA - * connection' - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param connectionName The name of the NVA connection. - * @param networkVirtualApplianceConnectionParameters Parameters supplied in an - * NetworkVirtualApplianceConnection PUT operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - connectionName: string, - networkVirtualApplianceConnectionParameters: NetworkVirtualApplianceConnection, - options?: NetworkVirtualApplianceConnectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Retrieves the details of specified NVA connection. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param connectionName The name of the NVA connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkVirtualApplianceName: string, - connectionName: string, - options?: NetworkVirtualApplianceConnectionsGetOptionalParams, - ): Promise; - /** - * Deletes a NVA connection. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param connectionName The name of the NVA connection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkVirtualApplianceName: string, - connectionName: string, - options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a NVA connection. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param connectionName The name of the NVA connection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - connectionName: string, - options?: NetworkVirtualApplianceConnectionsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkVirtualAppliances.ts b/sdk/network/arm-network/src/operationsInterfaces/networkVirtualAppliances.ts deleted file mode 100644 index bc5d97165ed8..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkVirtualAppliances.ts +++ /dev/null @@ -1,213 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkVirtualAppliance, - NetworkVirtualAppliancesListByResourceGroupOptionalParams, - NetworkVirtualAppliancesListOptionalParams, - NetworkVirtualAppliancesDeleteOptionalParams, - NetworkVirtualAppliancesGetOptionalParams, - NetworkVirtualAppliancesGetResponse, - TagsObject, - NetworkVirtualAppliancesUpdateTagsOptionalParams, - NetworkVirtualAppliancesUpdateTagsResponse, - NetworkVirtualAppliancesCreateOrUpdateOptionalParams, - NetworkVirtualAppliancesCreateOrUpdateResponse, - NetworkVirtualAppliancesRestartOptionalParams, - NetworkVirtualAppliancesRestartResponse, - NetworkVirtualAppliancesReimageOptionalParams, - NetworkVirtualAppliancesReimageResponse, - NetworkVirtualApplianceBootDiagnosticParameters, - NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, - NetworkVirtualAppliancesGetBootDiagnosticLogsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkVirtualAppliances. */ -export interface NetworkVirtualAppliances { - /** - * Lists all Network Virtual Appliances in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: NetworkVirtualAppliancesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all Network Virtual Appliances in a subscription. - * @param options The options parameters. - */ - list( - options?: NetworkVirtualAppliancesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesGetOptionalParams, - ): Promise; - /** - * Updates a Network Virtual Appliance. - * @param resourceGroupName The resource group name of Network Virtual Appliance. - * @param networkVirtualApplianceName The name of Network Virtual Appliance being updated. - * @param parameters Parameters supplied to Update Network Virtual Appliance Tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkVirtualApplianceName: string, - parameters: TagsObject, - options?: NetworkVirtualAppliancesUpdateTagsOptionalParams, - ): Promise; - /** - * Creates or updates the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - networkVirtualApplianceName: string, - parameters: NetworkVirtualAppliance, - options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkVirtualAppliancesCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - parameters: NetworkVirtualAppliance, - options?: NetworkVirtualAppliancesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - beginRestart( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesRestartOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkVirtualAppliancesRestartResponse - > - >; - /** - * Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - beginRestartAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesRestartOptionalParams, - ): Promise; - /** - * Reimages one VM belonging to the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - beginReimage( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesReimageOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkVirtualAppliancesReimageResponse - > - >; - /** - * Reimages one VM belonging to the specified Network Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param options The options parameters. - */ - beginReimageAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: NetworkVirtualAppliancesReimageOptionalParams, - ): Promise; - /** - * Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual - * Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param request Parameters supplied to retrieve boot diagnostic logs for a NVA VM instance - * @param options The options parameters. - */ - beginGetBootDiagnosticLogs( - resourceGroupName: string, - networkVirtualApplianceName: string, - request: NetworkVirtualApplianceBootDiagnosticParameters, - options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkVirtualAppliancesGetBootDiagnosticLogsResponse - > - >; - /** - * Retrieves the boot diagnostic logs for a VM instance belonging to the specified Network Virtual - * Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of Network Virtual Appliance. - * @param request Parameters supplied to retrieve boot diagnostic logs for a NVA VM instance - * @param options The options parameters. - */ - beginGetBootDiagnosticLogsAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - request: NetworkVirtualApplianceBootDiagnosticParameters, - options?: NetworkVirtualAppliancesGetBootDiagnosticLogsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/networkWatchers.ts b/sdk/network/arm-network/src/operationsInterfaces/networkWatchers.ts deleted file mode 100644 index 32c56e3f0001..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/networkWatchers.ts +++ /dev/null @@ -1,507 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - NetworkWatcher, - NetworkWatchersListOptionalParams, - NetworkWatchersListAllOptionalParams, - NetworkWatchersCreateOrUpdateOptionalParams, - NetworkWatchersCreateOrUpdateResponse, - NetworkWatchersGetOptionalParams, - NetworkWatchersGetResponse, - NetworkWatchersDeleteOptionalParams, - TagsObject, - NetworkWatchersUpdateTagsOptionalParams, - NetworkWatchersUpdateTagsResponse, - TopologyParameters, - NetworkWatchersGetTopologyOptionalParams, - NetworkWatchersGetTopologyResponse, - VerificationIPFlowParameters, - NetworkWatchersVerifyIPFlowOptionalParams, - NetworkWatchersVerifyIPFlowResponse, - NextHopParameters, - NetworkWatchersGetNextHopOptionalParams, - NetworkWatchersGetNextHopResponse, - SecurityGroupViewParameters, - NetworkWatchersGetVMSecurityRulesOptionalParams, - NetworkWatchersGetVMSecurityRulesResponse, - TroubleshootingParameters, - NetworkWatchersGetTroubleshootingOptionalParams, - NetworkWatchersGetTroubleshootingResponse, - QueryTroubleshootingParameters, - NetworkWatchersGetTroubleshootingResultOptionalParams, - NetworkWatchersGetTroubleshootingResultResponse, - FlowLogInformation, - NetworkWatchersSetFlowLogConfigurationOptionalParams, - NetworkWatchersSetFlowLogConfigurationResponse, - FlowLogStatusParameters, - NetworkWatchersGetFlowLogStatusOptionalParams, - NetworkWatchersGetFlowLogStatusResponse, - ConnectivityParameters, - NetworkWatchersCheckConnectivityOptionalParams, - NetworkWatchersCheckConnectivityResponse, - AzureReachabilityReportParameters, - NetworkWatchersGetAzureReachabilityReportOptionalParams, - NetworkWatchersGetAzureReachabilityReportResponse, - AvailableProvidersListParameters, - NetworkWatchersListAvailableProvidersOptionalParams, - NetworkWatchersListAvailableProvidersResponse, - NetworkConfigurationDiagnosticParameters, - NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, - NetworkWatchersGetNetworkConfigurationDiagnosticResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NetworkWatchers. */ -export interface NetworkWatchers { - /** - * Gets all network watchers by resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: NetworkWatchersListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all network watchers by subscription. - * @param options The options parameters. - */ - listAll( - options?: NetworkWatchersListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates or updates a network watcher in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the network watcher resource. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkWatcherName: string, - parameters: NetworkWatcher, - options?: NetworkWatchersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Gets the specified network watcher by resource group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkWatcherName: string, - options?: NetworkWatchersGetOptionalParams, - ): Promise; - /** - * Deletes the specified network watcher resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkWatcherName: string, - options?: NetworkWatchersDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified network watcher resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkWatcherName: string, - options?: NetworkWatchersDeleteOptionalParams, - ): Promise; - /** - * Updates a network watcher tags. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters supplied to update network watcher tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - networkWatcherName: string, - parameters: TagsObject, - options?: NetworkWatchersUpdateTagsOptionalParams, - ): Promise; - /** - * Gets the current network topology by resource group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the representation of topology. - * @param options The options parameters. - */ - getTopology( - resourceGroupName: string, - networkWatcherName: string, - parameters: TopologyParameters, - options?: NetworkWatchersGetTopologyOptionalParams, - ): Promise; - /** - * Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the IP flow to be verified. - * @param options The options parameters. - */ - beginVerifyIPFlow( - resourceGroupName: string, - networkWatcherName: string, - parameters: VerificationIPFlowParameters, - options?: NetworkWatchersVerifyIPFlowOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersVerifyIPFlowResponse - > - >; - /** - * Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the IP flow to be verified. - * @param options The options parameters. - */ - beginVerifyIPFlowAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: VerificationIPFlowParameters, - options?: NetworkWatchersVerifyIPFlowOptionalParams, - ): Promise; - /** - * Gets the next hop from the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the source and destination endpoint. - * @param options The options parameters. - */ - beginGetNextHop( - resourceGroupName: string, - networkWatcherName: string, - parameters: NextHopParameters, - options?: NetworkWatchersGetNextHopOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetNextHopResponse - > - >; - /** - * Gets the next hop from the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the source and destination endpoint. - * @param options The options parameters. - */ - beginGetNextHopAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: NextHopParameters, - options?: NetworkWatchersGetNextHopOptionalParams, - ): Promise; - /** - * Gets the configured and effective security group rules on the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the VM to check security groups for. - * @param options The options parameters. - */ - beginGetVMSecurityRules( - resourceGroupName: string, - networkWatcherName: string, - parameters: SecurityGroupViewParameters, - options?: NetworkWatchersGetVMSecurityRulesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetVMSecurityRulesResponse - > - >; - /** - * Gets the configured and effective security group rules on the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the VM to check security groups for. - * @param options The options parameters. - */ - beginGetVMSecurityRulesAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: SecurityGroupViewParameters, - options?: NetworkWatchersGetVMSecurityRulesOptionalParams, - ): Promise; - /** - * Initiate troubleshooting on a specified resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the resource to troubleshoot. - * @param options The options parameters. - */ - beginGetTroubleshooting( - resourceGroupName: string, - networkWatcherName: string, - parameters: TroubleshootingParameters, - options?: NetworkWatchersGetTroubleshootingOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetTroubleshootingResponse - > - >; - /** - * Initiate troubleshooting on a specified resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the resource to troubleshoot. - * @param options The options parameters. - */ - beginGetTroubleshootingAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: TroubleshootingParameters, - options?: NetworkWatchersGetTroubleshootingOptionalParams, - ): Promise; - /** - * Get the last completed troubleshooting result on a specified resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the resource to query the troubleshooting result. - * @param options The options parameters. - */ - beginGetTroubleshootingResult( - resourceGroupName: string, - networkWatcherName: string, - parameters: QueryTroubleshootingParameters, - options?: NetworkWatchersGetTroubleshootingResultOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetTroubleshootingResultResponse - > - >; - /** - * Get the last completed troubleshooting result on a specified resource. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the resource to query the troubleshooting result. - * @param options The options parameters. - */ - beginGetTroubleshootingResultAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: QueryTroubleshootingParameters, - options?: NetworkWatchersGetTroubleshootingResultOptionalParams, - ): Promise; - /** - * Configures flow log and traffic analytics (optional) on a specified resource. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the configuration of flow log. - * @param options The options parameters. - */ - beginSetFlowLogConfiguration( - resourceGroupName: string, - networkWatcherName: string, - parameters: FlowLogInformation, - options?: NetworkWatchersSetFlowLogConfigurationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersSetFlowLogConfigurationResponse - > - >; - /** - * Configures flow log and traffic analytics (optional) on a specified resource. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define the configuration of flow log. - * @param options The options parameters. - */ - beginSetFlowLogConfigurationAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: FlowLogInformation, - options?: NetworkWatchersSetFlowLogConfigurationOptionalParams, - ): Promise; - /** - * Queries status of flow log and traffic analytics (optional) on a specified resource. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define a resource to query flow log and traffic analytics - * (optional) status. - * @param options The options parameters. - */ - beginGetFlowLogStatus( - resourceGroupName: string, - networkWatcherName: string, - parameters: FlowLogStatusParameters, - options?: NetworkWatchersGetFlowLogStatusOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetFlowLogStatusResponse - > - >; - /** - * Queries status of flow log and traffic analytics (optional) on a specified resource. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that define a resource to query flow log and traffic analytics - * (optional) status. - * @param options The options parameters. - */ - beginGetFlowLogStatusAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: FlowLogStatusParameters, - options?: NetworkWatchersGetFlowLogStatusOptionalParams, - ): Promise; - /** - * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given - * endpoint including another VM or an arbitrary remote server. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that determine how the connectivity check will be performed. - * @param options The options parameters. - */ - beginCheckConnectivity( - resourceGroupName: string, - networkWatcherName: string, - parameters: ConnectivityParameters, - options?: NetworkWatchersCheckConnectivityOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersCheckConnectivityResponse - > - >; - /** - * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given - * endpoint including another VM or an arbitrary remote server. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that determine how the connectivity check will be performed. - * @param options The options parameters. - */ - beginCheckConnectivityAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: ConnectivityParameters, - options?: NetworkWatchersCheckConnectivityOptionalParams, - ): Promise; - /** - * NOTE: This feature is currently in preview and still being tested for stability. Gets the relative - * latency score for internet service providers from a specified location to Azure regions. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that determine Azure reachability report configuration. - * @param options The options parameters. - */ - beginGetAzureReachabilityReport( - resourceGroupName: string, - networkWatcherName: string, - parameters: AzureReachabilityReportParameters, - options?: NetworkWatchersGetAzureReachabilityReportOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetAzureReachabilityReportResponse - > - >; - /** - * NOTE: This feature is currently in preview and still being tested for stability. Gets the relative - * latency score for internet service providers from a specified location to Azure regions. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that determine Azure reachability report configuration. - * @param options The options parameters. - */ - beginGetAzureReachabilityReportAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: AzureReachabilityReportParameters, - options?: NetworkWatchersGetAzureReachabilityReportOptionalParams, - ): Promise; - /** - * NOTE: This feature is currently in preview and still being tested for stability. Lists all available - * internet service providers for a specified Azure region. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that scope the list of available providers. - * @param options The options parameters. - */ - beginListAvailableProviders( - resourceGroupName: string, - networkWatcherName: string, - parameters: AvailableProvidersListParameters, - options?: NetworkWatchersListAvailableProvidersOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersListAvailableProvidersResponse - > - >; - /** - * NOTE: This feature is currently in preview and still being tested for stability. Lists all available - * internet service providers for a specified Azure region. - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that scope the list of available providers. - * @param options The options parameters. - */ - beginListAvailableProvidersAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: AvailableProvidersListParameters, - options?: NetworkWatchersListAvailableProvidersOptionalParams, - ): Promise; - /** - * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. - * It provides detailed information on what security rules were applied to a specified traffic flow and - * the result of evaluating these rules. Customers must provide details of a flow like source, - * destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules - * evaluated for the specified flow and the evaluation results. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters to get network configuration diagnostic. - * @param options The options parameters. - */ - beginGetNetworkConfigurationDiagnostic( - resourceGroupName: string, - networkWatcherName: string, - parameters: NetworkConfigurationDiagnosticParameters, - options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NetworkWatchersGetNetworkConfigurationDiagnosticResponse - > - >; - /** - * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. - * It provides detailed information on what security rules were applied to a specified traffic flow and - * the result of evaluating these rules. Customers must provide details of a flow like source, - * destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules - * evaluated for the specified flow and the evaluation results. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters to get network configuration diagnostic. - * @param options The options parameters. - */ - beginGetNetworkConfigurationDiagnosticAndWait( - resourceGroupName: string, - networkWatcherName: string, - parameters: NetworkConfigurationDiagnosticParameters, - options?: NetworkWatchersGetNetworkConfigurationDiagnosticOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/operations.ts b/sdk/network/arm-network/src/operationsInterfaces/operations.ts deleted file mode 100644 index 2105353ebed3..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/operations.ts +++ /dev/null @@ -1,18 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { Operation, OperationsListOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a Operations. */ -export interface Operations { - /** - * Lists all of the available Network Rest API operations. - * @param options The options parameters. - */ - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/p2SVpnGateways.ts b/sdk/network/arm-network/src/operationsInterfaces/p2SVpnGateways.ts deleted file mode 100644 index 514ed3bb68ab..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/p2SVpnGateways.ts +++ /dev/null @@ -1,292 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - P2SVpnGateway, - P2SVpnGatewaysListByResourceGroupOptionalParams, - P2SVpnGatewaysListOptionalParams, - P2SVpnGatewaysGetOptionalParams, - P2SVpnGatewaysGetResponse, - P2SVpnGatewaysCreateOrUpdateOptionalParams, - P2SVpnGatewaysCreateOrUpdateResponse, - TagsObject, - P2SVpnGatewaysUpdateTagsOptionalParams, - P2SVpnGatewaysUpdateTagsResponse, - P2SVpnGatewaysDeleteOptionalParams, - P2SVpnGatewaysResetOptionalParams, - P2SVpnGatewaysResetResponse, - P2SVpnProfileParameters, - P2SVpnGatewaysGenerateVpnProfileOptionalParams, - P2SVpnGatewaysGenerateVpnProfileResponse, - P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, - P2SVpnGatewaysGetP2SVpnConnectionHealthResponse, - P2SVpnConnectionHealthRequest, - P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, - P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedResponse, - P2SVpnConnectionRequest, - P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a P2SVpnGateways. */ -export interface P2SVpnGateways { - /** - * Lists all the P2SVpnGateways in a resource group. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: P2SVpnGatewaysListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists all the P2SVpnGateways in a subscription. - * @param options The options parameters. - */ - list(options?: P2SVpnGatewaysListOptionalParams): PagedAsyncIterableIterator; - /** - * Retrieves the details of a virtual wan p2s vpn gateway. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysGetOptionalParams, - ): Promise; - /** - * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn - * gateway. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - p2SVpnGatewayParameters: P2SVpnGateway, - options?: P2SVpnGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - P2SVpnGatewaysCreateOrUpdateResponse - > - >; - /** - * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn - * gateway. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - p2SVpnGatewayParameters: P2SVpnGateway, - options?: P2SVpnGatewaysCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates virtual wan p2s vpn gateway tags. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param p2SVpnGatewayParameters Parameters supplied to update a virtual wan p2s vpn gateway tags. - * @param options The options parameters. - */ - beginUpdateTags( - resourceGroupName: string, - gatewayName: string, - p2SVpnGatewayParameters: TagsObject, - options?: P2SVpnGatewaysUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - P2SVpnGatewaysUpdateTagsResponse - > - >; - /** - * Updates virtual wan p2s vpn gateway tags. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param p2SVpnGatewayParameters Parameters supplied to update a virtual wan p2s vpn gateway tags. - * @param options The options parameters. - */ - beginUpdateTagsAndWait( - resourceGroupName: string, - gatewayName: string, - p2SVpnGatewayParameters: TagsObject, - options?: P2SVpnGatewaysUpdateTagsOptionalParams, - ): Promise; - /** - * Deletes a virtual wan p2s vpn gateway. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a virtual wan p2s vpn gateway. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysDeleteOptionalParams, - ): Promise; - /** - * Resets the primary of the p2s vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginReset( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysResetOptionalParams, - ): Promise< - SimplePollerLike, P2SVpnGatewaysResetResponse> - >; - /** - * Resets the primary of the p2s vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the P2SVpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginResetAndWait( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysResetOptionalParams, - ): Promise; - /** - * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param parameters Parameters supplied to the generate P2SVpnGateway VPN client package operation. - * @param options The options parameters. - */ - beginGenerateVpnProfile( - resourceGroupName: string, - gatewayName: string, - parameters: P2SVpnProfileParameters, - options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - P2SVpnGatewaysGenerateVpnProfileResponse - > - >; - /** - * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param parameters Parameters supplied to the generate P2SVpnGateway VPN client package operation. - * @param options The options parameters. - */ - beginGenerateVpnProfileAndWait( - resourceGroupName: string, - gatewayName: string, - parameters: P2SVpnProfileParameters, - options?: P2SVpnGatewaysGenerateVpnProfileOptionalParams, - ): Promise; - /** - * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param options The options parameters. - */ - beginGetP2SVpnConnectionHealth( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - P2SVpnGatewaysGetP2SVpnConnectionHealthResponse - > - >; - /** - * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param options The options parameters. - */ - beginGetP2SVpnConnectionHealthAndWait( - resourceGroupName: string, - gatewayName: string, - options?: P2SVpnGatewaysGetP2SVpnConnectionHealthOptionalParams, - ): Promise; - /** - * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway - * in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param request Request parameters supplied to get p2s vpn connections detailed health. - * @param options The options parameters. - */ - beginGetP2SVpnConnectionHealthDetailed( - resourceGroupName: string, - gatewayName: string, - request: P2SVpnConnectionHealthRequest, - options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedResponse - > - >; - /** - * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway - * in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the P2SVpnGateway. - * @param request Request parameters supplied to get p2s vpn connections detailed health. - * @param options The options parameters. - */ - beginGetP2SVpnConnectionHealthDetailedAndWait( - resourceGroupName: string, - gatewayName: string, - request: P2SVpnConnectionHealthRequest, - options?: P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedOptionalParams, - ): Promise; - /** - * Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param p2SVpnGatewayName The name of the P2S Vpn Gateway. - * @param request The parameters are supplied to disconnect p2s vpn connections. - * @param options The options parameters. - */ - beginDisconnectP2SVpnConnections( - resourceGroupName: string, - p2SVpnGatewayName: string, - request: P2SVpnConnectionRequest, - options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, - ): Promise, void>>; - /** - * Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param p2SVpnGatewayName The name of the P2S Vpn Gateway. - * @param request The parameters are supplied to disconnect p2s vpn connections. - * @param options The options parameters. - */ - beginDisconnectP2SVpnConnectionsAndWait( - resourceGroupName: string, - p2SVpnGatewayName: string, - request: P2SVpnConnectionRequest, - options?: P2SVpnGatewaysDisconnectP2SVpnConnectionsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/packetCaptures.ts b/sdk/network/arm-network/src/operationsInterfaces/packetCaptures.ts deleted file mode 100644 index 72758bb4d31b..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/packetCaptures.ts +++ /dev/null @@ -1,165 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - PacketCaptureResult, - PacketCapturesListOptionalParams, - PacketCapture, - PacketCapturesCreateOptionalParams, - PacketCapturesCreateResponse, - PacketCapturesGetOptionalParams, - PacketCapturesGetResponse, - PacketCapturesDeleteOptionalParams, - PacketCapturesStopOptionalParams, - PacketCapturesGetStatusOptionalParams, - PacketCapturesGetStatusResponse, -} from "../models/index.js"; - -/// -/** Interface representing a PacketCaptures. */ -export interface PacketCaptures { - /** - * Lists all packet capture sessions within the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the Network Watcher resource. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkWatcherName: string, - options?: PacketCapturesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Create and start a packet capture on the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param parameters Parameters that define the create packet capture operation. - * @param options The options parameters. - */ - beginCreate( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - parameters: PacketCapture, - options?: PacketCapturesCreateOptionalParams, - ): Promise< - SimplePollerLike, PacketCapturesCreateResponse> - >; - /** - * Create and start a packet capture on the specified VM. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param parameters Parameters that define the create packet capture operation. - * @param options The options parameters. - */ - beginCreateAndWait( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - parameters: PacketCapture, - options?: PacketCapturesCreateOptionalParams, - ): Promise; - /** - * Gets a packet capture session by name. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesGetOptionalParams, - ): Promise; - /** - * Deletes the specified packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesDeleteOptionalParams, - ): Promise; - /** - * Stops a specified packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param options The options parameters. - */ - beginStop( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesStopOptionalParams, - ): Promise, void>>; - /** - * Stops a specified packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param packetCaptureName The name of the packet capture session. - * @param options The options parameters. - */ - beginStopAndWait( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesStopOptionalParams, - ): Promise; - /** - * Query the status of a running packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the Network Watcher resource. - * @param packetCaptureName The name given to the packet capture session. - * @param options The options parameters. - */ - beginGetStatus( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesGetStatusOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PacketCapturesGetStatusResponse - > - >; - /** - * Query the status of a running packet capture session. - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the Network Watcher resource. - * @param packetCaptureName The name given to the packet capture session. - * @param options The options parameters. - */ - beginGetStatusAndWait( - resourceGroupName: string, - networkWatcherName: string, - packetCaptureName: string, - options?: PacketCapturesGetStatusOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/peerExpressRouteCircuitConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/peerExpressRouteCircuitConnections.ts deleted file mode 100644 index d56c4fef5827..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/peerExpressRouteCircuitConnections.ts +++ /dev/null @@ -1,47 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - PeerExpressRouteCircuitConnection, - PeerExpressRouteCircuitConnectionsListOptionalParams, - PeerExpressRouteCircuitConnectionsGetOptionalParams, - PeerExpressRouteCircuitConnectionsGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a PeerExpressRouteCircuitConnections. */ -export interface PeerExpressRouteCircuitConnections { - /** - * Gets all global reach peer connections associated with a private peering in an express route - * circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - circuitName: string, - peeringName: string, - options?: PeerExpressRouteCircuitConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the peer express route circuit connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - circuitName: string, - peeringName: string, - connectionName: string, - options?: PeerExpressRouteCircuitConnectionsGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/privateDnsZoneGroups.ts b/sdk/network/arm-network/src/operationsInterfaces/privateDnsZoneGroups.ts deleted file mode 100644 index f4c79d8b3707..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/privateDnsZoneGroups.ts +++ /dev/null @@ -1,107 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - PrivateDnsZoneGroup, - PrivateDnsZoneGroupsListOptionalParams, - PrivateDnsZoneGroupsDeleteOptionalParams, - PrivateDnsZoneGroupsGetOptionalParams, - PrivateDnsZoneGroupsGetResponse, - PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, - PrivateDnsZoneGroupsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a PrivateDnsZoneGroups. */ -export interface PrivateDnsZoneGroups { - /** - * Gets all private dns zone groups in a private endpoint. - * @param privateEndpointName The name of the private endpoint. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - privateEndpointName: string, - resourceGroupName: string, - options?: PrivateDnsZoneGroupsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified private dns zone group. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param privateDnsZoneGroupName The name of the private dns zone group. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateEndpointName: string, - privateDnsZoneGroupName: string, - options?: PrivateDnsZoneGroupsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified private dns zone group. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param privateDnsZoneGroupName The name of the private dns zone group. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateEndpointName: string, - privateDnsZoneGroupName: string, - options?: PrivateDnsZoneGroupsDeleteOptionalParams, - ): Promise; - /** - * Gets the private dns zone group resource by specified private dns zone group name. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param privateDnsZoneGroupName The name of the private dns zone group. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateEndpointName: string, - privateDnsZoneGroupName: string, - options?: PrivateDnsZoneGroupsGetOptionalParams, - ): Promise; - /** - * Creates or updates a private dns zone group in the specified private endpoint. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param privateDnsZoneGroupName The name of the private dns zone group. - * @param parameters Parameters supplied to the create or update private dns zone group operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateEndpointName: string, - privateDnsZoneGroupName: string, - parameters: PrivateDnsZoneGroup, - options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateDnsZoneGroupsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a private dns zone group in the specified private endpoint. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param privateDnsZoneGroupName The name of the private dns zone group. - * @param parameters Parameters supplied to the create or update private dns zone group operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateEndpointName: string, - privateDnsZoneGroupName: string, - parameters: PrivateDnsZoneGroup, - options?: PrivateDnsZoneGroupsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/privateEndpoints.ts b/sdk/network/arm-network/src/operationsInterfaces/privateEndpoints.ts deleted file mode 100644 index 7046c00ad1b3..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/privateEndpoints.ts +++ /dev/null @@ -1,103 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - PrivateEndpoint, - PrivateEndpointsListOptionalParams, - PrivateEndpointsListBySubscriptionOptionalParams, - PrivateEndpointsDeleteOptionalParams, - PrivateEndpointsGetOptionalParams, - PrivateEndpointsGetResponse, - PrivateEndpointsCreateOrUpdateOptionalParams, - PrivateEndpointsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a PrivateEndpoints. */ -export interface PrivateEndpoints { - /** - * Gets all private endpoints in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: PrivateEndpointsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all private endpoints in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: PrivateEndpointsListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified private endpoint. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateEndpointName: string, - options?: PrivateEndpointsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified private endpoint. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateEndpointName: string, - options?: PrivateEndpointsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified private endpoint by resource group. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateEndpointName: string, - options?: PrivateEndpointsGetOptionalParams, - ): Promise; - /** - * Creates or updates an private endpoint in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateEndpointName: string, - parameters: PrivateEndpoint, - options?: PrivateEndpointsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateEndpointsCreateOrUpdateResponse - > - >; - /** - * Creates or updates an private endpoint in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateEndpointName: string, - parameters: PrivateEndpoint, - options?: PrivateEndpointsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/privateLinkServices.ts b/sdk/network/arm-network/src/operationsInterfaces/privateLinkServices.ts deleted file mode 100644 index 23663cc04cd7..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/privateLinkServices.ts +++ /dev/null @@ -1,264 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - PrivateLinkService, - PrivateLinkServicesListOptionalParams, - PrivateLinkServicesListBySubscriptionOptionalParams, - PrivateEndpointConnection, - PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, - AutoApprovedPrivateLinkService, - PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, - PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, - PrivateLinkServicesDeleteOptionalParams, - PrivateLinkServicesGetOptionalParams, - PrivateLinkServicesGetResponse, - PrivateLinkServicesCreateOrUpdateOptionalParams, - PrivateLinkServicesCreateOrUpdateResponse, - PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams, - PrivateLinkServicesGetPrivateEndpointConnectionResponse, - PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams, - PrivateLinkServicesUpdatePrivateEndpointConnectionResponse, - PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, - CheckPrivateLinkServiceVisibilityRequest, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityResponse, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupResponse, -} from "../models/index.js"; - -/// -/** Interface representing a PrivateLinkServices. */ -export interface PrivateLinkServices { - /** - * Gets all private link services in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: PrivateLinkServicesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all private link service in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: PrivateLinkServicesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all private end point connections for a specific private link service. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param options The options parameters. - */ - listPrivateEndpointConnections( - resourceGroupName: string, - serviceName: string, - options?: PrivateLinkServicesListPrivateEndpointConnectionsOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Returns all of the private link service ids that can be linked to a Private Endpoint with auto - * approved in this subscription in this region. - * @param location The location of the domain name. - * @param options The options parameters. - */ - listAutoApprovedPrivateLinkServices( - location: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Returns all of the private link service ids that can be linked to a Private Endpoint with auto - * approved in this subscription in this region. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listAutoApprovedPrivateLinkServicesByResourceGroup( - location: string, - resourceGroupName: string, - options?: PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified private link service. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceName: string, - options?: PrivateLinkServicesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified private link service. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - options?: PrivateLinkServicesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified private link service by resource group. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: PrivateLinkServicesGetOptionalParams, - ): Promise; - /** - * Creates or updates an private link service in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PrivateLinkService, - options?: PrivateLinkServicesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateLinkServicesCreateOrUpdateResponse - > - >; - /** - * Creates or updates an private link service in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: PrivateLinkService, - options?: PrivateLinkServicesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Get the specific private end point connection by specific private link service in the resource - * group. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param peConnectionName The name of the private end point connection. - * @param options The options parameters. - */ - getPrivateEndpointConnection( - resourceGroupName: string, - serviceName: string, - peConnectionName: string, - options?: PrivateLinkServicesGetPrivateEndpointConnectionOptionalParams, - ): Promise; - /** - * Approve or reject private end point connection for a private link service in a subscription. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param peConnectionName The name of the private end point connection. - * @param parameters Parameters supplied to approve or reject the private end point connection. - * @param options The options parameters. - */ - updatePrivateEndpointConnection( - resourceGroupName: string, - serviceName: string, - peConnectionName: string, - parameters: PrivateEndpointConnection, - options?: PrivateLinkServicesUpdatePrivateEndpointConnectionOptionalParams, - ): Promise; - /** - * Delete private end point connection for a private link service in a subscription. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param peConnectionName The name of the private end point connection. - * @param options The options parameters. - */ - beginDeletePrivateEndpointConnection( - resourceGroupName: string, - serviceName: string, - peConnectionName: string, - options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, - ): Promise, void>>; - /** - * Delete private end point connection for a private link service in a subscription. - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param peConnectionName The name of the private end point connection. - * @param options The options parameters. - */ - beginDeletePrivateEndpointConnectionAndWait( - resourceGroupName: string, - serviceName: string, - peConnectionName: string, - options?: PrivateLinkServicesDeletePrivateEndpointConnectionOptionalParams, - ): Promise; - /** - * Checks whether the subscription is visible to private link service. - * @param location The location of the domain name. - * @param parameters The request body of CheckPrivateLinkService API call. - * @param options The options parameters. - */ - beginCheckPrivateLinkServiceVisibility( - location: string, - parameters: CheckPrivateLinkServiceVisibilityRequest, - options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityResponse - > - >; - /** - * Checks whether the subscription is visible to private link service. - * @param location The location of the domain name. - * @param parameters The request body of CheckPrivateLinkService API call. - * @param options The options parameters. - */ - beginCheckPrivateLinkServiceVisibilityAndWait( - location: string, - parameters: CheckPrivateLinkServiceVisibilityRequest, - options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityOptionalParams, - ): Promise; - /** - * Checks whether the subscription is visible to private link service in the specified resource group. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param parameters The request body of CheckPrivateLinkService API call. - * @param options The options parameters. - */ - beginCheckPrivateLinkServiceVisibilityByResourceGroup( - location: string, - resourceGroupName: string, - parameters: CheckPrivateLinkServiceVisibilityRequest, - options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupResponse - > - >; - /** - * Checks whether the subscription is visible to private link service in the specified resource group. - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param parameters The request body of CheckPrivateLinkService API call. - * @param options The options parameters. - */ - beginCheckPrivateLinkServiceVisibilityByResourceGroupAndWait( - location: string, - resourceGroupName: string, - parameters: CheckPrivateLinkServiceVisibilityRequest, - options?: PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/publicIPAddresses.ts b/sdk/network/arm-network/src/operationsInterfaces/publicIPAddresses.ts deleted file mode 100644 index be6f776928b9..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/publicIPAddresses.ts +++ /dev/null @@ -1,328 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - PublicIPAddress, - PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, - PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, - PublicIPAddressesListAllOptionalParams, - PublicIPAddressesListOptionalParams, - PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, - PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, - PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams, - PublicIPAddressesGetCloudServicePublicIPAddressResponse, - PublicIPAddressesDeleteOptionalParams, - PublicIPAddressesGetOptionalParams, - PublicIPAddressesGetResponse, - PublicIPAddressesCreateOrUpdateOptionalParams, - PublicIPAddressesCreateOrUpdateResponse, - TagsObject, - PublicIPAddressesUpdateTagsOptionalParams, - PublicIPAddressesUpdateTagsResponse, - PublicIPAddressesDdosProtectionStatusOptionalParams, - PublicIPAddressesDdosProtectionStatusResponse, - ReserveCloudServicePublicIpAddressRequest, - PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, - PublicIPAddressesReserveCloudServicePublicIpAddressResponse, - DisassociateCloudServicePublicIpRequest, - PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, - PublicIPAddressesDisassociateCloudServiceReservedPublicIpResponse, - PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams, - PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressResponse, -} from "../models/index.js"; - -/// -/** Interface representing a PublicIPAddresses. */ -export interface PublicIPAddresses { - /** - * Gets information about all public IP addresses on a cloud service level. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param options The options parameters. - */ - listCloudServicePublicIPAddresses( - resourceGroupName: string, - cloudServiceName: string, - options?: PublicIPAddressesListCloudServicePublicIPAddressesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets information about all public IP addresses in a role instance IP configuration in a cloud - * service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The name of role instance. - * @param networkInterfaceName The network interface name. - * @param ipConfigurationName The IP configuration name. - * @param options The options parameters. - */ - listCloudServiceRoleInstancePublicIPAddresses( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the public IP addresses in a subscription. - * @param options The options parameters. - */ - listAll( - options?: PublicIPAddressesListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all public IP addresses in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: PublicIPAddressesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets information about all public IP addresses on a virtual machine scale set level. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param options The options parameters. - */ - listVirtualMachineScaleSetPublicIPAddresses( - resourceGroupName: string, - virtualMachineScaleSetName: string, - options?: PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual - * machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The network interface name. - * @param ipConfigurationName The IP configuration name. - * @param options The options parameters. - */ - listVirtualMachineScaleSetVMPublicIPAddresses( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - ipConfigurationName: string, - options?: PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get the specified public IP address in a cloud service. - * @param resourceGroupName The name of the resource group. - * @param cloudServiceName The name of the cloud service. - * @param roleInstanceName The role instance name. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the IP configuration. - * @param publicIpAddressName The name of the public IP Address. - * @param options The options parameters. - */ - getCloudServicePublicIPAddress( - resourceGroupName: string, - cloudServiceName: string, - roleInstanceName: string, - networkInterfaceName: string, - ipConfigurationName: string, - publicIpAddressName: string, - options?: PublicIPAddressesGetCloudServicePublicIPAddressOptionalParams, - ): Promise; - /** - * Deletes the specified public IP address. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - publicIpAddressName: string, - options?: PublicIPAddressesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified public IP address. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - publicIpAddressName: string, - options?: PublicIPAddressesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified public IP address in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - publicIpAddressName: string, - options?: PublicIPAddressesGetOptionalParams, - ): Promise; - /** - * Creates or updates a static or dynamic public IP address. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameters supplied to the create or update public IP address operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - publicIpAddressName: string, - parameters: PublicIPAddress, - options?: PublicIPAddressesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PublicIPAddressesCreateOrUpdateResponse - > - >; - /** - * Creates or updates a static or dynamic public IP address. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameters supplied to the create or update public IP address operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - publicIpAddressName: string, - parameters: PublicIPAddress, - options?: PublicIPAddressesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates public IP address tags. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameters supplied to update public IP address tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - publicIpAddressName: string, - parameters: TagsObject, - options?: PublicIPAddressesUpdateTagsOptionalParams, - ): Promise; - /** - * Gets the Ddos Protection Status of a Public IP Address - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param options The options parameters. - */ - beginDdosProtectionStatus( - resourceGroupName: string, - publicIpAddressName: string, - options?: PublicIPAddressesDdosProtectionStatusOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PublicIPAddressesDdosProtectionStatusResponse - > - >; - /** - * Gets the Ddos Protection Status of a Public IP Address - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param options The options parameters. - */ - beginDdosProtectionStatusAndWait( - resourceGroupName: string, - publicIpAddressName: string, - options?: PublicIPAddressesDdosProtectionStatusOptionalParams, - ): Promise; - /** - * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If - * rollback is requested, reverts the allocation method to Dynamic. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameter that define which Public IP Address should be associated in place of - * given Public IP Address. - * @param options The options parameters. - */ - beginReserveCloudServicePublicIpAddress( - resourceGroupName: string, - publicIpAddressName: string, - parameters: ReserveCloudServicePublicIpAddressRequest, - options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PublicIPAddressesReserveCloudServicePublicIpAddressResponse - > - >; - /** - * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If - * rollback is requested, reverts the allocation method to Dynamic. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameter that define which Public IP Address should be associated in place of - * given Public IP Address. - * @param options The options parameters. - */ - beginReserveCloudServicePublicIpAddressAndWait( - resourceGroupName: string, - publicIpAddressName: string, - parameters: ReserveCloudServicePublicIpAddressRequest, - options?: PublicIPAddressesReserveCloudServicePublicIpAddressOptionalParams, - ): Promise; - /** - * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP - * to the same Cloud Service frontend. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameter that define which Public IP Address should be associated in place of - * given Public IP Address. - * @param options The options parameters. - */ - beginDisassociateCloudServiceReservedPublicIp( - resourceGroupName: string, - publicIpAddressName: string, - parameters: DisassociateCloudServicePublicIpRequest, - options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PublicIPAddressesDisassociateCloudServiceReservedPublicIpResponse - > - >; - /** - * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP - * to the same Cloud Service frontend. - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param parameters Parameter that define which Public IP Address should be associated in place of - * given Public IP Address. - * @param options The options parameters. - */ - beginDisassociateCloudServiceReservedPublicIpAndWait( - resourceGroupName: string, - publicIpAddressName: string, - parameters: DisassociateCloudServicePublicIpRequest, - options?: PublicIPAddressesDisassociateCloudServiceReservedPublicIpOptionalParams, - ): Promise; - /** - * Get the specified public IP address in a virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the IP configuration. - * @param publicIpAddressName The name of the public IP Address. - * @param options The options parameters. - */ - getVirtualMachineScaleSetPublicIPAddress( - resourceGroupName: string, - virtualMachineScaleSetName: string, - virtualmachineIndex: string, - networkInterfaceName: string, - ipConfigurationName: string, - publicIpAddressName: string, - options?: PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/publicIPPrefixes.ts b/sdk/network/arm-network/src/operationsInterfaces/publicIPPrefixes.ts deleted file mode 100644 index 5a685e82d761..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/publicIPPrefixes.ts +++ /dev/null @@ -1,119 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - PublicIPPrefix, - PublicIPPrefixesListAllOptionalParams, - PublicIPPrefixesListOptionalParams, - PublicIPPrefixesDeleteOptionalParams, - PublicIPPrefixesGetOptionalParams, - PublicIPPrefixesGetResponse, - PublicIPPrefixesCreateOrUpdateOptionalParams, - PublicIPPrefixesCreateOrUpdateResponse, - TagsObject, - PublicIPPrefixesUpdateTagsOptionalParams, - PublicIPPrefixesUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a PublicIPPrefixes. */ -export interface PublicIPPrefixes { - /** - * Gets all the public IP prefixes in a subscription. - * @param options The options parameters. - */ - listAll( - options?: PublicIPPrefixesListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all public IP prefixes in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: PublicIPPrefixesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified public IP prefix. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the PublicIpPrefix. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - publicIpPrefixName: string, - options?: PublicIPPrefixesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified public IP prefix. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the PublicIpPrefix. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - publicIpPrefixName: string, - options?: PublicIPPrefixesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified public IP prefix in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the public IP prefix. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - publicIpPrefixName: string, - options?: PublicIPPrefixesGetOptionalParams, - ): Promise; - /** - * Creates or updates a static or dynamic public IP prefix. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the public IP prefix. - * @param parameters Parameters supplied to the create or update public IP prefix operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - publicIpPrefixName: string, - parameters: PublicIPPrefix, - options?: PublicIPPrefixesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PublicIPPrefixesCreateOrUpdateResponse - > - >; - /** - * Creates or updates a static or dynamic public IP prefix. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the public IP prefix. - * @param parameters Parameters supplied to the create or update public IP prefix operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - publicIpPrefixName: string, - parameters: PublicIPPrefix, - options?: PublicIPPrefixesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates public IP prefix tags. - * @param resourceGroupName The name of the resource group. - * @param publicIpPrefixName The name of the public IP prefix. - * @param parameters Parameters supplied to update public IP prefix tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - publicIpPrefixName: string, - parameters: TagsObject, - options?: PublicIPPrefixesUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisIntents.ts b/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisIntents.ts deleted file mode 100644 index f55d4fd945f5..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisIntents.ts +++ /dev/null @@ -1,81 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - ReachabilityAnalysisIntent, - ReachabilityAnalysisIntentsListOptionalParams, - ReachabilityAnalysisIntentsGetOptionalParams, - ReachabilityAnalysisIntentsGetResponse, - ReachabilityAnalysisIntentsCreateOptionalParams, - ReachabilityAnalysisIntentsCreateResponse, - ReachabilityAnalysisIntentsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ReachabilityAnalysisIntents. */ -export interface ReachabilityAnalysisIntents { - /** - * Gets list of Reachability Analysis Intents . - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: ReachabilityAnalysisIntentsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get the Reachability Analysis Intent. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisIntentName: string, - options?: ReachabilityAnalysisIntentsGetOptionalParams, - ): Promise; - /** - * Creates Reachability Analysis Intent. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. - * @param body Reachability Analysis Intent object to create/update. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisIntentName: string, - body: ReachabilityAnalysisIntent, - options?: ReachabilityAnalysisIntentsCreateOptionalParams, - ): Promise; - /** - * Deletes Reachability Analysis Intent. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisIntentName: string, - options?: ReachabilityAnalysisIntentsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisRuns.ts b/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisRuns.ts deleted file mode 100644 index 6ca4ebbcea27..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisRuns.ts +++ /dev/null @@ -1,103 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ReachabilityAnalysisRun, - ReachabilityAnalysisRunsListOptionalParams, - ReachabilityAnalysisRunsGetOptionalParams, - ReachabilityAnalysisRunsGetResponse, - ReachabilityAnalysisRunsCreateOptionalParams, - ReachabilityAnalysisRunsCreateResponse, - ReachabilityAnalysisRunsDeleteOptionalParams, - ReachabilityAnalysisRunsDeleteResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ReachabilityAnalysisRuns. */ -export interface ReachabilityAnalysisRuns { - /** - * Gets list of Reachability Analysis Runs. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: ReachabilityAnalysisRunsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets Reachability Analysis Run. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisRunName Reachability Analysis Run name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisRunName: string, - options?: ReachabilityAnalysisRunsGetOptionalParams, - ): Promise; - /** - * Creates Reachability Analysis Runs. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisRunName Reachability Analysis Run name. - * @param body Analysis Run resource object to create/update. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisRunName: string, - body: ReachabilityAnalysisRun, - options?: ReachabilityAnalysisRunsCreateOptionalParams, - ): Promise; - /** - * Deletes Reachability Analysis Run. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisRunName Reachability Analysis Run name. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisRunName: string, - options?: ReachabilityAnalysisRunsDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ReachabilityAnalysisRunsDeleteResponse - > - >; - /** - * Deletes Reachability Analysis Run. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param reachabilityAnalysisRunName Reachability Analysis Run name. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - reachabilityAnalysisRunName: string, - options?: ReachabilityAnalysisRunsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/resourceNavigationLinks.ts b/sdk/network/arm-network/src/operationsInterfaces/resourceNavigationLinks.ts deleted file mode 100644 index fc0f08952de7..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/resourceNavigationLinks.ts +++ /dev/null @@ -1,27 +0,0 @@ -// 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 type { - ResourceNavigationLinksListOptionalParams, - ResourceNavigationLinksListResponse, -} from "../models/index.js"; - -/** Interface representing a ResourceNavigationLinks. */ -export interface ResourceNavigationLinks { - /** - * Gets a list of resource navigation links for a subnet. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - options?: ResourceNavigationLinksListOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/routeFilterRules.ts b/sdk/network/arm-network/src/operationsInterfaces/routeFilterRules.ts deleted file mode 100644 index 205a15b490a3..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/routeFilterRules.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - RouteFilterRule, - RouteFilterRulesListByRouteFilterOptionalParams, - RouteFilterRulesDeleteOptionalParams, - RouteFilterRulesGetOptionalParams, - RouteFilterRulesGetResponse, - RouteFilterRulesCreateOrUpdateOptionalParams, - RouteFilterRulesCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a RouteFilterRules. */ -export interface RouteFilterRules { - /** - * Gets all RouteFilterRules in a route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param options The options parameters. - */ - listByRouteFilter( - resourceGroupName: string, - routeFilterName: string, - options?: RouteFilterRulesListByRouteFilterOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified rule from a route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - routeFilterName: string, - ruleName: string, - options?: RouteFilterRulesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified rule from a route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - routeFilterName: string, - ruleName: string, - options?: RouteFilterRulesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified rule from a route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - routeFilterName: string, - ruleName: string, - options?: RouteFilterRulesGetOptionalParams, - ): Promise; - /** - * Creates or updates a route in the specified route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param ruleName The name of the route filter rule. - * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - routeFilterName: string, - ruleName: string, - routeFilterRuleParameters: RouteFilterRule, - options?: RouteFilterRulesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - RouteFilterRulesCreateOrUpdateResponse - > - >; - /** - * Creates or updates a route in the specified route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param ruleName The name of the route filter rule. - * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - routeFilterName: string, - ruleName: string, - routeFilterRuleParameters: RouteFilterRule, - options?: RouteFilterRulesCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/routeFilters.ts b/sdk/network/arm-network/src/operationsInterfaces/routeFilters.ts deleted file mode 100644 index 4037c99e9b1c..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/routeFilters.ts +++ /dev/null @@ -1,117 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - RouteFilter, - RouteFiltersListByResourceGroupOptionalParams, - RouteFiltersListOptionalParams, - RouteFiltersDeleteOptionalParams, - RouteFiltersGetOptionalParams, - RouteFiltersGetResponse, - RouteFiltersCreateOrUpdateOptionalParams, - RouteFiltersCreateOrUpdateResponse, - TagsObject, - RouteFiltersUpdateTagsOptionalParams, - RouteFiltersUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a RouteFilters. */ -export interface RouteFilters { - /** - * Gets all route filters in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: RouteFiltersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all route filters in a subscription. - * @param options The options parameters. - */ - list(options?: RouteFiltersListOptionalParams): PagedAsyncIterableIterator; - /** - * Deletes the specified route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - routeFilterName: string, - options?: RouteFiltersDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - routeFilterName: string, - options?: RouteFiltersDeleteOptionalParams, - ): Promise; - /** - * Gets the specified route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - routeFilterName: string, - options?: RouteFiltersGetOptionalParams, - ): Promise; - /** - * Creates or updates a route filter in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param routeFilterParameters Parameters supplied to the create or update route filter operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - routeFilterName: string, - routeFilterParameters: RouteFilter, - options?: RouteFiltersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - RouteFiltersCreateOrUpdateResponse - > - >; - /** - * Creates or updates a route filter in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param routeFilterParameters Parameters supplied to the create or update route filter operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - routeFilterName: string, - routeFilterParameters: RouteFilter, - options?: RouteFiltersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates tags of a route filter. - * @param resourceGroupName The name of the resource group. - * @param routeFilterName The name of the route filter. - * @param parameters Parameters supplied to update route filter tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - routeFilterName: string, - parameters: TagsObject, - options?: RouteFiltersUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/routeMaps.ts b/sdk/network/arm-network/src/operationsInterfaces/routeMaps.ts deleted file mode 100644 index b95dbc7caa13..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/routeMaps.ts +++ /dev/null @@ -1,107 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - RouteMap, - RouteMapsListOptionalParams, - RouteMapsGetOptionalParams, - RouteMapsGetResponse, - RouteMapsCreateOrUpdateOptionalParams, - RouteMapsCreateOrUpdateResponse, - RouteMapsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a RouteMaps. */ -export interface RouteMaps { - /** - * Retrieves the details of all RouteMaps. - * @param resourceGroupName The resource group name of the RouteMap's resource group'. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualHubName: string, - options?: RouteMapsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves the details of a RouteMap. - * @param resourceGroupName The resource group name of the RouteMap's resource group. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param routeMapName The name of the RouteMap. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - routeMapName: string, - options?: RouteMapsGetOptionalParams, - ): Promise; - /** - * Creates a RouteMap if it doesn't exist else updates the existing one. - * @param resourceGroupName The resource group name of the RouteMap's resource group. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param routeMapName The name of the RouteMap. - * @param routeMapParameters Parameters supplied to create or update a RouteMap. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - routeMapName: string, - routeMapParameters: RouteMap, - options?: RouteMapsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - RouteMapsCreateOrUpdateResponse - > - >; - /** - * Creates a RouteMap if it doesn't exist else updates the existing one. - * @param resourceGroupName The resource group name of the RouteMap's resource group. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param routeMapName The name of the RouteMap. - * @param routeMapParameters Parameters supplied to create or update a RouteMap. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - routeMapName: string, - routeMapParameters: RouteMap, - options?: RouteMapsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a RouteMap. - * @param resourceGroupName The resource group name of the RouteMap's resource group. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param routeMapName The name of the RouteMap. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualHubName: string, - routeMapName: string, - options?: RouteMapsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a RouteMap. - * @param resourceGroupName The resource group name of the RouteMap's resource group. - * @param virtualHubName The name of the VirtualHub containing the RouteMap. - * @param routeMapName The name of the RouteMap. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - routeMapName: string, - options?: RouteMapsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/routeTables.ts b/sdk/network/arm-network/src/operationsInterfaces/routeTables.ts deleted file mode 100644 index b039df26d4b3..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/routeTables.ts +++ /dev/null @@ -1,117 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - RouteTable, - RouteTablesListOptionalParams, - RouteTablesListAllOptionalParams, - RouteTablesDeleteOptionalParams, - RouteTablesGetOptionalParams, - RouteTablesGetResponse, - RouteTablesCreateOrUpdateOptionalParams, - RouteTablesCreateOrUpdateResponse, - TagsObject, - RouteTablesUpdateTagsOptionalParams, - RouteTablesUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a RouteTables. */ -export interface RouteTables { - /** - * Gets all route tables in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: RouteTablesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all route tables in a subscription. - * @param options The options parameters. - */ - listAll(options?: RouteTablesListAllOptionalParams): PagedAsyncIterableIterator; - /** - * Deletes the specified route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - routeTableName: string, - options?: RouteTablesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - routeTableName: string, - options?: RouteTablesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - routeTableName: string, - options?: RouteTablesGetOptionalParams, - ): Promise; - /** - * Create or updates a route table in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param parameters Parameters supplied to the create or update route table operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - routeTableName: string, - parameters: RouteTable, - options?: RouteTablesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - RouteTablesCreateOrUpdateResponse - > - >; - /** - * Create or updates a route table in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param parameters Parameters supplied to the create or update route table operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - routeTableName: string, - parameters: RouteTable, - options?: RouteTablesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates a route table tags. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param parameters Parameters supplied to update route table tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - routeTableName: string, - parameters: TagsObject, - options?: RouteTablesUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/routes.ts b/sdk/network/arm-network/src/operationsInterfaces/routes.ts deleted file mode 100644 index f863bca54fad..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/routes.ts +++ /dev/null @@ -1,104 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - Route, - RoutesListOptionalParams, - RoutesDeleteOptionalParams, - RoutesGetOptionalParams, - RoutesGetResponse, - RoutesCreateOrUpdateOptionalParams, - RoutesCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Routes. */ -export interface Routes { - /** - * Gets all routes in a route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - routeTableName: string, - options?: RoutesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified route from a route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param routeName The name of the route. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - routeTableName: string, - routeName: string, - options?: RoutesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified route from a route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param routeName The name of the route. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - routeTableName: string, - routeName: string, - options?: RoutesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified route from a route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param routeName The name of the route. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - routeTableName: string, - routeName: string, - options?: RoutesGetOptionalParams, - ): Promise; - /** - * Creates or updates a route in the specified route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param routeName The name of the route. - * @param routeParameters Parameters supplied to the create or update route operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - routeTableName: string, - routeName: string, - routeParameters: Route, - options?: RoutesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, RoutesCreateOrUpdateResponse> - >; - /** - * Creates or updates a route in the specified route table. - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param routeName The name of the route. - * @param routeParameters Parameters supplied to the create or update route operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - routeTableName: string, - routeName: string, - routeParameters: Route, - options?: RoutesCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/routingIntentOperations.ts b/sdk/network/arm-network/src/operationsInterfaces/routingIntentOperations.ts deleted file mode 100644 index e366c571f979..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/routingIntentOperations.ts +++ /dev/null @@ -1,107 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - RoutingIntent, - RoutingIntentListOptionalParams, - RoutingIntentCreateOrUpdateOptionalParams, - RoutingIntentCreateOrUpdateResponse, - RoutingIntentGetOptionalParams, - RoutingIntentGetResponse, - RoutingIntentDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a RoutingIntentOperations. */ -export interface RoutingIntentOperations { - /** - * Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualHubName: string, - options?: RoutingIntentListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * @param resourceGroupName The resource group name of the RoutingIntent. - * @param virtualHubName The name of the VirtualHub. - * @param routingIntentName The name of the per VirtualHub singleton Routing Intent resource. - * @param routingIntentParameters Parameters supplied to create or update RoutingIntent. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - routingIntentName: string, - routingIntentParameters: RoutingIntent, - options?: RoutingIntentCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - RoutingIntentCreateOrUpdateResponse - > - >; - /** - * Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * @param resourceGroupName The resource group name of the RoutingIntent. - * @param virtualHubName The name of the VirtualHub. - * @param routingIntentName The name of the per VirtualHub singleton Routing Intent resource. - * @param routingIntentParameters Parameters supplied to create or update RoutingIntent. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - routingIntentName: string, - routingIntentParameters: RoutingIntent, - options?: RoutingIntentCreateOrUpdateOptionalParams, - ): Promise; - /** - * Retrieves the details of a RoutingIntent. - * @param resourceGroupName The resource group name of the RoutingIntent. - * @param virtualHubName The name of the VirtualHub. - * @param routingIntentName The name of the RoutingIntent. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - routingIntentName: string, - options?: RoutingIntentGetOptionalParams, - ): Promise; - /** - * Deletes a RoutingIntent. - * @param resourceGroupName The resource group name of the RoutingIntent. - * @param virtualHubName The name of the VirtualHub. - * @param routingIntentName The name of the RoutingIntent. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualHubName: string, - routingIntentName: string, - options?: RoutingIntentDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a RoutingIntent. - * @param resourceGroupName The resource group name of the RoutingIntent. - * @param virtualHubName The name of the VirtualHub. - * @param routingIntentName The name of the RoutingIntent. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - routingIntentName: string, - options?: RoutingIntentDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/routingRuleCollections.ts b/sdk/network/arm-network/src/operationsInterfaces/routingRuleCollections.ts deleted file mode 100644 index 9f0e0cce60f0..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/routingRuleCollections.ts +++ /dev/null @@ -1,97 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - RoutingRuleCollection, - RoutingRuleCollectionsListOptionalParams, - RoutingRuleCollectionsGetOptionalParams, - RoutingRuleCollectionsGetResponse, - RoutingRuleCollectionsCreateOrUpdateOptionalParams, - RoutingRuleCollectionsCreateOrUpdateResponse, - RoutingRuleCollectionsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a RoutingRuleCollections. */ -export interface RoutingRuleCollections { - /** - * Lists all the rule collections in a routing configuration, in a paginated format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: RoutingRuleCollectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets a network manager routing configuration rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: RoutingRuleCollectionsGetOptionalParams, - ): Promise; - /** - * Creates or updates a routing rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param ruleCollection The Rule Collection to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleCollection: RoutingRuleCollection, - options?: RoutingRuleCollectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes an routing rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: RoutingRuleCollectionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes an routing rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: RoutingRuleCollectionsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/routingRules.ts b/sdk/network/arm-network/src/operationsInterfaces/routingRules.ts deleted file mode 100644 index c3573375c3a8..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/routingRules.ts +++ /dev/null @@ -1,107 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - RoutingRule, - RoutingRulesListOptionalParams, - RoutingRulesGetOptionalParams, - RoutingRulesGetResponse, - RoutingRulesCreateOrUpdateOptionalParams, - RoutingRulesCreateOrUpdateResponse, - RoutingRulesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a RoutingRules. */ -export interface RoutingRules { - /** - * List all network manager routing configuration routing rules. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: RoutingRulesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets a network manager routing configuration routing rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: RoutingRulesGetOptionalParams, - ): Promise; - /** - * Creates or updates an routing rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param ruleName The name of the rule. - * @param routingRule The routing rule to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - routingRule: RoutingRule, - options?: RoutingRulesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a routing rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: RoutingRulesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a routing rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Routing Configuration. - * @param ruleCollectionName The name of the network manager routing Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: RoutingRulesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/scopeConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/scopeConnections.ts deleted file mode 100644 index 3cb5eb9f9afa..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/scopeConnections.ts +++ /dev/null @@ -1,73 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - ScopeConnection, - ScopeConnectionsListOptionalParams, - ScopeConnectionsCreateOrUpdateOptionalParams, - ScopeConnectionsCreateOrUpdateResponse, - ScopeConnectionsGetOptionalParams, - ScopeConnectionsGetResponse, - ScopeConnectionsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ScopeConnections. */ -export interface ScopeConnections { - /** - * List all scope connections created by this network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - options?: ScopeConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates or updates scope connection from Network Manager - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param scopeConnectionName Name for the cross-tenant connection. - * @param parameters Scope connection to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - scopeConnectionName: string, - parameters: ScopeConnection, - options?: ScopeConnectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Get specified scope connection created by this Network Manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param scopeConnectionName Name for the cross-tenant connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - scopeConnectionName: string, - options?: ScopeConnectionsGetOptionalParams, - ): Promise; - /** - * Delete the pending scope connection created by this network manager. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param scopeConnectionName Name for the cross-tenant connection. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkManagerName: string, - scopeConnectionName: string, - options?: ScopeConnectionsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/securityAdminConfigurations.ts b/sdk/network/arm-network/src/operationsInterfaces/securityAdminConfigurations.ts deleted file mode 100644 index bb86f89e74f5..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/securityAdminConfigurations.ts +++ /dev/null @@ -1,88 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - SecurityAdminConfiguration, - SecurityAdminConfigurationsListOptionalParams, - SecurityAdminConfigurationsGetOptionalParams, - SecurityAdminConfigurationsGetResponse, - SecurityAdminConfigurationsCreateOrUpdateOptionalParams, - SecurityAdminConfigurationsCreateOrUpdateResponse, - SecurityAdminConfigurationsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a SecurityAdminConfigurations. */ -export interface SecurityAdminConfigurations { - /** - * Lists all the network manager security admin configurations in a network manager, in a paginated - * format. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - options?: SecurityAdminConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves a network manager security admin configuration. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityAdminConfigurationsGetOptionalParams, - ): Promise; - /** - * Creates or updates a network manager security admin configuration. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param securityAdminConfiguration The security admin configuration to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - securityAdminConfiguration: SecurityAdminConfiguration, - options?: SecurityAdminConfigurationsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a network manager security admin configuration. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityAdminConfigurationsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a network manager security admin configuration. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityAdminConfigurationsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/securityPartnerProviders.ts b/sdk/network/arm-network/src/operationsInterfaces/securityPartnerProviders.ts deleted file mode 100644 index 1a33bcc8bf0e..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/securityPartnerProviders.ts +++ /dev/null @@ -1,119 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - SecurityPartnerProvider, - SecurityPartnerProvidersListByResourceGroupOptionalParams, - SecurityPartnerProvidersListOptionalParams, - SecurityPartnerProvidersDeleteOptionalParams, - SecurityPartnerProvidersGetOptionalParams, - SecurityPartnerProvidersGetResponse, - SecurityPartnerProvidersCreateOrUpdateOptionalParams, - SecurityPartnerProvidersCreateOrUpdateResponse, - TagsObject, - SecurityPartnerProvidersUpdateTagsOptionalParams, - SecurityPartnerProvidersUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a SecurityPartnerProviders. */ -export interface SecurityPartnerProviders { - /** - * Lists all Security Partner Providers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: SecurityPartnerProvidersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the Security Partner Providers in a subscription. - * @param options The options parameters. - */ - list( - options?: SecurityPartnerProvidersListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified Security Partner Provider. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - securityPartnerProviderName: string, - options?: SecurityPartnerProvidersDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified Security Partner Provider. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - securityPartnerProviderName: string, - options?: SecurityPartnerProvidersDeleteOptionalParams, - ): Promise; - /** - * Gets the specified Security Partner Provider. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - securityPartnerProviderName: string, - options?: SecurityPartnerProvidersGetOptionalParams, - ): Promise; - /** - * Creates or updates the specified Security Partner Provider. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param parameters Parameters supplied to the create or update Security Partner Provider operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - securityPartnerProviderName: string, - parameters: SecurityPartnerProvider, - options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SecurityPartnerProvidersCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified Security Partner Provider. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param parameters Parameters supplied to the create or update Security Partner Provider operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - securityPartnerProviderName: string, - parameters: SecurityPartnerProvider, - options?: SecurityPartnerProvidersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates tags of a Security Partner Provider resource. - * @param resourceGroupName The name of the resource group. - * @param securityPartnerProviderName The name of the Security Partner Provider. - * @param parameters Parameters supplied to update Security Partner Provider tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - securityPartnerProviderName: string, - parameters: TagsObject, - options?: SecurityPartnerProvidersUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/securityRules.ts b/sdk/network/arm-network/src/operationsInterfaces/securityRules.ts deleted file mode 100644 index ce7a7f98abcd..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/securityRules.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - SecurityRule, - SecurityRulesListOptionalParams, - SecurityRulesDeleteOptionalParams, - SecurityRulesGetOptionalParams, - SecurityRulesGetResponse, - SecurityRulesCreateOrUpdateOptionalParams, - SecurityRulesCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a SecurityRules. */ -export interface SecurityRules { - /** - * Gets all security rules in a network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkSecurityGroupName: string, - options?: SecurityRulesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified network security rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param securityRuleName The name of the security rule. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkSecurityGroupName: string, - securityRuleName: string, - options?: SecurityRulesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified network security rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param securityRuleName The name of the security rule. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkSecurityGroupName: string, - securityRuleName: string, - options?: SecurityRulesDeleteOptionalParams, - ): Promise; - /** - * Get the specified network security rule. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param securityRuleName The name of the security rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkSecurityGroupName: string, - securityRuleName: string, - options?: SecurityRulesGetOptionalParams, - ): Promise; - /** - * Creates or updates a security rule in the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param securityRuleName The name of the security rule. - * @param securityRuleParameters Parameters supplied to the create or update network security rule - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - networkSecurityGroupName: string, - securityRuleName: string, - securityRuleParameters: SecurityRule, - options?: SecurityRulesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SecurityRulesCreateOrUpdateResponse - > - >; - /** - * Creates or updates a security rule in the specified network security group. - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param securityRuleName The name of the security rule. - * @param securityRuleParameters Parameters supplied to the create or update network security rule - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkSecurityGroupName: string, - securityRuleName: string, - securityRuleParameters: SecurityRule, - options?: SecurityRulesCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/securityUserConfigurations.ts b/sdk/network/arm-network/src/operationsInterfaces/securityUserConfigurations.ts deleted file mode 100644 index b8f296e12cfc..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/securityUserConfigurations.ts +++ /dev/null @@ -1,88 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - SecurityUserConfiguration, - SecurityUserConfigurationsListOptionalParams, - SecurityUserConfigurationsGetOptionalParams, - SecurityUserConfigurationsGetResponse, - SecurityUserConfigurationsCreateOrUpdateOptionalParams, - SecurityUserConfigurationsCreateOrUpdateResponse, - SecurityUserConfigurationsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a SecurityUserConfigurations. */ -export interface SecurityUserConfigurations { - /** - * Lists all the network manager security user configurations in a network manager, in a paginated - * format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - options?: SecurityUserConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves a network manager security user configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityUserConfigurationsGetOptionalParams, - ): Promise; - /** - * Creates or updates a network manager security user configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param securityUserConfiguration The security user configuration to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - securityUserConfiguration: SecurityUserConfiguration, - options?: SecurityUserConfigurationsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a network manager security user configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityUserConfigurationsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a network manager security user configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityUserConfigurationsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/securityUserRuleCollections.ts b/sdk/network/arm-network/src/operationsInterfaces/securityUserRuleCollections.ts deleted file mode 100644 index c35204f9f20b..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/securityUserRuleCollections.ts +++ /dev/null @@ -1,97 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - SecurityUserRuleCollection, - SecurityUserRuleCollectionsListOptionalParams, - SecurityUserRuleCollectionsGetOptionalParams, - SecurityUserRuleCollectionsGetResponse, - SecurityUserRuleCollectionsCreateOrUpdateOptionalParams, - SecurityUserRuleCollectionsCreateOrUpdateResponse, - SecurityUserRuleCollectionsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a SecurityUserRuleCollections. */ -export interface SecurityUserRuleCollections { - /** - * Lists all the security user rule collections in a security configuration, in a paginated format. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - options?: SecurityUserRuleCollectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets a network manager security user configuration rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: SecurityUserRuleCollectionsGetOptionalParams, - ): Promise; - /** - * Creates or updates a security user rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param securityUserRuleCollection The Security User Rule Collection to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - securityUserRuleCollection: SecurityUserRuleCollection, - options?: SecurityUserRuleCollectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a Security User Rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: SecurityUserRuleCollectionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a Security User Rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: SecurityUserRuleCollectionsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/securityUserRules.ts b/sdk/network/arm-network/src/operationsInterfaces/securityUserRules.ts deleted file mode 100644 index e2584e7e48b7..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/securityUserRules.ts +++ /dev/null @@ -1,107 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - SecurityUserRule, - SecurityUserRulesListOptionalParams, - SecurityUserRulesGetOptionalParams, - SecurityUserRulesGetResponse, - SecurityUserRulesCreateOrUpdateOptionalParams, - SecurityUserRulesCreateOrUpdateResponse, - SecurityUserRulesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a SecurityUserRules. */ -export interface SecurityUserRules { - /** - * Lists all Security User Rules in a rule collection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - options?: SecurityUserRulesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets a security user rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: SecurityUserRulesGetOptionalParams, - ): Promise; - /** - * Creates or updates a security user rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param securityUserRule The security user rule to create or update - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - securityUserRule: SecurityUserRule, - options?: SecurityUserRulesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a security user rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: SecurityUserRulesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a security user rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkManagerName The name of the network manager. - * @param configurationName The name of the network manager Security Configuration. - * @param ruleCollectionName The name of the network manager security Configuration rule collection. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - configurationName: string, - ruleCollectionName: string, - ruleName: string, - options?: SecurityUserRulesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/serviceAssociationLinks.ts b/sdk/network/arm-network/src/operationsInterfaces/serviceAssociationLinks.ts deleted file mode 100644 index 3dbde4b4c08d..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/serviceAssociationLinks.ts +++ /dev/null @@ -1,27 +0,0 @@ -// 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 type { - ServiceAssociationLinksListOptionalParams, - ServiceAssociationLinksListResponse, -} from "../models/index.js"; - -/** Interface representing a ServiceAssociationLinks. */ -export interface ServiceAssociationLinks { - /** - * Gets a list of service association links for a subnet. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - options?: ServiceAssociationLinksListOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/serviceEndpointPolicies.ts b/sdk/network/arm-network/src/operationsInterfaces/serviceEndpointPolicies.ts deleted file mode 100644 index bf423c1c4f91..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/serviceEndpointPolicies.ts +++ /dev/null @@ -1,119 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ServiceEndpointPolicy, - ServiceEndpointPoliciesListOptionalParams, - ServiceEndpointPoliciesListByResourceGroupOptionalParams, - ServiceEndpointPoliciesDeleteOptionalParams, - ServiceEndpointPoliciesGetOptionalParams, - ServiceEndpointPoliciesGetResponse, - ServiceEndpointPoliciesCreateOrUpdateOptionalParams, - ServiceEndpointPoliciesCreateOrUpdateResponse, - TagsObject, - ServiceEndpointPoliciesUpdateTagsOptionalParams, - ServiceEndpointPoliciesUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ServiceEndpointPolicies. */ -export interface ServiceEndpointPolicies { - /** - * Gets all the service endpoint policies in a subscription. - * @param options The options parameters. - */ - list( - options?: ServiceEndpointPoliciesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all service endpoint Policies in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ServiceEndpointPoliciesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceEndpointPolicyName: string, - options?: ServiceEndpointPoliciesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceEndpointPolicyName: string, - options?: ServiceEndpointPoliciesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified service Endpoint Policies in a specified resource group. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceEndpointPolicyName: string, - options?: ServiceEndpointPoliciesGetOptionalParams, - ): Promise; - /** - * Creates or updates a service Endpoint Policies. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param parameters Parameters supplied to the create or update service endpoint policy operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceEndpointPolicyName: string, - parameters: ServiceEndpointPolicy, - options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServiceEndpointPoliciesCreateOrUpdateResponse - > - >; - /** - * Creates or updates a service Endpoint Policies. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param parameters Parameters supplied to the create or update service endpoint policy operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceEndpointPolicyName: string, - parameters: ServiceEndpointPolicy, - options?: ServiceEndpointPoliciesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates tags of a service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param parameters Parameters supplied to update service endpoint policy tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - serviceEndpointPolicyName: string, - parameters: TagsObject, - options?: ServiceEndpointPoliciesUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/serviceEndpointPolicyDefinitions.ts b/sdk/network/arm-network/src/operationsInterfaces/serviceEndpointPolicyDefinitions.ts deleted file mode 100644 index 9b724e6fb172..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/serviceEndpointPolicyDefinitions.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ServiceEndpointPolicyDefinition, - ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, - ServiceEndpointPolicyDefinitionsDeleteOptionalParams, - ServiceEndpointPolicyDefinitionsGetOptionalParams, - ServiceEndpointPolicyDefinitionsGetResponse, - ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, - ServiceEndpointPolicyDefinitionsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ServiceEndpointPolicyDefinitions. */ -export interface ServiceEndpointPolicyDefinitions { - /** - * Gets all service endpoint policy definitions in a service end point policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy name. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - serviceEndpointPolicyName: string, - options?: ServiceEndpointPolicyDefinitionsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified ServiceEndpoint policy definitions. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. - * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceEndpointPolicyName: string, - serviceEndpointPolicyDefinitionName: string, - options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified ServiceEndpoint policy definitions. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. - * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceEndpointPolicyName: string, - serviceEndpointPolicyDefinitionName: string, - options?: ServiceEndpointPolicyDefinitionsDeleteOptionalParams, - ): Promise; - /** - * Get the specified service endpoint policy definitions from service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy name. - * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceEndpointPolicyName: string, - serviceEndpointPolicyDefinitionName: string, - options?: ServiceEndpointPolicyDefinitionsGetOptionalParams, - ): Promise; - /** - * Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. - * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint - * policy operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceEndpointPolicyName: string, - serviceEndpointPolicyDefinitionName: string, - serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, - options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServiceEndpointPolicyDefinitionsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * @param resourceGroupName The name of the resource group. - * @param serviceEndpointPolicyName The name of the service endpoint policy. - * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. - * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint - * policy operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceEndpointPolicyName: string, - serviceEndpointPolicyDefinitionName: string, - serviceEndpointPolicyDefinitions: ServiceEndpointPolicyDefinition, - options?: ServiceEndpointPolicyDefinitionsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/serviceGateways.ts b/sdk/network/arm-network/src/operationsInterfaces/serviceGateways.ts deleted file mode 100644 index 40c0c3d1869a..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/serviceGateways.ts +++ /dev/null @@ -1,250 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ServiceGateway, - ServiceGatewaysListAllOptionalParams, - ServiceGatewaysListOptionalParams, - ServiceGatewayAddressLocationResponse, - ServiceGatewaysGetAddressLocationsOptionalParams, - ServiceGatewayService, - ServiceGatewaysGetServicesOptionalParams, - ServiceGatewaysDeleteOptionalParams, - ServiceGatewaysDeleteResponse, - ServiceGatewaysGetOptionalParams, - ServiceGatewaysGetResponse, - ServiceGatewaysCreateOrUpdateOptionalParams, - ServiceGatewaysCreateOrUpdateResponse, - TagsObject, - ServiceGatewaysUpdateTagsOptionalParams, - ServiceGatewaysUpdateTagsResponse, - ServiceGatewayUpdateAddressLocationsRequest, - ServiceGatewaysUpdateAddressLocationsOptionalParams, - ServiceGatewaysUpdateAddressLocationsResponse, - ServiceGatewayUpdateServicesRequest, - ServiceGatewaysUpdateServicesOptionalParams, - ServiceGatewaysUpdateServicesResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ServiceGateways. */ -export interface ServiceGateways { - /** - * Gets all the service gateways in a subscription. - * @param options The options parameters. - */ - listAll( - options?: ServiceGatewaysListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the service gateways in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: ServiceGatewaysListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get address locations in service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - listAddressLocations( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetAddressLocationsOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get Services in service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - listServices( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetServicesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysDeleteOptionalParams, - ): Promise< - SimplePollerLike, ServiceGatewaysDeleteResponse> - >; - /** - * Deletes the specified service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysDeleteOptionalParams, - ): Promise; - /** - * Gets the specified service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceGatewayName: string, - options?: ServiceGatewaysGetOptionalParams, - ): Promise; - /** - * Creates or updates a service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or update service gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGateway, - options?: ServiceGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServiceGatewaysCreateOrUpdateResponse - > - >; - /** - * Creates or updates a service gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or update service gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGateway, - options?: ServiceGatewaysCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates a service gateway tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to update service gateway tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - serviceGatewayName: string, - parameters: TagsObject, - options?: ServiceGatewaysUpdateTagsOptionalParams, - ): Promise; - /** - * Creates or updates address locations within the service gateway. - * - * The request supports both full and partial update modes at two levels: location and address. - * - * Full update replaces all existing data. - * - * Partial update modifies only the specified entries: - * - * For location-level partial updates, if no address is provided, the existing address will be deleted. - * - * For address-level partial updates, if no services are provided, the existing services will be - * considered for deletion. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or updates address locations in service gateway - * operation. - * @param options The options parameters. - */ - beginUpdateAddressLocations( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGatewayUpdateAddressLocationsRequest, - options?: ServiceGatewaysUpdateAddressLocationsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServiceGatewaysUpdateAddressLocationsResponse - > - >; - /** - * Creates or updates address locations within the service gateway. - * - * The request supports both full and partial update modes at two levels: location and address. - * - * Full update replaces all existing data. - * - * Partial update modifies only the specified entries: - * - * For location-level partial updates, if no address is provided, the existing address will be deleted. - * - * For address-level partial updates, if no services are provided, the existing services will be - * considered for deletion. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or updates address locations in service gateway - * operation. - * @param options The options parameters. - */ - beginUpdateAddressLocationsAndWait( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGatewayUpdateAddressLocationsRequest, - options?: ServiceGatewaysUpdateAddressLocationsOptionalParams, - ): Promise; - /** - * Creates, updates, or deletes services within the service gateway. - * The request supports both full and partial update modes at the service level. - * - * Full update replaces all existing services with the new list provided in the request. - * Partial update modifies only the specified services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or updates services in service gateway - * operation. - * @param options The options parameters. - */ - beginUpdateServices( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGatewayUpdateServicesRequest, - options?: ServiceGatewaysUpdateServicesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServiceGatewaysUpdateServicesResponse - > - >; - /** - * Creates, updates, or deletes services within the service gateway. - * The request supports both full and partial update modes at the service level. - * - * Full update replaces all existing services with the new list provided in the request. - * Partial update modifies only the specified services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceGatewayName The name of the service gateway. - * @param parameters Parameters supplied to the create or updates services in service gateway - * operation. - * @param options The options parameters. - */ - beginUpdateServicesAndWait( - resourceGroupName: string, - serviceGatewayName: string, - parameters: ServiceGatewayUpdateServicesRequest, - options?: ServiceGatewaysUpdateServicesOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/serviceTagInformationOperations.ts b/sdk/network/arm-network/src/operationsInterfaces/serviceTagInformationOperations.ts deleted file mode 100644 index b942697c8aa4..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/serviceTagInformationOperations.ts +++ /dev/null @@ -1,27 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - ServiceTagInformation, - ServiceTagInformationListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ServiceTagInformationOperations. */ -export interface ServiceTagInformationOperations { - /** - * Gets a list of service tag information resources with pagination. - * @param location The location that will be used as a reference for cloud (not as a filter based on - * location, you will get the list of service tags with prefix details across all regions but limited - * to the cloud that your subscription belongs to). - * @param options The options parameters. - */ - list( - location: string, - options?: ServiceTagInformationListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/serviceTags.ts b/sdk/network/arm-network/src/operationsInterfaces/serviceTags.ts deleted file mode 100644 index 3aa8af02f992..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/serviceTags.ts +++ /dev/null @@ -1,19 +0,0 @@ -// 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 type { ServiceTagsListOptionalParams, ServiceTagsListResponse } from "../models/index.js"; - -/** Interface representing a ServiceTags. */ -export interface ServiceTags { - /** - * Gets a list of service tag information resources. - * @param location The location that will be used as a reference for version (not as a filter based on - * location, you will get the list of service tags with prefix details across all regions but limited - * to the cloud that your subscription belongs to). - * @param options The options parameters. - */ - list(location: string, options?: ServiceTagsListOptionalParams): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/staticCidrs.ts b/sdk/network/arm-network/src/operationsInterfaces/staticCidrs.ts deleted file mode 100644 index 5d57f7d5b8a1..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/staticCidrs.ts +++ /dev/null @@ -1,98 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - StaticCidr, - StaticCidrsListOptionalParams, - StaticCidrsCreateOptionalParams, - StaticCidrsCreateResponse, - StaticCidrsGetOptionalParams, - StaticCidrsGetResponse, - StaticCidrsDeleteOptionalParams, - StaticCidrsDeleteResponse, -} from "../models/index.js"; - -/// -/** Interface representing a StaticCidrs. */ -export interface StaticCidrs { - /** - * Gets list of Static CIDR resources at Network Manager level. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - options?: StaticCidrsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates/Updates the Static CIDR resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName IP Address Manager Pool resource name. - * @param staticCidrName Static Cidr allocation name. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - staticCidrName: string, - options?: StaticCidrsCreateOptionalParams, - ): Promise; - /** - * Gets the specific Static CIDR resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param staticCidrName StaticCidr resource name to retrieve. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - staticCidrName: string, - options?: StaticCidrsGetOptionalParams, - ): Promise; - /** - * Delete the Static CIDR resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param staticCidrName StaticCidr resource name to delete. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - staticCidrName: string, - options?: StaticCidrsDeleteOptionalParams, - ): Promise< - SimplePollerLike, StaticCidrsDeleteResponse> - >; - /** - * Delete the Static CIDR resource. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param poolName Pool resource name. - * @param staticCidrName StaticCidr resource name to delete. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - poolName: string, - staticCidrName: string, - options?: StaticCidrsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/staticMembers.ts b/sdk/network/arm-network/src/operationsInterfaces/staticMembers.ts deleted file mode 100644 index f857e6a2dc61..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/staticMembers.ts +++ /dev/null @@ -1,81 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - StaticMember, - StaticMembersListOptionalParams, - StaticMembersGetOptionalParams, - StaticMembersGetResponse, - StaticMembersCreateOrUpdateOptionalParams, - StaticMembersCreateOrUpdateResponse, - StaticMembersDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a StaticMembers. */ -export interface StaticMembers { - /** - * Lists the specified static member. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - options?: StaticMembersListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified static member. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param staticMemberName The name of the static member. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - staticMemberName: string, - options?: StaticMembersGetOptionalParams, - ): Promise; - /** - * Creates or updates a static member. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param staticMemberName The name of the static member. - * @param parameters Parameters supplied to the specify the static member to create - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - staticMemberName: string, - parameters: StaticMember, - options?: StaticMembersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a static member. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param networkGroupName The name of the network group. - * @param staticMemberName The name of the static member. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - networkManagerName: string, - networkGroupName: string, - staticMemberName: string, - options?: StaticMembersDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/subnets.ts b/sdk/network/arm-network/src/operationsInterfaces/subnets.ts deleted file mode 100644 index 57ecc68cc6cb..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/subnets.ts +++ /dev/null @@ -1,172 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - Subnet, - SubnetsListOptionalParams, - SubnetsDeleteOptionalParams, - SubnetsGetOptionalParams, - SubnetsGetResponse, - SubnetsCreateOrUpdateOptionalParams, - SubnetsCreateOrUpdateResponse, - PrepareNetworkPoliciesRequest, - SubnetsPrepareNetworkPoliciesOptionalParams, - UnprepareNetworkPoliciesRequest, - SubnetsUnprepareNetworkPoliciesOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Subnets. */ -export interface Subnets { - /** - * Gets all subnets in a virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualNetworkName: string, - options?: SubnetsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified subnet. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - options?: SubnetsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified subnet. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - options?: SubnetsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified subnet by virtual network and resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - options?: SubnetsGetOptionalParams, - ): Promise; - /** - * Creates or updates a subnet in the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param subnetParameters Parameters supplied to the create or update subnet operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - subnetParameters: Subnet, - options?: SubnetsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, SubnetsCreateOrUpdateResponse> - >; - /** - * Creates or updates a subnet in the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param subnetParameters Parameters supplied to the create or update subnet operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - subnetParameters: Subnet, - options?: SubnetsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Prepares a subnet by applying network intent policies. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying - * network intent policies. - * @param options The options parameters. - */ - beginPrepareNetworkPolicies( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, - options?: SubnetsPrepareNetworkPoliciesOptionalParams, - ): Promise, void>>; - /** - * Prepares a subnet by applying network intent policies. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying - * network intent policies. - * @param options The options parameters. - */ - beginPrepareNetworkPoliciesAndWait( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - prepareNetworkPoliciesRequestParameters: PrepareNetworkPoliciesRequest, - options?: SubnetsPrepareNetworkPoliciesOptionalParams, - ): Promise; - /** - * Unprepares a subnet by removing network intent policies. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param unprepareNetworkPoliciesRequestParameters Parameters supplied to unprepare subnet to remove - * network intent policies. - * @param options The options parameters. - */ - beginUnprepareNetworkPolicies( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, - options?: SubnetsUnprepareNetworkPoliciesOptionalParams, - ): Promise, void>>; - /** - * Unprepares a subnet by removing network intent policies. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param subnetName The name of the subnet. - * @param unprepareNetworkPoliciesRequestParameters Parameters supplied to unprepare subnet to remove - * network intent policies. - * @param options The options parameters. - */ - beginUnprepareNetworkPoliciesAndWait( - resourceGroupName: string, - virtualNetworkName: string, - subnetName: string, - unprepareNetworkPoliciesRequestParameters: UnprepareNetworkPoliciesRequest, - options?: SubnetsUnprepareNetworkPoliciesOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/subscriptionNetworkManagerConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/subscriptionNetworkManagerConnections.ts deleted file mode 100644 index 07484369790c..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/subscriptionNetworkManagerConnections.ts +++ /dev/null @@ -1,57 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - NetworkManagerConnection, - SubscriptionNetworkManagerConnectionsListOptionalParams, - SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams, - SubscriptionNetworkManagerConnectionsCreateOrUpdateResponse, - SubscriptionNetworkManagerConnectionsGetOptionalParams, - SubscriptionNetworkManagerConnectionsGetResponse, - SubscriptionNetworkManagerConnectionsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a SubscriptionNetworkManagerConnections. */ -export interface SubscriptionNetworkManagerConnections { - /** - * List all network manager connections created by this subscription. - * @param options The options parameters. - */ - list( - options?: SubscriptionNetworkManagerConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Create a network manager connection on this subscription. - * @param networkManagerConnectionName Name for the network manager connection. - * @param parameters Network manager connection to be created/updated. - * @param options The options parameters. - */ - createOrUpdate( - networkManagerConnectionName: string, - parameters: NetworkManagerConnection, - options?: SubscriptionNetworkManagerConnectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Get a specified connection created by this subscription. - * @param networkManagerConnectionName Name for the network manager connection. - * @param options The options parameters. - */ - get( - networkManagerConnectionName: string, - options?: SubscriptionNetworkManagerConnectionsGetOptionalParams, - ): Promise; - /** - * Delete specified connection created by this subscription. - * @param networkManagerConnectionName Name for the network manager connection. - * @param options The options parameters. - */ - delete( - networkManagerConnectionName: string, - options?: SubscriptionNetworkManagerConnectionsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/usages.ts b/sdk/network/arm-network/src/operationsInterfaces/usages.ts deleted file mode 100644 index 7faa433ee031..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/usages.ts +++ /dev/null @@ -1,19 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { Usage, UsagesListOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a Usages. */ -export interface Usages { - /** - * List network usages for a subscription. - * @param location The location where resource usage is queried. - * @param options The options parameters. - */ - list(location: string, options?: UsagesListOptionalParams): PagedAsyncIterableIterator; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/verifierWorkspaces.ts b/sdk/network/arm-network/src/operationsInterfaces/verifierWorkspaces.ts deleted file mode 100644 index 2aa2d909fce6..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/verifierWorkspaces.ts +++ /dev/null @@ -1,108 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VerifierWorkspace, - VerifierWorkspacesListOptionalParams, - VerifierWorkspacesGetOptionalParams, - VerifierWorkspacesGetResponse, - VerifierWorkspacesCreateOptionalParams, - VerifierWorkspacesCreateResponse, - VerifierWorkspacesUpdateOptionalParams, - VerifierWorkspacesUpdateResponse, - VerifierWorkspacesDeleteOptionalParams, - VerifierWorkspacesDeleteResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VerifierWorkspaces. */ -export interface VerifierWorkspaces { - /** - * Gets list of Verifier Workspaces. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkManagerName: string, - options?: VerifierWorkspacesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets Verifier Workspace. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: VerifierWorkspacesGetOptionalParams, - ): Promise; - /** - * Creates Verifier Workspace. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param body Verifier Workspace object to create/update. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - body: VerifierWorkspace, - options?: VerifierWorkspacesCreateOptionalParams, - ): Promise; - /** - * Updates Verifier Workspace. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: VerifierWorkspacesUpdateOptionalParams, - ): Promise; - /** - * Deletes Verifier Workspace. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: VerifierWorkspacesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VerifierWorkspacesDeleteResponse - > - >; - /** - * Deletes Verifier Workspace. - * @param resourceGroupName The name of the resource group. - * @param networkManagerName The name of the network manager. - * @param workspaceName Workspace name. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkManagerName: string, - workspaceName: string, - options?: VerifierWorkspacesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/vipSwap.ts b/sdk/network/arm-network/src/operationsInterfaces/vipSwap.ts deleted file mode 100644 index 7409e4879a7e..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/vipSwap.ts +++ /dev/null @@ -1,71 +0,0 @@ -// 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 type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VipSwapGetOptionalParams, - VipSwapGetResponse, - SwapResource, - VipSwapCreateOptionalParams, - VipSwapListOptionalParams, - VipSwapListResponse, -} from "../models/index.js"; - -/** Interface representing a VipSwap. */ -export interface VipSwap { - /** - * Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type - * on a cloud service can either be Staging or Production - * @param groupName The name of the resource group. - * @param resourceName The name of the cloud service. - * @param options The options parameters. - */ - get( - groupName: string, - resourceName: string, - options?: VipSwapGetOptionalParams, - ): Promise; - /** - * Performs vip swap operation on swappable cloud services. - * @param groupName The name of the resource group. - * @param resourceName The name of the cloud service. - * @param parameters SwapResource object where slot type should be the target slot after vip swap for - * the specified cloud service. - * @param options The options parameters. - */ - beginCreate( - groupName: string, - resourceName: string, - parameters: SwapResource, - options?: VipSwapCreateOptionalParams, - ): Promise, void>>; - /** - * Performs vip swap operation on swappable cloud services. - * @param groupName The name of the resource group. - * @param resourceName The name of the cloud service. - * @param parameters SwapResource object where slot type should be the target slot after vip swap for - * the specified cloud service. - * @param options The options parameters. - */ - beginCreateAndWait( - groupName: string, - resourceName: string, - parameters: SwapResource, - options?: VipSwapCreateOptionalParams, - ): Promise; - /** - * Gets the list of SwapResource which identifies the slot type for the specified cloud service. The - * slot type on a cloud service can either be Staging or Production - * @param groupName The name of the resource group. - * @param resourceName The name of the cloud service. - * @param options The options parameters. - */ - list( - groupName: string, - resourceName: string, - options?: VipSwapListOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualApplianceSites.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualApplianceSites.ts deleted file mode 100644 index 6bbfed27dfc7..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualApplianceSites.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualApplianceSite, - VirtualApplianceSitesListOptionalParams, - VirtualApplianceSitesDeleteOptionalParams, - VirtualApplianceSitesGetOptionalParams, - VirtualApplianceSitesGetResponse, - VirtualApplianceSitesCreateOrUpdateOptionalParams, - VirtualApplianceSitesCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualApplianceSites. */ -export interface VirtualApplianceSites { - /** - * Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - networkVirtualApplianceName: string, - options?: VirtualApplianceSitesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified site from a Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param siteName The name of the site. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - networkVirtualApplianceName: string, - siteName: string, - options?: VirtualApplianceSitesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified site from a Virtual Appliance. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param siteName The name of the site. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - siteName: string, - options?: VirtualApplianceSitesDeleteOptionalParams, - ): Promise; - /** - * Gets the specified Virtual Appliance Site. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param siteName The name of the site. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - networkVirtualApplianceName: string, - siteName: string, - options?: VirtualApplianceSitesGetOptionalParams, - ): Promise; - /** - * Creates or updates the specified Network Virtual Appliance Site. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param siteName The name of the site. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance Site - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - networkVirtualApplianceName: string, - siteName: string, - parameters: VirtualApplianceSite, - options?: VirtualApplianceSitesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualApplianceSitesCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified Network Virtual Appliance Site. - * @param resourceGroupName The name of the resource group. - * @param networkVirtualApplianceName The name of the Network Virtual Appliance. - * @param siteName The name of the site. - * @param parameters Parameters supplied to the create or update Network Virtual Appliance Site - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - networkVirtualApplianceName: string, - siteName: string, - parameters: VirtualApplianceSite, - options?: VirtualApplianceSitesCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualApplianceSkus.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualApplianceSkus.ts deleted file mode 100644 index d2c92bc277c1..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualApplianceSkus.ts +++ /dev/null @@ -1,34 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - NetworkVirtualApplianceSku, - VirtualApplianceSkusListOptionalParams, - VirtualApplianceSkusGetOptionalParams, - VirtualApplianceSkusGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualApplianceSkus. */ -export interface VirtualApplianceSkus { - /** - * List all SKUs available for a virtual appliance. - * @param options The options parameters. - */ - list( - options?: VirtualApplianceSkusListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves a single available sku for network virtual appliance. - * @param skuName Name of the Sku. - * @param options The options parameters. - */ - get( - skuName: string, - options?: VirtualApplianceSkusGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualHubBgpConnection.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualHubBgpConnection.ts deleted file mode 100644 index 87b0334d8f0c..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualHubBgpConnection.ts +++ /dev/null @@ -1,95 +0,0 @@ -// 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 type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualHubBgpConnectionGetOptionalParams, - VirtualHubBgpConnectionGetResponse, - BgpConnection, - VirtualHubBgpConnectionCreateOrUpdateOptionalParams, - VirtualHubBgpConnectionCreateOrUpdateResponse, - VirtualHubBgpConnectionDeleteOptionalParams, -} from "../models/index.js"; - -/** Interface representing a VirtualHubBgpConnection. */ -export interface VirtualHubBgpConnection { - /** - * Retrieves the details of a Virtual Hub Bgp Connection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionGetOptionalParams, - ): Promise; - /** - * Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing - * VirtualHubBgpConnection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the connection. - * @param parameters Parameters of Bgp connection. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - parameters: BgpConnection, - options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubBgpConnectionCreateOrUpdateResponse - > - >; - /** - * Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing - * VirtualHubBgpConnection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the connection. - * @param parameters Parameters of Bgp connection. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - parameters: BgpConnection, - options?: VirtualHubBgpConnectionCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a VirtualHubBgpConnection. - * @param resourceGroupName The resource group name of the VirtualHubBgpConnection. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the connection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a VirtualHubBgpConnection. - * @param resourceGroupName The resource group name of the VirtualHubBgpConnection. - * @param virtualHubName The name of the VirtualHub. - * @param connectionName The name of the connection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualHubBgpConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualHubBgpConnections.ts deleted file mode 100644 index cd4751bade66..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualHubBgpConnections.ts +++ /dev/null @@ -1,94 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - BgpConnection, - VirtualHubBgpConnectionsListOptionalParams, - VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, - VirtualHubBgpConnectionsListLearnedRoutesResponse, - VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, - VirtualHubBgpConnectionsListAdvertisedRoutesResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualHubBgpConnections. */ -export interface VirtualHubBgpConnections { - /** - * Retrieves the details of all VirtualHubBgpConnections. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubBgpConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves a list of routes the virtual hub bgp connection has learned. - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the virtual hub. - * @param connectionName The name of the virtual hub bgp connection. - * @param options The options parameters. - */ - beginListLearnedRoutes( - resourceGroupName: string, - hubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubBgpConnectionsListLearnedRoutesResponse - > - >; - /** - * Retrieves a list of routes the virtual hub bgp connection has learned. - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the virtual hub. - * @param connectionName The name of the virtual hub bgp connection. - * @param options The options parameters. - */ - beginListLearnedRoutesAndWait( - resourceGroupName: string, - hubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionsListLearnedRoutesOptionalParams, - ): Promise; - /** - * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the virtual hub. - * @param connectionName The name of the virtual hub bgp connection. - * @param options The options parameters. - */ - beginListAdvertisedRoutes( - resourceGroupName: string, - hubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubBgpConnectionsListAdvertisedRoutesResponse - > - >; - /** - * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the virtual hub. - * @param connectionName The name of the virtual hub bgp connection. - * @param options The options parameters. - */ - beginListAdvertisedRoutesAndWait( - resourceGroupName: string, - hubName: string, - connectionName: string, - options?: VirtualHubBgpConnectionsListAdvertisedRoutesOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualHubIpConfiguration.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualHubIpConfiguration.ts deleted file mode 100644 index 5b67105440b4..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualHubIpConfiguration.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - HubIpConfiguration, - VirtualHubIpConfigurationListOptionalParams, - VirtualHubIpConfigurationGetOptionalParams, - VirtualHubIpConfigurationGetResponse, - VirtualHubIpConfigurationCreateOrUpdateOptionalParams, - VirtualHubIpConfigurationCreateOrUpdateResponse, - VirtualHubIpConfigurationDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualHubIpConfiguration. */ -export interface VirtualHubIpConfiguration { - /** - * Retrieves the details of all VirtualHubIpConfigurations. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubIpConfigurationListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves the details of a Virtual Hub Ip configuration. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param ipConfigName The name of the ipconfig. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - ipConfigName: string, - options?: VirtualHubIpConfigurationGetOptionalParams, - ): Promise; - /** - * Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing - * VirtualHubIpConfiguration. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param ipConfigName The name of the ipconfig. - * @param parameters Hub Ip Configuration parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - ipConfigName: string, - parameters: HubIpConfiguration, - options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubIpConfigurationCreateOrUpdateResponse - > - >; - /** - * Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing - * VirtualHubIpConfiguration. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param ipConfigName The name of the ipconfig. - * @param parameters Hub Ip Configuration parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - ipConfigName: string, - parameters: HubIpConfiguration, - options?: VirtualHubIpConfigurationCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a VirtualHubIpConfiguration. - * @param resourceGroupName The resource group name of the VirtualHubBgpConnection. - * @param virtualHubName The name of the VirtualHub. - * @param ipConfigName The name of the ipconfig. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualHubName: string, - ipConfigName: string, - options?: VirtualHubIpConfigurationDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a VirtualHubIpConfiguration. - * @param resourceGroupName The resource group name of the VirtualHubBgpConnection. - * @param virtualHubName The name of the VirtualHub. - * @param ipConfigName The name of the ipconfig. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - ipConfigName: string, - options?: VirtualHubIpConfigurationDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualHubRouteTableV2S.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualHubRouteTableV2S.ts deleted file mode 100644 index 0e71b301e4d6..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualHubRouteTableV2S.ts +++ /dev/null @@ -1,111 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualHubRouteTableV2, - VirtualHubRouteTableV2SListOptionalParams, - VirtualHubRouteTableV2SGetOptionalParams, - VirtualHubRouteTableV2SGetResponse, - VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, - VirtualHubRouteTableV2SCreateOrUpdateResponse, - VirtualHubRouteTableV2SDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualHubRouteTableV2S. */ -export interface VirtualHubRouteTableV2S { - /** - * Retrieves the details of all VirtualHubRouteTableV2s. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubRouteTableV2SListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves the details of a VirtualHubRouteTableV2. - * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the VirtualHubRouteTableV2. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: VirtualHubRouteTableV2SGetOptionalParams, - ): Promise; - /** - * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing - * VirtualHubRouteTableV2. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the VirtualHubRouteTableV2. - * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update - * VirtualHubRouteTableV2. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, - options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubRouteTableV2SCreateOrUpdateResponse - > - >; - /** - * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing - * VirtualHubRouteTableV2. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the VirtualHubRouteTableV2. - * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update - * VirtualHubRouteTableV2. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - virtualHubRouteTableV2Parameters: VirtualHubRouteTableV2, - options?: VirtualHubRouteTableV2SCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a VirtualHubRouteTableV2. - * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the VirtualHubRouteTableV2. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: VirtualHubRouteTableV2SDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a VirtualHubRouteTableV2. - * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. - * @param virtualHubName The name of the VirtualHub. - * @param routeTableName The name of the VirtualHubRouteTableV2. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - routeTableName: string, - options?: VirtualHubRouteTableV2SDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualHubs.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualHubs.ts deleted file mode 100644 index 484e034d3d3a..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualHubs.ts +++ /dev/null @@ -1,218 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualHub, - VirtualHubsListByResourceGroupOptionalParams, - VirtualHubsListOptionalParams, - VirtualHubsGetOptionalParams, - VirtualHubsGetResponse, - VirtualHubsCreateOrUpdateOptionalParams, - VirtualHubsCreateOrUpdateResponse, - TagsObject, - VirtualHubsUpdateTagsOptionalParams, - VirtualHubsUpdateTagsResponse, - VirtualHubsDeleteOptionalParams, - VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, - VirtualHubsGetEffectiveVirtualHubRoutesResponse, - GetInboundRoutesParameters, - VirtualHubsGetInboundRoutesOptionalParams, - VirtualHubsGetInboundRoutesResponse, - GetOutboundRoutesParameters, - VirtualHubsGetOutboundRoutesOptionalParams, - VirtualHubsGetOutboundRoutesResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualHubs. */ -export interface VirtualHubs { - /** - * Lists all the VirtualHubs in a resource group. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VirtualHubsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists all the VirtualHubs in a subscription. - * @param options The options parameters. - */ - list(options?: VirtualHubsListOptionalParams): PagedAsyncIterableIterator; - /** - * Retrieves the details of a VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubsGetOptionalParams, - ): Promise; - /** - * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param virtualHubParameters Parameters supplied to create or update VirtualHub. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualHubName: string, - virtualHubParameters: VirtualHub, - options?: VirtualHubsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubsCreateOrUpdateResponse - > - >; - /** - * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param virtualHubParameters Parameters supplied to create or update VirtualHub. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualHubName: string, - virtualHubParameters: VirtualHub, - options?: VirtualHubsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates VirtualHub tags. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param virtualHubParameters Parameters supplied to update VirtualHub tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - virtualHubName: string, - virtualHubParameters: TagsObject, - options?: VirtualHubsUpdateTagsOptionalParams, - ): Promise; - /** - * Deletes a VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a VirtualHub. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubsDeleteOptionalParams, - ): Promise; - /** - * Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - beginGetEffectiveVirtualHubRoutes( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubsGetEffectiveVirtualHubRoutesResponse - > - >; - /** - * Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param options The options parameters. - */ - beginGetEffectiveVirtualHubRoutesAndWait( - resourceGroupName: string, - virtualHubName: string, - options?: VirtualHubsGetEffectiveVirtualHubRoutesOptionalParams, - ): Promise; - /** - * Gets the inbound routes configured for the Virtual Hub on a particular connection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param getInboundRoutesParameters Parameters supplied to get the inbound routes for a connection - * resource. - * @param options The options parameters. - */ - beginGetInboundRoutes( - resourceGroupName: string, - virtualHubName: string, - getInboundRoutesParameters: GetInboundRoutesParameters, - options?: VirtualHubsGetInboundRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubsGetInboundRoutesResponse - > - >; - /** - * Gets the inbound routes configured for the Virtual Hub on a particular connection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param getInboundRoutesParameters Parameters supplied to get the inbound routes for a connection - * resource. - * @param options The options parameters. - */ - beginGetInboundRoutesAndWait( - resourceGroupName: string, - virtualHubName: string, - getInboundRoutesParameters: GetInboundRoutesParameters, - options?: VirtualHubsGetInboundRoutesOptionalParams, - ): Promise; - /** - * Gets the outbound routes configured for the Virtual Hub on a particular connection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param getOutboundRoutesParameters Parameters supplied to get the outbound routes for a connection - * resource. - * @param options The options parameters. - */ - beginGetOutboundRoutes( - resourceGroupName: string, - virtualHubName: string, - getOutboundRoutesParameters: GetOutboundRoutesParameters, - options?: VirtualHubsGetOutboundRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualHubsGetOutboundRoutesResponse - > - >; - /** - * Gets the outbound routes configured for the Virtual Hub on a particular connection. - * @param resourceGroupName The resource group name of the VirtualHub. - * @param virtualHubName The name of the VirtualHub. - * @param getOutboundRoutesParameters Parameters supplied to get the outbound routes for a connection - * resource. - * @param options The options parameters. - */ - beginGetOutboundRoutesAndWait( - resourceGroupName: string, - virtualHubName: string, - getOutboundRoutesParameters: GetOutboundRoutesParameters, - options?: VirtualHubsGetOutboundRoutesOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkAppliances.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkAppliances.ts deleted file mode 100644 index 706d8bfdff65..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkAppliances.ts +++ /dev/null @@ -1,125 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualNetworkAppliance, - VirtualNetworkAppliancesListAllOptionalParams, - VirtualNetworkAppliancesListOptionalParams, - VirtualNetworkAppliancesDeleteOptionalParams, - VirtualNetworkAppliancesDeleteResponse, - VirtualNetworkAppliancesGetOptionalParams, - VirtualNetworkAppliancesGetResponse, - VirtualNetworkAppliancesCreateOrUpdateOptionalParams, - VirtualNetworkAppliancesCreateOrUpdateResponse, - TagsObject, - VirtualNetworkAppliancesUpdateTagsOptionalParams, - VirtualNetworkAppliancesUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualNetworkAppliances. */ -export interface VirtualNetworkAppliances { - /** - * Gets all virtual network appliances in a subscription. - * @param options The options parameters. - */ - listAll( - options?: VirtualNetworkAppliancesListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all virtual network appliances in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: VirtualNetworkAppliancesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified virtual network appliance. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualNetworkApplianceName: string, - options?: VirtualNetworkAppliancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkAppliancesDeleteResponse - > - >; - /** - * Deletes the specified virtual network appliance. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkApplianceName: string, - options?: VirtualNetworkAppliancesDeleteOptionalParams, - ): Promise; - /** - * Gets information about the specified virtual network appliance. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkApplianceName: string, - options?: VirtualNetworkAppliancesGetOptionalParams, - ): Promise; - /** - * Creates or updates a virtual network appliance. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param parameters Parameters supplied to the create or update virtual network appliance operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkApplianceName: string, - parameters: VirtualNetworkAppliance, - options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkAppliancesCreateOrUpdateResponse - > - >; - /** - * Creates or updates a virtual network appliance. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param parameters Parameters supplied to the create or update virtual network appliance operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkApplianceName: string, - parameters: VirtualNetworkAppliance, - options?: VirtualNetworkAppliancesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates a virtual network appliance tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkApplianceName The name of the virtual network appliance. - * @param parameters Parameters supplied to update virtual network appliance tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - virtualNetworkApplianceName: string, - parameters: TagsObject, - options?: VirtualNetworkAppliancesUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGatewayConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGatewayConnections.ts deleted file mode 100644 index a948bad6c443..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGatewayConnections.ts +++ /dev/null @@ -1,347 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualNetworkGatewayConnection, - VirtualNetworkGatewayConnectionsListOptionalParams, - VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, - VirtualNetworkGatewayConnectionsCreateOrUpdateResponse, - VirtualNetworkGatewayConnectionsGetOptionalParams, - VirtualNetworkGatewayConnectionsGetResponse, - VirtualNetworkGatewayConnectionsDeleteOptionalParams, - TagsObject, - VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, - VirtualNetworkGatewayConnectionsUpdateTagsResponse, - ConnectionSharedKey, - VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, - VirtualNetworkGatewayConnectionsSetSharedKeyResponse, - VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams, - VirtualNetworkGatewayConnectionsGetSharedKeyResponse, - ConnectionResetSharedKey, - VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, - VirtualNetworkGatewayConnectionsResetSharedKeyResponse, - VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, - VirtualNetworkGatewayConnectionsStartPacketCaptureResponse, - VpnPacketCaptureStopParameters, - VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, - VirtualNetworkGatewayConnectionsStopPacketCaptureResponse, - VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, - VirtualNetworkGatewayConnectionsGetIkeSasResponse, - VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualNetworkGatewayConnections. */ -export interface VirtualNetworkGatewayConnections { - /** - * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways - * connections created. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: VirtualNetworkGatewayConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates or updates a virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param parameters Parameters supplied to the create or update virtual network gateway connection - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: VirtualNetworkGatewayConnection, - options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param parameters Parameters supplied to the create or update virtual network gateway connection - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: VirtualNetworkGatewayConnection, - options?: VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Gets the specified virtual network gateway connection by resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsGetOptionalParams, - ): Promise; - /** - * Deletes the specified virtual network Gateway connection. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified virtual network Gateway connection. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsDeleteOptionalParams, - ): Promise; - /** - * Updates a virtual network gateway connection tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param parameters Parameters supplied to update virtual network gateway connection tags. - * @param options The options parameters. - */ - beginUpdateTags( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: TagsObject, - options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsUpdateTagsResponse - > - >; - /** - * Updates a virtual network gateway connection tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param parameters Parameters supplied to update virtual network gateway connection tags. - * @param options The options parameters. - */ - beginUpdateTagsAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: TagsObject, - options?: VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams, - ): Promise; - /** - * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway - * connection shared key for passed virtual network gateway connection in the specified resource group - * through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key - * operation throughNetwork resource provider. - * @param options The options parameters. - */ - beginSetSharedKey( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: ConnectionSharedKey, - options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsSetSharedKeyResponse - > - >; - /** - * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway - * connection shared key for passed virtual network gateway connection in the specified resource group - * through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key - * operation throughNetwork resource provider. - * @param options The options parameters. - */ - beginSetSharedKeyAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: ConnectionSharedKey, - options?: VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams, - ): Promise; - /** - * The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified - * virtual network gateway connection shared key through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The virtual network gateway connection shared key name. - * @param options The options parameters. - */ - getSharedKey( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams, - ): Promise; - /** - * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway - * connection shared key for passed virtual network gateway connection in the specified resource group - * through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key - * Name. - * @param parameters Parameters supplied to the begin reset virtual network gateway connection shared - * key operation through network resource provider. - * @param options The options parameters. - */ - beginResetSharedKey( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: ConnectionResetSharedKey, - options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsResetSharedKeyResponse - > - >; - /** - * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway - * connection shared key for passed virtual network gateway connection in the specified resource group - * through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key - * Name. - * @param parameters Parameters supplied to the begin reset virtual network gateway connection shared - * key operation through network resource provider. - * @param options The options parameters. - */ - beginResetSharedKeyAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: ConnectionResetSharedKey, - options?: VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams, - ): Promise; - /** - * Starts packet capture on virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param options The options parameters. - */ - beginStartPacketCapture( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsStartPacketCaptureResponse - > - >; - /** - * Starts packet capture on virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param options The options parameters. - */ - beginStartPacketCaptureAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams, - ): Promise; - /** - * Stops packet capture on virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param parameters Virtual network gateway packet capture parameters supplied to stop packet capture - * on gateway connection. - * @param options The options parameters. - */ - beginStopPacketCapture( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: VpnPacketCaptureStopParameters, - options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsStopPacketCaptureResponse - > - >; - /** - * Stops packet capture on virtual network gateway connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param parameters Virtual network gateway packet capture parameters supplied to stop packet capture - * on gateway connection. - * @param options The options parameters. - */ - beginStopPacketCaptureAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: VpnPacketCaptureStopParameters, - options?: VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams, - ): Promise; - /** - * Lists IKE Security Associations for the virtual network gateway connection in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param options The options parameters. - */ - beginGetIkeSas( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayConnectionsGetIkeSasResponse - > - >; - /** - * Lists IKE Security Associations for the virtual network gateway connection in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param options The options parameters. - */ - beginGetIkeSasAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams, - ): Promise; - /** - * Resets the virtual network gateway connection specified. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param options The options parameters. - */ - beginResetConnection( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, - ): Promise, void>>; - /** - * Resets the virtual network gateway connection specified. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. - * @param options The options parameters. - */ - beginResetConnectionAndWait( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - options?: VirtualNetworkGatewayConnectionsResetConnectionOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGatewayNatRules.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGatewayNatRules.ts deleted file mode 100644 index 611a4b5b7b17..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGatewayNatRules.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualNetworkGatewayNatRule, - VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, - VirtualNetworkGatewayNatRulesGetOptionalParams, - VirtualNetworkGatewayNatRulesGetResponse, - VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, - VirtualNetworkGatewayNatRulesCreateOrUpdateResponse, - VirtualNetworkGatewayNatRulesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualNetworkGatewayNatRules. */ -export interface VirtualNetworkGatewayNatRules { - /** - * Retrieves all nat rules for a particular virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - listByVirtualNetworkGateway( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves the details of a nat rule. - * @param resourceGroupName The resource group name of the Virtual Network Gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkGatewayName: string, - natRuleName: string, - options?: VirtualNetworkGatewayNatRulesGetOptionalParams, - ): Promise; - /** - * Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the - * existing nat rules. - * @param resourceGroupName The resource group name of the Virtual Network Gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param natRuleParameters Parameters supplied to create or Update a Nat Rule. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkGatewayName: string, - natRuleName: string, - natRuleParameters: VirtualNetworkGatewayNatRule, - options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewayNatRulesCreateOrUpdateResponse - > - >; - /** - * Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the - * existing nat rules. - * @param resourceGroupName The resource group name of the Virtual Network Gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param natRuleParameters Parameters supplied to create or Update a Nat Rule. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - natRuleName: string, - natRuleParameters: VirtualNetworkGatewayNatRule, - options?: VirtualNetworkGatewayNatRulesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a nat rule. - * @param resourceGroupName The resource group name of the Virtual Network Gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualNetworkGatewayName: string, - natRuleName: string, - options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a nat rule. - * @param resourceGroupName The resource group name of the Virtual Network Gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param natRuleName The name of the nat rule. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - natRuleName: string, - options?: VirtualNetworkGatewayNatRulesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGateways.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGateways.ts deleted file mode 100644 index 80e909a0f2cb..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGateways.ts +++ /dev/null @@ -1,966 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualNetworkGateway, - VirtualNetworkGatewaysListOptionalParams, - VirtualNetworkGatewayConnectionListEntity, - VirtualNetworkGatewaysListConnectionsOptionalParams, - VirtualNetworkGatewaysCreateOrUpdateOptionalParams, - VirtualNetworkGatewaysCreateOrUpdateResponse, - VirtualNetworkGatewaysGetOptionalParams, - VirtualNetworkGatewaysGetResponse, - VirtualNetworkGatewaysDeleteOptionalParams, - TagsObject, - VirtualNetworkGatewaysUpdateTagsOptionalParams, - VirtualNetworkGatewaysUpdateTagsResponse, - VirtualNetworkGatewaysResetOptionalParams, - VirtualNetworkGatewaysResetResponse, - VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, - VpnClientParameters, - VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, - VirtualNetworkGatewaysGeneratevpnclientpackageResponse, - VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, - VirtualNetworkGatewaysGenerateVpnProfileResponse, - VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, - VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse, - VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, - VirtualNetworkGatewaysGetBgpPeerStatusResponse, - VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams, - VirtualNetworkGatewaysSupportedVpnDevicesResponse, - VirtualNetworkGatewaysListRadiusSecretsOptionalParams, - VirtualNetworkGatewaysListRadiusSecretsResponse, - VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, - VirtualNetworkGatewaysGetLearnedRoutesResponse, - VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, - VirtualNetworkGatewaysGetAdvertisedRoutesResponse, - VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, - VirtualNetworkGatewaysGetResiliencyInformationResponse, - VirtualNetworkGatewaysGetRoutesInformationOptionalParams, - VirtualNetworkGatewaysGetRoutesInformationResponse, - VpnClientIPsecParameters, - VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, - VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse, - VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, - VirtualNetworkGatewaysGetVpnclientIpsecParametersResponse, - VpnDeviceScriptParameters, - VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams, - VirtualNetworkGatewaysVpnDeviceConfigurationScriptResponse, - VirtualNetworkGatewaysStartPacketCaptureOptionalParams, - VirtualNetworkGatewaysStartPacketCaptureResponse, - VpnPacketCaptureStopParameters, - VirtualNetworkGatewaysStopPacketCaptureOptionalParams, - VirtualNetworkGatewaysStopPacketCaptureResponse, - VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, - VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse, - VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, - VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse, - VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, - VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse, - ExpressRouteFailoverStopApiParameters, - VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, - VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse, - VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, - VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse, - P2SVpnConnectionRequest, - VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, - VirtualNetworkGatewayMigrationParameters, - VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, - VirtualNetworkGatewaysInvokePrepareMigrationResponse, - VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, - VirtualNetworkGatewaysInvokeExecuteMigrationResponse, - VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, - VirtualNetworkGatewaysInvokeCommitMigrationResponse, - VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, - VirtualNetworkGatewaysInvokeAbortMigrationResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualNetworkGateways. */ -export interface VirtualNetworkGateways { - /** - * Gets all virtual network gateways by resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: VirtualNetworkGatewaysListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the connections in a virtual network gateway. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - listConnections( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysListConnectionsOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates or updates a virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to create or update virtual network gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VirtualNetworkGateway, - options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysCreateOrUpdateResponse - > - >; - /** - * Creates or updates a virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to create or update virtual network gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VirtualNetworkGateway, - options?: VirtualNetworkGatewaysCreateOrUpdateOptionalParams, - ): Promise; - /** - * Gets the specified virtual network gateway by resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetOptionalParams, - ): Promise; - /** - * Deletes the specified virtual network gateway. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified virtual network gateway. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysDeleteOptionalParams, - ): Promise; - /** - * Updates a virtual network gateway tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to update virtual network gateway tags. - * @param options The options parameters. - */ - beginUpdateTags( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: TagsObject, - options?: VirtualNetworkGatewaysUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysUpdateTagsResponse - > - >; - /** - * Updates a virtual network gateway tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to update virtual network gateway tags. - * @param options The options parameters. - */ - beginUpdateTagsAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: TagsObject, - options?: VirtualNetworkGatewaysUpdateTagsOptionalParams, - ): Promise; - /** - * Resets the primary of the virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginReset( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysResetOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysResetResponse - > - >; - /** - * Resets the primary of the virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginResetAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysResetOptionalParams, - ): Promise; - /** - * Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginResetVpnClientSharedKey( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, - ): Promise, void>>; - /** - * Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginResetVpnClientSharedKeyAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams, - ): Promise; - /** - * Generates VPN client package for P2S client of the virtual network gateway in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package - * operation. - * @param options The options parameters. - */ - beginGeneratevpnclientpackage( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnClientParameters, - options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGeneratevpnclientpackageResponse - > - >; - /** - * Generates VPN client package for P2S client of the virtual network gateway in the specified resource - * group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package - * operation. - * @param options The options parameters. - */ - beginGeneratevpnclientpackageAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnClientParameters, - options?: VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams, - ): Promise; - /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. - * Used for IKEV2 and radius based authentication. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package - * operation. - * @param options The options parameters. - */ - beginGenerateVpnProfile( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnClientParameters, - options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGenerateVpnProfileResponse - > - >; - /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. - * Used for IKEV2 and radius based authentication. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package - * operation. - * @param options The options parameters. - */ - beginGenerateVpnProfileAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnClientParameters, - options?: VirtualNetworkGatewaysGenerateVpnProfileOptionalParams, - ): Promise; - /** - * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified - * resource group. The profile needs to be generated first using generateVpnProfile. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetVpnProfilePackageUrl( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse - > - >; - /** - * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified - * resource group. The profile needs to be generated first using generateVpnProfile. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetVpnProfilePackageUrlAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams, - ): Promise; - /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetBgpPeerStatus( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetBgpPeerStatusResponse - > - >; - /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetBgpPeerStatusAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams, - ): Promise; - /** - * Gets a xml format representation for supported vpn devices. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - supportedVpnDevices( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams, - ): Promise; - /** - * List all Radius servers with respective radius secrets from virtual network gateway - * VpnClientConfiguration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - listRadiusSecrets( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysListRadiusSecretsOptionalParams, - ): Promise; - /** - * This operation retrieves a list of routes the virtual network gateway has learned, including routes - * learned from BGP peers. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetLearnedRoutes( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetLearnedRoutesResponse - > - >; - /** - * This operation retrieves a list of routes the virtual network gateway has learned, including routes - * learned from BGP peers. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetLearnedRoutesAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams, - ): Promise; - /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the - * specified peer. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer. - * @param options The options parameters. - */ - beginGetAdvertisedRoutes( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peer: string, - options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetAdvertisedRoutesResponse - > - >; - /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the - * specified peer. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer. - * @param options The options parameters. - */ - beginGetAdvertisedRoutesAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peer: string, - options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams, - ): Promise; - /** - * This operation retrieves the resiliency information for an Express Route Gateway, including the - * gateway's current resiliency score and recommendations to further improve the score - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetResiliencyInformation( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetResiliencyInformationResponse - > - >; - /** - * This operation retrieves the resiliency information for an Express Route Gateway, including the - * gateway's current resiliency score and recommendations to further improve the score - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetResiliencyInformationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetResiliencyInformationOptionalParams, - ): Promise; - /** - * This operation retrieves the route set information for an Express Route Gateway based on their - * resiliency - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetRoutesInformation( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetRoutesInformationResponse - > - >; - /** - * This operation retrieves the route set information for an Express Route Gateway based on their - * resiliency - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetRoutesInformationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetRoutesInformationOptionalParams, - ): Promise; - /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual - * network gateway in the specified resource group through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of - * Virtual Network Gateway P2S client operation through Network resource provider. - * @param options The options parameters. - */ - beginSetVpnclientIpsecParameters( - resourceGroupName: string, - virtualNetworkGatewayName: string, - vpnclientIpsecParams: VpnClientIPsecParameters, - options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse - > - >; - /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual - * network gateway in the specified resource group through Network resource provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of - * Virtual Network Gateway P2S client operation through Network resource provider. - * @param options The options parameters. - */ - beginSetVpnclientIpsecParametersAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - vpnclientIpsecParams: VpnClientIPsecParameters, - options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams, - ): Promise; - /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy - * for P2S client of virtual network gateway in the specified resource group through Network resource - * provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. - * @param options The options parameters. - */ - beginGetVpnclientIpsecParameters( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetVpnclientIpsecParametersResponse - > - >; - /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy - * for P2S client of virtual network gateway in the specified resource group through Network resource - * provider. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. - * @param options The options parameters. - */ - beginGetVpnclientIpsecParametersAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams, - ): Promise; - /** - * Gets a xml format representation for vpn device configuration script. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for - * which the configuration script is generated. - * @param parameters Parameters supplied to the generate vpn device script operation. - * @param options The options parameters. - */ - vpnDeviceConfigurationScript( - resourceGroupName: string, - virtualNetworkGatewayConnectionName: string, - parameters: VpnDeviceScriptParameters, - options?: VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams, - ): Promise; - /** - * Starts packet capture on virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginStartPacketCapture( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysStartPacketCaptureResponse - > - >; - /** - * Starts packet capture on virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginStartPacketCaptureAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams, - ): Promise; - /** - * Stops packet capture on virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Virtual network gateway packet capture parameters supplied to stop packet capture - * on gateway. - * @param options The options parameters. - */ - beginStopPacketCapture( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnPacketCaptureStopParameters, - options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysStopPacketCaptureResponse - > - >; - /** - * Stops packet capture on virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Virtual network gateway packet capture parameters supplied to stop packet capture - * on gateway. - * @param options The options parameters. - */ - beginStopPacketCaptureAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - parameters: VpnPacketCaptureStopParameters, - options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams, - ): Promise; - /** - * This operation retrieves the details of all the failover tests performed on the gateway for - * different peering locations - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param typeParam The type of failover test - * @param fetchLatest Fetch only the latest tests for each peering location - * @param options The options parameters. - */ - beginGetFailoverAllTestDetails( - resourceGroupName: string, - virtualNetworkGatewayName: string, - typeParam: string, - fetchLatest: boolean, - options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse - > - >; - /** - * This operation retrieves the details of all the failover tests performed on the gateway for - * different peering locations - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param typeParam The type of failover test - * @param fetchLatest Fetch only the latest tests for each peering location - * @param options The options parameters. - */ - beginGetFailoverAllTestDetailsAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - typeParam: string, - fetchLatest: boolean, - options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, - ): Promise; - /** - * This operation retrieves the details of a particular failover test performed on the gateway based on - * the test Guid - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peeringLocation Peering location of the test - * @param failoverTestId The unique Guid value which identifies the test - * @param options The options parameters. - */ - beginGetFailoverSingleTestDetails( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peeringLocation: string, - failoverTestId: string, - options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse - > - >; - /** - * This operation retrieves the details of a particular failover test performed on the gateway based on - * the test Guid - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peeringLocation Peering location of the test - * @param failoverTestId The unique Guid value which identifies the test - * @param options The options parameters. - */ - beginGetFailoverSingleTestDetailsAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peeringLocation: string, - failoverTestId: string, - options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, - ): Promise; - /** - * This operation starts failover simulation on the gateway for the specified peering location - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peeringLocation Peering location of the test - * @param options The options parameters. - */ - beginStartExpressRouteSiteFailoverSimulation( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peeringLocation: string, - options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse - > - >; - /** - * This operation starts failover simulation on the gateway for the specified peering location - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peeringLocation Peering location of the test - * @param options The options parameters. - */ - beginStartExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - peeringLocation: string, - options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, - ): Promise; - /** - * This operation stops failover simulation on the gateway for the specified peering location - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param stopParameters Virtual network gateway stop simulation parameters supplied to stop failover - * simulation on gateway. - * @param options The options parameters. - */ - beginStopExpressRouteSiteFailoverSimulation( - resourceGroupName: string, - virtualNetworkGatewayName: string, - stopParameters: ExpressRouteFailoverStopApiParameters, - options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse - > - >; - /** - * This operation stops failover simulation on the gateway for the specified peering location - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param stopParameters Virtual network gateway stop simulation parameters supplied to stop failover - * simulation on gateway. - * @param options The options parameters. - */ - beginStopExpressRouteSiteFailoverSimulationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - stopParameters: ExpressRouteFailoverStopApiParameters, - options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, - ): Promise; - /** - * Get VPN client connection health detail per P2S client connection of the virtual network gateway in - * the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetVpnclientConnectionHealth( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse - > - >; - /** - * Get VPN client connection health detail per P2S client connection of the virtual network gateway in - * the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param options The options parameters. - */ - beginGetVpnclientConnectionHealthAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, - ): Promise; - /** - * Disconnect vpn connections of virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param request The parameters are supplied to disconnect vpn connections. - * @param options The options parameters. - */ - beginDisconnectVirtualNetworkGatewayVpnConnections( - resourceGroupName: string, - virtualNetworkGatewayName: string, - request: P2SVpnConnectionRequest, - options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, - ): Promise, void>>; - /** - * Disconnect vpn connections of virtual network gateway in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param request The parameters are supplied to disconnect vpn connections. - * @param options The options parameters. - */ - beginDisconnectVirtualNetworkGatewayVpnConnectionsAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - request: P2SVpnConnectionRequest, - options?: VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams, - ): Promise; - /** - * Trigger prepare migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param migrationParams Parameters supplied to the Begin Prepare migration on basic vpn gateway - * through Network resource provider. - * @param options The options parameters. - */ - beginInvokePrepareMigration( - resourceGroupName: string, - virtualNetworkGatewayName: string, - migrationParams: VirtualNetworkGatewayMigrationParameters, - options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysInvokePrepareMigrationResponse - > - >; - /** - * Trigger prepare migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param migrationParams Parameters supplied to the Begin Prepare migration on basic vpn gateway - * through Network resource provider. - * @param options The options parameters. - */ - beginInvokePrepareMigrationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - migrationParams: VirtualNetworkGatewayMigrationParameters, - options?: VirtualNetworkGatewaysInvokePrepareMigrationOptionalParams, - ): Promise; - /** - * Trigger execute migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - beginInvokeExecuteMigration( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysInvokeExecuteMigrationResponse - > - >; - /** - * Trigger execute migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - beginInvokeExecuteMigrationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeExecuteMigrationOptionalParams, - ): Promise; - /** - * Trigger commit migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - beginInvokeCommitMigration( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysInvokeCommitMigrationResponse - > - >; - /** - * Trigger commit migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - beginInvokeCommitMigrationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeCommitMigrationOptionalParams, - ): Promise; - /** - * Trigger abort migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - beginInvokeAbortMigration( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkGatewaysInvokeAbortMigrationResponse - > - >; - /** - * Trigger abort migration for the virtual network gateway. - * @param resourceGroupName The resource group name of the virtual network gateway. - * @param virtualNetworkGatewayName The name of the gateway. - * @param options The options parameters. - */ - beginInvokeAbortMigrationAndWait( - resourceGroupName: string, - virtualNetworkGatewayName: string, - options?: VirtualNetworkGatewaysInvokeAbortMigrationOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkPeerings.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkPeerings.ts deleted file mode 100644 index d0daec19098b..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkPeerings.ts +++ /dev/null @@ -1,109 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualNetworkPeering, - VirtualNetworkPeeringsListOptionalParams, - VirtualNetworkPeeringsDeleteOptionalParams, - VirtualNetworkPeeringsGetOptionalParams, - VirtualNetworkPeeringsGetResponse, - VirtualNetworkPeeringsCreateOrUpdateOptionalParams, - VirtualNetworkPeeringsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualNetworkPeerings. */ -export interface VirtualNetworkPeerings { - /** - * Gets all virtual network peerings in a virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworkPeeringsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified virtual network peering. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param virtualNetworkPeeringName The name of the virtual network peering. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualNetworkName: string, - virtualNetworkPeeringName: string, - options?: VirtualNetworkPeeringsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified virtual network peering. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param virtualNetworkPeeringName The name of the virtual network peering. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkName: string, - virtualNetworkPeeringName: string, - options?: VirtualNetworkPeeringsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified virtual network peering. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param virtualNetworkPeeringName The name of the virtual network peering. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkName: string, - virtualNetworkPeeringName: string, - options?: VirtualNetworkPeeringsGetOptionalParams, - ): Promise; - /** - * Creates or updates a peering in the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param virtualNetworkPeeringName The name of the peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network - * peering operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkName: string, - virtualNetworkPeeringName: string, - virtualNetworkPeeringParameters: VirtualNetworkPeering, - options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkPeeringsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a peering in the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param virtualNetworkPeeringName The name of the peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network - * peering operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkName: string, - virtualNetworkPeeringName: string, - virtualNetworkPeeringParameters: VirtualNetworkPeering, - options?: VirtualNetworkPeeringsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkTaps.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkTaps.ts deleted file mode 100644 index 887a21a36435..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkTaps.ts +++ /dev/null @@ -1,119 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualNetworkTap, - VirtualNetworkTapsListAllOptionalParams, - VirtualNetworkTapsListByResourceGroupOptionalParams, - VirtualNetworkTapsDeleteOptionalParams, - VirtualNetworkTapsGetOptionalParams, - VirtualNetworkTapsGetResponse, - VirtualNetworkTapsCreateOrUpdateOptionalParams, - VirtualNetworkTapsCreateOrUpdateResponse, - TagsObject, - VirtualNetworkTapsUpdateTagsOptionalParams, - VirtualNetworkTapsUpdateTagsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualNetworkTaps. */ -export interface VirtualNetworkTaps { - /** - * Gets all the VirtualNetworkTaps in a subscription. - * @param options The options parameters. - */ - listAll( - options?: VirtualNetworkTapsListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the VirtualNetworkTaps in a subscription. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VirtualNetworkTapsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified virtual network tap. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of the virtual network tap. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - tapName: string, - options?: VirtualNetworkTapsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified virtual network tap. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of the virtual network tap. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - tapName: string, - options?: VirtualNetworkTapsDeleteOptionalParams, - ): Promise; - /** - * Gets information about the specified virtual network tap. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of virtual network tap. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - tapName: string, - options?: VirtualNetworkTapsGetOptionalParams, - ): Promise; - /** - * Creates or updates a Virtual Network Tap. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of the virtual network tap. - * @param parameters Parameters supplied to the create or update virtual network tap operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - tapName: string, - parameters: VirtualNetworkTap, - options?: VirtualNetworkTapsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworkTapsCreateOrUpdateResponse - > - >; - /** - * Creates or updates a Virtual Network Tap. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of the virtual network tap. - * @param parameters Parameters supplied to the create or update virtual network tap operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - tapName: string, - parameters: VirtualNetworkTap, - options?: VirtualNetworkTapsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an VirtualNetworkTap tags. - * @param resourceGroupName The name of the resource group. - * @param tapName The name of the tap. - * @param tapParameters Parameters supplied to update VirtualNetworkTap tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - tapName: string, - tapParameters: TagsObject, - options?: VirtualNetworkTapsUpdateTagsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworks.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualNetworks.ts deleted file mode 100644 index 2e8aba87bea5..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworks.ts +++ /dev/null @@ -1,160 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualNetwork, - VirtualNetworksListAllOptionalParams, - VirtualNetworksListOptionalParams, - VirtualNetworkUsage, - VirtualNetworksListUsageOptionalParams, - PublicIpDdosProtectionStatusResult, - VirtualNetworksListDdosProtectionStatusOptionalParams, - VirtualNetworksDeleteOptionalParams, - VirtualNetworksGetOptionalParams, - VirtualNetworksGetResponse, - VirtualNetworksCreateOrUpdateOptionalParams, - VirtualNetworksCreateOrUpdateResponse, - TagsObject, - VirtualNetworksUpdateTagsOptionalParams, - VirtualNetworksUpdateTagsResponse, - VirtualNetworksCheckIPAddressAvailabilityOptionalParams, - VirtualNetworksCheckIPAddressAvailabilityResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualNetworks. */ -export interface VirtualNetworks { - /** - * Gets all virtual networks in a subscription. - * @param options The options parameters. - */ - listAll( - options?: VirtualNetworksListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all virtual networks in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: VirtualNetworksListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists usage stats. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - listUsage( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksListUsageOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - beginListDdosProtectionStatusAndWait( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksListDdosProtectionStatusOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified virtual network. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksDeleteOptionalParams, - ): Promise; - /** - * Gets the specified virtual network by resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksGetOptionalParams, - ): Promise; - /** - * Creates or updates a virtual network in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param parameters Parameters supplied to the create or update virtual network operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkName: string, - parameters: VirtualNetwork, - options?: VirtualNetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworksCreateOrUpdateResponse - > - >; - /** - * Creates or updates a virtual network in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param parameters Parameters supplied to the create or update virtual network operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkName: string, - parameters: VirtualNetwork, - options?: VirtualNetworksCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates a virtual network tags. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param parameters Parameters supplied to update virtual network tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - virtualNetworkName: string, - parameters: TagsObject, - options?: VirtualNetworksUpdateTagsOptionalParams, - ): Promise; - /** - * Checks whether a private IP address is available for use. - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param ipAddress The private IP address to be verified. - * @param options The options parameters. - */ - checkIPAddressAvailability( - resourceGroupName: string, - virtualNetworkName: string, - ipAddress: string, - options?: VirtualNetworksCheckIPAddressAvailabilityOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualRouterPeerings.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualRouterPeerings.ts deleted file mode 100644 index a99319558692..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualRouterPeerings.ts +++ /dev/null @@ -1,107 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualRouterPeering, - VirtualRouterPeeringsListOptionalParams, - VirtualRouterPeeringsDeleteOptionalParams, - VirtualRouterPeeringsGetOptionalParams, - VirtualRouterPeeringsGetResponse, - VirtualRouterPeeringsCreateOrUpdateOptionalParams, - VirtualRouterPeeringsCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualRouterPeerings. */ -export interface VirtualRouterPeerings { - /** - * Lists all Virtual Router Peerings in a Virtual Router resource. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - virtualRouterName: string, - options?: VirtualRouterPeeringsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Deletes the specified peering from a Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualRouterName: string, - peeringName: string, - options?: VirtualRouterPeeringsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified peering from a Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param peeringName The name of the peering. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualRouterName: string, - peeringName: string, - options?: VirtualRouterPeeringsDeleteOptionalParams, - ): Promise; - /** - * Gets the specified Virtual Router Peering. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param peeringName The name of the Virtual Router Peering. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualRouterName: string, - peeringName: string, - options?: VirtualRouterPeeringsGetOptionalParams, - ): Promise; - /** - * Creates or updates the specified Virtual Router Peering. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param peeringName The name of the Virtual Router Peering. - * @param parameters Parameters supplied to the create or update Virtual Router Peering operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualRouterName: string, - peeringName: string, - parameters: VirtualRouterPeering, - options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualRouterPeeringsCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified Virtual Router Peering. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param peeringName The name of the Virtual Router Peering. - * @param parameters Parameters supplied to the create or update Virtual Router Peering operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualRouterName: string, - peeringName: string, - parameters: VirtualRouterPeering, - options?: VirtualRouterPeeringsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualRouters.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualRouters.ts deleted file mode 100644 index 642d3ab07f58..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualRouters.ts +++ /dev/null @@ -1,101 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualRouter, - VirtualRoutersListByResourceGroupOptionalParams, - VirtualRoutersListOptionalParams, - VirtualRoutersDeleteOptionalParams, - VirtualRoutersGetOptionalParams, - VirtualRoutersGetResponse, - VirtualRoutersCreateOrUpdateOptionalParams, - VirtualRoutersCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualRouters. */ -export interface VirtualRouters { - /** - * Lists all Virtual Routers in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VirtualRoutersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the Virtual Routers in a subscription. - * @param options The options parameters. - */ - list(options?: VirtualRoutersListOptionalParams): PagedAsyncIterableIterator; - /** - * Deletes the specified Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualRouterName: string, - options?: VirtualRoutersDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualRouterName: string, - options?: VirtualRoutersDeleteOptionalParams, - ): Promise; - /** - * Gets the specified Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualRouterName: string, - options?: VirtualRoutersGetOptionalParams, - ): Promise; - /** - * Creates or updates the specified Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param parameters Parameters supplied to the create or update Virtual Router. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualRouterName: string, - parameters: VirtualRouter, - options?: VirtualRoutersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualRoutersCreateOrUpdateResponse - > - >; - /** - * Creates or updates the specified Virtual Router. - * @param resourceGroupName The name of the resource group. - * @param virtualRouterName The name of the Virtual Router. - * @param parameters Parameters supplied to the create or update Virtual Router. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualRouterName: string, - parameters: VirtualRouter, - options?: VirtualRoutersCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualWans.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualWans.ts deleted file mode 100644 index 936ef0c9e246..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualWans.ts +++ /dev/null @@ -1,117 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualWAN, - VirtualWansListByResourceGroupOptionalParams, - VirtualWansListOptionalParams, - VirtualWansGetOptionalParams, - VirtualWansGetResponse, - VirtualWansCreateOrUpdateOptionalParams, - VirtualWansCreateOrUpdateResponse, - TagsObject, - VirtualWansUpdateTagsOptionalParams, - VirtualWansUpdateTagsResponse, - VirtualWansDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualWans. */ -export interface VirtualWans { - /** - * Lists all the VirtualWANs in a resource group. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VirtualWansListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists all the VirtualWANs in a subscription. - * @param options The options parameters. - */ - list(options?: VirtualWansListOptionalParams): PagedAsyncIterableIterator; - /** - * Retrieves the details of a VirtualWAN. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being retrieved. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualWANName: string, - options?: VirtualWansGetOptionalParams, - ): Promise; - /** - * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being created or updated. - * @param wANParameters Parameters supplied to create or update VirtualWAN. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualWANName: string, - wANParameters: VirtualWAN, - options?: VirtualWansCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualWansCreateOrUpdateResponse - > - >; - /** - * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being created or updated. - * @param wANParameters Parameters supplied to create or update VirtualWAN. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualWANName: string, - wANParameters: VirtualWAN, - options?: VirtualWansCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates a VirtualWAN tags. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being updated. - * @param wANParameters Parameters supplied to Update VirtualWAN tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - virtualWANName: string, - wANParameters: TagsObject, - options?: VirtualWansUpdateTagsOptionalParams, - ): Promise; - /** - * Deletes a VirtualWAN. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being deleted. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualWANName: string, - options?: VirtualWansDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a VirtualWAN. - * @param resourceGroupName The resource group name of the VirtualWan. - * @param virtualWANName The name of the VirtualWAN being deleted. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualWANName: string, - options?: VirtualWansDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/vpnConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/vpnConnections.ts deleted file mode 100644 index 01e2197511b8..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/vpnConnections.ts +++ /dev/null @@ -1,175 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VpnConnection, - VpnConnectionsListByVpnGatewayOptionalParams, - VpnConnectionsGetOptionalParams, - VpnConnectionsGetResponse, - VpnConnectionsCreateOrUpdateOptionalParams, - VpnConnectionsCreateOrUpdateResponse, - VpnConnectionsDeleteOptionalParams, - VpnConnectionsStartPacketCaptureOptionalParams, - VpnConnectionsStartPacketCaptureResponse, - VpnConnectionsStopPacketCaptureOptionalParams, - VpnConnectionsStopPacketCaptureResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VpnConnections. */ -export interface VpnConnections { - /** - * Retrieves all vpn connections for a particular virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - listByVpnGateway( - resourceGroupName: string, - gatewayName: string, - options?: VpnConnectionsListByVpnGatewayOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves the details of a vpn connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - options?: VpnConnectionsGetOptionalParams, - ): Promise; - /** - * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing - * connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - vpnConnectionParameters: VpnConnection, - options?: VpnConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnConnectionsCreateOrUpdateResponse - > - >; - /** - * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing - * connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - vpnConnectionParameters: VpnConnection, - options?: VpnConnectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a vpn connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - options?: VpnConnectionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a vpn connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - options?: VpnConnectionsDeleteOptionalParams, - ): Promise; - /** - * Starts packet capture on Vpn connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param vpnConnectionName The name of the vpn connection. - * @param options The options parameters. - */ - beginStartPacketCapture( - resourceGroupName: string, - gatewayName: string, - vpnConnectionName: string, - options?: VpnConnectionsStartPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnConnectionsStartPacketCaptureResponse - > - >; - /** - * Starts packet capture on Vpn connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param vpnConnectionName The name of the vpn connection. - * @param options The options parameters. - */ - beginStartPacketCaptureAndWait( - resourceGroupName: string, - gatewayName: string, - vpnConnectionName: string, - options?: VpnConnectionsStartPacketCaptureOptionalParams, - ): Promise; - /** - * Stops packet capture on Vpn connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param vpnConnectionName The name of the vpn connection. - * @param options The options parameters. - */ - beginStopPacketCapture( - resourceGroupName: string, - gatewayName: string, - vpnConnectionName: string, - options?: VpnConnectionsStopPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnConnectionsStopPacketCaptureResponse - > - >; - /** - * Stops packet capture on Vpn connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param vpnConnectionName The name of the vpn connection. - * @param options The options parameters. - */ - beginStopPacketCaptureAndWait( - resourceGroupName: string, - gatewayName: string, - vpnConnectionName: string, - options?: VpnConnectionsStopPacketCaptureOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/vpnGateways.ts b/sdk/network/arm-network/src/operationsInterfaces/vpnGateways.ts deleted file mode 100644 index 31e5df462598..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/vpnGateways.ts +++ /dev/null @@ -1,214 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VpnGateway, - VpnGatewaysListByResourceGroupOptionalParams, - VpnGatewaysListOptionalParams, - VpnGatewaysGetOptionalParams, - VpnGatewaysGetResponse, - VpnGatewaysCreateOrUpdateOptionalParams, - VpnGatewaysCreateOrUpdateResponse, - TagsObject, - VpnGatewaysUpdateTagsOptionalParams, - VpnGatewaysUpdateTagsResponse, - VpnGatewaysDeleteOptionalParams, - VpnGatewaysResetOptionalParams, - VpnGatewaysResetResponse, - VpnGatewaysStartPacketCaptureOptionalParams, - VpnGatewaysStartPacketCaptureResponse, - VpnGatewaysStopPacketCaptureOptionalParams, - VpnGatewaysStopPacketCaptureResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VpnGateways. */ -export interface VpnGateways { - /** - * Lists all the VpnGateways in a resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VpnGatewaysListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists all the VpnGateways in a subscription. - * @param options The options parameters. - */ - list(options?: VpnGatewaysListOptionalParams): PagedAsyncIterableIterator; - /** - * Retrieves the details of a virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysGetOptionalParams, - ): Promise; - /** - * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - vpnGatewayParameters: VpnGateway, - options?: VpnGatewaysCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnGatewaysCreateOrUpdateResponse - > - >; - /** - * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - vpnGatewayParameters: VpnGateway, - options?: VpnGatewaysCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates virtual wan vpn gateway tags. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param vpnGatewayParameters Parameters supplied to update a virtual wan vpn gateway tags. - * @param options The options parameters. - */ - beginUpdateTags( - resourceGroupName: string, - gatewayName: string, - vpnGatewayParameters: TagsObject, - options?: VpnGatewaysUpdateTagsOptionalParams, - ): Promise< - SimplePollerLike, VpnGatewaysUpdateTagsResponse> - >; - /** - * Updates virtual wan vpn gateway tags. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param vpnGatewayParameters Parameters supplied to update a virtual wan vpn gateway tags. - * @param options The options parameters. - */ - beginUpdateTagsAndWait( - resourceGroupName: string, - gatewayName: string, - vpnGatewayParameters: TagsObject, - options?: VpnGatewaysUpdateTagsOptionalParams, - ): Promise; - /** - * Deletes a virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a virtual wan vpn gateway. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysDeleteOptionalParams, - ): Promise; - /** - * Resets the primary of the vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginReset( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysResetOptionalParams, - ): Promise, VpnGatewaysResetResponse>>; - /** - * Resets the primary of the vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginResetAndWait( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysResetOptionalParams, - ): Promise; - /** - * Starts packet capture on vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginStartPacketCapture( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysStartPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnGatewaysStartPacketCaptureResponse - > - >; - /** - * Starts packet capture on vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginStartPacketCaptureAndWait( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysStartPacketCaptureOptionalParams, - ): Promise; - /** - * Stops packet capture on vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginStopPacketCapture( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysStopPacketCaptureOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnGatewaysStopPacketCaptureResponse - > - >; - /** - * Stops packet capture on vpn gateway in the specified resource group. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param options The options parameters. - */ - beginStopPacketCaptureAndWait( - resourceGroupName: string, - gatewayName: string, - options?: VpnGatewaysStopPacketCaptureOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/vpnLinkConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/vpnLinkConnections.ts deleted file mode 100644 index 1856bd0700de..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/vpnLinkConnections.ts +++ /dev/null @@ -1,196 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ConnectionSharedKeyResult, - VpnLinkConnectionsGetAllSharedKeysOptionalParams, - VpnSiteLinkConnection, - VpnLinkConnectionsListByVpnConnectionOptionalParams, - VpnLinkConnectionsResetConnectionOptionalParams, - VpnLinkConnectionsGetDefaultSharedKeyOptionalParams, - VpnLinkConnectionsGetDefaultSharedKeyResponse, - VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, - VpnLinkConnectionsSetOrInitDefaultSharedKeyResponse, - VpnLinkConnectionsListDefaultSharedKeyOptionalParams, - VpnLinkConnectionsListDefaultSharedKeyResponse, - VpnLinkConnectionsGetIkeSasOptionalParams, - VpnLinkConnectionsGetIkeSasResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VpnLinkConnections. */ -export interface VpnLinkConnections { - /** - * Lists all shared keys of VpnLink connection specified. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - listAllSharedKeys( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsGetAllSharedKeysOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * @param resourceGroupName The resource group name of the vpn gateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param options The options parameters. - */ - listByVpnConnection( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - options?: VpnLinkConnectionsListByVpnConnectionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Resets the VpnLink connection specified. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - beginResetConnection( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsResetConnectionOptionalParams, - ): Promise, void>>; - /** - * Resets the VpnLink connection specified. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - beginResetConnectionAndWait( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsResetConnectionOptionalParams, - ): Promise; - /** - * Gets the shared key of VpnLink connection specified. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - getDefaultSharedKey( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsGetDefaultSharedKeyOptionalParams, - ): Promise; - /** - * Sets or auto generates the shared key based on the user input. If users give a shared key value, it - * does the set operation. If key length is given, the operation creates a random key of the - * pre-defined length. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param linkConnectionName The name of the vpn link connection. - * @param connectionSharedKeyParameters Parameters supplied to set or auto generate the shared key for - * the vpn link connection. - * @param options The options parameters. - */ - beginSetOrInitDefaultSharedKey( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - connectionSharedKeyParameters: ConnectionSharedKeyResult, - options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnLinkConnectionsSetOrInitDefaultSharedKeyResponse - > - >; - /** - * Sets or auto generates the shared key based on the user input. If users give a shared key value, it - * does the set operation. If key length is given, the operation creates a random key of the - * pre-defined length. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the connection. - * @param linkConnectionName The name of the vpn link connection. - * @param connectionSharedKeyParameters Parameters supplied to set or auto generate the shared key for - * the vpn link connection. - * @param options The options parameters. - */ - beginSetOrInitDefaultSharedKeyAndWait( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - connectionSharedKeyParameters: ConnectionSharedKeyResult, - options?: VpnLinkConnectionsSetOrInitDefaultSharedKeyOptionalParams, - ): Promise; - /** - * Gets the value of the shared key of VpnLink connection specified. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - listDefaultSharedKey( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsListDefaultSharedKeyOptionalParams, - ): Promise; - /** - * Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - beginGetIkeSas( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsGetIkeSasOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnLinkConnectionsGetIkeSasResponse - > - >; - /** - * Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * @param resourceGroupName The name of the resource group. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn link connection. - * @param options The options parameters. - */ - beginGetIkeSasAndWait( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnLinkConnectionsGetIkeSasOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/vpnServerConfigurations.ts b/sdk/network/arm-network/src/operationsInterfaces/vpnServerConfigurations.ts deleted file mode 100644 index e95576f78ffc..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/vpnServerConfigurations.ts +++ /dev/null @@ -1,136 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VpnServerConfiguration, - VpnServerConfigurationsListByResourceGroupOptionalParams, - VpnServerConfigurationsListOptionalParams, - VpnServerConfigurationsGetOptionalParams, - VpnServerConfigurationsGetResponse, - VpnServerConfigurationsCreateOrUpdateOptionalParams, - VpnServerConfigurationsCreateOrUpdateResponse, - TagsObject, - VpnServerConfigurationsUpdateTagsOptionalParams, - VpnServerConfigurationsUpdateTagsResponse, - VpnServerConfigurationsDeleteOptionalParams, - VpnServerConfigurationsListRadiusSecretsOptionalParams, - VpnServerConfigurationsListRadiusSecretsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VpnServerConfigurations. */ -export interface VpnServerConfigurations { - /** - * Lists all the vpnServerConfigurations in a resource group. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VpnServerConfigurationsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists all the VpnServerConfigurations in a subscription. - * @param options The options parameters. - */ - list( - options?: VpnServerConfigurationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves the details of a VpnServerConfiguration. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being retrieved. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - vpnServerConfigurationName: string, - options?: VpnServerConfigurationsGetOptionalParams, - ): Promise; - /** - * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing - * VpnServerConfiguration. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. - * @param vpnServerConfigurationParameters Parameters supplied to create or update - * VpnServerConfiguration. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - vpnServerConfigurationName: string, - vpnServerConfigurationParameters: VpnServerConfiguration, - options?: VpnServerConfigurationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnServerConfigurationsCreateOrUpdateResponse - > - >; - /** - * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing - * VpnServerConfiguration. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. - * @param vpnServerConfigurationParameters Parameters supplied to create or update - * VpnServerConfiguration. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - vpnServerConfigurationName: string, - vpnServerConfigurationParameters: VpnServerConfiguration, - options?: VpnServerConfigurationsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates VpnServerConfiguration tags. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being updated. - * @param vpnServerConfigurationParameters Parameters supplied to update VpnServerConfiguration tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - vpnServerConfigurationName: string, - vpnServerConfigurationParameters: TagsObject, - options?: VpnServerConfigurationsUpdateTagsOptionalParams, - ): Promise; - /** - * Deletes a VpnServerConfiguration. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - vpnServerConfigurationName: string, - options?: VpnServerConfigurationsDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a VpnServerConfiguration. - * @param resourceGroupName The resource group name of the VpnServerConfiguration. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - vpnServerConfigurationName: string, - options?: VpnServerConfigurationsDeleteOptionalParams, - ): Promise; - /** - * List all Radius servers with respective radius secrets from VpnServerConfiguration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vpnServerConfigurationName The name of the VpnServerConfiguration. - * @param options The options parameters. - */ - listRadiusSecrets( - resourceGroupName: string, - vpnServerConfigurationName: string, - options?: VpnServerConfigurationsListRadiusSecretsOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/vpnServerConfigurationsAssociatedWithVirtualWan.ts b/sdk/network/arm-network/src/operationsInterfaces/vpnServerConfigurationsAssociatedWithVirtualWan.ts deleted file mode 100644 index 956770643d37..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/vpnServerConfigurationsAssociatedWithVirtualWan.ts +++ /dev/null @@ -1,42 +0,0 @@ -// 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 type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, - VpnServerConfigurationsAssociatedWithVirtualWanListResponse, -} from "../models/index.js"; - -/** Interface representing a VpnServerConfigurationsAssociatedWithVirtualWan. */ -export interface VpnServerConfigurationsAssociatedWithVirtualWan { - /** - * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param options The options parameters. - */ - beginList( - resourceGroupName: string, - virtualWANName: string, - options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VpnServerConfigurationsAssociatedWithVirtualWanListResponse - > - >; - /** - * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param options The options parameters. - */ - beginListAndWait( - resourceGroupName: string, - virtualWANName: string, - options?: VpnServerConfigurationsAssociatedWithVirtualWanListOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/vpnSiteLinkConnections.ts b/sdk/network/arm-network/src/operationsInterfaces/vpnSiteLinkConnections.ts deleted file mode 100644 index e5e77e20ed58..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/vpnSiteLinkConnections.ts +++ /dev/null @@ -1,29 +0,0 @@ -// 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 type { - VpnSiteLinkConnectionsGetOptionalParams, - VpnSiteLinkConnectionsGetResponse, -} from "../models/index.js"; - -/** Interface representing a VpnSiteLinkConnections. */ -export interface VpnSiteLinkConnections { - /** - * Retrieves the details of a vpn site link connection. - * @param resourceGroupName The resource group name of the VpnGateway. - * @param gatewayName The name of the gateway. - * @param connectionName The name of the vpn connection. - * @param linkConnectionName The name of the vpn connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - connectionName: string, - linkConnectionName: string, - options?: VpnSiteLinkConnectionsGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/vpnSiteLinks.ts b/sdk/network/arm-network/src/operationsInterfaces/vpnSiteLinks.ts deleted file mode 100644 index 1550dd0b7c83..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/vpnSiteLinks.ts +++ /dev/null @@ -1,42 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - VpnSiteLink, - VpnSiteLinksListByVpnSiteOptionalParams, - VpnSiteLinksGetOptionalParams, - VpnSiteLinksGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VpnSiteLinks. */ -export interface VpnSiteLinks { - /** - * Lists all the vpnSiteLinks in a resource group for a vpn site. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite. - * @param options The options parameters. - */ - listByVpnSite( - resourceGroupName: string, - vpnSiteName: string, - options?: VpnSiteLinksListByVpnSiteOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves the details of a VPN site link. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite. - * @param vpnSiteLinkName The name of the VpnSiteLink being retrieved. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - vpnSiteName: string, - vpnSiteLinkName: string, - options?: VpnSiteLinksGetOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/vpnSites.ts b/sdk/network/arm-network/src/operationsInterfaces/vpnSites.ts deleted file mode 100644 index 9d62068e5ff0..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/vpnSites.ts +++ /dev/null @@ -1,114 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VpnSite, - VpnSitesListByResourceGroupOptionalParams, - VpnSitesListOptionalParams, - VpnSitesGetOptionalParams, - VpnSitesGetResponse, - VpnSitesCreateOrUpdateOptionalParams, - VpnSitesCreateOrUpdateResponse, - TagsObject, - VpnSitesUpdateTagsOptionalParams, - VpnSitesUpdateTagsResponse, - VpnSitesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a VpnSites. */ -export interface VpnSites { - /** - * Lists all the vpnSites in a resource group. - * @param resourceGroupName The resource group name of the VpnSite. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VpnSitesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists all the VpnSites in a subscription. - * @param options The options parameters. - */ - list(options?: VpnSitesListOptionalParams): PagedAsyncIterableIterator; - /** - * Retrieves the details of a VPN site. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being retrieved. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - vpnSiteName: string, - options?: VpnSitesGetOptionalParams, - ): Promise; - /** - * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being created or updated. - * @param vpnSiteParameters Parameters supplied to create or update VpnSite. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - vpnSiteName: string, - vpnSiteParameters: VpnSite, - options?: VpnSitesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, VpnSitesCreateOrUpdateResponse> - >; - /** - * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being created or updated. - * @param vpnSiteParameters Parameters supplied to create or update VpnSite. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - vpnSiteName: string, - vpnSiteParameters: VpnSite, - options?: VpnSitesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates VpnSite tags. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being updated. - * @param vpnSiteParameters Parameters supplied to update VpnSite tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - vpnSiteName: string, - vpnSiteParameters: TagsObject, - options?: VpnSitesUpdateTagsOptionalParams, - ): Promise; - /** - * Deletes a VpnSite. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being deleted. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - vpnSiteName: string, - options?: VpnSitesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes a VpnSite. - * @param resourceGroupName The resource group name of the VpnSite. - * @param vpnSiteName The name of the VpnSite being deleted. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - vpnSiteName: string, - options?: VpnSitesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/vpnSitesConfiguration.ts b/sdk/network/arm-network/src/operationsInterfaces/vpnSitesConfiguration.ts deleted file mode 100644 index 7b2122b559dc..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/vpnSitesConfiguration.ts +++ /dev/null @@ -1,41 +0,0 @@ -// 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 type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - GetVpnSitesConfigurationRequest, - VpnSitesConfigurationDownloadOptionalParams, -} from "../models/index.js"; - -/** Interface representing a VpnSitesConfiguration. */ -export interface VpnSitesConfiguration { - /** - * Gives the sas-url to download the configurations for vpn-sites in a resource group. - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. - * @param request Parameters supplied to download vpn-sites configuration. - * @param options The options parameters. - */ - beginDownload( - resourceGroupName: string, - virtualWANName: string, - request: GetVpnSitesConfigurationRequest, - options?: VpnSitesConfigurationDownloadOptionalParams, - ): Promise, void>>; - /** - * Gives the sas-url to download the configurations for vpn-sites in a resource group. - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. - * @param request Parameters supplied to download vpn-sites configuration. - * @param options The options parameters. - */ - beginDownloadAndWait( - resourceGroupName: string, - virtualWANName: string, - request: GetVpnSitesConfigurationRequest, - options?: VpnSitesConfigurationDownloadOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/webApplicationFirewallPolicies.ts b/sdk/network/arm-network/src/operationsInterfaces/webApplicationFirewallPolicies.ts deleted file mode 100644 index 95f43d30fa59..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/webApplicationFirewallPolicies.ts +++ /dev/null @@ -1,85 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - WebApplicationFirewallPolicy, - WebApplicationFirewallPoliciesListOptionalParams, - WebApplicationFirewallPoliciesListAllOptionalParams, - WebApplicationFirewallPoliciesGetOptionalParams, - WebApplicationFirewallPoliciesGetResponse, - WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams, - WebApplicationFirewallPoliciesCreateOrUpdateResponse, - WebApplicationFirewallPoliciesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WebApplicationFirewallPolicies. */ -export interface WebApplicationFirewallPolicies { - /** - * Lists all of the protection policies within a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: WebApplicationFirewallPoliciesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all the WAF policies in a subscription. - * @param options The options parameters. - */ - listAll( - options?: WebApplicationFirewallPoliciesListAllOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieve protection policy with specified name within a resource group. - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - policyName: string, - options?: WebApplicationFirewallPoliciesGetOptionalParams, - ): Promise; - /** - * Creates or update policy with specified rule set name within a resource group. - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the policy. - * @param parameters Policy to be created. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - policyName: string, - parameters: WebApplicationFirewallPolicy, - options?: WebApplicationFirewallPoliciesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes Policy. - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the policy. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - policyName: string, - options?: WebApplicationFirewallPoliciesDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes Policy. - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the policy. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - policyName: string, - options?: WebApplicationFirewallPoliciesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/network/arm-network/src/operationsInterfaces/webCategories.ts b/sdk/network/arm-network/src/operationsInterfaces/webCategories.ts deleted file mode 100644 index 3b689d98fa38..000000000000 --- a/sdk/network/arm-network/src/operationsInterfaces/webCategories.ts +++ /dev/null @@ -1,31 +0,0 @@ -// 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 type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - AzureWebCategory, - WebCategoriesListBySubscriptionOptionalParams, - WebCategoriesGetOptionalParams, - WebCategoriesGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a WebCategories. */ -export interface WebCategories { - /** - * Gets all the Azure Web Categories in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: WebCategoriesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified Azure Web Category. - * @param name The name of the azureWebCategory. - * @param options The options parameters. - */ - get(name: string, options?: WebCategoriesGetOptionalParams): Promise; -} diff --git a/sdk/network/arm-network/src/pagingHelper.ts b/sdk/network/arm-network/src/pagingHelper.ts deleted file mode 100644 index f64c4c8390ed..000000000000 --- a/sdk/network/arm-network/src/pagingHelper.ts +++ /dev/null @@ -1,34 +0,0 @@ -// 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. - -export interface PageInfo { - continuationToken?: string; -} - -const pageMap = new WeakMap(); - -/** - * Given the last `.value` produced by the `byPage` iterator, - * returns a continuation token that can be used to begin paging from - * that point later. - * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. - * @returns The continuation token that can be passed into byPage() during future calls. - */ -export function getContinuationToken(page: unknown): string | undefined { - if (typeof page !== "object" || page === null) { - return undefined; - } - return pageMap.get(page)?.continuationToken; -} - -export function setContinuationToken(page: unknown, continuationToken: string | undefined): void { - if (typeof page !== "object" || page === null || !continuationToken) { - return; - } - const pageInfo = pageMap.get(page) ?? {}; - pageInfo.continuationToken = continuationToken; - pageMap.set(page, pageInfo); -} diff --git a/sdk/network/arm-network/src/restorePollerHelpers.ts b/sdk/network/arm-network/src/restorePollerHelpers.ts new file mode 100644 index 000000000000..5e08748aedfe --- /dev/null +++ b/sdk/network/arm-network/src/restorePollerHelpers.ts @@ -0,0 +1,1753 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkManagementClient } from "./networkManagementClient.js"; +import { + _generatevirtualwanvpnserverconfigurationvpnprofileDeserialize, + _deleteBastionShareableLinkByTokenDeserialize, + _deleteBastionShareableLinkDeserialize, +} from "./api/operations.js"; +import { _$deleteDeserialize, _createOrUpdateDeserialize } from "./api/routingIntent/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualHubIpConfiguration, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualHubIpConfiguration, +} from "./api/virtualHubIpConfiguration/operations.js"; +import { + _listAdvertisedRoutesDeserialize, + _listLearnedRoutesDeserialize, +} from "./api/virtualHubBgpConnections/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualHubBgpConnection, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualHubBgpConnection, +} from "./api/virtualHubBgpConnection/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeExpressRouteConnections, + _createOrUpdateDeserialize as _createOrUpdateDeserializeExpressRouteConnections, +} from "./api/expressRouteConnections/operations.js"; +import { + _disconnectP2SVpnConnectionsDeserialize, + _getP2SVpnConnectionHealthDetailedDeserialize, + _getP2SVpnConnectionHealthDeserialize, + _generateVpnProfileDeserialize, + _resetDeserialize, + _$deleteDeserialize as _$deleteDeserializeP2SVpnGateways, + _updateTagsDeserialize, + _createOrUpdateDeserialize as _createOrUpdateDeserializeP2SVpnGateways, +} from "./api/p2SVpnGateways/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeNatRules, + _createOrUpdateDeserialize as _createOrUpdateDeserializeNatRules, +} from "./api/natRules/operations.js"; +import { + _getIkeSasDeserialize, + _resetConnectionDeserialize, + _setOrInitDefaultSharedKeyDeserialize, +} from "./api/vpnLinkConnections/operations.js"; +import { + _stopPacketCaptureDeserialize, + _startPacketCaptureDeserialize, + _$deleteDeserialize as _$deleteDeserializeVpnConnections, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVpnConnections, +} from "./api/vpnConnections/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualHubRouteTableV2S, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualHubRouteTableV2S, +} from "./api/virtualHubRouteTableV2S/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeHubVirtualNetworkConnections, + _createOrUpdateDeserialize as _createOrUpdateDeserializeHubVirtualNetworkConnections, +} from "./api/hubVirtualNetworkConnections/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeConfigurationPolicyGroups, + _createOrUpdateDeserialize as _createOrUpdateDeserializeConfigurationPolicyGroups, +} from "./api/configurationPolicyGroups/operations.js"; +import { _listDeserialize } from "./api/vpnServerConfigurationsAssociatedWithVirtualWan/operations.js"; +import { _downloadDeserialize } from "./api/vpnSitesConfiguration/operations.js"; +import { + _createOrUpdateDeserialize as _createOrUpdateDeserializeRouteFilterRules, + _$deleteDeserialize as _$deleteDeserializeRouteFilterRules, +} from "./api/routeFilterRules/operations.js"; +import { + _createOrUpdateDeserialize as _createOrUpdateDeserializePrivateDnsZoneGroups, + _$deleteDeserialize as _$deleteDeserializePrivateDnsZoneGroups, +} from "./api/privateDnsZoneGroups/operations.js"; +import { + _stopDeserialize, + _$deleteDeserialize as _$deleteDeserializeConnectionMonitors, + _createOrUpdateDeserialize as _createOrUpdateDeserializeConnectionMonitors, +} from "./api/connectionMonitors/operations.js"; +import { + _getStatusDeserialize, + _stopDeserialize as _stopDeserializePacketCaptures, + _$deleteDeserialize as _$deleteDeserializePacketCaptures, + _createDeserialize, +} from "./api/packetCaptures/operations.js"; +import { _createOrUpdateDeserialize as _createOrUpdateDeserializeInboundSecurityRule } from "./api/inboundSecurityRule/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeNetworkSecurityPerimeterLinkReferences } from "./api/networkSecurityPerimeterLinkReferences/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeNetworkSecurityPerimeterLinks } from "./api/networkSecurityPerimeterLinks/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeNetworkSecurityPerimeterAssociations, + _createOrUpdateDeserialize as _createOrUpdateDeserializeNetworkSecurityPerimeterAssociations, +} from "./api/networkSecurityPerimeterAssociations/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeAdminRules } from "./api/adminRules/operations.js"; +import { _healthDeserialize } from "./api/loadBalancerLoadBalancingRules/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeLoadBalancerBackendAddressPools, + _createOrUpdateDeserialize as _createOrUpdateDeserializeLoadBalancerBackendAddressPools, +} from "./api/loadBalancerBackendAddressPools/operations.js"; +import { _postDeserialize } from "./api/networkManagerCommits/operations.js"; +import { _deployDeserialize } from "./api/firewallPolicyDeployments/operations.js"; +import { + _createOrUpdateDeserialize as _createOrUpdateDeserializeExpressRouteCrossConnectionPeerings, + _$deleteDeserialize as _$deleteDeserializeExpressRouteCrossConnectionPeerings, +} from "./api/expressRouteCrossConnectionPeerings/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeDscpConfiguration, + _createOrUpdateDeserialize as _createOrUpdateDeserializeDscpConfiguration, +} from "./api/dscpConfiguration/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeCustomIPPrefixes, + _createOrUpdateDeserialize as _createOrUpdateDeserializeCustomIPPrefixes, +} from "./api/customIPPrefixes/operations.js"; +import { _createDeserialize as _createDeserializeVipSwap } from "./api/vipSwap/operations.js"; +import { _getNodeAvailabilityDeserialize } from "./api/interconnectGroups/operations.js"; +import { + _updateServicesDeserialize, + _updateAddressLocationsDeserialize, + _$deleteDeserialize as _$deleteDeserializeServiceGateways, + _createOrUpdateDeserialize as _createOrUpdateDeserializeServiceGateways, +} from "./api/serviceGateways/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualNetworkAppliances, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualNetworkAppliances, +} from "./api/virtualNetworkAppliances/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeWebApplicationFirewallPolicies } from "./api/webApplicationFirewallPolicies/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeConnectionPolicies, + _createOrUpdateDeserialize as _createOrUpdateDeserializeConnectionPolicies, +} from "./api/connectionPolicies/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeHubRouteTables, + _createOrUpdateDeserialize as _createOrUpdateDeserializeHubRouteTables, +} from "./api/hubRouteTables/operations.js"; +import { + _getResiliencyInformationDeserialize, + _getRoutesInformationDeserialize, + _stopSiteFailoverTestDeserialize, + _startSiteFailoverTestDeserialize, + _getFailoverSingleTestDetailsDeserialize, + _getFailoverAllTestsDetailsDeserialize, + _$deleteDeserialize as _$deleteDeserializeExpressRouteGateways, + _updateTagsDeserialize as _updateTagsDeserializeExpressRouteGateways, + _createOrUpdateDeserialize as _createOrUpdateDeserializeExpressRouteGateways, +} from "./api/expressRouteGateways/operations.js"; +import { + _stopPacketCaptureDeserialize as _stopPacketCaptureDeserializeVpnGateways, + _startPacketCaptureDeserialize as _startPacketCaptureDeserializeVpnGateways, + _resetDeserialize as _resetDeserializeVpnGateways, + _$deleteDeserialize as _$deleteDeserializeVpnGateways, + _updateTagsDeserialize as _updateTagsDeserializeVpnGateways, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVpnGateways, +} from "./api/vpnGateways/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeRouteMaps, + _createOrUpdateDeserialize as _createOrUpdateDeserializeRouteMaps, +} from "./api/routeMaps/operations.js"; +import { + _getOutboundRoutesDeserialize, + _getInboundRoutesDeserialize, + _getEffectiveVirtualHubRoutesDeserialize, + _$deleteDeserialize as _$deleteDeserializeVirtualHubs, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualHubs, +} from "./api/virtualHubs/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVpnServerConfigurations, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVpnServerConfigurations, +} from "./api/vpnServerConfigurations/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVpnSites, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVpnSites, +} from "./api/vpnSites/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualWans, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualWans, +} from "./api/virtualWans/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualRouterPeerings, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualRouterPeerings, +} from "./api/virtualRouterPeerings/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualRouters, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualRouters, +} from "./api/virtualRouters/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualNetworkTaps, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualNetworkTaps, +} from "./api/virtualNetworkTaps/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualNetworkGatewayNatRules, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualNetworkGatewayNatRules, +} from "./api/virtualNetworkGatewayNatRules/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeLocalNetworkGateways, + _createOrUpdateDeserialize as _createOrUpdateDeserializeLocalNetworkGateways, +} from "./api/localNetworkGateways/operations.js"; +import { + _resetConnectionDeserialize as _resetConnectionDeserializeVirtualNetworkGatewayConnections, + _getIkeSasDeserialize as _getIkeSasDeserializeVirtualNetworkGatewayConnections, + _stopPacketCaptureDeserialize as _stopPacketCaptureDeserializeVirtualNetworkGatewayConnections, + _startPacketCaptureDeserialize as _startPacketCaptureDeserializeVirtualNetworkGatewayConnections, + _resetSharedKeyDeserialize, + _setSharedKeyDeserialize, + _$deleteDeserialize as _$deleteDeserializeVirtualNetworkGatewayConnections, + _updateTagsDeserialize as _updateTagsDeserializeVirtualNetworkGatewayConnections, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualNetworkGatewayConnections, +} from "./api/virtualNetworkGatewayConnections/operations.js"; +import { + _invokeAbortMigrationDeserialize, + _invokeCommitMigrationDeserialize, + _invokeExecuteMigrationDeserialize, + _invokePrepareMigrationDeserialize, + _disconnectVirtualNetworkGatewayVpnConnectionsDeserialize, + _getVpnclientConnectionHealthDeserialize, + _stopExpressRouteSiteFailoverSimulationDeserialize, + _startExpressRouteSiteFailoverSimulationDeserialize, + _getFailoverSingleTestDetailsDeserialize as _getFailoverSingleTestDetailsDeserializeVirtualNetworkGateways, + _getFailoverAllTestDetailsDeserialize, + _stopPacketCaptureDeserialize as _stopPacketCaptureDeserializeVirtualNetworkGateways, + _startPacketCaptureDeserialize as _startPacketCaptureDeserializeVirtualNetworkGateways, + _getVpnclientIpsecParametersDeserialize, + _setVpnclientIpsecParametersDeserialize, + _getRoutesInformationDeserialize as _getRoutesInformationDeserializeVirtualNetworkGateways, + _getResiliencyInformationDeserialize as _getResiliencyInformationDeserializeVirtualNetworkGateways, + _getAdvertisedRoutesDeserialize, + _getLearnedRoutesDeserialize, + _getBgpPeerStatusDeserialize, + _getVpnProfilePackageUrlDeserialize, + _generateVpnProfileDeserialize as _generateVpnProfileDeserializeVirtualNetworkGateways, + _generatevpnclientpackageDeserialize, + _resetVpnClientSharedKeyDeserialize, + _resetDeserialize as _resetDeserializeVirtualNetworkGateways, + _$deleteDeserialize as _$deleteDeserializeVirtualNetworkGateways, + _updateTagsDeserialize as _updateTagsDeserializeVirtualNetworkGateways, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualNetworkGateways, +} from "./api/virtualNetworkGateways/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualNetworkPeerings, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualNetworkPeerings, +} from "./api/virtualNetworkPeerings/operations.js"; +import { + _unprepareNetworkPoliciesDeserialize, + _prepareNetworkPoliciesDeserialize, + _$deleteDeserialize as _$deleteDeserializeSubnets, + _createOrUpdateDeserialize as _createOrUpdateDeserializeSubnets, +} from "./api/subnets/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualNetworks, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualNetworks, +} from "./api/virtualNetworks/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeServiceEndpointPolicyDefinitions, + _createOrUpdateDeserialize as _createOrUpdateDeserializeServiceEndpointPolicyDefinitions, +} from "./api/serviceEndpointPolicyDefinitions/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeServiceEndpointPolicies, + _createOrUpdateDeserialize as _createOrUpdateDeserializeServiceEndpointPolicies, +} from "./api/serviceEndpointPolicies/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeSecurityPartnerProviders, + _createOrUpdateDeserialize as _createOrUpdateDeserializeSecurityPartnerProviders, +} from "./api/securityPartnerProviders/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeRoutes, + _createOrUpdateDeserialize as _createOrUpdateDeserializeRoutes, +} from "./api/routes/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeRouteTables, + _createOrUpdateDeserialize as _createOrUpdateDeserializeRouteTables, +} from "./api/routeTables/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeRouteFilters, + _createOrUpdateDeserialize as _createOrUpdateDeserializeRouteFilters, +} from "./api/routeFilters/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializePublicIPPrefixes, + _createOrUpdateDeserialize as _createOrUpdateDeserializePublicIPPrefixes, +} from "./api/publicIPPrefixes/operations.js"; +import { + _checkPrivateLinkServiceVisibilityByResourceGroupDeserialize, + _checkPrivateLinkServiceVisibilityDeserialize, + _deletePrivateEndpointConnectionDeserialize, + _$deleteDeserialize as _$deleteDeserializePrivateLinkServices, + _createOrUpdateDeserialize as _createOrUpdateDeserializePrivateLinkServices, +} from "./api/privateLinkServices/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializePrivateEndpoints, + _createOrUpdateDeserialize as _createOrUpdateDeserializePrivateEndpoints, +} from "./api/privateEndpoints/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeFlowLogs, + _createOrUpdateDeserialize as _createOrUpdateDeserializeFlowLogs, +} from "./api/flowLogs/operations.js"; +import { + _getNetworkConfigurationDiagnosticDeserialize, + _listAvailableProvidersDeserialize, + _getAzureReachabilityReportDeserialize, + _checkConnectivityDeserialize, + _getFlowLogStatusDeserialize, + _setFlowLogConfigurationDeserialize, + _getTroubleshootingResultDeserialize, + _getTroubleshootingDeserialize, + _getVMSecurityRulesDeserialize, + _getNextHopDeserialize, + _verifyIPFlowDeserialize, + _$deleteDeserialize as _$deleteDeserializeNetworkWatchers, +} from "./api/networkWatchers/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVirtualApplianceSites, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualApplianceSites, +} from "./api/virtualApplianceSites/operations.js"; +import { + _getBootDiagnosticLogsDeserialize, + _reimageDeserialize, + _restartDeserialize, + _$deleteDeserialize as _$deleteDeserializeNetworkVirtualAppliances, + _createOrUpdateDeserialize as _createOrUpdateDeserializeNetworkVirtualAppliances, +} from "./api/networkVirtualAppliances/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeNetworkVirtualApplianceConnections, + _createOrUpdateDeserialize as _createOrUpdateDeserializeNetworkVirtualApplianceConnections, +} from "./api/networkVirtualApplianceConnections/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeReachabilityAnalysisRuns } from "./api/reachabilityAnalysisRuns/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeVerifierWorkspaces } from "./api/verifierWorkspaces/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeNetworkSecurityPerimeters } from "./api/networkSecurityPerimeters/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeSecurityRules, + _createOrUpdateDeserialize as _createOrUpdateDeserializeSecurityRules, +} from "./api/securityRules/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeNetworkSecurityGroups, + _createOrUpdateDeserialize as _createOrUpdateDeserializeNetworkSecurityGroups, +} from "./api/networkSecurityGroups/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeNetworkProfiles } from "./api/networkProfiles/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeSecurityUserRules } from "./api/securityUserRules/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeSecurityUserRuleCollections } from "./api/securityUserRuleCollections/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeSecurityUserConfigurations } from "./api/securityUserConfigurations/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeAdminRuleCollections } from "./api/adminRuleCollections/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeSecurityAdminConfigurations } from "./api/securityAdminConfigurations/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeCommits, + _createOrUpdateDeserialize as _createOrUpdateDeserializeCommits, +} from "./api/commits/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeRoutingRules } from "./api/routingRules/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeRoutingRuleCollections } from "./api/routingRuleCollections/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeNetworkManagerRoutingConfigurations } from "./api/networkManagerRoutingConfigurations/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeNetworkGroups } from "./api/networkGroups/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeConnectivityConfigurations } from "./api/connectivityConfigurations/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeNetworkInterfaceTapConfigurations, + _createOrUpdateDeserialize as _createOrUpdateDeserializeNetworkInterfaceTapConfigurations, +} from "./api/networkInterfaceTapConfigurations/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeNatGateways, + _createOrUpdateDeserialize as _createOrUpdateDeserializeNatGateways, +} from "./api/natGateways/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeInboundNatRules, + _createOrUpdateDeserialize as _createOrUpdateDeserializeInboundNatRules, +} from "./api/inboundNatRules/operations.js"; +import { + _swapPublicIpAddressesDeserialize, + _listInboundNatRulePortMappingsDeserialize, + _$deleteDeserialize as _$deleteDeserializeLoadBalancers, + _createOrUpdateDeserialize as _createOrUpdateDeserializeLoadBalancers, +} from "./api/loadBalancers/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeIpGroups, + _createOrUpdateDeserialize as _createOrUpdateDeserializeIpGroups, +} from "./api/ipGroups/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeIpAllocations, + _createOrUpdateDeserialize as _createOrUpdateDeserializeIpAllocations, +} from "./api/ipAllocations/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeStaticCidrs } from "./api/staticCidrs/operations.js"; +import { _$deleteDeserialize as _$deleteDeserializeNetworkManagers } from "./api/networkManagers/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeIpamPools, + _createDeserialize as _createDeserializeIpamPools, +} from "./api/ipamPools/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeFirewallPolicyRuleCollectionGroups, + _createOrUpdateDeserialize as _createOrUpdateDeserializeFirewallPolicyRuleCollectionGroups, +} from "./api/firewallPolicyRuleCollectionGroups/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeFirewallPolicies, + _createOrUpdateDeserialize as _createOrUpdateDeserializeFirewallPolicies, +} from "./api/firewallPolicies/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeExpressRoutePortAuthorizations, + _createOrUpdateDeserialize as _createOrUpdateDeserializeExpressRoutePortAuthorizations, +} from "./api/expressRoutePortAuthorizations/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeExpressRoutePorts, + _createOrUpdateDeserialize as _createOrUpdateDeserializeExpressRoutePorts, +} from "./api/expressRoutePorts/operations.js"; +import { + _listRoutesTableDeserialize, + _listRoutesTableSummaryDeserialize, + _listArpTableDeserialize, + _createOrUpdateDeserialize as _createOrUpdateDeserializeExpressRouteCrossConnections, +} from "./api/expressRouteCrossConnections/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeExpressRouteCircuitConnections, + _createOrUpdateDeserialize as _createOrUpdateDeserializeExpressRouteCircuitConnections, +} from "./api/expressRouteCircuitConnections/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeExpressRouteCircuitPeerings, + _createOrUpdateDeserialize as _createOrUpdateDeserializeExpressRouteCircuitPeerings, +} from "./api/expressRouteCircuitPeerings/operations.js"; +import { + _listRoutesTableSummaryDeserialize as _listRoutesTableSummaryDeserializeExpressRouteCircuits, + _listRoutesTableDeserialize as _listRoutesTableDeserializeExpressRouteCircuits, + _listArpTableDeserialize as _listArpTableDeserializeExpressRouteCircuits, + _stopCircuitLinkFailoverTestDeserialize, + _startCircuitLinkFailoverTestDeserialize, + _getCircuitLinkFailoverSingleTestDetailsDeserialize, + _getCircuitLinkFailoverAllTestsDetailsDeserialize, + _$deleteDeserialize as _$deleteDeserializeExpressRouteCircuits, + _createOrUpdateDeserialize as _createOrUpdateDeserializeExpressRouteCircuits, +} from "./api/expressRouteCircuits/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeExpressRouteCircuitAuthorizations, + _createOrUpdateDeserialize as _createOrUpdateDeserializeExpressRouteCircuitAuthorizations, +} from "./api/expressRouteCircuitAuthorizations/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeDdosProtectionPlans, + _createOrUpdateDeserialize as _createOrUpdateDeserializeDdosProtectionPlans, +} from "./api/ddosProtectionPlans/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeDdosCustomPolicies, + _createOrUpdateDeserialize as _createOrUpdateDeserializeDdosCustomPolicies, +} from "./api/ddosCustomPolicies/operations.js"; +import { + _disassociateCloudServiceReservedPublicIpDeserialize, + _reserveCloudServicePublicIpAddressDeserialize, + _ddosProtectionStatusDeserialize, + _$deleteDeserialize as _$deleteDeserializePublicIPAddresses, + _createOrUpdateDeserialize as _createOrUpdateDeserializePublicIPAddresses, +} from "./api/publicIPAddresses/operations.js"; +import { + _listEffectiveNetworkSecurityGroupsDeserialize, + _getEffectiveRouteTableDeserialize, + _$deleteDeserialize as _$deleteDeserializeNetworkInterfaces, + _createOrUpdateDeserialize as _createOrUpdateDeserializeNetworkInterfaces, +} from "./api/networkInterfaces/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeBastionHosts, + _updateTagsDeserialize as _updateTagsDeserializeBastionHosts, + _createOrUpdateDeserialize as _createOrUpdateDeserializeBastionHosts, +} from "./api/bastionHosts/operations.js"; +import { + _packetCaptureOperationDeserialize, + _packetCaptureDeserialize, + _listLearnedPrefixesDeserialize, + _$deleteDeserialize as _$deleteDeserializeAzureFirewalls, + _updateTagsDeserialize as _updateTagsDeserializeAzureFirewalls, + _createOrUpdateDeserialize as _createOrUpdateDeserializeAzureFirewalls, +} from "./api/azureFirewalls/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeApplicationSecurityGroups, + _createOrUpdateDeserialize as _createOrUpdateDeserializeApplicationSecurityGroups, +} from "./api/applicationSecurityGroups/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeApplicationGatewayPrivateEndpointConnections, + _updateDeserialize, +} from "./api/applicationGatewayPrivateEndpointConnections/operations.js"; +import { + _backendHealthOnDemandDeserialize, + _backendHealthDeserialize, + _stopDeserialize as _stopDeserializeApplicationGateways, + _startDeserialize, + _$deleteDeserialize as _$deleteDeserializeApplicationGateways, + _createOrUpdateDeserialize as _createOrUpdateDeserializeApplicationGateways, +} from "./api/applicationGateways/operations.js"; +import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; +import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; +import { + PollerLike, + OperationState, + deserializeState, + ResourceLocationConfig, +} from "@azure/core-lro"; + +export interface RestorePollerOptions< + TResult, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +> extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** Deserialization function for raw response body */ + processResponseBody?: (result: TResponse) => Promise; +} + +/** + * Creates a poller from the serialized state of another poller. This can be + * useful when you want to create pollers on a different host or a poller + * needs to be constructed after the original one is not in scope. + */ +export function restorePoller( + client: NetworkManagementClient, + serializedState: string, + sourceOperation: (...args: any[]) => PollerLike, TResult>, + options?: RestorePollerOptions, +): PollerLike, TResult> { + const pollerConfig = deserializeState(serializedState).config; + const { initialRequestUrl, requestMethod, metadata } = pollerConfig; + if (!initialRequestUrl || !requestMethod) { + throw new Error( + `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`, + ); + } + const resourceLocationConfig = metadata?.["resourceLocationConfig"] as + | ResourceLocationConfig + | undefined; + const { deserializer, expectedStatuses = [] } = + getDeserializationHelper(initialRequestUrl, requestMethod) ?? {}; + const deserializeHelper = options?.processResponseBody ?? deserializer; + if (!deserializeHelper) { + throw new Error( + `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`, + ); + } + const apiVersion = getApiVersionFromUrl(initialRequestUrl); + return getLongRunningPoller( + (client as any)["_client"] ?? client, + deserializeHelper as (result: TResponse) => Promise, + expectedStatuses, + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + resourceLocationConfig, + restoreFrom: serializedState, + initialRequestUrl, + apiVersion, + }, + ); +} + +interface DeserializationHelper { + deserializer: (result: PathUncheckedResponse) => Promise; + expectedStatuses: string[]; +} + +const deserializeMap: Record = { + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/generateVpnProfile": + { + deserializer: _generatevirtualwanvpnserverconfigurationvpnprofileDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinksByToken": + { + deserializer: _deleteBastionShareableLinkByTokenDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks": + { + deserializer: _deleteBastionShareableLinkDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}": + { deserializer: _$deleteDeserialize, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}": + { deserializer: _createOrUpdateDeserialize, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}": + { + deserializer: _$deleteDeserializeVirtualHubIpConfiguration, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}": + { + deserializer: _createOrUpdateDeserializeVirtualHubIpConfiguration, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes": + { deserializer: _listAdvertisedRoutesDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes": + { deserializer: _listLearnedRoutesDeserialize, expectedStatuses: ["200", "202", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}": + { + deserializer: _$deleteDeserializeVirtualHubBgpConnection, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}": + { + deserializer: _createOrUpdateDeserializeVirtualHubBgpConnection, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}": + { + deserializer: _$deleteDeserializeExpressRouteConnections, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}": + { + deserializer: _createOrUpdateDeserializeExpressRouteConnections, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections": + { + deserializer: _disconnectP2SVpnConnectionsDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed": + { + deserializer: _getP2SVpnConnectionHealthDetailedDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth": + { + deserializer: _getP2SVpnConnectionHealthDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile": + { deserializer: _generateVpnProfileDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset": + { deserializer: _resetDeserialize, expectedStatuses: ["200", "202", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}": + { deserializer: _$deleteDeserializeP2SVpnGateways, expectedStatuses: ["200", "202", "204"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}": + { deserializer: _updateTagsDeserialize, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}": + { + deserializer: _createOrUpdateDeserializeP2SVpnGateways, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}": + { deserializer: _$deleteDeserializeNatRules, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}": + { deserializer: _createOrUpdateDeserializeNatRules, expectedStatuses: ["200", "201", "202"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas": + { deserializer: _getIkeSasDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection": + { deserializer: _resetConnectionDeserialize, expectedStatuses: ["202", "200", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys/default": + { + deserializer: _setOrInitDefaultSharedKeyDeserialize, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture": + { deserializer: _stopPacketCaptureDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture": + { deserializer: _startPacketCaptureDeserialize, expectedStatuses: ["202", "200", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}": + { deserializer: _$deleteDeserializeVpnConnections, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}": + { + deserializer: _createOrUpdateDeserializeVpnConnections, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}": + { + deserializer: _$deleteDeserializeVirtualHubRouteTableV2S, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}": + { + deserializer: _createOrUpdateDeserializeVirtualHubRouteTableV2S, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}": + { + deserializer: _$deleteDeserializeHubVirtualNetworkConnections, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}": + { + deserializer: _createOrUpdateDeserializeHubVirtualNetworkConnections, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}": + { + deserializer: _$deleteDeserializeConfigurationPolicyGroups, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}": + { + deserializer: _createOrUpdateDeserializeConfigurationPolicyGroups, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations": + { deserializer: _listDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration": + { deserializer: _downloadDeserialize, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}": + { + deserializer: _createOrUpdateDeserializeRouteFilterRules, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}": + { deserializer: _$deleteDeserializeRouteFilterRules, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}": + { + deserializer: _createOrUpdateDeserializePrivateDnsZoneGroups, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}": + { + deserializer: _$deleteDeserializePrivateDnsZoneGroups, + expectedStatuses: ["200", "202", "204"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop": + { deserializer: _stopDeserialize, expectedStatuses: ["202", "200", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}": + { + deserializer: _$deleteDeserializeConnectionMonitors, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}": + { + deserializer: _createOrUpdateDeserializeConnectionMonitors, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus": + { deserializer: _getStatusDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop": + { deserializer: _stopDeserializePacketCaptures, expectedStatuses: ["200", "202", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}": + { deserializer: _$deleteDeserializePacketCaptures, expectedStatuses: ["202", "204", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}": + { deserializer: _createDeserialize, expectedStatuses: ["201", "200", "202"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}": + { + deserializer: _createOrUpdateDeserializeInboundSecurityRule, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/linkReferences/{linkReferenceName}": + { + deserializer: _$deleteDeserializeNetworkSecurityPerimeterLinkReferences, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}": + { + deserializer: _$deleteDeserializeNetworkSecurityPerimeterLinks, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}": + { + deserializer: _$deleteDeserializeNetworkSecurityPerimeterAssociations, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}": + { + deserializer: _createOrUpdateDeserializeNetworkSecurityPerimeterAssociations, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}": + { deserializer: _$deleteDeserializeAdminRules, expectedStatuses: ["200", "202", "204"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}/health": + { deserializer: _healthDeserialize, expectedStatuses: ["200", "202", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}": + { + deserializer: _$deleteDeserializeLoadBalancerBackendAddressPools, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}": + { + deserializer: _createOrUpdateDeserializeLoadBalancerBackendAddressPools, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commit": + { deserializer: _postDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/deploy": + { deserializer: _deployDeserialize, expectedStatuses: ["202", "200", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}": + { + deserializer: _createOrUpdateDeserializeExpressRouteCrossConnectionPeerings, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}": + { + deserializer: _$deleteDeserializeExpressRouteCrossConnectionPeerings, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}": + { deserializer: _$deleteDeserializeDscpConfiguration, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}": + { + deserializer: _createOrUpdateDeserializeDscpConfiguration, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}": + { deserializer: _$deleteDeserializeCustomIPPrefixes, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}": + { + deserializer: _createOrUpdateDeserializeCustomIPPrefixes, + expectedStatuses: ["200", "201", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/microsoft.Compute/cloudServices/{resourceName}/providers/Microsoft.Network/cloudServiceSlots/{singletonResource}": + { deserializer: _createDeserializeVipSwap, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interconnectGroups/{interconnectGroupName}/nodeAvailability": + { deserializer: _getNodeAvailabilityDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}/updateServices": + { deserializer: _updateServicesDeserialize, expectedStatuses: ["202", "204", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}/updateAddressLocations": + { + deserializer: _updateAddressLocationsDeserialize, + expectedStatuses: ["202", "204", "200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}": + { deserializer: _$deleteDeserializeServiceGateways, expectedStatuses: ["202", "204", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceGateways/{serviceGatewayName}": + { + deserializer: _createOrUpdateDeserializeServiceGateways, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances/{virtualNetworkApplianceName}": + { + deserializer: _$deleteDeserializeVirtualNetworkAppliances, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkAppliances/{virtualNetworkApplianceName}": + { + deserializer: _createOrUpdateDeserializeVirtualNetworkAppliances, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}": + { + deserializer: _$deleteDeserializeWebApplicationFirewallPolicies, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/connectionPolicies/{connectionPolicyName}": + { + deserializer: _$deleteDeserializeConnectionPolicies, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/connectionPolicies/{connectionPolicyName}": + { + deserializer: _createOrUpdateDeserializeConnectionPolicies, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}": + { deserializer: _$deleteDeserializeHubRouteTables, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}": + { + deserializer: _createOrUpdateDeserializeHubRouteTables, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/getResiliencyInformation": + { deserializer: _getResiliencyInformationDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/getRoutesInformation": + { deserializer: _getRoutesInformationDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/stopSiteFailoverTest": + { deserializer: _stopSiteFailoverTestDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/startSiteFailoverTest": + { deserializer: _startSiteFailoverTestDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/getFailoverSingleTestDetails": + { + deserializer: _getFailoverSingleTestDetailsDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/getFailoverAllTestsDetails": + { + deserializer: _getFailoverAllTestsDetailsDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}": + { + deserializer: _$deleteDeserializeExpressRouteGateways, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}": + { + deserializer: _updateTagsDeserializeExpressRouteGateways, + expectedStatuses: ["200", "202", "201"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}": + { + deserializer: _createOrUpdateDeserializeExpressRouteGateways, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture": + { + deserializer: _stopPacketCaptureDeserializeVpnGateways, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture": + { + deserializer: _startPacketCaptureDeserializeVpnGateways, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset": + { deserializer: _resetDeserializeVpnGateways, expectedStatuses: ["200", "202", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}": + { deserializer: _$deleteDeserializeVpnGateways, expectedStatuses: ["200", "202", "204"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}": + { deserializer: _updateTagsDeserializeVpnGateways, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}": + { + deserializer: _createOrUpdateDeserializeVpnGateways, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName}": + { deserializer: _$deleteDeserializeRouteMaps, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName}": + { deserializer: _createOrUpdateDeserializeRouteMaps, expectedStatuses: ["200", "201", "202"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/outboundRoutes": + { deserializer: _getOutboundRoutesDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/inboundRoutes": + { deserializer: _getInboundRoutesDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes": + { + deserializer: _getEffectiveVirtualHubRoutesDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}": + { deserializer: _$deleteDeserializeVirtualHubs, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}": + { + deserializer: _createOrUpdateDeserializeVirtualHubs, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}": + { + deserializer: _$deleteDeserializeVpnServerConfigurations, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}": + { + deserializer: _createOrUpdateDeserializeVpnServerConfigurations, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}": + { deserializer: _$deleteDeserializeVpnSites, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}": + { deserializer: _createOrUpdateDeserializeVpnSites, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}": + { deserializer: _$deleteDeserializeVirtualWans, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}": + { + deserializer: _createOrUpdateDeserializeVirtualWans, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}": + { + deserializer: _$deleteDeserializeVirtualRouterPeerings, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}": + { + deserializer: _createOrUpdateDeserializeVirtualRouterPeerings, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}": + { deserializer: _$deleteDeserializeVirtualRouters, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}": + { + deserializer: _createOrUpdateDeserializeVirtualRouters, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}": + { + deserializer: _$deleteDeserializeVirtualNetworkTaps, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}": + { + deserializer: _createOrUpdateDeserializeVirtualNetworkTaps, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}": + { + deserializer: _$deleteDeserializeVirtualNetworkGatewayNatRules, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}": + { + deserializer: _createOrUpdateDeserializeVirtualNetworkGatewayNatRules, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}": + { + deserializer: _$deleteDeserializeLocalNetworkGateways, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}": + { + deserializer: _createOrUpdateDeserializeLocalNetworkGateways, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection": + { + deserializer: _resetConnectionDeserializeVirtualNetworkGatewayConnections, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas": + { + deserializer: _getIkeSasDeserializeVirtualNetworkGatewayConnections, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture": + { + deserializer: _stopPacketCaptureDeserializeVirtualNetworkGatewayConnections, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture": + { + deserializer: _startPacketCaptureDeserializeVirtualNetworkGatewayConnections, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset": + { deserializer: _resetSharedKeyDeserialize, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey": + { deserializer: _setSharedKeyDeserialize, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}": + { + deserializer: _$deleteDeserializeVirtualNetworkGatewayConnections, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}": + { + deserializer: _updateTagsDeserializeVirtualNetworkGatewayConnections, + expectedStatuses: ["200", "202", "201"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}": + { + deserializer: _createOrUpdateDeserializeVirtualNetworkGatewayConnections, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/abortMigration": + { deserializer: _invokeAbortMigrationDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/commitMigration": + { deserializer: _invokeCommitMigrationDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/executeMigration": + { deserializer: _invokeExecuteMigrationDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/prepareMigration": + { deserializer: _invokePrepareMigrationDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections": + { + deserializer: _disconnectVirtualNetworkGatewayVpnConnectionsDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth": + { + deserializer: _getVpnclientConnectionHealthDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopSiteFailoverTest": + { + deserializer: _stopExpressRouteSiteFailoverSimulationDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startSiteFailoverTest": + { + deserializer: _startExpressRouteSiteFailoverSimulationDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverSingleTestDetails": + { + deserializer: _getFailoverSingleTestDetailsDeserializeVirtualNetworkGateways, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverAllTestsDetails": + { + deserializer: _getFailoverAllTestDetailsDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture": + { + deserializer: _stopPacketCaptureDeserializeVirtualNetworkGateways, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture": + { + deserializer: _startPacketCaptureDeserializeVirtualNetworkGateways, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters": + { + deserializer: _getVpnclientIpsecParametersDeserialize, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters": + { + deserializer: _setVpnclientIpsecParametersDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getRoutesInformation": + { + deserializer: _getRoutesInformationDeserializeVirtualNetworkGateways, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getResiliencyInformation": + { + deserializer: _getResiliencyInformationDeserializeVirtualNetworkGateways, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes": + { deserializer: _getAdvertisedRoutesDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes": + { deserializer: _getLearnedRoutesDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus": + { deserializer: _getBgpPeerStatusDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl": + { deserializer: _getVpnProfilePackageUrlDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile": + { + deserializer: _generateVpnProfileDeserializeVirtualNetworkGateways, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage": + { deserializer: _generatevpnclientpackageDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey": + { deserializer: _resetVpnClientSharedKeyDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset": + { + deserializer: _resetDeserializeVirtualNetworkGateways, + expectedStatuses: ["200", "202", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}": + { + deserializer: _$deleteDeserializeVirtualNetworkGateways, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}": + { + deserializer: _updateTagsDeserializeVirtualNetworkGateways, + expectedStatuses: ["200", "202", "201"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}": + { + deserializer: _createOrUpdateDeserializeVirtualNetworkGateways, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}": + { + deserializer: _$deleteDeserializeVirtualNetworkPeerings, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}": + { + deserializer: _createOrUpdateDeserializeVirtualNetworkPeerings, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/unprepareNetworkPolicies": + { deserializer: _unprepareNetworkPoliciesDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/prepareNetworkPolicies": + { deserializer: _prepareNetworkPoliciesDeserialize, expectedStatuses: ["202", "200", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}": + { deserializer: _$deleteDeserializeSubnets, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}": + { deserializer: _createOrUpdateDeserializeSubnets, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}": + { deserializer: _$deleteDeserializeVirtualNetworks, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}": + { + deserializer: _createOrUpdateDeserializeVirtualNetworks, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}": + { + deserializer: _$deleteDeserializeServiceEndpointPolicyDefinitions, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}": + { + deserializer: _createOrUpdateDeserializeServiceEndpointPolicyDefinitions, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}": + { + deserializer: _$deleteDeserializeServiceEndpointPolicies, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}": + { + deserializer: _createOrUpdateDeserializeServiceEndpointPolicies, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}": + { + deserializer: _$deleteDeserializeSecurityPartnerProviders, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}": + { + deserializer: _createOrUpdateDeserializeSecurityPartnerProviders, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}": + { deserializer: _$deleteDeserializeRoutes, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}": + { deserializer: _createOrUpdateDeserializeRoutes, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}": + { deserializer: _$deleteDeserializeRouteTables, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}": + { + deserializer: _createOrUpdateDeserializeRouteTables, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}": + { deserializer: _$deleteDeserializeRouteFilters, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}": + { + deserializer: _createOrUpdateDeserializeRouteFilters, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}": + { deserializer: _$deleteDeserializePublicIPPrefixes, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}": + { + deserializer: _createOrUpdateDeserializePublicIPPrefixes, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility": + { + deserializer: _checkPrivateLinkServiceVisibilityByResourceGroupDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility": + { + deserializer: _checkPrivateLinkServiceVisibilityDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}": + { + deserializer: _deletePrivateEndpointConnectionDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}": + { + deserializer: _$deleteDeserializePrivateLinkServices, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}": + { + deserializer: _createOrUpdateDeserializePrivateLinkServices, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}": + { deserializer: _$deleteDeserializePrivateEndpoints, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}": + { + deserializer: _createOrUpdateDeserializePrivateEndpoints, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}": + { deserializer: _$deleteDeserializeFlowLogs, expectedStatuses: ["202", "204", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}": + { deserializer: _createOrUpdateDeserializeFlowLogs, expectedStatuses: ["200", "201", "202"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic": + { + deserializer: _getNetworkConfigurationDiagnosticDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList": + { deserializer: _listAvailableProvidersDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport": + { + deserializer: _getAzureReachabilityReportDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck": + { deserializer: _checkConnectivityDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus": + { deserializer: _getFlowLogStatusDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog": + { deserializer: _setFlowLogConfigurationDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult": + { deserializer: _getTroubleshootingResultDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot": + { deserializer: _getTroubleshootingDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView": + { deserializer: _getVMSecurityRulesDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop": + { deserializer: _getNextHopDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify": + { deserializer: _verifyIPFlowDeserialize, expectedStatuses: ["200", "202", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}": + { deserializer: _$deleteDeserializeNetworkWatchers, expectedStatuses: ["202", "204", "200"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}": + { + deserializer: _$deleteDeserializeVirtualApplianceSites, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}": + { + deserializer: _createOrUpdateDeserializeVirtualApplianceSites, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/getBootDiagnosticLogs": + { deserializer: _getBootDiagnosticLogsDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/reimage": + { deserializer: _reimageDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/restart": + { deserializer: _restartDeserialize, expectedStatuses: ["200", "202", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}": + { + deserializer: _$deleteDeserializeNetworkVirtualAppliances, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}": + { + deserializer: _createOrUpdateDeserializeNetworkVirtualAppliances, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections/{connectionName}": + { + deserializer: _$deleteDeserializeNetworkVirtualApplianceConnections, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections/{connectionName}": + { + deserializer: _createOrUpdateDeserializeNetworkVirtualApplianceConnections, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}": + { + deserializer: _$deleteDeserializeReachabilityAnalysisRuns, + expectedStatuses: ["202", "204", "200"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}": + { + deserializer: _$deleteDeserializeVerifierWorkspaces, + expectedStatuses: ["202", "204", "200"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}": + { + deserializer: _$deleteDeserializeNetworkSecurityPerimeters, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}": + { deserializer: _$deleteDeserializeSecurityRules, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}": + { + deserializer: _createOrUpdateDeserializeSecurityRules, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}": + { + deserializer: _$deleteDeserializeNetworkSecurityGroups, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}": + { + deserializer: _createOrUpdateDeserializeNetworkSecurityGroups, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}": + { deserializer: _$deleteDeserializeNetworkProfiles, expectedStatuses: ["200", "202", "204"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}": + { deserializer: _$deleteDeserializeSecurityUserRules, expectedStatuses: ["200", "202", "204"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}": + { + deserializer: _$deleteDeserializeSecurityUserRuleCollections, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}": + { + deserializer: _$deleteDeserializeSecurityUserConfigurations, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}": + { + deserializer: _$deleteDeserializeAdminRuleCollections, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}": + { + deserializer: _$deleteDeserializeSecurityAdminConfigurations, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commits/{commitName}": + { deserializer: _$deleteDeserializeCommits, expectedStatuses: ["202", "204", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commits/{commitName}": + { deserializer: _createOrUpdateDeserializeCommits, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}": + { deserializer: _$deleteDeserializeRoutingRules, expectedStatuses: ["200", "202", "204"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}": + { + deserializer: _$deleteDeserializeRoutingRuleCollections, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}": + { + deserializer: _$deleteDeserializeNetworkManagerRoutingConfigurations, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}": + { deserializer: _$deleteDeserializeNetworkGroups, expectedStatuses: ["200", "202", "204"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}": + { + deserializer: _$deleteDeserializeConnectivityConfigurations, + expectedStatuses: ["200", "202", "204"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}": + { + deserializer: _$deleteDeserializeNetworkInterfaceTapConfigurations, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}": + { + deserializer: _createOrUpdateDeserializeNetworkInterfaceTapConfigurations, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}": + { deserializer: _$deleteDeserializeNatGateways, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}": + { + deserializer: _createOrUpdateDeserializeNatGateways, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}": + { deserializer: _$deleteDeserializeInboundNatRules, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}": + { + deserializer: _createOrUpdateDeserializeInboundNatRules, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses": + { deserializer: _swapPublicIpAddressesDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping": + { + deserializer: _listInboundNatRulePortMappingsDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}": + { deserializer: _$deleteDeserializeLoadBalancers, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}": + { + deserializer: _createOrUpdateDeserializeLoadBalancers, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}": + { deserializer: _$deleteDeserializeIpGroups, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}": + { deserializer: _createOrUpdateDeserializeIpGroups, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}": + { deserializer: _$deleteDeserializeIpAllocations, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}": + { + deserializer: _createOrUpdateDeserializeIpAllocations, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}": + { deserializer: _$deleteDeserializeStaticCidrs, expectedStatuses: ["202", "204", "200"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}": + { deserializer: _$deleteDeserializeNetworkManagers, expectedStatuses: ["200", "202", "204"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}": + { deserializer: _$deleteDeserializeIpamPools, expectedStatuses: ["202", "204", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}": + { deserializer: _createDeserializeIpamPools, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}": + { + deserializer: _$deleteDeserializeFirewallPolicyRuleCollectionGroups, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}": + { + deserializer: _createOrUpdateDeserializeFirewallPolicyRuleCollectionGroups, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}": + { deserializer: _$deleteDeserializeFirewallPolicies, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}": + { + deserializer: _createOrUpdateDeserializeFirewallPolicies, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}": + { + deserializer: _$deleteDeserializeExpressRoutePortAuthorizations, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}": + { + deserializer: _createOrUpdateDeserializeExpressRoutePortAuthorizations, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}": + { deserializer: _$deleteDeserializeExpressRoutePorts, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}": + { + deserializer: _createOrUpdateDeserializeExpressRoutePorts, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}": + { deserializer: _listRoutesTableDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}": + { deserializer: _listRoutesTableSummaryDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}": + { deserializer: _listArpTableDeserialize, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}": + { + deserializer: _createOrUpdateDeserializeExpressRouteCrossConnections, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}": + { + deserializer: _$deleteDeserializeExpressRouteCircuitConnections, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}": + { + deserializer: _createOrUpdateDeserializeExpressRouteCircuitConnections, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}": + { + deserializer: _$deleteDeserializeExpressRouteCircuitPeerings, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}": + { + deserializer: _createOrUpdateDeserializeExpressRouteCircuitPeerings, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}": + { + deserializer: _listRoutesTableSummaryDeserializeExpressRouteCircuits, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}": + { + deserializer: _listRoutesTableDeserializeExpressRouteCircuits, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}": + { + deserializer: _listArpTableDeserializeExpressRouteCircuits, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stopCircuitLinkFailoverTest": + { + deserializer: _stopCircuitLinkFailoverTestDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/startCircuitLinkFailoverTest": + { + deserializer: _startCircuitLinkFailoverTestDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/getCircuitLinkFailoverSingleTestDetails": + { + deserializer: _getCircuitLinkFailoverSingleTestDetailsDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/getCircuitLinkFailoverAllTestsDetails": + { + deserializer: _getCircuitLinkFailoverAllTestsDetailsDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}": + { + deserializer: _$deleteDeserializeExpressRouteCircuits, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}": + { + deserializer: _createOrUpdateDeserializeExpressRouteCircuits, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}": + { + deserializer: _$deleteDeserializeExpressRouteCircuitAuthorizations, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}": + { + deserializer: _createOrUpdateDeserializeExpressRouteCircuitAuthorizations, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}": + { + deserializer: _$deleteDeserializeDdosProtectionPlans, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}": + { + deserializer: _createOrUpdateDeserializeDdosProtectionPlans, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}": + { + deserializer: _$deleteDeserializeDdosCustomPolicies, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}": + { + deserializer: _createOrUpdateDeserializeDdosCustomPolicies, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/disassociateCloudServiceReservedPublicIp": + { + deserializer: _disassociateCloudServiceReservedPublicIpDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/reserveCloudServicePublicIpAddress": + { + deserializer: _reserveCloudServicePublicIpAddressDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/ddosProtectionStatus": + { deserializer: _ddosProtectionStatusDeserialize, expectedStatuses: ["200", "202", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}": + { deserializer: _$deleteDeserializePublicIPAddresses, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}": + { + deserializer: _createOrUpdateDeserializePublicIPAddresses, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups": + { + deserializer: _listEffectiveNetworkSecurityGroupsDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable": + { deserializer: _getEffectiveRouteTableDeserialize, expectedStatuses: ["200", "202", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}": + { deserializer: _$deleteDeserializeNetworkInterfaces, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}": + { + deserializer: _createOrUpdateDeserializeNetworkInterfaces, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}": + { deserializer: _$deleteDeserializeBastionHosts, expectedStatuses: ["200", "202", "204"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}": + { deserializer: _updateTagsDeserializeBastionHosts, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}": + { + deserializer: _createOrUpdateDeserializeBastionHosts, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/packetCaptureOperation": + { deserializer: _packetCaptureOperationDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/packetCapture": + { deserializer: _packetCaptureDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/learnedIPPrefixes": + { deserializer: _listLearnedPrefixesDeserialize, expectedStatuses: ["200", "202", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}": + { deserializer: _$deleteDeserializeAzureFirewalls, expectedStatuses: ["200", "202", "204"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}": + { deserializer: _updateTagsDeserializeAzureFirewalls, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}": + { + deserializer: _createOrUpdateDeserializeAzureFirewalls, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}": + { + deserializer: _$deleteDeserializeApplicationSecurityGroups, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}": + { + deserializer: _createOrUpdateDeserializeApplicationSecurityGroups, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}": + { + deserializer: _$deleteDeserializeApplicationGatewayPrivateEndpointConnections, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}": + { deserializer: _updateDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand": + { deserializer: _backendHealthOnDemandDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth": + { deserializer: _backendHealthDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop": + { deserializer: _stopDeserializeApplicationGateways, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start": + { deserializer: _startDeserialize, expectedStatuses: ["202", "200", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}": + { + deserializer: _$deleteDeserializeApplicationGateways, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}": + { + deserializer: _createOrUpdateDeserializeApplicationGateways, + expectedStatuses: ["200", "201", "202"], + }, +}; + +function getDeserializationHelper( + urlStr: string, + method: string, +): DeserializationHelper | undefined { + const path = new URL(urlStr).pathname; + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: DeserializationHelper | undefined; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(deserializeMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} + +function getApiVersionFromUrl(urlStr: string): string | undefined { + const url = new URL(urlStr); + return url.searchParams.get("api-version") ?? undefined; +} diff --git a/sdk/network/arm-network/src/static-helpers/cloudSettingHelpers.ts b/sdk/network/arm-network/src/static-helpers/cloudSettingHelpers.ts new file mode 100644 index 000000000000..613112c6e397 --- /dev/null +++ b/sdk/network/arm-network/src/static-helpers/cloudSettingHelpers.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * An enum to describe Azure Cloud environments. + * @enum {string} + */ +export enum AzureClouds { + /** Azure public cloud, which is the default cloud for Azure SDKs. */ + AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD", + /** Azure China cloud */ + AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD", + /** Azure US government cloud */ + AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT", +} + +/** The supported values for cloud setting as a string literal type */ +export type AzureSupportedClouds = `${AzureClouds}`; + +/** + * Gets the Azure Resource Manager endpoint URL for the specified cloud setting. + * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values. + * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined. + * @throws {Error} Throws an error if an unknown cloud setting is provided. + */ +export function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined { + if (cloudSetting === undefined) { + return undefined; + } + const cloudEndpoints: Record = { + AZURE_CHINA_CLOUD: "https://management.chinacloudapi.cn/", + AZURE_US_GOVERNMENT: "https://management.usgovcloudapi.net/", + AZURE_PUBLIC_CLOUD: "https://management.azure.com/", + }; + if (cloudSetting in cloudEndpoints) { + return cloudEndpoints[cloudSetting]; + } else { + throw new Error( + `Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`, + ); + } +} diff --git a/sdk/network/arm-network/src/static-helpers/pagingHelpers.ts b/sdk/network/arm-network/src/static-helpers/pagingHelpers.ts new file mode 100644 index 000000000000..5545e8e42a92 --- /dev/null +++ b/sdk/network/arm-network/src/static-helpers/pagingHelpers.ts @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { RestError } from "@azure/core-rest-pipeline"; + +/** + * Options for the byPage method + */ +export interface PageSettings { + /** + * A reference to a specific page to start iterating from. + */ + continuationToken?: string; +} + +/** + * An interface that describes a page of results. + */ +export type ContinuablePage = TPage & { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +}; + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; +} + +/** + * An interface that describes how to communicate with the service. + */ +export interface PagedResult< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * Link to the first page of results. + */ + firstPageLink?: string; + /** + * A method that returns a page of results. + */ + getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator>; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => TElement[]; +} + +/** + * Options for the paging helper + */ +export interface BuildPagedAsyncIteratorOptions { + itemName?: string; + nextLinkName?: string; + nextLinkMethod?: "GET" | "POST"; + apiVersion?: string; +} + +/** + * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator + */ +export function buildPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +>( + client: Client, + getInitialResponse: () => PromiseLike, + processResponseBody: (result: TResponse) => PromiseLike, + expectedStatuses: string[], + options: BuildPagedAsyncIteratorOptions = {}, +): PagedAsyncIterableIterator { + const itemName = options.itemName ?? "value"; + const nextLinkName = options.nextLinkName ?? "nextLink"; + const nextLinkMethod = options.nextLinkMethod ?? "GET"; + const apiVersion = options.apiVersion; + const pagedResult: PagedResult = { + getPage: async (pageLink?: string) => { + let result; + if (pageLink === undefined) { + result = await getInitialResponse(); + } else { + const resolvedPageLink = apiVersion ? addApiVersionToUrl(pageLink, apiVersion) : pageLink; + result = + nextLinkMethod === "POST" + ? await client.pathUnchecked(resolvedPageLink).post() + : await client.pathUnchecked(resolvedPageLink).get(); + } + checkPagingRequest(result, expectedStatuses); + const results = await processResponseBody(result as TResponse); + const nextLink = getNextLink(results, nextLinkName); + const values = getElements(results, itemName) as TPage; + return { + page: values, + nextPageLink: nextLink, + }; + }, + byPage: (settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }, + }; + return getPagedAsyncIterator(pagedResult); +} + +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ + +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + ((settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + for await (const page of pages) { + yield* page as unknown as TElement[]; + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: string; + } = {}, +): AsyncIterableIterator> { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + let result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + } +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) { + throw new RestError( + `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`, + ); + } + + if (nextLink === null) { + return undefined; + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + if (!Array.isArray(value)) { + throw new RestError( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { + if (!expectedStatuses.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} + +/** + * Adds the api-version query parameter on a URL if it's not present. + * @param url - the URL to modify + * @param apiVersion - the API version to set + * @returns - the URL with the api-version query parameter set + */ +function addApiVersionToUrl(url: string, apiVersion: string): string { + // The base URL is only used for parsing and won't appear in the returned URL + const urlObj = new URL(url, "https://microsoft.com"); + if (!urlObj.searchParams.get("api-version")) { + // Append one if there is no apiVersion + return `${url}${urlObj.search ? "&" : "?"}api-version=${apiVersion}`; + } + return url; +} diff --git a/sdk/network/arm-network/src/static-helpers/pollingHelpers.ts b/sdk/network/arm-network/src/static-helpers/pollingHelpers.ts new file mode 100644 index 000000000000..6fd1221b06ae --- /dev/null +++ b/sdk/network/arm-network/src/static-helpers/pollingHelpers.ts @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + PollerLike, + OperationState, + ResourceLocationConfig, + RunningOperation, + createHttpPoller, + OperationResponse, +} from "@azure/core-lro"; + +import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; + +export interface GetLongRunningPollerOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * The potential location of the result of the LRO if specified by the LRO extension in the swagger. + */ + resourceLocationConfig?: ResourceLocationConfig; + /** + * The original url of the LRO + * Should not be null when restoreFrom is set + */ + initialRequestUrl?: string; + /** + * A serialized poller which can be used to resume an existing paused Long-Running-Operation. + */ + restoreFrom?: string; + /** + * The function to get the initial response + */ + getInitialResponse?: () => PromiseLike; + /** + * The api-version of the LRO + */ + apiVersion?: string; +} +export function getLongRunningPoller( + client: Client, + processResponseBody: (result: TResponse) => Promise, + expectedStatuses: string[], + options: GetLongRunningPollerOptions, +): PollerLike, TResult> { + const { restoreFrom, getInitialResponse, apiVersion } = options; + if (!restoreFrom && !getInitialResponse) { + throw new Error("Either restoreFrom or getInitialResponse must be specified"); + } + let initialResponse: TResponse | undefined = undefined; + const pollAbortController = new AbortController(); + const poller: RunningOperation = { + sendInitialRequest: async () => { + if (!getInitialResponse) { + throw new Error("getInitialResponse is required when initializing a new poller"); + } + initialResponse = await getInitialResponse(); + return getLroResponse(initialResponse, expectedStatuses); + }, + sendPollRequest: async ( + path: string, + pollOptions?: { + abortSignal?: AbortSignalLike; + }, + ) => { + // The poll request would both listen to the user provided abort signal and the poller's own abort signal + function abortListener(): void { + pollAbortController.abort(); + } + const abortSignal = pollAbortController.signal; + if (options.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (pollOptions?.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (!abortSignal.aborted) { + options.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + pollOptions?.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + const pollingPath = apiVersion ? addApiVersionToUrl(path, apiVersion) : path; + response = await client.pathUnchecked(pollingPath).get({ abortSignal }); + } finally { + options.abortSignal?.removeEventListener("abort", abortListener); + pollOptions?.abortSignal?.removeEventListener("abort", abortListener); + } + + return getLroResponse(response as TResponse, expectedStatuses); + }, + }; + return createHttpPoller(poller, { + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: options?.resourceLocationConfig, + restoreFrom: options?.restoreFrom, + processResult: (result: unknown) => { + return processResponseBody(result as TResponse); + }, + }); +} +/** + * Converts a Rest Client response to a response that the LRO implementation understands + * @param response - a rest client http response + * @param deserializeFn - deserialize function to convert Rest response to modular output + * @returns - An LRO response that the LRO implementation understands + */ +function getLroResponse( + response: TResponse, + expectedStatuses: string[], +): OperationResponse { + if (!expectedStatuses.includes(response.status)) { + throw createRestError(response); + } + + return { + flatResponse: response, + rawResponse: { + ...response, + statusCode: Number.parseInt(response.status), + body: response.body, + }, + }; +} + +/** + * Adds the api-version query parameter on a URL if it's not present. + * @param url - the URL to modify + * @param apiVersion - the API version to set + * @returns - the URL with the api-version query parameter set + */ +function addApiVersionToUrl(url: string, apiVersion: string): string { + // The base URL is only used for parsing and won't appear in the returned URL + const urlObj = new URL(url, "https://microsoft.com"); + if (!urlObj.searchParams.get("api-version")) { + // Append one if there is no apiVersion + return `${url}${urlObj.search ? "&" : "?"}api-version=${apiVersion}`; + } + return url; +} diff --git a/sdk/network/arm-network/src/static-helpers/serialization/check-prop-undefined.ts b/sdk/network/arm-network/src/static-helpers/serialization/check-prop-undefined.ts new file mode 100644 index 000000000000..50f78829e491 --- /dev/null +++ b/sdk/network/arm-network/src/static-helpers/serialization/check-prop-undefined.ts @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Returns true if all specified properties of the item are undefined. + * @param item The object to check. + * @param properties The list of property names to check on the item. + * @returns True if all specified properties are undefined, otherwise false. + */ +export function areAllPropsUndefined(item: Record, properties: string[]): boolean { + for (const property of properties) { + if (item[property] !== undefined) { + return false; + } + } + return true; +} diff --git a/sdk/network/arm-network/src/static-helpers/simplePollerHelpers.ts b/sdk/network/arm-network/src/static-helpers/simplePollerHelpers.ts new file mode 100644 index 000000000000..21c6d5eee895 --- /dev/null +++ b/sdk/network/arm-network/src/static-helpers/simplePollerHelpers.ts @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PollerLike, OperationState, CancelOnProgress } from "@azure/core-lro"; +import { AbortSignalLike } from "@azure/abort-controller"; + +/** + * A simple poller that can be used to poll a long running operation. + */ +export interface SimplePollerLike, TResult> { + /** + * Returns true if the poller has finished polling. + */ + isDone(): boolean; + /** + * Returns the state of the operation. + */ + getOperationState(): TState; + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult(): TResult | undefined; + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + */ + poll(options?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback: (state: TState) => void): CancelOnProgress; + + /** + * Returns a promise that could be used for serialized version of the poller's operation + * by invoking the operation's serialize method. + */ + serialize(): Promise; + + /** + * Wait the poller to be submitted. + */ + submitted(): Promise; + + /** + * Returns a string representation of the poller's operation. Similar to serialize but returns a string. + * @deprecated Use serialize() instead. + */ + toString(): string; + + /** + * Stops the poller from continuing to poll. Please note this will only stop the client-side polling + * @deprecated Use abortSignal to stop polling instead. + */ + stopPolling(): void; + + /** + * Returns true if the poller is stopped. + * @deprecated Use abortSignal status to track this instead. + */ + isStopped(): boolean; +} + +/** + * Create the deprecated SimplePollerLike from PollerLike + * @param poller PollerLike to convert + * @returns SimplePollerLike + */ +export function getSimplePoller( + poller: PollerLike, TResult>, +): SimplePollerLike, TResult> { + const simplePoller: SimplePollerLike, TResult> = { + isDone() { + return poller.isDone; + }, + isStopped() { + throw new Error("isStopped is deprecated. Use abortSignal status to track this instead."); + }, + getOperationState() { + if (!poller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return poller.operationState; + }, + getResult() { + return poller.result; + }, + toString() { + if (!poller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return JSON.stringify({ + state: poller.operationState, + }); + }, + stopPolling() { + throw new Error("stopPolling is deprecated. Use abortSignal to stop polling instead."); + }, + onProgress: poller.onProgress, + poll: poller.poll, + pollUntilDone: poller.pollUntilDone, + serialize: poller.serialize, + submitted: poller.submitted, + }; + return simplePoller; +} diff --git a/sdk/network/arm-network/src/static-helpers/urlTemplate.ts b/sdk/network/arm-network/src/static-helpers/urlTemplate.ts new file mode 100644 index 000000000000..e8af8cd3ab73 --- /dev/null +++ b/sdk/network/arm-network/src/static-helpers/urlTemplate.ts @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// --------------------- +// interfaces +// --------------------- +interface ValueOptions { + isFirst: boolean; // is first value in the expression + op?: string; // operator + varValue?: any; // variable value + varName?: string; // variable name + modifier?: string; // modifier e.g * + reserved?: boolean; // if true we'll keep reserved words with not encoding +} + +export interface UrlTemplateOptions { + // if set to true, reserved characters will not be encoded + allowReserved?: boolean; +} + +// --------------------- +// helpers +// --------------------- +function encodeComponent(val: string, reserved?: boolean, op?: string): string { + return (reserved ?? op === "+") || op === "#" + ? encodeReservedComponent(val) + : encodeRFC3986URIComponent(val); +} + +function encodeReservedComponent(str: string): string { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map((part) => (!/%[0-9A-Fa-f]/.test(part) ? encodeURI(part) : part)) + .join(""); +} + +function encodeRFC3986URIComponent(str: string): string { + return encodeURIComponent(str).replace( + /[!'()*]/g, + (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, + ); +} + +function isDefined(val: any): boolean { + return val !== undefined && val !== null; +} + +function getNamedAndIfEmpty(op?: string): [boolean, string] { + return [!!op && [";", "?", "&"].includes(op), !!op && ["?", "&"].includes(op) ? "=" : ""]; +} + +function getFirstOrSep(op?: string, isFirst = false): string { + if (isFirst) { + return !op || op === "+" ? "" : op; + } else if (!op || op === "+" || op === "#") { + return ","; + } else if (op === "?") { + return "&"; + } else { + return op; + } +} + +function getExpandedValue(option: ValueOptions): string { + let isFirst = option.isFirst; + const { op, varName, varValue: value, reserved } = option; + const vals: string[] = []; + const [named, ifEmpty] = getNamedAndIfEmpty(op); + + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + // prepare the following parts: separator, varName, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (named && varName) { + vals.push(`${encodeURIComponent(varName)}`); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + const val = value[key]; + if (!isDefined(val)) { + continue; + } + // prepare the following parts: separator, key, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (key) { + vals.push(`${encodeURIComponent(key)}`); + if (named && val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } + return vals.join(""); +} + +function getNonExpandedValue(option: ValueOptions): string | undefined { + const { op, varName, varValue: value, isFirst, reserved } = option; + const vals: string[] = []; + const first = getFirstOrSep(op, isFirst); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + if (named && varName) { + vals.push(encodeComponent(varName, reserved, op)); + if (value === "") { + if (!ifEmpty) { + vals.push(ifEmpty); + } + return !vals.join("") ? undefined : `${first}${vals.join("")}`; + } + vals.push("="); + } + + const items = []; + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + items.push(encodeComponent(val, reserved, op)); + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + if (!isDefined(value[key])) { + continue; + } + items.push(encodeRFC3986URIComponent(key)); + items.push(encodeComponent(value[key], reserved, op)); + } + } + vals.push(items.join(",")); + return !vals.join(",") ? undefined : `${first}${vals.join("")}`; +} + +function getVarValue(option: ValueOptions): string | undefined { + const { op, varName, modifier, isFirst, reserved, varValue: value } = option; + + if (!isDefined(value)) { + return undefined; + } else if (["string", "number", "boolean"].includes(typeof value)) { + let val = value.toString(); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + const vals: string[] = [getFirstOrSep(op, isFirst)]; + if (named && varName) { + // No need to encode varName considering it is already encoded + vals.push(varName); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + if (modifier && modifier !== "*") { + val = val.substring(0, parseInt(modifier, 10)); + } + vals.push(encodeComponent(val, reserved, op)); + return vals.join(""); + } else if (modifier === "*") { + return getExpandedValue(option); + } else { + return getNonExpandedValue(option); + } +} + +// --------------------------------------------------------------------------------------------------- +// This is an implementation of RFC 6570 URI Template: https://datatracker.ietf.org/doc/html/rfc6570. +// --------------------------------------------------------------------------------------------------- +export function expandUrlTemplate( + template: string, + context: Record, + option?: UrlTemplateOptions, +): string { + const result = template.replace(/\{([^{}]+)\}|([^{}]+)/g, (_, expr, text) => { + if (!expr) { + return encodeReservedComponent(text); + } + let op; + if (["+", "#", ".", "/", ";", "?", "&"].includes(expr[0])) { + op = expr[0]; + expr = expr.slice(1); + } + const varList = expr.split(/,/g); + const innerResult = []; + for (const varSpec of varList) { + const varMatch = /([^:*]*)(?::(\d+)|(\*))?/.exec(varSpec); + if (!varMatch || !varMatch[1]) { + continue; + } + const varValue = getVarValue({ + isFirst: innerResult.length === 0, + op, + varValue: context[varMatch[1]], + varName: varMatch[1], + modifier: varMatch[2] || varMatch[3], + reserved: option?.allowReserved, + }); + if (varValue) { + innerResult.push(varValue); + } + } + return innerResult.join(""); + }); + + return normalizeUnreserved(result); +} + +/** + * Normalize an expanded URI by decoding percent-encoded unreserved characters. + * RFC 3986 unreserved: "-" / "." / "~" + */ +function normalizeUnreserved(uri: string): string { + return uri.replace(/%([0-9A-Fa-f]{2})/g, (match, hex) => { + const char = String.fromCharCode(parseInt(hex, 16)); + // Decode only if it's unreserved + if (/[.~-]/.test(char)) { + return char; + } + return match; // leave other encodings intact + }); +} diff --git a/sdk/network/arm-network/test/snippets.spec.ts b/sdk/network/arm-network/test/snippets.spec.ts index ab4b5475c473..5a1ee62b5f23 100644 --- a/sdk/network/arm-network/test/snippets.spec.ts +++ b/sdk/network/arm-network/test/snippets.spec.ts @@ -13,11 +13,11 @@ describe("snippets", () => { }); it("ReadmeSampleCreateClient_Browser", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", clientId: "", }); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(credential, subscriptionId); }); diff --git a/sdk/network/arm-network/tsconfig.browser.config.json b/sdk/network/arm-network/tsconfig.browser.config.json deleted file mode 100644 index 2b67c9dfec05..000000000000 --- a/sdk/network/arm-network/tsconfig.browser.config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.browser.base.json", - "compilerOptions": { - "paths": { - "@azure/arm-network": ["./dist/browser/index.d.ts"], - "@azure/arm-network/*": ["./dist/browser/*"], - "$internal/*": ["./dist/browser/*"] - } - } -} diff --git a/sdk/network/arm-network/tsconfig.json b/sdk/network/arm-network/tsconfig.json index c78ebf9f221a..926875997540 100644 --- a/sdk/network/arm-network/tsconfig.json +++ b/sdk/network/arm-network/tsconfig.json @@ -1,17 +1,29 @@ { "references": [ { - "path": "./tsconfig.src.json" + "path": "./config/tsconfig.src.esm.json" }, { - "path": "./tsconfig.samples.json" + "path": "./config/tsconfig.src.browser.json" }, { - "path": "./tsconfig.test.json" + "path": "./config/tsconfig.src.react-native.json" }, { - "path": "./tsconfig.snippets.json" + "path": "./config/tsconfig.src.cjs.json" + }, + { + "path": "./config/tsconfig.test.node.json" + }, + { + "path": "./config/tsconfig.test.browser.json" + }, + { + "path": "./config/tsconfig.samples.json" + }, + { + "path": "./config/tsconfig.snippets.json" } ], - "include": ["./src/**/*.ts"] + "files": [] } diff --git a/sdk/network/arm-network/tsconfig.samples.json b/sdk/network/arm-network/tsconfig.samples.json deleted file mode 100644 index cb21c3e2aac9..000000000000 --- a/sdk/network/arm-network/tsconfig.samples.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../../tsconfig.samples.base.json", - "compilerOptions": { - "paths": { - "@azure/arm-network": ["./dist/esm"] - } - } -} diff --git a/sdk/network/arm-network/tsconfig.snippets.json b/sdk/network/arm-network/tsconfig.snippets.json deleted file mode 100644 index 6f3148b5ed97..000000000000 --- a/sdk/network/arm-network/tsconfig.snippets.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["../../../tsconfig.snippets.base.json"] -} diff --git a/sdk/network/arm-network/tsconfig.src.json b/sdk/network/arm-network/tsconfig.src.json deleted file mode 100644 index bae70752dd38..000000000000 --- a/sdk/network/arm-network/tsconfig.src.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.lib.json" -} diff --git a/sdk/network/arm-network/tsconfig.test.json b/sdk/network/arm-network/tsconfig.test.json deleted file mode 100644 index 42798ad68913..000000000000 --- a/sdk/network/arm-network/tsconfig.test.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "references": [ - { - "path": "./tsconfig.test.node.json" - }, - { - "path": "./tsconfig.browser.config.json" - } - ], - "compilerOptions": { - "composite": true - }, - "files": [] -} diff --git a/sdk/network/arm-network/tsconfig.test.node.json b/sdk/network/arm-network/tsconfig.test.node.json deleted file mode 100644 index eb1d1d8fbd27..000000000000 --- a/sdk/network/arm-network/tsconfig.test.node.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.test.node.base.json", - "compilerOptions": { - "paths": { - "@azure/arm-network": ["./src/index.ts"], - "@azure/arm-network/*": ["./src/*"], - "$internal/*": ["./src/*"] - } - } -} diff --git a/sdk/network/arm-network/tsp-location.yaml b/sdk/network/arm-network/tsp-location.yaml new file mode 100644 index 000000000000..2ca153382939 --- /dev/null +++ b/sdk/network/arm-network/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/network/resource-manager/Microsoft.Network/Network +commit: c11f4a99a0d0a430e825fab35ec8e5748fa48756 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/network/arm-network/vitest.browser.config.ts b/sdk/network/arm-network/vitest.browser.config.ts index 72964f281efe..3005cfd05093 100644 --- a/sdk/network/arm-network/vitest.browser.config.ts +++ b/sdk/network/arm-network/vitest.browser.config.ts @@ -1,6 +1,4 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import viteConfig from "../../../vitest.browser.shared.config.ts"; - -export default viteConfig; +export { default } from "../../../eng/vitestconfigs/browser.config.ts"; diff --git a/sdk/network/arm-network/vitest.esm.config.ts b/sdk/network/arm-network/vitest.esm.config.ts deleted file mode 100644 index 5e9735e9b144..000000000000 --- a/sdk/network/arm-network/vitest.esm.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { mergeConfig } from "vitest/config"; -import vitestConfig from "./vitest.config.ts"; -import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; - -export default mergeConfig(vitestConfig, vitestEsmConfig); diff --git a/sdk/network/arm-network/warp.config.yml b/sdk/network/arm-network/warp.config.yml index 544a1a46ce20..3ba99a6e0da9 100644 --- a/sdk/network/arm-network/warp.config.yml +++ b/sdk/network/arm-network/warp.config.yml @@ -1 +1,25 @@ -extends: ../../../warp.base.config.yml +# warp.config.yml — build configuration + +exports: + "./package.json": "./package.json" + ".": "./src/index.ts" + "./api": "./src/api/index.ts" + "./models": "./src/models/index.ts" + "./models/common": "./src/models/common/index.ts" + "./models/microsoft/network": "./src/models/microsoft/network/index.ts" + +targets: + - name: browser + tsconfig: "./config/tsconfig.src.browser.json" + + - name: react-native + tsconfig: "./config/tsconfig.src.react-native.json" + + - name: esm + condition: import + tsconfig: "./config/tsconfig.src.esm.json" + + - name: commonjs + condition: require + tsconfig: "./config/tsconfig.src.cjs.json" + moduleType: commonjs